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

168985 lines
6.6 MiB

  1. /* Generated by Cython 0.29.10 */
  2. /* BEGIN: Cython Metadata
  3. {
  4. "distutils": {
  5. "depends": [],
  6. "extra_compile_args": [
  7. "-O2"
  8. ],
  9. "name": "uvloop.loop",
  10. "sources": [
  11. "uvloop/loop.pyx"
  12. ]
  13. },
  14. "module_name": "uvloop.loop"
  15. }
  16. END: Cython Metadata */
  17. #define PY_SSIZE_T_CLEAN
  18. #include "Python.h"
  19. #ifndef Py_PYTHON_H
  20. #error Python headers needed to compile C extensions, please install development version of Python.
  21. #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
  22. #error Cython requires Python 2.6+ or Python 3.3+.
  23. #else
  24. #define CYTHON_ABI "0_29_10"
  25. #define CYTHON_HEX_VERSION 0x001D0AF0
  26. #define CYTHON_FUTURE_DIVISION 1
  27. #include <stddef.h>
  28. #ifndef offsetof
  29. #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
  30. #endif
  31. #if !defined(WIN32) && !defined(MS_WINDOWS)
  32. #ifndef __stdcall
  33. #define __stdcall
  34. #endif
  35. #ifndef __cdecl
  36. #define __cdecl
  37. #endif
  38. #ifndef __fastcall
  39. #define __fastcall
  40. #endif
  41. #endif
  42. #ifndef DL_IMPORT
  43. #define DL_IMPORT(t) t
  44. #endif
  45. #ifndef DL_EXPORT
  46. #define DL_EXPORT(t) t
  47. #endif
  48. #define __PYX_COMMA ,
  49. #ifndef HAVE_LONG_LONG
  50. #if PY_VERSION_HEX >= 0x02070000
  51. #define HAVE_LONG_LONG
  52. #endif
  53. #endif
  54. #ifndef PY_LONG_LONG
  55. #define PY_LONG_LONG LONG_LONG
  56. #endif
  57. #ifndef Py_HUGE_VAL
  58. #define Py_HUGE_VAL HUGE_VAL
  59. #endif
  60. #ifdef PYPY_VERSION
  61. #define CYTHON_COMPILING_IN_PYPY 1
  62. #define CYTHON_COMPILING_IN_PYSTON 0
  63. #define CYTHON_COMPILING_IN_CPYTHON 0
  64. #undef CYTHON_USE_TYPE_SLOTS
  65. #define CYTHON_USE_TYPE_SLOTS 0
  66. #undef CYTHON_USE_PYTYPE_LOOKUP
  67. #define CYTHON_USE_PYTYPE_LOOKUP 0
  68. #if PY_VERSION_HEX < 0x03050000
  69. #undef CYTHON_USE_ASYNC_SLOTS
  70. #define CYTHON_USE_ASYNC_SLOTS 0
  71. #elif !defined(CYTHON_USE_ASYNC_SLOTS)
  72. #define CYTHON_USE_ASYNC_SLOTS 1
  73. #endif
  74. #undef CYTHON_USE_PYLIST_INTERNALS
  75. #define CYTHON_USE_PYLIST_INTERNALS 0
  76. #undef CYTHON_USE_UNICODE_INTERNALS
  77. #define CYTHON_USE_UNICODE_INTERNALS 0
  78. #undef CYTHON_USE_UNICODE_WRITER
  79. #define CYTHON_USE_UNICODE_WRITER 0
  80. #undef CYTHON_USE_PYLONG_INTERNALS
  81. #define CYTHON_USE_PYLONG_INTERNALS 0
  82. #undef CYTHON_AVOID_BORROWED_REFS
  83. #define CYTHON_AVOID_BORROWED_REFS 1
  84. #undef CYTHON_ASSUME_SAFE_MACROS
  85. #define CYTHON_ASSUME_SAFE_MACROS 0
  86. #undef CYTHON_UNPACK_METHODS
  87. #define CYTHON_UNPACK_METHODS 0
  88. #undef CYTHON_FAST_THREAD_STATE
  89. #define CYTHON_FAST_THREAD_STATE 0
  90. #undef CYTHON_FAST_PYCALL
  91. #define CYTHON_FAST_PYCALL 0
  92. #undef CYTHON_PEP489_MULTI_PHASE_INIT
  93. #define CYTHON_PEP489_MULTI_PHASE_INIT 0
  94. #undef CYTHON_USE_TP_FINALIZE
  95. #define CYTHON_USE_TP_FINALIZE 0
  96. #undef CYTHON_USE_DICT_VERSIONS
  97. #define CYTHON_USE_DICT_VERSIONS 0
  98. #undef CYTHON_USE_EXC_INFO_STACK
  99. #define CYTHON_USE_EXC_INFO_STACK 0
  100. #elif defined(PYSTON_VERSION)
  101. #define CYTHON_COMPILING_IN_PYPY 0
  102. #define CYTHON_COMPILING_IN_PYSTON 1
  103. #define CYTHON_COMPILING_IN_CPYTHON 0
  104. #ifndef CYTHON_USE_TYPE_SLOTS
  105. #define CYTHON_USE_TYPE_SLOTS 1
  106. #endif
  107. #undef CYTHON_USE_PYTYPE_LOOKUP
  108. #define CYTHON_USE_PYTYPE_LOOKUP 0
  109. #undef CYTHON_USE_ASYNC_SLOTS
  110. #define CYTHON_USE_ASYNC_SLOTS 0
  111. #undef CYTHON_USE_PYLIST_INTERNALS
  112. #define CYTHON_USE_PYLIST_INTERNALS 0
  113. #ifndef CYTHON_USE_UNICODE_INTERNALS
  114. #define CYTHON_USE_UNICODE_INTERNALS 1
  115. #endif
  116. #undef CYTHON_USE_UNICODE_WRITER
  117. #define CYTHON_USE_UNICODE_WRITER 0
  118. #undef CYTHON_USE_PYLONG_INTERNALS
  119. #define CYTHON_USE_PYLONG_INTERNALS 0
  120. #ifndef CYTHON_AVOID_BORROWED_REFS
  121. #define CYTHON_AVOID_BORROWED_REFS 0
  122. #endif
  123. #ifndef CYTHON_ASSUME_SAFE_MACROS
  124. #define CYTHON_ASSUME_SAFE_MACROS 1
  125. #endif
  126. #ifndef CYTHON_UNPACK_METHODS
  127. #define CYTHON_UNPACK_METHODS 1
  128. #endif
  129. #undef CYTHON_FAST_THREAD_STATE
  130. #define CYTHON_FAST_THREAD_STATE 0
  131. #undef CYTHON_FAST_PYCALL
  132. #define CYTHON_FAST_PYCALL 0
  133. #undef CYTHON_PEP489_MULTI_PHASE_INIT
  134. #define CYTHON_PEP489_MULTI_PHASE_INIT 0
  135. #undef CYTHON_USE_TP_FINALIZE
  136. #define CYTHON_USE_TP_FINALIZE 0
  137. #undef CYTHON_USE_DICT_VERSIONS
  138. #define CYTHON_USE_DICT_VERSIONS 0
  139. #undef CYTHON_USE_EXC_INFO_STACK
  140. #define CYTHON_USE_EXC_INFO_STACK 0
  141. #else
  142. #define CYTHON_COMPILING_IN_PYPY 0
  143. #define CYTHON_COMPILING_IN_PYSTON 0
  144. #define CYTHON_COMPILING_IN_CPYTHON 1
  145. #ifndef CYTHON_USE_TYPE_SLOTS
  146. #define CYTHON_USE_TYPE_SLOTS 1
  147. #endif
  148. #if PY_VERSION_HEX < 0x02070000
  149. #undef CYTHON_USE_PYTYPE_LOOKUP
  150. #define CYTHON_USE_PYTYPE_LOOKUP 0
  151. #elif !defined(CYTHON_USE_PYTYPE_LOOKUP)
  152. #define CYTHON_USE_PYTYPE_LOOKUP 1
  153. #endif
  154. #if PY_MAJOR_VERSION < 3
  155. #undef CYTHON_USE_ASYNC_SLOTS
  156. #define CYTHON_USE_ASYNC_SLOTS 0
  157. #elif !defined(CYTHON_USE_ASYNC_SLOTS)
  158. #define CYTHON_USE_ASYNC_SLOTS 1
  159. #endif
  160. #if PY_VERSION_HEX < 0x02070000
  161. #undef CYTHON_USE_PYLONG_INTERNALS
  162. #define CYTHON_USE_PYLONG_INTERNALS 0
  163. #elif !defined(CYTHON_USE_PYLONG_INTERNALS)
  164. #define CYTHON_USE_PYLONG_INTERNALS 1
  165. #endif
  166. #ifndef CYTHON_USE_PYLIST_INTERNALS
  167. #define CYTHON_USE_PYLIST_INTERNALS 1
  168. #endif
  169. #ifndef CYTHON_USE_UNICODE_INTERNALS
  170. #define CYTHON_USE_UNICODE_INTERNALS 1
  171. #endif
  172. #if PY_VERSION_HEX < 0x030300F0
  173. #undef CYTHON_USE_UNICODE_WRITER
  174. #define CYTHON_USE_UNICODE_WRITER 0
  175. #elif !defined(CYTHON_USE_UNICODE_WRITER)
  176. #define CYTHON_USE_UNICODE_WRITER 1
  177. #endif
  178. #ifndef CYTHON_AVOID_BORROWED_REFS
  179. #define CYTHON_AVOID_BORROWED_REFS 0
  180. #endif
  181. #ifndef CYTHON_ASSUME_SAFE_MACROS
  182. #define CYTHON_ASSUME_SAFE_MACROS 1
  183. #endif
  184. #ifndef CYTHON_UNPACK_METHODS
  185. #define CYTHON_UNPACK_METHODS 1
  186. #endif
  187. #ifndef CYTHON_FAST_THREAD_STATE
  188. #define CYTHON_FAST_THREAD_STATE 1
  189. #endif
  190. #ifndef CYTHON_FAST_PYCALL
  191. #define CYTHON_FAST_PYCALL 1
  192. #endif
  193. #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
  194. #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000)
  195. #endif
  196. #ifndef CYTHON_USE_TP_FINALIZE
  197. #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1)
  198. #endif
  199. #ifndef CYTHON_USE_DICT_VERSIONS
  200. #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX >= 0x030600B1)
  201. #endif
  202. #ifndef CYTHON_USE_EXC_INFO_STACK
  203. #define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3)
  204. #endif
  205. #endif
  206. #if !defined(CYTHON_FAST_PYCCALL)
  207. #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
  208. #endif
  209. #if CYTHON_USE_PYLONG_INTERNALS
  210. #include "longintrepr.h"
  211. #undef SHIFT
  212. #undef BASE
  213. #undef MASK
  214. #ifdef SIZEOF_VOID_P
  215. enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) };
  216. #endif
  217. #endif
  218. #ifndef __has_attribute
  219. #define __has_attribute(x) 0
  220. #endif
  221. #ifndef __has_cpp_attribute
  222. #define __has_cpp_attribute(x) 0
  223. #endif
  224. #ifndef CYTHON_RESTRICT
  225. #if defined(__GNUC__)
  226. #define CYTHON_RESTRICT __restrict__
  227. #elif defined(_MSC_VER) && _MSC_VER >= 1400
  228. #define CYTHON_RESTRICT __restrict
  229. #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
  230. #define CYTHON_RESTRICT restrict
  231. #else
  232. #define CYTHON_RESTRICT
  233. #endif
  234. #endif
  235. #ifndef CYTHON_UNUSED
  236. # if defined(__GNUC__)
  237. # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
  238. # define CYTHON_UNUSED __attribute__ ((__unused__))
  239. # else
  240. # define CYTHON_UNUSED
  241. # endif
  242. # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
  243. # define CYTHON_UNUSED __attribute__ ((__unused__))
  244. # else
  245. # define CYTHON_UNUSED
  246. # endif
  247. #endif
  248. #ifndef CYTHON_MAYBE_UNUSED_VAR
  249. # if defined(__cplusplus)
  250. template<class T> void CYTHON_MAYBE_UNUSED_VAR( const T& ) { }
  251. # else
  252. # define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
  253. # endif
  254. #endif
  255. #ifndef CYTHON_NCP_UNUSED
  256. # if CYTHON_COMPILING_IN_CPYTHON
  257. # define CYTHON_NCP_UNUSED
  258. # else
  259. # define CYTHON_NCP_UNUSED CYTHON_UNUSED
  260. # endif
  261. #endif
  262. #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
  263. #ifdef _MSC_VER
  264. #ifndef _MSC_STDINT_H_
  265. #if _MSC_VER < 1300
  266. typedef unsigned char uint8_t;
  267. typedef unsigned int uint32_t;
  268. #else
  269. typedef unsigned __int8 uint8_t;
  270. typedef unsigned __int32 uint32_t;
  271. #endif
  272. #endif
  273. #else
  274. #include <stdint.h>
  275. #endif
  276. #ifndef CYTHON_FALLTHROUGH
  277. #if defined(__cplusplus) && __cplusplus >= 201103L
  278. #if __has_cpp_attribute(fallthrough)
  279. #define CYTHON_FALLTHROUGH [[fallthrough]]
  280. #elif __has_cpp_attribute(clang::fallthrough)
  281. #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
  282. #elif __has_cpp_attribute(gnu::fallthrough)
  283. #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
  284. #endif
  285. #endif
  286. #ifndef CYTHON_FALLTHROUGH
  287. #if __has_attribute(fallthrough)
  288. #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
  289. #else
  290. #define CYTHON_FALLTHROUGH
  291. #endif
  292. #endif
  293. #if defined(__clang__ ) && defined(__apple_build_version__)
  294. #if __apple_build_version__ < 7000000
  295. #undef CYTHON_FALLTHROUGH
  296. #define CYTHON_FALLTHROUGH
  297. #endif
  298. #endif
  299. #endif
  300. #ifndef CYTHON_INLINE
  301. #if defined(__clang__)
  302. #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
  303. #elif defined(__GNUC__)
  304. #define CYTHON_INLINE __inline__
  305. #elif defined(_MSC_VER)
  306. #define CYTHON_INLINE __inline
  307. #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
  308. #define CYTHON_INLINE inline
  309. #else
  310. #define CYTHON_INLINE
  311. #endif
  312. #endif
  313. #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
  314. #define Py_OptimizeFlag 0
  315. #endif
  316. #define __PYX_BUILD_PY_SSIZE_T "n"
  317. #define CYTHON_FORMAT_SSIZE_T "z"
  318. #if PY_MAJOR_VERSION < 3
  319. #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
  320. #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
  321. PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
  322. #define __Pyx_DefaultClassType PyClass_Type
  323. #else
  324. #define __Pyx_BUILTIN_MODULE_NAME "builtins"
  325. #if PY_VERSION_HEX < 0x030800A4
  326. #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
  327. PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
  328. #else
  329. #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
  330. PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
  331. #endif
  332. #define __Pyx_DefaultClassType PyType_Type
  333. #endif
  334. #ifndef Py_TPFLAGS_CHECKTYPES
  335. #define Py_TPFLAGS_CHECKTYPES 0
  336. #endif
  337. #ifndef Py_TPFLAGS_HAVE_INDEX
  338. #define Py_TPFLAGS_HAVE_INDEX 0
  339. #endif
  340. #ifndef Py_TPFLAGS_HAVE_NEWBUFFER
  341. #define Py_TPFLAGS_HAVE_NEWBUFFER 0
  342. #endif
  343. #ifndef Py_TPFLAGS_HAVE_FINALIZE
  344. #define Py_TPFLAGS_HAVE_FINALIZE 0
  345. #endif
  346. #ifndef METH_STACKLESS
  347. #define METH_STACKLESS 0
  348. #endif
  349. #if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL)
  350. #ifndef METH_FASTCALL
  351. #define METH_FASTCALL 0x80
  352. #endif
  353. typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);
  354. typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
  355. Py_ssize_t nargs, PyObject *kwnames);
  356. #else
  357. #define __Pyx_PyCFunctionFast _PyCFunctionFast
  358. #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
  359. #endif
  360. #if CYTHON_FAST_PYCCALL
  361. #define __Pyx_PyFastCFunction_Check(func)\
  362. ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)))))
  363. #else
  364. #define __Pyx_PyFastCFunction_Check(func) 0
  365. #endif
  366. #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
  367. #define PyObject_Malloc(s) PyMem_Malloc(s)
  368. #define PyObject_Free(p) PyMem_Free(p)
  369. #define PyObject_Realloc(p) PyMem_Realloc(p)
  370. #endif
  371. #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030400A1
  372. #define PyMem_RawMalloc(n) PyMem_Malloc(n)
  373. #define PyMem_RawRealloc(p, n) PyMem_Realloc(p, n)
  374. #define PyMem_RawFree(p) PyMem_Free(p)
  375. #endif
  376. #if CYTHON_COMPILING_IN_PYSTON
  377. #define __Pyx_PyCode_HasFreeVars(co) PyCode_HasFreeVars(co)
  378. #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno)
  379. #else
  380. #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
  381. #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno)
  382. #endif
  383. #if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000
  384. #define __Pyx_PyThreadState_Current PyThreadState_GET()
  385. #elif PY_VERSION_HEX >= 0x03060000
  386. #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
  387. #elif PY_VERSION_HEX >= 0x03000000
  388. #define __Pyx_PyThreadState_Current PyThreadState_GET()
  389. #else
  390. #define __Pyx_PyThreadState_Current _PyThreadState_Current
  391. #endif
  392. #if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT)
  393. #include "pythread.h"
  394. #define Py_tss_NEEDS_INIT 0
  395. typedef int Py_tss_t;
  396. static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) {
  397. *key = PyThread_create_key();
  398. return 0;
  399. }
  400. static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) {
  401. Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t));
  402. *key = Py_tss_NEEDS_INIT;
  403. return key;
  404. }
  405. static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) {
  406. PyObject_Free(key);
  407. }
  408. static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) {
  409. return *key != Py_tss_NEEDS_INIT;
  410. }
  411. static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) {
  412. PyThread_delete_key(*key);
  413. *key = Py_tss_NEEDS_INIT;
  414. }
  415. static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) {
  416. return PyThread_set_key_value(*key, value);
  417. }
  418. static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
  419. return PyThread_get_key_value(*key);
  420. }
  421. #endif
  422. #if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
  423. #define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
  424. #else
  425. #define __Pyx_PyDict_NewPresized(n) PyDict_New()
  426. #endif
  427. #if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
  428. #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y)
  429. #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y)
  430. #else
  431. #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y)
  432. #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y)
  433. #endif
  434. #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && CYTHON_USE_UNICODE_INTERNALS
  435. #define __Pyx_PyDict_GetItemStr(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
  436. #else
  437. #define __Pyx_PyDict_GetItemStr(dict, name) PyDict_GetItem(dict, name)
  438. #endif
  439. #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
  440. #define CYTHON_PEP393_ENABLED 1
  441. #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\
  442. 0 : _PyUnicode_Ready((PyObject *)(op)))
  443. #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u)
  444. #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
  445. #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u)
  446. #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u)
  447. #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u)
  448. #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i)
  449. #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch)
  450. #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
  451. #else
  452. #define CYTHON_PEP393_ENABLED 0
  453. #define PyUnicode_1BYTE_KIND 1
  454. #define PyUnicode_2BYTE_KIND 2
  455. #define PyUnicode_4BYTE_KIND 4
  456. #define __Pyx_PyUnicode_READY(op) (0)
  457. #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u)
  458. #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
  459. #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111)
  460. #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE))
  461. #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u))
  462. #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
  463. #define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = ch)
  464. #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u))
  465. #endif
  466. #if CYTHON_COMPILING_IN_PYPY
  467. #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b)
  468. #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b)
  469. #else
  470. #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b)
  471. #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
  472. PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
  473. #endif
  474. #if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
  475. #define PyUnicode_Contains(u, s) PySequence_Contains(u, s)
  476. #endif
  477. #if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
  478. #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type)
  479. #endif
  480. #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
  481. #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt)
  482. #endif
  483. #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))
  484. #define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
  485. #if PY_MAJOR_VERSION >= 3
  486. #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b)
  487. #else
  488. #define __Pyx_PyString_Format(a, b) PyString_Format(a, b)
  489. #endif
  490. #if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
  491. #define PyObject_ASCII(o) PyObject_Repr(o)
  492. #endif
  493. #if PY_MAJOR_VERSION >= 3
  494. #define PyBaseString_Type PyUnicode_Type
  495. #define PyStringObject PyUnicodeObject
  496. #define PyString_Type PyUnicode_Type
  497. #define PyString_Check PyUnicode_Check
  498. #define PyString_CheckExact PyUnicode_CheckExact
  499. #define PyObject_Unicode PyObject_Str
  500. #endif
  501. #if PY_MAJOR_VERSION >= 3
  502. #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
  503. #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
  504. #else
  505. #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
  506. #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
  507. #endif
  508. #ifndef PySet_CheckExact
  509. #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type)
  510. #endif
  511. #if CYTHON_ASSUME_SAFE_MACROS
  512. #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq)
  513. #else
  514. #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq)
  515. #endif
  516. #if PY_MAJOR_VERSION >= 3
  517. #define PyIntObject PyLongObject
  518. #define PyInt_Type PyLong_Type
  519. #define PyInt_Check(op) PyLong_Check(op)
  520. #define PyInt_CheckExact(op) PyLong_CheckExact(op)
  521. #define PyInt_FromString PyLong_FromString
  522. #define PyInt_FromUnicode PyLong_FromUnicode
  523. #define PyInt_FromLong PyLong_FromLong
  524. #define PyInt_FromSize_t PyLong_FromSize_t
  525. #define PyInt_FromSsize_t PyLong_FromSsize_t
  526. #define PyInt_AsLong PyLong_AsLong
  527. #define PyInt_AS_LONG PyLong_AS_LONG
  528. #define PyInt_AsSsize_t PyLong_AsSsize_t
  529. #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask
  530. #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
  531. #define PyNumber_Int PyNumber_Long
  532. #endif
  533. #if PY_MAJOR_VERSION >= 3
  534. #define PyBoolObject PyLongObject
  535. #endif
  536. #if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
  537. #ifndef PyUnicode_InternFromString
  538. #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
  539. #endif
  540. #endif
  541. #if PY_VERSION_HEX < 0x030200A4
  542. typedef long Py_hash_t;
  543. #define __Pyx_PyInt_FromHash_t PyInt_FromLong
  544. #define __Pyx_PyInt_AsHash_t PyInt_AsLong
  545. #else
  546. #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
  547. #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t
  548. #endif
  549. #if PY_MAJOR_VERSION >= 3
  550. #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : (Py_INCREF(func), func))
  551. #else
  552. #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
  553. #endif
  554. #if CYTHON_USE_ASYNC_SLOTS
  555. #if PY_VERSION_HEX >= 0x030500B1
  556. #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
  557. #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
  558. #else
  559. #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
  560. #endif
  561. #else
  562. #define __Pyx_PyType_AsAsync(obj) NULL
  563. #endif
  564. #ifndef __Pyx_PyAsyncMethodsStruct
  565. typedef struct {
  566. unaryfunc am_await;
  567. unaryfunc am_aiter;
  568. unaryfunc am_anext;
  569. } __Pyx_PyAsyncMethodsStruct;
  570. #endif
  571. #if defined(WIN32) || defined(MS_WINDOWS)
  572. #define _USE_MATH_DEFINES
  573. #endif
  574. #include <math.h>
  575. #ifdef NAN
  576. #define __PYX_NAN() ((float) NAN)
  577. #else
  578. static CYTHON_INLINE float __PYX_NAN() {
  579. float value;
  580. memset(&value, 0xFF, sizeof(value));
  581. return value;
  582. }
  583. #endif
  584. #if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
  585. #define __Pyx_truncl trunc
  586. #else
  587. #define __Pyx_truncl truncl
  588. #endif
  589. #define __PYX_ERR(f_index, lineno, Ln_error) \
  590. { \
  591. __pyx_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; goto Ln_error; \
  592. }
  593. #ifndef __PYX_EXTERN_C
  594. #ifdef __cplusplus
  595. #define __PYX_EXTERN_C extern "C"
  596. #else
  597. #define __PYX_EXTERN_C extern
  598. #endif
  599. #endif
  600. #define __PYX_HAVE__uvloop__loop
  601. #define __PYX_HAVE_API__uvloop__loop
  602. /* Early includes */
  603. #include <stdint.h>
  604. #include <sys/types.h>
  605. #include "arpa/inet.h"
  606. #include "sys/socket.h"
  607. #include "sys/un.h"
  608. #include "unistd.h"
  609. #include "pthread.h"
  610. #include "includes/compat.h"
  611. #include "uv.h"
  612. #include "includes/debug.h"
  613. #include <string.h>
  614. #include <errno.h>
  615. #include <stdio.h>
  616. #include "pythread.h"
  617. #ifdef _OPENMP
  618. #include <omp.h>
  619. #endif /* _OPENMP */
  620. #if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
  621. #define CYTHON_WITHOUT_ASSERTIONS
  622. #endif
  623. typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
  624. const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;
  625. #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
  626. #define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0
  627. #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8)
  628. #define __PYX_DEFAULT_STRING_ENCODING ""
  629. #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
  630. #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
  631. #define __Pyx_uchar_cast(c) ((unsigned char)c)
  632. #define __Pyx_long_cast(x) ((long)x)
  633. #define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\
  634. (sizeof(type) < sizeof(Py_ssize_t)) ||\
  635. (sizeof(type) > sizeof(Py_ssize_t) &&\
  636. likely(v < (type)PY_SSIZE_T_MAX ||\
  637. v == (type)PY_SSIZE_T_MAX) &&\
  638. (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
  639. v == (type)PY_SSIZE_T_MIN))) ||\
  640. (sizeof(type) == sizeof(Py_ssize_t) &&\
  641. (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
  642. v == (type)PY_SSIZE_T_MAX))) )
  643. static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
  644. return (size_t) i < (size_t) limit;
  645. }
  646. #if defined (__cplusplus) && __cplusplus >= 201103L
  647. #include <cstdlib>
  648. #define __Pyx_sst_abs(value) std::abs(value)
  649. #elif SIZEOF_INT >= SIZEOF_SIZE_T
  650. #define __Pyx_sst_abs(value) abs(value)
  651. #elif SIZEOF_LONG >= SIZEOF_SIZE_T
  652. #define __Pyx_sst_abs(value) labs(value)
  653. #elif defined (_MSC_VER)
  654. #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
  655. #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
  656. #define __Pyx_sst_abs(value) llabs(value)
  657. #elif defined (__GNUC__)
  658. #define __Pyx_sst_abs(value) __builtin_llabs(value)
  659. #else
  660. #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
  661. #endif
  662. static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
  663. static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
  664. #define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
  665. #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
  666. #define __Pyx_PyBytes_FromString PyBytes_FromString
  667. #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
  668. static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
  669. #if PY_MAJOR_VERSION < 3
  670. #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString
  671. #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
  672. #else
  673. #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString
  674. #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
  675. #endif
  676. #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s))
  677. #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s))
  678. #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s))
  679. #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s))
  680. #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s))
  681. #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s))
  682. #define __Pyx_PyObject_AsWritableString(s) ((char*) __Pyx_PyObject_AsString(s))
  683. #define __Pyx_PyObject_AsWritableSString(s) ((signed char*) __Pyx_PyObject_AsString(s))
  684. #define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s))
  685. #define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s))
  686. #define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s))
  687. #define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s)
  688. #define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s)
  689. #define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s)
  690. #define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s)
  691. #define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
  692. static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) {
  693. const Py_UNICODE *u_end = u;
  694. while (*u_end++) ;
  695. return (size_t)(u_end - u - 1);
  696. }
  697. #define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
  698. #define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
  699. #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode
  700. #define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
  701. #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
  702. static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
  703. static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
  704. static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
  705. static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
  706. #define __Pyx_PySequence_Tuple(obj)\
  707. (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
  708. static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
  709. static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
  710. #if CYTHON_ASSUME_SAFE_MACROS
  711. #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
  712. #else
  713. #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
  714. #endif
  715. #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
  716. #if PY_MAJOR_VERSION >= 3
  717. #define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
  718. #else
  719. #define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
  720. #endif
  721. #define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x))
  722. #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
  723. static int __Pyx_sys_getdefaultencoding_not_ascii;
  724. static int __Pyx_init_sys_getdefaultencoding_params(void) {
  725. PyObject* sys;
  726. PyObject* default_encoding = NULL;
  727. PyObject* ascii_chars_u = NULL;
  728. PyObject* ascii_chars_b = NULL;
  729. const char* default_encoding_c;
  730. sys = PyImport_ImportModule("sys");
  731. if (!sys) goto bad;
  732. default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
  733. Py_DECREF(sys);
  734. if (!default_encoding) goto bad;
  735. default_encoding_c = PyBytes_AsString(default_encoding);
  736. if (!default_encoding_c) goto bad;
  737. if (strcmp(default_encoding_c, "ascii") == 0) {
  738. __Pyx_sys_getdefaultencoding_not_ascii = 0;
  739. } else {
  740. char ascii_chars[128];
  741. int c;
  742. for (c = 0; c < 128; c++) {
  743. ascii_chars[c] = c;
  744. }
  745. __Pyx_sys_getdefaultencoding_not_ascii = 1;
  746. ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
  747. if (!ascii_chars_u) goto bad;
  748. ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
  749. if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
  750. PyErr_Format(
  751. PyExc_ValueError,
  752. "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
  753. default_encoding_c);
  754. goto bad;
  755. }
  756. Py_DECREF(ascii_chars_u);
  757. Py_DECREF(ascii_chars_b);
  758. }
  759. Py_DECREF(default_encoding);
  760. return 0;
  761. bad:
  762. Py_XDECREF(default_encoding);
  763. Py_XDECREF(ascii_chars_u);
  764. Py_XDECREF(ascii_chars_b);
  765. return -1;
  766. }
  767. #endif
  768. #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
  769. #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
  770. #else
  771. #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
  772. #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
  773. static char* __PYX_DEFAULT_STRING_ENCODING;
  774. static int __Pyx_init_sys_getdefaultencoding_params(void) {
  775. PyObject* sys;
  776. PyObject* default_encoding = NULL;
  777. char* default_encoding_c;
  778. sys = PyImport_ImportModule("sys");
  779. if (!sys) goto bad;
  780. default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
  781. Py_DECREF(sys);
  782. if (!default_encoding) goto bad;
  783. default_encoding_c = PyBytes_AsString(default_encoding);
  784. if (!default_encoding_c) goto bad;
  785. __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1);
  786. if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
  787. strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
  788. Py_DECREF(default_encoding);
  789. return 0;
  790. bad:
  791. Py_XDECREF(default_encoding);
  792. return -1;
  793. }
  794. #endif
  795. #endif
  796. /* Test for GCC > 2.95 */
  797. #if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
  798. #define likely(x) __builtin_expect(!!(x), 1)
  799. #define unlikely(x) __builtin_expect(!!(x), 0)
  800. #else /* !__GNUC__ or GCC < 2.95 */
  801. #define likely(x) (x)
  802. #define unlikely(x) (x)
  803. #endif /* __GNUC__ */
  804. static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }
  805. static PyObject *__pyx_m = NULL;
  806. static PyObject *__pyx_d;
  807. static PyObject *__pyx_b;
  808. static PyObject *__pyx_cython_runtime = NULL;
  809. static PyObject *__pyx_empty_tuple;
  810. static PyObject *__pyx_empty_bytes;
  811. static PyObject *__pyx_empty_unicode;
  812. static int __pyx_lineno;
  813. static int __pyx_clineno = 0;
  814. static const char * __pyx_cfilenm= __FILE__;
  815. static const char *__pyx_filename;
  816. static const char *__pyx_f[] = {
  817. "uvloop/lru.pyx",
  818. "uvloop/errors.pyx",
  819. "uvloop/loop.pyx",
  820. "uvloop/cbhandles.pyx",
  821. "uvloop/handles/handle.pyx",
  822. "uvloop/handles/tcp.pyx",
  823. "uvloop/handles/process.pyx",
  824. "uvloop/dns.pyx",
  825. "uvloop/loop.pxd",
  826. "stringsource",
  827. "uvloop/pseudosock.pyx",
  828. "uvloop/handles/async_.pyx",
  829. "uvloop/handles/idle.pyx",
  830. "uvloop/handles/check.pyx",
  831. "uvloop/handles/timer.pyx",
  832. "uvloop/handles/poll.pyx",
  833. "uvloop/handles/basetransport.pyx",
  834. "uvloop/handles/basetransport.pxd",
  835. "uvloop/handles/stream.pyx",
  836. "uvloop/handles/streamserver.pyx",
  837. "uvloop/handles/pipe.pyx",
  838. "uvloop/request.pyx",
  839. "uvloop/sslproto.pyx",
  840. "uvloop/handles/udp.pyx",
  841. "uvloop/server.pyx",
  842. "uvloop/includes/flowcontrol.pxd",
  843. "type.pxd",
  844. "bool.pxd",
  845. "complex.pxd",
  846. "uvloop/includes/stdlib.pxi",
  847. };
  848. /* NoFastGil.proto */
  849. #define __Pyx_PyGILState_Ensure PyGILState_Ensure
  850. #define __Pyx_PyGILState_Release PyGILState_Release
  851. #define __Pyx_FastGIL_Remember()
  852. #define __Pyx_FastGIL_Forget()
  853. #define __Pyx_FastGilFuncInit()
  854. /* ForceInitThreads.proto */
  855. #ifndef __PYX_FORCE_INIT_THREADS
  856. #define __PYX_FORCE_INIT_THREADS 0
  857. #endif
  858. /*--- Type declarations ---*/
  859. struct __pyx_obj_6uvloop_4loop_Loop;
  860. struct __pyx_obj_6uvloop_4loop_Handle;
  861. struct __pyx_obj_6uvloop_4loop_TimerHandle;
  862. struct __pyx_obj_6uvloop_4loop_UVHandle;
  863. struct __pyx_obj_6uvloop_4loop_UVSocketHandle;
  864. struct __pyx_obj_6uvloop_4loop_UVAsync;
  865. struct __pyx_obj_6uvloop_4loop_UVIdle;
  866. struct __pyx_obj_6uvloop_4loop_UVCheck;
  867. struct __pyx_obj_6uvloop_4loop_UVTimer;
  868. struct __pyx_obj_6uvloop_4loop_UVPoll;
  869. struct __pyx_obj_6uvloop_4loop_UVBaseTransport;
  870. struct __pyx_obj_6uvloop_4loop_UVStream;
  871. struct __pyx_obj_6uvloop_4loop_UVStreamServer;
  872. struct __pyx_obj_6uvloop_4loop_TCPServer;
  873. struct __pyx_obj_6uvloop_4loop_TCPTransport;
  874. struct __pyx_obj_6uvloop_4loop_UnixServer;
  875. struct __pyx_obj_6uvloop_4loop_UnixTransport;
  876. struct __pyx_obj_6uvloop_4loop_ReadUnixTransport;
  877. struct __pyx_obj_6uvloop_4loop_WriteUnixTransport;
  878. struct __pyx_obj_6uvloop_4loop_UVProcess;
  879. struct __pyx_obj_6uvloop_4loop_UVProcessTransport;
  880. struct __pyx_obj_6uvloop_4loop_UVRequest;
  881. struct __pyx_obj_6uvloop_4loop__SSLProtocolTransport;
  882. struct __pyx_obj_6uvloop_4loop_SSLProtocol;
  883. struct __pyx_obj_6uvloop_4loop_UDPTransport;
  884. struct __pyx_obj_6uvloop_4loop_Server;
  885. struct __pyx_obj_6uvloop_4loop_PseudoSocket;
  886. struct __pyx_obj_6uvloop_4loop_LruCache;
  887. struct __pyx_obj_6uvloop_4loop__StreamWriteContext;
  888. struct __pyx_obj_6uvloop_4loop__TCPConnectRequest;
  889. struct __pyx_obj_6uvloop_4loop__PipeConnectRequest;
  890. struct __pyx_obj_6uvloop_4loop_SockAddrHolder;
  891. struct __pyx_obj_6uvloop_4loop_AddrInfo;
  892. struct __pyx_obj_6uvloop_4loop_AddrInfoRequest;
  893. struct __pyx_obj_6uvloop_4loop_NameInfoRequest;
  894. struct __pyx_obj_6uvloop_4loop__UDPSendContext;
  895. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct___getaddrinfo;
  896. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_1__getnameinfo;
  897. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_2__sock_connect;
  898. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_3___get__;
  899. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_4_run_until_complete;
  900. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_5_getaddrinfo;
  901. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_6_getnameinfo;
  902. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_7_start_tls;
  903. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_8_create_server;
  904. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_9_create_connection;
  905. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_10_genexpr;
  906. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_11_genexpr;
  907. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_12_create_unix_server;
  908. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_13_create_unix_connection;
  909. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_14_sock_recv;
  910. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_15_sock_recv_into;
  911. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_16_sock_sendall;
  912. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_17_sock_accept;
  913. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_18_sock_connect;
  914. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_19_connect_accepted_socket;
  915. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_20___subprocess_run;
  916. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_21_subprocess_shell;
  917. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_22_subprocess_exec;
  918. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_23_connect_read_pipe;
  919. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_24_connect_write_pipe;
  920. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_25_create_datagram_endpoint;
  921. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_26_genexpr;
  922. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_27_shutdown_asyncgens;
  923. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_28__start_handshake;
  924. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_29__start_shutdown;
  925. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_30__do_read__buffered;
  926. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_31__resume_reading;
  927. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_32___aenter__;
  928. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_33___aexit__;
  929. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_34_wait_closed;
  930. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_35_start_serving;
  931. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_36_serve_forever;
  932. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_37__test_coroutine_1;
  933. struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_object____Loop____bint___to_py;
  934. struct __pyx_opt_args_6uvloop_4loop_8UVHandle__fatal_error;
  935. struct __pyx_opt_args_6uvloop_4loop_15UVBaseTransport__fatal_error;
  936. struct __pyx_opt_args_6uvloop_4loop_9TCPServer_bind;
  937. struct __pyx_opt_args_6uvloop_4loop_12TCPTransport_bind;
  938. struct __pyx_opt_args_6uvloop_4loop_11SSLProtocol__wakeup_waiter;
  939. struct __pyx_opt_args_6uvloop_4loop_11SSLProtocol__get_extra_info;
  940. struct __pyx_opt_args_6uvloop_4loop_11SSLProtocol__set_write_buffer_limits;
  941. struct __pyx_opt_args_6uvloop_4loop_11SSLProtocol__set_read_buffer_limits;
  942. struct __pyx_opt_args_6uvloop_4loop_11SSLProtocol__fatal_error;
  943. struct __pyx_opt_args_6uvloop_4loop_6UVPoll__fatal_error;
  944. struct __pyx_opt_args_6uvloop_4loop_14UVStreamServer__fatal_error;
  945. /* "uvloop/sslproto.pxd":1
  946. * cdef enum SSLProtocolState: # <<<<<<<<<<<<<<
  947. * UNWRAPPED = 0
  948. * DO_HANDSHAKE = 1
  949. */
  950. enum __pyx_t_6uvloop_4loop_SSLProtocolState {
  951. __pyx_e_6uvloop_4loop_UNWRAPPED = 0,
  952. __pyx_e_6uvloop_4loop_DO_HANDSHAKE = 1,
  953. __pyx_e_6uvloop_4loop_WRAPPED = 2,
  954. __pyx_e_6uvloop_4loop_FLUSHING = 3,
  955. __pyx_e_6uvloop_4loop_SHUTDOWN = 4
  956. };
  957. /* "uvloop/loop.pxd":26
  958. * cdef class UVBaseTransport(UVSocketHandle)
  959. *
  960. * ctypedef object (*method_t)(object) # <<<<<<<<<<<<<<
  961. * ctypedef object (*method1_t)(object, object)
  962. * ctypedef object (*method2_t)(object, object, object)
  963. */
  964. typedef PyObject *(*__pyx_t_6uvloop_4loop_method_t)(PyObject *);
  965. /* "uvloop/loop.pxd":27
  966. *
  967. * ctypedef object (*method_t)(object)
  968. * ctypedef object (*method1_t)(object, object) # <<<<<<<<<<<<<<
  969. * ctypedef object (*method2_t)(object, object, object)
  970. * ctypedef object (*method3_t)(object, object, object, object)
  971. */
  972. typedef PyObject *(*__pyx_t_6uvloop_4loop_method1_t)(PyObject *, PyObject *);
  973. /* "uvloop/loop.pxd":28
  974. * ctypedef object (*method_t)(object)
  975. * ctypedef object (*method1_t)(object, object)
  976. * ctypedef object (*method2_t)(object, object, object) # <<<<<<<<<<<<<<
  977. * ctypedef object (*method3_t)(object, object, object, object)
  978. *
  979. */
  980. typedef PyObject *(*__pyx_t_6uvloop_4loop_method2_t)(PyObject *, PyObject *, PyObject *);
  981. /* "uvloop/loop.pxd":29
  982. * ctypedef object (*method1_t)(object, object)
  983. * ctypedef object (*method2_t)(object, object, object)
  984. * ctypedef object (*method3_t)(object, object, object, object) # <<<<<<<<<<<<<<
  985. *
  986. *
  987. */
  988. typedef PyObject *(*__pyx_t_6uvloop_4loop_method3_t)(PyObject *, PyObject *, PyObject *, PyObject *);
  989. /* "uvloop/handles/handle.pxd":23
  990. *
  991. * cdef _error(self, exc, throw)
  992. * cdef _fatal_error(self, exc, throw, reason=?) # <<<<<<<<<<<<<<
  993. *
  994. * cdef _warn_unclosed(self)
  995. */
  996. struct __pyx_opt_args_6uvloop_4loop_8UVHandle__fatal_error {
  997. int __pyx_n;
  998. PyObject *reason;
  999. };
  1000. /* "uvloop/handles/basetransport.pxd":35
  1001. *
  1002. * # Overloads of UVHandle methods:
  1003. * cdef _fatal_error(self, exc, throw, reason=?) # <<<<<<<<<<<<<<
  1004. * cdef _close(self)
  1005. *
  1006. */
  1007. struct __pyx_opt_args_6uvloop_4loop_15UVBaseTransport__fatal_error {
  1008. int __pyx_n;
  1009. PyObject *reason;
  1010. };
  1011. /* "uvloop/handles/tcp.pxd":2
  1012. * cdef class TCPServer(UVStreamServer):
  1013. * cdef bind(self, system.sockaddr* addr, unsigned int flags=*) # <<<<<<<<<<<<<<
  1014. *
  1015. * @staticmethod
  1016. */
  1017. struct __pyx_opt_args_6uvloop_4loop_9TCPServer_bind {
  1018. int __pyx_n;
  1019. unsigned int flags;
  1020. };
  1021. /* "uvloop/handles/tcp.pxd":20
  1022. * system.sockaddr_storage __sockname
  1023. *
  1024. * cdef bind(self, system.sockaddr* addr, unsigned int flags=*) # <<<<<<<<<<<<<<
  1025. * cdef connect(self, system.sockaddr* addr)
  1026. * cdef _set_nodelay(self)
  1027. */
  1028. struct __pyx_opt_args_6uvloop_4loop_12TCPTransport_bind {
  1029. int __pyx_n;
  1030. unsigned int flags;
  1031. };
  1032. /* "uvloop/sslproto.pxd":72
  1033. *
  1034. * cdef _set_app_protocol(self, app_protocol)
  1035. * cdef _wakeup_waiter(self, exc=*) # <<<<<<<<<<<<<<
  1036. * cdef _get_extra_info(self, name, default=*)
  1037. * cdef _set_state(self, SSLProtocolState new_state)
  1038. */
  1039. struct __pyx_opt_args_6uvloop_4loop_11SSLProtocol__wakeup_waiter {
  1040. int __pyx_n;
  1041. PyObject *exc;
  1042. };
  1043. /* "uvloop/sslproto.pxd":73
  1044. * cdef _set_app_protocol(self, app_protocol)
  1045. * cdef _wakeup_waiter(self, exc=*)
  1046. * cdef _get_extra_info(self, name, default=*) # <<<<<<<<<<<<<<
  1047. * cdef _set_state(self, SSLProtocolState new_state)
  1048. *
  1049. */
  1050. struct __pyx_opt_args_6uvloop_4loop_11SSLProtocol__get_extra_info {
  1051. int __pyx_n;
  1052. PyObject *__pyx_default;
  1053. };
  1054. /* "uvloop/sslproto.pxd":109
  1055. * cdef _control_app_writing(self)
  1056. * cdef size_t _get_write_buffer_size(self)
  1057. * cdef _set_write_buffer_limits(self, high=*, low=*) # <<<<<<<<<<<<<<
  1058. *
  1059. * # Flow control for reads to APP socket
  1060. */
  1061. struct __pyx_opt_args_6uvloop_4loop_11SSLProtocol__set_write_buffer_limits {
  1062. int __pyx_n;
  1063. PyObject *high;
  1064. PyObject *low;
  1065. };
  1066. /* "uvloop/sslproto.pxd":119
  1067. *
  1068. * cdef _control_ssl_reading(self)
  1069. * cdef _set_read_buffer_limits(self, high=*, low=*) # <<<<<<<<<<<<<<
  1070. * cdef size_t _get_read_buffer_size(self)
  1071. * cdef _fatal_error(self, exc, message=*)
  1072. */
  1073. struct __pyx_opt_args_6uvloop_4loop_11SSLProtocol__set_read_buffer_limits {
  1074. int __pyx_n;
  1075. PyObject *high;
  1076. PyObject *low;
  1077. };
  1078. /* "uvloop/sslproto.pxd":121
  1079. * cdef _set_read_buffer_limits(self, high=*, low=*)
  1080. * cdef size_t _get_read_buffer_size(self)
  1081. * cdef _fatal_error(self, exc, message=*) # <<<<<<<<<<<<<<
  1082. */
  1083. struct __pyx_opt_args_6uvloop_4loop_11SSLProtocol__fatal_error {
  1084. int __pyx_n;
  1085. PyObject *message;
  1086. };
  1087. /* "uvloop/handles/poll.pyx":173
  1088. * UVHandle._close(<UVHandle>self)
  1089. *
  1090. * cdef _fatal_error(self, exc, throw, reason=None): # <<<<<<<<<<<<<<
  1091. * try:
  1092. * if self.reading_handle is not None:
  1093. */
  1094. struct __pyx_opt_args_6uvloop_4loop_6UVPoll__fatal_error {
  1095. int __pyx_n;
  1096. PyObject *reason;
  1097. };
  1098. /* "uvloop/handles/streamserver.pyx":90
  1099. * client._accept(<UVStream>self)
  1100. *
  1101. * cdef _fatal_error(self, exc, throw, reason=None): # <<<<<<<<<<<<<<
  1102. * # Overload UVHandle._fatal_error
  1103. *
  1104. */
  1105. struct __pyx_opt_args_6uvloop_4loop_14UVStreamServer__fatal_error {
  1106. int __pyx_n;
  1107. PyObject *reason;
  1108. };
  1109. /* "uvloop/loop.pxd":32
  1110. *
  1111. *
  1112. * cdef class Loop: # <<<<<<<<<<<<<<
  1113. * cdef:
  1114. * uv.uv_loop_t *uvloop
  1115. */
  1116. struct __pyx_obj_6uvloop_4loop_Loop {
  1117. PyObject_HEAD
  1118. struct __pyx_vtabstruct_6uvloop_4loop_Loop *__pyx_vtab;
  1119. uv_loop_t *uvloop;
  1120. int _coroutine_debug_set;
  1121. int _coroutine_origin_tracking_saved_depth;
  1122. PyObject *slow_callback_duration;
  1123. int _closed;
  1124. int _debug;
  1125. int _running;
  1126. int _stopping;
  1127. uint64_t _thread_id;
  1128. int _thread_is_main;
  1129. PyObject *_task_factory;
  1130. PyObject *_exception_handler;
  1131. PyObject *_default_executor;
  1132. PyObject *_ready;
  1133. PyObject *_queued_streams;
  1134. Py_ssize_t _ready_len;
  1135. PyObject *_servers;
  1136. PyObject *_transports;
  1137. PyObject *_processes;
  1138. PyObject *_fd_to_reader_fileobj;
  1139. PyObject *_fd_to_writer_fileobj;
  1140. PyObject *_signals;
  1141. PyObject *_signal_handlers;
  1142. PyObject *_ssock;
  1143. PyObject *_csock;
  1144. int _listening_signals;
  1145. PyObject *_timers;
  1146. PyObject *_polls;
  1147. struct __pyx_obj_6uvloop_4loop_UVProcess *active_process_handler;
  1148. struct __pyx_obj_6uvloop_4loop_UVAsync *handler_async;
  1149. struct __pyx_obj_6uvloop_4loop_UVIdle *handler_idle;
  1150. struct __pyx_obj_6uvloop_4loop_UVCheck *handler_check__exec_writes;
  1151. PyObject *_last_error;
  1152. PyObject *__weakref__;
  1153. PyObject *_asyncgens;
  1154. int _asyncgens_shutdown_called;
  1155. char _recv_buffer[0x3E800];
  1156. int _recv_buffer_in_use;
  1157. int _debug_cc;
  1158. PyObject *_debug_handles_total;
  1159. PyObject *_debug_handles_closed;
  1160. PyObject *_debug_handles_current;
  1161. uint64_t _debug_uv_handles_total;
  1162. uint64_t _debug_uv_handles_freed;
  1163. uint64_t _debug_cb_handles_total;
  1164. uint64_t _debug_cb_handles_count;
  1165. uint64_t _debug_cb_timer_handles_total;
  1166. uint64_t _debug_cb_timer_handles_count;
  1167. uint64_t _debug_stream_shutdown_errors_total;
  1168. uint64_t _debug_stream_listen_errors_total;
  1169. uint64_t _debug_stream_read_cb_total;
  1170. uint64_t _debug_stream_read_cb_errors_total;
  1171. uint64_t _debug_stream_read_eof_total;
  1172. uint64_t _debug_stream_read_eof_cb_errors_total;
  1173. uint64_t _debug_stream_read_errors_total;
  1174. uint64_t _debug_stream_write_tries;
  1175. uint64_t _debug_stream_write_errors_total;
  1176. uint64_t _debug_stream_write_ctx_total;
  1177. uint64_t _debug_stream_write_ctx_cnt;
  1178. uint64_t _debug_stream_write_cb_errors_total;
  1179. uint64_t _poll_read_events_total;
  1180. uint64_t _poll_read_cb_errors_total;
  1181. uint64_t _poll_write_events_total;
  1182. uint64_t _poll_write_cb_errors_total;
  1183. uint64_t _sock_try_write_total;
  1184. uint64_t _debug_exception_handler_cnt;
  1185. };
  1186. /* "uvloop/cbhandles.pxd":1
  1187. * cdef class Handle: # <<<<<<<<<<<<<<
  1188. * cdef:
  1189. * Loop loop
  1190. */
  1191. struct __pyx_obj_6uvloop_4loop_Handle {
  1192. PyObject_HEAD
  1193. struct __pyx_vtabstruct_6uvloop_4loop_Handle *__pyx_vtab;
  1194. struct __pyx_obj_6uvloop_4loop_Loop *loop;
  1195. PyObject *context;
  1196. int _cancelled;
  1197. PyObject *meth_name;
  1198. int cb_type;
  1199. void *callback;
  1200. PyObject *arg1;
  1201. PyObject *arg2;
  1202. PyObject *arg3;
  1203. PyObject *arg4;
  1204. PyObject *__weakref__;
  1205. PyObject *_source_traceback;
  1206. };
  1207. /* "uvloop/cbhandles.pxd":25
  1208. *
  1209. *
  1210. * cdef class TimerHandle: # <<<<<<<<<<<<<<
  1211. * cdef:
  1212. * object callback
  1213. */
  1214. struct __pyx_obj_6uvloop_4loop_TimerHandle {
  1215. PyObject_HEAD
  1216. struct __pyx_vtabstruct_6uvloop_4loop_TimerHandle *__pyx_vtab;
  1217. PyObject *callback;
  1218. PyObject *args;
  1219. int _cancelled;
  1220. struct __pyx_obj_6uvloop_4loop_UVTimer *timer;
  1221. struct __pyx_obj_6uvloop_4loop_Loop *loop;
  1222. PyObject *context;
  1223. PyObject *_debug_info;
  1224. PyObject *__weakref__;
  1225. };
  1226. /* "uvloop/loop.pxd":17
  1227. *
  1228. *
  1229. * cdef class UVHandle # <<<<<<<<<<<<<<
  1230. * cdef class UVSocketHandle(UVHandle)
  1231. *
  1232. */
  1233. struct __pyx_obj_6uvloop_4loop_UVHandle {
  1234. PyObject_HEAD
  1235. struct __pyx_vtabstruct_6uvloop_4loop_UVHandle *__pyx_vtab;
  1236. uv_handle_t *_handle;
  1237. struct __pyx_obj_6uvloop_4loop_Loop *_loop;
  1238. PyObject *_source_traceback;
  1239. int _closed;
  1240. int _inited;
  1241. int _has_handle;
  1242. };
  1243. /* "uvloop/loop.pxd":18
  1244. *
  1245. * cdef class UVHandle
  1246. * cdef class UVSocketHandle(UVHandle) # <<<<<<<<<<<<<<
  1247. *
  1248. * cdef class UVAsync(UVHandle)
  1249. */
  1250. struct __pyx_obj_6uvloop_4loop_UVSocketHandle {
  1251. struct __pyx_obj_6uvloop_4loop_UVHandle __pyx_base;
  1252. PyObject *_fileobj;
  1253. PyObject *__pyx___cached_socket;
  1254. };
  1255. /* "uvloop/loop.pxd":20
  1256. * cdef class UVSocketHandle(UVHandle)
  1257. *
  1258. * cdef class UVAsync(UVHandle) # <<<<<<<<<<<<<<
  1259. * cdef class UVTimer(UVHandle)
  1260. * cdef class UVIdle(UVHandle)
  1261. */
  1262. struct __pyx_obj_6uvloop_4loop_UVAsync {
  1263. struct __pyx_obj_6uvloop_4loop_UVHandle __pyx_base;
  1264. __pyx_t_6uvloop_4loop_method_t callback;
  1265. PyObject *ctx;
  1266. };
  1267. /* "uvloop/loop.pxd":22
  1268. * cdef class UVAsync(UVHandle)
  1269. * cdef class UVTimer(UVHandle)
  1270. * cdef class UVIdle(UVHandle) # <<<<<<<<<<<<<<
  1271. *
  1272. * cdef class UVBaseTransport(UVSocketHandle)
  1273. */
  1274. struct __pyx_obj_6uvloop_4loop_UVIdle {
  1275. struct __pyx_obj_6uvloop_4loop_UVHandle __pyx_base;
  1276. struct __pyx_obj_6uvloop_4loop_Handle *h;
  1277. int running;
  1278. };
  1279. /* "uvloop/handles/check.pxd":1
  1280. * cdef class UVCheck(UVHandle): # <<<<<<<<<<<<<<
  1281. * cdef:
  1282. * Handle h
  1283. */
  1284. struct __pyx_obj_6uvloop_4loop_UVCheck {
  1285. struct __pyx_obj_6uvloop_4loop_UVHandle __pyx_base;
  1286. struct __pyx_obj_6uvloop_4loop_Handle *h;
  1287. int running;
  1288. };
  1289. /* "uvloop/loop.pxd":21
  1290. *
  1291. * cdef class UVAsync(UVHandle)
  1292. * cdef class UVTimer(UVHandle) # <<<<<<<<<<<<<<
  1293. * cdef class UVIdle(UVHandle)
  1294. *
  1295. */
  1296. struct __pyx_obj_6uvloop_4loop_UVTimer {
  1297. struct __pyx_obj_6uvloop_4loop_UVHandle __pyx_base;
  1298. __pyx_t_6uvloop_4loop_method_t callback;
  1299. PyObject *ctx;
  1300. int running;
  1301. uint64_t timeout;
  1302. };
  1303. /* "uvloop/handles/poll.pxd":1
  1304. * cdef class UVPoll(UVHandle): # <<<<<<<<<<<<<<
  1305. * cdef:
  1306. * int fd
  1307. */
  1308. struct __pyx_obj_6uvloop_4loop_UVPoll {
  1309. struct __pyx_obj_6uvloop_4loop_UVHandle __pyx_base;
  1310. int fd;
  1311. struct __pyx_obj_6uvloop_4loop_Handle *reading_handle;
  1312. struct __pyx_obj_6uvloop_4loop_Handle *writing_handle;
  1313. };
  1314. /* "uvloop/loop.pxd":24
  1315. * cdef class UVIdle(UVHandle)
  1316. *
  1317. * cdef class UVBaseTransport(UVSocketHandle) # <<<<<<<<<<<<<<
  1318. *
  1319. * ctypedef object (*method_t)(object)
  1320. */
  1321. struct __pyx_obj_6uvloop_4loop_UVBaseTransport {
  1322. struct __pyx_obj_6uvloop_4loop_UVSocketHandle __pyx_base;
  1323. int _closing;
  1324. int _protocol_connected;
  1325. int _protocol_paused;
  1326. PyObject *_protocol_data_received;
  1327. size_t _high_water;
  1328. size_t _low_water;
  1329. PyObject *_protocol;
  1330. struct __pyx_obj_6uvloop_4loop_Server *_server;
  1331. PyObject *_waiter;
  1332. PyObject *_extra_info;
  1333. uint32_t _conn_lost;
  1334. PyObject *__weakref__;
  1335. };
  1336. /* "uvloop/handles/stream.pxd":1
  1337. * cdef class UVStream(UVBaseTransport): # <<<<<<<<<<<<<<
  1338. * cdef:
  1339. * uv.uv_shutdown_t _shutdown_req
  1340. */
  1341. struct __pyx_obj_6uvloop_4loop_UVStream {
  1342. struct __pyx_obj_6uvloop_4loop_UVBaseTransport __pyx_base;
  1343. uv_shutdown_t _shutdown_req;
  1344. int __pyx___shutting_down;
  1345. int __pyx___reading;
  1346. int __pyx___read_error_close;
  1347. int __pyx___buffered;
  1348. PyObject *_protocol_get_buffer;
  1349. PyObject *_protocol_buffer_updated;
  1350. int _eof;
  1351. PyObject *_buffer;
  1352. size_t _buffer_size;
  1353. Py_buffer _read_pybuf;
  1354. int _read_pybuf_acquired;
  1355. };
  1356. /* "uvloop/handles/streamserver.pxd":1
  1357. * cdef class UVStreamServer(UVSocketHandle): # <<<<<<<<<<<<<<
  1358. * cdef:
  1359. * int backlog
  1360. */
  1361. struct __pyx_obj_6uvloop_4loop_UVStreamServer {
  1362. struct __pyx_obj_6uvloop_4loop_UVSocketHandle __pyx_base;
  1363. int backlog;
  1364. PyObject *ssl;
  1365. PyObject *ssl_handshake_timeout;
  1366. PyObject *ssl_shutdown_timeout;
  1367. PyObject *protocol_factory;
  1368. int opened;
  1369. struct __pyx_obj_6uvloop_4loop_Server *_server;
  1370. };
  1371. /* "uvloop/handles/tcp.pxd":1
  1372. * cdef class TCPServer(UVStreamServer): # <<<<<<<<<<<<<<
  1373. * cdef bind(self, system.sockaddr* addr, unsigned int flags=*)
  1374. *
  1375. */
  1376. struct __pyx_obj_6uvloop_4loop_TCPServer {
  1377. struct __pyx_obj_6uvloop_4loop_UVStreamServer __pyx_base;
  1378. };
  1379. /* "uvloop/handles/tcp.pxd":13
  1380. *
  1381. *
  1382. * cdef class TCPTransport(UVStream): # <<<<<<<<<<<<<<
  1383. * cdef:
  1384. * bint __peername_set
  1385. */
  1386. struct __pyx_obj_6uvloop_4loop_TCPTransport {
  1387. struct __pyx_obj_6uvloop_4loop_UVStream __pyx_base;
  1388. int __pyx___peername_set;
  1389. int __pyx___sockname_set;
  1390. struct sockaddr_storage __pyx___peername;
  1391. struct sockaddr_storage __pyx___sockname;
  1392. };
  1393. /* "uvloop/handles/pipe.pxd":1
  1394. * cdef class UnixServer(UVStreamServer): # <<<<<<<<<<<<<<
  1395. *
  1396. * cdef bind(self, str path)
  1397. */
  1398. struct __pyx_obj_6uvloop_4loop_UnixServer {
  1399. struct __pyx_obj_6uvloop_4loop_UVStreamServer __pyx_base;
  1400. };
  1401. /* "uvloop/handles/pipe.pxd":13
  1402. *
  1403. *
  1404. * cdef class UnixTransport(UVStream): # <<<<<<<<<<<<<<
  1405. *
  1406. * @staticmethod
  1407. */
  1408. struct __pyx_obj_6uvloop_4loop_UnixTransport {
  1409. struct __pyx_obj_6uvloop_4loop_UVStream __pyx_base;
  1410. };
  1411. /* "uvloop/handles/pipe.pxd":22
  1412. *
  1413. *
  1414. * cdef class ReadUnixTransport(UVStream): # <<<<<<<<<<<<<<
  1415. *
  1416. * @staticmethod
  1417. */
  1418. struct __pyx_obj_6uvloop_4loop_ReadUnixTransport {
  1419. struct __pyx_obj_6uvloop_4loop_UVStream __pyx_base;
  1420. };
  1421. /* "uvloop/handles/pipe.pxd":29
  1422. *
  1423. *
  1424. * cdef class WriteUnixTransport(UVStream): # <<<<<<<<<<<<<<
  1425. *
  1426. * cdef:
  1427. */
  1428. struct __pyx_obj_6uvloop_4loop_WriteUnixTransport {
  1429. struct __pyx_obj_6uvloop_4loop_UVStream __pyx_base;
  1430. uv_poll_t disconnect_listener;
  1431. int disconnect_listener_inited;
  1432. };
  1433. /* "uvloop/handles/process.pxd":1
  1434. * cdef class UVProcess(UVHandle): # <<<<<<<<<<<<<<
  1435. * cdef:
  1436. * object _returncode
  1437. */
  1438. struct __pyx_obj_6uvloop_4loop_UVProcess {
  1439. struct __pyx_obj_6uvloop_4loop_UVHandle __pyx_base;
  1440. PyObject *_returncode;
  1441. PyObject *_pid;
  1442. PyObject *_errpipe_read;
  1443. PyObject *_errpipe_write;
  1444. PyObject *_preexec_fn;
  1445. int _restore_signals;
  1446. PyObject *_fds_to_close;
  1447. uv_process_options_t options;
  1448. uv_stdio_container_t iocnt[3];
  1449. PyObject *__pyx___env;
  1450. char **uv_opt_env;
  1451. PyObject *__pyx___args;
  1452. char **uv_opt_args;
  1453. char *uv_opt_file;
  1454. PyObject *__pyx___cwd;
  1455. };
  1456. /* "uvloop/handles/process.pxd":45
  1457. *
  1458. *
  1459. * cdef class UVProcessTransport(UVProcess): # <<<<<<<<<<<<<<
  1460. * cdef:
  1461. * list _exit_waiters
  1462. */
  1463. struct __pyx_obj_6uvloop_4loop_UVProcessTransport {
  1464. struct __pyx_obj_6uvloop_4loop_UVProcess __pyx_base;
  1465. PyObject *_exit_waiters;
  1466. PyObject *_init_futs;
  1467. int _stdio_ready;
  1468. PyObject *_pending_calls;
  1469. PyObject *_protocol;
  1470. int _finished;
  1471. struct __pyx_obj_6uvloop_4loop_WriteUnixTransport *_stdin;
  1472. struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *_stdout;
  1473. struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *_stderr;
  1474. PyObject *stdin_proto;
  1475. PyObject *stdout_proto;
  1476. PyObject *stderr_proto;
  1477. };
  1478. /* "uvloop/request.pxd":1
  1479. * cdef class UVRequest: # <<<<<<<<<<<<<<
  1480. * cdef:
  1481. * uv.uv_req_t *request
  1482. */
  1483. struct __pyx_obj_6uvloop_4loop_UVRequest {
  1484. PyObject_HEAD
  1485. struct __pyx_vtabstruct_6uvloop_4loop_UVRequest *__pyx_vtab;
  1486. uv_req_t *request;
  1487. int done;
  1488. struct __pyx_obj_6uvloop_4loop_Loop *loop;
  1489. };
  1490. /* "uvloop/sslproto.pxd":9
  1491. *
  1492. *
  1493. * cdef class _SSLProtocolTransport: # <<<<<<<<<<<<<<
  1494. * cdef:
  1495. * object _loop
  1496. */
  1497. struct __pyx_obj_6uvloop_4loop__SSLProtocolTransport {
  1498. PyObject_HEAD
  1499. PyObject *_loop;
  1500. struct __pyx_obj_6uvloop_4loop_SSLProtocol *_ssl_protocol;
  1501. int _closed;
  1502. };
  1503. /* "uvloop/sslproto.pxd":16
  1504. *
  1505. *
  1506. * cdef class SSLProtocol: # <<<<<<<<<<<<<<
  1507. * cdef:
  1508. * bint _server_side
  1509. */
  1510. struct __pyx_obj_6uvloop_4loop_SSLProtocol {
  1511. PyObject_HEAD
  1512. struct __pyx_vtabstruct_6uvloop_4loop_SSLProtocol *__pyx_vtab;
  1513. int _server_side;
  1514. PyObject *_server_hostname;
  1515. PyObject *_sslcontext;
  1516. PyObject *_extra;
  1517. PyObject *_write_backlog;
  1518. size_t _write_buffer_size;
  1519. PyObject *_waiter;
  1520. PyObject *_loop;
  1521. struct __pyx_obj_6uvloop_4loop__SSLProtocolTransport *_app_transport;
  1522. int _app_transport_created;
  1523. PyObject *_transport;
  1524. int _call_connection_made;
  1525. PyObject *_ssl_handshake_timeout;
  1526. PyObject *_ssl_shutdown_timeout;
  1527. PyObject *_sslobj;
  1528. PyObject *_sslobj_read;
  1529. PyObject *_sslobj_write;
  1530. PyObject *_incoming;
  1531. PyObject *_incoming_write;
  1532. PyObject *_outgoing;
  1533. PyObject *_outgoing_read;
  1534. char *_ssl_buffer;
  1535. size_t _ssl_buffer_len;
  1536. PyObject *_ssl_buffer_view;
  1537. enum __pyx_t_6uvloop_4loop_SSLProtocolState _state;
  1538. size_t _conn_lost;
  1539. int _eof_received;
  1540. int _ssl_writing_paused;
  1541. int _app_reading_paused;
  1542. size_t _incoming_high_water;
  1543. size_t _incoming_low_water;
  1544. int _ssl_reading_paused;
  1545. int _app_writing_paused;
  1546. size_t _outgoing_high_water;
  1547. size_t _outgoing_low_water;
  1548. PyObject *_app_protocol;
  1549. int _app_protocol_is_buffer;
  1550. PyObject *_app_protocol_get_buffer;
  1551. PyObject *_app_protocol_buffer_updated;
  1552. PyObject *_handshake_start_time;
  1553. PyObject *_handshake_timeout_handle;
  1554. PyObject *_shutdown_timeout_handle;
  1555. };
  1556. /* "uvloop/handles/udp.pxd":1
  1557. * cdef class UDPTransport(UVBaseTransport): # <<<<<<<<<<<<<<
  1558. * cdef:
  1559. * bint __receiving
  1560. */
  1561. struct __pyx_obj_6uvloop_4loop_UDPTransport {
  1562. struct __pyx_obj_6uvloop_4loop_UVBaseTransport __pyx_base;
  1563. int __pyx___receiving;
  1564. int _family;
  1565. };
  1566. /* "uvloop/server.pxd":1
  1567. * cdef class Server: # <<<<<<<<<<<<<<
  1568. * cdef:
  1569. * list _servers
  1570. */
  1571. struct __pyx_obj_6uvloop_4loop_Server {
  1572. PyObject_HEAD
  1573. struct __pyx_vtabstruct_6uvloop_4loop_Server *__pyx_vtab;
  1574. PyObject *_servers;
  1575. PyObject *_waiters;
  1576. int _active_count;
  1577. struct __pyx_obj_6uvloop_4loop_Loop *_loop;
  1578. int _serving;
  1579. PyObject *_serving_forever_fut;
  1580. PyObject *__weakref__;
  1581. };
  1582. /* "uvloop/pseudosock.pyx":1
  1583. * cdef class PseudoSocket: # <<<<<<<<<<<<<<
  1584. * cdef:
  1585. * int _family
  1586. */
  1587. struct __pyx_obj_6uvloop_4loop_PseudoSocket {
  1588. PyObject_HEAD
  1589. struct __pyx_vtabstruct_6uvloop_4loop_PseudoSocket *__pyx_vtab;
  1590. int _family;
  1591. int _type;
  1592. int _proto;
  1593. int _fd;
  1594. PyObject *_peername;
  1595. PyObject *_sockname;
  1596. };
  1597. /* "uvloop/lru.pyx":5
  1598. *
  1599. * @cython.final
  1600. * cdef class LruCache: # <<<<<<<<<<<<<<
  1601. *
  1602. * cdef:
  1603. */
  1604. struct __pyx_obj_6uvloop_4loop_LruCache {
  1605. PyObject_HEAD
  1606. struct __pyx_vtabstruct_6uvloop_4loop_LruCache *__pyx_vtab;
  1607. PyObject *_dict;
  1608. int _maxsize;
  1609. PyObject *_dict_move_to_end;
  1610. PyObject *_dict_get;
  1611. };
  1612. /* "uvloop/handles/stream.pyx":6
  1613. * @cython.no_gc_clear
  1614. * @cython.freelist(DEFAULT_FREELIST_SIZE)
  1615. * cdef class _StreamWriteContext: # <<<<<<<<<<<<<<
  1616. * # used to hold additional write request information for uv_write
  1617. *
  1618. */
  1619. struct __pyx_obj_6uvloop_4loop__StreamWriteContext {
  1620. PyObject_HEAD
  1621. struct __pyx_vtabstruct_6uvloop_4loop__StreamWriteContext *__pyx_vtab;
  1622. uv_write_t req;
  1623. PyObject *buffers;
  1624. uv_buf_t uv_bufs_sml[4];
  1625. Py_buffer py_bufs_sml[4];
  1626. int py_bufs_sml_inuse;
  1627. uv_buf_t *uv_bufs;
  1628. Py_buffer *py_bufs;
  1629. size_t py_bufs_len;
  1630. uv_buf_t *uv_bufs_start;
  1631. size_t uv_bufs_len;
  1632. struct __pyx_obj_6uvloop_4loop_UVStream *stream;
  1633. int closed;
  1634. };
  1635. /* "uvloop/handles/tcp.pyx":183
  1636. *
  1637. *
  1638. * cdef class _TCPConnectRequest(UVRequest): # <<<<<<<<<<<<<<
  1639. * cdef:
  1640. * TCPTransport transport
  1641. */
  1642. struct __pyx_obj_6uvloop_4loop__TCPConnectRequest {
  1643. struct __pyx_obj_6uvloop_4loop_UVRequest __pyx_base;
  1644. struct __pyx_obj_6uvloop_4loop_TCPTransport *transport;
  1645. uv_connect_t _req_data;
  1646. };
  1647. /* "uvloop/handles/pipe.pyx":242
  1648. *
  1649. *
  1650. * cdef class _PipeConnectRequest(UVRequest): # <<<<<<<<<<<<<<
  1651. * cdef:
  1652. * UnixTransport transport
  1653. */
  1654. struct __pyx_obj_6uvloop_4loop__PipeConnectRequest {
  1655. struct __pyx_obj_6uvloop_4loop_UVRequest __pyx_base;
  1656. struct __pyx_obj_6uvloop_4loop_UnixTransport *transport;
  1657. uv_connect_t _req_data;
  1658. };
  1659. /* "uvloop/dns.pyx":67
  1660. *
  1661. * @cython.freelist(DEFAULT_FREELIST_SIZE)
  1662. * cdef class SockAddrHolder: # <<<<<<<<<<<<<<
  1663. * cdef:
  1664. * int family
  1665. */
  1666. struct __pyx_obj_6uvloop_4loop_SockAddrHolder {
  1667. PyObject_HEAD
  1668. int family;
  1669. struct sockaddr_storage addr;
  1670. Py_ssize_t addr_size;
  1671. };
  1672. /* "uvloop/dns.pyx":247
  1673. *
  1674. * @cython.freelist(DEFAULT_FREELIST_SIZE)
  1675. * cdef class AddrInfo: # <<<<<<<<<<<<<<
  1676. * cdef:
  1677. * system.addrinfo *data
  1678. */
  1679. struct __pyx_obj_6uvloop_4loop_AddrInfo {
  1680. PyObject_HEAD
  1681. struct __pyx_vtabstruct_6uvloop_4loop_AddrInfo *__pyx_vtab;
  1682. struct addrinfo *data;
  1683. };
  1684. /* "uvloop/dns.pyx":291
  1685. *
  1686. *
  1687. * cdef class AddrInfoRequest(UVRequest): # <<<<<<<<<<<<<<
  1688. * cdef:
  1689. * system.addrinfo hints
  1690. */
  1691. struct __pyx_obj_6uvloop_4loop_AddrInfoRequest {
  1692. struct __pyx_obj_6uvloop_4loop_UVRequest __pyx_base;
  1693. struct addrinfo hints;
  1694. PyObject *callback;
  1695. uv_getaddrinfo_t _req_data;
  1696. };
  1697. /* "uvloop/dns.pyx":346
  1698. *
  1699. *
  1700. * cdef class NameInfoRequest(UVRequest): # <<<<<<<<<<<<<<
  1701. * cdef:
  1702. * object callback
  1703. */
  1704. struct __pyx_obj_6uvloop_4loop_NameInfoRequest {
  1705. struct __pyx_obj_6uvloop_4loop_UVRequest __pyx_base;
  1706. PyObject *callback;
  1707. uv_getnameinfo_t _req_data;
  1708. };
  1709. /* "uvloop/handles/udp.pyx":3
  1710. * @cython.no_gc_clear
  1711. * @cython.freelist(DEFAULT_FREELIST_SIZE)
  1712. * cdef class _UDPSendContext: # <<<<<<<<<<<<<<
  1713. * # used to hold additional write request information for uv_write
  1714. *
  1715. */
  1716. struct __pyx_obj_6uvloop_4loop__UDPSendContext {
  1717. PyObject_HEAD
  1718. struct __pyx_vtabstruct_6uvloop_4loop__UDPSendContext *__pyx_vtab;
  1719. uv_udp_send_t req;
  1720. uv_buf_t uv_buf;
  1721. Py_buffer py_buf;
  1722. struct __pyx_obj_6uvloop_4loop_UDPTransport *udp;
  1723. int closed;
  1724. };
  1725. /* "uvloop/loop.pyx":830
  1726. * return poll.is_writing()
  1727. *
  1728. * cdef _getaddrinfo(self, object host, object port, # <<<<<<<<<<<<<<
  1729. * int family, int type,
  1730. * int proto, int flags,
  1731. */
  1732. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct___getaddrinfo {
  1733. PyObject_HEAD
  1734. PyObject *__pyx_v_fut;
  1735. int __pyx_v_unpack;
  1736. };
  1737. /* "uvloop/loop.pyx":870
  1738. * return fut
  1739. *
  1740. * cdef _getnameinfo(self, system.sockaddr *addr, int flags): # <<<<<<<<<<<<<<
  1741. * cdef NameInfoRequest nr
  1742. * fut = self._new_future()
  1743. */
  1744. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_1__getnameinfo {
  1745. PyObject_HEAD
  1746. PyObject *__pyx_v_fut;
  1747. };
  1748. /* "uvloop/loop.pyx":994
  1749. * self._remove_reader(sock)
  1750. *
  1751. * cdef _sock_connect(self, sock, address): # <<<<<<<<<<<<<<
  1752. * cdef:
  1753. * Handle handle
  1754. */
  1755. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_2__sock_connect {
  1756. PyObject_HEAD
  1757. struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self;
  1758. PyObject *__pyx_v_sock;
  1759. };
  1760. /* "uvloop/loop.pyx":1188
  1761. *
  1762. * property print_debug_info:
  1763. * def __get__(self): # <<<<<<<<<<<<<<
  1764. * if UVLOOP_DEBUG:
  1765. * return lambda: self._print_debug_info()
  1766. */
  1767. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_3___get__ {
  1768. PyObject_HEAD
  1769. struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self;
  1770. };
  1771. /* "uvloop/loop.pyx":1380
  1772. * return self._task_factory
  1773. *
  1774. * def run_until_complete(self, future): # <<<<<<<<<<<<<<
  1775. * """Run until the Future is done.
  1776. *
  1777. */
  1778. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_4_run_until_complete {
  1779. PyObject_HEAD
  1780. struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self;
  1781. };
  1782. /* "uvloop/loop.pyx":1420
  1783. *
  1784. * @cython.iterable_coroutine
  1785. * async def getaddrinfo(self, object host, object port, *, # <<<<<<<<<<<<<<
  1786. * int family=0, int type=0, int proto=0, int flags=0):
  1787. *
  1788. */
  1789. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_5_getaddrinfo {
  1790. PyObject_HEAD
  1791. PyObject *__pyx_v_addr;
  1792. int __pyx_v_family;
  1793. int __pyx_v_flags;
  1794. PyObject *__pyx_v_fut;
  1795. PyObject *__pyx_v_host;
  1796. PyObject *__pyx_v_port;
  1797. int __pyx_v_proto;
  1798. struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self;
  1799. int __pyx_v_type;
  1800. };
  1801. /* "uvloop/loop.pyx":1434
  1802. *
  1803. * @cython.iterable_coroutine
  1804. * async def getnameinfo(self, sockaddr, int flags=0): # <<<<<<<<<<<<<<
  1805. * cdef:
  1806. * AddrInfo ai_cnt
  1807. */
  1808. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_6_getnameinfo {
  1809. PyObject_HEAD
  1810. struct addrinfo *__pyx_v_ai;
  1811. struct __pyx_obj_6uvloop_4loop_AddrInfo *__pyx_v_ai_cnt;
  1812. int __pyx_v_flags;
  1813. PyObject *__pyx_v_flowinfo;
  1814. PyObject *__pyx_v_msg;
  1815. PyObject *__pyx_v_scope_id;
  1816. struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self;
  1817. struct sockaddr_in6 *__pyx_v_sin6;
  1818. Py_ssize_t __pyx_v_sl;
  1819. PyObject *__pyx_v_sockaddr;
  1820. };
  1821. /* "uvloop/loop.pyx":1492
  1822. *
  1823. * @cython.iterable_coroutine
  1824. * async def start_tls(self, transport, protocol, sslcontext, *, # <<<<<<<<<<<<<<
  1825. * server_side=False,
  1826. * server_hostname=None,
  1827. */
  1828. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_7_start_tls {
  1829. PyObject_HEAD
  1830. PyObject *__pyx_v_app_transport;
  1831. PyObject *__pyx_v_conmade_cb;
  1832. PyObject *__pyx_v_protocol;
  1833. PyObject *__pyx_v_resume_cb;
  1834. struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self;
  1835. PyObject *__pyx_v_server_hostname;
  1836. PyObject *__pyx_v_server_side;
  1837. PyObject *__pyx_v_ssl_handshake_timeout;
  1838. struct __pyx_obj_6uvloop_4loop_SSLProtocol *__pyx_v_ssl_protocol;
  1839. PyObject *__pyx_v_ssl_shutdown_timeout;
  1840. PyObject *__pyx_v_sslcontext;
  1841. PyObject *__pyx_v_transport;
  1842. PyObject *__pyx_v_waiter;
  1843. PyObject *__pyx_t_0;
  1844. PyObject *__pyx_t_1;
  1845. PyObject *__pyx_t_2;
  1846. };
  1847. /* "uvloop/loop.pyx":1540
  1848. *
  1849. * @cython.iterable_coroutine
  1850. * async def create_server(self, protocol_factory, host=None, port=None, # <<<<<<<<<<<<<<
  1851. * *,
  1852. * int family=uv.AF_UNSPEC,
  1853. */
  1854. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_8_create_server {
  1855. PyObject_HEAD
  1856. struct addrinfo *__pyx_v_addrinfo;
  1857. PyObject *__pyx_v_backlog;
  1858. int __pyx_v_completed;
  1859. PyObject *__pyx_v_err;
  1860. int __pyx_v_family;
  1861. int __pyx_v_flags;
  1862. PyObject *__pyx_v_fs;
  1863. PyObject *__pyx_7genexpr__pyx_v_host;
  1864. PyObject *__pyx_v_host;
  1865. PyObject *__pyx_v_hosts;
  1866. PyObject *__pyx_v_info;
  1867. PyObject *__pyx_v_infos;
  1868. PyObject *__pyx_v_port;
  1869. PyObject *__pyx_v_protocol_factory;
  1870. PyObject *__pyx_v_pyaddr;
  1871. PyObject *__pyx_v_reuse_address;
  1872. PyObject *__pyx_v_reuse_port;
  1873. struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self;
  1874. struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_server;
  1875. PyObject *__pyx_v_sock;
  1876. PyObject *__pyx_v_ssl;
  1877. PyObject *__pyx_v_ssl_handshake_timeout;
  1878. PyObject *__pyx_v_ssl_shutdown_timeout;
  1879. PyObject *__pyx_v_start_serving;
  1880. struct __pyx_obj_6uvloop_4loop_TCPServer *__pyx_v_tcp;
  1881. };
  1882. /* "uvloop/loop.pyx":1746
  1883. *
  1884. * @cython.iterable_coroutine
  1885. * async def create_connection(self, protocol_factory, host=None, port=None, # <<<<<<<<<<<<<<
  1886. * *,
  1887. * ssl=None,
  1888. */
  1889. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_9_create_connection {
  1890. PyObject_HEAD
  1891. PyObject *__pyx_v_addr;
  1892. struct __pyx_obj_6uvloop_4loop_AddrInfo *__pyx_v_ai_local;
  1893. struct __pyx_obj_6uvloop_4loop_AddrInfo *__pyx_v_ai_remote;
  1894. PyObject *__pyx_v_app_protocol;
  1895. PyObject *__pyx_v_app_transport;
  1896. PyObject *__pyx_v_exc;
  1897. PyObject *__pyx_v_exceptions;
  1898. PyObject *__pyx_v_f1;
  1899. PyObject *__pyx_v_f2;
  1900. PyObject *__pyx_v_family;
  1901. PyObject *__pyx_v_flags;
  1902. PyObject *__pyx_v_fs;
  1903. PyObject *__pyx_v_genexpr;
  1904. PyObject *__pyx_v_host;
  1905. struct addrinfo *__pyx_v_lai;
  1906. struct sockaddr_storage __pyx_v_lai_addr_static;
  1907. struct addrinfo *__pyx_v_lai_iter;
  1908. struct addrinfo __pyx_v_lai_static;
  1909. PyObject *__pyx_v_local_addr;
  1910. PyObject *__pyx_v_model;
  1911. PyObject *__pyx_v_port;
  1912. PyObject *__pyx_v_proto;
  1913. PyObject *__pyx_v_protocol;
  1914. PyObject *__pyx_v_protocol_factory;
  1915. struct addrinfo *__pyx_v_rai;
  1916. struct sockaddr_storage __pyx_v_rai_addr_static;
  1917. struct addrinfo *__pyx_v_rai_iter;
  1918. struct addrinfo __pyx_v_rai_static;
  1919. struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self;
  1920. PyObject *__pyx_v_server_hostname;
  1921. PyObject *__pyx_v_sock;
  1922. PyObject *__pyx_v_ssl;
  1923. PyObject *__pyx_v_ssl_handshake_timeout;
  1924. PyObject *__pyx_v_ssl_shutdown_timeout;
  1925. PyObject *__pyx_v_ssl_waiter;
  1926. PyObject *__pyx_v_sslcontext;
  1927. struct __pyx_obj_6uvloop_4loop_TCPTransport *__pyx_v_tr;
  1928. PyObject *__pyx_v_waiter;
  1929. PyObject *__pyx_t_0;
  1930. PyObject *__pyx_t_1;
  1931. PyObject *__pyx_t_2;
  1932. };
  1933. /* "uvloop/loop.pyx":1926
  1934. * # If they all have the same str(), raise one.
  1935. * model = str(exceptions[0])
  1936. * if all(str(exc) == model for exc in exceptions): # <<<<<<<<<<<<<<
  1937. * raise exceptions[0]
  1938. * # Raise a combined exception so the user can see all
  1939. */
  1940. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_10_genexpr {
  1941. PyObject_HEAD
  1942. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_9_create_connection *__pyx_outer_scope;
  1943. PyObject *__pyx_v_exc;
  1944. };
  1945. /* "uvloop/loop.pyx":1931
  1946. * # the various error messages.
  1947. * raise OSError('Multiple exceptions: {}'.format(
  1948. * ', '.join(str(exc) for exc in exceptions))) # <<<<<<<<<<<<<<
  1949. * else:
  1950. * if sock is None:
  1951. */
  1952. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_11_genexpr {
  1953. PyObject_HEAD
  1954. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_9_create_connection *__pyx_outer_scope;
  1955. PyObject *__pyx_v_exc;
  1956. };
  1957. /* "uvloop/loop.pyx":1974
  1958. *
  1959. * @cython.iterable_coroutine
  1960. * async def create_unix_server(self, protocol_factory, path=None, # <<<<<<<<<<<<<<
  1961. * *, backlog=100, sock=None, ssl=None,
  1962. * ssl_handshake_timeout=None,
  1963. */
  1964. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_12_create_unix_server {
  1965. PyObject_HEAD
  1966. PyObject *__pyx_v_backlog;
  1967. PyObject *__pyx_v_err;
  1968. PyObject *__pyx_v_exc;
  1969. PyObject *__pyx_v_fspath;
  1970. PyObject *__pyx_v_msg;
  1971. PyObject *__pyx_v_orig_path;
  1972. PyObject *__pyx_v_path;
  1973. struct __pyx_obj_6uvloop_4loop_UnixServer *__pyx_v_pipe;
  1974. PyObject *__pyx_v_protocol_factory;
  1975. struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self;
  1976. struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_server;
  1977. PyObject *__pyx_v_sock;
  1978. PyObject *__pyx_v_ssl;
  1979. PyObject *__pyx_v_ssl_handshake_timeout;
  1980. PyObject *__pyx_v_ssl_shutdown_timeout;
  1981. PyObject *__pyx_v_start_serving;
  1982. };
  1983. /* "uvloop/loop.pyx":2105
  1984. *
  1985. * @cython.iterable_coroutine
  1986. * async def create_unix_connection(self, protocol_factory, path=None, *, # <<<<<<<<<<<<<<
  1987. * ssl=None, sock=None,
  1988. * server_hostname=None,
  1989. */
  1990. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_13_create_unix_connection {
  1991. PyObject_HEAD
  1992. PyObject *__pyx_v_app_protocol;
  1993. PyObject *__pyx_v_app_transport;
  1994. PyObject *__pyx_v_fspath;
  1995. PyObject *__pyx_v_path;
  1996. PyObject *__pyx_v_protocol;
  1997. PyObject *__pyx_v_protocol_factory;
  1998. struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self;
  1999. PyObject *__pyx_v_server_hostname;
  2000. PyObject *__pyx_v_sock;
  2001. PyObject *__pyx_v_ssl;
  2002. PyObject *__pyx_v_ssl_handshake_timeout;
  2003. PyObject *__pyx_v_ssl_shutdown_timeout;
  2004. PyObject *__pyx_v_ssl_waiter;
  2005. PyObject *__pyx_v_sslcontext;
  2006. struct __pyx_obj_6uvloop_4loop_UnixTransport *__pyx_v_tr;
  2007. PyObject *__pyx_v_waiter;
  2008. PyObject *__pyx_t_0;
  2009. PyObject *__pyx_t_1;
  2010. PyObject *__pyx_t_2;
  2011. };
  2012. /* "uvloop/loop.pyx":2337
  2013. *
  2014. * @cython.iterable_coroutine
  2015. * async def sock_recv(self, sock, n): # <<<<<<<<<<<<<<
  2016. * """Receive data from the socket.
  2017. *
  2018. */
  2019. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_14_sock_recv {
  2020. PyObject_HEAD
  2021. PyObject *__pyx_v_fut;
  2022. struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_handle;
  2023. PyObject *__pyx_v_n;
  2024. struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self;
  2025. PyObject *__pyx_v_sock;
  2026. };
  2027. /* "uvloop/loop.pyx":2364
  2028. *
  2029. * @cython.iterable_coroutine
  2030. * async def sock_recv_into(self, sock, buf): # <<<<<<<<<<<<<<
  2031. * """Receive data from the socket.
  2032. *
  2033. */
  2034. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_15_sock_recv_into {
  2035. PyObject_HEAD
  2036. PyObject *__pyx_v_buf;
  2037. PyObject *__pyx_v_fut;
  2038. struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_handle;
  2039. struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self;
  2040. PyObject *__pyx_v_sock;
  2041. };
  2042. /* "uvloop/loop.pyx":2390
  2043. *
  2044. * @cython.iterable_coroutine
  2045. * async def sock_sendall(self, sock, data): # <<<<<<<<<<<<<<
  2046. * """Send data to the socket.
  2047. *
  2048. */
  2049. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_16_sock_sendall {
  2050. PyObject_HEAD
  2051. PyObject *__pyx_v_data;
  2052. PyObject *__pyx_v_fut;
  2053. struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_handle;
  2054. Py_ssize_t __pyx_v_n;
  2055. struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self;
  2056. PyObject *__pyx_v_sock;
  2057. };
  2058. /* "uvloop/loop.pyx":2443
  2059. *
  2060. * @cython.iterable_coroutine
  2061. * async def sock_accept(self, sock): # <<<<<<<<<<<<<<
  2062. * """Accept a connection.
  2063. *
  2064. */
  2065. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_17_sock_accept {
  2066. PyObject_HEAD
  2067. PyObject *__pyx_v_fut;
  2068. struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_handle;
  2069. struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self;
  2070. PyObject *__pyx_v_sock;
  2071. };
  2072. /* "uvloop/loop.pyx":2471
  2073. *
  2074. * @cython.iterable_coroutine
  2075. * async def sock_connect(self, sock, address): # <<<<<<<<<<<<<<
  2076. * """Connect to a remote socket at address.
  2077. *
  2078. */
  2079. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_18_sock_connect {
  2080. PyObject_HEAD
  2081. PyObject *__pyx_v__;
  2082. PyObject *__pyx_v_address;
  2083. PyObject *__pyx_v_addrs;
  2084. PyObject *__pyx_v_fut;
  2085. struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self;
  2086. PyObject *__pyx_v_sock;
  2087. };
  2088. /* "uvloop/loop.pyx":2495
  2089. *
  2090. * @cython.iterable_coroutine
  2091. * async def connect_accepted_socket(self, protocol_factory, sock, *, # <<<<<<<<<<<<<<
  2092. * ssl=None,
  2093. * ssl_handshake_timeout=None,
  2094. */
  2095. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_19_connect_accepted_socket {
  2096. PyObject_HEAD
  2097. PyObject *__pyx_v_app_protocol;
  2098. PyObject *__pyx_v_app_transport;
  2099. PyObject *__pyx_v_protocol;
  2100. PyObject *__pyx_v_protocol_factory;
  2101. struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self;
  2102. PyObject *__pyx_v_sock;
  2103. PyObject *__pyx_v_ssl;
  2104. PyObject *__pyx_v_ssl_handshake_timeout;
  2105. PyObject *__pyx_v_ssl_shutdown_timeout;
  2106. struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_transport;
  2107. PyObject *__pyx_v_transport_waiter;
  2108. PyObject *__pyx_v_waiter;
  2109. PyObject *__pyx_t_0;
  2110. PyObject *__pyx_t_1;
  2111. PyObject *__pyx_t_2;
  2112. };
  2113. /* "uvloop/loop.pyx":2591
  2114. *
  2115. * @cython.iterable_coroutine
  2116. * async def __subprocess_run(self, protocol_factory, args, # <<<<<<<<<<<<<<
  2117. * stdin=subprocess_PIPE,
  2118. * stdout=subprocess_PIPE,
  2119. */
  2120. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_20___subprocess_run {
  2121. PyObject_HEAD
  2122. PyObject *__pyx_v___uvloop_sleep_after_fork;
  2123. PyObject *__pyx_v_args;
  2124. PyObject *__pyx_v_bufsize;
  2125. PyObject *__pyx_v_close_fds;
  2126. PyObject *__pyx_v_creationflags;
  2127. PyObject *__pyx_v_cwd;
  2128. int __pyx_v_debug_flags;
  2129. PyObject *__pyx_v_env;
  2130. PyObject *__pyx_v_executable;
  2131. PyObject *__pyx_v_pass_fds;
  2132. PyObject *__pyx_v_preexec_fn;
  2133. struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_proc;
  2134. PyObject *__pyx_v_protocol;
  2135. PyObject *__pyx_v_protocol_factory;
  2136. PyObject *__pyx_v_restore_signals;
  2137. struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self;
  2138. PyObject *__pyx_v_shell;
  2139. PyObject *__pyx_v_start_new_session;
  2140. PyObject *__pyx_v_startupinfo;
  2141. PyObject *__pyx_v_stderr;
  2142. PyObject *__pyx_v_stdin;
  2143. PyObject *__pyx_v_stdout;
  2144. PyObject *__pyx_v_universal_newlines;
  2145. PyObject *__pyx_v_waiter;
  2146. PyObject *__pyx_t_0;
  2147. PyObject *__pyx_t_1;
  2148. PyObject *__pyx_t_2;
  2149. };
  2150. /* "uvloop/loop.pyx":2651
  2151. *
  2152. * @cython.iterable_coroutine
  2153. * async def subprocess_shell(self, protocol_factory, cmd, *, # <<<<<<<<<<<<<<
  2154. * shell=True,
  2155. * **kwargs):
  2156. */
  2157. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_21_subprocess_shell {
  2158. PyObject_HEAD
  2159. PyObject *__pyx_v_args;
  2160. PyObject *__pyx_v_cmd;
  2161. PyObject *__pyx_v_kwargs;
  2162. PyObject *__pyx_v_protocol_factory;
  2163. struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self;
  2164. PyObject *__pyx_v_shell;
  2165. };
  2166. /* "uvloop/loop.pyx":2666
  2167. *
  2168. * @cython.iterable_coroutine
  2169. * async def subprocess_exec(self, protocol_factory, program, *args, # <<<<<<<<<<<<<<
  2170. * shell=False, **kwargs):
  2171. *
  2172. */
  2173. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_22_subprocess_exec {
  2174. PyObject_HEAD
  2175. PyObject *__pyx_v_args;
  2176. PyObject *__pyx_v_kwargs;
  2177. PyObject *__pyx_v_program;
  2178. PyObject *__pyx_v_protocol_factory;
  2179. struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self;
  2180. PyObject *__pyx_v_shell;
  2181. };
  2182. /* "uvloop/loop.pyx":2678
  2183. *
  2184. * @cython.iterable_coroutine
  2185. * async def connect_read_pipe(self, proto_factory, pipe): # <<<<<<<<<<<<<<
  2186. * """Register read pipe in event loop. Set the pipe to non-blocking mode.
  2187. *
  2188. */
  2189. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_23_connect_read_pipe {
  2190. PyObject_HEAD
  2191. PyObject *__pyx_v_pipe;
  2192. PyObject *__pyx_v_proto;
  2193. PyObject *__pyx_v_proto_factory;
  2194. struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self;
  2195. struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *__pyx_v_transp;
  2196. PyObject *__pyx_v_waiter;
  2197. PyObject *__pyx_t_0;
  2198. PyObject *__pyx_t_1;
  2199. PyObject *__pyx_t_2;
  2200. };
  2201. /* "uvloop/loop.pyx":2703
  2202. *
  2203. * @cython.iterable_coroutine
  2204. * async def connect_write_pipe(self, proto_factory, pipe): # <<<<<<<<<<<<<<
  2205. * """Register write pipe in event loop.
  2206. *
  2207. */
  2208. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_24_connect_write_pipe {
  2209. PyObject_HEAD
  2210. PyObject *__pyx_v_pipe;
  2211. PyObject *__pyx_v_proto;
  2212. PyObject *__pyx_v_proto_factory;
  2213. struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self;
  2214. struct __pyx_obj_6uvloop_4loop_WriteUnixTransport *__pyx_v_transp;
  2215. PyObject *__pyx_v_waiter;
  2216. PyObject *__pyx_t_0;
  2217. PyObject *__pyx_t_1;
  2218. PyObject *__pyx_t_2;
  2219. };
  2220. /* "uvloop/loop.pyx":2837
  2221. *
  2222. * @cython.iterable_coroutine
  2223. * async def create_datagram_endpoint(self, protocol_factory, # <<<<<<<<<<<<<<
  2224. * local_addr=None, remote_addr=None, *,
  2225. * family=0, proto=0, flags=0,
  2226. */
  2227. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_25_create_datagram_endpoint {
  2228. PyObject_HEAD
  2229. PyObject *__pyx_v_allow_broadcast;
  2230. PyObject *__pyx_v_ctx;
  2231. PyObject *__pyx_v_ex;
  2232. PyObject *__pyx_v_excs;
  2233. PyObject *__pyx_v_family;
  2234. PyObject *__pyx_v_flags;
  2235. PyObject *__pyx_v_genexpr;
  2236. PyObject *__pyx_v_lads;
  2237. struct addrinfo *__pyx_v_lai;
  2238. PyObject *__pyx_v_local_addr;
  2239. PyObject *__pyx_v_opts;
  2240. PyObject *__pyx_v_problems;
  2241. PyObject *__pyx_v_proto;
  2242. PyObject *__pyx_v_protocol;
  2243. PyObject *__pyx_v_protocol_factory;
  2244. PyObject *__pyx_v_rads;
  2245. struct addrinfo *__pyx_v_rai;
  2246. PyObject *__pyx_v_remote_addr;
  2247. PyObject *__pyx_v_reuse_address;
  2248. PyObject *__pyx_v_reuse_port;
  2249. struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self;
  2250. PyObject *__pyx_v_sock;
  2251. struct __pyx_obj_6uvloop_4loop_UDPTransport *__pyx_v_udp;
  2252. PyObject *__pyx_v_waiter;
  2253. };
  2254. /* "uvloop/loop.pyx":2888
  2255. * allow_broadcast=allow_broadcast)
  2256. * problems = ', '.join(
  2257. * '{}={}'.format(k, v) for k, v in opts.items() if v) # <<<<<<<<<<<<<<
  2258. * raise ValueError(
  2259. * 'socket modifier keyword arguments can not be used '
  2260. */
  2261. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_26_genexpr {
  2262. PyObject_HEAD
  2263. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_25_create_datagram_endpoint *__pyx_outer_scope;
  2264. PyObject *__pyx_v_k;
  2265. PyObject *__pyx_v_v;
  2266. };
  2267. /* "uvloop/loop.pyx":3010
  2268. *
  2269. * @cython.iterable_coroutine
  2270. * async def shutdown_asyncgens(self): # <<<<<<<<<<<<<<
  2271. * """Shutdown all active asynchronous generators."""
  2272. * self._asyncgens_shutdown_called = True
  2273. */
  2274. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_27_shutdown_asyncgens {
  2275. PyObject_HEAD
  2276. PyObject *__pyx_8genexpr4__pyx_v_ag;
  2277. PyObject *__pyx_v_agen;
  2278. PyObject *__pyx_v_closing_agens;
  2279. PyObject *__pyx_v_result;
  2280. PyObject *__pyx_v_results;
  2281. struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self;
  2282. PyObject *__pyx_v_shutdown_coro;
  2283. };
  2284. /* "uvloop/sslproto.pyx":447
  2285. * # Handshake flow
  2286. *
  2287. * cdef _start_handshake(self): # <<<<<<<<<<<<<<
  2288. * if self._loop.get_debug():
  2289. * aio_logger.debug("%r starts SSL handshake", self)
  2290. */
  2291. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_28__start_handshake {
  2292. PyObject_HEAD
  2293. struct __pyx_obj_6uvloop_4loop_SSLProtocol *__pyx_v_self;
  2294. };
  2295. /* "uvloop/sslproto.pyx":528
  2296. * # Shutdown flow
  2297. *
  2298. * cdef _start_shutdown(self): # <<<<<<<<<<<<<<
  2299. * if self._state in (FLUSHING, SHUTDOWN, UNWRAPPED):
  2300. * return
  2301. */
  2302. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_29__start_shutdown {
  2303. PyObject_HEAD
  2304. struct __pyx_obj_6uvloop_4loop_SSLProtocol *__pyx_v_self;
  2305. };
  2306. /* "uvloop/sslproto.pyx":662
  2307. * self._fatal_error(ex, 'Fatal error on SSL protocol')
  2308. *
  2309. * cdef _do_read__buffered(self): # <<<<<<<<<<<<<<
  2310. * cdef:
  2311. * Py_buffer pybuf
  2312. */
  2313. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_30__do_read__buffered {
  2314. PyObject_HEAD
  2315. struct __pyx_obj_6uvloop_4loop_SSLProtocol *__pyx_v_self;
  2316. };
  2317. /* "uvloop/sslproto.pyx":788
  2318. * self._app_reading_paused = True
  2319. *
  2320. * cdef _resume_reading(self): # <<<<<<<<<<<<<<
  2321. * if self._app_reading_paused:
  2322. * self._app_reading_paused = False
  2323. */
  2324. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_31__resume_reading {
  2325. PyObject_HEAD
  2326. struct __pyx_obj_6uvloop_4loop_SSLProtocol *__pyx_v_self;
  2327. };
  2328. /* "uvloop/server.pyx":52
  2329. *
  2330. * @cython.iterable_coroutine
  2331. * async def __aenter__(self): # <<<<<<<<<<<<<<
  2332. * return self
  2333. *
  2334. */
  2335. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_32___aenter__ {
  2336. PyObject_HEAD
  2337. struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_self;
  2338. };
  2339. /* "uvloop/server.pyx":56
  2340. *
  2341. * @cython.iterable_coroutine
  2342. * async def __aexit__(self, *exc): # <<<<<<<<<<<<<<
  2343. * self.close()
  2344. * await self.wait_closed()
  2345. */
  2346. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_33___aexit__ {
  2347. PyObject_HEAD
  2348. PyObject *__pyx_v_exc;
  2349. struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_self;
  2350. };
  2351. /* "uvloop/server.pyx":67
  2352. *
  2353. * @cython.iterable_coroutine
  2354. * async def wait_closed(self): # <<<<<<<<<<<<<<
  2355. * # Do not remove `self._servers is None` below
  2356. * # because close() method only closes server sockets
  2357. */
  2358. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_34_wait_closed {
  2359. PyObject_HEAD
  2360. struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_self;
  2361. PyObject *__pyx_v_waiter;
  2362. };
  2363. /* "uvloop/server.pyx":100
  2364. *
  2365. * @cython.iterable_coroutine
  2366. * async def start_serving(self): # <<<<<<<<<<<<<<
  2367. * self._start_serving()
  2368. *
  2369. */
  2370. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_35_start_serving {
  2371. PyObject_HEAD
  2372. struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_self;
  2373. };
  2374. /* "uvloop/server.pyx":104
  2375. *
  2376. * @cython.iterable_coroutine
  2377. * async def serve_forever(self): # <<<<<<<<<<<<<<
  2378. * if self._serving_forever_fut is not None:
  2379. * raise RuntimeError(
  2380. */
  2381. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_36_serve_forever {
  2382. PyObject_HEAD
  2383. struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_self;
  2384. PyObject *__pyx_t_0;
  2385. PyObject *__pyx_t_1;
  2386. PyObject *__pyx_t_2;
  2387. PyObject *__pyx_t_3;
  2388. PyObject *__pyx_t_4;
  2389. PyObject *__pyx_t_5;
  2390. };
  2391. /* "uvloop/loop.pyx":3182
  2392. *
  2393. * @cython.iterable_coroutine
  2394. * async def _test_coroutine_1(): # <<<<<<<<<<<<<<
  2395. * return 42
  2396. */
  2397. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_37__test_coroutine_1 {
  2398. PyObject_HEAD
  2399. };
  2400. /* "cfunc.to_py":64
  2401. *
  2402. * @cname("__Pyx_CFunc_object____Loop____bint___to_py")
  2403. * cdef object __Pyx_CFunc_object____Loop____bint___to_py(object (*f)(Loop, bint) ): # <<<<<<<<<<<<<<
  2404. * def wrap(Loop self, bint enabled):
  2405. * """wrap(self: 'Loop', enabled: bool)"""
  2406. */
  2407. struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_object____Loop____bint___to_py {
  2408. PyObject_HEAD
  2409. PyObject *(*__pyx_v_f)(struct __pyx_obj_6uvloop_4loop_Loop *, int);
  2410. };
  2411. /* "uvloop/handles/handle.pyx":1
  2412. * cdef class UVHandle: # <<<<<<<<<<<<<<
  2413. * """A base class for all libuv handles.
  2414. *
  2415. */
  2416. struct __pyx_vtabstruct_6uvloop_4loop_UVHandle {
  2417. PyObject *(*_start_init)(struct __pyx_obj_6uvloop_4loop_UVHandle *, struct __pyx_obj_6uvloop_4loop_Loop *);
  2418. PyObject *(*_abort_init)(struct __pyx_obj_6uvloop_4loop_UVHandle *);
  2419. PyObject *(*_finish_init)(struct __pyx_obj_6uvloop_4loop_UVHandle *);
  2420. int (*_is_alive)(struct __pyx_obj_6uvloop_4loop_UVHandle *);
  2421. PyObject *(*_ensure_alive)(struct __pyx_obj_6uvloop_4loop_UVHandle *);
  2422. PyObject *(*_error)(struct __pyx_obj_6uvloop_4loop_UVHandle *, PyObject *, PyObject *);
  2423. PyObject *(*_fatal_error)(struct __pyx_obj_6uvloop_4loop_UVHandle *, PyObject *, PyObject *, struct __pyx_opt_args_6uvloop_4loop_8UVHandle__fatal_error *__pyx_optional_args);
  2424. PyObject *(*_warn_unclosed)(struct __pyx_obj_6uvloop_4loop_UVHandle *);
  2425. PyObject *(*_free)(struct __pyx_obj_6uvloop_4loop_UVHandle *);
  2426. PyObject *(*_close)(struct __pyx_obj_6uvloop_4loop_UVHandle *);
  2427. };
  2428. static struct __pyx_vtabstruct_6uvloop_4loop_UVHandle *__pyx_vtabptr_6uvloop_4loop_UVHandle;
  2429. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVHandle__start_init(struct __pyx_obj_6uvloop_4loop_UVHandle *, struct __pyx_obj_6uvloop_4loop_Loop *);
  2430. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVHandle__abort_init(struct __pyx_obj_6uvloop_4loop_UVHandle *);
  2431. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVHandle__finish_init(struct __pyx_obj_6uvloop_4loop_UVHandle *);
  2432. static CYTHON_INLINE int __pyx_f_6uvloop_4loop_8UVHandle__is_alive(struct __pyx_obj_6uvloop_4loop_UVHandle *);
  2433. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVHandle__ensure_alive(struct __pyx_obj_6uvloop_4loop_UVHandle *);
  2434. /* "uvloop/handles/handle.pyx":221
  2435. *
  2436. *
  2437. * cdef class UVSocketHandle(UVHandle): # <<<<<<<<<<<<<<
  2438. *
  2439. * def __cinit__(self):
  2440. */
  2441. struct __pyx_vtabstruct_6uvloop_4loop_UVSocketHandle {
  2442. struct __pyx_vtabstruct_6uvloop_4loop_UVHandle __pyx_base;
  2443. PyObject *(*_fileno)(struct __pyx_obj_6uvloop_4loop_UVSocketHandle *);
  2444. PyObject *(*_new_socket)(struct __pyx_obj_6uvloop_4loop_UVSocketHandle *);
  2445. PyObject *(*_get_socket)(struct __pyx_obj_6uvloop_4loop_UVSocketHandle *);
  2446. PyObject *(*_attach_fileobj)(struct __pyx_obj_6uvloop_4loop_UVSocketHandle *, PyObject *);
  2447. PyObject *(*_open)(struct __pyx_obj_6uvloop_4loop_UVSocketHandle *, int);
  2448. };
  2449. static struct __pyx_vtabstruct_6uvloop_4loop_UVSocketHandle *__pyx_vtabptr_6uvloop_4loop_UVSocketHandle;
  2450. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_14UVSocketHandle__get_socket(struct __pyx_obj_6uvloop_4loop_UVSocketHandle *);
  2451. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_14UVSocketHandle__attach_fileobj(struct __pyx_obj_6uvloop_4loop_UVSocketHandle *, PyObject *);
  2452. /* "uvloop/handles/async_.pyx":2
  2453. * @cython.no_gc_clear
  2454. * cdef class UVAsync(UVHandle): # <<<<<<<<<<<<<<
  2455. * cdef _init(self, Loop loop, method_t callback, object ctx):
  2456. * cdef int err
  2457. */
  2458. struct __pyx_vtabstruct_6uvloop_4loop_UVAsync {
  2459. struct __pyx_vtabstruct_6uvloop_4loop_UVHandle __pyx_base;
  2460. PyObject *(*_init)(struct __pyx_obj_6uvloop_4loop_UVAsync *, struct __pyx_obj_6uvloop_4loop_Loop *, __pyx_t_6uvloop_4loop_method_t, PyObject *);
  2461. PyObject *(*send)(struct __pyx_obj_6uvloop_4loop_UVAsync *);
  2462. struct __pyx_obj_6uvloop_4loop_UVAsync *(*new)(struct __pyx_obj_6uvloop_4loop_Loop *, __pyx_t_6uvloop_4loop_method_t, PyObject *);
  2463. };
  2464. static struct __pyx_vtabstruct_6uvloop_4loop_UVAsync *__pyx_vtabptr_6uvloop_4loop_UVAsync;
  2465. /* "uvloop/handles/timer.pyx":2
  2466. * @cython.no_gc_clear
  2467. * cdef class UVTimer(UVHandle): # <<<<<<<<<<<<<<
  2468. * cdef _init(self, Loop loop, method_t callback, object ctx,
  2469. * uint64_t timeout):
  2470. */
  2471. struct __pyx_vtabstruct_6uvloop_4loop_UVTimer {
  2472. struct __pyx_vtabstruct_6uvloop_4loop_UVHandle __pyx_base;
  2473. PyObject *(*_init)(struct __pyx_obj_6uvloop_4loop_UVTimer *, struct __pyx_obj_6uvloop_4loop_Loop *, __pyx_t_6uvloop_4loop_method_t, PyObject *, uint64_t);
  2474. PyObject *(*stop)(struct __pyx_obj_6uvloop_4loop_UVTimer *);
  2475. PyObject *(*start)(struct __pyx_obj_6uvloop_4loop_UVTimer *);
  2476. struct __pyx_obj_6uvloop_4loop_UVTimer *(*new)(struct __pyx_obj_6uvloop_4loop_Loop *, __pyx_t_6uvloop_4loop_method_t, PyObject *, uint64_t);
  2477. };
  2478. static struct __pyx_vtabstruct_6uvloop_4loop_UVTimer *__pyx_vtabptr_6uvloop_4loop_UVTimer;
  2479. /* "uvloop/handles/idle.pyx":2
  2480. * @cython.no_gc_clear
  2481. * cdef class UVIdle(UVHandle): # <<<<<<<<<<<<<<
  2482. * cdef _init(self, Loop loop, Handle h):
  2483. * cdef int err
  2484. */
  2485. struct __pyx_vtabstruct_6uvloop_4loop_UVIdle {
  2486. struct __pyx_vtabstruct_6uvloop_4loop_UVHandle __pyx_base;
  2487. PyObject *(*_init)(struct __pyx_obj_6uvloop_4loop_UVIdle *, struct __pyx_obj_6uvloop_4loop_Loop *, struct __pyx_obj_6uvloop_4loop_Handle *);
  2488. PyObject *(*stop)(struct __pyx_obj_6uvloop_4loop_UVIdle *);
  2489. PyObject *(*start)(struct __pyx_obj_6uvloop_4loop_UVIdle *);
  2490. struct __pyx_obj_6uvloop_4loop_UVIdle *(*new)(struct __pyx_obj_6uvloop_4loop_Loop *, struct __pyx_obj_6uvloop_4loop_Handle *);
  2491. };
  2492. static struct __pyx_vtabstruct_6uvloop_4loop_UVIdle *__pyx_vtabptr_6uvloop_4loop_UVIdle;
  2493. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_6UVIdle_stop(struct __pyx_obj_6uvloop_4loop_UVIdle *);
  2494. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_6UVIdle_start(struct __pyx_obj_6uvloop_4loop_UVIdle *);
  2495. /* "uvloop/handles/basetransport.pyx":1
  2496. * cdef class UVBaseTransport(UVSocketHandle): # <<<<<<<<<<<<<<
  2497. *
  2498. * def __cinit__(self):
  2499. */
  2500. struct __pyx_vtabstruct_6uvloop_4loop_UVBaseTransport {
  2501. struct __pyx_vtabstruct_6uvloop_4loop_UVSocketHandle __pyx_base;
  2502. PyObject *(*_maybe_pause_protocol)(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *);
  2503. PyObject *(*_maybe_resume_protocol)(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *);
  2504. PyObject *(*_schedule_call_connection_made)(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *);
  2505. PyObject *(*_schedule_call_connection_lost)(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *, PyObject *);
  2506. PyObject *(*_wakeup_waiter)(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *);
  2507. PyObject *(*_call_connection_made)(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *);
  2508. PyObject *(*_call_connection_lost)(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *, PyObject *);
  2509. PyObject *(*_set_server)(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *, struct __pyx_obj_6uvloop_4loop_Server *);
  2510. PyObject *(*_set_waiter)(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *, PyObject *);
  2511. PyObject *(*_set_protocol)(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *, PyObject *);
  2512. PyObject *(*_clear_protocol)(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *);
  2513. PyObject *(*_init_protocol)(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *);
  2514. PyObject *(*_add_extra_info)(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *, PyObject *, PyObject *);
  2515. size_t (*_get_write_buffer_size)(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *);
  2516. int (*_is_reading)(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *);
  2517. PyObject *(*_start_reading)(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *);
  2518. PyObject *(*_stop_reading)(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *);
  2519. };
  2520. static struct __pyx_vtabstruct_6uvloop_4loop_UVBaseTransport *__pyx_vtabptr_6uvloop_4loop_UVBaseTransport;
  2521. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_15UVBaseTransport__maybe_pause_protocol(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *);
  2522. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_15UVBaseTransport__maybe_resume_protocol(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *);
  2523. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_15UVBaseTransport__schedule_call_connection_made(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *);
  2524. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_15UVBaseTransport__schedule_call_connection_lost(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *, PyObject *);
  2525. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_15UVBaseTransport__set_server(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *, struct __pyx_obj_6uvloop_4loop_Server *);
  2526. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_15UVBaseTransport__set_waiter(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *, PyObject *);
  2527. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_15UVBaseTransport__init_protocol(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *);
  2528. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_15UVBaseTransport__add_extra_info(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *, PyObject *, PyObject *);
  2529. /* "uvloop/loop.pyx":93
  2530. *
  2531. * @cython.no_gc_clear
  2532. * cdef class Loop: # <<<<<<<<<<<<<<
  2533. * def __cinit__(self):
  2534. * cdef int err
  2535. */
  2536. struct __pyx_vtabstruct_6uvloop_4loop_Loop {
  2537. PyObject *(*_init_debug_fields)(struct __pyx_obj_6uvloop_4loop_Loop *);
  2538. PyObject *(*_on_wake)(struct __pyx_obj_6uvloop_4loop_Loop *);
  2539. PyObject *(*_on_idle)(struct __pyx_obj_6uvloop_4loop_Loop *);
  2540. PyObject *(*__pyx___run)(struct __pyx_obj_6uvloop_4loop_Loop *, uv_run_mode);
  2541. PyObject *(*_run)(struct __pyx_obj_6uvloop_4loop_Loop *, uv_run_mode);
  2542. PyObject *(*_close)(struct __pyx_obj_6uvloop_4loop_Loop *);
  2543. PyObject *(*_stop)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *);
  2544. uint64_t (*_time)(struct __pyx_obj_6uvloop_4loop_Loop *);
  2545. PyObject *(*_queue_write)(struct __pyx_obj_6uvloop_4loop_Loop *, struct __pyx_obj_6uvloop_4loop_UVStream *);
  2546. PyObject *(*_exec_queued_writes)(struct __pyx_obj_6uvloop_4loop_Loop *);
  2547. PyObject *(*_call_soon)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, PyObject *, PyObject *);
  2548. PyObject *(*_call_soon_handle)(struct __pyx_obj_6uvloop_4loop_Loop *, struct __pyx_obj_6uvloop_4loop_Handle *);
  2549. PyObject *(*_call_later)(struct __pyx_obj_6uvloop_4loop_Loop *, uint64_t, PyObject *, PyObject *, PyObject *);
  2550. void (*_handle_exception)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *);
  2551. PyObject *(*_new_future)(struct __pyx_obj_6uvloop_4loop_Loop *);
  2552. PyObject *(*_check_signal)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *);
  2553. PyObject *(*_check_closed)(struct __pyx_obj_6uvloop_4loop_Loop *);
  2554. PyObject *(*_check_thread)(struct __pyx_obj_6uvloop_4loop_Loop *);
  2555. PyObject *(*_getaddrinfo)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, PyObject *, int, int, int, int, int);
  2556. PyObject *(*_getnameinfo)(struct __pyx_obj_6uvloop_4loop_Loop *, struct sockaddr *, int);
  2557. PyObject *(*_track_transport)(struct __pyx_obj_6uvloop_4loop_Loop *, struct __pyx_obj_6uvloop_4loop_UVBaseTransport *);
  2558. PyObject *(*_fileobj_to_fd)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *);
  2559. PyObject *(*_ensure_fd_no_transport)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *);
  2560. PyObject *(*_track_process)(struct __pyx_obj_6uvloop_4loop_Loop *, struct __pyx_obj_6uvloop_4loop_UVProcess *);
  2561. PyObject *(*_untrack_process)(struct __pyx_obj_6uvloop_4loop_Loop *, struct __pyx_obj_6uvloop_4loop_UVProcess *);
  2562. PyObject *(*_add_reader)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, struct __pyx_obj_6uvloop_4loop_Handle *);
  2563. PyObject *(*_has_reader)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *);
  2564. PyObject *(*_remove_reader)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *);
  2565. PyObject *(*_add_writer)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, struct __pyx_obj_6uvloop_4loop_Handle *);
  2566. PyObject *(*_has_writer)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *);
  2567. PyObject *(*_remove_writer)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *);
  2568. PyObject *(*_sock_recv)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, PyObject *, PyObject *);
  2569. PyObject *(*_sock_recv_into)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, PyObject *, PyObject *);
  2570. PyObject *(*_sock_sendall)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, PyObject *, PyObject *);
  2571. PyObject *(*_sock_accept)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, PyObject *);
  2572. PyObject *(*_sock_connect)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, PyObject *);
  2573. PyObject *(*_sock_connect_cb)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, PyObject *, PyObject *);
  2574. PyObject *(*_sock_set_reuseport)(struct __pyx_obj_6uvloop_4loop_Loop *, int);
  2575. PyObject *(*_setup_signals)(struct __pyx_obj_6uvloop_4loop_Loop *);
  2576. PyObject *(*_shutdown_signals)(struct __pyx_obj_6uvloop_4loop_Loop *);
  2577. PyObject *(*_recv_signals_start)(struct __pyx_obj_6uvloop_4loop_Loop *);
  2578. PyObject *(*_recv_signals_stop)(struct __pyx_obj_6uvloop_4loop_Loop *);
  2579. PyObject *(*_handle_signal)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *);
  2580. PyObject *(*_read_from_self)(struct __pyx_obj_6uvloop_4loop_Loop *);
  2581. PyObject *(*_ceval_process_signals)(struct __pyx_obj_6uvloop_4loop_Loop *);
  2582. PyObject *(*_invoke_signals)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *);
  2583. PyObject *(*_set_coroutine_debug)(struct __pyx_obj_6uvloop_4loop_Loop *, int);
  2584. PyObject *(*_print_debug_info)(struct __pyx_obj_6uvloop_4loop_Loop *);
  2585. };
  2586. static struct __pyx_vtabstruct_6uvloop_4loop_Loop *__pyx_vtabptr_6uvloop_4loop_Loop;
  2587. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_4Loop__queue_write(struct __pyx_obj_6uvloop_4loop_Loop *, struct __pyx_obj_6uvloop_4loop_UVStream *);
  2588. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_4Loop__call_soon(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, PyObject *, PyObject *);
  2589. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_4Loop__call_soon_handle(struct __pyx_obj_6uvloop_4loop_Loop *, struct __pyx_obj_6uvloop_4loop_Handle *);
  2590. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_4Loop__new_future(struct __pyx_obj_6uvloop_4loop_Loop *);
  2591. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_4Loop__check_signal(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *);
  2592. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_4Loop__check_closed(struct __pyx_obj_6uvloop_4loop_Loop *);
  2593. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_4Loop__check_thread(struct __pyx_obj_6uvloop_4loop_Loop *);
  2594. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_4Loop__ceval_process_signals(struct __pyx_obj_6uvloop_4loop_Loop *);
  2595. /* "uvloop/cbhandles.pyx":3
  2596. * @cython.no_gc_clear
  2597. * @cython.freelist(DEFAULT_FREELIST_SIZE)
  2598. * cdef class Handle: # <<<<<<<<<<<<<<
  2599. * def __cinit__(self):
  2600. * self._cancelled = 0
  2601. */
  2602. struct __pyx_vtabstruct_6uvloop_4loop_Handle {
  2603. PyObject *(*_set_loop)(struct __pyx_obj_6uvloop_4loop_Handle *, struct __pyx_obj_6uvloop_4loop_Loop *);
  2604. PyObject *(*_set_context)(struct __pyx_obj_6uvloop_4loop_Handle *, PyObject *);
  2605. PyObject *(*_run)(struct __pyx_obj_6uvloop_4loop_Handle *);
  2606. PyObject *(*_cancel)(struct __pyx_obj_6uvloop_4loop_Handle *);
  2607. PyObject *(*_format_handle)(struct __pyx_obj_6uvloop_4loop_Handle *);
  2608. };
  2609. static struct __pyx_vtabstruct_6uvloop_4loop_Handle *__pyx_vtabptr_6uvloop_4loop_Handle;
  2610. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_6Handle__set_loop(struct __pyx_obj_6uvloop_4loop_Handle *, struct __pyx_obj_6uvloop_4loop_Loop *);
  2611. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_6Handle__set_context(struct __pyx_obj_6uvloop_4loop_Handle *, PyObject *);
  2612. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_6Handle__run(struct __pyx_obj_6uvloop_4loop_Handle *);
  2613. /* "uvloop/cbhandles.pyx":173
  2614. * @cython.no_gc_clear
  2615. * @cython.freelist(DEFAULT_FREELIST_SIZE)
  2616. * cdef class TimerHandle: # <<<<<<<<<<<<<<
  2617. * def __cinit__(self, Loop loop, object callback, object args,
  2618. * uint64_t delay, object context):
  2619. */
  2620. struct __pyx_vtabstruct_6uvloop_4loop_TimerHandle {
  2621. PyObject *(*_run)(struct __pyx_obj_6uvloop_4loop_TimerHandle *);
  2622. PyObject *(*_cancel)(struct __pyx_obj_6uvloop_4loop_TimerHandle *);
  2623. PyObject *(*_clear)(struct __pyx_obj_6uvloop_4loop_TimerHandle *);
  2624. };
  2625. static struct __pyx_vtabstruct_6uvloop_4loop_TimerHandle *__pyx_vtabptr_6uvloop_4loop_TimerHandle;
  2626. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_11TimerHandle__clear(struct __pyx_obj_6uvloop_4loop_TimerHandle *);
  2627. /* "uvloop/handles/check.pyx":2
  2628. * @cython.no_gc_clear
  2629. * cdef class UVCheck(UVHandle): # <<<<<<<<<<<<<<
  2630. * cdef _init(self, Loop loop, Handle h):
  2631. * cdef int err
  2632. */
  2633. struct __pyx_vtabstruct_6uvloop_4loop_UVCheck {
  2634. struct __pyx_vtabstruct_6uvloop_4loop_UVHandle __pyx_base;
  2635. PyObject *(*_init)(struct __pyx_obj_6uvloop_4loop_UVCheck *, struct __pyx_obj_6uvloop_4loop_Loop *, struct __pyx_obj_6uvloop_4loop_Handle *);
  2636. PyObject *(*stop)(struct __pyx_obj_6uvloop_4loop_UVCheck *);
  2637. PyObject *(*start)(struct __pyx_obj_6uvloop_4loop_UVCheck *);
  2638. struct __pyx_obj_6uvloop_4loop_UVCheck *(*new)(struct __pyx_obj_6uvloop_4loop_Loop *, struct __pyx_obj_6uvloop_4loop_Handle *);
  2639. };
  2640. static struct __pyx_vtabstruct_6uvloop_4loop_UVCheck *__pyx_vtabptr_6uvloop_4loop_UVCheck;
  2641. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_7UVCheck_stop(struct __pyx_obj_6uvloop_4loop_UVCheck *);
  2642. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_7UVCheck_start(struct __pyx_obj_6uvloop_4loop_UVCheck *);
  2643. /* "uvloop/handles/poll.pyx":2
  2644. * @cython.no_gc_clear
  2645. * cdef class UVPoll(UVHandle): # <<<<<<<<<<<<<<
  2646. * cdef _init(self, Loop loop, int fd):
  2647. * cdef int err
  2648. */
  2649. struct __pyx_vtabstruct_6uvloop_4loop_UVPoll {
  2650. struct __pyx_vtabstruct_6uvloop_4loop_UVHandle __pyx_base;
  2651. PyObject *(*_init)(struct __pyx_obj_6uvloop_4loop_UVPoll *, struct __pyx_obj_6uvloop_4loop_Loop *, int);
  2652. PyObject *(*_poll_start)(struct __pyx_obj_6uvloop_4loop_UVPoll *, int);
  2653. PyObject *(*_poll_stop)(struct __pyx_obj_6uvloop_4loop_UVPoll *);
  2654. int (*is_active)(struct __pyx_obj_6uvloop_4loop_UVPoll *);
  2655. PyObject *(*is_reading)(struct __pyx_obj_6uvloop_4loop_UVPoll *);
  2656. PyObject *(*is_writing)(struct __pyx_obj_6uvloop_4loop_UVPoll *);
  2657. PyObject *(*start_reading)(struct __pyx_obj_6uvloop_4loop_UVPoll *, struct __pyx_obj_6uvloop_4loop_Handle *);
  2658. PyObject *(*start_writing)(struct __pyx_obj_6uvloop_4loop_UVPoll *, struct __pyx_obj_6uvloop_4loop_Handle *);
  2659. PyObject *(*stop_reading)(struct __pyx_obj_6uvloop_4loop_UVPoll *);
  2660. PyObject *(*stop_writing)(struct __pyx_obj_6uvloop_4loop_UVPoll *);
  2661. PyObject *(*stop)(struct __pyx_obj_6uvloop_4loop_UVPoll *);
  2662. struct __pyx_obj_6uvloop_4loop_UVPoll *(*new)(struct __pyx_obj_6uvloop_4loop_Loop *, int);
  2663. };
  2664. static struct __pyx_vtabstruct_6uvloop_4loop_UVPoll *__pyx_vtabptr_6uvloop_4loop_UVPoll;
  2665. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_6UVPoll__poll_start(struct __pyx_obj_6uvloop_4loop_UVPoll *, int);
  2666. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_6UVPoll__poll_stop(struct __pyx_obj_6uvloop_4loop_UVPoll *);
  2667. /* "uvloop/handles/stream.pyx":209
  2668. *
  2669. * @cython.no_gc_clear
  2670. * cdef class UVStream(UVBaseTransport): # <<<<<<<<<<<<<<
  2671. *
  2672. * def __cinit__(self):
  2673. */
  2674. struct __pyx_vtabstruct_6uvloop_4loop_UVStream {
  2675. struct __pyx_vtabstruct_6uvloop_4loop_UVBaseTransport __pyx_base;
  2676. PyObject *(*_init)(struct __pyx_obj_6uvloop_4loop_UVStream *, struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, struct __pyx_obj_6uvloop_4loop_Server *, PyObject *);
  2677. PyObject *(*_exec_write)(struct __pyx_obj_6uvloop_4loop_UVStream *);
  2678. PyObject *(*_shutdown)(struct __pyx_obj_6uvloop_4loop_UVStream *);
  2679. PyObject *(*_accept)(struct __pyx_obj_6uvloop_4loop_UVStream *, struct __pyx_obj_6uvloop_4loop_UVStream *);
  2680. PyObject *(*_close_on_read_error)(struct __pyx_obj_6uvloop_4loop_UVStream *);
  2681. PyObject *(*__pyx___reading_started)(struct __pyx_obj_6uvloop_4loop_UVStream *);
  2682. PyObject *(*__pyx___reading_stopped)(struct __pyx_obj_6uvloop_4loop_UVStream *);
  2683. PyObject *(*_write)(struct __pyx_obj_6uvloop_4loop_UVStream *, PyObject *);
  2684. PyObject *(*_try_write)(struct __pyx_obj_6uvloop_4loop_UVStream *, PyObject *);
  2685. PyObject *(*_on_accept)(struct __pyx_obj_6uvloop_4loop_UVStream *);
  2686. PyObject *(*_on_eof)(struct __pyx_obj_6uvloop_4loop_UVStream *);
  2687. PyObject *(*_on_write)(struct __pyx_obj_6uvloop_4loop_UVStream *);
  2688. PyObject *(*_on_connect)(struct __pyx_obj_6uvloop_4loop_UVStream *, PyObject *);
  2689. };
  2690. static struct __pyx_vtabstruct_6uvloop_4loop_UVStream *__pyx_vtabptr_6uvloop_4loop_UVStream;
  2691. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVStream__init(struct __pyx_obj_6uvloop_4loop_UVStream *, struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, struct __pyx_obj_6uvloop_4loop_Server *, PyObject *);
  2692. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVStream__exec_write(struct __pyx_obj_6uvloop_4loop_UVStream *);
  2693. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVStream__shutdown(struct __pyx_obj_6uvloop_4loop_UVStream *);
  2694. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVStream__accept(struct __pyx_obj_6uvloop_4loop_UVStream *, struct __pyx_obj_6uvloop_4loop_UVStream *);
  2695. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVStream__close_on_read_error(struct __pyx_obj_6uvloop_4loop_UVStream *);
  2696. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVStream___reading_started(struct __pyx_obj_6uvloop_4loop_UVStream *);
  2697. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVStream___reading_stopped(struct __pyx_obj_6uvloop_4loop_UVStream *);
  2698. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVStream__write(struct __pyx_obj_6uvloop_4loop_UVStream *, PyObject *);
  2699. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVStream__try_write(struct __pyx_obj_6uvloop_4loop_UVStream *, PyObject *);
  2700. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVStream__on_accept(struct __pyx_obj_6uvloop_4loop_UVStream *);
  2701. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVStream__on_eof(struct __pyx_obj_6uvloop_4loop_UVStream *);
  2702. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVStream__on_write(struct __pyx_obj_6uvloop_4loop_UVStream *);
  2703. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVStream__on_connect(struct __pyx_obj_6uvloop_4loop_UVStream *, PyObject *);
  2704. /* "uvloop/handles/streamserver.pyx":2
  2705. * @cython.no_gc_clear
  2706. * cdef class UVStreamServer(UVSocketHandle): # <<<<<<<<<<<<<<
  2707. *
  2708. * def __cinit__(self):
  2709. */
  2710. struct __pyx_vtabstruct_6uvloop_4loop_UVStreamServer {
  2711. struct __pyx_vtabstruct_6uvloop_4loop_UVSocketHandle __pyx_base;
  2712. PyObject *(*_init)(struct __pyx_obj_6uvloop_4loop_UVStreamServer *, struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, struct __pyx_obj_6uvloop_4loop_Server *, PyObject *, PyObject *, PyObject *, PyObject *);
  2713. PyObject *(*_mark_as_open)(struct __pyx_obj_6uvloop_4loop_UVStreamServer *);
  2714. PyObject *(*listen)(struct __pyx_obj_6uvloop_4loop_UVStreamServer *);
  2715. PyObject *(*_on_listen)(struct __pyx_obj_6uvloop_4loop_UVStreamServer *);
  2716. struct __pyx_obj_6uvloop_4loop_UVStream *(*_make_new_transport)(struct __pyx_obj_6uvloop_4loop_UVStreamServer *, PyObject *, PyObject *);
  2717. };
  2718. static struct __pyx_vtabstruct_6uvloop_4loop_UVStreamServer *__pyx_vtabptr_6uvloop_4loop_UVStreamServer;
  2719. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_14UVStreamServer__init(struct __pyx_obj_6uvloop_4loop_UVStreamServer *, struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, struct __pyx_obj_6uvloop_4loop_Server *, PyObject *, PyObject *, PyObject *, PyObject *);
  2720. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_14UVStreamServer__mark_as_open(struct __pyx_obj_6uvloop_4loop_UVStreamServer *);
  2721. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_14UVStreamServer_listen(struct __pyx_obj_6uvloop_4loop_UVStreamServer *);
  2722. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_14UVStreamServer__on_listen(struct __pyx_obj_6uvloop_4loop_UVStreamServer *);
  2723. /* "uvloop/handles/tcp.pyx":56
  2724. *
  2725. * @cython.no_gc_clear
  2726. * cdef class TCPServer(UVStreamServer): # <<<<<<<<<<<<<<
  2727. *
  2728. * @staticmethod
  2729. */
  2730. struct __pyx_vtabstruct_6uvloop_4loop_TCPServer {
  2731. struct __pyx_vtabstruct_6uvloop_4loop_UVStreamServer __pyx_base;
  2732. PyObject *(*bind)(struct __pyx_obj_6uvloop_4loop_TCPServer *, struct sockaddr *, struct __pyx_opt_args_6uvloop_4loop_9TCPServer_bind *__pyx_optional_args);
  2733. struct __pyx_obj_6uvloop_4loop_TCPServer *(*new)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, struct __pyx_obj_6uvloop_4loop_Server *, unsigned int, PyObject *, PyObject *, PyObject *, PyObject *);
  2734. };
  2735. static struct __pyx_vtabstruct_6uvloop_4loop_TCPServer *__pyx_vtabptr_6uvloop_4loop_TCPServer;
  2736. /* "uvloop/handles/tcp.pyx":101
  2737. *
  2738. * @cython.no_gc_clear
  2739. * cdef class TCPTransport(UVStream): # <<<<<<<<<<<<<<
  2740. *
  2741. * @staticmethod
  2742. */
  2743. struct __pyx_vtabstruct_6uvloop_4loop_TCPTransport {
  2744. struct __pyx_vtabstruct_6uvloop_4loop_UVStream __pyx_base;
  2745. PyObject *(*bind)(struct __pyx_obj_6uvloop_4loop_TCPTransport *, struct sockaddr *, struct __pyx_opt_args_6uvloop_4loop_12TCPTransport_bind *__pyx_optional_args);
  2746. PyObject *(*connect)(struct __pyx_obj_6uvloop_4loop_TCPTransport *, struct sockaddr *);
  2747. PyObject *(*_set_nodelay)(struct __pyx_obj_6uvloop_4loop_TCPTransport *);
  2748. struct __pyx_obj_6uvloop_4loop_TCPTransport *(*new)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, struct __pyx_obj_6uvloop_4loop_Server *, PyObject *);
  2749. };
  2750. static struct __pyx_vtabstruct_6uvloop_4loop_TCPTransport *__pyx_vtabptr_6uvloop_4loop_TCPTransport;
  2751. /* "uvloop/handles/pipe.pyx":37
  2752. *
  2753. * @cython.no_gc_clear
  2754. * cdef class UnixServer(UVStreamServer): # <<<<<<<<<<<<<<
  2755. *
  2756. * @staticmethod
  2757. */
  2758. struct __pyx_vtabstruct_6uvloop_4loop_UnixServer {
  2759. struct __pyx_vtabstruct_6uvloop_4loop_UVStreamServer __pyx_base;
  2760. PyObject *(*bind)(struct __pyx_obj_6uvloop_4loop_UnixServer *, PyObject *);
  2761. struct __pyx_obj_6uvloop_4loop_UnixServer *(*new)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, struct __pyx_obj_6uvloop_4loop_Server *, PyObject *, PyObject *, PyObject *, PyObject *);
  2762. };
  2763. static struct __pyx_vtabstruct_6uvloop_4loop_UnixServer *__pyx_vtabptr_6uvloop_4loop_UnixServer;
  2764. /* "uvloop/handles/pipe.pyx":80
  2765. *
  2766. * @cython.no_gc_clear
  2767. * cdef class UnixTransport(UVStream): # <<<<<<<<<<<<<<
  2768. *
  2769. * @staticmethod
  2770. */
  2771. struct __pyx_vtabstruct_6uvloop_4loop_UnixTransport {
  2772. struct __pyx_vtabstruct_6uvloop_4loop_UVStream __pyx_base;
  2773. struct __pyx_obj_6uvloop_4loop_UnixTransport *(*new)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, struct __pyx_obj_6uvloop_4loop_Server *, PyObject *);
  2774. PyObject *(*connect)(struct __pyx_obj_6uvloop_4loop_UnixTransport *, char *);
  2775. };
  2776. static struct __pyx_vtabstruct_6uvloop_4loop_UnixTransport *__pyx_vtabptr_6uvloop_4loop_UnixTransport;
  2777. /* "uvloop/handles/pipe.pyx":105
  2778. *
  2779. * @cython.no_gc_clear
  2780. * cdef class ReadUnixTransport(UVStream): # <<<<<<<<<<<<<<
  2781. *
  2782. * @staticmethod
  2783. */
  2784. struct __pyx_vtabstruct_6uvloop_4loop_ReadUnixTransport {
  2785. struct __pyx_vtabstruct_6uvloop_4loop_UVStream __pyx_base;
  2786. struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *(*new)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, struct __pyx_obj_6uvloop_4loop_Server *, PyObject *);
  2787. };
  2788. static struct __pyx_vtabstruct_6uvloop_4loop_ReadUnixTransport *__pyx_vtabptr_6uvloop_4loop_ReadUnixTransport;
  2789. /* "uvloop/handles/pipe.pyx":148
  2790. *
  2791. * @cython.no_gc_clear
  2792. * cdef class WriteUnixTransport(UVStream): # <<<<<<<<<<<<<<
  2793. *
  2794. * def __cinit__(self):
  2795. */
  2796. struct __pyx_vtabstruct_6uvloop_4loop_WriteUnixTransport {
  2797. struct __pyx_vtabstruct_6uvloop_4loop_UVStream __pyx_base;
  2798. struct __pyx_obj_6uvloop_4loop_WriteUnixTransport *(*new)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, struct __pyx_obj_6uvloop_4loop_Server *, PyObject *);
  2799. };
  2800. static struct __pyx_vtabstruct_6uvloop_4loop_WriteUnixTransport *__pyx_vtabptr_6uvloop_4loop_WriteUnixTransport;
  2801. /* "uvloop/handles/process.pyx":2
  2802. * @cython.no_gc_clear
  2803. * cdef class UVProcess(UVHandle): # <<<<<<<<<<<<<<
  2804. * """Abstract class; wrapper over uv_process_t handle."""
  2805. *
  2806. */
  2807. struct __pyx_vtabstruct_6uvloop_4loop_UVProcess {
  2808. struct __pyx_vtabstruct_6uvloop_4loop_UVHandle __pyx_base;
  2809. PyObject *(*_close_process_handle)(struct __pyx_obj_6uvloop_4loop_UVProcess *);
  2810. PyObject *(*_init)(struct __pyx_obj_6uvloop_4loop_UVProcess *, struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *);
  2811. PyObject *(*_after_fork)(struct __pyx_obj_6uvloop_4loop_UVProcess *);
  2812. char **(*__pyx___to_cstring_array)(struct __pyx_obj_6uvloop_4loop_UVProcess *, PyObject *);
  2813. PyObject *(*_init_args)(struct __pyx_obj_6uvloop_4loop_UVProcess *, PyObject *);
  2814. PyObject *(*_init_env)(struct __pyx_obj_6uvloop_4loop_UVProcess *, PyObject *);
  2815. PyObject *(*_init_files)(struct __pyx_obj_6uvloop_4loop_UVProcess *, PyObject *, PyObject *, PyObject *);
  2816. PyObject *(*_init_options)(struct __pyx_obj_6uvloop_4loop_UVProcess *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *);
  2817. PyObject *(*_close_after_spawn)(struct __pyx_obj_6uvloop_4loop_UVProcess *, int);
  2818. PyObject *(*_on_exit)(struct __pyx_obj_6uvloop_4loop_UVProcess *, int64_t, int);
  2819. PyObject *(*_kill)(struct __pyx_obj_6uvloop_4loop_UVProcess *, int);
  2820. };
  2821. static struct __pyx_vtabstruct_6uvloop_4loop_UVProcess *__pyx_vtabptr_6uvloop_4loop_UVProcess;
  2822. /* "uvloop/handles/process.pyx":352
  2823. *
  2824. * @cython.no_gc_clear
  2825. * cdef class UVProcessTransport(UVProcess): # <<<<<<<<<<<<<<
  2826. * def __cinit__(self):
  2827. * self._exit_waiters = []
  2828. */
  2829. struct __pyx_vtabstruct_6uvloop_4loop_UVProcessTransport {
  2830. struct __pyx_vtabstruct_6uvloop_4loop_UVProcess __pyx_base;
  2831. PyObject *(*_file_redirect_stdio)(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *, int);
  2832. PyObject *(*_file_devnull)(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *);
  2833. PyObject *(*_file_inpipe)(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *);
  2834. PyObject *(*_file_outpipe)(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *);
  2835. PyObject *(*_check_proc)(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *);
  2836. PyObject *(*_pipe_connection_lost)(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *, int, PyObject *);
  2837. PyObject *(*_pipe_data_received)(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *, int, PyObject *);
  2838. PyObject *(*_call_connection_made)(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *, PyObject *);
  2839. PyObject *(*_try_finish)(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *);
  2840. struct __pyx_obj_6uvloop_4loop_UVProcessTransport *(*new)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *);
  2841. };
  2842. static struct __pyx_vtabstruct_6uvloop_4loop_UVProcessTransport *__pyx_vtabptr_6uvloop_4loop_UVProcessTransport;
  2843. /* "uvloop/request.pyx":1
  2844. * cdef class UVRequest: # <<<<<<<<<<<<<<
  2845. * """A base class for all libuv requests (uv_getaddrinfo_t, etc).
  2846. *
  2847. */
  2848. struct __pyx_vtabstruct_6uvloop_4loop_UVRequest {
  2849. PyObject *(*on_done)(struct __pyx_obj_6uvloop_4loop_UVRequest *);
  2850. PyObject *(*cancel)(struct __pyx_obj_6uvloop_4loop_UVRequest *);
  2851. };
  2852. static struct __pyx_vtabstruct_6uvloop_4loop_UVRequest *__pyx_vtabptr_6uvloop_4loop_UVRequest;
  2853. /* "uvloop/sslproto.pyx":192
  2854. *
  2855. *
  2856. * cdef class SSLProtocol: # <<<<<<<<<<<<<<
  2857. * """SSL protocol.
  2858. *
  2859. */
  2860. struct __pyx_vtabstruct_6uvloop_4loop_SSLProtocol {
  2861. PyObject *(*_set_app_protocol)(struct __pyx_obj_6uvloop_4loop_SSLProtocol *, PyObject *);
  2862. PyObject *(*_wakeup_waiter)(struct __pyx_obj_6uvloop_4loop_SSLProtocol *, struct __pyx_opt_args_6uvloop_4loop_11SSLProtocol__wakeup_waiter *__pyx_optional_args);
  2863. PyObject *(*_get_extra_info)(struct __pyx_obj_6uvloop_4loop_SSLProtocol *, PyObject *, struct __pyx_opt_args_6uvloop_4loop_11SSLProtocol__get_extra_info *__pyx_optional_args);
  2864. PyObject *(*_set_state)(struct __pyx_obj_6uvloop_4loop_SSLProtocol *, enum __pyx_t_6uvloop_4loop_SSLProtocolState);
  2865. PyObject *(*_start_handshake)(struct __pyx_obj_6uvloop_4loop_SSLProtocol *);
  2866. PyObject *(*_check_handshake_timeout)(struct __pyx_obj_6uvloop_4loop_SSLProtocol *);
  2867. PyObject *(*_do_handshake)(struct __pyx_obj_6uvloop_4loop_SSLProtocol *);
  2868. PyObject *(*_on_handshake_complete)(struct __pyx_obj_6uvloop_4loop_SSLProtocol *, PyObject *);
  2869. PyObject *(*_start_shutdown)(struct __pyx_obj_6uvloop_4loop_SSLProtocol *);
  2870. PyObject *(*_check_shutdown_timeout)(struct __pyx_obj_6uvloop_4loop_SSLProtocol *);
  2871. PyObject *(*_do_flush)(struct __pyx_obj_6uvloop_4loop_SSLProtocol *);
  2872. PyObject *(*_do_shutdown)(struct __pyx_obj_6uvloop_4loop_SSLProtocol *);
  2873. PyObject *(*_on_shutdown_complete)(struct __pyx_obj_6uvloop_4loop_SSLProtocol *, PyObject *);
  2874. PyObject *(*_abort)(struct __pyx_obj_6uvloop_4loop_SSLProtocol *, PyObject *);
  2875. PyObject *(*_write_appdata)(struct __pyx_obj_6uvloop_4loop_SSLProtocol *, PyObject *);
  2876. PyObject *(*_do_write)(struct __pyx_obj_6uvloop_4loop_SSLProtocol *);
  2877. PyObject *(*_process_outgoing)(struct __pyx_obj_6uvloop_4loop_SSLProtocol *);
  2878. PyObject *(*_do_read)(struct __pyx_obj_6uvloop_4loop_SSLProtocol *);
  2879. PyObject *(*_do_read__buffered)(struct __pyx_obj_6uvloop_4loop_SSLProtocol *);
  2880. PyObject *(*_do_read__copied)(struct __pyx_obj_6uvloop_4loop_SSLProtocol *);
  2881. PyObject *(*_call_eof_received)(struct __pyx_obj_6uvloop_4loop_SSLProtocol *);
  2882. PyObject *(*_control_app_writing)(struct __pyx_obj_6uvloop_4loop_SSLProtocol *);
  2883. size_t (*_get_write_buffer_size)(struct __pyx_obj_6uvloop_4loop_SSLProtocol *);
  2884. PyObject *(*_set_write_buffer_limits)(struct __pyx_obj_6uvloop_4loop_SSLProtocol *, struct __pyx_opt_args_6uvloop_4loop_11SSLProtocol__set_write_buffer_limits *__pyx_optional_args);
  2885. PyObject *(*_pause_reading)(struct __pyx_obj_6uvloop_4loop_SSLProtocol *);
  2886. PyObject *(*_resume_reading)(struct __pyx_obj_6uvloop_4loop_SSLProtocol *);
  2887. PyObject *(*_control_ssl_reading)(struct __pyx_obj_6uvloop_4loop_SSLProtocol *);
  2888. PyObject *(*_set_read_buffer_limits)(struct __pyx_obj_6uvloop_4loop_SSLProtocol *, struct __pyx_opt_args_6uvloop_4loop_11SSLProtocol__set_read_buffer_limits *__pyx_optional_args);
  2889. size_t (*_get_read_buffer_size)(struct __pyx_obj_6uvloop_4loop_SSLProtocol *);
  2890. PyObject *(*_fatal_error)(struct __pyx_obj_6uvloop_4loop_SSLProtocol *, PyObject *, struct __pyx_opt_args_6uvloop_4loop_11SSLProtocol__fatal_error *__pyx_optional_args);
  2891. };
  2892. static struct __pyx_vtabstruct_6uvloop_4loop_SSLProtocol *__pyx_vtabptr_6uvloop_4loop_SSLProtocol;
  2893. /* "uvloop/handles/udp.pyx":54
  2894. *
  2895. * @cython.no_gc_clear
  2896. * cdef class UDPTransport(UVBaseTransport): # <<<<<<<<<<<<<<
  2897. * def __cinit__(self):
  2898. * self._family = uv.AF_UNSPEC
  2899. */
  2900. struct __pyx_vtabstruct_6uvloop_4loop_UDPTransport {
  2901. struct __pyx_vtabstruct_6uvloop_4loop_UVBaseTransport __pyx_base;
  2902. PyObject *(*_init)(struct __pyx_obj_6uvloop_4loop_UDPTransport *, struct __pyx_obj_6uvloop_4loop_Loop *, unsigned int);
  2903. PyObject *(*_connect)(struct __pyx_obj_6uvloop_4loop_UDPTransport *, struct sockaddr *, size_t);
  2904. PyObject *(*_bind)(struct __pyx_obj_6uvloop_4loop_UDPTransport *, struct sockaddr *, int);
  2905. PyObject *(*open)(struct __pyx_obj_6uvloop_4loop_UDPTransport *, int, int);
  2906. PyObject *(*_set_broadcast)(struct __pyx_obj_6uvloop_4loop_UDPTransport *, int);
  2907. PyObject *(*__pyx___receiving_started)(struct __pyx_obj_6uvloop_4loop_UDPTransport *);
  2908. PyObject *(*__pyx___receiving_stopped)(struct __pyx_obj_6uvloop_4loop_UDPTransport *);
  2909. PyObject *(*_send)(struct __pyx_obj_6uvloop_4loop_UDPTransport *, PyObject *, PyObject *);
  2910. PyObject *(*_on_receive)(struct __pyx_obj_6uvloop_4loop_UDPTransport *, PyObject *, PyObject *, PyObject *);
  2911. PyObject *(*_on_sent)(struct __pyx_obj_6uvloop_4loop_UDPTransport *, PyObject *);
  2912. };
  2913. static struct __pyx_vtabstruct_6uvloop_4loop_UDPTransport *__pyx_vtabptr_6uvloop_4loop_UDPTransport;
  2914. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_12UDPTransport___receiving_started(struct __pyx_obj_6uvloop_4loop_UDPTransport *);
  2915. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_12UDPTransport___receiving_stopped(struct __pyx_obj_6uvloop_4loop_UDPTransport *);
  2916. /* "uvloop/server.pyx":4
  2917. *
  2918. *
  2919. * cdef class Server: # <<<<<<<<<<<<<<
  2920. * def __cinit__(self, Loop loop):
  2921. * self._loop = loop
  2922. */
  2923. struct __pyx_vtabstruct_6uvloop_4loop_Server {
  2924. PyObject *(*_add_server)(struct __pyx_obj_6uvloop_4loop_Server *, struct __pyx_obj_6uvloop_4loop_UVStreamServer *);
  2925. PyObject *(*_start_serving)(struct __pyx_obj_6uvloop_4loop_Server *);
  2926. PyObject *(*_wakeup)(struct __pyx_obj_6uvloop_4loop_Server *);
  2927. PyObject *(*_attach)(struct __pyx_obj_6uvloop_4loop_Server *);
  2928. PyObject *(*_detach)(struct __pyx_obj_6uvloop_4loop_Server *);
  2929. PyObject *(*_ref)(struct __pyx_obj_6uvloop_4loop_Server *);
  2930. PyObject *(*_unref)(struct __pyx_obj_6uvloop_4loop_Server *);
  2931. };
  2932. static struct __pyx_vtabstruct_6uvloop_4loop_Server *__pyx_vtabptr_6uvloop_4loop_Server;
  2933. /* "uvloop/pseudosock.pyx":1
  2934. * cdef class PseudoSocket: # <<<<<<<<<<<<<<
  2935. * cdef:
  2936. * int _family
  2937. */
  2938. struct __pyx_vtabstruct_6uvloop_4loop_PseudoSocket {
  2939. PyObject *(*_na)(struct __pyx_obj_6uvloop_4loop_PseudoSocket *, PyObject *);
  2940. PyObject *(*_make_sock)(struct __pyx_obj_6uvloop_4loop_PseudoSocket *);
  2941. };
  2942. static struct __pyx_vtabstruct_6uvloop_4loop_PseudoSocket *__pyx_vtabptr_6uvloop_4loop_PseudoSocket;
  2943. /* "uvloop/lru.pyx":5
  2944. *
  2945. * @cython.final
  2946. * cdef class LruCache: # <<<<<<<<<<<<<<
  2947. *
  2948. * cdef:
  2949. */
  2950. struct __pyx_vtabstruct_6uvloop_4loop_LruCache {
  2951. PyObject *(*get)(struct __pyx_obj_6uvloop_4loop_LruCache *, PyObject *, PyObject *);
  2952. PyObject *(*needs_cleanup)(struct __pyx_obj_6uvloop_4loop_LruCache *);
  2953. PyObject *(*cleanup_one)(struct __pyx_obj_6uvloop_4loop_LruCache *);
  2954. };
  2955. static struct __pyx_vtabstruct_6uvloop_4loop_LruCache *__pyx_vtabptr_6uvloop_4loop_LruCache;
  2956. static PyObject *__pyx_f_6uvloop_4loop_8LruCache_get(struct __pyx_obj_6uvloop_4loop_LruCache *, PyObject *, PyObject *);
  2957. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8LruCache_needs_cleanup(struct __pyx_obj_6uvloop_4loop_LruCache *);
  2958. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8LruCache_cleanup_one(struct __pyx_obj_6uvloop_4loop_LruCache *);
  2959. /* "uvloop/handles/stream.pyx":6
  2960. * @cython.no_gc_clear
  2961. * @cython.freelist(DEFAULT_FREELIST_SIZE)
  2962. * cdef class _StreamWriteContext: # <<<<<<<<<<<<<<
  2963. * # used to hold additional write request information for uv_write
  2964. *
  2965. */
  2966. struct __pyx_vtabstruct_6uvloop_4loop__StreamWriteContext {
  2967. PyObject *(*free_bufs)(struct __pyx_obj_6uvloop_4loop__StreamWriteContext *);
  2968. PyObject *(*close)(struct __pyx_obj_6uvloop_4loop__StreamWriteContext *);
  2969. PyObject *(*advance_uv_buf)(struct __pyx_obj_6uvloop_4loop__StreamWriteContext *, size_t);
  2970. struct __pyx_obj_6uvloop_4loop__StreamWriteContext *(*new)(struct __pyx_obj_6uvloop_4loop_UVStream *, PyObject *);
  2971. };
  2972. static struct __pyx_vtabstruct_6uvloop_4loop__StreamWriteContext *__pyx_vtabptr_6uvloop_4loop__StreamWriteContext;
  2973. /* "uvloop/handles/tcp.pyx":183
  2974. *
  2975. *
  2976. * cdef class _TCPConnectRequest(UVRequest): # <<<<<<<<<<<<<<
  2977. * cdef:
  2978. * TCPTransport transport
  2979. */
  2980. struct __pyx_vtabstruct_6uvloop_4loop__TCPConnectRequest {
  2981. struct __pyx_vtabstruct_6uvloop_4loop_UVRequest __pyx_base;
  2982. PyObject *(*connect)(struct __pyx_obj_6uvloop_4loop__TCPConnectRequest *, struct sockaddr *);
  2983. };
  2984. static struct __pyx_vtabstruct_6uvloop_4loop__TCPConnectRequest *__pyx_vtabptr_6uvloop_4loop__TCPConnectRequest;
  2985. /* "uvloop/handles/pipe.pyx":242
  2986. *
  2987. *
  2988. * cdef class _PipeConnectRequest(UVRequest): # <<<<<<<<<<<<<<
  2989. * cdef:
  2990. * UnixTransport transport
  2991. */
  2992. struct __pyx_vtabstruct_6uvloop_4loop__PipeConnectRequest {
  2993. struct __pyx_vtabstruct_6uvloop_4loop_UVRequest __pyx_base;
  2994. PyObject *(*connect)(struct __pyx_obj_6uvloop_4loop__PipeConnectRequest *, char *);
  2995. };
  2996. static struct __pyx_vtabstruct_6uvloop_4loop__PipeConnectRequest *__pyx_vtabptr_6uvloop_4loop__PipeConnectRequest;
  2997. /* "uvloop/dns.pyx":247
  2998. *
  2999. * @cython.freelist(DEFAULT_FREELIST_SIZE)
  3000. * cdef class AddrInfo: # <<<<<<<<<<<<<<
  3001. * cdef:
  3002. * system.addrinfo *data
  3003. */
  3004. struct __pyx_vtabstruct_6uvloop_4loop_AddrInfo {
  3005. void (*set_data)(struct __pyx_obj_6uvloop_4loop_AddrInfo *, struct addrinfo *);
  3006. PyObject *(*unpack)(struct __pyx_obj_6uvloop_4loop_AddrInfo *);
  3007. int (*isinstance)(PyObject *);
  3008. };
  3009. static struct __pyx_vtabstruct_6uvloop_4loop_AddrInfo *__pyx_vtabptr_6uvloop_4loop_AddrInfo;
  3010. /* "uvloop/dns.pyx":291
  3011. *
  3012. *
  3013. * cdef class AddrInfoRequest(UVRequest): # <<<<<<<<<<<<<<
  3014. * cdef:
  3015. * system.addrinfo hints
  3016. */
  3017. struct __pyx_vtabstruct_6uvloop_4loop_AddrInfoRequest {
  3018. struct __pyx_vtabstruct_6uvloop_4loop_UVRequest __pyx_base;
  3019. };
  3020. static struct __pyx_vtabstruct_6uvloop_4loop_AddrInfoRequest *__pyx_vtabptr_6uvloop_4loop_AddrInfoRequest;
  3021. /* "uvloop/dns.pyx":346
  3022. *
  3023. *
  3024. * cdef class NameInfoRequest(UVRequest): # <<<<<<<<<<<<<<
  3025. * cdef:
  3026. * object callback
  3027. */
  3028. struct __pyx_vtabstruct_6uvloop_4loop_NameInfoRequest {
  3029. struct __pyx_vtabstruct_6uvloop_4loop_UVRequest __pyx_base;
  3030. PyObject *(*query)(struct __pyx_obj_6uvloop_4loop_NameInfoRequest *, struct sockaddr *, int);
  3031. };
  3032. static struct __pyx_vtabstruct_6uvloop_4loop_NameInfoRequest *__pyx_vtabptr_6uvloop_4loop_NameInfoRequest;
  3033. /* "uvloop/handles/udp.pyx":3
  3034. * @cython.no_gc_clear
  3035. * @cython.freelist(DEFAULT_FREELIST_SIZE)
  3036. * cdef class _UDPSendContext: # <<<<<<<<<<<<<<
  3037. * # used to hold additional write request information for uv_write
  3038. *
  3039. */
  3040. struct __pyx_vtabstruct_6uvloop_4loop__UDPSendContext {
  3041. PyObject *(*close)(struct __pyx_obj_6uvloop_4loop__UDPSendContext *);
  3042. struct __pyx_obj_6uvloop_4loop__UDPSendContext *(*new)(struct __pyx_obj_6uvloop_4loop_UDPTransport *, PyObject *);
  3043. };
  3044. static struct __pyx_vtabstruct_6uvloop_4loop__UDPSendContext *__pyx_vtabptr_6uvloop_4loop__UDPSendContext;
  3045. /* --- Runtime support code (head) --- */
  3046. /* Refnanny.proto */
  3047. #ifndef CYTHON_REFNANNY
  3048. #define CYTHON_REFNANNY 0
  3049. #endif
  3050. #if CYTHON_REFNANNY
  3051. typedef struct {
  3052. void (*INCREF)(void*, PyObject*, int);
  3053. void (*DECREF)(void*, PyObject*, int);
  3054. void (*GOTREF)(void*, PyObject*, int);
  3055. void (*GIVEREF)(void*, PyObject*, int);
  3056. void* (*SetupContext)(const char*, int, const char*);
  3057. void (*FinishContext)(void**);
  3058. } __Pyx_RefNannyAPIStruct;
  3059. static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
  3060. static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
  3061. #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
  3062. #ifdef WITH_THREAD
  3063. #define __Pyx_RefNannySetupContext(name, acquire_gil)\
  3064. if (acquire_gil) {\
  3065. PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
  3066. __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
  3067. PyGILState_Release(__pyx_gilstate_save);\
  3068. } else {\
  3069. __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
  3070. }
  3071. #else
  3072. #define __Pyx_RefNannySetupContext(name, acquire_gil)\
  3073. __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
  3074. #endif
  3075. #define __Pyx_RefNannyFinishContext()\
  3076. __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
  3077. #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  3078. #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  3079. #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  3080. #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  3081. #define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
  3082. #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
  3083. #define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
  3084. #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
  3085. #else
  3086. #define __Pyx_RefNannyDeclarations
  3087. #define __Pyx_RefNannySetupContext(name, acquire_gil)
  3088. #define __Pyx_RefNannyFinishContext()
  3089. #define __Pyx_INCREF(r) Py_INCREF(r)
  3090. #define __Pyx_DECREF(r) Py_DECREF(r)
  3091. #define __Pyx_GOTREF(r)
  3092. #define __Pyx_GIVEREF(r)
  3093. #define __Pyx_XINCREF(r) Py_XINCREF(r)
  3094. #define __Pyx_XDECREF(r) Py_XDECREF(r)
  3095. #define __Pyx_XGOTREF(r)
  3096. #define __Pyx_XGIVEREF(r)
  3097. #endif
  3098. #define __Pyx_XDECREF_SET(r, v) do {\
  3099. PyObject *tmp = (PyObject *) r;\
  3100. r = v; __Pyx_XDECREF(tmp);\
  3101. } while (0)
  3102. #define __Pyx_DECREF_SET(r, v) do {\
  3103. PyObject *tmp = (PyObject *) r;\
  3104. r = v; __Pyx_DECREF(tmp);\
  3105. } while (0)
  3106. #define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
  3107. #define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
  3108. /* PyObjectGetAttrStr.proto */
  3109. #if CYTHON_USE_TYPE_SLOTS
  3110. static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
  3111. #else
  3112. #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
  3113. #endif
  3114. /* GetBuiltinName.proto */
  3115. static PyObject *__Pyx_GetBuiltinName(PyObject *name);
  3116. /* IncludeStringH.proto */
  3117. #include <string.h>
  3118. /* decode_c_string_utf16.proto */
  3119. static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16(const char *s, Py_ssize_t size, const char *errors) {
  3120. int byteorder = 0;
  3121. return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
  3122. }
  3123. static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16LE(const char *s, Py_ssize_t size, const char *errors) {
  3124. int byteorder = -1;
  3125. return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
  3126. }
  3127. static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16BE(const char *s, Py_ssize_t size, const char *errors) {
  3128. int byteorder = 1;
  3129. return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
  3130. }
  3131. /* decode_c_string.proto */
  3132. static CYTHON_INLINE PyObject* __Pyx_decode_c_string(
  3133. const char* cstring, Py_ssize_t start, Py_ssize_t stop,
  3134. const char* encoding, const char* errors,
  3135. PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors));
  3136. /* PyDictVersioning.proto */
  3137. #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
  3138. #define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1)
  3139. #define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag)
  3140. #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\
  3141. (version_var) = __PYX_GET_DICT_VERSION(dict);\
  3142. (cache_var) = (value);
  3143. #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\
  3144. static PY_UINT64_T __pyx_dict_version = 0;\
  3145. static PyObject *__pyx_dict_cached_value = NULL;\
  3146. if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\
  3147. (VAR) = __pyx_dict_cached_value;\
  3148. } else {\
  3149. (VAR) = __pyx_dict_cached_value = (LOOKUP);\
  3150. __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
  3151. }\
  3152. }
  3153. static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj);
  3154. static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj);
  3155. static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version);
  3156. #else
  3157. #define __PYX_GET_DICT_VERSION(dict) (0)
  3158. #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)
  3159. #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP);
  3160. #endif
  3161. /* GetModuleGlobalName.proto */
  3162. #if CYTHON_USE_DICT_VERSIONS
  3163. #define __Pyx_GetModuleGlobalName(var, name) {\
  3164. static PY_UINT64_T __pyx_dict_version = 0;\
  3165. static PyObject *__pyx_dict_cached_value = NULL;\
  3166. (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\
  3167. (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\
  3168. __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
  3169. }
  3170. #define __Pyx_GetModuleGlobalNameUncached(var, name) {\
  3171. PY_UINT64_T __pyx_dict_version;\
  3172. PyObject *__pyx_dict_cached_value;\
  3173. (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
  3174. }
  3175. static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value);
  3176. #else
  3177. #define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name)
  3178. #define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name)
  3179. static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name);
  3180. #endif
  3181. /* PyFunctionFastCall.proto */
  3182. #if CYTHON_FAST_PYCALL
  3183. #define __Pyx_PyFunction_FastCall(func, args, nargs)\
  3184. __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
  3185. #if 1 || PY_VERSION_HEX < 0x030600B1
  3186. static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, int nargs, PyObject *kwargs);
  3187. #else
  3188. #define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs)
  3189. #endif
  3190. #define __Pyx_BUILD_ASSERT_EXPR(cond)\
  3191. (sizeof(char [1 - 2*!(cond)]) - 1)
  3192. #ifndef Py_MEMBER_SIZE
  3193. #define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member)
  3194. #endif
  3195. static size_t __pyx_pyframe_localsplus_offset = 0;
  3196. #include "frameobject.h"
  3197. #define __Pxy_PyFrame_Initialize_Offsets()\
  3198. ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\
  3199. (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus)))
  3200. #define __Pyx_PyFrame_GetLocalsplus(frame)\
  3201. (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset))
  3202. #endif
  3203. /* PyCFunctionFastCall.proto */
  3204. #if CYTHON_FAST_PYCCALL
  3205. static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs);
  3206. #else
  3207. #define __Pyx_PyCFunction_FastCall(func, args, nargs) (assert(0), NULL)
  3208. #endif
  3209. /* PyObjectCall.proto */
  3210. #if CYTHON_COMPILING_IN_CPYTHON
  3211. static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
  3212. #else
  3213. #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
  3214. #endif
  3215. /* PyObjectCallMethO.proto */
  3216. #if CYTHON_COMPILING_IN_CPYTHON
  3217. static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
  3218. #endif
  3219. /* PyObjectCallNoArg.proto */
  3220. #if CYTHON_COMPILING_IN_CPYTHON
  3221. static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
  3222. #else
  3223. #define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL)
  3224. #endif
  3225. /* PyObjectCallOneArg.proto */
  3226. static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
  3227. /* PyIntBinop.proto */
  3228. #if !CYTHON_COMPILING_IN_PYPY
  3229. static PyObject* __Pyx_PyInt_AndObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
  3230. #else
  3231. #define __Pyx_PyInt_AndObjC(op1, op2, intval, inplace, zerodivision_check)\
  3232. (inplace ? PyNumber_InPlaceAnd(op1, op2) : PyNumber_And(op1, op2))
  3233. #endif
  3234. /* PyObjectCall2Args.proto */
  3235. static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2);
  3236. /* PyIntBinop.proto */
  3237. #if !CYTHON_COMPILING_IN_PYPY
  3238. static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
  3239. #else
  3240. #define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace, zerodivision_check)\
  3241. (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
  3242. #endif
  3243. /* PyObjectSetAttrStr.proto */
  3244. #if CYTHON_USE_TYPE_SLOTS
  3245. #define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o, n, NULL)
  3246. static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value);
  3247. #else
  3248. #define __Pyx_PyObject_DelAttrStr(o,n) PyObject_DelAttr(o,n)
  3249. #define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v)
  3250. #endif
  3251. /* RaiseArgTupleInvalid.proto */
  3252. static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
  3253. Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
  3254. /* KeywordStringCheck.proto */
  3255. static int __Pyx_CheckKeywordStrings(PyObject *kwdict, const char* function_name, int kw_allowed);
  3256. /* PyThreadStateGet.proto */
  3257. #if CYTHON_FAST_THREAD_STATE
  3258. #define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate;
  3259. #define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current;
  3260. #define __Pyx_PyErr_Occurred() __pyx_tstate->curexc_type
  3261. #else
  3262. #define __Pyx_PyThreadState_declare
  3263. #define __Pyx_PyThreadState_assign
  3264. #define __Pyx_PyErr_Occurred() PyErr_Occurred()
  3265. #endif
  3266. /* PyErrFetchRestore.proto */
  3267. #if CYTHON_FAST_THREAD_STATE
  3268. #define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
  3269. #define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
  3270. #define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
  3271. #define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
  3272. #define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
  3273. static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
  3274. static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
  3275. #if CYTHON_COMPILING_IN_CPYTHON
  3276. #define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
  3277. #else
  3278. #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
  3279. #endif
  3280. #else
  3281. #define __Pyx_PyErr_Clear() PyErr_Clear()
  3282. #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
  3283. #define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb)
  3284. #define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb)
  3285. #define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb)
  3286. #define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb)
  3287. #define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb)
  3288. #define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb)
  3289. #endif
  3290. /* RaiseException.proto */
  3291. static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
  3292. /* ExtTypeTest.proto */
  3293. static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type);
  3294. /* GetAttr.proto */
  3295. static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *);
  3296. /* HasAttr.proto */
  3297. static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *);
  3298. /* WriteUnraisableException.proto */
  3299. static void __Pyx_WriteUnraisable(const char *name, int clineno,
  3300. int lineno, const char *filename,
  3301. int full_traceback, int nogil);
  3302. /* RaiseTooManyValuesToUnpack.proto */
  3303. static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);
  3304. /* RaiseNeedMoreValuesToUnpack.proto */
  3305. static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
  3306. /* IterFinish.proto */
  3307. static CYTHON_INLINE int __Pyx_IterFinish(void);
  3308. /* UnpackItemEndCheck.proto */
  3309. static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected);
  3310. /* GetTopmostException.proto */
  3311. #if CYTHON_USE_EXC_INFO_STACK
  3312. static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
  3313. #endif
  3314. /* SaveResetException.proto */
  3315. #if CYTHON_FAST_THREAD_STATE
  3316. #define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
  3317. static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
  3318. #define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
  3319. static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
  3320. #else
  3321. #define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb)
  3322. #define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb)
  3323. #endif
  3324. /* PyErrExceptionMatches.proto */
  3325. #if CYTHON_FAST_THREAD_STATE
  3326. #define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
  3327. static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
  3328. #else
  3329. #define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err)
  3330. #endif
  3331. /* GetException.proto */
  3332. #if CYTHON_FAST_THREAD_STATE
  3333. #define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb)
  3334. static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
  3335. #else
  3336. static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
  3337. #endif
  3338. /* SwapException.proto */
  3339. #if CYTHON_FAST_THREAD_STATE
  3340. #define __Pyx_ExceptionSwap(type, value, tb) __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb)
  3341. static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
  3342. #else
  3343. static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
  3344. #endif
  3345. /* RaiseDoubleKeywords.proto */
  3346. static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);
  3347. /* ParseKeywords.proto */
  3348. static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\
  3349. PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\
  3350. const char* function_name);
  3351. /* FastTypeChecks.proto */
  3352. #if CYTHON_COMPILING_IN_CPYTHON
  3353. #define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
  3354. static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
  3355. static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
  3356. static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
  3357. #else
  3358. #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
  3359. #define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
  3360. #define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
  3361. #endif
  3362. #define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
  3363. /* pyfrozenset_new.proto */
  3364. static CYTHON_INLINE PyObject* __Pyx_PyFrozenSet_New(PyObject* it);
  3365. /* py_set_discard.proto */
  3366. static CYTHON_INLINE int __Pyx_PySet_Discard(PyObject *set, PyObject *key);
  3367. /* set_iter.proto */
  3368. static CYTHON_INLINE PyObject* __Pyx_set_iterator(PyObject* iterable, int is_set,
  3369. Py_ssize_t* p_orig_length, int* p_source_is_set);
  3370. static CYTHON_INLINE int __Pyx_set_iter_next(
  3371. PyObject* iter_obj, Py_ssize_t orig_length,
  3372. Py_ssize_t* ppos, PyObject **value,
  3373. int source_is_set);
  3374. /* DictGetItem.proto */
  3375. #if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
  3376. static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key);
  3377. #define __Pyx_PyObject_Dict_GetItem(obj, name)\
  3378. (likely(PyDict_CheckExact(obj)) ?\
  3379. __Pyx_PyDict_GetItem(obj, name) : PyObject_GetItem(obj, name))
  3380. #else
  3381. #define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key)
  3382. #define __Pyx_PyObject_Dict_GetItem(obj, name) PyObject_GetItem(obj, name)
  3383. #endif
  3384. /* PyObjectGetMethod.proto */
  3385. static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method);
  3386. /* PyObjectCallMethod0.proto */
  3387. static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name);
  3388. /* RaiseNoneIterError.proto */
  3389. static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void);
  3390. /* UnpackTupleError.proto */
  3391. static void __Pyx_UnpackTupleError(PyObject *, Py_ssize_t index);
  3392. /* UnpackTuple2.proto */
  3393. #define __Pyx_unpack_tuple2(tuple, value1, value2, is_tuple, has_known_size, decref_tuple)\
  3394. (likely(is_tuple || PyTuple_Check(tuple)) ?\
  3395. (likely(has_known_size || PyTuple_GET_SIZE(tuple) == 2) ?\
  3396. __Pyx_unpack_tuple2_exact(tuple, value1, value2, decref_tuple) :\
  3397. (__Pyx_UnpackTupleError(tuple, 2), -1)) :\
  3398. __Pyx_unpack_tuple2_generic(tuple, value1, value2, has_known_size, decref_tuple))
  3399. static CYTHON_INLINE int __Pyx_unpack_tuple2_exact(
  3400. PyObject* tuple, PyObject** value1, PyObject** value2, int decref_tuple);
  3401. static int __Pyx_unpack_tuple2_generic(
  3402. PyObject* tuple, PyObject** value1, PyObject** value2, int has_known_size, int decref_tuple);
  3403. /* dict_iter.proto */
  3404. static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* dict, int is_dict, PyObject* method_name,
  3405. Py_ssize_t* p_orig_length, int* p_is_dict);
  3406. static CYTHON_INLINE int __Pyx_dict_iter_next(PyObject* dict_or_iter, Py_ssize_t orig_length, Py_ssize_t* ppos,
  3407. PyObject** pkey, PyObject** pvalue, PyObject** pitem, int is_dict);
  3408. /* py_dict_clear.proto */
  3409. #define __Pyx_PyDict_Clear(d) (PyDict_Clear(d), 0)
  3410. /* PyObjectFormatSimple.proto */
  3411. #if CYTHON_COMPILING_IN_PYPY
  3412. #define __Pyx_PyObject_FormatSimple(s, f) (\
  3413. likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\
  3414. PyObject_Format(s, f))
  3415. #elif PY_MAJOR_VERSION < 3
  3416. #define __Pyx_PyObject_FormatSimple(s, f) (\
  3417. likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\
  3418. likely(PyString_CheckExact(s)) ? PyUnicode_FromEncodedObject(s, NULL, "strict") :\
  3419. PyObject_Format(s, f))
  3420. #elif CYTHON_USE_TYPE_SLOTS
  3421. #define __Pyx_PyObject_FormatSimple(s, f) (\
  3422. likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\
  3423. likely(PyLong_CheckExact(s)) ? PyLong_Type.tp_str(s) :\
  3424. likely(PyFloat_CheckExact(s)) ? PyFloat_Type.tp_str(s) :\
  3425. PyObject_Format(s, f))
  3426. #else
  3427. #define __Pyx_PyObject_FormatSimple(s, f) (\
  3428. likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\
  3429. PyObject_Format(s, f))
  3430. #endif
  3431. /* ListAppend.proto */
  3432. #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
  3433. static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
  3434. PyListObject* L = (PyListObject*) list;
  3435. Py_ssize_t len = Py_SIZE(list);
  3436. if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) {
  3437. Py_INCREF(x);
  3438. PyList_SET_ITEM(list, len, x);
  3439. Py_SIZE(list) = len+1;
  3440. return 0;
  3441. }
  3442. return PyList_Append(list, x);
  3443. }
  3444. #else
  3445. #define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
  3446. #endif
  3447. /* PyObjectCallMethod1.proto */
  3448. static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg);
  3449. /* append.proto */
  3450. static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x);
  3451. /* GetItemInt.proto */
  3452. #define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
  3453. (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
  3454. __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\
  3455. (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\
  3456. __Pyx_GetItemInt_Generic(o, to_py_func(i))))
  3457. #define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
  3458. (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
  3459. __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
  3460. (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
  3461. static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
  3462. int wraparound, int boundscheck);
  3463. #define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
  3464. (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
  3465. __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
  3466. (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
  3467. static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
  3468. int wraparound, int boundscheck);
  3469. static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
  3470. static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
  3471. int is_list, int wraparound, int boundscheck);
  3472. /* ObjectGetItem.proto */
  3473. #if CYTHON_USE_TYPE_SLOTS
  3474. static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key);
  3475. #else
  3476. #define __Pyx_PyObject_GetItem(obj, key) PyObject_GetItem(obj, key)
  3477. #endif
  3478. /* py_dict_pop.proto */
  3479. static CYTHON_INLINE PyObject *__Pyx_PyDict_Pop(PyObject *d, PyObject *key, PyObject *default_value);
  3480. /* UnpackUnboundCMethod.proto */
  3481. typedef struct {
  3482. PyObject *type;
  3483. PyObject **method_name;
  3484. PyCFunction func;
  3485. PyObject *method;
  3486. int flag;
  3487. } __Pyx_CachedCFunction;
  3488. /* CallUnboundCMethod2.proto */
  3489. static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2);
  3490. #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030600B1
  3491. static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2);
  3492. #else
  3493. #define __Pyx_CallUnboundCMethod2(cfunc, self, arg1, arg2) __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2)
  3494. #endif
  3495. /* CallUnboundCMethod1.proto */
  3496. static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg);
  3497. #if CYTHON_COMPILING_IN_CPYTHON
  3498. static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg);
  3499. #else
  3500. #define __Pyx_CallUnboundCMethod1(cfunc, self, arg) __Pyx__CallUnboundCMethod1(cfunc, self, arg)
  3501. #endif
  3502. /* None.proto */
  3503. static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname);
  3504. /* FetchCommonType.proto */
  3505. static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);
  3506. /* CythonFunction.proto */
  3507. #define __Pyx_CyFunction_USED 1
  3508. #define __Pyx_CYFUNCTION_STATICMETHOD 0x01
  3509. #define __Pyx_CYFUNCTION_CLASSMETHOD 0x02
  3510. #define __Pyx_CYFUNCTION_CCLASS 0x04
  3511. #define __Pyx_CyFunction_GetClosure(f)\
  3512. (((__pyx_CyFunctionObject *) (f))->func_closure)
  3513. #define __Pyx_CyFunction_GetClassObj(f)\
  3514. (((__pyx_CyFunctionObject *) (f))->func_classobj)
  3515. #define __Pyx_CyFunction_Defaults(type, f)\
  3516. ((type *)(((__pyx_CyFunctionObject *) (f))->defaults))
  3517. #define __Pyx_CyFunction_SetDefaultsGetter(f, g)\
  3518. ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g)
  3519. typedef struct {
  3520. PyCFunctionObject func;
  3521. #if PY_VERSION_HEX < 0x030500A0
  3522. PyObject *func_weakreflist;
  3523. #endif
  3524. PyObject *func_dict;
  3525. PyObject *func_name;
  3526. PyObject *func_qualname;
  3527. PyObject *func_doc;
  3528. PyObject *func_globals;
  3529. PyObject *func_code;
  3530. PyObject *func_closure;
  3531. PyObject *func_classobj;
  3532. void *defaults;
  3533. int defaults_pyobjects;
  3534. int flags;
  3535. PyObject *defaults_tuple;
  3536. PyObject *defaults_kwdict;
  3537. PyObject *(*defaults_getter)(PyObject *);
  3538. PyObject *func_annotations;
  3539. } __pyx_CyFunctionObject;
  3540. static PyTypeObject *__pyx_CyFunctionType = 0;
  3541. #define __Pyx_CyFunction_Check(obj) (__Pyx_TypeCheck(obj, __pyx_CyFunctionType))
  3542. #define __Pyx_CyFunction_NewEx(ml, flags, qualname, self, module, globals, code)\
  3543. __Pyx_CyFunction_New(__pyx_CyFunctionType, ml, flags, qualname, self, module, globals, code)
  3544. static PyObject *__Pyx_CyFunction_New(PyTypeObject *, PyMethodDef *ml,
  3545. int flags, PyObject* qualname,
  3546. PyObject *self,
  3547. PyObject *module, PyObject *globals,
  3548. PyObject* code);
  3549. static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m,
  3550. size_t size,
  3551. int pyobjects);
  3552. static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m,
  3553. PyObject *tuple);
  3554. static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m,
  3555. PyObject *dict);
  3556. static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m,
  3557. PyObject *dict);
  3558. static int __pyx_CyFunction_init(void);
  3559. /* PyObjectFormatAndDecref.proto */
  3560. static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatSimpleAndDecref(PyObject* s, PyObject* f);
  3561. static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatAndDecref(PyObject* s, PyObject* f);
  3562. /* JoinPyUnicode.proto */
  3563. static PyObject* __Pyx_PyUnicode_Join(PyObject* value_tuple, Py_ssize_t value_count, Py_ssize_t result_ulength,
  3564. Py_UCS4 max_char);
  3565. /* SliceObject.proto */
  3566. static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(
  3567. PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop,
  3568. PyObject** py_start, PyObject** py_stop, PyObject** py_slice,
  3569. int has_cstart, int has_cstop, int wraparound);
  3570. /* PyIntCompare.proto */
  3571. static CYTHON_INLINE PyObject* __Pyx_PyInt_NeObjC(PyObject *op1, PyObject *op2, long intval, long inplace);
  3572. /* None.proto */
  3573. static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname);
  3574. /* CallableCheck.proto */
  3575. #if CYTHON_USE_TYPE_SLOTS && PY_MAJOR_VERSION >= 3
  3576. #define __Pyx_PyCallable_Check(obj) ((obj)->ob_type->tp_call != NULL)
  3577. #else
  3578. #define __Pyx_PyCallable_Check(obj) PyCallable_Check(obj)
  3579. #endif
  3580. /* CoroutineBase.proto */
  3581. typedef PyObject *(*__pyx_coroutine_body_t)(PyObject *, PyThreadState *, PyObject *);
  3582. #if CYTHON_USE_EXC_INFO_STACK
  3583. #define __Pyx_ExcInfoStruct _PyErr_StackItem
  3584. #else
  3585. typedef struct {
  3586. PyObject *exc_type;
  3587. PyObject *exc_value;
  3588. PyObject *exc_traceback;
  3589. } __Pyx_ExcInfoStruct;
  3590. #endif
  3591. typedef struct {
  3592. PyObject_HEAD
  3593. __pyx_coroutine_body_t body;
  3594. PyObject *closure;
  3595. __Pyx_ExcInfoStruct gi_exc_state;
  3596. PyObject *gi_weakreflist;
  3597. PyObject *classobj;
  3598. PyObject *yieldfrom;
  3599. PyObject *gi_name;
  3600. PyObject *gi_qualname;
  3601. PyObject *gi_modulename;
  3602. PyObject *gi_code;
  3603. int resume_label;
  3604. char is_running;
  3605. } __pyx_CoroutineObject;
  3606. static __pyx_CoroutineObject *__Pyx__Coroutine_New(
  3607. PyTypeObject *type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
  3608. PyObject *name, PyObject *qualname, PyObject *module_name);
  3609. static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit(
  3610. __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
  3611. PyObject *name, PyObject *qualname, PyObject *module_name);
  3612. static CYTHON_INLINE void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *self);
  3613. static int __Pyx_Coroutine_clear(PyObject *self);
  3614. static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value);
  3615. static PyObject *__Pyx_Coroutine_Close(PyObject *self);
  3616. static PyObject *__Pyx_Coroutine_Throw(PyObject *gen, PyObject *args);
  3617. #if CYTHON_USE_EXC_INFO_STACK
  3618. #define __Pyx_Coroutine_SwapException(self)
  3619. #define __Pyx_Coroutine_ResetAndClearException(self) __Pyx_Coroutine_ExceptionClear(&(self)->gi_exc_state)
  3620. #else
  3621. #define __Pyx_Coroutine_SwapException(self) {\
  3622. __Pyx_ExceptionSwap(&(self)->gi_exc_state.exc_type, &(self)->gi_exc_state.exc_value, &(self)->gi_exc_state.exc_traceback);\
  3623. __Pyx_Coroutine_ResetFrameBackpointer(&(self)->gi_exc_state);\
  3624. }
  3625. #define __Pyx_Coroutine_ResetAndClearException(self) {\
  3626. __Pyx_ExceptionReset((self)->gi_exc_state.exc_type, (self)->gi_exc_state.exc_value, (self)->gi_exc_state.exc_traceback);\
  3627. (self)->gi_exc_state.exc_type = (self)->gi_exc_state.exc_value = (self)->gi_exc_state.exc_traceback = NULL;\
  3628. }
  3629. #endif
  3630. #if CYTHON_FAST_THREAD_STATE
  3631. #define __Pyx_PyGen_FetchStopIterationValue(pvalue)\
  3632. __Pyx_PyGen__FetchStopIterationValue(__pyx_tstate, pvalue)
  3633. #else
  3634. #define __Pyx_PyGen_FetchStopIterationValue(pvalue)\
  3635. __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, pvalue)
  3636. #endif
  3637. static int __Pyx_PyGen__FetchStopIterationValue(PyThreadState *tstate, PyObject **pvalue);
  3638. static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state);
  3639. /* PyObject_GenericGetAttrNoDict.proto */
  3640. #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
  3641. static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name);
  3642. #else
  3643. #define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr
  3644. #endif
  3645. /* PatchModuleWithCoroutine.proto */
  3646. static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code);
  3647. /* PatchGeneratorABC.proto */
  3648. static int __Pyx_patch_abc(void);
  3649. /* Coroutine.proto */
  3650. #define __Pyx_Coroutine_USED
  3651. static PyTypeObject *__pyx_CoroutineType = 0;
  3652. static PyTypeObject *__pyx_CoroutineAwaitType = 0;
  3653. #define __Pyx_Coroutine_CheckExact(obj) (Py_TYPE(obj) == __pyx_CoroutineType)
  3654. #define __Pyx_Coroutine_Check(obj) __Pyx_Coroutine_CheckExact(obj)
  3655. #define __Pyx_CoroutineAwait_CheckExact(obj) (Py_TYPE(obj) == __pyx_CoroutineAwaitType)
  3656. #define __Pyx_Coroutine_New(body, code, closure, name, qualname, module_name)\
  3657. __Pyx__Coroutine_New(__pyx_CoroutineType, body, code, closure, name, qualname, module_name)
  3658. static int __pyx_Coroutine_init(void);
  3659. static PyObject *__Pyx__Coroutine_await(PyObject *coroutine);
  3660. typedef struct {
  3661. PyObject_HEAD
  3662. PyObject *coroutine;
  3663. } __pyx_CoroutineAwaitObject;
  3664. static PyObject *__Pyx_CoroutineAwait_Close(__pyx_CoroutineAwaitObject *self, PyObject *arg);
  3665. static PyObject *__Pyx_CoroutineAwait_Throw(__pyx_CoroutineAwaitObject *self, PyObject *args);
  3666. /* GetAwaitIter.proto */
  3667. static CYTHON_INLINE PyObject *__Pyx_Coroutine_GetAwaitableIter(PyObject *o);
  3668. static PyObject *__Pyx__Coroutine_GetAwaitableIter(PyObject *o);
  3669. /* CoroutineYieldFrom.proto */
  3670. static CYTHON_INLINE PyObject* __Pyx_Coroutine_Yield_From(__pyx_CoroutineObject *gen, PyObject *source);
  3671. /* ReturnWithStopIteration.proto */
  3672. #define __Pyx_ReturnWithStopIteration(value)\
  3673. if (value == Py_None) PyErr_SetNone(PyExc_StopIteration); else __Pyx__ReturnWithStopIteration(value)
  3674. static void __Pyx__ReturnWithStopIteration(PyObject* value);
  3675. /* BytesEquals.proto */
  3676. static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals);
  3677. /* UnicodeEquals.proto */
  3678. static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals);
  3679. /* ListCompAppend.proto */
  3680. #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
  3681. static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) {
  3682. PyListObject* L = (PyListObject*) list;
  3683. Py_ssize_t len = Py_SIZE(list);
  3684. if (likely(L->allocated > len)) {
  3685. Py_INCREF(x);
  3686. PyList_SET_ITEM(list, len, x);
  3687. Py_SIZE(list) = len+1;
  3688. return 0;
  3689. }
  3690. return PyList_Append(list, x);
  3691. }
  3692. #else
  3693. #define __Pyx_ListComp_Append(L,x) PyList_Append(L,x)
  3694. #endif
  3695. /* CallUnboundCMethod0.proto */
  3696. static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self);
  3697. #if CYTHON_COMPILING_IN_CPYTHON
  3698. #define __Pyx_CallUnboundCMethod0(cfunc, self)\
  3699. (likely((cfunc)->func) ?\
  3700. (likely((cfunc)->flag == METH_NOARGS) ? (*((cfunc)->func))(self, NULL) :\
  3701. (PY_VERSION_HEX >= 0x030600B1 && likely((cfunc)->flag == METH_FASTCALL) ?\
  3702. (PY_VERSION_HEX >= 0x030700A0 ?\
  3703. (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)(cfunc)->func)(self, &__pyx_empty_tuple, 0) :\
  3704. (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)(cfunc)->func)(self, &__pyx_empty_tuple, 0, NULL)) :\
  3705. (PY_VERSION_HEX >= 0x030700A0 && (cfunc)->flag == (METH_FASTCALL | METH_KEYWORDS) ?\
  3706. (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)(cfunc)->func)(self, &__pyx_empty_tuple, 0, NULL) :\
  3707. (likely((cfunc)->flag == (METH_VARARGS | METH_KEYWORDS)) ? ((*(PyCFunctionWithKeywords)(void*)(PyCFunction)(cfunc)->func)(self, __pyx_empty_tuple, NULL)) :\
  3708. ((cfunc)->flag == METH_VARARGS ? (*((cfunc)->func))(self, __pyx_empty_tuple) :\
  3709. __Pyx__CallUnboundCMethod0(cfunc, self)))))) :\
  3710. __Pyx__CallUnboundCMethod0(cfunc, self))
  3711. #else
  3712. #define __Pyx_CallUnboundCMethod0(cfunc, self) __Pyx__CallUnboundCMethod0(cfunc, self)
  3713. #endif
  3714. /* SetItemInt.proto */
  3715. #define __Pyx_SetItemInt(o, i, v, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
  3716. (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
  3717. __Pyx_SetItemInt_Fast(o, (Py_ssize_t)i, v, is_list, wraparound, boundscheck) :\
  3718. (is_list ? (PyErr_SetString(PyExc_IndexError, "list assignment index out of range"), -1) :\
  3719. __Pyx_SetItemInt_Generic(o, to_py_func(i), v)))
  3720. static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v);
  3721. static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v,
  3722. int is_list, int wraparound, int boundscheck);
  3723. /* MergeKeywords.proto */
  3724. static int __Pyx_MergeKeywords(PyObject *kwdict, PyObject *source_mapping);
  3725. /* GetAttr3.proto */
  3726. static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *);
  3727. /* ArgTypeTest.proto */
  3728. #define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\
  3729. ((likely((Py_TYPE(obj) == type) | (none_allowed && (obj == Py_None)))) ? 1 :\
  3730. __Pyx__ArgTypeTest(obj, type, name, exact))
  3731. static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact);
  3732. /* py_set_remove.proto */
  3733. static CYTHON_INLINE int __Pyx_PySet_Remove(PyObject *set, PyObject *key);
  3734. /* PyIntCompare.proto */
  3735. static CYTHON_INLINE PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, long intval, long inplace);
  3736. /* RaiseKeywordRequired.proto */
  3737. static void __Pyx_RaiseKeywordRequired(const char* func_name, PyObject* kw_name);
  3738. /* PySequenceContains.proto */
  3739. static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) {
  3740. int result = PySequence_Contains(seq, item);
  3741. return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
  3742. }
  3743. /* PyDictContains.proto */
  3744. static CYTHON_INLINE int __Pyx_PyDict_ContainsTF(PyObject* item, PyObject* dict, int eq) {
  3745. int result = PyDict_Contains(dict, item);
  3746. return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
  3747. }
  3748. /* BuildPyUnicode.proto */
  3749. static PyObject* __Pyx_PyUnicode_BuildFromAscii(Py_ssize_t ulength, char* chars, int clength,
  3750. int prepend_sign, char padding_char);
  3751. /* CIntToPyUnicode.proto */
  3752. static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_Py_ssize_t(Py_ssize_t value, Py_ssize_t width, char padding_char, char format_char);
  3753. /* PyObjectLookupSpecial.proto */
  3754. #if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
  3755. static CYTHON_INLINE PyObject* __Pyx_PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name) {
  3756. PyObject *res;
  3757. PyTypeObject *tp = Py_TYPE(obj);
  3758. #if PY_MAJOR_VERSION < 3
  3759. if (unlikely(PyInstance_Check(obj)))
  3760. return __Pyx_PyObject_GetAttrStr(obj, attr_name);
  3761. #endif
  3762. res = _PyType_Lookup(tp, attr_name);
  3763. if (likely(res)) {
  3764. descrgetfunc f = Py_TYPE(res)->tp_descr_get;
  3765. if (!f) {
  3766. Py_INCREF(res);
  3767. } else {
  3768. res = f(res, obj, (PyObject *)tp);
  3769. }
  3770. } else {
  3771. PyErr_SetObject(PyExc_AttributeError, attr_name);
  3772. }
  3773. return res;
  3774. }
  3775. #else
  3776. #define __Pyx_PyObject_LookupSpecial(o,n) __Pyx_PyObject_GetAttrStr(o,n)
  3777. #endif
  3778. /* CIntToPyUnicode.proto */
  3779. static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_int(int value, Py_ssize_t width, char padding_char, char format_char);
  3780. /* decode_c_bytes.proto */
  3781. static CYTHON_INLINE PyObject* __Pyx_decode_c_bytes(
  3782. const char* cstring, Py_ssize_t length, Py_ssize_t start, Py_ssize_t stop,
  3783. const char* encoding, const char* errors,
  3784. PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors));
  3785. /* decode_bytes.proto */
  3786. static CYTHON_INLINE PyObject* __Pyx_decode_bytes(
  3787. PyObject* string, Py_ssize_t start, Py_ssize_t stop,
  3788. const char* encoding, const char* errors,
  3789. PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) {
  3790. return __Pyx_decode_c_bytes(
  3791. PyBytes_AS_STRING(string), PyBytes_GET_SIZE(string),
  3792. start, stop, encoding, errors, decode_func);
  3793. }
  3794. /* DelItemInt.proto */
  3795. #define __Pyx_DelItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
  3796. (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
  3797. __Pyx_DelItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound) :\
  3798. (is_list ? (PyErr_SetString(PyExc_IndexError, "list assignment index out of range"), -1) :\
  3799. __Pyx_DelItem_Generic(o, to_py_func(i))))
  3800. static int __Pyx_DelItem_Generic(PyObject *o, PyObject *j);
  3801. static CYTHON_INLINE int __Pyx_DelItemInt_Fast(PyObject *o, Py_ssize_t i,
  3802. int is_list, int wraparound);
  3803. /* StringJoin.proto */
  3804. #if PY_MAJOR_VERSION < 3
  3805. #define __Pyx_PyString_Join __Pyx_PyBytes_Join
  3806. #define __Pyx_PyBaseString_Join(s, v) (PyUnicode_CheckExact(s) ? PyUnicode_Join(s, v) : __Pyx_PyBytes_Join(s, v))
  3807. #else
  3808. #define __Pyx_PyString_Join PyUnicode_Join
  3809. #define __Pyx_PyBaseString_Join PyUnicode_Join
  3810. #endif
  3811. #if CYTHON_COMPILING_IN_CPYTHON
  3812. #if PY_MAJOR_VERSION < 3
  3813. #define __Pyx_PyBytes_Join _PyString_Join
  3814. #else
  3815. #define __Pyx_PyBytes_Join _PyBytes_Join
  3816. #endif
  3817. #else
  3818. static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values);
  3819. #endif
  3820. /* Import.proto */
  3821. static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);
  3822. /* ImportFrom.proto */
  3823. static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);
  3824. /* None.proto */
  3825. static CYTHON_INLINE long __Pyx_div_long(long, long);
  3826. /* PyObject_GenericGetAttr.proto */
  3827. #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
  3828. static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name);
  3829. #else
  3830. #define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr
  3831. #endif
  3832. /* SetVTable.proto */
  3833. static int __Pyx_SetVtable(PyObject *dict, void *vtable);
  3834. /* SetupReduce.proto */
  3835. static int __Pyx_setup_reduce(PyObject* type_obj);
  3836. /* TypeImport.proto */
  3837. #ifndef __PYX_HAVE_RT_ImportType_proto
  3838. #define __PYX_HAVE_RT_ImportType_proto
  3839. enum __Pyx_ImportType_CheckSize {
  3840. __Pyx_ImportType_CheckSize_Error = 0,
  3841. __Pyx_ImportType_CheckSize_Warn = 1,
  3842. __Pyx_ImportType_CheckSize_Ignore = 2
  3843. };
  3844. static PyTypeObject *__Pyx_ImportType(PyObject* module, const char *module_name, const char *class_name, size_t size, enum __Pyx_ImportType_CheckSize check_size);
  3845. #endif
  3846. /* PatchInspect.proto */
  3847. static PyObject* __Pyx_patch_inspect(PyObject* module);
  3848. /* PatchAsyncIO.proto */
  3849. static PyObject* __Pyx_patch_asyncio(PyObject* module);
  3850. /* CalculateMetaclass.proto */
  3851. static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases);
  3852. /* SetNameInClass.proto */
  3853. #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1
  3854. #define __Pyx_SetNameInClass(ns, name, value)\
  3855. (likely(PyDict_CheckExact(ns)) ? _PyDict_SetItem_KnownHash(ns, name, value, ((PyASCIIObject *) name)->hash) : PyObject_SetItem(ns, name, value))
  3856. #elif CYTHON_COMPILING_IN_CPYTHON
  3857. #define __Pyx_SetNameInClass(ns, name, value)\
  3858. (likely(PyDict_CheckExact(ns)) ? PyDict_SetItem(ns, name, value) : PyObject_SetItem(ns, name, value))
  3859. #else
  3860. #define __Pyx_SetNameInClass(ns, name, value) PyObject_SetItem(ns, name, value)
  3861. #endif
  3862. /* Py3ClassCreate.proto */
  3863. static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname,
  3864. PyObject *mkw, PyObject *modname, PyObject *doc);
  3865. static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict,
  3866. PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass);
  3867. /* CLineInTraceback.proto */
  3868. #ifdef CYTHON_CLINE_IN_TRACEBACK
  3869. #define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
  3870. #else
  3871. static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
  3872. #endif
  3873. /* CodeObjectCache.proto */
  3874. typedef struct {
  3875. PyCodeObject* code_object;
  3876. int code_line;
  3877. } __Pyx_CodeObjectCacheEntry;
  3878. struct __Pyx_CodeObjectCache {
  3879. int count;
  3880. int max_count;
  3881. __Pyx_CodeObjectCacheEntry* entries;
  3882. };
  3883. static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
  3884. static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
  3885. static PyCodeObject *__pyx_find_code_object(int code_line);
  3886. static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
  3887. /* AddTraceback.proto */
  3888. static void __Pyx_AddTraceback(const char *funcname, int c_line,
  3889. int py_line, const char *filename);
  3890. /* CIntToPy.proto */
  3891. static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);
  3892. /* CIntToPy.proto */
  3893. static CYTHON_INLINE PyObject* __Pyx_PyInt_From_uint64_t(uint64_t value);
  3894. /* CIntToPy.proto */
  3895. static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
  3896. /* CIntToPy.proto */
  3897. static CYTHON_INLINE PyObject* __Pyx_PyInt_From_uint32_t(uint32_t value);
  3898. /* CIntToPy.proto */
  3899. static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_short(unsigned short value);
  3900. /* CIntToPy.proto */
  3901. static CYTHON_INLINE PyObject* __Pyx_PyInt_From_volatile__int(volatile int value);
  3902. /* CIntToPy.proto */
  3903. static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int64_t(int64_t value);
  3904. /* CIntToPy.proto */
  3905. static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_long(unsigned long value);
  3906. /* CIntToPy.proto */
  3907. static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum____pyx_t_6uvloop_4loop_SSLProtocolState(enum __pyx_t_6uvloop_4loop_SSLProtocolState value);
  3908. /* CIntFromPy.proto */
  3909. static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
  3910. /* CIntFromPy.proto */
  3911. static CYTHON_INLINE int64_t __Pyx_PyInt_As_int64_t(PyObject *);
  3912. /* CIntFromPy.proto */
  3913. static CYTHON_INLINE uint64_t __Pyx_PyInt_As_uint64_t(PyObject *);
  3914. /* CIntFromPy.proto */
  3915. static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
  3916. /* CIntFromPy.proto */
  3917. static CYTHON_INLINE unsigned long __Pyx_PyInt_As_unsigned_long(PyObject *);
  3918. /* CIntFromPy.proto */
  3919. static CYTHON_INLINE unsigned int __Pyx_PyInt_As_unsigned_int(PyObject *);
  3920. /* CIntFromPy.proto */
  3921. static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *);
  3922. /* IterableCoroutine.proto */
  3923. #define __Pyx_IterableCoroutine_USED
  3924. static PyTypeObject *__pyx_IterableCoroutineType = 0;
  3925. #undef __Pyx_Coroutine_Check
  3926. #define __Pyx_Coroutine_Check(obj) (__Pyx_Coroutine_CheckExact(obj) || (Py_TYPE(obj) == __pyx_IterableCoroutineType))
  3927. #define __Pyx_IterableCoroutine_New(body, code, closure, name, qualname, module_name)\
  3928. __Pyx__Coroutine_New(__pyx_IterableCoroutineType, body, code, closure, name, qualname, module_name)
  3929. static int __pyx_IterableCoroutine_init(void);
  3930. /* Generator.proto */
  3931. #define __Pyx_Generator_USED
  3932. static PyTypeObject *__pyx_GeneratorType = 0;
  3933. #define __Pyx_Generator_CheckExact(obj) (Py_TYPE(obj) == __pyx_GeneratorType)
  3934. #define __Pyx_Generator_New(body, code, closure, name, qualname, module_name)\
  3935. __Pyx__Coroutine_New(__pyx_GeneratorType, body, code, closure, name, qualname, module_name)
  3936. static PyObject *__Pyx_Generator_Next(PyObject *self);
  3937. static int __pyx_Generator_init(void);
  3938. /* CheckBinaryVersion.proto */
  3939. static int __Pyx_check_binary_version(void);
  3940. /* InitStrings.proto */
  3941. static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
  3942. static PyObject *__pyx_f_6uvloop_4loop_4Loop__init_debug_fields(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto*/
  3943. static PyObject *__pyx_f_6uvloop_4loop_4Loop__setup_signals(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto*/
  3944. static PyObject *__pyx_f_6uvloop_4loop_4Loop__recv_signals_start(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto*/
  3945. static PyObject *__pyx_f_6uvloop_4loop_4Loop__recv_signals_stop(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto*/
  3946. static PyObject *__pyx_f_6uvloop_4loop_4Loop__shutdown_signals(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto*/
  3947. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_4Loop__ceval_process_signals(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto*/
  3948. static PyObject *__pyx_f_6uvloop_4loop_4Loop__read_from_self(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto*/
  3949. static PyObject *__pyx_f_6uvloop_4loop_4Loop__invoke_signals(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_data); /* proto*/
  3950. static PyObject *__pyx_f_6uvloop_4loop_4Loop__handle_signal(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_sig); /* proto*/
  3951. static PyObject *__pyx_f_6uvloop_4loop_4Loop__on_wake(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto*/
  3952. static PyObject *__pyx_f_6uvloop_4loop_4Loop__on_idle(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto*/
  3953. static PyObject *__pyx_f_6uvloop_4loop_4Loop__stop(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_exc); /* proto*/
  3954. static PyObject *__pyx_f_6uvloop_4loop_4Loop___run(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, uv_run_mode __pyx_v_mode); /* proto*/
  3955. static PyObject *__pyx_f_6uvloop_4loop_4Loop__run(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, uv_run_mode __pyx_v_mode); /* proto*/
  3956. static PyObject *__pyx_f_6uvloop_4loop_4Loop__close(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto*/
  3957. static uint64_t __pyx_f_6uvloop_4loop_4Loop__time(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto*/
  3958. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_4Loop__queue_write(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_stream); /* proto*/
  3959. static PyObject *__pyx_f_6uvloop_4loop_4Loop__exec_queued_writes(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto*/
  3960. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_4Loop__call_soon(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_callback, PyObject *__pyx_v_args, PyObject *__pyx_v_context); /* proto*/
  3961. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_4Loop__call_soon_handle(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_handle); /* proto*/
  3962. static PyObject *__pyx_f_6uvloop_4loop_4Loop__call_later(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, uint64_t __pyx_v_delay, PyObject *__pyx_v_callback, PyObject *__pyx_v_args, PyObject *__pyx_v_context); /* proto*/
  3963. static void __pyx_f_6uvloop_4loop_4Loop__handle_exception(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_ex); /* proto*/
  3964. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_4Loop__check_signal(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_sig); /* proto*/
  3965. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_4Loop__check_closed(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto*/
  3966. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_4Loop__check_thread(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto*/
  3967. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_4Loop__new_future(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto*/
  3968. static PyObject *__pyx_f_6uvloop_4loop_4Loop__track_transport(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_transport); /* proto*/
  3969. static PyObject *__pyx_f_6uvloop_4loop_4Loop__track_process(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_UVProcess *__pyx_v_proc); /* proto*/
  3970. static PyObject *__pyx_f_6uvloop_4loop_4Loop__untrack_process(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_UVProcess *__pyx_v_proc); /* proto*/
  3971. static PyObject *__pyx_f_6uvloop_4loop_4Loop__fileobj_to_fd(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_fileobj); /* proto*/
  3972. static PyObject *__pyx_f_6uvloop_4loop_4Loop__ensure_fd_no_transport(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_fd); /* proto*/
  3973. static PyObject *__pyx_f_6uvloop_4loop_4Loop__add_reader(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_fileobj, struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_handle); /* proto*/
  3974. static PyObject *__pyx_f_6uvloop_4loop_4Loop__remove_reader(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_fileobj); /* proto*/
  3975. static PyObject *__pyx_f_6uvloop_4loop_4Loop__has_reader(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_fileobj); /* proto*/
  3976. static PyObject *__pyx_f_6uvloop_4loop_4Loop__add_writer(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_fileobj, struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_handle); /* proto*/
  3977. static PyObject *__pyx_f_6uvloop_4loop_4Loop__remove_writer(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_fileobj); /* proto*/
  3978. static PyObject *__pyx_f_6uvloop_4loop_4Loop__has_writer(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_fileobj); /* proto*/
  3979. static PyObject *__pyx_f_6uvloop_4loop_4Loop__getaddrinfo(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_host, PyObject *__pyx_v_port, int __pyx_v_family, int __pyx_v_type, int __pyx_v_proto, int __pyx_v_flags, int __pyx_v_unpack); /* proto*/
  3980. static PyObject *__pyx_f_6uvloop_4loop_4Loop__getnameinfo(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, struct sockaddr *__pyx_v_addr, int __pyx_v_flags); /* proto*/
  3981. static PyObject *__pyx_f_6uvloop_4loop_4Loop__sock_recv(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_fut, PyObject *__pyx_v_sock, PyObject *__pyx_v_n); /* proto*/
  3982. static PyObject *__pyx_f_6uvloop_4loop_4Loop__sock_recv_into(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_fut, PyObject *__pyx_v_sock, PyObject *__pyx_v_buf); /* proto*/
  3983. static PyObject *__pyx_f_6uvloop_4loop_4Loop__sock_sendall(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_fut, PyObject *__pyx_v_sock, PyObject *__pyx_v_data); /* proto*/
  3984. static PyObject *__pyx_f_6uvloop_4loop_4Loop__sock_accept(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_fut, PyObject *__pyx_v_sock); /* proto*/
  3985. static PyObject *__pyx_f_6uvloop_4loop_4Loop__sock_connect(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_sock, PyObject *__pyx_v_address); /* proto*/
  3986. static PyObject *__pyx_f_6uvloop_4loop_4Loop__sock_connect_cb(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_fut, PyObject *__pyx_v_sock, PyObject *__pyx_v_address); /* proto*/
  3987. static PyObject *__pyx_f_6uvloop_4loop_4Loop__sock_set_reuseport(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, int __pyx_v_fd); /* proto*/
  3988. static PyObject *__pyx_f_6uvloop_4loop_4Loop__set_coroutine_debug(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, int __pyx_v_enabled); /* proto*/
  3989. static PyObject *__pyx_f_6uvloop_4loop_4Loop__print_debug_info(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto*/
  3990. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_6Handle__set_loop(struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop); /* proto*/
  3991. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_6Handle__set_context(struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_self, PyObject *__pyx_v_context); /* proto*/
  3992. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_6Handle__run(struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_self); /* proto*/
  3993. static PyObject *__pyx_f_6uvloop_4loop_6Handle__cancel(struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_self); /* proto*/
  3994. static PyObject *__pyx_f_6uvloop_4loop_6Handle__format_handle(struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_self); /* proto*/
  3995. static PyObject *__pyx_f_6uvloop_4loop_11TimerHandle__cancel(struct __pyx_obj_6uvloop_4loop_TimerHandle *__pyx_v_self); /* proto*/
  3996. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_11TimerHandle__clear(struct __pyx_obj_6uvloop_4loop_TimerHandle *__pyx_v_self); /* proto*/
  3997. static PyObject *__pyx_f_6uvloop_4loop_11TimerHandle__run(struct __pyx_obj_6uvloop_4loop_TimerHandle *__pyx_v_self); /* proto*/
  3998. static PyObject *__pyx_f_6uvloop_4loop_12PseudoSocket__na(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_PseudoSocket *__pyx_v_self, PyObject *__pyx_v_what); /* proto*/
  3999. static PyObject *__pyx_f_6uvloop_4loop_12PseudoSocket__make_sock(struct __pyx_obj_6uvloop_4loop_PseudoSocket *__pyx_v_self); /* proto*/
  4000. static PyObject *__pyx_f_6uvloop_4loop_8LruCache_get(struct __pyx_obj_6uvloop_4loop_LruCache *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_default); /* proto*/
  4001. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8LruCache_needs_cleanup(struct __pyx_obj_6uvloop_4loop_LruCache *__pyx_v_self); /* proto*/
  4002. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8LruCache_cleanup_one(struct __pyx_obj_6uvloop_4loop_LruCache *__pyx_v_self); /* proto*/
  4003. static PyObject *__pyx_f_6uvloop_4loop_8UVHandle__free(struct __pyx_obj_6uvloop_4loop_UVHandle *__pyx_v_self); /* proto*/
  4004. static PyObject *__pyx_f_6uvloop_4loop_8UVHandle__warn_unclosed(struct __pyx_obj_6uvloop_4loop_UVHandle *__pyx_v_self); /* proto*/
  4005. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVHandle__abort_init(struct __pyx_obj_6uvloop_4loop_UVHandle *__pyx_v_self); /* proto*/
  4006. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVHandle__finish_init(struct __pyx_obj_6uvloop_4loop_UVHandle *__pyx_v_self); /* proto*/
  4007. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVHandle__start_init(struct __pyx_obj_6uvloop_4loop_UVHandle *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop); /* proto*/
  4008. static CYTHON_INLINE int __pyx_f_6uvloop_4loop_8UVHandle__is_alive(struct __pyx_obj_6uvloop_4loop_UVHandle *__pyx_v_self); /* proto*/
  4009. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVHandle__ensure_alive(struct __pyx_obj_6uvloop_4loop_UVHandle *__pyx_v_self); /* proto*/
  4010. static PyObject *__pyx_f_6uvloop_4loop_8UVHandle__fatal_error(struct __pyx_obj_6uvloop_4loop_UVHandle *__pyx_v_self, PyObject *__pyx_v_exc, PyObject *__pyx_v_throw, struct __pyx_opt_args_6uvloop_4loop_8UVHandle__fatal_error *__pyx_optional_args); /* proto*/
  4011. static PyObject *__pyx_f_6uvloop_4loop_8UVHandle__error(struct __pyx_obj_6uvloop_4loop_UVHandle *__pyx_v_self, PyObject *__pyx_v_exc, PyObject *__pyx_v_throw); /* proto*/
  4012. static PyObject *__pyx_f_6uvloop_4loop_8UVHandle__close(struct __pyx_obj_6uvloop_4loop_UVHandle *__pyx_v_self); /* proto*/
  4013. static PyObject *__pyx_f_6uvloop_4loop_14UVSocketHandle__fileno(struct __pyx_obj_6uvloop_4loop_UVSocketHandle *__pyx_v_self); /* proto*/
  4014. static PyObject *__pyx_f_6uvloop_4loop_14UVSocketHandle__new_socket(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVSocketHandle *__pyx_v_self); /* proto*/
  4015. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_14UVSocketHandle__get_socket(struct __pyx_obj_6uvloop_4loop_UVSocketHandle *__pyx_v_self); /* proto*/
  4016. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_14UVSocketHandle__attach_fileobj(struct __pyx_obj_6uvloop_4loop_UVSocketHandle *__pyx_v_self, PyObject *__pyx_v_file); /* proto*/
  4017. static PyObject *__pyx_f_6uvloop_4loop_14UVSocketHandle__close(struct __pyx_obj_6uvloop_4loop_UVSocketHandle *__pyx_v_self); /* proto*/
  4018. static PyObject *__pyx_f_6uvloop_4loop_14UVSocketHandle__open(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVSocketHandle *__pyx_v_self, CYTHON_UNUSED int __pyx_v_sockfd); /* proto*/
  4019. static PyObject *__pyx_f_6uvloop_4loop_7UVAsync__init(struct __pyx_obj_6uvloop_4loop_UVAsync *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, __pyx_t_6uvloop_4loop_method_t __pyx_v_callback, PyObject *__pyx_v_ctx); /* proto*/
  4020. static PyObject *__pyx_f_6uvloop_4loop_7UVAsync_send(struct __pyx_obj_6uvloop_4loop_UVAsync *__pyx_v_self); /* proto*/
  4021. static struct __pyx_obj_6uvloop_4loop_UVAsync *__pyx_f_6uvloop_4loop_7UVAsync_new(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, __pyx_t_6uvloop_4loop_method_t __pyx_v_callback, PyObject *__pyx_v_ctx); /* proto*/
  4022. static PyObject *__pyx_f_6uvloop_4loop_6UVIdle__init(struct __pyx_obj_6uvloop_4loop_UVIdle *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_h); /* proto*/
  4023. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_6UVIdle_stop(struct __pyx_obj_6uvloop_4loop_UVIdle *__pyx_v_self); /* proto*/
  4024. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_6UVIdle_start(struct __pyx_obj_6uvloop_4loop_UVIdle *__pyx_v_self); /* proto*/
  4025. static struct __pyx_obj_6uvloop_4loop_UVIdle *__pyx_f_6uvloop_4loop_6UVIdle_new(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_h); /* proto*/
  4026. static PyObject *__pyx_f_6uvloop_4loop_7UVCheck__init(struct __pyx_obj_6uvloop_4loop_UVCheck *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_h); /* proto*/
  4027. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_7UVCheck_stop(struct __pyx_obj_6uvloop_4loop_UVCheck *__pyx_v_self); /* proto*/
  4028. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_7UVCheck_start(struct __pyx_obj_6uvloop_4loop_UVCheck *__pyx_v_self); /* proto*/
  4029. static struct __pyx_obj_6uvloop_4loop_UVCheck *__pyx_f_6uvloop_4loop_7UVCheck_new(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_h); /* proto*/
  4030. static PyObject *__pyx_f_6uvloop_4loop_7UVTimer__init(struct __pyx_obj_6uvloop_4loop_UVTimer *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, __pyx_t_6uvloop_4loop_method_t __pyx_v_callback, PyObject *__pyx_v_ctx, uint64_t __pyx_v_timeout); /* proto*/
  4031. static PyObject *__pyx_f_6uvloop_4loop_7UVTimer_stop(struct __pyx_obj_6uvloop_4loop_UVTimer *__pyx_v_self); /* proto*/
  4032. static PyObject *__pyx_f_6uvloop_4loop_7UVTimer_start(struct __pyx_obj_6uvloop_4loop_UVTimer *__pyx_v_self); /* proto*/
  4033. static struct __pyx_obj_6uvloop_4loop_UVTimer *__pyx_f_6uvloop_4loop_7UVTimer_new(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, __pyx_t_6uvloop_4loop_method_t __pyx_v_callback, PyObject *__pyx_v_ctx, uint64_t __pyx_v_timeout); /* proto*/
  4034. static PyObject *__pyx_f_6uvloop_4loop_6UVPoll__init(struct __pyx_obj_6uvloop_4loop_UVPoll *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, int __pyx_v_fd); /* proto*/
  4035. static struct __pyx_obj_6uvloop_4loop_UVPoll *__pyx_f_6uvloop_4loop_6UVPoll_new(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, int __pyx_v_fd); /* proto*/
  4036. static int __pyx_f_6uvloop_4loop_6UVPoll_is_active(struct __pyx_obj_6uvloop_4loop_UVPoll *__pyx_v_self); /* proto*/
  4037. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_6UVPoll__poll_start(struct __pyx_obj_6uvloop_4loop_UVPoll *__pyx_v_self, int __pyx_v_flags); /* proto*/
  4038. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_6UVPoll__poll_stop(struct __pyx_obj_6uvloop_4loop_UVPoll *__pyx_v_self); /* proto*/
  4039. static PyObject *__pyx_f_6uvloop_4loop_6UVPoll_is_reading(struct __pyx_obj_6uvloop_4loop_UVPoll *__pyx_v_self); /* proto*/
  4040. static PyObject *__pyx_f_6uvloop_4loop_6UVPoll_is_writing(struct __pyx_obj_6uvloop_4loop_UVPoll *__pyx_v_self); /* proto*/
  4041. static PyObject *__pyx_f_6uvloop_4loop_6UVPoll_start_reading(struct __pyx_obj_6uvloop_4loop_UVPoll *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_callback); /* proto*/
  4042. static PyObject *__pyx_f_6uvloop_4loop_6UVPoll_start_writing(struct __pyx_obj_6uvloop_4loop_UVPoll *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_callback); /* proto*/
  4043. static PyObject *__pyx_f_6uvloop_4loop_6UVPoll_stop_reading(struct __pyx_obj_6uvloop_4loop_UVPoll *__pyx_v_self); /* proto*/
  4044. static PyObject *__pyx_f_6uvloop_4loop_6UVPoll_stop_writing(struct __pyx_obj_6uvloop_4loop_UVPoll *__pyx_v_self); /* proto*/
  4045. static PyObject *__pyx_f_6uvloop_4loop_6UVPoll_stop(struct __pyx_obj_6uvloop_4loop_UVPoll *__pyx_v_self); /* proto*/
  4046. static PyObject *__pyx_f_6uvloop_4loop_6UVPoll__close(struct __pyx_obj_6uvloop_4loop_UVPoll *__pyx_v_self); /* proto*/
  4047. static PyObject *__pyx_f_6uvloop_4loop_6UVPoll__fatal_error(struct __pyx_obj_6uvloop_4loop_UVPoll *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_exc, CYTHON_UNUSED PyObject *__pyx_v_throw, struct __pyx_opt_args_6uvloop_4loop_6UVPoll__fatal_error *__pyx_optional_args); /* proto*/
  4048. static size_t __pyx_f_6uvloop_4loop_15UVBaseTransport__get_write_buffer_size(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self); /* proto*/
  4049. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_15UVBaseTransport__schedule_call_connection_made(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self); /* proto*/
  4050. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_15UVBaseTransport__schedule_call_connection_lost(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self, PyObject *__pyx_v_exc); /* proto*/
  4051. static PyObject *__pyx_f_6uvloop_4loop_15UVBaseTransport__fatal_error(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self, PyObject *__pyx_v_exc, PyObject *__pyx_v_throw, struct __pyx_opt_args_6uvloop_4loop_15UVBaseTransport__fatal_error *__pyx_optional_args); /* proto*/
  4052. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_15UVBaseTransport__maybe_pause_protocol(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self); /* proto*/
  4053. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_15UVBaseTransport__maybe_resume_protocol(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self); /* proto*/
  4054. static PyObject *__pyx_f_6uvloop_4loop_15UVBaseTransport__wakeup_waiter(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self); /* proto*/
  4055. static PyObject *__pyx_f_6uvloop_4loop_15UVBaseTransport__call_connection_made(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self); /* proto*/
  4056. static PyObject *__pyx_f_6uvloop_4loop_15UVBaseTransport__call_connection_lost(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self, PyObject *__pyx_v_exc); /* proto*/
  4057. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_15UVBaseTransport__set_server(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_server); /* proto*/
  4058. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_15UVBaseTransport__set_waiter(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self, PyObject *__pyx_v_waiter); /* proto*/
  4059. static PyObject *__pyx_f_6uvloop_4loop_15UVBaseTransport__set_protocol(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self, PyObject *__pyx_v_protocol); /* proto*/
  4060. static PyObject *__pyx_f_6uvloop_4loop_15UVBaseTransport__clear_protocol(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self); /* proto*/
  4061. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_15UVBaseTransport__init_protocol(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self); /* proto*/
  4062. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_15UVBaseTransport__add_extra_info(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_obj); /* proto*/
  4063. static int __pyx_f_6uvloop_4loop_15UVBaseTransport__is_reading(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self); /* proto*/
  4064. static PyObject *__pyx_f_6uvloop_4loop_15UVBaseTransport__start_reading(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self); /* proto*/
  4065. static PyObject *__pyx_f_6uvloop_4loop_15UVBaseTransport__stop_reading(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self); /* proto*/
  4066. static PyObject *__pyx_f_6uvloop_4loop_19_StreamWriteContext_free_bufs(struct __pyx_obj_6uvloop_4loop__StreamWriteContext *__pyx_v_self); /* proto*/
  4067. static PyObject *__pyx_f_6uvloop_4loop_19_StreamWriteContext_close(struct __pyx_obj_6uvloop_4loop__StreamWriteContext *__pyx_v_self); /* proto*/
  4068. static PyObject *__pyx_f_6uvloop_4loop_19_StreamWriteContext_advance_uv_buf(struct __pyx_obj_6uvloop_4loop__StreamWriteContext *__pyx_v_self, size_t __pyx_v_sent); /* proto*/
  4069. static struct __pyx_obj_6uvloop_4loop__StreamWriteContext *__pyx_f_6uvloop_4loop_19_StreamWriteContext_new(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_stream, PyObject *__pyx_v_buffers); /* proto*/
  4070. static PyObject *__pyx_f_6uvloop_4loop_8UVStream__set_protocol(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self, PyObject *__pyx_v_protocol); /* proto*/
  4071. static PyObject *__pyx_f_6uvloop_4loop_8UVStream__clear_protocol(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self); /* proto*/
  4072. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVStream__shutdown(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self); /* proto*/
  4073. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVStream__accept(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_server); /* proto*/
  4074. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVStream__close_on_read_error(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self); /* proto*/
  4075. static int __pyx_f_6uvloop_4loop_8UVStream__is_reading(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self); /* proto*/
  4076. static PyObject *__pyx_f_6uvloop_4loop_8UVStream__start_reading(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self); /* proto*/
  4077. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVStream___reading_started(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self); /* proto*/
  4078. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVStream___reading_stopped(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self); /* proto*/
  4079. static PyObject *__pyx_f_6uvloop_4loop_8UVStream__stop_reading(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self); /* proto*/
  4080. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVStream__try_write(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self, PyObject *__pyx_v_data); /* proto*/
  4081. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVStream__write(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self, PyObject *__pyx_v_data); /* proto*/
  4082. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVStream__exec_write(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self); /* proto*/
  4083. static size_t __pyx_f_6uvloop_4loop_8UVStream__get_write_buffer_size(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self); /* proto*/
  4084. static PyObject *__pyx_f_6uvloop_4loop_8UVStream__close(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self); /* proto*/
  4085. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVStream__on_accept(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self); /* proto*/
  4086. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVStream__on_eof(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self); /* proto*/
  4087. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVStream__on_write(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self); /* proto*/
  4088. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVStream__init(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, PyObject *__pyx_v_protocol, struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_server, PyObject *__pyx_v_waiter); /* proto*/
  4089. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVStream__on_connect(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self, PyObject *__pyx_v_exc); /* proto*/
  4090. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_14UVStreamServer__init(struct __pyx_obj_6uvloop_4loop_UVStreamServer *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, PyObject *__pyx_v_protocol_factory, struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_server, PyObject *__pyx_v_backlog, PyObject *__pyx_v_ssl, PyObject *__pyx_v_ssl_handshake_timeout, PyObject *__pyx_v_ssl_shutdown_timeout); /* proto*/
  4091. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_14UVStreamServer_listen(struct __pyx_obj_6uvloop_4loop_UVStreamServer *__pyx_v_self); /* proto*/
  4092. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_14UVStreamServer__on_listen(struct __pyx_obj_6uvloop_4loop_UVStreamServer *__pyx_v_self); /* proto*/
  4093. static PyObject *__pyx_f_6uvloop_4loop_14UVStreamServer__fatal_error(struct __pyx_obj_6uvloop_4loop_UVStreamServer *__pyx_v_self, PyObject *__pyx_v_exc, PyObject *__pyx_v_throw, struct __pyx_opt_args_6uvloop_4loop_14UVStreamServer__fatal_error *__pyx_optional_args); /* proto*/
  4094. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_14UVStreamServer__mark_as_open(struct __pyx_obj_6uvloop_4loop_UVStreamServer *__pyx_v_self); /* proto*/
  4095. static struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_f_6uvloop_4loop_14UVStreamServer__make_new_transport(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVStreamServer *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_protocol, CYTHON_UNUSED PyObject *__pyx_v_waiter); /* proto*/
  4096. static struct __pyx_obj_6uvloop_4loop_TCPServer *__pyx_f_6uvloop_4loop_9TCPServer_new(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, PyObject *__pyx_v_protocol_factory, struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_server, unsigned int __pyx_v_flags, PyObject *__pyx_v_backlog, PyObject *__pyx_v_ssl, PyObject *__pyx_v_ssl_handshake_timeout, PyObject *__pyx_v_ssl_shutdown_timeout); /* proto*/
  4097. static PyObject *__pyx_f_6uvloop_4loop_9TCPServer__new_socket(struct __pyx_obj_6uvloop_4loop_TCPServer *__pyx_v_self); /* proto*/
  4098. static PyObject *__pyx_f_6uvloop_4loop_9TCPServer__open(struct __pyx_obj_6uvloop_4loop_TCPServer *__pyx_v_self, int __pyx_v_sockfd); /* proto*/
  4099. static PyObject *__pyx_f_6uvloop_4loop_9TCPServer_bind(struct __pyx_obj_6uvloop_4loop_TCPServer *__pyx_v_self, struct sockaddr *__pyx_v_addr, struct __pyx_opt_args_6uvloop_4loop_9TCPServer_bind *__pyx_optional_args); /* proto*/
  4100. static struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_f_6uvloop_4loop_9TCPServer__make_new_transport(struct __pyx_obj_6uvloop_4loop_TCPServer *__pyx_v_self, PyObject *__pyx_v_protocol, PyObject *__pyx_v_waiter); /* proto*/
  4101. static struct __pyx_obj_6uvloop_4loop_TCPTransport *__pyx_f_6uvloop_4loop_12TCPTransport_new(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, PyObject *__pyx_v_protocol, struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_server, PyObject *__pyx_v_waiter); /* proto*/
  4102. static PyObject *__pyx_f_6uvloop_4loop_12TCPTransport__set_nodelay(struct __pyx_obj_6uvloop_4loop_TCPTransport *__pyx_v_self); /* proto*/
  4103. static PyObject *__pyx_f_6uvloop_4loop_12TCPTransport__call_connection_made(struct __pyx_obj_6uvloop_4loop_TCPTransport *__pyx_v_self); /* proto*/
  4104. static PyObject *__pyx_f_6uvloop_4loop_12TCPTransport__new_socket(struct __pyx_obj_6uvloop_4loop_TCPTransport *__pyx_v_self); /* proto*/
  4105. static PyObject *__pyx_f_6uvloop_4loop_12TCPTransport_bind(struct __pyx_obj_6uvloop_4loop_TCPTransport *__pyx_v_self, struct sockaddr *__pyx_v_addr, struct __pyx_opt_args_6uvloop_4loop_12TCPTransport_bind *__pyx_optional_args); /* proto*/
  4106. static PyObject *__pyx_f_6uvloop_4loop_12TCPTransport__open(struct __pyx_obj_6uvloop_4loop_TCPTransport *__pyx_v_self, int __pyx_v_sockfd); /* proto*/
  4107. static PyObject *__pyx_f_6uvloop_4loop_12TCPTransport_connect(struct __pyx_obj_6uvloop_4loop_TCPTransport *__pyx_v_self, struct sockaddr *__pyx_v_addr); /* proto*/
  4108. static PyObject *__pyx_f_6uvloop_4loop_18_TCPConnectRequest_connect(struct __pyx_obj_6uvloop_4loop__TCPConnectRequest *__pyx_v_self, struct sockaddr *__pyx_v_addr); /* proto*/
  4109. static struct __pyx_obj_6uvloop_4loop_UnixServer *__pyx_f_6uvloop_4loop_10UnixServer_new(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, PyObject *__pyx_v_protocol_factory, struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_server, PyObject *__pyx_v_backlog, PyObject *__pyx_v_ssl, PyObject *__pyx_v_ssl_handshake_timeout, PyObject *__pyx_v_ssl_shutdown_timeout); /* proto*/
  4110. static PyObject *__pyx_f_6uvloop_4loop_10UnixServer__new_socket(struct __pyx_obj_6uvloop_4loop_UnixServer *__pyx_v_self); /* proto*/
  4111. static PyObject *__pyx_f_6uvloop_4loop_10UnixServer__open(struct __pyx_obj_6uvloop_4loop_UnixServer *__pyx_v_self, int __pyx_v_sockfd); /* proto*/
  4112. static PyObject *__pyx_f_6uvloop_4loop_10UnixServer_bind(struct __pyx_obj_6uvloop_4loop_UnixServer *__pyx_v_self, PyObject *__pyx_v_path); /* proto*/
  4113. static struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_f_6uvloop_4loop_10UnixServer__make_new_transport(struct __pyx_obj_6uvloop_4loop_UnixServer *__pyx_v_self, PyObject *__pyx_v_protocol, PyObject *__pyx_v_waiter); /* proto*/
  4114. static struct __pyx_obj_6uvloop_4loop_UnixTransport *__pyx_f_6uvloop_4loop_13UnixTransport_new(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, PyObject *__pyx_v_protocol, struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_server, PyObject *__pyx_v_waiter); /* proto*/
  4115. static PyObject *__pyx_f_6uvloop_4loop_13UnixTransport__new_socket(struct __pyx_obj_6uvloop_4loop_UnixTransport *__pyx_v_self); /* proto*/
  4116. static PyObject *__pyx_f_6uvloop_4loop_13UnixTransport__open(struct __pyx_obj_6uvloop_4loop_UnixTransport *__pyx_v_self, int __pyx_v_sockfd); /* proto*/
  4117. static PyObject *__pyx_f_6uvloop_4loop_13UnixTransport_connect(struct __pyx_obj_6uvloop_4loop_UnixTransport *__pyx_v_self, char *__pyx_v_addr); /* proto*/
  4118. static struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *__pyx_f_6uvloop_4loop_17ReadUnixTransport_new(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, PyObject *__pyx_v_protocol, struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_server, PyObject *__pyx_v_waiter); /* proto*/
  4119. static PyObject *__pyx_f_6uvloop_4loop_17ReadUnixTransport__new_socket(struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *__pyx_v_self); /* proto*/
  4120. static PyObject *__pyx_f_6uvloop_4loop_17ReadUnixTransport__open(struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *__pyx_v_self, int __pyx_v_sockfd); /* proto*/
  4121. static struct __pyx_obj_6uvloop_4loop_WriteUnixTransport *__pyx_f_6uvloop_4loop_18WriteUnixTransport_new(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, PyObject *__pyx_v_protocol, struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_server, PyObject *__pyx_v_waiter); /* proto*/
  4122. static PyObject *__pyx_f_6uvloop_4loop_18WriteUnixTransport__start_reading(struct __pyx_obj_6uvloop_4loop_WriteUnixTransport *__pyx_v_self); /* proto*/
  4123. static PyObject *__pyx_f_6uvloop_4loop_18WriteUnixTransport__stop_reading(struct __pyx_obj_6uvloop_4loop_WriteUnixTransport *__pyx_v_self); /* proto*/
  4124. static PyObject *__pyx_f_6uvloop_4loop_18WriteUnixTransport__close(struct __pyx_obj_6uvloop_4loop_WriteUnixTransport *__pyx_v_self); /* proto*/
  4125. static PyObject *__pyx_f_6uvloop_4loop_18WriteUnixTransport__new_socket(struct __pyx_obj_6uvloop_4loop_WriteUnixTransport *__pyx_v_self); /* proto*/
  4126. static PyObject *__pyx_f_6uvloop_4loop_18WriteUnixTransport__open(struct __pyx_obj_6uvloop_4loop_WriteUnixTransport *__pyx_v_self, int __pyx_v_sockfd); /* proto*/
  4127. static PyObject *__pyx_f_6uvloop_4loop_19_PipeConnectRequest_connect(struct __pyx_obj_6uvloop_4loop__PipeConnectRequest *__pyx_v_self, char *__pyx_v_addr); /* proto*/
  4128. static PyObject *__pyx_f_6uvloop_4loop_9UVProcess__close_process_handle(struct __pyx_obj_6uvloop_4loop_UVProcess *__pyx_v_self); /* proto*/
  4129. static PyObject *__pyx_f_6uvloop_4loop_9UVProcess__init(struct __pyx_obj_6uvloop_4loop_UVProcess *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, PyObject *__pyx_v_args, PyObject *__pyx_v_env, PyObject *__pyx_v_cwd, PyObject *__pyx_v_start_new_session, PyObject *__pyx_v__stdin, PyObject *__pyx_v__stdout, PyObject *__pyx_v__stderr, PyObject *__pyx_v_pass_fds, PyObject *__pyx_v_debug_flags, PyObject *__pyx_v_preexec_fn, PyObject *__pyx_v_restore_signals); /* proto*/
  4130. static PyObject *__pyx_f_6uvloop_4loop_9UVProcess__after_fork(struct __pyx_obj_6uvloop_4loop_UVProcess *__pyx_v_self); /* proto*/
  4131. static PyObject *__pyx_f_6uvloop_4loop_9UVProcess__close_after_spawn(struct __pyx_obj_6uvloop_4loop_UVProcess *__pyx_v_self, int __pyx_v_fd); /* proto*/
  4132. static char **__pyx_f_6uvloop_4loop_9UVProcess___to_cstring_array(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVProcess *__pyx_v_self, PyObject *__pyx_v_arr); /* proto*/
  4133. static PyObject *__pyx_f_6uvloop_4loop_9UVProcess__init_options(struct __pyx_obj_6uvloop_4loop_UVProcess *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_env, PyObject *__pyx_v_cwd, PyObject *__pyx_v_start_new_session, PyObject *__pyx_v__stdin, PyObject *__pyx_v__stdout, PyObject *__pyx_v__stderr); /* proto*/
  4134. static PyObject *__pyx_f_6uvloop_4loop_9UVProcess__init_args(struct __pyx_obj_6uvloop_4loop_UVProcess *__pyx_v_self, PyObject *__pyx_v_args); /* proto*/
  4135. static PyObject *__pyx_f_6uvloop_4loop_9UVProcess__init_env(struct __pyx_obj_6uvloop_4loop_UVProcess *__pyx_v_self, PyObject *__pyx_v_env); /* proto*/
  4136. static PyObject *__pyx_f_6uvloop_4loop_9UVProcess__init_files(struct __pyx_obj_6uvloop_4loop_UVProcess *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v__stdin, CYTHON_UNUSED PyObject *__pyx_v__stdout, CYTHON_UNUSED PyObject *__pyx_v__stderr); /* proto*/
  4137. static PyObject *__pyx_f_6uvloop_4loop_9UVProcess__kill(struct __pyx_obj_6uvloop_4loop_UVProcess *__pyx_v_self, int __pyx_v_signum); /* proto*/
  4138. static PyObject *__pyx_f_6uvloop_4loop_9UVProcess__on_exit(struct __pyx_obj_6uvloop_4loop_UVProcess *__pyx_v_self, int64_t __pyx_v_exit_status, int __pyx_v_term_signal); /* proto*/
  4139. static PyObject *__pyx_f_6uvloop_4loop_9UVProcess__close(struct __pyx_obj_6uvloop_4loop_UVProcess *__pyx_v_self); /* proto*/
  4140. static PyObject *__pyx_f_6uvloop_4loop_18UVProcessTransport__on_exit(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self, int64_t __pyx_v_exit_status, int __pyx_v_term_signal); /* proto*/
  4141. static PyObject *__pyx_f_6uvloop_4loop_18UVProcessTransport__check_proc(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self); /* proto*/
  4142. static PyObject *__pyx_f_6uvloop_4loop_18UVProcessTransport__pipe_connection_lost(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self, int __pyx_v_fd, PyObject *__pyx_v_exc); /* proto*/
  4143. static PyObject *__pyx_f_6uvloop_4loop_18UVProcessTransport__pipe_data_received(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self, int __pyx_v_fd, PyObject *__pyx_v_data); /* proto*/
  4144. static PyObject *__pyx_f_6uvloop_4loop_18UVProcessTransport__file_redirect_stdio(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self, int __pyx_v_fd); /* proto*/
  4145. static PyObject *__pyx_f_6uvloop_4loop_18UVProcessTransport__file_devnull(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self); /* proto*/
  4146. static PyObject *__pyx_f_6uvloop_4loop_18UVProcessTransport__file_outpipe(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self); /* proto*/
  4147. static PyObject *__pyx_f_6uvloop_4loop_18UVProcessTransport__file_inpipe(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self); /* proto*/
  4148. static PyObject *__pyx_f_6uvloop_4loop_18UVProcessTransport__init_files(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self, PyObject *__pyx_v__stdin, PyObject *__pyx_v__stdout, PyObject *__pyx_v__stderr); /* proto*/
  4149. static PyObject *__pyx_f_6uvloop_4loop_18UVProcessTransport__call_connection_made(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self, PyObject *__pyx_v_waiter); /* proto*/
  4150. static PyObject *__pyx_f_6uvloop_4loop_18UVProcessTransport__try_finish(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self); /* proto*/
  4151. static struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_f_6uvloop_4loop_18UVProcessTransport_new(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, PyObject *__pyx_v_protocol, PyObject *__pyx_v_args, PyObject *__pyx_v_env, PyObject *__pyx_v_cwd, PyObject *__pyx_v_start_new_session, PyObject *__pyx_v__stdin, PyObject *__pyx_v__stdout, PyObject *__pyx_v__stderr, PyObject *__pyx_v_pass_fds, PyObject *__pyx_v_waiter, PyObject *__pyx_v_debug_flags, PyObject *__pyx_v_preexec_fn, PyObject *__pyx_v_restore_signals); /* proto*/
  4152. static PyObject *__pyx_f_6uvloop_4loop_9UVRequest_on_done(struct __pyx_obj_6uvloop_4loop_UVRequest *__pyx_v_self); /* proto*/
  4153. static PyObject *__pyx_f_6uvloop_4loop_9UVRequest_cancel(struct __pyx_obj_6uvloop_4loop_UVRequest *__pyx_v_self); /* proto*/
  4154. static void __pyx_f_6uvloop_4loop_8AddrInfo_set_data(struct __pyx_obj_6uvloop_4loop_AddrInfo *__pyx_v_self, struct addrinfo *__pyx_v_data); /* proto*/
  4155. static PyObject *__pyx_f_6uvloop_4loop_8AddrInfo_unpack(struct __pyx_obj_6uvloop_4loop_AddrInfo *__pyx_v_self); /* proto*/
  4156. static int __pyx_f_6uvloop_4loop_8AddrInfo_isinstance(PyObject *__pyx_v_other); /* proto*/
  4157. static PyObject *__pyx_f_6uvloop_4loop_15NameInfoRequest_query(struct __pyx_obj_6uvloop_4loop_NameInfoRequest *__pyx_v_self, struct sockaddr *__pyx_v_addr, int __pyx_v_flags); /* proto*/
  4158. static PyObject *__pyx_f_6uvloop_4loop_11SSLProtocol__set_app_protocol(struct __pyx_obj_6uvloop_4loop_SSLProtocol *__pyx_v_self, PyObject *__pyx_v_app_protocol); /* proto*/
  4159. static PyObject *__pyx_f_6uvloop_4loop_11SSLProtocol__wakeup_waiter(struct __pyx_obj_6uvloop_4loop_SSLProtocol *__pyx_v_self, struct __pyx_opt_args_6uvloop_4loop_11SSLProtocol__wakeup_waiter *__pyx_optional_args); /* proto*/
  4160. static PyObject *__pyx_f_6uvloop_4loop_11SSLProtocol__get_extra_info(struct __pyx_obj_6uvloop_4loop_SSLProtocol *__pyx_v_self, PyObject *__pyx_v_name, struct __pyx_opt_args_6uvloop_4loop_11SSLProtocol__get_extra_info *__pyx_optional_args); /* proto*/
  4161. static PyObject *__pyx_f_6uvloop_4loop_11SSLProtocol__set_state(struct __pyx_obj_6uvloop_4loop_SSLProtocol *__pyx_v_self, enum __pyx_t_6uvloop_4loop_SSLProtocolState __pyx_v_new_state); /* proto*/
  4162. static PyObject *__pyx_f_6uvloop_4loop_11SSLProtocol__start_handshake(struct __pyx_obj_6uvloop_4loop_SSLProtocol *__pyx_v_self); /* proto*/
  4163. static PyObject *__pyx_f_6uvloop_4loop_11SSLProtocol__check_handshake_timeout(struct __pyx_obj_6uvloop_4loop_SSLProtocol *__pyx_v_self); /* proto*/
  4164. static PyObject *__pyx_f_6uvloop_4loop_11SSLProtocol__do_handshake(struct __pyx_obj_6uvloop_4loop_SSLProtocol *__pyx_v_self); /* proto*/
  4165. static PyObject *__pyx_f_6uvloop_4loop_11SSLProtocol__on_handshake_complete(struct __pyx_obj_6uvloop_4loop_SSLProtocol *__pyx_v_self, PyObject *__pyx_v_handshake_exc); /* proto*/
  4166. static PyObject *__pyx_f_6uvloop_4loop_11SSLProtocol__start_shutdown(struct __pyx_obj_6uvloop_4loop_SSLProtocol *__pyx_v_self); /* proto*/
  4167. static PyObject *__pyx_f_6uvloop_4loop_11SSLProtocol__check_shutdown_timeout(struct __pyx_obj_6uvloop_4loop_SSLProtocol *__pyx_v_self); /* proto*/
  4168. static PyObject *__pyx_f_6uvloop_4loop_11SSLProtocol__do_flush(struct __pyx_obj_6uvloop_4loop_SSLProtocol *__pyx_v_self); /* proto*/
  4169. static PyObject *__pyx_f_6uvloop_4loop_11SSLProtocol__do_shutdown(struct __pyx_obj_6uvloop_4loop_SSLProtocol *__pyx_v_self); /* proto*/
  4170. static PyObject *__pyx_f_6uvloop_4loop_11SSLProtocol__on_shutdown_complete(struct __pyx_obj_6uvloop_4loop_SSLProtocol *__pyx_v_self, PyObject *__pyx_v_shutdown_exc); /* proto*/
  4171. static PyObject *__pyx_f_6uvloop_4loop_11SSLProtocol__abort(struct __pyx_obj_6uvloop_4loop_SSLProtocol *__pyx_v_self, PyObject *__pyx_v_exc); /* proto*/
  4172. static PyObject *__pyx_f_6uvloop_4loop_11SSLProtocol__write_appdata(struct __pyx_obj_6uvloop_4loop_SSLProtocol *__pyx_v_self, PyObject *__pyx_v_list_of_data); /* proto*/
  4173. static PyObject *__pyx_f_6uvloop_4loop_11SSLProtocol__do_write(struct __pyx_obj_6uvloop_4loop_SSLProtocol *__pyx_v_self); /* proto*/
  4174. static PyObject *__pyx_f_6uvloop_4loop_11SSLProtocol__process_outgoing(struct __pyx_obj_6uvloop_4loop_SSLProtocol *__pyx_v_self); /* proto*/
  4175. static PyObject *__pyx_f_6uvloop_4loop_11SSLProtocol__do_read(struct __pyx_obj_6uvloop_4loop_SSLProtocol *__pyx_v_self); /* proto*/
  4176. static PyObject *__pyx_f_6uvloop_4loop_11SSLProtocol__do_read__buffered(struct __pyx_obj_6uvloop_4loop_SSLProtocol *__pyx_v_self); /* proto*/
  4177. static PyObject *__pyx_f_6uvloop_4loop_11SSLProtocol__do_read__copied(struct __pyx_obj_6uvloop_4loop_SSLProtocol *__pyx_v_self); /* proto*/
  4178. static PyObject *__pyx_f_6uvloop_4loop_11SSLProtocol__call_eof_received(struct __pyx_obj_6uvloop_4loop_SSLProtocol *__pyx_v_self); /* proto*/
  4179. static PyObject *__pyx_f_6uvloop_4loop_11SSLProtocol__control_app_writing(struct __pyx_obj_6uvloop_4loop_SSLProtocol *__pyx_v_self); /* proto*/
  4180. static size_t __pyx_f_6uvloop_4loop_11SSLProtocol__get_write_buffer_size(struct __pyx_obj_6uvloop_4loop_SSLProtocol *__pyx_v_self); /* proto*/
  4181. static PyObject *__pyx_f_6uvloop_4loop_11SSLProtocol__set_write_buffer_limits(struct __pyx_obj_6uvloop_4loop_SSLProtocol *__pyx_v_self, struct __pyx_opt_args_6uvloop_4loop_11SSLProtocol__set_write_buffer_limits *__pyx_optional_args); /* proto*/
  4182. static PyObject *__pyx_f_6uvloop_4loop_11SSLProtocol__pause_reading(struct __pyx_obj_6uvloop_4loop_SSLProtocol *__pyx_v_self); /* proto*/
  4183. static PyObject *__pyx_f_6uvloop_4loop_11SSLProtocol__resume_reading(struct __pyx_obj_6uvloop_4loop_SSLProtocol *__pyx_v_self); /* proto*/
  4184. static PyObject *__pyx_f_6uvloop_4loop_11SSLProtocol__control_ssl_reading(struct __pyx_obj_6uvloop_4loop_SSLProtocol *__pyx_v_self); /* proto*/
  4185. static PyObject *__pyx_f_6uvloop_4loop_11SSLProtocol__set_read_buffer_limits(struct __pyx_obj_6uvloop_4loop_SSLProtocol *__pyx_v_self, struct __pyx_opt_args_6uvloop_4loop_11SSLProtocol__set_read_buffer_limits *__pyx_optional_args); /* proto*/
  4186. static size_t __pyx_f_6uvloop_4loop_11SSLProtocol__get_read_buffer_size(struct __pyx_obj_6uvloop_4loop_SSLProtocol *__pyx_v_self); /* proto*/
  4187. static PyObject *__pyx_f_6uvloop_4loop_11SSLProtocol__fatal_error(struct __pyx_obj_6uvloop_4loop_SSLProtocol *__pyx_v_self, PyObject *__pyx_v_exc, struct __pyx_opt_args_6uvloop_4loop_11SSLProtocol__fatal_error *__pyx_optional_args); /* proto*/
  4188. static PyObject *__pyx_f_6uvloop_4loop_15_UDPSendContext_close(struct __pyx_obj_6uvloop_4loop__UDPSendContext *__pyx_v_self); /* proto*/
  4189. static struct __pyx_obj_6uvloop_4loop__UDPSendContext *__pyx_f_6uvloop_4loop_15_UDPSendContext_new(struct __pyx_obj_6uvloop_4loop_UDPTransport *__pyx_v_udp, PyObject *__pyx_v_data); /* proto*/
  4190. static PyObject *__pyx_f_6uvloop_4loop_12UDPTransport__init(struct __pyx_obj_6uvloop_4loop_UDPTransport *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, unsigned int __pyx_v_family); /* proto*/
  4191. static PyObject *__pyx_f_6uvloop_4loop_12UDPTransport__connect(struct __pyx_obj_6uvloop_4loop_UDPTransport *__pyx_v_self, struct sockaddr *__pyx_v_addr, CYTHON_UNUSED size_t __pyx_v_addr_len); /* proto*/
  4192. static PyObject *__pyx_f_6uvloop_4loop_12UDPTransport_open(struct __pyx_obj_6uvloop_4loop_UDPTransport *__pyx_v_self, int __pyx_v_family, int __pyx_v_sockfd); /* proto*/
  4193. static PyObject *__pyx_f_6uvloop_4loop_12UDPTransport__bind(struct __pyx_obj_6uvloop_4loop_UDPTransport *__pyx_v_self, struct sockaddr *__pyx_v_addr, int __pyx_v_reuse_addr); /* proto*/
  4194. static PyObject *__pyx_f_6uvloop_4loop_12UDPTransport__set_broadcast(struct __pyx_obj_6uvloop_4loop_UDPTransport *__pyx_v_self, int __pyx_v_on); /* proto*/
  4195. static size_t __pyx_f_6uvloop_4loop_12UDPTransport__get_write_buffer_size(struct __pyx_obj_6uvloop_4loop_UDPTransport *__pyx_v_self); /* proto*/
  4196. static int __pyx_f_6uvloop_4loop_12UDPTransport__is_reading(struct __pyx_obj_6uvloop_4loop_UDPTransport *__pyx_v_self); /* proto*/
  4197. static PyObject *__pyx_f_6uvloop_4loop_12UDPTransport__start_reading(struct __pyx_obj_6uvloop_4loop_UDPTransport *__pyx_v_self); /* proto*/
  4198. static PyObject *__pyx_f_6uvloop_4loop_12UDPTransport__stop_reading(struct __pyx_obj_6uvloop_4loop_UDPTransport *__pyx_v_self); /* proto*/
  4199. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_12UDPTransport___receiving_started(struct __pyx_obj_6uvloop_4loop_UDPTransport *__pyx_v_self); /* proto*/
  4200. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_12UDPTransport___receiving_stopped(struct __pyx_obj_6uvloop_4loop_UDPTransport *__pyx_v_self); /* proto*/
  4201. static PyObject *__pyx_f_6uvloop_4loop_12UDPTransport__new_socket(struct __pyx_obj_6uvloop_4loop_UDPTransport *__pyx_v_self); /* proto*/
  4202. static PyObject *__pyx_f_6uvloop_4loop_12UDPTransport__send(struct __pyx_obj_6uvloop_4loop_UDPTransport *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_addr); /* proto*/
  4203. static PyObject *__pyx_f_6uvloop_4loop_12UDPTransport__on_receive(struct __pyx_obj_6uvloop_4loop_UDPTransport *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_exc, PyObject *__pyx_v_addr); /* proto*/
  4204. static PyObject *__pyx_f_6uvloop_4loop_12UDPTransport__on_sent(struct __pyx_obj_6uvloop_4loop_UDPTransport *__pyx_v_self, PyObject *__pyx_v_exc); /* proto*/
  4205. static PyObject *__pyx_f_6uvloop_4loop_6Server__add_server(struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_UVStreamServer *__pyx_v_srv); /* proto*/
  4206. static PyObject *__pyx_f_6uvloop_4loop_6Server__start_serving(struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_self); /* proto*/
  4207. static PyObject *__pyx_f_6uvloop_4loop_6Server__wakeup(struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_self); /* proto*/
  4208. static PyObject *__pyx_f_6uvloop_4loop_6Server__attach(struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_self); /* proto*/
  4209. static PyObject *__pyx_f_6uvloop_4loop_6Server__detach(struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_self); /* proto*/
  4210. static PyObject *__pyx_f_6uvloop_4loop_6Server__ref(struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_self); /* proto*/
  4211. static PyObject *__pyx_f_6uvloop_4loop_6Server__unref(struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_self); /* proto*/
  4212. /* Module declarations from 'uvloop.includes' */
  4213. /* Module declarations from 'libc.stdint' */
  4214. /* Module declarations from 'posix.types' */
  4215. /* Module declarations from 'uvloop.includes.system' */
  4216. /* Module declarations from 'uvloop.includes.uv' */
  4217. /* Module declarations from 'cython' */
  4218. /* Module declarations from 'uvloop.includes.debug' */
  4219. /* Module declarations from 'uvloop.includes.python' */
  4220. /* Module declarations from 'uvloop.includes.flowcontrol' */
  4221. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_8includes_11flowcontrol_add_flowcontrol_defaults(PyObject *, PyObject *, int); /*proto*/
  4222. /* Module declarations from 'libc.string' */
  4223. /* Module declarations from 'libc' */
  4224. /* Module declarations from 'libc.errno' */
  4225. /* Module declarations from 'cpython.version' */
  4226. /* Module declarations from '__builtin__' */
  4227. /* Module declarations from 'cpython.type' */
  4228. static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0;
  4229. /* Module declarations from 'libc.stdio' */
  4230. /* Module declarations from 'cpython.object' */
  4231. /* Module declarations from 'cpython.ref' */
  4232. /* Module declarations from 'cpython.exc' */
  4233. /* Module declarations from 'cpython.module' */
  4234. /* Module declarations from 'cpython.mem' */
  4235. /* Module declarations from 'cpython.tuple' */
  4236. /* Module declarations from 'cpython.list' */
  4237. /* Module declarations from 'cpython.sequence' */
  4238. /* Module declarations from 'cpython.mapping' */
  4239. /* Module declarations from 'cpython.iterator' */
  4240. /* Module declarations from 'cpython.number' */
  4241. /* Module declarations from 'cpython.int' */
  4242. /* Module declarations from '__builtin__' */
  4243. /* Module declarations from 'cpython.bool' */
  4244. static PyTypeObject *__pyx_ptype_7cpython_4bool_bool = 0;
  4245. /* Module declarations from 'cpython.long' */
  4246. /* Module declarations from 'cpython.float' */
  4247. /* Module declarations from '__builtin__' */
  4248. /* Module declarations from 'cpython.complex' */
  4249. static PyTypeObject *__pyx_ptype_7cpython_7complex_complex = 0;
  4250. /* Module declarations from 'cpython.string' */
  4251. /* Module declarations from 'cpython.unicode' */
  4252. /* Module declarations from 'cpython.dict' */
  4253. /* Module declarations from 'cpython.instance' */
  4254. /* Module declarations from 'cpython.function' */
  4255. /* Module declarations from 'cpython.method' */
  4256. /* Module declarations from 'cpython.weakref' */
  4257. /* Module declarations from 'cpython.getargs' */
  4258. /* Module declarations from 'cpython.pythread' */
  4259. /* Module declarations from 'cpython.pystate' */
  4260. /* Module declarations from 'cpython.cobject' */
  4261. /* Module declarations from 'cpython.oldbuffer' */
  4262. /* Module declarations from 'cpython.set' */
  4263. /* Module declarations from 'cpython.buffer' */
  4264. /* Module declarations from 'cpython.bytes' */
  4265. /* Module declarations from 'cpython.pycapsule' */
  4266. /* Module declarations from 'cpython' */
  4267. /* Module declarations from 'uvloop.loop' */
  4268. static PyTypeObject *__pyx_ptype_6uvloop_4loop_UVHandle = 0;
  4269. static PyTypeObject *__pyx_ptype_6uvloop_4loop_UVSocketHandle = 0;
  4270. static PyTypeObject *__pyx_ptype_6uvloop_4loop_UVAsync = 0;
  4271. static PyTypeObject *__pyx_ptype_6uvloop_4loop_UVTimer = 0;
  4272. static PyTypeObject *__pyx_ptype_6uvloop_4loop_UVIdle = 0;
  4273. static PyTypeObject *__pyx_ptype_6uvloop_4loop_UVBaseTransport = 0;
  4274. static PyTypeObject *__pyx_ptype_6uvloop_4loop_Loop = 0;
  4275. static PyTypeObject *__pyx_ptype_6uvloop_4loop_Handle = 0;
  4276. static PyTypeObject *__pyx_ptype_6uvloop_4loop_TimerHandle = 0;
  4277. static PyTypeObject *__pyx_ptype_6uvloop_4loop_UVCheck = 0;
  4278. static PyTypeObject *__pyx_ptype_6uvloop_4loop_UVPoll = 0;
  4279. static PyTypeObject *__pyx_ptype_6uvloop_4loop_UVStream = 0;
  4280. static PyTypeObject *__pyx_ptype_6uvloop_4loop_UVStreamServer = 0;
  4281. static PyTypeObject *__pyx_ptype_6uvloop_4loop_TCPServer = 0;
  4282. static PyTypeObject *__pyx_ptype_6uvloop_4loop_TCPTransport = 0;
  4283. static PyTypeObject *__pyx_ptype_6uvloop_4loop_UnixServer = 0;
  4284. static PyTypeObject *__pyx_ptype_6uvloop_4loop_UnixTransport = 0;
  4285. static PyTypeObject *__pyx_ptype_6uvloop_4loop_ReadUnixTransport = 0;
  4286. static PyTypeObject *__pyx_ptype_6uvloop_4loop_WriteUnixTransport = 0;
  4287. static PyTypeObject *__pyx_ptype_6uvloop_4loop_UVProcess = 0;
  4288. static PyTypeObject *__pyx_ptype_6uvloop_4loop_UVProcessTransport = 0;
  4289. static PyTypeObject *__pyx_ptype_6uvloop_4loop_UVRequest = 0;
  4290. static PyTypeObject *__pyx_ptype_6uvloop_4loop__SSLProtocolTransport = 0;
  4291. static PyTypeObject *__pyx_ptype_6uvloop_4loop_SSLProtocol = 0;
  4292. static PyTypeObject *__pyx_ptype_6uvloop_4loop_UDPTransport = 0;
  4293. static PyTypeObject *__pyx_ptype_6uvloop_4loop_Server = 0;
  4294. static PyTypeObject *__pyx_ptype_6uvloop_4loop_PseudoSocket = 0;
  4295. static PyTypeObject *__pyx_ptype_6uvloop_4loop_LruCache = 0;
  4296. static PyTypeObject *__pyx_ptype_6uvloop_4loop__StreamWriteContext = 0;
  4297. static PyTypeObject *__pyx_ptype_6uvloop_4loop__TCPConnectRequest = 0;
  4298. static PyTypeObject *__pyx_ptype_6uvloop_4loop__PipeConnectRequest = 0;
  4299. static PyTypeObject *__pyx_ptype_6uvloop_4loop_SockAddrHolder = 0;
  4300. static PyTypeObject *__pyx_ptype_6uvloop_4loop_AddrInfo = 0;
  4301. static PyTypeObject *__pyx_ptype_6uvloop_4loop_AddrInfoRequest = 0;
  4302. static PyTypeObject *__pyx_ptype_6uvloop_4loop_NameInfoRequest = 0;
  4303. static PyTypeObject *__pyx_ptype_6uvloop_4loop__UDPSendContext = 0;
  4304. static PyTypeObject *__pyx_ptype_6uvloop_4loop___pyx_scope_struct___getaddrinfo = 0;
  4305. static PyTypeObject *__pyx_ptype_6uvloop_4loop___pyx_scope_struct_1__getnameinfo = 0;
  4306. static PyTypeObject *__pyx_ptype_6uvloop_4loop___pyx_scope_struct_2__sock_connect = 0;
  4307. static PyTypeObject *__pyx_ptype_6uvloop_4loop___pyx_scope_struct_3___get__ = 0;
  4308. static PyTypeObject *__pyx_ptype_6uvloop_4loop___pyx_scope_struct_4_run_until_complete = 0;
  4309. static PyTypeObject *__pyx_ptype_6uvloop_4loop___pyx_scope_struct_5_getaddrinfo = 0;
  4310. static PyTypeObject *__pyx_ptype_6uvloop_4loop___pyx_scope_struct_6_getnameinfo = 0;
  4311. static PyTypeObject *__pyx_ptype_6uvloop_4loop___pyx_scope_struct_7_start_tls = 0;
  4312. static PyTypeObject *__pyx_ptype_6uvloop_4loop___pyx_scope_struct_8_create_server = 0;
  4313. static PyTypeObject *__pyx_ptype_6uvloop_4loop___pyx_scope_struct_9_create_connection = 0;
  4314. static PyTypeObject *__pyx_ptype_6uvloop_4loop___pyx_scope_struct_10_genexpr = 0;
  4315. static PyTypeObject *__pyx_ptype_6uvloop_4loop___pyx_scope_struct_11_genexpr = 0;
  4316. static PyTypeObject *__pyx_ptype_6uvloop_4loop___pyx_scope_struct_12_create_unix_server = 0;
  4317. static PyTypeObject *__pyx_ptype_6uvloop_4loop___pyx_scope_struct_13_create_unix_connection = 0;
  4318. static PyTypeObject *__pyx_ptype_6uvloop_4loop___pyx_scope_struct_14_sock_recv = 0;
  4319. static PyTypeObject *__pyx_ptype_6uvloop_4loop___pyx_scope_struct_15_sock_recv_into = 0;
  4320. static PyTypeObject *__pyx_ptype_6uvloop_4loop___pyx_scope_struct_16_sock_sendall = 0;
  4321. static PyTypeObject *__pyx_ptype_6uvloop_4loop___pyx_scope_struct_17_sock_accept = 0;
  4322. static PyTypeObject *__pyx_ptype_6uvloop_4loop___pyx_scope_struct_18_sock_connect = 0;
  4323. static PyTypeObject *__pyx_ptype_6uvloop_4loop___pyx_scope_struct_19_connect_accepted_socket = 0;
  4324. static PyTypeObject *__pyx_ptype_6uvloop_4loop___pyx_scope_struct_20___subprocess_run = 0;
  4325. static PyTypeObject *__pyx_ptype_6uvloop_4loop___pyx_scope_struct_21_subprocess_shell = 0;
  4326. static PyTypeObject *__pyx_ptype_6uvloop_4loop___pyx_scope_struct_22_subprocess_exec = 0;
  4327. static PyTypeObject *__pyx_ptype_6uvloop_4loop___pyx_scope_struct_23_connect_read_pipe = 0;
  4328. static PyTypeObject *__pyx_ptype_6uvloop_4loop___pyx_scope_struct_24_connect_write_pipe = 0;
  4329. static PyTypeObject *__pyx_ptype_6uvloop_4loop___pyx_scope_struct_25_create_datagram_endpoint = 0;
  4330. static PyTypeObject *__pyx_ptype_6uvloop_4loop___pyx_scope_struct_26_genexpr = 0;
  4331. static PyTypeObject *__pyx_ptype_6uvloop_4loop___pyx_scope_struct_27_shutdown_asyncgens = 0;
  4332. static PyTypeObject *__pyx_ptype_6uvloop_4loop___pyx_scope_struct_28__start_handshake = 0;
  4333. static PyTypeObject *__pyx_ptype_6uvloop_4loop___pyx_scope_struct_29__start_shutdown = 0;
  4334. static PyTypeObject *__pyx_ptype_6uvloop_4loop___pyx_scope_struct_30__do_read__buffered = 0;
  4335. static PyTypeObject *__pyx_ptype_6uvloop_4loop___pyx_scope_struct_31__resume_reading = 0;
  4336. static PyTypeObject *__pyx_ptype_6uvloop_4loop___pyx_scope_struct_32___aenter__ = 0;
  4337. static PyTypeObject *__pyx_ptype_6uvloop_4loop___pyx_scope_struct_33___aexit__ = 0;
  4338. static PyTypeObject *__pyx_ptype_6uvloop_4loop___pyx_scope_struct_34_wait_closed = 0;
  4339. static PyTypeObject *__pyx_ptype_6uvloop_4loop___pyx_scope_struct_35_start_serving = 0;
  4340. static PyTypeObject *__pyx_ptype_6uvloop_4loop___pyx_scope_struct_36_serve_forever = 0;
  4341. static PyTypeObject *__pyx_ptype_6uvloop_4loop___pyx_scope_struct_37__test_coroutine_1 = 0;
  4342. static PyTypeObject *__pyx_ptype___pyx_scope_struct____Pyx_CFunc_object____Loop____bint___to_py = 0;
  4343. static PyObject *__pyx_v_6uvloop_4loop_aio_get_event_loop = 0;
  4344. static PyObject *__pyx_v_6uvloop_4loop_aio_CancelledError = 0;
  4345. static PyObject *__pyx_v_6uvloop_4loop_aio_InvalidStateError = 0;
  4346. static PyObject *__pyx_v_6uvloop_4loop_aio_TimeoutError = 0;
  4347. static PyObject *__pyx_v_6uvloop_4loop_aio_Future = 0;
  4348. static PyObject *__pyx_v_6uvloop_4loop_aio_Task = 0;
  4349. static PyObject *__pyx_v_6uvloop_4loop_aio_ensure_future = 0;
  4350. static PyObject *__pyx_v_6uvloop_4loop_aio_gather = 0;
  4351. static PyObject *__pyx_v_6uvloop_4loop_aio_wait = 0;
  4352. static PyObject *__pyx_v_6uvloop_4loop_aio_wrap_future = 0;
  4353. static PyObject *__pyx_v_6uvloop_4loop_aio_logger = 0;
  4354. static PyObject *__pyx_v_6uvloop_4loop_aio_iscoroutine = 0;
  4355. static PyObject *__pyx_v_6uvloop_4loop_aio_iscoroutinefunction = 0;
  4356. static PyObject *__pyx_v_6uvloop_4loop_aio_BaseProtocol = 0;
  4357. static PyObject *__pyx_v_6uvloop_4loop_aio_Protocol = 0;
  4358. static PyObject *__pyx_v_6uvloop_4loop_aio_isfuture = 0;
  4359. static PyObject *__pyx_v_6uvloop_4loop_aio_get_running_loop = 0;
  4360. static PyObject *__pyx_v_6uvloop_4loop_aio_set_running_loop = 0;
  4361. static PyObject *__pyx_v_6uvloop_4loop_aio_debug_wrapper = 0;
  4362. static PyObject *__pyx_v_6uvloop_4loop_aio_AbstractChildWatcher = 0;
  4363. static PyObject *__pyx_v_6uvloop_4loop_aio_Transport = 0;
  4364. static PyObject *__pyx_v_6uvloop_4loop_aio_FlowControlMixin = 0;
  4365. static PyObject *__pyx_v_6uvloop_4loop_col_deque = 0;
  4366. static PyObject *__pyx_v_6uvloop_4loop_col_Iterable = 0;
  4367. static PyObject *__pyx_v_6uvloop_4loop_col_Counter = 0;
  4368. static PyObject *__pyx_v_6uvloop_4loop_col_OrderedDict = 0;
  4369. static PyObject *__pyx_v_6uvloop_4loop_cc_ThreadPoolExecutor = 0;
  4370. static PyObject *__pyx_v_6uvloop_4loop_cc_Future = 0;
  4371. static PyObject *__pyx_v_6uvloop_4loop_errno_EBADF = 0;
  4372. static PyObject *__pyx_v_6uvloop_4loop_errno_EINVAL = 0;
  4373. static PyObject *__pyx_v_6uvloop_4loop_ft_partial = 0;
  4374. static PyObject *__pyx_v_6uvloop_4loop_gc_disable = 0;
  4375. static PyObject *__pyx_v_6uvloop_4loop_iter_chain = 0;
  4376. static PyObject *__pyx_v_6uvloop_4loop_inspect_isgenerator = 0;
  4377. static int __pyx_v_6uvloop_4loop_has_IPV6_V6ONLY;
  4378. static int __pyx_v_6uvloop_4loop_IPV6_V6ONLY;
  4379. static int __pyx_v_6uvloop_4loop_has_SO_REUSEPORT;
  4380. static int __pyx_v_6uvloop_4loop_SO_REUSEPORT;
  4381. static int __pyx_v_6uvloop_4loop_SO_BROADCAST;
  4382. static int __pyx_v_6uvloop_4loop_SOCK_NONBLOCK;
  4383. static PyObject *__pyx_v_6uvloop_4loop_socket_gaierror = 0;
  4384. static PyObject *__pyx_v_6uvloop_4loop_socket_error = 0;
  4385. static PyObject *__pyx_v_6uvloop_4loop_socket_timeout = 0;
  4386. static PyObject *__pyx_v_6uvloop_4loop_socket_socket = 0;
  4387. static PyObject *__pyx_v_6uvloop_4loop_socket_socketpair = 0;
  4388. static PyObject *__pyx_v_6uvloop_4loop_socket_getservbyname = 0;
  4389. static PyObject *__pyx_v_6uvloop_4loop_socket_AddressFamily = 0;
  4390. static PyObject *__pyx_v_6uvloop_4loop_socket_SocketKind = 0;
  4391. static int __pyx_v_6uvloop_4loop_socket_EAI_ADDRFAMILY;
  4392. static int __pyx_v_6uvloop_4loop_socket_EAI_AGAIN;
  4393. static int __pyx_v_6uvloop_4loop_socket_EAI_BADFLAGS;
  4394. static int __pyx_v_6uvloop_4loop_socket_EAI_BADHINTS;
  4395. static int __pyx_v_6uvloop_4loop_socket_EAI_CANCELED;
  4396. static int __pyx_v_6uvloop_4loop_socket_EAI_FAIL;
  4397. static int __pyx_v_6uvloop_4loop_socket_EAI_FAMILY;
  4398. static int __pyx_v_6uvloop_4loop_socket_EAI_MEMORY;
  4399. static int __pyx_v_6uvloop_4loop_socket_EAI_NODATA;
  4400. static int __pyx_v_6uvloop_4loop_socket_EAI_NONAME;
  4401. static int __pyx_v_6uvloop_4loop_socket_EAI_OVERFLOW;
  4402. static int __pyx_v_6uvloop_4loop_socket_EAI_PROTOCOL;
  4403. static int __pyx_v_6uvloop_4loop_socket_EAI_SERVICE;
  4404. static int __pyx_v_6uvloop_4loop_socket_EAI_SOCKTYPE;
  4405. static PyObject *__pyx_v_6uvloop_4loop_os_name = 0;
  4406. static PyObject *__pyx_v_6uvloop_4loop_os_environ = 0;
  4407. static PyObject *__pyx_v_6uvloop_4loop_os_dup = 0;
  4408. static PyObject *__pyx_v_6uvloop_4loop_os_set_inheritable = 0;
  4409. static PyObject *__pyx_v_6uvloop_4loop_os_get_inheritable = 0;
  4410. static PyObject *__pyx_v_6uvloop_4loop_os_close = 0;
  4411. static PyObject *__pyx_v_6uvloop_4loop_os_open = 0;
  4412. static PyObject *__pyx_v_6uvloop_4loop_os_devnull = 0;
  4413. static PyObject *__pyx_v_6uvloop_4loop_os_O_RDWR = 0;
  4414. static PyObject *__pyx_v_6uvloop_4loop_os_pipe = 0;
  4415. static PyObject *__pyx_v_6uvloop_4loop_os_read = 0;
  4416. static PyObject *__pyx_v_6uvloop_4loop_os_remove = 0;
  4417. static PyObject *__pyx_v_6uvloop_4loop_os_stat = 0;
  4418. static PyObject *__pyx_v_6uvloop_4loop_stat_S_ISSOCK = 0;
  4419. static PyObject *__pyx_v_6uvloop_4loop_sys_ignore_environment = 0;
  4420. static PyObject *__pyx_v_6uvloop_4loop_sys_exc_info = 0;
  4421. static PyObject *__pyx_v_6uvloop_4loop_sys_set_coroutine_wrapper = 0;
  4422. static PyObject *__pyx_v_6uvloop_4loop_sys_get_coroutine_wrapper = 0;
  4423. static PyObject *__pyx_v_6uvloop_4loop_sys_getframe = 0;
  4424. static PyObject *__pyx_v_6uvloop_4loop_sys_version_info = 0;
  4425. static PyObject *__pyx_v_6uvloop_4loop_sys_getfilesystemencoding = 0;
  4426. static PyObject *__pyx_v_6uvloop_4loop_sys_platform = 0;
  4427. static PyObject *__pyx_v_6uvloop_4loop_ssl_SSLContext = 0;
  4428. static PyObject *__pyx_v_6uvloop_4loop_ssl_MemoryBIO = 0;
  4429. static PyObject *__pyx_v_6uvloop_4loop_ssl_create_default_context = 0;
  4430. static PyObject *__pyx_v_6uvloop_4loop_ssl_SSLError = 0;
  4431. static PyObject *__pyx_v_6uvloop_4loop_ssl_SSLAgainErrors = 0;
  4432. static PyObject *__pyx_v_6uvloop_4loop_ssl_CertificateError = 0;
  4433. static int __pyx_v_6uvloop_4loop_ssl_SSL_ERROR_WANT_READ;
  4434. static int __pyx_v_6uvloop_4loop_ssl_SSL_ERROR_WANT_WRITE;
  4435. static int __pyx_v_6uvloop_4loop_ssl_SSL_ERROR_SYSCALL;
  4436. static uint64_t __pyx_v_6uvloop_4loop_MAIN_THREAD_ID;
  4437. static int __pyx_v_6uvloop_4loop_subprocess_PIPE;
  4438. static int __pyx_v_6uvloop_4loop_subprocess_STDOUT;
  4439. static int __pyx_v_6uvloop_4loop_subprocess_DEVNULL;
  4440. static PyObject *__pyx_v_6uvloop_4loop_subprocess_SubprocessError = 0;
  4441. static int __pyx_v_6uvloop_4loop_signal_NSIG;
  4442. static PyObject *__pyx_v_6uvloop_4loop_signal_signal = 0;
  4443. static PyObject *__pyx_v_6uvloop_4loop_signal_siginterrupt = 0;
  4444. static PyObject *__pyx_v_6uvloop_4loop_signal_set_wakeup_fd = 0;
  4445. static PyObject *__pyx_v_6uvloop_4loop_signal_default_int_handler = 0;
  4446. static PyObject *__pyx_v_6uvloop_4loop_signal_SIG_DFL = 0;
  4447. static PyObject *__pyx_v_6uvloop_4loop_time_sleep = 0;
  4448. static PyObject *__pyx_v_6uvloop_4loop_time_monotonic = 0;
  4449. static PyObject *__pyx_v_6uvloop_4loop_tb_StackSummary = 0;
  4450. static PyObject *__pyx_v_6uvloop_4loop_tb_walk_stack = 0;
  4451. static PyObject *__pyx_v_6uvloop_4loop_tb_format_list = 0;
  4452. static PyObject *__pyx_v_6uvloop_4loop_warnings_warn = 0;
  4453. static PyObject *__pyx_v_6uvloop_4loop_weakref_WeakValueDictionary = 0;
  4454. static PyObject *__pyx_v_6uvloop_4loop_weakref_WeakSet = 0;
  4455. static PyObject *__pyx_v_6uvloop_4loop_py_inf = 0;
  4456. static int __pyx_v_6uvloop_4loop_PY37;
  4457. static int __pyx_v_6uvloop_4loop_PY36;
  4458. static PyObject *__pyx_v_6uvloop_4loop__LRU_MARKER = 0;
  4459. static struct __pyx_obj_6uvloop_4loop_LruCache *__pyx_v_6uvloop_4loop_sockaddrs = 0;
  4460. static volatile int __pyx_v_6uvloop_4loop___atfork_installed;
  4461. static volatile int __pyx_v_6uvloop_4loop___forking;
  4462. static struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_6uvloop_4loop___forking_loop = 0;
  4463. static volatile int __pyx_v_6uvloop_4loop___mem_installed;
  4464. static PyObject *__pyx_f_6uvloop_4loop___strerr(int); /*proto*/
  4465. static PyObject *__pyx_f_6uvloop_4loop___convert_python_error(int); /*proto*/
  4466. static int __pyx_f_6uvloop_4loop___convert_socket_error(int); /*proto*/
  4467. static PyObject *__pyx_f_6uvloop_4loop_convert_error(int); /*proto*/
  4468. static PyObject *__pyx_f_6uvloop_4loop__is_sock_stream(PyObject *); /*proto*/
  4469. static PyObject *__pyx_f_6uvloop_4loop__is_sock_dgram(PyObject *); /*proto*/
  4470. static PyObject *__pyx_f_6uvloop_4loop_isfuture(PyObject *); /*proto*/
  4471. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_socket_inc_io_ref(PyObject *); /*proto*/
  4472. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_socket_dec_io_ref(PyObject *); /*proto*/
  4473. static void __pyx_f_6uvloop_4loop___loop_alloc_buffer(uv_handle_t *, size_t, uv_buf_t *); /*proto*/
  4474. static CYTHON_INLINE void __pyx_f_6uvloop_4loop___loop_free_buffer(struct __pyx_obj_6uvloop_4loop_Loop *); /*proto*/
  4475. static PyObject *__pyx_f_6uvloop_4loop_format_callback_name(PyObject *); /*proto*/
  4476. static PyObject *__pyx_f_6uvloop_4loop_new_Handle(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, PyObject *, PyObject *); /*proto*/
  4477. static PyObject *__pyx_f_6uvloop_4loop_new_MethodHandle(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, __pyx_t_6uvloop_4loop_method_t, PyObject *); /*proto*/
  4478. static PyObject *__pyx_f_6uvloop_4loop_new_MethodHandle1(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, __pyx_t_6uvloop_4loop_method1_t, PyObject *, PyObject *); /*proto*/
  4479. static PyObject *__pyx_f_6uvloop_4loop_new_MethodHandle2(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, __pyx_t_6uvloop_4loop_method2_t, PyObject *, PyObject *, PyObject *); /*proto*/
  4480. static PyObject *__pyx_f_6uvloop_4loop_new_MethodHandle3(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, __pyx_t_6uvloop_4loop_method3_t, PyObject *, PyObject *, PyObject *, PyObject *); /*proto*/
  4481. static PyObject *__pyx_f_6uvloop_4loop_extract_stack(void); /*proto*/
  4482. static CYTHON_INLINE int __pyx_f_6uvloop_4loop___ensure_handle_data(uv_handle_t *, char const *); /*proto*/
  4483. static void __pyx_f_6uvloop_4loop___uv_close_handle_cb(uv_handle_t *); /*proto*/
  4484. static void __pyx_f_6uvloop_4loop___close_all_handles(struct __pyx_obj_6uvloop_4loop_Loop *); /*proto*/
  4485. static void __pyx_f_6uvloop_4loop___uv_walk_close_all_handles_cb(uv_handle_t *, void *); /*proto*/
  4486. static void __pyx_f_6uvloop_4loop___uvasync_callback(uv_async_t *); /*proto*/
  4487. static void __pyx_f_6uvloop_4loop_cb_idle_callback(uv_idle_t *); /*proto*/
  4488. static void __pyx_f_6uvloop_4loop_cb_check_callback(uv_check_t *); /*proto*/
  4489. static void __pyx_f_6uvloop_4loop___uvtimer_callback(uv_timer_t *); /*proto*/
  4490. static void __pyx_f_6uvloop_4loop___on_uvpoll_event(uv_poll_t *, int, int); /*proto*/
  4491. static void __pyx_f_6uvloop_4loop___uv_stream_on_shutdown(uv_shutdown_t *, int); /*proto*/
  4492. static CYTHON_INLINE int __pyx_f_6uvloop_4loop___uv_stream_on_read_common(struct __pyx_obj_6uvloop_4loop_UVStream *, struct __pyx_obj_6uvloop_4loop_Loop *, Py_ssize_t); /*proto*/
  4493. static CYTHON_INLINE void __pyx_f_6uvloop_4loop___uv_stream_on_read_impl(uv_stream_t *, Py_ssize_t, uv_buf_t const *); /*proto*/
  4494. static CYTHON_INLINE void __pyx_f_6uvloop_4loop___uv_stream_on_write_impl(uv_write_t *, int); /*proto*/
  4495. static void __pyx_f_6uvloop_4loop___uv_stream_on_read(uv_stream_t *, Py_ssize_t, uv_buf_t const *); /*proto*/
  4496. static void __pyx_f_6uvloop_4loop___uv_stream_on_write(uv_write_t *, int); /*proto*/
  4497. static void __pyx_f_6uvloop_4loop___uv_stream_buffered_alloc(uv_handle_t *, size_t, uv_buf_t *); /*proto*/
  4498. static void __pyx_f_6uvloop_4loop___uv_stream_buffered_on_read(uv_stream_t *, Py_ssize_t, uv_buf_t const *); /*proto*/
  4499. static void __pyx_f_6uvloop_4loop___uv_streamserver_on_listen(uv_stream_t *, int); /*proto*/
  4500. static PyObject *__pyx_f_6uvloop_4loop___tcp_init_uv_handle(struct __pyx_obj_6uvloop_4loop_UVStream *, struct __pyx_obj_6uvloop_4loop_Loop *, unsigned int); /*proto*/
  4501. static PyObject *__pyx_f_6uvloop_4loop___tcp_bind(struct __pyx_obj_6uvloop_4loop_UVStream *, struct sockaddr *, unsigned int); /*proto*/
  4502. static PyObject *__pyx_f_6uvloop_4loop___tcp_open(struct __pyx_obj_6uvloop_4loop_UVStream *, int); /*proto*/
  4503. static PyObject *__pyx_f_6uvloop_4loop___tcp_get_socket(struct __pyx_obj_6uvloop_4loop_UVSocketHandle *); /*proto*/
  4504. static void __pyx_f_6uvloop_4loop___tcp_connect_callback(uv_connect_t *, int); /*proto*/
  4505. static PyObject *__pyx_f_6uvloop_4loop___pipe_init_uv_handle(struct __pyx_obj_6uvloop_4loop_UVStream *, struct __pyx_obj_6uvloop_4loop_Loop *); /*proto*/
  4506. static PyObject *__pyx_f_6uvloop_4loop___pipe_open(struct __pyx_obj_6uvloop_4loop_UVStream *, int); /*proto*/
  4507. static PyObject *__pyx_f_6uvloop_4loop___pipe_get_socket(struct __pyx_obj_6uvloop_4loop_UVSocketHandle *); /*proto*/
  4508. static void __pyx_f_6uvloop_4loop___on_write_pipe_poll_event(uv_poll_t *, int, int); /*proto*/
  4509. static void __pyx_f_6uvloop_4loop___pipe_connect_callback(uv_connect_t *, int); /*proto*/
  4510. static PyObject *__pyx_f_6uvloop_4loop___process_convert_fileno(PyObject *); /*proto*/
  4511. static void __pyx_f_6uvloop_4loop___uvprocess_on_exit_callback(uv_process_t *, int64_t, int); /*proto*/
  4512. static PyObject *__pyx_f_6uvloop_4loop___socketpair(void); /*proto*/
  4513. static void __pyx_f_6uvloop_4loop___uv_close_process_handle_cb(uv_handle_t *); /*proto*/
  4514. static PyObject *__pyx_f_6uvloop_4loop___port_to_int(PyObject *, PyObject *); /*proto*/
  4515. static PyObject *__pyx_f_6uvloop_4loop___convert_sockaddr_to_pyaddr(struct sockaddr const *); /*proto*/
  4516. static PyObject *__pyx_f_6uvloop_4loop___convert_pyaddr_to_sockaddr(int, PyObject *, struct sockaddr *); /*proto*/
  4517. static PyObject *__pyx_f_6uvloop_4loop___static_getaddrinfo(PyObject *, PyObject *, int, int, int, struct sockaddr *); /*proto*/
  4518. static PyObject *__pyx_f_6uvloop_4loop___static_getaddrinfo_pyaddr(PyObject *, PyObject *, int, int, int, int); /*proto*/
  4519. static void __pyx_f_6uvloop_4loop___on_addrinfo_resolved(uv_getaddrinfo_t *, int, struct addrinfo *); /*proto*/
  4520. static void __pyx_f_6uvloop_4loop___on_nameinfo_resolved(uv_getnameinfo_t *, int, char const *, char const *); /*proto*/
  4521. static PyObject *__pyx_f_6uvloop_4loop__create_transport_context(PyObject *, PyObject *); /*proto*/
  4522. static void __pyx_f_6uvloop_4loop___uv_udp_on_receive(uv_udp_t *, Py_ssize_t, uv_buf_t const *, struct sockaddr const *, unsigned int); /*proto*/
  4523. static void __pyx_f_6uvloop_4loop___uv_udp_on_send(uv_udp_send_t *, int); /*proto*/
  4524. static void __pyx_f_6uvloop_4loop___atfork_child(void); /*proto*/
  4525. static PyObject *__pyx_f_6uvloop_4loop___install_atfork(void); /*proto*/
  4526. static PyObject *__pyx_f_6uvloop_4loop___install_pymem(void); /*proto*/
  4527. static PyObject *__pyx_f_6uvloop_4loop__set_signal_wakeup_fd(PyObject *); /*proto*/
  4528. static PyObject *__pyx_f_6uvloop_4loop__warn_with_source(PyObject *, PyObject *, PyObject *); /*proto*/
  4529. static PyObject *__pyx_f_6uvloop_4loop___pyx_unpickle_PseudoSocket__set_state(struct __pyx_obj_6uvloop_4loop_PseudoSocket *, PyObject *); /*proto*/
  4530. static PyObject *__pyx_f_6uvloop_4loop___pyx_unpickle_LruCache__set_state(struct __pyx_obj_6uvloop_4loop_LruCache *, PyObject *); /*proto*/
  4531. static PyObject *__Pyx_CFunc_object____Loop____bint___to_py(PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Loop *, int)); /*proto*/
  4532. #define __Pyx_MODULE_NAME "uvloop.loop"
  4533. extern int __pyx_module_is_main_uvloop__loop;
  4534. int __pyx_module_is_main_uvloop__loop = 0;
  4535. /* Implementation of 'uvloop.loop' */
  4536. static PyObject *__pyx_builtin_object;
  4537. static PyObject *__pyx_builtin_OSError;
  4538. static PyObject *__pyx_builtin_MemoryError;
  4539. static PyObject *__pyx_builtin_RuntimeError;
  4540. static PyObject *__pyx_builtin_ValueError;
  4541. static PyObject *__pyx_builtin_KeyError;
  4542. static PyObject *__pyx_builtin_BaseException;
  4543. static PyObject *__pyx_builtin_TypeError;
  4544. static PyObject *__pyx_builtin_AttributeError;
  4545. static PyObject *__pyx_builtin_RuntimeWarning;
  4546. static PyObject *__pyx_builtin_print;
  4547. static PyObject *__pyx_builtin_round;
  4548. static PyObject *__pyx_builtin_OverflowError;
  4549. static PyObject *__pyx_builtin_zip;
  4550. static PyObject *__pyx_builtin_NotImplementedError;
  4551. static PyObject *__pyx_builtin_id;
  4552. static PyObject *__pyx_builtin_super;
  4553. static PyObject *__pyx_builtin_open;
  4554. static PyObject *__pyx_builtin_range;
  4555. static PyObject *__pyx_builtin_UnicodeEncodeError;
  4556. static const char __pyx_k_1[] = "1";
  4557. static const char __pyx_k_b[] = "b";
  4558. static const char __pyx_k_c[] = "-c";
  4559. static const char __pyx_k_n[] = "n";
  4560. static const char __pyx_k__2[] = "";
  4561. static const char __pyx_k_ex[] = "ex";
  4562. static const char __pyx_k_fd[] = "fd";
  4563. static const char __pyx_k_gc[] = "gc";
  4564. static const char __pyx_k_id[] = "id";
  4565. static const char __pyx_k_os[] = "os";
  4566. static const char __pyx_k_wb[] = "wb";
  4567. static const char __pyx_k__25[] = "-------------------------------+---------+---------";
  4568. static const char __pyx_k__46[] = ": ";
  4569. static const char __pyx_k__53[] = ", ";
  4570. static const char __pyx_k__58[] = "{}: {}";
  4571. static const char __pyx_k__59[] = "\n";
  4572. static const char __pyx_k__78[] = "{}={}";
  4573. static const char __pyx_k__88[] = "<";
  4574. static const char __pyx_k__89[] = " ";
  4575. static const char __pyx_k__90[] = ">";
  4576. static const char __pyx_k_abc[] = "abc";
  4577. static const char __pyx_k_add[] = "add";
  4578. static const char __pyx_k_buf[] = "buf";
  4579. static const char __pyx_k_cmd[] = "cmd";
  4580. static const char __pyx_k_cwd[] = "cwd";
  4581. static const char __pyx_k_doc[] = "__doc__";
  4582. static const char __pyx_k_dup[] = "dup";
  4583. static const char __pyx_k_env[] = "env";
  4584. static const char __pyx_k_exc[] = "exc";
  4585. static const char __pyx_k_fut[] = "fut";
  4586. static const char __pyx_k_get[] = "get";
  4587. static const char __pyx_k_inf[] = "inf";
  4588. static const char __pyx_k_log[] = "log";
  4589. static const char __pyx_k_low[] = "low";
  4590. static const char __pyx_k_new[] = "__new__";
  4591. static const char __pyx_k_pop[] = "pop";
  4592. static const char __pyx_k_r_s[] = "%r: %s";
  4593. static const char __pyx_k_sig[] = "sig";
  4594. static const char __pyx_k_ssl[] = "ssl";
  4595. static const char __pyx_k_sys[] = "sys";
  4596. static const char __pyx_k_tcp[] = "tcp";
  4597. static const char __pyx_k_udp[] = "udp";
  4598. static const char __pyx_k_zip[] = "zip";
  4599. static const char __pyx_k_Loop[] = "Loop";
  4600. static const char __pyx_k_NSIG[] = "NSIG";
  4601. static const char __pyx_k_PIPE[] = "PIPE";
  4602. static const char __pyx_k_Task[] = "Task";
  4603. static const char __pyx_k__118[] = " (";
  4604. static const char __pyx_k__119[] = ")";
  4605. static const char __pyx_k__163[] = ":";
  4606. static const char __pyx_k__172[] = "=";
  4607. static const char __pyx_k_addr[] = "addr";
  4608. static const char __pyx_k_args[] = "args";
  4609. static const char __pyx_k_bind[] = "bind";
  4610. static const char __pyx_k_cast[] = "cast";
  4611. static const char __pyx_k_copy[] = "copy";
  4612. static const char __pyx_k_data[] = "data";
  4613. static const char __pyx_k_dict[] = "__dict__";
  4614. static const char __pyx_k_done[] = "done";
  4615. static const char __pyx_k_exit[] = "__exit__";
  4616. static const char __pyx_k_fd_2[] = " fd=";
  4617. static const char __pyx_k_func[] = "func";
  4618. static const char __pyx_k_high[] = "high";
  4619. static const char __pyx_k_host[] = "host";
  4620. static const char __pyx_k_idna[] = "idna";
  4621. static const char __pyx_k_info[] = "info";
  4622. static const char __pyx_k_init[] = "__init__";
  4623. static const char __pyx_k_join[] = "join";
  4624. static const char __pyx_k_last[] = "last";
  4625. static const char __pyx_k_loop[] = "loop";
  4626. static const char __pyx_k_main[] = "__main__";
  4627. static const char __pyx_k_name[] = "__name__";
  4628. static const char __pyx_k_noop[] = "_noop";
  4629. static const char __pyx_k_open[] = "open";
  4630. static const char __pyx_k_path[] = "path";
  4631. static const char __pyx_k_pipe[] = "pipe";
  4632. static const char __pyx_k_port[] = "port";
  4633. static const char __pyx_k_proc[] = "proc";
  4634. static const char __pyx_k_read[] = "read";
  4635. static const char __pyx_k_recv[] = "recv";
  4636. static const char __pyx_k_repr[] = "__repr__";
  4637. static const char __pyx_k_self[] = "__self__";
  4638. static const char __pyx_k_send[] = "send";
  4639. static const char __pyx_k_sock[] = "sock";
  4640. static const char __pyx_k_stat[] = "stat";
  4641. static const char __pyx_k_stop[] = "stop";
  4642. static const char __pyx_k_task[] = "task";
  4643. static const char __pyx_k_test[] = "__test__";
  4644. static const char __pyx_k_time[] = "time";
  4645. static const char __pyx_k_type[] = "type";
  4646. static const char __pyx_k_wait[] = "wait";
  4647. static const char __pyx_k_warn[] = "warn";
  4648. static const char __pyx_k_when[] = "when";
  4649. static const char __pyx_k_wrap[] = "wrap";
  4650. static const char __pyx_k_aexit[] = "__aexit__";
  4651. static const char __pyx_k_ascii[] = "ascii";
  4652. static const char __pyx_k_await[] = "__await__";
  4653. static const char __pyx_k_cause[] = "__cause__";
  4654. static const char __pyx_k_chain[] = "chain";
  4655. static const char __pyx_k_class[] = "__class__";
  4656. static const char __pyx_k_clear[] = "clear";
  4657. static const char __pyx_k_close[] = "close";
  4658. static const char __pyx_k_debug[] = "debug";
  4659. static const char __pyx_k_delay[] = "delay";
  4660. static const char __pyx_k_deque[] = "deque";
  4661. static const char __pyx_k_enter[] = "__enter__";
  4662. static const char __pyx_k_errno[] = "errno";
  4663. static const char __pyx_k_error[] = "error";
  4664. static const char __pyx_k_flags[] = "flags";
  4665. static const char __pyx_k_flush[] = "flush";
  4666. static const char __pyx_k_frame[] = "frame";
  4667. static const char __pyx_k_ident[] = "ident";
  4668. static const char __pyx_k_items[] = "items";
  4669. static const char __pyx_k_limit[] = "limit";
  4670. static const char __pyx_k_lower[] = "lower";
  4671. static const char __pyx_k_posix[] = "posix";
  4672. static const char __pyx_k_print[] = "print";
  4673. static const char __pyx_k_proto[] = "proto";
  4674. static const char __pyx_k_range[] = "range";
  4675. static const char __pyx_k_round[] = "round";
  4676. static const char __pyx_k_share[] = "share";
  4677. static const char __pyx_k_shell[] = "shell";
  4678. static const char __pyx_k_sleep[] = "sleep";
  4679. static const char __pyx_k_split[] = "split";
  4680. static const char __pyx_k_stdin[] = "stdin";
  4681. static const char __pyx_k_super[] = "super";
  4682. static const char __pyx_k_throw[] = "throw";
  4683. static const char __pyx_k_write[] = "write";
  4684. static const char __pyx_k_Future[] = "Future";
  4685. static const char __pyx_k_Handle[] = "Handle";
  4686. static const char __pyx_k_O_RDWR[] = "O_RDWR";
  4687. static const char __pyx_k_STDOUT[] = "STDOUT";
  4688. static const char __pyx_k_Server[] = "Server";
  4689. static const char __pyx_k_UVIdle[] = "UVIdle";
  4690. static const char __pyx_k_UVPoll[] = "UVPoll";
  4691. static const char __pyx_k_accept[] = "accept";
  4692. static const char __pyx_k_aclose[] = "aclose";
  4693. static const char __pyx_k_aenter[] = "__aenter__";
  4694. static const char __pyx_k_append[] = "append";
  4695. static const char __pyx_k_bin_sh[] = "/bin/sh";
  4696. static const char __pyx_k_cancel[] = "cancel";
  4697. static const char __pyx_k_cipher[] = "cipher";
  4698. static const char __pyx_k_cygwin[] = "cygwin";
  4699. static const char __pyx_k_decode[] = "decode";
  4700. static const char __pyx_k_detach[] = "detach";
  4701. static const char __pyx_k_encode[] = "encode";
  4702. static const char __pyx_k_family[] = "family";
  4703. static const char __pyx_k_fileno[] = "fileno";
  4704. static const char __pyx_k_format[] = "format";
  4705. static const char __pyx_k_fspath[] = "__fspath__";
  4706. static const char __pyx_k_gather[] = "gather";
  4707. static const char __pyx_k_handle[] = "handle";
  4708. static const char __pyx_k_high_2[] = "high (";
  4709. static const char __pyx_k_import[] = "__import__";
  4710. static const char __pyx_k_logger[] = "logger";
  4711. static const char __pyx_k_module[] = "__module__";
  4712. static const char __pyx_k_name_2[] = "name";
  4713. static const char __pyx_k_noop_2[] = "noop";
  4714. static const char __pyx_k_object[] = "object";
  4715. static const char __pyx_k_pickle[] = "pickle";
  4716. static const char __pyx_k_pipe_2[] = " pipe=";
  4717. static const char __pyx_k_reduce[] = "__reduce__";
  4718. static const char __pyx_k_remove[] = "remove";
  4719. static const char __pyx_k_result[] = "result";
  4720. static const char __pyx_k_resume[] = "resume";
  4721. static const char __pyx_k_rstrip[] = "rstrip";
  4722. static const char __pyx_k_self_2[] = "self";
  4723. static const char __pyx_k_server[] = "server ";
  4724. static const char __pyx_k_signal[] = "signal";
  4725. static const char __pyx_k_signum[] = "signum";
  4726. static const char __pyx_k_socket[] = "socket ";
  4727. static const char __pyx_k_source[] = "source";
  4728. static const char __pyx_k_stderr[] = "stderr";
  4729. static const char __pyx_k_stdout[] = "stdout";
  4730. static const char __pyx_k_submit[] = "submit";
  4731. static const char __pyx_k_unwrap[] = "unwrap";
  4732. static const char __pyx_k_update[] = "update";
  4733. static const char __pyx_k_values[] = "values";
  4734. static const char __pyx_k_waiter[] = "waiter";
  4735. static const char __pyx_k_Counter[] = "Counter";
  4736. static const char __pyx_k_DEVNULL[] = "DEVNULL";
  4737. static const char __pyx_k_OSError[] = "OSError";
  4738. static const char __pyx_k_SIG_DFL[] = "SIG_DFL";
  4739. static const char __pyx_k_UVAsync[] = "UVAsync";
  4740. static const char __pyx_k_UVCheck[] = "UVCheck";
  4741. static const char __pyx_k_UVTimer[] = "UVTimer";
  4742. static const char __pyx_k_WeakSet[] = "WeakSet";
  4743. static const char __pyx_k_address[] = "address";
  4744. static const char __pyx_k_asyncio[] = "asyncio";
  4745. static const char __pyx_k_backlog[] = "backlog";
  4746. static const char __pyx_k_bufsize[] = "bufsize";
  4747. static const char __pyx_k_connect[] = "connect";
  4748. static const char __pyx_k_context[] = "context";
  4749. static const char __pyx_k_default[] = "default";
  4750. static const char __pyx_k_devnull[] = "devnull";
  4751. static const char __pyx_k_disable[] = "disable";
  4752. static const char __pyx_k_discard[] = "discard";
  4753. static const char __pyx_k_enabled[] = "enabled";
  4754. static const char __pyx_k_environ[] = "environ";
  4755. static const char __pyx_k_extract[] = "extract";
  4756. static const char __pyx_k_fileobj[] = "fileobj";
  4757. static const char __pyx_k_futures[] = "futures";
  4758. static const char __pyx_k_genexpr[] = "genexpr";
  4759. static const char __pyx_k_inspect[] = "inspect";
  4760. static const char __pyx_k_io_refs[] = "_io_refs";
  4761. static const char __pyx_k_laddr_s[] = ", laddr=%s";
  4762. static const char __pyx_k_maxsize[] = "maxsize";
  4763. static const char __pyx_k_message[] = "message";
  4764. static const char __pyx_k_partial[] = "partial";
  4765. static const char __pyx_k_pending[] = "pending";
  4766. static const char __pyx_k_popitem[] = "popitem";
  4767. static const char __pyx_k_popleft[] = "popleft";
  4768. static const char __pyx_k_prepare[] = "__prepare__";
  4769. static const char __pyx_k_program[] = "program";
  4770. static const char __pyx_k_raddr_s[] = ", raddr=%s";
  4771. static const char __pyx_k_reverse[] = "reverse";
  4772. static const char __pyx_k_sockets[] = " sockets=";
  4773. static const char __pyx_k_st_mode[] = "st_mode";
  4774. static const char __pyx_k_timeout[] = "timeout";
  4775. static const char __pyx_k_warning[] = "warning";
  4776. static const char __pyx_k_weakref[] = "weakref";
  4777. static const char __pyx_k_18_7_7_7[] = " {: <18} {: >7} | {: >7} | {: >7}";
  4778. static const char __pyx_k_AddrInfo[] = "AddrInfo";
  4779. static const char __pyx_k_EAI_FAIL[] = "EAI_FAIL";
  4780. static const char __pyx_k_Iterable[] = "Iterable";
  4781. static const char __pyx_k_KeyError[] = "KeyError";
  4782. static const char __pyx_k_LruCache[] = "LruCache";
  4783. static const char __pyx_k_Protocol[] = "Protocol";
  4784. static const char __pyx_k_SSLError[] = "SSLError";
  4785. static const char __pyx_k_S_ISSOCK[] = "S_ISSOCK";
  4786. static const char __pyx_k_UVHandle[] = "UVHandle";
  4787. static const char __pyx_k_UVStream[] = "UVStream";
  4788. static const char __pyx_k_asyncgen[] = "asyncgen";
  4789. static const char __pyx_k_builtins[] = "__builtins__";
  4790. static const char __pyx_k_callback[] = "callback";
  4791. static const char __pyx_k_closed_x[] = "<{} closed={} {:#x}>";
  4792. static const char __pyx_k_exc_info[] = "exc_info";
  4793. static const char __pyx_k_executor[] = "executor";
  4794. static const char __pyx_k_gaierror[] = "gaierror";
  4795. static const char __pyx_k_getframe[] = "_getframe";
  4796. static const char __pyx_k_getstate[] = "__getstate__";
  4797. static const char __pyx_k_isfuture[] = "isfuture";
  4798. static const char __pyx_k_pass_fds[] = "pass_fds";
  4799. static const char __pyx_k_peercert[] = "peercert";
  4800. static const char __pyx_k_peername[] = "peername";
  4801. static const char __pyx_k_platform[] = "platform";
  4802. static const char __pyx_k_protocol[] = "protocol";
  4803. static const char __pyx_k_pyx_type[] = "__pyx_type";
  4804. static const char __pyx_k_qualname[] = "__qualname__";
  4805. static const char __pyx_k_setstate[] = "__setstate__";
  4806. static const char __pyx_k_shutdown[] = "shutdown";
  4807. static const char __pyx_k_sockaddr[] = "sockaddr";
  4808. static const char __pyx_k_socket_2[] = "socket";
  4809. static const char __pyx_k_sockname[] = "sockname";
  4810. static const char __pyx_k_strerror[] = "strerror";
  4811. static const char __pyx_k_subtract[] = "subtract";
  4812. static const char __pyx_k_warnings[] = "warnings";
  4813. static const char __pyx_k_wrap_bio[] = "wrap_bio";
  4814. static const char __pyx_k_EAI_AGAIN[] = "EAI_AGAIN";
  4815. static const char __pyx_k_Loop_time[] = "Loop time: {}";
  4816. static const char __pyx_k_MemoryBIO[] = "MemoryBIO";
  4817. static const char __pyx_k_Read_EOFs[] = "Read EOFs: {}";
  4818. static const char __pyx_k_TCPServer[] = "TCPServer";
  4819. static const char __pyx_k_Transport[] = "Transport";
  4820. static const char __pyx_k_TypeError[] = "TypeError";
  4821. static const char __pyx_k_UVProcess[] = "UVProcess";
  4822. static const char __pyx_k_UVRequest[] = "UVRequest";
  4823. static const char __pyx_k_call_soon[] = "call_soon";
  4824. static const char __pyx_k_cancelled[] = "cancelled";
  4825. static const char __pyx_k_close_fds[] = "close_fds";
  4826. static const char __pyx_k_exception[] = "exception";
  4827. static const char __pyx_k_finalizer[] = "finalizer";
  4828. static const char __pyx_k_firstiter[] = "firstiter";
  4829. static const char __pyx_k_functools[] = "functools";
  4830. static const char __pyx_k_get_debug[] = "get_debug";
  4831. static const char __pyx_k_is_closed[] = "is_closed";
  4832. static const char __pyx_k_itertools[] = "itertools";
  4833. static const char __pyx_k_metaclass[] = "__metaclass__";
  4834. static const char __pyx_k_monotonic[] = "monotonic";
  4835. static const char __pyx_k_must_be_0[] = ") must be >= 0";
  4836. static const char __pyx_k_pyx_state[] = "__pyx_state";
  4837. static const char __pyx_k_recv_into[] = "recv_into";
  4838. static const char __pyx_k_reduce_ex[] = "__reduce_ex__";
  4839. static const char __pyx_k_set_debug[] = "set_debug";
  4840. static const char __pyx_k_sock_recv[] = "sock_recv";
  4841. static const char __pyx_k_sockets_2[] = "sockets";
  4842. static const char __pyx_k_start_tls[] = "start_tls";
  4843. static const char __pyx_k_stdio_fut[] = "stdio_fut";
  4844. static const char __pyx_k_threading[] = "threading";
  4845. static const char __pyx_k_traceback[] = "__traceback__";
  4846. static const char __pyx_k_transport[] = "transport";
  4847. static const char __pyx_k_EAI_FAMILY[] = "EAI_FAMILY";
  4848. static const char __pyx_k_EAI_MEMORY[] = "EAI_MEMORY";
  4849. static const char __pyx_k_EAI_NODATA[] = "EAI_NODATA";
  4850. static const char __pyx_k_EAI_NONAME[] = "EAI_NONAME";
  4851. static const char __pyx_k_Loop__stop[] = "Loop._stop";
  4852. static const char __pyx_k_SSLContext[] = "SSLContext";
  4853. static const char __pyx_k_SocketKind[] = "SocketKind";
  4854. static const char __pyx_k_UnixServer[] = "UnixServer";
  4855. static const char __pyx_k_ValueError[] = "ValueError";
  4856. static const char __pyx_k_call_later[] = "call_later";
  4857. static const char __pyx_k_concurrent[] = "concurrent";
  4858. static const char __pyx_k_coroutines[] = "coroutines";
  4859. static const char __pyx_k_created_at[] = "created at {}:{}";
  4860. static const char __pyx_k_executable[] = "executable";
  4861. static const char __pyx_k_get_buffer[] = "get_buffer";
  4862. static const char __pyx_k_getsockopt[] = "getsockopt";
  4863. static const char __pyx_k_gettimeout[] = "gettimeout";
  4864. static const char __pyx_k_is_running[] = "is_running";
  4865. static const char __pyx_k_local_addr[] = "local_addr";
  4866. static const char __pyx_k_memoryview[] = "memoryview";
  4867. static const char __pyx_k_preexec_fn[] = "preexec_fn";
  4868. static const char __pyx_k_pyx_result[] = "__pyx_result";
  4869. static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
  4870. static const char __pyx_k_reuse_port[] = "reuse_port";
  4871. static const char __pyx_k_set_result[] = "set_result";
  4872. static const char __pyx_k_setsockopt[] = "setsockopt";
  4873. static const char __pyx_k_settimeout[] = "settimeout";
  4874. static const char __pyx_k_sighandler[] = "__sighandler";
  4875. static const char __pyx_k_socketpair[] = "socketpair";
  4876. static const char __pyx_k_ssl_object[] = "ssl_object";
  4877. static const char __pyx_k_sslcontext[] = "sslcontext";
  4878. static const char __pyx_k_subprocess[] = "subprocess";
  4879. static const char __pyx_k_transports[] = "transports";
  4880. static const char __pyx_k_walk_stack[] = "walk_stack";
  4881. static const char __pyx_k_EAI_SERVICE[] = "EAI_SERVICE";
  4882. static const char __pyx_k_IPV6_V6ONLY[] = "IPV6_V6ONLY";
  4883. static const char __pyx_k_MemoryError[] = "MemoryError";
  4884. static const char __pyx_k_OrderedDict[] = "OrderedDict";
  4885. static const char __pyx_k_PickleError[] = "PickleError";
  4886. static const char __pyx_k_Read_errors[] = "Read errors: {}";
  4887. static const char __pyx_k_Read_events[] = "Read events: {}";
  4888. static const char __pyx_k_SSLProtocol[] = "SSLProtocol";
  4889. static const char __pyx_k_TimerHandle[] = "TimerHandle";
  4890. static const char __pyx_k_asyncio_log[] = "asyncio.log";
  4891. static const char __pyx_k_bind_method[] = "bind() method";
  4892. static const char __pyx_k_cfunc_to_py[] = "cfunc.to_py";
  4893. static const char __pyx_k_collections[] = "collections";
  4894. static const char __pyx_k_compression[] = "compression";
  4895. static const char __pyx_k_create_task[] = "create_task";
  4896. static const char __pyx_k_force_close[] = "_force_close";
  4897. static const char __pyx_k_format_list[] = "format_list";
  4898. static const char __pyx_k_getaddrinfo[] = "getaddrinfo";
  4899. static const char __pyx_k_getnameinfo[] = "getnameinfo";
  4900. static const char __pyx_k_getpeercert[] = "getpeercert";
  4901. static const char __pyx_k_getpeername[] = "getpeername";
  4902. static const char __pyx_k_getsockname[] = "getsockname";
  4903. static const char __pyx_k_is_closed_2[] = " is closed";
  4904. static const char __pyx_k_iscoroutine[] = "iscoroutine";
  4905. static const char __pyx_k_isgenerator[] = "isgenerator";
  4906. static const char __pyx_k_main_thread[] = "main_thread";
  4907. static const char __pyx_k_move_to_end[] = "move_to_end";
  4908. static const char __pyx_k_must_be_low[] = ") must be >= low (";
  4909. static const char __pyx_k_recv_method[] = "recv() method";
  4910. static const char __pyx_k_remote_addr[] = "remote_addr";
  4911. static const char __pyx_k_run_forever[] = "run_forever";
  4912. static const char __pyx_k_send_method[] = "send() method";
  4913. static const char __pyx_k_server_side[] = "server_side";
  4914. static const char __pyx_k_setblocking[] = "setblocking";
  4915. static const char __pyx_k_sock_accept[] = "sock_accept";
  4916. static const char __pyx_k_startupinfo[] = "startupinfo";
  4917. static const char __pyx_k_traceback_2[] = "traceback";
  4918. static const char __pyx_k_transport_2[] = "transport ";
  4919. static const char __pyx_k_uvloop_loop[] = "uvloop.loop";
  4920. static const char __pyx_k_wait_closed[] = "wait_closed";
  4921. static const char __pyx_k_wrap_future[] = "wrap_future";
  4922. static const char __pyx_k_BaseProtocol[] = "BaseProtocol";
  4923. static const char __pyx_k_EAI_BADFLAGS[] = "EAI_BADFLAGS";
  4924. static const char __pyx_k_EAI_BADHINTS[] = "EAI_BADHINTS";
  4925. static const char __pyx_k_EAI_CANCELED[] = "EAI_CANCELED";
  4926. static const char __pyx_k_EAI_OVERFLOW[] = "EAI_OVERFLOW";
  4927. static const char __pyx_k_EAI_PROTOCOL[] = "EAI_PROTOCOL";
  4928. static const char __pyx_k_EAI_SOCKTYPE[] = "EAI_SOCKTYPE";
  4929. static const char __pyx_k_Process_info[] = "---- Process info: -----";
  4930. static const char __pyx_k_PseudoSocket[] = "PseudoSocket";
  4931. static const char __pyx_k_RuntimeError[] = "RuntimeError";
  4932. static const char __pyx_k_SO_BROADCAST[] = "SO_BROADCAST";
  4933. static const char __pyx_k_SO_REUSEPORT[] = "SO_REUSEPORT";
  4934. static const char __pyx_k_StackSummary[] = "StackSummary";
  4935. static const char __pyx_k_TCPTransport[] = "TCPTransport";
  4936. static const char __pyx_k_TimeoutError[] = "TimeoutError";
  4937. static const char __pyx_k_UDPTransport[] = "UDPTransport";
  4938. static const char __pyx_k_Write_errors[] = "Write errors: {}";
  4939. static const char __pyx_k_Write_events[] = "Write events: {}";
  4940. static const char __pyx_k_alive_closed[] = " alive | closed |";
  4941. static const char __pyx_k_app_protocol[] = "app_protocol";
  4942. static const char __pyx_k_close_method[] = "close() method";
  4943. static const char __pyx_k_disconnected[] = "disconnected";
  4944. static const char __pyx_k_do_handshake[] = "do_handshake";
  4945. static const char __pyx_k_eof_received[] = "eof_received";
  4946. static const char __pyx_k_lookup_lines[] = "lookup_lines";
  4947. static const char __pyx_k_objs_handles[] = " objs | handles |";
  4948. static const char __pyx_k_pyx_checksum[] = "__pyx_checksum";
  4949. static const char __pyx_k_set_protocol[] = "set_protocol";
  4950. static const char __pyx_k_siginterrupt[] = "siginterrupt";
  4951. static const char __pyx_k_sock_connect[] = "sock_connect";
  4952. static const char __pyx_k_sock_sendall[] = "sock_sendall";
  4953. static const char __pyx_k_ssl_protocol[] = "ssl_protocol";
  4954. static const char __pyx_k_stdio_inited[] = "__stdio_inited";
  4955. static const char __pyx_k_stringsource[] = "stringsource";
  4956. static const char __pyx_k_version_info[] = "version_info";
  4957. static const char __pyx_k_AddressFamily[] = "AddressFamily";
  4958. static const char __pyx_k_BaseException[] = "BaseException";
  4959. static const char __pyx_k_Errors_logged[] = "Errors logged: {}";
  4960. static const char __pyx_k_Listen_errors[] = "Listen errors: {}";
  4961. static const char __pyx_k_OverflowError[] = "OverflowError";
  4962. static const char __pyx_k_SOCK_NONBLOCK[] = "SOCK_NONBLOCK";
  4963. static const char __pyx_k_UnixTransport[] = "UnixTransport";
  4964. static const char __pyx_k_accept_method[] = "accept() method";
  4965. static const char __pyx_k_asyncio_tasks[] = "asyncio.tasks";
  4966. static const char __pyx_k_create_future[] = "create_future";
  4967. static const char __pyx_k_create_server[] = "create_server";
  4968. static const char __pyx_k_creationflags[] = "creationflags";
  4969. static const char __pyx_k_data_received[] = "data_received";
  4970. static const char __pyx_k_debug_wrapper[] = "debug_wrapper";
  4971. static const char __pyx_k_detach_method[] = "detach() method";
  4972. static const char __pyx_k_ensure_future[] = "ensure_future";
  4973. static const char __pyx_k_getservbyname[] = "getservbyname";
  4974. static const char __pyx_k_listen_method[] = "listen() method";
  4975. static const char __pyx_k_loop__on_idle[] = "loop._on_idle";
  4976. static const char __pyx_k_pause_reading[] = "pause_reading";
  4977. static const char __pyx_k_pause_writing[] = "pause_writing";
  4978. static const char __pyx_k_proto_factory[] = "proto_factory";
  4979. static const char __pyx_k_reduce_cython[] = "__reduce_cython__";
  4980. static const char __pyx_k_remove_reader[] = "remove_reader";
  4981. static const char __pyx_k_remove_writer[] = "remove_writer";
  4982. static const char __pyx_k_reuse_address[] = "reuse_address";
  4983. static const char __pyx_k_sendto_method[] = "sendto() method";
  4984. static const char __pyx_k_serve_forever[] = "serve_forever";
  4985. static const char __pyx_k_set_exception[] = "set_exception";
  4986. static const char __pyx_k_set_wakeup_fd[] = "set_wakeup_fd";
  4987. static const char __pyx_k_start_serving[] = "start_serving";
  4988. static const char __pyx_k_AttributeError[] = "AttributeError";
  4989. static const char __pyx_k_CancelledError[] = "CancelledError";
  4990. static const char __pyx_k_EAI_ADDRFAMILY[] = "EAI_ADDRFAMILY";
  4991. static const char __pyx_k_Loop_sock_recv[] = "Loop.sock_recv";
  4992. static const char __pyx_k_Loop_start_tls[] = "Loop.start_tls";
  4993. static const char __pyx_k_Process_memory[] = "Process memory: {}";
  4994. static const char __pyx_k_Read_callbacks[] = "Read callbacks: {}";
  4995. static const char __pyx_k_RuntimeWarning[] = "RuntimeWarning";
  4996. static const char __pyx_k_Server___aexit[] = "Server.__aexit__";
  4997. static const char __pyx_k_SockAddrHolder[] = "SockAddrHolder";
  4998. static const char __pyx_k_UDPSendContext[] = "_UDPSendContext";
  4999. static const char __pyx_k_UVSocketHandle[] = "UVSocketHandle";
  5000. static const char __pyx_k_UVStreamServer[] = "UVStreamServer";
  5001. static const char __pyx_k_buffer_updated[] = "buffer_updated";
  5002. static const char __pyx_k_check_hostname[] = "check_hostname";
  5003. static const char __pyx_k_connect_failed[] = "connect failed";
  5004. static const char __pyx_k_connect_method[] = "connect() method";
  5005. static const char __pyx_k_error_received[] = "error_received";
  5006. static const char __pyx_k_get_event_loop[] = "get_event_loop";
  5007. static const char __pyx_k_get_extra_info[] = "get_extra_info";
  5008. static const char __pyx_k_process_exited[] = "process_exited";
  5009. static const char __pyx_k_r_received_EOF[] = "%r received EOF";
  5010. static const char __pyx_k_recvmsg_method[] = "recvmsg() method";
  5011. static const char __pyx_k_resume_reading[] = "resume_reading";
  5012. static const char __pyx_k_resume_writing[] = "resume_writing";
  5013. static const char __pyx_k_sendall_method[] = "sendall() method";
  5014. static const char __pyx_k_sendmsg_method[] = "sendmsg() method";
  5015. static const char __pyx_k_sock_recv_into[] = "sock_recv_into";
  5016. static const char __pyx_k_subprocess_run[] = "__subprocess_run";
  5017. static const char __pyx_k_AddrInfoRequest[] = "AddrInfoRequest";
  5018. static const char __pyx_k_BlockingIOError[] = "BlockingIOError";
  5019. static const char __pyx_k_BrokenPipeError[] = "BrokenPipeError";
  5020. static const char __pyx_k_FileExistsError[] = "FileExistsError";
  5021. static const char __pyx_k_Loop__sock_recv[] = "Loop._sock_recv";
  5022. static const char __pyx_k_Loop_debug_info[] = "--- Loop debug info: ---";
  5023. static const char __pyx_k_NameInfoRequest[] = "NameInfoRequest";
  5024. static const char __pyx_k_PermissionError[] = "PermissionError";
  5025. static const char __pyx_k_ResourceWarning[] = "ResourceWarning";
  5026. static const char __pyx_k_SSLSyscallError[] = "SSLSyscallError";
  5027. static const char __pyx_k_Server___aenter[] = "Server.__aenter__";
  5028. static const char __pyx_k_Shutdown_errors[] = "Shutdown errors {}";
  5029. static const char __pyx_k_SubprocessError[] = "SubprocessError";
  5030. static const char __pyx_k_Timer_handles_8[] = "Timer handles: {: <8} | {}";
  5031. static const char __pyx_k_UVBaseTransport[] = "UVBaseTransport";
  5032. static const char __pyx_k_allow_broadcast[] = "allow_broadcast";
  5033. static const char __pyx_k_asyncio_futures[] = "asyncio.futures";
  5034. static const char __pyx_k_collections_abc[] = "collections.abc";
  5035. static const char __pyx_k_connection_lost[] = "connection_lost";
  5036. static const char __pyx_k_connection_made[] = "connection_made";
  5037. static const char __pyx_k_get_inheritable[] = "get_inheritable";
  5038. static const char __pyx_k_makefile_method[] = "makefile() method";
  5039. static const char __pyx_k_pyx_PickleError[] = "__pyx_PickleError";
  5040. static const char __pyx_k_recvfrom_method[] = "recvfrom() method";
  5041. static const char __pyx_k_restore_signals[] = "restore_signals";
  5042. static const char __pyx_k_sendfile_method[] = "sendfile() method";
  5043. static const char __pyx_k_server_hostname[] = "server_hostname";
  5044. static const char __pyx_k_set_inheritable[] = "set_inheritable";
  5045. static const char __pyx_k_setstate_cython[] = "__setstate_cython__";
  5046. static const char __pyx_k_shutdown_method[] = "shutdown() method";
  5047. static const char __pyx_k_subprocess_exec[] = "subprocess_exec";
  5048. static const char __pyx_k_uvloop_loop_pyx[] = "uvloop/loop.pyx";
  5049. static const char __pyx_k_CertificateError[] = "CertificateError";
  5050. static const char __pyx_k_FlowControlMixin[] = "_FlowControlMixin";
  5051. static const char __pyx_k_InterruptedError[] = "InterruptedError";
  5052. static const char __pyx_k_Loop_getaddrinfo[] = "Loop.getaddrinfo";
  5053. static const char __pyx_k_Loop_getnameinfo[] = "Loop.getnameinfo";
  5054. static const char __pyx_k_Loop_sock_accept[] = "Loop.sock_accept";
  5055. static const char __pyx_k_Polls_debug_info[] = "--- Polls debug info: ---";
  5056. static const char __pyx_k_SSLWantReadError[] = "SSLWantReadError";
  5057. static const char __pyx_k_Write_contexts_8[] = "Write contexts: {: <8} | {}";
  5058. static const char __pyx_k_asyncio_sslproto[] = "asyncio.sslproto";
  5059. static const char __pyx_k_closed_reading_x[] = "<{} closed={} reading={} {:#x}>";
  5060. static const char __pyx_k_decref_socketios[] = "_decref_socketios";
  5061. static const char __pyx_k_get_running_loop[] = "_get_running_loop";
  5062. static const char __pyx_k_on_ssl_connected[] = "__on_ssl_connected";
  5063. static const char __pyx_k_print_debug_info[] = "print_debug_info";
  5064. static const char __pyx_k_protocol_factory[] = "protocol_factory";
  5065. static const char __pyx_k_recv_into_method[] = "recv_into() method";
  5066. static const char __pyx_k_set_running_loop[] = "_set_running_loop";
  5067. static const char __pyx_k_source_traceback[] = "source_traceback";
  5068. static const char __pyx_k_subprocess_shell[] = "subprocess_shell";
  5069. static const char __pyx_k_test_coroutine_1[] = "_test_coroutine_1";
  5070. static const char __pyx_k_unix_socket_path[] = "unix socket path ";
  5071. static const char __pyx_k_FileNotFoundError[] = "FileNotFoundError";
  5072. static const char __pyx_k_InvalidStateError[] = "InvalidStateError";
  5073. static const char __pyx_k_IsADirectoryError[] = "IsADirectoryError";
  5074. static const char __pyx_k_Loop__sock_accept[] = "Loop._sock_accept";
  5075. static const char __pyx_k_Loop_sock_connect[] = "Loop.sock_connect";
  5076. static const char __pyx_k_Loop_sock_sendall[] = "Loop.sock_sendall";
  5077. static const char __pyx_k_Number_of_signals[] = "Number of signals: {}";
  5078. static const char __pyx_k_ReadUnixTransport[] = "ReadUnixTransport";
  5079. static const char __pyx_k_SSL_ERROR_SYSCALL[] = "SSL_ERROR_SYSCALL";
  5080. static const char __pyx_k_Socket_try_writes[] = "Socket try-writes: {}";
  5081. static const char __pyx_k_TCPConnectRequest[] = "_TCPConnectRequest";
  5082. static const char __pyx_k_add_done_callback[] = "add_done_callback";
  5083. static const char __pyx_k_bufsize_must_be_0[] = "bufsize must be 0";
  5084. static const char __pyx_k_connect_ex_method[] = "connect_ex() method";
  5085. static const char __pyx_k_connect_read_pipe[] = "connect_read_pipe";
  5086. static const char __pyx_k_create_connection[] = "create_connection";
  5087. static const char __pyx_k_datagram_received[] = "datagram_received";
  5088. static const char __pyx_k_get_app_transport[] = "_get_app_transport";
  5089. static const char __pyx_k_return_exceptions[] = "return_exceptions";
  5090. static const char __pyx_k_start_new_session[] = "start_new_session";
  5091. static const char __pyx_k_Callback_handles_8[] = "Callback handles: {: <8} | {}";
  5092. static const char __pyx_k_Loop__sock_connect[] = "Loop._sock_connect";
  5093. static const char __pyx_k_Loop__sock_sendall[] = "Loop._sock_sendall";
  5094. static const char __pyx_k_Loop_create_server[] = "Loop.create_server";
  5095. static const char __pyx_k_PYTHONASYNCIODEBUG[] = "PYTHONASYNCIODEBUG";
  5096. static const char __pyx_k_PipeConnectRequest[] = "_PipeConnectRequest";
  5097. static const char __pyx_k_ProcessLookupError[] = "ProcessLookupError";
  5098. static const char __pyx_k_Server_wait_closed[] = "Server.wait_closed";
  5099. static const char __pyx_k_StreamWriteContext[] = "_StreamWriteContext";
  5100. static const char __pyx_k_Streams_debug_info[] = "--- Streams debug info: ---";
  5101. static const char __pyx_k_ThreadPoolExecutor[] = "ThreadPoolExecutor";
  5102. static const char __pyx_k_UVProcessTransport[] = "UVProcessTransport";
  5103. static const char __pyx_k_UnicodeEncodeError[] = "UnicodeEncodeError";
  5104. static const char __pyx_k_WriteUnixTransport[] = "WriteUnixTransport";
  5105. static const char __pyx_k_Write_without_poll[] = "Write without poll: {}";
  5106. static const char __pyx_k_asyncio_coroutines[] = "asyncio.coroutines";
  5107. static const char __pyx_k_asyncio_transports[] = "asyncio.transports";
  5108. static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
  5109. static const char __pyx_k_concurrent_futures[] = "concurrent.futures";
  5110. static const char __pyx_k_connect_write_pipe[] = "connect_write_pipe";
  5111. static const char __pyx_k_create_unix_server[] = "create_unix_server";
  5112. static const char __pyx_k_get_asyncgen_hooks[] = "get_asyncgen_hooks";
  5113. static const char __pyx_k_ignore_environment[] = "ignore_environment";
  5114. static const char __pyx_k_pipe_data_received[] = "pipe_data_received";
  5115. static const char __pyx_k_set_asyncgen_hooks[] = "set_asyncgen_hooks";
  5116. static const char __pyx_k_shell_must_be_True[] = "shell must be True";
  5117. static const char __pyx_k_shutdown_asyncgens[] = "shutdown_asyncgens";
  5118. static const char __pyx_k_sig_out_of_range_1[] = "sig {} out of range(1, {})";
  5119. static const char __pyx_k_universal_newlines[] = "universal_newlines";
  5120. static const char __pyx_k_unopened_TCPServer[] = "unopened TCPServer";
  5121. static const char __pyx_k_Connect_call_failed[] = "Connect call failed ";
  5122. static const char __pyx_k_Loop_sock_recv_into[] = "Loop.sock_recv_into";
  5123. static const char __pyx_k_Multiple_exceptions[] = "Multiple exceptions: {}";
  5124. static const char __pyx_k_NotImplementedError[] = "NotImplementedError";
  5125. static const char __pyx_k_SSL_ERROR_WANT_READ[] = "SSL_ERROR_WANT_READ";
  5126. static const char __pyx_k_WeakValueDictionary[] = "WeakValueDictionary";
  5127. static const char __pyx_k_asyncio_base_events[] = "asyncio.base_events";
  5128. static const char __pyx_k_default_int_handler[] = "default_int_handler";
  5129. static const char __pyx_k_iscoroutinefunction[] = "iscoroutinefunction";
  5130. static const char __pyx_k_log_destroy_pending[] = "_log_destroy_pending";
  5131. static const char __pyx_k_recvmsg_into_method[] = "recvmsg_into() method";
  5132. static const char __pyx_k_shell_must_be_False[] = "shell must be False";
  5133. static const char __pyx_k_unclosed_resource_r[] = "unclosed resource {!r}; {}";
  5134. static const char __pyx_k_uvloop_sslproto_pyx[] = "uvloop/sslproto.pyx";
  5135. static const char __pyx_k_warn_on_full_buffer[] = "warn_on_full_buffer";
  5136. static const char __pyx_k_AbstractChildWatcher[] = "AbstractChildWatcher";
  5137. static const char __pyx_k_ConnectionResetError[] = "ConnectionResetError";
  5138. static const char __pyx_k_Event_loop_is_closed[] = "Event loop is closed";
  5139. static const char __pyx_k_Loop__read_from_self[] = "Loop._read_from_self";
  5140. static const char __pyx_k_Loop__sock_recv_into[] = "Loop._sock_recv_into";
  5141. static const char __pyx_k_Loop_subprocess_exec[] = "Loop.subprocess_exec";
  5142. static const char __pyx_k_SSLProtocolTransport[] = "_SSLProtocolTransport";
  5143. static const char __pyx_k_SSL_ERROR_WANT_WRITE[] = "SSL_ERROR_WANT_WRITE";
  5144. static const char __pyx_k_SSL_handshake_failed[] = "SSL handshake failed";
  5145. static const char __pyx_k_Server_serve_forever[] = "Server.serve_forever";
  5146. static const char __pyx_k_Server_start_serving[] = "Server.start_serving";
  5147. static const char __pyx_k_call_connection_made[] = "call_connection_made";
  5148. static const char __pyx_k_call_soon_threadsafe[] = "call_soon_threadsafe";
  5149. static const char __pyx_k_pipe_connection_lost[] = "pipe_connection_lost";
  5150. static const char __pyx_k_protocol_is_required[] = "protocol is required";
  5151. static const char __pyx_k_recvfrom_into_method[] = "recvfrom_into() method";
  5152. static const char __pyx_k_remove_done_callback[] = "remove_done_callback";
  5153. static const char __pyx_k_running_closed_debug[] = "<{}.{} running={} closed={} debug={}>";
  5154. static const char __pyx_k_sendmsg_afalg_method[] = "sendmsg_afalg() method";
  5155. static const char __pyx_k_sig_cannot_be_caught[] = "sig {} cannot be caught";
  5156. static const char __pyx_k_ssl_shutdown_timeout[] = "ssl_shutdown_timeout";
  5157. static const char __pyx_k_AddrInfo_data_is_NULL[] = "AddrInfo.data is NULL";
  5158. static const char __pyx_k_Exception_in_callback[] = "Exception in callback {}";
  5159. static const char __pyx_k_Fatal_error_on_server[] = "Fatal error on server ";
  5160. static const char __pyx_k_Invalid_file_object_r[] = "Invalid file object: {!r}";
  5161. static const char __pyx_k_Loop___subprocess_run[] = "Loop.__subprocess_run";
  5162. static const char __pyx_k_Loop_subprocess_shell[] = "Loop.subprocess_shell";
  5163. static const char __pyx_k_Read_callbacks_failed[] = "Read callbacks failed: {}";
  5164. static const char __pyx_k_Read_failed_callbacks[] = "Read failed callbacks: {}";
  5165. static const char __pyx_k_get_coroutine_wrapper[] = "get_coroutine_wrapper";
  5166. static const char __pyx_k_getfilesystemencoding[] = "getfilesystemencoding";
  5167. static const char __pyx_k_invalid_waiter_object[] = "invalid waiter object ";
  5168. static const char __pyx_k_pyx_unpickle_LruCache[] = "__pyx_unpickle_LruCache";
  5169. static const char __pyx_k_remove_signal_handler[] = "remove_signal_handler";
  5170. static const char __pyx_k_set_coroutine_wrapper[] = "set_coroutine_wrapper";
  5171. static const char __pyx_k_ssl_handshake_timeout[] = "ssl_handshake_timeout";
  5172. static const char __pyx_k_unclosed_resource_r_2[] = "unclosed resource {!r}";
  5173. static const char __pyx_k_ConnectionAbortedError[] = "ConnectionAbortedError";
  5174. static const char __pyx_k_ConnectionRefusedError[] = "ConnectionRefusedError";
  5175. static const char __pyx_k_Loop_connect_read_pipe[] = "Loop.connect_read_pipe";
  5176. static const char __pyx_k_Loop_create_connection[] = "Loop.create_connection";
  5177. static const char __pyx_k_SSL_shutdown_timed_out[] = "SSL shutdown timed out";
  5178. static const char __pyx_k_SyncSocketReaderFuture[] = "_SyncSocketReaderFuture";
  5179. static const char __pyx_k_SyncSocketWriterFuture[] = "_SyncSocketWriterFuture";
  5180. static const char __pyx_k_Write_callbacks_failed[] = "Write callbacks failed: {}";
  5181. static const char __pyx_k_Write_failed_callbacks[] = "Write failed callbacks: {}";
  5182. static const char __pyx_k_call_exception_handler[] = "call_exception_handler";
  5183. static const char __pyx_k_cancel_request_is_NULL[] = "{}.cancel: .request is NULL";
  5184. static const char __pyx_k_concurrent_allocations[] = "concurrent allocations";
  5185. static const char __pyx_k_create_default_context[] = "create_default_context";
  5186. static const char __pyx_k_create_unix_connection[] = "create_unix_connection";
  5187. static const char __pyx_k_invalid_Handle_cb_type[] = "invalid Handle.cb_type: {}";
  5188. static const char __pyx_k_r_starts_SSL_handshake[] = "%r starts SSL handshake";
  5189. static const char __pyx_k_Invalid_file_descriptor[] = "Invalid file descriptor: {}";
  5190. static const char __pyx_k_Loop_connect_write_pipe[] = "Loop.connect_write_pipe";
  5191. static const char __pyx_k_Loop_create_unix_server[] = "Loop.create_unix_server";
  5192. static const char __pyx_k_Loop_shutdown_asyncgens[] = "Loop.shutdown_asyncgens";
  5193. static const char __pyx_k_ReadSubprocessPipeProto[] = "ReadSubprocessPipeProto";
  5194. static const char __pyx_k_asyncgen_finalizer_hook[] = "_asyncgen_finalizer_hook";
  5195. static const char __pyx_k_asyncgen_firstiter_hook[] = "_asyncgen_firstiter_hook";
  5196. static const char __pyx_k_connect_accepted_socket[] = "connect_accepted_socket";
  5197. static const char __pyx_k_expected_asyncio_Future[] = ", expected asyncio.Future";
  5198. static const char __pyx_k_service_proto_not_found[] = "service/proto not found";
  5199. static const char __pyx_k_uvloop_sleep_after_fork[] = "__uvloop_sleep_after_fork";
  5200. static const char __pyx_k_AF_UNSPEC_in_DNS_results[] = "AF_UNSPEC in DNS results";
  5201. static const char __pyx_k_Fatal_error_on_transport[] = "Fatal error on transport ";
  5202. static const char __pyx_k_SSL_connection_is_closed[] = "SSL connection is closed";
  5203. static const char __pyx_k_WriteSubprocessPipeProto[] = "WriteSubprocessPipeProto";
  5204. static const char __pyx_k_context_manager_protocol[] = "context manager protocol";
  5205. static const char __pyx_k_create_datagram_endpoint[] = "create_datagram_endpoint";
  5206. static const char __pyx_k_exception_in_Task___repr[] = "exception in Task.__repr__";
  5207. static const char __pyx_k_loop__exec_queued_writes[] = "loop._exec_queued_writes";
  5208. static const char __pyx_k_set_wakeup_fd_1_failed_s[] = "set_wakeup_fd(-1) failed: %s";
  5209. static const char __pyx_k_sig_must_be_an_int_not_r[] = "sig must be an int, not {!r}";
  5210. static const char __pyx_k_Read_EOF_failed_callbacks[] = "Read EOF failed callbacks: {}";
  5211. static const char __pyx_k_abort_init__closed_is_set[] = "_abort_init: {}._closed is set";
  5212. static const char __pyx_k_abort_init__inited_is_set[] = "_abort_init: {}._inited is set";
  5213. static const char __pyx_k_default_exception_handler[] = "default_exception_handler";
  5214. static const char __pyx_k_pyx_unpickle_PseudoSocket[] = "__pyx_unpickle_PseudoSocket";
  5215. static const char __pyx_k_unexpected_address_family[] = "unexpected address family";
  5216. static const char __pyx_k_Error_calling_eof_received[] = "Error calling eof_received()";
  5217. static const char __pyx_k_Fatal_error_on_transport_2[] = "Fatal error on transport";
  5218. static const char __pyx_k_Loop___get___locals_lambda[] = "Loop.__get__.<locals>.<lambda>";
  5219. static const char __pyx_k_close__handle_data_is_NULL[] = "{}._close: _handle.data is NULL";
  5220. static const char __pyx_k_is_alive_but__loop_is_None[] = "{} is alive, but _loop is None";
  5221. static const char __pyx_k_r_SSL_handshake_took_1f_ms[] = "%r: SSL handshake took %.1f ms";
  5222. static const char __pyx_k_uvloop_handles_process_pyx[] = "uvloop/handles/process.pyx";
  5223. static const char __pyx_k_Address_r_is_already_in_use[] = "Address {!r} is already in use";
  5224. static const char __pyx_k_Executing_r_took_3f_seconds[] = "Executing %r took %.3f seconds";
  5225. static const char __pyx_k_Executing_s_took_3f_seconds[] = "Executing %s took %.3f seconds";
  5226. static const char __pyx_k_Fatal_error_on_SSL_protocol[] = "Fatal error on SSL protocol";
  5227. static const char __pyx_k_Loop_create_unix_connection[] = "Loop.create_unix_connection";
  5228. static const char __pyx_k_cancel_request_data_is_NULL[] = "{}.cancel: .request.data is NULL";
  5229. static const char __pyx_k_cannot_switch_state_from_to[] = "cannot switch state from {} to {}";
  5230. static const char __pyx_k_close_uv_is_closing_is_true[] = "{}._close: uv_is_closing() is true";
  5231. static const char __pyx_k_host_must_be_a_str_or_bytes[] = "host must be a str or bytes";
  5232. static const char __pyx_k_invalid__init_protocol_call[] = "invalid _init_protocol call";
  5233. static const char __pyx_k_Loop_connect_accepted_socket[] = "Loop.connect_accepted_socket";
  5234. static const char __pyx_k_SyncSocketReaderFuture__loop[] = "_SyncSocketReaderFuture__loop";
  5235. static const char __pyx_k_SyncSocketReaderFuture__sock[] = "_SyncSocketReaderFuture__sock";
  5236. static const char __pyx_k_SyncSocketWriterFuture__loop[] = "_SyncSocketWriterFuture__loop";
  5237. static const char __pyx_k_SyncSocketWriterFuture__sock[] = "_SyncSocketWriterFuture__sock";
  5238. static const char __pyx_k_UVHandles_python_libuv_total[] = "UVHandles python | libuv | total";
  5239. static const char __pyx_k_called_with_handle_data_NULL[] = "{} called with handle.data == NULL";
  5240. static const char __pyx_k_could_not_bind_to_local_addr[] = "could not bind to local_addr {}";
  5241. static const char __pyx_k_is_alive_but__handle_is_NULL[] = "{} is alive, but _handle is NULL";
  5242. static const char __pyx_k_socket_send_raised_exception[] = "socket.send() raised exception.";
  5243. static const char __pyx_k_startupinfo_is_not_supported[] = "startupinfo is not supported";
  5244. static const char __pyx_k_AF_INET_address_must_be_tuple[] = "AF_INET address must be tuple";
  5245. static const char __pyx_k_Handle_loop_is_None_in_Handle[] = "Handle.loop is None in Handle.__dealloc__";
  5246. static const char __pyx_k_IPv4_sockaddr_must_be_2_tuple[] = "IPv4 sockaddr must be 2 tuple";
  5247. static const char __pyx_k_Loop_create_datagram_endpoint[] = "Loop.create_datagram_endpoint";
  5248. static const char __pyx_k_SyncSocketReaderFuture___init[] = "_SyncSocketReaderFuture.__init__";
  5249. static const char __pyx_k_SyncSocketReaderFuture_cancel[] = "_SyncSocketReaderFuture.cancel";
  5250. static const char __pyx_k_SyncSocketWriterFuture___init[] = "_SyncSocketWriterFuture.__init__";
  5251. static const char __pyx_k_SyncSocketWriterFuture_cancel[] = "_SyncSocketWriterFuture.cancel";
  5252. static const char __pyx_k_all_args_must_be_str_or_bytes[] = "all args must be str or bytes";
  5253. static const char __pyx_k_could_not_bind_to_remote_addr[] = "could not bind to remote_addr {}";
  5254. static const char __pyx_k_dealloc____handle_is_NULL__cl[] = "{}.__dealloc__: _handle is NULL, _closed == 1";
  5255. static const char __pyx_k_does_not_have_a_reader_in_the[] = " does not have a reader in the _sock_recv callback";
  5256. static const char __pyx_k_does_not_have_a_writer_in_the[] = " does not have a writer in the _sock_sendall callback";
  5257. static const char __pyx_k_integer_argument_expected_got[] = "integer argument expected, got {}";
  5258. static const char __pyx_k_is_longer_than_107_characters[] = " is longer than 107 characters";
  5259. static const char __pyx_k_is_not_supported_by_start_tls[] = " is not supported by start_tls()";
  5260. static const char __pyx_k_protocol_pause_writing_failed[] = "protocol.pause_writing() failed";
  5261. static const char __pyx_k_r_fileno_returned_non_integer[] = "{!r}.fileno() returned non-integer";
  5262. static const char __pyx_k_start_init_can_only_be_called[] = "{}._start_init can only be called once";
  5263. static const char __pyx_k_AF_INET6_address_must_be_tuple[] = "AF_INET6 address must be tuple";
  5264. static const char __pyx_k_Cannot_serialize_socket_object[] = "Cannot serialize socket object";
  5265. static const char __pyx_k_Pyx_CFunc_object____Loop____bi[] = "__Pyx_CFunc_object____Loop____bint___to_py.<locals>.wrap";
  5266. static const char __pyx_k_Sock_ops_successful_on_1st_try[] = "--- Sock ops successful on 1st try: ---";
  5267. static const char __pyx_k_cannot_apply_subprocess_STDOUT[] = "cannot apply subprocess.STDOUT";
  5268. static const char __pyx_k_close__handle_data_is_not_UVHa[] = "{}._close: _handle.data is not UVHandle/self";
  5269. static const char __pyx_k_creationflags_is_not_supported[] = "creationflags is not supported";
  5270. static const char __pyx_k_fatal_sent_0_in_advance_uv_buf[] = "fatal: sent < 0 in advance_uv_buf";
  5271. static const char __pyx_k_protocol_resume_writing_failed[] = "protocol.resume_writing() failed";
  5272. static const char __pyx_k_unclosed_transport_uvloop_loop[] = "unclosed transport <uvloop.loop._SSLProtocolTransport object>";
  5273. static const char __pyx_k_uv_close_handle_cb_handle_loop[] = "__uv_close_handle_cb: handle.loop is invalid";
  5274. static const char __pyx_k_AF_INET6_must_be_a_tuple_of_2_4[] = "AF_INET6 must be a tuple of 2-4 parameters: (host, port, flowinfo?, scope_id?)";
  5275. static const char __pyx_k_A_UDP_Socket_was_expected_got_r[] = "A UDP Socket was expected, got {!r}";
  5276. static const char __pyx_k_A_UNIX_Domain_Stream_Socket_was[] = "A UNIX Domain Stream Socket was expected, got {!r}";
  5277. static const char __pyx_k_AddrInfoRequest_callback_called[] = "AddrInfoRequest callback called with NULL resolver.data";
  5278. static const char __pyx_k_Bad_exception_data_from_child_r[] = "Bad exception data from child: {!r}";
  5279. static const char __pyx_k_Cannot_run_the_event_loop_while[] = "Cannot run the event loop while another loop is running";
  5280. static const char __pyx_k_Neither_host_port_nor_sock_were[] = "Neither host/port nor sock were specified";
  5281. static const char __pyx_k_Pickling_of_struct_members_such[] = "Pickling of struct members such as self.addr must be explicitly requested with @auto_pickle(True)";
  5282. static const char __pyx_k_StreamWriteContext_close_py_buf[] = "_StreamWriteContext.close: py_bufs != NULL and py_bufs_sml_inuse is True";
  5283. static const char __pyx_k_StreamWriteContext_close_uv_buf[] = "_StreamWriteContext.close: uv_bufs != NULL and py_bufs_sml_inuse is True";
  5284. static const char __pyx_k_UVStream__try_write_called_with[] = "UVStream._try_write called with data in uv buffers";
  5285. static const char __pyx_k_Unable_to_check_or_remove_stale[] = "Unable to check or remove stale UNIX socket %r: %r";
  5286. static const char __pyx_k_WriteSubprocessPipeProto___init[] = "WriteSubprocessPipeProto.__init__";
  5287. static const char __pyx_k_WriteSubprocessPipeProto___repr[] = "WriteSubprocessPipeProto.__repr__";
  5288. static const char __pyx_k_WriteSubprocessPipeProto_resume[] = "WriteSubprocessPipeProto.resume_writing";
  5289. static const char __pyx_k_asyncio_is_trying_to_install_it[] = "!!! asyncio is trying to install its ChildWatcher for SIGCHLD signal !!!\n\nThis is probably because a uvloop instance is used with asyncio.set_event_loop(). The correct way to use uvloop is to install its policy: `asyncio.set_event_loop_policy(uvloop.EventLoopPolicy())`\n\n";
  5290. static const char __pyx_k_buffer_size_is_not_0_after_a_su[] = "_buffer_size is not 0 after a successful _exec_write";
  5291. static const char __pyx_k_called_after_destroying_the_UVH[] = "{} called after destroying the UVHandle";
  5292. static const char __pyx_k_cancel_request_data_is_not_UVRe[] = "{}.cancel: .request.data is not UVRequest";
  5293. static const char __pyx_k_cannot_add_a_signal_handler_for[] = "cannot add a signal handler for SIGCHLD: it is used by the event loop to track subprocesses";
  5294. static const char __pyx_k_cannot_run_TimerHandle_callback[] = "cannot run TimerHandle; callback is not set";
  5295. static const char __pyx_k_cannot_spawn_a_process_args_are[] = "cannot spawn a process: args are empty";
  5296. static const char __pyx_k_context_argument_requires_Pytho[] = "\"context\" argument requires Python 3.7";
  5297. static const char __pyx_k_create_datagram_endpoint_locals[] = "create_datagram_endpoint.<locals>.genexpr";
  5298. static const char __pyx_k_deallocating_an_open_event_loop[] = "deallocating an open event loop";
  5299. static const char __pyx_k_does_not_have_a_reader_in_the_2[] = " does not have a reader in the _sock_recv_into callback";
  5300. static const char __pyx_k_expected_AF_INET_AF_INET6_or_AF[] = "expected AF_INET, AF_INET6, or AF_UNIX family, got ";
  5301. static const char __pyx_k_getaddrinfo_returned_empty_list[] = "getaddrinfo() returned empty list";
  5302. static const char __pyx_k_getsockaddrarg_flowinfo_must_be[] = "getsockaddrarg: flowinfo must be 0-1048575.";
  5303. static const char __pyx_k_getsockaddrarg_scope_id_must_be[] = "getsockaddrarg: scope_id must be unsigned 32 bit integer";
  5304. static const char __pyx_k_handle_loop_is_NULL_in___ensure[] = "handle.loop is NULL in __ensure_handle_data";
  5305. static const char __pyx_k_host_and_port_was_not_specified[] = "host and port was not specified and no sock specified";
  5306. static const char __pyx_k_is_alive_but__handle_data_is_no[] = "{} is alive, but _handle.data is not initialized";
  5307. static const char __pyx_k_is_alive_but__handle_loop_is_no[] = "{} is alive, but _handle.loop is not initialized";
  5308. static const char __pyx_k_is_already_being_awaited_on_ser[] = " is already being awaited on serve_forever()";
  5309. static const char __pyx_k_is_not_supposed_to_be_instantia[] = "{} is not supposed to be instantiated from Python";
  5310. static const char __pyx_k_is_open_in___dealloc___with_loo[] = "{} is open in __dealloc__ with loop set to NULL";
  5311. static const char __pyx_k_no_path_and_sock_were_specified[] = "no path and sock were specified";
  5312. static const char __pyx_k_port_must_be_a_str_bytes_or_int[] = "port must be a str, bytes or int";
  5313. static const char __pyx_k_protocol_is_not_set_cannot_call[] = "protocol is not set, cannot call connection_made()";
  5314. static const char __pyx_k_seconds_aborting_the_connection[] = " seconds: aborting the connection";
  5315. static const char __pyx_k_sock_recv_into_is_called_on_a_c[] = "_sock_recv_into is called on a cancelled Future";
  5316. static const char __pyx_k_sock_recv_is_called_on_a_cancel[] = "_sock_recv is called on a cancelled Future";
  5317. static const char __pyx_k_sock_sendall_is_called_on_a_can[] = "_sock_sendall is called on a cancelled Future";
  5318. static const char __pyx_k_sockaddr_must_be_a_tuple_of_2_3[] = "sockaddr must be a tuple of 2, 3 or 4 values";
  5319. static const char __pyx_k_socket_family_mismatch_or_a_DNS[] = ": socket family mismatch or a DNS lookup is required";
  5320. static const char __pyx_k_ssl_handshake_timeout_should_be[] = "ssl_handshake_timeout should be a positive number, got ";
  5321. static const char __pyx_k_sslcontext_is_expected_to_be_an[] = "sslcontext is expected to be an instance of ssl.SSLContext, got ";
  5322. static const char __pyx_k_task_factory_must_be_a_callable[] = "task factory must be a callable or None";
  5323. static const char __pyx_k_the_socket_must_be_non_blocking[] = "the socket must be non-blocking";
  5324. static const char __pyx_k_try_write_sent_all_data_and_ret[] = "_try_write sent all data and returned non-zero";
  5325. static const char __pyx_k_unable_to_start_the_loop_it_was[] = "unable to start the loop; it was closed";
  5326. static const char __pyx_k_uv_handle_t_current_freed_total[] = "uv_handle_t (current: {}; freed: {}; total: {})";
  5327. static const char __pyx_k_uv_udp_receive_callback_addr_is[] = "uv_udp.receive callback: addr is NULL and nread >= 0";
  5328. static const char __pyx_k_uvloop_PseudoSocket_fd_family_s[] = "<uvloop.PseudoSocket fd={}, family={!s}, type={!s}, proto={}";
  5329. static const char __pyx_k_without_no_gc_clear_loop_was_se[] = "{} without @no_gc_clear; loop was set to None by GC";
  5330. static const char __pyx_k_AF_INET_address_must_be_tuple_of[] = "AF_INET address must be tuple of (host, port)";
  5331. static const char __pyx_k_AF_UNIX_address_must_be_a_str_or[] = "AF_UNIX address must be a str or a bytes object";
  5332. static const char __pyx_k_A_Stream_Socket_was_expected_got[] = "A Stream Socket was expected, got {!r}";
  5333. static const char __pyx_k_A_callable_object_or_None_is_exp[] = "A callable object or None is expected, got {!r}";
  5334. static const char __pyx_k_Cannot_call_write_after_write_eo[] = "Cannot call write() after write_eof()";
  5335. static const char __pyx_k_Cannot_call_writelines_after_wri[] = "Cannot call writelines() after write_eof()";
  5336. static const char __pyx_k_Cannot_close_a_running_event_loo[] = "Cannot close a running event loop";
  5337. static const char __pyx_k_Creating__SSLProtocolTransport_t[] = "Creating _SSLProtocolTransport twice";
  5338. static const char __pyx_k_Event_loop_stopped_before_Future[] = "Event loop stopped before Future completed.";
  5339. static const char __pyx_k_Exception_in___repr___r_value_ty[] = "Exception in __repr__ {!r}; value type: {!r}";
  5340. static const char __pyx_k_Exception_in_default_exception_h[] = "Exception in default exception handler";
  5341. static const char __pyx_k_Exception_occurred_in_preexec_fn[] = "Exception occurred in preexec_fn.";
  5342. static const char __pyx_k_Fatal_write_error_on_datagram_tr[] = "Fatal write error on datagram transport";
  5343. static const char __pyx_k_File_descriptor_r_is_used_by_tra[] = "File descriptor {!r} is used by transport {!r}";
  5344. static const char __pyx_k_Incompatible_checksums_s_vs_0x53[] = "Incompatible checksums (%s vs 0x53368d7 = (_dict, _dict_get, _dict_move_to_end, _maxsize))";
  5345. static const char __pyx_k_Incompatible_checksums_s_vs_0x88[] = "Incompatible checksums (%s vs 0x88c0b03 = (_family, _fd, _peername, _proto, _sockname, _type))";
  5346. static const char __pyx_k_Loop__getaddrinfo_locals_callbac[] = "Loop._getaddrinfo.<locals>.callback";
  5347. static const char __pyx_k_Loop__getnameinfo_locals_callbac[] = "Loop._getnameinfo.<locals>.callback";
  5348. static const char __pyx_k_Loop__sock_connect_locals_lambda[] = "Loop._sock_connect.<locals>.<lambda>";
  5349. static const char __pyx_k_Non_thread_safe_operation_invoke[] = "Non-thread-safe operation invoked on an event loop other than the current one";
  5350. static const char __pyx_k_Object_created_at_most_recent_ca[] = "Object created at (most recent call last):\n";
  5351. static const char __pyx_k_Racing_with_another_loop_to_spaw[] = "Racing with another loop to spawn a process.";
  5352. static const char __pyx_k_ReadSubprocessPipeProto_data_rec[] = "ReadSubprocessPipeProto.data_received";
  5353. static const char __pyx_k_SSLProtocol__do_read__buffered_l[] = "SSLProtocol._do_read__buffered.<locals>.<lambda>";
  5354. static const char __pyx_k_SSLProtocol__resume_reading_loca[] = "SSLProtocol._resume_reading.<locals>.resume";
  5355. static const char __pyx_k_SSLProtocol__start_handshake_loc[] = "SSLProtocol._start_handshake.<locals>.<lambda>";
  5356. static const char __pyx_k_SSLProtocol__start_shutdown_loca[] = "SSLProtocol._start_shutdown.<locals>.<lambda>";
  5357. static const char __pyx_k_SSL_handshake_failed_on_verifyin[] = "SSL handshake failed on verifying the certificate";
  5358. static const char __pyx_k_SSL_handshake_is_taking_longer_t[] = "SSL handshake is taking longer than ";
  5359. static const char __pyx_k_Server_side_SSL_needs_a_valid_SS[] = "Server side SSL needs a valid SSLContext";
  5360. static const char __pyx_k_UDPTransport_family_is_undefined[] = "UDPTransport.family is undefined; cannot create python socket";
  5361. static const char __pyx_k_UVProcessTransport__call_connect[] = "UVProcessTransport._call_connection_made";
  5362. static const char __pyx_k_UVProcess__close_after_spawn_cal[] = "UVProcess._close_after_spawn called after uv_spawn";
  5363. static const char __pyx_k_UVStream_shutdown_callback_calle[] = "UVStream.shutdown callback called with NULL req.data, status=%r";
  5364. static const char __pyx_k_UVStream_write_callback_called_w[] = "UVStream.write callback called with NULL req.data, status=%r";
  5365. static const char __pyx_k_UVTransport__call_connection_los[] = "UVTransport._call_connection_lost";
  5366. static const char __pyx_k_UVTransport__call_connection_mad[] = "UVTransport._call_connection_made";
  5367. static const char __pyx_k_Unhandled_error_in_exception_han[] = "Unhandled error in exception handler";
  5368. static const char __pyx_k_Unhandled_exception_in_event_loo[] = "Unhandled exception in event loop";
  5369. static const char __pyx_k_WriteSubprocessPipeProto_connect[] = "WriteSubprocessPipeProto.connection_made";
  5370. static const char __pyx_k_WriteSubprocessPipeProto_pause_w[] = "WriteSubprocessPipeProto.pause_writing";
  5371. static const char __pyx_k_XXX_an_allocated_buffer_in_trans[] = "XXX: an allocated buffer in transport._close()";
  5372. static const char __pyx_k_You_must_set_server_hostname_whe[] = "You must set server_hostname when using ssl without a host";
  5373. static const char __pyx_k_active_TimerHandle_is_deallacati[] = "active TimerHandle is deallacating";
  5374. static const char __pyx_k_all_environment_values_must_be_b[] = "all environment values must be bytes or str";
  5375. static const char __pyx_k_all_environment_vars_must_be_byt[] = "all environment vars must be bytes or str";
  5376. static const char __pyx_k_an_error_occurred_during_closing[] = "an error occurred during closing of asynchronous generator {!r}";
  5377. static const char __pyx_k_asynchronous_generator_r_was_sch[] = "asynchronous generator {!r} was scheduled after loop.shutdown_asyncgens() call";
  5378. static const char __pyx_k_cannot_convert_sockaddr_into_Pyt[] = "cannot convert sockaddr into Python object";
  5379. static const char __pyx_k_cannot_open_a_UDP_handle_invalid[] = "cannot open a UDP handle, invalid family {}";
  5380. static const char __pyx_k_cannot_run_Handle_callback_is_no[] = "cannot run Handle; callback is not set";
  5381. static const char __pyx_k_closed_Transport_handle_and_unse[] = "closed Transport handle and unset waiter";
  5382. static const char __pyx_k_coroutines_cannot_be_used_with_a[] = "coroutines cannot be used with add_signal_handler()";
  5383. static const char __pyx_k_coroutines_cannot_be_used_with_r[] = "coroutines cannot be used with run_in_executor()";
  5384. static const char __pyx_k_could_not_close_attached_file_ob[] = "could not close attached file object ";
  5385. static const char __pyx_k_create_connection_locals_genexpr[] = "create_connection.<locals>.genexpr";
  5386. static const char __pyx_k_create_server_failed_to_create_s[] = "create_server() failed to create socket.socket(%r, %r, %r)";
  5387. static const char __pyx_k_cwd_must_be_a_str_or_bytes_objec[] = "cwd must be a str or bytes object";
  5388. static const char __pyx_k_data_expecting_a_bytes_like_inst[] = "data: expecting a bytes-like instance, got ";
  5389. static const char __pyx_k_deallocating_a_running_event_loo[] = "deallocating a running event loop!";
  5390. static const char __pyx_k_error_status_in_uv_stream_t_list[] = "error status in uv_stream_t.listen callback";
  5391. static const char __pyx_k_error_status_in_uv_stream_t_read[] = "error status in uv_stream_t.read callback";
  5392. static const char __pyx_k_error_status_in_uv_stream_t_shut[] = "error status in uv_stream_t.shutdown callback";
  5393. static const char __pyx_k_error_status_in_uv_stream_t_writ[] = "error status in uv_stream_t.write callback";
  5394. static const char __pyx_k_error_while_attempting_to_bind_o[] = "error while attempting to bind on address ";
  5395. static const char __pyx_k_fatal_Could_not_advance__StreamW[] = "fatal: Could not advance _StreamWriteContext";
  5396. static const char __pyx_k_get_coroutine_origin_tracking_de[] = "get_coroutine_origin_tracking_depth";
  5397. static const char __pyx_k_getnameinfo_argument_1_must_be_a[] = "getnameinfo() argument 1 must be a tuple";
  5398. static const char __pyx_k_getnameinfo_flowinfo_must_be_0_1[] = "getnameinfo(): flowinfo must be 0-1048575.";
  5399. static const char __pyx_k_handle_data_is_NULL_in___close_a[] = "handle.data is NULL in __close_all_handles_cb";
  5400. static const char __pyx_k_handle_loop_data_is_NULL_in___en[] = "handle.loop.data is NULL in __ensure_handle_data";
  5401. static const char __pyx_k_has_handle_0_in___uv_close_handl[] = "has_handle=0 in __uv_close_handle_cb";
  5402. static const char __pyx_k_host_must_be_a_string_or_bytes_o[] = "host must be a string or bytes object";
  5403. static const char __pyx_k_host_port_and_sock_can_not_be_sp[] = "host/port and sock can not be specified at the same time";
  5404. static const char __pyx_k_invalid_data_in_writebuf_an_inst[] = "invalid data in writebuf: an instance of bytes, bytearray or memoryview was expected, got {}";
  5405. static const char __pyx_k_invalid_socket_family_expected_A[] = "invalid socket family, expected AF_UNIX, AF_INET or AF_INET6";
  5406. static const char __pyx_k_local_addr_must_be_a_tuple_of_ho[] = "local_addr must be a tuple of host and port";
  5407. static const char __pyx_k_loop__queued_streams_are_not_emp[] = "loop._queued_streams are not empty after _exec_queued_writes";
  5408. static const char __pyx_k_loop_set_debug_False_cannot_unse[] = "loop.set_debug(False): cannot unset debug coroutine wrapper; another wrapper was set %r";
  5409. static const char __pyx_k_loop_set_debug_True_cannot_set_d[] = "loop.set_debug(True): cannot set debug coroutine wrapper; another wrapper is already set %r";
  5410. static const char __pyx_k_maxsize_is_expected_to_be_greate[] = "maxsize is expected to be greater than 0, got ";
  5411. static const char __pyx_k_new_callbacks_were_queued_during[] = "new callbacks were queued during loop closing: ";
  5412. static const char __pyx_k_new_poll_handles_were_queued_dur[] = "new poll handles were queued during loop closing: ";
  5413. static const char __pyx_k_new_timers_were_queued_during_lo[] = "new timers were queued during loop closing: ";
  5414. static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__";
  5415. static const char __pyx_k_no_python_buffer_is_allocated_in[] = "no python buffer is allocated in on_read; nread=";
  5416. static const char __pyx_k_object_created_at_most_recent_ca[] = "object created at (most recent call last):\n{}";
  5417. static const char __pyx_k_open__StreamWriteContext_is_bein[] = "open _StreamWriteContext is being deallocated";
  5418. static const char __pyx_k_open__UDPSendContext_is_being_de[] = "open _UDPSendContext is being deallocated";
  5419. static const char __pyx_k_path_and_sock_can_not_be_specifi[] = "path and sock can not be specified at the same time";
  5420. static const char __pyx_k_path_was_not_specified_and_no_so[] = "path was not specified, and no sock specified";
  5421. static const char __pyx_k_remote_addr_must_be_a_tuple_of_h[] = "remote_addr must be a tuple of (host, port)";
  5422. static const char __pyx_k_returning_true_from_eof_received[] = "returning true from eof_received() has no effect when using ssl";
  5423. static const char __pyx_k_reuse_port_not_supported_by_sock[] = "reuse_port not supported by socket module";
  5424. static const char __pyx_k_run_until_complete_locals_lambda[] = "run_until_complete.<locals>.<lambda>";
  5425. static const char __pyx_k_self_py_buf_self_req_cannot_be_c[] = "self.py_buf,self.req cannot be converted to a Python object for pickling";
  5426. static const char __pyx_k_self_py_bufs_self_py_bufs_sml_se[] = "self.py_bufs,self.py_bufs_sml,self.req,self.uv_bufs,self.uv_bufs_start cannot be converted to a Python object for pickling";
  5427. static const char __pyx_k_server_hostname_is_only_meaningf[] = "server_hostname is only meaningful with ssl";
  5428. static const char __pyx_k_set_coroutine_origin_tracking_de[] = "set_coroutine_origin_tracking_depth";
  5429. static const char __pyx_k_set_wakeup_fd_only_works_in_main[] = "set_wakeup_fd only works in main thread";
  5430. static const char __pyx_k_setblocking_transport_sockets_ca[] = "setblocking(): transport sockets cannot be blocking";
  5431. static const char __pyx_k_settimeout_only_0_timeout_is_all[] = "settimeout(): only 0 timeout is allowed on transport sockets";
  5432. static const char __pyx_k_sockaddr_resolved_to_multiple_ad[] = "sockaddr resolved to multiple addresses";
  5433. static const char __pyx_k_socket_modifier_keyword_argument[] = "socket modifier keyword arguments can not be used when sock is specified. ({})";
  5434. static const char __pyx_k_ssl_argument_must_be_an_SSLConte[] = "ssl argument must be an SSLContext or None";
  5435. static const char __pyx_k_ssl_handshake_timeout_is_only_me[] = "ssl_handshake_timeout is only meaningful with ssl";
  5436. static const char __pyx_k_ssl_is_expected_to_be_None_or_an[] = "ssl is expected to be None or an instance of ssl.SSLContext, got {!r}";
  5437. static const char __pyx_k_ssl_shutdown_timeout_is_only_mea[] = "ssl_shutdown_timeout is only meaningful with ssl";
  5438. static const char __pyx_k_ssl_shutdown_timeout_should_be_a[] = "ssl_shutdown_timeout should be a positive number, got ";
  5439. static const char __pyx_k_stream_is_open_after_UVStream__t[] = "stream is open after UVStream._try_write returned None";
  5440. static const char __pyx_k_subprocess_STDOUT_is_supported_o[] = "subprocess.STDOUT is supported only by stderr parameter";
  5441. static const char __pyx_k_this_event_loop_is_already_runni[] = "this event loop is already running.";
  5442. static const char __pyx_k_transport_sockets_do_not_support[] = "transport sockets do not support {}";
  5443. static const char __pyx_k_unable_to_listen_no_protocol_fac[] = "unable to listen(); no protocol_factory";
  5444. static const char __pyx_k_unable_to_perform_operation_on_r[] = "unable to perform operation on {!r}; the handler is closed";
  5445. static const char __pyx_k_unclosed_resource_r_could_not_se[] = "unclosed resource {!r}; could not serialize debug traceback: {}: {}";
  5446. static const char __pyx_k_unhandled_error_or_an_empty_buff[] = "unhandled error (or an empty buffer) in get_buffer()";
  5447. static const char __pyx_k_universal_newlines_must_be_False[] = "universal_newlines must be False";
  5448. static const char __pyx_k_getaddrinfo_returned_empty_list_2[] = "getaddrinfo() returned empty list for local_addr";
  5449. static const char __pyx_k_Exception_in_default_exception_h_2[] = "Exception in default exception handler while handling an unexpected error in custom exception handler";
  5450. static const char __pyx_k_UDPTransport_family_is_undefined_2[] = "UDPTransport.family is undefined; cannot send";
  5451. static const char __pyx_k_WriteSubprocessPipeProto_connect_2[] = "WriteSubprocessPipeProto.connection_lost";
  5452. static const char __pyx_k_local_addr_must_be_a_tuple_of_ho_2[] = "local_addr must be a tuple of (host, port)";
  5453. static PyObject *__pyx_kp_b_1;
  5454. static PyObject *__pyx_kp_u_18_7_7_7;
  5455. static PyObject *__pyx_kp_u_AF_INET6_address_must_be_tuple;
  5456. static PyObject *__pyx_kp_u_AF_INET6_must_be_a_tuple_of_2_4;
  5457. static PyObject *__pyx_kp_u_AF_INET_address_must_be_tuple;
  5458. static PyObject *__pyx_kp_u_AF_INET_address_must_be_tuple_of;
  5459. static PyObject *__pyx_kp_u_AF_UNIX_address_must_be_a_str_or;
  5460. static PyObject *__pyx_kp_u_AF_UNSPEC_in_DNS_results;
  5461. static PyObject *__pyx_kp_u_A_Stream_Socket_was_expected_got;
  5462. static PyObject *__pyx_kp_u_A_UDP_Socket_was_expected_got_r;
  5463. static PyObject *__pyx_kp_u_A_UNIX_Domain_Stream_Socket_was;
  5464. static PyObject *__pyx_kp_u_A_callable_object_or_None_is_exp;
  5465. static PyObject *__pyx_n_s_AbstractChildWatcher;
  5466. static PyObject *__pyx_n_s_AddrInfo;
  5467. static PyObject *__pyx_n_s_AddrInfoRequest;
  5468. static PyObject *__pyx_kp_u_AddrInfoRequest_callback_called;
  5469. static PyObject *__pyx_kp_u_AddrInfo_data_is_NULL;
  5470. static PyObject *__pyx_n_s_AddressFamily;
  5471. static PyObject *__pyx_kp_u_Address_r_is_already_in_use;
  5472. static PyObject *__pyx_n_s_AttributeError;
  5473. static PyObject *__pyx_kp_u_Bad_exception_data_from_child_r;
  5474. static PyObject *__pyx_n_s_BaseException;
  5475. static PyObject *__pyx_n_s_BaseProtocol;
  5476. static PyObject *__pyx_n_s_BlockingIOError;
  5477. static PyObject *__pyx_n_s_BrokenPipeError;
  5478. static PyObject *__pyx_kp_u_Callback_handles_8;
  5479. static PyObject *__pyx_n_s_CancelledError;
  5480. static PyObject *__pyx_kp_u_Cannot_call_write_after_write_eo;
  5481. static PyObject *__pyx_kp_u_Cannot_call_writelines_after_wri;
  5482. static PyObject *__pyx_kp_u_Cannot_close_a_running_event_loo;
  5483. static PyObject *__pyx_kp_u_Cannot_run_the_event_loop_while;
  5484. static PyObject *__pyx_kp_u_Cannot_serialize_socket_object;
  5485. static PyObject *__pyx_n_s_CertificateError;
  5486. static PyObject *__pyx_kp_u_Connect_call_failed;
  5487. static PyObject *__pyx_n_s_ConnectionAbortedError;
  5488. static PyObject *__pyx_n_s_ConnectionRefusedError;
  5489. static PyObject *__pyx_n_s_ConnectionResetError;
  5490. static PyObject *__pyx_n_s_Counter;
  5491. static PyObject *__pyx_kp_u_Creating__SSLProtocolTransport_t;
  5492. static PyObject *__pyx_n_s_DEVNULL;
  5493. static PyObject *__pyx_n_u_EAI_ADDRFAMILY;
  5494. static PyObject *__pyx_n_u_EAI_AGAIN;
  5495. static PyObject *__pyx_n_u_EAI_BADFLAGS;
  5496. static PyObject *__pyx_n_u_EAI_BADHINTS;
  5497. static PyObject *__pyx_n_u_EAI_CANCELED;
  5498. static PyObject *__pyx_n_u_EAI_FAIL;
  5499. static PyObject *__pyx_n_u_EAI_FAMILY;
  5500. static PyObject *__pyx_n_u_EAI_MEMORY;
  5501. static PyObject *__pyx_n_u_EAI_NODATA;
  5502. static PyObject *__pyx_n_u_EAI_NONAME;
  5503. static PyObject *__pyx_n_u_EAI_OVERFLOW;
  5504. static PyObject *__pyx_n_u_EAI_PROTOCOL;
  5505. static PyObject *__pyx_n_u_EAI_SERVICE;
  5506. static PyObject *__pyx_n_u_EAI_SOCKTYPE;
  5507. static PyObject *__pyx_kp_u_Error_calling_eof_received;
  5508. static PyObject *__pyx_kp_u_Errors_logged;
  5509. static PyObject *__pyx_kp_u_Event_loop_is_closed;
  5510. static PyObject *__pyx_kp_u_Event_loop_stopped_before_Future;
  5511. static PyObject *__pyx_kp_u_Exception_in___repr___r_value_ty;
  5512. static PyObject *__pyx_kp_u_Exception_in_callback;
  5513. static PyObject *__pyx_kp_u_Exception_in_default_exception_h;
  5514. static PyObject *__pyx_kp_u_Exception_in_default_exception_h_2;
  5515. static PyObject *__pyx_kp_u_Exception_occurred_in_preexec_fn;
  5516. static PyObject *__pyx_kp_u_Executing_r_took_3f_seconds;
  5517. static PyObject *__pyx_kp_u_Executing_s_took_3f_seconds;
  5518. static PyObject *__pyx_kp_u_Fatal_error_on_SSL_protocol;
  5519. static PyObject *__pyx_kp_u_Fatal_error_on_server;
  5520. static PyObject *__pyx_kp_u_Fatal_error_on_transport;
  5521. static PyObject *__pyx_kp_u_Fatal_error_on_transport_2;
  5522. static PyObject *__pyx_kp_u_Fatal_write_error_on_datagram_tr;
  5523. static PyObject *__pyx_n_s_FileExistsError;
  5524. static PyObject *__pyx_n_s_FileNotFoundError;
  5525. static PyObject *__pyx_kp_u_File_descriptor_r_is_used_by_tra;
  5526. static PyObject *__pyx_n_s_FlowControlMixin;
  5527. static PyObject *__pyx_n_s_Future;
  5528. static PyObject *__pyx_n_s_Handle;
  5529. static PyObject *__pyx_kp_u_Handle_loop_is_None_in_Handle;
  5530. static PyObject *__pyx_n_u_IPV6_V6ONLY;
  5531. static PyObject *__pyx_kp_u_IPv4_sockaddr_must_be_2_tuple;
  5532. static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0x53;
  5533. static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0x88;
  5534. static PyObject *__pyx_n_s_InterruptedError;
  5535. static PyObject *__pyx_n_s_InvalidStateError;
  5536. static PyObject *__pyx_kp_u_Invalid_file_descriptor;
  5537. static PyObject *__pyx_kp_u_Invalid_file_object_r;
  5538. static PyObject *__pyx_n_s_IsADirectoryError;
  5539. static PyObject *__pyx_n_s_Iterable;
  5540. static PyObject *__pyx_n_s_KeyError;
  5541. static PyObject *__pyx_kp_u_Listen_errors;
  5542. static PyObject *__pyx_n_s_Loop;
  5543. static PyObject *__pyx_n_s_Loop___get___locals_lambda;
  5544. static PyObject *__pyx_n_s_Loop___subprocess_run;
  5545. static PyObject *__pyx_n_s_Loop__getaddrinfo_locals_callbac;
  5546. static PyObject *__pyx_n_s_Loop__getnameinfo_locals_callbac;
  5547. static PyObject *__pyx_kp_u_Loop__read_from_self;
  5548. static PyObject *__pyx_kp_u_Loop__sock_accept;
  5549. static PyObject *__pyx_kp_u_Loop__sock_connect;
  5550. static PyObject *__pyx_n_s_Loop__sock_connect_locals_lambda;
  5551. static PyObject *__pyx_kp_u_Loop__sock_recv;
  5552. static PyObject *__pyx_kp_u_Loop__sock_recv_into;
  5553. static PyObject *__pyx_kp_u_Loop__sock_sendall;
  5554. static PyObject *__pyx_kp_u_Loop__stop;
  5555. static PyObject *__pyx_n_s_Loop_connect_accepted_socket;
  5556. static PyObject *__pyx_n_s_Loop_connect_read_pipe;
  5557. static PyObject *__pyx_n_s_Loop_connect_write_pipe;
  5558. static PyObject *__pyx_n_s_Loop_create_connection;
  5559. static PyObject *__pyx_n_s_Loop_create_datagram_endpoint;
  5560. static PyObject *__pyx_n_s_Loop_create_server;
  5561. static PyObject *__pyx_n_s_Loop_create_unix_connection;
  5562. static PyObject *__pyx_n_s_Loop_create_unix_server;
  5563. static PyObject *__pyx_kp_u_Loop_debug_info;
  5564. static PyObject *__pyx_n_s_Loop_getaddrinfo;
  5565. static PyObject *__pyx_n_s_Loop_getnameinfo;
  5566. static PyObject *__pyx_n_s_Loop_shutdown_asyncgens;
  5567. static PyObject *__pyx_n_s_Loop_sock_accept;
  5568. static PyObject *__pyx_n_s_Loop_sock_connect;
  5569. static PyObject *__pyx_n_s_Loop_sock_recv;
  5570. static PyObject *__pyx_n_s_Loop_sock_recv_into;
  5571. static PyObject *__pyx_n_s_Loop_sock_sendall;
  5572. static PyObject *__pyx_n_s_Loop_start_tls;
  5573. static PyObject *__pyx_n_s_Loop_subprocess_exec;
  5574. static PyObject *__pyx_n_s_Loop_subprocess_shell;
  5575. static PyObject *__pyx_kp_u_Loop_time;
  5576. static PyObject *__pyx_n_s_LruCache;
  5577. static PyObject *__pyx_n_s_MemoryBIO;
  5578. static PyObject *__pyx_n_s_MemoryError;
  5579. static PyObject *__pyx_kp_u_Multiple_exceptions;
  5580. static PyObject *__pyx_n_s_NSIG;
  5581. static PyObject *__pyx_n_s_NameInfoRequest;
  5582. static PyObject *__pyx_kp_u_Neither_host_port_nor_sock_were;
  5583. static PyObject *__pyx_kp_u_Non_thread_safe_operation_invoke;
  5584. static PyObject *__pyx_n_s_NotImplementedError;
  5585. static PyObject *__pyx_kp_u_Number_of_signals;
  5586. static PyObject *__pyx_n_s_OSError;
  5587. static PyObject *__pyx_n_s_O_RDWR;
  5588. static PyObject *__pyx_kp_u_Object_created_at_most_recent_ca;
  5589. static PyObject *__pyx_n_s_OrderedDict;
  5590. static PyObject *__pyx_n_s_OverflowError;
  5591. static PyObject *__pyx_n_s_PIPE;
  5592. static PyObject *__pyx_n_u_PYTHONASYNCIODEBUG;
  5593. static PyObject *__pyx_n_s_PermissionError;
  5594. static PyObject *__pyx_n_s_PickleError;
  5595. static PyObject *__pyx_kp_s_Pickling_of_struct_members_such;
  5596. static PyObject *__pyx_n_s_PipeConnectRequest;
  5597. static PyObject *__pyx_kp_u_Polls_debug_info;
  5598. static PyObject *__pyx_n_s_ProcessLookupError;
  5599. static PyObject *__pyx_kp_u_Process_info;
  5600. static PyObject *__pyx_kp_u_Process_memory;
  5601. static PyObject *__pyx_n_s_Protocol;
  5602. static PyObject *__pyx_n_s_PseudoSocket;
  5603. static PyObject *__pyx_n_s_Pyx_CFunc_object____Loop____bi;
  5604. static PyObject *__pyx_kp_u_Racing_with_another_loop_to_spaw;
  5605. static PyObject *__pyx_n_s_ReadSubprocessPipeProto;
  5606. static PyObject *__pyx_n_s_ReadSubprocessPipeProto_data_rec;
  5607. static PyObject *__pyx_n_s_ReadUnixTransport;
  5608. static PyObject *__pyx_kp_u_Read_EOF_failed_callbacks;
  5609. static PyObject *__pyx_kp_u_Read_EOFs;
  5610. static PyObject *__pyx_kp_u_Read_callbacks;
  5611. static PyObject *__pyx_kp_u_Read_callbacks_failed;
  5612. static PyObject *__pyx_kp_u_Read_errors;
  5613. static PyObject *__pyx_kp_u_Read_events;
  5614. static PyObject *__pyx_kp_u_Read_failed_callbacks;
  5615. static PyObject *__pyx_n_s_ResourceWarning;
  5616. static PyObject *__pyx_n_s_RuntimeError;
  5617. static PyObject *__pyx_n_s_RuntimeWarning;
  5618. static PyObject *__pyx_n_s_SIG_DFL;
  5619. static PyObject *__pyx_n_u_SOCK_NONBLOCK;
  5620. static PyObject *__pyx_n_u_SO_BROADCAST;
  5621. static PyObject *__pyx_n_u_SO_REUSEPORT;
  5622. static PyObject *__pyx_n_s_SSLContext;
  5623. static PyObject *__pyx_n_s_SSLError;
  5624. static PyObject *__pyx_n_s_SSLProtocol;
  5625. static PyObject *__pyx_n_s_SSLProtocolTransport;
  5626. static PyObject *__pyx_n_s_SSLProtocol__do_read__buffered_l;
  5627. static PyObject *__pyx_n_s_SSLProtocol__resume_reading_loca;
  5628. static PyObject *__pyx_n_s_SSLProtocol__start_handshake_loc;
  5629. static PyObject *__pyx_n_s_SSLProtocol__start_shutdown_loca;
  5630. static PyObject *__pyx_n_s_SSLSyscallError;
  5631. static PyObject *__pyx_n_s_SSLWantReadError;
  5632. static PyObject *__pyx_n_s_SSL_ERROR_SYSCALL;
  5633. static PyObject *__pyx_n_s_SSL_ERROR_WANT_READ;
  5634. static PyObject *__pyx_n_s_SSL_ERROR_WANT_WRITE;
  5635. static PyObject *__pyx_kp_u_SSL_connection_is_closed;
  5636. static PyObject *__pyx_kp_u_SSL_handshake_failed;
  5637. static PyObject *__pyx_kp_u_SSL_handshake_failed_on_verifyin;
  5638. static PyObject *__pyx_kp_u_SSL_handshake_is_taking_longer_t;
  5639. static PyObject *__pyx_kp_u_SSL_shutdown_timed_out;
  5640. static PyObject *__pyx_n_s_STDOUT;
  5641. static PyObject *__pyx_n_s_S_ISSOCK;
  5642. static PyObject *__pyx_n_s_Server;
  5643. static PyObject *__pyx_n_s_Server___aenter;
  5644. static PyObject *__pyx_n_s_Server___aexit;
  5645. static PyObject *__pyx_n_s_Server_serve_forever;
  5646. static PyObject *__pyx_kp_u_Server_side_SSL_needs_a_valid_SS;
  5647. static PyObject *__pyx_n_s_Server_start_serving;
  5648. static PyObject *__pyx_n_s_Server_wait_closed;
  5649. static PyObject *__pyx_kp_u_Shutdown_errors;
  5650. static PyObject *__pyx_n_s_SockAddrHolder;
  5651. static PyObject *__pyx_kp_u_Sock_ops_successful_on_1st_try;
  5652. static PyObject *__pyx_n_s_SocketKind;
  5653. static PyObject *__pyx_kp_u_Socket_try_writes;
  5654. static PyObject *__pyx_n_s_StackSummary;
  5655. static PyObject *__pyx_n_s_StreamWriteContext;
  5656. static PyObject *__pyx_kp_u_StreamWriteContext_close_py_buf;
  5657. static PyObject *__pyx_kp_u_StreamWriteContext_close_uv_buf;
  5658. static PyObject *__pyx_kp_u_Streams_debug_info;
  5659. static PyObject *__pyx_n_s_SubprocessError;
  5660. static PyObject *__pyx_n_s_SyncSocketReaderFuture;
  5661. static PyObject *__pyx_n_s_SyncSocketReaderFuture___init;
  5662. static PyObject *__pyx_n_s_SyncSocketReaderFuture__loop;
  5663. static PyObject *__pyx_n_s_SyncSocketReaderFuture__sock;
  5664. static PyObject *__pyx_n_s_SyncSocketReaderFuture_cancel;
  5665. static PyObject *__pyx_n_s_SyncSocketWriterFuture;
  5666. static PyObject *__pyx_n_s_SyncSocketWriterFuture___init;
  5667. static PyObject *__pyx_n_s_SyncSocketWriterFuture__loop;
  5668. static PyObject *__pyx_n_s_SyncSocketWriterFuture__sock;
  5669. static PyObject *__pyx_n_s_SyncSocketWriterFuture_cancel;
  5670. static PyObject *__pyx_n_s_TCPConnectRequest;
  5671. static PyObject *__pyx_n_s_TCPServer;
  5672. static PyObject *__pyx_n_s_TCPTransport;
  5673. static PyObject *__pyx_n_s_Task;
  5674. static PyObject *__pyx_n_s_ThreadPoolExecutor;
  5675. static PyObject *__pyx_n_s_TimeoutError;
  5676. static PyObject *__pyx_n_s_TimerHandle;
  5677. static PyObject *__pyx_kp_u_Timer_handles_8;
  5678. static PyObject *__pyx_n_s_Transport;
  5679. static PyObject *__pyx_n_s_TypeError;
  5680. static PyObject *__pyx_n_s_UDPSendContext;
  5681. static PyObject *__pyx_n_s_UDPTransport;
  5682. static PyObject *__pyx_kp_u_UDPTransport_family_is_undefined;
  5683. static PyObject *__pyx_kp_u_UDPTransport_family_is_undefined_2;
  5684. static PyObject *__pyx_n_s_UVAsync;
  5685. static PyObject *__pyx_n_s_UVBaseTransport;
  5686. static PyObject *__pyx_n_s_UVCheck;
  5687. static PyObject *__pyx_n_s_UVHandle;
  5688. static PyObject *__pyx_kp_u_UVHandles_python_libuv_total;
  5689. static PyObject *__pyx_n_s_UVIdle;
  5690. static PyObject *__pyx_n_s_UVPoll;
  5691. static PyObject *__pyx_n_s_UVProcess;
  5692. static PyObject *__pyx_n_s_UVProcessTransport;
  5693. static PyObject *__pyx_kp_u_UVProcessTransport__call_connect;
  5694. static PyObject *__pyx_kp_u_UVProcess__close_after_spawn_cal;
  5695. static PyObject *__pyx_n_s_UVRequest;
  5696. static PyObject *__pyx_n_s_UVSocketHandle;
  5697. static PyObject *__pyx_n_s_UVStream;
  5698. static PyObject *__pyx_n_s_UVStreamServer;
  5699. static PyObject *__pyx_kp_u_UVStream__try_write_called_with;
  5700. static PyObject *__pyx_kp_u_UVStream_shutdown_callback_calle;
  5701. static PyObject *__pyx_kp_u_UVStream_write_callback_called_w;
  5702. static PyObject *__pyx_n_s_UVTimer;
  5703. static PyObject *__pyx_kp_u_UVTransport__call_connection_los;
  5704. static PyObject *__pyx_kp_u_UVTransport__call_connection_mad;
  5705. static PyObject *__pyx_kp_u_Unable_to_check_or_remove_stale;
  5706. static PyObject *__pyx_kp_u_Unhandled_error_in_exception_han;
  5707. static PyObject *__pyx_kp_u_Unhandled_exception_in_event_loo;
  5708. static PyObject *__pyx_n_s_UnicodeEncodeError;
  5709. static PyObject *__pyx_n_s_UnixServer;
  5710. static PyObject *__pyx_n_s_UnixTransport;
  5711. static PyObject *__pyx_n_s_ValueError;
  5712. static PyObject *__pyx_n_s_WeakSet;
  5713. static PyObject *__pyx_n_s_WeakValueDictionary;
  5714. static PyObject *__pyx_n_s_WriteSubprocessPipeProto;
  5715. static PyObject *__pyx_n_s_WriteSubprocessPipeProto___init;
  5716. static PyObject *__pyx_n_s_WriteSubprocessPipeProto___repr;
  5717. static PyObject *__pyx_n_s_WriteSubprocessPipeProto_connect;
  5718. static PyObject *__pyx_n_s_WriteSubprocessPipeProto_connect_2;
  5719. static PyObject *__pyx_n_s_WriteSubprocessPipeProto_pause_w;
  5720. static PyObject *__pyx_n_s_WriteSubprocessPipeProto_resume;
  5721. static PyObject *__pyx_n_s_WriteUnixTransport;
  5722. static PyObject *__pyx_kp_u_Write_callbacks_failed;
  5723. static PyObject *__pyx_kp_u_Write_contexts_8;
  5724. static PyObject *__pyx_kp_u_Write_errors;
  5725. static PyObject *__pyx_kp_u_Write_events;
  5726. static PyObject *__pyx_kp_u_Write_failed_callbacks;
  5727. static PyObject *__pyx_kp_u_Write_without_poll;
  5728. static PyObject *__pyx_kp_u_XXX_an_allocated_buffer_in_trans;
  5729. static PyObject *__pyx_kp_u_You_must_set_server_hostname_whe;
  5730. static PyObject *__pyx_kp_u__118;
  5731. static PyObject *__pyx_kp_u__119;
  5732. static PyObject *__pyx_kp_b__163;
  5733. static PyObject *__pyx_kp_b__172;
  5734. static PyObject *__pyx_n_s__2;
  5735. static PyObject *__pyx_kp_b__2;
  5736. static PyObject *__pyx_kp_u__2;
  5737. static PyObject *__pyx_kp_u__25;
  5738. static PyObject *__pyx_kp_u__46;
  5739. static PyObject *__pyx_kp_u__53;
  5740. static PyObject *__pyx_kp_u__58;
  5741. static PyObject *__pyx_kp_u__59;
  5742. static PyObject *__pyx_kp_u__78;
  5743. static PyObject *__pyx_kp_u__88;
  5744. static PyObject *__pyx_kp_u__89;
  5745. static PyObject *__pyx_kp_u__90;
  5746. static PyObject *__pyx_n_s_abc;
  5747. static PyObject *__pyx_kp_u_abort_init__closed_is_set;
  5748. static PyObject *__pyx_kp_u_abort_init__inited_is_set;
  5749. static PyObject *__pyx_n_s_accept;
  5750. static PyObject *__pyx_kp_u_accept_method;
  5751. static PyObject *__pyx_n_s_aclose;
  5752. static PyObject *__pyx_kp_u_active_TimerHandle_is_deallacati;
  5753. static PyObject *__pyx_n_s_add;
  5754. static PyObject *__pyx_n_s_add_done_callback;
  5755. static PyObject *__pyx_n_s_addr;
  5756. static PyObject *__pyx_n_s_address;
  5757. static PyObject *__pyx_n_s_aenter;
  5758. static PyObject *__pyx_n_s_aexit;
  5759. static PyObject *__pyx_kp_u_alive_closed;
  5760. static PyObject *__pyx_kp_u_all_args_must_be_str_or_bytes;
  5761. static PyObject *__pyx_kp_u_all_environment_values_must_be_b;
  5762. static PyObject *__pyx_kp_u_all_environment_vars_must_be_byt;
  5763. static PyObject *__pyx_n_s_allow_broadcast;
  5764. static PyObject *__pyx_kp_u_an_error_occurred_during_closing;
  5765. static PyObject *__pyx_n_s_app_protocol;
  5766. static PyObject *__pyx_n_s_append;
  5767. static PyObject *__pyx_n_s_args;
  5768. static PyObject *__pyx_n_u_ascii;
  5769. static PyObject *__pyx_n_u_asyncgen;
  5770. static PyObject *__pyx_n_s_asyncgen_finalizer_hook;
  5771. static PyObject *__pyx_n_s_asyncgen_firstiter_hook;
  5772. static PyObject *__pyx_kp_u_asynchronous_generator_r_was_sch;
  5773. static PyObject *__pyx_n_s_asyncio;
  5774. static PyObject *__pyx_n_s_asyncio_base_events;
  5775. static PyObject *__pyx_n_s_asyncio_coroutines;
  5776. static PyObject *__pyx_n_s_asyncio_futures;
  5777. static PyObject *__pyx_kp_u_asyncio_is_trying_to_install_it;
  5778. static PyObject *__pyx_n_s_asyncio_log;
  5779. static PyObject *__pyx_n_s_asyncio_sslproto;
  5780. static PyObject *__pyx_n_s_asyncio_tasks;
  5781. static PyObject *__pyx_n_s_asyncio_transports;
  5782. static PyObject *__pyx_n_s_await;
  5783. static PyObject *__pyx_n_u_b;
  5784. static PyObject *__pyx_n_s_backlog;
  5785. static PyObject *__pyx_kp_b_bin_sh;
  5786. static PyObject *__pyx_n_s_bind;
  5787. static PyObject *__pyx_kp_u_bind_method;
  5788. static PyObject *__pyx_n_s_buf;
  5789. static PyObject *__pyx_kp_u_buffer_size_is_not_0_after_a_su;
  5790. static PyObject *__pyx_n_s_buffer_updated;
  5791. static PyObject *__pyx_n_s_bufsize;
  5792. static PyObject *__pyx_kp_u_bufsize_must_be_0;
  5793. static PyObject *__pyx_n_s_builtins;
  5794. static PyObject *__pyx_kp_b_c;
  5795. static PyObject *__pyx_n_s_call_connection_made;
  5796. static PyObject *__pyx_n_s_call_exception_handler;
  5797. static PyObject *__pyx_n_s_call_later;
  5798. static PyObject *__pyx_n_s_call_soon;
  5799. static PyObject *__pyx_n_s_call_soon_threadsafe;
  5800. static PyObject *__pyx_n_s_callback;
  5801. static PyObject *__pyx_kp_u_called_after_destroying_the_UVH;
  5802. static PyObject *__pyx_kp_u_called_with_handle_data_NULL;
  5803. static PyObject *__pyx_n_s_cancel;
  5804. static PyObject *__pyx_kp_u_cancel_request_data_is_NULL;
  5805. static PyObject *__pyx_kp_u_cancel_request_data_is_not_UVRe;
  5806. static PyObject *__pyx_kp_u_cancel_request_is_NULL;
  5807. static PyObject *__pyx_n_s_cancelled;
  5808. static PyObject *__pyx_n_u_cancelled;
  5809. static PyObject *__pyx_kp_u_cannot_add_a_signal_handler_for;
  5810. static PyObject *__pyx_kp_u_cannot_apply_subprocess_STDOUT;
  5811. static PyObject *__pyx_kp_u_cannot_convert_sockaddr_into_Pyt;
  5812. static PyObject *__pyx_kp_u_cannot_open_a_UDP_handle_invalid;
  5813. static PyObject *__pyx_kp_u_cannot_run_Handle_callback_is_no;
  5814. static PyObject *__pyx_kp_u_cannot_run_TimerHandle_callback;
  5815. static PyObject *__pyx_kp_u_cannot_spawn_a_process_args_are;
  5816. static PyObject *__pyx_kp_u_cannot_switch_state_from_to;
  5817. static PyObject *__pyx_n_s_cast;
  5818. static PyObject *__pyx_n_s_cause;
  5819. static PyObject *__pyx_n_s_cfunc_to_py;
  5820. static PyObject *__pyx_n_s_chain;
  5821. static PyObject *__pyx_n_s_check_hostname;
  5822. static PyObject *__pyx_n_s_cipher;
  5823. static PyObject *__pyx_n_s_class;
  5824. static PyObject *__pyx_n_s_clear;
  5825. static PyObject *__pyx_n_s_cline_in_traceback;
  5826. static PyObject *__pyx_n_s_close;
  5827. static PyObject *__pyx_kp_u_close__handle_data_is_NULL;
  5828. static PyObject *__pyx_kp_u_close__handle_data_is_not_UVHa;
  5829. static PyObject *__pyx_n_s_close_fds;
  5830. static PyObject *__pyx_kp_u_close_method;
  5831. static PyObject *__pyx_kp_u_close_uv_is_closing_is_true;
  5832. static PyObject *__pyx_kp_u_closed_Transport_handle_and_unse;
  5833. static PyObject *__pyx_kp_u_closed_reading_x;
  5834. static PyObject *__pyx_kp_u_closed_x;
  5835. static PyObject *__pyx_n_s_cmd;
  5836. static PyObject *__pyx_n_s_collections;
  5837. static PyObject *__pyx_n_s_collections_abc;
  5838. static PyObject *__pyx_n_s_compression;
  5839. static PyObject *__pyx_n_s_concurrent;
  5840. static PyObject *__pyx_kp_u_concurrent_allocations;
  5841. static PyObject *__pyx_n_s_concurrent_futures;
  5842. static PyObject *__pyx_n_s_connect;
  5843. static PyObject *__pyx_n_s_connect_accepted_socket;
  5844. static PyObject *__pyx_kp_u_connect_ex_method;
  5845. static PyObject *__pyx_kp_u_connect_failed;
  5846. static PyObject *__pyx_kp_u_connect_method;
  5847. static PyObject *__pyx_n_s_connect_read_pipe;
  5848. static PyObject *__pyx_n_s_connect_write_pipe;
  5849. static PyObject *__pyx_n_s_connection_lost;
  5850. static PyObject *__pyx_n_s_connection_made;
  5851. static PyObject *__pyx_n_s_context;
  5852. static PyObject *__pyx_n_u_context;
  5853. static PyObject *__pyx_kp_u_context_argument_requires_Pytho;
  5854. static PyObject *__pyx_kp_u_context_manager_protocol;
  5855. static PyObject *__pyx_n_s_copy;
  5856. static PyObject *__pyx_n_s_coroutines;
  5857. static PyObject *__pyx_kp_u_coroutines_cannot_be_used_with_a;
  5858. static PyObject *__pyx_kp_u_coroutines_cannot_be_used_with_r;
  5859. static PyObject *__pyx_kp_u_could_not_bind_to_local_addr;
  5860. static PyObject *__pyx_kp_u_could_not_bind_to_remote_addr;
  5861. static PyObject *__pyx_kp_u_could_not_close_attached_file_ob;
  5862. static PyObject *__pyx_n_s_create_connection;
  5863. static PyObject *__pyx_n_s_create_connection_locals_genexpr;
  5864. static PyObject *__pyx_n_s_create_datagram_endpoint;
  5865. static PyObject *__pyx_n_s_create_datagram_endpoint_locals;
  5866. static PyObject *__pyx_n_s_create_default_context;
  5867. static PyObject *__pyx_n_s_create_future;
  5868. static PyObject *__pyx_n_s_create_server;
  5869. static PyObject *__pyx_kp_u_create_server_failed_to_create_s;
  5870. static PyObject *__pyx_n_s_create_task;
  5871. static PyObject *__pyx_n_s_create_unix_connection;
  5872. static PyObject *__pyx_n_s_create_unix_server;
  5873. static PyObject *__pyx_kp_u_created_at;
  5874. static PyObject *__pyx_n_s_creationflags;
  5875. static PyObject *__pyx_kp_u_creationflags_is_not_supported;
  5876. static PyObject *__pyx_n_s_cwd;
  5877. static PyObject *__pyx_kp_u_cwd_must_be_a_str_or_bytes_objec;
  5878. static PyObject *__pyx_n_u_cygwin;
  5879. static PyObject *__pyx_n_s_data;
  5880. static PyObject *__pyx_kp_u_data_expecting_a_bytes_like_inst;
  5881. static PyObject *__pyx_n_s_data_received;
  5882. static PyObject *__pyx_n_s_datagram_received;
  5883. static PyObject *__pyx_kp_u_dealloc____handle_is_NULL__cl;
  5884. static PyObject *__pyx_kp_u_deallocating_a_running_event_loo;
  5885. static PyObject *__pyx_kp_u_deallocating_an_open_event_loop;
  5886. static PyObject *__pyx_n_s_debug;
  5887. static PyObject *__pyx_n_u_debug_wrapper;
  5888. static PyObject *__pyx_n_s_decode;
  5889. static PyObject *__pyx_n_s_decref_socketios;
  5890. static PyObject *__pyx_n_s_default;
  5891. static PyObject *__pyx_n_s_default_exception_handler;
  5892. static PyObject *__pyx_n_s_default_int_handler;
  5893. static PyObject *__pyx_n_s_delay;
  5894. static PyObject *__pyx_n_s_deque;
  5895. static PyObject *__pyx_n_s_detach;
  5896. static PyObject *__pyx_kp_u_detach_method;
  5897. static PyObject *__pyx_n_s_devnull;
  5898. static PyObject *__pyx_n_s_dict;
  5899. static PyObject *__pyx_n_s_disable;
  5900. static PyObject *__pyx_n_s_discard;
  5901. static PyObject *__pyx_n_s_disconnected;
  5902. static PyObject *__pyx_n_s_do_handshake;
  5903. static PyObject *__pyx_n_s_doc;
  5904. static PyObject *__pyx_kp_u_does_not_have_a_reader_in_the;
  5905. static PyObject *__pyx_kp_u_does_not_have_a_reader_in_the_2;
  5906. static PyObject *__pyx_kp_u_does_not_have_a_writer_in_the;
  5907. static PyObject *__pyx_n_s_done;
  5908. static PyObject *__pyx_n_s_dup;
  5909. static PyObject *__pyx_n_s_enabled;
  5910. static PyObject *__pyx_n_s_encode;
  5911. static PyObject *__pyx_n_s_ensure_future;
  5912. static PyObject *__pyx_n_s_enter;
  5913. static PyObject *__pyx_n_s_env;
  5914. static PyObject *__pyx_n_s_environ;
  5915. static PyObject *__pyx_n_s_eof_received;
  5916. static PyObject *__pyx_n_s_errno;
  5917. static PyObject *__pyx_n_s_error;
  5918. static PyObject *__pyx_n_s_error_received;
  5919. static PyObject *__pyx_kp_u_error_status_in_uv_stream_t_list;
  5920. static PyObject *__pyx_kp_u_error_status_in_uv_stream_t_read;
  5921. static PyObject *__pyx_kp_u_error_status_in_uv_stream_t_shut;
  5922. static PyObject *__pyx_kp_u_error_status_in_uv_stream_t_writ;
  5923. static PyObject *__pyx_kp_u_error_while_attempting_to_bind_o;
  5924. static PyObject *__pyx_n_s_ex;
  5925. static PyObject *__pyx_n_s_exc;
  5926. static PyObject *__pyx_n_s_exc_info;
  5927. static PyObject *__pyx_n_s_exception;
  5928. static PyObject *__pyx_n_u_exception;
  5929. static PyObject *__pyx_kp_u_exception_in_Task___repr;
  5930. static PyObject *__pyx_n_s_executable;
  5931. static PyObject *__pyx_n_s_executor;
  5932. static PyObject *__pyx_n_s_exit;
  5933. static PyObject *__pyx_kp_u_expected_AF_INET_AF_INET6_or_AF;
  5934. static PyObject *__pyx_kp_u_expected_asyncio_Future;
  5935. static PyObject *__pyx_n_s_extract;
  5936. static PyObject *__pyx_n_s_family;
  5937. static PyObject *__pyx_kp_u_fatal_Could_not_advance__StreamW;
  5938. static PyObject *__pyx_kp_u_fatal_sent_0_in_advance_uv_buf;
  5939. static PyObject *__pyx_n_s_fd;
  5940. static PyObject *__pyx_kp_u_fd_2;
  5941. static PyObject *__pyx_n_s_fileno;
  5942. static PyObject *__pyx_n_s_fileobj;
  5943. static PyObject *__pyx_n_s_finalizer;
  5944. static PyObject *__pyx_n_s_firstiter;
  5945. static PyObject *__pyx_n_s_flags;
  5946. static PyObject *__pyx_n_s_flush;
  5947. static PyObject *__pyx_n_s_force_close;
  5948. static PyObject *__pyx_n_s_format;
  5949. static PyObject *__pyx_n_s_format_list;
  5950. static PyObject *__pyx_n_s_frame;
  5951. static PyObject *__pyx_n_s_fspath;
  5952. static PyObject *__pyx_n_s_func;
  5953. static PyObject *__pyx_n_s_functools;
  5954. static PyObject *__pyx_n_s_fut;
  5955. static PyObject *__pyx_n_s_futures;
  5956. static PyObject *__pyx_n_s_gaierror;
  5957. static PyObject *__pyx_n_s_gather;
  5958. static PyObject *__pyx_n_s_gc;
  5959. static PyObject *__pyx_n_s_genexpr;
  5960. static PyObject *__pyx_n_s_get;
  5961. static PyObject *__pyx_n_s_get_app_transport;
  5962. static PyObject *__pyx_n_s_get_asyncgen_hooks;
  5963. static PyObject *__pyx_n_u_get_asyncgen_hooks;
  5964. static PyObject *__pyx_n_s_get_buffer;
  5965. static PyObject *__pyx_n_u_get_buffer;
  5966. static PyObject *__pyx_n_s_get_coroutine_origin_tracking_de;
  5967. static PyObject *__pyx_n_u_get_coroutine_wrapper;
  5968. static PyObject *__pyx_n_s_get_debug;
  5969. static PyObject *__pyx_n_s_get_event_loop;
  5970. static PyObject *__pyx_n_s_get_extra_info;
  5971. static PyObject *__pyx_n_s_get_inheritable;
  5972. static PyObject *__pyx_n_u_get_running_loop;
  5973. static PyObject *__pyx_n_s_getaddrinfo;
  5974. static PyObject *__pyx_kp_u_getaddrinfo_returned_empty_list;
  5975. static PyObject *__pyx_kp_u_getaddrinfo_returned_empty_list_2;
  5976. static PyObject *__pyx_n_s_getfilesystemencoding;
  5977. static PyObject *__pyx_n_s_getframe;
  5978. static PyObject *__pyx_n_s_getnameinfo;
  5979. static PyObject *__pyx_kp_u_getnameinfo_argument_1_must_be_a;
  5980. static PyObject *__pyx_kp_u_getnameinfo_flowinfo_must_be_0_1;
  5981. static PyObject *__pyx_n_s_getpeercert;
  5982. static PyObject *__pyx_n_s_getpeername;
  5983. static PyObject *__pyx_n_s_getservbyname;
  5984. static PyObject *__pyx_kp_u_getsockaddrarg_flowinfo_must_be;
  5985. static PyObject *__pyx_kp_u_getsockaddrarg_scope_id_must_be;
  5986. static PyObject *__pyx_n_s_getsockname;
  5987. static PyObject *__pyx_n_s_getsockopt;
  5988. static PyObject *__pyx_n_s_getstate;
  5989. static PyObject *__pyx_n_s_gettimeout;
  5990. static PyObject *__pyx_n_u_handle;
  5991. static PyObject *__pyx_kp_u_handle_data_is_NULL_in___close_a;
  5992. static PyObject *__pyx_kp_u_handle_loop_data_is_NULL_in___en;
  5993. static PyObject *__pyx_kp_u_handle_loop_is_NULL_in___ensure;
  5994. static PyObject *__pyx_kp_u_has_handle_0_in___uv_close_handl;
  5995. static PyObject *__pyx_n_s_high;
  5996. static PyObject *__pyx_kp_u_high_2;
  5997. static PyObject *__pyx_n_s_host;
  5998. static PyObject *__pyx_kp_u_host_and_port_was_not_specified;
  5999. static PyObject *__pyx_kp_u_host_must_be_a_str_or_bytes;
  6000. static PyObject *__pyx_kp_u_host_must_be_a_string_or_bytes_o;
  6001. static PyObject *__pyx_kp_u_host_port_and_sock_can_not_be_sp;
  6002. static PyObject *__pyx_n_s_id;
  6003. static PyObject *__pyx_n_s_ident;
  6004. static PyObject *__pyx_n_u_idna;
  6005. static PyObject *__pyx_n_s_ignore_environment;
  6006. static PyObject *__pyx_n_s_import;
  6007. static PyObject *__pyx_n_u_inf;
  6008. static PyObject *__pyx_n_s_info;
  6009. static PyObject *__pyx_n_s_init;
  6010. static PyObject *__pyx_n_s_inspect;
  6011. static PyObject *__pyx_kp_u_integer_argument_expected_got;
  6012. static PyObject *__pyx_kp_u_invalid_Handle_cb_type;
  6013. static PyObject *__pyx_kp_u_invalid__init_protocol_call;
  6014. static PyObject *__pyx_kp_u_invalid_data_in_writebuf_an_inst;
  6015. static PyObject *__pyx_kp_u_invalid_socket_family_expected_A;
  6016. static PyObject *__pyx_kp_u_invalid_waiter_object;
  6017. static PyObject *__pyx_n_s_io_refs;
  6018. static PyObject *__pyx_kp_u_is_alive_but__handle_data_is_no;
  6019. static PyObject *__pyx_kp_u_is_alive_but__handle_is_NULL;
  6020. static PyObject *__pyx_kp_u_is_alive_but__handle_loop_is_no;
  6021. static PyObject *__pyx_kp_u_is_alive_but__loop_is_None;
  6022. static PyObject *__pyx_kp_u_is_already_being_awaited_on_ser;
  6023. static PyObject *__pyx_n_s_is_closed;
  6024. static PyObject *__pyx_kp_u_is_closed_2;
  6025. static PyObject *__pyx_kp_u_is_longer_than_107_characters;
  6026. static PyObject *__pyx_kp_u_is_not_supported_by_start_tls;
  6027. static PyObject *__pyx_kp_u_is_not_supposed_to_be_instantia;
  6028. static PyObject *__pyx_kp_u_is_open_in___dealloc___with_loo;
  6029. static PyObject *__pyx_n_s_is_running;
  6030. static PyObject *__pyx_n_s_iscoroutine;
  6031. static PyObject *__pyx_n_s_iscoroutinefunction;
  6032. static PyObject *__pyx_n_u_isfuture;
  6033. static PyObject *__pyx_n_s_isgenerator;
  6034. static PyObject *__pyx_n_s_items;
  6035. static PyObject *__pyx_n_s_itertools;
  6036. static PyObject *__pyx_n_s_join;
  6037. static PyObject *__pyx_kp_u_laddr_s;
  6038. static PyObject *__pyx_n_s_last;
  6039. static PyObject *__pyx_n_s_limit;
  6040. static PyObject *__pyx_kp_u_listen_method;
  6041. static PyObject *__pyx_n_s_local_addr;
  6042. static PyObject *__pyx_kp_u_local_addr_must_be_a_tuple_of_ho;
  6043. static PyObject *__pyx_kp_u_local_addr_must_be_a_tuple_of_ho_2;
  6044. static PyObject *__pyx_n_s_log;
  6045. static PyObject *__pyx_n_s_log_destroy_pending;
  6046. static PyObject *__pyx_n_s_logger;
  6047. static PyObject *__pyx_n_s_lookup_lines;
  6048. static PyObject *__pyx_n_s_loop;
  6049. static PyObject *__pyx_kp_u_loop__exec_queued_writes;
  6050. static PyObject *__pyx_kp_u_loop__on_idle;
  6051. static PyObject *__pyx_kp_u_loop__queued_streams_are_not_emp;
  6052. static PyObject *__pyx_kp_u_loop_set_debug_False_cannot_unse;
  6053. static PyObject *__pyx_kp_u_loop_set_debug_True_cannot_set_d;
  6054. static PyObject *__pyx_n_s_low;
  6055. static PyObject *__pyx_n_s_lower;
  6056. static PyObject *__pyx_n_s_main;
  6057. static PyObject *__pyx_n_s_main_thread;
  6058. static PyObject *__pyx_kp_u_makefile_method;
  6059. static PyObject *__pyx_n_s_maxsize;
  6060. static PyObject *__pyx_kp_u_maxsize_is_expected_to_be_greate;
  6061. static PyObject *__pyx_n_s_memoryview;
  6062. static PyObject *__pyx_n_u_message;
  6063. static PyObject *__pyx_n_s_metaclass;
  6064. static PyObject *__pyx_n_s_module;
  6065. static PyObject *__pyx_n_s_monotonic;
  6066. static PyObject *__pyx_n_s_move_to_end;
  6067. static PyObject *__pyx_kp_u_must_be_0;
  6068. static PyObject *__pyx_kp_u_must_be_low;
  6069. static PyObject *__pyx_n_s_n;
  6070. static PyObject *__pyx_n_s_name;
  6071. static PyObject *__pyx_n_u_name;
  6072. static PyObject *__pyx_n_s_name_2;
  6073. static PyObject *__pyx_n_s_new;
  6074. static PyObject *__pyx_kp_u_new_callbacks_were_queued_during;
  6075. static PyObject *__pyx_kp_u_new_poll_handles_were_queued_dur;
  6076. static PyObject *__pyx_kp_u_new_timers_were_queued_during_lo;
  6077. static PyObject *__pyx_kp_s_no_default___reduce___due_to_non;
  6078. static PyObject *__pyx_kp_u_no_path_and_sock_were_specified;
  6079. static PyObject *__pyx_kp_u_no_python_buffer_is_allocated_in;
  6080. static PyObject *__pyx_n_s_noop;
  6081. static PyObject *__pyx_n_s_noop_2;
  6082. static PyObject *__pyx_n_s_object;
  6083. static PyObject *__pyx_kp_u_object_created_at_most_recent_ca;
  6084. static PyObject *__pyx_kp_u_objs_handles;
  6085. static PyObject *__pyx_n_s_on_ssl_connected;
  6086. static PyObject *__pyx_n_s_open;
  6087. static PyObject *__pyx_kp_u_open__StreamWriteContext_is_bein;
  6088. static PyObject *__pyx_kp_u_open__UDPSendContext_is_being_de;
  6089. static PyObject *__pyx_n_s_os;
  6090. static PyObject *__pyx_n_s_partial;
  6091. static PyObject *__pyx_n_s_pass_fds;
  6092. static PyObject *__pyx_n_s_path;
  6093. static PyObject *__pyx_kp_u_path_and_sock_can_not_be_specifi;
  6094. static PyObject *__pyx_kp_u_path_was_not_specified_and_no_so;
  6095. static PyObject *__pyx_n_s_pause_reading;
  6096. static PyObject *__pyx_n_s_pause_writing;
  6097. static PyObject *__pyx_n_s_peercert;
  6098. static PyObject *__pyx_n_u_peername;
  6099. static PyObject *__pyx_n_s_pending;
  6100. static PyObject *__pyx_n_s_pickle;
  6101. static PyObject *__pyx_n_s_pipe;
  6102. static PyObject *__pyx_n_u_pipe;
  6103. static PyObject *__pyx_kp_u_pipe_2;
  6104. static PyObject *__pyx_n_s_pipe_connection_lost;
  6105. static PyObject *__pyx_n_s_pipe_data_received;
  6106. static PyObject *__pyx_n_s_platform;
  6107. static PyObject *__pyx_n_s_pop;
  6108. static PyObject *__pyx_n_s_popitem;
  6109. static PyObject *__pyx_n_s_popleft;
  6110. static PyObject *__pyx_n_s_port;
  6111. static PyObject *__pyx_kp_u_port_must_be_a_str_bytes_or_int;
  6112. static PyObject *__pyx_n_u_posix;
  6113. static PyObject *__pyx_n_s_preexec_fn;
  6114. static PyObject *__pyx_n_s_prepare;
  6115. static PyObject *__pyx_n_s_print;
  6116. static PyObject *__pyx_n_u_print_debug_info;
  6117. static PyObject *__pyx_n_s_proc;
  6118. static PyObject *__pyx_n_s_process_exited;
  6119. static PyObject *__pyx_n_s_program;
  6120. static PyObject *__pyx_n_s_proto;
  6121. static PyObject *__pyx_n_s_proto_factory;
  6122. static PyObject *__pyx_n_s_protocol;
  6123. static PyObject *__pyx_n_u_protocol;
  6124. static PyObject *__pyx_n_s_protocol_factory;
  6125. static PyObject *__pyx_kp_u_protocol_is_not_set_cannot_call;
  6126. static PyObject *__pyx_kp_u_protocol_is_required;
  6127. static PyObject *__pyx_kp_u_protocol_pause_writing_failed;
  6128. static PyObject *__pyx_kp_u_protocol_resume_writing_failed;
  6129. static PyObject *__pyx_n_s_pyx_PickleError;
  6130. static PyObject *__pyx_n_s_pyx_checksum;
  6131. static PyObject *__pyx_n_s_pyx_result;
  6132. static PyObject *__pyx_n_s_pyx_state;
  6133. static PyObject *__pyx_n_s_pyx_type;
  6134. static PyObject *__pyx_n_s_pyx_unpickle_LruCache;
  6135. static PyObject *__pyx_n_s_pyx_unpickle_PseudoSocket;
  6136. static PyObject *__pyx_n_s_pyx_vtable;
  6137. static PyObject *__pyx_n_s_qualname;
  6138. static PyObject *__pyx_n_u_qualname;
  6139. static PyObject *__pyx_kp_u_r_SSL_handshake_took_1f_ms;
  6140. static PyObject *__pyx_kp_u_r_fileno_returned_non_integer;
  6141. static PyObject *__pyx_kp_u_r_received_EOF;
  6142. static PyObject *__pyx_kp_u_r_s;
  6143. static PyObject *__pyx_kp_u_r_starts_SSL_handshake;
  6144. static PyObject *__pyx_kp_u_raddr_s;
  6145. static PyObject *__pyx_n_s_range;
  6146. static PyObject *__pyx_n_s_read;
  6147. static PyObject *__pyx_n_s_recv;
  6148. static PyObject *__pyx_n_s_recv_into;
  6149. static PyObject *__pyx_kp_u_recv_into_method;
  6150. static PyObject *__pyx_kp_u_recv_method;
  6151. static PyObject *__pyx_kp_u_recvfrom_into_method;
  6152. static PyObject *__pyx_kp_u_recvfrom_method;
  6153. static PyObject *__pyx_kp_u_recvmsg_into_method;
  6154. static PyObject *__pyx_kp_u_recvmsg_method;
  6155. static PyObject *__pyx_n_s_reduce;
  6156. static PyObject *__pyx_n_s_reduce_cython;
  6157. static PyObject *__pyx_n_s_reduce_ex;
  6158. static PyObject *__pyx_n_s_remote_addr;
  6159. static PyObject *__pyx_kp_u_remote_addr_must_be_a_tuple_of_h;
  6160. static PyObject *__pyx_n_s_remove;
  6161. static PyObject *__pyx_n_s_remove_done_callback;
  6162. static PyObject *__pyx_n_s_remove_reader;
  6163. static PyObject *__pyx_n_s_remove_signal_handler;
  6164. static PyObject *__pyx_n_s_remove_writer;
  6165. static PyObject *__pyx_n_s_repr;
  6166. static PyObject *__pyx_n_s_restore_signals;
  6167. static PyObject *__pyx_n_s_result;
  6168. static PyObject *__pyx_n_s_resume;
  6169. static PyObject *__pyx_n_s_resume_reading;
  6170. static PyObject *__pyx_n_s_resume_writing;
  6171. static PyObject *__pyx_n_s_return_exceptions;
  6172. static PyObject *__pyx_kp_u_returning_true_from_eof_received;
  6173. static PyObject *__pyx_n_s_reuse_address;
  6174. static PyObject *__pyx_n_s_reuse_port;
  6175. static PyObject *__pyx_kp_u_reuse_port_not_supported_by_sock;
  6176. static PyObject *__pyx_n_s_reverse;
  6177. static PyObject *__pyx_n_s_round;
  6178. static PyObject *__pyx_n_s_rstrip;
  6179. static PyObject *__pyx_n_s_run_forever;
  6180. static PyObject *__pyx_n_s_run_until_complete_locals_lambda;
  6181. static PyObject *__pyx_kp_u_running_closed_debug;
  6182. static PyObject *__pyx_kp_u_seconds_aborting_the_connection;
  6183. static PyObject *__pyx_n_s_self;
  6184. static PyObject *__pyx_n_u_self;
  6185. static PyObject *__pyx_n_s_self_2;
  6186. static PyObject *__pyx_kp_s_self_py_buf_self_req_cannot_be_c;
  6187. static PyObject *__pyx_kp_s_self_py_bufs_self_py_bufs_sml_se;
  6188. static PyObject *__pyx_n_s_send;
  6189. static PyObject *__pyx_kp_u_send_method;
  6190. static PyObject *__pyx_kp_u_sendall_method;
  6191. static PyObject *__pyx_kp_u_sendfile_method;
  6192. static PyObject *__pyx_kp_u_sendmsg_afalg_method;
  6193. static PyObject *__pyx_kp_u_sendmsg_method;
  6194. static PyObject *__pyx_kp_u_sendto_method;
  6195. static PyObject *__pyx_n_s_serve_forever;
  6196. static PyObject *__pyx_kp_u_server;
  6197. static PyObject *__pyx_n_s_server_hostname;
  6198. static PyObject *__pyx_kp_u_server_hostname_is_only_meaningf;
  6199. static PyObject *__pyx_n_s_server_side;
  6200. static PyObject *__pyx_kp_u_service_proto_not_found;
  6201. static PyObject *__pyx_n_s_set_asyncgen_hooks;
  6202. static PyObject *__pyx_n_s_set_coroutine_origin_tracking_de;
  6203. static PyObject *__pyx_n_u_set_coroutine_wrapper;
  6204. static PyObject *__pyx_n_s_set_debug;
  6205. static PyObject *__pyx_n_s_set_exception;
  6206. static PyObject *__pyx_n_s_set_inheritable;
  6207. static PyObject *__pyx_n_s_set_protocol;
  6208. static PyObject *__pyx_n_s_set_result;
  6209. static PyObject *__pyx_n_u_set_running_loop;
  6210. static PyObject *__pyx_n_s_set_wakeup_fd;
  6211. static PyObject *__pyx_kp_u_set_wakeup_fd_1_failed_s;
  6212. static PyObject *__pyx_kp_u_set_wakeup_fd_only_works_in_main;
  6213. static PyObject *__pyx_n_s_setblocking;
  6214. static PyObject *__pyx_kp_u_setblocking_transport_sockets_ca;
  6215. static PyObject *__pyx_n_s_setsockopt;
  6216. static PyObject *__pyx_n_s_setstate;
  6217. static PyObject *__pyx_n_s_setstate_cython;
  6218. static PyObject *__pyx_n_s_settimeout;
  6219. static PyObject *__pyx_kp_u_settimeout_only_0_timeout_is_all;
  6220. static PyObject *__pyx_n_s_share;
  6221. static PyObject *__pyx_n_s_shell;
  6222. static PyObject *__pyx_kp_u_shell_must_be_False;
  6223. static PyObject *__pyx_kp_u_shell_must_be_True;
  6224. static PyObject *__pyx_n_s_shutdown;
  6225. static PyObject *__pyx_n_s_shutdown_asyncgens;
  6226. static PyObject *__pyx_kp_u_shutdown_method;
  6227. static PyObject *__pyx_n_s_sig;
  6228. static PyObject *__pyx_kp_u_sig_cannot_be_caught;
  6229. static PyObject *__pyx_kp_u_sig_must_be_an_int_not_r;
  6230. static PyObject *__pyx_kp_u_sig_out_of_range_1;
  6231. static PyObject *__pyx_n_s_sighandler;
  6232. static PyObject *__pyx_n_s_siginterrupt;
  6233. static PyObject *__pyx_n_s_signal;
  6234. static PyObject *__pyx_n_s_signum;
  6235. static PyObject *__pyx_n_s_sleep;
  6236. static PyObject *__pyx_n_s_sock;
  6237. static PyObject *__pyx_n_s_sock_accept;
  6238. static PyObject *__pyx_n_s_sock_connect;
  6239. static PyObject *__pyx_n_s_sock_recv;
  6240. static PyObject *__pyx_n_s_sock_recv_into;
  6241. static PyObject *__pyx_kp_u_sock_recv_into_is_called_on_a_c;
  6242. static PyObject *__pyx_kp_u_sock_recv_is_called_on_a_cancel;
  6243. static PyObject *__pyx_n_s_sock_sendall;
  6244. static PyObject *__pyx_kp_u_sock_sendall_is_called_on_a_can;
  6245. static PyObject *__pyx_n_s_sockaddr;
  6246. static PyObject *__pyx_kp_u_sockaddr_must_be_a_tuple_of_2_3;
  6247. static PyObject *__pyx_kp_u_sockaddr_resolved_to_multiple_ad;
  6248. static PyObject *__pyx_kp_u_socket;
  6249. static PyObject *__pyx_n_s_socket_2;
  6250. static PyObject *__pyx_n_u_socket_2;
  6251. static PyObject *__pyx_kp_u_socket_family_mismatch_or_a_DNS;
  6252. static PyObject *__pyx_kp_u_socket_modifier_keyword_argument;
  6253. static PyObject *__pyx_kp_u_socket_send_raised_exception;
  6254. static PyObject *__pyx_n_s_socketpair;
  6255. static PyObject *__pyx_kp_u_sockets;
  6256. static PyObject *__pyx_n_s_sockets_2;
  6257. static PyObject *__pyx_n_u_sockname;
  6258. static PyObject *__pyx_n_s_source;
  6259. static PyObject *__pyx_n_u_source_traceback;
  6260. static PyObject *__pyx_n_s_split;
  6261. static PyObject *__pyx_n_s_ssl;
  6262. static PyObject *__pyx_kp_u_ssl_argument_must_be_an_SSLConte;
  6263. static PyObject *__pyx_n_s_ssl_handshake_timeout;
  6264. static PyObject *__pyx_kp_u_ssl_handshake_timeout_is_only_me;
  6265. static PyObject *__pyx_kp_u_ssl_handshake_timeout_should_be;
  6266. static PyObject *__pyx_kp_u_ssl_is_expected_to_be_None_or_an;
  6267. static PyObject *__pyx_n_s_ssl_object;
  6268. static PyObject *__pyx_n_s_ssl_protocol;
  6269. static PyObject *__pyx_n_s_ssl_shutdown_timeout;
  6270. static PyObject *__pyx_kp_u_ssl_shutdown_timeout_is_only_mea;
  6271. static PyObject *__pyx_kp_u_ssl_shutdown_timeout_should_be_a;
  6272. static PyObject *__pyx_n_s_sslcontext;
  6273. static PyObject *__pyx_kp_u_sslcontext_is_expected_to_be_an;
  6274. static PyObject *__pyx_n_s_st_mode;
  6275. static PyObject *__pyx_kp_u_start_init_can_only_be_called;
  6276. static PyObject *__pyx_n_s_start_new_session;
  6277. static PyObject *__pyx_n_s_start_serving;
  6278. static PyObject *__pyx_n_s_start_tls;
  6279. static PyObject *__pyx_n_s_startupinfo;
  6280. static PyObject *__pyx_kp_u_startupinfo_is_not_supported;
  6281. static PyObject *__pyx_n_s_stat;
  6282. static PyObject *__pyx_n_s_stderr;
  6283. static PyObject *__pyx_n_s_stdin;
  6284. static PyObject *__pyx_n_s_stdio_fut;
  6285. static PyObject *__pyx_n_s_stdio_inited;
  6286. static PyObject *__pyx_n_s_stdout;
  6287. static PyObject *__pyx_n_s_stop;
  6288. static PyObject *__pyx_kp_u_stream_is_open_after_UVStream__t;
  6289. static PyObject *__pyx_n_s_strerror;
  6290. static PyObject *__pyx_kp_s_stringsource;
  6291. static PyObject *__pyx_n_s_submit;
  6292. static PyObject *__pyx_n_s_subprocess;
  6293. static PyObject *__pyx_kp_u_subprocess_STDOUT_is_supported_o;
  6294. static PyObject *__pyx_n_s_subprocess_exec;
  6295. static PyObject *__pyx_n_s_subprocess_run;
  6296. static PyObject *__pyx_n_s_subprocess_shell;
  6297. static PyObject *__pyx_n_s_subtract;
  6298. static PyObject *__pyx_n_s_super;
  6299. static PyObject *__pyx_n_s_sys;
  6300. static PyObject *__pyx_n_u_task;
  6301. static PyObject *__pyx_kp_u_task_factory_must_be_a_callable;
  6302. static PyObject *__pyx_n_u_tcp;
  6303. static PyObject *__pyx_n_s_test;
  6304. static PyObject *__pyx_n_s_test_coroutine_1;
  6305. static PyObject *__pyx_kp_u_the_socket_must_be_non_blocking;
  6306. static PyObject *__pyx_kp_u_this_event_loop_is_already_runni;
  6307. static PyObject *__pyx_n_s_threading;
  6308. static PyObject *__pyx_n_s_throw;
  6309. static PyObject *__pyx_n_s_time;
  6310. static PyObject *__pyx_n_s_timeout;
  6311. static PyObject *__pyx_n_s_traceback;
  6312. static PyObject *__pyx_n_s_traceback_2;
  6313. static PyObject *__pyx_n_s_transport;
  6314. static PyObject *__pyx_n_u_transport;
  6315. static PyObject *__pyx_kp_u_transport_2;
  6316. static PyObject *__pyx_kp_u_transport_sockets_do_not_support;
  6317. static PyObject *__pyx_n_s_transports;
  6318. static PyObject *__pyx_kp_u_try_write_sent_all_data_and_ret;
  6319. static PyObject *__pyx_n_s_type;
  6320. static PyObject *__pyx_n_u_udp;
  6321. static PyObject *__pyx_kp_u_unable_to_listen_no_protocol_fac;
  6322. static PyObject *__pyx_kp_u_unable_to_perform_operation_on_r;
  6323. static PyObject *__pyx_kp_u_unable_to_start_the_loop_it_was;
  6324. static PyObject *__pyx_kp_u_unclosed_resource_r;
  6325. static PyObject *__pyx_kp_u_unclosed_resource_r_2;
  6326. static PyObject *__pyx_kp_u_unclosed_resource_r_could_not_se;
  6327. static PyObject *__pyx_kp_u_unclosed_transport_uvloop_loop;
  6328. static PyObject *__pyx_kp_u_unexpected_address_family;
  6329. static PyObject *__pyx_kp_u_unhandled_error_or_an_empty_buff;
  6330. static PyObject *__pyx_n_s_universal_newlines;
  6331. static PyObject *__pyx_kp_u_universal_newlines_must_be_False;
  6332. static PyObject *__pyx_kp_u_unix_socket_path;
  6333. static PyObject *__pyx_kp_u_unopened_TCPServer;
  6334. static PyObject *__pyx_n_s_unwrap;
  6335. static PyObject *__pyx_n_s_update;
  6336. static PyObject *__pyx_kp_u_uv_close_handle_cb_handle_loop;
  6337. static PyObject *__pyx_kp_u_uv_handle_t_current_freed_total;
  6338. static PyObject *__pyx_kp_u_uv_udp_receive_callback_addr_is;
  6339. static PyObject *__pyx_kp_u_uvloop_PseudoSocket_fd_family_s;
  6340. static PyObject *__pyx_kp_s_uvloop_handles_process_pyx;
  6341. static PyObject *__pyx_n_s_uvloop_loop;
  6342. static PyObject *__pyx_kp_s_uvloop_loop_pyx;
  6343. static PyObject *__pyx_n_s_uvloop_sleep_after_fork;
  6344. static PyObject *__pyx_kp_s_uvloop_sslproto_pyx;
  6345. static PyObject *__pyx_n_s_values;
  6346. static PyObject *__pyx_n_s_version_info;
  6347. static PyObject *__pyx_n_s_wait;
  6348. static PyObject *__pyx_n_s_wait_closed;
  6349. static PyObject *__pyx_n_s_waiter;
  6350. static PyObject *__pyx_n_s_walk_stack;
  6351. static PyObject *__pyx_n_s_warn;
  6352. static PyObject *__pyx_n_s_warn_on_full_buffer;
  6353. static PyObject *__pyx_n_s_warning;
  6354. static PyObject *__pyx_n_s_warnings;
  6355. static PyObject *__pyx_n_u_wb;
  6356. static PyObject *__pyx_n_s_weakref;
  6357. static PyObject *__pyx_n_s_when;
  6358. static PyObject *__pyx_kp_u_without_no_gc_clear_loop_was_se;
  6359. static PyObject *__pyx_n_s_wrap;
  6360. static PyObject *__pyx_n_s_wrap_bio;
  6361. static PyObject *__pyx_n_s_wrap_future;
  6362. static PyObject *__pyx_n_s_write;
  6363. static PyObject *__pyx_n_s_zip;
  6364. static int __pyx_pf_6uvloop_4loop_4Loop___cinit__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */
  6365. static int __pyx_pf_6uvloop_4loop_4Loop_2__init__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */
  6366. static void __pyx_pf_6uvloop_4loop_4Loop_4__dealloc__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */
  6367. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_6__sighandler(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_signum, CYTHON_UNUSED PyObject *__pyx_v_frame); /* proto */
  6368. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_12_getaddrinfo_callback(PyObject *__pyx_self, PyObject *__pyx_v_result); /* proto */
  6369. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_12_getnameinfo_callback(PyObject *__pyx_self, PyObject *__pyx_v_result); /* proto */
  6370. static PyObject *__pyx_lambda_funcdef_lambda(PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_fut); /* proto */
  6371. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_8_get_backend_id(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */
  6372. static PyObject *__pyx_lambda_funcdef_lambda1(PyObject *__pyx_self); /* proto */
  6373. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_16print_debug_info___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */
  6374. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_10__repr__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */
  6375. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_12call_soon(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_callback, PyObject *__pyx_v_context, PyObject *__pyx_v_args); /* proto */
  6376. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_14call_soon_threadsafe(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_callback, PyObject *__pyx_v_context, PyObject *__pyx_v_args); /* proto */
  6377. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_16call_later(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_delay, PyObject *__pyx_v_callback, PyObject *__pyx_v_context, PyObject *__pyx_v_args); /* proto */
  6378. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_18call_at(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_when, PyObject *__pyx_v_callback, PyObject *__pyx_v_context, PyObject *__pyx_v_args); /* proto */
  6379. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_20time(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */
  6380. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_22stop(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */
  6381. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_24run_forever(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */
  6382. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_26close(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */
  6383. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_28get_debug(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */
  6384. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_30set_debug(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_enabled); /* proto */
  6385. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_32is_running(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */
  6386. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_34is_closed(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */
  6387. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_36create_future(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */
  6388. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_38create_task(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_coro); /* proto */
  6389. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_40set_task_factory(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_factory); /* proto */
  6390. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_42get_task_factory(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */
  6391. static PyObject *__pyx_lambda_funcdef_lambda2(PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_fut); /* proto */
  6392. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_44run_until_complete(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_future); /* proto */
  6393. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_46getaddrinfo(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_host, PyObject *__pyx_v_port, int __pyx_v_family, int __pyx_v_type, int __pyx_v_proto, int __pyx_v_flags); /* proto */
  6394. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_49getnameinfo(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_sockaddr, int __pyx_v_flags); /* proto */
  6395. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_52start_tls(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_transport, PyObject *__pyx_v_protocol, PyObject *__pyx_v_sslcontext, PyObject *__pyx_v_server_side, PyObject *__pyx_v_server_hostname, PyObject *__pyx_v_ssl_handshake_timeout, PyObject *__pyx_v_ssl_shutdown_timeout); /* proto */
  6396. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_55create_server(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_protocol_factory, PyObject *__pyx_v_host, PyObject *__pyx_v_port, int __pyx_v_family, int __pyx_v_flags, PyObject *__pyx_v_sock, PyObject *__pyx_v_backlog, PyObject *__pyx_v_ssl, PyObject *__pyx_v_reuse_address, PyObject *__pyx_v_reuse_port, PyObject *__pyx_v_ssl_handshake_timeout, PyObject *__pyx_v_ssl_shutdown_timeout, PyObject *__pyx_v_start_serving); /* proto */
  6397. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_17create_connection_genexpr(PyObject *__pyx_self); /* proto */
  6398. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_17create_connection_3genexpr(PyObject *__pyx_self); /* proto */
  6399. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_58create_connection(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_protocol_factory, PyObject *__pyx_v_host, PyObject *__pyx_v_port, PyObject *__pyx_v_ssl, PyObject *__pyx_v_family, PyObject *__pyx_v_proto, PyObject *__pyx_v_flags, PyObject *__pyx_v_sock, PyObject *__pyx_v_local_addr, PyObject *__pyx_v_server_hostname, PyObject *__pyx_v_ssl_handshake_timeout, PyObject *__pyx_v_ssl_shutdown_timeout); /* proto */
  6400. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_61create_unix_server(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_protocol_factory, PyObject *__pyx_v_path, PyObject *__pyx_v_backlog, PyObject *__pyx_v_sock, PyObject *__pyx_v_ssl, PyObject *__pyx_v_ssl_handshake_timeout, PyObject *__pyx_v_ssl_shutdown_timeout, PyObject *__pyx_v_start_serving); /* proto */
  6401. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_64create_unix_connection(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_protocol_factory, PyObject *__pyx_v_path, PyObject *__pyx_v_ssl, PyObject *__pyx_v_sock, PyObject *__pyx_v_server_hostname, PyObject *__pyx_v_ssl_handshake_timeout, PyObject *__pyx_v_ssl_shutdown_timeout); /* proto */
  6402. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_67default_exception_handler(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_context); /* proto */
  6403. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_69get_exception_handler(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */
  6404. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_71set_exception_handler(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_handler); /* proto */
  6405. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_73call_exception_handler(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_context); /* proto */
  6406. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_75add_reader(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_fileobj, PyObject *__pyx_v_callback, PyObject *__pyx_v_args); /* proto */
  6407. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_77remove_reader(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_fileobj); /* proto */
  6408. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_79add_writer(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_fileobj, PyObject *__pyx_v_callback, PyObject *__pyx_v_args); /* proto */
  6409. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_81remove_writer(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_fileobj); /* proto */
  6410. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_83sock_recv(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_sock, PyObject *__pyx_v_n); /* proto */
  6411. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_86sock_recv_into(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_sock, PyObject *__pyx_v_buf); /* proto */
  6412. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_89sock_sendall(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_sock, PyObject *__pyx_v_data); /* proto */
  6413. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_92sock_accept(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_sock); /* proto */
  6414. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_95sock_connect(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_sock, PyObject *__pyx_v_address); /* proto */
  6415. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_98connect_accepted_socket(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_protocol_factory, PyObject *__pyx_v_sock, PyObject *__pyx_v_ssl, PyObject *__pyx_v_ssl_handshake_timeout, PyObject *__pyx_v_ssl_shutdown_timeout); /* proto */
  6416. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_101run_in_executor(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_executor, PyObject *__pyx_v_func, PyObject *__pyx_v_args); /* proto */
  6417. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_103set_default_executor(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_executor); /* proto */
  6418. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_105__subprocess_run(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_protocol_factory, PyObject *__pyx_v_args, PyObject *__pyx_v_stdin, PyObject *__pyx_v_stdout, PyObject *__pyx_v_stderr, PyObject *__pyx_v_universal_newlines, CYTHON_UNUSED PyObject *__pyx_v_shell, PyObject *__pyx_v_bufsize, PyObject *__pyx_v_preexec_fn, CYTHON_UNUSED PyObject *__pyx_v_close_fds, PyObject *__pyx_v_cwd, PyObject *__pyx_v_env, PyObject *__pyx_v_startupinfo, PyObject *__pyx_v_creationflags, PyObject *__pyx_v_restore_signals, PyObject *__pyx_v_start_new_session, PyObject *__pyx_v_executable, PyObject *__pyx_v_pass_fds, PyObject *__pyx_v___uvloop_sleep_after_fork); /* proto */
  6419. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_108subprocess_shell(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_protocol_factory, PyObject *__pyx_v_cmd, PyObject *__pyx_v_shell, PyObject *__pyx_v_kwargs); /* proto */
  6420. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_111subprocess_exec(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_protocol_factory, PyObject *__pyx_v_program, PyObject *__pyx_v_shell, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
  6421. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_114connect_read_pipe(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_proto_factory, PyObject *__pyx_v_pipe); /* proto */
  6422. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_117connect_write_pipe(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_proto_factory, PyObject *__pyx_v_pipe); /* proto */
  6423. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_120add_signal_handler(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_sig, PyObject *__pyx_v_callback, PyObject *__pyx_v_args); /* proto */
  6424. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_122remove_signal_handler(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_sig); /* proto */
  6425. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_24create_datagram_endpoint_genexpr(PyObject *__pyx_self); /* proto */
  6426. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_124create_datagram_endpoint(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_protocol_factory, PyObject *__pyx_v_local_addr, PyObject *__pyx_v_remote_addr, PyObject *__pyx_v_family, PyObject *__pyx_v_proto, PyObject *__pyx_v_flags, PyObject *__pyx_v_reuse_address, PyObject *__pyx_v_reuse_port, PyObject *__pyx_v_allow_broadcast, PyObject *__pyx_v_sock); /* proto */
  6427. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_127_asyncgen_finalizer_hook(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_agen); /* proto */
  6428. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_129_asyncgen_firstiter_hook(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_agen); /* proto */
  6429. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_131shutdown_asyncgens(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */
  6430. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_22slow_callback_duration___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */
  6431. static int __pyx_pf_6uvloop_4loop_4Loop_22slow_callback_duration_2__set__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
  6432. static int __pyx_pf_6uvloop_4loop_4Loop_22slow_callback_duration_4__del__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */
  6433. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_7_closed___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */
  6434. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_9_debug_cc___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */
  6435. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_20_debug_handles_total___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */
  6436. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_21_debug_handles_closed___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */
  6437. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_22_debug_handles_current___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */
  6438. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_23_debug_uv_handles_total___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */
  6439. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_23_debug_uv_handles_freed___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */
  6440. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_23_debug_cb_handles_total___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */
  6441. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_23_debug_cb_handles_count___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */
  6442. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_29_debug_cb_timer_handles_total___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */
  6443. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_29_debug_cb_timer_handles_count___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */
  6444. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_35_debug_stream_shutdown_errors_total___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */
  6445. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_33_debug_stream_listen_errors_total___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */
  6446. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_27_debug_stream_read_cb_total___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */
  6447. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_34_debug_stream_read_cb_errors_total___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */
  6448. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_28_debug_stream_read_eof_total___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */
  6449. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_38_debug_stream_read_eof_cb_errors_total___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */
  6450. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_31_debug_stream_read_errors_total___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */
  6451. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_25_debug_stream_write_tries___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */
  6452. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_32_debug_stream_write_errors_total___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */
  6453. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_29_debug_stream_write_ctx_total___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */
  6454. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_27_debug_stream_write_ctx_cnt___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */
  6455. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_35_debug_stream_write_cb_errors_total___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */
  6456. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_23_poll_read_events_total___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */
  6457. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_26_poll_read_cb_errors_total___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */
  6458. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_24_poll_write_events_total___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */
  6459. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_27_poll_write_cb_errors_total___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */
  6460. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_21_sock_try_write_total___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */
  6461. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_28_debug_exception_handler_cnt___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */
  6462. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_134__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */
  6463. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_136__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
  6464. static PyObject *__pyx_pf_6uvloop_4loop_23_SyncSocketReaderFuture___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_sock, PyObject *__pyx_v_loop); /* proto */
  6465. static PyObject *__pyx_pf_6uvloop_4loop_23_SyncSocketReaderFuture_2cancel(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
  6466. static PyObject *__pyx_pf_6uvloop_4loop_23_SyncSocketWriterFuture___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_sock, PyObject *__pyx_v_loop); /* proto */
  6467. static PyObject *__pyx_pf_6uvloop_4loop_23_SyncSocketWriterFuture_2cancel(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
  6468. static int __pyx_pf_6uvloop_4loop_6Handle___cinit__(struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_self); /* proto */
  6469. static void __pyx_pf_6uvloop_4loop_6Handle_2__dealloc__(struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_self); /* proto */
  6470. static int __pyx_pf_6uvloop_4loop_6Handle_4__init__(struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_self); /* proto */
  6471. static PyObject *__pyx_pf_6uvloop_4loop_6Handle_6__repr__(struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_self); /* proto */
  6472. static PyObject *__pyx_pf_6uvloop_4loop_6Handle_8cancel(struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_self); /* proto */
  6473. static PyObject *__pyx_pf_6uvloop_4loop_6Handle_10cancelled(struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_self); /* proto */
  6474. static PyObject *__pyx_pf_6uvloop_4loop_6Handle_17_source_traceback___get__(struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_self); /* proto */
  6475. static PyObject *__pyx_pf_6uvloop_4loop_6Handle_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_self); /* proto */
  6476. static PyObject *__pyx_pf_6uvloop_4loop_6Handle_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
  6477. static int __pyx_pf_6uvloop_4loop_11TimerHandle___cinit__(struct __pyx_obj_6uvloop_4loop_TimerHandle *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, PyObject *__pyx_v_callback, PyObject *__pyx_v_args, uint64_t __pyx_v_delay, PyObject *__pyx_v_context); /* proto */
  6478. static PyObject *__pyx_pf_6uvloop_4loop_11TimerHandle_17_source_traceback___get__(struct __pyx_obj_6uvloop_4loop_TimerHandle *__pyx_v_self); /* proto */
  6479. static void __pyx_pf_6uvloop_4loop_11TimerHandle_2__dealloc__(struct __pyx_obj_6uvloop_4loop_TimerHandle *__pyx_v_self); /* proto */
  6480. static PyObject *__pyx_pf_6uvloop_4loop_11TimerHandle_4__repr__(struct __pyx_obj_6uvloop_4loop_TimerHandle *__pyx_v_self); /* proto */
  6481. static PyObject *__pyx_pf_6uvloop_4loop_11TimerHandle_6cancelled(struct __pyx_obj_6uvloop_4loop_TimerHandle *__pyx_v_self); /* proto */
  6482. static PyObject *__pyx_pf_6uvloop_4loop_11TimerHandle_8cancel(struct __pyx_obj_6uvloop_4loop_TimerHandle *__pyx_v_self); /* proto */
  6483. static PyObject *__pyx_pf_6uvloop_4loop_11TimerHandle_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_TimerHandle *__pyx_v_self); /* proto */
  6484. static PyObject *__pyx_pf_6uvloop_4loop_11TimerHandle_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_TimerHandle *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
  6485. static int __pyx_pf_6uvloop_4loop_12PseudoSocket___init__(struct __pyx_obj_6uvloop_4loop_PseudoSocket *__pyx_v_self, int __pyx_v_family, int __pyx_v_type, int __pyx_v_proto, int __pyx_v_fd); /* proto */
  6486. static PyObject *__pyx_pf_6uvloop_4loop_12PseudoSocket_6family___get__(struct __pyx_obj_6uvloop_4loop_PseudoSocket *__pyx_v_self); /* proto */
  6487. static PyObject *__pyx_pf_6uvloop_4loop_12PseudoSocket_4type___get__(struct __pyx_obj_6uvloop_4loop_PseudoSocket *__pyx_v_self); /* proto */
  6488. static PyObject *__pyx_pf_6uvloop_4loop_12PseudoSocket_5proto___get__(struct __pyx_obj_6uvloop_4loop_PseudoSocket *__pyx_v_self); /* proto */
  6489. static PyObject *__pyx_pf_6uvloop_4loop_12PseudoSocket_2__repr__(struct __pyx_obj_6uvloop_4loop_PseudoSocket *__pyx_v_self); /* proto */
  6490. static PyObject *__pyx_pf_6uvloop_4loop_12PseudoSocket_4__getstate__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_PseudoSocket *__pyx_v_self); /* proto */
  6491. static PyObject *__pyx_pf_6uvloop_4loop_12PseudoSocket_6fileno(struct __pyx_obj_6uvloop_4loop_PseudoSocket *__pyx_v_self); /* proto */
  6492. static PyObject *__pyx_pf_6uvloop_4loop_12PseudoSocket_8dup(struct __pyx_obj_6uvloop_4loop_PseudoSocket *__pyx_v_self); /* proto */
  6493. static PyObject *__pyx_pf_6uvloop_4loop_12PseudoSocket_10get_inheritable(struct __pyx_obj_6uvloop_4loop_PseudoSocket *__pyx_v_self); /* proto */
  6494. static PyObject *__pyx_pf_6uvloop_4loop_12PseudoSocket_12set_inheritable(struct __pyx_obj_6uvloop_4loop_PseudoSocket *__pyx_v_self); /* proto */
  6495. static PyObject *__pyx_pf_6uvloop_4loop_12PseudoSocket_14ioctl(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_PseudoSocket *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
  6496. static PyObject *__pyx_pf_6uvloop_4loop_12PseudoSocket_16getsockopt(struct __pyx_obj_6uvloop_4loop_PseudoSocket *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
  6497. static PyObject *__pyx_pf_6uvloop_4loop_12PseudoSocket_18setsockopt(struct __pyx_obj_6uvloop_4loop_PseudoSocket *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
  6498. static PyObject *__pyx_pf_6uvloop_4loop_12PseudoSocket_20getpeername(struct __pyx_obj_6uvloop_4loop_PseudoSocket *__pyx_v_self); /* proto */
  6499. static PyObject *__pyx_pf_6uvloop_4loop_12PseudoSocket_22getsockname(struct __pyx_obj_6uvloop_4loop_PseudoSocket *__pyx_v_self); /* proto */
  6500. static PyObject *__pyx_pf_6uvloop_4loop_12PseudoSocket_24share(struct __pyx_obj_6uvloop_4loop_PseudoSocket *__pyx_v_self, PyObject *__pyx_v_process_id); /* proto */
  6501. static PyObject *__pyx_pf_6uvloop_4loop_12PseudoSocket_26accept(struct __pyx_obj_6uvloop_4loop_PseudoSocket *__pyx_v_self); /* proto */
  6502. static PyObject *__pyx_pf_6uvloop_4loop_12PseudoSocket_28connect(struct __pyx_obj_6uvloop_4loop_PseudoSocket *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args); /* proto */
  6503. static PyObject *__pyx_pf_6uvloop_4loop_12PseudoSocket_30connect_ex(struct __pyx_obj_6uvloop_4loop_PseudoSocket *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args); /* proto */
  6504. static PyObject *__pyx_pf_6uvloop_4loop_12PseudoSocket_32bind(struct __pyx_obj_6uvloop_4loop_PseudoSocket *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args); /* proto */
  6505. static PyObject *__pyx_pf_6uvloop_4loop_12PseudoSocket_34listen(struct __pyx_obj_6uvloop_4loop_PseudoSocket *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
  6506. static PyObject *__pyx_pf_6uvloop_4loop_12PseudoSocket_36makefile(struct __pyx_obj_6uvloop_4loop_PseudoSocket *__pyx_v_self); /* proto */
  6507. static PyObject *__pyx_pf_6uvloop_4loop_12PseudoSocket_38sendfile(struct __pyx_obj_6uvloop_4loop_PseudoSocket *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
  6508. static PyObject *__pyx_pf_6uvloop_4loop_12PseudoSocket_40close(struct __pyx_obj_6uvloop_4loop_PseudoSocket *__pyx_v_self); /* proto */
  6509. static PyObject *__pyx_pf_6uvloop_4loop_12PseudoSocket_42detach(struct __pyx_obj_6uvloop_4loop_PseudoSocket *__pyx_v_self); /* proto */
  6510. static PyObject *__pyx_pf_6uvloop_4loop_12PseudoSocket_44shutdown(struct __pyx_obj_6uvloop_4loop_PseudoSocket *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args); /* proto */
  6511. static PyObject *__pyx_pf_6uvloop_4loop_12PseudoSocket_46sendmsg_afalg(struct __pyx_obj_6uvloop_4loop_PseudoSocket *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
  6512. static PyObject *__pyx_pf_6uvloop_4loop_12PseudoSocket_48sendmsg(struct __pyx_obj_6uvloop_4loop_PseudoSocket *__pyx_v_self); /* proto */
  6513. static PyObject *__pyx_pf_6uvloop_4loop_12PseudoSocket_50sendto(struct __pyx_obj_6uvloop_4loop_PseudoSocket *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
  6514. static PyObject *__pyx_pf_6uvloop_4loop_12PseudoSocket_52send(struct __pyx_obj_6uvloop_4loop_PseudoSocket *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
  6515. static PyObject *__pyx_pf_6uvloop_4loop_12PseudoSocket_54sendall(struct __pyx_obj_6uvloop_4loop_PseudoSocket *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
  6516. static PyObject *__pyx_pf_6uvloop_4loop_12PseudoSocket_56recv_into(struct __pyx_obj_6uvloop_4loop_PseudoSocket *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
  6517. static PyObject *__pyx_pf_6uvloop_4loop_12PseudoSocket_58recvfrom_into(struct __pyx_obj_6uvloop_4loop_PseudoSocket *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
  6518. static PyObject *__pyx_pf_6uvloop_4loop_12PseudoSocket_60recvmsg_into(struct __pyx_obj_6uvloop_4loop_PseudoSocket *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
  6519. static PyObject *__pyx_pf_6uvloop_4loop_12PseudoSocket_62recvmsg(struct __pyx_obj_6uvloop_4loop_PseudoSocket *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
  6520. static PyObject *__pyx_pf_6uvloop_4loop_12PseudoSocket_64recvfrom(struct __pyx_obj_6uvloop_4loop_PseudoSocket *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
  6521. static PyObject *__pyx_pf_6uvloop_4loop_12PseudoSocket_66recv(struct __pyx_obj_6uvloop_4loop_PseudoSocket *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
  6522. static PyObject *__pyx_pf_6uvloop_4loop_12PseudoSocket_68settimeout(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_PseudoSocket *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
  6523. static PyObject *__pyx_pf_6uvloop_4loop_12PseudoSocket_70gettimeout(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_PseudoSocket *__pyx_v_self); /* proto */
  6524. static PyObject *__pyx_pf_6uvloop_4loop_12PseudoSocket_72setblocking(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_PseudoSocket *__pyx_v_self, PyObject *__pyx_v_flag); /* proto */
  6525. static PyObject *__pyx_pf_6uvloop_4loop_12PseudoSocket_74__enter__(struct __pyx_obj_6uvloop_4loop_PseudoSocket *__pyx_v_self); /* proto */
  6526. static PyObject *__pyx_pf_6uvloop_4loop_12PseudoSocket_76__exit__(struct __pyx_obj_6uvloop_4loop_PseudoSocket *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_err); /* proto */
  6527. static PyObject *__pyx_pf_6uvloop_4loop_12PseudoSocket_78__reduce_cython__(struct __pyx_obj_6uvloop_4loop_PseudoSocket *__pyx_v_self); /* proto */
  6528. static PyObject *__pyx_pf_6uvloop_4loop_12PseudoSocket_80__setstate_cython__(struct __pyx_obj_6uvloop_4loop_PseudoSocket *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
  6529. static int __pyx_pf_6uvloop_4loop_8LruCache___init__(struct __pyx_obj_6uvloop_4loop_LruCache *__pyx_v_self, PyObject *__pyx_v_maxsize); /* proto */
  6530. static PyObject *__pyx_pf_6uvloop_4loop_8LruCache_2__getitem__(struct __pyx_obj_6uvloop_4loop_LruCache *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
  6531. static int __pyx_pf_6uvloop_4loop_8LruCache_4__setitem__(struct __pyx_obj_6uvloop_4loop_LruCache *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_o); /* proto */
  6532. static int __pyx_pf_6uvloop_4loop_8LruCache_6__delitem__(struct __pyx_obj_6uvloop_4loop_LruCache *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
  6533. static int __pyx_pf_6uvloop_4loop_8LruCache_8__contains__(struct __pyx_obj_6uvloop_4loop_LruCache *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
  6534. static Py_ssize_t __pyx_pf_6uvloop_4loop_8LruCache_10__len__(struct __pyx_obj_6uvloop_4loop_LruCache *__pyx_v_self); /* proto */
  6535. static PyObject *__pyx_pf_6uvloop_4loop_8LruCache_12__iter__(struct __pyx_obj_6uvloop_4loop_LruCache *__pyx_v_self); /* proto */
  6536. static PyObject *__pyx_pf_6uvloop_4loop_8LruCache_14__reduce_cython__(struct __pyx_obj_6uvloop_4loop_LruCache *__pyx_v_self); /* proto */
  6537. static PyObject *__pyx_pf_6uvloop_4loop_8LruCache_16__setstate_cython__(struct __pyx_obj_6uvloop_4loop_LruCache *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
  6538. static int __pyx_pf_6uvloop_4loop_8UVHandle___cinit__(struct __pyx_obj_6uvloop_4loop_UVHandle *__pyx_v_self); /* proto */
  6539. static int __pyx_pf_6uvloop_4loop_8UVHandle_2__init__(struct __pyx_obj_6uvloop_4loop_UVHandle *__pyx_v_self); /* proto */
  6540. static void __pyx_pf_6uvloop_4loop_8UVHandle_4__dealloc__(struct __pyx_obj_6uvloop_4loop_UVHandle *__pyx_v_self); /* proto */
  6541. static PyObject *__pyx_pf_6uvloop_4loop_8UVHandle_6__repr__(struct __pyx_obj_6uvloop_4loop_UVHandle *__pyx_v_self); /* proto */
  6542. static PyObject *__pyx_pf_6uvloop_4loop_8UVHandle_17_source_traceback___get__(struct __pyx_obj_6uvloop_4loop_UVHandle *__pyx_v_self); /* proto */
  6543. static PyObject *__pyx_pf_6uvloop_4loop_8UVHandle_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVHandle *__pyx_v_self); /* proto */
  6544. static PyObject *__pyx_pf_6uvloop_4loop_8UVHandle_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVHandle *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
  6545. static int __pyx_pf_6uvloop_4loop_14UVSocketHandle___cinit__(struct __pyx_obj_6uvloop_4loop_UVSocketHandle *__pyx_v_self); /* proto */
  6546. static PyObject *__pyx_pf_6uvloop_4loop_14UVSocketHandle_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVSocketHandle *__pyx_v_self); /* proto */
  6547. static PyObject *__pyx_pf_6uvloop_4loop_14UVSocketHandle_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVSocketHandle *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
  6548. static PyObject *__pyx_pf_6uvloop_4loop_7UVAsync___reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVAsync *__pyx_v_self); /* proto */
  6549. static PyObject *__pyx_pf_6uvloop_4loop_7UVAsync_2__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVAsync *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
  6550. static PyObject *__pyx_pf_6uvloop_4loop_6UVIdle___reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVIdle *__pyx_v_self); /* proto */
  6551. static PyObject *__pyx_pf_6uvloop_4loop_6UVIdle_2__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVIdle *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
  6552. static PyObject *__pyx_pf_6uvloop_4loop_7UVCheck___reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVCheck *__pyx_v_self); /* proto */
  6553. static PyObject *__pyx_pf_6uvloop_4loop_7UVCheck_2__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVCheck *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
  6554. static PyObject *__pyx_pf_6uvloop_4loop_7UVTimer___reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVTimer *__pyx_v_self); /* proto */
  6555. static PyObject *__pyx_pf_6uvloop_4loop_7UVTimer_2__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVTimer *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
  6556. static PyObject *__pyx_pf_6uvloop_4loop_6UVPoll___reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVPoll *__pyx_v_self); /* proto */
  6557. static PyObject *__pyx_pf_6uvloop_4loop_6UVPoll_2__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVPoll *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
  6558. static int __pyx_pf_6uvloop_4loop_15UVBaseTransport___cinit__(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self); /* proto */
  6559. static PyObject *__pyx_pf_6uvloop_4loop_15UVBaseTransport_7_paused___get__(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self); /* proto */
  6560. static PyObject *__pyx_pf_6uvloop_4loop_15UVBaseTransport_2get_protocol(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self); /* proto */
  6561. static PyObject *__pyx_pf_6uvloop_4loop_15UVBaseTransport_4set_protocol(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self, PyObject *__pyx_v_protocol); /* proto */
  6562. static PyObject *__pyx_pf_6uvloop_4loop_15UVBaseTransport_6_force_close(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self, PyObject *__pyx_v_exc); /* proto */
  6563. static PyObject *__pyx_pf_6uvloop_4loop_15UVBaseTransport_8abort(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self); /* proto */
  6564. static PyObject *__pyx_pf_6uvloop_4loop_15UVBaseTransport_10close(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self); /* proto */
  6565. static PyObject *__pyx_pf_6uvloop_4loop_15UVBaseTransport_12is_closing(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self); /* proto */
  6566. static PyObject *__pyx_pf_6uvloop_4loop_15UVBaseTransport_14get_write_buffer_size(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self); /* proto */
  6567. static PyObject *__pyx_pf_6uvloop_4loop_15UVBaseTransport_16set_write_buffer_limits(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self, PyObject *__pyx_v_high, PyObject *__pyx_v_low); /* proto */
  6568. static PyObject *__pyx_pf_6uvloop_4loop_15UVBaseTransport_18get_write_buffer_limits(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self); /* proto */
  6569. static PyObject *__pyx_pf_6uvloop_4loop_15UVBaseTransport_20get_extra_info(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_default); /* proto */
  6570. static PyObject *__pyx_pf_6uvloop_4loop_15UVBaseTransport_8_closing___get__(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self); /* proto */
  6571. static PyObject *__pyx_pf_6uvloop_4loop_15UVBaseTransport_22__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self); /* proto */
  6572. static PyObject *__pyx_pf_6uvloop_4loop_15UVBaseTransport_24__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
  6573. static void __pyx_pf_6uvloop_4loop_19_StreamWriteContext___dealloc__(struct __pyx_obj_6uvloop_4loop__StreamWriteContext *__pyx_v_self); /* proto */
  6574. static PyObject *__pyx_pf_6uvloop_4loop_19_StreamWriteContext_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop__StreamWriteContext *__pyx_v_self); /* proto */
  6575. static PyObject *__pyx_pf_6uvloop_4loop_19_StreamWriteContext_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop__StreamWriteContext *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
  6576. static int __pyx_pf_6uvloop_4loop_8UVStream___cinit__(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self); /* proto */
  6577. static PyObject *__pyx_pf_6uvloop_4loop_8UVStream_2__repr__(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self); /* proto */
  6578. static PyObject *__pyx_pf_6uvloop_4loop_8UVStream_4write(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self, PyObject *__pyx_v_buf); /* proto */
  6579. static PyObject *__pyx_pf_6uvloop_4loop_8UVStream_6writelines(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self, PyObject *__pyx_v_bufs); /* proto */
  6580. static PyObject *__pyx_pf_6uvloop_4loop_8UVStream_8write_eof(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self); /* proto */
  6581. static PyObject *__pyx_pf_6uvloop_4loop_8UVStream_10can_write_eof(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self); /* proto */
  6582. static PyObject *__pyx_pf_6uvloop_4loop_8UVStream_12is_reading(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self); /* proto */
  6583. static PyObject *__pyx_pf_6uvloop_4loop_8UVStream_14pause_reading(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self); /* proto */
  6584. static PyObject *__pyx_pf_6uvloop_4loop_8UVStream_16resume_reading(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self); /* proto */
  6585. static PyObject *__pyx_pf_6uvloop_4loop_8UVStream_18__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self); /* proto */
  6586. static PyObject *__pyx_pf_6uvloop_4loop_8UVStream_20__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
  6587. static int __pyx_pf_6uvloop_4loop_14UVStreamServer___cinit__(struct __pyx_obj_6uvloop_4loop_UVStreamServer *__pyx_v_self); /* proto */
  6588. static PyObject *__pyx_pf_6uvloop_4loop_14UVStreamServer_2__on_ssl_connected(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVStreamServer *__pyx_v_self, PyObject *__pyx_v_transport, PyObject *__pyx_v_fut); /* proto */
  6589. static PyObject *__pyx_pf_6uvloop_4loop_14UVStreamServer_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVStreamServer *__pyx_v_self); /* proto */
  6590. static PyObject *__pyx_pf_6uvloop_4loop_14UVStreamServer_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVStreamServer *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
  6591. static PyObject *__pyx_pf_6uvloop_4loop_9TCPServer___reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_TCPServer *__pyx_v_self); /* proto */
  6592. static PyObject *__pyx_pf_6uvloop_4loop_9TCPServer_2__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_TCPServer *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
  6593. static PyObject *__pyx_pf_6uvloop_4loop_12TCPTransport_get_extra_info(struct __pyx_obj_6uvloop_4loop_TCPTransport *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_default); /* proto */
  6594. static PyObject *__pyx_pf_6uvloop_4loop_12TCPTransport_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_TCPTransport *__pyx_v_self); /* proto */
  6595. static PyObject *__pyx_pf_6uvloop_4loop_12TCPTransport_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_TCPTransport *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
  6596. static int __pyx_pf_6uvloop_4loop_18_TCPConnectRequest___cinit__(struct __pyx_obj_6uvloop_4loop__TCPConnectRequest *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_loop, PyObject *__pyx_v_transport); /* proto */
  6597. static PyObject *__pyx_pf_6uvloop_4loop_18_TCPConnectRequest_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop__TCPConnectRequest *__pyx_v_self); /* proto */
  6598. static PyObject *__pyx_pf_6uvloop_4loop_18_TCPConnectRequest_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop__TCPConnectRequest *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
  6599. static PyObject *__pyx_pf_6uvloop_4loop_10UnixServer___reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UnixServer *__pyx_v_self); /* proto */
  6600. static PyObject *__pyx_pf_6uvloop_4loop_10UnixServer_2__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UnixServer *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
  6601. static PyObject *__pyx_pf_6uvloop_4loop_13UnixTransport___reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UnixTransport *__pyx_v_self); /* proto */
  6602. static PyObject *__pyx_pf_6uvloop_4loop_13UnixTransport_2__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UnixTransport *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
  6603. static PyObject *__pyx_pf_6uvloop_4loop_17ReadUnixTransport_get_write_buffer_limits(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *__pyx_v_self); /* proto */
  6604. static PyObject *__pyx_pf_6uvloop_4loop_17ReadUnixTransport_2set_write_buffer_limits(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_high, CYTHON_UNUSED PyObject *__pyx_v_low); /* proto */
  6605. static PyObject *__pyx_pf_6uvloop_4loop_17ReadUnixTransport_4get_write_buffer_size(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *__pyx_v_self); /* proto */
  6606. static PyObject *__pyx_pf_6uvloop_4loop_17ReadUnixTransport_6write(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_data); /* proto */
  6607. static PyObject *__pyx_pf_6uvloop_4loop_17ReadUnixTransport_8writelines(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_list_of_data); /* proto */
  6608. static PyObject *__pyx_pf_6uvloop_4loop_17ReadUnixTransport_10write_eof(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *__pyx_v_self); /* proto */
  6609. static PyObject *__pyx_pf_6uvloop_4loop_17ReadUnixTransport_12can_write_eof(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *__pyx_v_self); /* proto */
  6610. static PyObject *__pyx_pf_6uvloop_4loop_17ReadUnixTransport_14abort(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *__pyx_v_self); /* proto */
  6611. static PyObject *__pyx_pf_6uvloop_4loop_17ReadUnixTransport_16__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *__pyx_v_self); /* proto */
  6612. static PyObject *__pyx_pf_6uvloop_4loop_17ReadUnixTransport_18__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
  6613. static int __pyx_pf_6uvloop_4loop_18WriteUnixTransport___cinit__(struct __pyx_obj_6uvloop_4loop_WriteUnixTransport *__pyx_v_self); /* proto */
  6614. static PyObject *__pyx_pf_6uvloop_4loop_18WriteUnixTransport_2pause_reading(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_WriteUnixTransport *__pyx_v_self); /* proto */
  6615. static PyObject *__pyx_pf_6uvloop_4loop_18WriteUnixTransport_4resume_reading(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_WriteUnixTransport *__pyx_v_self); /* proto */
  6616. static PyObject *__pyx_pf_6uvloop_4loop_18WriteUnixTransport_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_WriteUnixTransport *__pyx_v_self); /* proto */
  6617. static PyObject *__pyx_pf_6uvloop_4loop_18WriteUnixTransport_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_WriteUnixTransport *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
  6618. static int __pyx_pf_6uvloop_4loop_19_PipeConnectRequest___cinit__(struct __pyx_obj_6uvloop_4loop__PipeConnectRequest *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_loop, PyObject *__pyx_v_transport); /* proto */
  6619. static PyObject *__pyx_pf_6uvloop_4loop_19_PipeConnectRequest_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop__PipeConnectRequest *__pyx_v_self); /* proto */
  6620. static PyObject *__pyx_pf_6uvloop_4loop_19_PipeConnectRequest_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop__PipeConnectRequest *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
  6621. static int __pyx_pf_6uvloop_4loop_9UVProcess___cinit__(struct __pyx_obj_6uvloop_4loop_UVProcess *__pyx_v_self); /* proto */
  6622. static void __pyx_pf_6uvloop_4loop_9UVProcess_2__dealloc__(struct __pyx_obj_6uvloop_4loop_UVProcess *__pyx_v_self); /* proto */
  6623. static PyObject *__pyx_pf_6uvloop_4loop_9UVProcess_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVProcess *__pyx_v_self); /* proto */
  6624. static PyObject *__pyx_pf_6uvloop_4loop_9UVProcess_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVProcess *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
  6625. static int __pyx_pf_6uvloop_4loop_18UVProcessTransport___cinit__(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self); /* proto */
  6626. static PyObject *__pyx_pf_6uvloop_4loop_18UVProcessTransport_2__stdio_inited(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self, PyObject *__pyx_v_waiter, PyObject *__pyx_v_stdio_fut); /* proto */
  6627. static PyObject *__pyx_pf_6uvloop_4loop_18UVProcessTransport_4get_protocol(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self); /* proto */
  6628. static PyObject *__pyx_pf_6uvloop_4loop_18UVProcessTransport_6set_protocol(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self, PyObject *__pyx_v_protocol); /* proto */
  6629. static PyObject *__pyx_pf_6uvloop_4loop_18UVProcessTransport_8get_pid(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self); /* proto */
  6630. static PyObject *__pyx_pf_6uvloop_4loop_18UVProcessTransport_10get_returncode(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self); /* proto */
  6631. static PyObject *__pyx_pf_6uvloop_4loop_18UVProcessTransport_12get_pipe_transport(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self, PyObject *__pyx_v_fd); /* proto */
  6632. static PyObject *__pyx_pf_6uvloop_4loop_18UVProcessTransport_14terminate(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self); /* proto */
  6633. static PyObject *__pyx_pf_6uvloop_4loop_18UVProcessTransport_16kill(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self); /* proto */
  6634. static PyObject *__pyx_pf_6uvloop_4loop_18UVProcessTransport_18send_signal(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self, int __pyx_v_signal); /* proto */
  6635. static PyObject *__pyx_pf_6uvloop_4loop_18UVProcessTransport_20is_closing(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self); /* proto */
  6636. static PyObject *__pyx_pf_6uvloop_4loop_18UVProcessTransport_22close(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self); /* proto */
  6637. static PyObject *__pyx_pf_6uvloop_4loop_18UVProcessTransport_24get_extra_info(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_name, PyObject *__pyx_v_default); /* proto */
  6638. static PyObject *__pyx_pf_6uvloop_4loop_18UVProcessTransport_26_wait(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self); /* proto */
  6639. static PyObject *__pyx_pf_6uvloop_4loop_18UVProcessTransport_28__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self); /* proto */
  6640. static PyObject *__pyx_pf_6uvloop_4loop_18UVProcessTransport_30__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
  6641. static PyObject *__pyx_pf_6uvloop_4loop_24WriteSubprocessPipeProto___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_proc, PyObject *__pyx_v_fd); /* proto */
  6642. static PyObject *__pyx_pf_6uvloop_4loop_24WriteSubprocessPipeProto_2connection_made(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_transport); /* proto */
  6643. static PyObject *__pyx_pf_6uvloop_4loop_24WriteSubprocessPipeProto_4__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
  6644. static PyObject *__pyx_pf_6uvloop_4loop_24WriteSubprocessPipeProto_6connection_lost(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_exc); /* proto */
  6645. static PyObject *__pyx_pf_6uvloop_4loop_24WriteSubprocessPipeProto_8pause_writing(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
  6646. static PyObject *__pyx_pf_6uvloop_4loop_24WriteSubprocessPipeProto_10resume_writing(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
  6647. static PyObject *__pyx_pf_6uvloop_4loop_23ReadSubprocessPipeProto_data_received(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_data); /* proto */
  6648. static int __pyx_pf_6uvloop_4loop_9UVRequest___cinit__(struct __pyx_obj_6uvloop_4loop_UVRequest *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, CYTHON_UNUSED PyObject *__pyx_v__); /* proto */
  6649. static PyObject *__pyx_pf_6uvloop_4loop_9UVRequest_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVRequest *__pyx_v_self); /* proto */
  6650. static PyObject *__pyx_pf_6uvloop_4loop_9UVRequest_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVRequest *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
  6651. static PyObject *__pyx_pf_6uvloop_4loop_14SockAddrHolder___reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_SockAddrHolder *__pyx_v_self); /* proto */
  6652. static PyObject *__pyx_pf_6uvloop_4loop_14SockAddrHolder_2__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_SockAddrHolder *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
  6653. static int __pyx_pf_6uvloop_4loop_8AddrInfo___cinit__(struct __pyx_obj_6uvloop_4loop_AddrInfo *__pyx_v_self); /* proto */
  6654. static void __pyx_pf_6uvloop_4loop_8AddrInfo_2__dealloc__(struct __pyx_obj_6uvloop_4loop_AddrInfo *__pyx_v_self); /* proto */
  6655. static PyObject *__pyx_pf_6uvloop_4loop_8AddrInfo_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_AddrInfo *__pyx_v_self); /* proto */
  6656. static PyObject *__pyx_pf_6uvloop_4loop_8AddrInfo_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_AddrInfo *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
  6657. static int __pyx_pf_6uvloop_4loop_15AddrInfoRequest___cinit__(struct __pyx_obj_6uvloop_4loop_AddrInfoRequest *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, PyObject *__pyx_v_host, PyObject *__pyx_v_port, int __pyx_v_family, int __pyx_v_type, int __pyx_v_proto, int __pyx_v_flags, PyObject *__pyx_v_callback); /* proto */
  6658. static PyObject *__pyx_pf_6uvloop_4loop_15AddrInfoRequest_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_AddrInfoRequest *__pyx_v_self); /* proto */
  6659. static PyObject *__pyx_pf_6uvloop_4loop_15AddrInfoRequest_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_AddrInfoRequest *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
  6660. static int __pyx_pf_6uvloop_4loop_15NameInfoRequest___cinit__(struct __pyx_obj_6uvloop_4loop_NameInfoRequest *__pyx_v_self, CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, PyObject *__pyx_v_callback); /* proto */
  6661. static PyObject *__pyx_pf_6uvloop_4loop_15NameInfoRequest_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_NameInfoRequest *__pyx_v_self); /* proto */
  6662. static PyObject *__pyx_pf_6uvloop_4loop_15NameInfoRequest_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_NameInfoRequest *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
  6663. static int __pyx_pf_6uvloop_4loop_21_SSLProtocolTransport___cinit__(struct __pyx_obj_6uvloop_4loop__SSLProtocolTransport *__pyx_v_self, PyObject *__pyx_v_loop, PyObject *__pyx_v_ssl_protocol); /* proto */
  6664. static PyObject *__pyx_pf_6uvloop_4loop_21_SSLProtocolTransport_2get_extra_info(struct __pyx_obj_6uvloop_4loop__SSLProtocolTransport *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_default); /* proto */
  6665. static PyObject *__pyx_pf_6uvloop_4loop_21_SSLProtocolTransport_4set_protocol(struct __pyx_obj_6uvloop_4loop__SSLProtocolTransport *__pyx_v_self, PyObject *__pyx_v_protocol); /* proto */
  6666. static PyObject *__pyx_pf_6uvloop_4loop_21_SSLProtocolTransport_6get_protocol(struct __pyx_obj_6uvloop_4loop__SSLProtocolTransport *__pyx_v_self); /* proto */
  6667. static PyObject *__pyx_pf_6uvloop_4loop_21_SSLProtocolTransport_8is_closing(struct __pyx_obj_6uvloop_4loop__SSLProtocolTransport *__pyx_v_self); /* proto */
  6668. static PyObject *__pyx_pf_6uvloop_4loop_21_SSLProtocolTransport_10close(struct __pyx_obj_6uvloop_4loop__SSLProtocolTransport *__pyx_v_self); /* proto */
  6669. static void __pyx_pf_6uvloop_4loop_21_SSLProtocolTransport_12__dealloc__(struct __pyx_obj_6uvloop_4loop__SSLProtocolTransport *__pyx_v_self); /* proto */
  6670. static PyObject *__pyx_pf_6uvloop_4loop_21_SSLProtocolTransport_14is_reading(struct __pyx_obj_6uvloop_4loop__SSLProtocolTransport *__pyx_v_self); /* proto */
  6671. static PyObject *__pyx_pf_6uvloop_4loop_21_SSLProtocolTransport_16pause_reading(struct __pyx_obj_6uvloop_4loop__SSLProtocolTransport *__pyx_v_self); /* proto */
  6672. static PyObject *__pyx_pf_6uvloop_4loop_21_SSLProtocolTransport_18resume_reading(struct __pyx_obj_6uvloop_4loop__SSLProtocolTransport *__pyx_v_self); /* proto */
  6673. static PyObject *__pyx_pf_6uvloop_4loop_21_SSLProtocolTransport_20set_write_buffer_limits(struct __pyx_obj_6uvloop_4loop__SSLProtocolTransport *__pyx_v_self, PyObject *__pyx_v_high, PyObject *__pyx_v_low); /* proto */
  6674. static PyObject *__pyx_pf_6uvloop_4loop_21_SSLProtocolTransport_22get_write_buffer_limits(struct __pyx_obj_6uvloop_4loop__SSLProtocolTransport *__pyx_v_self); /* proto */
  6675. static PyObject *__pyx_pf_6uvloop_4loop_21_SSLProtocolTransport_24get_write_buffer_size(struct __pyx_obj_6uvloop_4loop__SSLProtocolTransport *__pyx_v_self); /* proto */
  6676. static PyObject *__pyx_pf_6uvloop_4loop_21_SSLProtocolTransport_26set_read_buffer_limits(struct __pyx_obj_6uvloop_4loop__SSLProtocolTransport *__pyx_v_self, PyObject *__pyx_v_high, PyObject *__pyx_v_low); /* proto */
  6677. static PyObject *__pyx_pf_6uvloop_4loop_21_SSLProtocolTransport_28get_read_buffer_limits(struct __pyx_obj_6uvloop_4loop__SSLProtocolTransport *__pyx_v_self); /* proto */
  6678. static PyObject *__pyx_pf_6uvloop_4loop_21_SSLProtocolTransport_30get_read_buffer_size(struct __pyx_obj_6uvloop_4loop__SSLProtocolTransport *__pyx_v_self); /* proto */
  6679. static PyObject *__pyx_pf_6uvloop_4loop_21_SSLProtocolTransport_16_protocol_paused___get__(struct __pyx_obj_6uvloop_4loop__SSLProtocolTransport *__pyx_v_self); /* proto */
  6680. static PyObject *__pyx_pf_6uvloop_4loop_21_SSLProtocolTransport_32write(struct __pyx_obj_6uvloop_4loop__SSLProtocolTransport *__pyx_v_self, PyObject *__pyx_v_data); /* proto */
  6681. static PyObject *__pyx_pf_6uvloop_4loop_21_SSLProtocolTransport_34writelines(struct __pyx_obj_6uvloop_4loop__SSLProtocolTransport *__pyx_v_self, PyObject *__pyx_v_list_of_data); /* proto */
  6682. static PyObject *__pyx_pf_6uvloop_4loop_21_SSLProtocolTransport_36write_eof(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop__SSLProtocolTransport *__pyx_v_self); /* proto */
  6683. static PyObject *__pyx_pf_6uvloop_4loop_21_SSLProtocolTransport_38can_write_eof(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop__SSLProtocolTransport *__pyx_v_self); /* proto */
  6684. static PyObject *__pyx_pf_6uvloop_4loop_21_SSLProtocolTransport_40abort(struct __pyx_obj_6uvloop_4loop__SSLProtocolTransport *__pyx_v_self); /* proto */
  6685. static PyObject *__pyx_pf_6uvloop_4loop_21_SSLProtocolTransport_42_force_close(struct __pyx_obj_6uvloop_4loop__SSLProtocolTransport *__pyx_v_self, PyObject *__pyx_v_exc); /* proto */
  6686. static PyObject *__pyx_pf_6uvloop_4loop_21_SSLProtocolTransport_44_test__append_write_backlog(struct __pyx_obj_6uvloop_4loop__SSLProtocolTransport *__pyx_v_self, PyObject *__pyx_v_data); /* proto */
  6687. static PyObject *__pyx_pf_6uvloop_4loop_21_SSLProtocolTransport_46__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop__SSLProtocolTransport *__pyx_v_self); /* proto */
  6688. static PyObject *__pyx_pf_6uvloop_4loop_21_SSLProtocolTransport_48__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop__SSLProtocolTransport *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
  6689. static int __pyx_pf_6uvloop_4loop_11SSLProtocol___cinit__(struct __pyx_obj_6uvloop_4loop_SSLProtocol *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
  6690. static void __pyx_pf_6uvloop_4loop_11SSLProtocol_2__dealloc__(struct __pyx_obj_6uvloop_4loop_SSLProtocol *__pyx_v_self); /* proto */
  6691. static int __pyx_pf_6uvloop_4loop_11SSLProtocol_4__init__(struct __pyx_obj_6uvloop_4loop_SSLProtocol *__pyx_v_self, PyObject *__pyx_v_loop, PyObject *__pyx_v_app_protocol, PyObject *__pyx_v_sslcontext, PyObject *__pyx_v_waiter, PyObject *__pyx_v_server_side, PyObject *__pyx_v_server_hostname, PyObject *__pyx_v_call_connection_made, PyObject *__pyx_v_ssl_handshake_timeout, PyObject *__pyx_v_ssl_shutdown_timeout); /* proto */
  6692. static PyObject *__pyx_pf_6uvloop_4loop_11SSLProtocol_6_get_app_transport(struct __pyx_obj_6uvloop_4loop_SSLProtocol *__pyx_v_self); /* proto */
  6693. static PyObject *__pyx_pf_6uvloop_4loop_11SSLProtocol_8connection_made(struct __pyx_obj_6uvloop_4loop_SSLProtocol *__pyx_v_self, PyObject *__pyx_v_transport); /* proto */
  6694. static PyObject *__pyx_pf_6uvloop_4loop_11SSLProtocol_10connection_lost(struct __pyx_obj_6uvloop_4loop_SSLProtocol *__pyx_v_self, PyObject *__pyx_v_exc); /* proto */
  6695. static PyObject *__pyx_pf_6uvloop_4loop_11SSLProtocol_12get_buffer(struct __pyx_obj_6uvloop_4loop_SSLProtocol *__pyx_v_self, PyObject *__pyx_v_n); /* proto */
  6696. static PyObject *__pyx_pf_6uvloop_4loop_11SSLProtocol_14buffer_updated(struct __pyx_obj_6uvloop_4loop_SSLProtocol *__pyx_v_self, PyObject *__pyx_v_nbytes); /* proto */
  6697. static PyObject *__pyx_pf_6uvloop_4loop_11SSLProtocol_16eof_received(struct __pyx_obj_6uvloop_4loop_SSLProtocol *__pyx_v_self); /* proto */
  6698. static PyObject *__pyx_lambda_funcdef_lambda6(PyObject *__pyx_self); /* proto */
  6699. static PyObject *__pyx_lambda_funcdef_lambda7(PyObject *__pyx_self); /* proto */
  6700. static PyObject *__pyx_lambda_funcdef_lambda8(PyObject *__pyx_self); /* proto */
  6701. static PyObject *__pyx_pf_6uvloop_4loop_11SSLProtocol_15_resume_reading_resume(PyObject *__pyx_self); /* proto */
  6702. static PyObject *__pyx_pf_6uvloop_4loop_11SSLProtocol_18pause_writing(struct __pyx_obj_6uvloop_4loop_SSLProtocol *__pyx_v_self); /* proto */
  6703. static PyObject *__pyx_pf_6uvloop_4loop_11SSLProtocol_20resume_writing(struct __pyx_obj_6uvloop_4loop_SSLProtocol *__pyx_v_self); /* proto */
  6704. static PyObject *__pyx_pf_6uvloop_4loop_11SSLProtocol_22__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_SSLProtocol *__pyx_v_self); /* proto */
  6705. static PyObject *__pyx_pf_6uvloop_4loop_11SSLProtocol_24__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_SSLProtocol *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
  6706. static void __pyx_pf_6uvloop_4loop_15_UDPSendContext___dealloc__(struct __pyx_obj_6uvloop_4loop__UDPSendContext *__pyx_v_self); /* proto */
  6707. static PyObject *__pyx_pf_6uvloop_4loop_15_UDPSendContext_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop__UDPSendContext *__pyx_v_self); /* proto */
  6708. static PyObject *__pyx_pf_6uvloop_4loop_15_UDPSendContext_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop__UDPSendContext *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
  6709. static int __pyx_pf_6uvloop_4loop_12UDPTransport___cinit__(struct __pyx_obj_6uvloop_4loop_UDPTransport *__pyx_v_self); /* proto */
  6710. static PyObject *__pyx_pf_6uvloop_4loop_12UDPTransport_2sendto(struct __pyx_obj_6uvloop_4loop_UDPTransport *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_addr); /* proto */
  6711. static PyObject *__pyx_pf_6uvloop_4loop_12UDPTransport_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UDPTransport *__pyx_v_self); /* proto */
  6712. static PyObject *__pyx_pf_6uvloop_4loop_12UDPTransport_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UDPTransport *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
  6713. static int __pyx_pf_6uvloop_4loop_6Server___cinit__(struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop); /* proto */
  6714. static PyObject *__pyx_pf_6uvloop_4loop_6Server_2__aenter__(struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_self); /* proto */
  6715. static PyObject *__pyx_pf_6uvloop_4loop_6Server_5__aexit__(struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_exc); /* proto */
  6716. static PyObject *__pyx_pf_6uvloop_4loop_6Server_8__repr__(struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_self); /* proto */
  6717. static PyObject *__pyx_pf_6uvloop_4loop_6Server_10get_loop(struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_self); /* proto */
  6718. static PyObject *__pyx_pf_6uvloop_4loop_6Server_12wait_closed(struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_self); /* proto */
  6719. static PyObject *__pyx_pf_6uvloop_4loop_6Server_15close(struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_self); /* proto */
  6720. static PyObject *__pyx_pf_6uvloop_4loop_6Server_17is_serving(struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_self); /* proto */
  6721. static PyObject *__pyx_pf_6uvloop_4loop_6Server_19start_serving(struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_self); /* proto */
  6722. static PyObject *__pyx_pf_6uvloop_4loop_6Server_22serve_forever(struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_self); /* proto */
  6723. static PyObject *__pyx_pf_6uvloop_4loop_6Server_7sockets___get__(struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_self); /* proto */
  6724. static PyObject *__pyx_pf_6uvloop_4loop_6Server_25__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_self); /* proto */
  6725. static PyObject *__pyx_pf_6uvloop_4loop_6Server_27__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
  6726. static PyObject *__pyx_pf_6uvloop_4loop__test_coroutine_1(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
  6727. static PyObject *__pyx_pf_6uvloop_4loop_3__pyx_unpickle_PseudoSocket(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
  6728. static PyObject *__pyx_pf_6uvloop_4loop_5__pyx_unpickle_LruCache(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
  6729. static PyObject *__pyx_pf_11cfunc_dot_to_py_42__Pyx_CFunc_object____Loop____bint___to_py_wrap(PyObject *__pyx_self, struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, int __pyx_v_enabled); /* proto */
  6730. static PyObject *__pyx_tp_new_6uvloop_4loop_UVHandle(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  6731. static PyObject *__pyx_tp_new_6uvloop_4loop_UVSocketHandle(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  6732. static PyObject *__pyx_tp_new_6uvloop_4loop_UVAsync(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  6733. static PyObject *__pyx_tp_new_6uvloop_4loop_UVTimer(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  6734. static PyObject *__pyx_tp_new_6uvloop_4loop_UVIdle(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  6735. static PyObject *__pyx_tp_new_6uvloop_4loop_UVBaseTransport(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  6736. static PyObject *__pyx_tp_new_6uvloop_4loop_Loop(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  6737. static PyObject *__pyx_tp_new_6uvloop_4loop_Handle(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  6738. static PyObject *__pyx_tp_new_6uvloop_4loop_TimerHandle(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  6739. static PyObject *__pyx_tp_new_6uvloop_4loop_UVCheck(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  6740. static PyObject *__pyx_tp_new_6uvloop_4loop_UVPoll(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  6741. static PyObject *__pyx_tp_new_6uvloop_4loop_UVStream(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  6742. static PyObject *__pyx_tp_new_6uvloop_4loop_UVStreamServer(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  6743. static PyObject *__pyx_tp_new_6uvloop_4loop_TCPServer(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  6744. static PyObject *__pyx_tp_new_6uvloop_4loop_TCPTransport(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  6745. static PyObject *__pyx_tp_new_6uvloop_4loop_UnixServer(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  6746. static PyObject *__pyx_tp_new_6uvloop_4loop_UnixTransport(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  6747. static PyObject *__pyx_tp_new_6uvloop_4loop_ReadUnixTransport(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  6748. static PyObject *__pyx_tp_new_6uvloop_4loop_WriteUnixTransport(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  6749. static PyObject *__pyx_tp_new_6uvloop_4loop_UVProcess(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  6750. static PyObject *__pyx_tp_new_6uvloop_4loop_UVProcessTransport(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  6751. static PyObject *__pyx_tp_new_6uvloop_4loop_UVRequest(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  6752. static PyObject *__pyx_tp_new_6uvloop_4loop__SSLProtocolTransport(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  6753. static PyObject *__pyx_tp_new_6uvloop_4loop_SSLProtocol(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  6754. static PyObject *__pyx_tp_new_6uvloop_4loop_UDPTransport(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  6755. static PyObject *__pyx_tp_new_6uvloop_4loop_Server(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  6756. static PyObject *__pyx_tp_new_6uvloop_4loop_PseudoSocket(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  6757. static PyObject *__pyx_tp_new_6uvloop_4loop_LruCache(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  6758. static PyObject *__pyx_tp_new_6uvloop_4loop__StreamWriteContext(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  6759. static PyObject *__pyx_tp_new_6uvloop_4loop__TCPConnectRequest(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  6760. static PyObject *__pyx_tp_new_6uvloop_4loop__PipeConnectRequest(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  6761. static PyObject *__pyx_tp_new_6uvloop_4loop_SockAddrHolder(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  6762. static PyObject *__pyx_tp_new_6uvloop_4loop_AddrInfo(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  6763. static PyObject *__pyx_tp_new_6uvloop_4loop_AddrInfoRequest(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  6764. static PyObject *__pyx_tp_new_6uvloop_4loop_NameInfoRequest(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  6765. static PyObject *__pyx_tp_new_6uvloop_4loop__UDPSendContext(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  6766. static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct___getaddrinfo(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  6767. static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_1__getnameinfo(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  6768. static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_2__sock_connect(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  6769. static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_3___get__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  6770. static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_4_run_until_complete(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  6771. static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_5_getaddrinfo(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  6772. static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_6_getnameinfo(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  6773. static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_7_start_tls(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  6774. static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_8_create_server(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  6775. static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_9_create_connection(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  6776. static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_10_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  6777. static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_11_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  6778. static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_12_create_unix_server(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  6779. static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_13_create_unix_connection(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  6780. static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_14_sock_recv(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  6781. static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_15_sock_recv_into(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  6782. static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_16_sock_sendall(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  6783. static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_17_sock_accept(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  6784. static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_18_sock_connect(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  6785. static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_19_connect_accepted_socket(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  6786. static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_20___subprocess_run(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  6787. static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_21_subprocess_shell(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  6788. static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_22_subprocess_exec(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  6789. static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_23_connect_read_pipe(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  6790. static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_24_connect_write_pipe(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  6791. static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_25_create_datagram_endpoint(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  6792. static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_26_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  6793. static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_27_shutdown_asyncgens(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  6794. static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_28__start_handshake(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  6795. static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_29__start_shutdown(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  6796. static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_30__do_read__buffered(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  6797. static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_31__resume_reading(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  6798. static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_32___aenter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  6799. static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_33___aexit__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  6800. static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_34_wait_closed(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  6801. static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_35_start_serving(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  6802. static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_36_serve_forever(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  6803. static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_37__test_coroutine_1(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  6804. static PyObject *__pyx_tp_new___pyx_scope_struct____Pyx_CFunc_object____Loop____bint___to_py(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  6805. static __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_pop = {0, &__pyx_n_s_pop, 0, 0, 0};
  6806. static __Pyx_CachedCFunction __pyx_umethod_PyList_Type_copy = {0, &__pyx_n_s_copy, 0, 0, 0};
  6807. static __Pyx_CachedCFunction __pyx_umethod_PyUnicode_Type_rstrip = {0, &__pyx_n_s_rstrip, 0, 0, 0};
  6808. static PyObject *__pyx_float_0_1;
  6809. static PyObject *__pyx_float_1e3;
  6810. static PyObject *__pyx_float_30_0;
  6811. static PyObject *__pyx_float_60_0;
  6812. static PyObject *__pyx_int_0;
  6813. static PyObject *__pyx_int_1;
  6814. static PyObject *__pyx_int_2;
  6815. static PyObject *__pyx_int_3;
  6816. static PyObject *__pyx_int_10;
  6817. static PyObject *__pyx_int_15;
  6818. static PyObject *__pyx_int_42;
  6819. static PyObject *__pyx_int_100;
  6820. static PyObject *__pyx_int_1000;
  6821. static PyObject *__pyx_int_2048;
  6822. static PyObject *__pyx_int_50000;
  6823. static PyObject *__pyx_int_65536;
  6824. static PyObject *__pyx_int_262144;
  6825. static PyObject *__pyx_int_1048575;
  6826. static PyObject *__pyx_int_87255255;
  6827. static PyObject *__pyx_int_143395587;
  6828. static PyObject *__pyx_int_3153600000;
  6829. static PyObject *__pyx_int_4294967296;
  6830. static PyObject *__pyx_int_neg_1;
  6831. static int __pyx_k__38;
  6832. static int __pyx_k__39;
  6833. static PyObject *__pyx_k__66;
  6834. static PyObject *__pyx_k__67;
  6835. static PyObject *__pyx_k__68;
  6836. static PyObject *__pyx_tuple_;
  6837. static PyObject *__pyx_tuple__3;
  6838. static PyObject *__pyx_tuple__4;
  6839. static PyObject *__pyx_tuple__5;
  6840. static PyObject *__pyx_tuple__6;
  6841. static PyObject *__pyx_tuple__7;
  6842. static PyObject *__pyx_tuple__8;
  6843. static PyObject *__pyx_tuple__9;
  6844. static PyObject *__pyx_slice__63;
  6845. static PyObject *__pyx_tuple__10;
  6846. static PyObject *__pyx_tuple__11;
  6847. static PyObject *__pyx_tuple__12;
  6848. static PyObject *__pyx_tuple__14;
  6849. static PyObject *__pyx_tuple__16;
  6850. static PyObject *__pyx_tuple__17;
  6851. static PyObject *__pyx_tuple__18;
  6852. static PyObject *__pyx_tuple__19;
  6853. static PyObject *__pyx_tuple__20;
  6854. static PyObject *__pyx_tuple__21;
  6855. static PyObject *__pyx_tuple__22;
  6856. static PyObject *__pyx_tuple__23;
  6857. static PyObject *__pyx_tuple__24;
  6858. static PyObject *__pyx_tuple__26;
  6859. static PyObject *__pyx_tuple__27;
  6860. static PyObject *__pyx_tuple__28;
  6861. static PyObject *__pyx_tuple__29;
  6862. static PyObject *__pyx_tuple__30;
  6863. static PyObject *__pyx_tuple__31;
  6864. static PyObject *__pyx_tuple__32;
  6865. static PyObject *__pyx_tuple__33;
  6866. static PyObject *__pyx_tuple__34;
  6867. static PyObject *__pyx_tuple__35;
  6868. static PyObject *__pyx_tuple__36;
  6869. static PyObject *__pyx_tuple__37;
  6870. static PyObject *__pyx_tuple__40;
  6871. static PyObject *__pyx_tuple__41;
  6872. static PyObject *__pyx_tuple__42;
  6873. static PyObject *__pyx_tuple__43;
  6874. static PyObject *__pyx_tuple__44;
  6875. static PyObject *__pyx_tuple__45;
  6876. static PyObject *__pyx_tuple__47;
  6877. static PyObject *__pyx_tuple__48;
  6878. static PyObject *__pyx_tuple__49;
  6879. static PyObject *__pyx_tuple__50;
  6880. static PyObject *__pyx_tuple__51;
  6881. static PyObject *__pyx_tuple__52;
  6882. static PyObject *__pyx_tuple__54;
  6883. static PyObject *__pyx_tuple__55;
  6884. static PyObject *__pyx_tuple__56;
  6885. static PyObject *__pyx_tuple__57;
  6886. static PyObject *__pyx_tuple__60;
  6887. static PyObject *__pyx_tuple__61;
  6888. static PyObject *__pyx_tuple__62;
  6889. static PyObject *__pyx_tuple__64;
  6890. static PyObject *__pyx_tuple__65;
  6891. static PyObject *__pyx_tuple__69;
  6892. static PyObject *__pyx_tuple__70;
  6893. static PyObject *__pyx_tuple__71;
  6894. static PyObject *__pyx_tuple__72;
  6895. static PyObject *__pyx_tuple__73;
  6896. static PyObject *__pyx_tuple__74;
  6897. static PyObject *__pyx_tuple__75;
  6898. static PyObject *__pyx_tuple__76;
  6899. static PyObject *__pyx_tuple__77;
  6900. static PyObject *__pyx_tuple__79;
  6901. static PyObject *__pyx_tuple__80;
  6902. static PyObject *__pyx_tuple__81;
  6903. static PyObject *__pyx_tuple__82;
  6904. static PyObject *__pyx_tuple__83;
  6905. static PyObject *__pyx_tuple__84;
  6906. static PyObject *__pyx_tuple__85;
  6907. static PyObject *__pyx_tuple__86;
  6908. static PyObject *__pyx_tuple__87;
  6909. static PyObject *__pyx_tuple__91;
  6910. static PyObject *__pyx_tuple__92;
  6911. static PyObject *__pyx_tuple__93;
  6912. static PyObject *__pyx_tuple__94;
  6913. static PyObject *__pyx_tuple__95;
  6914. static PyObject *__pyx_tuple__96;
  6915. static PyObject *__pyx_tuple__97;
  6916. static PyObject *__pyx_tuple__98;
  6917. static PyObject *__pyx_tuple__99;
  6918. static PyObject *__pyx_tuple__100;
  6919. static PyObject *__pyx_tuple__101;
  6920. static PyObject *__pyx_tuple__102;
  6921. static PyObject *__pyx_tuple__103;
  6922. static PyObject *__pyx_tuple__104;
  6923. static PyObject *__pyx_tuple__105;
  6924. static PyObject *__pyx_tuple__106;
  6925. static PyObject *__pyx_tuple__107;
  6926. static PyObject *__pyx_tuple__108;
  6927. static PyObject *__pyx_tuple__109;
  6928. static PyObject *__pyx_tuple__110;
  6929. static PyObject *__pyx_tuple__111;
  6930. static PyObject *__pyx_tuple__112;
  6931. static PyObject *__pyx_tuple__113;
  6932. static PyObject *__pyx_tuple__114;
  6933. static PyObject *__pyx_tuple__115;
  6934. static PyObject *__pyx_tuple__116;
  6935. static PyObject *__pyx_tuple__117;
  6936. static PyObject *__pyx_tuple__120;
  6937. static PyObject *__pyx_tuple__121;
  6938. static PyObject *__pyx_tuple__122;
  6939. static PyObject *__pyx_tuple__123;
  6940. static PyObject *__pyx_tuple__124;
  6941. static PyObject *__pyx_tuple__125;
  6942. static PyObject *__pyx_tuple__126;
  6943. static PyObject *__pyx_tuple__127;
  6944. static PyObject *__pyx_tuple__128;
  6945. static PyObject *__pyx_tuple__129;
  6946. static PyObject *__pyx_tuple__130;
  6947. static PyObject *__pyx_tuple__131;
  6948. static PyObject *__pyx_tuple__132;
  6949. static PyObject *__pyx_tuple__133;
  6950. static PyObject *__pyx_tuple__134;
  6951. static PyObject *__pyx_tuple__135;
  6952. static PyObject *__pyx_tuple__136;
  6953. static PyObject *__pyx_tuple__137;
  6954. static PyObject *__pyx_tuple__138;
  6955. static PyObject *__pyx_tuple__139;
  6956. static PyObject *__pyx_tuple__140;
  6957. static PyObject *__pyx_tuple__141;
  6958. static PyObject *__pyx_tuple__142;
  6959. static PyObject *__pyx_tuple__143;
  6960. static PyObject *__pyx_tuple__144;
  6961. static PyObject *__pyx_tuple__145;
  6962. static PyObject *__pyx_tuple__146;
  6963. static PyObject *__pyx_tuple__147;
  6964. static PyObject *__pyx_tuple__148;
  6965. static PyObject *__pyx_tuple__149;
  6966. static PyObject *__pyx_tuple__150;
  6967. static PyObject *__pyx_tuple__151;
  6968. static PyObject *__pyx_tuple__152;
  6969. static PyObject *__pyx_tuple__153;
  6970. static PyObject *__pyx_tuple__154;
  6971. static PyObject *__pyx_tuple__155;
  6972. static PyObject *__pyx_tuple__156;
  6973. static PyObject *__pyx_tuple__157;
  6974. static PyObject *__pyx_tuple__158;
  6975. static PyObject *__pyx_tuple__159;
  6976. static PyObject *__pyx_tuple__160;
  6977. static PyObject *__pyx_tuple__161;
  6978. static PyObject *__pyx_tuple__162;
  6979. static PyObject *__pyx_tuple__164;
  6980. static PyObject *__pyx_tuple__165;
  6981. static PyObject *__pyx_tuple__166;
  6982. static PyObject *__pyx_tuple__167;
  6983. static PyObject *__pyx_tuple__168;
  6984. static PyObject *__pyx_tuple__169;
  6985. static PyObject *__pyx_tuple__170;
  6986. static PyObject *__pyx_tuple__171;
  6987. static PyObject *__pyx_tuple__173;
  6988. static PyObject *__pyx_tuple__174;
  6989. static PyObject *__pyx_tuple__175;
  6990. static PyObject *__pyx_tuple__176;
  6991. static PyObject *__pyx_tuple__177;
  6992. static PyObject *__pyx_tuple__178;
  6993. static PyObject *__pyx_tuple__179;
  6994. static PyObject *__pyx_tuple__180;
  6995. static PyObject *__pyx_tuple__181;
  6996. static PyObject *__pyx_tuple__182;
  6997. static PyObject *__pyx_tuple__183;
  6998. static PyObject *__pyx_tuple__184;
  6999. static PyObject *__pyx_tuple__185;
  7000. static PyObject *__pyx_tuple__186;
  7001. static PyObject *__pyx_tuple__187;
  7002. static PyObject *__pyx_tuple__188;
  7003. static PyObject *__pyx_tuple__189;
  7004. static PyObject *__pyx_tuple__190;
  7005. static PyObject *__pyx_tuple__191;
  7006. static PyObject *__pyx_tuple__192;
  7007. static PyObject *__pyx_tuple__193;
  7008. static PyObject *__pyx_tuple__194;
  7009. static PyObject *__pyx_tuple__195;
  7010. static PyObject *__pyx_tuple__196;
  7011. static PyObject *__pyx_tuple__197;
  7012. static PyObject *__pyx_tuple__198;
  7013. static PyObject *__pyx_tuple__199;
  7014. static PyObject *__pyx_tuple__200;
  7015. static PyObject *__pyx_tuple__201;
  7016. static PyObject *__pyx_tuple__202;
  7017. static PyObject *__pyx_tuple__203;
  7018. static PyObject *__pyx_tuple__205;
  7019. static PyObject *__pyx_tuple__206;
  7020. static PyObject *__pyx_tuple__207;
  7021. static PyObject *__pyx_tuple__208;
  7022. static PyObject *__pyx_tuple__209;
  7023. static PyObject *__pyx_tuple__210;
  7024. static PyObject *__pyx_tuple__211;
  7025. static PyObject *__pyx_tuple__212;
  7026. static PyObject *__pyx_tuple__213;
  7027. static PyObject *__pyx_tuple__214;
  7028. static PyObject *__pyx_tuple__215;
  7029. static PyObject *__pyx_tuple__216;
  7030. static PyObject *__pyx_tuple__218;
  7031. static PyObject *__pyx_tuple__220;
  7032. static PyObject *__pyx_tuple__222;
  7033. static PyObject *__pyx_tuple__224;
  7034. static PyObject *__pyx_tuple__226;
  7035. static PyObject *__pyx_tuple__228;
  7036. static PyObject *__pyx_tuple__230;
  7037. static PyObject *__pyx_tuple__232;
  7038. static PyObject *__pyx_tuple__234;
  7039. static PyObject *__pyx_tuple__236;
  7040. static PyObject *__pyx_tuple__238;
  7041. static PyObject *__pyx_tuple__240;
  7042. static PyObject *__pyx_tuple__242;
  7043. static PyObject *__pyx_tuple__244;
  7044. static PyObject *__pyx_codeobj__13;
  7045. static PyObject *__pyx_codeobj__15;
  7046. static PyObject *__pyx_codeobj__204;
  7047. static PyObject *__pyx_codeobj__217;
  7048. static PyObject *__pyx_codeobj__219;
  7049. static PyObject *__pyx_codeobj__221;
  7050. static PyObject *__pyx_codeobj__223;
  7051. static PyObject *__pyx_codeobj__225;
  7052. static PyObject *__pyx_codeobj__227;
  7053. static PyObject *__pyx_codeobj__229;
  7054. static PyObject *__pyx_codeobj__231;
  7055. static PyObject *__pyx_codeobj__233;
  7056. static PyObject *__pyx_codeobj__235;
  7057. static PyObject *__pyx_codeobj__237;
  7058. static PyObject *__pyx_codeobj__239;
  7059. static PyObject *__pyx_codeobj__241;
  7060. static PyObject *__pyx_codeobj__243;
  7061. static PyObject *__pyx_codeobj__245;
  7062. /* Late includes */
  7063. /* "uvloop/errors.pyx":1
  7064. * cdef str __strerr(int errno): # <<<<<<<<<<<<<<
  7065. * return strerror(errno).decode()
  7066. *
  7067. */
  7068. static PyObject *__pyx_f_6uvloop_4loop___strerr(int __pyx_v_errno) {
  7069. PyObject *__pyx_r = NULL;
  7070. __Pyx_RefNannyDeclarations
  7071. char *__pyx_t_1;
  7072. PyObject *__pyx_t_2 = NULL;
  7073. __Pyx_RefNannySetupContext("__strerr", 0);
  7074. /* "uvloop/errors.pyx":2
  7075. * cdef str __strerr(int errno):
  7076. * return strerror(errno).decode() # <<<<<<<<<<<<<<
  7077. *
  7078. *
  7079. */
  7080. __Pyx_XDECREF(__pyx_r);
  7081. __pyx_t_1 = strerror(__pyx_v_errno);
  7082. __pyx_t_2 = __Pyx_decode_c_string(__pyx_t_1, 0, strlen(__pyx_t_1), NULL, NULL, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2, __pyx_L1_error)
  7083. __Pyx_GOTREF(__pyx_t_2);
  7084. if (!(likely(PyUnicode_CheckExact(__pyx_t_2))||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(1, 2, __pyx_L1_error)
  7085. __Pyx_INCREF(__pyx_t_2);
  7086. __pyx_r = ((PyObject*)__pyx_t_2);
  7087. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  7088. goto __pyx_L0;
  7089. /* "uvloop/errors.pyx":1
  7090. * cdef str __strerr(int errno): # <<<<<<<<<<<<<<
  7091. * return strerror(errno).decode()
  7092. *
  7093. */
  7094. /* function exit code */
  7095. __pyx_L1_error:;
  7096. __Pyx_XDECREF(__pyx_t_2);
  7097. __Pyx_AddTraceback("uvloop.loop.__strerr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  7098. __pyx_r = 0;
  7099. __pyx_L0:;
  7100. __Pyx_XGIVEREF(__pyx_r);
  7101. __Pyx_RefNannyFinishContext();
  7102. return __pyx_r;
  7103. }
  7104. /* "uvloop/errors.pyx":5
  7105. *
  7106. *
  7107. * cdef __convert_python_error(int uverr): # <<<<<<<<<<<<<<
  7108. * # XXX Won't work for Windows:
  7109. * # From libuv docs:
  7110. */
  7111. static PyObject *__pyx_f_6uvloop_4loop___convert_python_error(int __pyx_v_uverr) {
  7112. int __pyx_v_oserr;
  7113. PyObject *__pyx_v_exc = NULL;
  7114. PyObject *__pyx_r = NULL;
  7115. __Pyx_RefNannyDeclarations
  7116. int __pyx_t_1;
  7117. int __pyx_t_2;
  7118. int __pyx_t_3;
  7119. PyObject *__pyx_t_4 = NULL;
  7120. PyObject *__pyx_t_5 = NULL;
  7121. PyObject *__pyx_t_6 = NULL;
  7122. PyObject *__pyx_t_7 = NULL;
  7123. PyObject *__pyx_t_8 = NULL;
  7124. PyObject *__pyx_t_9 = NULL;
  7125. __Pyx_RefNannySetupContext("__convert_python_error", 0);
  7126. /* "uvloop/errors.pyx":11
  7127. * # negated errno (or -errno), while on Windows they
  7128. * # are defined by libuv to arbitrary negative numbers.
  7129. * cdef int oserr = -uverr # <<<<<<<<<<<<<<
  7130. *
  7131. * exc = OSError
  7132. */
  7133. __pyx_v_oserr = (-__pyx_v_uverr);
  7134. /* "uvloop/errors.pyx":13
  7135. * cdef int oserr = -uverr
  7136. *
  7137. * exc = OSError # <<<<<<<<<<<<<<
  7138. *
  7139. * if uverr in (uv.UV_EACCES, uv.UV_EPERM):
  7140. */
  7141. __Pyx_INCREF(__pyx_builtin_OSError);
  7142. __pyx_v_exc = __pyx_builtin_OSError;
  7143. /* "uvloop/errors.pyx":15
  7144. * exc = OSError
  7145. *
  7146. * if uverr in (uv.UV_EACCES, uv.UV_EPERM): # <<<<<<<<<<<<<<
  7147. * exc = PermissionError
  7148. *
  7149. */
  7150. __pyx_t_1 = __pyx_v_uverr;
  7151. __pyx_t_3 = ((__pyx_t_1 == UV_EACCES) != 0);
  7152. if (!__pyx_t_3) {
  7153. } else {
  7154. __pyx_t_2 = __pyx_t_3;
  7155. goto __pyx_L4_bool_binop_done;
  7156. }
  7157. __pyx_t_3 = ((__pyx_t_1 == UV_EPERM) != 0);
  7158. __pyx_t_2 = __pyx_t_3;
  7159. __pyx_L4_bool_binop_done:;
  7160. __pyx_t_3 = (__pyx_t_2 != 0);
  7161. if (__pyx_t_3) {
  7162. /* "uvloop/errors.pyx":16
  7163. *
  7164. * if uverr in (uv.UV_EACCES, uv.UV_EPERM):
  7165. * exc = PermissionError # <<<<<<<<<<<<<<
  7166. *
  7167. * elif uverr in (uv.UV_EAGAIN, uv.UV_EALREADY):
  7168. */
  7169. __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_PermissionError); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 16, __pyx_L1_error)
  7170. __Pyx_GOTREF(__pyx_t_4);
  7171. __Pyx_DECREF_SET(__pyx_v_exc, __pyx_t_4);
  7172. __pyx_t_4 = 0;
  7173. /* "uvloop/errors.pyx":15
  7174. * exc = OSError
  7175. *
  7176. * if uverr in (uv.UV_EACCES, uv.UV_EPERM): # <<<<<<<<<<<<<<
  7177. * exc = PermissionError
  7178. *
  7179. */
  7180. goto __pyx_L3;
  7181. }
  7182. /* "uvloop/errors.pyx":18
  7183. * exc = PermissionError
  7184. *
  7185. * elif uverr in (uv.UV_EAGAIN, uv.UV_EALREADY): # <<<<<<<<<<<<<<
  7186. * exc = BlockingIOError
  7187. *
  7188. */
  7189. __pyx_t_1 = __pyx_v_uverr;
  7190. __pyx_t_2 = ((__pyx_t_1 == UV_EAGAIN) != 0);
  7191. if (!__pyx_t_2) {
  7192. } else {
  7193. __pyx_t_3 = __pyx_t_2;
  7194. goto __pyx_L6_bool_binop_done;
  7195. }
  7196. __pyx_t_2 = ((__pyx_t_1 == UV_EALREADY) != 0);
  7197. __pyx_t_3 = __pyx_t_2;
  7198. __pyx_L6_bool_binop_done:;
  7199. __pyx_t_2 = (__pyx_t_3 != 0);
  7200. if (__pyx_t_2) {
  7201. /* "uvloop/errors.pyx":19
  7202. *
  7203. * elif uverr in (uv.UV_EAGAIN, uv.UV_EALREADY):
  7204. * exc = BlockingIOError # <<<<<<<<<<<<<<
  7205. *
  7206. * elif uverr in (uv.UV_EPIPE, uv.UV_ESHUTDOWN):
  7207. */
  7208. __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_BlockingIOError); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 19, __pyx_L1_error)
  7209. __Pyx_GOTREF(__pyx_t_4);
  7210. __Pyx_DECREF_SET(__pyx_v_exc, __pyx_t_4);
  7211. __pyx_t_4 = 0;
  7212. /* "uvloop/errors.pyx":18
  7213. * exc = PermissionError
  7214. *
  7215. * elif uverr in (uv.UV_EAGAIN, uv.UV_EALREADY): # <<<<<<<<<<<<<<
  7216. * exc = BlockingIOError
  7217. *
  7218. */
  7219. goto __pyx_L3;
  7220. }
  7221. /* "uvloop/errors.pyx":21
  7222. * exc = BlockingIOError
  7223. *
  7224. * elif uverr in (uv.UV_EPIPE, uv.UV_ESHUTDOWN): # <<<<<<<<<<<<<<
  7225. * exc = BrokenPipeError
  7226. *
  7227. */
  7228. __pyx_t_1 = __pyx_v_uverr;
  7229. __pyx_t_3 = ((__pyx_t_1 == UV_EPIPE) != 0);
  7230. if (!__pyx_t_3) {
  7231. } else {
  7232. __pyx_t_2 = __pyx_t_3;
  7233. goto __pyx_L8_bool_binop_done;
  7234. }
  7235. __pyx_t_3 = ((__pyx_t_1 == UV_ESHUTDOWN) != 0);
  7236. __pyx_t_2 = __pyx_t_3;
  7237. __pyx_L8_bool_binop_done:;
  7238. __pyx_t_3 = (__pyx_t_2 != 0);
  7239. if (__pyx_t_3) {
  7240. /* "uvloop/errors.pyx":22
  7241. *
  7242. * elif uverr in (uv.UV_EPIPE, uv.UV_ESHUTDOWN):
  7243. * exc = BrokenPipeError # <<<<<<<<<<<<<<
  7244. *
  7245. * elif uverr == uv.UV_ECONNABORTED:
  7246. */
  7247. __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_BrokenPipeError); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 22, __pyx_L1_error)
  7248. __Pyx_GOTREF(__pyx_t_4);
  7249. __Pyx_DECREF_SET(__pyx_v_exc, __pyx_t_4);
  7250. __pyx_t_4 = 0;
  7251. /* "uvloop/errors.pyx":21
  7252. * exc = BlockingIOError
  7253. *
  7254. * elif uverr in (uv.UV_EPIPE, uv.UV_ESHUTDOWN): # <<<<<<<<<<<<<<
  7255. * exc = BrokenPipeError
  7256. *
  7257. */
  7258. goto __pyx_L3;
  7259. }
  7260. /* "uvloop/errors.pyx":24
  7261. * exc = BrokenPipeError
  7262. *
  7263. * elif uverr == uv.UV_ECONNABORTED: # <<<<<<<<<<<<<<
  7264. * exc = ConnectionAbortedError
  7265. *
  7266. */
  7267. __pyx_t_3 = ((__pyx_v_uverr == UV_ECONNABORTED) != 0);
  7268. if (__pyx_t_3) {
  7269. /* "uvloop/errors.pyx":25
  7270. *
  7271. * elif uverr == uv.UV_ECONNABORTED:
  7272. * exc = ConnectionAbortedError # <<<<<<<<<<<<<<
  7273. *
  7274. * elif uverr == uv.UV_ECONNREFUSED:
  7275. */
  7276. __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_ConnectionAbortedError); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 25, __pyx_L1_error)
  7277. __Pyx_GOTREF(__pyx_t_4);
  7278. __Pyx_DECREF_SET(__pyx_v_exc, __pyx_t_4);
  7279. __pyx_t_4 = 0;
  7280. /* "uvloop/errors.pyx":24
  7281. * exc = BrokenPipeError
  7282. *
  7283. * elif uverr == uv.UV_ECONNABORTED: # <<<<<<<<<<<<<<
  7284. * exc = ConnectionAbortedError
  7285. *
  7286. */
  7287. goto __pyx_L3;
  7288. }
  7289. /* "uvloop/errors.pyx":27
  7290. * exc = ConnectionAbortedError
  7291. *
  7292. * elif uverr == uv.UV_ECONNREFUSED: # <<<<<<<<<<<<<<
  7293. * exc = ConnectionRefusedError
  7294. *
  7295. */
  7296. __pyx_t_3 = ((__pyx_v_uverr == UV_ECONNREFUSED) != 0);
  7297. if (__pyx_t_3) {
  7298. /* "uvloop/errors.pyx":28
  7299. *
  7300. * elif uverr == uv.UV_ECONNREFUSED:
  7301. * exc = ConnectionRefusedError # <<<<<<<<<<<<<<
  7302. *
  7303. * elif uverr == uv.UV_ECONNRESET:
  7304. */
  7305. __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_ConnectionRefusedError); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 28, __pyx_L1_error)
  7306. __Pyx_GOTREF(__pyx_t_4);
  7307. __Pyx_DECREF_SET(__pyx_v_exc, __pyx_t_4);
  7308. __pyx_t_4 = 0;
  7309. /* "uvloop/errors.pyx":27
  7310. * exc = ConnectionAbortedError
  7311. *
  7312. * elif uverr == uv.UV_ECONNREFUSED: # <<<<<<<<<<<<<<
  7313. * exc = ConnectionRefusedError
  7314. *
  7315. */
  7316. goto __pyx_L3;
  7317. }
  7318. /* "uvloop/errors.pyx":30
  7319. * exc = ConnectionRefusedError
  7320. *
  7321. * elif uverr == uv.UV_ECONNRESET: # <<<<<<<<<<<<<<
  7322. * exc = ConnectionResetError
  7323. *
  7324. */
  7325. __pyx_t_3 = ((__pyx_v_uverr == UV_ECONNRESET) != 0);
  7326. if (__pyx_t_3) {
  7327. /* "uvloop/errors.pyx":31
  7328. *
  7329. * elif uverr == uv.UV_ECONNRESET:
  7330. * exc = ConnectionResetError # <<<<<<<<<<<<<<
  7331. *
  7332. * elif uverr == uv.UV_EEXIST:
  7333. */
  7334. __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_ConnectionResetError); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 31, __pyx_L1_error)
  7335. __Pyx_GOTREF(__pyx_t_4);
  7336. __Pyx_DECREF_SET(__pyx_v_exc, __pyx_t_4);
  7337. __pyx_t_4 = 0;
  7338. /* "uvloop/errors.pyx":30
  7339. * exc = ConnectionRefusedError
  7340. *
  7341. * elif uverr == uv.UV_ECONNRESET: # <<<<<<<<<<<<<<
  7342. * exc = ConnectionResetError
  7343. *
  7344. */
  7345. goto __pyx_L3;
  7346. }
  7347. /* "uvloop/errors.pyx":33
  7348. * exc = ConnectionResetError
  7349. *
  7350. * elif uverr == uv.UV_EEXIST: # <<<<<<<<<<<<<<
  7351. * exc = FileExistsError
  7352. *
  7353. */
  7354. __pyx_t_3 = ((__pyx_v_uverr == UV_EEXIST) != 0);
  7355. if (__pyx_t_3) {
  7356. /* "uvloop/errors.pyx":34
  7357. *
  7358. * elif uverr == uv.UV_EEXIST:
  7359. * exc = FileExistsError # <<<<<<<<<<<<<<
  7360. *
  7361. * elif uverr == uv.UV_ENOENT:
  7362. */
  7363. __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FileExistsError); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 34, __pyx_L1_error)
  7364. __Pyx_GOTREF(__pyx_t_4);
  7365. __Pyx_DECREF_SET(__pyx_v_exc, __pyx_t_4);
  7366. __pyx_t_4 = 0;
  7367. /* "uvloop/errors.pyx":33
  7368. * exc = ConnectionResetError
  7369. *
  7370. * elif uverr == uv.UV_EEXIST: # <<<<<<<<<<<<<<
  7371. * exc = FileExistsError
  7372. *
  7373. */
  7374. goto __pyx_L3;
  7375. }
  7376. /* "uvloop/errors.pyx":36
  7377. * exc = FileExistsError
  7378. *
  7379. * elif uverr == uv.UV_ENOENT: # <<<<<<<<<<<<<<
  7380. * exc = FileNotFoundError
  7381. *
  7382. */
  7383. __pyx_t_3 = ((__pyx_v_uverr == UV_ENOENT) != 0);
  7384. if (__pyx_t_3) {
  7385. /* "uvloop/errors.pyx":37
  7386. *
  7387. * elif uverr == uv.UV_ENOENT:
  7388. * exc = FileNotFoundError # <<<<<<<<<<<<<<
  7389. *
  7390. * elif uverr == uv.UV_EINTR:
  7391. */
  7392. __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FileNotFoundError); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 37, __pyx_L1_error)
  7393. __Pyx_GOTREF(__pyx_t_4);
  7394. __Pyx_DECREF_SET(__pyx_v_exc, __pyx_t_4);
  7395. __pyx_t_4 = 0;
  7396. /* "uvloop/errors.pyx":36
  7397. * exc = FileExistsError
  7398. *
  7399. * elif uverr == uv.UV_ENOENT: # <<<<<<<<<<<<<<
  7400. * exc = FileNotFoundError
  7401. *
  7402. */
  7403. goto __pyx_L3;
  7404. }
  7405. /* "uvloop/errors.pyx":39
  7406. * exc = FileNotFoundError
  7407. *
  7408. * elif uverr == uv.UV_EINTR: # <<<<<<<<<<<<<<
  7409. * exc = InterruptedError
  7410. *
  7411. */
  7412. __pyx_t_3 = ((__pyx_v_uverr == UV_EINTR) != 0);
  7413. if (__pyx_t_3) {
  7414. /* "uvloop/errors.pyx":40
  7415. *
  7416. * elif uverr == uv.UV_EINTR:
  7417. * exc = InterruptedError # <<<<<<<<<<<<<<
  7418. *
  7419. * elif uverr == uv.UV_EISDIR:
  7420. */
  7421. __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_InterruptedError); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 40, __pyx_L1_error)
  7422. __Pyx_GOTREF(__pyx_t_4);
  7423. __Pyx_DECREF_SET(__pyx_v_exc, __pyx_t_4);
  7424. __pyx_t_4 = 0;
  7425. /* "uvloop/errors.pyx":39
  7426. * exc = FileNotFoundError
  7427. *
  7428. * elif uverr == uv.UV_EINTR: # <<<<<<<<<<<<<<
  7429. * exc = InterruptedError
  7430. *
  7431. */
  7432. goto __pyx_L3;
  7433. }
  7434. /* "uvloop/errors.pyx":42
  7435. * exc = InterruptedError
  7436. *
  7437. * elif uverr == uv.UV_EISDIR: # <<<<<<<<<<<<<<
  7438. * exc = IsADirectoryError
  7439. *
  7440. */
  7441. __pyx_t_3 = ((__pyx_v_uverr == UV_EISDIR) != 0);
  7442. if (__pyx_t_3) {
  7443. /* "uvloop/errors.pyx":43
  7444. *
  7445. * elif uverr == uv.UV_EISDIR:
  7446. * exc = IsADirectoryError # <<<<<<<<<<<<<<
  7447. *
  7448. * elif uverr == uv.UV_ESRCH:
  7449. */
  7450. __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_IsADirectoryError); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 43, __pyx_L1_error)
  7451. __Pyx_GOTREF(__pyx_t_4);
  7452. __Pyx_DECREF_SET(__pyx_v_exc, __pyx_t_4);
  7453. __pyx_t_4 = 0;
  7454. /* "uvloop/errors.pyx":42
  7455. * exc = InterruptedError
  7456. *
  7457. * elif uverr == uv.UV_EISDIR: # <<<<<<<<<<<<<<
  7458. * exc = IsADirectoryError
  7459. *
  7460. */
  7461. goto __pyx_L3;
  7462. }
  7463. /* "uvloop/errors.pyx":45
  7464. * exc = IsADirectoryError
  7465. *
  7466. * elif uverr == uv.UV_ESRCH: # <<<<<<<<<<<<<<
  7467. * exc = ProcessLookupError
  7468. *
  7469. */
  7470. __pyx_t_3 = ((__pyx_v_uverr == UV_ESRCH) != 0);
  7471. if (__pyx_t_3) {
  7472. /* "uvloop/errors.pyx":46
  7473. *
  7474. * elif uverr == uv.UV_ESRCH:
  7475. * exc = ProcessLookupError # <<<<<<<<<<<<<<
  7476. *
  7477. * elif uverr == uv.UV_ETIMEDOUT:
  7478. */
  7479. __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_ProcessLookupError); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 46, __pyx_L1_error)
  7480. __Pyx_GOTREF(__pyx_t_4);
  7481. __Pyx_DECREF_SET(__pyx_v_exc, __pyx_t_4);
  7482. __pyx_t_4 = 0;
  7483. /* "uvloop/errors.pyx":45
  7484. * exc = IsADirectoryError
  7485. *
  7486. * elif uverr == uv.UV_ESRCH: # <<<<<<<<<<<<<<
  7487. * exc = ProcessLookupError
  7488. *
  7489. */
  7490. goto __pyx_L3;
  7491. }
  7492. /* "uvloop/errors.pyx":48
  7493. * exc = ProcessLookupError
  7494. *
  7495. * elif uverr == uv.UV_ETIMEDOUT: # <<<<<<<<<<<<<<
  7496. * exc = TimeoutError
  7497. *
  7498. */
  7499. __pyx_t_3 = ((__pyx_v_uverr == UV_ETIMEDOUT) != 0);
  7500. if (__pyx_t_3) {
  7501. /* "uvloop/errors.pyx":49
  7502. *
  7503. * elif uverr == uv.UV_ETIMEDOUT:
  7504. * exc = TimeoutError # <<<<<<<<<<<<<<
  7505. *
  7506. * return exc(oserr, __strerr(oserr))
  7507. */
  7508. __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_TimeoutError); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 49, __pyx_L1_error)
  7509. __Pyx_GOTREF(__pyx_t_4);
  7510. __Pyx_DECREF_SET(__pyx_v_exc, __pyx_t_4);
  7511. __pyx_t_4 = 0;
  7512. /* "uvloop/errors.pyx":48
  7513. * exc = ProcessLookupError
  7514. *
  7515. * elif uverr == uv.UV_ETIMEDOUT: # <<<<<<<<<<<<<<
  7516. * exc = TimeoutError
  7517. *
  7518. */
  7519. }
  7520. __pyx_L3:;
  7521. /* "uvloop/errors.pyx":51
  7522. * exc = TimeoutError
  7523. *
  7524. * return exc(oserr, __strerr(oserr)) # <<<<<<<<<<<<<<
  7525. *
  7526. *
  7527. */
  7528. __Pyx_XDECREF(__pyx_r);
  7529. __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_oserr); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 51, __pyx_L1_error)
  7530. __Pyx_GOTREF(__pyx_t_5);
  7531. __pyx_t_6 = __pyx_f_6uvloop_4loop___strerr(__pyx_v_oserr); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 51, __pyx_L1_error)
  7532. __Pyx_GOTREF(__pyx_t_6);
  7533. __Pyx_INCREF(__pyx_v_exc);
  7534. __pyx_t_7 = __pyx_v_exc; __pyx_t_8 = NULL;
  7535. __pyx_t_1 = 0;
  7536. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
  7537. __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
  7538. if (likely(__pyx_t_8)) {
  7539. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
  7540. __Pyx_INCREF(__pyx_t_8);
  7541. __Pyx_INCREF(function);
  7542. __Pyx_DECREF_SET(__pyx_t_7, function);
  7543. __pyx_t_1 = 1;
  7544. }
  7545. }
  7546. #if CYTHON_FAST_PYCALL
  7547. if (PyFunction_Check(__pyx_t_7)) {
  7548. PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_5, __pyx_t_6};
  7549. __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_1, 2+__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 51, __pyx_L1_error)
  7550. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  7551. __Pyx_GOTREF(__pyx_t_4);
  7552. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  7553. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  7554. } else
  7555. #endif
  7556. #if CYTHON_FAST_PYCCALL
  7557. if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
  7558. PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_5, __pyx_t_6};
  7559. __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_1, 2+__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 51, __pyx_L1_error)
  7560. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  7561. __Pyx_GOTREF(__pyx_t_4);
  7562. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  7563. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  7564. } else
  7565. #endif
  7566. {
  7567. __pyx_t_9 = PyTuple_New(2+__pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 51, __pyx_L1_error)
  7568. __Pyx_GOTREF(__pyx_t_9);
  7569. if (__pyx_t_8) {
  7570. __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL;
  7571. }
  7572. __Pyx_GIVEREF(__pyx_t_5);
  7573. PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_1, __pyx_t_5);
  7574. __Pyx_GIVEREF(__pyx_t_6);
  7575. PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_1, __pyx_t_6);
  7576. __pyx_t_5 = 0;
  7577. __pyx_t_6 = 0;
  7578. __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 51, __pyx_L1_error)
  7579. __Pyx_GOTREF(__pyx_t_4);
  7580. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  7581. }
  7582. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  7583. __pyx_r = __pyx_t_4;
  7584. __pyx_t_4 = 0;
  7585. goto __pyx_L0;
  7586. /* "uvloop/errors.pyx":5
  7587. *
  7588. *
  7589. * cdef __convert_python_error(int uverr): # <<<<<<<<<<<<<<
  7590. * # XXX Won't work for Windows:
  7591. * # From libuv docs:
  7592. */
  7593. /* function exit code */
  7594. __pyx_L1_error:;
  7595. __Pyx_XDECREF(__pyx_t_4);
  7596. __Pyx_XDECREF(__pyx_t_5);
  7597. __Pyx_XDECREF(__pyx_t_6);
  7598. __Pyx_XDECREF(__pyx_t_7);
  7599. __Pyx_XDECREF(__pyx_t_8);
  7600. __Pyx_XDECREF(__pyx_t_9);
  7601. __Pyx_AddTraceback("uvloop.loop.__convert_python_error", __pyx_clineno, __pyx_lineno, __pyx_filename);
  7602. __pyx_r = 0;
  7603. __pyx_L0:;
  7604. __Pyx_XDECREF(__pyx_v_exc);
  7605. __Pyx_XGIVEREF(__pyx_r);
  7606. __Pyx_RefNannyFinishContext();
  7607. return __pyx_r;
  7608. }
  7609. /* "uvloop/errors.pyx":54
  7610. *
  7611. *
  7612. * cdef int __convert_socket_error(int uverr): # <<<<<<<<<<<<<<
  7613. * cdef int sock_err = 0
  7614. *
  7615. */
  7616. static int __pyx_f_6uvloop_4loop___convert_socket_error(int __pyx_v_uverr) {
  7617. int __pyx_v_sock_err;
  7618. int __pyx_r;
  7619. __Pyx_RefNannyDeclarations
  7620. int __pyx_t_1;
  7621. __Pyx_RefNannySetupContext("__convert_socket_error", 0);
  7622. /* "uvloop/errors.pyx":55
  7623. *
  7624. * cdef int __convert_socket_error(int uverr):
  7625. * cdef int sock_err = 0 # <<<<<<<<<<<<<<
  7626. *
  7627. * if uverr == uv.UV_EAI_ADDRFAMILY:
  7628. */
  7629. __pyx_v_sock_err = 0;
  7630. /* "uvloop/errors.pyx":57
  7631. * cdef int sock_err = 0
  7632. *
  7633. * if uverr == uv.UV_EAI_ADDRFAMILY: # <<<<<<<<<<<<<<
  7634. * sock_err = socket_EAI_ADDRFAMILY
  7635. *
  7636. */
  7637. __pyx_t_1 = ((__pyx_v_uverr == UV_EAI_ADDRFAMILY) != 0);
  7638. if (__pyx_t_1) {
  7639. /* "uvloop/errors.pyx":58
  7640. *
  7641. * if uverr == uv.UV_EAI_ADDRFAMILY:
  7642. * sock_err = socket_EAI_ADDRFAMILY # <<<<<<<<<<<<<<
  7643. *
  7644. * elif uverr == uv.UV_EAI_AGAIN:
  7645. */
  7646. __pyx_v_sock_err = __pyx_v_6uvloop_4loop_socket_EAI_ADDRFAMILY;
  7647. /* "uvloop/errors.pyx":57
  7648. * cdef int sock_err = 0
  7649. *
  7650. * if uverr == uv.UV_EAI_ADDRFAMILY: # <<<<<<<<<<<<<<
  7651. * sock_err = socket_EAI_ADDRFAMILY
  7652. *
  7653. */
  7654. goto __pyx_L3;
  7655. }
  7656. /* "uvloop/errors.pyx":60
  7657. * sock_err = socket_EAI_ADDRFAMILY
  7658. *
  7659. * elif uverr == uv.UV_EAI_AGAIN: # <<<<<<<<<<<<<<
  7660. * sock_err = socket_EAI_AGAIN
  7661. *
  7662. */
  7663. __pyx_t_1 = ((__pyx_v_uverr == UV_EAI_AGAIN) != 0);
  7664. if (__pyx_t_1) {
  7665. /* "uvloop/errors.pyx":61
  7666. *
  7667. * elif uverr == uv.UV_EAI_AGAIN:
  7668. * sock_err = socket_EAI_AGAIN # <<<<<<<<<<<<<<
  7669. *
  7670. * elif uverr == uv.UV_EAI_BADFLAGS:
  7671. */
  7672. __pyx_v_sock_err = __pyx_v_6uvloop_4loop_socket_EAI_AGAIN;
  7673. /* "uvloop/errors.pyx":60
  7674. * sock_err = socket_EAI_ADDRFAMILY
  7675. *
  7676. * elif uverr == uv.UV_EAI_AGAIN: # <<<<<<<<<<<<<<
  7677. * sock_err = socket_EAI_AGAIN
  7678. *
  7679. */
  7680. goto __pyx_L3;
  7681. }
  7682. /* "uvloop/errors.pyx":63
  7683. * sock_err = socket_EAI_AGAIN
  7684. *
  7685. * elif uverr == uv.UV_EAI_BADFLAGS: # <<<<<<<<<<<<<<
  7686. * sock_err = socket_EAI_BADFLAGS
  7687. *
  7688. */
  7689. __pyx_t_1 = ((__pyx_v_uverr == UV_EAI_BADFLAGS) != 0);
  7690. if (__pyx_t_1) {
  7691. /* "uvloop/errors.pyx":64
  7692. *
  7693. * elif uverr == uv.UV_EAI_BADFLAGS:
  7694. * sock_err = socket_EAI_BADFLAGS # <<<<<<<<<<<<<<
  7695. *
  7696. * elif uverr == uv.UV_EAI_BADHINTS:
  7697. */
  7698. __pyx_v_sock_err = __pyx_v_6uvloop_4loop_socket_EAI_BADFLAGS;
  7699. /* "uvloop/errors.pyx":63
  7700. * sock_err = socket_EAI_AGAIN
  7701. *
  7702. * elif uverr == uv.UV_EAI_BADFLAGS: # <<<<<<<<<<<<<<
  7703. * sock_err = socket_EAI_BADFLAGS
  7704. *
  7705. */
  7706. goto __pyx_L3;
  7707. }
  7708. /* "uvloop/errors.pyx":66
  7709. * sock_err = socket_EAI_BADFLAGS
  7710. *
  7711. * elif uverr == uv.UV_EAI_BADHINTS: # <<<<<<<<<<<<<<
  7712. * sock_err = socket_EAI_BADHINTS
  7713. *
  7714. */
  7715. __pyx_t_1 = ((__pyx_v_uverr == UV_EAI_BADHINTS) != 0);
  7716. if (__pyx_t_1) {
  7717. /* "uvloop/errors.pyx":67
  7718. *
  7719. * elif uverr == uv.UV_EAI_BADHINTS:
  7720. * sock_err = socket_EAI_BADHINTS # <<<<<<<<<<<<<<
  7721. *
  7722. * elif uverr == uv.UV_EAI_CANCELED:
  7723. */
  7724. __pyx_v_sock_err = __pyx_v_6uvloop_4loop_socket_EAI_BADHINTS;
  7725. /* "uvloop/errors.pyx":66
  7726. * sock_err = socket_EAI_BADFLAGS
  7727. *
  7728. * elif uverr == uv.UV_EAI_BADHINTS: # <<<<<<<<<<<<<<
  7729. * sock_err = socket_EAI_BADHINTS
  7730. *
  7731. */
  7732. goto __pyx_L3;
  7733. }
  7734. /* "uvloop/errors.pyx":69
  7735. * sock_err = socket_EAI_BADHINTS
  7736. *
  7737. * elif uverr == uv.UV_EAI_CANCELED: # <<<<<<<<<<<<<<
  7738. * sock_err = socket_EAI_CANCELED
  7739. *
  7740. */
  7741. __pyx_t_1 = ((__pyx_v_uverr == UV_EAI_CANCELED) != 0);
  7742. if (__pyx_t_1) {
  7743. /* "uvloop/errors.pyx":70
  7744. *
  7745. * elif uverr == uv.UV_EAI_CANCELED:
  7746. * sock_err = socket_EAI_CANCELED # <<<<<<<<<<<<<<
  7747. *
  7748. * elif uverr == uv.UV_EAI_FAIL:
  7749. */
  7750. __pyx_v_sock_err = __pyx_v_6uvloop_4loop_socket_EAI_CANCELED;
  7751. /* "uvloop/errors.pyx":69
  7752. * sock_err = socket_EAI_BADHINTS
  7753. *
  7754. * elif uverr == uv.UV_EAI_CANCELED: # <<<<<<<<<<<<<<
  7755. * sock_err = socket_EAI_CANCELED
  7756. *
  7757. */
  7758. goto __pyx_L3;
  7759. }
  7760. /* "uvloop/errors.pyx":72
  7761. * sock_err = socket_EAI_CANCELED
  7762. *
  7763. * elif uverr == uv.UV_EAI_FAIL: # <<<<<<<<<<<<<<
  7764. * sock_err = socket_EAI_FAIL
  7765. *
  7766. */
  7767. __pyx_t_1 = ((__pyx_v_uverr == UV_EAI_FAIL) != 0);
  7768. if (__pyx_t_1) {
  7769. /* "uvloop/errors.pyx":73
  7770. *
  7771. * elif uverr == uv.UV_EAI_FAIL:
  7772. * sock_err = socket_EAI_FAIL # <<<<<<<<<<<<<<
  7773. *
  7774. * elif uverr == uv.UV_EAI_FAMILY:
  7775. */
  7776. __pyx_v_sock_err = __pyx_v_6uvloop_4loop_socket_EAI_FAIL;
  7777. /* "uvloop/errors.pyx":72
  7778. * sock_err = socket_EAI_CANCELED
  7779. *
  7780. * elif uverr == uv.UV_EAI_FAIL: # <<<<<<<<<<<<<<
  7781. * sock_err = socket_EAI_FAIL
  7782. *
  7783. */
  7784. goto __pyx_L3;
  7785. }
  7786. /* "uvloop/errors.pyx":75
  7787. * sock_err = socket_EAI_FAIL
  7788. *
  7789. * elif uverr == uv.UV_EAI_FAMILY: # <<<<<<<<<<<<<<
  7790. * sock_err = socket_EAI_FAMILY
  7791. *
  7792. */
  7793. __pyx_t_1 = ((__pyx_v_uverr == UV_EAI_FAMILY) != 0);
  7794. if (__pyx_t_1) {
  7795. /* "uvloop/errors.pyx":76
  7796. *
  7797. * elif uverr == uv.UV_EAI_FAMILY:
  7798. * sock_err = socket_EAI_FAMILY # <<<<<<<<<<<<<<
  7799. *
  7800. * elif uverr == uv.UV_EAI_MEMORY:
  7801. */
  7802. __pyx_v_sock_err = __pyx_v_6uvloop_4loop_socket_EAI_FAMILY;
  7803. /* "uvloop/errors.pyx":75
  7804. * sock_err = socket_EAI_FAIL
  7805. *
  7806. * elif uverr == uv.UV_EAI_FAMILY: # <<<<<<<<<<<<<<
  7807. * sock_err = socket_EAI_FAMILY
  7808. *
  7809. */
  7810. goto __pyx_L3;
  7811. }
  7812. /* "uvloop/errors.pyx":78
  7813. * sock_err = socket_EAI_FAMILY
  7814. *
  7815. * elif uverr == uv.UV_EAI_MEMORY: # <<<<<<<<<<<<<<
  7816. * sock_err = socket_EAI_MEMORY
  7817. *
  7818. */
  7819. __pyx_t_1 = ((__pyx_v_uverr == UV_EAI_MEMORY) != 0);
  7820. if (__pyx_t_1) {
  7821. /* "uvloop/errors.pyx":79
  7822. *
  7823. * elif uverr == uv.UV_EAI_MEMORY:
  7824. * sock_err = socket_EAI_MEMORY # <<<<<<<<<<<<<<
  7825. *
  7826. * elif uverr == uv.UV_EAI_NODATA:
  7827. */
  7828. __pyx_v_sock_err = __pyx_v_6uvloop_4loop_socket_EAI_MEMORY;
  7829. /* "uvloop/errors.pyx":78
  7830. * sock_err = socket_EAI_FAMILY
  7831. *
  7832. * elif uverr == uv.UV_EAI_MEMORY: # <<<<<<<<<<<<<<
  7833. * sock_err = socket_EAI_MEMORY
  7834. *
  7835. */
  7836. goto __pyx_L3;
  7837. }
  7838. /* "uvloop/errors.pyx":81
  7839. * sock_err = socket_EAI_MEMORY
  7840. *
  7841. * elif uverr == uv.UV_EAI_NODATA: # <<<<<<<<<<<<<<
  7842. * sock_err = socket_EAI_NODATA
  7843. *
  7844. */
  7845. __pyx_t_1 = ((__pyx_v_uverr == UV_EAI_NODATA) != 0);
  7846. if (__pyx_t_1) {
  7847. /* "uvloop/errors.pyx":82
  7848. *
  7849. * elif uverr == uv.UV_EAI_NODATA:
  7850. * sock_err = socket_EAI_NODATA # <<<<<<<<<<<<<<
  7851. *
  7852. * elif uverr == uv.UV_EAI_NONAME:
  7853. */
  7854. __pyx_v_sock_err = __pyx_v_6uvloop_4loop_socket_EAI_NODATA;
  7855. /* "uvloop/errors.pyx":81
  7856. * sock_err = socket_EAI_MEMORY
  7857. *
  7858. * elif uverr == uv.UV_EAI_NODATA: # <<<<<<<<<<<<<<
  7859. * sock_err = socket_EAI_NODATA
  7860. *
  7861. */
  7862. goto __pyx_L3;
  7863. }
  7864. /* "uvloop/errors.pyx":84
  7865. * sock_err = socket_EAI_NODATA
  7866. *
  7867. * elif uverr == uv.UV_EAI_NONAME: # <<<<<<<<<<<<<<
  7868. * sock_err = socket_EAI_NONAME
  7869. *
  7870. */
  7871. __pyx_t_1 = ((__pyx_v_uverr == UV_EAI_NONAME) != 0);
  7872. if (__pyx_t_1) {
  7873. /* "uvloop/errors.pyx":85
  7874. *
  7875. * elif uverr == uv.UV_EAI_NONAME:
  7876. * sock_err = socket_EAI_NONAME # <<<<<<<<<<<<<<
  7877. *
  7878. * elif uverr == uv.UV_EAI_OVERFLOW:
  7879. */
  7880. __pyx_v_sock_err = __pyx_v_6uvloop_4loop_socket_EAI_NONAME;
  7881. /* "uvloop/errors.pyx":84
  7882. * sock_err = socket_EAI_NODATA
  7883. *
  7884. * elif uverr == uv.UV_EAI_NONAME: # <<<<<<<<<<<<<<
  7885. * sock_err = socket_EAI_NONAME
  7886. *
  7887. */
  7888. goto __pyx_L3;
  7889. }
  7890. /* "uvloop/errors.pyx":87
  7891. * sock_err = socket_EAI_NONAME
  7892. *
  7893. * elif uverr == uv.UV_EAI_OVERFLOW: # <<<<<<<<<<<<<<
  7894. * sock_err = socket_EAI_OVERFLOW
  7895. *
  7896. */
  7897. __pyx_t_1 = ((__pyx_v_uverr == UV_EAI_OVERFLOW) != 0);
  7898. if (__pyx_t_1) {
  7899. /* "uvloop/errors.pyx":88
  7900. *
  7901. * elif uverr == uv.UV_EAI_OVERFLOW:
  7902. * sock_err = socket_EAI_OVERFLOW # <<<<<<<<<<<<<<
  7903. *
  7904. * elif uverr == uv.UV_EAI_PROTOCOL:
  7905. */
  7906. __pyx_v_sock_err = __pyx_v_6uvloop_4loop_socket_EAI_OVERFLOW;
  7907. /* "uvloop/errors.pyx":87
  7908. * sock_err = socket_EAI_NONAME
  7909. *
  7910. * elif uverr == uv.UV_EAI_OVERFLOW: # <<<<<<<<<<<<<<
  7911. * sock_err = socket_EAI_OVERFLOW
  7912. *
  7913. */
  7914. goto __pyx_L3;
  7915. }
  7916. /* "uvloop/errors.pyx":90
  7917. * sock_err = socket_EAI_OVERFLOW
  7918. *
  7919. * elif uverr == uv.UV_EAI_PROTOCOL: # <<<<<<<<<<<<<<
  7920. * sock_err = socket_EAI_PROTOCOL
  7921. *
  7922. */
  7923. __pyx_t_1 = ((__pyx_v_uverr == UV_EAI_PROTOCOL) != 0);
  7924. if (__pyx_t_1) {
  7925. /* "uvloop/errors.pyx":91
  7926. *
  7927. * elif uverr == uv.UV_EAI_PROTOCOL:
  7928. * sock_err = socket_EAI_PROTOCOL # <<<<<<<<<<<<<<
  7929. *
  7930. * elif uverr == uv.UV_EAI_SERVICE:
  7931. */
  7932. __pyx_v_sock_err = __pyx_v_6uvloop_4loop_socket_EAI_PROTOCOL;
  7933. /* "uvloop/errors.pyx":90
  7934. * sock_err = socket_EAI_OVERFLOW
  7935. *
  7936. * elif uverr == uv.UV_EAI_PROTOCOL: # <<<<<<<<<<<<<<
  7937. * sock_err = socket_EAI_PROTOCOL
  7938. *
  7939. */
  7940. goto __pyx_L3;
  7941. }
  7942. /* "uvloop/errors.pyx":93
  7943. * sock_err = socket_EAI_PROTOCOL
  7944. *
  7945. * elif uverr == uv.UV_EAI_SERVICE: # <<<<<<<<<<<<<<
  7946. * sock_err = socket_EAI_SERVICE
  7947. *
  7948. */
  7949. __pyx_t_1 = ((__pyx_v_uverr == UV_EAI_SERVICE) != 0);
  7950. if (__pyx_t_1) {
  7951. /* "uvloop/errors.pyx":94
  7952. *
  7953. * elif uverr == uv.UV_EAI_SERVICE:
  7954. * sock_err = socket_EAI_SERVICE # <<<<<<<<<<<<<<
  7955. *
  7956. * elif uverr == uv.UV_EAI_SOCKTYPE:
  7957. */
  7958. __pyx_v_sock_err = __pyx_v_6uvloop_4loop_socket_EAI_SERVICE;
  7959. /* "uvloop/errors.pyx":93
  7960. * sock_err = socket_EAI_PROTOCOL
  7961. *
  7962. * elif uverr == uv.UV_EAI_SERVICE: # <<<<<<<<<<<<<<
  7963. * sock_err = socket_EAI_SERVICE
  7964. *
  7965. */
  7966. goto __pyx_L3;
  7967. }
  7968. /* "uvloop/errors.pyx":96
  7969. * sock_err = socket_EAI_SERVICE
  7970. *
  7971. * elif uverr == uv.UV_EAI_SOCKTYPE: # <<<<<<<<<<<<<<
  7972. * sock_err = socket_EAI_SOCKTYPE
  7973. *
  7974. */
  7975. __pyx_t_1 = ((__pyx_v_uverr == UV_EAI_SOCKTYPE) != 0);
  7976. if (__pyx_t_1) {
  7977. /* "uvloop/errors.pyx":97
  7978. *
  7979. * elif uverr == uv.UV_EAI_SOCKTYPE:
  7980. * sock_err = socket_EAI_SOCKTYPE # <<<<<<<<<<<<<<
  7981. *
  7982. * return sock_err
  7983. */
  7984. __pyx_v_sock_err = __pyx_v_6uvloop_4loop_socket_EAI_SOCKTYPE;
  7985. /* "uvloop/errors.pyx":96
  7986. * sock_err = socket_EAI_SERVICE
  7987. *
  7988. * elif uverr == uv.UV_EAI_SOCKTYPE: # <<<<<<<<<<<<<<
  7989. * sock_err = socket_EAI_SOCKTYPE
  7990. *
  7991. */
  7992. }
  7993. __pyx_L3:;
  7994. /* "uvloop/errors.pyx":99
  7995. * sock_err = socket_EAI_SOCKTYPE
  7996. *
  7997. * return sock_err # <<<<<<<<<<<<<<
  7998. *
  7999. *
  8000. */
  8001. __pyx_r = __pyx_v_sock_err;
  8002. goto __pyx_L0;
  8003. /* "uvloop/errors.pyx":54
  8004. *
  8005. *
  8006. * cdef int __convert_socket_error(int uverr): # <<<<<<<<<<<<<<
  8007. * cdef int sock_err = 0
  8008. *
  8009. */
  8010. /* function exit code */
  8011. __pyx_L0:;
  8012. __Pyx_RefNannyFinishContext();
  8013. return __pyx_r;
  8014. }
  8015. /* "uvloop/errors.pyx":102
  8016. *
  8017. *
  8018. * cdef convert_error(int uverr): # <<<<<<<<<<<<<<
  8019. * cdef int sock_err
  8020. *
  8021. */
  8022. static PyObject *__pyx_f_6uvloop_4loop_convert_error(int __pyx_v_uverr) {
  8023. int __pyx_v_sock_err;
  8024. PyObject *__pyx_v_msg = NULL;
  8025. PyObject *__pyx_r = NULL;
  8026. __Pyx_RefNannyDeclarations
  8027. int __pyx_t_1;
  8028. PyObject *__pyx_t_2 = NULL;
  8029. PyObject *__pyx_t_3 = NULL;
  8030. PyObject *__pyx_t_4 = NULL;
  8031. char const *__pyx_t_5;
  8032. PyObject *__pyx_t_6 = NULL;
  8033. int __pyx_t_7;
  8034. PyObject *__pyx_t_8 = NULL;
  8035. __Pyx_RefNannySetupContext("convert_error", 0);
  8036. /* "uvloop/errors.pyx":105
  8037. * cdef int sock_err
  8038. *
  8039. * if uverr == uv.UV_ECANCELED: # <<<<<<<<<<<<<<
  8040. * return aio_CancelledError()
  8041. *
  8042. */
  8043. __pyx_t_1 = ((__pyx_v_uverr == UV_ECANCELED) != 0);
  8044. if (__pyx_t_1) {
  8045. /* "uvloop/errors.pyx":106
  8046. *
  8047. * if uverr == uv.UV_ECANCELED:
  8048. * return aio_CancelledError() # <<<<<<<<<<<<<<
  8049. *
  8050. * sock_err = __convert_socket_error(uverr)
  8051. */
  8052. __Pyx_XDECREF(__pyx_r);
  8053. __Pyx_INCREF(__pyx_v_6uvloop_4loop_aio_CancelledError);
  8054. __pyx_t_3 = __pyx_v_6uvloop_4loop_aio_CancelledError; __pyx_t_4 = NULL;
  8055. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
  8056. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
  8057. if (likely(__pyx_t_4)) {
  8058. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  8059. __Pyx_INCREF(__pyx_t_4);
  8060. __Pyx_INCREF(function);
  8061. __Pyx_DECREF_SET(__pyx_t_3, function);
  8062. }
  8063. }
  8064. __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
  8065. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  8066. if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 106, __pyx_L1_error)
  8067. __Pyx_GOTREF(__pyx_t_2);
  8068. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  8069. __pyx_r = __pyx_t_2;
  8070. __pyx_t_2 = 0;
  8071. goto __pyx_L0;
  8072. /* "uvloop/errors.pyx":105
  8073. * cdef int sock_err
  8074. *
  8075. * if uverr == uv.UV_ECANCELED: # <<<<<<<<<<<<<<
  8076. * return aio_CancelledError()
  8077. *
  8078. */
  8079. }
  8080. /* "uvloop/errors.pyx":108
  8081. * return aio_CancelledError()
  8082. *
  8083. * sock_err = __convert_socket_error(uverr) # <<<<<<<<<<<<<<
  8084. * if sock_err:
  8085. * msg = system.gai_strerror(sock_err).decode('utf-8')
  8086. */
  8087. __pyx_v_sock_err = __pyx_f_6uvloop_4loop___convert_socket_error(__pyx_v_uverr);
  8088. /* "uvloop/errors.pyx":109
  8089. *
  8090. * sock_err = __convert_socket_error(uverr)
  8091. * if sock_err: # <<<<<<<<<<<<<<
  8092. * msg = system.gai_strerror(sock_err).decode('utf-8')
  8093. * return socket_gaierror(sock_err, msg)
  8094. */
  8095. __pyx_t_1 = (__pyx_v_sock_err != 0);
  8096. if (__pyx_t_1) {
  8097. /* "uvloop/errors.pyx":110
  8098. * sock_err = __convert_socket_error(uverr)
  8099. * if sock_err:
  8100. * msg = system.gai_strerror(sock_err).decode('utf-8') # <<<<<<<<<<<<<<
  8101. * return socket_gaierror(sock_err, msg)
  8102. *
  8103. */
  8104. __pyx_t_5 = gai_strerror(__pyx_v_sock_err);
  8105. __pyx_t_2 = __Pyx_decode_c_string(__pyx_t_5, 0, strlen(__pyx_t_5), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 110, __pyx_L1_error)
  8106. __Pyx_GOTREF(__pyx_t_2);
  8107. __Pyx_INCREF(__pyx_t_2);
  8108. __pyx_v_msg = __pyx_t_2;
  8109. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  8110. /* "uvloop/errors.pyx":111
  8111. * if sock_err:
  8112. * msg = system.gai_strerror(sock_err).decode('utf-8')
  8113. * return socket_gaierror(sock_err, msg) # <<<<<<<<<<<<<<
  8114. *
  8115. * return __convert_python_error(uverr)
  8116. */
  8117. __Pyx_XDECREF(__pyx_r);
  8118. __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_sock_err); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 111, __pyx_L1_error)
  8119. __Pyx_GOTREF(__pyx_t_3);
  8120. __Pyx_INCREF(__pyx_v_6uvloop_4loop_socket_gaierror);
  8121. __pyx_t_4 = __pyx_v_6uvloop_4loop_socket_gaierror; __pyx_t_6 = NULL;
  8122. __pyx_t_7 = 0;
  8123. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
  8124. __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
  8125. if (likely(__pyx_t_6)) {
  8126. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  8127. __Pyx_INCREF(__pyx_t_6);
  8128. __Pyx_INCREF(function);
  8129. __Pyx_DECREF_SET(__pyx_t_4, function);
  8130. __pyx_t_7 = 1;
  8131. }
  8132. }
  8133. #if CYTHON_FAST_PYCALL
  8134. if (PyFunction_Check(__pyx_t_4)) {
  8135. PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_3, __pyx_v_msg};
  8136. __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 111, __pyx_L1_error)
  8137. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  8138. __Pyx_GOTREF(__pyx_t_2);
  8139. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  8140. } else
  8141. #endif
  8142. #if CYTHON_FAST_PYCCALL
  8143. if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
  8144. PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_3, __pyx_v_msg};
  8145. __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 111, __pyx_L1_error)
  8146. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  8147. __Pyx_GOTREF(__pyx_t_2);
  8148. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  8149. } else
  8150. #endif
  8151. {
  8152. __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 111, __pyx_L1_error)
  8153. __Pyx_GOTREF(__pyx_t_8);
  8154. if (__pyx_t_6) {
  8155. __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
  8156. }
  8157. __Pyx_GIVEREF(__pyx_t_3);
  8158. PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_3);
  8159. __Pyx_INCREF(__pyx_v_msg);
  8160. __Pyx_GIVEREF(__pyx_v_msg);
  8161. PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_msg);
  8162. __pyx_t_3 = 0;
  8163. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 111, __pyx_L1_error)
  8164. __Pyx_GOTREF(__pyx_t_2);
  8165. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  8166. }
  8167. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  8168. __pyx_r = __pyx_t_2;
  8169. __pyx_t_2 = 0;
  8170. goto __pyx_L0;
  8171. /* "uvloop/errors.pyx":109
  8172. *
  8173. * sock_err = __convert_socket_error(uverr)
  8174. * if sock_err: # <<<<<<<<<<<<<<
  8175. * msg = system.gai_strerror(sock_err).decode('utf-8')
  8176. * return socket_gaierror(sock_err, msg)
  8177. */
  8178. }
  8179. /* "uvloop/errors.pyx":113
  8180. * return socket_gaierror(sock_err, msg)
  8181. *
  8182. * return __convert_python_error(uverr) # <<<<<<<<<<<<<<
  8183. */
  8184. __Pyx_XDECREF(__pyx_r);
  8185. __pyx_t_2 = __pyx_f_6uvloop_4loop___convert_python_error(__pyx_v_uverr); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 113, __pyx_L1_error)
  8186. __Pyx_GOTREF(__pyx_t_2);
  8187. __pyx_r = __pyx_t_2;
  8188. __pyx_t_2 = 0;
  8189. goto __pyx_L0;
  8190. /* "uvloop/errors.pyx":102
  8191. *
  8192. *
  8193. * cdef convert_error(int uverr): # <<<<<<<<<<<<<<
  8194. * cdef int sock_err
  8195. *
  8196. */
  8197. /* function exit code */
  8198. __pyx_L1_error:;
  8199. __Pyx_XDECREF(__pyx_t_2);
  8200. __Pyx_XDECREF(__pyx_t_3);
  8201. __Pyx_XDECREF(__pyx_t_4);
  8202. __Pyx_XDECREF(__pyx_t_6);
  8203. __Pyx_XDECREF(__pyx_t_8);
  8204. __Pyx_AddTraceback("uvloop.loop.convert_error", __pyx_clineno, __pyx_lineno, __pyx_filename);
  8205. __pyx_r = 0;
  8206. __pyx_L0:;
  8207. __Pyx_XDECREF(__pyx_v_msg);
  8208. __Pyx_XGIVEREF(__pyx_r);
  8209. __Pyx_RefNannyFinishContext();
  8210. return __pyx_r;
  8211. }
  8212. /* "uvloop/loop.pyx":55
  8213. *
  8214. *
  8215. * cdef _is_sock_stream(sock_type): # <<<<<<<<<<<<<<
  8216. * if SOCK_NONBLOCK == -1:
  8217. * return sock_type == uv.SOCK_STREAM
  8218. */
  8219. static PyObject *__pyx_f_6uvloop_4loop__is_sock_stream(PyObject *__pyx_v_sock_type) {
  8220. PyObject *__pyx_r = NULL;
  8221. __Pyx_RefNannyDeclarations
  8222. int __pyx_t_1;
  8223. PyObject *__pyx_t_2 = NULL;
  8224. PyObject *__pyx_t_3 = NULL;
  8225. PyObject *__pyx_t_4 = NULL;
  8226. __Pyx_RefNannySetupContext("_is_sock_stream", 0);
  8227. /* "uvloop/loop.pyx":56
  8228. *
  8229. * cdef _is_sock_stream(sock_type):
  8230. * if SOCK_NONBLOCK == -1: # <<<<<<<<<<<<<<
  8231. * return sock_type == uv.SOCK_STREAM
  8232. * else:
  8233. */
  8234. __pyx_t_1 = ((__pyx_v_6uvloop_4loop_SOCK_NONBLOCK == -1L) != 0);
  8235. if (__pyx_t_1) {
  8236. /* "uvloop/loop.pyx":57
  8237. * cdef _is_sock_stream(sock_type):
  8238. * if SOCK_NONBLOCK == -1:
  8239. * return sock_type == uv.SOCK_STREAM # <<<<<<<<<<<<<<
  8240. * else:
  8241. * # Linux's socket.type is a bitmask that can include extra info
  8242. */
  8243. __Pyx_XDECREF(__pyx_r);
  8244. __pyx_t_2 = __Pyx_PyInt_From_int(SOCK_STREAM); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 57, __pyx_L1_error)
  8245. __Pyx_GOTREF(__pyx_t_2);
  8246. __pyx_t_3 = PyObject_RichCompare(__pyx_v_sock_type, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 57, __pyx_L1_error)
  8247. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  8248. __pyx_r = __pyx_t_3;
  8249. __pyx_t_3 = 0;
  8250. goto __pyx_L0;
  8251. /* "uvloop/loop.pyx":56
  8252. *
  8253. * cdef _is_sock_stream(sock_type):
  8254. * if SOCK_NONBLOCK == -1: # <<<<<<<<<<<<<<
  8255. * return sock_type == uv.SOCK_STREAM
  8256. * else:
  8257. */
  8258. }
  8259. /* "uvloop/loop.pyx":64
  8260. * # https://github.com/torvalds/linux/blob/v4.13/include/linux/net.h#L77
  8261. * # for more details.
  8262. * return (sock_type & 0xF) == uv.SOCK_STREAM # <<<<<<<<<<<<<<
  8263. *
  8264. *
  8265. */
  8266. /*else*/ {
  8267. __Pyx_XDECREF(__pyx_r);
  8268. __pyx_t_3 = __Pyx_PyInt_AndObjC(__pyx_v_sock_type, __pyx_int_15, 0xF, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 64, __pyx_L1_error)
  8269. __Pyx_GOTREF(__pyx_t_3);
  8270. __pyx_t_2 = __Pyx_PyInt_From_int(SOCK_STREAM); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 64, __pyx_L1_error)
  8271. __Pyx_GOTREF(__pyx_t_2);
  8272. __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 64, __pyx_L1_error)
  8273. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  8274. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  8275. __pyx_r = __pyx_t_4;
  8276. __pyx_t_4 = 0;
  8277. goto __pyx_L0;
  8278. }
  8279. /* "uvloop/loop.pyx":55
  8280. *
  8281. *
  8282. * cdef _is_sock_stream(sock_type): # <<<<<<<<<<<<<<
  8283. * if SOCK_NONBLOCK == -1:
  8284. * return sock_type == uv.SOCK_STREAM
  8285. */
  8286. /* function exit code */
  8287. __pyx_L1_error:;
  8288. __Pyx_XDECREF(__pyx_t_2);
  8289. __Pyx_XDECREF(__pyx_t_3);
  8290. __Pyx_XDECREF(__pyx_t_4);
  8291. __Pyx_AddTraceback("uvloop.loop._is_sock_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  8292. __pyx_r = 0;
  8293. __pyx_L0:;
  8294. __Pyx_XGIVEREF(__pyx_r);
  8295. __Pyx_RefNannyFinishContext();
  8296. return __pyx_r;
  8297. }
  8298. /* "uvloop/loop.pyx":67
  8299. *
  8300. *
  8301. * cdef _is_sock_dgram(sock_type): # <<<<<<<<<<<<<<
  8302. * if SOCK_NONBLOCK == -1:
  8303. * return sock_type == uv.SOCK_DGRAM
  8304. */
  8305. static PyObject *__pyx_f_6uvloop_4loop__is_sock_dgram(PyObject *__pyx_v_sock_type) {
  8306. PyObject *__pyx_r = NULL;
  8307. __Pyx_RefNannyDeclarations
  8308. int __pyx_t_1;
  8309. PyObject *__pyx_t_2 = NULL;
  8310. PyObject *__pyx_t_3 = NULL;
  8311. PyObject *__pyx_t_4 = NULL;
  8312. __Pyx_RefNannySetupContext("_is_sock_dgram", 0);
  8313. /* "uvloop/loop.pyx":68
  8314. *
  8315. * cdef _is_sock_dgram(sock_type):
  8316. * if SOCK_NONBLOCK == -1: # <<<<<<<<<<<<<<
  8317. * return sock_type == uv.SOCK_DGRAM
  8318. * else:
  8319. */
  8320. __pyx_t_1 = ((__pyx_v_6uvloop_4loop_SOCK_NONBLOCK == -1L) != 0);
  8321. if (__pyx_t_1) {
  8322. /* "uvloop/loop.pyx":69
  8323. * cdef _is_sock_dgram(sock_type):
  8324. * if SOCK_NONBLOCK == -1:
  8325. * return sock_type == uv.SOCK_DGRAM # <<<<<<<<<<<<<<
  8326. * else:
  8327. * # Read the comment in `_is_sock_stream`.
  8328. */
  8329. __Pyx_XDECREF(__pyx_r);
  8330. __pyx_t_2 = __Pyx_PyInt_From_int(SOCK_DGRAM); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 69, __pyx_L1_error)
  8331. __Pyx_GOTREF(__pyx_t_2);
  8332. __pyx_t_3 = PyObject_RichCompare(__pyx_v_sock_type, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 69, __pyx_L1_error)
  8333. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  8334. __pyx_r = __pyx_t_3;
  8335. __pyx_t_3 = 0;
  8336. goto __pyx_L0;
  8337. /* "uvloop/loop.pyx":68
  8338. *
  8339. * cdef _is_sock_dgram(sock_type):
  8340. * if SOCK_NONBLOCK == -1: # <<<<<<<<<<<<<<
  8341. * return sock_type == uv.SOCK_DGRAM
  8342. * else:
  8343. */
  8344. }
  8345. /* "uvloop/loop.pyx":72
  8346. * else:
  8347. * # Read the comment in `_is_sock_stream`.
  8348. * return (sock_type & 0xF) == uv.SOCK_DGRAM # <<<<<<<<<<<<<<
  8349. *
  8350. *
  8351. */
  8352. /*else*/ {
  8353. __Pyx_XDECREF(__pyx_r);
  8354. __pyx_t_3 = __Pyx_PyInt_AndObjC(__pyx_v_sock_type, __pyx_int_15, 0xF, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 72, __pyx_L1_error)
  8355. __Pyx_GOTREF(__pyx_t_3);
  8356. __pyx_t_2 = __Pyx_PyInt_From_int(SOCK_DGRAM); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 72, __pyx_L1_error)
  8357. __Pyx_GOTREF(__pyx_t_2);
  8358. __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 72, __pyx_L1_error)
  8359. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  8360. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  8361. __pyx_r = __pyx_t_4;
  8362. __pyx_t_4 = 0;
  8363. goto __pyx_L0;
  8364. }
  8365. /* "uvloop/loop.pyx":67
  8366. *
  8367. *
  8368. * cdef _is_sock_dgram(sock_type): # <<<<<<<<<<<<<<
  8369. * if SOCK_NONBLOCK == -1:
  8370. * return sock_type == uv.SOCK_DGRAM
  8371. */
  8372. /* function exit code */
  8373. __pyx_L1_error:;
  8374. __Pyx_XDECREF(__pyx_t_2);
  8375. __Pyx_XDECREF(__pyx_t_3);
  8376. __Pyx_XDECREF(__pyx_t_4);
  8377. __Pyx_AddTraceback("uvloop.loop._is_sock_dgram", __pyx_clineno, __pyx_lineno, __pyx_filename);
  8378. __pyx_r = 0;
  8379. __pyx_L0:;
  8380. __Pyx_XGIVEREF(__pyx_r);
  8381. __Pyx_RefNannyFinishContext();
  8382. return __pyx_r;
  8383. }
  8384. /* "uvloop/loop.pyx":75
  8385. *
  8386. *
  8387. * cdef isfuture(obj): # <<<<<<<<<<<<<<
  8388. * if aio_isfuture is None:
  8389. * return isinstance(obj, aio_Future)
  8390. */
  8391. static PyObject *__pyx_f_6uvloop_4loop_isfuture(PyObject *__pyx_v_obj) {
  8392. PyObject *__pyx_r = NULL;
  8393. __Pyx_RefNannyDeclarations
  8394. int __pyx_t_1;
  8395. int __pyx_t_2;
  8396. PyObject *__pyx_t_3 = NULL;
  8397. PyObject *__pyx_t_4 = NULL;
  8398. PyObject *__pyx_t_5 = NULL;
  8399. __Pyx_RefNannySetupContext("isfuture", 0);
  8400. /* "uvloop/loop.pyx":76
  8401. *
  8402. * cdef isfuture(obj):
  8403. * if aio_isfuture is None: # <<<<<<<<<<<<<<
  8404. * return isinstance(obj, aio_Future)
  8405. * else:
  8406. */
  8407. __pyx_t_1 = (__pyx_v_6uvloop_4loop_aio_isfuture == Py_None);
  8408. __pyx_t_2 = (__pyx_t_1 != 0);
  8409. if (__pyx_t_2) {
  8410. /* "uvloop/loop.pyx":77
  8411. * cdef isfuture(obj):
  8412. * if aio_isfuture is None:
  8413. * return isinstance(obj, aio_Future) # <<<<<<<<<<<<<<
  8414. * else:
  8415. * return aio_isfuture(obj)
  8416. */
  8417. __Pyx_XDECREF(__pyx_r);
  8418. __pyx_t_3 = __pyx_v_6uvloop_4loop_aio_Future;
  8419. __Pyx_INCREF(__pyx_t_3);
  8420. __pyx_t_2 = PyObject_IsInstance(__pyx_v_obj, __pyx_t_3); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(2, 77, __pyx_L1_error)
  8421. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  8422. __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 77, __pyx_L1_error)
  8423. __Pyx_GOTREF(__pyx_t_3);
  8424. __pyx_r = __pyx_t_3;
  8425. __pyx_t_3 = 0;
  8426. goto __pyx_L0;
  8427. /* "uvloop/loop.pyx":76
  8428. *
  8429. * cdef isfuture(obj):
  8430. * if aio_isfuture is None: # <<<<<<<<<<<<<<
  8431. * return isinstance(obj, aio_Future)
  8432. * else:
  8433. */
  8434. }
  8435. /* "uvloop/loop.pyx":79
  8436. * return isinstance(obj, aio_Future)
  8437. * else:
  8438. * return aio_isfuture(obj) # <<<<<<<<<<<<<<
  8439. *
  8440. *
  8441. */
  8442. /*else*/ {
  8443. __Pyx_XDECREF(__pyx_r);
  8444. __Pyx_INCREF(__pyx_v_6uvloop_4loop_aio_isfuture);
  8445. __pyx_t_4 = __pyx_v_6uvloop_4loop_aio_isfuture; __pyx_t_5 = NULL;
  8446. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
  8447. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
  8448. if (likely(__pyx_t_5)) {
  8449. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  8450. __Pyx_INCREF(__pyx_t_5);
  8451. __Pyx_INCREF(function);
  8452. __Pyx_DECREF_SET(__pyx_t_4, function);
  8453. }
  8454. }
  8455. __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_obj) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_obj);
  8456. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  8457. if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 79, __pyx_L1_error)
  8458. __Pyx_GOTREF(__pyx_t_3);
  8459. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  8460. __pyx_r = __pyx_t_3;
  8461. __pyx_t_3 = 0;
  8462. goto __pyx_L0;
  8463. }
  8464. /* "uvloop/loop.pyx":75
  8465. *
  8466. *
  8467. * cdef isfuture(obj): # <<<<<<<<<<<<<<
  8468. * if aio_isfuture is None:
  8469. * return isinstance(obj, aio_Future)
  8470. */
  8471. /* function exit code */
  8472. __pyx_L1_error:;
  8473. __Pyx_XDECREF(__pyx_t_3);
  8474. __Pyx_XDECREF(__pyx_t_4);
  8475. __Pyx_XDECREF(__pyx_t_5);
  8476. __Pyx_AddTraceback("uvloop.loop.isfuture", __pyx_clineno, __pyx_lineno, __pyx_filename);
  8477. __pyx_r = 0;
  8478. __pyx_L0:;
  8479. __Pyx_XGIVEREF(__pyx_r);
  8480. __Pyx_RefNannyFinishContext();
  8481. return __pyx_r;
  8482. }
  8483. /* "uvloop/loop.pyx":82
  8484. *
  8485. *
  8486. * cdef inline socket_inc_io_ref(sock): # <<<<<<<<<<<<<<
  8487. * if isinstance(sock, socket_socket):
  8488. * sock._io_refs += 1
  8489. */
  8490. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_socket_inc_io_ref(PyObject *__pyx_v_sock) {
  8491. PyObject *__pyx_r = NULL;
  8492. __Pyx_RefNannyDeclarations
  8493. PyObject *__pyx_t_1 = NULL;
  8494. int __pyx_t_2;
  8495. int __pyx_t_3;
  8496. PyObject *__pyx_t_4 = NULL;
  8497. __Pyx_RefNannySetupContext("socket_inc_io_ref", 0);
  8498. /* "uvloop/loop.pyx":83
  8499. *
  8500. * cdef inline socket_inc_io_ref(sock):
  8501. * if isinstance(sock, socket_socket): # <<<<<<<<<<<<<<
  8502. * sock._io_refs += 1
  8503. *
  8504. */
  8505. __pyx_t_1 = __pyx_v_6uvloop_4loop_socket_socket;
  8506. __Pyx_INCREF(__pyx_t_1);
  8507. __pyx_t_2 = PyObject_IsInstance(__pyx_v_sock, __pyx_t_1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(2, 83, __pyx_L1_error)
  8508. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  8509. __pyx_t_3 = (__pyx_t_2 != 0);
  8510. if (__pyx_t_3) {
  8511. /* "uvloop/loop.pyx":84
  8512. * cdef inline socket_inc_io_ref(sock):
  8513. * if isinstance(sock, socket_socket):
  8514. * sock._io_refs += 1 # <<<<<<<<<<<<<<
  8515. *
  8516. *
  8517. */
  8518. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sock, __pyx_n_s_io_refs); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 84, __pyx_L1_error)
  8519. __Pyx_GOTREF(__pyx_t_1);
  8520. __pyx_t_4 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 84, __pyx_L1_error)
  8521. __Pyx_GOTREF(__pyx_t_4);
  8522. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  8523. if (__Pyx_PyObject_SetAttrStr(__pyx_v_sock, __pyx_n_s_io_refs, __pyx_t_4) < 0) __PYX_ERR(2, 84, __pyx_L1_error)
  8524. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  8525. /* "uvloop/loop.pyx":83
  8526. *
  8527. * cdef inline socket_inc_io_ref(sock):
  8528. * if isinstance(sock, socket_socket): # <<<<<<<<<<<<<<
  8529. * sock._io_refs += 1
  8530. *
  8531. */
  8532. }
  8533. /* "uvloop/loop.pyx":82
  8534. *
  8535. *
  8536. * cdef inline socket_inc_io_ref(sock): # <<<<<<<<<<<<<<
  8537. * if isinstance(sock, socket_socket):
  8538. * sock._io_refs += 1
  8539. */
  8540. /* function exit code */
  8541. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  8542. goto __pyx_L0;
  8543. __pyx_L1_error:;
  8544. __Pyx_XDECREF(__pyx_t_1);
  8545. __Pyx_XDECREF(__pyx_t_4);
  8546. __Pyx_AddTraceback("uvloop.loop.socket_inc_io_ref", __pyx_clineno, __pyx_lineno, __pyx_filename);
  8547. __pyx_r = 0;
  8548. __pyx_L0:;
  8549. __Pyx_XGIVEREF(__pyx_r);
  8550. __Pyx_RefNannyFinishContext();
  8551. return __pyx_r;
  8552. }
  8553. /* "uvloop/loop.pyx":87
  8554. *
  8555. *
  8556. * cdef inline socket_dec_io_ref(sock): # <<<<<<<<<<<<<<
  8557. * if isinstance(sock, socket_socket):
  8558. * sock._decref_socketios()
  8559. */
  8560. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_socket_dec_io_ref(PyObject *__pyx_v_sock) {
  8561. PyObject *__pyx_r = NULL;
  8562. __Pyx_RefNannyDeclarations
  8563. PyObject *__pyx_t_1 = NULL;
  8564. int __pyx_t_2;
  8565. int __pyx_t_3;
  8566. PyObject *__pyx_t_4 = NULL;
  8567. PyObject *__pyx_t_5 = NULL;
  8568. __Pyx_RefNannySetupContext("socket_dec_io_ref", 0);
  8569. /* "uvloop/loop.pyx":88
  8570. *
  8571. * cdef inline socket_dec_io_ref(sock):
  8572. * if isinstance(sock, socket_socket): # <<<<<<<<<<<<<<
  8573. * sock._decref_socketios()
  8574. *
  8575. */
  8576. __pyx_t_1 = __pyx_v_6uvloop_4loop_socket_socket;
  8577. __Pyx_INCREF(__pyx_t_1);
  8578. __pyx_t_2 = PyObject_IsInstance(__pyx_v_sock, __pyx_t_1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(2, 88, __pyx_L1_error)
  8579. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  8580. __pyx_t_3 = (__pyx_t_2 != 0);
  8581. if (__pyx_t_3) {
  8582. /* "uvloop/loop.pyx":89
  8583. * cdef inline socket_dec_io_ref(sock):
  8584. * if isinstance(sock, socket_socket):
  8585. * sock._decref_socketios() # <<<<<<<<<<<<<<
  8586. *
  8587. *
  8588. */
  8589. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_sock, __pyx_n_s_decref_socketios); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 89, __pyx_L1_error)
  8590. __Pyx_GOTREF(__pyx_t_4);
  8591. __pyx_t_5 = NULL;
  8592. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
  8593. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
  8594. if (likely(__pyx_t_5)) {
  8595. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  8596. __Pyx_INCREF(__pyx_t_5);
  8597. __Pyx_INCREF(function);
  8598. __Pyx_DECREF_SET(__pyx_t_4, function);
  8599. }
  8600. }
  8601. __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
  8602. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  8603. if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 89, __pyx_L1_error)
  8604. __Pyx_GOTREF(__pyx_t_1);
  8605. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  8606. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  8607. /* "uvloop/loop.pyx":88
  8608. *
  8609. * cdef inline socket_dec_io_ref(sock):
  8610. * if isinstance(sock, socket_socket): # <<<<<<<<<<<<<<
  8611. * sock._decref_socketios()
  8612. *
  8613. */
  8614. }
  8615. /* "uvloop/loop.pyx":87
  8616. *
  8617. *
  8618. * cdef inline socket_dec_io_ref(sock): # <<<<<<<<<<<<<<
  8619. * if isinstance(sock, socket_socket):
  8620. * sock._decref_socketios()
  8621. */
  8622. /* function exit code */
  8623. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  8624. goto __pyx_L0;
  8625. __pyx_L1_error:;
  8626. __Pyx_XDECREF(__pyx_t_1);
  8627. __Pyx_XDECREF(__pyx_t_4);
  8628. __Pyx_XDECREF(__pyx_t_5);
  8629. __Pyx_AddTraceback("uvloop.loop.socket_dec_io_ref", __pyx_clineno, __pyx_lineno, __pyx_filename);
  8630. __pyx_r = 0;
  8631. __pyx_L0:;
  8632. __Pyx_XGIVEREF(__pyx_r);
  8633. __Pyx_RefNannyFinishContext();
  8634. return __pyx_r;
  8635. }
  8636. /* "uvloop/loop.pyx":94
  8637. * @cython.no_gc_clear
  8638. * cdef class Loop:
  8639. * def __cinit__(self): # <<<<<<<<<<<<<<
  8640. * cdef int err
  8641. *
  8642. */
  8643. /* Python wrapper */
  8644. static int __pyx_pw_6uvloop_4loop_4Loop_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  8645. static int __pyx_pw_6uvloop_4loop_4Loop_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  8646. int __pyx_r;
  8647. __Pyx_RefNannyDeclarations
  8648. __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  8649. if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
  8650. __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  8651. if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
  8652. __pyx_r = __pyx_pf_6uvloop_4loop_4Loop___cinit__(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self));
  8653. /* function exit code */
  8654. __Pyx_RefNannyFinishContext();
  8655. return __pyx_r;
  8656. }
  8657. static int __pyx_pf_6uvloop_4loop_4Loop___cinit__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) {
  8658. int __pyx_v_err;
  8659. int __pyx_r;
  8660. __Pyx_RefNannyDeclarations
  8661. PyObject *__pyx_t_1 = NULL;
  8662. int __pyx_t_2;
  8663. PyObject *__pyx_t_3 = NULL;
  8664. PyObject *__pyx_t_4 = NULL;
  8665. int __pyx_t_5;
  8666. __Pyx_RefNannySetupContext("__cinit__", 0);
  8667. /* "uvloop/loop.pyx":98
  8668. *
  8669. * # Install PyMem* memory allocators if they aren't installed yet.
  8670. * __install_pymem() # <<<<<<<<<<<<<<
  8671. *
  8672. * # Install pthread_atfork handlers
  8673. */
  8674. __pyx_t_1 = __pyx_f_6uvloop_4loop___install_pymem(); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 98, __pyx_L1_error)
  8675. __Pyx_GOTREF(__pyx_t_1);
  8676. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  8677. /* "uvloop/loop.pyx":101
  8678. *
  8679. * # Install pthread_atfork handlers
  8680. * __install_atfork() # <<<<<<<<<<<<<<
  8681. *
  8682. * self.uvloop = <uv.uv_loop_t*>PyMem_RawMalloc(sizeof(uv.uv_loop_t))
  8683. */
  8684. __pyx_t_1 = __pyx_f_6uvloop_4loop___install_atfork(); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 101, __pyx_L1_error)
  8685. __Pyx_GOTREF(__pyx_t_1);
  8686. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  8687. /* "uvloop/loop.pyx":103
  8688. * __install_atfork()
  8689. *
  8690. * self.uvloop = <uv.uv_loop_t*>PyMem_RawMalloc(sizeof(uv.uv_loop_t)) # <<<<<<<<<<<<<<
  8691. * if self.uvloop is NULL:
  8692. * raise MemoryError()
  8693. */
  8694. __pyx_v_self->uvloop = ((uv_loop_t *)PyMem_RawMalloc((sizeof(uv_loop_t))));
  8695. /* "uvloop/loop.pyx":104
  8696. *
  8697. * self.uvloop = <uv.uv_loop_t*>PyMem_RawMalloc(sizeof(uv.uv_loop_t))
  8698. * if self.uvloop is NULL: # <<<<<<<<<<<<<<
  8699. * raise MemoryError()
  8700. *
  8701. */
  8702. __pyx_t_2 = ((__pyx_v_self->uvloop == NULL) != 0);
  8703. if (unlikely(__pyx_t_2)) {
  8704. /* "uvloop/loop.pyx":105
  8705. * self.uvloop = <uv.uv_loop_t*>PyMem_RawMalloc(sizeof(uv.uv_loop_t))
  8706. * if self.uvloop is NULL:
  8707. * raise MemoryError() # <<<<<<<<<<<<<<
  8708. *
  8709. * self.slow_callback_duration = 0.1
  8710. */
  8711. PyErr_NoMemory(); __PYX_ERR(2, 105, __pyx_L1_error)
  8712. /* "uvloop/loop.pyx":104
  8713. *
  8714. * self.uvloop = <uv.uv_loop_t*>PyMem_RawMalloc(sizeof(uv.uv_loop_t))
  8715. * if self.uvloop is NULL: # <<<<<<<<<<<<<<
  8716. * raise MemoryError()
  8717. *
  8718. */
  8719. }
  8720. /* "uvloop/loop.pyx":107
  8721. * raise MemoryError()
  8722. *
  8723. * self.slow_callback_duration = 0.1 # <<<<<<<<<<<<<<
  8724. *
  8725. * self._closed = 0
  8726. */
  8727. __Pyx_INCREF(__pyx_float_0_1);
  8728. __Pyx_GIVEREF(__pyx_float_0_1);
  8729. __Pyx_GOTREF(__pyx_v_self->slow_callback_duration);
  8730. __Pyx_DECREF(__pyx_v_self->slow_callback_duration);
  8731. __pyx_v_self->slow_callback_duration = __pyx_float_0_1;
  8732. /* "uvloop/loop.pyx":109
  8733. * self.slow_callback_duration = 0.1
  8734. *
  8735. * self._closed = 0 # <<<<<<<<<<<<<<
  8736. * self._debug = 0
  8737. * self._thread_is_main = 0
  8738. */
  8739. __pyx_v_self->_closed = 0;
  8740. /* "uvloop/loop.pyx":110
  8741. *
  8742. * self._closed = 0
  8743. * self._debug = 0 # <<<<<<<<<<<<<<
  8744. * self._thread_is_main = 0
  8745. * self._thread_id = 0
  8746. */
  8747. __pyx_v_self->_debug = 0;
  8748. /* "uvloop/loop.pyx":111
  8749. * self._closed = 0
  8750. * self._debug = 0
  8751. * self._thread_is_main = 0 # <<<<<<<<<<<<<<
  8752. * self._thread_id = 0
  8753. * self._running = 0
  8754. */
  8755. __pyx_v_self->_thread_is_main = 0;
  8756. /* "uvloop/loop.pyx":112
  8757. * self._debug = 0
  8758. * self._thread_is_main = 0
  8759. * self._thread_id = 0 # <<<<<<<<<<<<<<
  8760. * self._running = 0
  8761. * self._stopping = 0
  8762. */
  8763. __pyx_v_self->_thread_id = 0;
  8764. /* "uvloop/loop.pyx":113
  8765. * self._thread_is_main = 0
  8766. * self._thread_id = 0
  8767. * self._running = 0 # <<<<<<<<<<<<<<
  8768. * self._stopping = 0
  8769. *
  8770. */
  8771. __pyx_v_self->_running = 0;
  8772. /* "uvloop/loop.pyx":114
  8773. * self._thread_id = 0
  8774. * self._running = 0
  8775. * self._stopping = 0 # <<<<<<<<<<<<<<
  8776. *
  8777. * self._transports = weakref_WeakValueDictionary()
  8778. */
  8779. __pyx_v_self->_stopping = 0;
  8780. /* "uvloop/loop.pyx":116
  8781. * self._stopping = 0
  8782. *
  8783. * self._transports = weakref_WeakValueDictionary() # <<<<<<<<<<<<<<
  8784. * self._processes = set()
  8785. *
  8786. */
  8787. __Pyx_INCREF(__pyx_v_6uvloop_4loop_weakref_WeakValueDictionary);
  8788. __pyx_t_3 = __pyx_v_6uvloop_4loop_weakref_WeakValueDictionary; __pyx_t_4 = NULL;
  8789. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
  8790. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
  8791. if (likely(__pyx_t_4)) {
  8792. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  8793. __Pyx_INCREF(__pyx_t_4);
  8794. __Pyx_INCREF(function);
  8795. __Pyx_DECREF_SET(__pyx_t_3, function);
  8796. }
  8797. }
  8798. __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
  8799. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  8800. if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 116, __pyx_L1_error)
  8801. __Pyx_GOTREF(__pyx_t_1);
  8802. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  8803. __Pyx_GIVEREF(__pyx_t_1);
  8804. __Pyx_GOTREF(__pyx_v_self->_transports);
  8805. __Pyx_DECREF(__pyx_v_self->_transports);
  8806. __pyx_v_self->_transports = __pyx_t_1;
  8807. __pyx_t_1 = 0;
  8808. /* "uvloop/loop.pyx":117
  8809. *
  8810. * self._transports = weakref_WeakValueDictionary()
  8811. * self._processes = set() # <<<<<<<<<<<<<<
  8812. *
  8813. * # Used to keep a reference (and hence keep the fileobj alive)
  8814. */
  8815. __pyx_t_1 = PySet_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 117, __pyx_L1_error)
  8816. __Pyx_GOTREF(__pyx_t_1);
  8817. __Pyx_GIVEREF(__pyx_t_1);
  8818. __Pyx_GOTREF(__pyx_v_self->_processes);
  8819. __Pyx_DECREF(__pyx_v_self->_processes);
  8820. __pyx_v_self->_processes = ((PyObject*)__pyx_t_1);
  8821. __pyx_t_1 = 0;
  8822. /* "uvloop/loop.pyx":122
  8823. * # for as long as its registered by add_reader or add_writer.
  8824. * # This is how the selector module and hence asyncio behaves.
  8825. * self._fd_to_reader_fileobj = {} # <<<<<<<<<<<<<<
  8826. * self._fd_to_writer_fileobj = {}
  8827. *
  8828. */
  8829. __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 122, __pyx_L1_error)
  8830. __Pyx_GOTREF(__pyx_t_1);
  8831. __Pyx_GIVEREF(__pyx_t_1);
  8832. __Pyx_GOTREF(__pyx_v_self->_fd_to_reader_fileobj);
  8833. __Pyx_DECREF(__pyx_v_self->_fd_to_reader_fileobj);
  8834. __pyx_v_self->_fd_to_reader_fileobj = ((PyObject*)__pyx_t_1);
  8835. __pyx_t_1 = 0;
  8836. /* "uvloop/loop.pyx":123
  8837. * # This is how the selector module and hence asyncio behaves.
  8838. * self._fd_to_reader_fileobj = {}
  8839. * self._fd_to_writer_fileobj = {} # <<<<<<<<<<<<<<
  8840. *
  8841. * self._timers = set()
  8842. */
  8843. __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 123, __pyx_L1_error)
  8844. __Pyx_GOTREF(__pyx_t_1);
  8845. __Pyx_GIVEREF(__pyx_t_1);
  8846. __Pyx_GOTREF(__pyx_v_self->_fd_to_writer_fileobj);
  8847. __Pyx_DECREF(__pyx_v_self->_fd_to_writer_fileobj);
  8848. __pyx_v_self->_fd_to_writer_fileobj = ((PyObject*)__pyx_t_1);
  8849. __pyx_t_1 = 0;
  8850. /* "uvloop/loop.pyx":125
  8851. * self._fd_to_writer_fileobj = {}
  8852. *
  8853. * self._timers = set() # <<<<<<<<<<<<<<
  8854. * self._polls = {}
  8855. *
  8856. */
  8857. __pyx_t_1 = PySet_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 125, __pyx_L1_error)
  8858. __Pyx_GOTREF(__pyx_t_1);
  8859. __Pyx_GIVEREF(__pyx_t_1);
  8860. __Pyx_GOTREF(__pyx_v_self->_timers);
  8861. __Pyx_DECREF(__pyx_v_self->_timers);
  8862. __pyx_v_self->_timers = ((PyObject*)__pyx_t_1);
  8863. __pyx_t_1 = 0;
  8864. /* "uvloop/loop.pyx":126
  8865. *
  8866. * self._timers = set()
  8867. * self._polls = {} # <<<<<<<<<<<<<<
  8868. *
  8869. * self._recv_buffer_in_use = 0
  8870. */
  8871. __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 126, __pyx_L1_error)
  8872. __Pyx_GOTREF(__pyx_t_1);
  8873. __Pyx_GIVEREF(__pyx_t_1);
  8874. __Pyx_GOTREF(__pyx_v_self->_polls);
  8875. __Pyx_DECREF(__pyx_v_self->_polls);
  8876. __pyx_v_self->_polls = ((PyObject*)__pyx_t_1);
  8877. __pyx_t_1 = 0;
  8878. /* "uvloop/loop.pyx":128
  8879. * self._polls = {}
  8880. *
  8881. * self._recv_buffer_in_use = 0 # <<<<<<<<<<<<<<
  8882. *
  8883. * err = uv.uv_loop_init(self.uvloop)
  8884. */
  8885. __pyx_v_self->_recv_buffer_in_use = 0;
  8886. /* "uvloop/loop.pyx":130
  8887. * self._recv_buffer_in_use = 0
  8888. *
  8889. * err = uv.uv_loop_init(self.uvloop) # <<<<<<<<<<<<<<
  8890. * if err < 0:
  8891. * raise convert_error(err)
  8892. */
  8893. __pyx_v_err = uv_loop_init(__pyx_v_self->uvloop);
  8894. /* "uvloop/loop.pyx":131
  8895. *
  8896. * err = uv.uv_loop_init(self.uvloop)
  8897. * if err < 0: # <<<<<<<<<<<<<<
  8898. * raise convert_error(err)
  8899. * self.uvloop.data = <void*> self
  8900. */
  8901. __pyx_t_2 = ((__pyx_v_err < 0) != 0);
  8902. if (unlikely(__pyx_t_2)) {
  8903. /* "uvloop/loop.pyx":132
  8904. * err = uv.uv_loop_init(self.uvloop)
  8905. * if err < 0:
  8906. * raise convert_error(err) # <<<<<<<<<<<<<<
  8907. * self.uvloop.data = <void*> self
  8908. *
  8909. */
  8910. __pyx_t_1 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 132, __pyx_L1_error)
  8911. __Pyx_GOTREF(__pyx_t_1);
  8912. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  8913. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  8914. __PYX_ERR(2, 132, __pyx_L1_error)
  8915. /* "uvloop/loop.pyx":131
  8916. *
  8917. * err = uv.uv_loop_init(self.uvloop)
  8918. * if err < 0: # <<<<<<<<<<<<<<
  8919. * raise convert_error(err)
  8920. * self.uvloop.data = <void*> self
  8921. */
  8922. }
  8923. /* "uvloop/loop.pyx":133
  8924. * if err < 0:
  8925. * raise convert_error(err)
  8926. * self.uvloop.data = <void*> self # <<<<<<<<<<<<<<
  8927. *
  8928. * self._init_debug_fields()
  8929. */
  8930. __pyx_v_self->uvloop->data = ((void *)__pyx_v_self);
  8931. /* "uvloop/loop.pyx":135
  8932. * self.uvloop.data = <void*> self
  8933. *
  8934. * self._init_debug_fields() # <<<<<<<<<<<<<<
  8935. *
  8936. * self.active_process_handler = None
  8937. */
  8938. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_vtab)->_init_debug_fields(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 135, __pyx_L1_error)
  8939. __Pyx_GOTREF(__pyx_t_1);
  8940. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  8941. /* "uvloop/loop.pyx":137
  8942. * self._init_debug_fields()
  8943. *
  8944. * self.active_process_handler = None # <<<<<<<<<<<<<<
  8945. *
  8946. * self._last_error = None
  8947. */
  8948. __Pyx_INCREF(Py_None);
  8949. __Pyx_GIVEREF(Py_None);
  8950. __Pyx_GOTREF(__pyx_v_self->active_process_handler);
  8951. __Pyx_DECREF(((PyObject *)__pyx_v_self->active_process_handler));
  8952. __pyx_v_self->active_process_handler = ((struct __pyx_obj_6uvloop_4loop_UVProcess *)Py_None);
  8953. /* "uvloop/loop.pyx":139
  8954. * self.active_process_handler = None
  8955. *
  8956. * self._last_error = None # <<<<<<<<<<<<<<
  8957. *
  8958. * self._task_factory = None
  8959. */
  8960. __Pyx_INCREF(Py_None);
  8961. __Pyx_GIVEREF(Py_None);
  8962. __Pyx_GOTREF(__pyx_v_self->_last_error);
  8963. __Pyx_DECREF(__pyx_v_self->_last_error);
  8964. __pyx_v_self->_last_error = Py_None;
  8965. /* "uvloop/loop.pyx":141
  8966. * self._last_error = None
  8967. *
  8968. * self._task_factory = None # <<<<<<<<<<<<<<
  8969. * self._exception_handler = None
  8970. * self._default_executor = None
  8971. */
  8972. __Pyx_INCREF(Py_None);
  8973. __Pyx_GIVEREF(Py_None);
  8974. __Pyx_GOTREF(__pyx_v_self->_task_factory);
  8975. __Pyx_DECREF(__pyx_v_self->_task_factory);
  8976. __pyx_v_self->_task_factory = Py_None;
  8977. /* "uvloop/loop.pyx":142
  8978. *
  8979. * self._task_factory = None
  8980. * self._exception_handler = None # <<<<<<<<<<<<<<
  8981. * self._default_executor = None
  8982. *
  8983. */
  8984. __Pyx_INCREF(Py_None);
  8985. __Pyx_GIVEREF(Py_None);
  8986. __Pyx_GOTREF(__pyx_v_self->_exception_handler);
  8987. __Pyx_DECREF(__pyx_v_self->_exception_handler);
  8988. __pyx_v_self->_exception_handler = Py_None;
  8989. /* "uvloop/loop.pyx":143
  8990. * self._task_factory = None
  8991. * self._exception_handler = None
  8992. * self._default_executor = None # <<<<<<<<<<<<<<
  8993. *
  8994. * self._queued_streams = set()
  8995. */
  8996. __Pyx_INCREF(Py_None);
  8997. __Pyx_GIVEREF(Py_None);
  8998. __Pyx_GOTREF(__pyx_v_self->_default_executor);
  8999. __Pyx_DECREF(__pyx_v_self->_default_executor);
  9000. __pyx_v_self->_default_executor = Py_None;
  9001. /* "uvloop/loop.pyx":145
  9002. * self._default_executor = None
  9003. *
  9004. * self._queued_streams = set() # <<<<<<<<<<<<<<
  9005. * self._ready = col_deque()
  9006. * self._ready_len = 0
  9007. */
  9008. __pyx_t_1 = PySet_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 145, __pyx_L1_error)
  9009. __Pyx_GOTREF(__pyx_t_1);
  9010. __Pyx_GIVEREF(__pyx_t_1);
  9011. __Pyx_GOTREF(__pyx_v_self->_queued_streams);
  9012. __Pyx_DECREF(__pyx_v_self->_queued_streams);
  9013. __pyx_v_self->_queued_streams = ((PyObject*)__pyx_t_1);
  9014. __pyx_t_1 = 0;
  9015. /* "uvloop/loop.pyx":146
  9016. *
  9017. * self._queued_streams = set()
  9018. * self._ready = col_deque() # <<<<<<<<<<<<<<
  9019. * self._ready_len = 0
  9020. *
  9021. */
  9022. __Pyx_INCREF(__pyx_v_6uvloop_4loop_col_deque);
  9023. __pyx_t_3 = __pyx_v_6uvloop_4loop_col_deque; __pyx_t_4 = NULL;
  9024. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
  9025. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
  9026. if (likely(__pyx_t_4)) {
  9027. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  9028. __Pyx_INCREF(__pyx_t_4);
  9029. __Pyx_INCREF(function);
  9030. __Pyx_DECREF_SET(__pyx_t_3, function);
  9031. }
  9032. }
  9033. __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
  9034. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  9035. if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 146, __pyx_L1_error)
  9036. __Pyx_GOTREF(__pyx_t_1);
  9037. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  9038. __Pyx_GIVEREF(__pyx_t_1);
  9039. __Pyx_GOTREF(__pyx_v_self->_ready);
  9040. __Pyx_DECREF(__pyx_v_self->_ready);
  9041. __pyx_v_self->_ready = __pyx_t_1;
  9042. __pyx_t_1 = 0;
  9043. /* "uvloop/loop.pyx":147
  9044. * self._queued_streams = set()
  9045. * self._ready = col_deque()
  9046. * self._ready_len = 0 # <<<<<<<<<<<<<<
  9047. *
  9048. * self.handler_async = UVAsync.new(
  9049. */
  9050. __pyx_v_self->_ready_len = 0;
  9051. /* "uvloop/loop.pyx":149
  9052. * self._ready_len = 0
  9053. *
  9054. * self.handler_async = UVAsync.new( # <<<<<<<<<<<<<<
  9055. * self, <method_t>self._on_wake, self)
  9056. *
  9057. */
  9058. __pyx_t_1 = ((PyObject *)__pyx_f_6uvloop_4loop_7UVAsync_new(__pyx_v_self, ((__pyx_t_6uvloop_4loop_method_t)((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_vtab)->_on_wake), ((PyObject *)__pyx_v_self))); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 149, __pyx_L1_error)
  9059. __Pyx_GOTREF(__pyx_t_1);
  9060. __Pyx_GIVEREF(__pyx_t_1);
  9061. __Pyx_GOTREF(__pyx_v_self->handler_async);
  9062. __Pyx_DECREF(((PyObject *)__pyx_v_self->handler_async));
  9063. __pyx_v_self->handler_async = ((struct __pyx_obj_6uvloop_4loop_UVAsync *)__pyx_t_1);
  9064. __pyx_t_1 = 0;
  9065. /* "uvloop/loop.pyx":154
  9066. * self.handler_idle = UVIdle.new(
  9067. * self,
  9068. * new_MethodHandle( # <<<<<<<<<<<<<<
  9069. * self, "loop._on_idle", <method_t>self._on_idle, self))
  9070. *
  9071. */
  9072. __pyx_t_1 = __pyx_f_6uvloop_4loop_new_MethodHandle(__pyx_v_self, __pyx_kp_u_loop__on_idle, ((__pyx_t_6uvloop_4loop_method_t)((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_vtab)->_on_idle), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 154, __pyx_L1_error)
  9073. __Pyx_GOTREF(__pyx_t_1);
  9074. if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6uvloop_4loop_Handle))))) __PYX_ERR(2, 154, __pyx_L1_error)
  9075. /* "uvloop/loop.pyx":152
  9076. * self, <method_t>self._on_wake, self)
  9077. *
  9078. * self.handler_idle = UVIdle.new( # <<<<<<<<<<<<<<
  9079. * self,
  9080. * new_MethodHandle(
  9081. */
  9082. __pyx_t_3 = ((PyObject *)__pyx_f_6uvloop_4loop_6UVIdle_new(__pyx_v_self, ((struct __pyx_obj_6uvloop_4loop_Handle *)__pyx_t_1))); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 152, __pyx_L1_error)
  9083. __Pyx_GOTREF(__pyx_t_3);
  9084. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  9085. __Pyx_GIVEREF(__pyx_t_3);
  9086. __Pyx_GOTREF(__pyx_v_self->handler_idle);
  9087. __Pyx_DECREF(((PyObject *)__pyx_v_self->handler_idle));
  9088. __pyx_v_self->handler_idle = ((struct __pyx_obj_6uvloop_4loop_UVIdle *)__pyx_t_3);
  9089. __pyx_t_3 = 0;
  9090. /* "uvloop/loop.pyx":161
  9091. * self.handler_check__exec_writes = UVCheck.new(
  9092. * self,
  9093. * new_MethodHandle( # <<<<<<<<<<<<<<
  9094. * self, "loop._exec_queued_writes",
  9095. * <method_t>self._exec_queued_writes, self))
  9096. */
  9097. __pyx_t_3 = __pyx_f_6uvloop_4loop_new_MethodHandle(__pyx_v_self, __pyx_kp_u_loop__exec_queued_writes, ((__pyx_t_6uvloop_4loop_method_t)((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_vtab)->_exec_queued_writes), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 161, __pyx_L1_error)
  9098. __Pyx_GOTREF(__pyx_t_3);
  9099. if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6uvloop_4loop_Handle))))) __PYX_ERR(2, 161, __pyx_L1_error)
  9100. /* "uvloop/loop.pyx":159
  9101. * # Needed to call `UVStream._exec_write` for writes scheduled
  9102. * # during `Protocol.data_received`.
  9103. * self.handler_check__exec_writes = UVCheck.new( # <<<<<<<<<<<<<<
  9104. * self,
  9105. * new_MethodHandle(
  9106. */
  9107. __pyx_t_1 = ((PyObject *)__pyx_f_6uvloop_4loop_7UVCheck_new(__pyx_v_self, ((struct __pyx_obj_6uvloop_4loop_Handle *)__pyx_t_3))); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 159, __pyx_L1_error)
  9108. __Pyx_GOTREF(__pyx_t_1);
  9109. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  9110. __Pyx_GIVEREF(__pyx_t_1);
  9111. __Pyx_GOTREF(__pyx_v_self->handler_check__exec_writes);
  9112. __Pyx_DECREF(((PyObject *)__pyx_v_self->handler_check__exec_writes));
  9113. __pyx_v_self->handler_check__exec_writes = ((struct __pyx_obj_6uvloop_4loop_UVCheck *)__pyx_t_1);
  9114. __pyx_t_1 = 0;
  9115. /* "uvloop/loop.pyx":165
  9116. * <method_t>self._exec_queued_writes, self))
  9117. *
  9118. * self._signals = set() # <<<<<<<<<<<<<<
  9119. * self._ssock = self._csock = None
  9120. * self._signal_handlers = {}
  9121. */
  9122. __pyx_t_1 = PySet_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 165, __pyx_L1_error)
  9123. __Pyx_GOTREF(__pyx_t_1);
  9124. __Pyx_GIVEREF(__pyx_t_1);
  9125. __Pyx_GOTREF(__pyx_v_self->_signals);
  9126. __Pyx_DECREF(__pyx_v_self->_signals);
  9127. __pyx_v_self->_signals = ((PyObject*)__pyx_t_1);
  9128. __pyx_t_1 = 0;
  9129. /* "uvloop/loop.pyx":166
  9130. *
  9131. * self._signals = set()
  9132. * self._ssock = self._csock = None # <<<<<<<<<<<<<<
  9133. * self._signal_handlers = {}
  9134. * self._listening_signals = False
  9135. */
  9136. __Pyx_INCREF(Py_None);
  9137. __Pyx_GIVEREF(Py_None);
  9138. __Pyx_GOTREF(__pyx_v_self->_ssock);
  9139. __Pyx_DECREF(__pyx_v_self->_ssock);
  9140. __pyx_v_self->_ssock = Py_None;
  9141. __Pyx_INCREF(Py_None);
  9142. __Pyx_GIVEREF(Py_None);
  9143. __Pyx_GOTREF(__pyx_v_self->_csock);
  9144. __Pyx_DECREF(__pyx_v_self->_csock);
  9145. __pyx_v_self->_csock = Py_None;
  9146. /* "uvloop/loop.pyx":167
  9147. * self._signals = set()
  9148. * self._ssock = self._csock = None
  9149. * self._signal_handlers = {} # <<<<<<<<<<<<<<
  9150. * self._listening_signals = False
  9151. *
  9152. */
  9153. __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 167, __pyx_L1_error)
  9154. __Pyx_GOTREF(__pyx_t_1);
  9155. __Pyx_GIVEREF(__pyx_t_1);
  9156. __Pyx_GOTREF(__pyx_v_self->_signal_handlers);
  9157. __Pyx_DECREF(__pyx_v_self->_signal_handlers);
  9158. __pyx_v_self->_signal_handlers = ((PyObject*)__pyx_t_1);
  9159. __pyx_t_1 = 0;
  9160. /* "uvloop/loop.pyx":168
  9161. * self._ssock = self._csock = None
  9162. * self._signal_handlers = {}
  9163. * self._listening_signals = False # <<<<<<<<<<<<<<
  9164. *
  9165. * self._coroutine_debug_set = False
  9166. */
  9167. __pyx_v_self->_listening_signals = 0;
  9168. /* "uvloop/loop.pyx":170
  9169. * self._listening_signals = False
  9170. *
  9171. * self._coroutine_debug_set = False # <<<<<<<<<<<<<<
  9172. *
  9173. * if hasattr(sys, 'get_asyncgen_hooks'):
  9174. */
  9175. __pyx_v_self->_coroutine_debug_set = 0;
  9176. /* "uvloop/loop.pyx":172
  9177. * self._coroutine_debug_set = False
  9178. *
  9179. * if hasattr(sys, 'get_asyncgen_hooks'): # <<<<<<<<<<<<<<
  9180. * # Python >= 3.6
  9181. * # A weak set of all asynchronous generators that are
  9182. */
  9183. __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 172, __pyx_L1_error)
  9184. __Pyx_GOTREF(__pyx_t_1);
  9185. __pyx_t_2 = __Pyx_HasAttr(__pyx_t_1, __pyx_n_u_get_asyncgen_hooks); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(2, 172, __pyx_L1_error)
  9186. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  9187. __pyx_t_5 = (__pyx_t_2 != 0);
  9188. if (__pyx_t_5) {
  9189. /* "uvloop/loop.pyx":176
  9190. * # A weak set of all asynchronous generators that are
  9191. * # being iterated by the loop.
  9192. * self._asyncgens = weakref_WeakSet() # <<<<<<<<<<<<<<
  9193. * else:
  9194. * self._asyncgens = None
  9195. */
  9196. __Pyx_INCREF(__pyx_v_6uvloop_4loop_weakref_WeakSet);
  9197. __pyx_t_3 = __pyx_v_6uvloop_4loop_weakref_WeakSet; __pyx_t_4 = NULL;
  9198. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
  9199. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
  9200. if (likely(__pyx_t_4)) {
  9201. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  9202. __Pyx_INCREF(__pyx_t_4);
  9203. __Pyx_INCREF(function);
  9204. __Pyx_DECREF_SET(__pyx_t_3, function);
  9205. }
  9206. }
  9207. __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
  9208. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  9209. if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 176, __pyx_L1_error)
  9210. __Pyx_GOTREF(__pyx_t_1);
  9211. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  9212. __Pyx_GIVEREF(__pyx_t_1);
  9213. __Pyx_GOTREF(__pyx_v_self->_asyncgens);
  9214. __Pyx_DECREF(__pyx_v_self->_asyncgens);
  9215. __pyx_v_self->_asyncgens = __pyx_t_1;
  9216. __pyx_t_1 = 0;
  9217. /* "uvloop/loop.pyx":172
  9218. * self._coroutine_debug_set = False
  9219. *
  9220. * if hasattr(sys, 'get_asyncgen_hooks'): # <<<<<<<<<<<<<<
  9221. * # Python >= 3.6
  9222. * # A weak set of all asynchronous generators that are
  9223. */
  9224. goto __pyx_L5;
  9225. }
  9226. /* "uvloop/loop.pyx":178
  9227. * self._asyncgens = weakref_WeakSet()
  9228. * else:
  9229. * self._asyncgens = None # <<<<<<<<<<<<<<
  9230. *
  9231. * # Set to True when `loop.shutdown_asyncgens` is called.
  9232. */
  9233. /*else*/ {
  9234. __Pyx_INCREF(Py_None);
  9235. __Pyx_GIVEREF(Py_None);
  9236. __Pyx_GOTREF(__pyx_v_self->_asyncgens);
  9237. __Pyx_DECREF(__pyx_v_self->_asyncgens);
  9238. __pyx_v_self->_asyncgens = Py_None;
  9239. }
  9240. __pyx_L5:;
  9241. /* "uvloop/loop.pyx":181
  9242. *
  9243. * # Set to True when `loop.shutdown_asyncgens` is called.
  9244. * self._asyncgens_shutdown_called = False # <<<<<<<<<<<<<<
  9245. *
  9246. * self._servers = set()
  9247. */
  9248. __pyx_v_self->_asyncgens_shutdown_called = 0;
  9249. /* "uvloop/loop.pyx":183
  9250. * self._asyncgens_shutdown_called = False
  9251. *
  9252. * self._servers = set() # <<<<<<<<<<<<<<
  9253. *
  9254. * def __init__(self):
  9255. */
  9256. __pyx_t_1 = PySet_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 183, __pyx_L1_error)
  9257. __Pyx_GOTREF(__pyx_t_1);
  9258. __Pyx_GIVEREF(__pyx_t_1);
  9259. __Pyx_GOTREF(__pyx_v_self->_servers);
  9260. __Pyx_DECREF(__pyx_v_self->_servers);
  9261. __pyx_v_self->_servers = ((PyObject*)__pyx_t_1);
  9262. __pyx_t_1 = 0;
  9263. /* "uvloop/loop.pyx":94
  9264. * @cython.no_gc_clear
  9265. * cdef class Loop:
  9266. * def __cinit__(self): # <<<<<<<<<<<<<<
  9267. * cdef int err
  9268. *
  9269. */
  9270. /* function exit code */
  9271. __pyx_r = 0;
  9272. goto __pyx_L0;
  9273. __pyx_L1_error:;
  9274. __Pyx_XDECREF(__pyx_t_1);
  9275. __Pyx_XDECREF(__pyx_t_3);
  9276. __Pyx_XDECREF(__pyx_t_4);
  9277. __Pyx_AddTraceback("uvloop.loop.Loop.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  9278. __pyx_r = -1;
  9279. __pyx_L0:;
  9280. __Pyx_RefNannyFinishContext();
  9281. return __pyx_r;
  9282. }
  9283. /* "uvloop/loop.pyx":185
  9284. * self._servers = set()
  9285. *
  9286. * def __init__(self): # <<<<<<<<<<<<<<
  9287. * self.set_debug((not sys_ignore_environment
  9288. * and bool(os_environ.get('PYTHONASYNCIODEBUG'))))
  9289. */
  9290. /* Python wrapper */
  9291. static int __pyx_pw_6uvloop_4loop_4Loop_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  9292. static int __pyx_pw_6uvloop_4loop_4Loop_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  9293. int __pyx_r;
  9294. __Pyx_RefNannyDeclarations
  9295. __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  9296. if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
  9297. __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  9298. if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1;
  9299. __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_2__init__(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self));
  9300. /* function exit code */
  9301. __Pyx_RefNannyFinishContext();
  9302. return __pyx_r;
  9303. }
  9304. static int __pyx_pf_6uvloop_4loop_4Loop_2__init__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) {
  9305. int __pyx_r;
  9306. __Pyx_RefNannyDeclarations
  9307. PyObject *__pyx_t_1 = NULL;
  9308. PyObject *__pyx_t_2 = NULL;
  9309. PyObject *__pyx_t_3 = NULL;
  9310. int __pyx_t_4;
  9311. int __pyx_t_5;
  9312. PyObject *__pyx_t_6 = NULL;
  9313. PyObject *__pyx_t_7 = NULL;
  9314. PyObject *__pyx_t_8 = NULL;
  9315. __Pyx_RefNannySetupContext("__init__", 0);
  9316. /* "uvloop/loop.pyx":186
  9317. *
  9318. * def __init__(self):
  9319. * self.set_debug((not sys_ignore_environment # <<<<<<<<<<<<<<
  9320. * and bool(os_environ.get('PYTHONASYNCIODEBUG'))))
  9321. *
  9322. */
  9323. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_debug); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 186, __pyx_L1_error)
  9324. __Pyx_GOTREF(__pyx_t_2);
  9325. /* "uvloop/loop.pyx":187
  9326. * def __init__(self):
  9327. * self.set_debug((not sys_ignore_environment
  9328. * and bool(os_environ.get('PYTHONASYNCIODEBUG')))) # <<<<<<<<<<<<<<
  9329. *
  9330. * def __dealloc__(self):
  9331. */
  9332. __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_6uvloop_4loop_sys_ignore_environment); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(2, 186, __pyx_L1_error)
  9333. /* "uvloop/loop.pyx":186
  9334. *
  9335. * def __init__(self):
  9336. * self.set_debug((not sys_ignore_environment # <<<<<<<<<<<<<<
  9337. * and bool(os_environ.get('PYTHONASYNCIODEBUG'))))
  9338. *
  9339. */
  9340. __pyx_t_5 = (!__pyx_t_4);
  9341. if (__pyx_t_5) {
  9342. } else {
  9343. __pyx_t_6 = __Pyx_PyBool_FromLong(__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 186, __pyx_L1_error)
  9344. __Pyx_GOTREF(__pyx_t_6);
  9345. __pyx_t_3 = __pyx_t_6;
  9346. __pyx_t_6 = 0;
  9347. goto __pyx_L3_bool_binop_done;
  9348. }
  9349. /* "uvloop/loop.pyx":187
  9350. * def __init__(self):
  9351. * self.set_debug((not sys_ignore_environment
  9352. * and bool(os_environ.get('PYTHONASYNCIODEBUG')))) # <<<<<<<<<<<<<<
  9353. *
  9354. * def __dealloc__(self):
  9355. */
  9356. __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_6uvloop_4loop_os_environ, __pyx_n_s_get); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 187, __pyx_L1_error)
  9357. __Pyx_GOTREF(__pyx_t_7);
  9358. __pyx_t_8 = NULL;
  9359. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
  9360. __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
  9361. if (likely(__pyx_t_8)) {
  9362. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
  9363. __Pyx_INCREF(__pyx_t_8);
  9364. __Pyx_INCREF(function);
  9365. __Pyx_DECREF_SET(__pyx_t_7, function);
  9366. }
  9367. }
  9368. __pyx_t_6 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_n_u_PYTHONASYNCIODEBUG) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_n_u_PYTHONASYNCIODEBUG);
  9369. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  9370. if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 187, __pyx_L1_error)
  9371. __Pyx_GOTREF(__pyx_t_6);
  9372. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  9373. __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(2, 187, __pyx_L1_error)
  9374. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  9375. __pyx_t_6 = __Pyx_PyBool_FromLong((!(!__pyx_t_5))); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 187, __pyx_L1_error)
  9376. __Pyx_GOTREF(__pyx_t_6);
  9377. __Pyx_INCREF(__pyx_t_6);
  9378. __pyx_t_3 = __pyx_t_6;
  9379. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  9380. __pyx_L3_bool_binop_done:;
  9381. __pyx_t_6 = NULL;
  9382. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
  9383. __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
  9384. if (likely(__pyx_t_6)) {
  9385. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  9386. __Pyx_INCREF(__pyx_t_6);
  9387. __Pyx_INCREF(function);
  9388. __Pyx_DECREF_SET(__pyx_t_2, function);
  9389. }
  9390. }
  9391. __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
  9392. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  9393. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  9394. if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 186, __pyx_L1_error)
  9395. __Pyx_GOTREF(__pyx_t_1);
  9396. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  9397. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  9398. /* "uvloop/loop.pyx":185
  9399. * self._servers = set()
  9400. *
  9401. * def __init__(self): # <<<<<<<<<<<<<<
  9402. * self.set_debug((not sys_ignore_environment
  9403. * and bool(os_environ.get('PYTHONASYNCIODEBUG'))))
  9404. */
  9405. /* function exit code */
  9406. __pyx_r = 0;
  9407. goto __pyx_L0;
  9408. __pyx_L1_error:;
  9409. __Pyx_XDECREF(__pyx_t_1);
  9410. __Pyx_XDECREF(__pyx_t_2);
  9411. __Pyx_XDECREF(__pyx_t_3);
  9412. __Pyx_XDECREF(__pyx_t_6);
  9413. __Pyx_XDECREF(__pyx_t_7);
  9414. __Pyx_XDECREF(__pyx_t_8);
  9415. __Pyx_AddTraceback("uvloop.loop.Loop.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  9416. __pyx_r = -1;
  9417. __pyx_L0:;
  9418. __Pyx_RefNannyFinishContext();
  9419. return __pyx_r;
  9420. }
  9421. /* "uvloop/loop.pyx":189
  9422. * and bool(os_environ.get('PYTHONASYNCIODEBUG'))))
  9423. *
  9424. * def __dealloc__(self): # <<<<<<<<<<<<<<
  9425. * if self._running == 1:
  9426. * raise RuntimeError('deallocating a running event loop!')
  9427. */
  9428. /* Python wrapper */
  9429. static void __pyx_pw_6uvloop_4loop_4Loop_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
  9430. static void __pyx_pw_6uvloop_4loop_4Loop_5__dealloc__(PyObject *__pyx_v_self) {
  9431. __Pyx_RefNannyDeclarations
  9432. __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  9433. __pyx_pf_6uvloop_4loop_4Loop_4__dealloc__(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self));
  9434. /* function exit code */
  9435. __Pyx_RefNannyFinishContext();
  9436. }
  9437. static void __pyx_pf_6uvloop_4loop_4Loop_4__dealloc__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) {
  9438. __Pyx_RefNannyDeclarations
  9439. int __pyx_t_1;
  9440. PyObject *__pyx_t_2 = NULL;
  9441. PyObject *__pyx_t_3 = NULL;
  9442. PyObject *__pyx_t_4 = NULL;
  9443. __Pyx_RefNannySetupContext("__dealloc__", 0);
  9444. /* "uvloop/loop.pyx":190
  9445. *
  9446. * def __dealloc__(self):
  9447. * if self._running == 1: # <<<<<<<<<<<<<<
  9448. * raise RuntimeError('deallocating a running event loop!')
  9449. * if self._closed == 0:
  9450. */
  9451. __pyx_t_1 = ((__pyx_v_self->_running == 1) != 0);
  9452. if (unlikely(__pyx_t_1)) {
  9453. /* "uvloop/loop.pyx":191
  9454. * def __dealloc__(self):
  9455. * if self._running == 1:
  9456. * raise RuntimeError('deallocating a running event loop!') # <<<<<<<<<<<<<<
  9457. * if self._closed == 0:
  9458. * aio_logger.error("deallocating an open event loop")
  9459. */
  9460. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 191, __pyx_L1_error)
  9461. __Pyx_GOTREF(__pyx_t_2);
  9462. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  9463. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  9464. __PYX_ERR(2, 191, __pyx_L1_error)
  9465. /* "uvloop/loop.pyx":190
  9466. *
  9467. * def __dealloc__(self):
  9468. * if self._running == 1: # <<<<<<<<<<<<<<
  9469. * raise RuntimeError('deallocating a running event loop!')
  9470. * if self._closed == 0:
  9471. */
  9472. }
  9473. /* "uvloop/loop.pyx":192
  9474. * if self._running == 1:
  9475. * raise RuntimeError('deallocating a running event loop!')
  9476. * if self._closed == 0: # <<<<<<<<<<<<<<
  9477. * aio_logger.error("deallocating an open event loop")
  9478. * return
  9479. */
  9480. __pyx_t_1 = ((__pyx_v_self->_closed == 0) != 0);
  9481. if (__pyx_t_1) {
  9482. /* "uvloop/loop.pyx":193
  9483. * raise RuntimeError('deallocating a running event loop!')
  9484. * if self._closed == 0:
  9485. * aio_logger.error("deallocating an open event loop") # <<<<<<<<<<<<<<
  9486. * return
  9487. * PyMem_RawFree(self.uvloop)
  9488. */
  9489. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_6uvloop_4loop_aio_logger, __pyx_n_s_error); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 193, __pyx_L1_error)
  9490. __Pyx_GOTREF(__pyx_t_3);
  9491. __pyx_t_4 = NULL;
  9492. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
  9493. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
  9494. if (likely(__pyx_t_4)) {
  9495. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  9496. __Pyx_INCREF(__pyx_t_4);
  9497. __Pyx_INCREF(function);
  9498. __Pyx_DECREF_SET(__pyx_t_3, function);
  9499. }
  9500. }
  9501. __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_kp_u_deallocating_an_open_event_loop) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_u_deallocating_an_open_event_loop);
  9502. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  9503. if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 193, __pyx_L1_error)
  9504. __Pyx_GOTREF(__pyx_t_2);
  9505. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  9506. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  9507. /* "uvloop/loop.pyx":194
  9508. * if self._closed == 0:
  9509. * aio_logger.error("deallocating an open event loop")
  9510. * return # <<<<<<<<<<<<<<
  9511. * PyMem_RawFree(self.uvloop)
  9512. * self.uvloop = NULL
  9513. */
  9514. goto __pyx_L0;
  9515. /* "uvloop/loop.pyx":192
  9516. * if self._running == 1:
  9517. * raise RuntimeError('deallocating a running event loop!')
  9518. * if self._closed == 0: # <<<<<<<<<<<<<<
  9519. * aio_logger.error("deallocating an open event loop")
  9520. * return
  9521. */
  9522. }
  9523. /* "uvloop/loop.pyx":195
  9524. * aio_logger.error("deallocating an open event loop")
  9525. * return
  9526. * PyMem_RawFree(self.uvloop) # <<<<<<<<<<<<<<
  9527. * self.uvloop = NULL
  9528. *
  9529. */
  9530. PyMem_RawFree(__pyx_v_self->uvloop);
  9531. /* "uvloop/loop.pyx":196
  9532. * return
  9533. * PyMem_RawFree(self.uvloop)
  9534. * self.uvloop = NULL # <<<<<<<<<<<<<<
  9535. *
  9536. * cdef _init_debug_fields(self):
  9537. */
  9538. __pyx_v_self->uvloop = NULL;
  9539. /* "uvloop/loop.pyx":189
  9540. * and bool(os_environ.get('PYTHONASYNCIODEBUG'))))
  9541. *
  9542. * def __dealloc__(self): # <<<<<<<<<<<<<<
  9543. * if self._running == 1:
  9544. * raise RuntimeError('deallocating a running event loop!')
  9545. */
  9546. /* function exit code */
  9547. goto __pyx_L0;
  9548. __pyx_L1_error:;
  9549. __Pyx_XDECREF(__pyx_t_2);
  9550. __Pyx_XDECREF(__pyx_t_3);
  9551. __Pyx_XDECREF(__pyx_t_4);
  9552. __Pyx_WriteUnraisable("uvloop.loop.Loop.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  9553. __pyx_L0:;
  9554. __Pyx_RefNannyFinishContext();
  9555. }
  9556. /* "uvloop/loop.pyx":198
  9557. * self.uvloop = NULL
  9558. *
  9559. * cdef _init_debug_fields(self): # <<<<<<<<<<<<<<
  9560. * self._debug_cc = bool(UVLOOP_DEBUG)
  9561. *
  9562. */
  9563. static PyObject *__pyx_f_6uvloop_4loop_4Loop__init_debug_fields(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) {
  9564. PyObject *__pyx_r = NULL;
  9565. __Pyx_RefNannyDeclarations
  9566. PyObject *__pyx_t_1 = NULL;
  9567. int __pyx_t_2;
  9568. PyObject *__pyx_t_3 = NULL;
  9569. PyObject *__pyx_t_4 = NULL;
  9570. __Pyx_RefNannySetupContext("_init_debug_fields", 0);
  9571. /* "uvloop/loop.pyx":199
  9572. *
  9573. * cdef _init_debug_fields(self):
  9574. * self._debug_cc = bool(UVLOOP_DEBUG) # <<<<<<<<<<<<<<
  9575. *
  9576. * if UVLOOP_DEBUG:
  9577. */
  9578. __pyx_t_1 = __Pyx_PyInt_From_int(UVLOOP_DEBUG); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 199, __pyx_L1_error)
  9579. __Pyx_GOTREF(__pyx_t_1);
  9580. __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(2, 199, __pyx_L1_error)
  9581. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  9582. __pyx_v_self->_debug_cc = (!(!__pyx_t_2));
  9583. /* "uvloop/loop.pyx":201
  9584. * self._debug_cc = bool(UVLOOP_DEBUG)
  9585. *
  9586. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  9587. * self._debug_handles_current = col_Counter()
  9588. * self._debug_handles_closed = col_Counter()
  9589. */
  9590. __pyx_t_2 = (UVLOOP_DEBUG != 0);
  9591. if (__pyx_t_2) {
  9592. /* "uvloop/loop.pyx":202
  9593. *
  9594. * if UVLOOP_DEBUG:
  9595. * self._debug_handles_current = col_Counter() # <<<<<<<<<<<<<<
  9596. * self._debug_handles_closed = col_Counter()
  9597. * self._debug_handles_total = col_Counter()
  9598. */
  9599. __Pyx_INCREF(__pyx_v_6uvloop_4loop_col_Counter);
  9600. __pyx_t_3 = __pyx_v_6uvloop_4loop_col_Counter; __pyx_t_4 = NULL;
  9601. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
  9602. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
  9603. if (likely(__pyx_t_4)) {
  9604. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  9605. __Pyx_INCREF(__pyx_t_4);
  9606. __Pyx_INCREF(function);
  9607. __Pyx_DECREF_SET(__pyx_t_3, function);
  9608. }
  9609. }
  9610. __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
  9611. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  9612. if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 202, __pyx_L1_error)
  9613. __Pyx_GOTREF(__pyx_t_1);
  9614. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  9615. __Pyx_GIVEREF(__pyx_t_1);
  9616. __Pyx_GOTREF(__pyx_v_self->_debug_handles_current);
  9617. __Pyx_DECREF(__pyx_v_self->_debug_handles_current);
  9618. __pyx_v_self->_debug_handles_current = __pyx_t_1;
  9619. __pyx_t_1 = 0;
  9620. /* "uvloop/loop.pyx":203
  9621. * if UVLOOP_DEBUG:
  9622. * self._debug_handles_current = col_Counter()
  9623. * self._debug_handles_closed = col_Counter() # <<<<<<<<<<<<<<
  9624. * self._debug_handles_total = col_Counter()
  9625. * else:
  9626. */
  9627. __Pyx_INCREF(__pyx_v_6uvloop_4loop_col_Counter);
  9628. __pyx_t_3 = __pyx_v_6uvloop_4loop_col_Counter; __pyx_t_4 = NULL;
  9629. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
  9630. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
  9631. if (likely(__pyx_t_4)) {
  9632. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  9633. __Pyx_INCREF(__pyx_t_4);
  9634. __Pyx_INCREF(function);
  9635. __Pyx_DECREF_SET(__pyx_t_3, function);
  9636. }
  9637. }
  9638. __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
  9639. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  9640. if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 203, __pyx_L1_error)
  9641. __Pyx_GOTREF(__pyx_t_1);
  9642. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  9643. __Pyx_GIVEREF(__pyx_t_1);
  9644. __Pyx_GOTREF(__pyx_v_self->_debug_handles_closed);
  9645. __Pyx_DECREF(__pyx_v_self->_debug_handles_closed);
  9646. __pyx_v_self->_debug_handles_closed = __pyx_t_1;
  9647. __pyx_t_1 = 0;
  9648. /* "uvloop/loop.pyx":204
  9649. * self._debug_handles_current = col_Counter()
  9650. * self._debug_handles_closed = col_Counter()
  9651. * self._debug_handles_total = col_Counter() # <<<<<<<<<<<<<<
  9652. * else:
  9653. * self._debug_handles_current = None
  9654. */
  9655. __Pyx_INCREF(__pyx_v_6uvloop_4loop_col_Counter);
  9656. __pyx_t_3 = __pyx_v_6uvloop_4loop_col_Counter; __pyx_t_4 = NULL;
  9657. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
  9658. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
  9659. if (likely(__pyx_t_4)) {
  9660. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  9661. __Pyx_INCREF(__pyx_t_4);
  9662. __Pyx_INCREF(function);
  9663. __Pyx_DECREF_SET(__pyx_t_3, function);
  9664. }
  9665. }
  9666. __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
  9667. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  9668. if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 204, __pyx_L1_error)
  9669. __Pyx_GOTREF(__pyx_t_1);
  9670. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  9671. __Pyx_GIVEREF(__pyx_t_1);
  9672. __Pyx_GOTREF(__pyx_v_self->_debug_handles_total);
  9673. __Pyx_DECREF(__pyx_v_self->_debug_handles_total);
  9674. __pyx_v_self->_debug_handles_total = __pyx_t_1;
  9675. __pyx_t_1 = 0;
  9676. /* "uvloop/loop.pyx":201
  9677. * self._debug_cc = bool(UVLOOP_DEBUG)
  9678. *
  9679. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  9680. * self._debug_handles_current = col_Counter()
  9681. * self._debug_handles_closed = col_Counter()
  9682. */
  9683. goto __pyx_L3;
  9684. }
  9685. /* "uvloop/loop.pyx":206
  9686. * self._debug_handles_total = col_Counter()
  9687. * else:
  9688. * self._debug_handles_current = None # <<<<<<<<<<<<<<
  9689. * self._debug_handles_closed = None
  9690. * self._debug_handles_total = None
  9691. */
  9692. /*else*/ {
  9693. __Pyx_INCREF(Py_None);
  9694. __Pyx_GIVEREF(Py_None);
  9695. __Pyx_GOTREF(__pyx_v_self->_debug_handles_current);
  9696. __Pyx_DECREF(__pyx_v_self->_debug_handles_current);
  9697. __pyx_v_self->_debug_handles_current = Py_None;
  9698. /* "uvloop/loop.pyx":207
  9699. * else:
  9700. * self._debug_handles_current = None
  9701. * self._debug_handles_closed = None # <<<<<<<<<<<<<<
  9702. * self._debug_handles_total = None
  9703. *
  9704. */
  9705. __Pyx_INCREF(Py_None);
  9706. __Pyx_GIVEREF(Py_None);
  9707. __Pyx_GOTREF(__pyx_v_self->_debug_handles_closed);
  9708. __Pyx_DECREF(__pyx_v_self->_debug_handles_closed);
  9709. __pyx_v_self->_debug_handles_closed = Py_None;
  9710. /* "uvloop/loop.pyx":208
  9711. * self._debug_handles_current = None
  9712. * self._debug_handles_closed = None
  9713. * self._debug_handles_total = None # <<<<<<<<<<<<<<
  9714. *
  9715. * self._debug_uv_handles_total = 0
  9716. */
  9717. __Pyx_INCREF(Py_None);
  9718. __Pyx_GIVEREF(Py_None);
  9719. __Pyx_GOTREF(__pyx_v_self->_debug_handles_total);
  9720. __Pyx_DECREF(__pyx_v_self->_debug_handles_total);
  9721. __pyx_v_self->_debug_handles_total = Py_None;
  9722. }
  9723. __pyx_L3:;
  9724. /* "uvloop/loop.pyx":210
  9725. * self._debug_handles_total = None
  9726. *
  9727. * self._debug_uv_handles_total = 0 # <<<<<<<<<<<<<<
  9728. * self._debug_uv_handles_freed = 0
  9729. *
  9730. */
  9731. __pyx_v_self->_debug_uv_handles_total = 0;
  9732. /* "uvloop/loop.pyx":211
  9733. *
  9734. * self._debug_uv_handles_total = 0
  9735. * self._debug_uv_handles_freed = 0 # <<<<<<<<<<<<<<
  9736. *
  9737. * self._debug_stream_read_cb_total = 0
  9738. */
  9739. __pyx_v_self->_debug_uv_handles_freed = 0;
  9740. /* "uvloop/loop.pyx":213
  9741. * self._debug_uv_handles_freed = 0
  9742. *
  9743. * self._debug_stream_read_cb_total = 0 # <<<<<<<<<<<<<<
  9744. * self._debug_stream_read_eof_total = 0
  9745. * self._debug_stream_read_errors_total = 0
  9746. */
  9747. __pyx_v_self->_debug_stream_read_cb_total = 0;
  9748. /* "uvloop/loop.pyx":214
  9749. *
  9750. * self._debug_stream_read_cb_total = 0
  9751. * self._debug_stream_read_eof_total = 0 # <<<<<<<<<<<<<<
  9752. * self._debug_stream_read_errors_total = 0
  9753. * self._debug_stream_read_cb_errors_total = 0
  9754. */
  9755. __pyx_v_self->_debug_stream_read_eof_total = 0;
  9756. /* "uvloop/loop.pyx":215
  9757. * self._debug_stream_read_cb_total = 0
  9758. * self._debug_stream_read_eof_total = 0
  9759. * self._debug_stream_read_errors_total = 0 # <<<<<<<<<<<<<<
  9760. * self._debug_stream_read_cb_errors_total = 0
  9761. * self._debug_stream_read_eof_cb_errors_total = 0
  9762. */
  9763. __pyx_v_self->_debug_stream_read_errors_total = 0;
  9764. /* "uvloop/loop.pyx":216
  9765. * self._debug_stream_read_eof_total = 0
  9766. * self._debug_stream_read_errors_total = 0
  9767. * self._debug_stream_read_cb_errors_total = 0 # <<<<<<<<<<<<<<
  9768. * self._debug_stream_read_eof_cb_errors_total = 0
  9769. *
  9770. */
  9771. __pyx_v_self->_debug_stream_read_cb_errors_total = 0;
  9772. /* "uvloop/loop.pyx":217
  9773. * self._debug_stream_read_errors_total = 0
  9774. * self._debug_stream_read_cb_errors_total = 0
  9775. * self._debug_stream_read_eof_cb_errors_total = 0 # <<<<<<<<<<<<<<
  9776. *
  9777. * self._debug_stream_shutdown_errors_total = 0
  9778. */
  9779. __pyx_v_self->_debug_stream_read_eof_cb_errors_total = 0;
  9780. /* "uvloop/loop.pyx":219
  9781. * self._debug_stream_read_eof_cb_errors_total = 0
  9782. *
  9783. * self._debug_stream_shutdown_errors_total = 0 # <<<<<<<<<<<<<<
  9784. * self._debug_stream_listen_errors_total = 0
  9785. *
  9786. */
  9787. __pyx_v_self->_debug_stream_shutdown_errors_total = 0;
  9788. /* "uvloop/loop.pyx":220
  9789. *
  9790. * self._debug_stream_shutdown_errors_total = 0
  9791. * self._debug_stream_listen_errors_total = 0 # <<<<<<<<<<<<<<
  9792. *
  9793. * self._debug_stream_write_tries = 0
  9794. */
  9795. __pyx_v_self->_debug_stream_listen_errors_total = 0;
  9796. /* "uvloop/loop.pyx":222
  9797. * self._debug_stream_listen_errors_total = 0
  9798. *
  9799. * self._debug_stream_write_tries = 0 # <<<<<<<<<<<<<<
  9800. * self._debug_stream_write_errors_total = 0
  9801. * self._debug_stream_write_ctx_total = 0
  9802. */
  9803. __pyx_v_self->_debug_stream_write_tries = 0;
  9804. /* "uvloop/loop.pyx":223
  9805. *
  9806. * self._debug_stream_write_tries = 0
  9807. * self._debug_stream_write_errors_total = 0 # <<<<<<<<<<<<<<
  9808. * self._debug_stream_write_ctx_total = 0
  9809. * self._debug_stream_write_ctx_cnt = 0
  9810. */
  9811. __pyx_v_self->_debug_stream_write_errors_total = 0;
  9812. /* "uvloop/loop.pyx":224
  9813. * self._debug_stream_write_tries = 0
  9814. * self._debug_stream_write_errors_total = 0
  9815. * self._debug_stream_write_ctx_total = 0 # <<<<<<<<<<<<<<
  9816. * self._debug_stream_write_ctx_cnt = 0
  9817. * self._debug_stream_write_cb_errors_total = 0
  9818. */
  9819. __pyx_v_self->_debug_stream_write_ctx_total = 0;
  9820. /* "uvloop/loop.pyx":225
  9821. * self._debug_stream_write_errors_total = 0
  9822. * self._debug_stream_write_ctx_total = 0
  9823. * self._debug_stream_write_ctx_cnt = 0 # <<<<<<<<<<<<<<
  9824. * self._debug_stream_write_cb_errors_total = 0
  9825. *
  9826. */
  9827. __pyx_v_self->_debug_stream_write_ctx_cnt = 0;
  9828. /* "uvloop/loop.pyx":226
  9829. * self._debug_stream_write_ctx_total = 0
  9830. * self._debug_stream_write_ctx_cnt = 0
  9831. * self._debug_stream_write_cb_errors_total = 0 # <<<<<<<<<<<<<<
  9832. *
  9833. * self._debug_cb_handles_total = 0
  9834. */
  9835. __pyx_v_self->_debug_stream_write_cb_errors_total = 0;
  9836. /* "uvloop/loop.pyx":228
  9837. * self._debug_stream_write_cb_errors_total = 0
  9838. *
  9839. * self._debug_cb_handles_total = 0 # <<<<<<<<<<<<<<
  9840. * self._debug_cb_handles_count = 0
  9841. *
  9842. */
  9843. __pyx_v_self->_debug_cb_handles_total = 0;
  9844. /* "uvloop/loop.pyx":229
  9845. *
  9846. * self._debug_cb_handles_total = 0
  9847. * self._debug_cb_handles_count = 0 # <<<<<<<<<<<<<<
  9848. *
  9849. * self._debug_cb_timer_handles_total = 0
  9850. */
  9851. __pyx_v_self->_debug_cb_handles_count = 0;
  9852. /* "uvloop/loop.pyx":231
  9853. * self._debug_cb_handles_count = 0
  9854. *
  9855. * self._debug_cb_timer_handles_total = 0 # <<<<<<<<<<<<<<
  9856. * self._debug_cb_timer_handles_count = 0
  9857. *
  9858. */
  9859. __pyx_v_self->_debug_cb_timer_handles_total = 0;
  9860. /* "uvloop/loop.pyx":232
  9861. *
  9862. * self._debug_cb_timer_handles_total = 0
  9863. * self._debug_cb_timer_handles_count = 0 # <<<<<<<<<<<<<<
  9864. *
  9865. * self._poll_read_events_total = 0
  9866. */
  9867. __pyx_v_self->_debug_cb_timer_handles_count = 0;
  9868. /* "uvloop/loop.pyx":234
  9869. * self._debug_cb_timer_handles_count = 0
  9870. *
  9871. * self._poll_read_events_total = 0 # <<<<<<<<<<<<<<
  9872. * self._poll_read_cb_errors_total = 0
  9873. * self._poll_write_events_total = 0
  9874. */
  9875. __pyx_v_self->_poll_read_events_total = 0;
  9876. /* "uvloop/loop.pyx":235
  9877. *
  9878. * self._poll_read_events_total = 0
  9879. * self._poll_read_cb_errors_total = 0 # <<<<<<<<<<<<<<
  9880. * self._poll_write_events_total = 0
  9881. * self._poll_write_cb_errors_total = 0
  9882. */
  9883. __pyx_v_self->_poll_read_cb_errors_total = 0;
  9884. /* "uvloop/loop.pyx":236
  9885. * self._poll_read_events_total = 0
  9886. * self._poll_read_cb_errors_total = 0
  9887. * self._poll_write_events_total = 0 # <<<<<<<<<<<<<<
  9888. * self._poll_write_cb_errors_total = 0
  9889. *
  9890. */
  9891. __pyx_v_self->_poll_write_events_total = 0;
  9892. /* "uvloop/loop.pyx":237
  9893. * self._poll_read_cb_errors_total = 0
  9894. * self._poll_write_events_total = 0
  9895. * self._poll_write_cb_errors_total = 0 # <<<<<<<<<<<<<<
  9896. *
  9897. * self._sock_try_write_total = 0
  9898. */
  9899. __pyx_v_self->_poll_write_cb_errors_total = 0;
  9900. /* "uvloop/loop.pyx":239
  9901. * self._poll_write_cb_errors_total = 0
  9902. *
  9903. * self._sock_try_write_total = 0 # <<<<<<<<<<<<<<
  9904. *
  9905. * self._debug_exception_handler_cnt = 0
  9906. */
  9907. __pyx_v_self->_sock_try_write_total = 0;
  9908. /* "uvloop/loop.pyx":241
  9909. * self._sock_try_write_total = 0
  9910. *
  9911. * self._debug_exception_handler_cnt = 0 # <<<<<<<<<<<<<<
  9912. *
  9913. * cdef _setup_signals(self):
  9914. */
  9915. __pyx_v_self->_debug_exception_handler_cnt = 0;
  9916. /* "uvloop/loop.pyx":198
  9917. * self.uvloop = NULL
  9918. *
  9919. * cdef _init_debug_fields(self): # <<<<<<<<<<<<<<
  9920. * self._debug_cc = bool(UVLOOP_DEBUG)
  9921. *
  9922. */
  9923. /* function exit code */
  9924. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  9925. goto __pyx_L0;
  9926. __pyx_L1_error:;
  9927. __Pyx_XDECREF(__pyx_t_1);
  9928. __Pyx_XDECREF(__pyx_t_3);
  9929. __Pyx_XDECREF(__pyx_t_4);
  9930. __Pyx_AddTraceback("uvloop.loop.Loop._init_debug_fields", __pyx_clineno, __pyx_lineno, __pyx_filename);
  9931. __pyx_r = 0;
  9932. __pyx_L0:;
  9933. __Pyx_XGIVEREF(__pyx_r);
  9934. __Pyx_RefNannyFinishContext();
  9935. return __pyx_r;
  9936. }
  9937. /* "uvloop/loop.pyx":243
  9938. * self._debug_exception_handler_cnt = 0
  9939. *
  9940. * cdef _setup_signals(self): # <<<<<<<<<<<<<<
  9941. * if self._listening_signals:
  9942. * return
  9943. */
  9944. static PyObject *__pyx_f_6uvloop_4loop_4Loop__setup_signals(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) {
  9945. PyObject *__pyx_r = NULL;
  9946. __Pyx_RefNannyDeclarations
  9947. int __pyx_t_1;
  9948. PyObject *__pyx_t_2 = NULL;
  9949. PyObject *__pyx_t_3 = NULL;
  9950. PyObject *__pyx_t_4 = NULL;
  9951. PyObject *__pyx_t_5 = NULL;
  9952. PyObject *(*__pyx_t_6)(PyObject *);
  9953. PyObject *__pyx_t_7 = NULL;
  9954. PyObject *__pyx_t_8 = NULL;
  9955. PyObject *__pyx_t_9 = NULL;
  9956. int __pyx_t_10;
  9957. PyObject *__pyx_t_11 = NULL;
  9958. PyObject *__pyx_t_12 = NULL;
  9959. __Pyx_RefNannySetupContext("_setup_signals", 0);
  9960. /* "uvloop/loop.pyx":244
  9961. *
  9962. * cdef _setup_signals(self):
  9963. * if self._listening_signals: # <<<<<<<<<<<<<<
  9964. * return
  9965. *
  9966. */
  9967. __pyx_t_1 = (__pyx_v_self->_listening_signals != 0);
  9968. if (__pyx_t_1) {
  9969. /* "uvloop/loop.pyx":245
  9970. * cdef _setup_signals(self):
  9971. * if self._listening_signals:
  9972. * return # <<<<<<<<<<<<<<
  9973. *
  9974. * self._ssock, self._csock = socket_socketpair()
  9975. */
  9976. __Pyx_XDECREF(__pyx_r);
  9977. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  9978. goto __pyx_L0;
  9979. /* "uvloop/loop.pyx":244
  9980. *
  9981. * cdef _setup_signals(self):
  9982. * if self._listening_signals: # <<<<<<<<<<<<<<
  9983. * return
  9984. *
  9985. */
  9986. }
  9987. /* "uvloop/loop.pyx":247
  9988. * return
  9989. *
  9990. * self._ssock, self._csock = socket_socketpair() # <<<<<<<<<<<<<<
  9991. * self._ssock.setblocking(False)
  9992. * self._csock.setblocking(False)
  9993. */
  9994. __Pyx_INCREF(__pyx_v_6uvloop_4loop_socket_socketpair);
  9995. __pyx_t_3 = __pyx_v_6uvloop_4loop_socket_socketpair; __pyx_t_4 = NULL;
  9996. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
  9997. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
  9998. if (likely(__pyx_t_4)) {
  9999. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  10000. __Pyx_INCREF(__pyx_t_4);
  10001. __Pyx_INCREF(function);
  10002. __Pyx_DECREF_SET(__pyx_t_3, function);
  10003. }
  10004. }
  10005. __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
  10006. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  10007. if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 247, __pyx_L1_error)
  10008. __Pyx_GOTREF(__pyx_t_2);
  10009. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  10010. if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
  10011. PyObject* sequence = __pyx_t_2;
  10012. Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
  10013. if (unlikely(size != 2)) {
  10014. if (size > 2) __Pyx_RaiseTooManyValuesError(2);
  10015. else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
  10016. __PYX_ERR(2, 247, __pyx_L1_error)
  10017. }
  10018. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  10019. if (likely(PyTuple_CheckExact(sequence))) {
  10020. __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0);
  10021. __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1);
  10022. } else {
  10023. __pyx_t_3 = PyList_GET_ITEM(sequence, 0);
  10024. __pyx_t_4 = PyList_GET_ITEM(sequence, 1);
  10025. }
  10026. __Pyx_INCREF(__pyx_t_3);
  10027. __Pyx_INCREF(__pyx_t_4);
  10028. #else
  10029. __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 247, __pyx_L1_error)
  10030. __Pyx_GOTREF(__pyx_t_3);
  10031. __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 247, __pyx_L1_error)
  10032. __Pyx_GOTREF(__pyx_t_4);
  10033. #endif
  10034. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  10035. } else {
  10036. Py_ssize_t index = -1;
  10037. __pyx_t_5 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 247, __pyx_L1_error)
  10038. __Pyx_GOTREF(__pyx_t_5);
  10039. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  10040. __pyx_t_6 = Py_TYPE(__pyx_t_5)->tp_iternext;
  10041. index = 0; __pyx_t_3 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_3)) goto __pyx_L4_unpacking_failed;
  10042. __Pyx_GOTREF(__pyx_t_3);
  10043. index = 1; __pyx_t_4 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L4_unpacking_failed;
  10044. __Pyx_GOTREF(__pyx_t_4);
  10045. if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 2) < 0) __PYX_ERR(2, 247, __pyx_L1_error)
  10046. __pyx_t_6 = NULL;
  10047. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  10048. goto __pyx_L5_unpacking_done;
  10049. __pyx_L4_unpacking_failed:;
  10050. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  10051. __pyx_t_6 = NULL;
  10052. if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
  10053. __PYX_ERR(2, 247, __pyx_L1_error)
  10054. __pyx_L5_unpacking_done:;
  10055. }
  10056. __Pyx_GIVEREF(__pyx_t_3);
  10057. __Pyx_GOTREF(__pyx_v_self->_ssock);
  10058. __Pyx_DECREF(__pyx_v_self->_ssock);
  10059. __pyx_v_self->_ssock = __pyx_t_3;
  10060. __pyx_t_3 = 0;
  10061. __Pyx_GIVEREF(__pyx_t_4);
  10062. __Pyx_GOTREF(__pyx_v_self->_csock);
  10063. __Pyx_DECREF(__pyx_v_self->_csock);
  10064. __pyx_v_self->_csock = __pyx_t_4;
  10065. __pyx_t_4 = 0;
  10066. /* "uvloop/loop.pyx":248
  10067. *
  10068. * self._ssock, self._csock = socket_socketpair()
  10069. * self._ssock.setblocking(False) # <<<<<<<<<<<<<<
  10070. * self._csock.setblocking(False)
  10071. * try:
  10072. */
  10073. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_ssock, __pyx_n_s_setblocking); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 248, __pyx_L1_error)
  10074. __Pyx_GOTREF(__pyx_t_4);
  10075. __pyx_t_3 = NULL;
  10076. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
  10077. __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
  10078. if (likely(__pyx_t_3)) {
  10079. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  10080. __Pyx_INCREF(__pyx_t_3);
  10081. __Pyx_INCREF(function);
  10082. __Pyx_DECREF_SET(__pyx_t_4, function);
  10083. }
  10084. }
  10085. __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_3, Py_False) : __Pyx_PyObject_CallOneArg(__pyx_t_4, Py_False);
  10086. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  10087. if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 248, __pyx_L1_error)
  10088. __Pyx_GOTREF(__pyx_t_2);
  10089. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  10090. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  10091. /* "uvloop/loop.pyx":249
  10092. * self._ssock, self._csock = socket_socketpair()
  10093. * self._ssock.setblocking(False)
  10094. * self._csock.setblocking(False) # <<<<<<<<<<<<<<
  10095. * try:
  10096. * _set_signal_wakeup_fd(self._csock.fileno())
  10097. */
  10098. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_csock, __pyx_n_s_setblocking); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 249, __pyx_L1_error)
  10099. __Pyx_GOTREF(__pyx_t_4);
  10100. __pyx_t_3 = NULL;
  10101. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
  10102. __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
  10103. if (likely(__pyx_t_3)) {
  10104. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  10105. __Pyx_INCREF(__pyx_t_3);
  10106. __Pyx_INCREF(function);
  10107. __Pyx_DECREF_SET(__pyx_t_4, function);
  10108. }
  10109. }
  10110. __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_3, Py_False) : __Pyx_PyObject_CallOneArg(__pyx_t_4, Py_False);
  10111. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  10112. if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 249, __pyx_L1_error)
  10113. __Pyx_GOTREF(__pyx_t_2);
  10114. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  10115. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  10116. /* "uvloop/loop.pyx":250
  10117. * self._ssock.setblocking(False)
  10118. * self._csock.setblocking(False)
  10119. * try: # <<<<<<<<<<<<<<
  10120. * _set_signal_wakeup_fd(self._csock.fileno())
  10121. * except (OSError, ValueError):
  10122. */
  10123. {
  10124. __Pyx_PyThreadState_declare
  10125. __Pyx_PyThreadState_assign
  10126. __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
  10127. __Pyx_XGOTREF(__pyx_t_7);
  10128. __Pyx_XGOTREF(__pyx_t_8);
  10129. __Pyx_XGOTREF(__pyx_t_9);
  10130. /*try:*/ {
  10131. /* "uvloop/loop.pyx":251
  10132. * self._csock.setblocking(False)
  10133. * try:
  10134. * _set_signal_wakeup_fd(self._csock.fileno()) # <<<<<<<<<<<<<<
  10135. * except (OSError, ValueError):
  10136. * # Not the main thread
  10137. */
  10138. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_csock, __pyx_n_s_fileno); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 251, __pyx_L6_error)
  10139. __Pyx_GOTREF(__pyx_t_4);
  10140. __pyx_t_3 = NULL;
  10141. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
  10142. __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
  10143. if (likely(__pyx_t_3)) {
  10144. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  10145. __Pyx_INCREF(__pyx_t_3);
  10146. __Pyx_INCREF(function);
  10147. __Pyx_DECREF_SET(__pyx_t_4, function);
  10148. }
  10149. }
  10150. __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
  10151. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  10152. if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 251, __pyx_L6_error)
  10153. __Pyx_GOTREF(__pyx_t_2);
  10154. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  10155. __pyx_t_4 = __pyx_f_6uvloop_4loop__set_signal_wakeup_fd(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 251, __pyx_L6_error)
  10156. __Pyx_GOTREF(__pyx_t_4);
  10157. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  10158. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  10159. /* "uvloop/loop.pyx":250
  10160. * self._ssock.setblocking(False)
  10161. * self._csock.setblocking(False)
  10162. * try: # <<<<<<<<<<<<<<
  10163. * _set_signal_wakeup_fd(self._csock.fileno())
  10164. * except (OSError, ValueError):
  10165. */
  10166. }
  10167. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  10168. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  10169. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  10170. goto __pyx_L11_try_end;
  10171. __pyx_L6_error:;
  10172. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  10173. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  10174. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  10175. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  10176. /* "uvloop/loop.pyx":252
  10177. * try:
  10178. * _set_signal_wakeup_fd(self._csock.fileno())
  10179. * except (OSError, ValueError): # <<<<<<<<<<<<<<
  10180. * # Not the main thread
  10181. * self._ssock.close()
  10182. */
  10183. __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_OSError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError);
  10184. if (__pyx_t_10) {
  10185. __Pyx_AddTraceback("uvloop.loop.Loop._setup_signals", __pyx_clineno, __pyx_lineno, __pyx_filename);
  10186. if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_2, &__pyx_t_3) < 0) __PYX_ERR(2, 252, __pyx_L8_except_error)
  10187. __Pyx_GOTREF(__pyx_t_4);
  10188. __Pyx_GOTREF(__pyx_t_2);
  10189. __Pyx_GOTREF(__pyx_t_3);
  10190. /* "uvloop/loop.pyx":254
  10191. * except (OSError, ValueError):
  10192. * # Not the main thread
  10193. * self._ssock.close() # <<<<<<<<<<<<<<
  10194. * self._csock.close()
  10195. * self._ssock = self._csock = None
  10196. */
  10197. __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_ssock, __pyx_n_s_close); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 254, __pyx_L8_except_error)
  10198. __Pyx_GOTREF(__pyx_t_11);
  10199. __pyx_t_12 = NULL;
  10200. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) {
  10201. __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_11);
  10202. if (likely(__pyx_t_12)) {
  10203. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
  10204. __Pyx_INCREF(__pyx_t_12);
  10205. __Pyx_INCREF(function);
  10206. __Pyx_DECREF_SET(__pyx_t_11, function);
  10207. }
  10208. }
  10209. __pyx_t_5 = (__pyx_t_12) ? __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_12) : __Pyx_PyObject_CallNoArg(__pyx_t_11);
  10210. __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
  10211. if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 254, __pyx_L8_except_error)
  10212. __Pyx_GOTREF(__pyx_t_5);
  10213. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  10214. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  10215. /* "uvloop/loop.pyx":255
  10216. * # Not the main thread
  10217. * self._ssock.close()
  10218. * self._csock.close() # <<<<<<<<<<<<<<
  10219. * self._ssock = self._csock = None
  10220. * return
  10221. */
  10222. __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_csock, __pyx_n_s_close); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 255, __pyx_L8_except_error)
  10223. __Pyx_GOTREF(__pyx_t_11);
  10224. __pyx_t_12 = NULL;
  10225. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) {
  10226. __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_11);
  10227. if (likely(__pyx_t_12)) {
  10228. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
  10229. __Pyx_INCREF(__pyx_t_12);
  10230. __Pyx_INCREF(function);
  10231. __Pyx_DECREF_SET(__pyx_t_11, function);
  10232. }
  10233. }
  10234. __pyx_t_5 = (__pyx_t_12) ? __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_12) : __Pyx_PyObject_CallNoArg(__pyx_t_11);
  10235. __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
  10236. if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 255, __pyx_L8_except_error)
  10237. __Pyx_GOTREF(__pyx_t_5);
  10238. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  10239. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  10240. /* "uvloop/loop.pyx":256
  10241. * self._ssock.close()
  10242. * self._csock.close()
  10243. * self._ssock = self._csock = None # <<<<<<<<<<<<<<
  10244. * return
  10245. *
  10246. */
  10247. __Pyx_INCREF(Py_None);
  10248. __Pyx_GIVEREF(Py_None);
  10249. __Pyx_GOTREF(__pyx_v_self->_ssock);
  10250. __Pyx_DECREF(__pyx_v_self->_ssock);
  10251. __pyx_v_self->_ssock = Py_None;
  10252. __Pyx_INCREF(Py_None);
  10253. __Pyx_GIVEREF(Py_None);
  10254. __Pyx_GOTREF(__pyx_v_self->_csock);
  10255. __Pyx_DECREF(__pyx_v_self->_csock);
  10256. __pyx_v_self->_csock = Py_None;
  10257. /* "uvloop/loop.pyx":257
  10258. * self._csock.close()
  10259. * self._ssock = self._csock = None
  10260. * return # <<<<<<<<<<<<<<
  10261. *
  10262. * self._listening_signals = True
  10263. */
  10264. __Pyx_XDECREF(__pyx_r);
  10265. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  10266. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  10267. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  10268. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  10269. goto __pyx_L9_except_return;
  10270. }
  10271. goto __pyx_L8_except_error;
  10272. __pyx_L8_except_error:;
  10273. /* "uvloop/loop.pyx":250
  10274. * self._ssock.setblocking(False)
  10275. * self._csock.setblocking(False)
  10276. * try: # <<<<<<<<<<<<<<
  10277. * _set_signal_wakeup_fd(self._csock.fileno())
  10278. * except (OSError, ValueError):
  10279. */
  10280. __Pyx_XGIVEREF(__pyx_t_7);
  10281. __Pyx_XGIVEREF(__pyx_t_8);
  10282. __Pyx_XGIVEREF(__pyx_t_9);
  10283. __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
  10284. goto __pyx_L1_error;
  10285. __pyx_L9_except_return:;
  10286. __Pyx_XGIVEREF(__pyx_t_7);
  10287. __Pyx_XGIVEREF(__pyx_t_8);
  10288. __Pyx_XGIVEREF(__pyx_t_9);
  10289. __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
  10290. goto __pyx_L0;
  10291. __pyx_L11_try_end:;
  10292. }
  10293. /* "uvloop/loop.pyx":259
  10294. * return
  10295. *
  10296. * self._listening_signals = True # <<<<<<<<<<<<<<
  10297. *
  10298. * cdef _recv_signals_start(self):
  10299. */
  10300. __pyx_v_self->_listening_signals = 1;
  10301. /* "uvloop/loop.pyx":243
  10302. * self._debug_exception_handler_cnt = 0
  10303. *
  10304. * cdef _setup_signals(self): # <<<<<<<<<<<<<<
  10305. * if self._listening_signals:
  10306. * return
  10307. */
  10308. /* function exit code */
  10309. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  10310. goto __pyx_L0;
  10311. __pyx_L1_error:;
  10312. __Pyx_XDECREF(__pyx_t_2);
  10313. __Pyx_XDECREF(__pyx_t_3);
  10314. __Pyx_XDECREF(__pyx_t_4);
  10315. __Pyx_XDECREF(__pyx_t_5);
  10316. __Pyx_XDECREF(__pyx_t_11);
  10317. __Pyx_XDECREF(__pyx_t_12);
  10318. __Pyx_AddTraceback("uvloop.loop.Loop._setup_signals", __pyx_clineno, __pyx_lineno, __pyx_filename);
  10319. __pyx_r = 0;
  10320. __pyx_L0:;
  10321. __Pyx_XGIVEREF(__pyx_r);
  10322. __Pyx_RefNannyFinishContext();
  10323. return __pyx_r;
  10324. }
  10325. /* "uvloop/loop.pyx":261
  10326. * self._listening_signals = True
  10327. *
  10328. * cdef _recv_signals_start(self): # <<<<<<<<<<<<<<
  10329. * if self._ssock is None:
  10330. * self._setup_signals()
  10331. */
  10332. static PyObject *__pyx_f_6uvloop_4loop_4Loop__recv_signals_start(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) {
  10333. PyObject *__pyx_r = NULL;
  10334. __Pyx_RefNannyDeclarations
  10335. int __pyx_t_1;
  10336. int __pyx_t_2;
  10337. PyObject *__pyx_t_3 = NULL;
  10338. PyObject *__pyx_t_4 = NULL;
  10339. PyObject *__pyx_t_5 = NULL;
  10340. __Pyx_RefNannySetupContext("_recv_signals_start", 0);
  10341. /* "uvloop/loop.pyx":262
  10342. *
  10343. * cdef _recv_signals_start(self):
  10344. * if self._ssock is None: # <<<<<<<<<<<<<<
  10345. * self._setup_signals()
  10346. * if self._ssock is None:
  10347. */
  10348. __pyx_t_1 = (__pyx_v_self->_ssock == Py_None);
  10349. __pyx_t_2 = (__pyx_t_1 != 0);
  10350. if (__pyx_t_2) {
  10351. /* "uvloop/loop.pyx":263
  10352. * cdef _recv_signals_start(self):
  10353. * if self._ssock is None:
  10354. * self._setup_signals() # <<<<<<<<<<<<<<
  10355. * if self._ssock is None:
  10356. * # Not the main thread.
  10357. */
  10358. __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_vtab)->_setup_signals(__pyx_v_self); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 263, __pyx_L1_error)
  10359. __Pyx_GOTREF(__pyx_t_3);
  10360. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  10361. /* "uvloop/loop.pyx":264
  10362. * if self._ssock is None:
  10363. * self._setup_signals()
  10364. * if self._ssock is None: # <<<<<<<<<<<<<<
  10365. * # Not the main thread.
  10366. * return
  10367. */
  10368. __pyx_t_2 = (__pyx_v_self->_ssock == Py_None);
  10369. __pyx_t_1 = (__pyx_t_2 != 0);
  10370. if (__pyx_t_1) {
  10371. /* "uvloop/loop.pyx":266
  10372. * if self._ssock is None:
  10373. * # Not the main thread.
  10374. * return # <<<<<<<<<<<<<<
  10375. *
  10376. * self._add_reader(
  10377. */
  10378. __Pyx_XDECREF(__pyx_r);
  10379. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  10380. goto __pyx_L0;
  10381. /* "uvloop/loop.pyx":264
  10382. * if self._ssock is None:
  10383. * self._setup_signals()
  10384. * if self._ssock is None: # <<<<<<<<<<<<<<
  10385. * # Not the main thread.
  10386. * return
  10387. */
  10388. }
  10389. /* "uvloop/loop.pyx":262
  10390. *
  10391. * cdef _recv_signals_start(self):
  10392. * if self._ssock is None: # <<<<<<<<<<<<<<
  10393. * self._setup_signals()
  10394. * if self._ssock is None:
  10395. */
  10396. }
  10397. /* "uvloop/loop.pyx":269
  10398. *
  10399. * self._add_reader(
  10400. * self._ssock, # <<<<<<<<<<<<<<
  10401. * new_MethodHandle(
  10402. * self,
  10403. */
  10404. __pyx_t_3 = __pyx_v_self->_ssock;
  10405. __Pyx_INCREF(__pyx_t_3);
  10406. /* "uvloop/loop.pyx":270
  10407. * self._add_reader(
  10408. * self._ssock,
  10409. * new_MethodHandle( # <<<<<<<<<<<<<<
  10410. * self,
  10411. * "Loop._read_from_self",
  10412. */
  10413. __pyx_t_4 = __pyx_f_6uvloop_4loop_new_MethodHandle(__pyx_v_self, __pyx_kp_u_Loop__read_from_self, ((__pyx_t_6uvloop_4loop_method_t)((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_vtab)->_read_from_self), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 270, __pyx_L1_error)
  10414. __Pyx_GOTREF(__pyx_t_4);
  10415. if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_6uvloop_4loop_Handle))))) __PYX_ERR(2, 270, __pyx_L1_error)
  10416. /* "uvloop/loop.pyx":268
  10417. * return
  10418. *
  10419. * self._add_reader( # <<<<<<<<<<<<<<
  10420. * self._ssock,
  10421. * new_MethodHandle(
  10422. */
  10423. __pyx_t_5 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_vtab)->_add_reader(__pyx_v_self, __pyx_t_3, ((struct __pyx_obj_6uvloop_4loop_Handle *)__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 268, __pyx_L1_error)
  10424. __Pyx_GOTREF(__pyx_t_5);
  10425. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  10426. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  10427. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  10428. /* "uvloop/loop.pyx":261
  10429. * self._listening_signals = True
  10430. *
  10431. * cdef _recv_signals_start(self): # <<<<<<<<<<<<<<
  10432. * if self._ssock is None:
  10433. * self._setup_signals()
  10434. */
  10435. /* function exit code */
  10436. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  10437. goto __pyx_L0;
  10438. __pyx_L1_error:;
  10439. __Pyx_XDECREF(__pyx_t_3);
  10440. __Pyx_XDECREF(__pyx_t_4);
  10441. __Pyx_XDECREF(__pyx_t_5);
  10442. __Pyx_AddTraceback("uvloop.loop.Loop._recv_signals_start", __pyx_clineno, __pyx_lineno, __pyx_filename);
  10443. __pyx_r = 0;
  10444. __pyx_L0:;
  10445. __Pyx_XGIVEREF(__pyx_r);
  10446. __Pyx_RefNannyFinishContext();
  10447. return __pyx_r;
  10448. }
  10449. /* "uvloop/loop.pyx":276
  10450. * self))
  10451. *
  10452. * cdef _recv_signals_stop(self): # <<<<<<<<<<<<<<
  10453. * if self._ssock is None:
  10454. * return
  10455. */
  10456. static PyObject *__pyx_f_6uvloop_4loop_4Loop__recv_signals_stop(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) {
  10457. PyObject *__pyx_r = NULL;
  10458. __Pyx_RefNannyDeclarations
  10459. int __pyx_t_1;
  10460. int __pyx_t_2;
  10461. PyObject *__pyx_t_3 = NULL;
  10462. PyObject *__pyx_t_4 = NULL;
  10463. __Pyx_RefNannySetupContext("_recv_signals_stop", 0);
  10464. /* "uvloop/loop.pyx":277
  10465. *
  10466. * cdef _recv_signals_stop(self):
  10467. * if self._ssock is None: # <<<<<<<<<<<<<<
  10468. * return
  10469. *
  10470. */
  10471. __pyx_t_1 = (__pyx_v_self->_ssock == Py_None);
  10472. __pyx_t_2 = (__pyx_t_1 != 0);
  10473. if (__pyx_t_2) {
  10474. /* "uvloop/loop.pyx":278
  10475. * cdef _recv_signals_stop(self):
  10476. * if self._ssock is None:
  10477. * return # <<<<<<<<<<<<<<
  10478. *
  10479. * self._remove_reader(self._ssock)
  10480. */
  10481. __Pyx_XDECREF(__pyx_r);
  10482. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  10483. goto __pyx_L0;
  10484. /* "uvloop/loop.pyx":277
  10485. *
  10486. * cdef _recv_signals_stop(self):
  10487. * if self._ssock is None: # <<<<<<<<<<<<<<
  10488. * return
  10489. *
  10490. */
  10491. }
  10492. /* "uvloop/loop.pyx":280
  10493. * return
  10494. *
  10495. * self._remove_reader(self._ssock) # <<<<<<<<<<<<<<
  10496. *
  10497. * cdef _shutdown_signals(self):
  10498. */
  10499. __pyx_t_3 = __pyx_v_self->_ssock;
  10500. __Pyx_INCREF(__pyx_t_3);
  10501. __pyx_t_4 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_vtab)->_remove_reader(__pyx_v_self, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 280, __pyx_L1_error)
  10502. __Pyx_GOTREF(__pyx_t_4);
  10503. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  10504. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  10505. /* "uvloop/loop.pyx":276
  10506. * self))
  10507. *
  10508. * cdef _recv_signals_stop(self): # <<<<<<<<<<<<<<
  10509. * if self._ssock is None:
  10510. * return
  10511. */
  10512. /* function exit code */
  10513. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  10514. goto __pyx_L0;
  10515. __pyx_L1_error:;
  10516. __Pyx_XDECREF(__pyx_t_3);
  10517. __Pyx_XDECREF(__pyx_t_4);
  10518. __Pyx_AddTraceback("uvloop.loop.Loop._recv_signals_stop", __pyx_clineno, __pyx_lineno, __pyx_filename);
  10519. __pyx_r = 0;
  10520. __pyx_L0:;
  10521. __Pyx_XGIVEREF(__pyx_r);
  10522. __Pyx_RefNannyFinishContext();
  10523. return __pyx_r;
  10524. }
  10525. /* "uvloop/loop.pyx":282
  10526. * self._remove_reader(self._ssock)
  10527. *
  10528. * cdef _shutdown_signals(self): # <<<<<<<<<<<<<<
  10529. * if not self._listening_signals:
  10530. * return
  10531. */
  10532. static PyObject *__pyx_f_6uvloop_4loop_4Loop__shutdown_signals(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) {
  10533. PyObject *__pyx_v_sig = NULL;
  10534. PyObject *__pyx_v_exc = NULL;
  10535. PyObject *__pyx_r = NULL;
  10536. __Pyx_RefNannyDeclarations
  10537. int __pyx_t_1;
  10538. PyObject *__pyx_t_2 = NULL;
  10539. PyObject *__pyx_t_3 = NULL;
  10540. Py_ssize_t __pyx_t_4;
  10541. PyObject *__pyx_t_5 = NULL;
  10542. PyObject *__pyx_t_6 = NULL;
  10543. PyObject *__pyx_t_7 = NULL;
  10544. PyObject *__pyx_t_8 = NULL;
  10545. PyObject *__pyx_t_9 = NULL;
  10546. int __pyx_t_10;
  10547. PyObject *__pyx_t_11 = NULL;
  10548. PyObject *__pyx_t_12 = NULL;
  10549. PyObject *__pyx_t_13 = NULL;
  10550. int __pyx_t_14;
  10551. char const *__pyx_t_15;
  10552. PyObject *__pyx_t_16 = NULL;
  10553. PyObject *__pyx_t_17 = NULL;
  10554. PyObject *__pyx_t_18 = NULL;
  10555. PyObject *__pyx_t_19 = NULL;
  10556. PyObject *__pyx_t_20 = NULL;
  10557. PyObject *__pyx_t_21 = NULL;
  10558. __Pyx_RefNannySetupContext("_shutdown_signals", 0);
  10559. /* "uvloop/loop.pyx":283
  10560. *
  10561. * cdef _shutdown_signals(self):
  10562. * if not self._listening_signals: # <<<<<<<<<<<<<<
  10563. * return
  10564. *
  10565. */
  10566. __pyx_t_1 = ((!(__pyx_v_self->_listening_signals != 0)) != 0);
  10567. if (__pyx_t_1) {
  10568. /* "uvloop/loop.pyx":284
  10569. * cdef _shutdown_signals(self):
  10570. * if not self._listening_signals:
  10571. * return # <<<<<<<<<<<<<<
  10572. *
  10573. * for sig in list(self._signal_handlers):
  10574. */
  10575. __Pyx_XDECREF(__pyx_r);
  10576. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  10577. goto __pyx_L0;
  10578. /* "uvloop/loop.pyx":283
  10579. *
  10580. * cdef _shutdown_signals(self):
  10581. * if not self._listening_signals: # <<<<<<<<<<<<<<
  10582. * return
  10583. *
  10584. */
  10585. }
  10586. /* "uvloop/loop.pyx":286
  10587. * return
  10588. *
  10589. * for sig in list(self._signal_handlers): # <<<<<<<<<<<<<<
  10590. * self.remove_signal_handler(sig)
  10591. *
  10592. */
  10593. __pyx_t_2 = PySequence_List(__pyx_v_self->_signal_handlers); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 286, __pyx_L1_error)
  10594. __Pyx_GOTREF(__pyx_t_2);
  10595. __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
  10596. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  10597. for (;;) {
  10598. if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
  10599. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  10600. __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(2, 286, __pyx_L1_error)
  10601. #else
  10602. __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 286, __pyx_L1_error)
  10603. __Pyx_GOTREF(__pyx_t_2);
  10604. #endif
  10605. __Pyx_XDECREF_SET(__pyx_v_sig, __pyx_t_2);
  10606. __pyx_t_2 = 0;
  10607. /* "uvloop/loop.pyx":287
  10608. *
  10609. * for sig in list(self._signal_handlers):
  10610. * self.remove_signal_handler(sig) # <<<<<<<<<<<<<<
  10611. *
  10612. * if not self._listening_signals:
  10613. */
  10614. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_remove_signal_handler); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 287, __pyx_L1_error)
  10615. __Pyx_GOTREF(__pyx_t_5);
  10616. __pyx_t_6 = NULL;
  10617. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
  10618. __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
  10619. if (likely(__pyx_t_6)) {
  10620. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
  10621. __Pyx_INCREF(__pyx_t_6);
  10622. __Pyx_INCREF(function);
  10623. __Pyx_DECREF_SET(__pyx_t_5, function);
  10624. }
  10625. }
  10626. __pyx_t_2 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_v_sig) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_sig);
  10627. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  10628. if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 287, __pyx_L1_error)
  10629. __Pyx_GOTREF(__pyx_t_2);
  10630. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  10631. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  10632. /* "uvloop/loop.pyx":286
  10633. * return
  10634. *
  10635. * for sig in list(self._signal_handlers): # <<<<<<<<<<<<<<
  10636. * self.remove_signal_handler(sig)
  10637. *
  10638. */
  10639. }
  10640. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  10641. /* "uvloop/loop.pyx":289
  10642. * self.remove_signal_handler(sig)
  10643. *
  10644. * if not self._listening_signals: # <<<<<<<<<<<<<<
  10645. * # `remove_signal_handler` will call `_shutdown_signals` when
  10646. * # removing last signal handler.
  10647. */
  10648. __pyx_t_1 = ((!(__pyx_v_self->_listening_signals != 0)) != 0);
  10649. if (__pyx_t_1) {
  10650. /* "uvloop/loop.pyx":292
  10651. * # `remove_signal_handler` will call `_shutdown_signals` when
  10652. * # removing last signal handler.
  10653. * return # <<<<<<<<<<<<<<
  10654. *
  10655. * try:
  10656. */
  10657. __Pyx_XDECREF(__pyx_r);
  10658. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  10659. goto __pyx_L0;
  10660. /* "uvloop/loop.pyx":289
  10661. * self.remove_signal_handler(sig)
  10662. *
  10663. * if not self._listening_signals: # <<<<<<<<<<<<<<
  10664. * # `remove_signal_handler` will call `_shutdown_signals` when
  10665. * # removing last signal handler.
  10666. */
  10667. }
  10668. /* "uvloop/loop.pyx":294
  10669. * return
  10670. *
  10671. * try: # <<<<<<<<<<<<<<
  10672. * signal_set_wakeup_fd(-1)
  10673. * except (ValueError, OSError) as exc:
  10674. */
  10675. {
  10676. __Pyx_PyThreadState_declare
  10677. __Pyx_PyThreadState_assign
  10678. __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
  10679. __Pyx_XGOTREF(__pyx_t_7);
  10680. __Pyx_XGOTREF(__pyx_t_8);
  10681. __Pyx_XGOTREF(__pyx_t_9);
  10682. /*try:*/ {
  10683. /* "uvloop/loop.pyx":295
  10684. *
  10685. * try:
  10686. * signal_set_wakeup_fd(-1) # <<<<<<<<<<<<<<
  10687. * except (ValueError, OSError) as exc:
  10688. * aio_logger.info('set_wakeup_fd(-1) failed: %s', exc)
  10689. */
  10690. __Pyx_INCREF(__pyx_v_6uvloop_4loop_signal_set_wakeup_fd);
  10691. __pyx_t_2 = __pyx_v_6uvloop_4loop_signal_set_wakeup_fd; __pyx_t_5 = NULL;
  10692. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
  10693. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
  10694. if (likely(__pyx_t_5)) {
  10695. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  10696. __Pyx_INCREF(__pyx_t_5);
  10697. __Pyx_INCREF(function);
  10698. __Pyx_DECREF_SET(__pyx_t_2, function);
  10699. }
  10700. }
  10701. __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_int_neg_1) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_int_neg_1);
  10702. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  10703. if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 295, __pyx_L7_error)
  10704. __Pyx_GOTREF(__pyx_t_3);
  10705. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  10706. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  10707. /* "uvloop/loop.pyx":294
  10708. * return
  10709. *
  10710. * try: # <<<<<<<<<<<<<<
  10711. * signal_set_wakeup_fd(-1)
  10712. * except (ValueError, OSError) as exc:
  10713. */
  10714. }
  10715. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  10716. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  10717. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  10718. goto __pyx_L12_try_end;
  10719. __pyx_L7_error:;
  10720. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  10721. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  10722. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  10723. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  10724. /* "uvloop/loop.pyx":296
  10725. * try:
  10726. * signal_set_wakeup_fd(-1)
  10727. * except (ValueError, OSError) as exc: # <<<<<<<<<<<<<<
  10728. * aio_logger.info('set_wakeup_fd(-1) failed: %s', exc)
  10729. *
  10730. */
  10731. __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_OSError);
  10732. if (__pyx_t_10) {
  10733. __Pyx_AddTraceback("uvloop.loop.Loop._shutdown_signals", __pyx_clineno, __pyx_lineno, __pyx_filename);
  10734. if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_2, &__pyx_t_5) < 0) __PYX_ERR(2, 296, __pyx_L9_except_error)
  10735. __Pyx_GOTREF(__pyx_t_3);
  10736. __Pyx_GOTREF(__pyx_t_2);
  10737. __Pyx_GOTREF(__pyx_t_5);
  10738. __Pyx_INCREF(__pyx_t_2);
  10739. __pyx_v_exc = __pyx_t_2;
  10740. /*try:*/ {
  10741. /* "uvloop/loop.pyx":297
  10742. * signal_set_wakeup_fd(-1)
  10743. * except (ValueError, OSError) as exc:
  10744. * aio_logger.info('set_wakeup_fd(-1) failed: %s', exc) # <<<<<<<<<<<<<<
  10745. *
  10746. * self._remove_reader(self._ssock)
  10747. */
  10748. __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_6uvloop_4loop_aio_logger, __pyx_n_s_info); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 297, __pyx_L18_error)
  10749. __Pyx_GOTREF(__pyx_t_11);
  10750. __pyx_t_12 = NULL;
  10751. __pyx_t_10 = 0;
  10752. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) {
  10753. __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_11);
  10754. if (likely(__pyx_t_12)) {
  10755. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
  10756. __Pyx_INCREF(__pyx_t_12);
  10757. __Pyx_INCREF(function);
  10758. __Pyx_DECREF_SET(__pyx_t_11, function);
  10759. __pyx_t_10 = 1;
  10760. }
  10761. }
  10762. #if CYTHON_FAST_PYCALL
  10763. if (PyFunction_Check(__pyx_t_11)) {
  10764. PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_kp_u_set_wakeup_fd_1_failed_s, __pyx_v_exc};
  10765. __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 297, __pyx_L18_error)
  10766. __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
  10767. __Pyx_GOTREF(__pyx_t_6);
  10768. } else
  10769. #endif
  10770. #if CYTHON_FAST_PYCCALL
  10771. if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) {
  10772. PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_kp_u_set_wakeup_fd_1_failed_s, __pyx_v_exc};
  10773. __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 297, __pyx_L18_error)
  10774. __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
  10775. __Pyx_GOTREF(__pyx_t_6);
  10776. } else
  10777. #endif
  10778. {
  10779. __pyx_t_13 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_13)) __PYX_ERR(2, 297, __pyx_L18_error)
  10780. __Pyx_GOTREF(__pyx_t_13);
  10781. if (__pyx_t_12) {
  10782. __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_12); __pyx_t_12 = NULL;
  10783. }
  10784. __Pyx_INCREF(__pyx_kp_u_set_wakeup_fd_1_failed_s);
  10785. __Pyx_GIVEREF(__pyx_kp_u_set_wakeup_fd_1_failed_s);
  10786. PyTuple_SET_ITEM(__pyx_t_13, 0+__pyx_t_10, __pyx_kp_u_set_wakeup_fd_1_failed_s);
  10787. __Pyx_INCREF(__pyx_v_exc);
  10788. __Pyx_GIVEREF(__pyx_v_exc);
  10789. PyTuple_SET_ITEM(__pyx_t_13, 1+__pyx_t_10, __pyx_v_exc);
  10790. __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_13, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 297, __pyx_L18_error)
  10791. __Pyx_GOTREF(__pyx_t_6);
  10792. __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  10793. }
  10794. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  10795. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  10796. }
  10797. /* "uvloop/loop.pyx":296
  10798. * try:
  10799. * signal_set_wakeup_fd(-1)
  10800. * except (ValueError, OSError) as exc: # <<<<<<<<<<<<<<
  10801. * aio_logger.info('set_wakeup_fd(-1) failed: %s', exc)
  10802. *
  10803. */
  10804. /*finally:*/ {
  10805. /*normal exit:*/{
  10806. __Pyx_DECREF(__pyx_v_exc);
  10807. __pyx_v_exc = NULL;
  10808. goto __pyx_L19;
  10809. }
  10810. __pyx_L18_error:;
  10811. /*exception exit:*/{
  10812. __Pyx_PyThreadState_declare
  10813. __Pyx_PyThreadState_assign
  10814. __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0;
  10815. __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
  10816. __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
  10817. __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
  10818. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  10819. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21);
  10820. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18) < 0)) __Pyx_ErrFetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18);
  10821. __Pyx_XGOTREF(__pyx_t_16);
  10822. __Pyx_XGOTREF(__pyx_t_17);
  10823. __Pyx_XGOTREF(__pyx_t_18);
  10824. __Pyx_XGOTREF(__pyx_t_19);
  10825. __Pyx_XGOTREF(__pyx_t_20);
  10826. __Pyx_XGOTREF(__pyx_t_21);
  10827. __pyx_t_10 = __pyx_lineno; __pyx_t_14 = __pyx_clineno; __pyx_t_15 = __pyx_filename;
  10828. {
  10829. __Pyx_DECREF(__pyx_v_exc);
  10830. __pyx_v_exc = NULL;
  10831. }
  10832. if (PY_MAJOR_VERSION >= 3) {
  10833. __Pyx_XGIVEREF(__pyx_t_19);
  10834. __Pyx_XGIVEREF(__pyx_t_20);
  10835. __Pyx_XGIVEREF(__pyx_t_21);
  10836. __Pyx_ExceptionReset(__pyx_t_19, __pyx_t_20, __pyx_t_21);
  10837. }
  10838. __Pyx_XGIVEREF(__pyx_t_16);
  10839. __Pyx_XGIVEREF(__pyx_t_17);
  10840. __Pyx_XGIVEREF(__pyx_t_18);
  10841. __Pyx_ErrRestore(__pyx_t_16, __pyx_t_17, __pyx_t_18);
  10842. __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0;
  10843. __pyx_lineno = __pyx_t_10; __pyx_clineno = __pyx_t_14; __pyx_filename = __pyx_t_15;
  10844. goto __pyx_L9_except_error;
  10845. }
  10846. __pyx_L19:;
  10847. }
  10848. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  10849. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  10850. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  10851. goto __pyx_L8_exception_handled;
  10852. }
  10853. goto __pyx_L9_except_error;
  10854. __pyx_L9_except_error:;
  10855. /* "uvloop/loop.pyx":294
  10856. * return
  10857. *
  10858. * try: # <<<<<<<<<<<<<<
  10859. * signal_set_wakeup_fd(-1)
  10860. * except (ValueError, OSError) as exc:
  10861. */
  10862. __Pyx_XGIVEREF(__pyx_t_7);
  10863. __Pyx_XGIVEREF(__pyx_t_8);
  10864. __Pyx_XGIVEREF(__pyx_t_9);
  10865. __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
  10866. goto __pyx_L1_error;
  10867. __pyx_L8_exception_handled:;
  10868. __Pyx_XGIVEREF(__pyx_t_7);
  10869. __Pyx_XGIVEREF(__pyx_t_8);
  10870. __Pyx_XGIVEREF(__pyx_t_9);
  10871. __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
  10872. __pyx_L12_try_end:;
  10873. }
  10874. /* "uvloop/loop.pyx":299
  10875. * aio_logger.info('set_wakeup_fd(-1) failed: %s', exc)
  10876. *
  10877. * self._remove_reader(self._ssock) # <<<<<<<<<<<<<<
  10878. * self._ssock.close()
  10879. * self._csock.close()
  10880. */
  10881. __pyx_t_5 = __pyx_v_self->_ssock;
  10882. __Pyx_INCREF(__pyx_t_5);
  10883. __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_vtab)->_remove_reader(__pyx_v_self, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 299, __pyx_L1_error)
  10884. __Pyx_GOTREF(__pyx_t_2);
  10885. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  10886. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  10887. /* "uvloop/loop.pyx":300
  10888. *
  10889. * self._remove_reader(self._ssock)
  10890. * self._ssock.close() # <<<<<<<<<<<<<<
  10891. * self._csock.close()
  10892. * self._ssock = None
  10893. */
  10894. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_ssock, __pyx_n_s_close); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 300, __pyx_L1_error)
  10895. __Pyx_GOTREF(__pyx_t_5);
  10896. __pyx_t_3 = NULL;
  10897. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
  10898. __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
  10899. if (likely(__pyx_t_3)) {
  10900. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
  10901. __Pyx_INCREF(__pyx_t_3);
  10902. __Pyx_INCREF(function);
  10903. __Pyx_DECREF_SET(__pyx_t_5, function);
  10904. }
  10905. }
  10906. __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
  10907. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  10908. if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 300, __pyx_L1_error)
  10909. __Pyx_GOTREF(__pyx_t_2);
  10910. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  10911. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  10912. /* "uvloop/loop.pyx":301
  10913. * self._remove_reader(self._ssock)
  10914. * self._ssock.close()
  10915. * self._csock.close() # <<<<<<<<<<<<<<
  10916. * self._ssock = None
  10917. * self._csock = None
  10918. */
  10919. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_csock, __pyx_n_s_close); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 301, __pyx_L1_error)
  10920. __Pyx_GOTREF(__pyx_t_5);
  10921. __pyx_t_3 = NULL;
  10922. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
  10923. __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
  10924. if (likely(__pyx_t_3)) {
  10925. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
  10926. __Pyx_INCREF(__pyx_t_3);
  10927. __Pyx_INCREF(function);
  10928. __Pyx_DECREF_SET(__pyx_t_5, function);
  10929. }
  10930. }
  10931. __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
  10932. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  10933. if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 301, __pyx_L1_error)
  10934. __Pyx_GOTREF(__pyx_t_2);
  10935. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  10936. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  10937. /* "uvloop/loop.pyx":302
  10938. * self._ssock.close()
  10939. * self._csock.close()
  10940. * self._ssock = None # <<<<<<<<<<<<<<
  10941. * self._csock = None
  10942. *
  10943. */
  10944. __Pyx_INCREF(Py_None);
  10945. __Pyx_GIVEREF(Py_None);
  10946. __Pyx_GOTREF(__pyx_v_self->_ssock);
  10947. __Pyx_DECREF(__pyx_v_self->_ssock);
  10948. __pyx_v_self->_ssock = Py_None;
  10949. /* "uvloop/loop.pyx":303
  10950. * self._csock.close()
  10951. * self._ssock = None
  10952. * self._csock = None # <<<<<<<<<<<<<<
  10953. *
  10954. * self._listening_signals = False
  10955. */
  10956. __Pyx_INCREF(Py_None);
  10957. __Pyx_GIVEREF(Py_None);
  10958. __Pyx_GOTREF(__pyx_v_self->_csock);
  10959. __Pyx_DECREF(__pyx_v_self->_csock);
  10960. __pyx_v_self->_csock = Py_None;
  10961. /* "uvloop/loop.pyx":305
  10962. * self._csock = None
  10963. *
  10964. * self._listening_signals = False # <<<<<<<<<<<<<<
  10965. *
  10966. * def __sighandler(self, signum, frame):
  10967. */
  10968. __pyx_v_self->_listening_signals = 0;
  10969. /* "uvloop/loop.pyx":282
  10970. * self._remove_reader(self._ssock)
  10971. *
  10972. * cdef _shutdown_signals(self): # <<<<<<<<<<<<<<
  10973. * if not self._listening_signals:
  10974. * return
  10975. */
  10976. /* function exit code */
  10977. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  10978. goto __pyx_L0;
  10979. __pyx_L1_error:;
  10980. __Pyx_XDECREF(__pyx_t_2);
  10981. __Pyx_XDECREF(__pyx_t_3);
  10982. __Pyx_XDECREF(__pyx_t_5);
  10983. __Pyx_XDECREF(__pyx_t_6);
  10984. __Pyx_XDECREF(__pyx_t_11);
  10985. __Pyx_XDECREF(__pyx_t_12);
  10986. __Pyx_XDECREF(__pyx_t_13);
  10987. __Pyx_AddTraceback("uvloop.loop.Loop._shutdown_signals", __pyx_clineno, __pyx_lineno, __pyx_filename);
  10988. __pyx_r = 0;
  10989. __pyx_L0:;
  10990. __Pyx_XDECREF(__pyx_v_sig);
  10991. __Pyx_XDECREF(__pyx_v_exc);
  10992. __Pyx_XGIVEREF(__pyx_r);
  10993. __Pyx_RefNannyFinishContext();
  10994. return __pyx_r;
  10995. }
  10996. /* "uvloop/loop.pyx":307
  10997. * self._listening_signals = False
  10998. *
  10999. * def __sighandler(self, signum, frame): # <<<<<<<<<<<<<<
  11000. * self._signals.add(signum)
  11001. *
  11002. */
  11003. /* Python wrapper */
  11004. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_7__sighandler(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  11005. static char __pyx_doc_6uvloop_4loop_4Loop_6__sighandler[] = "Loop.__sighandler(self, signum, frame)";
  11006. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_7__sighandler(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  11007. PyObject *__pyx_v_signum = 0;
  11008. CYTHON_UNUSED PyObject *__pyx_v_frame = 0;
  11009. PyObject *__pyx_r = 0;
  11010. __Pyx_RefNannyDeclarations
  11011. __Pyx_RefNannySetupContext("__sighandler (wrapper)", 0);
  11012. {
  11013. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_signum,&__pyx_n_s_frame,0};
  11014. PyObject* values[2] = {0,0};
  11015. if (unlikely(__pyx_kwds)) {
  11016. Py_ssize_t kw_args;
  11017. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  11018. switch (pos_args) {
  11019. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  11020. CYTHON_FALLTHROUGH;
  11021. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  11022. CYTHON_FALLTHROUGH;
  11023. case 0: break;
  11024. default: goto __pyx_L5_argtuple_error;
  11025. }
  11026. kw_args = PyDict_Size(__pyx_kwds);
  11027. switch (pos_args) {
  11028. case 0:
  11029. if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_signum)) != 0)) kw_args--;
  11030. else goto __pyx_L5_argtuple_error;
  11031. CYTHON_FALLTHROUGH;
  11032. case 1:
  11033. if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_frame)) != 0)) kw_args--;
  11034. else {
  11035. __Pyx_RaiseArgtupleInvalid("__sighandler", 1, 2, 2, 1); __PYX_ERR(2, 307, __pyx_L3_error)
  11036. }
  11037. }
  11038. if (unlikely(kw_args > 0)) {
  11039. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__sighandler") < 0)) __PYX_ERR(2, 307, __pyx_L3_error)
  11040. }
  11041. } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
  11042. goto __pyx_L5_argtuple_error;
  11043. } else {
  11044. values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  11045. values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  11046. }
  11047. __pyx_v_signum = values[0];
  11048. __pyx_v_frame = values[1];
  11049. }
  11050. goto __pyx_L4_argument_unpacking_done;
  11051. __pyx_L5_argtuple_error:;
  11052. __Pyx_RaiseArgtupleInvalid("__sighandler", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 307, __pyx_L3_error)
  11053. __pyx_L3_error:;
  11054. __Pyx_AddTraceback("uvloop.loop.Loop.__sighandler", __pyx_clineno, __pyx_lineno, __pyx_filename);
  11055. __Pyx_RefNannyFinishContext();
  11056. return NULL;
  11057. __pyx_L4_argument_unpacking_done:;
  11058. __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_6__sighandler(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self), __pyx_v_signum, __pyx_v_frame);
  11059. /* function exit code */
  11060. __Pyx_RefNannyFinishContext();
  11061. return __pyx_r;
  11062. }
  11063. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_6__sighandler(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_signum, CYTHON_UNUSED PyObject *__pyx_v_frame) {
  11064. PyObject *__pyx_r = NULL;
  11065. __Pyx_RefNannyDeclarations
  11066. int __pyx_t_1;
  11067. __Pyx_RefNannySetupContext("__sighandler", 0);
  11068. /* "uvloop/loop.pyx":308
  11069. *
  11070. * def __sighandler(self, signum, frame):
  11071. * self._signals.add(signum) # <<<<<<<<<<<<<<
  11072. *
  11073. * cdef inline _ceval_process_signals(self):
  11074. */
  11075. if (unlikely(__pyx_v_self->_signals == Py_None)) {
  11076. PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "add");
  11077. __PYX_ERR(2, 308, __pyx_L1_error)
  11078. }
  11079. __pyx_t_1 = PySet_Add(__pyx_v_self->_signals, __pyx_v_signum); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(2, 308, __pyx_L1_error)
  11080. /* "uvloop/loop.pyx":307
  11081. * self._listening_signals = False
  11082. *
  11083. * def __sighandler(self, signum, frame): # <<<<<<<<<<<<<<
  11084. * self._signals.add(signum)
  11085. *
  11086. */
  11087. /* function exit code */
  11088. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  11089. goto __pyx_L0;
  11090. __pyx_L1_error:;
  11091. __Pyx_AddTraceback("uvloop.loop.Loop.__sighandler", __pyx_clineno, __pyx_lineno, __pyx_filename);
  11092. __pyx_r = NULL;
  11093. __pyx_L0:;
  11094. __Pyx_XGIVEREF(__pyx_r);
  11095. __Pyx_RefNannyFinishContext();
  11096. return __pyx_r;
  11097. }
  11098. /* "uvloop/loop.pyx":310
  11099. * self._signals.add(signum)
  11100. *
  11101. * cdef inline _ceval_process_signals(self): # <<<<<<<<<<<<<<
  11102. * # Invoke CPython eval loop to let process signals.
  11103. * PyErr_CheckSignals()
  11104. */
  11105. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_4Loop__ceval_process_signals(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) {
  11106. PyObject *__pyx_r = NULL;
  11107. __Pyx_RefNannyDeclarations
  11108. int __pyx_t_1;
  11109. PyObject *__pyx_t_2 = NULL;
  11110. PyObject *__pyx_t_3 = NULL;
  11111. PyObject *__pyx_t_4 = NULL;
  11112. __Pyx_RefNannySetupContext("_ceval_process_signals", 0);
  11113. /* "uvloop/loop.pyx":312
  11114. * cdef inline _ceval_process_signals(self):
  11115. * # Invoke CPython eval loop to let process signals.
  11116. * PyErr_CheckSignals() # <<<<<<<<<<<<<<
  11117. * # Calling a pure-Python function will invoke
  11118. * # _PyEval_EvalFrameDefault which will process
  11119. */
  11120. __pyx_t_1 = PyErr_CheckSignals(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(2, 312, __pyx_L1_error)
  11121. /* "uvloop/loop.pyx":316
  11122. * # _PyEval_EvalFrameDefault which will process
  11123. * # pending signal callbacks.
  11124. * _noop.noop() # Might raise ^C # <<<<<<<<<<<<<<
  11125. *
  11126. * cdef _read_from_self(self):
  11127. */
  11128. __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_noop); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 316, __pyx_L1_error)
  11129. __Pyx_GOTREF(__pyx_t_3);
  11130. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_noop_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 316, __pyx_L1_error)
  11131. __Pyx_GOTREF(__pyx_t_4);
  11132. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  11133. __pyx_t_3 = NULL;
  11134. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
  11135. __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
  11136. if (likely(__pyx_t_3)) {
  11137. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  11138. __Pyx_INCREF(__pyx_t_3);
  11139. __Pyx_INCREF(function);
  11140. __Pyx_DECREF_SET(__pyx_t_4, function);
  11141. }
  11142. }
  11143. __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
  11144. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  11145. if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 316, __pyx_L1_error)
  11146. __Pyx_GOTREF(__pyx_t_2);
  11147. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  11148. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  11149. /* "uvloop/loop.pyx":310
  11150. * self._signals.add(signum)
  11151. *
  11152. * cdef inline _ceval_process_signals(self): # <<<<<<<<<<<<<<
  11153. * # Invoke CPython eval loop to let process signals.
  11154. * PyErr_CheckSignals()
  11155. */
  11156. /* function exit code */
  11157. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  11158. goto __pyx_L0;
  11159. __pyx_L1_error:;
  11160. __Pyx_XDECREF(__pyx_t_2);
  11161. __Pyx_XDECREF(__pyx_t_3);
  11162. __Pyx_XDECREF(__pyx_t_4);
  11163. __Pyx_AddTraceback("uvloop.loop.Loop._ceval_process_signals", __pyx_clineno, __pyx_lineno, __pyx_filename);
  11164. __pyx_r = 0;
  11165. __pyx_L0:;
  11166. __Pyx_XGIVEREF(__pyx_r);
  11167. __Pyx_RefNannyFinishContext();
  11168. return __pyx_r;
  11169. }
  11170. /* "uvloop/loop.pyx":318
  11171. * _noop.noop() # Might raise ^C
  11172. *
  11173. * cdef _read_from_self(self): # <<<<<<<<<<<<<<
  11174. * cdef bytes sigdata
  11175. * sigdata = b''
  11176. */
  11177. static PyObject *__pyx_f_6uvloop_4loop_4Loop__read_from_self(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) {
  11178. PyObject *__pyx_v_sigdata = 0;
  11179. PyObject *__pyx_v_data = NULL;
  11180. PyObject *__pyx_r = NULL;
  11181. __Pyx_RefNannyDeclarations
  11182. PyObject *__pyx_t_1 = NULL;
  11183. PyObject *__pyx_t_2 = NULL;
  11184. PyObject *__pyx_t_3 = NULL;
  11185. PyObject *__pyx_t_4 = NULL;
  11186. PyObject *__pyx_t_5 = NULL;
  11187. PyObject *__pyx_t_6 = NULL;
  11188. int __pyx_t_7;
  11189. int __pyx_t_8;
  11190. PyObject *__pyx_t_9 = NULL;
  11191. int __pyx_t_10;
  11192. __Pyx_RefNannySetupContext("_read_from_self", 0);
  11193. /* "uvloop/loop.pyx":320
  11194. * cdef _read_from_self(self):
  11195. * cdef bytes sigdata
  11196. * sigdata = b'' # <<<<<<<<<<<<<<
  11197. * while True:
  11198. * try:
  11199. */
  11200. __Pyx_INCREF(__pyx_kp_b__2);
  11201. __pyx_v_sigdata = __pyx_kp_b__2;
  11202. /* "uvloop/loop.pyx":321
  11203. * cdef bytes sigdata
  11204. * sigdata = b''
  11205. * while True: # <<<<<<<<<<<<<<
  11206. * try:
  11207. * data = self._ssock.recv(65536)
  11208. */
  11209. while (1) {
  11210. /* "uvloop/loop.pyx":322
  11211. * sigdata = b''
  11212. * while True:
  11213. * try: # <<<<<<<<<<<<<<
  11214. * data = self._ssock.recv(65536)
  11215. * if not data:
  11216. */
  11217. {
  11218. __Pyx_PyThreadState_declare
  11219. __Pyx_PyThreadState_assign
  11220. __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
  11221. __Pyx_XGOTREF(__pyx_t_1);
  11222. __Pyx_XGOTREF(__pyx_t_2);
  11223. __Pyx_XGOTREF(__pyx_t_3);
  11224. /*try:*/ {
  11225. /* "uvloop/loop.pyx":323
  11226. * while True:
  11227. * try:
  11228. * data = self._ssock.recv(65536) # <<<<<<<<<<<<<<
  11229. * if not data:
  11230. * break
  11231. */
  11232. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_ssock, __pyx_n_s_recv); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 323, __pyx_L5_error)
  11233. __Pyx_GOTREF(__pyx_t_5);
  11234. __pyx_t_6 = NULL;
  11235. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
  11236. __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
  11237. if (likely(__pyx_t_6)) {
  11238. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
  11239. __Pyx_INCREF(__pyx_t_6);
  11240. __Pyx_INCREF(function);
  11241. __Pyx_DECREF_SET(__pyx_t_5, function);
  11242. }
  11243. }
  11244. __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_int_65536) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_int_65536);
  11245. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  11246. if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 323, __pyx_L5_error)
  11247. __Pyx_GOTREF(__pyx_t_4);
  11248. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  11249. __Pyx_XDECREF_SET(__pyx_v_data, __pyx_t_4);
  11250. __pyx_t_4 = 0;
  11251. /* "uvloop/loop.pyx":324
  11252. * try:
  11253. * data = self._ssock.recv(65536)
  11254. * if not data: # <<<<<<<<<<<<<<
  11255. * break
  11256. * sigdata += data
  11257. */
  11258. __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_data); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(2, 324, __pyx_L5_error)
  11259. __pyx_t_8 = ((!__pyx_t_7) != 0);
  11260. if (__pyx_t_8) {
  11261. /* "uvloop/loop.pyx":325
  11262. * data = self._ssock.recv(65536)
  11263. * if not data:
  11264. * break # <<<<<<<<<<<<<<
  11265. * sigdata += data
  11266. * except InterruptedError:
  11267. */
  11268. goto __pyx_L10_try_break;
  11269. /* "uvloop/loop.pyx":324
  11270. * try:
  11271. * data = self._ssock.recv(65536)
  11272. * if not data: # <<<<<<<<<<<<<<
  11273. * break
  11274. * sigdata += data
  11275. */
  11276. }
  11277. /* "uvloop/loop.pyx":326
  11278. * if not data:
  11279. * break
  11280. * sigdata += data # <<<<<<<<<<<<<<
  11281. * except InterruptedError:
  11282. * continue
  11283. */
  11284. __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_sigdata, __pyx_v_data); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 326, __pyx_L5_error)
  11285. __Pyx_GOTREF(__pyx_t_4);
  11286. if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_4)->tp_name), 0))) __PYX_ERR(2, 326, __pyx_L5_error)
  11287. __Pyx_DECREF_SET(__pyx_v_sigdata, ((PyObject*)__pyx_t_4));
  11288. __pyx_t_4 = 0;
  11289. /* "uvloop/loop.pyx":322
  11290. * sigdata = b''
  11291. * while True:
  11292. * try: # <<<<<<<<<<<<<<
  11293. * data = self._ssock.recv(65536)
  11294. * if not data:
  11295. */
  11296. }
  11297. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  11298. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  11299. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  11300. goto __pyx_L12_try_end;
  11301. __pyx_L5_error:;
  11302. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  11303. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  11304. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  11305. /* "uvloop/loop.pyx":327
  11306. * break
  11307. * sigdata += data
  11308. * except InterruptedError: # <<<<<<<<<<<<<<
  11309. * continue
  11310. * except BlockingIOError:
  11311. */
  11312. __Pyx_ErrFetch(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
  11313. __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_InterruptedError); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 327, __pyx_L7_except_error)
  11314. __Pyx_GOTREF(__pyx_t_9);
  11315. __pyx_t_10 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_4, __pyx_t_9);
  11316. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  11317. __Pyx_ErrRestore(__pyx_t_4, __pyx_t_5, __pyx_t_6);
  11318. __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_6 = 0;
  11319. if (__pyx_t_10) {
  11320. __Pyx_AddTraceback("uvloop.loop.Loop._read_from_self", __pyx_clineno, __pyx_lineno, __pyx_filename);
  11321. if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4) < 0) __PYX_ERR(2, 327, __pyx_L7_except_error)
  11322. __Pyx_GOTREF(__pyx_t_6);
  11323. __Pyx_GOTREF(__pyx_t_5);
  11324. __Pyx_GOTREF(__pyx_t_4);
  11325. /* "uvloop/loop.pyx":328
  11326. * sigdata += data
  11327. * except InterruptedError:
  11328. * continue # <<<<<<<<<<<<<<
  11329. * except BlockingIOError:
  11330. * break
  11331. */
  11332. goto __pyx_L15_except_continue;
  11333. __pyx_L15_except_continue:;
  11334. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  11335. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  11336. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  11337. goto __pyx_L11_try_continue;
  11338. }
  11339. /* "uvloop/loop.pyx":329
  11340. * except InterruptedError:
  11341. * continue
  11342. * except BlockingIOError: # <<<<<<<<<<<<<<
  11343. * break
  11344. * if sigdata:
  11345. */
  11346. __Pyx_ErrFetch(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
  11347. __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_BlockingIOError); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 329, __pyx_L7_except_error)
  11348. __Pyx_GOTREF(__pyx_t_9);
  11349. __pyx_t_10 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_4, __pyx_t_9);
  11350. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  11351. __Pyx_ErrRestore(__pyx_t_4, __pyx_t_5, __pyx_t_6);
  11352. __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_6 = 0;
  11353. if (__pyx_t_10) {
  11354. __Pyx_AddTraceback("uvloop.loop.Loop._read_from_self", __pyx_clineno, __pyx_lineno, __pyx_filename);
  11355. if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4) < 0) __PYX_ERR(2, 329, __pyx_L7_except_error)
  11356. __Pyx_GOTREF(__pyx_t_6);
  11357. __Pyx_GOTREF(__pyx_t_5);
  11358. __Pyx_GOTREF(__pyx_t_4);
  11359. /* "uvloop/loop.pyx":330
  11360. * continue
  11361. * except BlockingIOError:
  11362. * break # <<<<<<<<<<<<<<
  11363. * if sigdata:
  11364. * self._invoke_signals(sigdata)
  11365. */
  11366. goto __pyx_L16_except_break;
  11367. __pyx_L16_except_break:;
  11368. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  11369. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  11370. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  11371. goto __pyx_L10_try_break;
  11372. }
  11373. goto __pyx_L7_except_error;
  11374. __pyx_L7_except_error:;
  11375. /* "uvloop/loop.pyx":322
  11376. * sigdata = b''
  11377. * while True:
  11378. * try: # <<<<<<<<<<<<<<
  11379. * data = self._ssock.recv(65536)
  11380. * if not data:
  11381. */
  11382. __Pyx_XGIVEREF(__pyx_t_1);
  11383. __Pyx_XGIVEREF(__pyx_t_2);
  11384. __Pyx_XGIVEREF(__pyx_t_3);
  11385. __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
  11386. goto __pyx_L1_error;
  11387. __pyx_L10_try_break:;
  11388. __Pyx_XGIVEREF(__pyx_t_1);
  11389. __Pyx_XGIVEREF(__pyx_t_2);
  11390. __Pyx_XGIVEREF(__pyx_t_3);
  11391. __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
  11392. goto __pyx_L4_break;
  11393. __pyx_L11_try_continue:;
  11394. __Pyx_XGIVEREF(__pyx_t_1);
  11395. __Pyx_XGIVEREF(__pyx_t_2);
  11396. __Pyx_XGIVEREF(__pyx_t_3);
  11397. __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
  11398. goto __pyx_L3_continue;
  11399. __pyx_L12_try_end:;
  11400. }
  11401. __pyx_L3_continue:;
  11402. }
  11403. __pyx_L4_break:;
  11404. /* "uvloop/loop.pyx":331
  11405. * except BlockingIOError:
  11406. * break
  11407. * if sigdata: # <<<<<<<<<<<<<<
  11408. * self._invoke_signals(sigdata)
  11409. *
  11410. */
  11411. __pyx_t_8 = (__pyx_v_sigdata != Py_None)&&(PyBytes_GET_SIZE(__pyx_v_sigdata) != 0);
  11412. if (__pyx_t_8) {
  11413. /* "uvloop/loop.pyx":332
  11414. * break
  11415. * if sigdata:
  11416. * self._invoke_signals(sigdata) # <<<<<<<<<<<<<<
  11417. *
  11418. * cdef _invoke_signals(self, bytes data):
  11419. */
  11420. __pyx_t_4 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_vtab)->_invoke_signals(__pyx_v_self, __pyx_v_sigdata); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 332, __pyx_L1_error)
  11421. __Pyx_GOTREF(__pyx_t_4);
  11422. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  11423. /* "uvloop/loop.pyx":331
  11424. * except BlockingIOError:
  11425. * break
  11426. * if sigdata: # <<<<<<<<<<<<<<
  11427. * self._invoke_signals(sigdata)
  11428. *
  11429. */
  11430. }
  11431. /* "uvloop/loop.pyx":318
  11432. * _noop.noop() # Might raise ^C
  11433. *
  11434. * cdef _read_from_self(self): # <<<<<<<<<<<<<<
  11435. * cdef bytes sigdata
  11436. * sigdata = b''
  11437. */
  11438. /* function exit code */
  11439. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  11440. goto __pyx_L0;
  11441. __pyx_L1_error:;
  11442. __Pyx_XDECREF(__pyx_t_4);
  11443. __Pyx_XDECREF(__pyx_t_5);
  11444. __Pyx_XDECREF(__pyx_t_6);
  11445. __Pyx_XDECREF(__pyx_t_9);
  11446. __Pyx_AddTraceback("uvloop.loop.Loop._read_from_self", __pyx_clineno, __pyx_lineno, __pyx_filename);
  11447. __pyx_r = 0;
  11448. __pyx_L0:;
  11449. __Pyx_XDECREF(__pyx_v_sigdata);
  11450. __Pyx_XDECREF(__pyx_v_data);
  11451. __Pyx_XGIVEREF(__pyx_r);
  11452. __Pyx_RefNannyFinishContext();
  11453. return __pyx_r;
  11454. }
  11455. /* "uvloop/loop.pyx":334
  11456. * self._invoke_signals(sigdata)
  11457. *
  11458. * cdef _invoke_signals(self, bytes data): # <<<<<<<<<<<<<<
  11459. * cdef set sigs
  11460. *
  11461. */
  11462. static PyObject *__pyx_f_6uvloop_4loop_4Loop__invoke_signals(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_data) {
  11463. PyObject *__pyx_v_sigs = 0;
  11464. PyObject *__pyx_v_signum = NULL;
  11465. PyObject *__pyx_r = NULL;
  11466. __Pyx_RefNannyDeclarations
  11467. PyObject *__pyx_t_1 = NULL;
  11468. PyObject *__pyx_t_2 = NULL;
  11469. PyObject *__pyx_t_3 = NULL;
  11470. int __pyx_t_4;
  11471. PyObject *(*__pyx_t_5)(PyObject *);
  11472. int __pyx_t_6;
  11473. int __pyx_t_7;
  11474. Py_ssize_t __pyx_t_8;
  11475. Py_ssize_t __pyx_t_9;
  11476. int __pyx_t_10;
  11477. int __pyx_t_11;
  11478. __Pyx_RefNannySetupContext("_invoke_signals", 0);
  11479. /* "uvloop/loop.pyx":337
  11480. * cdef set sigs
  11481. *
  11482. * self._ceval_process_signals() # <<<<<<<<<<<<<<
  11483. *
  11484. * sigs = self._signals.copy()
  11485. */
  11486. __pyx_t_1 = __pyx_f_6uvloop_4loop_4Loop__ceval_process_signals(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 337, __pyx_L1_error)
  11487. __Pyx_GOTREF(__pyx_t_1);
  11488. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  11489. /* "uvloop/loop.pyx":339
  11490. * self._ceval_process_signals()
  11491. *
  11492. * sigs = self._signals.copy() # <<<<<<<<<<<<<<
  11493. * self._signals.clear()
  11494. * for signum in data:
  11495. */
  11496. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_signals, __pyx_n_s_copy); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 339, __pyx_L1_error)
  11497. __Pyx_GOTREF(__pyx_t_2);
  11498. __pyx_t_3 = NULL;
  11499. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
  11500. __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
  11501. if (likely(__pyx_t_3)) {
  11502. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  11503. __Pyx_INCREF(__pyx_t_3);
  11504. __Pyx_INCREF(function);
  11505. __Pyx_DECREF_SET(__pyx_t_2, function);
  11506. }
  11507. }
  11508. __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  11509. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  11510. if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 339, __pyx_L1_error)
  11511. __Pyx_GOTREF(__pyx_t_1);
  11512. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  11513. if (!(likely(PySet_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "set", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 339, __pyx_L1_error)
  11514. __pyx_v_sigs = ((PyObject*)__pyx_t_1);
  11515. __pyx_t_1 = 0;
  11516. /* "uvloop/loop.pyx":340
  11517. *
  11518. * sigs = self._signals.copy()
  11519. * self._signals.clear() # <<<<<<<<<<<<<<
  11520. * for signum in data:
  11521. * if not signum:
  11522. */
  11523. if (unlikely(__pyx_v_self->_signals == Py_None)) {
  11524. PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "clear");
  11525. __PYX_ERR(2, 340, __pyx_L1_error)
  11526. }
  11527. __pyx_t_4 = PySet_Clear(__pyx_v_self->_signals); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 340, __pyx_L1_error)
  11528. /* "uvloop/loop.pyx":341
  11529. * sigs = self._signals.copy()
  11530. * self._signals.clear()
  11531. * for signum in data: # <<<<<<<<<<<<<<
  11532. * if not signum:
  11533. * # ignore null bytes written by set_wakeup_fd()
  11534. */
  11535. __pyx_t_1 = PyObject_GetIter(__pyx_v_data); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 341, __pyx_L1_error)
  11536. __Pyx_GOTREF(__pyx_t_1);
  11537. __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 341, __pyx_L1_error)
  11538. for (;;) {
  11539. {
  11540. __pyx_t_2 = __pyx_t_5(__pyx_t_1);
  11541. if (unlikely(!__pyx_t_2)) {
  11542. PyObject* exc_type = PyErr_Occurred();
  11543. if (exc_type) {
  11544. if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
  11545. else __PYX_ERR(2, 341, __pyx_L1_error)
  11546. }
  11547. break;
  11548. }
  11549. __Pyx_GOTREF(__pyx_t_2);
  11550. }
  11551. __Pyx_XDECREF_SET(__pyx_v_signum, __pyx_t_2);
  11552. __pyx_t_2 = 0;
  11553. /* "uvloop/loop.pyx":342
  11554. * self._signals.clear()
  11555. * for signum in data:
  11556. * if not signum: # <<<<<<<<<<<<<<
  11557. * # ignore null bytes written by set_wakeup_fd()
  11558. * continue
  11559. */
  11560. __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_signum); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 342, __pyx_L1_error)
  11561. __pyx_t_7 = ((!__pyx_t_6) != 0);
  11562. if (__pyx_t_7) {
  11563. /* "uvloop/loop.pyx":344
  11564. * if not signum:
  11565. * # ignore null bytes written by set_wakeup_fd()
  11566. * continue # <<<<<<<<<<<<<<
  11567. * sigs.discard(signum)
  11568. * self._handle_signal(signum)
  11569. */
  11570. goto __pyx_L3_continue;
  11571. /* "uvloop/loop.pyx":342
  11572. * self._signals.clear()
  11573. * for signum in data:
  11574. * if not signum: # <<<<<<<<<<<<<<
  11575. * # ignore null bytes written by set_wakeup_fd()
  11576. * continue
  11577. */
  11578. }
  11579. /* "uvloop/loop.pyx":345
  11580. * # ignore null bytes written by set_wakeup_fd()
  11581. * continue
  11582. * sigs.discard(signum) # <<<<<<<<<<<<<<
  11583. * self._handle_signal(signum)
  11584. *
  11585. */
  11586. if (unlikely(__pyx_v_sigs == Py_None)) {
  11587. PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "discard");
  11588. __PYX_ERR(2, 345, __pyx_L1_error)
  11589. }
  11590. __pyx_t_4 = __Pyx_PySet_Discard(__pyx_v_sigs, __pyx_v_signum); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 345, __pyx_L1_error)
  11591. /* "uvloop/loop.pyx":346
  11592. * continue
  11593. * sigs.discard(signum)
  11594. * self._handle_signal(signum) # <<<<<<<<<<<<<<
  11595. *
  11596. * for signum in sigs:
  11597. */
  11598. __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_vtab)->_handle_signal(__pyx_v_self, __pyx_v_signum); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 346, __pyx_L1_error)
  11599. __Pyx_GOTREF(__pyx_t_2);
  11600. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  11601. /* "uvloop/loop.pyx":341
  11602. * sigs = self._signals.copy()
  11603. * self._signals.clear()
  11604. * for signum in data: # <<<<<<<<<<<<<<
  11605. * if not signum:
  11606. * # ignore null bytes written by set_wakeup_fd()
  11607. */
  11608. __pyx_L3_continue:;
  11609. }
  11610. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  11611. /* "uvloop/loop.pyx":348
  11612. * self._handle_signal(signum)
  11613. *
  11614. * for signum in sigs: # <<<<<<<<<<<<<<
  11615. * # Since not all signals are registered by add_signal_handler()
  11616. * # (for instance, we use the default SIGINT handler) not all
  11617. */
  11618. __pyx_t_8 = 0;
  11619. __pyx_t_2 = __Pyx_set_iterator(__pyx_v_sigs, 1, (&__pyx_t_9), (&__pyx_t_10)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 348, __pyx_L1_error)
  11620. __Pyx_GOTREF(__pyx_t_2);
  11621. __Pyx_XDECREF(__pyx_t_1);
  11622. __pyx_t_1 = __pyx_t_2;
  11623. __pyx_t_2 = 0;
  11624. while (1) {
  11625. __pyx_t_11 = __Pyx_set_iter_next(__pyx_t_1, __pyx_t_9, &__pyx_t_8, &__pyx_t_2, __pyx_t_10);
  11626. if (unlikely(__pyx_t_11 == 0)) break;
  11627. if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(2, 348, __pyx_L1_error)
  11628. __Pyx_GOTREF(__pyx_t_2);
  11629. __Pyx_XDECREF_SET(__pyx_v_signum, __pyx_t_2);
  11630. __pyx_t_2 = 0;
  11631. /* "uvloop/loop.pyx":355
  11632. * # from __sighandler; this ensures that signals shouldn't be
  11633. * # lost even if set_wakeup_fd() couldn't write to the self-pipe.
  11634. * self._handle_signal(signum) # <<<<<<<<<<<<<<
  11635. *
  11636. * cdef _handle_signal(self, sig):
  11637. */
  11638. __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_vtab)->_handle_signal(__pyx_v_self, __pyx_v_signum); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 355, __pyx_L1_error)
  11639. __Pyx_GOTREF(__pyx_t_2);
  11640. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  11641. }
  11642. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  11643. /* "uvloop/loop.pyx":334
  11644. * self._invoke_signals(sigdata)
  11645. *
  11646. * cdef _invoke_signals(self, bytes data): # <<<<<<<<<<<<<<
  11647. * cdef set sigs
  11648. *
  11649. */
  11650. /* function exit code */
  11651. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  11652. goto __pyx_L0;
  11653. __pyx_L1_error:;
  11654. __Pyx_XDECREF(__pyx_t_1);
  11655. __Pyx_XDECREF(__pyx_t_2);
  11656. __Pyx_XDECREF(__pyx_t_3);
  11657. __Pyx_AddTraceback("uvloop.loop.Loop._invoke_signals", __pyx_clineno, __pyx_lineno, __pyx_filename);
  11658. __pyx_r = 0;
  11659. __pyx_L0:;
  11660. __Pyx_XDECREF(__pyx_v_sigs);
  11661. __Pyx_XDECREF(__pyx_v_signum);
  11662. __Pyx_XGIVEREF(__pyx_r);
  11663. __Pyx_RefNannyFinishContext();
  11664. return __pyx_r;
  11665. }
  11666. /* "uvloop/loop.pyx":357
  11667. * self._handle_signal(signum)
  11668. *
  11669. * cdef _handle_signal(self, sig): # <<<<<<<<<<<<<<
  11670. * cdef Handle handle
  11671. *
  11672. */
  11673. static PyObject *__pyx_f_6uvloop_4loop_4Loop__handle_signal(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_sig) {
  11674. struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_handle = 0;
  11675. PyObject *__pyx_r = NULL;
  11676. __Pyx_RefNannyDeclarations
  11677. PyObject *__pyx_t_1 = NULL;
  11678. PyObject *__pyx_t_2 = NULL;
  11679. PyObject *__pyx_t_3 = NULL;
  11680. PyObject *__pyx_t_4 = NULL;
  11681. PyObject *__pyx_t_5 = NULL;
  11682. int __pyx_t_6;
  11683. PyObject *__pyx_t_7 = NULL;
  11684. int __pyx_t_8;
  11685. int __pyx_t_9;
  11686. __Pyx_RefNannySetupContext("_handle_signal", 0);
  11687. /* "uvloop/loop.pyx":360
  11688. * cdef Handle handle
  11689. *
  11690. * try: # <<<<<<<<<<<<<<
  11691. * handle = <Handle>(self._signal_handlers[sig])
  11692. * except KeyError:
  11693. */
  11694. {
  11695. __Pyx_PyThreadState_declare
  11696. __Pyx_PyThreadState_assign
  11697. __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
  11698. __Pyx_XGOTREF(__pyx_t_1);
  11699. __Pyx_XGOTREF(__pyx_t_2);
  11700. __Pyx_XGOTREF(__pyx_t_3);
  11701. /*try:*/ {
  11702. /* "uvloop/loop.pyx":361
  11703. *
  11704. * try:
  11705. * handle = <Handle>(self._signal_handlers[sig]) # <<<<<<<<<<<<<<
  11706. * except KeyError:
  11707. * handle = None
  11708. */
  11709. if (unlikely(__pyx_v_self->_signal_handlers == Py_None)) {
  11710. PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
  11711. __PYX_ERR(2, 361, __pyx_L3_error)
  11712. }
  11713. __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_self->_signal_handlers, __pyx_v_sig); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 361, __pyx_L3_error)
  11714. __Pyx_GOTREF(__pyx_t_4);
  11715. __pyx_t_5 = __pyx_t_4;
  11716. __Pyx_INCREF(__pyx_t_5);
  11717. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  11718. __pyx_v_handle = ((struct __pyx_obj_6uvloop_4loop_Handle *)__pyx_t_5);
  11719. __pyx_t_5 = 0;
  11720. /* "uvloop/loop.pyx":360
  11721. * cdef Handle handle
  11722. *
  11723. * try: # <<<<<<<<<<<<<<
  11724. * handle = <Handle>(self._signal_handlers[sig])
  11725. * except KeyError:
  11726. */
  11727. }
  11728. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  11729. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  11730. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  11731. goto __pyx_L8_try_end;
  11732. __pyx_L3_error:;
  11733. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  11734. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  11735. /* "uvloop/loop.pyx":362
  11736. * try:
  11737. * handle = <Handle>(self._signal_handlers[sig])
  11738. * except KeyError: # <<<<<<<<<<<<<<
  11739. * handle = None
  11740. *
  11741. */
  11742. __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
  11743. if (__pyx_t_6) {
  11744. __Pyx_AddTraceback("uvloop.loop.Loop._handle_signal", __pyx_clineno, __pyx_lineno, __pyx_filename);
  11745. if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_7) < 0) __PYX_ERR(2, 362, __pyx_L5_except_error)
  11746. __Pyx_GOTREF(__pyx_t_5);
  11747. __Pyx_GOTREF(__pyx_t_4);
  11748. __Pyx_GOTREF(__pyx_t_7);
  11749. /* "uvloop/loop.pyx":363
  11750. * handle = <Handle>(self._signal_handlers[sig])
  11751. * except KeyError:
  11752. * handle = None # <<<<<<<<<<<<<<
  11753. *
  11754. * if handle is None:
  11755. */
  11756. __Pyx_INCREF(Py_None);
  11757. __Pyx_XDECREF_SET(__pyx_v_handle, ((struct __pyx_obj_6uvloop_4loop_Handle *)Py_None));
  11758. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  11759. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  11760. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  11761. goto __pyx_L4_exception_handled;
  11762. }
  11763. goto __pyx_L5_except_error;
  11764. __pyx_L5_except_error:;
  11765. /* "uvloop/loop.pyx":360
  11766. * cdef Handle handle
  11767. *
  11768. * try: # <<<<<<<<<<<<<<
  11769. * handle = <Handle>(self._signal_handlers[sig])
  11770. * except KeyError:
  11771. */
  11772. __Pyx_XGIVEREF(__pyx_t_1);
  11773. __Pyx_XGIVEREF(__pyx_t_2);
  11774. __Pyx_XGIVEREF(__pyx_t_3);
  11775. __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
  11776. goto __pyx_L1_error;
  11777. __pyx_L4_exception_handled:;
  11778. __Pyx_XGIVEREF(__pyx_t_1);
  11779. __Pyx_XGIVEREF(__pyx_t_2);
  11780. __Pyx_XGIVEREF(__pyx_t_3);
  11781. __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
  11782. __pyx_L8_try_end:;
  11783. }
  11784. /* "uvloop/loop.pyx":365
  11785. * handle = None
  11786. *
  11787. * if handle is None: # <<<<<<<<<<<<<<
  11788. * self._ceval_process_signals()
  11789. * return
  11790. */
  11791. __pyx_t_8 = (((PyObject *)__pyx_v_handle) == Py_None);
  11792. __pyx_t_9 = (__pyx_t_8 != 0);
  11793. if (__pyx_t_9) {
  11794. /* "uvloop/loop.pyx":366
  11795. *
  11796. * if handle is None:
  11797. * self._ceval_process_signals() # <<<<<<<<<<<<<<
  11798. * return
  11799. *
  11800. */
  11801. __pyx_t_7 = __pyx_f_6uvloop_4loop_4Loop__ceval_process_signals(__pyx_v_self); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 366, __pyx_L1_error)
  11802. __Pyx_GOTREF(__pyx_t_7);
  11803. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  11804. /* "uvloop/loop.pyx":367
  11805. * if handle is None:
  11806. * self._ceval_process_signals()
  11807. * return # <<<<<<<<<<<<<<
  11808. *
  11809. * if handle._cancelled:
  11810. */
  11811. __Pyx_XDECREF(__pyx_r);
  11812. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  11813. goto __pyx_L0;
  11814. /* "uvloop/loop.pyx":365
  11815. * handle = None
  11816. *
  11817. * if handle is None: # <<<<<<<<<<<<<<
  11818. * self._ceval_process_signals()
  11819. * return
  11820. */
  11821. }
  11822. /* "uvloop/loop.pyx":369
  11823. * return
  11824. *
  11825. * if handle._cancelled: # <<<<<<<<<<<<<<
  11826. * self.remove_signal_handler(sig) # Remove it properly.
  11827. * else:
  11828. */
  11829. __pyx_t_9 = (__pyx_v_handle->_cancelled != 0);
  11830. if (__pyx_t_9) {
  11831. /* "uvloop/loop.pyx":370
  11832. *
  11833. * if handle._cancelled:
  11834. * self.remove_signal_handler(sig) # Remove it properly. # <<<<<<<<<<<<<<
  11835. * else:
  11836. * self._call_soon_handle(handle)
  11837. */
  11838. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_remove_signal_handler); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 370, __pyx_L1_error)
  11839. __Pyx_GOTREF(__pyx_t_4);
  11840. __pyx_t_5 = NULL;
  11841. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
  11842. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
  11843. if (likely(__pyx_t_5)) {
  11844. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  11845. __Pyx_INCREF(__pyx_t_5);
  11846. __Pyx_INCREF(function);
  11847. __Pyx_DECREF_SET(__pyx_t_4, function);
  11848. }
  11849. }
  11850. __pyx_t_7 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_sig) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_sig);
  11851. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  11852. if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 370, __pyx_L1_error)
  11853. __Pyx_GOTREF(__pyx_t_7);
  11854. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  11855. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  11856. /* "uvloop/loop.pyx":369
  11857. * return
  11858. *
  11859. * if handle._cancelled: # <<<<<<<<<<<<<<
  11860. * self.remove_signal_handler(sig) # Remove it properly.
  11861. * else:
  11862. */
  11863. goto __pyx_L12;
  11864. }
  11865. /* "uvloop/loop.pyx":372
  11866. * self.remove_signal_handler(sig) # Remove it properly.
  11867. * else:
  11868. * self._call_soon_handle(handle) # <<<<<<<<<<<<<<
  11869. * self.handler_async.send()
  11870. *
  11871. */
  11872. /*else*/ {
  11873. __pyx_t_7 = __pyx_f_6uvloop_4loop_4Loop__call_soon_handle(__pyx_v_self, __pyx_v_handle); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 372, __pyx_L1_error)
  11874. __Pyx_GOTREF(__pyx_t_7);
  11875. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  11876. /* "uvloop/loop.pyx":373
  11877. * else:
  11878. * self._call_soon_handle(handle)
  11879. * self.handler_async.send() # <<<<<<<<<<<<<<
  11880. *
  11881. * cdef _on_wake(self):
  11882. */
  11883. __pyx_t_7 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVAsync *)__pyx_v_self->handler_async->__pyx_base.__pyx_vtab)->send(__pyx_v_self->handler_async); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 373, __pyx_L1_error)
  11884. __Pyx_GOTREF(__pyx_t_7);
  11885. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  11886. }
  11887. __pyx_L12:;
  11888. /* "uvloop/loop.pyx":357
  11889. * self._handle_signal(signum)
  11890. *
  11891. * cdef _handle_signal(self, sig): # <<<<<<<<<<<<<<
  11892. * cdef Handle handle
  11893. *
  11894. */
  11895. /* function exit code */
  11896. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  11897. goto __pyx_L0;
  11898. __pyx_L1_error:;
  11899. __Pyx_XDECREF(__pyx_t_4);
  11900. __Pyx_XDECREF(__pyx_t_5);
  11901. __Pyx_XDECREF(__pyx_t_7);
  11902. __Pyx_AddTraceback("uvloop.loop.Loop._handle_signal", __pyx_clineno, __pyx_lineno, __pyx_filename);
  11903. __pyx_r = 0;
  11904. __pyx_L0:;
  11905. __Pyx_XDECREF((PyObject *)__pyx_v_handle);
  11906. __Pyx_XGIVEREF(__pyx_r);
  11907. __Pyx_RefNannyFinishContext();
  11908. return __pyx_r;
  11909. }
  11910. /* "uvloop/loop.pyx":375
  11911. * self.handler_async.send()
  11912. *
  11913. * cdef _on_wake(self): # <<<<<<<<<<<<<<
  11914. * if ((self._ready_len > 0 or self._stopping) and
  11915. * not self.handler_idle.running):
  11916. */
  11917. static PyObject *__pyx_f_6uvloop_4loop_4Loop__on_wake(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) {
  11918. PyObject *__pyx_r = NULL;
  11919. __Pyx_RefNannyDeclarations
  11920. int __pyx_t_1;
  11921. int __pyx_t_2;
  11922. PyObject *__pyx_t_3 = NULL;
  11923. __Pyx_RefNannySetupContext("_on_wake", 0);
  11924. /* "uvloop/loop.pyx":376
  11925. *
  11926. * cdef _on_wake(self):
  11927. * if ((self._ready_len > 0 or self._stopping) and # <<<<<<<<<<<<<<
  11928. * not self.handler_idle.running):
  11929. * self.handler_idle.start()
  11930. */
  11931. __pyx_t_2 = ((__pyx_v_self->_ready_len > 0) != 0);
  11932. if (!__pyx_t_2) {
  11933. } else {
  11934. goto __pyx_L5_next_and;
  11935. }
  11936. __pyx_t_2 = (__pyx_v_self->_stopping != 0);
  11937. if (__pyx_t_2) {
  11938. } else {
  11939. __pyx_t_1 = __pyx_t_2;
  11940. goto __pyx_L4_bool_binop_done;
  11941. }
  11942. __pyx_L5_next_and:;
  11943. /* "uvloop/loop.pyx":377
  11944. * cdef _on_wake(self):
  11945. * if ((self._ready_len > 0 or self._stopping) and
  11946. * not self.handler_idle.running): # <<<<<<<<<<<<<<
  11947. * self.handler_idle.start()
  11948. *
  11949. */
  11950. __pyx_t_2 = ((!(__pyx_v_self->handler_idle->running != 0)) != 0);
  11951. __pyx_t_1 = __pyx_t_2;
  11952. __pyx_L4_bool_binop_done:;
  11953. /* "uvloop/loop.pyx":376
  11954. *
  11955. * cdef _on_wake(self):
  11956. * if ((self._ready_len > 0 or self._stopping) and # <<<<<<<<<<<<<<
  11957. * not self.handler_idle.running):
  11958. * self.handler_idle.start()
  11959. */
  11960. if (__pyx_t_1) {
  11961. /* "uvloop/loop.pyx":378
  11962. * if ((self._ready_len > 0 or self._stopping) and
  11963. * not self.handler_idle.running):
  11964. * self.handler_idle.start() # <<<<<<<<<<<<<<
  11965. *
  11966. * cdef _on_idle(self):
  11967. */
  11968. __pyx_t_3 = __pyx_f_6uvloop_4loop_6UVIdle_start(__pyx_v_self->handler_idle); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 378, __pyx_L1_error)
  11969. __Pyx_GOTREF(__pyx_t_3);
  11970. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  11971. /* "uvloop/loop.pyx":376
  11972. *
  11973. * cdef _on_wake(self):
  11974. * if ((self._ready_len > 0 or self._stopping) and # <<<<<<<<<<<<<<
  11975. * not self.handler_idle.running):
  11976. * self.handler_idle.start()
  11977. */
  11978. }
  11979. /* "uvloop/loop.pyx":375
  11980. * self.handler_async.send()
  11981. *
  11982. * cdef _on_wake(self): # <<<<<<<<<<<<<<
  11983. * if ((self._ready_len > 0 or self._stopping) and
  11984. * not self.handler_idle.running):
  11985. */
  11986. /* function exit code */
  11987. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  11988. goto __pyx_L0;
  11989. __pyx_L1_error:;
  11990. __Pyx_XDECREF(__pyx_t_3);
  11991. __Pyx_AddTraceback("uvloop.loop.Loop._on_wake", __pyx_clineno, __pyx_lineno, __pyx_filename);
  11992. __pyx_r = 0;
  11993. __pyx_L0:;
  11994. __Pyx_XGIVEREF(__pyx_r);
  11995. __Pyx_RefNannyFinishContext();
  11996. return __pyx_r;
  11997. }
  11998. /* "uvloop/loop.pyx":380
  11999. * self.handler_idle.start()
  12000. *
  12001. * cdef _on_idle(self): # <<<<<<<<<<<<<<
  12002. * cdef:
  12003. * int i, ntodo
  12004. */
  12005. static PyObject *__pyx_f_6uvloop_4loop_4Loop__on_idle(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) {
  12006. CYTHON_UNUSED int __pyx_v_i;
  12007. int __pyx_v_ntodo;
  12008. PyObject *__pyx_v_popleft = 0;
  12009. struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_handler = 0;
  12010. PyObject *__pyx_v_started = NULL;
  12011. PyObject *__pyx_v_ex = NULL;
  12012. PyObject *__pyx_v_delta = NULL;
  12013. PyObject *__pyx_r = NULL;
  12014. __Pyx_RefNannyDeclarations
  12015. PyObject *__pyx_t_1 = NULL;
  12016. Py_ssize_t __pyx_t_2;
  12017. int __pyx_t_3;
  12018. int __pyx_t_4;
  12019. PyObject *__pyx_t_5 = NULL;
  12020. PyObject *__pyx_t_6 = NULL;
  12021. PyObject *__pyx_t_7 = NULL;
  12022. PyObject *__pyx_t_8 = NULL;
  12023. PyObject *__pyx_t_9 = NULL;
  12024. PyObject *__pyx_t_10 = NULL;
  12025. int __pyx_t_11;
  12026. PyObject *__pyx_t_12 = NULL;
  12027. int __pyx_t_13;
  12028. char const *__pyx_t_14;
  12029. PyObject *__pyx_t_15 = NULL;
  12030. PyObject *__pyx_t_16 = NULL;
  12031. PyObject *__pyx_t_17 = NULL;
  12032. PyObject *__pyx_t_18 = NULL;
  12033. PyObject *__pyx_t_19 = NULL;
  12034. PyObject *__pyx_t_20 = NULL;
  12035. char const *__pyx_t_21;
  12036. int __pyx_t_22;
  12037. __Pyx_RefNannySetupContext("_on_idle", 0);
  12038. /* "uvloop/loop.pyx":383
  12039. * cdef:
  12040. * int i, ntodo
  12041. * object popleft = self._ready.popleft # <<<<<<<<<<<<<<
  12042. * Handle handler
  12043. *
  12044. */
  12045. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_ready, __pyx_n_s_popleft); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 383, __pyx_L1_error)
  12046. __Pyx_GOTREF(__pyx_t_1);
  12047. __pyx_v_popleft = __pyx_t_1;
  12048. __pyx_t_1 = 0;
  12049. /* "uvloop/loop.pyx":386
  12050. * Handle handler
  12051. *
  12052. * ntodo = len(self._ready) # <<<<<<<<<<<<<<
  12053. * if self._debug:
  12054. * for i from 0 <= i < ntodo:
  12055. */
  12056. __pyx_t_1 = __pyx_v_self->_ready;
  12057. __Pyx_INCREF(__pyx_t_1);
  12058. __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(2, 386, __pyx_L1_error)
  12059. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  12060. __pyx_v_ntodo = __pyx_t_2;
  12061. /* "uvloop/loop.pyx":387
  12062. *
  12063. * ntodo = len(self._ready)
  12064. * if self._debug: # <<<<<<<<<<<<<<
  12065. * for i from 0 <= i < ntodo:
  12066. * handler = <Handle> popleft()
  12067. */
  12068. __pyx_t_3 = (__pyx_v_self->_debug != 0);
  12069. if (__pyx_t_3) {
  12070. /* "uvloop/loop.pyx":388
  12071. * ntodo = len(self._ready)
  12072. * if self._debug:
  12073. * for i from 0 <= i < ntodo: # <<<<<<<<<<<<<<
  12074. * handler = <Handle> popleft()
  12075. * if handler._cancelled == 0:
  12076. */
  12077. __pyx_t_4 = __pyx_v_ntodo;
  12078. for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_4; __pyx_v_i++) {
  12079. /* "uvloop/loop.pyx":389
  12080. * if self._debug:
  12081. * for i from 0 <= i < ntodo:
  12082. * handler = <Handle> popleft() # <<<<<<<<<<<<<<
  12083. * if handler._cancelled == 0:
  12084. * try:
  12085. */
  12086. __Pyx_INCREF(__pyx_v_popleft);
  12087. __pyx_t_5 = __pyx_v_popleft; __pyx_t_6 = NULL;
  12088. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
  12089. __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
  12090. if (likely(__pyx_t_6)) {
  12091. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
  12092. __Pyx_INCREF(__pyx_t_6);
  12093. __Pyx_INCREF(function);
  12094. __Pyx_DECREF_SET(__pyx_t_5, function);
  12095. }
  12096. }
  12097. __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
  12098. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  12099. if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 389, __pyx_L1_error)
  12100. __Pyx_GOTREF(__pyx_t_1);
  12101. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  12102. __pyx_t_5 = __pyx_t_1;
  12103. __Pyx_INCREF(__pyx_t_5);
  12104. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  12105. __Pyx_XDECREF_SET(__pyx_v_handler, ((struct __pyx_obj_6uvloop_4loop_Handle *)__pyx_t_5));
  12106. __pyx_t_5 = 0;
  12107. /* "uvloop/loop.pyx":390
  12108. * for i from 0 <= i < ntodo:
  12109. * handler = <Handle> popleft()
  12110. * if handler._cancelled == 0: # <<<<<<<<<<<<<<
  12111. * try:
  12112. * started = time_monotonic()
  12113. */
  12114. __pyx_t_3 = ((__pyx_v_handler->_cancelled == 0) != 0);
  12115. if (__pyx_t_3) {
  12116. /* "uvloop/loop.pyx":391
  12117. * handler = <Handle> popleft()
  12118. * if handler._cancelled == 0:
  12119. * try: # <<<<<<<<<<<<<<
  12120. * started = time_monotonic()
  12121. * handler._run()
  12122. */
  12123. {
  12124. __Pyx_PyThreadState_declare
  12125. __Pyx_PyThreadState_assign
  12126. __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
  12127. __Pyx_XGOTREF(__pyx_t_7);
  12128. __Pyx_XGOTREF(__pyx_t_8);
  12129. __Pyx_XGOTREF(__pyx_t_9);
  12130. /*try:*/ {
  12131. /* "uvloop/loop.pyx":392
  12132. * if handler._cancelled == 0:
  12133. * try:
  12134. * started = time_monotonic() # <<<<<<<<<<<<<<
  12135. * handler._run()
  12136. * except BaseException as ex:
  12137. */
  12138. __Pyx_INCREF(__pyx_v_6uvloop_4loop_time_monotonic);
  12139. __pyx_t_1 = __pyx_v_6uvloop_4loop_time_monotonic; __pyx_t_6 = NULL;
  12140. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
  12141. __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
  12142. if (likely(__pyx_t_6)) {
  12143. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
  12144. __Pyx_INCREF(__pyx_t_6);
  12145. __Pyx_INCREF(function);
  12146. __Pyx_DECREF_SET(__pyx_t_1, function);
  12147. }
  12148. }
  12149. __pyx_t_5 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
  12150. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  12151. if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 392, __pyx_L7_error)
  12152. __Pyx_GOTREF(__pyx_t_5);
  12153. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  12154. __Pyx_XDECREF_SET(__pyx_v_started, __pyx_t_5);
  12155. __pyx_t_5 = 0;
  12156. /* "uvloop/loop.pyx":393
  12157. * try:
  12158. * started = time_monotonic()
  12159. * handler._run() # <<<<<<<<<<<<<<
  12160. * except BaseException as ex:
  12161. * self._stop(ex)
  12162. */
  12163. __pyx_t_5 = __pyx_f_6uvloop_4loop_6Handle__run(__pyx_v_handler); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 393, __pyx_L7_error)
  12164. __Pyx_GOTREF(__pyx_t_5);
  12165. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  12166. /* "uvloop/loop.pyx":391
  12167. * handler = <Handle> popleft()
  12168. * if handler._cancelled == 0:
  12169. * try: # <<<<<<<<<<<<<<
  12170. * started = time_monotonic()
  12171. * handler._run()
  12172. */
  12173. }
  12174. /* "uvloop/loop.pyx":398
  12175. * return
  12176. * else:
  12177. * delta = time_monotonic() - started # <<<<<<<<<<<<<<
  12178. * if delta > self.slow_callback_duration:
  12179. * aio_logger.warning(
  12180. */
  12181. /*else:*/ {
  12182. __Pyx_INCREF(__pyx_v_6uvloop_4loop_time_monotonic);
  12183. __pyx_t_1 = __pyx_v_6uvloop_4loop_time_monotonic; __pyx_t_6 = NULL;
  12184. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
  12185. __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
  12186. if (likely(__pyx_t_6)) {
  12187. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
  12188. __Pyx_INCREF(__pyx_t_6);
  12189. __Pyx_INCREF(function);
  12190. __Pyx_DECREF_SET(__pyx_t_1, function);
  12191. }
  12192. }
  12193. __pyx_t_5 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
  12194. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  12195. if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 398, __pyx_L9_except_error)
  12196. __Pyx_GOTREF(__pyx_t_5);
  12197. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  12198. __pyx_t_1 = PyNumber_Subtract(__pyx_t_5, __pyx_v_started); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 398, __pyx_L9_except_error)
  12199. __Pyx_GOTREF(__pyx_t_1);
  12200. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  12201. __Pyx_XDECREF_SET(__pyx_v_delta, __pyx_t_1);
  12202. __pyx_t_1 = 0;
  12203. /* "uvloop/loop.pyx":399
  12204. * else:
  12205. * delta = time_monotonic() - started
  12206. * if delta > self.slow_callback_duration: # <<<<<<<<<<<<<<
  12207. * aio_logger.warning(
  12208. * 'Executing %s took %.3f seconds',
  12209. */
  12210. __pyx_t_1 = PyObject_RichCompare(__pyx_v_delta, __pyx_v_self->slow_callback_duration, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 399, __pyx_L9_except_error)
  12211. __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(2, 399, __pyx_L9_except_error)
  12212. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  12213. if (__pyx_t_3) {
  12214. /* "uvloop/loop.pyx":400
  12215. * delta = time_monotonic() - started
  12216. * if delta > self.slow_callback_duration:
  12217. * aio_logger.warning( # <<<<<<<<<<<<<<
  12218. * 'Executing %s took %.3f seconds',
  12219. * handler._format_handle(), delta)
  12220. */
  12221. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_6uvloop_4loop_aio_logger, __pyx_n_s_warning); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 400, __pyx_L9_except_error)
  12222. __Pyx_GOTREF(__pyx_t_5);
  12223. /* "uvloop/loop.pyx":402
  12224. * aio_logger.warning(
  12225. * 'Executing %s took %.3f seconds',
  12226. * handler._format_handle(), delta) # <<<<<<<<<<<<<<
  12227. *
  12228. * else:
  12229. */
  12230. __pyx_t_6 = ((struct __pyx_vtabstruct_6uvloop_4loop_Handle *)__pyx_v_handler->__pyx_vtab)->_format_handle(__pyx_v_handler); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 402, __pyx_L9_except_error)
  12231. __Pyx_GOTREF(__pyx_t_6);
  12232. __pyx_t_10 = NULL;
  12233. __pyx_t_11 = 0;
  12234. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
  12235. __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_5);
  12236. if (likely(__pyx_t_10)) {
  12237. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
  12238. __Pyx_INCREF(__pyx_t_10);
  12239. __Pyx_INCREF(function);
  12240. __Pyx_DECREF_SET(__pyx_t_5, function);
  12241. __pyx_t_11 = 1;
  12242. }
  12243. }
  12244. #if CYTHON_FAST_PYCALL
  12245. if (PyFunction_Check(__pyx_t_5)) {
  12246. PyObject *__pyx_temp[4] = {__pyx_t_10, __pyx_kp_u_Executing_s_took_3f_seconds, __pyx_t_6, __pyx_v_delta};
  12247. __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_11, 3+__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 400, __pyx_L9_except_error)
  12248. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  12249. __Pyx_GOTREF(__pyx_t_1);
  12250. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  12251. } else
  12252. #endif
  12253. #if CYTHON_FAST_PYCCALL
  12254. if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
  12255. PyObject *__pyx_temp[4] = {__pyx_t_10, __pyx_kp_u_Executing_s_took_3f_seconds, __pyx_t_6, __pyx_v_delta};
  12256. __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_11, 3+__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 400, __pyx_L9_except_error)
  12257. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  12258. __Pyx_GOTREF(__pyx_t_1);
  12259. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  12260. } else
  12261. #endif
  12262. {
  12263. __pyx_t_12 = PyTuple_New(3+__pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(2, 400, __pyx_L9_except_error)
  12264. __Pyx_GOTREF(__pyx_t_12);
  12265. if (__pyx_t_10) {
  12266. __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
  12267. }
  12268. __Pyx_INCREF(__pyx_kp_u_Executing_s_took_3f_seconds);
  12269. __Pyx_GIVEREF(__pyx_kp_u_Executing_s_took_3f_seconds);
  12270. PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_11, __pyx_kp_u_Executing_s_took_3f_seconds);
  12271. __Pyx_GIVEREF(__pyx_t_6);
  12272. PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_11, __pyx_t_6);
  12273. __Pyx_INCREF(__pyx_v_delta);
  12274. __Pyx_GIVEREF(__pyx_v_delta);
  12275. PyTuple_SET_ITEM(__pyx_t_12, 2+__pyx_t_11, __pyx_v_delta);
  12276. __pyx_t_6 = 0;
  12277. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_12, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 400, __pyx_L9_except_error)
  12278. __Pyx_GOTREF(__pyx_t_1);
  12279. __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  12280. }
  12281. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  12282. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  12283. /* "uvloop/loop.pyx":399
  12284. * else:
  12285. * delta = time_monotonic() - started
  12286. * if delta > self.slow_callback_duration: # <<<<<<<<<<<<<<
  12287. * aio_logger.warning(
  12288. * 'Executing %s took %.3f seconds',
  12289. */
  12290. }
  12291. }
  12292. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  12293. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  12294. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  12295. goto __pyx_L14_try_end;
  12296. __pyx_L7_error:;
  12297. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  12298. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  12299. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  12300. /* "uvloop/loop.pyx":394
  12301. * started = time_monotonic()
  12302. * handler._run()
  12303. * except BaseException as ex: # <<<<<<<<<<<<<<
  12304. * self._stop(ex)
  12305. * return
  12306. */
  12307. __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_BaseException);
  12308. if (__pyx_t_11) {
  12309. __Pyx_AddTraceback("uvloop.loop.Loop._on_idle", __pyx_clineno, __pyx_lineno, __pyx_filename);
  12310. if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_5, &__pyx_t_12) < 0) __PYX_ERR(2, 394, __pyx_L9_except_error)
  12311. __Pyx_GOTREF(__pyx_t_1);
  12312. __Pyx_GOTREF(__pyx_t_5);
  12313. __Pyx_GOTREF(__pyx_t_12);
  12314. __Pyx_INCREF(__pyx_t_5);
  12315. __pyx_v_ex = __pyx_t_5;
  12316. /*try:*/ {
  12317. /* "uvloop/loop.pyx":395
  12318. * handler._run()
  12319. * except BaseException as ex:
  12320. * self._stop(ex) # <<<<<<<<<<<<<<
  12321. * return
  12322. * else:
  12323. */
  12324. __pyx_t_6 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_vtab)->_stop(__pyx_v_self, __pyx_v_ex); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 395, __pyx_L21_error)
  12325. __Pyx_GOTREF(__pyx_t_6);
  12326. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  12327. /* "uvloop/loop.pyx":396
  12328. * except BaseException as ex:
  12329. * self._stop(ex)
  12330. * return # <<<<<<<<<<<<<<
  12331. * else:
  12332. * delta = time_monotonic() - started
  12333. */
  12334. __Pyx_XDECREF(__pyx_r);
  12335. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  12336. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  12337. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  12338. __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  12339. goto __pyx_L20_return;
  12340. }
  12341. /* "uvloop/loop.pyx":394
  12342. * started = time_monotonic()
  12343. * handler._run()
  12344. * except BaseException as ex: # <<<<<<<<<<<<<<
  12345. * self._stop(ex)
  12346. * return
  12347. */
  12348. /*finally:*/ {
  12349. __pyx_L21_error:;
  12350. /*exception exit:*/{
  12351. __Pyx_PyThreadState_declare
  12352. __Pyx_PyThreadState_assign
  12353. __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0;
  12354. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  12355. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  12356. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20);
  12357. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17) < 0)) __Pyx_ErrFetch(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17);
  12358. __Pyx_XGOTREF(__pyx_t_15);
  12359. __Pyx_XGOTREF(__pyx_t_16);
  12360. __Pyx_XGOTREF(__pyx_t_17);
  12361. __Pyx_XGOTREF(__pyx_t_18);
  12362. __Pyx_XGOTREF(__pyx_t_19);
  12363. __Pyx_XGOTREF(__pyx_t_20);
  12364. __pyx_t_11 = __pyx_lineno; __pyx_t_13 = __pyx_clineno; __pyx_t_14 = __pyx_filename;
  12365. {
  12366. __Pyx_DECREF(__pyx_v_ex);
  12367. __pyx_v_ex = NULL;
  12368. }
  12369. if (PY_MAJOR_VERSION >= 3) {
  12370. __Pyx_XGIVEREF(__pyx_t_18);
  12371. __Pyx_XGIVEREF(__pyx_t_19);
  12372. __Pyx_XGIVEREF(__pyx_t_20);
  12373. __Pyx_ExceptionReset(__pyx_t_18, __pyx_t_19, __pyx_t_20);
  12374. }
  12375. __Pyx_XGIVEREF(__pyx_t_15);
  12376. __Pyx_XGIVEREF(__pyx_t_16);
  12377. __Pyx_XGIVEREF(__pyx_t_17);
  12378. __Pyx_ErrRestore(__pyx_t_15, __pyx_t_16, __pyx_t_17);
  12379. __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0;
  12380. __pyx_lineno = __pyx_t_11; __pyx_clineno = __pyx_t_13; __pyx_filename = __pyx_t_14;
  12381. goto __pyx_L9_except_error;
  12382. }
  12383. __pyx_L20_return: {
  12384. __pyx_t_20 = __pyx_r;
  12385. __pyx_r = 0;
  12386. __Pyx_DECREF(__pyx_v_ex);
  12387. __pyx_v_ex = NULL;
  12388. __pyx_r = __pyx_t_20;
  12389. __pyx_t_20 = 0;
  12390. goto __pyx_L10_except_return;
  12391. }
  12392. }
  12393. }
  12394. goto __pyx_L9_except_error;
  12395. __pyx_L9_except_error:;
  12396. /* "uvloop/loop.pyx":391
  12397. * handler = <Handle> popleft()
  12398. * if handler._cancelled == 0:
  12399. * try: # <<<<<<<<<<<<<<
  12400. * started = time_monotonic()
  12401. * handler._run()
  12402. */
  12403. __Pyx_XGIVEREF(__pyx_t_7);
  12404. __Pyx_XGIVEREF(__pyx_t_8);
  12405. __Pyx_XGIVEREF(__pyx_t_9);
  12406. __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
  12407. goto __pyx_L1_error;
  12408. __pyx_L10_except_return:;
  12409. __Pyx_XGIVEREF(__pyx_t_7);
  12410. __Pyx_XGIVEREF(__pyx_t_8);
  12411. __Pyx_XGIVEREF(__pyx_t_9);
  12412. __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
  12413. goto __pyx_L0;
  12414. __pyx_L14_try_end:;
  12415. }
  12416. /* "uvloop/loop.pyx":390
  12417. * for i from 0 <= i < ntodo:
  12418. * handler = <Handle> popleft()
  12419. * if handler._cancelled == 0: # <<<<<<<<<<<<<<
  12420. * try:
  12421. * started = time_monotonic()
  12422. */
  12423. }
  12424. }
  12425. /* "uvloop/loop.pyx":387
  12426. *
  12427. * ntodo = len(self._ready)
  12428. * if self._debug: # <<<<<<<<<<<<<<
  12429. * for i from 0 <= i < ntodo:
  12430. * handler = <Handle> popleft()
  12431. */
  12432. goto __pyx_L3;
  12433. }
  12434. /* "uvloop/loop.pyx":405
  12435. *
  12436. * else:
  12437. * for i from 0 <= i < ntodo: # <<<<<<<<<<<<<<
  12438. * handler = <Handle> popleft()
  12439. * if handler._cancelled == 0:
  12440. */
  12441. /*else*/ {
  12442. __pyx_t_4 = __pyx_v_ntodo;
  12443. for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_4; __pyx_v_i++) {
  12444. /* "uvloop/loop.pyx":406
  12445. * else:
  12446. * for i from 0 <= i < ntodo:
  12447. * handler = <Handle> popleft() # <<<<<<<<<<<<<<
  12448. * if handler._cancelled == 0:
  12449. * try:
  12450. */
  12451. __Pyx_INCREF(__pyx_v_popleft);
  12452. __pyx_t_5 = __pyx_v_popleft; __pyx_t_1 = NULL;
  12453. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
  12454. __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5);
  12455. if (likely(__pyx_t_1)) {
  12456. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
  12457. __Pyx_INCREF(__pyx_t_1);
  12458. __Pyx_INCREF(function);
  12459. __Pyx_DECREF_SET(__pyx_t_5, function);
  12460. }
  12461. }
  12462. __pyx_t_12 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
  12463. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  12464. if (unlikely(!__pyx_t_12)) __PYX_ERR(2, 406, __pyx_L1_error)
  12465. __Pyx_GOTREF(__pyx_t_12);
  12466. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  12467. __pyx_t_5 = __pyx_t_12;
  12468. __Pyx_INCREF(__pyx_t_5);
  12469. __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  12470. __Pyx_XDECREF_SET(__pyx_v_handler, ((struct __pyx_obj_6uvloop_4loop_Handle *)__pyx_t_5));
  12471. __pyx_t_5 = 0;
  12472. /* "uvloop/loop.pyx":407
  12473. * for i from 0 <= i < ntodo:
  12474. * handler = <Handle> popleft()
  12475. * if handler._cancelled == 0: # <<<<<<<<<<<<<<
  12476. * try:
  12477. * handler._run()
  12478. */
  12479. __pyx_t_3 = ((__pyx_v_handler->_cancelled == 0) != 0);
  12480. if (__pyx_t_3) {
  12481. /* "uvloop/loop.pyx":408
  12482. * handler = <Handle> popleft()
  12483. * if handler._cancelled == 0:
  12484. * try: # <<<<<<<<<<<<<<
  12485. * handler._run()
  12486. * except BaseException as ex:
  12487. */
  12488. {
  12489. __Pyx_PyThreadState_declare
  12490. __Pyx_PyThreadState_assign
  12491. __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
  12492. __Pyx_XGOTREF(__pyx_t_9);
  12493. __Pyx_XGOTREF(__pyx_t_8);
  12494. __Pyx_XGOTREF(__pyx_t_7);
  12495. /*try:*/ {
  12496. /* "uvloop/loop.pyx":409
  12497. * if handler._cancelled == 0:
  12498. * try:
  12499. * handler._run() # <<<<<<<<<<<<<<
  12500. * except BaseException as ex:
  12501. * self._stop(ex)
  12502. */
  12503. __pyx_t_5 = __pyx_f_6uvloop_4loop_6Handle__run(__pyx_v_handler); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 409, __pyx_L30_error)
  12504. __Pyx_GOTREF(__pyx_t_5);
  12505. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  12506. /* "uvloop/loop.pyx":408
  12507. * handler = <Handle> popleft()
  12508. * if handler._cancelled == 0:
  12509. * try: # <<<<<<<<<<<<<<
  12510. * handler._run()
  12511. * except BaseException as ex:
  12512. */
  12513. }
  12514. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  12515. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  12516. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  12517. goto __pyx_L37_try_end;
  12518. __pyx_L30_error:;
  12519. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  12520. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  12521. __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
  12522. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  12523. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  12524. /* "uvloop/loop.pyx":410
  12525. * try:
  12526. * handler._run()
  12527. * except BaseException as ex: # <<<<<<<<<<<<<<
  12528. * self._stop(ex)
  12529. * return
  12530. */
  12531. __pyx_t_13 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_BaseException);
  12532. if (__pyx_t_13) {
  12533. __Pyx_AddTraceback("uvloop.loop.Loop._on_idle", __pyx_clineno, __pyx_lineno, __pyx_filename);
  12534. if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_12, &__pyx_t_1) < 0) __PYX_ERR(2, 410, __pyx_L32_except_error)
  12535. __Pyx_GOTREF(__pyx_t_5);
  12536. __Pyx_GOTREF(__pyx_t_12);
  12537. __Pyx_GOTREF(__pyx_t_1);
  12538. __Pyx_INCREF(__pyx_t_12);
  12539. __pyx_v_ex = __pyx_t_12;
  12540. /*try:*/ {
  12541. /* "uvloop/loop.pyx":411
  12542. * handler._run()
  12543. * except BaseException as ex:
  12544. * self._stop(ex) # <<<<<<<<<<<<<<
  12545. * return
  12546. *
  12547. */
  12548. __pyx_t_6 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_vtab)->_stop(__pyx_v_self, __pyx_v_ex); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 411, __pyx_L43_error)
  12549. __Pyx_GOTREF(__pyx_t_6);
  12550. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  12551. /* "uvloop/loop.pyx":412
  12552. * except BaseException as ex:
  12553. * self._stop(ex)
  12554. * return # <<<<<<<<<<<<<<
  12555. *
  12556. * if len(self._queued_streams):
  12557. */
  12558. __Pyx_XDECREF(__pyx_r);
  12559. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  12560. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  12561. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  12562. __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  12563. goto __pyx_L42_return;
  12564. }
  12565. /* "uvloop/loop.pyx":410
  12566. * try:
  12567. * handler._run()
  12568. * except BaseException as ex: # <<<<<<<<<<<<<<
  12569. * self._stop(ex)
  12570. * return
  12571. */
  12572. /*finally:*/ {
  12573. __pyx_L43_error:;
  12574. /*exception exit:*/{
  12575. __Pyx_PyThreadState_declare
  12576. __Pyx_PyThreadState_assign
  12577. __pyx_t_20 = 0; __pyx_t_19 = 0; __pyx_t_18 = 0; __pyx_t_17 = 0; __pyx_t_16 = 0; __pyx_t_15 = 0;
  12578. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  12579. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  12580. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_17, &__pyx_t_16, &__pyx_t_15);
  12581. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_20, &__pyx_t_19, &__pyx_t_18) < 0)) __Pyx_ErrFetch(&__pyx_t_20, &__pyx_t_19, &__pyx_t_18);
  12582. __Pyx_XGOTREF(__pyx_t_20);
  12583. __Pyx_XGOTREF(__pyx_t_19);
  12584. __Pyx_XGOTREF(__pyx_t_18);
  12585. __Pyx_XGOTREF(__pyx_t_17);
  12586. __Pyx_XGOTREF(__pyx_t_16);
  12587. __Pyx_XGOTREF(__pyx_t_15);
  12588. __pyx_t_13 = __pyx_lineno; __pyx_t_11 = __pyx_clineno; __pyx_t_21 = __pyx_filename;
  12589. {
  12590. __Pyx_DECREF(__pyx_v_ex);
  12591. __pyx_v_ex = NULL;
  12592. }
  12593. if (PY_MAJOR_VERSION >= 3) {
  12594. __Pyx_XGIVEREF(__pyx_t_17);
  12595. __Pyx_XGIVEREF(__pyx_t_16);
  12596. __Pyx_XGIVEREF(__pyx_t_15);
  12597. __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_16, __pyx_t_15);
  12598. }
  12599. __Pyx_XGIVEREF(__pyx_t_20);
  12600. __Pyx_XGIVEREF(__pyx_t_19);
  12601. __Pyx_XGIVEREF(__pyx_t_18);
  12602. __Pyx_ErrRestore(__pyx_t_20, __pyx_t_19, __pyx_t_18);
  12603. __pyx_t_20 = 0; __pyx_t_19 = 0; __pyx_t_18 = 0; __pyx_t_17 = 0; __pyx_t_16 = 0; __pyx_t_15 = 0;
  12604. __pyx_lineno = __pyx_t_13; __pyx_clineno = __pyx_t_11; __pyx_filename = __pyx_t_21;
  12605. goto __pyx_L32_except_error;
  12606. }
  12607. __pyx_L42_return: {
  12608. __pyx_t_15 = __pyx_r;
  12609. __pyx_r = 0;
  12610. __Pyx_DECREF(__pyx_v_ex);
  12611. __pyx_v_ex = NULL;
  12612. __pyx_r = __pyx_t_15;
  12613. __pyx_t_15 = 0;
  12614. goto __pyx_L33_except_return;
  12615. }
  12616. }
  12617. }
  12618. goto __pyx_L32_except_error;
  12619. __pyx_L32_except_error:;
  12620. /* "uvloop/loop.pyx":408
  12621. * handler = <Handle> popleft()
  12622. * if handler._cancelled == 0:
  12623. * try: # <<<<<<<<<<<<<<
  12624. * handler._run()
  12625. * except BaseException as ex:
  12626. */
  12627. __Pyx_XGIVEREF(__pyx_t_9);
  12628. __Pyx_XGIVEREF(__pyx_t_8);
  12629. __Pyx_XGIVEREF(__pyx_t_7);
  12630. __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
  12631. goto __pyx_L1_error;
  12632. __pyx_L33_except_return:;
  12633. __Pyx_XGIVEREF(__pyx_t_9);
  12634. __Pyx_XGIVEREF(__pyx_t_8);
  12635. __Pyx_XGIVEREF(__pyx_t_7);
  12636. __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
  12637. goto __pyx_L0;
  12638. __pyx_L37_try_end:;
  12639. }
  12640. /* "uvloop/loop.pyx":407
  12641. * for i from 0 <= i < ntodo:
  12642. * handler = <Handle> popleft()
  12643. * if handler._cancelled == 0: # <<<<<<<<<<<<<<
  12644. * try:
  12645. * handler._run()
  12646. */
  12647. }
  12648. }
  12649. }
  12650. __pyx_L3:;
  12651. /* "uvloop/loop.pyx":414
  12652. * return
  12653. *
  12654. * if len(self._queued_streams): # <<<<<<<<<<<<<<
  12655. * self._exec_queued_writes()
  12656. *
  12657. */
  12658. __pyx_t_1 = __pyx_v_self->_queued_streams;
  12659. __Pyx_INCREF(__pyx_t_1);
  12660. if (unlikely(__pyx_t_1 == Py_None)) {
  12661. PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
  12662. __PYX_ERR(2, 414, __pyx_L1_error)
  12663. }
  12664. __pyx_t_2 = PySet_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(2, 414, __pyx_L1_error)
  12665. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  12666. __pyx_t_3 = (__pyx_t_2 != 0);
  12667. if (__pyx_t_3) {
  12668. /* "uvloop/loop.pyx":415
  12669. *
  12670. * if len(self._queued_streams):
  12671. * self._exec_queued_writes() # <<<<<<<<<<<<<<
  12672. *
  12673. * self._ready_len = len(self._ready)
  12674. */
  12675. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_vtab)->_exec_queued_writes(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 415, __pyx_L1_error)
  12676. __Pyx_GOTREF(__pyx_t_1);
  12677. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  12678. /* "uvloop/loop.pyx":414
  12679. * return
  12680. *
  12681. * if len(self._queued_streams): # <<<<<<<<<<<<<<
  12682. * self._exec_queued_writes()
  12683. *
  12684. */
  12685. }
  12686. /* "uvloop/loop.pyx":417
  12687. * self._exec_queued_writes()
  12688. *
  12689. * self._ready_len = len(self._ready) # <<<<<<<<<<<<<<
  12690. * if self._ready_len == 0 and self.handler_idle.running:
  12691. * self.handler_idle.stop()
  12692. */
  12693. __pyx_t_1 = __pyx_v_self->_ready;
  12694. __Pyx_INCREF(__pyx_t_1);
  12695. __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(2, 417, __pyx_L1_error)
  12696. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  12697. __pyx_v_self->_ready_len = __pyx_t_2;
  12698. /* "uvloop/loop.pyx":418
  12699. *
  12700. * self._ready_len = len(self._ready)
  12701. * if self._ready_len == 0 and self.handler_idle.running: # <<<<<<<<<<<<<<
  12702. * self.handler_idle.stop()
  12703. *
  12704. */
  12705. __pyx_t_22 = ((__pyx_v_self->_ready_len == 0) != 0);
  12706. if (__pyx_t_22) {
  12707. } else {
  12708. __pyx_t_3 = __pyx_t_22;
  12709. goto __pyx_L51_bool_binop_done;
  12710. }
  12711. __pyx_t_22 = (__pyx_v_self->handler_idle->running != 0);
  12712. __pyx_t_3 = __pyx_t_22;
  12713. __pyx_L51_bool_binop_done:;
  12714. if (__pyx_t_3) {
  12715. /* "uvloop/loop.pyx":419
  12716. * self._ready_len = len(self._ready)
  12717. * if self._ready_len == 0 and self.handler_idle.running:
  12718. * self.handler_idle.stop() # <<<<<<<<<<<<<<
  12719. *
  12720. * if self._stopping:
  12721. */
  12722. __pyx_t_1 = __pyx_f_6uvloop_4loop_6UVIdle_stop(__pyx_v_self->handler_idle); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 419, __pyx_L1_error)
  12723. __Pyx_GOTREF(__pyx_t_1);
  12724. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  12725. /* "uvloop/loop.pyx":418
  12726. *
  12727. * self._ready_len = len(self._ready)
  12728. * if self._ready_len == 0 and self.handler_idle.running: # <<<<<<<<<<<<<<
  12729. * self.handler_idle.stop()
  12730. *
  12731. */
  12732. }
  12733. /* "uvloop/loop.pyx":421
  12734. * self.handler_idle.stop()
  12735. *
  12736. * if self._stopping: # <<<<<<<<<<<<<<
  12737. * uv.uv_stop(self.uvloop) # void
  12738. *
  12739. */
  12740. __pyx_t_3 = (__pyx_v_self->_stopping != 0);
  12741. if (__pyx_t_3) {
  12742. /* "uvloop/loop.pyx":422
  12743. *
  12744. * if self._stopping:
  12745. * uv.uv_stop(self.uvloop) # void # <<<<<<<<<<<<<<
  12746. *
  12747. * cdef _stop(self, exc):
  12748. */
  12749. uv_stop(__pyx_v_self->uvloop);
  12750. /* "uvloop/loop.pyx":421
  12751. * self.handler_idle.stop()
  12752. *
  12753. * if self._stopping: # <<<<<<<<<<<<<<
  12754. * uv.uv_stop(self.uvloop) # void
  12755. *
  12756. */
  12757. }
  12758. /* "uvloop/loop.pyx":380
  12759. * self.handler_idle.start()
  12760. *
  12761. * cdef _on_idle(self): # <<<<<<<<<<<<<<
  12762. * cdef:
  12763. * int i, ntodo
  12764. */
  12765. /* function exit code */
  12766. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  12767. goto __pyx_L0;
  12768. __pyx_L1_error:;
  12769. __Pyx_XDECREF(__pyx_t_1);
  12770. __Pyx_XDECREF(__pyx_t_5);
  12771. __Pyx_XDECREF(__pyx_t_6);
  12772. __Pyx_XDECREF(__pyx_t_10);
  12773. __Pyx_XDECREF(__pyx_t_12);
  12774. __Pyx_AddTraceback("uvloop.loop.Loop._on_idle", __pyx_clineno, __pyx_lineno, __pyx_filename);
  12775. __pyx_r = 0;
  12776. __pyx_L0:;
  12777. __Pyx_XDECREF(__pyx_v_popleft);
  12778. __Pyx_XDECREF((PyObject *)__pyx_v_handler);
  12779. __Pyx_XDECREF(__pyx_v_started);
  12780. __Pyx_XDECREF(__pyx_v_ex);
  12781. __Pyx_XDECREF(__pyx_v_delta);
  12782. __Pyx_XGIVEREF(__pyx_r);
  12783. __Pyx_RefNannyFinishContext();
  12784. return __pyx_r;
  12785. }
  12786. /* "uvloop/loop.pyx":424
  12787. * uv.uv_stop(self.uvloop) # void
  12788. *
  12789. * cdef _stop(self, exc): # <<<<<<<<<<<<<<
  12790. * if exc is not None:
  12791. * self._last_error = exc
  12792. */
  12793. static PyObject *__pyx_f_6uvloop_4loop_4Loop__stop(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_exc) {
  12794. PyObject *__pyx_r = NULL;
  12795. __Pyx_RefNannyDeclarations
  12796. int __pyx_t_1;
  12797. int __pyx_t_2;
  12798. PyObject *__pyx_t_3 = NULL;
  12799. __Pyx_RefNannySetupContext("_stop", 0);
  12800. /* "uvloop/loop.pyx":425
  12801. *
  12802. * cdef _stop(self, exc):
  12803. * if exc is not None: # <<<<<<<<<<<<<<
  12804. * self._last_error = exc
  12805. * if self._stopping == 1:
  12806. */
  12807. __pyx_t_1 = (__pyx_v_exc != Py_None);
  12808. __pyx_t_2 = (__pyx_t_1 != 0);
  12809. if (__pyx_t_2) {
  12810. /* "uvloop/loop.pyx":426
  12811. * cdef _stop(self, exc):
  12812. * if exc is not None:
  12813. * self._last_error = exc # <<<<<<<<<<<<<<
  12814. * if self._stopping == 1:
  12815. * return
  12816. */
  12817. __Pyx_INCREF(__pyx_v_exc);
  12818. __Pyx_GIVEREF(__pyx_v_exc);
  12819. __Pyx_GOTREF(__pyx_v_self->_last_error);
  12820. __Pyx_DECREF(__pyx_v_self->_last_error);
  12821. __pyx_v_self->_last_error = __pyx_v_exc;
  12822. /* "uvloop/loop.pyx":425
  12823. *
  12824. * cdef _stop(self, exc):
  12825. * if exc is not None: # <<<<<<<<<<<<<<
  12826. * self._last_error = exc
  12827. * if self._stopping == 1:
  12828. */
  12829. }
  12830. /* "uvloop/loop.pyx":427
  12831. * if exc is not None:
  12832. * self._last_error = exc
  12833. * if self._stopping == 1: # <<<<<<<<<<<<<<
  12834. * return
  12835. * self._stopping = 1
  12836. */
  12837. __pyx_t_2 = ((__pyx_v_self->_stopping == 1) != 0);
  12838. if (__pyx_t_2) {
  12839. /* "uvloop/loop.pyx":428
  12840. * self._last_error = exc
  12841. * if self._stopping == 1:
  12842. * return # <<<<<<<<<<<<<<
  12843. * self._stopping = 1
  12844. * if not self.handler_idle.running:
  12845. */
  12846. __Pyx_XDECREF(__pyx_r);
  12847. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  12848. goto __pyx_L0;
  12849. /* "uvloop/loop.pyx":427
  12850. * if exc is not None:
  12851. * self._last_error = exc
  12852. * if self._stopping == 1: # <<<<<<<<<<<<<<
  12853. * return
  12854. * self._stopping = 1
  12855. */
  12856. }
  12857. /* "uvloop/loop.pyx":429
  12858. * if self._stopping == 1:
  12859. * return
  12860. * self._stopping = 1 # <<<<<<<<<<<<<<
  12861. * if not self.handler_idle.running:
  12862. * self.handler_idle.start()
  12863. */
  12864. __pyx_v_self->_stopping = 1;
  12865. /* "uvloop/loop.pyx":430
  12866. * return
  12867. * self._stopping = 1
  12868. * if not self.handler_idle.running: # <<<<<<<<<<<<<<
  12869. * self.handler_idle.start()
  12870. *
  12871. */
  12872. __pyx_t_2 = ((!(__pyx_v_self->handler_idle->running != 0)) != 0);
  12873. if (__pyx_t_2) {
  12874. /* "uvloop/loop.pyx":431
  12875. * self._stopping = 1
  12876. * if not self.handler_idle.running:
  12877. * self.handler_idle.start() # <<<<<<<<<<<<<<
  12878. *
  12879. * cdef __run(self, uv.uv_run_mode mode):
  12880. */
  12881. __pyx_t_3 = __pyx_f_6uvloop_4loop_6UVIdle_start(__pyx_v_self->handler_idle); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 431, __pyx_L1_error)
  12882. __Pyx_GOTREF(__pyx_t_3);
  12883. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  12884. /* "uvloop/loop.pyx":430
  12885. * return
  12886. * self._stopping = 1
  12887. * if not self.handler_idle.running: # <<<<<<<<<<<<<<
  12888. * self.handler_idle.start()
  12889. *
  12890. */
  12891. }
  12892. /* "uvloop/loop.pyx":424
  12893. * uv.uv_stop(self.uvloop) # void
  12894. *
  12895. * cdef _stop(self, exc): # <<<<<<<<<<<<<<
  12896. * if exc is not None:
  12897. * self._last_error = exc
  12898. */
  12899. /* function exit code */
  12900. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  12901. goto __pyx_L0;
  12902. __pyx_L1_error:;
  12903. __Pyx_XDECREF(__pyx_t_3);
  12904. __Pyx_AddTraceback("uvloop.loop.Loop._stop", __pyx_clineno, __pyx_lineno, __pyx_filename);
  12905. __pyx_r = 0;
  12906. __pyx_L0:;
  12907. __Pyx_XGIVEREF(__pyx_r);
  12908. __Pyx_RefNannyFinishContext();
  12909. return __pyx_r;
  12910. }
  12911. /* "uvloop/loop.pyx":433
  12912. * self.handler_idle.start()
  12913. *
  12914. * cdef __run(self, uv.uv_run_mode mode): # <<<<<<<<<<<<<<
  12915. * # Although every UVHandle holds a reference to the loop,
  12916. * # we want to do everything to ensure that the loop will
  12917. */
  12918. static PyObject *__pyx_f_6uvloop_4loop_4Loop___run(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, uv_run_mode __pyx_v_mode) {
  12919. int __pyx_v_err;
  12920. PyObject *__pyx_r = NULL;
  12921. __Pyx_RefNannyDeclarations
  12922. int __pyx_t_1;
  12923. PyObject *__pyx_t_2 = NULL;
  12924. __Pyx_RefNannySetupContext("__run", 0);
  12925. /* "uvloop/loop.pyx":438
  12926. * # never deallocate during the run -- so we do some
  12927. * # manual refs management.
  12928. * Py_INCREF(self) # <<<<<<<<<<<<<<
  12929. * with nogil:
  12930. * err = uv.uv_run(self.uvloop, mode)
  12931. */
  12932. Py_INCREF(((PyObject *)__pyx_v_self));
  12933. /* "uvloop/loop.pyx":439
  12934. * # manual refs management.
  12935. * Py_INCREF(self)
  12936. * with nogil: # <<<<<<<<<<<<<<
  12937. * err = uv.uv_run(self.uvloop, mode)
  12938. * Py_DECREF(self)
  12939. */
  12940. {
  12941. #ifdef WITH_THREAD
  12942. PyThreadState *_save;
  12943. Py_UNBLOCK_THREADS
  12944. __Pyx_FastGIL_Remember();
  12945. #endif
  12946. /*try:*/ {
  12947. /* "uvloop/loop.pyx":440
  12948. * Py_INCREF(self)
  12949. * with nogil:
  12950. * err = uv.uv_run(self.uvloop, mode) # <<<<<<<<<<<<<<
  12951. * Py_DECREF(self)
  12952. *
  12953. */
  12954. __pyx_v_err = uv_run(__pyx_v_self->uvloop, __pyx_v_mode);
  12955. }
  12956. /* "uvloop/loop.pyx":439
  12957. * # manual refs management.
  12958. * Py_INCREF(self)
  12959. * with nogil: # <<<<<<<<<<<<<<
  12960. * err = uv.uv_run(self.uvloop, mode)
  12961. * Py_DECREF(self)
  12962. */
  12963. /*finally:*/ {
  12964. /*normal exit:*/{
  12965. #ifdef WITH_THREAD
  12966. __Pyx_FastGIL_Forget();
  12967. Py_BLOCK_THREADS
  12968. #endif
  12969. goto __pyx_L5;
  12970. }
  12971. __pyx_L5:;
  12972. }
  12973. }
  12974. /* "uvloop/loop.pyx":441
  12975. * with nogil:
  12976. * err = uv.uv_run(self.uvloop, mode)
  12977. * Py_DECREF(self) # <<<<<<<<<<<<<<
  12978. *
  12979. * if err < 0:
  12980. */
  12981. Py_DECREF(((PyObject *)__pyx_v_self));
  12982. /* "uvloop/loop.pyx":443
  12983. * Py_DECREF(self)
  12984. *
  12985. * if err < 0: # <<<<<<<<<<<<<<
  12986. * raise convert_error(err)
  12987. *
  12988. */
  12989. __pyx_t_1 = ((__pyx_v_err < 0) != 0);
  12990. if (unlikely(__pyx_t_1)) {
  12991. /* "uvloop/loop.pyx":444
  12992. *
  12993. * if err < 0:
  12994. * raise convert_error(err) # <<<<<<<<<<<<<<
  12995. *
  12996. * cdef _run(self, uv.uv_run_mode mode):
  12997. */
  12998. __pyx_t_2 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 444, __pyx_L1_error)
  12999. __Pyx_GOTREF(__pyx_t_2);
  13000. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  13001. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  13002. __PYX_ERR(2, 444, __pyx_L1_error)
  13003. /* "uvloop/loop.pyx":443
  13004. * Py_DECREF(self)
  13005. *
  13006. * if err < 0: # <<<<<<<<<<<<<<
  13007. * raise convert_error(err)
  13008. *
  13009. */
  13010. }
  13011. /* "uvloop/loop.pyx":433
  13012. * self.handler_idle.start()
  13013. *
  13014. * cdef __run(self, uv.uv_run_mode mode): # <<<<<<<<<<<<<<
  13015. * # Although every UVHandle holds a reference to the loop,
  13016. * # we want to do everything to ensure that the loop will
  13017. */
  13018. /* function exit code */
  13019. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  13020. goto __pyx_L0;
  13021. __pyx_L1_error:;
  13022. __Pyx_XDECREF(__pyx_t_2);
  13023. __Pyx_AddTraceback("uvloop.loop.Loop.__run", __pyx_clineno, __pyx_lineno, __pyx_filename);
  13024. __pyx_r = 0;
  13025. __pyx_L0:;
  13026. __Pyx_XGIVEREF(__pyx_r);
  13027. __Pyx_RefNannyFinishContext();
  13028. return __pyx_r;
  13029. }
  13030. /* "uvloop/loop.pyx":446
  13031. * raise convert_error(err)
  13032. *
  13033. * cdef _run(self, uv.uv_run_mode mode): # <<<<<<<<<<<<<<
  13034. * cdef int err
  13035. *
  13036. */
  13037. static PyObject *__pyx_f_6uvloop_4loop_4Loop__run(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, uv_run_mode __pyx_v_mode) {
  13038. PyObject *__pyx_r = NULL;
  13039. __Pyx_RefNannyDeclarations
  13040. int __pyx_t_1;
  13041. PyObject *__pyx_t_2 = NULL;
  13042. int __pyx_t_3;
  13043. int __pyx_t_4;
  13044. PyObject *__pyx_t_5 = NULL;
  13045. PyObject *__pyx_t_6 = NULL;
  13046. int __pyx_t_7;
  13047. int __pyx_t_8;
  13048. char const *__pyx_t_9;
  13049. PyObject *__pyx_t_10 = NULL;
  13050. PyObject *__pyx_t_11 = NULL;
  13051. PyObject *__pyx_t_12 = NULL;
  13052. PyObject *__pyx_t_13 = NULL;
  13053. PyObject *__pyx_t_14 = NULL;
  13054. PyObject *__pyx_t_15 = NULL;
  13055. __Pyx_RefNannySetupContext("_run", 0);
  13056. /* "uvloop/loop.pyx":449
  13057. * cdef int err
  13058. *
  13059. * if self._closed == 1: # <<<<<<<<<<<<<<
  13060. * raise RuntimeError('unable to start the loop; it was closed')
  13061. *
  13062. */
  13063. __pyx_t_1 = ((__pyx_v_self->_closed == 1) != 0);
  13064. if (unlikely(__pyx_t_1)) {
  13065. /* "uvloop/loop.pyx":450
  13066. *
  13067. * if self._closed == 1:
  13068. * raise RuntimeError('unable to start the loop; it was closed') # <<<<<<<<<<<<<<
  13069. *
  13070. * if self._running == 1:
  13071. */
  13072. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 450, __pyx_L1_error)
  13073. __Pyx_GOTREF(__pyx_t_2);
  13074. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  13075. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  13076. __PYX_ERR(2, 450, __pyx_L1_error)
  13077. /* "uvloop/loop.pyx":449
  13078. * cdef int err
  13079. *
  13080. * if self._closed == 1: # <<<<<<<<<<<<<<
  13081. * raise RuntimeError('unable to start the loop; it was closed')
  13082. *
  13083. */
  13084. }
  13085. /* "uvloop/loop.pyx":452
  13086. * raise RuntimeError('unable to start the loop; it was closed')
  13087. *
  13088. * if self._running == 1: # <<<<<<<<<<<<<<
  13089. * raise RuntimeError('this event loop is already running.')
  13090. *
  13091. */
  13092. __pyx_t_1 = ((__pyx_v_self->_running == 1) != 0);
  13093. if (unlikely(__pyx_t_1)) {
  13094. /* "uvloop/loop.pyx":453
  13095. *
  13096. * if self._running == 1:
  13097. * raise RuntimeError('this event loop is already running.') # <<<<<<<<<<<<<<
  13098. *
  13099. * if (aio_get_running_loop is not None and
  13100. */
  13101. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 453, __pyx_L1_error)
  13102. __Pyx_GOTREF(__pyx_t_2);
  13103. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  13104. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  13105. __PYX_ERR(2, 453, __pyx_L1_error)
  13106. /* "uvloop/loop.pyx":452
  13107. * raise RuntimeError('unable to start the loop; it was closed')
  13108. *
  13109. * if self._running == 1: # <<<<<<<<<<<<<<
  13110. * raise RuntimeError('this event loop is already running.')
  13111. *
  13112. */
  13113. }
  13114. /* "uvloop/loop.pyx":455
  13115. * raise RuntimeError('this event loop is already running.')
  13116. *
  13117. * if (aio_get_running_loop is not None and # <<<<<<<<<<<<<<
  13118. * aio_get_running_loop() is not None):
  13119. * raise RuntimeError(
  13120. */
  13121. __pyx_t_3 = (__pyx_v_6uvloop_4loop_aio_get_running_loop != Py_None);
  13122. __pyx_t_4 = (__pyx_t_3 != 0);
  13123. if (__pyx_t_4) {
  13124. } else {
  13125. __pyx_t_1 = __pyx_t_4;
  13126. goto __pyx_L6_bool_binop_done;
  13127. }
  13128. /* "uvloop/loop.pyx":456
  13129. *
  13130. * if (aio_get_running_loop is not None and
  13131. * aio_get_running_loop() is not None): # <<<<<<<<<<<<<<
  13132. * raise RuntimeError(
  13133. * 'Cannot run the event loop while another loop is running')
  13134. */
  13135. __Pyx_INCREF(__pyx_v_6uvloop_4loop_aio_get_running_loop);
  13136. __pyx_t_5 = __pyx_v_6uvloop_4loop_aio_get_running_loop; __pyx_t_6 = NULL;
  13137. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
  13138. __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
  13139. if (likely(__pyx_t_6)) {
  13140. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
  13141. __Pyx_INCREF(__pyx_t_6);
  13142. __Pyx_INCREF(function);
  13143. __Pyx_DECREF_SET(__pyx_t_5, function);
  13144. }
  13145. }
  13146. __pyx_t_2 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
  13147. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  13148. if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 456, __pyx_L1_error)
  13149. __Pyx_GOTREF(__pyx_t_2);
  13150. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  13151. __pyx_t_4 = (__pyx_t_2 != Py_None);
  13152. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  13153. __pyx_t_3 = (__pyx_t_4 != 0);
  13154. __pyx_t_1 = __pyx_t_3;
  13155. __pyx_L6_bool_binop_done:;
  13156. /* "uvloop/loop.pyx":455
  13157. * raise RuntimeError('this event loop is already running.')
  13158. *
  13159. * if (aio_get_running_loop is not None and # <<<<<<<<<<<<<<
  13160. * aio_get_running_loop() is not None):
  13161. * raise RuntimeError(
  13162. */
  13163. if (unlikely(__pyx_t_1)) {
  13164. /* "uvloop/loop.pyx":457
  13165. * if (aio_get_running_loop is not None and
  13166. * aio_get_running_loop() is not None):
  13167. * raise RuntimeError( # <<<<<<<<<<<<<<
  13168. * 'Cannot run the event loop while another loop is running')
  13169. *
  13170. */
  13171. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 457, __pyx_L1_error)
  13172. __Pyx_GOTREF(__pyx_t_2);
  13173. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  13174. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  13175. __PYX_ERR(2, 457, __pyx_L1_error)
  13176. /* "uvloop/loop.pyx":455
  13177. * raise RuntimeError('this event loop is already running.')
  13178. *
  13179. * if (aio_get_running_loop is not None and # <<<<<<<<<<<<<<
  13180. * aio_get_running_loop() is not None):
  13181. * raise RuntimeError(
  13182. */
  13183. }
  13184. /* "uvloop/loop.pyx":461
  13185. *
  13186. * # reset _last_error
  13187. * self._last_error = None # <<<<<<<<<<<<<<
  13188. *
  13189. * self._thread_id = PyThread_get_thread_ident()
  13190. */
  13191. __Pyx_INCREF(Py_None);
  13192. __Pyx_GIVEREF(Py_None);
  13193. __Pyx_GOTREF(__pyx_v_self->_last_error);
  13194. __Pyx_DECREF(__pyx_v_self->_last_error);
  13195. __pyx_v_self->_last_error = Py_None;
  13196. /* "uvloop/loop.pyx":463
  13197. * self._last_error = None
  13198. *
  13199. * self._thread_id = PyThread_get_thread_ident() # <<<<<<<<<<<<<<
  13200. * self._thread_is_main = MAIN_THREAD_ID == self._thread_id
  13201. * self._running = 1
  13202. */
  13203. __pyx_v_self->_thread_id = PyThread_get_thread_ident();
  13204. /* "uvloop/loop.pyx":464
  13205. *
  13206. * self._thread_id = PyThread_get_thread_ident()
  13207. * self._thread_is_main = MAIN_THREAD_ID == self._thread_id # <<<<<<<<<<<<<<
  13208. * self._running = 1
  13209. *
  13210. */
  13211. __pyx_v_self->_thread_is_main = (__pyx_v_6uvloop_4loop_MAIN_THREAD_ID == __pyx_v_self->_thread_id);
  13212. /* "uvloop/loop.pyx":465
  13213. * self._thread_id = PyThread_get_thread_ident()
  13214. * self._thread_is_main = MAIN_THREAD_ID == self._thread_id
  13215. * self._running = 1 # <<<<<<<<<<<<<<
  13216. *
  13217. * self.handler_check__exec_writes.start()
  13218. */
  13219. __pyx_v_self->_running = 1;
  13220. /* "uvloop/loop.pyx":467
  13221. * self._running = 1
  13222. *
  13223. * self.handler_check__exec_writes.start() # <<<<<<<<<<<<<<
  13224. * self.handler_idle.start()
  13225. *
  13226. */
  13227. __pyx_t_2 = __pyx_f_6uvloop_4loop_7UVCheck_start(__pyx_v_self->handler_check__exec_writes); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 467, __pyx_L1_error)
  13228. __Pyx_GOTREF(__pyx_t_2);
  13229. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  13230. /* "uvloop/loop.pyx":468
  13231. *
  13232. * self.handler_check__exec_writes.start()
  13233. * self.handler_idle.start() # <<<<<<<<<<<<<<
  13234. *
  13235. * self._recv_signals_start()
  13236. */
  13237. __pyx_t_2 = __pyx_f_6uvloop_4loop_6UVIdle_start(__pyx_v_self->handler_idle); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 468, __pyx_L1_error)
  13238. __Pyx_GOTREF(__pyx_t_2);
  13239. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  13240. /* "uvloop/loop.pyx":470
  13241. * self.handler_idle.start()
  13242. *
  13243. * self._recv_signals_start() # <<<<<<<<<<<<<<
  13244. *
  13245. * if aio_set_running_loop is not None:
  13246. */
  13247. __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_vtab)->_recv_signals_start(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 470, __pyx_L1_error)
  13248. __Pyx_GOTREF(__pyx_t_2);
  13249. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  13250. /* "uvloop/loop.pyx":472
  13251. * self._recv_signals_start()
  13252. *
  13253. * if aio_set_running_loop is not None: # <<<<<<<<<<<<<<
  13254. * aio_set_running_loop(self)
  13255. * try:
  13256. */
  13257. __pyx_t_1 = (__pyx_v_6uvloop_4loop_aio_set_running_loop != Py_None);
  13258. __pyx_t_3 = (__pyx_t_1 != 0);
  13259. if (__pyx_t_3) {
  13260. /* "uvloop/loop.pyx":473
  13261. *
  13262. * if aio_set_running_loop is not None:
  13263. * aio_set_running_loop(self) # <<<<<<<<<<<<<<
  13264. * try:
  13265. * self.__run(mode)
  13266. */
  13267. __Pyx_INCREF(__pyx_v_6uvloop_4loop_aio_set_running_loop);
  13268. __pyx_t_5 = __pyx_v_6uvloop_4loop_aio_set_running_loop; __pyx_t_6 = NULL;
  13269. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
  13270. __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
  13271. if (likely(__pyx_t_6)) {
  13272. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
  13273. __Pyx_INCREF(__pyx_t_6);
  13274. __Pyx_INCREF(function);
  13275. __Pyx_DECREF_SET(__pyx_t_5, function);
  13276. }
  13277. }
  13278. __pyx_t_2 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, ((PyObject *)__pyx_v_self)) : __Pyx_PyObject_CallOneArg(__pyx_t_5, ((PyObject *)__pyx_v_self));
  13279. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  13280. if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 473, __pyx_L1_error)
  13281. __Pyx_GOTREF(__pyx_t_2);
  13282. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  13283. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  13284. /* "uvloop/loop.pyx":472
  13285. * self._recv_signals_start()
  13286. *
  13287. * if aio_set_running_loop is not None: # <<<<<<<<<<<<<<
  13288. * aio_set_running_loop(self)
  13289. * try:
  13290. */
  13291. }
  13292. /* "uvloop/loop.pyx":474
  13293. * if aio_set_running_loop is not None:
  13294. * aio_set_running_loop(self)
  13295. * try: # <<<<<<<<<<<<<<
  13296. * self.__run(mode)
  13297. * finally:
  13298. */
  13299. /*try:*/ {
  13300. /* "uvloop/loop.pyx":475
  13301. * aio_set_running_loop(self)
  13302. * try:
  13303. * self.__run(mode) # <<<<<<<<<<<<<<
  13304. * finally:
  13305. * if aio_set_running_loop is not None:
  13306. */
  13307. __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_vtab)->__pyx___run(__pyx_v_self, __pyx_v_mode); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 475, __pyx_L10_error)
  13308. __Pyx_GOTREF(__pyx_t_2);
  13309. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  13310. }
  13311. /* "uvloop/loop.pyx":477
  13312. * self.__run(mode)
  13313. * finally:
  13314. * if aio_set_running_loop is not None: # <<<<<<<<<<<<<<
  13315. * aio_set_running_loop(None)
  13316. *
  13317. */
  13318. /*finally:*/ {
  13319. /*normal exit:*/{
  13320. __pyx_t_3 = (__pyx_v_6uvloop_4loop_aio_set_running_loop != Py_None);
  13321. __pyx_t_1 = (__pyx_t_3 != 0);
  13322. if (__pyx_t_1) {
  13323. /* "uvloop/loop.pyx":478
  13324. * finally:
  13325. * if aio_set_running_loop is not None:
  13326. * aio_set_running_loop(None) # <<<<<<<<<<<<<<
  13327. *
  13328. * self._recv_signals_stop()
  13329. */
  13330. __Pyx_INCREF(__pyx_v_6uvloop_4loop_aio_set_running_loop);
  13331. __pyx_t_5 = __pyx_v_6uvloop_4loop_aio_set_running_loop; __pyx_t_6 = NULL;
  13332. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
  13333. __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
  13334. if (likely(__pyx_t_6)) {
  13335. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
  13336. __Pyx_INCREF(__pyx_t_6);
  13337. __Pyx_INCREF(function);
  13338. __Pyx_DECREF_SET(__pyx_t_5, function);
  13339. }
  13340. }
  13341. __pyx_t_2 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, Py_None) : __Pyx_PyObject_CallOneArg(__pyx_t_5, Py_None);
  13342. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  13343. if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 478, __pyx_L1_error)
  13344. __Pyx_GOTREF(__pyx_t_2);
  13345. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  13346. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  13347. /* "uvloop/loop.pyx":477
  13348. * self.__run(mode)
  13349. * finally:
  13350. * if aio_set_running_loop is not None: # <<<<<<<<<<<<<<
  13351. * aio_set_running_loop(None)
  13352. *
  13353. */
  13354. }
  13355. /* "uvloop/loop.pyx":480
  13356. * aio_set_running_loop(None)
  13357. *
  13358. * self._recv_signals_stop() # <<<<<<<<<<<<<<
  13359. *
  13360. * self.handler_check__exec_writes.stop()
  13361. */
  13362. __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_vtab)->_recv_signals_stop(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 480, __pyx_L1_error)
  13363. __Pyx_GOTREF(__pyx_t_2);
  13364. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  13365. /* "uvloop/loop.pyx":482
  13366. * self._recv_signals_stop()
  13367. *
  13368. * self.handler_check__exec_writes.stop() # <<<<<<<<<<<<<<
  13369. * self.handler_idle.stop()
  13370. *
  13371. */
  13372. __pyx_t_2 = __pyx_f_6uvloop_4loop_7UVCheck_stop(__pyx_v_self->handler_check__exec_writes); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 482, __pyx_L1_error)
  13373. __Pyx_GOTREF(__pyx_t_2);
  13374. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  13375. /* "uvloop/loop.pyx":483
  13376. *
  13377. * self.handler_check__exec_writes.stop()
  13378. * self.handler_idle.stop() # <<<<<<<<<<<<<<
  13379. *
  13380. * self._thread_is_main = 0
  13381. */
  13382. __pyx_t_2 = __pyx_f_6uvloop_4loop_6UVIdle_stop(__pyx_v_self->handler_idle); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 483, __pyx_L1_error)
  13383. __Pyx_GOTREF(__pyx_t_2);
  13384. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  13385. /* "uvloop/loop.pyx":485
  13386. * self.handler_idle.stop()
  13387. *
  13388. * self._thread_is_main = 0 # <<<<<<<<<<<<<<
  13389. * self._thread_id = 0
  13390. * self._running = 0
  13391. */
  13392. __pyx_v_self->_thread_is_main = 0;
  13393. /* "uvloop/loop.pyx":486
  13394. *
  13395. * self._thread_is_main = 0
  13396. * self._thread_id = 0 # <<<<<<<<<<<<<<
  13397. * self._running = 0
  13398. * self._stopping = 0
  13399. */
  13400. __pyx_v_self->_thread_id = 0;
  13401. /* "uvloop/loop.pyx":487
  13402. * self._thread_is_main = 0
  13403. * self._thread_id = 0
  13404. * self._running = 0 # <<<<<<<<<<<<<<
  13405. * self._stopping = 0
  13406. *
  13407. */
  13408. __pyx_v_self->_running = 0;
  13409. /* "uvloop/loop.pyx":488
  13410. * self._thread_id = 0
  13411. * self._running = 0
  13412. * self._stopping = 0 # <<<<<<<<<<<<<<
  13413. *
  13414. * if self._last_error is not None:
  13415. */
  13416. __pyx_v_self->_stopping = 0;
  13417. goto __pyx_L11;
  13418. }
  13419. __pyx_L10_error:;
  13420. /*exception exit:*/{
  13421. __Pyx_PyThreadState_declare
  13422. __Pyx_PyThreadState_assign
  13423. __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0;
  13424. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  13425. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  13426. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  13427. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
  13428. 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);
  13429. __Pyx_XGOTREF(__pyx_t_10);
  13430. __Pyx_XGOTREF(__pyx_t_11);
  13431. __Pyx_XGOTREF(__pyx_t_12);
  13432. __Pyx_XGOTREF(__pyx_t_13);
  13433. __Pyx_XGOTREF(__pyx_t_14);
  13434. __Pyx_XGOTREF(__pyx_t_15);
  13435. __pyx_t_7 = __pyx_lineno; __pyx_t_8 = __pyx_clineno; __pyx_t_9 = __pyx_filename;
  13436. {
  13437. /* "uvloop/loop.pyx":477
  13438. * self.__run(mode)
  13439. * finally:
  13440. * if aio_set_running_loop is not None: # <<<<<<<<<<<<<<
  13441. * aio_set_running_loop(None)
  13442. *
  13443. */
  13444. __pyx_t_1 = (__pyx_v_6uvloop_4loop_aio_set_running_loop != Py_None);
  13445. __pyx_t_3 = (__pyx_t_1 != 0);
  13446. if (__pyx_t_3) {
  13447. /* "uvloop/loop.pyx":478
  13448. * finally:
  13449. * if aio_set_running_loop is not None:
  13450. * aio_set_running_loop(None) # <<<<<<<<<<<<<<
  13451. *
  13452. * self._recv_signals_stop()
  13453. */
  13454. __Pyx_INCREF(__pyx_v_6uvloop_4loop_aio_set_running_loop);
  13455. __pyx_t_5 = __pyx_v_6uvloop_4loop_aio_set_running_loop; __pyx_t_6 = NULL;
  13456. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
  13457. __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
  13458. if (likely(__pyx_t_6)) {
  13459. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
  13460. __Pyx_INCREF(__pyx_t_6);
  13461. __Pyx_INCREF(function);
  13462. __Pyx_DECREF_SET(__pyx_t_5, function);
  13463. }
  13464. }
  13465. __pyx_t_2 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, Py_None) : __Pyx_PyObject_CallOneArg(__pyx_t_5, Py_None);
  13466. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  13467. if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 478, __pyx_L14_error)
  13468. __Pyx_GOTREF(__pyx_t_2);
  13469. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  13470. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  13471. /* "uvloop/loop.pyx":477
  13472. * self.__run(mode)
  13473. * finally:
  13474. * if aio_set_running_loop is not None: # <<<<<<<<<<<<<<
  13475. * aio_set_running_loop(None)
  13476. *
  13477. */
  13478. }
  13479. /* "uvloop/loop.pyx":480
  13480. * aio_set_running_loop(None)
  13481. *
  13482. * self._recv_signals_stop() # <<<<<<<<<<<<<<
  13483. *
  13484. * self.handler_check__exec_writes.stop()
  13485. */
  13486. __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_vtab)->_recv_signals_stop(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 480, __pyx_L14_error)
  13487. __Pyx_GOTREF(__pyx_t_2);
  13488. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  13489. /* "uvloop/loop.pyx":482
  13490. * self._recv_signals_stop()
  13491. *
  13492. * self.handler_check__exec_writes.stop() # <<<<<<<<<<<<<<
  13493. * self.handler_idle.stop()
  13494. *
  13495. */
  13496. __pyx_t_2 = __pyx_f_6uvloop_4loop_7UVCheck_stop(__pyx_v_self->handler_check__exec_writes); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 482, __pyx_L14_error)
  13497. __Pyx_GOTREF(__pyx_t_2);
  13498. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  13499. /* "uvloop/loop.pyx":483
  13500. *
  13501. * self.handler_check__exec_writes.stop()
  13502. * self.handler_idle.stop() # <<<<<<<<<<<<<<
  13503. *
  13504. * self._thread_is_main = 0
  13505. */
  13506. __pyx_t_2 = __pyx_f_6uvloop_4loop_6UVIdle_stop(__pyx_v_self->handler_idle); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 483, __pyx_L14_error)
  13507. __Pyx_GOTREF(__pyx_t_2);
  13508. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  13509. /* "uvloop/loop.pyx":485
  13510. * self.handler_idle.stop()
  13511. *
  13512. * self._thread_is_main = 0 # <<<<<<<<<<<<<<
  13513. * self._thread_id = 0
  13514. * self._running = 0
  13515. */
  13516. __pyx_v_self->_thread_is_main = 0;
  13517. /* "uvloop/loop.pyx":486
  13518. *
  13519. * self._thread_is_main = 0
  13520. * self._thread_id = 0 # <<<<<<<<<<<<<<
  13521. * self._running = 0
  13522. * self._stopping = 0
  13523. */
  13524. __pyx_v_self->_thread_id = 0;
  13525. /* "uvloop/loop.pyx":487
  13526. * self._thread_is_main = 0
  13527. * self._thread_id = 0
  13528. * self._running = 0 # <<<<<<<<<<<<<<
  13529. * self._stopping = 0
  13530. *
  13531. */
  13532. __pyx_v_self->_running = 0;
  13533. /* "uvloop/loop.pyx":488
  13534. * self._thread_id = 0
  13535. * self._running = 0
  13536. * self._stopping = 0 # <<<<<<<<<<<<<<
  13537. *
  13538. * if self._last_error is not None:
  13539. */
  13540. __pyx_v_self->_stopping = 0;
  13541. }
  13542. if (PY_MAJOR_VERSION >= 3) {
  13543. __Pyx_XGIVEREF(__pyx_t_13);
  13544. __Pyx_XGIVEREF(__pyx_t_14);
  13545. __Pyx_XGIVEREF(__pyx_t_15);
  13546. __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
  13547. }
  13548. __Pyx_XGIVEREF(__pyx_t_10);
  13549. __Pyx_XGIVEREF(__pyx_t_11);
  13550. __Pyx_XGIVEREF(__pyx_t_12);
  13551. __Pyx_ErrRestore(__pyx_t_10, __pyx_t_11, __pyx_t_12);
  13552. __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0;
  13553. __pyx_lineno = __pyx_t_7; __pyx_clineno = __pyx_t_8; __pyx_filename = __pyx_t_9;
  13554. goto __pyx_L1_error;
  13555. __pyx_L14_error:;
  13556. if (PY_MAJOR_VERSION >= 3) {
  13557. __Pyx_XGIVEREF(__pyx_t_13);
  13558. __Pyx_XGIVEREF(__pyx_t_14);
  13559. __Pyx_XGIVEREF(__pyx_t_15);
  13560. __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
  13561. }
  13562. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  13563. __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
  13564. __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
  13565. __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0;
  13566. goto __pyx_L1_error;
  13567. }
  13568. __pyx_L11:;
  13569. }
  13570. /* "uvloop/loop.pyx":490
  13571. * self._stopping = 0
  13572. *
  13573. * if self._last_error is not None: # <<<<<<<<<<<<<<
  13574. * # The loop was stopped with an error with 'loop._stop(error)' call
  13575. * raise self._last_error
  13576. */
  13577. __pyx_t_3 = (__pyx_v_self->_last_error != Py_None);
  13578. __pyx_t_1 = (__pyx_t_3 != 0);
  13579. if (unlikely(__pyx_t_1)) {
  13580. /* "uvloop/loop.pyx":492
  13581. * if self._last_error is not None:
  13582. * # The loop was stopped with an error with 'loop._stop(error)' call
  13583. * raise self._last_error # <<<<<<<<<<<<<<
  13584. *
  13585. * cdef _close(self):
  13586. */
  13587. __Pyx_Raise(__pyx_v_self->_last_error, 0, 0, 0);
  13588. __PYX_ERR(2, 492, __pyx_L1_error)
  13589. /* "uvloop/loop.pyx":490
  13590. * self._stopping = 0
  13591. *
  13592. * if self._last_error is not None: # <<<<<<<<<<<<<<
  13593. * # The loop was stopped with an error with 'loop._stop(error)' call
  13594. * raise self._last_error
  13595. */
  13596. }
  13597. /* "uvloop/loop.pyx":446
  13598. * raise convert_error(err)
  13599. *
  13600. * cdef _run(self, uv.uv_run_mode mode): # <<<<<<<<<<<<<<
  13601. * cdef int err
  13602. *
  13603. */
  13604. /* function exit code */
  13605. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  13606. goto __pyx_L0;
  13607. __pyx_L1_error:;
  13608. __Pyx_XDECREF(__pyx_t_2);
  13609. __Pyx_XDECREF(__pyx_t_5);
  13610. __Pyx_XDECREF(__pyx_t_6);
  13611. __Pyx_AddTraceback("uvloop.loop.Loop._run", __pyx_clineno, __pyx_lineno, __pyx_filename);
  13612. __pyx_r = 0;
  13613. __pyx_L0:;
  13614. __Pyx_XGIVEREF(__pyx_r);
  13615. __Pyx_RefNannyFinishContext();
  13616. return __pyx_r;
  13617. }
  13618. /* "uvloop/loop.pyx":494
  13619. * raise self._last_error
  13620. *
  13621. * cdef _close(self): # <<<<<<<<<<<<<<
  13622. * cdef int err
  13623. *
  13624. */
  13625. static PyObject *__pyx_f_6uvloop_4loop_4Loop__close(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) {
  13626. int __pyx_v_err;
  13627. PyObject *__pyx_v_cb_handle = NULL;
  13628. PyObject *__pyx_v_poll_handle = NULL;
  13629. PyObject *__pyx_v_timer_cbhandle = NULL;
  13630. PyObject *__pyx_v_fileobj = NULL;
  13631. PyObject *__pyx_v_executor = NULL;
  13632. PyObject *__pyx_r = NULL;
  13633. __Pyx_RefNannyDeclarations
  13634. int __pyx_t_1;
  13635. PyObject *__pyx_t_2 = NULL;
  13636. Py_ssize_t __pyx_t_3;
  13637. PyObject *(*__pyx_t_4)(PyObject *);
  13638. PyObject *__pyx_t_5 = NULL;
  13639. PyObject *__pyx_t_6 = NULL;
  13640. PyObject *__pyx_t_7 = NULL;
  13641. Py_ssize_t __pyx_t_8;
  13642. int __pyx_t_9;
  13643. int __pyx_t_10;
  13644. int __pyx_t_11;
  13645. int __pyx_t_12;
  13646. __Pyx_RefNannySetupContext("_close", 0);
  13647. /* "uvloop/loop.pyx":497
  13648. * cdef int err
  13649. *
  13650. * if self._running == 1: # <<<<<<<<<<<<<<
  13651. * raise RuntimeError("Cannot close a running event loop")
  13652. *
  13653. */
  13654. __pyx_t_1 = ((__pyx_v_self->_running == 1) != 0);
  13655. if (unlikely(__pyx_t_1)) {
  13656. /* "uvloop/loop.pyx":498
  13657. *
  13658. * if self._running == 1:
  13659. * raise RuntimeError("Cannot close a running event loop") # <<<<<<<<<<<<<<
  13660. *
  13661. * if self._closed == 1:
  13662. */
  13663. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 498, __pyx_L1_error)
  13664. __Pyx_GOTREF(__pyx_t_2);
  13665. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  13666. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  13667. __PYX_ERR(2, 498, __pyx_L1_error)
  13668. /* "uvloop/loop.pyx":497
  13669. * cdef int err
  13670. *
  13671. * if self._running == 1: # <<<<<<<<<<<<<<
  13672. * raise RuntimeError("Cannot close a running event loop")
  13673. *
  13674. */
  13675. }
  13676. /* "uvloop/loop.pyx":500
  13677. * raise RuntimeError("Cannot close a running event loop")
  13678. *
  13679. * if self._closed == 1: # <<<<<<<<<<<<<<
  13680. * return
  13681. *
  13682. */
  13683. __pyx_t_1 = ((__pyx_v_self->_closed == 1) != 0);
  13684. if (__pyx_t_1) {
  13685. /* "uvloop/loop.pyx":501
  13686. *
  13687. * if self._closed == 1:
  13688. * return # <<<<<<<<<<<<<<
  13689. *
  13690. * self._closed = 1
  13691. */
  13692. __Pyx_XDECREF(__pyx_r);
  13693. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  13694. goto __pyx_L0;
  13695. /* "uvloop/loop.pyx":500
  13696. * raise RuntimeError("Cannot close a running event loop")
  13697. *
  13698. * if self._closed == 1: # <<<<<<<<<<<<<<
  13699. * return
  13700. *
  13701. */
  13702. }
  13703. /* "uvloop/loop.pyx":503
  13704. * return
  13705. *
  13706. * self._closed = 1 # <<<<<<<<<<<<<<
  13707. *
  13708. * for cb_handle in self._ready:
  13709. */
  13710. __pyx_v_self->_closed = 1;
  13711. /* "uvloop/loop.pyx":505
  13712. * self._closed = 1
  13713. *
  13714. * for cb_handle in self._ready: # <<<<<<<<<<<<<<
  13715. * cb_handle.cancel()
  13716. * self._ready.clear()
  13717. */
  13718. if (likely(PyList_CheckExact(__pyx_v_self->_ready)) || PyTuple_CheckExact(__pyx_v_self->_ready)) {
  13719. __pyx_t_2 = __pyx_v_self->_ready; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
  13720. __pyx_t_4 = NULL;
  13721. } else {
  13722. __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_self->_ready); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 505, __pyx_L1_error)
  13723. __Pyx_GOTREF(__pyx_t_2);
  13724. __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 505, __pyx_L1_error)
  13725. }
  13726. for (;;) {
  13727. if (likely(!__pyx_t_4)) {
  13728. if (likely(PyList_CheckExact(__pyx_t_2))) {
  13729. if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
  13730. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  13731. __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(2, 505, __pyx_L1_error)
  13732. #else
  13733. __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 505, __pyx_L1_error)
  13734. __Pyx_GOTREF(__pyx_t_5);
  13735. #endif
  13736. } else {
  13737. if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
  13738. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  13739. __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(2, 505, __pyx_L1_error)
  13740. #else
  13741. __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 505, __pyx_L1_error)
  13742. __Pyx_GOTREF(__pyx_t_5);
  13743. #endif
  13744. }
  13745. } else {
  13746. __pyx_t_5 = __pyx_t_4(__pyx_t_2);
  13747. if (unlikely(!__pyx_t_5)) {
  13748. PyObject* exc_type = PyErr_Occurred();
  13749. if (exc_type) {
  13750. if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
  13751. else __PYX_ERR(2, 505, __pyx_L1_error)
  13752. }
  13753. break;
  13754. }
  13755. __Pyx_GOTREF(__pyx_t_5);
  13756. }
  13757. __Pyx_XDECREF_SET(__pyx_v_cb_handle, __pyx_t_5);
  13758. __pyx_t_5 = 0;
  13759. /* "uvloop/loop.pyx":506
  13760. *
  13761. * for cb_handle in self._ready:
  13762. * cb_handle.cancel() # <<<<<<<<<<<<<<
  13763. * self._ready.clear()
  13764. * self._ready_len = 0
  13765. */
  13766. __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_cb_handle, __pyx_n_s_cancel); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 506, __pyx_L1_error)
  13767. __Pyx_GOTREF(__pyx_t_6);
  13768. __pyx_t_7 = NULL;
  13769. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
  13770. __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
  13771. if (likely(__pyx_t_7)) {
  13772. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
  13773. __Pyx_INCREF(__pyx_t_7);
  13774. __Pyx_INCREF(function);
  13775. __Pyx_DECREF_SET(__pyx_t_6, function);
  13776. }
  13777. }
  13778. __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
  13779. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  13780. if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 506, __pyx_L1_error)
  13781. __Pyx_GOTREF(__pyx_t_5);
  13782. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  13783. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  13784. /* "uvloop/loop.pyx":505
  13785. * self._closed = 1
  13786. *
  13787. * for cb_handle in self._ready: # <<<<<<<<<<<<<<
  13788. * cb_handle.cancel()
  13789. * self._ready.clear()
  13790. */
  13791. }
  13792. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  13793. /* "uvloop/loop.pyx":507
  13794. * for cb_handle in self._ready:
  13795. * cb_handle.cancel()
  13796. * self._ready.clear() # <<<<<<<<<<<<<<
  13797. * self._ready_len = 0
  13798. *
  13799. */
  13800. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_ready, __pyx_n_s_clear); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 507, __pyx_L1_error)
  13801. __Pyx_GOTREF(__pyx_t_5);
  13802. __pyx_t_6 = NULL;
  13803. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
  13804. __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
  13805. if (likely(__pyx_t_6)) {
  13806. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
  13807. __Pyx_INCREF(__pyx_t_6);
  13808. __Pyx_INCREF(function);
  13809. __Pyx_DECREF_SET(__pyx_t_5, function);
  13810. }
  13811. }
  13812. __pyx_t_2 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
  13813. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  13814. if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 507, __pyx_L1_error)
  13815. __Pyx_GOTREF(__pyx_t_2);
  13816. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  13817. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  13818. /* "uvloop/loop.pyx":508
  13819. * cb_handle.cancel()
  13820. * self._ready.clear()
  13821. * self._ready_len = 0 # <<<<<<<<<<<<<<
  13822. *
  13823. * if self._polls:
  13824. */
  13825. __pyx_v_self->_ready_len = 0;
  13826. /* "uvloop/loop.pyx":510
  13827. * self._ready_len = 0
  13828. *
  13829. * if self._polls: # <<<<<<<<<<<<<<
  13830. * for poll_handle in self._polls.values():
  13831. * (<UVHandle>poll_handle)._close()
  13832. */
  13833. __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->_polls); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 510, __pyx_L1_error)
  13834. if (__pyx_t_1) {
  13835. /* "uvloop/loop.pyx":511
  13836. *
  13837. * if self._polls:
  13838. * for poll_handle in self._polls.values(): # <<<<<<<<<<<<<<
  13839. * (<UVHandle>poll_handle)._close()
  13840. *
  13841. */
  13842. __pyx_t_3 = 0;
  13843. if (unlikely(__pyx_v_self->_polls == Py_None)) {
  13844. PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values");
  13845. __PYX_ERR(2, 511, __pyx_L1_error)
  13846. }
  13847. __pyx_t_5 = __Pyx_dict_iterator(__pyx_v_self->_polls, 1, __pyx_n_s_values, (&__pyx_t_8), (&__pyx_t_9)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 511, __pyx_L1_error)
  13848. __Pyx_GOTREF(__pyx_t_5);
  13849. __Pyx_XDECREF(__pyx_t_2);
  13850. __pyx_t_2 = __pyx_t_5;
  13851. __pyx_t_5 = 0;
  13852. while (1) {
  13853. __pyx_t_10 = __Pyx_dict_iter_next(__pyx_t_2, __pyx_t_8, &__pyx_t_3, NULL, &__pyx_t_5, NULL, __pyx_t_9);
  13854. if (unlikely(__pyx_t_10 == 0)) break;
  13855. if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(2, 511, __pyx_L1_error)
  13856. __Pyx_GOTREF(__pyx_t_5);
  13857. __Pyx_XDECREF_SET(__pyx_v_poll_handle, __pyx_t_5);
  13858. __pyx_t_5 = 0;
  13859. /* "uvloop/loop.pyx":512
  13860. * if self._polls:
  13861. * for poll_handle in self._polls.values():
  13862. * (<UVHandle>poll_handle)._close() # <<<<<<<<<<<<<<
  13863. *
  13864. * self._polls.clear()
  13865. */
  13866. __pyx_t_5 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVHandle *)((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_poll_handle)->__pyx_vtab)->_close(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_poll_handle)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 512, __pyx_L1_error)
  13867. __Pyx_GOTREF(__pyx_t_5);
  13868. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  13869. }
  13870. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  13871. /* "uvloop/loop.pyx":514
  13872. * (<UVHandle>poll_handle)._close()
  13873. *
  13874. * self._polls.clear() # <<<<<<<<<<<<<<
  13875. *
  13876. * if self._timers:
  13877. */
  13878. if (unlikely(__pyx_v_self->_polls == Py_None)) {
  13879. PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "clear");
  13880. __PYX_ERR(2, 514, __pyx_L1_error)
  13881. }
  13882. __pyx_t_11 = __Pyx_PyDict_Clear(__pyx_v_self->_polls); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(2, 514, __pyx_L1_error)
  13883. /* "uvloop/loop.pyx":510
  13884. * self._ready_len = 0
  13885. *
  13886. * if self._polls: # <<<<<<<<<<<<<<
  13887. * for poll_handle in self._polls.values():
  13888. * (<UVHandle>poll_handle)._close()
  13889. */
  13890. }
  13891. /* "uvloop/loop.pyx":516
  13892. * self._polls.clear()
  13893. *
  13894. * if self._timers: # <<<<<<<<<<<<<<
  13895. * for timer_cbhandle in tuple(self._timers):
  13896. * timer_cbhandle.cancel()
  13897. */
  13898. __pyx_t_1 = (__pyx_v_self->_timers != Py_None)&&(PySet_GET_SIZE(__pyx_v_self->_timers) != 0);
  13899. if (__pyx_t_1) {
  13900. /* "uvloop/loop.pyx":517
  13901. *
  13902. * if self._timers:
  13903. * for timer_cbhandle in tuple(self._timers): # <<<<<<<<<<<<<<
  13904. * timer_cbhandle.cancel()
  13905. *
  13906. */
  13907. __pyx_t_2 = PySequence_Tuple(__pyx_v_self->_timers); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 517, __pyx_L1_error)
  13908. __Pyx_GOTREF(__pyx_t_2);
  13909. __pyx_t_5 = __pyx_t_2; __Pyx_INCREF(__pyx_t_5); __pyx_t_8 = 0;
  13910. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  13911. for (;;) {
  13912. if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
  13913. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  13914. __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(2, 517, __pyx_L1_error)
  13915. #else
  13916. __pyx_t_2 = PySequence_ITEM(__pyx_t_5, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 517, __pyx_L1_error)
  13917. __Pyx_GOTREF(__pyx_t_2);
  13918. #endif
  13919. __Pyx_XDECREF_SET(__pyx_v_timer_cbhandle, __pyx_t_2);
  13920. __pyx_t_2 = 0;
  13921. /* "uvloop/loop.pyx":518
  13922. * if self._timers:
  13923. * for timer_cbhandle in tuple(self._timers):
  13924. * timer_cbhandle.cancel() # <<<<<<<<<<<<<<
  13925. *
  13926. * # Close all remaining handles
  13927. */
  13928. __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_timer_cbhandle, __pyx_n_s_cancel); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 518, __pyx_L1_error)
  13929. __Pyx_GOTREF(__pyx_t_6);
  13930. __pyx_t_7 = NULL;
  13931. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
  13932. __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
  13933. if (likely(__pyx_t_7)) {
  13934. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
  13935. __Pyx_INCREF(__pyx_t_7);
  13936. __Pyx_INCREF(function);
  13937. __Pyx_DECREF_SET(__pyx_t_6, function);
  13938. }
  13939. }
  13940. __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
  13941. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  13942. if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 518, __pyx_L1_error)
  13943. __Pyx_GOTREF(__pyx_t_2);
  13944. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  13945. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  13946. /* "uvloop/loop.pyx":517
  13947. *
  13948. * if self._timers:
  13949. * for timer_cbhandle in tuple(self._timers): # <<<<<<<<<<<<<<
  13950. * timer_cbhandle.cancel()
  13951. *
  13952. */
  13953. }
  13954. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  13955. /* "uvloop/loop.pyx":516
  13956. * self._polls.clear()
  13957. *
  13958. * if self._timers: # <<<<<<<<<<<<<<
  13959. * for timer_cbhandle in tuple(self._timers):
  13960. * timer_cbhandle.cancel()
  13961. */
  13962. }
  13963. /* "uvloop/loop.pyx":521
  13964. *
  13965. * # Close all remaining handles
  13966. * self.handler_async._close() # <<<<<<<<<<<<<<
  13967. * self.handler_idle._close()
  13968. * self.handler_check__exec_writes._close()
  13969. */
  13970. __pyx_t_5 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVAsync *)__pyx_v_self->handler_async->__pyx_base.__pyx_vtab)->__pyx_base._close(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self->handler_async)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 521, __pyx_L1_error)
  13971. __Pyx_GOTREF(__pyx_t_5);
  13972. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  13973. /* "uvloop/loop.pyx":522
  13974. * # Close all remaining handles
  13975. * self.handler_async._close()
  13976. * self.handler_idle._close() # <<<<<<<<<<<<<<
  13977. * self.handler_check__exec_writes._close()
  13978. * __close_all_handles(self)
  13979. */
  13980. __pyx_t_5 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVIdle *)__pyx_v_self->handler_idle->__pyx_base.__pyx_vtab)->__pyx_base._close(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self->handler_idle)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 522, __pyx_L1_error)
  13981. __Pyx_GOTREF(__pyx_t_5);
  13982. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  13983. /* "uvloop/loop.pyx":523
  13984. * self.handler_async._close()
  13985. * self.handler_idle._close()
  13986. * self.handler_check__exec_writes._close() # <<<<<<<<<<<<<<
  13987. * __close_all_handles(self)
  13988. * self._shutdown_signals()
  13989. */
  13990. __pyx_t_5 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVCheck *)__pyx_v_self->handler_check__exec_writes->__pyx_base.__pyx_vtab)->__pyx_base._close(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self->handler_check__exec_writes)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 523, __pyx_L1_error)
  13991. __Pyx_GOTREF(__pyx_t_5);
  13992. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  13993. /* "uvloop/loop.pyx":524
  13994. * self.handler_idle._close()
  13995. * self.handler_check__exec_writes._close()
  13996. * __close_all_handles(self) # <<<<<<<<<<<<<<
  13997. * self._shutdown_signals()
  13998. * # During this run there should be no open handles,
  13999. */
  14000. __pyx_f_6uvloop_4loop___close_all_handles(__pyx_v_self);
  14001. /* "uvloop/loop.pyx":525
  14002. * self.handler_check__exec_writes._close()
  14003. * __close_all_handles(self)
  14004. * self._shutdown_signals() # <<<<<<<<<<<<<<
  14005. * # During this run there should be no open handles,
  14006. * # so it should finish right away
  14007. */
  14008. __pyx_t_5 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_vtab)->_shutdown_signals(__pyx_v_self); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 525, __pyx_L1_error)
  14009. __Pyx_GOTREF(__pyx_t_5);
  14010. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  14011. /* "uvloop/loop.pyx":528
  14012. * # During this run there should be no open handles,
  14013. * # so it should finish right away
  14014. * self.__run(uv.UV_RUN_DEFAULT) # <<<<<<<<<<<<<<
  14015. *
  14016. * if self._fd_to_writer_fileobj:
  14017. */
  14018. __pyx_t_5 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_vtab)->__pyx___run(__pyx_v_self, UV_RUN_DEFAULT); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 528, __pyx_L1_error)
  14019. __Pyx_GOTREF(__pyx_t_5);
  14020. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  14021. /* "uvloop/loop.pyx":530
  14022. * self.__run(uv.UV_RUN_DEFAULT)
  14023. *
  14024. * if self._fd_to_writer_fileobj: # <<<<<<<<<<<<<<
  14025. * for fileobj in self._fd_to_writer_fileobj.values():
  14026. * socket_dec_io_ref(fileobj)
  14027. */
  14028. __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->_fd_to_writer_fileobj); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 530, __pyx_L1_error)
  14029. if (__pyx_t_1) {
  14030. /* "uvloop/loop.pyx":531
  14031. *
  14032. * if self._fd_to_writer_fileobj:
  14033. * for fileobj in self._fd_to_writer_fileobj.values(): # <<<<<<<<<<<<<<
  14034. * socket_dec_io_ref(fileobj)
  14035. * self._fd_to_writer_fileobj.clear()
  14036. */
  14037. __pyx_t_8 = 0;
  14038. if (unlikely(__pyx_v_self->_fd_to_writer_fileobj == Py_None)) {
  14039. PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values");
  14040. __PYX_ERR(2, 531, __pyx_L1_error)
  14041. }
  14042. __pyx_t_2 = __Pyx_dict_iterator(__pyx_v_self->_fd_to_writer_fileobj, 1, __pyx_n_s_values, (&__pyx_t_3), (&__pyx_t_9)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 531, __pyx_L1_error)
  14043. __Pyx_GOTREF(__pyx_t_2);
  14044. __Pyx_XDECREF(__pyx_t_5);
  14045. __pyx_t_5 = __pyx_t_2;
  14046. __pyx_t_2 = 0;
  14047. while (1) {
  14048. __pyx_t_10 = __Pyx_dict_iter_next(__pyx_t_5, __pyx_t_3, &__pyx_t_8, NULL, &__pyx_t_2, NULL, __pyx_t_9);
  14049. if (unlikely(__pyx_t_10 == 0)) break;
  14050. if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(2, 531, __pyx_L1_error)
  14051. __Pyx_GOTREF(__pyx_t_2);
  14052. __Pyx_XDECREF_SET(__pyx_v_fileobj, __pyx_t_2);
  14053. __pyx_t_2 = 0;
  14054. /* "uvloop/loop.pyx":532
  14055. * if self._fd_to_writer_fileobj:
  14056. * for fileobj in self._fd_to_writer_fileobj.values():
  14057. * socket_dec_io_ref(fileobj) # <<<<<<<<<<<<<<
  14058. * self._fd_to_writer_fileobj.clear()
  14059. *
  14060. */
  14061. __pyx_t_2 = __pyx_f_6uvloop_4loop_socket_dec_io_ref(__pyx_v_fileobj); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 532, __pyx_L1_error)
  14062. __Pyx_GOTREF(__pyx_t_2);
  14063. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  14064. }
  14065. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  14066. /* "uvloop/loop.pyx":533
  14067. * for fileobj in self._fd_to_writer_fileobj.values():
  14068. * socket_dec_io_ref(fileobj)
  14069. * self._fd_to_writer_fileobj.clear() # <<<<<<<<<<<<<<
  14070. *
  14071. * if self._fd_to_reader_fileobj:
  14072. */
  14073. if (unlikely(__pyx_v_self->_fd_to_writer_fileobj == Py_None)) {
  14074. PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "clear");
  14075. __PYX_ERR(2, 533, __pyx_L1_error)
  14076. }
  14077. __pyx_t_11 = __Pyx_PyDict_Clear(__pyx_v_self->_fd_to_writer_fileobj); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(2, 533, __pyx_L1_error)
  14078. /* "uvloop/loop.pyx":530
  14079. * self.__run(uv.UV_RUN_DEFAULT)
  14080. *
  14081. * if self._fd_to_writer_fileobj: # <<<<<<<<<<<<<<
  14082. * for fileobj in self._fd_to_writer_fileobj.values():
  14083. * socket_dec_io_ref(fileobj)
  14084. */
  14085. }
  14086. /* "uvloop/loop.pyx":535
  14087. * self._fd_to_writer_fileobj.clear()
  14088. *
  14089. * if self._fd_to_reader_fileobj: # <<<<<<<<<<<<<<
  14090. * for fileobj in self._fd_to_reader_fileobj.values():
  14091. * socket_dec_io_ref(fileobj)
  14092. */
  14093. __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->_fd_to_reader_fileobj); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 535, __pyx_L1_error)
  14094. if (__pyx_t_1) {
  14095. /* "uvloop/loop.pyx":536
  14096. *
  14097. * if self._fd_to_reader_fileobj:
  14098. * for fileobj in self._fd_to_reader_fileobj.values(): # <<<<<<<<<<<<<<
  14099. * socket_dec_io_ref(fileobj)
  14100. * self._fd_to_reader_fileobj.clear()
  14101. */
  14102. __pyx_t_3 = 0;
  14103. if (unlikely(__pyx_v_self->_fd_to_reader_fileobj == Py_None)) {
  14104. PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values");
  14105. __PYX_ERR(2, 536, __pyx_L1_error)
  14106. }
  14107. __pyx_t_2 = __Pyx_dict_iterator(__pyx_v_self->_fd_to_reader_fileobj, 1, __pyx_n_s_values, (&__pyx_t_8), (&__pyx_t_9)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 536, __pyx_L1_error)
  14108. __Pyx_GOTREF(__pyx_t_2);
  14109. __Pyx_XDECREF(__pyx_t_5);
  14110. __pyx_t_5 = __pyx_t_2;
  14111. __pyx_t_2 = 0;
  14112. while (1) {
  14113. __pyx_t_10 = __Pyx_dict_iter_next(__pyx_t_5, __pyx_t_8, &__pyx_t_3, NULL, &__pyx_t_2, NULL, __pyx_t_9);
  14114. if (unlikely(__pyx_t_10 == 0)) break;
  14115. if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(2, 536, __pyx_L1_error)
  14116. __Pyx_GOTREF(__pyx_t_2);
  14117. __Pyx_XDECREF_SET(__pyx_v_fileobj, __pyx_t_2);
  14118. __pyx_t_2 = 0;
  14119. /* "uvloop/loop.pyx":537
  14120. * if self._fd_to_reader_fileobj:
  14121. * for fileobj in self._fd_to_reader_fileobj.values():
  14122. * socket_dec_io_ref(fileobj) # <<<<<<<<<<<<<<
  14123. * self._fd_to_reader_fileobj.clear()
  14124. *
  14125. */
  14126. __pyx_t_2 = __pyx_f_6uvloop_4loop_socket_dec_io_ref(__pyx_v_fileobj); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 537, __pyx_L1_error)
  14127. __Pyx_GOTREF(__pyx_t_2);
  14128. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  14129. }
  14130. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  14131. /* "uvloop/loop.pyx":538
  14132. * for fileobj in self._fd_to_reader_fileobj.values():
  14133. * socket_dec_io_ref(fileobj)
  14134. * self._fd_to_reader_fileobj.clear() # <<<<<<<<<<<<<<
  14135. *
  14136. * if self._timers:
  14137. */
  14138. if (unlikely(__pyx_v_self->_fd_to_reader_fileobj == Py_None)) {
  14139. PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "clear");
  14140. __PYX_ERR(2, 538, __pyx_L1_error)
  14141. }
  14142. __pyx_t_11 = __Pyx_PyDict_Clear(__pyx_v_self->_fd_to_reader_fileobj); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(2, 538, __pyx_L1_error)
  14143. /* "uvloop/loop.pyx":535
  14144. * self._fd_to_writer_fileobj.clear()
  14145. *
  14146. * if self._fd_to_reader_fileobj: # <<<<<<<<<<<<<<
  14147. * for fileobj in self._fd_to_reader_fileobj.values():
  14148. * socket_dec_io_ref(fileobj)
  14149. */
  14150. }
  14151. /* "uvloop/loop.pyx":540
  14152. * self._fd_to_reader_fileobj.clear()
  14153. *
  14154. * if self._timers: # <<<<<<<<<<<<<<
  14155. * raise RuntimeError(
  14156. * f"new timers were queued during loop closing: {self._timers}")
  14157. */
  14158. __pyx_t_1 = (__pyx_v_self->_timers != Py_None)&&(PySet_GET_SIZE(__pyx_v_self->_timers) != 0);
  14159. if (unlikely(__pyx_t_1)) {
  14160. /* "uvloop/loop.pyx":542
  14161. * if self._timers:
  14162. * raise RuntimeError(
  14163. * f"new timers were queued during loop closing: {self._timers}") # <<<<<<<<<<<<<<
  14164. *
  14165. * if self._polls:
  14166. */
  14167. __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_v_self->_timers, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 542, __pyx_L1_error)
  14168. __Pyx_GOTREF(__pyx_t_5);
  14169. __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_new_timers_were_queued_during_lo, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 542, __pyx_L1_error)
  14170. __Pyx_GOTREF(__pyx_t_2);
  14171. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  14172. /* "uvloop/loop.pyx":541
  14173. *
  14174. * if self._timers:
  14175. * raise RuntimeError( # <<<<<<<<<<<<<<
  14176. * f"new timers were queued during loop closing: {self._timers}")
  14177. *
  14178. */
  14179. __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 541, __pyx_L1_error)
  14180. __Pyx_GOTREF(__pyx_t_5);
  14181. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  14182. __Pyx_Raise(__pyx_t_5, 0, 0, 0);
  14183. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  14184. __PYX_ERR(2, 541, __pyx_L1_error)
  14185. /* "uvloop/loop.pyx":540
  14186. * self._fd_to_reader_fileobj.clear()
  14187. *
  14188. * if self._timers: # <<<<<<<<<<<<<<
  14189. * raise RuntimeError(
  14190. * f"new timers were queued during loop closing: {self._timers}")
  14191. */
  14192. }
  14193. /* "uvloop/loop.pyx":544
  14194. * f"new timers were queued during loop closing: {self._timers}")
  14195. *
  14196. * if self._polls: # <<<<<<<<<<<<<<
  14197. * raise RuntimeError(
  14198. * f"new poll handles were queued during loop closing: "
  14199. */
  14200. __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->_polls); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 544, __pyx_L1_error)
  14201. if (unlikely(__pyx_t_1)) {
  14202. /* "uvloop/loop.pyx":547
  14203. * raise RuntimeError(
  14204. * f"new poll handles were queued during loop closing: "
  14205. * f"{self._polls}") # <<<<<<<<<<<<<<
  14206. *
  14207. * if self._ready:
  14208. */
  14209. __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_v_self->_polls, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 547, __pyx_L1_error)
  14210. __Pyx_GOTREF(__pyx_t_5);
  14211. /* "uvloop/loop.pyx":546
  14212. * if self._polls:
  14213. * raise RuntimeError(
  14214. * f"new poll handles were queued during loop closing: " # <<<<<<<<<<<<<<
  14215. * f"{self._polls}")
  14216. *
  14217. */
  14218. __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_new_poll_handles_were_queued_dur, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 546, __pyx_L1_error)
  14219. __Pyx_GOTREF(__pyx_t_2);
  14220. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  14221. /* "uvloop/loop.pyx":545
  14222. *
  14223. * if self._polls:
  14224. * raise RuntimeError( # <<<<<<<<<<<<<<
  14225. * f"new poll handles were queued during loop closing: "
  14226. * f"{self._polls}")
  14227. */
  14228. __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 545, __pyx_L1_error)
  14229. __Pyx_GOTREF(__pyx_t_5);
  14230. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  14231. __Pyx_Raise(__pyx_t_5, 0, 0, 0);
  14232. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  14233. __PYX_ERR(2, 545, __pyx_L1_error)
  14234. /* "uvloop/loop.pyx":544
  14235. * f"new timers were queued during loop closing: {self._timers}")
  14236. *
  14237. * if self._polls: # <<<<<<<<<<<<<<
  14238. * raise RuntimeError(
  14239. * f"new poll handles were queued during loop closing: "
  14240. */
  14241. }
  14242. /* "uvloop/loop.pyx":549
  14243. * f"{self._polls}")
  14244. *
  14245. * if self._ready: # <<<<<<<<<<<<<<
  14246. * raise RuntimeError(
  14247. * f"new callbacks were queued during loop closing: "
  14248. */
  14249. __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->_ready); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 549, __pyx_L1_error)
  14250. if (unlikely(__pyx_t_1)) {
  14251. /* "uvloop/loop.pyx":552
  14252. * raise RuntimeError(
  14253. * f"new callbacks were queued during loop closing: "
  14254. * f"{self._ready}") # <<<<<<<<<<<<<<
  14255. *
  14256. * err = uv.uv_loop_close(self.uvloop)
  14257. */
  14258. __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_v_self->_ready, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 552, __pyx_L1_error)
  14259. __Pyx_GOTREF(__pyx_t_5);
  14260. /* "uvloop/loop.pyx":551
  14261. * if self._ready:
  14262. * raise RuntimeError(
  14263. * f"new callbacks were queued during loop closing: " # <<<<<<<<<<<<<<
  14264. * f"{self._ready}")
  14265. *
  14266. */
  14267. __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_new_callbacks_were_queued_during, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 551, __pyx_L1_error)
  14268. __Pyx_GOTREF(__pyx_t_2);
  14269. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  14270. /* "uvloop/loop.pyx":550
  14271. *
  14272. * if self._ready:
  14273. * raise RuntimeError( # <<<<<<<<<<<<<<
  14274. * f"new callbacks were queued during loop closing: "
  14275. * f"{self._ready}")
  14276. */
  14277. __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 550, __pyx_L1_error)
  14278. __Pyx_GOTREF(__pyx_t_5);
  14279. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  14280. __Pyx_Raise(__pyx_t_5, 0, 0, 0);
  14281. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  14282. __PYX_ERR(2, 550, __pyx_L1_error)
  14283. /* "uvloop/loop.pyx":549
  14284. * f"{self._polls}")
  14285. *
  14286. * if self._ready: # <<<<<<<<<<<<<<
  14287. * raise RuntimeError(
  14288. * f"new callbacks were queued during loop closing: "
  14289. */
  14290. }
  14291. /* "uvloop/loop.pyx":554
  14292. * f"{self._ready}")
  14293. *
  14294. * err = uv.uv_loop_close(self.uvloop) # <<<<<<<<<<<<<<
  14295. * if err < 0:
  14296. * raise convert_error(err)
  14297. */
  14298. __pyx_v_err = uv_loop_close(__pyx_v_self->uvloop);
  14299. /* "uvloop/loop.pyx":555
  14300. *
  14301. * err = uv.uv_loop_close(self.uvloop)
  14302. * if err < 0: # <<<<<<<<<<<<<<
  14303. * raise convert_error(err)
  14304. *
  14305. */
  14306. __pyx_t_1 = ((__pyx_v_err < 0) != 0);
  14307. if (unlikely(__pyx_t_1)) {
  14308. /* "uvloop/loop.pyx":556
  14309. * err = uv.uv_loop_close(self.uvloop)
  14310. * if err < 0:
  14311. * raise convert_error(err) # <<<<<<<<<<<<<<
  14312. *
  14313. * self.handler_async = None
  14314. */
  14315. __pyx_t_5 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 556, __pyx_L1_error)
  14316. __Pyx_GOTREF(__pyx_t_5);
  14317. __Pyx_Raise(__pyx_t_5, 0, 0, 0);
  14318. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  14319. __PYX_ERR(2, 556, __pyx_L1_error)
  14320. /* "uvloop/loop.pyx":555
  14321. *
  14322. * err = uv.uv_loop_close(self.uvloop)
  14323. * if err < 0: # <<<<<<<<<<<<<<
  14324. * raise convert_error(err)
  14325. *
  14326. */
  14327. }
  14328. /* "uvloop/loop.pyx":558
  14329. * raise convert_error(err)
  14330. *
  14331. * self.handler_async = None # <<<<<<<<<<<<<<
  14332. * self.handler_idle = None
  14333. * self.handler_check__exec_writes = None
  14334. */
  14335. __Pyx_INCREF(Py_None);
  14336. __Pyx_GIVEREF(Py_None);
  14337. __Pyx_GOTREF(__pyx_v_self->handler_async);
  14338. __Pyx_DECREF(((PyObject *)__pyx_v_self->handler_async));
  14339. __pyx_v_self->handler_async = ((struct __pyx_obj_6uvloop_4loop_UVAsync *)Py_None);
  14340. /* "uvloop/loop.pyx":559
  14341. *
  14342. * self.handler_async = None
  14343. * self.handler_idle = None # <<<<<<<<<<<<<<
  14344. * self.handler_check__exec_writes = None
  14345. *
  14346. */
  14347. __Pyx_INCREF(Py_None);
  14348. __Pyx_GIVEREF(Py_None);
  14349. __Pyx_GOTREF(__pyx_v_self->handler_idle);
  14350. __Pyx_DECREF(((PyObject *)__pyx_v_self->handler_idle));
  14351. __pyx_v_self->handler_idle = ((struct __pyx_obj_6uvloop_4loop_UVIdle *)Py_None);
  14352. /* "uvloop/loop.pyx":560
  14353. * self.handler_async = None
  14354. * self.handler_idle = None
  14355. * self.handler_check__exec_writes = None # <<<<<<<<<<<<<<
  14356. *
  14357. * executor = self._default_executor
  14358. */
  14359. __Pyx_INCREF(Py_None);
  14360. __Pyx_GIVEREF(Py_None);
  14361. __Pyx_GOTREF(__pyx_v_self->handler_check__exec_writes);
  14362. __Pyx_DECREF(((PyObject *)__pyx_v_self->handler_check__exec_writes));
  14363. __pyx_v_self->handler_check__exec_writes = ((struct __pyx_obj_6uvloop_4loop_UVCheck *)Py_None);
  14364. /* "uvloop/loop.pyx":562
  14365. * self.handler_check__exec_writes = None
  14366. *
  14367. * executor = self._default_executor # <<<<<<<<<<<<<<
  14368. * if executor is not None:
  14369. * self._default_executor = None
  14370. */
  14371. __pyx_t_5 = __pyx_v_self->_default_executor;
  14372. __Pyx_INCREF(__pyx_t_5);
  14373. __pyx_v_executor = __pyx_t_5;
  14374. __pyx_t_5 = 0;
  14375. /* "uvloop/loop.pyx":563
  14376. *
  14377. * executor = self._default_executor
  14378. * if executor is not None: # <<<<<<<<<<<<<<
  14379. * self._default_executor = None
  14380. * executor.shutdown(wait=False)
  14381. */
  14382. __pyx_t_1 = (__pyx_v_executor != Py_None);
  14383. __pyx_t_12 = (__pyx_t_1 != 0);
  14384. if (__pyx_t_12) {
  14385. /* "uvloop/loop.pyx":564
  14386. * executor = self._default_executor
  14387. * if executor is not None:
  14388. * self._default_executor = None # <<<<<<<<<<<<<<
  14389. * executor.shutdown(wait=False)
  14390. *
  14391. */
  14392. __Pyx_INCREF(Py_None);
  14393. __Pyx_GIVEREF(Py_None);
  14394. __Pyx_GOTREF(__pyx_v_self->_default_executor);
  14395. __Pyx_DECREF(__pyx_v_self->_default_executor);
  14396. __pyx_v_self->_default_executor = Py_None;
  14397. /* "uvloop/loop.pyx":565
  14398. * if executor is not None:
  14399. * self._default_executor = None
  14400. * executor.shutdown(wait=False) # <<<<<<<<<<<<<<
  14401. *
  14402. * cdef uint64_t _time(self):
  14403. */
  14404. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_executor, __pyx_n_s_shutdown); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 565, __pyx_L1_error)
  14405. __Pyx_GOTREF(__pyx_t_5);
  14406. __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 565, __pyx_L1_error)
  14407. __Pyx_GOTREF(__pyx_t_2);
  14408. if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_wait, Py_False) < 0) __PYX_ERR(2, 565, __pyx_L1_error)
  14409. __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 565, __pyx_L1_error)
  14410. __Pyx_GOTREF(__pyx_t_6);
  14411. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  14412. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  14413. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  14414. /* "uvloop/loop.pyx":563
  14415. *
  14416. * executor = self._default_executor
  14417. * if executor is not None: # <<<<<<<<<<<<<<
  14418. * self._default_executor = None
  14419. * executor.shutdown(wait=False)
  14420. */
  14421. }
  14422. /* "uvloop/loop.pyx":494
  14423. * raise self._last_error
  14424. *
  14425. * cdef _close(self): # <<<<<<<<<<<<<<
  14426. * cdef int err
  14427. *
  14428. */
  14429. /* function exit code */
  14430. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  14431. goto __pyx_L0;
  14432. __pyx_L1_error:;
  14433. __Pyx_XDECREF(__pyx_t_2);
  14434. __Pyx_XDECREF(__pyx_t_5);
  14435. __Pyx_XDECREF(__pyx_t_6);
  14436. __Pyx_XDECREF(__pyx_t_7);
  14437. __Pyx_AddTraceback("uvloop.loop.Loop._close", __pyx_clineno, __pyx_lineno, __pyx_filename);
  14438. __pyx_r = 0;
  14439. __pyx_L0:;
  14440. __Pyx_XDECREF(__pyx_v_cb_handle);
  14441. __Pyx_XDECREF(__pyx_v_poll_handle);
  14442. __Pyx_XDECREF(__pyx_v_timer_cbhandle);
  14443. __Pyx_XDECREF(__pyx_v_fileobj);
  14444. __Pyx_XDECREF(__pyx_v_executor);
  14445. __Pyx_XGIVEREF(__pyx_r);
  14446. __Pyx_RefNannyFinishContext();
  14447. return __pyx_r;
  14448. }
  14449. /* "uvloop/loop.pyx":567
  14450. * executor.shutdown(wait=False)
  14451. *
  14452. * cdef uint64_t _time(self): # <<<<<<<<<<<<<<
  14453. * # asyncio doesn't have a time cache, neither should uvloop.
  14454. * uv.uv_update_time(self.uvloop) # void
  14455. */
  14456. static uint64_t __pyx_f_6uvloop_4loop_4Loop__time(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) {
  14457. uint64_t __pyx_r;
  14458. __Pyx_RefNannyDeclarations
  14459. __Pyx_RefNannySetupContext("_time", 0);
  14460. /* "uvloop/loop.pyx":569
  14461. * cdef uint64_t _time(self):
  14462. * # asyncio doesn't have a time cache, neither should uvloop.
  14463. * uv.uv_update_time(self.uvloop) # void # <<<<<<<<<<<<<<
  14464. * return uv.uv_now(self.uvloop)
  14465. *
  14466. */
  14467. uv_update_time(__pyx_v_self->uvloop);
  14468. /* "uvloop/loop.pyx":570
  14469. * # asyncio doesn't have a time cache, neither should uvloop.
  14470. * uv.uv_update_time(self.uvloop) # void
  14471. * return uv.uv_now(self.uvloop) # <<<<<<<<<<<<<<
  14472. *
  14473. * cdef inline _queue_write(self, UVStream stream):
  14474. */
  14475. __pyx_r = uv_now(__pyx_v_self->uvloop);
  14476. goto __pyx_L0;
  14477. /* "uvloop/loop.pyx":567
  14478. * executor.shutdown(wait=False)
  14479. *
  14480. * cdef uint64_t _time(self): # <<<<<<<<<<<<<<
  14481. * # asyncio doesn't have a time cache, neither should uvloop.
  14482. * uv.uv_update_time(self.uvloop) # void
  14483. */
  14484. /* function exit code */
  14485. __pyx_L0:;
  14486. __Pyx_RefNannyFinishContext();
  14487. return __pyx_r;
  14488. }
  14489. /* "uvloop/loop.pyx":572
  14490. * return uv.uv_now(self.uvloop)
  14491. *
  14492. * cdef inline _queue_write(self, UVStream stream): # <<<<<<<<<<<<<<
  14493. * self._queued_streams.add(stream)
  14494. * if not self.handler_check__exec_writes.running:
  14495. */
  14496. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_4Loop__queue_write(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_stream) {
  14497. PyObject *__pyx_r = NULL;
  14498. __Pyx_RefNannyDeclarations
  14499. int __pyx_t_1;
  14500. int __pyx_t_2;
  14501. PyObject *__pyx_t_3 = NULL;
  14502. __Pyx_RefNannySetupContext("_queue_write", 0);
  14503. /* "uvloop/loop.pyx":573
  14504. *
  14505. * cdef inline _queue_write(self, UVStream stream):
  14506. * self._queued_streams.add(stream) # <<<<<<<<<<<<<<
  14507. * if not self.handler_check__exec_writes.running:
  14508. * self.handler_check__exec_writes.start()
  14509. */
  14510. if (unlikely(__pyx_v_self->_queued_streams == Py_None)) {
  14511. PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "add");
  14512. __PYX_ERR(2, 573, __pyx_L1_error)
  14513. }
  14514. __pyx_t_1 = PySet_Add(__pyx_v_self->_queued_streams, ((PyObject *)__pyx_v_stream)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(2, 573, __pyx_L1_error)
  14515. /* "uvloop/loop.pyx":574
  14516. * cdef inline _queue_write(self, UVStream stream):
  14517. * self._queued_streams.add(stream)
  14518. * if not self.handler_check__exec_writes.running: # <<<<<<<<<<<<<<
  14519. * self.handler_check__exec_writes.start()
  14520. *
  14521. */
  14522. __pyx_t_2 = ((!(__pyx_v_self->handler_check__exec_writes->running != 0)) != 0);
  14523. if (__pyx_t_2) {
  14524. /* "uvloop/loop.pyx":575
  14525. * self._queued_streams.add(stream)
  14526. * if not self.handler_check__exec_writes.running:
  14527. * self.handler_check__exec_writes.start() # <<<<<<<<<<<<<<
  14528. *
  14529. * cdef _exec_queued_writes(self):
  14530. */
  14531. __pyx_t_3 = __pyx_f_6uvloop_4loop_7UVCheck_start(__pyx_v_self->handler_check__exec_writes); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 575, __pyx_L1_error)
  14532. __Pyx_GOTREF(__pyx_t_3);
  14533. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  14534. /* "uvloop/loop.pyx":574
  14535. * cdef inline _queue_write(self, UVStream stream):
  14536. * self._queued_streams.add(stream)
  14537. * if not self.handler_check__exec_writes.running: # <<<<<<<<<<<<<<
  14538. * self.handler_check__exec_writes.start()
  14539. *
  14540. */
  14541. }
  14542. /* "uvloop/loop.pyx":572
  14543. * return uv.uv_now(self.uvloop)
  14544. *
  14545. * cdef inline _queue_write(self, UVStream stream): # <<<<<<<<<<<<<<
  14546. * self._queued_streams.add(stream)
  14547. * if not self.handler_check__exec_writes.running:
  14548. */
  14549. /* function exit code */
  14550. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  14551. goto __pyx_L0;
  14552. __pyx_L1_error:;
  14553. __Pyx_XDECREF(__pyx_t_3);
  14554. __Pyx_AddTraceback("uvloop.loop.Loop._queue_write", __pyx_clineno, __pyx_lineno, __pyx_filename);
  14555. __pyx_r = 0;
  14556. __pyx_L0:;
  14557. __Pyx_XGIVEREF(__pyx_r);
  14558. __Pyx_RefNannyFinishContext();
  14559. return __pyx_r;
  14560. }
  14561. /* "uvloop/loop.pyx":577
  14562. * self.handler_check__exec_writes.start()
  14563. *
  14564. * cdef _exec_queued_writes(self): # <<<<<<<<<<<<<<
  14565. * if len(self._queued_streams) == 0:
  14566. * if self.handler_check__exec_writes.running:
  14567. */
  14568. static PyObject *__pyx_f_6uvloop_4loop_4Loop__exec_queued_writes(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) {
  14569. struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_stream = 0;
  14570. int __pyx_v_queued_len;
  14571. PyObject *__pyx_v_pystream = NULL;
  14572. PyObject *__pyx_r = NULL;
  14573. __Pyx_RefNannyDeclarations
  14574. PyObject *__pyx_t_1 = NULL;
  14575. Py_ssize_t __pyx_t_2;
  14576. int __pyx_t_3;
  14577. Py_ssize_t __pyx_t_4;
  14578. int __pyx_t_5;
  14579. PyObject *__pyx_t_6 = NULL;
  14580. int __pyx_t_7;
  14581. int __pyx_t_8;
  14582. __Pyx_RefNannySetupContext("_exec_queued_writes", 0);
  14583. /* "uvloop/loop.pyx":578
  14584. *
  14585. * cdef _exec_queued_writes(self):
  14586. * if len(self._queued_streams) == 0: # <<<<<<<<<<<<<<
  14587. * if self.handler_check__exec_writes.running:
  14588. * self.handler_check__exec_writes.stop()
  14589. */
  14590. __pyx_t_1 = __pyx_v_self->_queued_streams;
  14591. __Pyx_INCREF(__pyx_t_1);
  14592. if (unlikely(__pyx_t_1 == Py_None)) {
  14593. PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
  14594. __PYX_ERR(2, 578, __pyx_L1_error)
  14595. }
  14596. __pyx_t_2 = PySet_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(2, 578, __pyx_L1_error)
  14597. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  14598. __pyx_t_3 = ((__pyx_t_2 == 0) != 0);
  14599. if (__pyx_t_3) {
  14600. /* "uvloop/loop.pyx":579
  14601. * cdef _exec_queued_writes(self):
  14602. * if len(self._queued_streams) == 0:
  14603. * if self.handler_check__exec_writes.running: # <<<<<<<<<<<<<<
  14604. * self.handler_check__exec_writes.stop()
  14605. * return
  14606. */
  14607. __pyx_t_3 = (__pyx_v_self->handler_check__exec_writes->running != 0);
  14608. if (__pyx_t_3) {
  14609. /* "uvloop/loop.pyx":580
  14610. * if len(self._queued_streams) == 0:
  14611. * if self.handler_check__exec_writes.running:
  14612. * self.handler_check__exec_writes.stop() # <<<<<<<<<<<<<<
  14613. * return
  14614. *
  14615. */
  14616. __pyx_t_1 = __pyx_f_6uvloop_4loop_7UVCheck_stop(__pyx_v_self->handler_check__exec_writes); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 580, __pyx_L1_error)
  14617. __Pyx_GOTREF(__pyx_t_1);
  14618. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  14619. /* "uvloop/loop.pyx":579
  14620. * cdef _exec_queued_writes(self):
  14621. * if len(self._queued_streams) == 0:
  14622. * if self.handler_check__exec_writes.running: # <<<<<<<<<<<<<<
  14623. * self.handler_check__exec_writes.stop()
  14624. * return
  14625. */
  14626. }
  14627. /* "uvloop/loop.pyx":581
  14628. * if self.handler_check__exec_writes.running:
  14629. * self.handler_check__exec_writes.stop()
  14630. * return # <<<<<<<<<<<<<<
  14631. *
  14632. * cdef:
  14633. */
  14634. __Pyx_XDECREF(__pyx_r);
  14635. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  14636. goto __pyx_L0;
  14637. /* "uvloop/loop.pyx":578
  14638. *
  14639. * cdef _exec_queued_writes(self):
  14640. * if len(self._queued_streams) == 0: # <<<<<<<<<<<<<<
  14641. * if self.handler_check__exec_writes.running:
  14642. * self.handler_check__exec_writes.stop()
  14643. */
  14644. }
  14645. /* "uvloop/loop.pyx":587
  14646. * int queued_len
  14647. *
  14648. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  14649. * queued_len = len(self._queued_streams)
  14650. *
  14651. */
  14652. __pyx_t_3 = (UVLOOP_DEBUG != 0);
  14653. if (__pyx_t_3) {
  14654. /* "uvloop/loop.pyx":588
  14655. *
  14656. * if UVLOOP_DEBUG:
  14657. * queued_len = len(self._queued_streams) # <<<<<<<<<<<<<<
  14658. *
  14659. * for pystream in self._queued_streams:
  14660. */
  14661. __pyx_t_1 = __pyx_v_self->_queued_streams;
  14662. __Pyx_INCREF(__pyx_t_1);
  14663. if (unlikely(__pyx_t_1 == Py_None)) {
  14664. PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
  14665. __PYX_ERR(2, 588, __pyx_L1_error)
  14666. }
  14667. __pyx_t_2 = PySet_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(2, 588, __pyx_L1_error)
  14668. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  14669. __pyx_v_queued_len = __pyx_t_2;
  14670. /* "uvloop/loop.pyx":587
  14671. * int queued_len
  14672. *
  14673. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  14674. * queued_len = len(self._queued_streams)
  14675. *
  14676. */
  14677. }
  14678. /* "uvloop/loop.pyx":590
  14679. * queued_len = len(self._queued_streams)
  14680. *
  14681. * for pystream in self._queued_streams: # <<<<<<<<<<<<<<
  14682. * stream = <UVStream>pystream
  14683. * stream._exec_write()
  14684. */
  14685. __pyx_t_2 = 0;
  14686. __pyx_t_6 = __Pyx_set_iterator(__pyx_v_self->_queued_streams, 1, (&__pyx_t_4), (&__pyx_t_5)); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 590, __pyx_L1_error)
  14687. __Pyx_GOTREF(__pyx_t_6);
  14688. __Pyx_XDECREF(__pyx_t_1);
  14689. __pyx_t_1 = __pyx_t_6;
  14690. __pyx_t_6 = 0;
  14691. while (1) {
  14692. __pyx_t_7 = __Pyx_set_iter_next(__pyx_t_1, __pyx_t_4, &__pyx_t_2, &__pyx_t_6, __pyx_t_5);
  14693. if (unlikely(__pyx_t_7 == 0)) break;
  14694. if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(2, 590, __pyx_L1_error)
  14695. __Pyx_GOTREF(__pyx_t_6);
  14696. __Pyx_XDECREF_SET(__pyx_v_pystream, __pyx_t_6);
  14697. __pyx_t_6 = 0;
  14698. /* "uvloop/loop.pyx":591
  14699. *
  14700. * for pystream in self._queued_streams:
  14701. * stream = <UVStream>pystream # <<<<<<<<<<<<<<
  14702. * stream._exec_write()
  14703. *
  14704. */
  14705. __pyx_t_6 = __pyx_v_pystream;
  14706. __Pyx_INCREF(__pyx_t_6);
  14707. __Pyx_XDECREF_SET(__pyx_v_stream, ((struct __pyx_obj_6uvloop_4loop_UVStream *)__pyx_t_6));
  14708. __pyx_t_6 = 0;
  14709. /* "uvloop/loop.pyx":592
  14710. * for pystream in self._queued_streams:
  14711. * stream = <UVStream>pystream
  14712. * stream._exec_write() # <<<<<<<<<<<<<<
  14713. *
  14714. * if UVLOOP_DEBUG:
  14715. */
  14716. __pyx_t_6 = __pyx_f_6uvloop_4loop_8UVStream__exec_write(__pyx_v_stream); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 592, __pyx_L1_error)
  14717. __Pyx_GOTREF(__pyx_t_6);
  14718. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  14719. }
  14720. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  14721. /* "uvloop/loop.pyx":594
  14722. * stream._exec_write()
  14723. *
  14724. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  14725. * if len(self._queued_streams) != queued_len:
  14726. * raise RuntimeError(
  14727. */
  14728. __pyx_t_3 = (UVLOOP_DEBUG != 0);
  14729. if (__pyx_t_3) {
  14730. /* "uvloop/loop.pyx":595
  14731. *
  14732. * if UVLOOP_DEBUG:
  14733. * if len(self._queued_streams) != queued_len: # <<<<<<<<<<<<<<
  14734. * raise RuntimeError(
  14735. * 'loop._queued_streams are not empty after '
  14736. */
  14737. __pyx_t_1 = __pyx_v_self->_queued_streams;
  14738. __Pyx_INCREF(__pyx_t_1);
  14739. if (unlikely(__pyx_t_1 == Py_None)) {
  14740. PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
  14741. __PYX_ERR(2, 595, __pyx_L1_error)
  14742. }
  14743. __pyx_t_4 = PySet_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(2, 595, __pyx_L1_error)
  14744. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  14745. __pyx_t_3 = ((__pyx_t_4 != __pyx_v_queued_len) != 0);
  14746. if (unlikely(__pyx_t_3)) {
  14747. /* "uvloop/loop.pyx":596
  14748. * if UVLOOP_DEBUG:
  14749. * if len(self._queued_streams) != queued_len:
  14750. * raise RuntimeError( # <<<<<<<<<<<<<<
  14751. * 'loop._queued_streams are not empty after '
  14752. * '_exec_queued_writes')
  14753. */
  14754. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 596, __pyx_L1_error)
  14755. __Pyx_GOTREF(__pyx_t_1);
  14756. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  14757. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  14758. __PYX_ERR(2, 596, __pyx_L1_error)
  14759. /* "uvloop/loop.pyx":595
  14760. *
  14761. * if UVLOOP_DEBUG:
  14762. * if len(self._queued_streams) != queued_len: # <<<<<<<<<<<<<<
  14763. * raise RuntimeError(
  14764. * 'loop._queued_streams are not empty after '
  14765. */
  14766. }
  14767. /* "uvloop/loop.pyx":594
  14768. * stream._exec_write()
  14769. *
  14770. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  14771. * if len(self._queued_streams) != queued_len:
  14772. * raise RuntimeError(
  14773. */
  14774. }
  14775. /* "uvloop/loop.pyx":600
  14776. * '_exec_queued_writes')
  14777. *
  14778. * self._queued_streams.clear() # <<<<<<<<<<<<<<
  14779. *
  14780. * if self.handler_check__exec_writes.running:
  14781. */
  14782. if (unlikely(__pyx_v_self->_queued_streams == Py_None)) {
  14783. PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "clear");
  14784. __PYX_ERR(2, 600, __pyx_L1_error)
  14785. }
  14786. __pyx_t_8 = PySet_Clear(__pyx_v_self->_queued_streams); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(2, 600, __pyx_L1_error)
  14787. /* "uvloop/loop.pyx":602
  14788. * self._queued_streams.clear()
  14789. *
  14790. * if self.handler_check__exec_writes.running: # <<<<<<<<<<<<<<
  14791. * self.handler_check__exec_writes.stop()
  14792. *
  14793. */
  14794. __pyx_t_3 = (__pyx_v_self->handler_check__exec_writes->running != 0);
  14795. if (__pyx_t_3) {
  14796. /* "uvloop/loop.pyx":603
  14797. *
  14798. * if self.handler_check__exec_writes.running:
  14799. * self.handler_check__exec_writes.stop() # <<<<<<<<<<<<<<
  14800. *
  14801. * cdef inline _call_soon(self, object callback, object args, object context):
  14802. */
  14803. __pyx_t_1 = __pyx_f_6uvloop_4loop_7UVCheck_stop(__pyx_v_self->handler_check__exec_writes); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 603, __pyx_L1_error)
  14804. __Pyx_GOTREF(__pyx_t_1);
  14805. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  14806. /* "uvloop/loop.pyx":602
  14807. * self._queued_streams.clear()
  14808. *
  14809. * if self.handler_check__exec_writes.running: # <<<<<<<<<<<<<<
  14810. * self.handler_check__exec_writes.stop()
  14811. *
  14812. */
  14813. }
  14814. /* "uvloop/loop.pyx":577
  14815. * self.handler_check__exec_writes.start()
  14816. *
  14817. * cdef _exec_queued_writes(self): # <<<<<<<<<<<<<<
  14818. * if len(self._queued_streams) == 0:
  14819. * if self.handler_check__exec_writes.running:
  14820. */
  14821. /* function exit code */
  14822. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  14823. goto __pyx_L0;
  14824. __pyx_L1_error:;
  14825. __Pyx_XDECREF(__pyx_t_1);
  14826. __Pyx_XDECREF(__pyx_t_6);
  14827. __Pyx_AddTraceback("uvloop.loop.Loop._exec_queued_writes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  14828. __pyx_r = 0;
  14829. __pyx_L0:;
  14830. __Pyx_XDECREF((PyObject *)__pyx_v_stream);
  14831. __Pyx_XDECREF(__pyx_v_pystream);
  14832. __Pyx_XGIVEREF(__pyx_r);
  14833. __Pyx_RefNannyFinishContext();
  14834. return __pyx_r;
  14835. }
  14836. /* "uvloop/loop.pyx":605
  14837. * self.handler_check__exec_writes.stop()
  14838. *
  14839. * cdef inline _call_soon(self, object callback, object args, object context): # <<<<<<<<<<<<<<
  14840. * cdef Handle handle
  14841. * handle = new_Handle(self, callback, args, context)
  14842. */
  14843. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_4Loop__call_soon(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_callback, PyObject *__pyx_v_args, PyObject *__pyx_v_context) {
  14844. struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_handle = 0;
  14845. PyObject *__pyx_r = NULL;
  14846. __Pyx_RefNannyDeclarations
  14847. PyObject *__pyx_t_1 = NULL;
  14848. __Pyx_RefNannySetupContext("_call_soon", 0);
  14849. /* "uvloop/loop.pyx":607
  14850. * cdef inline _call_soon(self, object callback, object args, object context):
  14851. * cdef Handle handle
  14852. * handle = new_Handle(self, callback, args, context) # <<<<<<<<<<<<<<
  14853. * self._call_soon_handle(handle)
  14854. * return handle
  14855. */
  14856. __pyx_t_1 = __pyx_f_6uvloop_4loop_new_Handle(__pyx_v_self, __pyx_v_callback, __pyx_v_args, __pyx_v_context); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 607, __pyx_L1_error)
  14857. __Pyx_GOTREF(__pyx_t_1);
  14858. if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6uvloop_4loop_Handle))))) __PYX_ERR(2, 607, __pyx_L1_error)
  14859. __pyx_v_handle = ((struct __pyx_obj_6uvloop_4loop_Handle *)__pyx_t_1);
  14860. __pyx_t_1 = 0;
  14861. /* "uvloop/loop.pyx":608
  14862. * cdef Handle handle
  14863. * handle = new_Handle(self, callback, args, context)
  14864. * self._call_soon_handle(handle) # <<<<<<<<<<<<<<
  14865. * return handle
  14866. *
  14867. */
  14868. __pyx_t_1 = __pyx_f_6uvloop_4loop_4Loop__call_soon_handle(__pyx_v_self, __pyx_v_handle); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 608, __pyx_L1_error)
  14869. __Pyx_GOTREF(__pyx_t_1);
  14870. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  14871. /* "uvloop/loop.pyx":609
  14872. * handle = new_Handle(self, callback, args, context)
  14873. * self._call_soon_handle(handle)
  14874. * return handle # <<<<<<<<<<<<<<
  14875. *
  14876. * cdef inline _call_soon_handle(self, Handle handle):
  14877. */
  14878. __Pyx_XDECREF(__pyx_r);
  14879. __Pyx_INCREF(((PyObject *)__pyx_v_handle));
  14880. __pyx_r = ((PyObject *)__pyx_v_handle);
  14881. goto __pyx_L0;
  14882. /* "uvloop/loop.pyx":605
  14883. * self.handler_check__exec_writes.stop()
  14884. *
  14885. * cdef inline _call_soon(self, object callback, object args, object context): # <<<<<<<<<<<<<<
  14886. * cdef Handle handle
  14887. * handle = new_Handle(self, callback, args, context)
  14888. */
  14889. /* function exit code */
  14890. __pyx_L1_error:;
  14891. __Pyx_XDECREF(__pyx_t_1);
  14892. __Pyx_AddTraceback("uvloop.loop.Loop._call_soon", __pyx_clineno, __pyx_lineno, __pyx_filename);
  14893. __pyx_r = 0;
  14894. __pyx_L0:;
  14895. __Pyx_XDECREF((PyObject *)__pyx_v_handle);
  14896. __Pyx_XGIVEREF(__pyx_r);
  14897. __Pyx_RefNannyFinishContext();
  14898. return __pyx_r;
  14899. }
  14900. /* "uvloop/loop.pyx":611
  14901. * return handle
  14902. *
  14903. * cdef inline _call_soon_handle(self, Handle handle): # <<<<<<<<<<<<<<
  14904. * self._check_closed()
  14905. * self._ready.append(handle)
  14906. */
  14907. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_4Loop__call_soon_handle(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_handle) {
  14908. PyObject *__pyx_r = NULL;
  14909. __Pyx_RefNannyDeclarations
  14910. PyObject *__pyx_t_1 = NULL;
  14911. int __pyx_t_2;
  14912. int __pyx_t_3;
  14913. __Pyx_RefNannySetupContext("_call_soon_handle", 0);
  14914. /* "uvloop/loop.pyx":612
  14915. *
  14916. * cdef inline _call_soon_handle(self, Handle handle):
  14917. * self._check_closed() # <<<<<<<<<<<<<<
  14918. * self._ready.append(handle)
  14919. * self._ready_len += 1
  14920. */
  14921. __pyx_t_1 = __pyx_f_6uvloop_4loop_4Loop__check_closed(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 612, __pyx_L1_error)
  14922. __Pyx_GOTREF(__pyx_t_1);
  14923. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  14924. /* "uvloop/loop.pyx":613
  14925. * cdef inline _call_soon_handle(self, Handle handle):
  14926. * self._check_closed()
  14927. * self._ready.append(handle) # <<<<<<<<<<<<<<
  14928. * self._ready_len += 1
  14929. * if not self.handler_idle.running:
  14930. */
  14931. __pyx_t_2 = __Pyx_PyObject_Append(__pyx_v_self->_ready, ((PyObject *)__pyx_v_handle)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(2, 613, __pyx_L1_error)
  14932. /* "uvloop/loop.pyx":614
  14933. * self._check_closed()
  14934. * self._ready.append(handle)
  14935. * self._ready_len += 1 # <<<<<<<<<<<<<<
  14936. * if not self.handler_idle.running:
  14937. * self.handler_idle.start()
  14938. */
  14939. __pyx_v_self->_ready_len = (__pyx_v_self->_ready_len + 1);
  14940. /* "uvloop/loop.pyx":615
  14941. * self._ready.append(handle)
  14942. * self._ready_len += 1
  14943. * if not self.handler_idle.running: # <<<<<<<<<<<<<<
  14944. * self.handler_idle.start()
  14945. *
  14946. */
  14947. __pyx_t_3 = ((!(__pyx_v_self->handler_idle->running != 0)) != 0);
  14948. if (__pyx_t_3) {
  14949. /* "uvloop/loop.pyx":616
  14950. * self._ready_len += 1
  14951. * if not self.handler_idle.running:
  14952. * self.handler_idle.start() # <<<<<<<<<<<<<<
  14953. *
  14954. * cdef _call_later(self, uint64_t delay, object callback, object args,
  14955. */
  14956. __pyx_t_1 = __pyx_f_6uvloop_4loop_6UVIdle_start(__pyx_v_self->handler_idle); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 616, __pyx_L1_error)
  14957. __Pyx_GOTREF(__pyx_t_1);
  14958. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  14959. /* "uvloop/loop.pyx":615
  14960. * self._ready.append(handle)
  14961. * self._ready_len += 1
  14962. * if not self.handler_idle.running: # <<<<<<<<<<<<<<
  14963. * self.handler_idle.start()
  14964. *
  14965. */
  14966. }
  14967. /* "uvloop/loop.pyx":611
  14968. * return handle
  14969. *
  14970. * cdef inline _call_soon_handle(self, Handle handle): # <<<<<<<<<<<<<<
  14971. * self._check_closed()
  14972. * self._ready.append(handle)
  14973. */
  14974. /* function exit code */
  14975. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  14976. goto __pyx_L0;
  14977. __pyx_L1_error:;
  14978. __Pyx_XDECREF(__pyx_t_1);
  14979. __Pyx_AddTraceback("uvloop.loop.Loop._call_soon_handle", __pyx_clineno, __pyx_lineno, __pyx_filename);
  14980. __pyx_r = 0;
  14981. __pyx_L0:;
  14982. __Pyx_XGIVEREF(__pyx_r);
  14983. __Pyx_RefNannyFinishContext();
  14984. return __pyx_r;
  14985. }
  14986. /* "uvloop/loop.pyx":618
  14987. * self.handler_idle.start()
  14988. *
  14989. * cdef _call_later(self, uint64_t delay, object callback, object args, # <<<<<<<<<<<<<<
  14990. * object context):
  14991. * return TimerHandle(self, callback, args, delay, context)
  14992. */
  14993. static PyObject *__pyx_f_6uvloop_4loop_4Loop__call_later(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, uint64_t __pyx_v_delay, PyObject *__pyx_v_callback, PyObject *__pyx_v_args, PyObject *__pyx_v_context) {
  14994. PyObject *__pyx_r = NULL;
  14995. __Pyx_RefNannyDeclarations
  14996. PyObject *__pyx_t_1 = NULL;
  14997. PyObject *__pyx_t_2 = NULL;
  14998. __Pyx_RefNannySetupContext("_call_later", 0);
  14999. /* "uvloop/loop.pyx":620
  15000. * cdef _call_later(self, uint64_t delay, object callback, object args,
  15001. * object context):
  15002. * return TimerHandle(self, callback, args, delay, context) # <<<<<<<<<<<<<<
  15003. *
  15004. * cdef void _handle_exception(self, object ex):
  15005. */
  15006. __Pyx_XDECREF(__pyx_r);
  15007. __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_delay); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 620, __pyx_L1_error)
  15008. __Pyx_GOTREF(__pyx_t_1);
  15009. __pyx_t_2 = PyTuple_New(5); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 620, __pyx_L1_error)
  15010. __Pyx_GOTREF(__pyx_t_2);
  15011. __Pyx_INCREF(((PyObject *)__pyx_v_self));
  15012. __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  15013. PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self));
  15014. __Pyx_INCREF(__pyx_v_callback);
  15015. __Pyx_GIVEREF(__pyx_v_callback);
  15016. PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_callback);
  15017. __Pyx_INCREF(__pyx_v_args);
  15018. __Pyx_GIVEREF(__pyx_v_args);
  15019. PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_args);
  15020. __Pyx_GIVEREF(__pyx_t_1);
  15021. PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_1);
  15022. __Pyx_INCREF(__pyx_v_context);
  15023. __Pyx_GIVEREF(__pyx_v_context);
  15024. PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_v_context);
  15025. __pyx_t_1 = 0;
  15026. __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6uvloop_4loop_TimerHandle), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 620, __pyx_L1_error)
  15027. __Pyx_GOTREF(__pyx_t_1);
  15028. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  15029. __pyx_r = __pyx_t_1;
  15030. __pyx_t_1 = 0;
  15031. goto __pyx_L0;
  15032. /* "uvloop/loop.pyx":618
  15033. * self.handler_idle.start()
  15034. *
  15035. * cdef _call_later(self, uint64_t delay, object callback, object args, # <<<<<<<<<<<<<<
  15036. * object context):
  15037. * return TimerHandle(self, callback, args, delay, context)
  15038. */
  15039. /* function exit code */
  15040. __pyx_L1_error:;
  15041. __Pyx_XDECREF(__pyx_t_1);
  15042. __Pyx_XDECREF(__pyx_t_2);
  15043. __Pyx_AddTraceback("uvloop.loop.Loop._call_later", __pyx_clineno, __pyx_lineno, __pyx_filename);
  15044. __pyx_r = 0;
  15045. __pyx_L0:;
  15046. __Pyx_XGIVEREF(__pyx_r);
  15047. __Pyx_RefNannyFinishContext();
  15048. return __pyx_r;
  15049. }
  15050. /* "uvloop/loop.pyx":622
  15051. * return TimerHandle(self, callback, args, delay, context)
  15052. *
  15053. * cdef void _handle_exception(self, object ex): # <<<<<<<<<<<<<<
  15054. * if isinstance(ex, Exception):
  15055. * self.call_exception_handler({'exception': ex})
  15056. */
  15057. static void __pyx_f_6uvloop_4loop_4Loop__handle_exception(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_ex) {
  15058. __Pyx_RefNannyDeclarations
  15059. int __pyx_t_1;
  15060. int __pyx_t_2;
  15061. PyObject *__pyx_t_3 = NULL;
  15062. PyObject *__pyx_t_4 = NULL;
  15063. PyObject *__pyx_t_5 = NULL;
  15064. PyObject *__pyx_t_6 = NULL;
  15065. __Pyx_RefNannySetupContext("_handle_exception", 0);
  15066. /* "uvloop/loop.pyx":623
  15067. *
  15068. * cdef void _handle_exception(self, object ex):
  15069. * if isinstance(ex, Exception): # <<<<<<<<<<<<<<
  15070. * self.call_exception_handler({'exception': ex})
  15071. * else:
  15072. */
  15073. __pyx_t_1 = __Pyx_PyException_Check(__pyx_v_ex);
  15074. __pyx_t_2 = (__pyx_t_1 != 0);
  15075. if (__pyx_t_2) {
  15076. /* "uvloop/loop.pyx":624
  15077. * cdef void _handle_exception(self, object ex):
  15078. * if isinstance(ex, Exception):
  15079. * self.call_exception_handler({'exception': ex}) # <<<<<<<<<<<<<<
  15080. * else:
  15081. * # BaseException
  15082. */
  15083. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_call_exception_handler); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 624, __pyx_L1_error)
  15084. __Pyx_GOTREF(__pyx_t_4);
  15085. __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 624, __pyx_L1_error)
  15086. __Pyx_GOTREF(__pyx_t_5);
  15087. if (PyDict_SetItem(__pyx_t_5, __pyx_n_u_exception, __pyx_v_ex) < 0) __PYX_ERR(2, 624, __pyx_L1_error)
  15088. __pyx_t_6 = NULL;
  15089. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
  15090. __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
  15091. if (likely(__pyx_t_6)) {
  15092. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  15093. __Pyx_INCREF(__pyx_t_6);
  15094. __Pyx_INCREF(function);
  15095. __Pyx_DECREF_SET(__pyx_t_4, function);
  15096. }
  15097. }
  15098. __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5);
  15099. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  15100. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  15101. if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 624, __pyx_L1_error)
  15102. __Pyx_GOTREF(__pyx_t_3);
  15103. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  15104. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  15105. /* "uvloop/loop.pyx":623
  15106. *
  15107. * cdef void _handle_exception(self, object ex):
  15108. * if isinstance(ex, Exception): # <<<<<<<<<<<<<<
  15109. * self.call_exception_handler({'exception': ex})
  15110. * else:
  15111. */
  15112. goto __pyx_L3;
  15113. }
  15114. /* "uvloop/loop.pyx":627
  15115. * else:
  15116. * # BaseException
  15117. * self._last_error = ex # <<<<<<<<<<<<<<
  15118. * # Exit ASAP
  15119. * self._stop(None)
  15120. */
  15121. /*else*/ {
  15122. __Pyx_INCREF(__pyx_v_ex);
  15123. __Pyx_GIVEREF(__pyx_v_ex);
  15124. __Pyx_GOTREF(__pyx_v_self->_last_error);
  15125. __Pyx_DECREF(__pyx_v_self->_last_error);
  15126. __pyx_v_self->_last_error = __pyx_v_ex;
  15127. /* "uvloop/loop.pyx":629
  15128. * self._last_error = ex
  15129. * # Exit ASAP
  15130. * self._stop(None) # <<<<<<<<<<<<<<
  15131. *
  15132. * cdef inline _check_signal(self, sig):
  15133. */
  15134. __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_vtab)->_stop(__pyx_v_self, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 629, __pyx_L1_error)
  15135. __Pyx_GOTREF(__pyx_t_3);
  15136. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  15137. }
  15138. __pyx_L3:;
  15139. /* "uvloop/loop.pyx":622
  15140. * return TimerHandle(self, callback, args, delay, context)
  15141. *
  15142. * cdef void _handle_exception(self, object ex): # <<<<<<<<<<<<<<
  15143. * if isinstance(ex, Exception):
  15144. * self.call_exception_handler({'exception': ex})
  15145. */
  15146. /* function exit code */
  15147. goto __pyx_L0;
  15148. __pyx_L1_error:;
  15149. __Pyx_XDECREF(__pyx_t_3);
  15150. __Pyx_XDECREF(__pyx_t_4);
  15151. __Pyx_XDECREF(__pyx_t_5);
  15152. __Pyx_XDECREF(__pyx_t_6);
  15153. __Pyx_WriteUnraisable("uvloop.loop.Loop._handle_exception", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  15154. __pyx_L0:;
  15155. __Pyx_RefNannyFinishContext();
  15156. }
  15157. /* "uvloop/loop.pyx":631
  15158. * self._stop(None)
  15159. *
  15160. * cdef inline _check_signal(self, sig): # <<<<<<<<<<<<<<
  15161. * if not isinstance(sig, int):
  15162. * raise TypeError('sig must be an int, not {!r}'.format(sig))
  15163. */
  15164. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_4Loop__check_signal(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_sig) {
  15165. PyObject *__pyx_r = NULL;
  15166. __Pyx_RefNannyDeclarations
  15167. int __pyx_t_1;
  15168. int __pyx_t_2;
  15169. PyObject *__pyx_t_3 = NULL;
  15170. PyObject *__pyx_t_4 = NULL;
  15171. PyObject *__pyx_t_5 = NULL;
  15172. PyObject *__pyx_t_6 = NULL;
  15173. int __pyx_t_7;
  15174. PyObject *__pyx_t_8 = NULL;
  15175. __Pyx_RefNannySetupContext("_check_signal", 0);
  15176. /* "uvloop/loop.pyx":632
  15177. *
  15178. * cdef inline _check_signal(self, sig):
  15179. * if not isinstance(sig, int): # <<<<<<<<<<<<<<
  15180. * raise TypeError('sig must be an int, not {!r}'.format(sig))
  15181. *
  15182. */
  15183. __pyx_t_1 = PyInt_Check(__pyx_v_sig);
  15184. __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
  15185. if (unlikely(__pyx_t_2)) {
  15186. /* "uvloop/loop.pyx":633
  15187. * cdef inline _check_signal(self, sig):
  15188. * if not isinstance(sig, int):
  15189. * raise TypeError('sig must be an int, not {!r}'.format(sig)) # <<<<<<<<<<<<<<
  15190. *
  15191. * if not (1 <= sig < signal_NSIG):
  15192. */
  15193. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_sig_must_be_an_int_not_r, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 633, __pyx_L1_error)
  15194. __Pyx_GOTREF(__pyx_t_4);
  15195. __pyx_t_5 = NULL;
  15196. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
  15197. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
  15198. if (likely(__pyx_t_5)) {
  15199. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  15200. __Pyx_INCREF(__pyx_t_5);
  15201. __Pyx_INCREF(function);
  15202. __Pyx_DECREF_SET(__pyx_t_4, function);
  15203. }
  15204. }
  15205. __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_sig) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_sig);
  15206. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  15207. if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 633, __pyx_L1_error)
  15208. __Pyx_GOTREF(__pyx_t_3);
  15209. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  15210. __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 633, __pyx_L1_error)
  15211. __Pyx_GOTREF(__pyx_t_4);
  15212. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  15213. __Pyx_Raise(__pyx_t_4, 0, 0, 0);
  15214. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  15215. __PYX_ERR(2, 633, __pyx_L1_error)
  15216. /* "uvloop/loop.pyx":632
  15217. *
  15218. * cdef inline _check_signal(self, sig):
  15219. * if not isinstance(sig, int): # <<<<<<<<<<<<<<
  15220. * raise TypeError('sig must be an int, not {!r}'.format(sig))
  15221. *
  15222. */
  15223. }
  15224. /* "uvloop/loop.pyx":635
  15225. * raise TypeError('sig must be an int, not {!r}'.format(sig))
  15226. *
  15227. * if not (1 <= sig < signal_NSIG): # <<<<<<<<<<<<<<
  15228. * raise ValueError(
  15229. * 'sig {} out of range(1, {})'.format(sig, signal_NSIG))
  15230. */
  15231. __pyx_t_4 = PyObject_RichCompare(__pyx_int_1, __pyx_v_sig, Py_LE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 635, __pyx_L1_error)
  15232. if (__Pyx_PyObject_IsTrue(__pyx_t_4)) {
  15233. __Pyx_DECREF(__pyx_t_4);
  15234. __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_6uvloop_4loop_signal_NSIG); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 635, __pyx_L1_error)
  15235. __Pyx_GOTREF(__pyx_t_3);
  15236. __pyx_t_4 = PyObject_RichCompare(__pyx_v_sig, __pyx_t_3, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 635, __pyx_L1_error)
  15237. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  15238. }
  15239. __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(2, 635, __pyx_L1_error)
  15240. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  15241. __pyx_t_1 = ((!__pyx_t_2) != 0);
  15242. if (unlikely(__pyx_t_1)) {
  15243. /* "uvloop/loop.pyx":637
  15244. * if not (1 <= sig < signal_NSIG):
  15245. * raise ValueError(
  15246. * 'sig {} out of range(1, {})'.format(sig, signal_NSIG)) # <<<<<<<<<<<<<<
  15247. *
  15248. * cdef inline _check_closed(self):
  15249. */
  15250. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_sig_out_of_range_1, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 637, __pyx_L1_error)
  15251. __Pyx_GOTREF(__pyx_t_3);
  15252. __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_6uvloop_4loop_signal_NSIG); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 637, __pyx_L1_error)
  15253. __Pyx_GOTREF(__pyx_t_5);
  15254. __pyx_t_6 = NULL;
  15255. __pyx_t_7 = 0;
  15256. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
  15257. __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
  15258. if (likely(__pyx_t_6)) {
  15259. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  15260. __Pyx_INCREF(__pyx_t_6);
  15261. __Pyx_INCREF(function);
  15262. __Pyx_DECREF_SET(__pyx_t_3, function);
  15263. __pyx_t_7 = 1;
  15264. }
  15265. }
  15266. #if CYTHON_FAST_PYCALL
  15267. if (PyFunction_Check(__pyx_t_3)) {
  15268. PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_sig, __pyx_t_5};
  15269. __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 637, __pyx_L1_error)
  15270. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  15271. __Pyx_GOTREF(__pyx_t_4);
  15272. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  15273. } else
  15274. #endif
  15275. #if CYTHON_FAST_PYCCALL
  15276. if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
  15277. PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_sig, __pyx_t_5};
  15278. __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 637, __pyx_L1_error)
  15279. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  15280. __Pyx_GOTREF(__pyx_t_4);
  15281. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  15282. } else
  15283. #endif
  15284. {
  15285. __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 637, __pyx_L1_error)
  15286. __Pyx_GOTREF(__pyx_t_8);
  15287. if (__pyx_t_6) {
  15288. __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
  15289. }
  15290. __Pyx_INCREF(__pyx_v_sig);
  15291. __Pyx_GIVEREF(__pyx_v_sig);
  15292. PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_sig);
  15293. __Pyx_GIVEREF(__pyx_t_5);
  15294. PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_5);
  15295. __pyx_t_5 = 0;
  15296. __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 637, __pyx_L1_error)
  15297. __Pyx_GOTREF(__pyx_t_4);
  15298. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  15299. }
  15300. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  15301. /* "uvloop/loop.pyx":636
  15302. *
  15303. * if not (1 <= sig < signal_NSIG):
  15304. * raise ValueError( # <<<<<<<<<<<<<<
  15305. * 'sig {} out of range(1, {})'.format(sig, signal_NSIG))
  15306. *
  15307. */
  15308. __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 636, __pyx_L1_error)
  15309. __Pyx_GOTREF(__pyx_t_3);
  15310. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  15311. __Pyx_Raise(__pyx_t_3, 0, 0, 0);
  15312. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  15313. __PYX_ERR(2, 636, __pyx_L1_error)
  15314. /* "uvloop/loop.pyx":635
  15315. * raise TypeError('sig must be an int, not {!r}'.format(sig))
  15316. *
  15317. * if not (1 <= sig < signal_NSIG): # <<<<<<<<<<<<<<
  15318. * raise ValueError(
  15319. * 'sig {} out of range(1, {})'.format(sig, signal_NSIG))
  15320. */
  15321. }
  15322. /* "uvloop/loop.pyx":631
  15323. * self._stop(None)
  15324. *
  15325. * cdef inline _check_signal(self, sig): # <<<<<<<<<<<<<<
  15326. * if not isinstance(sig, int):
  15327. * raise TypeError('sig must be an int, not {!r}'.format(sig))
  15328. */
  15329. /* function exit code */
  15330. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  15331. goto __pyx_L0;
  15332. __pyx_L1_error:;
  15333. __Pyx_XDECREF(__pyx_t_3);
  15334. __Pyx_XDECREF(__pyx_t_4);
  15335. __Pyx_XDECREF(__pyx_t_5);
  15336. __Pyx_XDECREF(__pyx_t_6);
  15337. __Pyx_XDECREF(__pyx_t_8);
  15338. __Pyx_AddTraceback("uvloop.loop.Loop._check_signal", __pyx_clineno, __pyx_lineno, __pyx_filename);
  15339. __pyx_r = 0;
  15340. __pyx_L0:;
  15341. __Pyx_XGIVEREF(__pyx_r);
  15342. __Pyx_RefNannyFinishContext();
  15343. return __pyx_r;
  15344. }
  15345. /* "uvloop/loop.pyx":639
  15346. * 'sig {} out of range(1, {})'.format(sig, signal_NSIG))
  15347. *
  15348. * cdef inline _check_closed(self): # <<<<<<<<<<<<<<
  15349. * if self._closed == 1:
  15350. * raise RuntimeError('Event loop is closed')
  15351. */
  15352. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_4Loop__check_closed(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) {
  15353. PyObject *__pyx_r = NULL;
  15354. __Pyx_RefNannyDeclarations
  15355. int __pyx_t_1;
  15356. PyObject *__pyx_t_2 = NULL;
  15357. __Pyx_RefNannySetupContext("_check_closed", 0);
  15358. /* "uvloop/loop.pyx":640
  15359. *
  15360. * cdef inline _check_closed(self):
  15361. * if self._closed == 1: # <<<<<<<<<<<<<<
  15362. * raise RuntimeError('Event loop is closed')
  15363. *
  15364. */
  15365. __pyx_t_1 = ((__pyx_v_self->_closed == 1) != 0);
  15366. if (unlikely(__pyx_t_1)) {
  15367. /* "uvloop/loop.pyx":641
  15368. * cdef inline _check_closed(self):
  15369. * if self._closed == 1:
  15370. * raise RuntimeError('Event loop is closed') # <<<<<<<<<<<<<<
  15371. *
  15372. * cdef inline _check_thread(self):
  15373. */
  15374. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 641, __pyx_L1_error)
  15375. __Pyx_GOTREF(__pyx_t_2);
  15376. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  15377. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  15378. __PYX_ERR(2, 641, __pyx_L1_error)
  15379. /* "uvloop/loop.pyx":640
  15380. *
  15381. * cdef inline _check_closed(self):
  15382. * if self._closed == 1: # <<<<<<<<<<<<<<
  15383. * raise RuntimeError('Event loop is closed')
  15384. *
  15385. */
  15386. }
  15387. /* "uvloop/loop.pyx":639
  15388. * 'sig {} out of range(1, {})'.format(sig, signal_NSIG))
  15389. *
  15390. * cdef inline _check_closed(self): # <<<<<<<<<<<<<<
  15391. * if self._closed == 1:
  15392. * raise RuntimeError('Event loop is closed')
  15393. */
  15394. /* function exit code */
  15395. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  15396. goto __pyx_L0;
  15397. __pyx_L1_error:;
  15398. __Pyx_XDECREF(__pyx_t_2);
  15399. __Pyx_AddTraceback("uvloop.loop.Loop._check_closed", __pyx_clineno, __pyx_lineno, __pyx_filename);
  15400. __pyx_r = 0;
  15401. __pyx_L0:;
  15402. __Pyx_XGIVEREF(__pyx_r);
  15403. __Pyx_RefNannyFinishContext();
  15404. return __pyx_r;
  15405. }
  15406. /* "uvloop/loop.pyx":643
  15407. * raise RuntimeError('Event loop is closed')
  15408. *
  15409. * cdef inline _check_thread(self): # <<<<<<<<<<<<<<
  15410. * if self._thread_id == 0:
  15411. * return
  15412. */
  15413. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_4Loop__check_thread(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) {
  15414. uint64_t __pyx_v_thread_id;
  15415. PyObject *__pyx_r = NULL;
  15416. __Pyx_RefNannyDeclarations
  15417. int __pyx_t_1;
  15418. PyObject *__pyx_t_2 = NULL;
  15419. __Pyx_RefNannySetupContext("_check_thread", 0);
  15420. /* "uvloop/loop.pyx":644
  15421. *
  15422. * cdef inline _check_thread(self):
  15423. * if self._thread_id == 0: # <<<<<<<<<<<<<<
  15424. * return
  15425. *
  15426. */
  15427. __pyx_t_1 = ((__pyx_v_self->_thread_id == 0) != 0);
  15428. if (__pyx_t_1) {
  15429. /* "uvloop/loop.pyx":645
  15430. * cdef inline _check_thread(self):
  15431. * if self._thread_id == 0:
  15432. * return # <<<<<<<<<<<<<<
  15433. *
  15434. * cdef uint64_t thread_id
  15435. */
  15436. __Pyx_XDECREF(__pyx_r);
  15437. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  15438. goto __pyx_L0;
  15439. /* "uvloop/loop.pyx":644
  15440. *
  15441. * cdef inline _check_thread(self):
  15442. * if self._thread_id == 0: # <<<<<<<<<<<<<<
  15443. * return
  15444. *
  15445. */
  15446. }
  15447. /* "uvloop/loop.pyx":648
  15448. *
  15449. * cdef uint64_t thread_id
  15450. * thread_id = <uint64_t><int64_t>PyThread_get_thread_ident() # <<<<<<<<<<<<<<
  15451. *
  15452. * if thread_id != self._thread_id:
  15453. */
  15454. __pyx_v_thread_id = ((uint64_t)((int64_t)PyThread_get_thread_ident()));
  15455. /* "uvloop/loop.pyx":650
  15456. * thread_id = <uint64_t><int64_t>PyThread_get_thread_ident()
  15457. *
  15458. * if thread_id != self._thread_id: # <<<<<<<<<<<<<<
  15459. * raise RuntimeError(
  15460. * "Non-thread-safe operation invoked on an event loop other "
  15461. */
  15462. __pyx_t_1 = ((__pyx_v_thread_id != __pyx_v_self->_thread_id) != 0);
  15463. if (unlikely(__pyx_t_1)) {
  15464. /* "uvloop/loop.pyx":651
  15465. *
  15466. * if thread_id != self._thread_id:
  15467. * raise RuntimeError( # <<<<<<<<<<<<<<
  15468. * "Non-thread-safe operation invoked on an event loop other "
  15469. * "than the current one")
  15470. */
  15471. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 651, __pyx_L1_error)
  15472. __Pyx_GOTREF(__pyx_t_2);
  15473. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  15474. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  15475. __PYX_ERR(2, 651, __pyx_L1_error)
  15476. /* "uvloop/loop.pyx":650
  15477. * thread_id = <uint64_t><int64_t>PyThread_get_thread_ident()
  15478. *
  15479. * if thread_id != self._thread_id: # <<<<<<<<<<<<<<
  15480. * raise RuntimeError(
  15481. * "Non-thread-safe operation invoked on an event loop other "
  15482. */
  15483. }
  15484. /* "uvloop/loop.pyx":643
  15485. * raise RuntimeError('Event loop is closed')
  15486. *
  15487. * cdef inline _check_thread(self): # <<<<<<<<<<<<<<
  15488. * if self._thread_id == 0:
  15489. * return
  15490. */
  15491. /* function exit code */
  15492. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  15493. goto __pyx_L0;
  15494. __pyx_L1_error:;
  15495. __Pyx_XDECREF(__pyx_t_2);
  15496. __Pyx_AddTraceback("uvloop.loop.Loop._check_thread", __pyx_clineno, __pyx_lineno, __pyx_filename);
  15497. __pyx_r = 0;
  15498. __pyx_L0:;
  15499. __Pyx_XGIVEREF(__pyx_r);
  15500. __Pyx_RefNannyFinishContext();
  15501. return __pyx_r;
  15502. }
  15503. /* "uvloop/loop.pyx":655
  15504. * "than the current one")
  15505. *
  15506. * cdef inline _new_future(self): # <<<<<<<<<<<<<<
  15507. * return aio_Future(loop=self)
  15508. *
  15509. */
  15510. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_4Loop__new_future(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) {
  15511. PyObject *__pyx_r = NULL;
  15512. __Pyx_RefNannyDeclarations
  15513. PyObject *__pyx_t_1 = NULL;
  15514. PyObject *__pyx_t_2 = NULL;
  15515. __Pyx_RefNannySetupContext("_new_future", 0);
  15516. /* "uvloop/loop.pyx":656
  15517. *
  15518. * cdef inline _new_future(self):
  15519. * return aio_Future(loop=self) # <<<<<<<<<<<<<<
  15520. *
  15521. * cdef _track_transport(self, UVBaseTransport transport):
  15522. */
  15523. __Pyx_XDECREF(__pyx_r);
  15524. __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 656, __pyx_L1_error)
  15525. __Pyx_GOTREF(__pyx_t_1);
  15526. if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_loop, ((PyObject *)__pyx_v_self)) < 0) __PYX_ERR(2, 656, __pyx_L1_error)
  15527. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_v_6uvloop_4loop_aio_Future, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 656, __pyx_L1_error)
  15528. __Pyx_GOTREF(__pyx_t_2);
  15529. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  15530. __pyx_r = __pyx_t_2;
  15531. __pyx_t_2 = 0;
  15532. goto __pyx_L0;
  15533. /* "uvloop/loop.pyx":655
  15534. * "than the current one")
  15535. *
  15536. * cdef inline _new_future(self): # <<<<<<<<<<<<<<
  15537. * return aio_Future(loop=self)
  15538. *
  15539. */
  15540. /* function exit code */
  15541. __pyx_L1_error:;
  15542. __Pyx_XDECREF(__pyx_t_1);
  15543. __Pyx_XDECREF(__pyx_t_2);
  15544. __Pyx_AddTraceback("uvloop.loop.Loop._new_future", __pyx_clineno, __pyx_lineno, __pyx_filename);
  15545. __pyx_r = 0;
  15546. __pyx_L0:;
  15547. __Pyx_XGIVEREF(__pyx_r);
  15548. __Pyx_RefNannyFinishContext();
  15549. return __pyx_r;
  15550. }
  15551. /* "uvloop/loop.pyx":658
  15552. * return aio_Future(loop=self)
  15553. *
  15554. * cdef _track_transport(self, UVBaseTransport transport): # <<<<<<<<<<<<<<
  15555. * self._transports[transport._fileno()] = transport
  15556. *
  15557. */
  15558. static PyObject *__pyx_f_6uvloop_4loop_4Loop__track_transport(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_transport) {
  15559. PyObject *__pyx_r = NULL;
  15560. __Pyx_RefNannyDeclarations
  15561. PyObject *__pyx_t_1 = NULL;
  15562. __Pyx_RefNannySetupContext("_track_transport", 0);
  15563. /* "uvloop/loop.pyx":659
  15564. *
  15565. * cdef _track_transport(self, UVBaseTransport transport):
  15566. * self._transports[transport._fileno()] = transport # <<<<<<<<<<<<<<
  15567. *
  15568. * cdef _track_process(self, UVProcess proc):
  15569. */
  15570. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVBaseTransport *)__pyx_v_transport->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._fileno(((struct __pyx_obj_6uvloop_4loop_UVSocketHandle *)__pyx_v_transport)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 659, __pyx_L1_error)
  15571. __Pyx_GOTREF(__pyx_t_1);
  15572. if (unlikely(PyObject_SetItem(__pyx_v_self->_transports, __pyx_t_1, ((PyObject *)__pyx_v_transport)) < 0)) __PYX_ERR(2, 659, __pyx_L1_error)
  15573. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  15574. /* "uvloop/loop.pyx":658
  15575. * return aio_Future(loop=self)
  15576. *
  15577. * cdef _track_transport(self, UVBaseTransport transport): # <<<<<<<<<<<<<<
  15578. * self._transports[transport._fileno()] = transport
  15579. *
  15580. */
  15581. /* function exit code */
  15582. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  15583. goto __pyx_L0;
  15584. __pyx_L1_error:;
  15585. __Pyx_XDECREF(__pyx_t_1);
  15586. __Pyx_AddTraceback("uvloop.loop.Loop._track_transport", __pyx_clineno, __pyx_lineno, __pyx_filename);
  15587. __pyx_r = 0;
  15588. __pyx_L0:;
  15589. __Pyx_XGIVEREF(__pyx_r);
  15590. __Pyx_RefNannyFinishContext();
  15591. return __pyx_r;
  15592. }
  15593. /* "uvloop/loop.pyx":661
  15594. * self._transports[transport._fileno()] = transport
  15595. *
  15596. * cdef _track_process(self, UVProcess proc): # <<<<<<<<<<<<<<
  15597. * self._processes.add(proc)
  15598. *
  15599. */
  15600. static PyObject *__pyx_f_6uvloop_4loop_4Loop__track_process(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_UVProcess *__pyx_v_proc) {
  15601. PyObject *__pyx_r = NULL;
  15602. __Pyx_RefNannyDeclarations
  15603. int __pyx_t_1;
  15604. __Pyx_RefNannySetupContext("_track_process", 0);
  15605. /* "uvloop/loop.pyx":662
  15606. *
  15607. * cdef _track_process(self, UVProcess proc):
  15608. * self._processes.add(proc) # <<<<<<<<<<<<<<
  15609. *
  15610. * cdef _untrack_process(self, UVProcess proc):
  15611. */
  15612. if (unlikely(__pyx_v_self->_processes == Py_None)) {
  15613. PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "add");
  15614. __PYX_ERR(2, 662, __pyx_L1_error)
  15615. }
  15616. __pyx_t_1 = PySet_Add(__pyx_v_self->_processes, ((PyObject *)__pyx_v_proc)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(2, 662, __pyx_L1_error)
  15617. /* "uvloop/loop.pyx":661
  15618. * self._transports[transport._fileno()] = transport
  15619. *
  15620. * cdef _track_process(self, UVProcess proc): # <<<<<<<<<<<<<<
  15621. * self._processes.add(proc)
  15622. *
  15623. */
  15624. /* function exit code */
  15625. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  15626. goto __pyx_L0;
  15627. __pyx_L1_error:;
  15628. __Pyx_AddTraceback("uvloop.loop.Loop._track_process", __pyx_clineno, __pyx_lineno, __pyx_filename);
  15629. __pyx_r = 0;
  15630. __pyx_L0:;
  15631. __Pyx_XGIVEREF(__pyx_r);
  15632. __Pyx_RefNannyFinishContext();
  15633. return __pyx_r;
  15634. }
  15635. /* "uvloop/loop.pyx":664
  15636. * self._processes.add(proc)
  15637. *
  15638. * cdef _untrack_process(self, UVProcess proc): # <<<<<<<<<<<<<<
  15639. * self._processes.discard(proc)
  15640. *
  15641. */
  15642. static PyObject *__pyx_f_6uvloop_4loop_4Loop__untrack_process(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_UVProcess *__pyx_v_proc) {
  15643. PyObject *__pyx_r = NULL;
  15644. __Pyx_RefNannyDeclarations
  15645. int __pyx_t_1;
  15646. __Pyx_RefNannySetupContext("_untrack_process", 0);
  15647. /* "uvloop/loop.pyx":665
  15648. *
  15649. * cdef _untrack_process(self, UVProcess proc):
  15650. * self._processes.discard(proc) # <<<<<<<<<<<<<<
  15651. *
  15652. * cdef _fileobj_to_fd(self, fileobj):
  15653. */
  15654. if (unlikely(__pyx_v_self->_processes == Py_None)) {
  15655. PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "discard");
  15656. __PYX_ERR(2, 665, __pyx_L1_error)
  15657. }
  15658. __pyx_t_1 = __Pyx_PySet_Discard(__pyx_v_self->_processes, ((PyObject *)__pyx_v_proc)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(2, 665, __pyx_L1_error)
  15659. /* "uvloop/loop.pyx":664
  15660. * self._processes.add(proc)
  15661. *
  15662. * cdef _untrack_process(self, UVProcess proc): # <<<<<<<<<<<<<<
  15663. * self._processes.discard(proc)
  15664. *
  15665. */
  15666. /* function exit code */
  15667. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  15668. goto __pyx_L0;
  15669. __pyx_L1_error:;
  15670. __Pyx_AddTraceback("uvloop.loop.Loop._untrack_process", __pyx_clineno, __pyx_lineno, __pyx_filename);
  15671. __pyx_r = 0;
  15672. __pyx_L0:;
  15673. __Pyx_XGIVEREF(__pyx_r);
  15674. __Pyx_RefNannyFinishContext();
  15675. return __pyx_r;
  15676. }
  15677. /* "uvloop/loop.pyx":667
  15678. * self._processes.discard(proc)
  15679. *
  15680. * cdef _fileobj_to_fd(self, fileobj): # <<<<<<<<<<<<<<
  15681. * """Return a file descriptor from a file object.
  15682. *
  15683. */
  15684. static PyObject *__pyx_f_6uvloop_4loop_4Loop__fileobj_to_fd(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_fileobj) {
  15685. PyObject *__pyx_v_fd = NULL;
  15686. PyObject *__pyx_r = NULL;
  15687. __Pyx_RefNannyDeclarations
  15688. int __pyx_t_1;
  15689. int __pyx_t_2;
  15690. PyObject *__pyx_t_3 = NULL;
  15691. PyObject *__pyx_t_4 = NULL;
  15692. PyObject *__pyx_t_5 = NULL;
  15693. PyObject *__pyx_t_6 = NULL;
  15694. PyObject *__pyx_t_7 = NULL;
  15695. PyObject *__pyx_t_8 = NULL;
  15696. int __pyx_t_9;
  15697. PyObject *__pyx_t_10 = NULL;
  15698. PyObject *__pyx_t_11 = NULL;
  15699. PyObject *__pyx_t_12 = NULL;
  15700. __Pyx_RefNannySetupContext("_fileobj_to_fd", 0);
  15701. /* "uvloop/loop.pyx":680
  15702. * """
  15703. * # Copy of the `selectors._fileobj_to_fd()` function.
  15704. * if isinstance(fileobj, int): # <<<<<<<<<<<<<<
  15705. * fd = fileobj
  15706. * else:
  15707. */
  15708. __pyx_t_1 = PyInt_Check(__pyx_v_fileobj);
  15709. __pyx_t_2 = (__pyx_t_1 != 0);
  15710. if (__pyx_t_2) {
  15711. /* "uvloop/loop.pyx":681
  15712. * # Copy of the `selectors._fileobj_to_fd()` function.
  15713. * if isinstance(fileobj, int):
  15714. * fd = fileobj # <<<<<<<<<<<<<<
  15715. * else:
  15716. * try:
  15717. */
  15718. __Pyx_INCREF(__pyx_v_fileobj);
  15719. __pyx_v_fd = __pyx_v_fileobj;
  15720. /* "uvloop/loop.pyx":680
  15721. * """
  15722. * # Copy of the `selectors._fileobj_to_fd()` function.
  15723. * if isinstance(fileobj, int): # <<<<<<<<<<<<<<
  15724. * fd = fileobj
  15725. * else:
  15726. */
  15727. goto __pyx_L3;
  15728. }
  15729. /* "uvloop/loop.pyx":683
  15730. * fd = fileobj
  15731. * else:
  15732. * try: # <<<<<<<<<<<<<<
  15733. * fd = int(fileobj.fileno())
  15734. * except (AttributeError, TypeError, ValueError):
  15735. */
  15736. /*else*/ {
  15737. {
  15738. __Pyx_PyThreadState_declare
  15739. __Pyx_PyThreadState_assign
  15740. __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
  15741. __Pyx_XGOTREF(__pyx_t_3);
  15742. __Pyx_XGOTREF(__pyx_t_4);
  15743. __Pyx_XGOTREF(__pyx_t_5);
  15744. /*try:*/ {
  15745. /* "uvloop/loop.pyx":684
  15746. * else:
  15747. * try:
  15748. * fd = int(fileobj.fileno()) # <<<<<<<<<<<<<<
  15749. * except (AttributeError, TypeError, ValueError):
  15750. * raise ValueError("Invalid file object: "
  15751. */
  15752. __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_fileobj, __pyx_n_s_fileno); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 684, __pyx_L4_error)
  15753. __Pyx_GOTREF(__pyx_t_7);
  15754. __pyx_t_8 = NULL;
  15755. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
  15756. __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
  15757. if (likely(__pyx_t_8)) {
  15758. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
  15759. __Pyx_INCREF(__pyx_t_8);
  15760. __Pyx_INCREF(function);
  15761. __Pyx_DECREF_SET(__pyx_t_7, function);
  15762. }
  15763. }
  15764. __pyx_t_6 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_7);
  15765. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  15766. if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 684, __pyx_L4_error)
  15767. __Pyx_GOTREF(__pyx_t_6);
  15768. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  15769. __pyx_t_7 = __Pyx_PyNumber_Int(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 684, __pyx_L4_error)
  15770. __Pyx_GOTREF(__pyx_t_7);
  15771. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  15772. __pyx_v_fd = __pyx_t_7;
  15773. __pyx_t_7 = 0;
  15774. /* "uvloop/loop.pyx":683
  15775. * fd = fileobj
  15776. * else:
  15777. * try: # <<<<<<<<<<<<<<
  15778. * fd = int(fileobj.fileno())
  15779. * except (AttributeError, TypeError, ValueError):
  15780. */
  15781. }
  15782. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  15783. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  15784. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  15785. goto __pyx_L9_try_end;
  15786. __pyx_L4_error:;
  15787. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  15788. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  15789. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  15790. /* "uvloop/loop.pyx":685
  15791. * try:
  15792. * fd = int(fileobj.fileno())
  15793. * except (AttributeError, TypeError, ValueError): # <<<<<<<<<<<<<<
  15794. * raise ValueError("Invalid file object: "
  15795. * "{!r}".format(fileobj)) from None
  15796. */
  15797. __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError);
  15798. if (__pyx_t_9) {
  15799. __Pyx_AddTraceback("uvloop.loop.Loop._fileobj_to_fd", __pyx_clineno, __pyx_lineno, __pyx_filename);
  15800. if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_6, &__pyx_t_8) < 0) __PYX_ERR(2, 685, __pyx_L6_except_error)
  15801. __Pyx_GOTREF(__pyx_t_7);
  15802. __Pyx_GOTREF(__pyx_t_6);
  15803. __Pyx_GOTREF(__pyx_t_8);
  15804. /* "uvloop/loop.pyx":687
  15805. * except (AttributeError, TypeError, ValueError):
  15806. * raise ValueError("Invalid file object: "
  15807. * "{!r}".format(fileobj)) from None # <<<<<<<<<<<<<<
  15808. * if fd < 0:
  15809. * raise ValueError("Invalid file descriptor: {}".format(fd))
  15810. */
  15811. __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Invalid_file_object_r, __pyx_n_s_format); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 687, __pyx_L6_except_error)
  15812. __Pyx_GOTREF(__pyx_t_11);
  15813. __pyx_t_12 = NULL;
  15814. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) {
  15815. __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_11);
  15816. if (likely(__pyx_t_12)) {
  15817. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
  15818. __Pyx_INCREF(__pyx_t_12);
  15819. __Pyx_INCREF(function);
  15820. __Pyx_DECREF_SET(__pyx_t_11, function);
  15821. }
  15822. }
  15823. __pyx_t_10 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_11, __pyx_t_12, __pyx_v_fileobj) : __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_v_fileobj);
  15824. __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
  15825. if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 687, __pyx_L6_except_error)
  15826. __Pyx_GOTREF(__pyx_t_10);
  15827. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  15828. /* "uvloop/loop.pyx":686
  15829. * fd = int(fileobj.fileno())
  15830. * except (AttributeError, TypeError, ValueError):
  15831. * raise ValueError("Invalid file object: " # <<<<<<<<<<<<<<
  15832. * "{!r}".format(fileobj)) from None
  15833. * if fd < 0:
  15834. */
  15835. __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 686, __pyx_L6_except_error)
  15836. __Pyx_GOTREF(__pyx_t_11);
  15837. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  15838. /* "uvloop/loop.pyx":687
  15839. * except (AttributeError, TypeError, ValueError):
  15840. * raise ValueError("Invalid file object: "
  15841. * "{!r}".format(fileobj)) from None # <<<<<<<<<<<<<<
  15842. * if fd < 0:
  15843. * raise ValueError("Invalid file descriptor: {}".format(fd))
  15844. */
  15845. __Pyx_Raise(__pyx_t_11, 0, 0, Py_None);
  15846. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  15847. __PYX_ERR(2, 686, __pyx_L6_except_error)
  15848. }
  15849. goto __pyx_L6_except_error;
  15850. __pyx_L6_except_error:;
  15851. /* "uvloop/loop.pyx":683
  15852. * fd = fileobj
  15853. * else:
  15854. * try: # <<<<<<<<<<<<<<
  15855. * fd = int(fileobj.fileno())
  15856. * except (AttributeError, TypeError, ValueError):
  15857. */
  15858. __Pyx_XGIVEREF(__pyx_t_3);
  15859. __Pyx_XGIVEREF(__pyx_t_4);
  15860. __Pyx_XGIVEREF(__pyx_t_5);
  15861. __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
  15862. goto __pyx_L1_error;
  15863. __pyx_L9_try_end:;
  15864. }
  15865. }
  15866. __pyx_L3:;
  15867. /* "uvloop/loop.pyx":688
  15868. * raise ValueError("Invalid file object: "
  15869. * "{!r}".format(fileobj)) from None
  15870. * if fd < 0: # <<<<<<<<<<<<<<
  15871. * raise ValueError("Invalid file descriptor: {}".format(fd))
  15872. * return fd
  15873. */
  15874. __pyx_t_8 = PyObject_RichCompare(__pyx_v_fd, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 688, __pyx_L1_error)
  15875. __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(2, 688, __pyx_L1_error)
  15876. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  15877. if (unlikely(__pyx_t_2)) {
  15878. /* "uvloop/loop.pyx":689
  15879. * "{!r}".format(fileobj)) from None
  15880. * if fd < 0:
  15881. * raise ValueError("Invalid file descriptor: {}".format(fd)) # <<<<<<<<<<<<<<
  15882. * return fd
  15883. *
  15884. */
  15885. __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Invalid_file_descriptor, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 689, __pyx_L1_error)
  15886. __Pyx_GOTREF(__pyx_t_6);
  15887. __pyx_t_7 = NULL;
  15888. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
  15889. __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
  15890. if (likely(__pyx_t_7)) {
  15891. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
  15892. __Pyx_INCREF(__pyx_t_7);
  15893. __Pyx_INCREF(function);
  15894. __Pyx_DECREF_SET(__pyx_t_6, function);
  15895. }
  15896. }
  15897. __pyx_t_8 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_v_fd) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_fd);
  15898. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  15899. if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 689, __pyx_L1_error)
  15900. __Pyx_GOTREF(__pyx_t_8);
  15901. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  15902. __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 689, __pyx_L1_error)
  15903. __Pyx_GOTREF(__pyx_t_6);
  15904. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  15905. __Pyx_Raise(__pyx_t_6, 0, 0, 0);
  15906. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  15907. __PYX_ERR(2, 689, __pyx_L1_error)
  15908. /* "uvloop/loop.pyx":688
  15909. * raise ValueError("Invalid file object: "
  15910. * "{!r}".format(fileobj)) from None
  15911. * if fd < 0: # <<<<<<<<<<<<<<
  15912. * raise ValueError("Invalid file descriptor: {}".format(fd))
  15913. * return fd
  15914. */
  15915. }
  15916. /* "uvloop/loop.pyx":690
  15917. * if fd < 0:
  15918. * raise ValueError("Invalid file descriptor: {}".format(fd))
  15919. * return fd # <<<<<<<<<<<<<<
  15920. *
  15921. * cdef _ensure_fd_no_transport(self, fd):
  15922. */
  15923. __Pyx_XDECREF(__pyx_r);
  15924. __Pyx_INCREF(__pyx_v_fd);
  15925. __pyx_r = __pyx_v_fd;
  15926. goto __pyx_L0;
  15927. /* "uvloop/loop.pyx":667
  15928. * self._processes.discard(proc)
  15929. *
  15930. * cdef _fileobj_to_fd(self, fileobj): # <<<<<<<<<<<<<<
  15931. * """Return a file descriptor from a file object.
  15932. *
  15933. */
  15934. /* function exit code */
  15935. __pyx_L1_error:;
  15936. __Pyx_XDECREF(__pyx_t_6);
  15937. __Pyx_XDECREF(__pyx_t_7);
  15938. __Pyx_XDECREF(__pyx_t_8);
  15939. __Pyx_XDECREF(__pyx_t_10);
  15940. __Pyx_XDECREF(__pyx_t_11);
  15941. __Pyx_XDECREF(__pyx_t_12);
  15942. __Pyx_AddTraceback("uvloop.loop.Loop._fileobj_to_fd", __pyx_clineno, __pyx_lineno, __pyx_filename);
  15943. __pyx_r = 0;
  15944. __pyx_L0:;
  15945. __Pyx_XDECREF(__pyx_v_fd);
  15946. __Pyx_XGIVEREF(__pyx_r);
  15947. __Pyx_RefNannyFinishContext();
  15948. return __pyx_r;
  15949. }
  15950. /* "uvloop/loop.pyx":692
  15951. * return fd
  15952. *
  15953. * cdef _ensure_fd_no_transport(self, fd): # <<<<<<<<<<<<<<
  15954. * cdef UVBaseTransport tr
  15955. * try:
  15956. */
  15957. static PyObject *__pyx_f_6uvloop_4loop_4Loop__ensure_fd_no_transport(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_fd) {
  15958. struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_tr = 0;
  15959. PyObject *__pyx_r = NULL;
  15960. __Pyx_RefNannyDeclarations
  15961. PyObject *__pyx_t_1 = NULL;
  15962. PyObject *__pyx_t_2 = NULL;
  15963. PyObject *__pyx_t_3 = NULL;
  15964. PyObject *__pyx_t_4 = NULL;
  15965. PyObject *__pyx_t_5 = NULL;
  15966. int __pyx_t_6;
  15967. PyObject *__pyx_t_7 = NULL;
  15968. int __pyx_t_8;
  15969. PyObject *__pyx_t_9 = NULL;
  15970. __Pyx_RefNannySetupContext("_ensure_fd_no_transport", 0);
  15971. /* "uvloop/loop.pyx":694
  15972. * cdef _ensure_fd_no_transport(self, fd):
  15973. * cdef UVBaseTransport tr
  15974. * try: # <<<<<<<<<<<<<<
  15975. * tr = <UVBaseTransport>(self._transports[fd])
  15976. * except KeyError:
  15977. */
  15978. {
  15979. __Pyx_PyThreadState_declare
  15980. __Pyx_PyThreadState_assign
  15981. __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
  15982. __Pyx_XGOTREF(__pyx_t_1);
  15983. __Pyx_XGOTREF(__pyx_t_2);
  15984. __Pyx_XGOTREF(__pyx_t_3);
  15985. /*try:*/ {
  15986. /* "uvloop/loop.pyx":695
  15987. * cdef UVBaseTransport tr
  15988. * try:
  15989. * tr = <UVBaseTransport>(self._transports[fd]) # <<<<<<<<<<<<<<
  15990. * except KeyError:
  15991. * pass
  15992. */
  15993. __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_self->_transports, __pyx_v_fd); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 695, __pyx_L3_error)
  15994. __Pyx_GOTREF(__pyx_t_4);
  15995. __pyx_t_5 = __pyx_t_4;
  15996. __Pyx_INCREF(__pyx_t_5);
  15997. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  15998. __pyx_v_tr = ((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_t_5);
  15999. __pyx_t_5 = 0;
  16000. /* "uvloop/loop.pyx":694
  16001. * cdef _ensure_fd_no_transport(self, fd):
  16002. * cdef UVBaseTransport tr
  16003. * try: # <<<<<<<<<<<<<<
  16004. * tr = <UVBaseTransport>(self._transports[fd])
  16005. * except KeyError:
  16006. */
  16007. }
  16008. /* "uvloop/loop.pyx":699
  16009. * pass
  16010. * else:
  16011. * if tr._is_alive(): # <<<<<<<<<<<<<<
  16012. * raise RuntimeError(
  16013. * 'File descriptor {!r} is used by transport {!r}'.format(
  16014. */
  16015. /*else:*/ {
  16016. __pyx_t_6 = (((struct __pyx_vtabstruct_6uvloop_4loop_UVBaseTransport *)__pyx_v_tr->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._is_alive(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_tr)) != 0);
  16017. if (unlikely(__pyx_t_6)) {
  16018. /* "uvloop/loop.pyx":701
  16019. * if tr._is_alive():
  16020. * raise RuntimeError(
  16021. * 'File descriptor {!r} is used by transport {!r}'.format( # <<<<<<<<<<<<<<
  16022. * fd, tr))
  16023. *
  16024. */
  16025. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_File_descriptor_r_is_used_by_tra, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 701, __pyx_L5_except_error)
  16026. __Pyx_GOTREF(__pyx_t_4);
  16027. /* "uvloop/loop.pyx":702
  16028. * raise RuntimeError(
  16029. * 'File descriptor {!r} is used by transport {!r}'.format(
  16030. * fd, tr)) # <<<<<<<<<<<<<<
  16031. *
  16032. * cdef _add_reader(self, fileobj, Handle handle):
  16033. */
  16034. __pyx_t_7 = NULL;
  16035. __pyx_t_8 = 0;
  16036. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
  16037. __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
  16038. if (likely(__pyx_t_7)) {
  16039. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  16040. __Pyx_INCREF(__pyx_t_7);
  16041. __Pyx_INCREF(function);
  16042. __Pyx_DECREF_SET(__pyx_t_4, function);
  16043. __pyx_t_8 = 1;
  16044. }
  16045. }
  16046. #if CYTHON_FAST_PYCALL
  16047. if (PyFunction_Check(__pyx_t_4)) {
  16048. PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_fd, ((PyObject *)__pyx_v_tr)};
  16049. __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 701, __pyx_L5_except_error)
  16050. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  16051. __Pyx_GOTREF(__pyx_t_5);
  16052. } else
  16053. #endif
  16054. #if CYTHON_FAST_PYCCALL
  16055. if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
  16056. PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_fd, ((PyObject *)__pyx_v_tr)};
  16057. __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 701, __pyx_L5_except_error)
  16058. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  16059. __Pyx_GOTREF(__pyx_t_5);
  16060. } else
  16061. #endif
  16062. {
  16063. __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 701, __pyx_L5_except_error)
  16064. __Pyx_GOTREF(__pyx_t_9);
  16065. if (__pyx_t_7) {
  16066. __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
  16067. }
  16068. __Pyx_INCREF(__pyx_v_fd);
  16069. __Pyx_GIVEREF(__pyx_v_fd);
  16070. PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_fd);
  16071. __Pyx_INCREF(((PyObject *)__pyx_v_tr));
  16072. __Pyx_GIVEREF(((PyObject *)__pyx_v_tr));
  16073. PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, ((PyObject *)__pyx_v_tr));
  16074. __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 701, __pyx_L5_except_error)
  16075. __Pyx_GOTREF(__pyx_t_5);
  16076. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  16077. }
  16078. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  16079. /* "uvloop/loop.pyx":700
  16080. * else:
  16081. * if tr._is_alive():
  16082. * raise RuntimeError( # <<<<<<<<<<<<<<
  16083. * 'File descriptor {!r} is used by transport {!r}'.format(
  16084. * fd, tr))
  16085. */
  16086. __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 700, __pyx_L5_except_error)
  16087. __Pyx_GOTREF(__pyx_t_4);
  16088. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  16089. __Pyx_Raise(__pyx_t_4, 0, 0, 0);
  16090. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  16091. __PYX_ERR(2, 700, __pyx_L5_except_error)
  16092. /* "uvloop/loop.pyx":699
  16093. * pass
  16094. * else:
  16095. * if tr._is_alive(): # <<<<<<<<<<<<<<
  16096. * raise RuntimeError(
  16097. * 'File descriptor {!r} is used by transport {!r}'.format(
  16098. */
  16099. }
  16100. }
  16101. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  16102. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  16103. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  16104. goto __pyx_L8_try_end;
  16105. __pyx_L3_error:;
  16106. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  16107. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  16108. /* "uvloop/loop.pyx":696
  16109. * try:
  16110. * tr = <UVBaseTransport>(self._transports[fd])
  16111. * except KeyError: # <<<<<<<<<<<<<<
  16112. * pass
  16113. * else:
  16114. */
  16115. __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
  16116. if (__pyx_t_8) {
  16117. __Pyx_ErrRestore(0,0,0);
  16118. goto __pyx_L4_exception_handled;
  16119. }
  16120. goto __pyx_L5_except_error;
  16121. __pyx_L5_except_error:;
  16122. /* "uvloop/loop.pyx":694
  16123. * cdef _ensure_fd_no_transport(self, fd):
  16124. * cdef UVBaseTransport tr
  16125. * try: # <<<<<<<<<<<<<<
  16126. * tr = <UVBaseTransport>(self._transports[fd])
  16127. * except KeyError:
  16128. */
  16129. __Pyx_XGIVEREF(__pyx_t_1);
  16130. __Pyx_XGIVEREF(__pyx_t_2);
  16131. __Pyx_XGIVEREF(__pyx_t_3);
  16132. __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
  16133. goto __pyx_L1_error;
  16134. __pyx_L4_exception_handled:;
  16135. __Pyx_XGIVEREF(__pyx_t_1);
  16136. __Pyx_XGIVEREF(__pyx_t_2);
  16137. __Pyx_XGIVEREF(__pyx_t_3);
  16138. __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
  16139. __pyx_L8_try_end:;
  16140. }
  16141. /* "uvloop/loop.pyx":692
  16142. * return fd
  16143. *
  16144. * cdef _ensure_fd_no_transport(self, fd): # <<<<<<<<<<<<<<
  16145. * cdef UVBaseTransport tr
  16146. * try:
  16147. */
  16148. /* function exit code */
  16149. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  16150. goto __pyx_L0;
  16151. __pyx_L1_error:;
  16152. __Pyx_XDECREF(__pyx_t_4);
  16153. __Pyx_XDECREF(__pyx_t_5);
  16154. __Pyx_XDECREF(__pyx_t_7);
  16155. __Pyx_XDECREF(__pyx_t_9);
  16156. __Pyx_AddTraceback("uvloop.loop.Loop._ensure_fd_no_transport", __pyx_clineno, __pyx_lineno, __pyx_filename);
  16157. __pyx_r = 0;
  16158. __pyx_L0:;
  16159. __Pyx_XDECREF((PyObject *)__pyx_v_tr);
  16160. __Pyx_XGIVEREF(__pyx_r);
  16161. __Pyx_RefNannyFinishContext();
  16162. return __pyx_r;
  16163. }
  16164. /* "uvloop/loop.pyx":704
  16165. * fd, tr))
  16166. *
  16167. * cdef _add_reader(self, fileobj, Handle handle): # <<<<<<<<<<<<<<
  16168. * cdef:
  16169. * UVPoll poll
  16170. */
  16171. static PyObject *__pyx_f_6uvloop_4loop_4Loop__add_reader(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_fileobj, struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_handle) {
  16172. struct __pyx_obj_6uvloop_4loop_UVPoll *__pyx_v_poll = 0;
  16173. PyObject *__pyx_v_fd = NULL;
  16174. PyObject *__pyx_v_old_fileobj = NULL;
  16175. PyObject *__pyx_r = NULL;
  16176. __Pyx_RefNannyDeclarations
  16177. PyObject *__pyx_t_1 = NULL;
  16178. PyObject *__pyx_t_2 = NULL;
  16179. PyObject *__pyx_t_3 = NULL;
  16180. PyObject *__pyx_t_4 = NULL;
  16181. PyObject *__pyx_t_5 = NULL;
  16182. int __pyx_t_6;
  16183. PyObject *__pyx_t_7 = NULL;
  16184. PyObject *__pyx_t_8 = NULL;
  16185. int __pyx_t_9;
  16186. int __pyx_t_10;
  16187. __Pyx_RefNannySetupContext("_add_reader", 0);
  16188. /* "uvloop/loop.pyx":708
  16189. * UVPoll poll
  16190. *
  16191. * self._check_closed() # <<<<<<<<<<<<<<
  16192. * fd = self._fileobj_to_fd(fileobj)
  16193. * self._ensure_fd_no_transport(fd)
  16194. */
  16195. __pyx_t_1 = __pyx_f_6uvloop_4loop_4Loop__check_closed(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 708, __pyx_L1_error)
  16196. __Pyx_GOTREF(__pyx_t_1);
  16197. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  16198. /* "uvloop/loop.pyx":709
  16199. *
  16200. * self._check_closed()
  16201. * fd = self._fileobj_to_fd(fileobj) # <<<<<<<<<<<<<<
  16202. * self._ensure_fd_no_transport(fd)
  16203. *
  16204. */
  16205. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_vtab)->_fileobj_to_fd(__pyx_v_self, __pyx_v_fileobj); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 709, __pyx_L1_error)
  16206. __Pyx_GOTREF(__pyx_t_1);
  16207. __pyx_v_fd = __pyx_t_1;
  16208. __pyx_t_1 = 0;
  16209. /* "uvloop/loop.pyx":710
  16210. * self._check_closed()
  16211. * fd = self._fileobj_to_fd(fileobj)
  16212. * self._ensure_fd_no_transport(fd) # <<<<<<<<<<<<<<
  16213. *
  16214. * try:
  16215. */
  16216. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_vtab)->_ensure_fd_no_transport(__pyx_v_self, __pyx_v_fd); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 710, __pyx_L1_error)
  16217. __Pyx_GOTREF(__pyx_t_1);
  16218. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  16219. /* "uvloop/loop.pyx":712
  16220. * self._ensure_fd_no_transport(fd)
  16221. *
  16222. * try: # <<<<<<<<<<<<<<
  16223. * poll = <UVPoll>(self._polls[fd])
  16224. * except KeyError:
  16225. */
  16226. {
  16227. __Pyx_PyThreadState_declare
  16228. __Pyx_PyThreadState_assign
  16229. __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
  16230. __Pyx_XGOTREF(__pyx_t_2);
  16231. __Pyx_XGOTREF(__pyx_t_3);
  16232. __Pyx_XGOTREF(__pyx_t_4);
  16233. /*try:*/ {
  16234. /* "uvloop/loop.pyx":713
  16235. *
  16236. * try:
  16237. * poll = <UVPoll>(self._polls[fd]) # <<<<<<<<<<<<<<
  16238. * except KeyError:
  16239. * poll = UVPoll.new(self, fd)
  16240. */
  16241. if (unlikely(__pyx_v_self->_polls == Py_None)) {
  16242. PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
  16243. __PYX_ERR(2, 713, __pyx_L3_error)
  16244. }
  16245. __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_self->_polls, __pyx_v_fd); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 713, __pyx_L3_error)
  16246. __Pyx_GOTREF(__pyx_t_1);
  16247. __pyx_t_5 = __pyx_t_1;
  16248. __Pyx_INCREF(__pyx_t_5);
  16249. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  16250. __pyx_v_poll = ((struct __pyx_obj_6uvloop_4loop_UVPoll *)__pyx_t_5);
  16251. __pyx_t_5 = 0;
  16252. /* "uvloop/loop.pyx":712
  16253. * self._ensure_fd_no_transport(fd)
  16254. *
  16255. * try: # <<<<<<<<<<<<<<
  16256. * poll = <UVPoll>(self._polls[fd])
  16257. * except KeyError:
  16258. */
  16259. }
  16260. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  16261. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  16262. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  16263. goto __pyx_L8_try_end;
  16264. __pyx_L3_error:;
  16265. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  16266. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  16267. /* "uvloop/loop.pyx":714
  16268. * try:
  16269. * poll = <UVPoll>(self._polls[fd])
  16270. * except KeyError: # <<<<<<<<<<<<<<
  16271. * poll = UVPoll.new(self, fd)
  16272. * self._polls[fd] = poll
  16273. */
  16274. __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
  16275. if (__pyx_t_6) {
  16276. __Pyx_AddTraceback("uvloop.loop.Loop._add_reader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  16277. if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_1, &__pyx_t_7) < 0) __PYX_ERR(2, 714, __pyx_L5_except_error)
  16278. __Pyx_GOTREF(__pyx_t_5);
  16279. __Pyx_GOTREF(__pyx_t_1);
  16280. __Pyx_GOTREF(__pyx_t_7);
  16281. /* "uvloop/loop.pyx":715
  16282. * poll = <UVPoll>(self._polls[fd])
  16283. * except KeyError:
  16284. * poll = UVPoll.new(self, fd) # <<<<<<<<<<<<<<
  16285. * self._polls[fd] = poll
  16286. *
  16287. */
  16288. __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_fd); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 715, __pyx_L5_except_error)
  16289. __pyx_t_8 = ((PyObject *)__pyx_f_6uvloop_4loop_6UVPoll_new(__pyx_v_self, __pyx_t_6)); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 715, __pyx_L5_except_error)
  16290. __Pyx_GOTREF(__pyx_t_8);
  16291. __Pyx_XDECREF_SET(__pyx_v_poll, ((struct __pyx_obj_6uvloop_4loop_UVPoll *)__pyx_t_8));
  16292. __pyx_t_8 = 0;
  16293. /* "uvloop/loop.pyx":716
  16294. * except KeyError:
  16295. * poll = UVPoll.new(self, fd)
  16296. * self._polls[fd] = poll # <<<<<<<<<<<<<<
  16297. *
  16298. * poll.start_reading(handle)
  16299. */
  16300. if (unlikely(__pyx_v_self->_polls == Py_None)) {
  16301. PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
  16302. __PYX_ERR(2, 716, __pyx_L5_except_error)
  16303. }
  16304. if (unlikely(PyDict_SetItem(__pyx_v_self->_polls, __pyx_v_fd, ((PyObject *)__pyx_v_poll)) < 0)) __PYX_ERR(2, 716, __pyx_L5_except_error)
  16305. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  16306. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  16307. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  16308. goto __pyx_L4_exception_handled;
  16309. }
  16310. goto __pyx_L5_except_error;
  16311. __pyx_L5_except_error:;
  16312. /* "uvloop/loop.pyx":712
  16313. * self._ensure_fd_no_transport(fd)
  16314. *
  16315. * try: # <<<<<<<<<<<<<<
  16316. * poll = <UVPoll>(self._polls[fd])
  16317. * except KeyError:
  16318. */
  16319. __Pyx_XGIVEREF(__pyx_t_2);
  16320. __Pyx_XGIVEREF(__pyx_t_3);
  16321. __Pyx_XGIVEREF(__pyx_t_4);
  16322. __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
  16323. goto __pyx_L1_error;
  16324. __pyx_L4_exception_handled:;
  16325. __Pyx_XGIVEREF(__pyx_t_2);
  16326. __Pyx_XGIVEREF(__pyx_t_3);
  16327. __Pyx_XGIVEREF(__pyx_t_4);
  16328. __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
  16329. __pyx_L8_try_end:;
  16330. }
  16331. /* "uvloop/loop.pyx":718
  16332. * self._polls[fd] = poll
  16333. *
  16334. * poll.start_reading(handle) # <<<<<<<<<<<<<<
  16335. *
  16336. * old_fileobj = self._fd_to_reader_fileobj.pop(fd, None)
  16337. */
  16338. __pyx_t_7 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVPoll *)__pyx_v_poll->__pyx_base.__pyx_vtab)->start_reading(__pyx_v_poll, __pyx_v_handle); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 718, __pyx_L1_error)
  16339. __Pyx_GOTREF(__pyx_t_7);
  16340. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  16341. /* "uvloop/loop.pyx":720
  16342. * poll.start_reading(handle)
  16343. *
  16344. * old_fileobj = self._fd_to_reader_fileobj.pop(fd, None) # <<<<<<<<<<<<<<
  16345. * if old_fileobj is not None:
  16346. * socket_dec_io_ref(old_fileobj)
  16347. */
  16348. if (unlikely(__pyx_v_self->_fd_to_reader_fileobj == Py_None)) {
  16349. PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "pop");
  16350. __PYX_ERR(2, 720, __pyx_L1_error)
  16351. }
  16352. __pyx_t_7 = __Pyx_PyDict_Pop(__pyx_v_self->_fd_to_reader_fileobj, __pyx_v_fd, Py_None); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 720, __pyx_L1_error)
  16353. __Pyx_GOTREF(__pyx_t_7);
  16354. __pyx_v_old_fileobj = __pyx_t_7;
  16355. __pyx_t_7 = 0;
  16356. /* "uvloop/loop.pyx":721
  16357. *
  16358. * old_fileobj = self._fd_to_reader_fileobj.pop(fd, None)
  16359. * if old_fileobj is not None: # <<<<<<<<<<<<<<
  16360. * socket_dec_io_ref(old_fileobj)
  16361. *
  16362. */
  16363. __pyx_t_9 = (__pyx_v_old_fileobj != Py_None);
  16364. __pyx_t_10 = (__pyx_t_9 != 0);
  16365. if (__pyx_t_10) {
  16366. /* "uvloop/loop.pyx":722
  16367. * old_fileobj = self._fd_to_reader_fileobj.pop(fd, None)
  16368. * if old_fileobj is not None:
  16369. * socket_dec_io_ref(old_fileobj) # <<<<<<<<<<<<<<
  16370. *
  16371. * self._fd_to_reader_fileobj[fd] = fileobj
  16372. */
  16373. __pyx_t_7 = __pyx_f_6uvloop_4loop_socket_dec_io_ref(__pyx_v_old_fileobj); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 722, __pyx_L1_error)
  16374. __Pyx_GOTREF(__pyx_t_7);
  16375. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  16376. /* "uvloop/loop.pyx":721
  16377. *
  16378. * old_fileobj = self._fd_to_reader_fileobj.pop(fd, None)
  16379. * if old_fileobj is not None: # <<<<<<<<<<<<<<
  16380. * socket_dec_io_ref(old_fileobj)
  16381. *
  16382. */
  16383. }
  16384. /* "uvloop/loop.pyx":724
  16385. * socket_dec_io_ref(old_fileobj)
  16386. *
  16387. * self._fd_to_reader_fileobj[fd] = fileobj # <<<<<<<<<<<<<<
  16388. * socket_inc_io_ref(fileobj)
  16389. *
  16390. */
  16391. if (unlikely(__pyx_v_self->_fd_to_reader_fileobj == Py_None)) {
  16392. PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
  16393. __PYX_ERR(2, 724, __pyx_L1_error)
  16394. }
  16395. if (unlikely(PyDict_SetItem(__pyx_v_self->_fd_to_reader_fileobj, __pyx_v_fd, __pyx_v_fileobj) < 0)) __PYX_ERR(2, 724, __pyx_L1_error)
  16396. /* "uvloop/loop.pyx":725
  16397. *
  16398. * self._fd_to_reader_fileobj[fd] = fileobj
  16399. * socket_inc_io_ref(fileobj) # <<<<<<<<<<<<<<
  16400. *
  16401. * cdef _remove_reader(self, fileobj):
  16402. */
  16403. __pyx_t_7 = __pyx_f_6uvloop_4loop_socket_inc_io_ref(__pyx_v_fileobj); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 725, __pyx_L1_error)
  16404. __Pyx_GOTREF(__pyx_t_7);
  16405. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  16406. /* "uvloop/loop.pyx":704
  16407. * fd, tr))
  16408. *
  16409. * cdef _add_reader(self, fileobj, Handle handle): # <<<<<<<<<<<<<<
  16410. * cdef:
  16411. * UVPoll poll
  16412. */
  16413. /* function exit code */
  16414. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  16415. goto __pyx_L0;
  16416. __pyx_L1_error:;
  16417. __Pyx_XDECREF(__pyx_t_1);
  16418. __Pyx_XDECREF(__pyx_t_5);
  16419. __Pyx_XDECREF(__pyx_t_7);
  16420. __Pyx_XDECREF(__pyx_t_8);
  16421. __Pyx_AddTraceback("uvloop.loop.Loop._add_reader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  16422. __pyx_r = 0;
  16423. __pyx_L0:;
  16424. __Pyx_XDECREF((PyObject *)__pyx_v_poll);
  16425. __Pyx_XDECREF(__pyx_v_fd);
  16426. __Pyx_XDECREF(__pyx_v_old_fileobj);
  16427. __Pyx_XGIVEREF(__pyx_r);
  16428. __Pyx_RefNannyFinishContext();
  16429. return __pyx_r;
  16430. }
  16431. /* "uvloop/loop.pyx":727
  16432. * socket_inc_io_ref(fileobj)
  16433. *
  16434. * cdef _remove_reader(self, fileobj): # <<<<<<<<<<<<<<
  16435. * cdef:
  16436. * UVPoll poll
  16437. */
  16438. static PyObject *__pyx_f_6uvloop_4loop_4Loop__remove_reader(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_fileobj) {
  16439. struct __pyx_obj_6uvloop_4loop_UVPoll *__pyx_v_poll = 0;
  16440. PyObject *__pyx_v_fd = NULL;
  16441. PyObject *__pyx_v_mapped_fileobj = NULL;
  16442. PyObject *__pyx_v_result = NULL;
  16443. PyObject *__pyx_r = NULL;
  16444. __Pyx_RefNannyDeclarations
  16445. PyObject *__pyx_t_1 = NULL;
  16446. int __pyx_t_2;
  16447. int __pyx_t_3;
  16448. PyObject *__pyx_t_4 = NULL;
  16449. PyObject *__pyx_t_5 = NULL;
  16450. PyObject *__pyx_t_6 = NULL;
  16451. PyObject *__pyx_t_7 = NULL;
  16452. int __pyx_t_8;
  16453. PyObject *__pyx_t_9 = NULL;
  16454. __Pyx_RefNannySetupContext("_remove_reader", 0);
  16455. /* "uvloop/loop.pyx":731
  16456. * UVPoll poll
  16457. *
  16458. * fd = self._fileobj_to_fd(fileobj) # <<<<<<<<<<<<<<
  16459. * self._ensure_fd_no_transport(fd)
  16460. *
  16461. */
  16462. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_vtab)->_fileobj_to_fd(__pyx_v_self, __pyx_v_fileobj); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 731, __pyx_L1_error)
  16463. __Pyx_GOTREF(__pyx_t_1);
  16464. __pyx_v_fd = __pyx_t_1;
  16465. __pyx_t_1 = 0;
  16466. /* "uvloop/loop.pyx":732
  16467. *
  16468. * fd = self._fileobj_to_fd(fileobj)
  16469. * self._ensure_fd_no_transport(fd) # <<<<<<<<<<<<<<
  16470. *
  16471. * mapped_fileobj = self._fd_to_reader_fileobj.pop(fd, None)
  16472. */
  16473. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_vtab)->_ensure_fd_no_transport(__pyx_v_self, __pyx_v_fd); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 732, __pyx_L1_error)
  16474. __Pyx_GOTREF(__pyx_t_1);
  16475. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  16476. /* "uvloop/loop.pyx":734
  16477. * self._ensure_fd_no_transport(fd)
  16478. *
  16479. * mapped_fileobj = self._fd_to_reader_fileobj.pop(fd, None) # <<<<<<<<<<<<<<
  16480. * if mapped_fileobj is not None:
  16481. * socket_dec_io_ref(mapped_fileobj)
  16482. */
  16483. if (unlikely(__pyx_v_self->_fd_to_reader_fileobj == Py_None)) {
  16484. PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "pop");
  16485. __PYX_ERR(2, 734, __pyx_L1_error)
  16486. }
  16487. __pyx_t_1 = __Pyx_PyDict_Pop(__pyx_v_self->_fd_to_reader_fileobj, __pyx_v_fd, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 734, __pyx_L1_error)
  16488. __Pyx_GOTREF(__pyx_t_1);
  16489. __pyx_v_mapped_fileobj = __pyx_t_1;
  16490. __pyx_t_1 = 0;
  16491. /* "uvloop/loop.pyx":735
  16492. *
  16493. * mapped_fileobj = self._fd_to_reader_fileobj.pop(fd, None)
  16494. * if mapped_fileobj is not None: # <<<<<<<<<<<<<<
  16495. * socket_dec_io_ref(mapped_fileobj)
  16496. *
  16497. */
  16498. __pyx_t_2 = (__pyx_v_mapped_fileobj != Py_None);
  16499. __pyx_t_3 = (__pyx_t_2 != 0);
  16500. if (__pyx_t_3) {
  16501. /* "uvloop/loop.pyx":736
  16502. * mapped_fileobj = self._fd_to_reader_fileobj.pop(fd, None)
  16503. * if mapped_fileobj is not None:
  16504. * socket_dec_io_ref(mapped_fileobj) # <<<<<<<<<<<<<<
  16505. *
  16506. * if self._closed == 1:
  16507. */
  16508. __pyx_t_1 = __pyx_f_6uvloop_4loop_socket_dec_io_ref(__pyx_v_mapped_fileobj); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 736, __pyx_L1_error)
  16509. __Pyx_GOTREF(__pyx_t_1);
  16510. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  16511. /* "uvloop/loop.pyx":735
  16512. *
  16513. * mapped_fileobj = self._fd_to_reader_fileobj.pop(fd, None)
  16514. * if mapped_fileobj is not None: # <<<<<<<<<<<<<<
  16515. * socket_dec_io_ref(mapped_fileobj)
  16516. *
  16517. */
  16518. }
  16519. /* "uvloop/loop.pyx":738
  16520. * socket_dec_io_ref(mapped_fileobj)
  16521. *
  16522. * if self._closed == 1: # <<<<<<<<<<<<<<
  16523. * return False
  16524. *
  16525. */
  16526. __pyx_t_3 = ((__pyx_v_self->_closed == 1) != 0);
  16527. if (__pyx_t_3) {
  16528. /* "uvloop/loop.pyx":739
  16529. *
  16530. * if self._closed == 1:
  16531. * return False # <<<<<<<<<<<<<<
  16532. *
  16533. * try:
  16534. */
  16535. __Pyx_XDECREF(__pyx_r);
  16536. __Pyx_INCREF(Py_False);
  16537. __pyx_r = Py_False;
  16538. goto __pyx_L0;
  16539. /* "uvloop/loop.pyx":738
  16540. * socket_dec_io_ref(mapped_fileobj)
  16541. *
  16542. * if self._closed == 1: # <<<<<<<<<<<<<<
  16543. * return False
  16544. *
  16545. */
  16546. }
  16547. /* "uvloop/loop.pyx":741
  16548. * return False
  16549. *
  16550. * try: # <<<<<<<<<<<<<<
  16551. * poll = <UVPoll>(self._polls[fd])
  16552. * except KeyError:
  16553. */
  16554. {
  16555. __Pyx_PyThreadState_declare
  16556. __Pyx_PyThreadState_assign
  16557. __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
  16558. __Pyx_XGOTREF(__pyx_t_4);
  16559. __Pyx_XGOTREF(__pyx_t_5);
  16560. __Pyx_XGOTREF(__pyx_t_6);
  16561. /*try:*/ {
  16562. /* "uvloop/loop.pyx":742
  16563. *
  16564. * try:
  16565. * poll = <UVPoll>(self._polls[fd]) # <<<<<<<<<<<<<<
  16566. * except KeyError:
  16567. * return False
  16568. */
  16569. if (unlikely(__pyx_v_self->_polls == Py_None)) {
  16570. PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
  16571. __PYX_ERR(2, 742, __pyx_L5_error)
  16572. }
  16573. __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_self->_polls, __pyx_v_fd); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 742, __pyx_L5_error)
  16574. __Pyx_GOTREF(__pyx_t_1);
  16575. __pyx_t_7 = __pyx_t_1;
  16576. __Pyx_INCREF(__pyx_t_7);
  16577. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  16578. __pyx_v_poll = ((struct __pyx_obj_6uvloop_4loop_UVPoll *)__pyx_t_7);
  16579. __pyx_t_7 = 0;
  16580. /* "uvloop/loop.pyx":741
  16581. * return False
  16582. *
  16583. * try: # <<<<<<<<<<<<<<
  16584. * poll = <UVPoll>(self._polls[fd])
  16585. * except KeyError:
  16586. */
  16587. }
  16588. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  16589. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  16590. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  16591. goto __pyx_L10_try_end;
  16592. __pyx_L5_error:;
  16593. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  16594. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  16595. /* "uvloop/loop.pyx":743
  16596. * try:
  16597. * poll = <UVPoll>(self._polls[fd])
  16598. * except KeyError: # <<<<<<<<<<<<<<
  16599. * return False
  16600. *
  16601. */
  16602. __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
  16603. if (__pyx_t_8) {
  16604. __Pyx_AddTraceback("uvloop.loop.Loop._remove_reader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  16605. if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_1, &__pyx_t_9) < 0) __PYX_ERR(2, 743, __pyx_L7_except_error)
  16606. __Pyx_GOTREF(__pyx_t_7);
  16607. __Pyx_GOTREF(__pyx_t_1);
  16608. __Pyx_GOTREF(__pyx_t_9);
  16609. /* "uvloop/loop.pyx":744
  16610. * poll = <UVPoll>(self._polls[fd])
  16611. * except KeyError:
  16612. * return False # <<<<<<<<<<<<<<
  16613. *
  16614. * result = poll.stop_reading()
  16615. */
  16616. __Pyx_XDECREF(__pyx_r);
  16617. __Pyx_INCREF(Py_False);
  16618. __pyx_r = Py_False;
  16619. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  16620. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  16621. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  16622. goto __pyx_L8_except_return;
  16623. }
  16624. goto __pyx_L7_except_error;
  16625. __pyx_L7_except_error:;
  16626. /* "uvloop/loop.pyx":741
  16627. * return False
  16628. *
  16629. * try: # <<<<<<<<<<<<<<
  16630. * poll = <UVPoll>(self._polls[fd])
  16631. * except KeyError:
  16632. */
  16633. __Pyx_XGIVEREF(__pyx_t_4);
  16634. __Pyx_XGIVEREF(__pyx_t_5);
  16635. __Pyx_XGIVEREF(__pyx_t_6);
  16636. __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
  16637. goto __pyx_L1_error;
  16638. __pyx_L8_except_return:;
  16639. __Pyx_XGIVEREF(__pyx_t_4);
  16640. __Pyx_XGIVEREF(__pyx_t_5);
  16641. __Pyx_XGIVEREF(__pyx_t_6);
  16642. __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
  16643. goto __pyx_L0;
  16644. __pyx_L10_try_end:;
  16645. }
  16646. /* "uvloop/loop.pyx":746
  16647. * return False
  16648. *
  16649. * result = poll.stop_reading() # <<<<<<<<<<<<<<
  16650. * if not poll.is_active():
  16651. * del self._polls[fd]
  16652. */
  16653. __pyx_t_9 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVPoll *)__pyx_v_poll->__pyx_base.__pyx_vtab)->stop_reading(__pyx_v_poll); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 746, __pyx_L1_error)
  16654. __Pyx_GOTREF(__pyx_t_9);
  16655. __pyx_v_result = __pyx_t_9;
  16656. __pyx_t_9 = 0;
  16657. /* "uvloop/loop.pyx":747
  16658. *
  16659. * result = poll.stop_reading()
  16660. * if not poll.is_active(): # <<<<<<<<<<<<<<
  16661. * del self._polls[fd]
  16662. * poll._close()
  16663. */
  16664. __pyx_t_3 = ((!(((struct __pyx_vtabstruct_6uvloop_4loop_UVPoll *)__pyx_v_poll->__pyx_base.__pyx_vtab)->is_active(__pyx_v_poll) != 0)) != 0);
  16665. if (__pyx_t_3) {
  16666. /* "uvloop/loop.pyx":748
  16667. * result = poll.stop_reading()
  16668. * if not poll.is_active():
  16669. * del self._polls[fd] # <<<<<<<<<<<<<<
  16670. * poll._close()
  16671. *
  16672. */
  16673. if (unlikely(__pyx_v_self->_polls == Py_None)) {
  16674. PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
  16675. __PYX_ERR(2, 748, __pyx_L1_error)
  16676. }
  16677. if (unlikely(PyDict_DelItem(__pyx_v_self->_polls, __pyx_v_fd) < 0)) __PYX_ERR(2, 748, __pyx_L1_error)
  16678. /* "uvloop/loop.pyx":749
  16679. * if not poll.is_active():
  16680. * del self._polls[fd]
  16681. * poll._close() # <<<<<<<<<<<<<<
  16682. *
  16683. * return result
  16684. */
  16685. __pyx_t_9 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVPoll *)__pyx_v_poll->__pyx_base.__pyx_vtab)->__pyx_base._close(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_poll)); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 749, __pyx_L1_error)
  16686. __Pyx_GOTREF(__pyx_t_9);
  16687. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  16688. /* "uvloop/loop.pyx":747
  16689. *
  16690. * result = poll.stop_reading()
  16691. * if not poll.is_active(): # <<<<<<<<<<<<<<
  16692. * del self._polls[fd]
  16693. * poll._close()
  16694. */
  16695. }
  16696. /* "uvloop/loop.pyx":751
  16697. * poll._close()
  16698. *
  16699. * return result # <<<<<<<<<<<<<<
  16700. *
  16701. * cdef _has_reader(self, fileobj):
  16702. */
  16703. __Pyx_XDECREF(__pyx_r);
  16704. __Pyx_INCREF(__pyx_v_result);
  16705. __pyx_r = __pyx_v_result;
  16706. goto __pyx_L0;
  16707. /* "uvloop/loop.pyx":727
  16708. * socket_inc_io_ref(fileobj)
  16709. *
  16710. * cdef _remove_reader(self, fileobj): # <<<<<<<<<<<<<<
  16711. * cdef:
  16712. * UVPoll poll
  16713. */
  16714. /* function exit code */
  16715. __pyx_L1_error:;
  16716. __Pyx_XDECREF(__pyx_t_1);
  16717. __Pyx_XDECREF(__pyx_t_7);
  16718. __Pyx_XDECREF(__pyx_t_9);
  16719. __Pyx_AddTraceback("uvloop.loop.Loop._remove_reader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  16720. __pyx_r = 0;
  16721. __pyx_L0:;
  16722. __Pyx_XDECREF((PyObject *)__pyx_v_poll);
  16723. __Pyx_XDECREF(__pyx_v_fd);
  16724. __Pyx_XDECREF(__pyx_v_mapped_fileobj);
  16725. __Pyx_XDECREF(__pyx_v_result);
  16726. __Pyx_XGIVEREF(__pyx_r);
  16727. __Pyx_RefNannyFinishContext();
  16728. return __pyx_r;
  16729. }
  16730. /* "uvloop/loop.pyx":753
  16731. * return result
  16732. *
  16733. * cdef _has_reader(self, fileobj): # <<<<<<<<<<<<<<
  16734. * cdef:
  16735. * UVPoll poll
  16736. */
  16737. static PyObject *__pyx_f_6uvloop_4loop_4Loop__has_reader(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_fileobj) {
  16738. struct __pyx_obj_6uvloop_4loop_UVPoll *__pyx_v_poll = 0;
  16739. PyObject *__pyx_v_fd = NULL;
  16740. PyObject *__pyx_r = NULL;
  16741. __Pyx_RefNannyDeclarations
  16742. PyObject *__pyx_t_1 = NULL;
  16743. PyObject *__pyx_t_2 = NULL;
  16744. PyObject *__pyx_t_3 = NULL;
  16745. PyObject *__pyx_t_4 = NULL;
  16746. PyObject *__pyx_t_5 = NULL;
  16747. int __pyx_t_6;
  16748. PyObject *__pyx_t_7 = NULL;
  16749. __Pyx_RefNannySetupContext("_has_reader", 0);
  16750. /* "uvloop/loop.pyx":757
  16751. * UVPoll poll
  16752. *
  16753. * self._check_closed() # <<<<<<<<<<<<<<
  16754. * fd = self._fileobj_to_fd(fileobj)
  16755. *
  16756. */
  16757. __pyx_t_1 = __pyx_f_6uvloop_4loop_4Loop__check_closed(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 757, __pyx_L1_error)
  16758. __Pyx_GOTREF(__pyx_t_1);
  16759. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  16760. /* "uvloop/loop.pyx":758
  16761. *
  16762. * self._check_closed()
  16763. * fd = self._fileobj_to_fd(fileobj) # <<<<<<<<<<<<<<
  16764. *
  16765. * try:
  16766. */
  16767. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_vtab)->_fileobj_to_fd(__pyx_v_self, __pyx_v_fileobj); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 758, __pyx_L1_error)
  16768. __Pyx_GOTREF(__pyx_t_1);
  16769. __pyx_v_fd = __pyx_t_1;
  16770. __pyx_t_1 = 0;
  16771. /* "uvloop/loop.pyx":760
  16772. * fd = self._fileobj_to_fd(fileobj)
  16773. *
  16774. * try: # <<<<<<<<<<<<<<
  16775. * poll = <UVPoll>(self._polls[fd])
  16776. * except KeyError:
  16777. */
  16778. {
  16779. __Pyx_PyThreadState_declare
  16780. __Pyx_PyThreadState_assign
  16781. __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
  16782. __Pyx_XGOTREF(__pyx_t_2);
  16783. __Pyx_XGOTREF(__pyx_t_3);
  16784. __Pyx_XGOTREF(__pyx_t_4);
  16785. /*try:*/ {
  16786. /* "uvloop/loop.pyx":761
  16787. *
  16788. * try:
  16789. * poll = <UVPoll>(self._polls[fd]) # <<<<<<<<<<<<<<
  16790. * except KeyError:
  16791. * return False
  16792. */
  16793. if (unlikely(__pyx_v_self->_polls == Py_None)) {
  16794. PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
  16795. __PYX_ERR(2, 761, __pyx_L3_error)
  16796. }
  16797. __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_self->_polls, __pyx_v_fd); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 761, __pyx_L3_error)
  16798. __Pyx_GOTREF(__pyx_t_1);
  16799. __pyx_t_5 = __pyx_t_1;
  16800. __Pyx_INCREF(__pyx_t_5);
  16801. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  16802. __pyx_v_poll = ((struct __pyx_obj_6uvloop_4loop_UVPoll *)__pyx_t_5);
  16803. __pyx_t_5 = 0;
  16804. /* "uvloop/loop.pyx":760
  16805. * fd = self._fileobj_to_fd(fileobj)
  16806. *
  16807. * try: # <<<<<<<<<<<<<<
  16808. * poll = <UVPoll>(self._polls[fd])
  16809. * except KeyError:
  16810. */
  16811. }
  16812. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  16813. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  16814. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  16815. goto __pyx_L8_try_end;
  16816. __pyx_L3_error:;
  16817. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  16818. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  16819. /* "uvloop/loop.pyx":762
  16820. * try:
  16821. * poll = <UVPoll>(self._polls[fd])
  16822. * except KeyError: # <<<<<<<<<<<<<<
  16823. * return False
  16824. *
  16825. */
  16826. __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
  16827. if (__pyx_t_6) {
  16828. __Pyx_AddTraceback("uvloop.loop.Loop._has_reader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  16829. if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_1, &__pyx_t_7) < 0) __PYX_ERR(2, 762, __pyx_L5_except_error)
  16830. __Pyx_GOTREF(__pyx_t_5);
  16831. __Pyx_GOTREF(__pyx_t_1);
  16832. __Pyx_GOTREF(__pyx_t_7);
  16833. /* "uvloop/loop.pyx":763
  16834. * poll = <UVPoll>(self._polls[fd])
  16835. * except KeyError:
  16836. * return False # <<<<<<<<<<<<<<
  16837. *
  16838. * return poll.is_reading()
  16839. */
  16840. __Pyx_XDECREF(__pyx_r);
  16841. __Pyx_INCREF(Py_False);
  16842. __pyx_r = Py_False;
  16843. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  16844. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  16845. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  16846. goto __pyx_L6_except_return;
  16847. }
  16848. goto __pyx_L5_except_error;
  16849. __pyx_L5_except_error:;
  16850. /* "uvloop/loop.pyx":760
  16851. * fd = self._fileobj_to_fd(fileobj)
  16852. *
  16853. * try: # <<<<<<<<<<<<<<
  16854. * poll = <UVPoll>(self._polls[fd])
  16855. * except KeyError:
  16856. */
  16857. __Pyx_XGIVEREF(__pyx_t_2);
  16858. __Pyx_XGIVEREF(__pyx_t_3);
  16859. __Pyx_XGIVEREF(__pyx_t_4);
  16860. __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
  16861. goto __pyx_L1_error;
  16862. __pyx_L6_except_return:;
  16863. __Pyx_XGIVEREF(__pyx_t_2);
  16864. __Pyx_XGIVEREF(__pyx_t_3);
  16865. __Pyx_XGIVEREF(__pyx_t_4);
  16866. __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
  16867. goto __pyx_L0;
  16868. __pyx_L8_try_end:;
  16869. }
  16870. /* "uvloop/loop.pyx":765
  16871. * return False
  16872. *
  16873. * return poll.is_reading() # <<<<<<<<<<<<<<
  16874. *
  16875. * cdef _add_writer(self, fileobj, Handle handle):
  16876. */
  16877. __Pyx_XDECREF(__pyx_r);
  16878. __pyx_t_7 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVPoll *)__pyx_v_poll->__pyx_base.__pyx_vtab)->is_reading(__pyx_v_poll); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 765, __pyx_L1_error)
  16879. __Pyx_GOTREF(__pyx_t_7);
  16880. __pyx_r = __pyx_t_7;
  16881. __pyx_t_7 = 0;
  16882. goto __pyx_L0;
  16883. /* "uvloop/loop.pyx":753
  16884. * return result
  16885. *
  16886. * cdef _has_reader(self, fileobj): # <<<<<<<<<<<<<<
  16887. * cdef:
  16888. * UVPoll poll
  16889. */
  16890. /* function exit code */
  16891. __pyx_L1_error:;
  16892. __Pyx_XDECREF(__pyx_t_1);
  16893. __Pyx_XDECREF(__pyx_t_5);
  16894. __Pyx_XDECREF(__pyx_t_7);
  16895. __Pyx_AddTraceback("uvloop.loop.Loop._has_reader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  16896. __pyx_r = 0;
  16897. __pyx_L0:;
  16898. __Pyx_XDECREF((PyObject *)__pyx_v_poll);
  16899. __Pyx_XDECREF(__pyx_v_fd);
  16900. __Pyx_XGIVEREF(__pyx_r);
  16901. __Pyx_RefNannyFinishContext();
  16902. return __pyx_r;
  16903. }
  16904. /* "uvloop/loop.pyx":767
  16905. * return poll.is_reading()
  16906. *
  16907. * cdef _add_writer(self, fileobj, Handle handle): # <<<<<<<<<<<<<<
  16908. * cdef:
  16909. * UVPoll poll
  16910. */
  16911. static PyObject *__pyx_f_6uvloop_4loop_4Loop__add_writer(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_fileobj, struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_handle) {
  16912. struct __pyx_obj_6uvloop_4loop_UVPoll *__pyx_v_poll = 0;
  16913. PyObject *__pyx_v_fd = NULL;
  16914. PyObject *__pyx_v_old_fileobj = NULL;
  16915. PyObject *__pyx_r = NULL;
  16916. __Pyx_RefNannyDeclarations
  16917. PyObject *__pyx_t_1 = NULL;
  16918. PyObject *__pyx_t_2 = NULL;
  16919. PyObject *__pyx_t_3 = NULL;
  16920. PyObject *__pyx_t_4 = NULL;
  16921. PyObject *__pyx_t_5 = NULL;
  16922. int __pyx_t_6;
  16923. PyObject *__pyx_t_7 = NULL;
  16924. PyObject *__pyx_t_8 = NULL;
  16925. int __pyx_t_9;
  16926. int __pyx_t_10;
  16927. __Pyx_RefNannySetupContext("_add_writer", 0);
  16928. /* "uvloop/loop.pyx":771
  16929. * UVPoll poll
  16930. *
  16931. * self._check_closed() # <<<<<<<<<<<<<<
  16932. * fd = self._fileobj_to_fd(fileobj)
  16933. * self._ensure_fd_no_transport(fd)
  16934. */
  16935. __pyx_t_1 = __pyx_f_6uvloop_4loop_4Loop__check_closed(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 771, __pyx_L1_error)
  16936. __Pyx_GOTREF(__pyx_t_1);
  16937. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  16938. /* "uvloop/loop.pyx":772
  16939. *
  16940. * self._check_closed()
  16941. * fd = self._fileobj_to_fd(fileobj) # <<<<<<<<<<<<<<
  16942. * self._ensure_fd_no_transport(fd)
  16943. *
  16944. */
  16945. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_vtab)->_fileobj_to_fd(__pyx_v_self, __pyx_v_fileobj); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 772, __pyx_L1_error)
  16946. __Pyx_GOTREF(__pyx_t_1);
  16947. __pyx_v_fd = __pyx_t_1;
  16948. __pyx_t_1 = 0;
  16949. /* "uvloop/loop.pyx":773
  16950. * self._check_closed()
  16951. * fd = self._fileobj_to_fd(fileobj)
  16952. * self._ensure_fd_no_transport(fd) # <<<<<<<<<<<<<<
  16953. *
  16954. * try:
  16955. */
  16956. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_vtab)->_ensure_fd_no_transport(__pyx_v_self, __pyx_v_fd); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 773, __pyx_L1_error)
  16957. __Pyx_GOTREF(__pyx_t_1);
  16958. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  16959. /* "uvloop/loop.pyx":775
  16960. * self._ensure_fd_no_transport(fd)
  16961. *
  16962. * try: # <<<<<<<<<<<<<<
  16963. * poll = <UVPoll>(self._polls[fd])
  16964. * except KeyError:
  16965. */
  16966. {
  16967. __Pyx_PyThreadState_declare
  16968. __Pyx_PyThreadState_assign
  16969. __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
  16970. __Pyx_XGOTREF(__pyx_t_2);
  16971. __Pyx_XGOTREF(__pyx_t_3);
  16972. __Pyx_XGOTREF(__pyx_t_4);
  16973. /*try:*/ {
  16974. /* "uvloop/loop.pyx":776
  16975. *
  16976. * try:
  16977. * poll = <UVPoll>(self._polls[fd]) # <<<<<<<<<<<<<<
  16978. * except KeyError:
  16979. * poll = UVPoll.new(self, fd)
  16980. */
  16981. if (unlikely(__pyx_v_self->_polls == Py_None)) {
  16982. PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
  16983. __PYX_ERR(2, 776, __pyx_L3_error)
  16984. }
  16985. __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_self->_polls, __pyx_v_fd); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 776, __pyx_L3_error)
  16986. __Pyx_GOTREF(__pyx_t_1);
  16987. __pyx_t_5 = __pyx_t_1;
  16988. __Pyx_INCREF(__pyx_t_5);
  16989. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  16990. __pyx_v_poll = ((struct __pyx_obj_6uvloop_4loop_UVPoll *)__pyx_t_5);
  16991. __pyx_t_5 = 0;
  16992. /* "uvloop/loop.pyx":775
  16993. * self._ensure_fd_no_transport(fd)
  16994. *
  16995. * try: # <<<<<<<<<<<<<<
  16996. * poll = <UVPoll>(self._polls[fd])
  16997. * except KeyError:
  16998. */
  16999. }
  17000. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  17001. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  17002. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  17003. goto __pyx_L8_try_end;
  17004. __pyx_L3_error:;
  17005. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  17006. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  17007. /* "uvloop/loop.pyx":777
  17008. * try:
  17009. * poll = <UVPoll>(self._polls[fd])
  17010. * except KeyError: # <<<<<<<<<<<<<<
  17011. * poll = UVPoll.new(self, fd)
  17012. * self._polls[fd] = poll
  17013. */
  17014. __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
  17015. if (__pyx_t_6) {
  17016. __Pyx_AddTraceback("uvloop.loop.Loop._add_writer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  17017. if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_1, &__pyx_t_7) < 0) __PYX_ERR(2, 777, __pyx_L5_except_error)
  17018. __Pyx_GOTREF(__pyx_t_5);
  17019. __Pyx_GOTREF(__pyx_t_1);
  17020. __Pyx_GOTREF(__pyx_t_7);
  17021. /* "uvloop/loop.pyx":778
  17022. * poll = <UVPoll>(self._polls[fd])
  17023. * except KeyError:
  17024. * poll = UVPoll.new(self, fd) # <<<<<<<<<<<<<<
  17025. * self._polls[fd] = poll
  17026. *
  17027. */
  17028. __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_fd); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 778, __pyx_L5_except_error)
  17029. __pyx_t_8 = ((PyObject *)__pyx_f_6uvloop_4loop_6UVPoll_new(__pyx_v_self, __pyx_t_6)); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 778, __pyx_L5_except_error)
  17030. __Pyx_GOTREF(__pyx_t_8);
  17031. __Pyx_XDECREF_SET(__pyx_v_poll, ((struct __pyx_obj_6uvloop_4loop_UVPoll *)__pyx_t_8));
  17032. __pyx_t_8 = 0;
  17033. /* "uvloop/loop.pyx":779
  17034. * except KeyError:
  17035. * poll = UVPoll.new(self, fd)
  17036. * self._polls[fd] = poll # <<<<<<<<<<<<<<
  17037. *
  17038. * poll.start_writing(handle)
  17039. */
  17040. if (unlikely(__pyx_v_self->_polls == Py_None)) {
  17041. PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
  17042. __PYX_ERR(2, 779, __pyx_L5_except_error)
  17043. }
  17044. if (unlikely(PyDict_SetItem(__pyx_v_self->_polls, __pyx_v_fd, ((PyObject *)__pyx_v_poll)) < 0)) __PYX_ERR(2, 779, __pyx_L5_except_error)
  17045. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  17046. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  17047. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  17048. goto __pyx_L4_exception_handled;
  17049. }
  17050. goto __pyx_L5_except_error;
  17051. __pyx_L5_except_error:;
  17052. /* "uvloop/loop.pyx":775
  17053. * self._ensure_fd_no_transport(fd)
  17054. *
  17055. * try: # <<<<<<<<<<<<<<
  17056. * poll = <UVPoll>(self._polls[fd])
  17057. * except KeyError:
  17058. */
  17059. __Pyx_XGIVEREF(__pyx_t_2);
  17060. __Pyx_XGIVEREF(__pyx_t_3);
  17061. __Pyx_XGIVEREF(__pyx_t_4);
  17062. __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
  17063. goto __pyx_L1_error;
  17064. __pyx_L4_exception_handled:;
  17065. __Pyx_XGIVEREF(__pyx_t_2);
  17066. __Pyx_XGIVEREF(__pyx_t_3);
  17067. __Pyx_XGIVEREF(__pyx_t_4);
  17068. __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
  17069. __pyx_L8_try_end:;
  17070. }
  17071. /* "uvloop/loop.pyx":781
  17072. * self._polls[fd] = poll
  17073. *
  17074. * poll.start_writing(handle) # <<<<<<<<<<<<<<
  17075. *
  17076. * old_fileobj = self._fd_to_writer_fileobj.pop(fd, None)
  17077. */
  17078. __pyx_t_7 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVPoll *)__pyx_v_poll->__pyx_base.__pyx_vtab)->start_writing(__pyx_v_poll, __pyx_v_handle); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 781, __pyx_L1_error)
  17079. __Pyx_GOTREF(__pyx_t_7);
  17080. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  17081. /* "uvloop/loop.pyx":783
  17082. * poll.start_writing(handle)
  17083. *
  17084. * old_fileobj = self._fd_to_writer_fileobj.pop(fd, None) # <<<<<<<<<<<<<<
  17085. * if old_fileobj is not None:
  17086. * socket_dec_io_ref(old_fileobj)
  17087. */
  17088. if (unlikely(__pyx_v_self->_fd_to_writer_fileobj == Py_None)) {
  17089. PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "pop");
  17090. __PYX_ERR(2, 783, __pyx_L1_error)
  17091. }
  17092. __pyx_t_7 = __Pyx_PyDict_Pop(__pyx_v_self->_fd_to_writer_fileobj, __pyx_v_fd, Py_None); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 783, __pyx_L1_error)
  17093. __Pyx_GOTREF(__pyx_t_7);
  17094. __pyx_v_old_fileobj = __pyx_t_7;
  17095. __pyx_t_7 = 0;
  17096. /* "uvloop/loop.pyx":784
  17097. *
  17098. * old_fileobj = self._fd_to_writer_fileobj.pop(fd, None)
  17099. * if old_fileobj is not None: # <<<<<<<<<<<<<<
  17100. * socket_dec_io_ref(old_fileobj)
  17101. *
  17102. */
  17103. __pyx_t_9 = (__pyx_v_old_fileobj != Py_None);
  17104. __pyx_t_10 = (__pyx_t_9 != 0);
  17105. if (__pyx_t_10) {
  17106. /* "uvloop/loop.pyx":785
  17107. * old_fileobj = self._fd_to_writer_fileobj.pop(fd, None)
  17108. * if old_fileobj is not None:
  17109. * socket_dec_io_ref(old_fileobj) # <<<<<<<<<<<<<<
  17110. *
  17111. * self._fd_to_writer_fileobj[fd] = fileobj
  17112. */
  17113. __pyx_t_7 = __pyx_f_6uvloop_4loop_socket_dec_io_ref(__pyx_v_old_fileobj); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 785, __pyx_L1_error)
  17114. __Pyx_GOTREF(__pyx_t_7);
  17115. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  17116. /* "uvloop/loop.pyx":784
  17117. *
  17118. * old_fileobj = self._fd_to_writer_fileobj.pop(fd, None)
  17119. * if old_fileobj is not None: # <<<<<<<<<<<<<<
  17120. * socket_dec_io_ref(old_fileobj)
  17121. *
  17122. */
  17123. }
  17124. /* "uvloop/loop.pyx":787
  17125. * socket_dec_io_ref(old_fileobj)
  17126. *
  17127. * self._fd_to_writer_fileobj[fd] = fileobj # <<<<<<<<<<<<<<
  17128. * socket_inc_io_ref(fileobj)
  17129. *
  17130. */
  17131. if (unlikely(__pyx_v_self->_fd_to_writer_fileobj == Py_None)) {
  17132. PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
  17133. __PYX_ERR(2, 787, __pyx_L1_error)
  17134. }
  17135. if (unlikely(PyDict_SetItem(__pyx_v_self->_fd_to_writer_fileobj, __pyx_v_fd, __pyx_v_fileobj) < 0)) __PYX_ERR(2, 787, __pyx_L1_error)
  17136. /* "uvloop/loop.pyx":788
  17137. *
  17138. * self._fd_to_writer_fileobj[fd] = fileobj
  17139. * socket_inc_io_ref(fileobj) # <<<<<<<<<<<<<<
  17140. *
  17141. * cdef _remove_writer(self, fileobj):
  17142. */
  17143. __pyx_t_7 = __pyx_f_6uvloop_4loop_socket_inc_io_ref(__pyx_v_fileobj); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 788, __pyx_L1_error)
  17144. __Pyx_GOTREF(__pyx_t_7);
  17145. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  17146. /* "uvloop/loop.pyx":767
  17147. * return poll.is_reading()
  17148. *
  17149. * cdef _add_writer(self, fileobj, Handle handle): # <<<<<<<<<<<<<<
  17150. * cdef:
  17151. * UVPoll poll
  17152. */
  17153. /* function exit code */
  17154. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  17155. goto __pyx_L0;
  17156. __pyx_L1_error:;
  17157. __Pyx_XDECREF(__pyx_t_1);
  17158. __Pyx_XDECREF(__pyx_t_5);
  17159. __Pyx_XDECREF(__pyx_t_7);
  17160. __Pyx_XDECREF(__pyx_t_8);
  17161. __Pyx_AddTraceback("uvloop.loop.Loop._add_writer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  17162. __pyx_r = 0;
  17163. __pyx_L0:;
  17164. __Pyx_XDECREF((PyObject *)__pyx_v_poll);
  17165. __Pyx_XDECREF(__pyx_v_fd);
  17166. __Pyx_XDECREF(__pyx_v_old_fileobj);
  17167. __Pyx_XGIVEREF(__pyx_r);
  17168. __Pyx_RefNannyFinishContext();
  17169. return __pyx_r;
  17170. }
  17171. /* "uvloop/loop.pyx":790
  17172. * socket_inc_io_ref(fileobj)
  17173. *
  17174. * cdef _remove_writer(self, fileobj): # <<<<<<<<<<<<<<
  17175. * cdef:
  17176. * UVPoll poll
  17177. */
  17178. static PyObject *__pyx_f_6uvloop_4loop_4Loop__remove_writer(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_fileobj) {
  17179. struct __pyx_obj_6uvloop_4loop_UVPoll *__pyx_v_poll = 0;
  17180. PyObject *__pyx_v_fd = NULL;
  17181. PyObject *__pyx_v_mapped_fileobj = NULL;
  17182. PyObject *__pyx_v_result = NULL;
  17183. PyObject *__pyx_r = NULL;
  17184. __Pyx_RefNannyDeclarations
  17185. PyObject *__pyx_t_1 = NULL;
  17186. int __pyx_t_2;
  17187. int __pyx_t_3;
  17188. PyObject *__pyx_t_4 = NULL;
  17189. PyObject *__pyx_t_5 = NULL;
  17190. PyObject *__pyx_t_6 = NULL;
  17191. PyObject *__pyx_t_7 = NULL;
  17192. int __pyx_t_8;
  17193. PyObject *__pyx_t_9 = NULL;
  17194. __Pyx_RefNannySetupContext("_remove_writer", 0);
  17195. /* "uvloop/loop.pyx":794
  17196. * UVPoll poll
  17197. *
  17198. * fd = self._fileobj_to_fd(fileobj) # <<<<<<<<<<<<<<
  17199. * self._ensure_fd_no_transport(fd)
  17200. *
  17201. */
  17202. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_vtab)->_fileobj_to_fd(__pyx_v_self, __pyx_v_fileobj); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 794, __pyx_L1_error)
  17203. __Pyx_GOTREF(__pyx_t_1);
  17204. __pyx_v_fd = __pyx_t_1;
  17205. __pyx_t_1 = 0;
  17206. /* "uvloop/loop.pyx":795
  17207. *
  17208. * fd = self._fileobj_to_fd(fileobj)
  17209. * self._ensure_fd_no_transport(fd) # <<<<<<<<<<<<<<
  17210. *
  17211. * mapped_fileobj = self._fd_to_writer_fileobj.pop(fd, None)
  17212. */
  17213. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_vtab)->_ensure_fd_no_transport(__pyx_v_self, __pyx_v_fd); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 795, __pyx_L1_error)
  17214. __Pyx_GOTREF(__pyx_t_1);
  17215. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  17216. /* "uvloop/loop.pyx":797
  17217. * self._ensure_fd_no_transport(fd)
  17218. *
  17219. * mapped_fileobj = self._fd_to_writer_fileobj.pop(fd, None) # <<<<<<<<<<<<<<
  17220. * if mapped_fileobj is not None:
  17221. * socket_dec_io_ref(mapped_fileobj)
  17222. */
  17223. if (unlikely(__pyx_v_self->_fd_to_writer_fileobj == Py_None)) {
  17224. PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "pop");
  17225. __PYX_ERR(2, 797, __pyx_L1_error)
  17226. }
  17227. __pyx_t_1 = __Pyx_PyDict_Pop(__pyx_v_self->_fd_to_writer_fileobj, __pyx_v_fd, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 797, __pyx_L1_error)
  17228. __Pyx_GOTREF(__pyx_t_1);
  17229. __pyx_v_mapped_fileobj = __pyx_t_1;
  17230. __pyx_t_1 = 0;
  17231. /* "uvloop/loop.pyx":798
  17232. *
  17233. * mapped_fileobj = self._fd_to_writer_fileobj.pop(fd, None)
  17234. * if mapped_fileobj is not None: # <<<<<<<<<<<<<<
  17235. * socket_dec_io_ref(mapped_fileobj)
  17236. *
  17237. */
  17238. __pyx_t_2 = (__pyx_v_mapped_fileobj != Py_None);
  17239. __pyx_t_3 = (__pyx_t_2 != 0);
  17240. if (__pyx_t_3) {
  17241. /* "uvloop/loop.pyx":799
  17242. * mapped_fileobj = self._fd_to_writer_fileobj.pop(fd, None)
  17243. * if mapped_fileobj is not None:
  17244. * socket_dec_io_ref(mapped_fileobj) # <<<<<<<<<<<<<<
  17245. *
  17246. * if self._closed == 1:
  17247. */
  17248. __pyx_t_1 = __pyx_f_6uvloop_4loop_socket_dec_io_ref(__pyx_v_mapped_fileobj); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 799, __pyx_L1_error)
  17249. __Pyx_GOTREF(__pyx_t_1);
  17250. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  17251. /* "uvloop/loop.pyx":798
  17252. *
  17253. * mapped_fileobj = self._fd_to_writer_fileobj.pop(fd, None)
  17254. * if mapped_fileobj is not None: # <<<<<<<<<<<<<<
  17255. * socket_dec_io_ref(mapped_fileobj)
  17256. *
  17257. */
  17258. }
  17259. /* "uvloop/loop.pyx":801
  17260. * socket_dec_io_ref(mapped_fileobj)
  17261. *
  17262. * if self._closed == 1: # <<<<<<<<<<<<<<
  17263. * return False
  17264. *
  17265. */
  17266. __pyx_t_3 = ((__pyx_v_self->_closed == 1) != 0);
  17267. if (__pyx_t_3) {
  17268. /* "uvloop/loop.pyx":802
  17269. *
  17270. * if self._closed == 1:
  17271. * return False # <<<<<<<<<<<<<<
  17272. *
  17273. * try:
  17274. */
  17275. __Pyx_XDECREF(__pyx_r);
  17276. __Pyx_INCREF(Py_False);
  17277. __pyx_r = Py_False;
  17278. goto __pyx_L0;
  17279. /* "uvloop/loop.pyx":801
  17280. * socket_dec_io_ref(mapped_fileobj)
  17281. *
  17282. * if self._closed == 1: # <<<<<<<<<<<<<<
  17283. * return False
  17284. *
  17285. */
  17286. }
  17287. /* "uvloop/loop.pyx":804
  17288. * return False
  17289. *
  17290. * try: # <<<<<<<<<<<<<<
  17291. * poll = <UVPoll>(self._polls[fd])
  17292. * except KeyError:
  17293. */
  17294. {
  17295. __Pyx_PyThreadState_declare
  17296. __Pyx_PyThreadState_assign
  17297. __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
  17298. __Pyx_XGOTREF(__pyx_t_4);
  17299. __Pyx_XGOTREF(__pyx_t_5);
  17300. __Pyx_XGOTREF(__pyx_t_6);
  17301. /*try:*/ {
  17302. /* "uvloop/loop.pyx":805
  17303. *
  17304. * try:
  17305. * poll = <UVPoll>(self._polls[fd]) # <<<<<<<<<<<<<<
  17306. * except KeyError:
  17307. * return False
  17308. */
  17309. if (unlikely(__pyx_v_self->_polls == Py_None)) {
  17310. PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
  17311. __PYX_ERR(2, 805, __pyx_L5_error)
  17312. }
  17313. __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_self->_polls, __pyx_v_fd); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 805, __pyx_L5_error)
  17314. __Pyx_GOTREF(__pyx_t_1);
  17315. __pyx_t_7 = __pyx_t_1;
  17316. __Pyx_INCREF(__pyx_t_7);
  17317. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  17318. __pyx_v_poll = ((struct __pyx_obj_6uvloop_4loop_UVPoll *)__pyx_t_7);
  17319. __pyx_t_7 = 0;
  17320. /* "uvloop/loop.pyx":804
  17321. * return False
  17322. *
  17323. * try: # <<<<<<<<<<<<<<
  17324. * poll = <UVPoll>(self._polls[fd])
  17325. * except KeyError:
  17326. */
  17327. }
  17328. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  17329. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  17330. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  17331. goto __pyx_L10_try_end;
  17332. __pyx_L5_error:;
  17333. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  17334. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  17335. /* "uvloop/loop.pyx":806
  17336. * try:
  17337. * poll = <UVPoll>(self._polls[fd])
  17338. * except KeyError: # <<<<<<<<<<<<<<
  17339. * return False
  17340. *
  17341. */
  17342. __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
  17343. if (__pyx_t_8) {
  17344. __Pyx_AddTraceback("uvloop.loop.Loop._remove_writer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  17345. if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_1, &__pyx_t_9) < 0) __PYX_ERR(2, 806, __pyx_L7_except_error)
  17346. __Pyx_GOTREF(__pyx_t_7);
  17347. __Pyx_GOTREF(__pyx_t_1);
  17348. __Pyx_GOTREF(__pyx_t_9);
  17349. /* "uvloop/loop.pyx":807
  17350. * poll = <UVPoll>(self._polls[fd])
  17351. * except KeyError:
  17352. * return False # <<<<<<<<<<<<<<
  17353. *
  17354. * result = poll.stop_writing()
  17355. */
  17356. __Pyx_XDECREF(__pyx_r);
  17357. __Pyx_INCREF(Py_False);
  17358. __pyx_r = Py_False;
  17359. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  17360. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  17361. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  17362. goto __pyx_L8_except_return;
  17363. }
  17364. goto __pyx_L7_except_error;
  17365. __pyx_L7_except_error:;
  17366. /* "uvloop/loop.pyx":804
  17367. * return False
  17368. *
  17369. * try: # <<<<<<<<<<<<<<
  17370. * poll = <UVPoll>(self._polls[fd])
  17371. * except KeyError:
  17372. */
  17373. __Pyx_XGIVEREF(__pyx_t_4);
  17374. __Pyx_XGIVEREF(__pyx_t_5);
  17375. __Pyx_XGIVEREF(__pyx_t_6);
  17376. __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
  17377. goto __pyx_L1_error;
  17378. __pyx_L8_except_return:;
  17379. __Pyx_XGIVEREF(__pyx_t_4);
  17380. __Pyx_XGIVEREF(__pyx_t_5);
  17381. __Pyx_XGIVEREF(__pyx_t_6);
  17382. __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
  17383. goto __pyx_L0;
  17384. __pyx_L10_try_end:;
  17385. }
  17386. /* "uvloop/loop.pyx":809
  17387. * return False
  17388. *
  17389. * result = poll.stop_writing() # <<<<<<<<<<<<<<
  17390. * if not poll.is_active():
  17391. * del self._polls[fd]
  17392. */
  17393. __pyx_t_9 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVPoll *)__pyx_v_poll->__pyx_base.__pyx_vtab)->stop_writing(__pyx_v_poll); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 809, __pyx_L1_error)
  17394. __Pyx_GOTREF(__pyx_t_9);
  17395. __pyx_v_result = __pyx_t_9;
  17396. __pyx_t_9 = 0;
  17397. /* "uvloop/loop.pyx":810
  17398. *
  17399. * result = poll.stop_writing()
  17400. * if not poll.is_active(): # <<<<<<<<<<<<<<
  17401. * del self._polls[fd]
  17402. * poll._close()
  17403. */
  17404. __pyx_t_3 = ((!(((struct __pyx_vtabstruct_6uvloop_4loop_UVPoll *)__pyx_v_poll->__pyx_base.__pyx_vtab)->is_active(__pyx_v_poll) != 0)) != 0);
  17405. if (__pyx_t_3) {
  17406. /* "uvloop/loop.pyx":811
  17407. * result = poll.stop_writing()
  17408. * if not poll.is_active():
  17409. * del self._polls[fd] # <<<<<<<<<<<<<<
  17410. * poll._close()
  17411. *
  17412. */
  17413. if (unlikely(__pyx_v_self->_polls == Py_None)) {
  17414. PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
  17415. __PYX_ERR(2, 811, __pyx_L1_error)
  17416. }
  17417. if (unlikely(PyDict_DelItem(__pyx_v_self->_polls, __pyx_v_fd) < 0)) __PYX_ERR(2, 811, __pyx_L1_error)
  17418. /* "uvloop/loop.pyx":812
  17419. * if not poll.is_active():
  17420. * del self._polls[fd]
  17421. * poll._close() # <<<<<<<<<<<<<<
  17422. *
  17423. * return result
  17424. */
  17425. __pyx_t_9 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVPoll *)__pyx_v_poll->__pyx_base.__pyx_vtab)->__pyx_base._close(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_poll)); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 812, __pyx_L1_error)
  17426. __Pyx_GOTREF(__pyx_t_9);
  17427. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  17428. /* "uvloop/loop.pyx":810
  17429. *
  17430. * result = poll.stop_writing()
  17431. * if not poll.is_active(): # <<<<<<<<<<<<<<
  17432. * del self._polls[fd]
  17433. * poll._close()
  17434. */
  17435. }
  17436. /* "uvloop/loop.pyx":814
  17437. * poll._close()
  17438. *
  17439. * return result # <<<<<<<<<<<<<<
  17440. *
  17441. * cdef _has_writer(self, fileobj):
  17442. */
  17443. __Pyx_XDECREF(__pyx_r);
  17444. __Pyx_INCREF(__pyx_v_result);
  17445. __pyx_r = __pyx_v_result;
  17446. goto __pyx_L0;
  17447. /* "uvloop/loop.pyx":790
  17448. * socket_inc_io_ref(fileobj)
  17449. *
  17450. * cdef _remove_writer(self, fileobj): # <<<<<<<<<<<<<<
  17451. * cdef:
  17452. * UVPoll poll
  17453. */
  17454. /* function exit code */
  17455. __pyx_L1_error:;
  17456. __Pyx_XDECREF(__pyx_t_1);
  17457. __Pyx_XDECREF(__pyx_t_7);
  17458. __Pyx_XDECREF(__pyx_t_9);
  17459. __Pyx_AddTraceback("uvloop.loop.Loop._remove_writer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  17460. __pyx_r = 0;
  17461. __pyx_L0:;
  17462. __Pyx_XDECREF((PyObject *)__pyx_v_poll);
  17463. __Pyx_XDECREF(__pyx_v_fd);
  17464. __Pyx_XDECREF(__pyx_v_mapped_fileobj);
  17465. __Pyx_XDECREF(__pyx_v_result);
  17466. __Pyx_XGIVEREF(__pyx_r);
  17467. __Pyx_RefNannyFinishContext();
  17468. return __pyx_r;
  17469. }
  17470. /* "uvloop/loop.pyx":816
  17471. * return result
  17472. *
  17473. * cdef _has_writer(self, fileobj): # <<<<<<<<<<<<<<
  17474. * cdef:
  17475. * UVPoll poll
  17476. */
  17477. static PyObject *__pyx_f_6uvloop_4loop_4Loop__has_writer(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_fileobj) {
  17478. struct __pyx_obj_6uvloop_4loop_UVPoll *__pyx_v_poll = 0;
  17479. PyObject *__pyx_v_fd = NULL;
  17480. PyObject *__pyx_r = NULL;
  17481. __Pyx_RefNannyDeclarations
  17482. PyObject *__pyx_t_1 = NULL;
  17483. PyObject *__pyx_t_2 = NULL;
  17484. PyObject *__pyx_t_3 = NULL;
  17485. PyObject *__pyx_t_4 = NULL;
  17486. PyObject *__pyx_t_5 = NULL;
  17487. int __pyx_t_6;
  17488. PyObject *__pyx_t_7 = NULL;
  17489. __Pyx_RefNannySetupContext("_has_writer", 0);
  17490. /* "uvloop/loop.pyx":820
  17491. * UVPoll poll
  17492. *
  17493. * self._check_closed() # <<<<<<<<<<<<<<
  17494. * fd = self._fileobj_to_fd(fileobj)
  17495. *
  17496. */
  17497. __pyx_t_1 = __pyx_f_6uvloop_4loop_4Loop__check_closed(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 820, __pyx_L1_error)
  17498. __Pyx_GOTREF(__pyx_t_1);
  17499. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  17500. /* "uvloop/loop.pyx":821
  17501. *
  17502. * self._check_closed()
  17503. * fd = self._fileobj_to_fd(fileobj) # <<<<<<<<<<<<<<
  17504. *
  17505. * try:
  17506. */
  17507. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_vtab)->_fileobj_to_fd(__pyx_v_self, __pyx_v_fileobj); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 821, __pyx_L1_error)
  17508. __Pyx_GOTREF(__pyx_t_1);
  17509. __pyx_v_fd = __pyx_t_1;
  17510. __pyx_t_1 = 0;
  17511. /* "uvloop/loop.pyx":823
  17512. * fd = self._fileobj_to_fd(fileobj)
  17513. *
  17514. * try: # <<<<<<<<<<<<<<
  17515. * poll = <UVPoll>(self._polls[fd])
  17516. * except KeyError:
  17517. */
  17518. {
  17519. __Pyx_PyThreadState_declare
  17520. __Pyx_PyThreadState_assign
  17521. __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
  17522. __Pyx_XGOTREF(__pyx_t_2);
  17523. __Pyx_XGOTREF(__pyx_t_3);
  17524. __Pyx_XGOTREF(__pyx_t_4);
  17525. /*try:*/ {
  17526. /* "uvloop/loop.pyx":824
  17527. *
  17528. * try:
  17529. * poll = <UVPoll>(self._polls[fd]) # <<<<<<<<<<<<<<
  17530. * except KeyError:
  17531. * return False
  17532. */
  17533. if (unlikely(__pyx_v_self->_polls == Py_None)) {
  17534. PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
  17535. __PYX_ERR(2, 824, __pyx_L3_error)
  17536. }
  17537. __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_self->_polls, __pyx_v_fd); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 824, __pyx_L3_error)
  17538. __Pyx_GOTREF(__pyx_t_1);
  17539. __pyx_t_5 = __pyx_t_1;
  17540. __Pyx_INCREF(__pyx_t_5);
  17541. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  17542. __pyx_v_poll = ((struct __pyx_obj_6uvloop_4loop_UVPoll *)__pyx_t_5);
  17543. __pyx_t_5 = 0;
  17544. /* "uvloop/loop.pyx":823
  17545. * fd = self._fileobj_to_fd(fileobj)
  17546. *
  17547. * try: # <<<<<<<<<<<<<<
  17548. * poll = <UVPoll>(self._polls[fd])
  17549. * except KeyError:
  17550. */
  17551. }
  17552. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  17553. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  17554. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  17555. goto __pyx_L8_try_end;
  17556. __pyx_L3_error:;
  17557. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  17558. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  17559. /* "uvloop/loop.pyx":825
  17560. * try:
  17561. * poll = <UVPoll>(self._polls[fd])
  17562. * except KeyError: # <<<<<<<<<<<<<<
  17563. * return False
  17564. *
  17565. */
  17566. __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
  17567. if (__pyx_t_6) {
  17568. __Pyx_AddTraceback("uvloop.loop.Loop._has_writer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  17569. if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_1, &__pyx_t_7) < 0) __PYX_ERR(2, 825, __pyx_L5_except_error)
  17570. __Pyx_GOTREF(__pyx_t_5);
  17571. __Pyx_GOTREF(__pyx_t_1);
  17572. __Pyx_GOTREF(__pyx_t_7);
  17573. /* "uvloop/loop.pyx":826
  17574. * poll = <UVPoll>(self._polls[fd])
  17575. * except KeyError:
  17576. * return False # <<<<<<<<<<<<<<
  17577. *
  17578. * return poll.is_writing()
  17579. */
  17580. __Pyx_XDECREF(__pyx_r);
  17581. __Pyx_INCREF(Py_False);
  17582. __pyx_r = Py_False;
  17583. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  17584. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  17585. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  17586. goto __pyx_L6_except_return;
  17587. }
  17588. goto __pyx_L5_except_error;
  17589. __pyx_L5_except_error:;
  17590. /* "uvloop/loop.pyx":823
  17591. * fd = self._fileobj_to_fd(fileobj)
  17592. *
  17593. * try: # <<<<<<<<<<<<<<
  17594. * poll = <UVPoll>(self._polls[fd])
  17595. * except KeyError:
  17596. */
  17597. __Pyx_XGIVEREF(__pyx_t_2);
  17598. __Pyx_XGIVEREF(__pyx_t_3);
  17599. __Pyx_XGIVEREF(__pyx_t_4);
  17600. __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
  17601. goto __pyx_L1_error;
  17602. __pyx_L6_except_return:;
  17603. __Pyx_XGIVEREF(__pyx_t_2);
  17604. __Pyx_XGIVEREF(__pyx_t_3);
  17605. __Pyx_XGIVEREF(__pyx_t_4);
  17606. __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
  17607. goto __pyx_L0;
  17608. __pyx_L8_try_end:;
  17609. }
  17610. /* "uvloop/loop.pyx":828
  17611. * return False
  17612. *
  17613. * return poll.is_writing() # <<<<<<<<<<<<<<
  17614. *
  17615. * cdef _getaddrinfo(self, object host, object port,
  17616. */
  17617. __Pyx_XDECREF(__pyx_r);
  17618. __pyx_t_7 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVPoll *)__pyx_v_poll->__pyx_base.__pyx_vtab)->is_writing(__pyx_v_poll); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 828, __pyx_L1_error)
  17619. __Pyx_GOTREF(__pyx_t_7);
  17620. __pyx_r = __pyx_t_7;
  17621. __pyx_t_7 = 0;
  17622. goto __pyx_L0;
  17623. /* "uvloop/loop.pyx":816
  17624. * return result
  17625. *
  17626. * cdef _has_writer(self, fileobj): # <<<<<<<<<<<<<<
  17627. * cdef:
  17628. * UVPoll poll
  17629. */
  17630. /* function exit code */
  17631. __pyx_L1_error:;
  17632. __Pyx_XDECREF(__pyx_t_1);
  17633. __Pyx_XDECREF(__pyx_t_5);
  17634. __Pyx_XDECREF(__pyx_t_7);
  17635. __Pyx_AddTraceback("uvloop.loop.Loop._has_writer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  17636. __pyx_r = 0;
  17637. __pyx_L0:;
  17638. __Pyx_XDECREF((PyObject *)__pyx_v_poll);
  17639. __Pyx_XDECREF(__pyx_v_fd);
  17640. __Pyx_XGIVEREF(__pyx_r);
  17641. __Pyx_RefNannyFinishContext();
  17642. return __pyx_r;
  17643. }
  17644. /* "uvloop/loop.pyx":850
  17645. * fut = self._new_future()
  17646. *
  17647. * def callback(result): # <<<<<<<<<<<<<<
  17648. * if AddrInfo.isinstance(result):
  17649. * try:
  17650. */
  17651. /* Python wrapper */
  17652. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_12_getaddrinfo_1callback(PyObject *__pyx_self, PyObject *__pyx_v_result); /*proto*/
  17653. static PyMethodDef __pyx_mdef_6uvloop_4loop_4Loop_12_getaddrinfo_1callback = {"callback", (PyCFunction)__pyx_pw_6uvloop_4loop_4Loop_12_getaddrinfo_1callback, METH_O, 0};
  17654. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_12_getaddrinfo_1callback(PyObject *__pyx_self, PyObject *__pyx_v_result) {
  17655. PyObject *__pyx_r = 0;
  17656. __Pyx_RefNannyDeclarations
  17657. __Pyx_RefNannySetupContext("callback (wrapper)", 0);
  17658. __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_12_getaddrinfo_callback(__pyx_self, ((PyObject *)__pyx_v_result));
  17659. /* function exit code */
  17660. __Pyx_RefNannyFinishContext();
  17661. return __pyx_r;
  17662. }
  17663. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_12_getaddrinfo_callback(PyObject *__pyx_self, PyObject *__pyx_v_result) {
  17664. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct___getaddrinfo *__pyx_cur_scope;
  17665. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct___getaddrinfo *__pyx_outer_scope;
  17666. PyObject *__pyx_v_data = NULL;
  17667. PyObject *__pyx_v_ex = NULL;
  17668. PyObject *__pyx_r = NULL;
  17669. __Pyx_RefNannyDeclarations
  17670. int __pyx_t_1;
  17671. PyObject *__pyx_t_2 = NULL;
  17672. PyObject *__pyx_t_3 = NULL;
  17673. PyObject *__pyx_t_4 = NULL;
  17674. PyObject *__pyx_t_5 = NULL;
  17675. PyObject *__pyx_t_6 = NULL;
  17676. PyObject *__pyx_t_7 = NULL;
  17677. int __pyx_t_8;
  17678. int __pyx_t_9;
  17679. PyObject *__pyx_t_10 = NULL;
  17680. PyObject *__pyx_t_11 = NULL;
  17681. PyObject *__pyx_t_12 = NULL;
  17682. int __pyx_t_13;
  17683. char const *__pyx_t_14;
  17684. PyObject *__pyx_t_15 = NULL;
  17685. PyObject *__pyx_t_16 = NULL;
  17686. PyObject *__pyx_t_17 = NULL;
  17687. PyObject *__pyx_t_18 = NULL;
  17688. PyObject *__pyx_t_19 = NULL;
  17689. PyObject *__pyx_t_20 = NULL;
  17690. __Pyx_RefNannySetupContext("callback", 0);
  17691. __pyx_outer_scope = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct___getaddrinfo *) __Pyx_CyFunction_GetClosure(__pyx_self);
  17692. __pyx_cur_scope = __pyx_outer_scope;
  17693. /* "uvloop/loop.pyx":851
  17694. *
  17695. * def callback(result):
  17696. * if AddrInfo.isinstance(result): # <<<<<<<<<<<<<<
  17697. * try:
  17698. * if unpack == 0:
  17699. */
  17700. __pyx_t_1 = (__pyx_f_6uvloop_4loop_8AddrInfo_isinstance(__pyx_v_result) != 0);
  17701. if (__pyx_t_1) {
  17702. /* "uvloop/loop.pyx":852
  17703. * def callback(result):
  17704. * if AddrInfo.isinstance(result):
  17705. * try: # <<<<<<<<<<<<<<
  17706. * if unpack == 0:
  17707. * data = result
  17708. */
  17709. {
  17710. __Pyx_PyThreadState_declare
  17711. __Pyx_PyThreadState_assign
  17712. __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
  17713. __Pyx_XGOTREF(__pyx_t_2);
  17714. __Pyx_XGOTREF(__pyx_t_3);
  17715. __Pyx_XGOTREF(__pyx_t_4);
  17716. /*try:*/ {
  17717. /* "uvloop/loop.pyx":853
  17718. * if AddrInfo.isinstance(result):
  17719. * try:
  17720. * if unpack == 0: # <<<<<<<<<<<<<<
  17721. * data = result
  17722. * else:
  17723. */
  17724. __pyx_t_1 = ((__pyx_cur_scope->__pyx_v_unpack == 0) != 0);
  17725. if (__pyx_t_1) {
  17726. /* "uvloop/loop.pyx":854
  17727. * try:
  17728. * if unpack == 0:
  17729. * data = result # <<<<<<<<<<<<<<
  17730. * else:
  17731. * data = (<AddrInfo>result).unpack()
  17732. */
  17733. __Pyx_INCREF(__pyx_v_result);
  17734. __pyx_v_data = __pyx_v_result;
  17735. /* "uvloop/loop.pyx":853
  17736. * if AddrInfo.isinstance(result):
  17737. * try:
  17738. * if unpack == 0: # <<<<<<<<<<<<<<
  17739. * data = result
  17740. * else:
  17741. */
  17742. goto __pyx_L10;
  17743. }
  17744. /* "uvloop/loop.pyx":856
  17745. * data = result
  17746. * else:
  17747. * data = (<AddrInfo>result).unpack() # <<<<<<<<<<<<<<
  17748. * except Exception as ex:
  17749. * if not fut.cancelled():
  17750. */
  17751. /*else*/ {
  17752. __pyx_t_5 = ((struct __pyx_vtabstruct_6uvloop_4loop_AddrInfo *)((struct __pyx_obj_6uvloop_4loop_AddrInfo *)__pyx_v_result)->__pyx_vtab)->unpack(((struct __pyx_obj_6uvloop_4loop_AddrInfo *)__pyx_v_result)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 856, __pyx_L4_error)
  17753. __Pyx_GOTREF(__pyx_t_5);
  17754. __pyx_v_data = __pyx_t_5;
  17755. __pyx_t_5 = 0;
  17756. }
  17757. __pyx_L10:;
  17758. /* "uvloop/loop.pyx":852
  17759. * def callback(result):
  17760. * if AddrInfo.isinstance(result):
  17761. * try: # <<<<<<<<<<<<<<
  17762. * if unpack == 0:
  17763. * data = result
  17764. */
  17765. }
  17766. /* "uvloop/loop.pyx":861
  17767. * fut.set_exception(ex)
  17768. * else:
  17769. * if not fut.cancelled(): # <<<<<<<<<<<<<<
  17770. * fut.set_result(data)
  17771. * else:
  17772. */
  17773. /*else:*/ {
  17774. if (unlikely(!__pyx_cur_scope->__pyx_v_fut)) { __Pyx_RaiseClosureNameError("fut"); __PYX_ERR(2, 861, __pyx_L6_except_error) }
  17775. __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_fut, __pyx_n_s_cancelled); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 861, __pyx_L6_except_error)
  17776. __Pyx_GOTREF(__pyx_t_6);
  17777. __pyx_t_7 = NULL;
  17778. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
  17779. __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
  17780. if (likely(__pyx_t_7)) {
  17781. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
  17782. __Pyx_INCREF(__pyx_t_7);
  17783. __Pyx_INCREF(function);
  17784. __Pyx_DECREF_SET(__pyx_t_6, function);
  17785. }
  17786. }
  17787. __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
  17788. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  17789. if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 861, __pyx_L6_except_error)
  17790. __Pyx_GOTREF(__pyx_t_5);
  17791. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  17792. __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 861, __pyx_L6_except_error)
  17793. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  17794. __pyx_t_8 = ((!__pyx_t_1) != 0);
  17795. if (__pyx_t_8) {
  17796. /* "uvloop/loop.pyx":862
  17797. * else:
  17798. * if not fut.cancelled():
  17799. * fut.set_result(data) # <<<<<<<<<<<<<<
  17800. * else:
  17801. * if not fut.cancelled():
  17802. */
  17803. if (unlikely(!__pyx_cur_scope->__pyx_v_fut)) { __Pyx_RaiseClosureNameError("fut"); __PYX_ERR(2, 862, __pyx_L6_except_error) }
  17804. __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_fut, __pyx_n_s_set_result); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 862, __pyx_L6_except_error)
  17805. __Pyx_GOTREF(__pyx_t_6);
  17806. __pyx_t_7 = NULL;
  17807. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
  17808. __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
  17809. if (likely(__pyx_t_7)) {
  17810. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
  17811. __Pyx_INCREF(__pyx_t_7);
  17812. __Pyx_INCREF(function);
  17813. __Pyx_DECREF_SET(__pyx_t_6, function);
  17814. }
  17815. }
  17816. __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_v_data) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_data);
  17817. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  17818. if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 862, __pyx_L6_except_error)
  17819. __Pyx_GOTREF(__pyx_t_5);
  17820. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  17821. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  17822. /* "uvloop/loop.pyx":861
  17823. * fut.set_exception(ex)
  17824. * else:
  17825. * if not fut.cancelled(): # <<<<<<<<<<<<<<
  17826. * fut.set_result(data)
  17827. * else:
  17828. */
  17829. }
  17830. }
  17831. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  17832. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  17833. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  17834. goto __pyx_L9_try_end;
  17835. __pyx_L4_error:;
  17836. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  17837. /* "uvloop/loop.pyx":857
  17838. * else:
  17839. * data = (<AddrInfo>result).unpack()
  17840. * except Exception as ex: # <<<<<<<<<<<<<<
  17841. * if not fut.cancelled():
  17842. * fut.set_exception(ex)
  17843. */
  17844. __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
  17845. if (__pyx_t_9) {
  17846. __Pyx_AddTraceback("uvloop.loop.Loop._getaddrinfo.callback", __pyx_clineno, __pyx_lineno, __pyx_filename);
  17847. if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 857, __pyx_L6_except_error)
  17848. __Pyx_GOTREF(__pyx_t_5);
  17849. __Pyx_GOTREF(__pyx_t_6);
  17850. __Pyx_GOTREF(__pyx_t_7);
  17851. __Pyx_INCREF(__pyx_t_6);
  17852. __pyx_v_ex = __pyx_t_6;
  17853. /*try:*/ {
  17854. /* "uvloop/loop.pyx":858
  17855. * data = (<AddrInfo>result).unpack()
  17856. * except Exception as ex:
  17857. * if not fut.cancelled(): # <<<<<<<<<<<<<<
  17858. * fut.set_exception(ex)
  17859. * else:
  17860. */
  17861. if (unlikely(!__pyx_cur_scope->__pyx_v_fut)) { __Pyx_RaiseClosureNameError("fut"); __PYX_ERR(2, 858, __pyx_L17_error) }
  17862. __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_fut, __pyx_n_s_cancelled); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 858, __pyx_L17_error)
  17863. __Pyx_GOTREF(__pyx_t_11);
  17864. __pyx_t_12 = NULL;
  17865. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) {
  17866. __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_11);
  17867. if (likely(__pyx_t_12)) {
  17868. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
  17869. __Pyx_INCREF(__pyx_t_12);
  17870. __Pyx_INCREF(function);
  17871. __Pyx_DECREF_SET(__pyx_t_11, function);
  17872. }
  17873. }
  17874. __pyx_t_10 = (__pyx_t_12) ? __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_12) : __Pyx_PyObject_CallNoArg(__pyx_t_11);
  17875. __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
  17876. if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 858, __pyx_L17_error)
  17877. __Pyx_GOTREF(__pyx_t_10);
  17878. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  17879. __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(2, 858, __pyx_L17_error)
  17880. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  17881. __pyx_t_1 = ((!__pyx_t_8) != 0);
  17882. if (__pyx_t_1) {
  17883. /* "uvloop/loop.pyx":859
  17884. * except Exception as ex:
  17885. * if not fut.cancelled():
  17886. * fut.set_exception(ex) # <<<<<<<<<<<<<<
  17887. * else:
  17888. * if not fut.cancelled():
  17889. */
  17890. if (unlikely(!__pyx_cur_scope->__pyx_v_fut)) { __Pyx_RaiseClosureNameError("fut"); __PYX_ERR(2, 859, __pyx_L17_error) }
  17891. __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_fut, __pyx_n_s_set_exception); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 859, __pyx_L17_error)
  17892. __Pyx_GOTREF(__pyx_t_11);
  17893. __pyx_t_12 = NULL;
  17894. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) {
  17895. __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_11);
  17896. if (likely(__pyx_t_12)) {
  17897. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
  17898. __Pyx_INCREF(__pyx_t_12);
  17899. __Pyx_INCREF(function);
  17900. __Pyx_DECREF_SET(__pyx_t_11, function);
  17901. }
  17902. }
  17903. __pyx_t_10 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_11, __pyx_t_12, __pyx_v_ex) : __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_v_ex);
  17904. __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
  17905. if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 859, __pyx_L17_error)
  17906. __Pyx_GOTREF(__pyx_t_10);
  17907. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  17908. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  17909. /* "uvloop/loop.pyx":858
  17910. * data = (<AddrInfo>result).unpack()
  17911. * except Exception as ex:
  17912. * if not fut.cancelled(): # <<<<<<<<<<<<<<
  17913. * fut.set_exception(ex)
  17914. * else:
  17915. */
  17916. }
  17917. }
  17918. /* "uvloop/loop.pyx":857
  17919. * else:
  17920. * data = (<AddrInfo>result).unpack()
  17921. * except Exception as ex: # <<<<<<<<<<<<<<
  17922. * if not fut.cancelled():
  17923. * fut.set_exception(ex)
  17924. */
  17925. /*finally:*/ {
  17926. /*normal exit:*/{
  17927. __Pyx_DECREF(__pyx_v_ex);
  17928. __pyx_v_ex = NULL;
  17929. goto __pyx_L18;
  17930. }
  17931. __pyx_L17_error:;
  17932. /*exception exit:*/{
  17933. __Pyx_PyThreadState_declare
  17934. __Pyx_PyThreadState_assign
  17935. __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0;
  17936. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  17937. __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
  17938. __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
  17939. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20);
  17940. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17) < 0)) __Pyx_ErrFetch(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17);
  17941. __Pyx_XGOTREF(__pyx_t_15);
  17942. __Pyx_XGOTREF(__pyx_t_16);
  17943. __Pyx_XGOTREF(__pyx_t_17);
  17944. __Pyx_XGOTREF(__pyx_t_18);
  17945. __Pyx_XGOTREF(__pyx_t_19);
  17946. __Pyx_XGOTREF(__pyx_t_20);
  17947. __pyx_t_9 = __pyx_lineno; __pyx_t_13 = __pyx_clineno; __pyx_t_14 = __pyx_filename;
  17948. {
  17949. __Pyx_DECREF(__pyx_v_ex);
  17950. __pyx_v_ex = NULL;
  17951. }
  17952. if (PY_MAJOR_VERSION >= 3) {
  17953. __Pyx_XGIVEREF(__pyx_t_18);
  17954. __Pyx_XGIVEREF(__pyx_t_19);
  17955. __Pyx_XGIVEREF(__pyx_t_20);
  17956. __Pyx_ExceptionReset(__pyx_t_18, __pyx_t_19, __pyx_t_20);
  17957. }
  17958. __Pyx_XGIVEREF(__pyx_t_15);
  17959. __Pyx_XGIVEREF(__pyx_t_16);
  17960. __Pyx_XGIVEREF(__pyx_t_17);
  17961. __Pyx_ErrRestore(__pyx_t_15, __pyx_t_16, __pyx_t_17);
  17962. __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0;
  17963. __pyx_lineno = __pyx_t_9; __pyx_clineno = __pyx_t_13; __pyx_filename = __pyx_t_14;
  17964. goto __pyx_L6_except_error;
  17965. }
  17966. __pyx_L18:;
  17967. }
  17968. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  17969. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  17970. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  17971. goto __pyx_L5_exception_handled;
  17972. }
  17973. goto __pyx_L6_except_error;
  17974. __pyx_L6_except_error:;
  17975. /* "uvloop/loop.pyx":852
  17976. * def callback(result):
  17977. * if AddrInfo.isinstance(result):
  17978. * try: # <<<<<<<<<<<<<<
  17979. * if unpack == 0:
  17980. * data = result
  17981. */
  17982. __Pyx_XGIVEREF(__pyx_t_2);
  17983. __Pyx_XGIVEREF(__pyx_t_3);
  17984. __Pyx_XGIVEREF(__pyx_t_4);
  17985. __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
  17986. goto __pyx_L1_error;
  17987. __pyx_L5_exception_handled:;
  17988. __Pyx_XGIVEREF(__pyx_t_2);
  17989. __Pyx_XGIVEREF(__pyx_t_3);
  17990. __Pyx_XGIVEREF(__pyx_t_4);
  17991. __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
  17992. __pyx_L9_try_end:;
  17993. }
  17994. /* "uvloop/loop.pyx":851
  17995. *
  17996. * def callback(result):
  17997. * if AddrInfo.isinstance(result): # <<<<<<<<<<<<<<
  17998. * try:
  17999. * if unpack == 0:
  18000. */
  18001. goto __pyx_L3;
  18002. }
  18003. /* "uvloop/loop.pyx":864
  18004. * fut.set_result(data)
  18005. * else:
  18006. * if not fut.cancelled(): # <<<<<<<<<<<<<<
  18007. * fut.set_exception(result)
  18008. *
  18009. */
  18010. /*else*/ {
  18011. if (unlikely(!__pyx_cur_scope->__pyx_v_fut)) { __Pyx_RaiseClosureNameError("fut"); __PYX_ERR(2, 864, __pyx_L1_error) }
  18012. __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_fut, __pyx_n_s_cancelled); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 864, __pyx_L1_error)
  18013. __Pyx_GOTREF(__pyx_t_6);
  18014. __pyx_t_5 = NULL;
  18015. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
  18016. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
  18017. if (likely(__pyx_t_5)) {
  18018. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
  18019. __Pyx_INCREF(__pyx_t_5);
  18020. __Pyx_INCREF(function);
  18021. __Pyx_DECREF_SET(__pyx_t_6, function);
  18022. }
  18023. }
  18024. __pyx_t_7 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
  18025. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  18026. if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 864, __pyx_L1_error)
  18027. __Pyx_GOTREF(__pyx_t_7);
  18028. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  18029. __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 864, __pyx_L1_error)
  18030. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  18031. __pyx_t_8 = ((!__pyx_t_1) != 0);
  18032. if (__pyx_t_8) {
  18033. /* "uvloop/loop.pyx":865
  18034. * else:
  18035. * if not fut.cancelled():
  18036. * fut.set_exception(result) # <<<<<<<<<<<<<<
  18037. *
  18038. * AddrInfoRequest(self, host, port, family, type, proto, flags, callback)
  18039. */
  18040. if (unlikely(!__pyx_cur_scope->__pyx_v_fut)) { __Pyx_RaiseClosureNameError("fut"); __PYX_ERR(2, 865, __pyx_L1_error) }
  18041. __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_fut, __pyx_n_s_set_exception); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 865, __pyx_L1_error)
  18042. __Pyx_GOTREF(__pyx_t_6);
  18043. __pyx_t_5 = NULL;
  18044. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
  18045. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
  18046. if (likely(__pyx_t_5)) {
  18047. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
  18048. __Pyx_INCREF(__pyx_t_5);
  18049. __Pyx_INCREF(function);
  18050. __Pyx_DECREF_SET(__pyx_t_6, function);
  18051. }
  18052. }
  18053. __pyx_t_7 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_5, __pyx_v_result) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_result);
  18054. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  18055. if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 865, __pyx_L1_error)
  18056. __Pyx_GOTREF(__pyx_t_7);
  18057. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  18058. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  18059. /* "uvloop/loop.pyx":864
  18060. * fut.set_result(data)
  18061. * else:
  18062. * if not fut.cancelled(): # <<<<<<<<<<<<<<
  18063. * fut.set_exception(result)
  18064. *
  18065. */
  18066. }
  18067. }
  18068. __pyx_L3:;
  18069. /* "uvloop/loop.pyx":850
  18070. * fut = self._new_future()
  18071. *
  18072. * def callback(result): # <<<<<<<<<<<<<<
  18073. * if AddrInfo.isinstance(result):
  18074. * try:
  18075. */
  18076. /* function exit code */
  18077. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  18078. goto __pyx_L0;
  18079. __pyx_L1_error:;
  18080. __Pyx_XDECREF(__pyx_t_5);
  18081. __Pyx_XDECREF(__pyx_t_6);
  18082. __Pyx_XDECREF(__pyx_t_7);
  18083. __Pyx_XDECREF(__pyx_t_10);
  18084. __Pyx_XDECREF(__pyx_t_11);
  18085. __Pyx_XDECREF(__pyx_t_12);
  18086. __Pyx_AddTraceback("uvloop.loop.Loop._getaddrinfo.callback", __pyx_clineno, __pyx_lineno, __pyx_filename);
  18087. __pyx_r = NULL;
  18088. __pyx_L0:;
  18089. __Pyx_XDECREF(__pyx_v_data);
  18090. __Pyx_XDECREF(__pyx_v_ex);
  18091. __Pyx_XGIVEREF(__pyx_r);
  18092. __Pyx_RefNannyFinishContext();
  18093. return __pyx_r;
  18094. }
  18095. /* "uvloop/loop.pyx":830
  18096. * return poll.is_writing()
  18097. *
  18098. * cdef _getaddrinfo(self, object host, object port, # <<<<<<<<<<<<<<
  18099. * int family, int type,
  18100. * int proto, int flags,
  18101. */
  18102. static PyObject *__pyx_f_6uvloop_4loop_4Loop__getaddrinfo(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_host, PyObject *__pyx_v_port, int __pyx_v_family, int __pyx_v_type, int __pyx_v_proto, int __pyx_v_flags, int __pyx_v_unpack) {
  18103. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct___getaddrinfo *__pyx_cur_scope;
  18104. PyObject *__pyx_v_callback = 0;
  18105. PyObject *__pyx_r = NULL;
  18106. __Pyx_RefNannyDeclarations
  18107. int __pyx_t_1;
  18108. int __pyx_t_2;
  18109. PyObject *__pyx_t_3 = NULL;
  18110. PyObject *__pyx_t_4 = NULL;
  18111. PyObject *__pyx_t_5 = NULL;
  18112. int __pyx_t_6;
  18113. PyObject *__pyx_t_7 = NULL;
  18114. PyObject *__pyx_t_8 = NULL;
  18115. __Pyx_RefNannySetupContext("_getaddrinfo", 0);
  18116. __pyx_cur_scope = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct___getaddrinfo *)__pyx_tp_new_6uvloop_4loop___pyx_scope_struct___getaddrinfo(__pyx_ptype_6uvloop_4loop___pyx_scope_struct___getaddrinfo, __pyx_empty_tuple, NULL);
  18117. if (unlikely(!__pyx_cur_scope)) {
  18118. __pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct___getaddrinfo *)Py_None);
  18119. __Pyx_INCREF(Py_None);
  18120. __PYX_ERR(2, 830, __pyx_L1_error)
  18121. } else {
  18122. __Pyx_GOTREF(__pyx_cur_scope);
  18123. }
  18124. __pyx_cur_scope->__pyx_v_unpack = __pyx_v_unpack;
  18125. __Pyx_INCREF(__pyx_v_host);
  18126. __Pyx_INCREF(__pyx_v_port);
  18127. /* "uvloop/loop.pyx":835
  18128. * int unpack):
  18129. *
  18130. * if isinstance(port, str): # <<<<<<<<<<<<<<
  18131. * port = port.encode()
  18132. * elif isinstance(port, int):
  18133. */
  18134. __pyx_t_1 = PyUnicode_Check(__pyx_v_port);
  18135. __pyx_t_2 = (__pyx_t_1 != 0);
  18136. if (__pyx_t_2) {
  18137. /* "uvloop/loop.pyx":836
  18138. *
  18139. * if isinstance(port, str):
  18140. * port = port.encode() # <<<<<<<<<<<<<<
  18141. * elif isinstance(port, int):
  18142. * port = str(port).encode()
  18143. */
  18144. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_port, __pyx_n_s_encode); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 836, __pyx_L1_error)
  18145. __Pyx_GOTREF(__pyx_t_4);
  18146. __pyx_t_5 = NULL;
  18147. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
  18148. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
  18149. if (likely(__pyx_t_5)) {
  18150. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  18151. __Pyx_INCREF(__pyx_t_5);
  18152. __Pyx_INCREF(function);
  18153. __Pyx_DECREF_SET(__pyx_t_4, function);
  18154. }
  18155. }
  18156. __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
  18157. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  18158. if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 836, __pyx_L1_error)
  18159. __Pyx_GOTREF(__pyx_t_3);
  18160. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  18161. __Pyx_DECREF_SET(__pyx_v_port, __pyx_t_3);
  18162. __pyx_t_3 = 0;
  18163. /* "uvloop/loop.pyx":835
  18164. * int unpack):
  18165. *
  18166. * if isinstance(port, str): # <<<<<<<<<<<<<<
  18167. * port = port.encode()
  18168. * elif isinstance(port, int):
  18169. */
  18170. goto __pyx_L3;
  18171. }
  18172. /* "uvloop/loop.pyx":837
  18173. * if isinstance(port, str):
  18174. * port = port.encode()
  18175. * elif isinstance(port, int): # <<<<<<<<<<<<<<
  18176. * port = str(port).encode()
  18177. * if port is not None and not isinstance(port, bytes):
  18178. */
  18179. __pyx_t_2 = PyInt_Check(__pyx_v_port);
  18180. __pyx_t_1 = (__pyx_t_2 != 0);
  18181. if (__pyx_t_1) {
  18182. /* "uvloop/loop.pyx":838
  18183. * port = port.encode()
  18184. * elif isinstance(port, int):
  18185. * port = str(port).encode() # <<<<<<<<<<<<<<
  18186. * if port is not None and not isinstance(port, bytes):
  18187. * raise TypeError('port must be a str, bytes or int')
  18188. */
  18189. __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_v_port); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 838, __pyx_L1_error)
  18190. __Pyx_GOTREF(__pyx_t_3);
  18191. __pyx_t_4 = PyUnicode_AsEncodedString(((PyObject*)__pyx_t_3), NULL, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 838, __pyx_L1_error)
  18192. __Pyx_GOTREF(__pyx_t_4);
  18193. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  18194. __Pyx_DECREF_SET(__pyx_v_port, __pyx_t_4);
  18195. __pyx_t_4 = 0;
  18196. /* "uvloop/loop.pyx":837
  18197. * if isinstance(port, str):
  18198. * port = port.encode()
  18199. * elif isinstance(port, int): # <<<<<<<<<<<<<<
  18200. * port = str(port).encode()
  18201. * if port is not None and not isinstance(port, bytes):
  18202. */
  18203. }
  18204. __pyx_L3:;
  18205. /* "uvloop/loop.pyx":839
  18206. * elif isinstance(port, int):
  18207. * port = str(port).encode()
  18208. * if port is not None and not isinstance(port, bytes): # <<<<<<<<<<<<<<
  18209. * raise TypeError('port must be a str, bytes or int')
  18210. *
  18211. */
  18212. __pyx_t_2 = (__pyx_v_port != Py_None);
  18213. __pyx_t_6 = (__pyx_t_2 != 0);
  18214. if (__pyx_t_6) {
  18215. } else {
  18216. __pyx_t_1 = __pyx_t_6;
  18217. goto __pyx_L5_bool_binop_done;
  18218. }
  18219. __pyx_t_6 = PyBytes_Check(__pyx_v_port);
  18220. __pyx_t_2 = ((!(__pyx_t_6 != 0)) != 0);
  18221. __pyx_t_1 = __pyx_t_2;
  18222. __pyx_L5_bool_binop_done:;
  18223. if (unlikely(__pyx_t_1)) {
  18224. /* "uvloop/loop.pyx":840
  18225. * port = str(port).encode()
  18226. * if port is not None and not isinstance(port, bytes):
  18227. * raise TypeError('port must be a str, bytes or int') # <<<<<<<<<<<<<<
  18228. *
  18229. * if isinstance(host, str):
  18230. */
  18231. __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 840, __pyx_L1_error)
  18232. __Pyx_GOTREF(__pyx_t_4);
  18233. __Pyx_Raise(__pyx_t_4, 0, 0, 0);
  18234. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  18235. __PYX_ERR(2, 840, __pyx_L1_error)
  18236. /* "uvloop/loop.pyx":839
  18237. * elif isinstance(port, int):
  18238. * port = str(port).encode()
  18239. * if port is not None and not isinstance(port, bytes): # <<<<<<<<<<<<<<
  18240. * raise TypeError('port must be a str, bytes or int')
  18241. *
  18242. */
  18243. }
  18244. /* "uvloop/loop.pyx":842
  18245. * raise TypeError('port must be a str, bytes or int')
  18246. *
  18247. * if isinstance(host, str): # <<<<<<<<<<<<<<
  18248. * host = host.encode('idna')
  18249. * if host is not None:
  18250. */
  18251. __pyx_t_1 = PyUnicode_Check(__pyx_v_host);
  18252. __pyx_t_2 = (__pyx_t_1 != 0);
  18253. if (__pyx_t_2) {
  18254. /* "uvloop/loop.pyx":843
  18255. *
  18256. * if isinstance(host, str):
  18257. * host = host.encode('idna') # <<<<<<<<<<<<<<
  18258. * if host is not None:
  18259. * if not isinstance(host, bytes):
  18260. */
  18261. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_host, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 843, __pyx_L1_error)
  18262. __Pyx_GOTREF(__pyx_t_3);
  18263. __pyx_t_5 = NULL;
  18264. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
  18265. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
  18266. if (likely(__pyx_t_5)) {
  18267. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  18268. __Pyx_INCREF(__pyx_t_5);
  18269. __Pyx_INCREF(function);
  18270. __Pyx_DECREF_SET(__pyx_t_3, function);
  18271. }
  18272. }
  18273. __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_n_u_idna) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_n_u_idna);
  18274. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  18275. if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 843, __pyx_L1_error)
  18276. __Pyx_GOTREF(__pyx_t_4);
  18277. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  18278. __Pyx_DECREF_SET(__pyx_v_host, __pyx_t_4);
  18279. __pyx_t_4 = 0;
  18280. /* "uvloop/loop.pyx":842
  18281. * raise TypeError('port must be a str, bytes or int')
  18282. *
  18283. * if isinstance(host, str): # <<<<<<<<<<<<<<
  18284. * host = host.encode('idna')
  18285. * if host is not None:
  18286. */
  18287. }
  18288. /* "uvloop/loop.pyx":844
  18289. * if isinstance(host, str):
  18290. * host = host.encode('idna')
  18291. * if host is not None: # <<<<<<<<<<<<<<
  18292. * if not isinstance(host, bytes):
  18293. * raise TypeError('host must be a str or bytes')
  18294. */
  18295. __pyx_t_2 = (__pyx_v_host != Py_None);
  18296. __pyx_t_1 = (__pyx_t_2 != 0);
  18297. if (__pyx_t_1) {
  18298. /* "uvloop/loop.pyx":845
  18299. * host = host.encode('idna')
  18300. * if host is not None:
  18301. * if not isinstance(host, bytes): # <<<<<<<<<<<<<<
  18302. * raise TypeError('host must be a str or bytes')
  18303. *
  18304. */
  18305. __pyx_t_1 = PyBytes_Check(__pyx_v_host);
  18306. __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
  18307. if (unlikely(__pyx_t_2)) {
  18308. /* "uvloop/loop.pyx":846
  18309. * if host is not None:
  18310. * if not isinstance(host, bytes):
  18311. * raise TypeError('host must be a str or bytes') # <<<<<<<<<<<<<<
  18312. *
  18313. * fut = self._new_future()
  18314. */
  18315. __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 846, __pyx_L1_error)
  18316. __Pyx_GOTREF(__pyx_t_4);
  18317. __Pyx_Raise(__pyx_t_4, 0, 0, 0);
  18318. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  18319. __PYX_ERR(2, 846, __pyx_L1_error)
  18320. /* "uvloop/loop.pyx":845
  18321. * host = host.encode('idna')
  18322. * if host is not None:
  18323. * if not isinstance(host, bytes): # <<<<<<<<<<<<<<
  18324. * raise TypeError('host must be a str or bytes')
  18325. *
  18326. */
  18327. }
  18328. /* "uvloop/loop.pyx":844
  18329. * if isinstance(host, str):
  18330. * host = host.encode('idna')
  18331. * if host is not None: # <<<<<<<<<<<<<<
  18332. * if not isinstance(host, bytes):
  18333. * raise TypeError('host must be a str or bytes')
  18334. */
  18335. }
  18336. /* "uvloop/loop.pyx":848
  18337. * raise TypeError('host must be a str or bytes')
  18338. *
  18339. * fut = self._new_future() # <<<<<<<<<<<<<<
  18340. *
  18341. * def callback(result):
  18342. */
  18343. __pyx_t_4 = __pyx_f_6uvloop_4loop_4Loop__new_future(__pyx_v_self); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 848, __pyx_L1_error)
  18344. __Pyx_GOTREF(__pyx_t_4);
  18345. __Pyx_GIVEREF(__pyx_t_4);
  18346. __pyx_cur_scope->__pyx_v_fut = __pyx_t_4;
  18347. __pyx_t_4 = 0;
  18348. /* "uvloop/loop.pyx":850
  18349. * fut = self._new_future()
  18350. *
  18351. * def callback(result): # <<<<<<<<<<<<<<
  18352. * if AddrInfo.isinstance(result):
  18353. * try:
  18354. */
  18355. __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6uvloop_4loop_4Loop_12_getaddrinfo_1callback, 0, __pyx_n_s_Loop__getaddrinfo_locals_callbac, ((PyObject*)__pyx_cur_scope), __pyx_n_s_uvloop_loop, __pyx_d, ((PyObject *)__pyx_codeobj__13)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 850, __pyx_L1_error)
  18356. __Pyx_GOTREF(__pyx_t_4);
  18357. __pyx_v_callback = __pyx_t_4;
  18358. __pyx_t_4 = 0;
  18359. /* "uvloop/loop.pyx":867
  18360. * fut.set_exception(result)
  18361. *
  18362. * AddrInfoRequest(self, host, port, family, type, proto, flags, callback) # <<<<<<<<<<<<<<
  18363. * return fut
  18364. *
  18365. */
  18366. __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_family); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 867, __pyx_L1_error)
  18367. __Pyx_GOTREF(__pyx_t_4);
  18368. __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 867, __pyx_L1_error)
  18369. __Pyx_GOTREF(__pyx_t_3);
  18370. __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_proto); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 867, __pyx_L1_error)
  18371. __Pyx_GOTREF(__pyx_t_5);
  18372. __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_flags); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 867, __pyx_L1_error)
  18373. __Pyx_GOTREF(__pyx_t_7);
  18374. __pyx_t_8 = PyTuple_New(8); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 867, __pyx_L1_error)
  18375. __Pyx_GOTREF(__pyx_t_8);
  18376. __Pyx_INCREF(((PyObject *)__pyx_v_self));
  18377. __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  18378. PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)__pyx_v_self));
  18379. __Pyx_INCREF(__pyx_v_host);
  18380. __Pyx_GIVEREF(__pyx_v_host);
  18381. PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_host);
  18382. __Pyx_INCREF(__pyx_v_port);
  18383. __Pyx_GIVEREF(__pyx_v_port);
  18384. PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_v_port);
  18385. __Pyx_GIVEREF(__pyx_t_4);
  18386. PyTuple_SET_ITEM(__pyx_t_8, 3, __pyx_t_4);
  18387. __Pyx_GIVEREF(__pyx_t_3);
  18388. PyTuple_SET_ITEM(__pyx_t_8, 4, __pyx_t_3);
  18389. __Pyx_GIVEREF(__pyx_t_5);
  18390. PyTuple_SET_ITEM(__pyx_t_8, 5, __pyx_t_5);
  18391. __Pyx_GIVEREF(__pyx_t_7);
  18392. PyTuple_SET_ITEM(__pyx_t_8, 6, __pyx_t_7);
  18393. __Pyx_INCREF(__pyx_v_callback);
  18394. __Pyx_GIVEREF(__pyx_v_callback);
  18395. PyTuple_SET_ITEM(__pyx_t_8, 7, __pyx_v_callback);
  18396. __pyx_t_4 = 0;
  18397. __pyx_t_3 = 0;
  18398. __pyx_t_5 = 0;
  18399. __pyx_t_7 = 0;
  18400. __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6uvloop_4loop_AddrInfoRequest), __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 867, __pyx_L1_error)
  18401. __Pyx_GOTREF(__pyx_t_7);
  18402. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  18403. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  18404. /* "uvloop/loop.pyx":868
  18405. *
  18406. * AddrInfoRequest(self, host, port, family, type, proto, flags, callback)
  18407. * return fut # <<<<<<<<<<<<<<
  18408. *
  18409. * cdef _getnameinfo(self, system.sockaddr *addr, int flags):
  18410. */
  18411. __Pyx_XDECREF(__pyx_r);
  18412. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_fut);
  18413. __pyx_r = __pyx_cur_scope->__pyx_v_fut;
  18414. goto __pyx_L0;
  18415. /* "uvloop/loop.pyx":830
  18416. * return poll.is_writing()
  18417. *
  18418. * cdef _getaddrinfo(self, object host, object port, # <<<<<<<<<<<<<<
  18419. * int family, int type,
  18420. * int proto, int flags,
  18421. */
  18422. /* function exit code */
  18423. __pyx_L1_error:;
  18424. __Pyx_XDECREF(__pyx_t_3);
  18425. __Pyx_XDECREF(__pyx_t_4);
  18426. __Pyx_XDECREF(__pyx_t_5);
  18427. __Pyx_XDECREF(__pyx_t_7);
  18428. __Pyx_XDECREF(__pyx_t_8);
  18429. __Pyx_AddTraceback("uvloop.loop.Loop._getaddrinfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
  18430. __pyx_r = 0;
  18431. __pyx_L0:;
  18432. __Pyx_XDECREF(__pyx_v_callback);
  18433. __Pyx_XDECREF(__pyx_v_host);
  18434. __Pyx_XDECREF(__pyx_v_port);
  18435. __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  18436. __Pyx_XGIVEREF(__pyx_r);
  18437. __Pyx_RefNannyFinishContext();
  18438. return __pyx_r;
  18439. }
  18440. /* "uvloop/loop.pyx":874
  18441. * fut = self._new_future()
  18442. *
  18443. * def callback(result): # <<<<<<<<<<<<<<
  18444. * if isinstance(result, tuple):
  18445. * fut.set_result(result)
  18446. */
  18447. /* Python wrapper */
  18448. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_12_getnameinfo_1callback(PyObject *__pyx_self, PyObject *__pyx_v_result); /*proto*/
  18449. static PyMethodDef __pyx_mdef_6uvloop_4loop_4Loop_12_getnameinfo_1callback = {"callback", (PyCFunction)__pyx_pw_6uvloop_4loop_4Loop_12_getnameinfo_1callback, METH_O, 0};
  18450. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_12_getnameinfo_1callback(PyObject *__pyx_self, PyObject *__pyx_v_result) {
  18451. PyObject *__pyx_r = 0;
  18452. __Pyx_RefNannyDeclarations
  18453. __Pyx_RefNannySetupContext("callback (wrapper)", 0);
  18454. __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_12_getnameinfo_callback(__pyx_self, ((PyObject *)__pyx_v_result));
  18455. /* function exit code */
  18456. __Pyx_RefNannyFinishContext();
  18457. return __pyx_r;
  18458. }
  18459. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_12_getnameinfo_callback(PyObject *__pyx_self, PyObject *__pyx_v_result) {
  18460. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_1__getnameinfo *__pyx_cur_scope;
  18461. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_1__getnameinfo *__pyx_outer_scope;
  18462. PyObject *__pyx_r = NULL;
  18463. __Pyx_RefNannyDeclarations
  18464. int __pyx_t_1;
  18465. int __pyx_t_2;
  18466. PyObject *__pyx_t_3 = NULL;
  18467. PyObject *__pyx_t_4 = NULL;
  18468. PyObject *__pyx_t_5 = NULL;
  18469. __Pyx_RefNannySetupContext("callback", 0);
  18470. __pyx_outer_scope = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_1__getnameinfo *) __Pyx_CyFunction_GetClosure(__pyx_self);
  18471. __pyx_cur_scope = __pyx_outer_scope;
  18472. /* "uvloop/loop.pyx":875
  18473. *
  18474. * def callback(result):
  18475. * if isinstance(result, tuple): # <<<<<<<<<<<<<<
  18476. * fut.set_result(result)
  18477. * else:
  18478. */
  18479. __pyx_t_1 = PyTuple_Check(__pyx_v_result);
  18480. __pyx_t_2 = (__pyx_t_1 != 0);
  18481. if (__pyx_t_2) {
  18482. /* "uvloop/loop.pyx":876
  18483. * def callback(result):
  18484. * if isinstance(result, tuple):
  18485. * fut.set_result(result) # <<<<<<<<<<<<<<
  18486. * else:
  18487. * fut.set_exception(result)
  18488. */
  18489. if (unlikely(!__pyx_cur_scope->__pyx_v_fut)) { __Pyx_RaiseClosureNameError("fut"); __PYX_ERR(2, 876, __pyx_L1_error) }
  18490. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_fut, __pyx_n_s_set_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 876, __pyx_L1_error)
  18491. __Pyx_GOTREF(__pyx_t_4);
  18492. __pyx_t_5 = NULL;
  18493. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
  18494. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
  18495. if (likely(__pyx_t_5)) {
  18496. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  18497. __Pyx_INCREF(__pyx_t_5);
  18498. __Pyx_INCREF(function);
  18499. __Pyx_DECREF_SET(__pyx_t_4, function);
  18500. }
  18501. }
  18502. __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_result) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_result);
  18503. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  18504. if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 876, __pyx_L1_error)
  18505. __Pyx_GOTREF(__pyx_t_3);
  18506. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  18507. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  18508. /* "uvloop/loop.pyx":875
  18509. *
  18510. * def callback(result):
  18511. * if isinstance(result, tuple): # <<<<<<<<<<<<<<
  18512. * fut.set_result(result)
  18513. * else:
  18514. */
  18515. goto __pyx_L3;
  18516. }
  18517. /* "uvloop/loop.pyx":878
  18518. * fut.set_result(result)
  18519. * else:
  18520. * fut.set_exception(result) # <<<<<<<<<<<<<<
  18521. *
  18522. * nr = NameInfoRequest(self, callback)
  18523. */
  18524. /*else*/ {
  18525. if (unlikely(!__pyx_cur_scope->__pyx_v_fut)) { __Pyx_RaiseClosureNameError("fut"); __PYX_ERR(2, 878, __pyx_L1_error) }
  18526. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_fut, __pyx_n_s_set_exception); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 878, __pyx_L1_error)
  18527. __Pyx_GOTREF(__pyx_t_4);
  18528. __pyx_t_5 = NULL;
  18529. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
  18530. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
  18531. if (likely(__pyx_t_5)) {
  18532. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  18533. __Pyx_INCREF(__pyx_t_5);
  18534. __Pyx_INCREF(function);
  18535. __Pyx_DECREF_SET(__pyx_t_4, function);
  18536. }
  18537. }
  18538. __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_result) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_result);
  18539. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  18540. if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 878, __pyx_L1_error)
  18541. __Pyx_GOTREF(__pyx_t_3);
  18542. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  18543. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  18544. }
  18545. __pyx_L3:;
  18546. /* "uvloop/loop.pyx":874
  18547. * fut = self._new_future()
  18548. *
  18549. * def callback(result): # <<<<<<<<<<<<<<
  18550. * if isinstance(result, tuple):
  18551. * fut.set_result(result)
  18552. */
  18553. /* function exit code */
  18554. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  18555. goto __pyx_L0;
  18556. __pyx_L1_error:;
  18557. __Pyx_XDECREF(__pyx_t_3);
  18558. __Pyx_XDECREF(__pyx_t_4);
  18559. __Pyx_XDECREF(__pyx_t_5);
  18560. __Pyx_AddTraceback("uvloop.loop.Loop._getnameinfo.callback", __pyx_clineno, __pyx_lineno, __pyx_filename);
  18561. __pyx_r = NULL;
  18562. __pyx_L0:;
  18563. __Pyx_XGIVEREF(__pyx_r);
  18564. __Pyx_RefNannyFinishContext();
  18565. return __pyx_r;
  18566. }
  18567. /* "uvloop/loop.pyx":870
  18568. * return fut
  18569. *
  18570. * cdef _getnameinfo(self, system.sockaddr *addr, int flags): # <<<<<<<<<<<<<<
  18571. * cdef NameInfoRequest nr
  18572. * fut = self._new_future()
  18573. */
  18574. static PyObject *__pyx_f_6uvloop_4loop_4Loop__getnameinfo(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, struct sockaddr *__pyx_v_addr, int __pyx_v_flags) {
  18575. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_1__getnameinfo *__pyx_cur_scope;
  18576. struct __pyx_obj_6uvloop_4loop_NameInfoRequest *__pyx_v_nr = 0;
  18577. PyObject *__pyx_v_callback = 0;
  18578. PyObject *__pyx_r = NULL;
  18579. __Pyx_RefNannyDeclarations
  18580. PyObject *__pyx_t_1 = NULL;
  18581. PyObject *__pyx_t_2 = NULL;
  18582. __Pyx_RefNannySetupContext("_getnameinfo", 0);
  18583. __pyx_cur_scope = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_1__getnameinfo *)__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_1__getnameinfo(__pyx_ptype_6uvloop_4loop___pyx_scope_struct_1__getnameinfo, __pyx_empty_tuple, NULL);
  18584. if (unlikely(!__pyx_cur_scope)) {
  18585. __pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_1__getnameinfo *)Py_None);
  18586. __Pyx_INCREF(Py_None);
  18587. __PYX_ERR(2, 870, __pyx_L1_error)
  18588. } else {
  18589. __Pyx_GOTREF(__pyx_cur_scope);
  18590. }
  18591. /* "uvloop/loop.pyx":872
  18592. * cdef _getnameinfo(self, system.sockaddr *addr, int flags):
  18593. * cdef NameInfoRequest nr
  18594. * fut = self._new_future() # <<<<<<<<<<<<<<
  18595. *
  18596. * def callback(result):
  18597. */
  18598. __pyx_t_1 = __pyx_f_6uvloop_4loop_4Loop__new_future(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 872, __pyx_L1_error)
  18599. __Pyx_GOTREF(__pyx_t_1);
  18600. __Pyx_GIVEREF(__pyx_t_1);
  18601. __pyx_cur_scope->__pyx_v_fut = __pyx_t_1;
  18602. __pyx_t_1 = 0;
  18603. /* "uvloop/loop.pyx":874
  18604. * fut = self._new_future()
  18605. *
  18606. * def callback(result): # <<<<<<<<<<<<<<
  18607. * if isinstance(result, tuple):
  18608. * fut.set_result(result)
  18609. */
  18610. __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6uvloop_4loop_4Loop_12_getnameinfo_1callback, 0, __pyx_n_s_Loop__getnameinfo_locals_callbac, ((PyObject*)__pyx_cur_scope), __pyx_n_s_uvloop_loop, __pyx_d, ((PyObject *)__pyx_codeobj__15)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 874, __pyx_L1_error)
  18611. __Pyx_GOTREF(__pyx_t_1);
  18612. __pyx_v_callback = __pyx_t_1;
  18613. __pyx_t_1 = 0;
  18614. /* "uvloop/loop.pyx":880
  18615. * fut.set_exception(result)
  18616. *
  18617. * nr = NameInfoRequest(self, callback) # <<<<<<<<<<<<<<
  18618. * nr.query(addr, flags)
  18619. * return fut
  18620. */
  18621. __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 880, __pyx_L1_error)
  18622. __Pyx_GOTREF(__pyx_t_1);
  18623. __Pyx_INCREF(((PyObject *)__pyx_v_self));
  18624. __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  18625. PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self));
  18626. __Pyx_INCREF(__pyx_v_callback);
  18627. __Pyx_GIVEREF(__pyx_v_callback);
  18628. PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_callback);
  18629. __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6uvloop_4loop_NameInfoRequest), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 880, __pyx_L1_error)
  18630. __Pyx_GOTREF(__pyx_t_2);
  18631. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  18632. __pyx_v_nr = ((struct __pyx_obj_6uvloop_4loop_NameInfoRequest *)__pyx_t_2);
  18633. __pyx_t_2 = 0;
  18634. /* "uvloop/loop.pyx":881
  18635. *
  18636. * nr = NameInfoRequest(self, callback)
  18637. * nr.query(addr, flags) # <<<<<<<<<<<<<<
  18638. * return fut
  18639. *
  18640. */
  18641. __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_NameInfoRequest *)__pyx_v_nr->__pyx_base.__pyx_vtab)->query(__pyx_v_nr, __pyx_v_addr, __pyx_v_flags); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 881, __pyx_L1_error)
  18642. __Pyx_GOTREF(__pyx_t_2);
  18643. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  18644. /* "uvloop/loop.pyx":882
  18645. * nr = NameInfoRequest(self, callback)
  18646. * nr.query(addr, flags)
  18647. * return fut # <<<<<<<<<<<<<<
  18648. *
  18649. * cdef _sock_recv(self, fut, sock, n):
  18650. */
  18651. __Pyx_XDECREF(__pyx_r);
  18652. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_fut);
  18653. __pyx_r = __pyx_cur_scope->__pyx_v_fut;
  18654. goto __pyx_L0;
  18655. /* "uvloop/loop.pyx":870
  18656. * return fut
  18657. *
  18658. * cdef _getnameinfo(self, system.sockaddr *addr, int flags): # <<<<<<<<<<<<<<
  18659. * cdef NameInfoRequest nr
  18660. * fut = self._new_future()
  18661. */
  18662. /* function exit code */
  18663. __pyx_L1_error:;
  18664. __Pyx_XDECREF(__pyx_t_1);
  18665. __Pyx_XDECREF(__pyx_t_2);
  18666. __Pyx_AddTraceback("uvloop.loop.Loop._getnameinfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
  18667. __pyx_r = 0;
  18668. __pyx_L0:;
  18669. __Pyx_XDECREF((PyObject *)__pyx_v_nr);
  18670. __Pyx_XDECREF(__pyx_v_callback);
  18671. __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  18672. __Pyx_XGIVEREF(__pyx_r);
  18673. __Pyx_RefNannyFinishContext();
  18674. return __pyx_r;
  18675. }
  18676. /* "uvloop/loop.pyx":884
  18677. * return fut
  18678. *
  18679. * cdef _sock_recv(self, fut, sock, n): # <<<<<<<<<<<<<<
  18680. * if UVLOOP_DEBUG:
  18681. * if fut.cancelled():
  18682. */
  18683. static PyObject *__pyx_f_6uvloop_4loop_4Loop__sock_recv(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_fut, PyObject *__pyx_v_sock, PyObject *__pyx_v_n) {
  18684. PyObject *__pyx_v_data = NULL;
  18685. PyObject *__pyx_v_exc = NULL;
  18686. PyObject *__pyx_r = NULL;
  18687. __Pyx_RefNannyDeclarations
  18688. int __pyx_t_1;
  18689. PyObject *__pyx_t_2 = NULL;
  18690. PyObject *__pyx_t_3 = NULL;
  18691. PyObject *__pyx_t_4 = NULL;
  18692. int __pyx_t_5;
  18693. Py_ssize_t __pyx_t_6;
  18694. Py_UCS4 __pyx_t_7;
  18695. PyObject *__pyx_t_8 = NULL;
  18696. PyObject *__pyx_t_9 = NULL;
  18697. PyObject *__pyx_t_10 = NULL;
  18698. PyObject *__pyx_t_11 = NULL;
  18699. PyObject *__pyx_t_12 = NULL;
  18700. int __pyx_t_13;
  18701. PyObject *__pyx_t_14 = NULL;
  18702. int __pyx_t_15;
  18703. char const *__pyx_t_16;
  18704. PyObject *__pyx_t_17 = NULL;
  18705. PyObject *__pyx_t_18 = NULL;
  18706. PyObject *__pyx_t_19 = NULL;
  18707. PyObject *__pyx_t_20 = NULL;
  18708. PyObject *__pyx_t_21 = NULL;
  18709. PyObject *__pyx_t_22 = NULL;
  18710. __Pyx_RefNannySetupContext("_sock_recv", 0);
  18711. /* "uvloop/loop.pyx":885
  18712. *
  18713. * cdef _sock_recv(self, fut, sock, n):
  18714. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  18715. * if fut.cancelled():
  18716. * # Shouldn't happen with _SyncSocketReaderFuture.
  18717. */
  18718. __pyx_t_1 = (UVLOOP_DEBUG != 0);
  18719. if (__pyx_t_1) {
  18720. /* "uvloop/loop.pyx":886
  18721. * cdef _sock_recv(self, fut, sock, n):
  18722. * if UVLOOP_DEBUG:
  18723. * if fut.cancelled(): # <<<<<<<<<<<<<<
  18724. * # Shouldn't happen with _SyncSocketReaderFuture.
  18725. * raise RuntimeError(
  18726. */
  18727. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_fut, __pyx_n_s_cancelled); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 886, __pyx_L1_error)
  18728. __Pyx_GOTREF(__pyx_t_3);
  18729. __pyx_t_4 = NULL;
  18730. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
  18731. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
  18732. if (likely(__pyx_t_4)) {
  18733. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  18734. __Pyx_INCREF(__pyx_t_4);
  18735. __Pyx_INCREF(function);
  18736. __Pyx_DECREF_SET(__pyx_t_3, function);
  18737. }
  18738. }
  18739. __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
  18740. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  18741. if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 886, __pyx_L1_error)
  18742. __Pyx_GOTREF(__pyx_t_2);
  18743. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  18744. __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 886, __pyx_L1_error)
  18745. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  18746. if (unlikely(__pyx_t_1)) {
  18747. /* "uvloop/loop.pyx":888
  18748. * if fut.cancelled():
  18749. * # Shouldn't happen with _SyncSocketReaderFuture.
  18750. * raise RuntimeError( # <<<<<<<<<<<<<<
  18751. * f'_sock_recv is called on a cancelled Future')
  18752. *
  18753. */
  18754. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 888, __pyx_L1_error)
  18755. __Pyx_GOTREF(__pyx_t_2);
  18756. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  18757. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  18758. __PYX_ERR(2, 888, __pyx_L1_error)
  18759. /* "uvloop/loop.pyx":886
  18760. * cdef _sock_recv(self, fut, sock, n):
  18761. * if UVLOOP_DEBUG:
  18762. * if fut.cancelled(): # <<<<<<<<<<<<<<
  18763. * # Shouldn't happen with _SyncSocketReaderFuture.
  18764. * raise RuntimeError(
  18765. */
  18766. }
  18767. /* "uvloop/loop.pyx":891
  18768. * f'_sock_recv is called on a cancelled Future')
  18769. *
  18770. * if not self._has_reader(sock): # <<<<<<<<<<<<<<
  18771. * raise RuntimeError(
  18772. * f'socket {sock!r} does not have a reader '
  18773. */
  18774. __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_vtab)->_has_reader(__pyx_v_self, __pyx_v_sock); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 891, __pyx_L1_error)
  18775. __Pyx_GOTREF(__pyx_t_2);
  18776. __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 891, __pyx_L1_error)
  18777. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  18778. __pyx_t_5 = ((!__pyx_t_1) != 0);
  18779. if (unlikely(__pyx_t_5)) {
  18780. /* "uvloop/loop.pyx":893
  18781. * if not self._has_reader(sock):
  18782. * raise RuntimeError(
  18783. * f'socket {sock!r} does not have a reader ' # <<<<<<<<<<<<<<
  18784. * f'in the _sock_recv callback')
  18785. *
  18786. */
  18787. __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 893, __pyx_L1_error)
  18788. __Pyx_GOTREF(__pyx_t_2);
  18789. __pyx_t_6 = 0;
  18790. __pyx_t_7 = 127;
  18791. __Pyx_INCREF(__pyx_kp_u_socket);
  18792. __pyx_t_6 += 7;
  18793. __Pyx_GIVEREF(__pyx_kp_u_socket);
  18794. PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_socket);
  18795. __pyx_t_3 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_sock), __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 893, __pyx_L1_error)
  18796. __Pyx_GOTREF(__pyx_t_3);
  18797. __pyx_t_7 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) > __pyx_t_7) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) : __pyx_t_7;
  18798. __pyx_t_6 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3);
  18799. __Pyx_GIVEREF(__pyx_t_3);
  18800. PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
  18801. __pyx_t_3 = 0;
  18802. __Pyx_INCREF(__pyx_kp_u_does_not_have_a_reader_in_the);
  18803. __pyx_t_6 += 50;
  18804. __Pyx_GIVEREF(__pyx_kp_u_does_not_have_a_reader_in_the);
  18805. PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_kp_u_does_not_have_a_reader_in_the);
  18806. __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_2, 3, __pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 893, __pyx_L1_error)
  18807. __Pyx_GOTREF(__pyx_t_3);
  18808. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  18809. /* "uvloop/loop.pyx":892
  18810. *
  18811. * if not self._has_reader(sock):
  18812. * raise RuntimeError( # <<<<<<<<<<<<<<
  18813. * f'socket {sock!r} does not have a reader '
  18814. * f'in the _sock_recv callback')
  18815. */
  18816. __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 892, __pyx_L1_error)
  18817. __Pyx_GOTREF(__pyx_t_2);
  18818. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  18819. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  18820. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  18821. __PYX_ERR(2, 892, __pyx_L1_error)
  18822. /* "uvloop/loop.pyx":891
  18823. * f'_sock_recv is called on a cancelled Future')
  18824. *
  18825. * if not self._has_reader(sock): # <<<<<<<<<<<<<<
  18826. * raise RuntimeError(
  18827. * f'socket {sock!r} does not have a reader '
  18828. */
  18829. }
  18830. /* "uvloop/loop.pyx":885
  18831. *
  18832. * cdef _sock_recv(self, fut, sock, n):
  18833. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  18834. * if fut.cancelled():
  18835. * # Shouldn't happen with _SyncSocketReaderFuture.
  18836. */
  18837. }
  18838. /* "uvloop/loop.pyx":896
  18839. * f'in the _sock_recv callback')
  18840. *
  18841. * try: # <<<<<<<<<<<<<<
  18842. * data = sock.recv(n)
  18843. * except (BlockingIOError, InterruptedError):
  18844. */
  18845. {
  18846. __Pyx_PyThreadState_declare
  18847. __Pyx_PyThreadState_assign
  18848. __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
  18849. __Pyx_XGOTREF(__pyx_t_8);
  18850. __Pyx_XGOTREF(__pyx_t_9);
  18851. __Pyx_XGOTREF(__pyx_t_10);
  18852. /*try:*/ {
  18853. /* "uvloop/loop.pyx":897
  18854. *
  18855. * try:
  18856. * data = sock.recv(n) # <<<<<<<<<<<<<<
  18857. * except (BlockingIOError, InterruptedError):
  18858. * # No need to re-add the reader, let's just wait until
  18859. */
  18860. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_sock, __pyx_n_s_recv); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 897, __pyx_L6_error)
  18861. __Pyx_GOTREF(__pyx_t_3);
  18862. __pyx_t_4 = NULL;
  18863. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
  18864. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
  18865. if (likely(__pyx_t_4)) {
  18866. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  18867. __Pyx_INCREF(__pyx_t_4);
  18868. __Pyx_INCREF(function);
  18869. __Pyx_DECREF_SET(__pyx_t_3, function);
  18870. }
  18871. }
  18872. __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_n) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_n);
  18873. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  18874. if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 897, __pyx_L6_error)
  18875. __Pyx_GOTREF(__pyx_t_2);
  18876. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  18877. __pyx_v_data = __pyx_t_2;
  18878. __pyx_t_2 = 0;
  18879. /* "uvloop/loop.pyx":896
  18880. * f'in the _sock_recv callback')
  18881. *
  18882. * try: # <<<<<<<<<<<<<<
  18883. * data = sock.recv(n)
  18884. * except (BlockingIOError, InterruptedError):
  18885. */
  18886. }
  18887. /* "uvloop/loop.pyx":906
  18888. * self._remove_reader(sock)
  18889. * else:
  18890. * fut.set_result(data) # <<<<<<<<<<<<<<
  18891. * self._remove_reader(sock)
  18892. *
  18893. */
  18894. /*else:*/ {
  18895. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_fut, __pyx_n_s_set_result); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 906, __pyx_L8_except_error)
  18896. __Pyx_GOTREF(__pyx_t_3);
  18897. __pyx_t_4 = NULL;
  18898. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
  18899. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
  18900. if (likely(__pyx_t_4)) {
  18901. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  18902. __Pyx_INCREF(__pyx_t_4);
  18903. __Pyx_INCREF(function);
  18904. __Pyx_DECREF_SET(__pyx_t_3, function);
  18905. }
  18906. }
  18907. __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_data) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_data);
  18908. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  18909. if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 906, __pyx_L8_except_error)
  18910. __Pyx_GOTREF(__pyx_t_2);
  18911. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  18912. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  18913. /* "uvloop/loop.pyx":907
  18914. * else:
  18915. * fut.set_result(data)
  18916. * self._remove_reader(sock) # <<<<<<<<<<<<<<
  18917. *
  18918. * cdef _sock_recv_into(self, fut, sock, buf):
  18919. */
  18920. __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_vtab)->_remove_reader(__pyx_v_self, __pyx_v_sock); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 907, __pyx_L8_except_error)
  18921. __Pyx_GOTREF(__pyx_t_2);
  18922. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  18923. }
  18924. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  18925. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  18926. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  18927. goto __pyx_L11_try_end;
  18928. __pyx_L6_error:;
  18929. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  18930. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  18931. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  18932. /* "uvloop/loop.pyx":898
  18933. * try:
  18934. * data = sock.recv(n)
  18935. * except (BlockingIOError, InterruptedError): # <<<<<<<<<<<<<<
  18936. * # No need to re-add the reader, let's just wait until
  18937. * # the poll handler calls this callback again.
  18938. */
  18939. __Pyx_ErrFetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
  18940. __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_BlockingIOError); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 898, __pyx_L8_except_error)
  18941. __Pyx_GOTREF(__pyx_t_11);
  18942. __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_InterruptedError); if (unlikely(!__pyx_t_12)) __PYX_ERR(2, 898, __pyx_L8_except_error)
  18943. __Pyx_GOTREF(__pyx_t_12);
  18944. __pyx_t_13 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_2, __pyx_t_11) || __Pyx_PyErr_GivenExceptionMatches(__pyx_t_2, __pyx_t_12);
  18945. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  18946. __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  18947. __Pyx_ErrRestore(__pyx_t_2, __pyx_t_3, __pyx_t_4);
  18948. __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_t_4 = 0;
  18949. if (__pyx_t_13) {
  18950. __Pyx_ErrRestore(0,0,0);
  18951. goto __pyx_L7_exception_handled;
  18952. }
  18953. /* "uvloop/loop.pyx":902
  18954. * # the poll handler calls this callback again.
  18955. * pass
  18956. * except Exception as exc: # <<<<<<<<<<<<<<
  18957. * fut.set_exception(exc)
  18958. * self._remove_reader(sock)
  18959. */
  18960. __pyx_t_13 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
  18961. if (__pyx_t_13) {
  18962. __Pyx_AddTraceback("uvloop.loop.Loop._sock_recv", __pyx_clineno, __pyx_lineno, __pyx_filename);
  18963. if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2) < 0) __PYX_ERR(2, 902, __pyx_L8_except_error)
  18964. __Pyx_GOTREF(__pyx_t_4);
  18965. __Pyx_GOTREF(__pyx_t_3);
  18966. __Pyx_GOTREF(__pyx_t_2);
  18967. __Pyx_INCREF(__pyx_t_3);
  18968. __pyx_v_exc = __pyx_t_3;
  18969. /*try:*/ {
  18970. /* "uvloop/loop.pyx":903
  18971. * pass
  18972. * except Exception as exc:
  18973. * fut.set_exception(exc) # <<<<<<<<<<<<<<
  18974. * self._remove_reader(sock)
  18975. * else:
  18976. */
  18977. __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_fut, __pyx_n_s_set_exception); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 903, __pyx_L17_error)
  18978. __Pyx_GOTREF(__pyx_t_11);
  18979. __pyx_t_14 = NULL;
  18980. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) {
  18981. __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_11);
  18982. if (likely(__pyx_t_14)) {
  18983. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
  18984. __Pyx_INCREF(__pyx_t_14);
  18985. __Pyx_INCREF(function);
  18986. __Pyx_DECREF_SET(__pyx_t_11, function);
  18987. }
  18988. }
  18989. __pyx_t_12 = (__pyx_t_14) ? __Pyx_PyObject_Call2Args(__pyx_t_11, __pyx_t_14, __pyx_v_exc) : __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_v_exc);
  18990. __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
  18991. if (unlikely(!__pyx_t_12)) __PYX_ERR(2, 903, __pyx_L17_error)
  18992. __Pyx_GOTREF(__pyx_t_12);
  18993. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  18994. __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  18995. /* "uvloop/loop.pyx":904
  18996. * except Exception as exc:
  18997. * fut.set_exception(exc)
  18998. * self._remove_reader(sock) # <<<<<<<<<<<<<<
  18999. * else:
  19000. * fut.set_result(data)
  19001. */
  19002. __pyx_t_12 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_vtab)->_remove_reader(__pyx_v_self, __pyx_v_sock); if (unlikely(!__pyx_t_12)) __PYX_ERR(2, 904, __pyx_L17_error)
  19003. __Pyx_GOTREF(__pyx_t_12);
  19004. __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  19005. }
  19006. /* "uvloop/loop.pyx":902
  19007. * # the poll handler calls this callback again.
  19008. * pass
  19009. * except Exception as exc: # <<<<<<<<<<<<<<
  19010. * fut.set_exception(exc)
  19011. * self._remove_reader(sock)
  19012. */
  19013. /*finally:*/ {
  19014. /*normal exit:*/{
  19015. __Pyx_DECREF(__pyx_v_exc);
  19016. __pyx_v_exc = NULL;
  19017. goto __pyx_L18;
  19018. }
  19019. __pyx_L17_error:;
  19020. /*exception exit:*/{
  19021. __Pyx_PyThreadState_declare
  19022. __Pyx_PyThreadState_assign
  19023. __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
  19024. __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
  19025. __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
  19026. __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
  19027. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22);
  19028. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19) < 0)) __Pyx_ErrFetch(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19);
  19029. __Pyx_XGOTREF(__pyx_t_17);
  19030. __Pyx_XGOTREF(__pyx_t_18);
  19031. __Pyx_XGOTREF(__pyx_t_19);
  19032. __Pyx_XGOTREF(__pyx_t_20);
  19033. __Pyx_XGOTREF(__pyx_t_21);
  19034. __Pyx_XGOTREF(__pyx_t_22);
  19035. __pyx_t_13 = __pyx_lineno; __pyx_t_15 = __pyx_clineno; __pyx_t_16 = __pyx_filename;
  19036. {
  19037. __Pyx_DECREF(__pyx_v_exc);
  19038. __pyx_v_exc = NULL;
  19039. }
  19040. if (PY_MAJOR_VERSION >= 3) {
  19041. __Pyx_XGIVEREF(__pyx_t_20);
  19042. __Pyx_XGIVEREF(__pyx_t_21);
  19043. __Pyx_XGIVEREF(__pyx_t_22);
  19044. __Pyx_ExceptionReset(__pyx_t_20, __pyx_t_21, __pyx_t_22);
  19045. }
  19046. __Pyx_XGIVEREF(__pyx_t_17);
  19047. __Pyx_XGIVEREF(__pyx_t_18);
  19048. __Pyx_XGIVEREF(__pyx_t_19);
  19049. __Pyx_ErrRestore(__pyx_t_17, __pyx_t_18, __pyx_t_19);
  19050. __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
  19051. __pyx_lineno = __pyx_t_13; __pyx_clineno = __pyx_t_15; __pyx_filename = __pyx_t_16;
  19052. goto __pyx_L8_except_error;
  19053. }
  19054. __pyx_L18:;
  19055. }
  19056. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  19057. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  19058. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  19059. goto __pyx_L7_exception_handled;
  19060. }
  19061. goto __pyx_L8_except_error;
  19062. __pyx_L8_except_error:;
  19063. /* "uvloop/loop.pyx":896
  19064. * f'in the _sock_recv callback')
  19065. *
  19066. * try: # <<<<<<<<<<<<<<
  19067. * data = sock.recv(n)
  19068. * except (BlockingIOError, InterruptedError):
  19069. */
  19070. __Pyx_XGIVEREF(__pyx_t_8);
  19071. __Pyx_XGIVEREF(__pyx_t_9);
  19072. __Pyx_XGIVEREF(__pyx_t_10);
  19073. __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
  19074. goto __pyx_L1_error;
  19075. __pyx_L7_exception_handled:;
  19076. __Pyx_XGIVEREF(__pyx_t_8);
  19077. __Pyx_XGIVEREF(__pyx_t_9);
  19078. __Pyx_XGIVEREF(__pyx_t_10);
  19079. __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
  19080. __pyx_L11_try_end:;
  19081. }
  19082. /* "uvloop/loop.pyx":884
  19083. * return fut
  19084. *
  19085. * cdef _sock_recv(self, fut, sock, n): # <<<<<<<<<<<<<<
  19086. * if UVLOOP_DEBUG:
  19087. * if fut.cancelled():
  19088. */
  19089. /* function exit code */
  19090. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  19091. goto __pyx_L0;
  19092. __pyx_L1_error:;
  19093. __Pyx_XDECREF(__pyx_t_2);
  19094. __Pyx_XDECREF(__pyx_t_3);
  19095. __Pyx_XDECREF(__pyx_t_4);
  19096. __Pyx_XDECREF(__pyx_t_11);
  19097. __Pyx_XDECREF(__pyx_t_12);
  19098. __Pyx_XDECREF(__pyx_t_14);
  19099. __Pyx_AddTraceback("uvloop.loop.Loop._sock_recv", __pyx_clineno, __pyx_lineno, __pyx_filename);
  19100. __pyx_r = 0;
  19101. __pyx_L0:;
  19102. __Pyx_XDECREF(__pyx_v_data);
  19103. __Pyx_XDECREF(__pyx_v_exc);
  19104. __Pyx_XGIVEREF(__pyx_r);
  19105. __Pyx_RefNannyFinishContext();
  19106. return __pyx_r;
  19107. }
  19108. /* "uvloop/loop.pyx":909
  19109. * self._remove_reader(sock)
  19110. *
  19111. * cdef _sock_recv_into(self, fut, sock, buf): # <<<<<<<<<<<<<<
  19112. * if UVLOOP_DEBUG:
  19113. * if fut.cancelled():
  19114. */
  19115. static PyObject *__pyx_f_6uvloop_4loop_4Loop__sock_recv_into(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_fut, PyObject *__pyx_v_sock, PyObject *__pyx_v_buf) {
  19116. PyObject *__pyx_v_data = NULL;
  19117. PyObject *__pyx_v_exc = NULL;
  19118. PyObject *__pyx_r = NULL;
  19119. __Pyx_RefNannyDeclarations
  19120. int __pyx_t_1;
  19121. PyObject *__pyx_t_2 = NULL;
  19122. PyObject *__pyx_t_3 = NULL;
  19123. PyObject *__pyx_t_4 = NULL;
  19124. int __pyx_t_5;
  19125. Py_ssize_t __pyx_t_6;
  19126. Py_UCS4 __pyx_t_7;
  19127. PyObject *__pyx_t_8 = NULL;
  19128. PyObject *__pyx_t_9 = NULL;
  19129. PyObject *__pyx_t_10 = NULL;
  19130. PyObject *__pyx_t_11 = NULL;
  19131. PyObject *__pyx_t_12 = NULL;
  19132. int __pyx_t_13;
  19133. PyObject *__pyx_t_14 = NULL;
  19134. int __pyx_t_15;
  19135. char const *__pyx_t_16;
  19136. PyObject *__pyx_t_17 = NULL;
  19137. PyObject *__pyx_t_18 = NULL;
  19138. PyObject *__pyx_t_19 = NULL;
  19139. PyObject *__pyx_t_20 = NULL;
  19140. PyObject *__pyx_t_21 = NULL;
  19141. PyObject *__pyx_t_22 = NULL;
  19142. __Pyx_RefNannySetupContext("_sock_recv_into", 0);
  19143. /* "uvloop/loop.pyx":910
  19144. *
  19145. * cdef _sock_recv_into(self, fut, sock, buf):
  19146. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  19147. * if fut.cancelled():
  19148. * # Shouldn't happen with _SyncSocketReaderFuture.
  19149. */
  19150. __pyx_t_1 = (UVLOOP_DEBUG != 0);
  19151. if (__pyx_t_1) {
  19152. /* "uvloop/loop.pyx":911
  19153. * cdef _sock_recv_into(self, fut, sock, buf):
  19154. * if UVLOOP_DEBUG:
  19155. * if fut.cancelled(): # <<<<<<<<<<<<<<
  19156. * # Shouldn't happen with _SyncSocketReaderFuture.
  19157. * raise RuntimeError(
  19158. */
  19159. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_fut, __pyx_n_s_cancelled); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 911, __pyx_L1_error)
  19160. __Pyx_GOTREF(__pyx_t_3);
  19161. __pyx_t_4 = NULL;
  19162. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
  19163. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
  19164. if (likely(__pyx_t_4)) {
  19165. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  19166. __Pyx_INCREF(__pyx_t_4);
  19167. __Pyx_INCREF(function);
  19168. __Pyx_DECREF_SET(__pyx_t_3, function);
  19169. }
  19170. }
  19171. __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
  19172. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  19173. if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 911, __pyx_L1_error)
  19174. __Pyx_GOTREF(__pyx_t_2);
  19175. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  19176. __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 911, __pyx_L1_error)
  19177. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  19178. if (unlikely(__pyx_t_1)) {
  19179. /* "uvloop/loop.pyx":913
  19180. * if fut.cancelled():
  19181. * # Shouldn't happen with _SyncSocketReaderFuture.
  19182. * raise RuntimeError( # <<<<<<<<<<<<<<
  19183. * f'_sock_recv_into is called on a cancelled Future')
  19184. *
  19185. */
  19186. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 913, __pyx_L1_error)
  19187. __Pyx_GOTREF(__pyx_t_2);
  19188. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  19189. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  19190. __PYX_ERR(2, 913, __pyx_L1_error)
  19191. /* "uvloop/loop.pyx":911
  19192. * cdef _sock_recv_into(self, fut, sock, buf):
  19193. * if UVLOOP_DEBUG:
  19194. * if fut.cancelled(): # <<<<<<<<<<<<<<
  19195. * # Shouldn't happen with _SyncSocketReaderFuture.
  19196. * raise RuntimeError(
  19197. */
  19198. }
  19199. /* "uvloop/loop.pyx":916
  19200. * f'_sock_recv_into is called on a cancelled Future')
  19201. *
  19202. * if not self._has_reader(sock): # <<<<<<<<<<<<<<
  19203. * raise RuntimeError(
  19204. * f'socket {sock!r} does not have a reader '
  19205. */
  19206. __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_vtab)->_has_reader(__pyx_v_self, __pyx_v_sock); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 916, __pyx_L1_error)
  19207. __Pyx_GOTREF(__pyx_t_2);
  19208. __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 916, __pyx_L1_error)
  19209. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  19210. __pyx_t_5 = ((!__pyx_t_1) != 0);
  19211. if (unlikely(__pyx_t_5)) {
  19212. /* "uvloop/loop.pyx":918
  19213. * if not self._has_reader(sock):
  19214. * raise RuntimeError(
  19215. * f'socket {sock!r} does not have a reader ' # <<<<<<<<<<<<<<
  19216. * f'in the _sock_recv_into callback')
  19217. *
  19218. */
  19219. __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 918, __pyx_L1_error)
  19220. __Pyx_GOTREF(__pyx_t_2);
  19221. __pyx_t_6 = 0;
  19222. __pyx_t_7 = 127;
  19223. __Pyx_INCREF(__pyx_kp_u_socket);
  19224. __pyx_t_6 += 7;
  19225. __Pyx_GIVEREF(__pyx_kp_u_socket);
  19226. PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_socket);
  19227. __pyx_t_3 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_sock), __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 918, __pyx_L1_error)
  19228. __Pyx_GOTREF(__pyx_t_3);
  19229. __pyx_t_7 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) > __pyx_t_7) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) : __pyx_t_7;
  19230. __pyx_t_6 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3);
  19231. __Pyx_GIVEREF(__pyx_t_3);
  19232. PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
  19233. __pyx_t_3 = 0;
  19234. __Pyx_INCREF(__pyx_kp_u_does_not_have_a_reader_in_the_2);
  19235. __pyx_t_6 += 55;
  19236. __Pyx_GIVEREF(__pyx_kp_u_does_not_have_a_reader_in_the_2);
  19237. PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_kp_u_does_not_have_a_reader_in_the_2);
  19238. __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_2, 3, __pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 918, __pyx_L1_error)
  19239. __Pyx_GOTREF(__pyx_t_3);
  19240. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  19241. /* "uvloop/loop.pyx":917
  19242. *
  19243. * if not self._has_reader(sock):
  19244. * raise RuntimeError( # <<<<<<<<<<<<<<
  19245. * f'socket {sock!r} does not have a reader '
  19246. * f'in the _sock_recv_into callback')
  19247. */
  19248. __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 917, __pyx_L1_error)
  19249. __Pyx_GOTREF(__pyx_t_2);
  19250. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  19251. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  19252. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  19253. __PYX_ERR(2, 917, __pyx_L1_error)
  19254. /* "uvloop/loop.pyx":916
  19255. * f'_sock_recv_into is called on a cancelled Future')
  19256. *
  19257. * if not self._has_reader(sock): # <<<<<<<<<<<<<<
  19258. * raise RuntimeError(
  19259. * f'socket {sock!r} does not have a reader '
  19260. */
  19261. }
  19262. /* "uvloop/loop.pyx":910
  19263. *
  19264. * cdef _sock_recv_into(self, fut, sock, buf):
  19265. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  19266. * if fut.cancelled():
  19267. * # Shouldn't happen with _SyncSocketReaderFuture.
  19268. */
  19269. }
  19270. /* "uvloop/loop.pyx":921
  19271. * f'in the _sock_recv_into callback')
  19272. *
  19273. * try: # <<<<<<<<<<<<<<
  19274. * data = sock.recv_into(buf)
  19275. * except (BlockingIOError, InterruptedError):
  19276. */
  19277. {
  19278. __Pyx_PyThreadState_declare
  19279. __Pyx_PyThreadState_assign
  19280. __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
  19281. __Pyx_XGOTREF(__pyx_t_8);
  19282. __Pyx_XGOTREF(__pyx_t_9);
  19283. __Pyx_XGOTREF(__pyx_t_10);
  19284. /*try:*/ {
  19285. /* "uvloop/loop.pyx":922
  19286. *
  19287. * try:
  19288. * data = sock.recv_into(buf) # <<<<<<<<<<<<<<
  19289. * except (BlockingIOError, InterruptedError):
  19290. * # No need to re-add the reader, let's just wait until
  19291. */
  19292. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_sock, __pyx_n_s_recv_into); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 922, __pyx_L6_error)
  19293. __Pyx_GOTREF(__pyx_t_3);
  19294. __pyx_t_4 = NULL;
  19295. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
  19296. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
  19297. if (likely(__pyx_t_4)) {
  19298. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  19299. __Pyx_INCREF(__pyx_t_4);
  19300. __Pyx_INCREF(function);
  19301. __Pyx_DECREF_SET(__pyx_t_3, function);
  19302. }
  19303. }
  19304. __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_buf) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_buf);
  19305. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  19306. if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 922, __pyx_L6_error)
  19307. __Pyx_GOTREF(__pyx_t_2);
  19308. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  19309. __pyx_v_data = __pyx_t_2;
  19310. __pyx_t_2 = 0;
  19311. /* "uvloop/loop.pyx":921
  19312. * f'in the _sock_recv_into callback')
  19313. *
  19314. * try: # <<<<<<<<<<<<<<
  19315. * data = sock.recv_into(buf)
  19316. * except (BlockingIOError, InterruptedError):
  19317. */
  19318. }
  19319. /* "uvloop/loop.pyx":931
  19320. * self._remove_reader(sock)
  19321. * else:
  19322. * fut.set_result(data) # <<<<<<<<<<<<<<
  19323. * self._remove_reader(sock)
  19324. *
  19325. */
  19326. /*else:*/ {
  19327. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_fut, __pyx_n_s_set_result); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 931, __pyx_L8_except_error)
  19328. __Pyx_GOTREF(__pyx_t_3);
  19329. __pyx_t_4 = NULL;
  19330. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
  19331. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
  19332. if (likely(__pyx_t_4)) {
  19333. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  19334. __Pyx_INCREF(__pyx_t_4);
  19335. __Pyx_INCREF(function);
  19336. __Pyx_DECREF_SET(__pyx_t_3, function);
  19337. }
  19338. }
  19339. __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_data) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_data);
  19340. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  19341. if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 931, __pyx_L8_except_error)
  19342. __Pyx_GOTREF(__pyx_t_2);
  19343. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  19344. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  19345. /* "uvloop/loop.pyx":932
  19346. * else:
  19347. * fut.set_result(data)
  19348. * self._remove_reader(sock) # <<<<<<<<<<<<<<
  19349. *
  19350. * cdef _sock_sendall(self, fut, sock, data):
  19351. */
  19352. __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_vtab)->_remove_reader(__pyx_v_self, __pyx_v_sock); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 932, __pyx_L8_except_error)
  19353. __Pyx_GOTREF(__pyx_t_2);
  19354. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  19355. }
  19356. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  19357. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  19358. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  19359. goto __pyx_L11_try_end;
  19360. __pyx_L6_error:;
  19361. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  19362. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  19363. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  19364. /* "uvloop/loop.pyx":923
  19365. * try:
  19366. * data = sock.recv_into(buf)
  19367. * except (BlockingIOError, InterruptedError): # <<<<<<<<<<<<<<
  19368. * # No need to re-add the reader, let's just wait until
  19369. * # the poll handler calls this callback again.
  19370. */
  19371. __Pyx_ErrFetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
  19372. __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_BlockingIOError); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 923, __pyx_L8_except_error)
  19373. __Pyx_GOTREF(__pyx_t_11);
  19374. __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_InterruptedError); if (unlikely(!__pyx_t_12)) __PYX_ERR(2, 923, __pyx_L8_except_error)
  19375. __Pyx_GOTREF(__pyx_t_12);
  19376. __pyx_t_13 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_2, __pyx_t_11) || __Pyx_PyErr_GivenExceptionMatches(__pyx_t_2, __pyx_t_12);
  19377. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  19378. __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  19379. __Pyx_ErrRestore(__pyx_t_2, __pyx_t_3, __pyx_t_4);
  19380. __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_t_4 = 0;
  19381. if (__pyx_t_13) {
  19382. __Pyx_ErrRestore(0,0,0);
  19383. goto __pyx_L7_exception_handled;
  19384. }
  19385. /* "uvloop/loop.pyx":927
  19386. * # the poll handler calls this callback again.
  19387. * pass
  19388. * except Exception as exc: # <<<<<<<<<<<<<<
  19389. * fut.set_exception(exc)
  19390. * self._remove_reader(sock)
  19391. */
  19392. __pyx_t_13 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
  19393. if (__pyx_t_13) {
  19394. __Pyx_AddTraceback("uvloop.loop.Loop._sock_recv_into", __pyx_clineno, __pyx_lineno, __pyx_filename);
  19395. if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2) < 0) __PYX_ERR(2, 927, __pyx_L8_except_error)
  19396. __Pyx_GOTREF(__pyx_t_4);
  19397. __Pyx_GOTREF(__pyx_t_3);
  19398. __Pyx_GOTREF(__pyx_t_2);
  19399. __Pyx_INCREF(__pyx_t_3);
  19400. __pyx_v_exc = __pyx_t_3;
  19401. /*try:*/ {
  19402. /* "uvloop/loop.pyx":928
  19403. * pass
  19404. * except Exception as exc:
  19405. * fut.set_exception(exc) # <<<<<<<<<<<<<<
  19406. * self._remove_reader(sock)
  19407. * else:
  19408. */
  19409. __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_fut, __pyx_n_s_set_exception); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 928, __pyx_L17_error)
  19410. __Pyx_GOTREF(__pyx_t_11);
  19411. __pyx_t_14 = NULL;
  19412. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) {
  19413. __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_11);
  19414. if (likely(__pyx_t_14)) {
  19415. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
  19416. __Pyx_INCREF(__pyx_t_14);
  19417. __Pyx_INCREF(function);
  19418. __Pyx_DECREF_SET(__pyx_t_11, function);
  19419. }
  19420. }
  19421. __pyx_t_12 = (__pyx_t_14) ? __Pyx_PyObject_Call2Args(__pyx_t_11, __pyx_t_14, __pyx_v_exc) : __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_v_exc);
  19422. __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
  19423. if (unlikely(!__pyx_t_12)) __PYX_ERR(2, 928, __pyx_L17_error)
  19424. __Pyx_GOTREF(__pyx_t_12);
  19425. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  19426. __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  19427. /* "uvloop/loop.pyx":929
  19428. * except Exception as exc:
  19429. * fut.set_exception(exc)
  19430. * self._remove_reader(sock) # <<<<<<<<<<<<<<
  19431. * else:
  19432. * fut.set_result(data)
  19433. */
  19434. __pyx_t_12 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_vtab)->_remove_reader(__pyx_v_self, __pyx_v_sock); if (unlikely(!__pyx_t_12)) __PYX_ERR(2, 929, __pyx_L17_error)
  19435. __Pyx_GOTREF(__pyx_t_12);
  19436. __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  19437. }
  19438. /* "uvloop/loop.pyx":927
  19439. * # the poll handler calls this callback again.
  19440. * pass
  19441. * except Exception as exc: # <<<<<<<<<<<<<<
  19442. * fut.set_exception(exc)
  19443. * self._remove_reader(sock)
  19444. */
  19445. /*finally:*/ {
  19446. /*normal exit:*/{
  19447. __Pyx_DECREF(__pyx_v_exc);
  19448. __pyx_v_exc = NULL;
  19449. goto __pyx_L18;
  19450. }
  19451. __pyx_L17_error:;
  19452. /*exception exit:*/{
  19453. __Pyx_PyThreadState_declare
  19454. __Pyx_PyThreadState_assign
  19455. __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
  19456. __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
  19457. __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
  19458. __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
  19459. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22);
  19460. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19) < 0)) __Pyx_ErrFetch(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19);
  19461. __Pyx_XGOTREF(__pyx_t_17);
  19462. __Pyx_XGOTREF(__pyx_t_18);
  19463. __Pyx_XGOTREF(__pyx_t_19);
  19464. __Pyx_XGOTREF(__pyx_t_20);
  19465. __Pyx_XGOTREF(__pyx_t_21);
  19466. __Pyx_XGOTREF(__pyx_t_22);
  19467. __pyx_t_13 = __pyx_lineno; __pyx_t_15 = __pyx_clineno; __pyx_t_16 = __pyx_filename;
  19468. {
  19469. __Pyx_DECREF(__pyx_v_exc);
  19470. __pyx_v_exc = NULL;
  19471. }
  19472. if (PY_MAJOR_VERSION >= 3) {
  19473. __Pyx_XGIVEREF(__pyx_t_20);
  19474. __Pyx_XGIVEREF(__pyx_t_21);
  19475. __Pyx_XGIVEREF(__pyx_t_22);
  19476. __Pyx_ExceptionReset(__pyx_t_20, __pyx_t_21, __pyx_t_22);
  19477. }
  19478. __Pyx_XGIVEREF(__pyx_t_17);
  19479. __Pyx_XGIVEREF(__pyx_t_18);
  19480. __Pyx_XGIVEREF(__pyx_t_19);
  19481. __Pyx_ErrRestore(__pyx_t_17, __pyx_t_18, __pyx_t_19);
  19482. __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
  19483. __pyx_lineno = __pyx_t_13; __pyx_clineno = __pyx_t_15; __pyx_filename = __pyx_t_16;
  19484. goto __pyx_L8_except_error;
  19485. }
  19486. __pyx_L18:;
  19487. }
  19488. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  19489. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  19490. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  19491. goto __pyx_L7_exception_handled;
  19492. }
  19493. goto __pyx_L8_except_error;
  19494. __pyx_L8_except_error:;
  19495. /* "uvloop/loop.pyx":921
  19496. * f'in the _sock_recv_into callback')
  19497. *
  19498. * try: # <<<<<<<<<<<<<<
  19499. * data = sock.recv_into(buf)
  19500. * except (BlockingIOError, InterruptedError):
  19501. */
  19502. __Pyx_XGIVEREF(__pyx_t_8);
  19503. __Pyx_XGIVEREF(__pyx_t_9);
  19504. __Pyx_XGIVEREF(__pyx_t_10);
  19505. __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
  19506. goto __pyx_L1_error;
  19507. __pyx_L7_exception_handled:;
  19508. __Pyx_XGIVEREF(__pyx_t_8);
  19509. __Pyx_XGIVEREF(__pyx_t_9);
  19510. __Pyx_XGIVEREF(__pyx_t_10);
  19511. __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
  19512. __pyx_L11_try_end:;
  19513. }
  19514. /* "uvloop/loop.pyx":909
  19515. * self._remove_reader(sock)
  19516. *
  19517. * cdef _sock_recv_into(self, fut, sock, buf): # <<<<<<<<<<<<<<
  19518. * if UVLOOP_DEBUG:
  19519. * if fut.cancelled():
  19520. */
  19521. /* function exit code */
  19522. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  19523. goto __pyx_L0;
  19524. __pyx_L1_error:;
  19525. __Pyx_XDECREF(__pyx_t_2);
  19526. __Pyx_XDECREF(__pyx_t_3);
  19527. __Pyx_XDECREF(__pyx_t_4);
  19528. __Pyx_XDECREF(__pyx_t_11);
  19529. __Pyx_XDECREF(__pyx_t_12);
  19530. __Pyx_XDECREF(__pyx_t_14);
  19531. __Pyx_AddTraceback("uvloop.loop.Loop._sock_recv_into", __pyx_clineno, __pyx_lineno, __pyx_filename);
  19532. __pyx_r = 0;
  19533. __pyx_L0:;
  19534. __Pyx_XDECREF(__pyx_v_data);
  19535. __Pyx_XDECREF(__pyx_v_exc);
  19536. __Pyx_XGIVEREF(__pyx_r);
  19537. __Pyx_RefNannyFinishContext();
  19538. return __pyx_r;
  19539. }
  19540. /* "uvloop/loop.pyx":934
  19541. * self._remove_reader(sock)
  19542. *
  19543. * cdef _sock_sendall(self, fut, sock, data): # <<<<<<<<<<<<<<
  19544. * cdef:
  19545. * Handle handle
  19546. */
  19547. static PyObject *__pyx_f_6uvloop_4loop_4Loop__sock_sendall(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_fut, PyObject *__pyx_v_sock, PyObject *__pyx_v_data) {
  19548. struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_handle = 0;
  19549. int __pyx_v_n;
  19550. PyObject *__pyx_v_exc = NULL;
  19551. PyObject *__pyx_r = NULL;
  19552. __Pyx_RefNannyDeclarations
  19553. int __pyx_t_1;
  19554. PyObject *__pyx_t_2 = NULL;
  19555. PyObject *__pyx_t_3 = NULL;
  19556. PyObject *__pyx_t_4 = NULL;
  19557. int __pyx_t_5;
  19558. Py_ssize_t __pyx_t_6;
  19559. Py_UCS4 __pyx_t_7;
  19560. PyObject *__pyx_t_8 = NULL;
  19561. PyObject *__pyx_t_9 = NULL;
  19562. PyObject *__pyx_t_10 = NULL;
  19563. int __pyx_t_11;
  19564. PyObject *__pyx_t_12 = NULL;
  19565. PyObject *__pyx_t_13 = NULL;
  19566. PyObject *__pyx_t_14 = NULL;
  19567. int __pyx_t_15;
  19568. char const *__pyx_t_16;
  19569. PyObject *__pyx_t_17 = NULL;
  19570. PyObject *__pyx_t_18 = NULL;
  19571. PyObject *__pyx_t_19 = NULL;
  19572. PyObject *__pyx_t_20 = NULL;
  19573. PyObject *__pyx_t_21 = NULL;
  19574. PyObject *__pyx_t_22 = NULL;
  19575. __Pyx_RefNannySetupContext("_sock_sendall", 0);
  19576. __Pyx_INCREF(__pyx_v_data);
  19577. /* "uvloop/loop.pyx":939
  19578. * int n
  19579. *
  19580. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  19581. * if fut.cancelled():
  19582. * # Shouldn't happen with _SyncSocketReaderFuture.
  19583. */
  19584. __pyx_t_1 = (UVLOOP_DEBUG != 0);
  19585. if (__pyx_t_1) {
  19586. /* "uvloop/loop.pyx":940
  19587. *
  19588. * if UVLOOP_DEBUG:
  19589. * if fut.cancelled(): # <<<<<<<<<<<<<<
  19590. * # Shouldn't happen with _SyncSocketReaderFuture.
  19591. * raise RuntimeError(
  19592. */
  19593. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_fut, __pyx_n_s_cancelled); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 940, __pyx_L1_error)
  19594. __Pyx_GOTREF(__pyx_t_3);
  19595. __pyx_t_4 = NULL;
  19596. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
  19597. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
  19598. if (likely(__pyx_t_4)) {
  19599. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  19600. __Pyx_INCREF(__pyx_t_4);
  19601. __Pyx_INCREF(function);
  19602. __Pyx_DECREF_SET(__pyx_t_3, function);
  19603. }
  19604. }
  19605. __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
  19606. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  19607. if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 940, __pyx_L1_error)
  19608. __Pyx_GOTREF(__pyx_t_2);
  19609. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  19610. __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 940, __pyx_L1_error)
  19611. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  19612. if (unlikely(__pyx_t_1)) {
  19613. /* "uvloop/loop.pyx":942
  19614. * if fut.cancelled():
  19615. * # Shouldn't happen with _SyncSocketReaderFuture.
  19616. * raise RuntimeError( # <<<<<<<<<<<<<<
  19617. * f'_sock_sendall is called on a cancelled Future')
  19618. *
  19619. */
  19620. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 942, __pyx_L1_error)
  19621. __Pyx_GOTREF(__pyx_t_2);
  19622. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  19623. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  19624. __PYX_ERR(2, 942, __pyx_L1_error)
  19625. /* "uvloop/loop.pyx":940
  19626. *
  19627. * if UVLOOP_DEBUG:
  19628. * if fut.cancelled(): # <<<<<<<<<<<<<<
  19629. * # Shouldn't happen with _SyncSocketReaderFuture.
  19630. * raise RuntimeError(
  19631. */
  19632. }
  19633. /* "uvloop/loop.pyx":945
  19634. * f'_sock_sendall is called on a cancelled Future')
  19635. *
  19636. * if not self._has_writer(sock): # <<<<<<<<<<<<<<
  19637. * raise RuntimeError(
  19638. * f'socket {sock!r} does not have a writer '
  19639. */
  19640. __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_vtab)->_has_writer(__pyx_v_self, __pyx_v_sock); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 945, __pyx_L1_error)
  19641. __Pyx_GOTREF(__pyx_t_2);
  19642. __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 945, __pyx_L1_error)
  19643. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  19644. __pyx_t_5 = ((!__pyx_t_1) != 0);
  19645. if (unlikely(__pyx_t_5)) {
  19646. /* "uvloop/loop.pyx":947
  19647. * if not self._has_writer(sock):
  19648. * raise RuntimeError(
  19649. * f'socket {sock!r} does not have a writer ' # <<<<<<<<<<<<<<
  19650. * f'in the _sock_sendall callback')
  19651. *
  19652. */
  19653. __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 947, __pyx_L1_error)
  19654. __Pyx_GOTREF(__pyx_t_2);
  19655. __pyx_t_6 = 0;
  19656. __pyx_t_7 = 127;
  19657. __Pyx_INCREF(__pyx_kp_u_socket);
  19658. __pyx_t_6 += 7;
  19659. __Pyx_GIVEREF(__pyx_kp_u_socket);
  19660. PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_socket);
  19661. __pyx_t_3 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_sock), __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 947, __pyx_L1_error)
  19662. __Pyx_GOTREF(__pyx_t_3);
  19663. __pyx_t_7 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) > __pyx_t_7) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) : __pyx_t_7;
  19664. __pyx_t_6 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3);
  19665. __Pyx_GIVEREF(__pyx_t_3);
  19666. PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
  19667. __pyx_t_3 = 0;
  19668. __Pyx_INCREF(__pyx_kp_u_does_not_have_a_writer_in_the);
  19669. __pyx_t_6 += 53;
  19670. __Pyx_GIVEREF(__pyx_kp_u_does_not_have_a_writer_in_the);
  19671. PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_kp_u_does_not_have_a_writer_in_the);
  19672. __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_2, 3, __pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 947, __pyx_L1_error)
  19673. __Pyx_GOTREF(__pyx_t_3);
  19674. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  19675. /* "uvloop/loop.pyx":946
  19676. *
  19677. * if not self._has_writer(sock):
  19678. * raise RuntimeError( # <<<<<<<<<<<<<<
  19679. * f'socket {sock!r} does not have a writer '
  19680. * f'in the _sock_sendall callback')
  19681. */
  19682. __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 946, __pyx_L1_error)
  19683. __Pyx_GOTREF(__pyx_t_2);
  19684. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  19685. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  19686. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  19687. __PYX_ERR(2, 946, __pyx_L1_error)
  19688. /* "uvloop/loop.pyx":945
  19689. * f'_sock_sendall is called on a cancelled Future')
  19690. *
  19691. * if not self._has_writer(sock): # <<<<<<<<<<<<<<
  19692. * raise RuntimeError(
  19693. * f'socket {sock!r} does not have a writer '
  19694. */
  19695. }
  19696. /* "uvloop/loop.pyx":939
  19697. * int n
  19698. *
  19699. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  19700. * if fut.cancelled():
  19701. * # Shouldn't happen with _SyncSocketReaderFuture.
  19702. */
  19703. }
  19704. /* "uvloop/loop.pyx":950
  19705. * f'in the _sock_sendall callback')
  19706. *
  19707. * try: # <<<<<<<<<<<<<<
  19708. * n = sock.send(data)
  19709. * except (BlockingIOError, InterruptedError):
  19710. */
  19711. {
  19712. __Pyx_PyThreadState_declare
  19713. __Pyx_PyThreadState_assign
  19714. __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
  19715. __Pyx_XGOTREF(__pyx_t_8);
  19716. __Pyx_XGOTREF(__pyx_t_9);
  19717. __Pyx_XGOTREF(__pyx_t_10);
  19718. /*try:*/ {
  19719. /* "uvloop/loop.pyx":951
  19720. *
  19721. * try:
  19722. * n = sock.send(data) # <<<<<<<<<<<<<<
  19723. * except (BlockingIOError, InterruptedError):
  19724. * # Try next time.
  19725. */
  19726. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_sock, __pyx_n_s_send); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 951, __pyx_L6_error)
  19727. __Pyx_GOTREF(__pyx_t_3);
  19728. __pyx_t_4 = NULL;
  19729. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
  19730. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
  19731. if (likely(__pyx_t_4)) {
  19732. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  19733. __Pyx_INCREF(__pyx_t_4);
  19734. __Pyx_INCREF(function);
  19735. __Pyx_DECREF_SET(__pyx_t_3, function);
  19736. }
  19737. }
  19738. __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_data) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_data);
  19739. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  19740. if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 951, __pyx_L6_error)
  19741. __Pyx_GOTREF(__pyx_t_2);
  19742. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  19743. __pyx_t_11 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 951, __pyx_L6_error)
  19744. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  19745. __pyx_v_n = __pyx_t_11;
  19746. /* "uvloop/loop.pyx":950
  19747. * f'in the _sock_sendall callback')
  19748. *
  19749. * try: # <<<<<<<<<<<<<<
  19750. * n = sock.send(data)
  19751. * except (BlockingIOError, InterruptedError):
  19752. */
  19753. }
  19754. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  19755. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  19756. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  19757. goto __pyx_L11_try_end;
  19758. __pyx_L6_error:;
  19759. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  19760. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  19761. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  19762. /* "uvloop/loop.pyx":952
  19763. * try:
  19764. * n = sock.send(data)
  19765. * except (BlockingIOError, InterruptedError): # <<<<<<<<<<<<<<
  19766. * # Try next time.
  19767. * return
  19768. */
  19769. __Pyx_ErrFetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
  19770. __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_BlockingIOError); if (unlikely(!__pyx_t_12)) __PYX_ERR(2, 952, __pyx_L8_except_error)
  19771. __Pyx_GOTREF(__pyx_t_12);
  19772. __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_n_s_InterruptedError); if (unlikely(!__pyx_t_13)) __PYX_ERR(2, 952, __pyx_L8_except_error)
  19773. __Pyx_GOTREF(__pyx_t_13);
  19774. __pyx_t_11 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_2, __pyx_t_12) || __Pyx_PyErr_GivenExceptionMatches(__pyx_t_2, __pyx_t_13);
  19775. __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  19776. __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  19777. __Pyx_ErrRestore(__pyx_t_2, __pyx_t_3, __pyx_t_4);
  19778. __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_t_4 = 0;
  19779. if (__pyx_t_11) {
  19780. __Pyx_AddTraceback("uvloop.loop.Loop._sock_sendall", __pyx_clineno, __pyx_lineno, __pyx_filename);
  19781. if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2) < 0) __PYX_ERR(2, 952, __pyx_L8_except_error)
  19782. __Pyx_GOTREF(__pyx_t_4);
  19783. __Pyx_GOTREF(__pyx_t_3);
  19784. __Pyx_GOTREF(__pyx_t_2);
  19785. /* "uvloop/loop.pyx":954
  19786. * except (BlockingIOError, InterruptedError):
  19787. * # Try next time.
  19788. * return # <<<<<<<<<<<<<<
  19789. * except Exception as exc:
  19790. * fut.set_exception(exc)
  19791. */
  19792. __Pyx_XDECREF(__pyx_r);
  19793. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  19794. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  19795. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  19796. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  19797. goto __pyx_L9_except_return;
  19798. }
  19799. /* "uvloop/loop.pyx":955
  19800. * # Try next time.
  19801. * return
  19802. * except Exception as exc: # <<<<<<<<<<<<<<
  19803. * fut.set_exception(exc)
  19804. * self._remove_writer(sock)
  19805. */
  19806. __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
  19807. if (__pyx_t_11) {
  19808. __Pyx_AddTraceback("uvloop.loop.Loop._sock_sendall", __pyx_clineno, __pyx_lineno, __pyx_filename);
  19809. if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4) < 0) __PYX_ERR(2, 955, __pyx_L8_except_error)
  19810. __Pyx_GOTREF(__pyx_t_2);
  19811. __Pyx_GOTREF(__pyx_t_3);
  19812. __Pyx_GOTREF(__pyx_t_4);
  19813. __Pyx_INCREF(__pyx_t_3);
  19814. __pyx_v_exc = __pyx_t_3;
  19815. /*try:*/ {
  19816. /* "uvloop/loop.pyx":956
  19817. * return
  19818. * except Exception as exc:
  19819. * fut.set_exception(exc) # <<<<<<<<<<<<<<
  19820. * self._remove_writer(sock)
  19821. * return
  19822. */
  19823. __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_fut, __pyx_n_s_set_exception); if (unlikely(!__pyx_t_12)) __PYX_ERR(2, 956, __pyx_L19_error)
  19824. __Pyx_GOTREF(__pyx_t_12);
  19825. __pyx_t_14 = NULL;
  19826. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_12))) {
  19827. __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_12);
  19828. if (likely(__pyx_t_14)) {
  19829. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
  19830. __Pyx_INCREF(__pyx_t_14);
  19831. __Pyx_INCREF(function);
  19832. __Pyx_DECREF_SET(__pyx_t_12, function);
  19833. }
  19834. }
  19835. __pyx_t_13 = (__pyx_t_14) ? __Pyx_PyObject_Call2Args(__pyx_t_12, __pyx_t_14, __pyx_v_exc) : __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_v_exc);
  19836. __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
  19837. if (unlikely(!__pyx_t_13)) __PYX_ERR(2, 956, __pyx_L19_error)
  19838. __Pyx_GOTREF(__pyx_t_13);
  19839. __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  19840. __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  19841. /* "uvloop/loop.pyx":957
  19842. * except Exception as exc:
  19843. * fut.set_exception(exc)
  19844. * self._remove_writer(sock) # <<<<<<<<<<<<<<
  19845. * return
  19846. *
  19847. */
  19848. __pyx_t_13 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_vtab)->_remove_writer(__pyx_v_self, __pyx_v_sock); if (unlikely(!__pyx_t_13)) __PYX_ERR(2, 957, __pyx_L19_error)
  19849. __Pyx_GOTREF(__pyx_t_13);
  19850. __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  19851. /* "uvloop/loop.pyx":958
  19852. * fut.set_exception(exc)
  19853. * self._remove_writer(sock)
  19854. * return # <<<<<<<<<<<<<<
  19855. *
  19856. * self._remove_writer(sock)
  19857. */
  19858. __Pyx_XDECREF(__pyx_r);
  19859. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  19860. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  19861. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  19862. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  19863. goto __pyx_L18_return;
  19864. }
  19865. /* "uvloop/loop.pyx":955
  19866. * # Try next time.
  19867. * return
  19868. * except Exception as exc: # <<<<<<<<<<<<<<
  19869. * fut.set_exception(exc)
  19870. * self._remove_writer(sock)
  19871. */
  19872. /*finally:*/ {
  19873. __pyx_L19_error:;
  19874. /*exception exit:*/{
  19875. __Pyx_PyThreadState_declare
  19876. __Pyx_PyThreadState_assign
  19877. __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
  19878. __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
  19879. __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
  19880. __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
  19881. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22);
  19882. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19) < 0)) __Pyx_ErrFetch(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19);
  19883. __Pyx_XGOTREF(__pyx_t_17);
  19884. __Pyx_XGOTREF(__pyx_t_18);
  19885. __Pyx_XGOTREF(__pyx_t_19);
  19886. __Pyx_XGOTREF(__pyx_t_20);
  19887. __Pyx_XGOTREF(__pyx_t_21);
  19888. __Pyx_XGOTREF(__pyx_t_22);
  19889. __pyx_t_11 = __pyx_lineno; __pyx_t_15 = __pyx_clineno; __pyx_t_16 = __pyx_filename;
  19890. {
  19891. __Pyx_DECREF(__pyx_v_exc);
  19892. __pyx_v_exc = NULL;
  19893. }
  19894. if (PY_MAJOR_VERSION >= 3) {
  19895. __Pyx_XGIVEREF(__pyx_t_20);
  19896. __Pyx_XGIVEREF(__pyx_t_21);
  19897. __Pyx_XGIVEREF(__pyx_t_22);
  19898. __Pyx_ExceptionReset(__pyx_t_20, __pyx_t_21, __pyx_t_22);
  19899. }
  19900. __Pyx_XGIVEREF(__pyx_t_17);
  19901. __Pyx_XGIVEREF(__pyx_t_18);
  19902. __Pyx_XGIVEREF(__pyx_t_19);
  19903. __Pyx_ErrRestore(__pyx_t_17, __pyx_t_18, __pyx_t_19);
  19904. __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
  19905. __pyx_lineno = __pyx_t_11; __pyx_clineno = __pyx_t_15; __pyx_filename = __pyx_t_16;
  19906. goto __pyx_L8_except_error;
  19907. }
  19908. __pyx_L18_return: {
  19909. __pyx_t_22 = __pyx_r;
  19910. __pyx_r = 0;
  19911. __Pyx_DECREF(__pyx_v_exc);
  19912. __pyx_v_exc = NULL;
  19913. __pyx_r = __pyx_t_22;
  19914. __pyx_t_22 = 0;
  19915. goto __pyx_L9_except_return;
  19916. }
  19917. }
  19918. }
  19919. goto __pyx_L8_except_error;
  19920. __pyx_L8_except_error:;
  19921. /* "uvloop/loop.pyx":950
  19922. * f'in the _sock_sendall callback')
  19923. *
  19924. * try: # <<<<<<<<<<<<<<
  19925. * n = sock.send(data)
  19926. * except (BlockingIOError, InterruptedError):
  19927. */
  19928. __Pyx_XGIVEREF(__pyx_t_8);
  19929. __Pyx_XGIVEREF(__pyx_t_9);
  19930. __Pyx_XGIVEREF(__pyx_t_10);
  19931. __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
  19932. goto __pyx_L1_error;
  19933. __pyx_L9_except_return:;
  19934. __Pyx_XGIVEREF(__pyx_t_8);
  19935. __Pyx_XGIVEREF(__pyx_t_9);
  19936. __Pyx_XGIVEREF(__pyx_t_10);
  19937. __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
  19938. goto __pyx_L0;
  19939. __pyx_L11_try_end:;
  19940. }
  19941. /* "uvloop/loop.pyx":960
  19942. * return
  19943. *
  19944. * self._remove_writer(sock) # <<<<<<<<<<<<<<
  19945. *
  19946. * if n == len(data):
  19947. */
  19948. __pyx_t_4 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_vtab)->_remove_writer(__pyx_v_self, __pyx_v_sock); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 960, __pyx_L1_error)
  19949. __Pyx_GOTREF(__pyx_t_4);
  19950. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  19951. /* "uvloop/loop.pyx":962
  19952. * self._remove_writer(sock)
  19953. *
  19954. * if n == len(data): # <<<<<<<<<<<<<<
  19955. * fut.set_result(None)
  19956. * else:
  19957. */
  19958. __pyx_t_6 = PyObject_Length(__pyx_v_data); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(2, 962, __pyx_L1_error)
  19959. __pyx_t_5 = ((__pyx_v_n == __pyx_t_6) != 0);
  19960. if (__pyx_t_5) {
  19961. /* "uvloop/loop.pyx":963
  19962. *
  19963. * if n == len(data):
  19964. * fut.set_result(None) # <<<<<<<<<<<<<<
  19965. * else:
  19966. * if n:
  19967. */
  19968. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_fut, __pyx_n_s_set_result); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 963, __pyx_L1_error)
  19969. __Pyx_GOTREF(__pyx_t_3);
  19970. __pyx_t_2 = NULL;
  19971. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
  19972. __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
  19973. if (likely(__pyx_t_2)) {
  19974. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  19975. __Pyx_INCREF(__pyx_t_2);
  19976. __Pyx_INCREF(function);
  19977. __Pyx_DECREF_SET(__pyx_t_3, function);
  19978. }
  19979. }
  19980. __pyx_t_4 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, Py_None) : __Pyx_PyObject_CallOneArg(__pyx_t_3, Py_None);
  19981. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  19982. if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 963, __pyx_L1_error)
  19983. __Pyx_GOTREF(__pyx_t_4);
  19984. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  19985. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  19986. /* "uvloop/loop.pyx":962
  19987. * self._remove_writer(sock)
  19988. *
  19989. * if n == len(data): # <<<<<<<<<<<<<<
  19990. * fut.set_result(None)
  19991. * else:
  19992. */
  19993. goto __pyx_L25;
  19994. }
  19995. /* "uvloop/loop.pyx":965
  19996. * fut.set_result(None)
  19997. * else:
  19998. * if n: # <<<<<<<<<<<<<<
  19999. * if not isinstance(data, memoryview):
  20000. * data = memoryview(data)
  20001. */
  20002. /*else*/ {
  20003. __pyx_t_5 = (__pyx_v_n != 0);
  20004. if (__pyx_t_5) {
  20005. /* "uvloop/loop.pyx":966
  20006. * else:
  20007. * if n:
  20008. * if not isinstance(data, memoryview): # <<<<<<<<<<<<<<
  20009. * data = memoryview(data)
  20010. * data = data[n:]
  20011. */
  20012. __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_memoryview); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 966, __pyx_L1_error)
  20013. __Pyx_GOTREF(__pyx_t_4);
  20014. __pyx_t_5 = PyObject_IsInstance(__pyx_v_data, __pyx_t_4); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(2, 966, __pyx_L1_error)
  20015. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  20016. __pyx_t_1 = ((!(__pyx_t_5 != 0)) != 0);
  20017. if (__pyx_t_1) {
  20018. /* "uvloop/loop.pyx":967
  20019. * if n:
  20020. * if not isinstance(data, memoryview):
  20021. * data = memoryview(data) # <<<<<<<<<<<<<<
  20022. * data = data[n:]
  20023. *
  20024. */
  20025. __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_memoryview); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 967, __pyx_L1_error)
  20026. __Pyx_GOTREF(__pyx_t_4);
  20027. __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 967, __pyx_L1_error)
  20028. __Pyx_GOTREF(__pyx_t_3);
  20029. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  20030. __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_3);
  20031. __pyx_t_3 = 0;
  20032. /* "uvloop/loop.pyx":966
  20033. * else:
  20034. * if n:
  20035. * if not isinstance(data, memoryview): # <<<<<<<<<<<<<<
  20036. * data = memoryview(data)
  20037. * data = data[n:]
  20038. */
  20039. }
  20040. /* "uvloop/loop.pyx":968
  20041. * if not isinstance(data, memoryview):
  20042. * data = memoryview(data)
  20043. * data = data[n:] # <<<<<<<<<<<<<<
  20044. *
  20045. * handle = new_MethodHandle3(
  20046. */
  20047. __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_v_data, __pyx_v_n, 0, NULL, NULL, NULL, 1, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 968, __pyx_L1_error)
  20048. __Pyx_GOTREF(__pyx_t_3);
  20049. __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_3);
  20050. __pyx_t_3 = 0;
  20051. /* "uvloop/loop.pyx":965
  20052. * fut.set_result(None)
  20053. * else:
  20054. * if n: # <<<<<<<<<<<<<<
  20055. * if not isinstance(data, memoryview):
  20056. * data = memoryview(data)
  20057. */
  20058. }
  20059. /* "uvloop/loop.pyx":970
  20060. * data = data[n:]
  20061. *
  20062. * handle = new_MethodHandle3( # <<<<<<<<<<<<<<
  20063. * self,
  20064. * "Loop._sock_sendall",
  20065. */
  20066. __pyx_t_3 = __pyx_f_6uvloop_4loop_new_MethodHandle3(__pyx_v_self, __pyx_kp_u_Loop__sock_sendall, ((__pyx_t_6uvloop_4loop_method3_t)((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_vtab)->_sock_sendall), ((PyObject *)__pyx_v_self), __pyx_v_fut, __pyx_v_sock, __pyx_v_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 970, __pyx_L1_error)
  20067. __Pyx_GOTREF(__pyx_t_3);
  20068. if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6uvloop_4loop_Handle))))) __PYX_ERR(2, 970, __pyx_L1_error)
  20069. __pyx_v_handle = ((struct __pyx_obj_6uvloop_4loop_Handle *)__pyx_t_3);
  20070. __pyx_t_3 = 0;
  20071. /* "uvloop/loop.pyx":977
  20072. * fut, sock, data)
  20073. *
  20074. * self._add_writer(sock, handle) # <<<<<<<<<<<<<<
  20075. *
  20076. * cdef _sock_accept(self, fut, sock):
  20077. */
  20078. __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_vtab)->_add_writer(__pyx_v_self, __pyx_v_sock, __pyx_v_handle); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 977, __pyx_L1_error)
  20079. __Pyx_GOTREF(__pyx_t_3);
  20080. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  20081. }
  20082. __pyx_L25:;
  20083. /* "uvloop/loop.pyx":934
  20084. * self._remove_reader(sock)
  20085. *
  20086. * cdef _sock_sendall(self, fut, sock, data): # <<<<<<<<<<<<<<
  20087. * cdef:
  20088. * Handle handle
  20089. */
  20090. /* function exit code */
  20091. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  20092. goto __pyx_L0;
  20093. __pyx_L1_error:;
  20094. __Pyx_XDECREF(__pyx_t_2);
  20095. __Pyx_XDECREF(__pyx_t_3);
  20096. __Pyx_XDECREF(__pyx_t_4);
  20097. __Pyx_XDECREF(__pyx_t_12);
  20098. __Pyx_XDECREF(__pyx_t_13);
  20099. __Pyx_XDECREF(__pyx_t_14);
  20100. __Pyx_AddTraceback("uvloop.loop.Loop._sock_sendall", __pyx_clineno, __pyx_lineno, __pyx_filename);
  20101. __pyx_r = 0;
  20102. __pyx_L0:;
  20103. __Pyx_XDECREF((PyObject *)__pyx_v_handle);
  20104. __Pyx_XDECREF(__pyx_v_exc);
  20105. __Pyx_XDECREF(__pyx_v_data);
  20106. __Pyx_XGIVEREF(__pyx_r);
  20107. __Pyx_RefNannyFinishContext();
  20108. return __pyx_r;
  20109. }
  20110. /* "uvloop/loop.pyx":979
  20111. * self._add_writer(sock, handle)
  20112. *
  20113. * cdef _sock_accept(self, fut, sock): # <<<<<<<<<<<<<<
  20114. * try:
  20115. * conn, address = sock.accept()
  20116. */
  20117. static PyObject *__pyx_f_6uvloop_4loop_4Loop__sock_accept(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_fut, PyObject *__pyx_v_sock) {
  20118. PyObject *__pyx_v_conn = NULL;
  20119. PyObject *__pyx_v_address = NULL;
  20120. PyObject *__pyx_v_exc = NULL;
  20121. PyObject *__pyx_r = NULL;
  20122. __Pyx_RefNannyDeclarations
  20123. PyObject *__pyx_t_1 = NULL;
  20124. PyObject *__pyx_t_2 = NULL;
  20125. PyObject *__pyx_t_3 = NULL;
  20126. PyObject *__pyx_t_4 = NULL;
  20127. PyObject *__pyx_t_5 = NULL;
  20128. PyObject *__pyx_t_6 = NULL;
  20129. PyObject *__pyx_t_7 = NULL;
  20130. PyObject *(*__pyx_t_8)(PyObject *);
  20131. PyObject *__pyx_t_9 = NULL;
  20132. int __pyx_t_10;
  20133. PyObject *__pyx_t_11 = NULL;
  20134. int __pyx_t_12;
  20135. char const *__pyx_t_13;
  20136. PyObject *__pyx_t_14 = NULL;
  20137. PyObject *__pyx_t_15 = NULL;
  20138. PyObject *__pyx_t_16 = NULL;
  20139. PyObject *__pyx_t_17 = NULL;
  20140. PyObject *__pyx_t_18 = NULL;
  20141. PyObject *__pyx_t_19 = NULL;
  20142. __Pyx_RefNannySetupContext("_sock_accept", 0);
  20143. /* "uvloop/loop.pyx":980
  20144. *
  20145. * cdef _sock_accept(self, fut, sock):
  20146. * try: # <<<<<<<<<<<<<<
  20147. * conn, address = sock.accept()
  20148. * conn.setblocking(False)
  20149. */
  20150. {
  20151. __Pyx_PyThreadState_declare
  20152. __Pyx_PyThreadState_assign
  20153. __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
  20154. __Pyx_XGOTREF(__pyx_t_1);
  20155. __Pyx_XGOTREF(__pyx_t_2);
  20156. __Pyx_XGOTREF(__pyx_t_3);
  20157. /*try:*/ {
  20158. /* "uvloop/loop.pyx":981
  20159. * cdef _sock_accept(self, fut, sock):
  20160. * try:
  20161. * conn, address = sock.accept() # <<<<<<<<<<<<<<
  20162. * conn.setblocking(False)
  20163. * except (BlockingIOError, InterruptedError):
  20164. */
  20165. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_sock, __pyx_n_s_accept); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 981, __pyx_L3_error)
  20166. __Pyx_GOTREF(__pyx_t_5);
  20167. __pyx_t_6 = NULL;
  20168. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
  20169. __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
  20170. if (likely(__pyx_t_6)) {
  20171. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
  20172. __Pyx_INCREF(__pyx_t_6);
  20173. __Pyx_INCREF(function);
  20174. __Pyx_DECREF_SET(__pyx_t_5, function);
  20175. }
  20176. }
  20177. __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
  20178. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  20179. if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 981, __pyx_L3_error)
  20180. __Pyx_GOTREF(__pyx_t_4);
  20181. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  20182. if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
  20183. PyObject* sequence = __pyx_t_4;
  20184. Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
  20185. if (unlikely(size != 2)) {
  20186. if (size > 2) __Pyx_RaiseTooManyValuesError(2);
  20187. else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
  20188. __PYX_ERR(2, 981, __pyx_L3_error)
  20189. }
  20190. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  20191. if (likely(PyTuple_CheckExact(sequence))) {
  20192. __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0);
  20193. __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1);
  20194. } else {
  20195. __pyx_t_5 = PyList_GET_ITEM(sequence, 0);
  20196. __pyx_t_6 = PyList_GET_ITEM(sequence, 1);
  20197. }
  20198. __Pyx_INCREF(__pyx_t_5);
  20199. __Pyx_INCREF(__pyx_t_6);
  20200. #else
  20201. __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 981, __pyx_L3_error)
  20202. __Pyx_GOTREF(__pyx_t_5);
  20203. __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 981, __pyx_L3_error)
  20204. __Pyx_GOTREF(__pyx_t_6);
  20205. #endif
  20206. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  20207. } else {
  20208. Py_ssize_t index = -1;
  20209. __pyx_t_7 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 981, __pyx_L3_error)
  20210. __Pyx_GOTREF(__pyx_t_7);
  20211. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  20212. __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext;
  20213. index = 0; __pyx_t_5 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_5)) goto __pyx_L9_unpacking_failed;
  20214. __Pyx_GOTREF(__pyx_t_5);
  20215. index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L9_unpacking_failed;
  20216. __Pyx_GOTREF(__pyx_t_6);
  20217. if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(2, 981, __pyx_L3_error)
  20218. __pyx_t_8 = NULL;
  20219. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  20220. goto __pyx_L10_unpacking_done;
  20221. __pyx_L9_unpacking_failed:;
  20222. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  20223. __pyx_t_8 = NULL;
  20224. if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
  20225. __PYX_ERR(2, 981, __pyx_L3_error)
  20226. __pyx_L10_unpacking_done:;
  20227. }
  20228. __pyx_v_conn = __pyx_t_5;
  20229. __pyx_t_5 = 0;
  20230. __pyx_v_address = __pyx_t_6;
  20231. __pyx_t_6 = 0;
  20232. /* "uvloop/loop.pyx":982
  20233. * try:
  20234. * conn, address = sock.accept()
  20235. * conn.setblocking(False) # <<<<<<<<<<<<<<
  20236. * except (BlockingIOError, InterruptedError):
  20237. * # There is an active reader for _sock_accept, so
  20238. */
  20239. __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_conn, __pyx_n_s_setblocking); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 982, __pyx_L3_error)
  20240. __Pyx_GOTREF(__pyx_t_6);
  20241. __pyx_t_5 = NULL;
  20242. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
  20243. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
  20244. if (likely(__pyx_t_5)) {
  20245. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
  20246. __Pyx_INCREF(__pyx_t_5);
  20247. __Pyx_INCREF(function);
  20248. __Pyx_DECREF_SET(__pyx_t_6, function);
  20249. }
  20250. }
  20251. __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_5, Py_False) : __Pyx_PyObject_CallOneArg(__pyx_t_6, Py_False);
  20252. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  20253. if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 982, __pyx_L3_error)
  20254. __Pyx_GOTREF(__pyx_t_4);
  20255. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  20256. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  20257. /* "uvloop/loop.pyx":980
  20258. *
  20259. * cdef _sock_accept(self, fut, sock):
  20260. * try: # <<<<<<<<<<<<<<
  20261. * conn, address = sock.accept()
  20262. * conn.setblocking(False)
  20263. */
  20264. }
  20265. /* "uvloop/loop.pyx":991
  20266. * self._remove_reader(sock)
  20267. * else:
  20268. * fut.set_result((conn, address)) # <<<<<<<<<<<<<<
  20269. * self._remove_reader(sock)
  20270. *
  20271. */
  20272. /*else:*/ {
  20273. __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_fut, __pyx_n_s_set_result); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 991, __pyx_L5_except_error)
  20274. __Pyx_GOTREF(__pyx_t_6);
  20275. __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 991, __pyx_L5_except_error)
  20276. __Pyx_GOTREF(__pyx_t_5);
  20277. __Pyx_INCREF(__pyx_v_conn);
  20278. __Pyx_GIVEREF(__pyx_v_conn);
  20279. PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_conn);
  20280. __Pyx_INCREF(__pyx_v_address);
  20281. __Pyx_GIVEREF(__pyx_v_address);
  20282. PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_address);
  20283. __pyx_t_7 = NULL;
  20284. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
  20285. __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
  20286. if (likely(__pyx_t_7)) {
  20287. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
  20288. __Pyx_INCREF(__pyx_t_7);
  20289. __Pyx_INCREF(function);
  20290. __Pyx_DECREF_SET(__pyx_t_6, function);
  20291. }
  20292. }
  20293. __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5);
  20294. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  20295. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  20296. if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 991, __pyx_L5_except_error)
  20297. __Pyx_GOTREF(__pyx_t_4);
  20298. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  20299. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  20300. /* "uvloop/loop.pyx":992
  20301. * else:
  20302. * fut.set_result((conn, address))
  20303. * self._remove_reader(sock) # <<<<<<<<<<<<<<
  20304. *
  20305. * cdef _sock_connect(self, sock, address):
  20306. */
  20307. __pyx_t_4 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_vtab)->_remove_reader(__pyx_v_self, __pyx_v_sock); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 992, __pyx_L5_except_error)
  20308. __Pyx_GOTREF(__pyx_t_4);
  20309. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  20310. }
  20311. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  20312. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  20313. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  20314. goto __pyx_L8_try_end;
  20315. __pyx_L3_error:;
  20316. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  20317. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  20318. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  20319. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  20320. /* "uvloop/loop.pyx":983
  20321. * conn, address = sock.accept()
  20322. * conn.setblocking(False)
  20323. * except (BlockingIOError, InterruptedError): # <<<<<<<<<<<<<<
  20324. * # There is an active reader for _sock_accept, so
  20325. * # do nothing, it will be called again.
  20326. */
  20327. __Pyx_ErrFetch(&__pyx_t_4, &__pyx_t_6, &__pyx_t_5);
  20328. __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_BlockingIOError); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 983, __pyx_L5_except_error)
  20329. __Pyx_GOTREF(__pyx_t_7);
  20330. __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_InterruptedError); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 983, __pyx_L5_except_error)
  20331. __Pyx_GOTREF(__pyx_t_9);
  20332. __pyx_t_10 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_4, __pyx_t_7) || __Pyx_PyErr_GivenExceptionMatches(__pyx_t_4, __pyx_t_9);
  20333. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  20334. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  20335. __Pyx_ErrRestore(__pyx_t_4, __pyx_t_6, __pyx_t_5);
  20336. __pyx_t_4 = 0; __pyx_t_6 = 0; __pyx_t_5 = 0;
  20337. if (__pyx_t_10) {
  20338. __Pyx_ErrRestore(0,0,0);
  20339. goto __pyx_L4_exception_handled;
  20340. }
  20341. /* "uvloop/loop.pyx":987
  20342. * # do nothing, it will be called again.
  20343. * pass
  20344. * except Exception as exc: # <<<<<<<<<<<<<<
  20345. * fut.set_exception(exc)
  20346. * self._remove_reader(sock)
  20347. */
  20348. __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
  20349. if (__pyx_t_10) {
  20350. __Pyx_AddTraceback("uvloop.loop.Loop._sock_accept", __pyx_clineno, __pyx_lineno, __pyx_filename);
  20351. if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_4) < 0) __PYX_ERR(2, 987, __pyx_L5_except_error)
  20352. __Pyx_GOTREF(__pyx_t_5);
  20353. __Pyx_GOTREF(__pyx_t_6);
  20354. __Pyx_GOTREF(__pyx_t_4);
  20355. __Pyx_INCREF(__pyx_t_6);
  20356. __pyx_v_exc = __pyx_t_6;
  20357. /*try:*/ {
  20358. /* "uvloop/loop.pyx":988
  20359. * pass
  20360. * except Exception as exc:
  20361. * fut.set_exception(exc) # <<<<<<<<<<<<<<
  20362. * self._remove_reader(sock)
  20363. * else:
  20364. */
  20365. __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_fut, __pyx_n_s_set_exception); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 988, __pyx_L16_error)
  20366. __Pyx_GOTREF(__pyx_t_7);
  20367. __pyx_t_11 = NULL;
  20368. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
  20369. __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_7);
  20370. if (likely(__pyx_t_11)) {
  20371. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
  20372. __Pyx_INCREF(__pyx_t_11);
  20373. __Pyx_INCREF(function);
  20374. __Pyx_DECREF_SET(__pyx_t_7, function);
  20375. }
  20376. }
  20377. __pyx_t_9 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_11, __pyx_v_exc) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_exc);
  20378. __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
  20379. if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 988, __pyx_L16_error)
  20380. __Pyx_GOTREF(__pyx_t_9);
  20381. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  20382. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  20383. /* "uvloop/loop.pyx":989
  20384. * except Exception as exc:
  20385. * fut.set_exception(exc)
  20386. * self._remove_reader(sock) # <<<<<<<<<<<<<<
  20387. * else:
  20388. * fut.set_result((conn, address))
  20389. */
  20390. __pyx_t_9 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_vtab)->_remove_reader(__pyx_v_self, __pyx_v_sock); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 989, __pyx_L16_error)
  20391. __Pyx_GOTREF(__pyx_t_9);
  20392. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  20393. }
  20394. /* "uvloop/loop.pyx":987
  20395. * # do nothing, it will be called again.
  20396. * pass
  20397. * except Exception as exc: # <<<<<<<<<<<<<<
  20398. * fut.set_exception(exc)
  20399. * self._remove_reader(sock)
  20400. */
  20401. /*finally:*/ {
  20402. /*normal exit:*/{
  20403. __Pyx_DECREF(__pyx_v_exc);
  20404. __pyx_v_exc = NULL;
  20405. goto __pyx_L17;
  20406. }
  20407. __pyx_L16_error:;
  20408. /*exception exit:*/{
  20409. __Pyx_PyThreadState_declare
  20410. __Pyx_PyThreadState_assign
  20411. __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0;
  20412. __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
  20413. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  20414. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  20415. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19);
  20416. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16) < 0)) __Pyx_ErrFetch(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16);
  20417. __Pyx_XGOTREF(__pyx_t_14);
  20418. __Pyx_XGOTREF(__pyx_t_15);
  20419. __Pyx_XGOTREF(__pyx_t_16);
  20420. __Pyx_XGOTREF(__pyx_t_17);
  20421. __Pyx_XGOTREF(__pyx_t_18);
  20422. __Pyx_XGOTREF(__pyx_t_19);
  20423. __pyx_t_10 = __pyx_lineno; __pyx_t_12 = __pyx_clineno; __pyx_t_13 = __pyx_filename;
  20424. {
  20425. __Pyx_DECREF(__pyx_v_exc);
  20426. __pyx_v_exc = NULL;
  20427. }
  20428. if (PY_MAJOR_VERSION >= 3) {
  20429. __Pyx_XGIVEREF(__pyx_t_17);
  20430. __Pyx_XGIVEREF(__pyx_t_18);
  20431. __Pyx_XGIVEREF(__pyx_t_19);
  20432. __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_18, __pyx_t_19);
  20433. }
  20434. __Pyx_XGIVEREF(__pyx_t_14);
  20435. __Pyx_XGIVEREF(__pyx_t_15);
  20436. __Pyx_XGIVEREF(__pyx_t_16);
  20437. __Pyx_ErrRestore(__pyx_t_14, __pyx_t_15, __pyx_t_16);
  20438. __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0;
  20439. __pyx_lineno = __pyx_t_10; __pyx_clineno = __pyx_t_12; __pyx_filename = __pyx_t_13;
  20440. goto __pyx_L5_except_error;
  20441. }
  20442. __pyx_L17:;
  20443. }
  20444. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  20445. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  20446. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  20447. goto __pyx_L4_exception_handled;
  20448. }
  20449. goto __pyx_L5_except_error;
  20450. __pyx_L5_except_error:;
  20451. /* "uvloop/loop.pyx":980
  20452. *
  20453. * cdef _sock_accept(self, fut, sock):
  20454. * try: # <<<<<<<<<<<<<<
  20455. * conn, address = sock.accept()
  20456. * conn.setblocking(False)
  20457. */
  20458. __Pyx_XGIVEREF(__pyx_t_1);
  20459. __Pyx_XGIVEREF(__pyx_t_2);
  20460. __Pyx_XGIVEREF(__pyx_t_3);
  20461. __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
  20462. goto __pyx_L1_error;
  20463. __pyx_L4_exception_handled:;
  20464. __Pyx_XGIVEREF(__pyx_t_1);
  20465. __Pyx_XGIVEREF(__pyx_t_2);
  20466. __Pyx_XGIVEREF(__pyx_t_3);
  20467. __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
  20468. __pyx_L8_try_end:;
  20469. }
  20470. /* "uvloop/loop.pyx":979
  20471. * self._add_writer(sock, handle)
  20472. *
  20473. * cdef _sock_accept(self, fut, sock): # <<<<<<<<<<<<<<
  20474. * try:
  20475. * conn, address = sock.accept()
  20476. */
  20477. /* function exit code */
  20478. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  20479. goto __pyx_L0;
  20480. __pyx_L1_error:;
  20481. __Pyx_XDECREF(__pyx_t_4);
  20482. __Pyx_XDECREF(__pyx_t_5);
  20483. __Pyx_XDECREF(__pyx_t_6);
  20484. __Pyx_XDECREF(__pyx_t_7);
  20485. __Pyx_XDECREF(__pyx_t_9);
  20486. __Pyx_XDECREF(__pyx_t_11);
  20487. __Pyx_AddTraceback("uvloop.loop.Loop._sock_accept", __pyx_clineno, __pyx_lineno, __pyx_filename);
  20488. __pyx_r = 0;
  20489. __pyx_L0:;
  20490. __Pyx_XDECREF(__pyx_v_conn);
  20491. __Pyx_XDECREF(__pyx_v_address);
  20492. __Pyx_XDECREF(__pyx_v_exc);
  20493. __Pyx_XGIVEREF(__pyx_r);
  20494. __Pyx_RefNannyFinishContext();
  20495. return __pyx_r;
  20496. }
  20497. /* "uvloop/loop.pyx":1006
  20498. *
  20499. * fut = self._new_future()
  20500. * fut.add_done_callback(lambda fut: self._remove_writer(sock)) # <<<<<<<<<<<<<<
  20501. *
  20502. * handle = new_MethodHandle3(
  20503. */
  20504. /* Python wrapper */
  20505. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_13_sock_connect_lambda(PyObject *__pyx_self, PyObject *__pyx_v_fut); /*proto*/
  20506. static PyMethodDef __pyx_mdef_6uvloop_4loop_4Loop_13_sock_connect_lambda = {"lambda", (PyCFunction)__pyx_pw_6uvloop_4loop_4Loop_13_sock_connect_lambda, METH_O, 0};
  20507. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_13_sock_connect_lambda(PyObject *__pyx_self, PyObject *__pyx_v_fut) {
  20508. PyObject *__pyx_r = 0;
  20509. __Pyx_RefNannyDeclarations
  20510. __Pyx_RefNannySetupContext("lambda (wrapper)", 0);
  20511. __pyx_r = __pyx_lambda_funcdef_lambda(__pyx_self, ((PyObject *)__pyx_v_fut));
  20512. /* function exit code */
  20513. __Pyx_RefNannyFinishContext();
  20514. return __pyx_r;
  20515. }
  20516. static PyObject *__pyx_lambda_funcdef_lambda(PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_fut) {
  20517. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_2__sock_connect *__pyx_cur_scope;
  20518. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_2__sock_connect *__pyx_outer_scope;
  20519. PyObject *__pyx_r = NULL;
  20520. __Pyx_RefNannyDeclarations
  20521. PyObject *__pyx_t_1 = NULL;
  20522. PyObject *__pyx_t_2 = NULL;
  20523. __Pyx_RefNannySetupContext("lambda", 0);
  20524. __pyx_outer_scope = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_2__sock_connect *) __Pyx_CyFunction_GetClosure(__pyx_self);
  20525. __pyx_cur_scope = __pyx_outer_scope;
  20526. __Pyx_XDECREF(__pyx_r);
  20527. if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(2, 1006, __pyx_L1_error) }
  20528. if (unlikely(!__pyx_cur_scope->__pyx_v_sock)) { __Pyx_RaiseClosureNameError("sock"); __PYX_ERR(2, 1006, __pyx_L1_error) }
  20529. __pyx_t_1 = __pyx_cur_scope->__pyx_v_sock;
  20530. __Pyx_INCREF(__pyx_t_1);
  20531. __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->_remove_writer(__pyx_cur_scope->__pyx_v_self, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1006, __pyx_L1_error)
  20532. __Pyx_GOTREF(__pyx_t_2);
  20533. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  20534. __pyx_r = __pyx_t_2;
  20535. __pyx_t_2 = 0;
  20536. goto __pyx_L0;
  20537. /* function exit code */
  20538. __pyx_L1_error:;
  20539. __Pyx_XDECREF(__pyx_t_1);
  20540. __Pyx_XDECREF(__pyx_t_2);
  20541. __Pyx_AddTraceback("uvloop.loop.Loop._sock_connect.lambda", __pyx_clineno, __pyx_lineno, __pyx_filename);
  20542. __pyx_r = NULL;
  20543. __pyx_L0:;
  20544. __Pyx_XGIVEREF(__pyx_r);
  20545. __Pyx_RefNannyFinishContext();
  20546. return __pyx_r;
  20547. }
  20548. /* "uvloop/loop.pyx":994
  20549. * self._remove_reader(sock)
  20550. *
  20551. * cdef _sock_connect(self, sock, address): # <<<<<<<<<<<<<<
  20552. * cdef:
  20553. * Handle handle
  20554. */
  20555. static PyObject *__pyx_f_6uvloop_4loop_4Loop__sock_connect(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_sock, PyObject *__pyx_v_address) {
  20556. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_2__sock_connect *__pyx_cur_scope;
  20557. struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_handle = 0;
  20558. PyObject *__pyx_v_fut = NULL;
  20559. PyObject *__pyx_r = NULL;
  20560. __Pyx_RefNannyDeclarations
  20561. PyObject *__pyx_t_1 = NULL;
  20562. PyObject *__pyx_t_2 = NULL;
  20563. PyObject *__pyx_t_3 = NULL;
  20564. PyObject *__pyx_t_4 = NULL;
  20565. PyObject *__pyx_t_5 = NULL;
  20566. PyObject *__pyx_t_6 = NULL;
  20567. PyObject *__pyx_t_7 = NULL;
  20568. PyObject *__pyx_t_8 = NULL;
  20569. int __pyx_t_9;
  20570. __Pyx_RefNannySetupContext("_sock_connect", 0);
  20571. __pyx_cur_scope = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_2__sock_connect *)__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_2__sock_connect(__pyx_ptype_6uvloop_4loop___pyx_scope_struct_2__sock_connect, __pyx_empty_tuple, NULL);
  20572. if (unlikely(!__pyx_cur_scope)) {
  20573. __pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_2__sock_connect *)Py_None);
  20574. __Pyx_INCREF(Py_None);
  20575. __PYX_ERR(2, 994, __pyx_L1_error)
  20576. } else {
  20577. __Pyx_GOTREF(__pyx_cur_scope);
  20578. }
  20579. __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  20580. __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  20581. __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  20582. __pyx_cur_scope->__pyx_v_sock = __pyx_v_sock;
  20583. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_sock);
  20584. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_sock);
  20585. /* "uvloop/loop.pyx":998
  20586. * Handle handle
  20587. *
  20588. * try: # <<<<<<<<<<<<<<
  20589. * sock.connect(address)
  20590. * except (BlockingIOError, InterruptedError):
  20591. */
  20592. {
  20593. __Pyx_PyThreadState_declare
  20594. __Pyx_PyThreadState_assign
  20595. __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
  20596. __Pyx_XGOTREF(__pyx_t_1);
  20597. __Pyx_XGOTREF(__pyx_t_2);
  20598. __Pyx_XGOTREF(__pyx_t_3);
  20599. /*try:*/ {
  20600. /* "uvloop/loop.pyx":999
  20601. *
  20602. * try:
  20603. * sock.connect(address) # <<<<<<<<<<<<<<
  20604. * except (BlockingIOError, InterruptedError):
  20605. * pass
  20606. */
  20607. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_sock, __pyx_n_s_connect); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 999, __pyx_L3_error)
  20608. __Pyx_GOTREF(__pyx_t_5);
  20609. __pyx_t_6 = NULL;
  20610. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
  20611. __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
  20612. if (likely(__pyx_t_6)) {
  20613. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
  20614. __Pyx_INCREF(__pyx_t_6);
  20615. __Pyx_INCREF(function);
  20616. __Pyx_DECREF_SET(__pyx_t_5, function);
  20617. }
  20618. }
  20619. __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_v_address) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_address);
  20620. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  20621. if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 999, __pyx_L3_error)
  20622. __Pyx_GOTREF(__pyx_t_4);
  20623. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  20624. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  20625. /* "uvloop/loop.pyx":998
  20626. * Handle handle
  20627. *
  20628. * try: # <<<<<<<<<<<<<<
  20629. * sock.connect(address)
  20630. * except (BlockingIOError, InterruptedError):
  20631. */
  20632. }
  20633. /* "uvloop/loop.pyx":1003
  20634. * pass
  20635. * else:
  20636. * return # <<<<<<<<<<<<<<
  20637. *
  20638. * fut = self._new_future()
  20639. */
  20640. /*else:*/ {
  20641. __Pyx_XDECREF(__pyx_r);
  20642. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  20643. goto __pyx_L6_except_return;
  20644. }
  20645. __pyx_L3_error:;
  20646. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  20647. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  20648. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  20649. /* "uvloop/loop.pyx":1000
  20650. * try:
  20651. * sock.connect(address)
  20652. * except (BlockingIOError, InterruptedError): # <<<<<<<<<<<<<<
  20653. * pass
  20654. * else:
  20655. */
  20656. __Pyx_ErrFetch(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
  20657. __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_BlockingIOError); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 1000, __pyx_L5_except_error)
  20658. __Pyx_GOTREF(__pyx_t_7);
  20659. __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_InterruptedError); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1000, __pyx_L5_except_error)
  20660. __Pyx_GOTREF(__pyx_t_8);
  20661. __pyx_t_9 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_4, __pyx_t_7) || __Pyx_PyErr_GivenExceptionMatches(__pyx_t_4, __pyx_t_8);
  20662. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  20663. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  20664. __Pyx_ErrRestore(__pyx_t_4, __pyx_t_5, __pyx_t_6);
  20665. __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_6 = 0;
  20666. if (__pyx_t_9) {
  20667. __Pyx_ErrRestore(0,0,0);
  20668. goto __pyx_L4_exception_handled;
  20669. }
  20670. goto __pyx_L5_except_error;
  20671. __pyx_L5_except_error:;
  20672. /* "uvloop/loop.pyx":998
  20673. * Handle handle
  20674. *
  20675. * try: # <<<<<<<<<<<<<<
  20676. * sock.connect(address)
  20677. * except (BlockingIOError, InterruptedError):
  20678. */
  20679. __Pyx_XGIVEREF(__pyx_t_1);
  20680. __Pyx_XGIVEREF(__pyx_t_2);
  20681. __Pyx_XGIVEREF(__pyx_t_3);
  20682. __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
  20683. goto __pyx_L1_error;
  20684. __pyx_L6_except_return:;
  20685. __Pyx_XGIVEREF(__pyx_t_1);
  20686. __Pyx_XGIVEREF(__pyx_t_2);
  20687. __Pyx_XGIVEREF(__pyx_t_3);
  20688. __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
  20689. goto __pyx_L0;
  20690. __pyx_L4_exception_handled:;
  20691. __Pyx_XGIVEREF(__pyx_t_1);
  20692. __Pyx_XGIVEREF(__pyx_t_2);
  20693. __Pyx_XGIVEREF(__pyx_t_3);
  20694. __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
  20695. }
  20696. /* "uvloop/loop.pyx":1005
  20697. * return
  20698. *
  20699. * fut = self._new_future() # <<<<<<<<<<<<<<
  20700. * fut.add_done_callback(lambda fut: self._remove_writer(sock))
  20701. *
  20702. */
  20703. __pyx_t_6 = __pyx_f_6uvloop_4loop_4Loop__new_future(__pyx_cur_scope->__pyx_v_self); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1005, __pyx_L1_error)
  20704. __Pyx_GOTREF(__pyx_t_6);
  20705. __pyx_v_fut = __pyx_t_6;
  20706. __pyx_t_6 = 0;
  20707. /* "uvloop/loop.pyx":1006
  20708. *
  20709. * fut = self._new_future()
  20710. * fut.add_done_callback(lambda fut: self._remove_writer(sock)) # <<<<<<<<<<<<<<
  20711. *
  20712. * handle = new_MethodHandle3(
  20713. */
  20714. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_fut, __pyx_n_s_add_done_callback); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1006, __pyx_L1_error)
  20715. __Pyx_GOTREF(__pyx_t_5);
  20716. __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6uvloop_4loop_4Loop_13_sock_connect_lambda, 0, __pyx_n_s_Loop__sock_connect_locals_lambda, ((PyObject*)__pyx_cur_scope), __pyx_n_s_uvloop_loop, __pyx_d, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1006, __pyx_L1_error)
  20717. __Pyx_GOTREF(__pyx_t_4);
  20718. __pyx_t_8 = NULL;
  20719. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
  20720. __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
  20721. if (likely(__pyx_t_8)) {
  20722. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
  20723. __Pyx_INCREF(__pyx_t_8);
  20724. __Pyx_INCREF(function);
  20725. __Pyx_DECREF_SET(__pyx_t_5, function);
  20726. }
  20727. }
  20728. __pyx_t_6 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_8, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4);
  20729. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  20730. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  20731. if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1006, __pyx_L1_error)
  20732. __Pyx_GOTREF(__pyx_t_6);
  20733. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  20734. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  20735. /* "uvloop/loop.pyx":1009
  20736. *
  20737. * handle = new_MethodHandle3(
  20738. * self, # <<<<<<<<<<<<<<
  20739. * "Loop._sock_connect",
  20740. * <method3_t>self._sock_connect_cb,
  20741. */
  20742. __pyx_t_6 = ((PyObject *)__pyx_cur_scope->__pyx_v_self);
  20743. __Pyx_INCREF(__pyx_t_6);
  20744. /* "uvloop/loop.pyx":1012
  20745. * "Loop._sock_connect",
  20746. * <method3_t>self._sock_connect_cb,
  20747. * self, # <<<<<<<<<<<<<<
  20748. * fut, sock, address)
  20749. *
  20750. */
  20751. __pyx_t_5 = ((PyObject *)__pyx_cur_scope->__pyx_v_self);
  20752. __Pyx_INCREF(__pyx_t_5);
  20753. /* "uvloop/loop.pyx":1013
  20754. * <method3_t>self._sock_connect_cb,
  20755. * self,
  20756. * fut, sock, address) # <<<<<<<<<<<<<<
  20757. *
  20758. * self._add_writer(sock, handle)
  20759. */
  20760. __pyx_t_4 = __pyx_cur_scope->__pyx_v_sock;
  20761. __Pyx_INCREF(__pyx_t_4);
  20762. /* "uvloop/loop.pyx":1008
  20763. * fut.add_done_callback(lambda fut: self._remove_writer(sock))
  20764. *
  20765. * handle = new_MethodHandle3( # <<<<<<<<<<<<<<
  20766. * self,
  20767. * "Loop._sock_connect",
  20768. */
  20769. __pyx_t_8 = __pyx_f_6uvloop_4loop_new_MethodHandle3(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_t_6), __pyx_kp_u_Loop__sock_connect, ((__pyx_t_6uvloop_4loop_method3_t)((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->_sock_connect_cb), __pyx_t_5, __pyx_v_fut, __pyx_t_4, __pyx_v_address); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1008, __pyx_L1_error)
  20770. __Pyx_GOTREF(__pyx_t_8);
  20771. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  20772. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  20773. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  20774. if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_6uvloop_4loop_Handle))))) __PYX_ERR(2, 1008, __pyx_L1_error)
  20775. __pyx_v_handle = ((struct __pyx_obj_6uvloop_4loop_Handle *)__pyx_t_8);
  20776. __pyx_t_8 = 0;
  20777. /* "uvloop/loop.pyx":1015
  20778. * fut, sock, address)
  20779. *
  20780. * self._add_writer(sock, handle) # <<<<<<<<<<<<<<
  20781. * return fut
  20782. *
  20783. */
  20784. __pyx_t_8 = __pyx_cur_scope->__pyx_v_sock;
  20785. __Pyx_INCREF(__pyx_t_8);
  20786. __pyx_t_4 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->_add_writer(__pyx_cur_scope->__pyx_v_self, __pyx_t_8, __pyx_v_handle); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1015, __pyx_L1_error)
  20787. __Pyx_GOTREF(__pyx_t_4);
  20788. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  20789. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  20790. /* "uvloop/loop.pyx":1016
  20791. *
  20792. * self._add_writer(sock, handle)
  20793. * return fut # <<<<<<<<<<<<<<
  20794. *
  20795. * cdef _sock_connect_cb(self, fut, sock, address):
  20796. */
  20797. __Pyx_XDECREF(__pyx_r);
  20798. __Pyx_INCREF(__pyx_v_fut);
  20799. __pyx_r = __pyx_v_fut;
  20800. goto __pyx_L0;
  20801. /* "uvloop/loop.pyx":994
  20802. * self._remove_reader(sock)
  20803. *
  20804. * cdef _sock_connect(self, sock, address): # <<<<<<<<<<<<<<
  20805. * cdef:
  20806. * Handle handle
  20807. */
  20808. /* function exit code */
  20809. __pyx_L1_error:;
  20810. __Pyx_XDECREF(__pyx_t_4);
  20811. __Pyx_XDECREF(__pyx_t_5);
  20812. __Pyx_XDECREF(__pyx_t_6);
  20813. __Pyx_XDECREF(__pyx_t_7);
  20814. __Pyx_XDECREF(__pyx_t_8);
  20815. __Pyx_AddTraceback("uvloop.loop.Loop._sock_connect", __pyx_clineno, __pyx_lineno, __pyx_filename);
  20816. __pyx_r = 0;
  20817. __pyx_L0:;
  20818. __Pyx_XDECREF((PyObject *)__pyx_v_handle);
  20819. __Pyx_XDECREF(__pyx_v_fut);
  20820. __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  20821. __Pyx_XGIVEREF(__pyx_r);
  20822. __Pyx_RefNannyFinishContext();
  20823. return __pyx_r;
  20824. }
  20825. /* "uvloop/loop.pyx":1018
  20826. * return fut
  20827. *
  20828. * cdef _sock_connect_cb(self, fut, sock, address): # <<<<<<<<<<<<<<
  20829. * if fut.cancelled():
  20830. * return
  20831. */
  20832. static PyObject *__pyx_f_6uvloop_4loop_4Loop__sock_connect_cb(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_fut, PyObject *__pyx_v_sock, PyObject *__pyx_v_address) {
  20833. PyObject *__pyx_v_err = NULL;
  20834. PyObject *__pyx_v_exc = NULL;
  20835. PyObject *__pyx_r = NULL;
  20836. __Pyx_RefNannyDeclarations
  20837. PyObject *__pyx_t_1 = NULL;
  20838. PyObject *__pyx_t_2 = NULL;
  20839. PyObject *__pyx_t_3 = NULL;
  20840. int __pyx_t_4;
  20841. PyObject *__pyx_t_5 = NULL;
  20842. PyObject *__pyx_t_6 = NULL;
  20843. PyObject *__pyx_t_7 = NULL;
  20844. PyObject *__pyx_t_8 = NULL;
  20845. PyObject *__pyx_t_9 = NULL;
  20846. int __pyx_t_10;
  20847. PyObject *__pyx_t_11 = NULL;
  20848. int __pyx_t_12;
  20849. char const *__pyx_t_13;
  20850. PyObject *__pyx_t_14 = NULL;
  20851. PyObject *__pyx_t_15 = NULL;
  20852. PyObject *__pyx_t_16 = NULL;
  20853. PyObject *__pyx_t_17 = NULL;
  20854. PyObject *__pyx_t_18 = NULL;
  20855. PyObject *__pyx_t_19 = NULL;
  20856. __Pyx_RefNannySetupContext("_sock_connect_cb", 0);
  20857. /* "uvloop/loop.pyx":1019
  20858. *
  20859. * cdef _sock_connect_cb(self, fut, sock, address):
  20860. * if fut.cancelled(): # <<<<<<<<<<<<<<
  20861. * return
  20862. *
  20863. */
  20864. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_fut, __pyx_n_s_cancelled); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1019, __pyx_L1_error)
  20865. __Pyx_GOTREF(__pyx_t_2);
  20866. __pyx_t_3 = NULL;
  20867. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
  20868. __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
  20869. if (likely(__pyx_t_3)) {
  20870. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  20871. __Pyx_INCREF(__pyx_t_3);
  20872. __Pyx_INCREF(function);
  20873. __Pyx_DECREF_SET(__pyx_t_2, function);
  20874. }
  20875. }
  20876. __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  20877. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  20878. if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1019, __pyx_L1_error)
  20879. __Pyx_GOTREF(__pyx_t_1);
  20880. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  20881. __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(2, 1019, __pyx_L1_error)
  20882. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  20883. if (__pyx_t_4) {
  20884. /* "uvloop/loop.pyx":1020
  20885. * cdef _sock_connect_cb(self, fut, sock, address):
  20886. * if fut.cancelled():
  20887. * return # <<<<<<<<<<<<<<
  20888. *
  20889. * try:
  20890. */
  20891. __Pyx_XDECREF(__pyx_r);
  20892. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  20893. goto __pyx_L0;
  20894. /* "uvloop/loop.pyx":1019
  20895. *
  20896. * cdef _sock_connect_cb(self, fut, sock, address):
  20897. * if fut.cancelled(): # <<<<<<<<<<<<<<
  20898. * return
  20899. *
  20900. */
  20901. }
  20902. /* "uvloop/loop.pyx":1022
  20903. * return
  20904. *
  20905. * try: # <<<<<<<<<<<<<<
  20906. * err = sock.getsockopt(uv.SOL_SOCKET, uv.SO_ERROR)
  20907. * if err != 0:
  20908. */
  20909. {
  20910. __Pyx_PyThreadState_declare
  20911. __Pyx_PyThreadState_assign
  20912. __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7);
  20913. __Pyx_XGOTREF(__pyx_t_5);
  20914. __Pyx_XGOTREF(__pyx_t_6);
  20915. __Pyx_XGOTREF(__pyx_t_7);
  20916. /*try:*/ {
  20917. /* "uvloop/loop.pyx":1023
  20918. *
  20919. * try:
  20920. * err = sock.getsockopt(uv.SOL_SOCKET, uv.SO_ERROR) # <<<<<<<<<<<<<<
  20921. * if err != 0:
  20922. * # Jump to any except clause below.
  20923. */
  20924. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_sock, __pyx_n_s_getsockopt); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1023, __pyx_L4_error)
  20925. __Pyx_GOTREF(__pyx_t_2);
  20926. __pyx_t_3 = __Pyx_PyInt_From_int(SOL_SOCKET); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1023, __pyx_L4_error)
  20927. __Pyx_GOTREF(__pyx_t_3);
  20928. __pyx_t_8 = __Pyx_PyInt_From_int(SO_ERROR); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1023, __pyx_L4_error)
  20929. __Pyx_GOTREF(__pyx_t_8);
  20930. __pyx_t_9 = NULL;
  20931. __pyx_t_10 = 0;
  20932. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
  20933. __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
  20934. if (likely(__pyx_t_9)) {
  20935. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  20936. __Pyx_INCREF(__pyx_t_9);
  20937. __Pyx_INCREF(function);
  20938. __Pyx_DECREF_SET(__pyx_t_2, function);
  20939. __pyx_t_10 = 1;
  20940. }
  20941. }
  20942. #if CYTHON_FAST_PYCALL
  20943. if (PyFunction_Check(__pyx_t_2)) {
  20944. PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_t_3, __pyx_t_8};
  20945. __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1023, __pyx_L4_error)
  20946. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  20947. __Pyx_GOTREF(__pyx_t_1);
  20948. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  20949. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  20950. } else
  20951. #endif
  20952. #if CYTHON_FAST_PYCCALL
  20953. if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
  20954. PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_t_3, __pyx_t_8};
  20955. __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1023, __pyx_L4_error)
  20956. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  20957. __Pyx_GOTREF(__pyx_t_1);
  20958. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  20959. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  20960. } else
  20961. #endif
  20962. {
  20963. __pyx_t_11 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 1023, __pyx_L4_error)
  20964. __Pyx_GOTREF(__pyx_t_11);
  20965. if (__pyx_t_9) {
  20966. __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); __pyx_t_9 = NULL;
  20967. }
  20968. __Pyx_GIVEREF(__pyx_t_3);
  20969. PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_10, __pyx_t_3);
  20970. __Pyx_GIVEREF(__pyx_t_8);
  20971. PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_10, __pyx_t_8);
  20972. __pyx_t_3 = 0;
  20973. __pyx_t_8 = 0;
  20974. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1023, __pyx_L4_error)
  20975. __Pyx_GOTREF(__pyx_t_1);
  20976. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  20977. }
  20978. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  20979. __pyx_v_err = __pyx_t_1;
  20980. __pyx_t_1 = 0;
  20981. /* "uvloop/loop.pyx":1024
  20982. * try:
  20983. * err = sock.getsockopt(uv.SOL_SOCKET, uv.SO_ERROR)
  20984. * if err != 0: # <<<<<<<<<<<<<<
  20985. * # Jump to any except clause below.
  20986. * raise OSError(err, 'Connect call failed %s' % (address,))
  20987. */
  20988. __pyx_t_1 = __Pyx_PyInt_NeObjC(__pyx_v_err, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1024, __pyx_L4_error)
  20989. __Pyx_GOTREF(__pyx_t_1);
  20990. __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(2, 1024, __pyx_L4_error)
  20991. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  20992. if (unlikely(__pyx_t_4)) {
  20993. /* "uvloop/loop.pyx":1026
  20994. * if err != 0:
  20995. * # Jump to any except clause below.
  20996. * raise OSError(err, 'Connect call failed %s' % (address,)) # <<<<<<<<<<<<<<
  20997. * except (BlockingIOError, InterruptedError):
  20998. * # socket is still registered, the callback will be retried later
  20999. */
  21000. __pyx_t_1 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_v_address), __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1026, __pyx_L4_error)
  21001. __Pyx_GOTREF(__pyx_t_1);
  21002. __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Connect_call_failed, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1026, __pyx_L4_error)
  21003. __Pyx_GOTREF(__pyx_t_2);
  21004. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  21005. __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1026, __pyx_L4_error)
  21006. __Pyx_GOTREF(__pyx_t_1);
  21007. __Pyx_INCREF(__pyx_v_err);
  21008. __Pyx_GIVEREF(__pyx_v_err);
  21009. PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_err);
  21010. __Pyx_GIVEREF(__pyx_t_2);
  21011. PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
  21012. __pyx_t_2 = 0;
  21013. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_OSError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1026, __pyx_L4_error)
  21014. __Pyx_GOTREF(__pyx_t_2);
  21015. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  21016. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  21017. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  21018. __PYX_ERR(2, 1026, __pyx_L4_error)
  21019. /* "uvloop/loop.pyx":1024
  21020. * try:
  21021. * err = sock.getsockopt(uv.SOL_SOCKET, uv.SO_ERROR)
  21022. * if err != 0: # <<<<<<<<<<<<<<
  21023. * # Jump to any except clause below.
  21024. * raise OSError(err, 'Connect call failed %s' % (address,))
  21025. */
  21026. }
  21027. /* "uvloop/loop.pyx":1022
  21028. * return
  21029. *
  21030. * try: # <<<<<<<<<<<<<<
  21031. * err = sock.getsockopt(uv.SOL_SOCKET, uv.SO_ERROR)
  21032. * if err != 0:
  21033. */
  21034. }
  21035. /* "uvloop/loop.pyx":1033
  21036. * fut.set_exception(exc)
  21037. * else:
  21038. * fut.set_result(None) # <<<<<<<<<<<<<<
  21039. *
  21040. * cdef _sock_set_reuseport(self, int fd):
  21041. */
  21042. /*else:*/ {
  21043. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_fut, __pyx_n_s_set_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1033, __pyx_L6_except_error)
  21044. __Pyx_GOTREF(__pyx_t_1);
  21045. __pyx_t_11 = NULL;
  21046. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
  21047. __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_1);
  21048. if (likely(__pyx_t_11)) {
  21049. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
  21050. __Pyx_INCREF(__pyx_t_11);
  21051. __Pyx_INCREF(function);
  21052. __Pyx_DECREF_SET(__pyx_t_1, function);
  21053. }
  21054. }
  21055. __pyx_t_2 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_11, Py_None) : __Pyx_PyObject_CallOneArg(__pyx_t_1, Py_None);
  21056. __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
  21057. if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1033, __pyx_L6_except_error)
  21058. __Pyx_GOTREF(__pyx_t_2);
  21059. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  21060. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  21061. }
  21062. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  21063. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  21064. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  21065. goto __pyx_L9_try_end;
  21066. __pyx_L4_error:;
  21067. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  21068. __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
  21069. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  21070. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  21071. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  21072. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  21073. /* "uvloop/loop.pyx":1027
  21074. * # Jump to any except clause below.
  21075. * raise OSError(err, 'Connect call failed %s' % (address,))
  21076. * except (BlockingIOError, InterruptedError): # <<<<<<<<<<<<<<
  21077. * # socket is still registered, the callback will be retried later
  21078. * pass
  21079. */
  21080. __Pyx_ErrFetch(&__pyx_t_2, &__pyx_t_1, &__pyx_t_11);
  21081. __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_BlockingIOError); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1027, __pyx_L6_except_error)
  21082. __Pyx_GOTREF(__pyx_t_8);
  21083. __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_InterruptedError); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1027, __pyx_L6_except_error)
  21084. __Pyx_GOTREF(__pyx_t_3);
  21085. __pyx_t_10 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_2, __pyx_t_8) || __Pyx_PyErr_GivenExceptionMatches(__pyx_t_2, __pyx_t_3);
  21086. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  21087. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  21088. __Pyx_ErrRestore(__pyx_t_2, __pyx_t_1, __pyx_t_11);
  21089. __pyx_t_2 = 0; __pyx_t_1 = 0; __pyx_t_11 = 0;
  21090. if (__pyx_t_10) {
  21091. __Pyx_ErrRestore(0,0,0);
  21092. goto __pyx_L5_exception_handled;
  21093. }
  21094. /* "uvloop/loop.pyx":1030
  21095. * # socket is still registered, the callback will be retried later
  21096. * pass
  21097. * except Exception as exc: # <<<<<<<<<<<<<<
  21098. * fut.set_exception(exc)
  21099. * else:
  21100. */
  21101. __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
  21102. if (__pyx_t_10) {
  21103. __Pyx_AddTraceback("uvloop.loop.Loop._sock_connect_cb", __pyx_clineno, __pyx_lineno, __pyx_filename);
  21104. if (__Pyx_GetException(&__pyx_t_11, &__pyx_t_1, &__pyx_t_2) < 0) __PYX_ERR(2, 1030, __pyx_L6_except_error)
  21105. __Pyx_GOTREF(__pyx_t_11);
  21106. __Pyx_GOTREF(__pyx_t_1);
  21107. __Pyx_GOTREF(__pyx_t_2);
  21108. __Pyx_INCREF(__pyx_t_1);
  21109. __pyx_v_exc = __pyx_t_1;
  21110. /*try:*/ {
  21111. /* "uvloop/loop.pyx":1031
  21112. * pass
  21113. * except Exception as exc:
  21114. * fut.set_exception(exc) # <<<<<<<<<<<<<<
  21115. * else:
  21116. * fut.set_result(None)
  21117. */
  21118. __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_fut, __pyx_n_s_set_exception); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1031, __pyx_L16_error)
  21119. __Pyx_GOTREF(__pyx_t_8);
  21120. __pyx_t_9 = NULL;
  21121. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
  21122. __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
  21123. if (likely(__pyx_t_9)) {
  21124. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
  21125. __Pyx_INCREF(__pyx_t_9);
  21126. __Pyx_INCREF(function);
  21127. __Pyx_DECREF_SET(__pyx_t_8, function);
  21128. }
  21129. }
  21130. __pyx_t_3 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_v_exc) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_exc);
  21131. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  21132. if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1031, __pyx_L16_error)
  21133. __Pyx_GOTREF(__pyx_t_3);
  21134. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  21135. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  21136. }
  21137. /* "uvloop/loop.pyx":1030
  21138. * # socket is still registered, the callback will be retried later
  21139. * pass
  21140. * except Exception as exc: # <<<<<<<<<<<<<<
  21141. * fut.set_exception(exc)
  21142. * else:
  21143. */
  21144. /*finally:*/ {
  21145. /*normal exit:*/{
  21146. __Pyx_DECREF(__pyx_v_exc);
  21147. __pyx_v_exc = NULL;
  21148. goto __pyx_L17;
  21149. }
  21150. __pyx_L16_error:;
  21151. /*exception exit:*/{
  21152. __Pyx_PyThreadState_declare
  21153. __Pyx_PyThreadState_assign
  21154. __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0;
  21155. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  21156. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  21157. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  21158. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19);
  21159. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16) < 0)) __Pyx_ErrFetch(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16);
  21160. __Pyx_XGOTREF(__pyx_t_14);
  21161. __Pyx_XGOTREF(__pyx_t_15);
  21162. __Pyx_XGOTREF(__pyx_t_16);
  21163. __Pyx_XGOTREF(__pyx_t_17);
  21164. __Pyx_XGOTREF(__pyx_t_18);
  21165. __Pyx_XGOTREF(__pyx_t_19);
  21166. __pyx_t_10 = __pyx_lineno; __pyx_t_12 = __pyx_clineno; __pyx_t_13 = __pyx_filename;
  21167. {
  21168. __Pyx_DECREF(__pyx_v_exc);
  21169. __pyx_v_exc = NULL;
  21170. }
  21171. if (PY_MAJOR_VERSION >= 3) {
  21172. __Pyx_XGIVEREF(__pyx_t_17);
  21173. __Pyx_XGIVEREF(__pyx_t_18);
  21174. __Pyx_XGIVEREF(__pyx_t_19);
  21175. __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_18, __pyx_t_19);
  21176. }
  21177. __Pyx_XGIVEREF(__pyx_t_14);
  21178. __Pyx_XGIVEREF(__pyx_t_15);
  21179. __Pyx_XGIVEREF(__pyx_t_16);
  21180. __Pyx_ErrRestore(__pyx_t_14, __pyx_t_15, __pyx_t_16);
  21181. __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0;
  21182. __pyx_lineno = __pyx_t_10; __pyx_clineno = __pyx_t_12; __pyx_filename = __pyx_t_13;
  21183. goto __pyx_L6_except_error;
  21184. }
  21185. __pyx_L17:;
  21186. }
  21187. __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
  21188. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  21189. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  21190. goto __pyx_L5_exception_handled;
  21191. }
  21192. goto __pyx_L6_except_error;
  21193. __pyx_L6_except_error:;
  21194. /* "uvloop/loop.pyx":1022
  21195. * return
  21196. *
  21197. * try: # <<<<<<<<<<<<<<
  21198. * err = sock.getsockopt(uv.SOL_SOCKET, uv.SO_ERROR)
  21199. * if err != 0:
  21200. */
  21201. __Pyx_XGIVEREF(__pyx_t_5);
  21202. __Pyx_XGIVEREF(__pyx_t_6);
  21203. __Pyx_XGIVEREF(__pyx_t_7);
  21204. __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
  21205. goto __pyx_L1_error;
  21206. __pyx_L5_exception_handled:;
  21207. __Pyx_XGIVEREF(__pyx_t_5);
  21208. __Pyx_XGIVEREF(__pyx_t_6);
  21209. __Pyx_XGIVEREF(__pyx_t_7);
  21210. __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
  21211. __pyx_L9_try_end:;
  21212. }
  21213. /* "uvloop/loop.pyx":1018
  21214. * return fut
  21215. *
  21216. * cdef _sock_connect_cb(self, fut, sock, address): # <<<<<<<<<<<<<<
  21217. * if fut.cancelled():
  21218. * return
  21219. */
  21220. /* function exit code */
  21221. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  21222. goto __pyx_L0;
  21223. __pyx_L1_error:;
  21224. __Pyx_XDECREF(__pyx_t_1);
  21225. __Pyx_XDECREF(__pyx_t_2);
  21226. __Pyx_XDECREF(__pyx_t_3);
  21227. __Pyx_XDECREF(__pyx_t_8);
  21228. __Pyx_XDECREF(__pyx_t_9);
  21229. __Pyx_XDECREF(__pyx_t_11);
  21230. __Pyx_AddTraceback("uvloop.loop.Loop._sock_connect_cb", __pyx_clineno, __pyx_lineno, __pyx_filename);
  21231. __pyx_r = 0;
  21232. __pyx_L0:;
  21233. __Pyx_XDECREF(__pyx_v_err);
  21234. __Pyx_XDECREF(__pyx_v_exc);
  21235. __Pyx_XGIVEREF(__pyx_r);
  21236. __Pyx_RefNannyFinishContext();
  21237. return __pyx_r;
  21238. }
  21239. /* "uvloop/loop.pyx":1035
  21240. * fut.set_result(None)
  21241. *
  21242. * cdef _sock_set_reuseport(self, int fd): # <<<<<<<<<<<<<<
  21243. * cdef:
  21244. * int err
  21245. */
  21246. static PyObject *__pyx_f_6uvloop_4loop_4Loop__sock_set_reuseport(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, int __pyx_v_fd) {
  21247. int __pyx_v_err;
  21248. int __pyx_v_reuseport_flag;
  21249. PyObject *__pyx_r = NULL;
  21250. __Pyx_RefNannyDeclarations
  21251. int __pyx_t_1;
  21252. PyObject *__pyx_t_2 = NULL;
  21253. __Pyx_RefNannySetupContext("_sock_set_reuseport", 0);
  21254. /* "uvloop/loop.pyx":1038
  21255. * cdef:
  21256. * int err
  21257. * int reuseport_flag = 1 # <<<<<<<<<<<<<<
  21258. *
  21259. * err = system.setsockopt(
  21260. */
  21261. __pyx_v_reuseport_flag = 1;
  21262. /* "uvloop/loop.pyx":1040
  21263. * int reuseport_flag = 1
  21264. *
  21265. * err = system.setsockopt( # <<<<<<<<<<<<<<
  21266. * fd,
  21267. * uv.SOL_SOCKET,
  21268. */
  21269. __pyx_v_err = setsockopt(__pyx_v_fd, SOL_SOCKET, __pyx_v_6uvloop_4loop_SO_REUSEPORT, ((char *)(&__pyx_v_reuseport_flag)), (sizeof(__pyx_v_reuseport_flag)));
  21270. /* "uvloop/loop.pyx":1047
  21271. * sizeof(reuseport_flag))
  21272. *
  21273. * if err < 0: # <<<<<<<<<<<<<<
  21274. * raise convert_error(-errno.errno)
  21275. *
  21276. */
  21277. __pyx_t_1 = ((__pyx_v_err < 0) != 0);
  21278. if (unlikely(__pyx_t_1)) {
  21279. /* "uvloop/loop.pyx":1048
  21280. *
  21281. * if err < 0:
  21282. * raise convert_error(-errno.errno) # <<<<<<<<<<<<<<
  21283. *
  21284. * cdef _set_coroutine_debug(self, bint enabled):
  21285. */
  21286. __pyx_t_2 = __pyx_f_6uvloop_4loop_convert_error((-errno)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1048, __pyx_L1_error)
  21287. __Pyx_GOTREF(__pyx_t_2);
  21288. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  21289. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  21290. __PYX_ERR(2, 1048, __pyx_L1_error)
  21291. /* "uvloop/loop.pyx":1047
  21292. * sizeof(reuseport_flag))
  21293. *
  21294. * if err < 0: # <<<<<<<<<<<<<<
  21295. * raise convert_error(-errno.errno)
  21296. *
  21297. */
  21298. }
  21299. /* "uvloop/loop.pyx":1035
  21300. * fut.set_result(None)
  21301. *
  21302. * cdef _sock_set_reuseport(self, int fd): # <<<<<<<<<<<<<<
  21303. * cdef:
  21304. * int err
  21305. */
  21306. /* function exit code */
  21307. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  21308. goto __pyx_L0;
  21309. __pyx_L1_error:;
  21310. __Pyx_XDECREF(__pyx_t_2);
  21311. __Pyx_AddTraceback("uvloop.loop.Loop._sock_set_reuseport", __pyx_clineno, __pyx_lineno, __pyx_filename);
  21312. __pyx_r = 0;
  21313. __pyx_L0:;
  21314. __Pyx_XGIVEREF(__pyx_r);
  21315. __Pyx_RefNannyFinishContext();
  21316. return __pyx_r;
  21317. }
  21318. /* "uvloop/loop.pyx":1050
  21319. * raise convert_error(-errno.errno)
  21320. *
  21321. * cdef _set_coroutine_debug(self, bint enabled): # <<<<<<<<<<<<<<
  21322. * enabled = bool(enabled)
  21323. * if self._coroutine_debug_set == enabled:
  21324. */
  21325. static PyObject *__pyx_f_6uvloop_4loop_4Loop__set_coroutine_debug(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, int __pyx_v_enabled) {
  21326. PyObject *__pyx_v_wrapper = NULL;
  21327. PyObject *__pyx_v_current_wrapper = NULL;
  21328. PyObject *__pyx_r = NULL;
  21329. __Pyx_RefNannyDeclarations
  21330. int __pyx_t_1;
  21331. PyObject *__pyx_t_2 = NULL;
  21332. PyObject *__pyx_t_3 = NULL;
  21333. PyObject *__pyx_t_4 = NULL;
  21334. int __pyx_t_5;
  21335. PyObject *__pyx_t_6 = NULL;
  21336. int __pyx_t_7;
  21337. __Pyx_RefNannySetupContext("_set_coroutine_debug", 0);
  21338. /* "uvloop/loop.pyx":1051
  21339. *
  21340. * cdef _set_coroutine_debug(self, bint enabled):
  21341. * enabled = bool(enabled) # <<<<<<<<<<<<<<
  21342. * if self._coroutine_debug_set == enabled:
  21343. * return
  21344. */
  21345. __pyx_t_1 = __pyx_v_enabled;
  21346. __pyx_v_enabled = (!(!__pyx_t_1));
  21347. /* "uvloop/loop.pyx":1052
  21348. * cdef _set_coroutine_debug(self, bint enabled):
  21349. * enabled = bool(enabled)
  21350. * if self._coroutine_debug_set == enabled: # <<<<<<<<<<<<<<
  21351. * return
  21352. *
  21353. */
  21354. __pyx_t_1 = ((__pyx_v_self->_coroutine_debug_set == __pyx_v_enabled) != 0);
  21355. if (__pyx_t_1) {
  21356. /* "uvloop/loop.pyx":1053
  21357. * enabled = bool(enabled)
  21358. * if self._coroutine_debug_set == enabled:
  21359. * return # <<<<<<<<<<<<<<
  21360. *
  21361. * if PY37:
  21362. */
  21363. __Pyx_XDECREF(__pyx_r);
  21364. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  21365. goto __pyx_L0;
  21366. /* "uvloop/loop.pyx":1052
  21367. * cdef _set_coroutine_debug(self, bint enabled):
  21368. * enabled = bool(enabled)
  21369. * if self._coroutine_debug_set == enabled: # <<<<<<<<<<<<<<
  21370. * return
  21371. *
  21372. */
  21373. }
  21374. /* "uvloop/loop.pyx":1055
  21375. * return
  21376. *
  21377. * if PY37: # <<<<<<<<<<<<<<
  21378. * if enabled:
  21379. * self._coroutine_origin_tracking_saved_depth = (
  21380. */
  21381. __pyx_t_1 = (__pyx_v_6uvloop_4loop_PY37 != 0);
  21382. if (__pyx_t_1) {
  21383. /* "uvloop/loop.pyx":1056
  21384. *
  21385. * if PY37:
  21386. * if enabled: # <<<<<<<<<<<<<<
  21387. * self._coroutine_origin_tracking_saved_depth = (
  21388. * sys.get_coroutine_origin_tracking_depth())
  21389. */
  21390. __pyx_t_1 = (__pyx_v_enabled != 0);
  21391. if (__pyx_t_1) {
  21392. /* "uvloop/loop.pyx":1058
  21393. * if enabled:
  21394. * self._coroutine_origin_tracking_saved_depth = (
  21395. * sys.get_coroutine_origin_tracking_depth()) # <<<<<<<<<<<<<<
  21396. * sys.set_coroutine_origin_tracking_depth(
  21397. * DEBUG_STACK_DEPTH)
  21398. */
  21399. __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_sys); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1058, __pyx_L1_error)
  21400. __Pyx_GOTREF(__pyx_t_3);
  21401. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_get_coroutine_origin_tracking_de); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1058, __pyx_L1_error)
  21402. __Pyx_GOTREF(__pyx_t_4);
  21403. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  21404. __pyx_t_3 = NULL;
  21405. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
  21406. __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
  21407. if (likely(__pyx_t_3)) {
  21408. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  21409. __Pyx_INCREF(__pyx_t_3);
  21410. __Pyx_INCREF(function);
  21411. __Pyx_DECREF_SET(__pyx_t_4, function);
  21412. }
  21413. }
  21414. __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
  21415. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  21416. if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1058, __pyx_L1_error)
  21417. __Pyx_GOTREF(__pyx_t_2);
  21418. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  21419. __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 1058, __pyx_L1_error)
  21420. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  21421. /* "uvloop/loop.pyx":1057
  21422. * if PY37:
  21423. * if enabled:
  21424. * self._coroutine_origin_tracking_saved_depth = ( # <<<<<<<<<<<<<<
  21425. * sys.get_coroutine_origin_tracking_depth())
  21426. * sys.set_coroutine_origin_tracking_depth(
  21427. */
  21428. __pyx_v_self->_coroutine_origin_tracking_saved_depth = __pyx_t_5;
  21429. /* "uvloop/loop.pyx":1059
  21430. * self._coroutine_origin_tracking_saved_depth = (
  21431. * sys.get_coroutine_origin_tracking_depth())
  21432. * sys.set_coroutine_origin_tracking_depth( # <<<<<<<<<<<<<<
  21433. * DEBUG_STACK_DEPTH)
  21434. * else:
  21435. */
  21436. __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_sys); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1059, __pyx_L1_error)
  21437. __Pyx_GOTREF(__pyx_t_4);
  21438. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_set_coroutine_origin_tracking_de); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1059, __pyx_L1_error)
  21439. __Pyx_GOTREF(__pyx_t_3);
  21440. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  21441. __pyx_t_4 = NULL;
  21442. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
  21443. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
  21444. if (likely(__pyx_t_4)) {
  21445. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  21446. __Pyx_INCREF(__pyx_t_4);
  21447. __Pyx_INCREF(function);
  21448. __Pyx_DECREF_SET(__pyx_t_3, function);
  21449. }
  21450. }
  21451. __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_int_10) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_int_10);
  21452. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  21453. if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1059, __pyx_L1_error)
  21454. __Pyx_GOTREF(__pyx_t_2);
  21455. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  21456. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  21457. /* "uvloop/loop.pyx":1056
  21458. *
  21459. * if PY37:
  21460. * if enabled: # <<<<<<<<<<<<<<
  21461. * self._coroutine_origin_tracking_saved_depth = (
  21462. * sys.get_coroutine_origin_tracking_depth())
  21463. */
  21464. goto __pyx_L5;
  21465. }
  21466. /* "uvloop/loop.pyx":1062
  21467. * DEBUG_STACK_DEPTH)
  21468. * else:
  21469. * sys.set_coroutine_origin_tracking_depth( # <<<<<<<<<<<<<<
  21470. * self._coroutine_origin_tracking_saved_depth)
  21471. *
  21472. */
  21473. /*else*/ {
  21474. __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_sys); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1062, __pyx_L1_error)
  21475. __Pyx_GOTREF(__pyx_t_3);
  21476. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_set_coroutine_origin_tracking_de); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1062, __pyx_L1_error)
  21477. __Pyx_GOTREF(__pyx_t_4);
  21478. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  21479. /* "uvloop/loop.pyx":1063
  21480. * else:
  21481. * sys.set_coroutine_origin_tracking_depth(
  21482. * self._coroutine_origin_tracking_saved_depth) # <<<<<<<<<<<<<<
  21483. *
  21484. * self._coroutine_debug_set = enabled
  21485. */
  21486. __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->_coroutine_origin_tracking_saved_depth); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1063, __pyx_L1_error)
  21487. __Pyx_GOTREF(__pyx_t_3);
  21488. __pyx_t_6 = NULL;
  21489. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
  21490. __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
  21491. if (likely(__pyx_t_6)) {
  21492. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  21493. __Pyx_INCREF(__pyx_t_6);
  21494. __Pyx_INCREF(function);
  21495. __Pyx_DECREF_SET(__pyx_t_4, function);
  21496. }
  21497. }
  21498. __pyx_t_2 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3);
  21499. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  21500. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  21501. if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1062, __pyx_L1_error)
  21502. __Pyx_GOTREF(__pyx_t_2);
  21503. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  21504. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  21505. }
  21506. __pyx_L5:;
  21507. /* "uvloop/loop.pyx":1065
  21508. * self._coroutine_origin_tracking_saved_depth)
  21509. *
  21510. * self._coroutine_debug_set = enabled # <<<<<<<<<<<<<<
  21511. * else:
  21512. * wrapper = aio_debug_wrapper
  21513. */
  21514. __pyx_v_self->_coroutine_debug_set = __pyx_v_enabled;
  21515. /* "uvloop/loop.pyx":1055
  21516. * return
  21517. *
  21518. * if PY37: # <<<<<<<<<<<<<<
  21519. * if enabled:
  21520. * self._coroutine_origin_tracking_saved_depth = (
  21521. */
  21522. goto __pyx_L4;
  21523. }
  21524. /* "uvloop/loop.pyx":1067
  21525. * self._coroutine_debug_set = enabled
  21526. * else:
  21527. * wrapper = aio_debug_wrapper # <<<<<<<<<<<<<<
  21528. * current_wrapper = sys_get_coroutine_wrapper()
  21529. *
  21530. */
  21531. /*else*/ {
  21532. __Pyx_INCREF(__pyx_v_6uvloop_4loop_aio_debug_wrapper);
  21533. __pyx_v_wrapper = __pyx_v_6uvloop_4loop_aio_debug_wrapper;
  21534. /* "uvloop/loop.pyx":1068
  21535. * else:
  21536. * wrapper = aio_debug_wrapper
  21537. * current_wrapper = sys_get_coroutine_wrapper() # <<<<<<<<<<<<<<
  21538. *
  21539. * if enabled:
  21540. */
  21541. __Pyx_INCREF(__pyx_v_6uvloop_4loop_sys_get_coroutine_wrapper);
  21542. __pyx_t_4 = __pyx_v_6uvloop_4loop_sys_get_coroutine_wrapper; __pyx_t_3 = NULL;
  21543. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
  21544. __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
  21545. if (likely(__pyx_t_3)) {
  21546. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  21547. __Pyx_INCREF(__pyx_t_3);
  21548. __Pyx_INCREF(function);
  21549. __Pyx_DECREF_SET(__pyx_t_4, function);
  21550. }
  21551. }
  21552. __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
  21553. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  21554. if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1068, __pyx_L1_error)
  21555. __Pyx_GOTREF(__pyx_t_2);
  21556. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  21557. __pyx_v_current_wrapper = __pyx_t_2;
  21558. __pyx_t_2 = 0;
  21559. /* "uvloop/loop.pyx":1070
  21560. * current_wrapper = sys_get_coroutine_wrapper()
  21561. *
  21562. * if enabled: # <<<<<<<<<<<<<<
  21563. * if current_wrapper not in (None, wrapper):
  21564. * _warn_with_source(
  21565. */
  21566. __pyx_t_1 = (__pyx_v_enabled != 0);
  21567. if (__pyx_t_1) {
  21568. /* "uvloop/loop.pyx":1071
  21569. *
  21570. * if enabled:
  21571. * if current_wrapper not in (None, wrapper): # <<<<<<<<<<<<<<
  21572. * _warn_with_source(
  21573. * "loop.set_debug(True): cannot set debug coroutine "
  21574. */
  21575. __Pyx_INCREF(__pyx_v_current_wrapper);
  21576. __pyx_t_2 = __pyx_v_current_wrapper;
  21577. __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1071, __pyx_L1_error)
  21578. __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(2, 1071, __pyx_L1_error)
  21579. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  21580. if (__pyx_t_7) {
  21581. } else {
  21582. __pyx_t_1 = __pyx_t_7;
  21583. goto __pyx_L8_bool_binop_done;
  21584. }
  21585. __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_v_wrapper, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1071, __pyx_L1_error)
  21586. __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(2, 1071, __pyx_L1_error)
  21587. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  21588. __pyx_t_1 = __pyx_t_7;
  21589. __pyx_L8_bool_binop_done:;
  21590. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  21591. __pyx_t_7 = (__pyx_t_1 != 0);
  21592. if (__pyx_t_7) {
  21593. /* "uvloop/loop.pyx":1074
  21594. * _warn_with_source(
  21595. * "loop.set_debug(True): cannot set debug coroutine "
  21596. * "wrapper; another wrapper is already set %r" % # <<<<<<<<<<<<<<
  21597. * current_wrapper, RuntimeWarning, self)
  21598. * else:
  21599. */
  21600. __pyx_t_2 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_loop_set_debug_True_cannot_set_d, __pyx_v_current_wrapper); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1074, __pyx_L1_error)
  21601. __Pyx_GOTREF(__pyx_t_2);
  21602. /* "uvloop/loop.pyx":1072
  21603. * if enabled:
  21604. * if current_wrapper not in (None, wrapper):
  21605. * _warn_with_source( # <<<<<<<<<<<<<<
  21606. * "loop.set_debug(True): cannot set debug coroutine "
  21607. * "wrapper; another wrapper is already set %r" %
  21608. */
  21609. __pyx_t_4 = __pyx_f_6uvloop_4loop__warn_with_source(__pyx_t_2, __pyx_builtin_RuntimeWarning, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1072, __pyx_L1_error)
  21610. __Pyx_GOTREF(__pyx_t_4);
  21611. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  21612. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  21613. /* "uvloop/loop.pyx":1071
  21614. *
  21615. * if enabled:
  21616. * if current_wrapper not in (None, wrapper): # <<<<<<<<<<<<<<
  21617. * _warn_with_source(
  21618. * "loop.set_debug(True): cannot set debug coroutine "
  21619. */
  21620. goto __pyx_L7;
  21621. }
  21622. /* "uvloop/loop.pyx":1077
  21623. * current_wrapper, RuntimeWarning, self)
  21624. * else:
  21625. * sys_set_coroutine_wrapper(wrapper) # <<<<<<<<<<<<<<
  21626. * self._coroutine_debug_set = True
  21627. * else:
  21628. */
  21629. /*else*/ {
  21630. __Pyx_INCREF(__pyx_v_6uvloop_4loop_sys_set_coroutine_wrapper);
  21631. __pyx_t_2 = __pyx_v_6uvloop_4loop_sys_set_coroutine_wrapper; __pyx_t_3 = NULL;
  21632. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
  21633. __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
  21634. if (likely(__pyx_t_3)) {
  21635. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  21636. __Pyx_INCREF(__pyx_t_3);
  21637. __Pyx_INCREF(function);
  21638. __Pyx_DECREF_SET(__pyx_t_2, function);
  21639. }
  21640. }
  21641. __pyx_t_4 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_wrapper) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_wrapper);
  21642. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  21643. if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1077, __pyx_L1_error)
  21644. __Pyx_GOTREF(__pyx_t_4);
  21645. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  21646. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  21647. /* "uvloop/loop.pyx":1078
  21648. * else:
  21649. * sys_set_coroutine_wrapper(wrapper)
  21650. * self._coroutine_debug_set = True # <<<<<<<<<<<<<<
  21651. * else:
  21652. * if current_wrapper not in (None, wrapper):
  21653. */
  21654. __pyx_v_self->_coroutine_debug_set = 1;
  21655. }
  21656. __pyx_L7:;
  21657. /* "uvloop/loop.pyx":1070
  21658. * current_wrapper = sys_get_coroutine_wrapper()
  21659. *
  21660. * if enabled: # <<<<<<<<<<<<<<
  21661. * if current_wrapper not in (None, wrapper):
  21662. * _warn_with_source(
  21663. */
  21664. goto __pyx_L6;
  21665. }
  21666. /* "uvloop/loop.pyx":1080
  21667. * self._coroutine_debug_set = True
  21668. * else:
  21669. * if current_wrapper not in (None, wrapper): # <<<<<<<<<<<<<<
  21670. * _warn_with_source(
  21671. * "loop.set_debug(False): cannot unset debug coroutine "
  21672. */
  21673. /*else*/ {
  21674. __Pyx_INCREF(__pyx_v_current_wrapper);
  21675. __pyx_t_4 = __pyx_v_current_wrapper;
  21676. __pyx_t_2 = PyObject_RichCompare(__pyx_t_4, Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1080, __pyx_L1_error)
  21677. __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 1080, __pyx_L1_error)
  21678. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  21679. if (__pyx_t_1) {
  21680. } else {
  21681. __pyx_t_7 = __pyx_t_1;
  21682. goto __pyx_L11_bool_binop_done;
  21683. }
  21684. __pyx_t_2 = PyObject_RichCompare(__pyx_t_4, __pyx_v_wrapper, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1080, __pyx_L1_error)
  21685. __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 1080, __pyx_L1_error)
  21686. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  21687. __pyx_t_7 = __pyx_t_1;
  21688. __pyx_L11_bool_binop_done:;
  21689. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  21690. __pyx_t_1 = (__pyx_t_7 != 0);
  21691. if (__pyx_t_1) {
  21692. /* "uvloop/loop.pyx":1083
  21693. * _warn_with_source(
  21694. * "loop.set_debug(False): cannot unset debug coroutine "
  21695. * "wrapper; another wrapper was set %r" % # <<<<<<<<<<<<<<
  21696. * current_wrapper, RuntimeWarning, self)
  21697. * else:
  21698. */
  21699. __pyx_t_4 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_loop_set_debug_False_cannot_unse, __pyx_v_current_wrapper); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1083, __pyx_L1_error)
  21700. __Pyx_GOTREF(__pyx_t_4);
  21701. /* "uvloop/loop.pyx":1081
  21702. * else:
  21703. * if current_wrapper not in (None, wrapper):
  21704. * _warn_with_source( # <<<<<<<<<<<<<<
  21705. * "loop.set_debug(False): cannot unset debug coroutine "
  21706. * "wrapper; another wrapper was set %r" %
  21707. */
  21708. __pyx_t_2 = __pyx_f_6uvloop_4loop__warn_with_source(__pyx_t_4, __pyx_builtin_RuntimeWarning, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1081, __pyx_L1_error)
  21709. __Pyx_GOTREF(__pyx_t_2);
  21710. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  21711. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  21712. /* "uvloop/loop.pyx":1080
  21713. * self._coroutine_debug_set = True
  21714. * else:
  21715. * if current_wrapper not in (None, wrapper): # <<<<<<<<<<<<<<
  21716. * _warn_with_source(
  21717. * "loop.set_debug(False): cannot unset debug coroutine "
  21718. */
  21719. goto __pyx_L10;
  21720. }
  21721. /* "uvloop/loop.pyx":1086
  21722. * current_wrapper, RuntimeWarning, self)
  21723. * else:
  21724. * sys_set_coroutine_wrapper(None) # <<<<<<<<<<<<<<
  21725. * self._coroutine_debug_set = False
  21726. *
  21727. */
  21728. /*else*/ {
  21729. __Pyx_INCREF(__pyx_v_6uvloop_4loop_sys_set_coroutine_wrapper);
  21730. __pyx_t_4 = __pyx_v_6uvloop_4loop_sys_set_coroutine_wrapper; __pyx_t_3 = NULL;
  21731. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
  21732. __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
  21733. if (likely(__pyx_t_3)) {
  21734. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  21735. __Pyx_INCREF(__pyx_t_3);
  21736. __Pyx_INCREF(function);
  21737. __Pyx_DECREF_SET(__pyx_t_4, function);
  21738. }
  21739. }
  21740. __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_3, Py_None) : __Pyx_PyObject_CallOneArg(__pyx_t_4, Py_None);
  21741. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  21742. if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1086, __pyx_L1_error)
  21743. __Pyx_GOTREF(__pyx_t_2);
  21744. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  21745. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  21746. /* "uvloop/loop.pyx":1087
  21747. * else:
  21748. * sys_set_coroutine_wrapper(None)
  21749. * self._coroutine_debug_set = False # <<<<<<<<<<<<<<
  21750. *
  21751. * def _get_backend_id(self):
  21752. */
  21753. __pyx_v_self->_coroutine_debug_set = 0;
  21754. }
  21755. __pyx_L10:;
  21756. }
  21757. __pyx_L6:;
  21758. }
  21759. __pyx_L4:;
  21760. /* "uvloop/loop.pyx":1050
  21761. * raise convert_error(-errno.errno)
  21762. *
  21763. * cdef _set_coroutine_debug(self, bint enabled): # <<<<<<<<<<<<<<
  21764. * enabled = bool(enabled)
  21765. * if self._coroutine_debug_set == enabled:
  21766. */
  21767. /* function exit code */
  21768. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  21769. goto __pyx_L0;
  21770. __pyx_L1_error:;
  21771. __Pyx_XDECREF(__pyx_t_2);
  21772. __Pyx_XDECREF(__pyx_t_3);
  21773. __Pyx_XDECREF(__pyx_t_4);
  21774. __Pyx_XDECREF(__pyx_t_6);
  21775. __Pyx_AddTraceback("uvloop.loop.Loop._set_coroutine_debug", __pyx_clineno, __pyx_lineno, __pyx_filename);
  21776. __pyx_r = 0;
  21777. __pyx_L0:;
  21778. __Pyx_XDECREF(__pyx_v_wrapper);
  21779. __Pyx_XDECREF(__pyx_v_current_wrapper);
  21780. __Pyx_XGIVEREF(__pyx_r);
  21781. __Pyx_RefNannyFinishContext();
  21782. return __pyx_r;
  21783. }
  21784. /* "uvloop/loop.pyx":1089
  21785. * self._coroutine_debug_set = False
  21786. *
  21787. * def _get_backend_id(self): # <<<<<<<<<<<<<<
  21788. * """This method is used by uvloop tests and is not part of the API."""
  21789. * return uv.uv_backend_fd(self.uvloop)
  21790. */
  21791. /* Python wrapper */
  21792. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_9_get_backend_id(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  21793. static char __pyx_doc_6uvloop_4loop_4Loop_8_get_backend_id[] = "Loop._get_backend_id(self)\nThis method is used by uvloop tests and is not part of the API.";
  21794. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_9_get_backend_id(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  21795. PyObject *__pyx_r = 0;
  21796. __Pyx_RefNannyDeclarations
  21797. __Pyx_RefNannySetupContext("_get_backend_id (wrapper)", 0);
  21798. __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_8_get_backend_id(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self));
  21799. /* function exit code */
  21800. __Pyx_RefNannyFinishContext();
  21801. return __pyx_r;
  21802. }
  21803. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_8_get_backend_id(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) {
  21804. PyObject *__pyx_r = NULL;
  21805. __Pyx_RefNannyDeclarations
  21806. PyObject *__pyx_t_1 = NULL;
  21807. __Pyx_RefNannySetupContext("_get_backend_id", 0);
  21808. /* "uvloop/loop.pyx":1091
  21809. * def _get_backend_id(self):
  21810. * """This method is used by uvloop tests and is not part of the API."""
  21811. * return uv.uv_backend_fd(self.uvloop) # <<<<<<<<<<<<<<
  21812. *
  21813. * cdef _print_debug_info(self):
  21814. */
  21815. __Pyx_XDECREF(__pyx_r);
  21816. __pyx_t_1 = __Pyx_PyInt_From_int(uv_backend_fd(__pyx_v_self->uvloop)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1091, __pyx_L1_error)
  21817. __Pyx_GOTREF(__pyx_t_1);
  21818. __pyx_r = __pyx_t_1;
  21819. __pyx_t_1 = 0;
  21820. goto __pyx_L0;
  21821. /* "uvloop/loop.pyx":1089
  21822. * self._coroutine_debug_set = False
  21823. *
  21824. * def _get_backend_id(self): # <<<<<<<<<<<<<<
  21825. * """This method is used by uvloop tests and is not part of the API."""
  21826. * return uv.uv_backend_fd(self.uvloop)
  21827. */
  21828. /* function exit code */
  21829. __pyx_L1_error:;
  21830. __Pyx_XDECREF(__pyx_t_1);
  21831. __Pyx_AddTraceback("uvloop.loop.Loop._get_backend_id", __pyx_clineno, __pyx_lineno, __pyx_filename);
  21832. __pyx_r = NULL;
  21833. __pyx_L0:;
  21834. __Pyx_XGIVEREF(__pyx_r);
  21835. __Pyx_RefNannyFinishContext();
  21836. return __pyx_r;
  21837. }
  21838. /* "uvloop/loop.pyx":1093
  21839. * return uv.uv_backend_fd(self.uvloop)
  21840. *
  21841. * cdef _print_debug_info(self): # <<<<<<<<<<<<<<
  21842. * cdef:
  21843. * int err
  21844. */
  21845. static PyObject *__pyx_f_6uvloop_4loop_4Loop__print_debug_info(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) {
  21846. int __pyx_v_err;
  21847. uv_rusage_t __pyx_v_rusage;
  21848. PyObject *__pyx_v_name = NULL;
  21849. PyObject *__pyx_r = NULL;
  21850. __Pyx_RefNannyDeclarations
  21851. int __pyx_t_1;
  21852. PyObject *__pyx_t_2 = NULL;
  21853. PyObject *__pyx_t_3 = NULL;
  21854. PyObject *__pyx_t_4 = NULL;
  21855. PyObject *__pyx_t_5 = NULL;
  21856. PyObject *__pyx_t_6 = NULL;
  21857. int __pyx_t_7;
  21858. PyObject *__pyx_t_8 = NULL;
  21859. int __pyx_t_9;
  21860. Py_ssize_t __pyx_t_10;
  21861. PyObject *__pyx_t_11 = NULL;
  21862. PyObject *__pyx_t_12 = NULL;
  21863. __Pyx_RefNannySetupContext("_print_debug_info", 0);
  21864. /* "uvloop/loop.pyx":1098
  21865. * uv.uv_rusage_t rusage
  21866. *
  21867. * err = uv.uv_getrusage(&rusage) # <<<<<<<<<<<<<<
  21868. * if err < 0:
  21869. * raise convert_error(err)
  21870. */
  21871. __pyx_v_err = uv_getrusage((&__pyx_v_rusage));
  21872. /* "uvloop/loop.pyx":1099
  21873. *
  21874. * err = uv.uv_getrusage(&rusage)
  21875. * if err < 0: # <<<<<<<<<<<<<<
  21876. * raise convert_error(err)
  21877. *
  21878. */
  21879. __pyx_t_1 = ((__pyx_v_err < 0) != 0);
  21880. if (unlikely(__pyx_t_1)) {
  21881. /* "uvloop/loop.pyx":1100
  21882. * err = uv.uv_getrusage(&rusage)
  21883. * if err < 0:
  21884. * raise convert_error(err) # <<<<<<<<<<<<<<
  21885. *
  21886. * # OS
  21887. */
  21888. __pyx_t_2 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1100, __pyx_L1_error)
  21889. __Pyx_GOTREF(__pyx_t_2);
  21890. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  21891. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  21892. __PYX_ERR(2, 1100, __pyx_L1_error)
  21893. /* "uvloop/loop.pyx":1099
  21894. *
  21895. * err = uv.uv_getrusage(&rusage)
  21896. * if err < 0: # <<<<<<<<<<<<<<
  21897. * raise convert_error(err)
  21898. *
  21899. */
  21900. }
  21901. /* "uvloop/loop.pyx":1104
  21902. * # OS
  21903. *
  21904. * print('---- Process info: -----') # <<<<<<<<<<<<<<
  21905. * print('Process memory: {}'.format(rusage.ru_maxrss))
  21906. * print('Number of signals: {}'.format(rusage.ru_nsignals))
  21907. */
  21908. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1104, __pyx_L1_error)
  21909. __Pyx_GOTREF(__pyx_t_2);
  21910. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  21911. /* "uvloop/loop.pyx":1105
  21912. *
  21913. * print('---- Process info: -----')
  21914. * print('Process memory: {}'.format(rusage.ru_maxrss)) # <<<<<<<<<<<<<<
  21915. * print('Number of signals: {}'.format(rusage.ru_nsignals))
  21916. * print('')
  21917. */
  21918. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Process_memory, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1105, __pyx_L1_error)
  21919. __Pyx_GOTREF(__pyx_t_3);
  21920. __pyx_t_4 = __Pyx_PyInt_From_uint64_t(__pyx_v_rusage.ru_maxrss); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1105, __pyx_L1_error)
  21921. __Pyx_GOTREF(__pyx_t_4);
  21922. __pyx_t_5 = NULL;
  21923. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
  21924. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
  21925. if (likely(__pyx_t_5)) {
  21926. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  21927. __Pyx_INCREF(__pyx_t_5);
  21928. __Pyx_INCREF(function);
  21929. __Pyx_DECREF_SET(__pyx_t_3, function);
  21930. }
  21931. }
  21932. __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
  21933. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  21934. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  21935. if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1105, __pyx_L1_error)
  21936. __Pyx_GOTREF(__pyx_t_2);
  21937. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  21938. __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1105, __pyx_L1_error)
  21939. __Pyx_GOTREF(__pyx_t_3);
  21940. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  21941. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  21942. /* "uvloop/loop.pyx":1106
  21943. * print('---- Process info: -----')
  21944. * print('Process memory: {}'.format(rusage.ru_maxrss))
  21945. * print('Number of signals: {}'.format(rusage.ru_nsignals)) # <<<<<<<<<<<<<<
  21946. * print('')
  21947. *
  21948. */
  21949. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Number_of_signals, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1106, __pyx_L1_error)
  21950. __Pyx_GOTREF(__pyx_t_2);
  21951. __pyx_t_4 = __Pyx_PyInt_From_uint64_t(__pyx_v_rusage.ru_nsignals); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1106, __pyx_L1_error)
  21952. __Pyx_GOTREF(__pyx_t_4);
  21953. __pyx_t_5 = NULL;
  21954. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
  21955. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
  21956. if (likely(__pyx_t_5)) {
  21957. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  21958. __Pyx_INCREF(__pyx_t_5);
  21959. __Pyx_INCREF(function);
  21960. __Pyx_DECREF_SET(__pyx_t_2, function);
  21961. }
  21962. }
  21963. __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
  21964. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  21965. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  21966. if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1106, __pyx_L1_error)
  21967. __Pyx_GOTREF(__pyx_t_3);
  21968. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  21969. __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1106, __pyx_L1_error)
  21970. __Pyx_GOTREF(__pyx_t_2);
  21971. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  21972. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  21973. /* "uvloop/loop.pyx":1107
  21974. * print('Process memory: {}'.format(rusage.ru_maxrss))
  21975. * print('Number of signals: {}'.format(rusage.ru_nsignals))
  21976. * print('') # <<<<<<<<<<<<<<
  21977. *
  21978. * # Loop
  21979. */
  21980. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1107, __pyx_L1_error)
  21981. __Pyx_GOTREF(__pyx_t_2);
  21982. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  21983. /* "uvloop/loop.pyx":1111
  21984. * # Loop
  21985. *
  21986. * print('--- Loop debug info: ---') # <<<<<<<<<<<<<<
  21987. * print('Loop time: {}'.format(self.time()))
  21988. * print('Errors logged: {}'.format(
  21989. */
  21990. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__21, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1111, __pyx_L1_error)
  21991. __Pyx_GOTREF(__pyx_t_2);
  21992. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  21993. /* "uvloop/loop.pyx":1112
  21994. *
  21995. * print('--- Loop debug info: ---')
  21996. * print('Loop time: {}'.format(self.time())) # <<<<<<<<<<<<<<
  21997. * print('Errors logged: {}'.format(
  21998. * self._debug_exception_handler_cnt))
  21999. */
  22000. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Loop_time, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1112, __pyx_L1_error)
  22001. __Pyx_GOTREF(__pyx_t_3);
  22002. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_time); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1112, __pyx_L1_error)
  22003. __Pyx_GOTREF(__pyx_t_5);
  22004. __pyx_t_6 = NULL;
  22005. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
  22006. __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
  22007. if (likely(__pyx_t_6)) {
  22008. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
  22009. __Pyx_INCREF(__pyx_t_6);
  22010. __Pyx_INCREF(function);
  22011. __Pyx_DECREF_SET(__pyx_t_5, function);
  22012. }
  22013. }
  22014. __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
  22015. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  22016. if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1112, __pyx_L1_error)
  22017. __Pyx_GOTREF(__pyx_t_4);
  22018. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  22019. __pyx_t_5 = NULL;
  22020. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
  22021. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
  22022. if (likely(__pyx_t_5)) {
  22023. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  22024. __Pyx_INCREF(__pyx_t_5);
  22025. __Pyx_INCREF(function);
  22026. __Pyx_DECREF_SET(__pyx_t_3, function);
  22027. }
  22028. }
  22029. __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
  22030. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  22031. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  22032. if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1112, __pyx_L1_error)
  22033. __Pyx_GOTREF(__pyx_t_2);
  22034. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  22035. __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1112, __pyx_L1_error)
  22036. __Pyx_GOTREF(__pyx_t_3);
  22037. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  22038. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  22039. /* "uvloop/loop.pyx":1113
  22040. * print('--- Loop debug info: ---')
  22041. * print('Loop time: {}'.format(self.time()))
  22042. * print('Errors logged: {}'.format( # <<<<<<<<<<<<<<
  22043. * self._debug_exception_handler_cnt))
  22044. * print()
  22045. */
  22046. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Errors_logged, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1113, __pyx_L1_error)
  22047. __Pyx_GOTREF(__pyx_t_2);
  22048. /* "uvloop/loop.pyx":1114
  22049. * print('Loop time: {}'.format(self.time()))
  22050. * print('Errors logged: {}'.format(
  22051. * self._debug_exception_handler_cnt)) # <<<<<<<<<<<<<<
  22052. * print()
  22053. * print('Callback handles: {: <8} | {}'.format(
  22054. */
  22055. __pyx_t_4 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_debug_exception_handler_cnt); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1114, __pyx_L1_error)
  22056. __Pyx_GOTREF(__pyx_t_4);
  22057. __pyx_t_5 = NULL;
  22058. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
  22059. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
  22060. if (likely(__pyx_t_5)) {
  22061. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  22062. __Pyx_INCREF(__pyx_t_5);
  22063. __Pyx_INCREF(function);
  22064. __Pyx_DECREF_SET(__pyx_t_2, function);
  22065. }
  22066. }
  22067. __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
  22068. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  22069. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  22070. if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1113, __pyx_L1_error)
  22071. __Pyx_GOTREF(__pyx_t_3);
  22072. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  22073. /* "uvloop/loop.pyx":1113
  22074. * print('--- Loop debug info: ---')
  22075. * print('Loop time: {}'.format(self.time()))
  22076. * print('Errors logged: {}'.format( # <<<<<<<<<<<<<<
  22077. * self._debug_exception_handler_cnt))
  22078. * print()
  22079. */
  22080. __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1113, __pyx_L1_error)
  22081. __Pyx_GOTREF(__pyx_t_2);
  22082. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  22083. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  22084. /* "uvloop/loop.pyx":1115
  22085. * print('Errors logged: {}'.format(
  22086. * self._debug_exception_handler_cnt))
  22087. * print() # <<<<<<<<<<<<<<
  22088. * print('Callback handles: {: <8} | {}'.format(
  22089. * self._debug_cb_handles_count,
  22090. */
  22091. __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_builtin_print); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1115, __pyx_L1_error)
  22092. __Pyx_GOTREF(__pyx_t_2);
  22093. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  22094. /* "uvloop/loop.pyx":1116
  22095. * self._debug_exception_handler_cnt))
  22096. * print()
  22097. * print('Callback handles: {: <8} | {}'.format( # <<<<<<<<<<<<<<
  22098. * self._debug_cb_handles_count,
  22099. * self._debug_cb_handles_total))
  22100. */
  22101. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Callback_handles_8, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1116, __pyx_L1_error)
  22102. __Pyx_GOTREF(__pyx_t_3);
  22103. /* "uvloop/loop.pyx":1117
  22104. * print()
  22105. * print('Callback handles: {: <8} | {}'.format(
  22106. * self._debug_cb_handles_count, # <<<<<<<<<<<<<<
  22107. * self._debug_cb_handles_total))
  22108. * print('Timer handles: {: <8} | {}'.format(
  22109. */
  22110. __pyx_t_4 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_debug_cb_handles_count); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1117, __pyx_L1_error)
  22111. __Pyx_GOTREF(__pyx_t_4);
  22112. /* "uvloop/loop.pyx":1118
  22113. * print('Callback handles: {: <8} | {}'.format(
  22114. * self._debug_cb_handles_count,
  22115. * self._debug_cb_handles_total)) # <<<<<<<<<<<<<<
  22116. * print('Timer handles: {: <8} | {}'.format(
  22117. * self._debug_cb_timer_handles_count,
  22118. */
  22119. __pyx_t_5 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_debug_cb_handles_total); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1118, __pyx_L1_error)
  22120. __Pyx_GOTREF(__pyx_t_5);
  22121. __pyx_t_6 = NULL;
  22122. __pyx_t_7 = 0;
  22123. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
  22124. __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
  22125. if (likely(__pyx_t_6)) {
  22126. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  22127. __Pyx_INCREF(__pyx_t_6);
  22128. __Pyx_INCREF(function);
  22129. __Pyx_DECREF_SET(__pyx_t_3, function);
  22130. __pyx_t_7 = 1;
  22131. }
  22132. }
  22133. #if CYTHON_FAST_PYCALL
  22134. if (PyFunction_Check(__pyx_t_3)) {
  22135. PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_4, __pyx_t_5};
  22136. __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1116, __pyx_L1_error)
  22137. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  22138. __Pyx_GOTREF(__pyx_t_2);
  22139. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  22140. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  22141. } else
  22142. #endif
  22143. #if CYTHON_FAST_PYCCALL
  22144. if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
  22145. PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_4, __pyx_t_5};
  22146. __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1116, __pyx_L1_error)
  22147. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  22148. __Pyx_GOTREF(__pyx_t_2);
  22149. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  22150. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  22151. } else
  22152. #endif
  22153. {
  22154. __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1116, __pyx_L1_error)
  22155. __Pyx_GOTREF(__pyx_t_8);
  22156. if (__pyx_t_6) {
  22157. __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
  22158. }
  22159. __Pyx_GIVEREF(__pyx_t_4);
  22160. PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_4);
  22161. __Pyx_GIVEREF(__pyx_t_5);
  22162. PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_5);
  22163. __pyx_t_4 = 0;
  22164. __pyx_t_5 = 0;
  22165. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1116, __pyx_L1_error)
  22166. __Pyx_GOTREF(__pyx_t_2);
  22167. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  22168. }
  22169. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  22170. /* "uvloop/loop.pyx":1116
  22171. * self._debug_exception_handler_cnt))
  22172. * print()
  22173. * print('Callback handles: {: <8} | {}'.format( # <<<<<<<<<<<<<<
  22174. * self._debug_cb_handles_count,
  22175. * self._debug_cb_handles_total))
  22176. */
  22177. __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1116, __pyx_L1_error)
  22178. __Pyx_GOTREF(__pyx_t_3);
  22179. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  22180. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  22181. /* "uvloop/loop.pyx":1119
  22182. * self._debug_cb_handles_count,
  22183. * self._debug_cb_handles_total))
  22184. * print('Timer handles: {: <8} | {}'.format( # <<<<<<<<<<<<<<
  22185. * self._debug_cb_timer_handles_count,
  22186. * self._debug_cb_timer_handles_total))
  22187. */
  22188. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Timer_handles_8, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1119, __pyx_L1_error)
  22189. __Pyx_GOTREF(__pyx_t_2);
  22190. /* "uvloop/loop.pyx":1120
  22191. * self._debug_cb_handles_total))
  22192. * print('Timer handles: {: <8} | {}'.format(
  22193. * self._debug_cb_timer_handles_count, # <<<<<<<<<<<<<<
  22194. * self._debug_cb_timer_handles_total))
  22195. * print()
  22196. */
  22197. __pyx_t_8 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_debug_cb_timer_handles_count); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1120, __pyx_L1_error)
  22198. __Pyx_GOTREF(__pyx_t_8);
  22199. /* "uvloop/loop.pyx":1121
  22200. * print('Timer handles: {: <8} | {}'.format(
  22201. * self._debug_cb_timer_handles_count,
  22202. * self._debug_cb_timer_handles_total)) # <<<<<<<<<<<<<<
  22203. * print()
  22204. *
  22205. */
  22206. __pyx_t_5 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_debug_cb_timer_handles_total); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1121, __pyx_L1_error)
  22207. __Pyx_GOTREF(__pyx_t_5);
  22208. __pyx_t_4 = NULL;
  22209. __pyx_t_7 = 0;
  22210. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
  22211. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
  22212. if (likely(__pyx_t_4)) {
  22213. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  22214. __Pyx_INCREF(__pyx_t_4);
  22215. __Pyx_INCREF(function);
  22216. __Pyx_DECREF_SET(__pyx_t_2, function);
  22217. __pyx_t_7 = 1;
  22218. }
  22219. }
  22220. #if CYTHON_FAST_PYCALL
  22221. if (PyFunction_Check(__pyx_t_2)) {
  22222. PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_8, __pyx_t_5};
  22223. __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1119, __pyx_L1_error)
  22224. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  22225. __Pyx_GOTREF(__pyx_t_3);
  22226. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  22227. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  22228. } else
  22229. #endif
  22230. #if CYTHON_FAST_PYCCALL
  22231. if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
  22232. PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_8, __pyx_t_5};
  22233. __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1119, __pyx_L1_error)
  22234. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  22235. __Pyx_GOTREF(__pyx_t_3);
  22236. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  22237. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  22238. } else
  22239. #endif
  22240. {
  22241. __pyx_t_6 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1119, __pyx_L1_error)
  22242. __Pyx_GOTREF(__pyx_t_6);
  22243. if (__pyx_t_4) {
  22244. __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
  22245. }
  22246. __Pyx_GIVEREF(__pyx_t_8);
  22247. PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_7, __pyx_t_8);
  22248. __Pyx_GIVEREF(__pyx_t_5);
  22249. PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_7, __pyx_t_5);
  22250. __pyx_t_8 = 0;
  22251. __pyx_t_5 = 0;
  22252. __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1119, __pyx_L1_error)
  22253. __Pyx_GOTREF(__pyx_t_3);
  22254. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  22255. }
  22256. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  22257. /* "uvloop/loop.pyx":1119
  22258. * self._debug_cb_handles_count,
  22259. * self._debug_cb_handles_total))
  22260. * print('Timer handles: {: <8} | {}'.format( # <<<<<<<<<<<<<<
  22261. * self._debug_cb_timer_handles_count,
  22262. * self._debug_cb_timer_handles_total))
  22263. */
  22264. __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1119, __pyx_L1_error)
  22265. __Pyx_GOTREF(__pyx_t_2);
  22266. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  22267. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  22268. /* "uvloop/loop.pyx":1122
  22269. * self._debug_cb_timer_handles_count,
  22270. * self._debug_cb_timer_handles_total))
  22271. * print() # <<<<<<<<<<<<<<
  22272. *
  22273. * print(' alive | closed |')
  22274. */
  22275. __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_builtin_print); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1122, __pyx_L1_error)
  22276. __Pyx_GOTREF(__pyx_t_2);
  22277. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  22278. /* "uvloop/loop.pyx":1124
  22279. * print()
  22280. *
  22281. * print(' alive | closed |') # <<<<<<<<<<<<<<
  22282. * print('UVHandles python | libuv | total')
  22283. * print(' objs | handles |')
  22284. */
  22285. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__22, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1124, __pyx_L1_error)
  22286. __Pyx_GOTREF(__pyx_t_2);
  22287. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  22288. /* "uvloop/loop.pyx":1125
  22289. *
  22290. * print(' alive | closed |')
  22291. * print('UVHandles python | libuv | total') # <<<<<<<<<<<<<<
  22292. * print(' objs | handles |')
  22293. * print('-------------------------------+---------+---------')
  22294. */
  22295. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__23, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1125, __pyx_L1_error)
  22296. __Pyx_GOTREF(__pyx_t_2);
  22297. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  22298. /* "uvloop/loop.pyx":1126
  22299. * print(' alive | closed |')
  22300. * print('UVHandles python | libuv | total')
  22301. * print(' objs | handles |') # <<<<<<<<<<<<<<
  22302. * print('-------------------------------+---------+---------')
  22303. * for name in sorted(self._debug_handles_total):
  22304. */
  22305. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__24, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1126, __pyx_L1_error)
  22306. __Pyx_GOTREF(__pyx_t_2);
  22307. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  22308. /* "uvloop/loop.pyx":1127
  22309. * print('UVHandles python | libuv | total')
  22310. * print(' objs | handles |')
  22311. * print('-------------------------------+---------+---------') # <<<<<<<<<<<<<<
  22312. * for name in sorted(self._debug_handles_total):
  22313. * print(' {: <18} {: >7} | {: >7} | {: >7}'.format(
  22314. */
  22315. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__26, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1127, __pyx_L1_error)
  22316. __Pyx_GOTREF(__pyx_t_2);
  22317. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  22318. /* "uvloop/loop.pyx":1128
  22319. * print(' objs | handles |')
  22320. * print('-------------------------------+---------+---------')
  22321. * for name in sorted(self._debug_handles_total): # <<<<<<<<<<<<<<
  22322. * print(' {: <18} {: >7} | {: >7} | {: >7}'.format(
  22323. * name,
  22324. */
  22325. __pyx_t_3 = __pyx_v_self->_debug_handles_total;
  22326. __Pyx_INCREF(__pyx_t_3);
  22327. __pyx_t_6 = PySequence_List(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1128, __pyx_L1_error)
  22328. __Pyx_GOTREF(__pyx_t_6);
  22329. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  22330. __pyx_t_2 = ((PyObject*)__pyx_t_6);
  22331. __pyx_t_6 = 0;
  22332. __pyx_t_9 = PyList_Sort(__pyx_t_2); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(2, 1128, __pyx_L1_error)
  22333. if (unlikely(__pyx_t_2 == Py_None)) {
  22334. PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
  22335. __PYX_ERR(2, 1128, __pyx_L1_error)
  22336. }
  22337. __pyx_t_6 = __pyx_t_2; __Pyx_INCREF(__pyx_t_6); __pyx_t_10 = 0;
  22338. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  22339. for (;;) {
  22340. if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_6)) break;
  22341. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  22342. __pyx_t_2 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_10); __Pyx_INCREF(__pyx_t_2); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(2, 1128, __pyx_L1_error)
  22343. #else
  22344. __pyx_t_2 = PySequence_ITEM(__pyx_t_6, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1128, __pyx_L1_error)
  22345. __Pyx_GOTREF(__pyx_t_2);
  22346. #endif
  22347. __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_2);
  22348. __pyx_t_2 = 0;
  22349. /* "uvloop/loop.pyx":1129
  22350. * print('-------------------------------+---------+---------')
  22351. * for name in sorted(self._debug_handles_total):
  22352. * print(' {: <18} {: >7} | {: >7} | {: >7}'.format( # <<<<<<<<<<<<<<
  22353. * name,
  22354. * self._debug_handles_current[name],
  22355. */
  22356. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_18_7_7_7, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1129, __pyx_L1_error)
  22357. __Pyx_GOTREF(__pyx_t_3);
  22358. /* "uvloop/loop.pyx":1131
  22359. * print(' {: <18} {: >7} | {: >7} | {: >7}'.format(
  22360. * name,
  22361. * self._debug_handles_current[name], # <<<<<<<<<<<<<<
  22362. * self._debug_handles_closed[name],
  22363. * self._debug_handles_total[name]))
  22364. */
  22365. __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_v_self->_debug_handles_current, __pyx_v_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1131, __pyx_L1_error)
  22366. __Pyx_GOTREF(__pyx_t_5);
  22367. /* "uvloop/loop.pyx":1132
  22368. * name,
  22369. * self._debug_handles_current[name],
  22370. * self._debug_handles_closed[name], # <<<<<<<<<<<<<<
  22371. * self._debug_handles_total[name]))
  22372. * print()
  22373. */
  22374. __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_v_self->_debug_handles_closed, __pyx_v_name); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1132, __pyx_L1_error)
  22375. __Pyx_GOTREF(__pyx_t_8);
  22376. /* "uvloop/loop.pyx":1133
  22377. * self._debug_handles_current[name],
  22378. * self._debug_handles_closed[name],
  22379. * self._debug_handles_total[name])) # <<<<<<<<<<<<<<
  22380. * print()
  22381. *
  22382. */
  22383. __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_self->_debug_handles_total, __pyx_v_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1133, __pyx_L1_error)
  22384. __Pyx_GOTREF(__pyx_t_4);
  22385. __pyx_t_11 = NULL;
  22386. __pyx_t_7 = 0;
  22387. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
  22388. __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_3);
  22389. if (likely(__pyx_t_11)) {
  22390. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  22391. __Pyx_INCREF(__pyx_t_11);
  22392. __Pyx_INCREF(function);
  22393. __Pyx_DECREF_SET(__pyx_t_3, function);
  22394. __pyx_t_7 = 1;
  22395. }
  22396. }
  22397. #if CYTHON_FAST_PYCALL
  22398. if (PyFunction_Check(__pyx_t_3)) {
  22399. PyObject *__pyx_temp[5] = {__pyx_t_11, __pyx_v_name, __pyx_t_5, __pyx_t_8, __pyx_t_4};
  22400. __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 4+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1129, __pyx_L1_error)
  22401. __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
  22402. __Pyx_GOTREF(__pyx_t_2);
  22403. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  22404. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  22405. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  22406. } else
  22407. #endif
  22408. #if CYTHON_FAST_PYCCALL
  22409. if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
  22410. PyObject *__pyx_temp[5] = {__pyx_t_11, __pyx_v_name, __pyx_t_5, __pyx_t_8, __pyx_t_4};
  22411. __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 4+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1129, __pyx_L1_error)
  22412. __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
  22413. __Pyx_GOTREF(__pyx_t_2);
  22414. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  22415. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  22416. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  22417. } else
  22418. #endif
  22419. {
  22420. __pyx_t_12 = PyTuple_New(4+__pyx_t_7); if (unlikely(!__pyx_t_12)) __PYX_ERR(2, 1129, __pyx_L1_error)
  22421. __Pyx_GOTREF(__pyx_t_12);
  22422. if (__pyx_t_11) {
  22423. __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_11); __pyx_t_11 = NULL;
  22424. }
  22425. __Pyx_INCREF(__pyx_v_name);
  22426. __Pyx_GIVEREF(__pyx_v_name);
  22427. PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_7, __pyx_v_name);
  22428. __Pyx_GIVEREF(__pyx_t_5);
  22429. PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_7, __pyx_t_5);
  22430. __Pyx_GIVEREF(__pyx_t_8);
  22431. PyTuple_SET_ITEM(__pyx_t_12, 2+__pyx_t_7, __pyx_t_8);
  22432. __Pyx_GIVEREF(__pyx_t_4);
  22433. PyTuple_SET_ITEM(__pyx_t_12, 3+__pyx_t_7, __pyx_t_4);
  22434. __pyx_t_5 = 0;
  22435. __pyx_t_8 = 0;
  22436. __pyx_t_4 = 0;
  22437. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1129, __pyx_L1_error)
  22438. __Pyx_GOTREF(__pyx_t_2);
  22439. __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  22440. }
  22441. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  22442. /* "uvloop/loop.pyx":1129
  22443. * print('-------------------------------+---------+---------')
  22444. * for name in sorted(self._debug_handles_total):
  22445. * print(' {: <18} {: >7} | {: >7} | {: >7}'.format( # <<<<<<<<<<<<<<
  22446. * name,
  22447. * self._debug_handles_current[name],
  22448. */
  22449. __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1129, __pyx_L1_error)
  22450. __Pyx_GOTREF(__pyx_t_3);
  22451. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  22452. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  22453. /* "uvloop/loop.pyx":1128
  22454. * print(' objs | handles |')
  22455. * print('-------------------------------+---------+---------')
  22456. * for name in sorted(self._debug_handles_total): # <<<<<<<<<<<<<<
  22457. * print(' {: <18} {: >7} | {: >7} | {: >7}'.format(
  22458. * name,
  22459. */
  22460. }
  22461. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  22462. /* "uvloop/loop.pyx":1134
  22463. * self._debug_handles_closed[name],
  22464. * self._debug_handles_total[name]))
  22465. * print() # <<<<<<<<<<<<<<
  22466. *
  22467. * print('uv_handle_t (current: {}; freed: {}; total: {})'.format(
  22468. */
  22469. __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_builtin_print); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1134, __pyx_L1_error)
  22470. __Pyx_GOTREF(__pyx_t_6);
  22471. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  22472. /* "uvloop/loop.pyx":1136
  22473. * print()
  22474. *
  22475. * print('uv_handle_t (current: {}; freed: {}; total: {})'.format( # <<<<<<<<<<<<<<
  22476. * self._debug_uv_handles_total - self._debug_uv_handles_freed,
  22477. * self._debug_uv_handles_freed,
  22478. */
  22479. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_uv_handle_t_current_freed_total, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1136, __pyx_L1_error)
  22480. __Pyx_GOTREF(__pyx_t_3);
  22481. /* "uvloop/loop.pyx":1137
  22482. *
  22483. * print('uv_handle_t (current: {}; freed: {}; total: {})'.format(
  22484. * self._debug_uv_handles_total - self._debug_uv_handles_freed, # <<<<<<<<<<<<<<
  22485. * self._debug_uv_handles_freed,
  22486. * self._debug_uv_handles_total))
  22487. */
  22488. __pyx_t_2 = __Pyx_PyInt_From_uint64_t((__pyx_v_self->_debug_uv_handles_total - __pyx_v_self->_debug_uv_handles_freed)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1137, __pyx_L1_error)
  22489. __Pyx_GOTREF(__pyx_t_2);
  22490. /* "uvloop/loop.pyx":1138
  22491. * print('uv_handle_t (current: {}; freed: {}; total: {})'.format(
  22492. * self._debug_uv_handles_total - self._debug_uv_handles_freed,
  22493. * self._debug_uv_handles_freed, # <<<<<<<<<<<<<<
  22494. * self._debug_uv_handles_total))
  22495. * print()
  22496. */
  22497. __pyx_t_12 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_debug_uv_handles_freed); if (unlikely(!__pyx_t_12)) __PYX_ERR(2, 1138, __pyx_L1_error)
  22498. __Pyx_GOTREF(__pyx_t_12);
  22499. /* "uvloop/loop.pyx":1139
  22500. * self._debug_uv_handles_total - self._debug_uv_handles_freed,
  22501. * self._debug_uv_handles_freed,
  22502. * self._debug_uv_handles_total)) # <<<<<<<<<<<<<<
  22503. * print()
  22504. *
  22505. */
  22506. __pyx_t_4 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_debug_uv_handles_total); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1139, __pyx_L1_error)
  22507. __Pyx_GOTREF(__pyx_t_4);
  22508. __pyx_t_8 = NULL;
  22509. __pyx_t_7 = 0;
  22510. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
  22511. __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
  22512. if (likely(__pyx_t_8)) {
  22513. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  22514. __Pyx_INCREF(__pyx_t_8);
  22515. __Pyx_INCREF(function);
  22516. __Pyx_DECREF_SET(__pyx_t_3, function);
  22517. __pyx_t_7 = 1;
  22518. }
  22519. }
  22520. #if CYTHON_FAST_PYCALL
  22521. if (PyFunction_Check(__pyx_t_3)) {
  22522. PyObject *__pyx_temp[4] = {__pyx_t_8, __pyx_t_2, __pyx_t_12, __pyx_t_4};
  22523. __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1136, __pyx_L1_error)
  22524. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  22525. __Pyx_GOTREF(__pyx_t_6);
  22526. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  22527. __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  22528. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  22529. } else
  22530. #endif
  22531. #if CYTHON_FAST_PYCCALL
  22532. if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
  22533. PyObject *__pyx_temp[4] = {__pyx_t_8, __pyx_t_2, __pyx_t_12, __pyx_t_4};
  22534. __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1136, __pyx_L1_error)
  22535. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  22536. __Pyx_GOTREF(__pyx_t_6);
  22537. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  22538. __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  22539. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  22540. } else
  22541. #endif
  22542. {
  22543. __pyx_t_5 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1136, __pyx_L1_error)
  22544. __Pyx_GOTREF(__pyx_t_5);
  22545. if (__pyx_t_8) {
  22546. __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_8); __pyx_t_8 = NULL;
  22547. }
  22548. __Pyx_GIVEREF(__pyx_t_2);
  22549. PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_7, __pyx_t_2);
  22550. __Pyx_GIVEREF(__pyx_t_12);
  22551. PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_7, __pyx_t_12);
  22552. __Pyx_GIVEREF(__pyx_t_4);
  22553. PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_7, __pyx_t_4);
  22554. __pyx_t_2 = 0;
  22555. __pyx_t_12 = 0;
  22556. __pyx_t_4 = 0;
  22557. __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1136, __pyx_L1_error)
  22558. __Pyx_GOTREF(__pyx_t_6);
  22559. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  22560. }
  22561. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  22562. /* "uvloop/loop.pyx":1136
  22563. * print()
  22564. *
  22565. * print('uv_handle_t (current: {}; freed: {}; total: {})'.format( # <<<<<<<<<<<<<<
  22566. * self._debug_uv_handles_total - self._debug_uv_handles_freed,
  22567. * self._debug_uv_handles_freed,
  22568. */
  22569. __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1136, __pyx_L1_error)
  22570. __Pyx_GOTREF(__pyx_t_3);
  22571. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  22572. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  22573. /* "uvloop/loop.pyx":1140
  22574. * self._debug_uv_handles_freed,
  22575. * self._debug_uv_handles_total))
  22576. * print() # <<<<<<<<<<<<<<
  22577. *
  22578. * print('--- Streams debug info: ---')
  22579. */
  22580. __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_builtin_print); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1140, __pyx_L1_error)
  22581. __Pyx_GOTREF(__pyx_t_3);
  22582. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  22583. /* "uvloop/loop.pyx":1142
  22584. * print()
  22585. *
  22586. * print('--- Streams debug info: ---') # <<<<<<<<<<<<<<
  22587. * print('Write errors: {}'.format(
  22588. * self._debug_stream_write_errors_total))
  22589. */
  22590. __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__27, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1142, __pyx_L1_error)
  22591. __Pyx_GOTREF(__pyx_t_3);
  22592. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  22593. /* "uvloop/loop.pyx":1143
  22594. *
  22595. * print('--- Streams debug info: ---')
  22596. * print('Write errors: {}'.format( # <<<<<<<<<<<<<<
  22597. * self._debug_stream_write_errors_total))
  22598. * print('Write without poll: {}'.format(
  22599. */
  22600. __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Write_errors, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1143, __pyx_L1_error)
  22601. __Pyx_GOTREF(__pyx_t_6);
  22602. /* "uvloop/loop.pyx":1144
  22603. * print('--- Streams debug info: ---')
  22604. * print('Write errors: {}'.format(
  22605. * self._debug_stream_write_errors_total)) # <<<<<<<<<<<<<<
  22606. * print('Write without poll: {}'.format(
  22607. * self._debug_stream_write_tries))
  22608. */
  22609. __pyx_t_5 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_debug_stream_write_errors_total); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1144, __pyx_L1_error)
  22610. __Pyx_GOTREF(__pyx_t_5);
  22611. __pyx_t_4 = NULL;
  22612. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
  22613. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
  22614. if (likely(__pyx_t_4)) {
  22615. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
  22616. __Pyx_INCREF(__pyx_t_4);
  22617. __Pyx_INCREF(function);
  22618. __Pyx_DECREF_SET(__pyx_t_6, function);
  22619. }
  22620. }
  22621. __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5);
  22622. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  22623. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  22624. if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1143, __pyx_L1_error)
  22625. __Pyx_GOTREF(__pyx_t_3);
  22626. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  22627. /* "uvloop/loop.pyx":1143
  22628. *
  22629. * print('--- Streams debug info: ---')
  22630. * print('Write errors: {}'.format( # <<<<<<<<<<<<<<
  22631. * self._debug_stream_write_errors_total))
  22632. * print('Write without poll: {}'.format(
  22633. */
  22634. __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1143, __pyx_L1_error)
  22635. __Pyx_GOTREF(__pyx_t_6);
  22636. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  22637. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  22638. /* "uvloop/loop.pyx":1145
  22639. * print('Write errors: {}'.format(
  22640. * self._debug_stream_write_errors_total))
  22641. * print('Write without poll: {}'.format( # <<<<<<<<<<<<<<
  22642. * self._debug_stream_write_tries))
  22643. * print('Write contexts: {: <8} | {}'.format(
  22644. */
  22645. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Write_without_poll, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1145, __pyx_L1_error)
  22646. __Pyx_GOTREF(__pyx_t_3);
  22647. /* "uvloop/loop.pyx":1146
  22648. * self._debug_stream_write_errors_total))
  22649. * print('Write without poll: {}'.format(
  22650. * self._debug_stream_write_tries)) # <<<<<<<<<<<<<<
  22651. * print('Write contexts: {: <8} | {}'.format(
  22652. * self._debug_stream_write_ctx_cnt,
  22653. */
  22654. __pyx_t_5 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_debug_stream_write_tries); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1146, __pyx_L1_error)
  22655. __Pyx_GOTREF(__pyx_t_5);
  22656. __pyx_t_4 = NULL;
  22657. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
  22658. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
  22659. if (likely(__pyx_t_4)) {
  22660. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  22661. __Pyx_INCREF(__pyx_t_4);
  22662. __Pyx_INCREF(function);
  22663. __Pyx_DECREF_SET(__pyx_t_3, function);
  22664. }
  22665. }
  22666. __pyx_t_6 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5);
  22667. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  22668. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  22669. if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1145, __pyx_L1_error)
  22670. __Pyx_GOTREF(__pyx_t_6);
  22671. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  22672. /* "uvloop/loop.pyx":1145
  22673. * print('Write errors: {}'.format(
  22674. * self._debug_stream_write_errors_total))
  22675. * print('Write without poll: {}'.format( # <<<<<<<<<<<<<<
  22676. * self._debug_stream_write_tries))
  22677. * print('Write contexts: {: <8} | {}'.format(
  22678. */
  22679. __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1145, __pyx_L1_error)
  22680. __Pyx_GOTREF(__pyx_t_3);
  22681. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  22682. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  22683. /* "uvloop/loop.pyx":1147
  22684. * print('Write without poll: {}'.format(
  22685. * self._debug_stream_write_tries))
  22686. * print('Write contexts: {: <8} | {}'.format( # <<<<<<<<<<<<<<
  22687. * self._debug_stream_write_ctx_cnt,
  22688. * self._debug_stream_write_ctx_total))
  22689. */
  22690. __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Write_contexts_8, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1147, __pyx_L1_error)
  22691. __Pyx_GOTREF(__pyx_t_6);
  22692. /* "uvloop/loop.pyx":1148
  22693. * self._debug_stream_write_tries))
  22694. * print('Write contexts: {: <8} | {}'.format(
  22695. * self._debug_stream_write_ctx_cnt, # <<<<<<<<<<<<<<
  22696. * self._debug_stream_write_ctx_total))
  22697. * print('Write failed callbacks: {}'.format(
  22698. */
  22699. __pyx_t_5 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_debug_stream_write_ctx_cnt); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1148, __pyx_L1_error)
  22700. __Pyx_GOTREF(__pyx_t_5);
  22701. /* "uvloop/loop.pyx":1149
  22702. * print('Write contexts: {: <8} | {}'.format(
  22703. * self._debug_stream_write_ctx_cnt,
  22704. * self._debug_stream_write_ctx_total)) # <<<<<<<<<<<<<<
  22705. * print('Write failed callbacks: {}'.format(
  22706. * self._debug_stream_write_cb_errors_total))
  22707. */
  22708. __pyx_t_4 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_debug_stream_write_ctx_total); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1149, __pyx_L1_error)
  22709. __Pyx_GOTREF(__pyx_t_4);
  22710. __pyx_t_12 = NULL;
  22711. __pyx_t_7 = 0;
  22712. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
  22713. __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_6);
  22714. if (likely(__pyx_t_12)) {
  22715. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
  22716. __Pyx_INCREF(__pyx_t_12);
  22717. __Pyx_INCREF(function);
  22718. __Pyx_DECREF_SET(__pyx_t_6, function);
  22719. __pyx_t_7 = 1;
  22720. }
  22721. }
  22722. #if CYTHON_FAST_PYCALL
  22723. if (PyFunction_Check(__pyx_t_6)) {
  22724. PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_t_5, __pyx_t_4};
  22725. __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1147, __pyx_L1_error)
  22726. __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
  22727. __Pyx_GOTREF(__pyx_t_3);
  22728. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  22729. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  22730. } else
  22731. #endif
  22732. #if CYTHON_FAST_PYCCALL
  22733. if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
  22734. PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_t_5, __pyx_t_4};
  22735. __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1147, __pyx_L1_error)
  22736. __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
  22737. __Pyx_GOTREF(__pyx_t_3);
  22738. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  22739. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  22740. } else
  22741. #endif
  22742. {
  22743. __pyx_t_2 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1147, __pyx_L1_error)
  22744. __Pyx_GOTREF(__pyx_t_2);
  22745. if (__pyx_t_12) {
  22746. __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_12); __pyx_t_12 = NULL;
  22747. }
  22748. __Pyx_GIVEREF(__pyx_t_5);
  22749. PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_7, __pyx_t_5);
  22750. __Pyx_GIVEREF(__pyx_t_4);
  22751. PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_7, __pyx_t_4);
  22752. __pyx_t_5 = 0;
  22753. __pyx_t_4 = 0;
  22754. __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1147, __pyx_L1_error)
  22755. __Pyx_GOTREF(__pyx_t_3);
  22756. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  22757. }
  22758. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  22759. /* "uvloop/loop.pyx":1147
  22760. * print('Write without poll: {}'.format(
  22761. * self._debug_stream_write_tries))
  22762. * print('Write contexts: {: <8} | {}'.format( # <<<<<<<<<<<<<<
  22763. * self._debug_stream_write_ctx_cnt,
  22764. * self._debug_stream_write_ctx_total))
  22765. */
  22766. __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1147, __pyx_L1_error)
  22767. __Pyx_GOTREF(__pyx_t_6);
  22768. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  22769. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  22770. /* "uvloop/loop.pyx":1150
  22771. * self._debug_stream_write_ctx_cnt,
  22772. * self._debug_stream_write_ctx_total))
  22773. * print('Write failed callbacks: {}'.format( # <<<<<<<<<<<<<<
  22774. * self._debug_stream_write_cb_errors_total))
  22775. * print()
  22776. */
  22777. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Write_failed_callbacks, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1150, __pyx_L1_error)
  22778. __Pyx_GOTREF(__pyx_t_3);
  22779. /* "uvloop/loop.pyx":1151
  22780. * self._debug_stream_write_ctx_total))
  22781. * print('Write failed callbacks: {}'.format(
  22782. * self._debug_stream_write_cb_errors_total)) # <<<<<<<<<<<<<<
  22783. * print()
  22784. * print('Read errors: {}'.format(
  22785. */
  22786. __pyx_t_2 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_debug_stream_write_cb_errors_total); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1151, __pyx_L1_error)
  22787. __Pyx_GOTREF(__pyx_t_2);
  22788. __pyx_t_4 = NULL;
  22789. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
  22790. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
  22791. if (likely(__pyx_t_4)) {
  22792. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  22793. __Pyx_INCREF(__pyx_t_4);
  22794. __Pyx_INCREF(function);
  22795. __Pyx_DECREF_SET(__pyx_t_3, function);
  22796. }
  22797. }
  22798. __pyx_t_6 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2);
  22799. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  22800. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  22801. if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1150, __pyx_L1_error)
  22802. __Pyx_GOTREF(__pyx_t_6);
  22803. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  22804. /* "uvloop/loop.pyx":1150
  22805. * self._debug_stream_write_ctx_cnt,
  22806. * self._debug_stream_write_ctx_total))
  22807. * print('Write failed callbacks: {}'.format( # <<<<<<<<<<<<<<
  22808. * self._debug_stream_write_cb_errors_total))
  22809. * print()
  22810. */
  22811. __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1150, __pyx_L1_error)
  22812. __Pyx_GOTREF(__pyx_t_3);
  22813. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  22814. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  22815. /* "uvloop/loop.pyx":1152
  22816. * print('Write failed callbacks: {}'.format(
  22817. * self._debug_stream_write_cb_errors_total))
  22818. * print() # <<<<<<<<<<<<<<
  22819. * print('Read errors: {}'.format(
  22820. * self._debug_stream_read_errors_total))
  22821. */
  22822. __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_builtin_print); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1152, __pyx_L1_error)
  22823. __Pyx_GOTREF(__pyx_t_3);
  22824. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  22825. /* "uvloop/loop.pyx":1153
  22826. * self._debug_stream_write_cb_errors_total))
  22827. * print()
  22828. * print('Read errors: {}'.format( # <<<<<<<<<<<<<<
  22829. * self._debug_stream_read_errors_total))
  22830. * print('Read callbacks: {}'.format(
  22831. */
  22832. __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Read_errors, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1153, __pyx_L1_error)
  22833. __Pyx_GOTREF(__pyx_t_6);
  22834. /* "uvloop/loop.pyx":1154
  22835. * print()
  22836. * print('Read errors: {}'.format(
  22837. * self._debug_stream_read_errors_total)) # <<<<<<<<<<<<<<
  22838. * print('Read callbacks: {}'.format(
  22839. * self._debug_stream_read_cb_total))
  22840. */
  22841. __pyx_t_2 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_debug_stream_read_errors_total); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1154, __pyx_L1_error)
  22842. __Pyx_GOTREF(__pyx_t_2);
  22843. __pyx_t_4 = NULL;
  22844. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
  22845. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
  22846. if (likely(__pyx_t_4)) {
  22847. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
  22848. __Pyx_INCREF(__pyx_t_4);
  22849. __Pyx_INCREF(function);
  22850. __Pyx_DECREF_SET(__pyx_t_6, function);
  22851. }
  22852. }
  22853. __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_4, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_2);
  22854. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  22855. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  22856. if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1153, __pyx_L1_error)
  22857. __Pyx_GOTREF(__pyx_t_3);
  22858. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  22859. /* "uvloop/loop.pyx":1153
  22860. * self._debug_stream_write_cb_errors_total))
  22861. * print()
  22862. * print('Read errors: {}'.format( # <<<<<<<<<<<<<<
  22863. * self._debug_stream_read_errors_total))
  22864. * print('Read callbacks: {}'.format(
  22865. */
  22866. __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1153, __pyx_L1_error)
  22867. __Pyx_GOTREF(__pyx_t_6);
  22868. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  22869. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  22870. /* "uvloop/loop.pyx":1155
  22871. * print('Read errors: {}'.format(
  22872. * self._debug_stream_read_errors_total))
  22873. * print('Read callbacks: {}'.format( # <<<<<<<<<<<<<<
  22874. * self._debug_stream_read_cb_total))
  22875. * print('Read failed callbacks: {}'.format(
  22876. */
  22877. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Read_callbacks, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1155, __pyx_L1_error)
  22878. __Pyx_GOTREF(__pyx_t_3);
  22879. /* "uvloop/loop.pyx":1156
  22880. * self._debug_stream_read_errors_total))
  22881. * print('Read callbacks: {}'.format(
  22882. * self._debug_stream_read_cb_total)) # <<<<<<<<<<<<<<
  22883. * print('Read failed callbacks: {}'.format(
  22884. * self._debug_stream_read_cb_errors_total))
  22885. */
  22886. __pyx_t_2 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_debug_stream_read_cb_total); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1156, __pyx_L1_error)
  22887. __Pyx_GOTREF(__pyx_t_2);
  22888. __pyx_t_4 = NULL;
  22889. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
  22890. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
  22891. if (likely(__pyx_t_4)) {
  22892. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  22893. __Pyx_INCREF(__pyx_t_4);
  22894. __Pyx_INCREF(function);
  22895. __Pyx_DECREF_SET(__pyx_t_3, function);
  22896. }
  22897. }
  22898. __pyx_t_6 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2);
  22899. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  22900. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  22901. if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1155, __pyx_L1_error)
  22902. __Pyx_GOTREF(__pyx_t_6);
  22903. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  22904. /* "uvloop/loop.pyx":1155
  22905. * print('Read errors: {}'.format(
  22906. * self._debug_stream_read_errors_total))
  22907. * print('Read callbacks: {}'.format( # <<<<<<<<<<<<<<
  22908. * self._debug_stream_read_cb_total))
  22909. * print('Read failed callbacks: {}'.format(
  22910. */
  22911. __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1155, __pyx_L1_error)
  22912. __Pyx_GOTREF(__pyx_t_3);
  22913. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  22914. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  22915. /* "uvloop/loop.pyx":1157
  22916. * print('Read callbacks: {}'.format(
  22917. * self._debug_stream_read_cb_total))
  22918. * print('Read failed callbacks: {}'.format( # <<<<<<<<<<<<<<
  22919. * self._debug_stream_read_cb_errors_total))
  22920. * print('Read EOFs: {}'.format(
  22921. */
  22922. __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Read_failed_callbacks, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1157, __pyx_L1_error)
  22923. __Pyx_GOTREF(__pyx_t_6);
  22924. /* "uvloop/loop.pyx":1158
  22925. * self._debug_stream_read_cb_total))
  22926. * print('Read failed callbacks: {}'.format(
  22927. * self._debug_stream_read_cb_errors_total)) # <<<<<<<<<<<<<<
  22928. * print('Read EOFs: {}'.format(
  22929. * self._debug_stream_read_eof_total))
  22930. */
  22931. __pyx_t_2 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_debug_stream_read_cb_errors_total); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1158, __pyx_L1_error)
  22932. __Pyx_GOTREF(__pyx_t_2);
  22933. __pyx_t_4 = NULL;
  22934. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
  22935. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
  22936. if (likely(__pyx_t_4)) {
  22937. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
  22938. __Pyx_INCREF(__pyx_t_4);
  22939. __Pyx_INCREF(function);
  22940. __Pyx_DECREF_SET(__pyx_t_6, function);
  22941. }
  22942. }
  22943. __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_4, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_2);
  22944. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  22945. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  22946. if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1157, __pyx_L1_error)
  22947. __Pyx_GOTREF(__pyx_t_3);
  22948. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  22949. /* "uvloop/loop.pyx":1157
  22950. * print('Read callbacks: {}'.format(
  22951. * self._debug_stream_read_cb_total))
  22952. * print('Read failed callbacks: {}'.format( # <<<<<<<<<<<<<<
  22953. * self._debug_stream_read_cb_errors_total))
  22954. * print('Read EOFs: {}'.format(
  22955. */
  22956. __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1157, __pyx_L1_error)
  22957. __Pyx_GOTREF(__pyx_t_6);
  22958. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  22959. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  22960. /* "uvloop/loop.pyx":1159
  22961. * print('Read failed callbacks: {}'.format(
  22962. * self._debug_stream_read_cb_errors_total))
  22963. * print('Read EOFs: {}'.format( # <<<<<<<<<<<<<<
  22964. * self._debug_stream_read_eof_total))
  22965. * print('Read EOF failed callbacks: {}'.format(
  22966. */
  22967. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Read_EOFs, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1159, __pyx_L1_error)
  22968. __Pyx_GOTREF(__pyx_t_3);
  22969. /* "uvloop/loop.pyx":1160
  22970. * self._debug_stream_read_cb_errors_total))
  22971. * print('Read EOFs: {}'.format(
  22972. * self._debug_stream_read_eof_total)) # <<<<<<<<<<<<<<
  22973. * print('Read EOF failed callbacks: {}'.format(
  22974. * self._debug_stream_read_eof_cb_errors_total))
  22975. */
  22976. __pyx_t_2 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_debug_stream_read_eof_total); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1160, __pyx_L1_error)
  22977. __Pyx_GOTREF(__pyx_t_2);
  22978. __pyx_t_4 = NULL;
  22979. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
  22980. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
  22981. if (likely(__pyx_t_4)) {
  22982. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  22983. __Pyx_INCREF(__pyx_t_4);
  22984. __Pyx_INCREF(function);
  22985. __Pyx_DECREF_SET(__pyx_t_3, function);
  22986. }
  22987. }
  22988. __pyx_t_6 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2);
  22989. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  22990. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  22991. if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1159, __pyx_L1_error)
  22992. __Pyx_GOTREF(__pyx_t_6);
  22993. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  22994. /* "uvloop/loop.pyx":1159
  22995. * print('Read failed callbacks: {}'.format(
  22996. * self._debug_stream_read_cb_errors_total))
  22997. * print('Read EOFs: {}'.format( # <<<<<<<<<<<<<<
  22998. * self._debug_stream_read_eof_total))
  22999. * print('Read EOF failed callbacks: {}'.format(
  23000. */
  23001. __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1159, __pyx_L1_error)
  23002. __Pyx_GOTREF(__pyx_t_3);
  23003. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  23004. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  23005. /* "uvloop/loop.pyx":1161
  23006. * print('Read EOFs: {}'.format(
  23007. * self._debug_stream_read_eof_total))
  23008. * print('Read EOF failed callbacks: {}'.format( # <<<<<<<<<<<<<<
  23009. * self._debug_stream_read_eof_cb_errors_total))
  23010. * print()
  23011. */
  23012. __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Read_EOF_failed_callbacks, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1161, __pyx_L1_error)
  23013. __Pyx_GOTREF(__pyx_t_6);
  23014. /* "uvloop/loop.pyx":1162
  23015. * self._debug_stream_read_eof_total))
  23016. * print('Read EOF failed callbacks: {}'.format(
  23017. * self._debug_stream_read_eof_cb_errors_total)) # <<<<<<<<<<<<<<
  23018. * print()
  23019. * print('Listen errors: {}'.format(
  23020. */
  23021. __pyx_t_2 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_debug_stream_read_eof_cb_errors_total); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1162, __pyx_L1_error)
  23022. __Pyx_GOTREF(__pyx_t_2);
  23023. __pyx_t_4 = NULL;
  23024. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
  23025. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
  23026. if (likely(__pyx_t_4)) {
  23027. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
  23028. __Pyx_INCREF(__pyx_t_4);
  23029. __Pyx_INCREF(function);
  23030. __Pyx_DECREF_SET(__pyx_t_6, function);
  23031. }
  23032. }
  23033. __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_4, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_2);
  23034. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  23035. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  23036. if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1161, __pyx_L1_error)
  23037. __Pyx_GOTREF(__pyx_t_3);
  23038. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  23039. /* "uvloop/loop.pyx":1161
  23040. * print('Read EOFs: {}'.format(
  23041. * self._debug_stream_read_eof_total))
  23042. * print('Read EOF failed callbacks: {}'.format( # <<<<<<<<<<<<<<
  23043. * self._debug_stream_read_eof_cb_errors_total))
  23044. * print()
  23045. */
  23046. __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1161, __pyx_L1_error)
  23047. __Pyx_GOTREF(__pyx_t_6);
  23048. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  23049. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  23050. /* "uvloop/loop.pyx":1163
  23051. * print('Read EOF failed callbacks: {}'.format(
  23052. * self._debug_stream_read_eof_cb_errors_total))
  23053. * print() # <<<<<<<<<<<<<<
  23054. * print('Listen errors: {}'.format(
  23055. * self._debug_stream_listen_errors_total))
  23056. */
  23057. __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_builtin_print); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1163, __pyx_L1_error)
  23058. __Pyx_GOTREF(__pyx_t_6);
  23059. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  23060. /* "uvloop/loop.pyx":1164
  23061. * self._debug_stream_read_eof_cb_errors_total))
  23062. * print()
  23063. * print('Listen errors: {}'.format( # <<<<<<<<<<<<<<
  23064. * self._debug_stream_listen_errors_total))
  23065. * print('Shutdown errors {}'.format(
  23066. */
  23067. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Listen_errors, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1164, __pyx_L1_error)
  23068. __Pyx_GOTREF(__pyx_t_3);
  23069. /* "uvloop/loop.pyx":1165
  23070. * print()
  23071. * print('Listen errors: {}'.format(
  23072. * self._debug_stream_listen_errors_total)) # <<<<<<<<<<<<<<
  23073. * print('Shutdown errors {}'.format(
  23074. * self._debug_stream_shutdown_errors_total))
  23075. */
  23076. __pyx_t_2 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_debug_stream_listen_errors_total); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1165, __pyx_L1_error)
  23077. __Pyx_GOTREF(__pyx_t_2);
  23078. __pyx_t_4 = NULL;
  23079. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
  23080. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
  23081. if (likely(__pyx_t_4)) {
  23082. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  23083. __Pyx_INCREF(__pyx_t_4);
  23084. __Pyx_INCREF(function);
  23085. __Pyx_DECREF_SET(__pyx_t_3, function);
  23086. }
  23087. }
  23088. __pyx_t_6 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2);
  23089. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  23090. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  23091. if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1164, __pyx_L1_error)
  23092. __Pyx_GOTREF(__pyx_t_6);
  23093. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  23094. /* "uvloop/loop.pyx":1164
  23095. * self._debug_stream_read_eof_cb_errors_total))
  23096. * print()
  23097. * print('Listen errors: {}'.format( # <<<<<<<<<<<<<<
  23098. * self._debug_stream_listen_errors_total))
  23099. * print('Shutdown errors {}'.format(
  23100. */
  23101. __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1164, __pyx_L1_error)
  23102. __Pyx_GOTREF(__pyx_t_3);
  23103. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  23104. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  23105. /* "uvloop/loop.pyx":1166
  23106. * print('Listen errors: {}'.format(
  23107. * self._debug_stream_listen_errors_total))
  23108. * print('Shutdown errors {}'.format( # <<<<<<<<<<<<<<
  23109. * self._debug_stream_shutdown_errors_total))
  23110. * print()
  23111. */
  23112. __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Shutdown_errors, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1166, __pyx_L1_error)
  23113. __Pyx_GOTREF(__pyx_t_6);
  23114. /* "uvloop/loop.pyx":1167
  23115. * self._debug_stream_listen_errors_total))
  23116. * print('Shutdown errors {}'.format(
  23117. * self._debug_stream_shutdown_errors_total)) # <<<<<<<<<<<<<<
  23118. * print()
  23119. *
  23120. */
  23121. __pyx_t_2 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_debug_stream_shutdown_errors_total); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1167, __pyx_L1_error)
  23122. __Pyx_GOTREF(__pyx_t_2);
  23123. __pyx_t_4 = NULL;
  23124. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
  23125. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
  23126. if (likely(__pyx_t_4)) {
  23127. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
  23128. __Pyx_INCREF(__pyx_t_4);
  23129. __Pyx_INCREF(function);
  23130. __Pyx_DECREF_SET(__pyx_t_6, function);
  23131. }
  23132. }
  23133. __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_4, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_2);
  23134. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  23135. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  23136. if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1166, __pyx_L1_error)
  23137. __Pyx_GOTREF(__pyx_t_3);
  23138. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  23139. /* "uvloop/loop.pyx":1166
  23140. * print('Listen errors: {}'.format(
  23141. * self._debug_stream_listen_errors_total))
  23142. * print('Shutdown errors {}'.format( # <<<<<<<<<<<<<<
  23143. * self._debug_stream_shutdown_errors_total))
  23144. * print()
  23145. */
  23146. __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1166, __pyx_L1_error)
  23147. __Pyx_GOTREF(__pyx_t_6);
  23148. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  23149. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  23150. /* "uvloop/loop.pyx":1168
  23151. * print('Shutdown errors {}'.format(
  23152. * self._debug_stream_shutdown_errors_total))
  23153. * print() # <<<<<<<<<<<<<<
  23154. *
  23155. * print('--- Polls debug info: ---')
  23156. */
  23157. __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_builtin_print); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1168, __pyx_L1_error)
  23158. __Pyx_GOTREF(__pyx_t_6);
  23159. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  23160. /* "uvloop/loop.pyx":1170
  23161. * print()
  23162. *
  23163. * print('--- Polls debug info: ---') # <<<<<<<<<<<<<<
  23164. * print('Read events: {}'.format(
  23165. * self._poll_read_events_total))
  23166. */
  23167. __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__28, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1170, __pyx_L1_error)
  23168. __Pyx_GOTREF(__pyx_t_6);
  23169. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  23170. /* "uvloop/loop.pyx":1171
  23171. *
  23172. * print('--- Polls debug info: ---')
  23173. * print('Read events: {}'.format( # <<<<<<<<<<<<<<
  23174. * self._poll_read_events_total))
  23175. * print('Read callbacks failed: {}'.format(
  23176. */
  23177. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Read_events, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1171, __pyx_L1_error)
  23178. __Pyx_GOTREF(__pyx_t_3);
  23179. /* "uvloop/loop.pyx":1172
  23180. * print('--- Polls debug info: ---')
  23181. * print('Read events: {}'.format(
  23182. * self._poll_read_events_total)) # <<<<<<<<<<<<<<
  23183. * print('Read callbacks failed: {}'.format(
  23184. * self._poll_read_cb_errors_total))
  23185. */
  23186. __pyx_t_2 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_poll_read_events_total); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1172, __pyx_L1_error)
  23187. __Pyx_GOTREF(__pyx_t_2);
  23188. __pyx_t_4 = NULL;
  23189. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
  23190. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
  23191. if (likely(__pyx_t_4)) {
  23192. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  23193. __Pyx_INCREF(__pyx_t_4);
  23194. __Pyx_INCREF(function);
  23195. __Pyx_DECREF_SET(__pyx_t_3, function);
  23196. }
  23197. }
  23198. __pyx_t_6 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2);
  23199. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  23200. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  23201. if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1171, __pyx_L1_error)
  23202. __Pyx_GOTREF(__pyx_t_6);
  23203. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  23204. /* "uvloop/loop.pyx":1171
  23205. *
  23206. * print('--- Polls debug info: ---')
  23207. * print('Read events: {}'.format( # <<<<<<<<<<<<<<
  23208. * self._poll_read_events_total))
  23209. * print('Read callbacks failed: {}'.format(
  23210. */
  23211. __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1171, __pyx_L1_error)
  23212. __Pyx_GOTREF(__pyx_t_3);
  23213. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  23214. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  23215. /* "uvloop/loop.pyx":1173
  23216. * print('Read events: {}'.format(
  23217. * self._poll_read_events_total))
  23218. * print('Read callbacks failed: {}'.format( # <<<<<<<<<<<<<<
  23219. * self._poll_read_cb_errors_total))
  23220. * print('Write events: {}'.format(
  23221. */
  23222. __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Read_callbacks_failed, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1173, __pyx_L1_error)
  23223. __Pyx_GOTREF(__pyx_t_6);
  23224. /* "uvloop/loop.pyx":1174
  23225. * self._poll_read_events_total))
  23226. * print('Read callbacks failed: {}'.format(
  23227. * self._poll_read_cb_errors_total)) # <<<<<<<<<<<<<<
  23228. * print('Write events: {}'.format(
  23229. * self._poll_write_events_total))
  23230. */
  23231. __pyx_t_2 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_poll_read_cb_errors_total); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1174, __pyx_L1_error)
  23232. __Pyx_GOTREF(__pyx_t_2);
  23233. __pyx_t_4 = NULL;
  23234. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
  23235. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
  23236. if (likely(__pyx_t_4)) {
  23237. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
  23238. __Pyx_INCREF(__pyx_t_4);
  23239. __Pyx_INCREF(function);
  23240. __Pyx_DECREF_SET(__pyx_t_6, function);
  23241. }
  23242. }
  23243. __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_4, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_2);
  23244. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  23245. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  23246. if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1173, __pyx_L1_error)
  23247. __Pyx_GOTREF(__pyx_t_3);
  23248. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  23249. /* "uvloop/loop.pyx":1173
  23250. * print('Read events: {}'.format(
  23251. * self._poll_read_events_total))
  23252. * print('Read callbacks failed: {}'.format( # <<<<<<<<<<<<<<
  23253. * self._poll_read_cb_errors_total))
  23254. * print('Write events: {}'.format(
  23255. */
  23256. __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1173, __pyx_L1_error)
  23257. __Pyx_GOTREF(__pyx_t_6);
  23258. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  23259. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  23260. /* "uvloop/loop.pyx":1175
  23261. * print('Read callbacks failed: {}'.format(
  23262. * self._poll_read_cb_errors_total))
  23263. * print('Write events: {}'.format( # <<<<<<<<<<<<<<
  23264. * self._poll_write_events_total))
  23265. * print('Write callbacks failed: {}'.format(
  23266. */
  23267. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Write_events, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1175, __pyx_L1_error)
  23268. __Pyx_GOTREF(__pyx_t_3);
  23269. /* "uvloop/loop.pyx":1176
  23270. * self._poll_read_cb_errors_total))
  23271. * print('Write events: {}'.format(
  23272. * self._poll_write_events_total)) # <<<<<<<<<<<<<<
  23273. * print('Write callbacks failed: {}'.format(
  23274. * self._poll_write_cb_errors_total))
  23275. */
  23276. __pyx_t_2 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_poll_write_events_total); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1176, __pyx_L1_error)
  23277. __Pyx_GOTREF(__pyx_t_2);
  23278. __pyx_t_4 = NULL;
  23279. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
  23280. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
  23281. if (likely(__pyx_t_4)) {
  23282. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  23283. __Pyx_INCREF(__pyx_t_4);
  23284. __Pyx_INCREF(function);
  23285. __Pyx_DECREF_SET(__pyx_t_3, function);
  23286. }
  23287. }
  23288. __pyx_t_6 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2);
  23289. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  23290. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  23291. if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1175, __pyx_L1_error)
  23292. __Pyx_GOTREF(__pyx_t_6);
  23293. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  23294. /* "uvloop/loop.pyx":1175
  23295. * print('Read callbacks failed: {}'.format(
  23296. * self._poll_read_cb_errors_total))
  23297. * print('Write events: {}'.format( # <<<<<<<<<<<<<<
  23298. * self._poll_write_events_total))
  23299. * print('Write callbacks failed: {}'.format(
  23300. */
  23301. __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1175, __pyx_L1_error)
  23302. __Pyx_GOTREF(__pyx_t_3);
  23303. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  23304. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  23305. /* "uvloop/loop.pyx":1177
  23306. * print('Write events: {}'.format(
  23307. * self._poll_write_events_total))
  23308. * print('Write callbacks failed: {}'.format( # <<<<<<<<<<<<<<
  23309. * self._poll_write_cb_errors_total))
  23310. * print()
  23311. */
  23312. __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Write_callbacks_failed, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1177, __pyx_L1_error)
  23313. __Pyx_GOTREF(__pyx_t_6);
  23314. /* "uvloop/loop.pyx":1178
  23315. * self._poll_write_events_total))
  23316. * print('Write callbacks failed: {}'.format(
  23317. * self._poll_write_cb_errors_total)) # <<<<<<<<<<<<<<
  23318. * print()
  23319. *
  23320. */
  23321. __pyx_t_2 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_poll_write_cb_errors_total); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1178, __pyx_L1_error)
  23322. __Pyx_GOTREF(__pyx_t_2);
  23323. __pyx_t_4 = NULL;
  23324. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
  23325. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
  23326. if (likely(__pyx_t_4)) {
  23327. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
  23328. __Pyx_INCREF(__pyx_t_4);
  23329. __Pyx_INCREF(function);
  23330. __Pyx_DECREF_SET(__pyx_t_6, function);
  23331. }
  23332. }
  23333. __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_4, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_2);
  23334. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  23335. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  23336. if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1177, __pyx_L1_error)
  23337. __Pyx_GOTREF(__pyx_t_3);
  23338. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  23339. /* "uvloop/loop.pyx":1177
  23340. * print('Write events: {}'.format(
  23341. * self._poll_write_events_total))
  23342. * print('Write callbacks failed: {}'.format( # <<<<<<<<<<<<<<
  23343. * self._poll_write_cb_errors_total))
  23344. * print()
  23345. */
  23346. __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1177, __pyx_L1_error)
  23347. __Pyx_GOTREF(__pyx_t_6);
  23348. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  23349. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  23350. /* "uvloop/loop.pyx":1179
  23351. * print('Write callbacks failed: {}'.format(
  23352. * self._poll_write_cb_errors_total))
  23353. * print() # <<<<<<<<<<<<<<
  23354. *
  23355. * print('--- Sock ops successful on 1st try: ---')
  23356. */
  23357. __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_builtin_print); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1179, __pyx_L1_error)
  23358. __Pyx_GOTREF(__pyx_t_6);
  23359. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  23360. /* "uvloop/loop.pyx":1181
  23361. * print()
  23362. *
  23363. * print('--- Sock ops successful on 1st try: ---') # <<<<<<<<<<<<<<
  23364. * print('Socket try-writes: {}'.format(
  23365. * self._sock_try_write_total))
  23366. */
  23367. __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__29, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1181, __pyx_L1_error)
  23368. __Pyx_GOTREF(__pyx_t_6);
  23369. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  23370. /* "uvloop/loop.pyx":1182
  23371. *
  23372. * print('--- Sock ops successful on 1st try: ---')
  23373. * print('Socket try-writes: {}'.format( # <<<<<<<<<<<<<<
  23374. * self._sock_try_write_total))
  23375. *
  23376. */
  23377. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Socket_try_writes, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1182, __pyx_L1_error)
  23378. __Pyx_GOTREF(__pyx_t_3);
  23379. /* "uvloop/loop.pyx":1183
  23380. * print('--- Sock ops successful on 1st try: ---')
  23381. * print('Socket try-writes: {}'.format(
  23382. * self._sock_try_write_total)) # <<<<<<<<<<<<<<
  23383. *
  23384. * print(flush=True)
  23385. */
  23386. __pyx_t_2 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_sock_try_write_total); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1183, __pyx_L1_error)
  23387. __Pyx_GOTREF(__pyx_t_2);
  23388. __pyx_t_4 = NULL;
  23389. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
  23390. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
  23391. if (likely(__pyx_t_4)) {
  23392. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  23393. __Pyx_INCREF(__pyx_t_4);
  23394. __Pyx_INCREF(function);
  23395. __Pyx_DECREF_SET(__pyx_t_3, function);
  23396. }
  23397. }
  23398. __pyx_t_6 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2);
  23399. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  23400. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  23401. if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1182, __pyx_L1_error)
  23402. __Pyx_GOTREF(__pyx_t_6);
  23403. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  23404. /* "uvloop/loop.pyx":1182
  23405. *
  23406. * print('--- Sock ops successful on 1st try: ---')
  23407. * print('Socket try-writes: {}'.format( # <<<<<<<<<<<<<<
  23408. * self._sock_try_write_total))
  23409. *
  23410. */
  23411. __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1182, __pyx_L1_error)
  23412. __Pyx_GOTREF(__pyx_t_3);
  23413. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  23414. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  23415. /* "uvloop/loop.pyx":1185
  23416. * self._sock_try_write_total))
  23417. *
  23418. * print(flush=True) # <<<<<<<<<<<<<<
  23419. *
  23420. * property print_debug_info:
  23421. */
  23422. __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1185, __pyx_L1_error)
  23423. __Pyx_GOTREF(__pyx_t_3);
  23424. if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_flush, Py_True) < 0) __PYX_ERR(2, 1185, __pyx_L1_error)
  23425. __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1185, __pyx_L1_error)
  23426. __Pyx_GOTREF(__pyx_t_6);
  23427. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  23428. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  23429. /* "uvloop/loop.pyx":1093
  23430. * return uv.uv_backend_fd(self.uvloop)
  23431. *
  23432. * cdef _print_debug_info(self): # <<<<<<<<<<<<<<
  23433. * cdef:
  23434. * int err
  23435. */
  23436. /* function exit code */
  23437. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  23438. goto __pyx_L0;
  23439. __pyx_L1_error:;
  23440. __Pyx_XDECREF(__pyx_t_2);
  23441. __Pyx_XDECREF(__pyx_t_3);
  23442. __Pyx_XDECREF(__pyx_t_4);
  23443. __Pyx_XDECREF(__pyx_t_5);
  23444. __Pyx_XDECREF(__pyx_t_6);
  23445. __Pyx_XDECREF(__pyx_t_8);
  23446. __Pyx_XDECREF(__pyx_t_11);
  23447. __Pyx_XDECREF(__pyx_t_12);
  23448. __Pyx_AddTraceback("uvloop.loop.Loop._print_debug_info", __pyx_clineno, __pyx_lineno, __pyx_filename);
  23449. __pyx_r = 0;
  23450. __pyx_L0:;
  23451. __Pyx_XDECREF(__pyx_v_name);
  23452. __Pyx_XGIVEREF(__pyx_r);
  23453. __Pyx_RefNannyFinishContext();
  23454. return __pyx_r;
  23455. }
  23456. /* "uvloop/loop.pyx":1188
  23457. *
  23458. * property print_debug_info:
  23459. * def __get__(self): # <<<<<<<<<<<<<<
  23460. * if UVLOOP_DEBUG:
  23461. * return lambda: self._print_debug_info()
  23462. */
  23463. /* Python wrapper */
  23464. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_16print_debug_info_1__get__(PyObject *__pyx_v_self); /*proto*/
  23465. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_16print_debug_info_1__get__(PyObject *__pyx_v_self) {
  23466. PyObject *__pyx_r = 0;
  23467. __Pyx_RefNannyDeclarations
  23468. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  23469. __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_16print_debug_info___get__(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self));
  23470. /* function exit code */
  23471. __Pyx_RefNannyFinishContext();
  23472. return __pyx_r;
  23473. }
  23474. /* "uvloop/loop.pyx":1190
  23475. * def __get__(self):
  23476. * if UVLOOP_DEBUG:
  23477. * return lambda: self._print_debug_info() # <<<<<<<<<<<<<<
  23478. * else:
  23479. * raise AttributeError('print_debug_info')
  23480. */
  23481. /* Python wrapper */
  23482. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_16print_debug_info_7__get___lambda1(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  23483. static PyMethodDef __pyx_mdef_6uvloop_4loop_4Loop_16print_debug_info_7__get___lambda1 = {"lambda1", (PyCFunction)__pyx_pw_6uvloop_4loop_4Loop_16print_debug_info_7__get___lambda1, METH_NOARGS, 0};
  23484. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_16print_debug_info_7__get___lambda1(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  23485. PyObject *__pyx_r = 0;
  23486. __Pyx_RefNannyDeclarations
  23487. __Pyx_RefNannySetupContext("lambda1 (wrapper)", 0);
  23488. __pyx_r = __pyx_lambda_funcdef_lambda1(__pyx_self);
  23489. /* function exit code */
  23490. __Pyx_RefNannyFinishContext();
  23491. return __pyx_r;
  23492. }
  23493. static PyObject *__pyx_lambda_funcdef_lambda1(PyObject *__pyx_self) {
  23494. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_3___get__ *__pyx_cur_scope;
  23495. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_3___get__ *__pyx_outer_scope;
  23496. PyObject *__pyx_r = NULL;
  23497. __Pyx_RefNannyDeclarations
  23498. PyObject *__pyx_t_1 = NULL;
  23499. __Pyx_RefNannySetupContext("lambda1", 0);
  23500. __pyx_outer_scope = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_3___get__ *) __Pyx_CyFunction_GetClosure(__pyx_self);
  23501. __pyx_cur_scope = __pyx_outer_scope;
  23502. __Pyx_XDECREF(__pyx_r);
  23503. if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(2, 1190, __pyx_L1_error) }
  23504. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->_print_debug_info(__pyx_cur_scope->__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1190, __pyx_L1_error)
  23505. __Pyx_GOTREF(__pyx_t_1);
  23506. __pyx_r = __pyx_t_1;
  23507. __pyx_t_1 = 0;
  23508. goto __pyx_L0;
  23509. /* function exit code */
  23510. __pyx_L1_error:;
  23511. __Pyx_XDECREF(__pyx_t_1);
  23512. __Pyx_AddTraceback("uvloop.loop.Loop.print_debug_info.__get__.lambda1", __pyx_clineno, __pyx_lineno, __pyx_filename);
  23513. __pyx_r = NULL;
  23514. __pyx_L0:;
  23515. __Pyx_XGIVEREF(__pyx_r);
  23516. __Pyx_RefNannyFinishContext();
  23517. return __pyx_r;
  23518. }
  23519. /* "uvloop/loop.pyx":1188
  23520. *
  23521. * property print_debug_info:
  23522. * def __get__(self): # <<<<<<<<<<<<<<
  23523. * if UVLOOP_DEBUG:
  23524. * return lambda: self._print_debug_info()
  23525. */
  23526. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_16print_debug_info___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) {
  23527. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_3___get__ *__pyx_cur_scope;
  23528. PyObject *__pyx_r = NULL;
  23529. __Pyx_RefNannyDeclarations
  23530. int __pyx_t_1;
  23531. PyObject *__pyx_t_2 = NULL;
  23532. __Pyx_RefNannySetupContext("__get__", 0);
  23533. __pyx_cur_scope = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_3___get__ *)__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_3___get__(__pyx_ptype_6uvloop_4loop___pyx_scope_struct_3___get__, __pyx_empty_tuple, NULL);
  23534. if (unlikely(!__pyx_cur_scope)) {
  23535. __pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_3___get__ *)Py_None);
  23536. __Pyx_INCREF(Py_None);
  23537. __PYX_ERR(2, 1188, __pyx_L1_error)
  23538. } else {
  23539. __Pyx_GOTREF(__pyx_cur_scope);
  23540. }
  23541. __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  23542. __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  23543. __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  23544. /* "uvloop/loop.pyx":1189
  23545. * property print_debug_info:
  23546. * def __get__(self):
  23547. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  23548. * return lambda: self._print_debug_info()
  23549. * else:
  23550. */
  23551. __pyx_t_1 = (UVLOOP_DEBUG != 0);
  23552. if (likely(__pyx_t_1)) {
  23553. /* "uvloop/loop.pyx":1190
  23554. * def __get__(self):
  23555. * if UVLOOP_DEBUG:
  23556. * return lambda: self._print_debug_info() # <<<<<<<<<<<<<<
  23557. * else:
  23558. * raise AttributeError('print_debug_info')
  23559. */
  23560. __Pyx_XDECREF(__pyx_r);
  23561. __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6uvloop_4loop_4Loop_16print_debug_info_7__get___lambda1, 0, __pyx_n_s_Loop___get___locals_lambda, ((PyObject*)__pyx_cur_scope), __pyx_n_s_uvloop_loop, __pyx_d, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1190, __pyx_L1_error)
  23562. __Pyx_GOTREF(__pyx_t_2);
  23563. __pyx_r = __pyx_t_2;
  23564. __pyx_t_2 = 0;
  23565. goto __pyx_L0;
  23566. /* "uvloop/loop.pyx":1189
  23567. * property print_debug_info:
  23568. * def __get__(self):
  23569. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  23570. * return lambda: self._print_debug_info()
  23571. * else:
  23572. */
  23573. }
  23574. /* "uvloop/loop.pyx":1192
  23575. * return lambda: self._print_debug_info()
  23576. * else:
  23577. * raise AttributeError('print_debug_info') # <<<<<<<<<<<<<<
  23578. *
  23579. * # Public API
  23580. */
  23581. /*else*/ {
  23582. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__30, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1192, __pyx_L1_error)
  23583. __Pyx_GOTREF(__pyx_t_2);
  23584. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  23585. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  23586. __PYX_ERR(2, 1192, __pyx_L1_error)
  23587. }
  23588. /* "uvloop/loop.pyx":1188
  23589. *
  23590. * property print_debug_info:
  23591. * def __get__(self): # <<<<<<<<<<<<<<
  23592. * if UVLOOP_DEBUG:
  23593. * return lambda: self._print_debug_info()
  23594. */
  23595. /* function exit code */
  23596. __pyx_L1_error:;
  23597. __Pyx_XDECREF(__pyx_t_2);
  23598. __Pyx_AddTraceback("uvloop.loop.Loop.print_debug_info.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  23599. __pyx_r = NULL;
  23600. __pyx_L0:;
  23601. __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  23602. __Pyx_XGIVEREF(__pyx_r);
  23603. __Pyx_RefNannyFinishContext();
  23604. return __pyx_r;
  23605. }
  23606. /* "uvloop/loop.pyx":1196
  23607. * # Public API
  23608. *
  23609. * def __repr__(self): # <<<<<<<<<<<<<<
  23610. * return '<{}.{} running={} closed={} debug={}>'.format(
  23611. * self.__class__.__module__,
  23612. */
  23613. /* Python wrapper */
  23614. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_11__repr__(PyObject *__pyx_v_self); /*proto*/
  23615. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_11__repr__(PyObject *__pyx_v_self) {
  23616. PyObject *__pyx_r = 0;
  23617. __Pyx_RefNannyDeclarations
  23618. __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  23619. __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_10__repr__(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self));
  23620. /* function exit code */
  23621. __Pyx_RefNannyFinishContext();
  23622. return __pyx_r;
  23623. }
  23624. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_10__repr__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) {
  23625. PyObject *__pyx_r = NULL;
  23626. __Pyx_RefNannyDeclarations
  23627. PyObject *__pyx_t_1 = NULL;
  23628. PyObject *__pyx_t_2 = NULL;
  23629. PyObject *__pyx_t_3 = NULL;
  23630. PyObject *__pyx_t_4 = NULL;
  23631. PyObject *__pyx_t_5 = NULL;
  23632. PyObject *__pyx_t_6 = NULL;
  23633. PyObject *__pyx_t_7 = NULL;
  23634. PyObject *__pyx_t_8 = NULL;
  23635. PyObject *__pyx_t_9 = NULL;
  23636. int __pyx_t_10;
  23637. __Pyx_RefNannySetupContext("__repr__", 0);
  23638. /* "uvloop/loop.pyx":1197
  23639. *
  23640. * def __repr__(self):
  23641. * return '<{}.{} running={} closed={} debug={}>'.format( # <<<<<<<<<<<<<<
  23642. * self.__class__.__module__,
  23643. * self.__class__.__name__,
  23644. */
  23645. __Pyx_XDECREF(__pyx_r);
  23646. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_running_closed_debug, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1197, __pyx_L1_error)
  23647. __Pyx_GOTREF(__pyx_t_2);
  23648. /* "uvloop/loop.pyx":1198
  23649. * def __repr__(self):
  23650. * return '<{}.{} running={} closed={} debug={}>'.format(
  23651. * self.__class__.__module__, # <<<<<<<<<<<<<<
  23652. * self.__class__.__name__,
  23653. * self.is_running(),
  23654. */
  23655. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1198, __pyx_L1_error)
  23656. __Pyx_GOTREF(__pyx_t_3);
  23657. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_module); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1198, __pyx_L1_error)
  23658. __Pyx_GOTREF(__pyx_t_4);
  23659. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  23660. /* "uvloop/loop.pyx":1199
  23661. * return '<{}.{} running={} closed={} debug={}>'.format(
  23662. * self.__class__.__module__,
  23663. * self.__class__.__name__, # <<<<<<<<<<<<<<
  23664. * self.is_running(),
  23665. * self.is_closed(),
  23666. */
  23667. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1199, __pyx_L1_error)
  23668. __Pyx_GOTREF(__pyx_t_3);
  23669. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1199, __pyx_L1_error)
  23670. __Pyx_GOTREF(__pyx_t_5);
  23671. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  23672. /* "uvloop/loop.pyx":1200
  23673. * self.__class__.__module__,
  23674. * self.__class__.__name__,
  23675. * self.is_running(), # <<<<<<<<<<<<<<
  23676. * self.is_closed(),
  23677. * self.get_debug()
  23678. */
  23679. __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_running); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1200, __pyx_L1_error)
  23680. __Pyx_GOTREF(__pyx_t_6);
  23681. __pyx_t_7 = NULL;
  23682. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
  23683. __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
  23684. if (likely(__pyx_t_7)) {
  23685. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
  23686. __Pyx_INCREF(__pyx_t_7);
  23687. __Pyx_INCREF(function);
  23688. __Pyx_DECREF_SET(__pyx_t_6, function);
  23689. }
  23690. }
  23691. __pyx_t_3 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
  23692. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  23693. if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1200, __pyx_L1_error)
  23694. __Pyx_GOTREF(__pyx_t_3);
  23695. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  23696. /* "uvloop/loop.pyx":1201
  23697. * self.__class__.__name__,
  23698. * self.is_running(),
  23699. * self.is_closed(), # <<<<<<<<<<<<<<
  23700. * self.get_debug()
  23701. * )
  23702. */
  23703. __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_closed); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 1201, __pyx_L1_error)
  23704. __Pyx_GOTREF(__pyx_t_7);
  23705. __pyx_t_8 = NULL;
  23706. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
  23707. __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
  23708. if (likely(__pyx_t_8)) {
  23709. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
  23710. __Pyx_INCREF(__pyx_t_8);
  23711. __Pyx_INCREF(function);
  23712. __Pyx_DECREF_SET(__pyx_t_7, function);
  23713. }
  23714. }
  23715. __pyx_t_6 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_7);
  23716. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  23717. if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1201, __pyx_L1_error)
  23718. __Pyx_GOTREF(__pyx_t_6);
  23719. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  23720. /* "uvloop/loop.pyx":1202
  23721. * self.is_running(),
  23722. * self.is_closed(),
  23723. * self.get_debug() # <<<<<<<<<<<<<<
  23724. * )
  23725. *
  23726. */
  23727. __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_debug); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1202, __pyx_L1_error)
  23728. __Pyx_GOTREF(__pyx_t_8);
  23729. __pyx_t_9 = NULL;
  23730. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
  23731. __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
  23732. if (likely(__pyx_t_9)) {
  23733. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
  23734. __Pyx_INCREF(__pyx_t_9);
  23735. __Pyx_INCREF(function);
  23736. __Pyx_DECREF_SET(__pyx_t_8, function);
  23737. }
  23738. }
  23739. __pyx_t_7 = (__pyx_t_9) ? __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_9) : __Pyx_PyObject_CallNoArg(__pyx_t_8);
  23740. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  23741. if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 1202, __pyx_L1_error)
  23742. __Pyx_GOTREF(__pyx_t_7);
  23743. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  23744. __pyx_t_8 = NULL;
  23745. __pyx_t_10 = 0;
  23746. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
  23747. __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2);
  23748. if (likely(__pyx_t_8)) {
  23749. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  23750. __Pyx_INCREF(__pyx_t_8);
  23751. __Pyx_INCREF(function);
  23752. __Pyx_DECREF_SET(__pyx_t_2, function);
  23753. __pyx_t_10 = 1;
  23754. }
  23755. }
  23756. #if CYTHON_FAST_PYCALL
  23757. if (PyFunction_Check(__pyx_t_2)) {
  23758. PyObject *__pyx_temp[6] = {__pyx_t_8, __pyx_t_4, __pyx_t_5, __pyx_t_3, __pyx_t_6, __pyx_t_7};
  23759. __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_10, 5+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1197, __pyx_L1_error)
  23760. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  23761. __Pyx_GOTREF(__pyx_t_1);
  23762. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  23763. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  23764. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  23765. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  23766. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  23767. } else
  23768. #endif
  23769. #if CYTHON_FAST_PYCCALL
  23770. if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
  23771. PyObject *__pyx_temp[6] = {__pyx_t_8, __pyx_t_4, __pyx_t_5, __pyx_t_3, __pyx_t_6, __pyx_t_7};
  23772. __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_10, 5+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1197, __pyx_L1_error)
  23773. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  23774. __Pyx_GOTREF(__pyx_t_1);
  23775. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  23776. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  23777. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  23778. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  23779. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  23780. } else
  23781. #endif
  23782. {
  23783. __pyx_t_9 = PyTuple_New(5+__pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 1197, __pyx_L1_error)
  23784. __Pyx_GOTREF(__pyx_t_9);
  23785. if (__pyx_t_8) {
  23786. __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL;
  23787. }
  23788. __Pyx_GIVEREF(__pyx_t_4);
  23789. PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_10, __pyx_t_4);
  23790. __Pyx_GIVEREF(__pyx_t_5);
  23791. PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_10, __pyx_t_5);
  23792. __Pyx_GIVEREF(__pyx_t_3);
  23793. PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_10, __pyx_t_3);
  23794. __Pyx_GIVEREF(__pyx_t_6);
  23795. PyTuple_SET_ITEM(__pyx_t_9, 3+__pyx_t_10, __pyx_t_6);
  23796. __Pyx_GIVEREF(__pyx_t_7);
  23797. PyTuple_SET_ITEM(__pyx_t_9, 4+__pyx_t_10, __pyx_t_7);
  23798. __pyx_t_4 = 0;
  23799. __pyx_t_5 = 0;
  23800. __pyx_t_3 = 0;
  23801. __pyx_t_6 = 0;
  23802. __pyx_t_7 = 0;
  23803. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1197, __pyx_L1_error)
  23804. __Pyx_GOTREF(__pyx_t_1);
  23805. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  23806. }
  23807. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  23808. __pyx_r = __pyx_t_1;
  23809. __pyx_t_1 = 0;
  23810. goto __pyx_L0;
  23811. /* "uvloop/loop.pyx":1196
  23812. * # Public API
  23813. *
  23814. * def __repr__(self): # <<<<<<<<<<<<<<
  23815. * return '<{}.{} running={} closed={} debug={}>'.format(
  23816. * self.__class__.__module__,
  23817. */
  23818. /* function exit code */
  23819. __pyx_L1_error:;
  23820. __Pyx_XDECREF(__pyx_t_1);
  23821. __Pyx_XDECREF(__pyx_t_2);
  23822. __Pyx_XDECREF(__pyx_t_3);
  23823. __Pyx_XDECREF(__pyx_t_4);
  23824. __Pyx_XDECREF(__pyx_t_5);
  23825. __Pyx_XDECREF(__pyx_t_6);
  23826. __Pyx_XDECREF(__pyx_t_7);
  23827. __Pyx_XDECREF(__pyx_t_8);
  23828. __Pyx_XDECREF(__pyx_t_9);
  23829. __Pyx_AddTraceback("uvloop.loop.Loop.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  23830. __pyx_r = NULL;
  23831. __pyx_L0:;
  23832. __Pyx_XGIVEREF(__pyx_r);
  23833. __Pyx_RefNannyFinishContext();
  23834. return __pyx_r;
  23835. }
  23836. /* "uvloop/loop.pyx":1205
  23837. * )
  23838. *
  23839. * def call_soon(self, callback, *args, context=None): # <<<<<<<<<<<<<<
  23840. * """Arrange for a callback to be called as soon as possible.
  23841. *
  23842. */
  23843. /* Python wrapper */
  23844. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_13call_soon(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  23845. static char __pyx_doc_6uvloop_4loop_4Loop_12call_soon[] = "Loop.call_soon(self, callback, *args, context=None)\nArrange for a callback to be called as soon as possible.\n\n This operates as a FIFO queue: callbacks are called in the\n order in which they are registered. Each callback will be\n called exactly once.\n\n Any positional arguments after the callback will be passed to\n the callback when it is called.\n ";
  23846. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_13call_soon(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  23847. PyObject *__pyx_v_callback = 0;
  23848. PyObject *__pyx_v_context = 0;
  23849. PyObject *__pyx_v_args = 0;
  23850. PyObject *__pyx_r = 0;
  23851. __Pyx_RefNannyDeclarations
  23852. __Pyx_RefNannySetupContext("call_soon (wrapper)", 0);
  23853. if (PyTuple_GET_SIZE(__pyx_args) > 1) {
  23854. __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
  23855. if (unlikely(!__pyx_v_args)) {
  23856. __Pyx_RefNannyFinishContext();
  23857. return NULL;
  23858. }
  23859. __Pyx_GOTREF(__pyx_v_args);
  23860. } else {
  23861. __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  23862. }
  23863. {
  23864. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_callback,&__pyx_n_s_context,0};
  23865. PyObject* values[2] = {0,0};
  23866. values[1] = ((PyObject *)Py_None);
  23867. if (unlikely(__pyx_kwds)) {
  23868. Py_ssize_t kw_args;
  23869. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  23870. switch (pos_args) {
  23871. default:
  23872. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  23873. CYTHON_FALLTHROUGH;
  23874. case 0: break;
  23875. }
  23876. kw_args = PyDict_Size(__pyx_kwds);
  23877. switch (pos_args) {
  23878. case 0:
  23879. if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_callback)) != 0)) kw_args--;
  23880. else goto __pyx_L5_argtuple_error;
  23881. }
  23882. if (kw_args == 1) {
  23883. const Py_ssize_t index = 1;
  23884. PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, *__pyx_pyargnames[index]);
  23885. if (value) { values[index] = value; kw_args--; }
  23886. }
  23887. if (unlikely(kw_args > 0)) {
  23888. const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1;
  23889. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "call_soon") < 0)) __PYX_ERR(2, 1205, __pyx_L3_error)
  23890. }
  23891. } else if (PyTuple_GET_SIZE(__pyx_args) < 1) {
  23892. goto __pyx_L5_argtuple_error;
  23893. } else {
  23894. values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  23895. }
  23896. __pyx_v_callback = values[0];
  23897. __pyx_v_context = values[1];
  23898. }
  23899. goto __pyx_L4_argument_unpacking_done;
  23900. __pyx_L5_argtuple_error:;
  23901. __Pyx_RaiseArgtupleInvalid("call_soon", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 1205, __pyx_L3_error)
  23902. __pyx_L3_error:;
  23903. __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  23904. __Pyx_AddTraceback("uvloop.loop.Loop.call_soon", __pyx_clineno, __pyx_lineno, __pyx_filename);
  23905. __Pyx_RefNannyFinishContext();
  23906. return NULL;
  23907. __pyx_L4_argument_unpacking_done:;
  23908. __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_12call_soon(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self), __pyx_v_callback, __pyx_v_context, __pyx_v_args);
  23909. /* function exit code */
  23910. __Pyx_XDECREF(__pyx_v_args);
  23911. __Pyx_RefNannyFinishContext();
  23912. return __pyx_r;
  23913. }
  23914. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_12call_soon(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_callback, PyObject *__pyx_v_context, PyObject *__pyx_v_args) {
  23915. PyObject *__pyx_r = NULL;
  23916. __Pyx_RefNannyDeclarations
  23917. int __pyx_t_1;
  23918. PyObject *__pyx_t_2 = NULL;
  23919. __Pyx_RefNannySetupContext("call_soon", 0);
  23920. /* "uvloop/loop.pyx":1215
  23921. * the callback when it is called.
  23922. * """
  23923. * if self._debug == 1: # <<<<<<<<<<<<<<
  23924. * self._check_thread()
  23925. * if args:
  23926. */
  23927. __pyx_t_1 = ((__pyx_v_self->_debug == 1) != 0);
  23928. if (__pyx_t_1) {
  23929. /* "uvloop/loop.pyx":1216
  23930. * """
  23931. * if self._debug == 1:
  23932. * self._check_thread() # <<<<<<<<<<<<<<
  23933. * if args:
  23934. * return self._call_soon(callback, args, context)
  23935. */
  23936. __pyx_t_2 = __pyx_f_6uvloop_4loop_4Loop__check_thread(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1216, __pyx_L1_error)
  23937. __Pyx_GOTREF(__pyx_t_2);
  23938. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  23939. /* "uvloop/loop.pyx":1215
  23940. * the callback when it is called.
  23941. * """
  23942. * if self._debug == 1: # <<<<<<<<<<<<<<
  23943. * self._check_thread()
  23944. * if args:
  23945. */
  23946. }
  23947. /* "uvloop/loop.pyx":1217
  23948. * if self._debug == 1:
  23949. * self._check_thread()
  23950. * if args: # <<<<<<<<<<<<<<
  23951. * return self._call_soon(callback, args, context)
  23952. * else:
  23953. */
  23954. __pyx_t_1 = (PyTuple_GET_SIZE(__pyx_v_args) != 0);
  23955. if (__pyx_t_1) {
  23956. /* "uvloop/loop.pyx":1218
  23957. * self._check_thread()
  23958. * if args:
  23959. * return self._call_soon(callback, args, context) # <<<<<<<<<<<<<<
  23960. * else:
  23961. * return self._call_soon(callback, None, context)
  23962. */
  23963. __Pyx_XDECREF(__pyx_r);
  23964. __pyx_t_2 = __pyx_f_6uvloop_4loop_4Loop__call_soon(__pyx_v_self, __pyx_v_callback, __pyx_v_args, __pyx_v_context); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1218, __pyx_L1_error)
  23965. __Pyx_GOTREF(__pyx_t_2);
  23966. __pyx_r = __pyx_t_2;
  23967. __pyx_t_2 = 0;
  23968. goto __pyx_L0;
  23969. /* "uvloop/loop.pyx":1217
  23970. * if self._debug == 1:
  23971. * self._check_thread()
  23972. * if args: # <<<<<<<<<<<<<<
  23973. * return self._call_soon(callback, args, context)
  23974. * else:
  23975. */
  23976. }
  23977. /* "uvloop/loop.pyx":1220
  23978. * return self._call_soon(callback, args, context)
  23979. * else:
  23980. * return self._call_soon(callback, None, context) # <<<<<<<<<<<<<<
  23981. *
  23982. * def call_soon_threadsafe(self, callback, *args, context=None):
  23983. */
  23984. /*else*/ {
  23985. __Pyx_XDECREF(__pyx_r);
  23986. __pyx_t_2 = __pyx_f_6uvloop_4loop_4Loop__call_soon(__pyx_v_self, __pyx_v_callback, Py_None, __pyx_v_context); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1220, __pyx_L1_error)
  23987. __Pyx_GOTREF(__pyx_t_2);
  23988. __pyx_r = __pyx_t_2;
  23989. __pyx_t_2 = 0;
  23990. goto __pyx_L0;
  23991. }
  23992. /* "uvloop/loop.pyx":1205
  23993. * )
  23994. *
  23995. * def call_soon(self, callback, *args, context=None): # <<<<<<<<<<<<<<
  23996. * """Arrange for a callback to be called as soon as possible.
  23997. *
  23998. */
  23999. /* function exit code */
  24000. __pyx_L1_error:;
  24001. __Pyx_XDECREF(__pyx_t_2);
  24002. __Pyx_AddTraceback("uvloop.loop.Loop.call_soon", __pyx_clineno, __pyx_lineno, __pyx_filename);
  24003. __pyx_r = NULL;
  24004. __pyx_L0:;
  24005. __Pyx_XGIVEREF(__pyx_r);
  24006. __Pyx_RefNannyFinishContext();
  24007. return __pyx_r;
  24008. }
  24009. /* "uvloop/loop.pyx":1222
  24010. * return self._call_soon(callback, None, context)
  24011. *
  24012. * def call_soon_threadsafe(self, callback, *args, context=None): # <<<<<<<<<<<<<<
  24013. * """Like call_soon(), but thread-safe."""
  24014. * if not args:
  24015. */
  24016. /* Python wrapper */
  24017. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_15call_soon_threadsafe(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  24018. static char __pyx_doc_6uvloop_4loop_4Loop_14call_soon_threadsafe[] = "Loop.call_soon_threadsafe(self, callback, *args, context=None)\nLike call_soon(), but thread-safe.";
  24019. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_15call_soon_threadsafe(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  24020. PyObject *__pyx_v_callback = 0;
  24021. PyObject *__pyx_v_context = 0;
  24022. PyObject *__pyx_v_args = 0;
  24023. PyObject *__pyx_r = 0;
  24024. __Pyx_RefNannyDeclarations
  24025. __Pyx_RefNannySetupContext("call_soon_threadsafe (wrapper)", 0);
  24026. if (PyTuple_GET_SIZE(__pyx_args) > 1) {
  24027. __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
  24028. if (unlikely(!__pyx_v_args)) {
  24029. __Pyx_RefNannyFinishContext();
  24030. return NULL;
  24031. }
  24032. __Pyx_GOTREF(__pyx_v_args);
  24033. } else {
  24034. __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  24035. }
  24036. {
  24037. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_callback,&__pyx_n_s_context,0};
  24038. PyObject* values[2] = {0,0};
  24039. values[1] = ((PyObject *)Py_None);
  24040. if (unlikely(__pyx_kwds)) {
  24041. Py_ssize_t kw_args;
  24042. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  24043. switch (pos_args) {
  24044. default:
  24045. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  24046. CYTHON_FALLTHROUGH;
  24047. case 0: break;
  24048. }
  24049. kw_args = PyDict_Size(__pyx_kwds);
  24050. switch (pos_args) {
  24051. case 0:
  24052. if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_callback)) != 0)) kw_args--;
  24053. else goto __pyx_L5_argtuple_error;
  24054. }
  24055. if (kw_args == 1) {
  24056. const Py_ssize_t index = 1;
  24057. PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, *__pyx_pyargnames[index]);
  24058. if (value) { values[index] = value; kw_args--; }
  24059. }
  24060. if (unlikely(kw_args > 0)) {
  24061. const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1;
  24062. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "call_soon_threadsafe") < 0)) __PYX_ERR(2, 1222, __pyx_L3_error)
  24063. }
  24064. } else if (PyTuple_GET_SIZE(__pyx_args) < 1) {
  24065. goto __pyx_L5_argtuple_error;
  24066. } else {
  24067. values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  24068. }
  24069. __pyx_v_callback = values[0];
  24070. __pyx_v_context = values[1];
  24071. }
  24072. goto __pyx_L4_argument_unpacking_done;
  24073. __pyx_L5_argtuple_error:;
  24074. __Pyx_RaiseArgtupleInvalid("call_soon_threadsafe", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 1222, __pyx_L3_error)
  24075. __pyx_L3_error:;
  24076. __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  24077. __Pyx_AddTraceback("uvloop.loop.Loop.call_soon_threadsafe", __pyx_clineno, __pyx_lineno, __pyx_filename);
  24078. __Pyx_RefNannyFinishContext();
  24079. return NULL;
  24080. __pyx_L4_argument_unpacking_done:;
  24081. __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_14call_soon_threadsafe(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self), __pyx_v_callback, __pyx_v_context, __pyx_v_args);
  24082. /* function exit code */
  24083. __Pyx_XDECREF(__pyx_v_args);
  24084. __Pyx_RefNannyFinishContext();
  24085. return __pyx_r;
  24086. }
  24087. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_14call_soon_threadsafe(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_callback, PyObject *__pyx_v_context, PyObject *__pyx_v_args) {
  24088. PyObject *__pyx_v_handle = NULL;
  24089. PyObject *__pyx_r = NULL;
  24090. __Pyx_RefNannyDeclarations
  24091. int __pyx_t_1;
  24092. int __pyx_t_2;
  24093. PyObject *__pyx_t_3 = NULL;
  24094. __Pyx_RefNannySetupContext("call_soon_threadsafe", 0);
  24095. __Pyx_INCREF(__pyx_v_args);
  24096. /* "uvloop/loop.pyx":1224
  24097. * def call_soon_threadsafe(self, callback, *args, context=None):
  24098. * """Like call_soon(), but thread-safe."""
  24099. * if not args: # <<<<<<<<<<<<<<
  24100. * args = None
  24101. * handle = self._call_soon(callback, args, context)
  24102. */
  24103. __pyx_t_1 = (PyTuple_GET_SIZE(__pyx_v_args) != 0);
  24104. __pyx_t_2 = ((!__pyx_t_1) != 0);
  24105. if (__pyx_t_2) {
  24106. /* "uvloop/loop.pyx":1225
  24107. * """Like call_soon(), but thread-safe."""
  24108. * if not args:
  24109. * args = None # <<<<<<<<<<<<<<
  24110. * handle = self._call_soon(callback, args, context)
  24111. * self.handler_async.send()
  24112. */
  24113. __Pyx_INCREF(Py_None);
  24114. __Pyx_DECREF_SET(__pyx_v_args, ((PyObject*)Py_None));
  24115. /* "uvloop/loop.pyx":1224
  24116. * def call_soon_threadsafe(self, callback, *args, context=None):
  24117. * """Like call_soon(), but thread-safe."""
  24118. * if not args: # <<<<<<<<<<<<<<
  24119. * args = None
  24120. * handle = self._call_soon(callback, args, context)
  24121. */
  24122. }
  24123. /* "uvloop/loop.pyx":1226
  24124. * if not args:
  24125. * args = None
  24126. * handle = self._call_soon(callback, args, context) # <<<<<<<<<<<<<<
  24127. * self.handler_async.send()
  24128. * return handle
  24129. */
  24130. __pyx_t_3 = __pyx_f_6uvloop_4loop_4Loop__call_soon(__pyx_v_self, __pyx_v_callback, __pyx_v_args, __pyx_v_context); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1226, __pyx_L1_error)
  24131. __Pyx_GOTREF(__pyx_t_3);
  24132. __pyx_v_handle = __pyx_t_3;
  24133. __pyx_t_3 = 0;
  24134. /* "uvloop/loop.pyx":1227
  24135. * args = None
  24136. * handle = self._call_soon(callback, args, context)
  24137. * self.handler_async.send() # <<<<<<<<<<<<<<
  24138. * return handle
  24139. *
  24140. */
  24141. __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVAsync *)__pyx_v_self->handler_async->__pyx_base.__pyx_vtab)->send(__pyx_v_self->handler_async); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1227, __pyx_L1_error)
  24142. __Pyx_GOTREF(__pyx_t_3);
  24143. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  24144. /* "uvloop/loop.pyx":1228
  24145. * handle = self._call_soon(callback, args, context)
  24146. * self.handler_async.send()
  24147. * return handle # <<<<<<<<<<<<<<
  24148. *
  24149. * def call_later(self, delay, callback, *args, context=None):
  24150. */
  24151. __Pyx_XDECREF(__pyx_r);
  24152. __Pyx_INCREF(__pyx_v_handle);
  24153. __pyx_r = __pyx_v_handle;
  24154. goto __pyx_L0;
  24155. /* "uvloop/loop.pyx":1222
  24156. * return self._call_soon(callback, None, context)
  24157. *
  24158. * def call_soon_threadsafe(self, callback, *args, context=None): # <<<<<<<<<<<<<<
  24159. * """Like call_soon(), but thread-safe."""
  24160. * if not args:
  24161. */
  24162. /* function exit code */
  24163. __pyx_L1_error:;
  24164. __Pyx_XDECREF(__pyx_t_3);
  24165. __Pyx_AddTraceback("uvloop.loop.Loop.call_soon_threadsafe", __pyx_clineno, __pyx_lineno, __pyx_filename);
  24166. __pyx_r = NULL;
  24167. __pyx_L0:;
  24168. __Pyx_XDECREF(__pyx_v_args);
  24169. __Pyx_XDECREF(__pyx_v_handle);
  24170. __Pyx_XGIVEREF(__pyx_r);
  24171. __Pyx_RefNannyFinishContext();
  24172. return __pyx_r;
  24173. }
  24174. /* "uvloop/loop.pyx":1230
  24175. * return handle
  24176. *
  24177. * def call_later(self, delay, callback, *args, context=None): # <<<<<<<<<<<<<<
  24178. * """Arrange for a callback to be called at a given time.
  24179. *
  24180. */
  24181. /* Python wrapper */
  24182. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_17call_later(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  24183. static char __pyx_doc_6uvloop_4loop_4Loop_16call_later[] = "Loop.call_later(self, delay, callback, *args, context=None)\nArrange for a callback to be called at a given time.\n\n Return a Handle: an opaque object with a cancel() method that\n can be used to cancel the call.\n\n The delay can be an int or float, expressed in seconds. It is\n always relative to the current time.\n\n Each callback will be called exactly once. If two callbacks\n are scheduled for exactly the same time, it undefined which\n will be called first.\n\n Any positional arguments after the callback will be passed to\n the callback when it is called.\n ";
  24184. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_17call_later(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  24185. PyObject *__pyx_v_delay = 0;
  24186. PyObject *__pyx_v_callback = 0;
  24187. PyObject *__pyx_v_context = 0;
  24188. PyObject *__pyx_v_args = 0;
  24189. PyObject *__pyx_r = 0;
  24190. __Pyx_RefNannyDeclarations
  24191. __Pyx_RefNannySetupContext("call_later (wrapper)", 0);
  24192. if (PyTuple_GET_SIZE(__pyx_args) > 2) {
  24193. __pyx_v_args = PyTuple_GetSlice(__pyx_args, 2, PyTuple_GET_SIZE(__pyx_args));
  24194. if (unlikely(!__pyx_v_args)) {
  24195. __Pyx_RefNannyFinishContext();
  24196. return NULL;
  24197. }
  24198. __Pyx_GOTREF(__pyx_v_args);
  24199. } else {
  24200. __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  24201. }
  24202. {
  24203. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_delay,&__pyx_n_s_callback,&__pyx_n_s_context,0};
  24204. PyObject* values[3] = {0,0,0};
  24205. values[2] = ((PyObject *)Py_None);
  24206. if (unlikely(__pyx_kwds)) {
  24207. Py_ssize_t kw_args;
  24208. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  24209. switch (pos_args) {
  24210. default:
  24211. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  24212. CYTHON_FALLTHROUGH;
  24213. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  24214. CYTHON_FALLTHROUGH;
  24215. case 0: break;
  24216. }
  24217. kw_args = PyDict_Size(__pyx_kwds);
  24218. switch (pos_args) {
  24219. case 0:
  24220. if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_delay)) != 0)) kw_args--;
  24221. else goto __pyx_L5_argtuple_error;
  24222. CYTHON_FALLTHROUGH;
  24223. case 1:
  24224. if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_callback)) != 0)) kw_args--;
  24225. else {
  24226. __Pyx_RaiseArgtupleInvalid("call_later", 0, 2, 2, 1); __PYX_ERR(2, 1230, __pyx_L3_error)
  24227. }
  24228. }
  24229. if (kw_args == 1) {
  24230. const Py_ssize_t index = 2;
  24231. PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, *__pyx_pyargnames[index]);
  24232. if (value) { values[index] = value; kw_args--; }
  24233. }
  24234. if (unlikely(kw_args > 0)) {
  24235. const Py_ssize_t used_pos_args = (pos_args < 2) ? pos_args : 2;
  24236. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "call_later") < 0)) __PYX_ERR(2, 1230, __pyx_L3_error)
  24237. }
  24238. } else if (PyTuple_GET_SIZE(__pyx_args) < 2) {
  24239. goto __pyx_L5_argtuple_error;
  24240. } else {
  24241. values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  24242. values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  24243. }
  24244. __pyx_v_delay = values[0];
  24245. __pyx_v_callback = values[1];
  24246. __pyx_v_context = values[2];
  24247. }
  24248. goto __pyx_L4_argument_unpacking_done;
  24249. __pyx_L5_argtuple_error:;
  24250. __Pyx_RaiseArgtupleInvalid("call_later", 0, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 1230, __pyx_L3_error)
  24251. __pyx_L3_error:;
  24252. __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  24253. __Pyx_AddTraceback("uvloop.loop.Loop.call_later", __pyx_clineno, __pyx_lineno, __pyx_filename);
  24254. __Pyx_RefNannyFinishContext();
  24255. return NULL;
  24256. __pyx_L4_argument_unpacking_done:;
  24257. __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_16call_later(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self), __pyx_v_delay, __pyx_v_callback, __pyx_v_context, __pyx_v_args);
  24258. /* function exit code */
  24259. __Pyx_XDECREF(__pyx_v_args);
  24260. __Pyx_RefNannyFinishContext();
  24261. return __pyx_r;
  24262. }
  24263. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_16call_later(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_delay, PyObject *__pyx_v_callback, PyObject *__pyx_v_context, PyObject *__pyx_v_args) {
  24264. uint64_t __pyx_v_when;
  24265. PyObject *__pyx_r = NULL;
  24266. __Pyx_RefNannyDeclarations
  24267. PyObject *__pyx_t_1 = NULL;
  24268. int __pyx_t_2;
  24269. PyObject *__pyx_t_3 = NULL;
  24270. uint64_t __pyx_t_4;
  24271. int __pyx_t_5;
  24272. __Pyx_RefNannySetupContext("call_later", 0);
  24273. __Pyx_INCREF(__pyx_v_delay);
  24274. __Pyx_INCREF(__pyx_v_args);
  24275. /* "uvloop/loop.pyx":1248
  24276. * cdef uint64_t when
  24277. *
  24278. * self._check_closed() # <<<<<<<<<<<<<<
  24279. * if self._debug == 1:
  24280. * self._check_thread()
  24281. */
  24282. __pyx_t_1 = __pyx_f_6uvloop_4loop_4Loop__check_closed(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1248, __pyx_L1_error)
  24283. __Pyx_GOTREF(__pyx_t_1);
  24284. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  24285. /* "uvloop/loop.pyx":1249
  24286. *
  24287. * self._check_closed()
  24288. * if self._debug == 1: # <<<<<<<<<<<<<<
  24289. * self._check_thread()
  24290. *
  24291. */
  24292. __pyx_t_2 = ((__pyx_v_self->_debug == 1) != 0);
  24293. if (__pyx_t_2) {
  24294. /* "uvloop/loop.pyx":1250
  24295. * self._check_closed()
  24296. * if self._debug == 1:
  24297. * self._check_thread() # <<<<<<<<<<<<<<
  24298. *
  24299. * if delay < 0:
  24300. */
  24301. __pyx_t_1 = __pyx_f_6uvloop_4loop_4Loop__check_thread(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1250, __pyx_L1_error)
  24302. __Pyx_GOTREF(__pyx_t_1);
  24303. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  24304. /* "uvloop/loop.pyx":1249
  24305. *
  24306. * self._check_closed()
  24307. * if self._debug == 1: # <<<<<<<<<<<<<<
  24308. * self._check_thread()
  24309. *
  24310. */
  24311. }
  24312. /* "uvloop/loop.pyx":1252
  24313. * self._check_thread()
  24314. *
  24315. * if delay < 0: # <<<<<<<<<<<<<<
  24316. * delay = 0
  24317. * elif delay == py_inf:
  24318. */
  24319. __pyx_t_1 = PyObject_RichCompare(__pyx_v_delay, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1252, __pyx_L1_error)
  24320. __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(2, 1252, __pyx_L1_error)
  24321. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  24322. if (__pyx_t_2) {
  24323. /* "uvloop/loop.pyx":1253
  24324. *
  24325. * if delay < 0:
  24326. * delay = 0 # <<<<<<<<<<<<<<
  24327. * elif delay == py_inf:
  24328. * # ~100 years sounds like a good approximation of
  24329. */
  24330. __Pyx_INCREF(__pyx_int_0);
  24331. __Pyx_DECREF_SET(__pyx_v_delay, __pyx_int_0);
  24332. /* "uvloop/loop.pyx":1252
  24333. * self._check_thread()
  24334. *
  24335. * if delay < 0: # <<<<<<<<<<<<<<
  24336. * delay = 0
  24337. * elif delay == py_inf:
  24338. */
  24339. goto __pyx_L4;
  24340. }
  24341. /* "uvloop/loop.pyx":1254
  24342. * if delay < 0:
  24343. * delay = 0
  24344. * elif delay == py_inf: # <<<<<<<<<<<<<<
  24345. * # ~100 years sounds like a good approximation of
  24346. * # infinity for a Python application.
  24347. */
  24348. __pyx_t_1 = PyObject_RichCompare(__pyx_v_delay, __pyx_v_6uvloop_4loop_py_inf, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1254, __pyx_L1_error)
  24349. __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(2, 1254, __pyx_L1_error)
  24350. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  24351. if (__pyx_t_2) {
  24352. /* "uvloop/loop.pyx":1257
  24353. * # ~100 years sounds like a good approximation of
  24354. * # infinity for a Python application.
  24355. * delay = 3600 * 24 * 365 * 100 # <<<<<<<<<<<<<<
  24356. *
  24357. * when = <uint64_t>round(delay * 1000)
  24358. */
  24359. __Pyx_INCREF(__pyx_int_3153600000);
  24360. __Pyx_DECREF_SET(__pyx_v_delay, __pyx_int_3153600000);
  24361. /* "uvloop/loop.pyx":1254
  24362. * if delay < 0:
  24363. * delay = 0
  24364. * elif delay == py_inf: # <<<<<<<<<<<<<<
  24365. * # ~100 years sounds like a good approximation of
  24366. * # infinity for a Python application.
  24367. */
  24368. }
  24369. __pyx_L4:;
  24370. /* "uvloop/loop.pyx":1259
  24371. * delay = 3600 * 24 * 365 * 100
  24372. *
  24373. * when = <uint64_t>round(delay * 1000) # <<<<<<<<<<<<<<
  24374. * if not args:
  24375. * args = None
  24376. */
  24377. __pyx_t_1 = PyNumber_Multiply(__pyx_v_delay, __pyx_int_1000); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1259, __pyx_L1_error)
  24378. __Pyx_GOTREF(__pyx_t_1);
  24379. __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_round, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1259, __pyx_L1_error)
  24380. __Pyx_GOTREF(__pyx_t_3);
  24381. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  24382. __pyx_t_4 = __Pyx_PyInt_As_uint64_t(__pyx_t_3); if (unlikely((__pyx_t_4 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(2, 1259, __pyx_L1_error)
  24383. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  24384. __pyx_v_when = ((uint64_t)__pyx_t_4);
  24385. /* "uvloop/loop.pyx":1260
  24386. *
  24387. * when = <uint64_t>round(delay * 1000)
  24388. * if not args: # <<<<<<<<<<<<<<
  24389. * args = None
  24390. * if when == 0:
  24391. */
  24392. __pyx_t_2 = (PyTuple_GET_SIZE(__pyx_v_args) != 0);
  24393. __pyx_t_5 = ((!__pyx_t_2) != 0);
  24394. if (__pyx_t_5) {
  24395. /* "uvloop/loop.pyx":1261
  24396. * when = <uint64_t>round(delay * 1000)
  24397. * if not args:
  24398. * args = None # <<<<<<<<<<<<<<
  24399. * if when == 0:
  24400. * return self._call_soon(callback, args, context)
  24401. */
  24402. __Pyx_INCREF(Py_None);
  24403. __Pyx_DECREF_SET(__pyx_v_args, ((PyObject*)Py_None));
  24404. /* "uvloop/loop.pyx":1260
  24405. *
  24406. * when = <uint64_t>round(delay * 1000)
  24407. * if not args: # <<<<<<<<<<<<<<
  24408. * args = None
  24409. * if when == 0:
  24410. */
  24411. }
  24412. /* "uvloop/loop.pyx":1262
  24413. * if not args:
  24414. * args = None
  24415. * if when == 0: # <<<<<<<<<<<<<<
  24416. * return self._call_soon(callback, args, context)
  24417. * else:
  24418. */
  24419. __pyx_t_5 = ((__pyx_v_when == 0) != 0);
  24420. if (__pyx_t_5) {
  24421. /* "uvloop/loop.pyx":1263
  24422. * args = None
  24423. * if when == 0:
  24424. * return self._call_soon(callback, args, context) # <<<<<<<<<<<<<<
  24425. * else:
  24426. * return self._call_later(when, callback, args, context)
  24427. */
  24428. __Pyx_XDECREF(__pyx_r);
  24429. __pyx_t_3 = __pyx_f_6uvloop_4loop_4Loop__call_soon(__pyx_v_self, __pyx_v_callback, __pyx_v_args, __pyx_v_context); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1263, __pyx_L1_error)
  24430. __Pyx_GOTREF(__pyx_t_3);
  24431. __pyx_r = __pyx_t_3;
  24432. __pyx_t_3 = 0;
  24433. goto __pyx_L0;
  24434. /* "uvloop/loop.pyx":1262
  24435. * if not args:
  24436. * args = None
  24437. * if when == 0: # <<<<<<<<<<<<<<
  24438. * return self._call_soon(callback, args, context)
  24439. * else:
  24440. */
  24441. }
  24442. /* "uvloop/loop.pyx":1265
  24443. * return self._call_soon(callback, args, context)
  24444. * else:
  24445. * return self._call_later(when, callback, args, context) # <<<<<<<<<<<<<<
  24446. *
  24447. * def call_at(self, when, callback, *args, context=None):
  24448. */
  24449. /*else*/ {
  24450. __Pyx_XDECREF(__pyx_r);
  24451. __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_vtab)->_call_later(__pyx_v_self, __pyx_v_when, __pyx_v_callback, __pyx_v_args, __pyx_v_context); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1265, __pyx_L1_error)
  24452. __Pyx_GOTREF(__pyx_t_3);
  24453. __pyx_r = __pyx_t_3;
  24454. __pyx_t_3 = 0;
  24455. goto __pyx_L0;
  24456. }
  24457. /* "uvloop/loop.pyx":1230
  24458. * return handle
  24459. *
  24460. * def call_later(self, delay, callback, *args, context=None): # <<<<<<<<<<<<<<
  24461. * """Arrange for a callback to be called at a given time.
  24462. *
  24463. */
  24464. /* function exit code */
  24465. __pyx_L1_error:;
  24466. __Pyx_XDECREF(__pyx_t_1);
  24467. __Pyx_XDECREF(__pyx_t_3);
  24468. __Pyx_AddTraceback("uvloop.loop.Loop.call_later", __pyx_clineno, __pyx_lineno, __pyx_filename);
  24469. __pyx_r = NULL;
  24470. __pyx_L0:;
  24471. __Pyx_XDECREF(__pyx_v_args);
  24472. __Pyx_XDECREF(__pyx_v_delay);
  24473. __Pyx_XGIVEREF(__pyx_r);
  24474. __Pyx_RefNannyFinishContext();
  24475. return __pyx_r;
  24476. }
  24477. /* "uvloop/loop.pyx":1267
  24478. * return self._call_later(when, callback, args, context)
  24479. *
  24480. * def call_at(self, when, callback, *args, context=None): # <<<<<<<<<<<<<<
  24481. * """Like call_later(), but uses an absolute time.
  24482. *
  24483. */
  24484. /* Python wrapper */
  24485. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_19call_at(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  24486. static char __pyx_doc_6uvloop_4loop_4Loop_18call_at[] = "Loop.call_at(self, when, callback, *args, context=None)\nLike call_later(), but uses an absolute time.\n\n Absolute time corresponds to the event loop's time() method.\n ";
  24487. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_19call_at(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  24488. PyObject *__pyx_v_when = 0;
  24489. PyObject *__pyx_v_callback = 0;
  24490. PyObject *__pyx_v_context = 0;
  24491. PyObject *__pyx_v_args = 0;
  24492. PyObject *__pyx_r = 0;
  24493. __Pyx_RefNannyDeclarations
  24494. __Pyx_RefNannySetupContext("call_at (wrapper)", 0);
  24495. if (PyTuple_GET_SIZE(__pyx_args) > 2) {
  24496. __pyx_v_args = PyTuple_GetSlice(__pyx_args, 2, PyTuple_GET_SIZE(__pyx_args));
  24497. if (unlikely(!__pyx_v_args)) {
  24498. __Pyx_RefNannyFinishContext();
  24499. return NULL;
  24500. }
  24501. __Pyx_GOTREF(__pyx_v_args);
  24502. } else {
  24503. __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  24504. }
  24505. {
  24506. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_when,&__pyx_n_s_callback,&__pyx_n_s_context,0};
  24507. PyObject* values[3] = {0,0,0};
  24508. values[2] = ((PyObject *)Py_None);
  24509. if (unlikely(__pyx_kwds)) {
  24510. Py_ssize_t kw_args;
  24511. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  24512. switch (pos_args) {
  24513. default:
  24514. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  24515. CYTHON_FALLTHROUGH;
  24516. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  24517. CYTHON_FALLTHROUGH;
  24518. case 0: break;
  24519. }
  24520. kw_args = PyDict_Size(__pyx_kwds);
  24521. switch (pos_args) {
  24522. case 0:
  24523. if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_when)) != 0)) kw_args--;
  24524. else goto __pyx_L5_argtuple_error;
  24525. CYTHON_FALLTHROUGH;
  24526. case 1:
  24527. if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_callback)) != 0)) kw_args--;
  24528. else {
  24529. __Pyx_RaiseArgtupleInvalid("call_at", 0, 2, 2, 1); __PYX_ERR(2, 1267, __pyx_L3_error)
  24530. }
  24531. }
  24532. if (kw_args == 1) {
  24533. const Py_ssize_t index = 2;
  24534. PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, *__pyx_pyargnames[index]);
  24535. if (value) { values[index] = value; kw_args--; }
  24536. }
  24537. if (unlikely(kw_args > 0)) {
  24538. const Py_ssize_t used_pos_args = (pos_args < 2) ? pos_args : 2;
  24539. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "call_at") < 0)) __PYX_ERR(2, 1267, __pyx_L3_error)
  24540. }
  24541. } else if (PyTuple_GET_SIZE(__pyx_args) < 2) {
  24542. goto __pyx_L5_argtuple_error;
  24543. } else {
  24544. values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  24545. values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  24546. }
  24547. __pyx_v_when = values[0];
  24548. __pyx_v_callback = values[1];
  24549. __pyx_v_context = values[2];
  24550. }
  24551. goto __pyx_L4_argument_unpacking_done;
  24552. __pyx_L5_argtuple_error:;
  24553. __Pyx_RaiseArgtupleInvalid("call_at", 0, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 1267, __pyx_L3_error)
  24554. __pyx_L3_error:;
  24555. __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  24556. __Pyx_AddTraceback("uvloop.loop.Loop.call_at", __pyx_clineno, __pyx_lineno, __pyx_filename);
  24557. __Pyx_RefNannyFinishContext();
  24558. return NULL;
  24559. __pyx_L4_argument_unpacking_done:;
  24560. __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_18call_at(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self), __pyx_v_when, __pyx_v_callback, __pyx_v_context, __pyx_v_args);
  24561. /* function exit code */
  24562. __Pyx_XDECREF(__pyx_v_args);
  24563. __Pyx_RefNannyFinishContext();
  24564. return __pyx_r;
  24565. }
  24566. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_18call_at(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_when, PyObject *__pyx_v_callback, PyObject *__pyx_v_context, PyObject *__pyx_v_args) {
  24567. PyObject *__pyx_r = NULL;
  24568. __Pyx_RefNannyDeclarations
  24569. PyObject *__pyx_t_1 = NULL;
  24570. PyObject *__pyx_t_2 = NULL;
  24571. PyObject *__pyx_t_3 = NULL;
  24572. PyObject *__pyx_t_4 = NULL;
  24573. __Pyx_RefNannySetupContext("call_at", 0);
  24574. /* "uvloop/loop.pyx":1272
  24575. * Absolute time corresponds to the event loop's time() method.
  24576. * """
  24577. * return self.call_later( # <<<<<<<<<<<<<<
  24578. * when - self.time(), callback, *args, context=context)
  24579. *
  24580. */
  24581. __Pyx_XDECREF(__pyx_r);
  24582. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_call_later); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1272, __pyx_L1_error)
  24583. __Pyx_GOTREF(__pyx_t_1);
  24584. /* "uvloop/loop.pyx":1273
  24585. * """
  24586. * return self.call_later(
  24587. * when - self.time(), callback, *args, context=context) # <<<<<<<<<<<<<<
  24588. *
  24589. * def time(self):
  24590. */
  24591. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_time); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1273, __pyx_L1_error)
  24592. __Pyx_GOTREF(__pyx_t_3);
  24593. __pyx_t_4 = NULL;
  24594. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
  24595. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
  24596. if (likely(__pyx_t_4)) {
  24597. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  24598. __Pyx_INCREF(__pyx_t_4);
  24599. __Pyx_INCREF(function);
  24600. __Pyx_DECREF_SET(__pyx_t_3, function);
  24601. }
  24602. }
  24603. __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
  24604. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  24605. if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1273, __pyx_L1_error)
  24606. __Pyx_GOTREF(__pyx_t_2);
  24607. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  24608. __pyx_t_3 = PyNumber_Subtract(__pyx_v_when, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1273, __pyx_L1_error)
  24609. __Pyx_GOTREF(__pyx_t_3);
  24610. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  24611. /* "uvloop/loop.pyx":1272
  24612. * Absolute time corresponds to the event loop's time() method.
  24613. * """
  24614. * return self.call_later( # <<<<<<<<<<<<<<
  24615. * when - self.time(), callback, *args, context=context)
  24616. *
  24617. */
  24618. __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1272, __pyx_L1_error)
  24619. __Pyx_GOTREF(__pyx_t_2);
  24620. __Pyx_GIVEREF(__pyx_t_3);
  24621. PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
  24622. __Pyx_INCREF(__pyx_v_callback);
  24623. __Pyx_GIVEREF(__pyx_v_callback);
  24624. PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_callback);
  24625. __pyx_t_3 = 0;
  24626. /* "uvloop/loop.pyx":1273
  24627. * """
  24628. * return self.call_later(
  24629. * when - self.time(), callback, *args, context=context) # <<<<<<<<<<<<<<
  24630. *
  24631. * def time(self):
  24632. */
  24633. __pyx_t_3 = PyNumber_Add(__pyx_t_2, __pyx_v_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1272, __pyx_L1_error)
  24634. __Pyx_GOTREF(__pyx_t_3);
  24635. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  24636. __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1273, __pyx_L1_error)
  24637. __Pyx_GOTREF(__pyx_t_2);
  24638. if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_context, __pyx_v_context) < 0) __PYX_ERR(2, 1273, __pyx_L1_error)
  24639. /* "uvloop/loop.pyx":1272
  24640. * Absolute time corresponds to the event loop's time() method.
  24641. * """
  24642. * return self.call_later( # <<<<<<<<<<<<<<
  24643. * when - self.time(), callback, *args, context=context)
  24644. *
  24645. */
  24646. __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1272, __pyx_L1_error)
  24647. __Pyx_GOTREF(__pyx_t_4);
  24648. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  24649. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  24650. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  24651. __pyx_r = __pyx_t_4;
  24652. __pyx_t_4 = 0;
  24653. goto __pyx_L0;
  24654. /* "uvloop/loop.pyx":1267
  24655. * return self._call_later(when, callback, args, context)
  24656. *
  24657. * def call_at(self, when, callback, *args, context=None): # <<<<<<<<<<<<<<
  24658. * """Like call_later(), but uses an absolute time.
  24659. *
  24660. */
  24661. /* function exit code */
  24662. __pyx_L1_error:;
  24663. __Pyx_XDECREF(__pyx_t_1);
  24664. __Pyx_XDECREF(__pyx_t_2);
  24665. __Pyx_XDECREF(__pyx_t_3);
  24666. __Pyx_XDECREF(__pyx_t_4);
  24667. __Pyx_AddTraceback("uvloop.loop.Loop.call_at", __pyx_clineno, __pyx_lineno, __pyx_filename);
  24668. __pyx_r = NULL;
  24669. __pyx_L0:;
  24670. __Pyx_XGIVEREF(__pyx_r);
  24671. __Pyx_RefNannyFinishContext();
  24672. return __pyx_r;
  24673. }
  24674. /* "uvloop/loop.pyx":1275
  24675. * when - self.time(), callback, *args, context=context)
  24676. *
  24677. * def time(self): # <<<<<<<<<<<<<<
  24678. * """Return the time according to the event loop's clock.
  24679. *
  24680. */
  24681. /* Python wrapper */
  24682. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_21time(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  24683. static char __pyx_doc_6uvloop_4loop_4Loop_20time[] = "Loop.time(self)\nReturn the time according to the event loop's clock.\n\n This is a float expressed in seconds since an epoch, but the\n epoch, precision, accuracy and drift are unspecified and may\n differ per event loop.\n ";
  24684. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_21time(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  24685. PyObject *__pyx_r = 0;
  24686. __Pyx_RefNannyDeclarations
  24687. __Pyx_RefNannySetupContext("time (wrapper)", 0);
  24688. __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_20time(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self));
  24689. /* function exit code */
  24690. __Pyx_RefNannyFinishContext();
  24691. return __pyx_r;
  24692. }
  24693. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_20time(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) {
  24694. PyObject *__pyx_r = NULL;
  24695. __Pyx_RefNannyDeclarations
  24696. PyObject *__pyx_t_1 = NULL;
  24697. __Pyx_RefNannySetupContext("time", 0);
  24698. /* "uvloop/loop.pyx":1282
  24699. * differ per event loop.
  24700. * """
  24701. * return self._time() / 1000 # <<<<<<<<<<<<<<
  24702. *
  24703. * def stop(self):
  24704. */
  24705. __Pyx_XDECREF(__pyx_r);
  24706. __pyx_t_1 = PyFloat_FromDouble((((double)((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_vtab)->_time(__pyx_v_self)) / 1000.0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1282, __pyx_L1_error)
  24707. __Pyx_GOTREF(__pyx_t_1);
  24708. __pyx_r = __pyx_t_1;
  24709. __pyx_t_1 = 0;
  24710. goto __pyx_L0;
  24711. /* "uvloop/loop.pyx":1275
  24712. * when - self.time(), callback, *args, context=context)
  24713. *
  24714. * def time(self): # <<<<<<<<<<<<<<
  24715. * """Return the time according to the event loop's clock.
  24716. *
  24717. */
  24718. /* function exit code */
  24719. __pyx_L1_error:;
  24720. __Pyx_XDECREF(__pyx_t_1);
  24721. __Pyx_AddTraceback("uvloop.loop.Loop.time", __pyx_clineno, __pyx_lineno, __pyx_filename);
  24722. __pyx_r = NULL;
  24723. __pyx_L0:;
  24724. __Pyx_XGIVEREF(__pyx_r);
  24725. __Pyx_RefNannyFinishContext();
  24726. return __pyx_r;
  24727. }
  24728. /* "uvloop/loop.pyx":1284
  24729. * return self._time() / 1000
  24730. *
  24731. * def stop(self): # <<<<<<<<<<<<<<
  24732. * """Stop running the event loop.
  24733. *
  24734. */
  24735. /* Python wrapper */
  24736. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_23stop(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  24737. static char __pyx_doc_6uvloop_4loop_4Loop_22stop[] = "Loop.stop(self)\nStop running the event loop.\n\n Every callback already scheduled will still run. This simply informs\n run_forever to stop looping after a complete iteration.\n ";
  24738. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_23stop(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  24739. PyObject *__pyx_r = 0;
  24740. __Pyx_RefNannyDeclarations
  24741. __Pyx_RefNannySetupContext("stop (wrapper)", 0);
  24742. __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_22stop(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self));
  24743. /* function exit code */
  24744. __Pyx_RefNannyFinishContext();
  24745. return __pyx_r;
  24746. }
  24747. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_22stop(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) {
  24748. PyObject *__pyx_r = NULL;
  24749. __Pyx_RefNannyDeclarations
  24750. PyObject *__pyx_t_1 = NULL;
  24751. PyObject *__pyx_t_2 = NULL;
  24752. __Pyx_RefNannySetupContext("stop", 0);
  24753. /* "uvloop/loop.pyx":1291
  24754. * """
  24755. * self._call_soon_handle(
  24756. * new_MethodHandle1( # <<<<<<<<<<<<<<
  24757. * self,
  24758. * "Loop._stop",
  24759. */
  24760. __pyx_t_1 = __pyx_f_6uvloop_4loop_new_MethodHandle1(__pyx_v_self, __pyx_kp_u_Loop__stop, ((__pyx_t_6uvloop_4loop_method1_t)((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_vtab)->_stop), ((PyObject *)__pyx_v_self), Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1291, __pyx_L1_error)
  24761. __Pyx_GOTREF(__pyx_t_1);
  24762. if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6uvloop_4loop_Handle))))) __PYX_ERR(2, 1291, __pyx_L1_error)
  24763. /* "uvloop/loop.pyx":1290
  24764. * run_forever to stop looping after a complete iteration.
  24765. * """
  24766. * self._call_soon_handle( # <<<<<<<<<<<<<<
  24767. * new_MethodHandle1(
  24768. * self,
  24769. */
  24770. __pyx_t_2 = __pyx_f_6uvloop_4loop_4Loop__call_soon_handle(__pyx_v_self, ((struct __pyx_obj_6uvloop_4loop_Handle *)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1290, __pyx_L1_error)
  24771. __Pyx_GOTREF(__pyx_t_2);
  24772. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  24773. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  24774. /* "uvloop/loop.pyx":1284
  24775. * return self._time() / 1000
  24776. *
  24777. * def stop(self): # <<<<<<<<<<<<<<
  24778. * """Stop running the event loop.
  24779. *
  24780. */
  24781. /* function exit code */
  24782. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  24783. goto __pyx_L0;
  24784. __pyx_L1_error:;
  24785. __Pyx_XDECREF(__pyx_t_1);
  24786. __Pyx_XDECREF(__pyx_t_2);
  24787. __Pyx_AddTraceback("uvloop.loop.Loop.stop", __pyx_clineno, __pyx_lineno, __pyx_filename);
  24788. __pyx_r = NULL;
  24789. __pyx_L0:;
  24790. __Pyx_XGIVEREF(__pyx_r);
  24791. __Pyx_RefNannyFinishContext();
  24792. return __pyx_r;
  24793. }
  24794. /* "uvloop/loop.pyx":1298
  24795. * None))
  24796. *
  24797. * def run_forever(self): # <<<<<<<<<<<<<<
  24798. * """Run the event loop until stop() is called."""
  24799. * self._check_closed()
  24800. */
  24801. /* Python wrapper */
  24802. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_25run_forever(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  24803. static char __pyx_doc_6uvloop_4loop_4Loop_24run_forever[] = "Loop.run_forever(self)\nRun the event loop until stop() is called.";
  24804. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_25run_forever(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  24805. PyObject *__pyx_r = 0;
  24806. __Pyx_RefNannyDeclarations
  24807. __Pyx_RefNannySetupContext("run_forever (wrapper)", 0);
  24808. __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_24run_forever(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self));
  24809. /* function exit code */
  24810. __Pyx_RefNannyFinishContext();
  24811. return __pyx_r;
  24812. }
  24813. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_24run_forever(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) {
  24814. uv_run_mode __pyx_v_mode;
  24815. PyObject *__pyx_v_old_agen_hooks = NULL;
  24816. PyObject *__pyx_r = NULL;
  24817. __Pyx_RefNannyDeclarations
  24818. PyObject *__pyx_t_1 = NULL;
  24819. int __pyx_t_2;
  24820. int __pyx_t_3;
  24821. PyObject *__pyx_t_4 = NULL;
  24822. PyObject *__pyx_t_5 = NULL;
  24823. int __pyx_t_6;
  24824. int __pyx_t_7;
  24825. char const *__pyx_t_8;
  24826. PyObject *__pyx_t_9 = NULL;
  24827. PyObject *__pyx_t_10 = NULL;
  24828. PyObject *__pyx_t_11 = NULL;
  24829. PyObject *__pyx_t_12 = NULL;
  24830. PyObject *__pyx_t_13 = NULL;
  24831. PyObject *__pyx_t_14 = NULL;
  24832. __Pyx_RefNannySetupContext("run_forever", 0);
  24833. /* "uvloop/loop.pyx":1300
  24834. * def run_forever(self):
  24835. * """Run the event loop until stop() is called."""
  24836. * self._check_closed() # <<<<<<<<<<<<<<
  24837. * mode = uv.UV_RUN_DEFAULT
  24838. * if self._stopping:
  24839. */
  24840. __pyx_t_1 = __pyx_f_6uvloop_4loop_4Loop__check_closed(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1300, __pyx_L1_error)
  24841. __Pyx_GOTREF(__pyx_t_1);
  24842. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  24843. /* "uvloop/loop.pyx":1301
  24844. * """Run the event loop until stop() is called."""
  24845. * self._check_closed()
  24846. * mode = uv.UV_RUN_DEFAULT # <<<<<<<<<<<<<<
  24847. * if self._stopping:
  24848. * # loop.stop() was called right before loop.run_forever().
  24849. */
  24850. __pyx_v_mode = UV_RUN_DEFAULT;
  24851. /* "uvloop/loop.pyx":1302
  24852. * self._check_closed()
  24853. * mode = uv.UV_RUN_DEFAULT
  24854. * if self._stopping: # <<<<<<<<<<<<<<
  24855. * # loop.stop() was called right before loop.run_forever().
  24856. * # This is how asyncio loop behaves.
  24857. */
  24858. __pyx_t_2 = (__pyx_v_self->_stopping != 0);
  24859. if (__pyx_t_2) {
  24860. /* "uvloop/loop.pyx":1305
  24861. * # loop.stop() was called right before loop.run_forever().
  24862. * # This is how asyncio loop behaves.
  24863. * mode = uv.UV_RUN_NOWAIT # <<<<<<<<<<<<<<
  24864. * self._set_coroutine_debug(self._debug)
  24865. * if self._asyncgens is not None:
  24866. */
  24867. __pyx_v_mode = UV_RUN_NOWAIT;
  24868. /* "uvloop/loop.pyx":1302
  24869. * self._check_closed()
  24870. * mode = uv.UV_RUN_DEFAULT
  24871. * if self._stopping: # <<<<<<<<<<<<<<
  24872. * # loop.stop() was called right before loop.run_forever().
  24873. * # This is how asyncio loop behaves.
  24874. */
  24875. }
  24876. /* "uvloop/loop.pyx":1306
  24877. * # This is how asyncio loop behaves.
  24878. * mode = uv.UV_RUN_NOWAIT
  24879. * self._set_coroutine_debug(self._debug) # <<<<<<<<<<<<<<
  24880. * if self._asyncgens is not None:
  24881. * old_agen_hooks = sys.get_asyncgen_hooks()
  24882. */
  24883. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_vtab)->_set_coroutine_debug(__pyx_v_self, __pyx_v_self->_debug); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1306, __pyx_L1_error)
  24884. __Pyx_GOTREF(__pyx_t_1);
  24885. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  24886. /* "uvloop/loop.pyx":1307
  24887. * mode = uv.UV_RUN_NOWAIT
  24888. * self._set_coroutine_debug(self._debug)
  24889. * if self._asyncgens is not None: # <<<<<<<<<<<<<<
  24890. * old_agen_hooks = sys.get_asyncgen_hooks()
  24891. * sys.set_asyncgen_hooks(firstiter=self._asyncgen_firstiter_hook,
  24892. */
  24893. __pyx_t_2 = (__pyx_v_self->_asyncgens != Py_None);
  24894. __pyx_t_3 = (__pyx_t_2 != 0);
  24895. if (__pyx_t_3) {
  24896. /* "uvloop/loop.pyx":1308
  24897. * self._set_coroutine_debug(self._debug)
  24898. * if self._asyncgens is not None:
  24899. * old_agen_hooks = sys.get_asyncgen_hooks() # <<<<<<<<<<<<<<
  24900. * sys.set_asyncgen_hooks(firstiter=self._asyncgen_firstiter_hook,
  24901. * finalizer=self._asyncgen_finalizer_hook)
  24902. */
  24903. __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_sys); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1308, __pyx_L1_error)
  24904. __Pyx_GOTREF(__pyx_t_4);
  24905. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_get_asyncgen_hooks); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1308, __pyx_L1_error)
  24906. __Pyx_GOTREF(__pyx_t_5);
  24907. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  24908. __pyx_t_4 = NULL;
  24909. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
  24910. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
  24911. if (likely(__pyx_t_4)) {
  24912. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
  24913. __Pyx_INCREF(__pyx_t_4);
  24914. __Pyx_INCREF(function);
  24915. __Pyx_DECREF_SET(__pyx_t_5, function);
  24916. }
  24917. }
  24918. __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
  24919. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  24920. if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1308, __pyx_L1_error)
  24921. __Pyx_GOTREF(__pyx_t_1);
  24922. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  24923. __pyx_v_old_agen_hooks = __pyx_t_1;
  24924. __pyx_t_1 = 0;
  24925. /* "uvloop/loop.pyx":1309
  24926. * if self._asyncgens is not None:
  24927. * old_agen_hooks = sys.get_asyncgen_hooks()
  24928. * sys.set_asyncgen_hooks(firstiter=self._asyncgen_firstiter_hook, # <<<<<<<<<<<<<<
  24929. * finalizer=self._asyncgen_finalizer_hook)
  24930. * try:
  24931. */
  24932. __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1309, __pyx_L1_error)
  24933. __Pyx_GOTREF(__pyx_t_1);
  24934. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_set_asyncgen_hooks); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1309, __pyx_L1_error)
  24935. __Pyx_GOTREF(__pyx_t_5);
  24936. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  24937. __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1309, __pyx_L1_error)
  24938. __Pyx_GOTREF(__pyx_t_1);
  24939. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_asyncgen_firstiter_hook); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1309, __pyx_L1_error)
  24940. __Pyx_GOTREF(__pyx_t_4);
  24941. if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_firstiter, __pyx_t_4) < 0) __PYX_ERR(2, 1309, __pyx_L1_error)
  24942. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  24943. /* "uvloop/loop.pyx":1310
  24944. * old_agen_hooks = sys.get_asyncgen_hooks()
  24945. * sys.set_asyncgen_hooks(firstiter=self._asyncgen_firstiter_hook,
  24946. * finalizer=self._asyncgen_finalizer_hook) # <<<<<<<<<<<<<<
  24947. * try:
  24948. * self._run(mode)
  24949. */
  24950. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_asyncgen_finalizer_hook); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1310, __pyx_L1_error)
  24951. __Pyx_GOTREF(__pyx_t_4);
  24952. if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_finalizer, __pyx_t_4) < 0) __PYX_ERR(2, 1309, __pyx_L1_error)
  24953. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  24954. /* "uvloop/loop.pyx":1309
  24955. * if self._asyncgens is not None:
  24956. * old_agen_hooks = sys.get_asyncgen_hooks()
  24957. * sys.set_asyncgen_hooks(firstiter=self._asyncgen_firstiter_hook, # <<<<<<<<<<<<<<
  24958. * finalizer=self._asyncgen_finalizer_hook)
  24959. * try:
  24960. */
  24961. __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1309, __pyx_L1_error)
  24962. __Pyx_GOTREF(__pyx_t_4);
  24963. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  24964. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  24965. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  24966. /* "uvloop/loop.pyx":1307
  24967. * mode = uv.UV_RUN_NOWAIT
  24968. * self._set_coroutine_debug(self._debug)
  24969. * if self._asyncgens is not None: # <<<<<<<<<<<<<<
  24970. * old_agen_hooks = sys.get_asyncgen_hooks()
  24971. * sys.set_asyncgen_hooks(firstiter=self._asyncgen_firstiter_hook,
  24972. */
  24973. }
  24974. /* "uvloop/loop.pyx":1311
  24975. * sys.set_asyncgen_hooks(firstiter=self._asyncgen_firstiter_hook,
  24976. * finalizer=self._asyncgen_finalizer_hook)
  24977. * try: # <<<<<<<<<<<<<<
  24978. * self._run(mode)
  24979. * finally:
  24980. */
  24981. /*try:*/ {
  24982. /* "uvloop/loop.pyx":1312
  24983. * finalizer=self._asyncgen_finalizer_hook)
  24984. * try:
  24985. * self._run(mode) # <<<<<<<<<<<<<<
  24986. * finally:
  24987. * self._set_coroutine_debug(False)
  24988. */
  24989. __pyx_t_4 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_vtab)->_run(__pyx_v_self, __pyx_v_mode); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1312, __pyx_L6_error)
  24990. __Pyx_GOTREF(__pyx_t_4);
  24991. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  24992. }
  24993. /* "uvloop/loop.pyx":1314
  24994. * self._run(mode)
  24995. * finally:
  24996. * self._set_coroutine_debug(False) # <<<<<<<<<<<<<<
  24997. * if self._asyncgens is not None:
  24998. * sys.set_asyncgen_hooks(*old_agen_hooks)
  24999. */
  25000. /*finally:*/ {
  25001. /*normal exit:*/{
  25002. __pyx_t_4 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_vtab)->_set_coroutine_debug(__pyx_v_self, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1314, __pyx_L1_error)
  25003. __Pyx_GOTREF(__pyx_t_4);
  25004. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  25005. /* "uvloop/loop.pyx":1315
  25006. * finally:
  25007. * self._set_coroutine_debug(False)
  25008. * if self._asyncgens is not None: # <<<<<<<<<<<<<<
  25009. * sys.set_asyncgen_hooks(*old_agen_hooks)
  25010. *
  25011. */
  25012. __pyx_t_3 = (__pyx_v_self->_asyncgens != Py_None);
  25013. __pyx_t_2 = (__pyx_t_3 != 0);
  25014. if (__pyx_t_2) {
  25015. /* "uvloop/loop.pyx":1316
  25016. * self._set_coroutine_debug(False)
  25017. * if self._asyncgens is not None:
  25018. * sys.set_asyncgen_hooks(*old_agen_hooks) # <<<<<<<<<<<<<<
  25019. *
  25020. * def close(self):
  25021. */
  25022. __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_sys); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1316, __pyx_L1_error)
  25023. __Pyx_GOTREF(__pyx_t_4);
  25024. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_set_asyncgen_hooks); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1316, __pyx_L1_error)
  25025. __Pyx_GOTREF(__pyx_t_1);
  25026. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  25027. if (unlikely(!__pyx_v_old_agen_hooks)) { __Pyx_RaiseUnboundLocalError("old_agen_hooks"); __PYX_ERR(2, 1316, __pyx_L1_error) }
  25028. __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_v_old_agen_hooks); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1316, __pyx_L1_error)
  25029. __Pyx_GOTREF(__pyx_t_4);
  25030. __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1316, __pyx_L1_error)
  25031. __Pyx_GOTREF(__pyx_t_5);
  25032. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  25033. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  25034. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  25035. /* "uvloop/loop.pyx":1315
  25036. * finally:
  25037. * self._set_coroutine_debug(False)
  25038. * if self._asyncgens is not None: # <<<<<<<<<<<<<<
  25039. * sys.set_asyncgen_hooks(*old_agen_hooks)
  25040. *
  25041. */
  25042. }
  25043. goto __pyx_L7;
  25044. }
  25045. __pyx_L6_error:;
  25046. /*exception exit:*/{
  25047. __Pyx_PyThreadState_declare
  25048. __Pyx_PyThreadState_assign
  25049. __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0;
  25050. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  25051. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  25052. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  25053. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
  25054. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11) < 0)) __Pyx_ErrFetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
  25055. __Pyx_XGOTREF(__pyx_t_9);
  25056. __Pyx_XGOTREF(__pyx_t_10);
  25057. __Pyx_XGOTREF(__pyx_t_11);
  25058. __Pyx_XGOTREF(__pyx_t_12);
  25059. __Pyx_XGOTREF(__pyx_t_13);
  25060. __Pyx_XGOTREF(__pyx_t_14);
  25061. __pyx_t_6 = __pyx_lineno; __pyx_t_7 = __pyx_clineno; __pyx_t_8 = __pyx_filename;
  25062. {
  25063. /* "uvloop/loop.pyx":1314
  25064. * self._run(mode)
  25065. * finally:
  25066. * self._set_coroutine_debug(False) # <<<<<<<<<<<<<<
  25067. * if self._asyncgens is not None:
  25068. * sys.set_asyncgen_hooks(*old_agen_hooks)
  25069. */
  25070. __pyx_t_5 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_vtab)->_set_coroutine_debug(__pyx_v_self, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1314, __pyx_L10_error)
  25071. __Pyx_GOTREF(__pyx_t_5);
  25072. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  25073. /* "uvloop/loop.pyx":1315
  25074. * finally:
  25075. * self._set_coroutine_debug(False)
  25076. * if self._asyncgens is not None: # <<<<<<<<<<<<<<
  25077. * sys.set_asyncgen_hooks(*old_agen_hooks)
  25078. *
  25079. */
  25080. __pyx_t_2 = (__pyx_v_self->_asyncgens != Py_None);
  25081. __pyx_t_3 = (__pyx_t_2 != 0);
  25082. if (__pyx_t_3) {
  25083. /* "uvloop/loop.pyx":1316
  25084. * self._set_coroutine_debug(False)
  25085. * if self._asyncgens is not None:
  25086. * sys.set_asyncgen_hooks(*old_agen_hooks) # <<<<<<<<<<<<<<
  25087. *
  25088. * def close(self):
  25089. */
  25090. __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_sys); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1316, __pyx_L10_error)
  25091. __Pyx_GOTREF(__pyx_t_5);
  25092. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_set_asyncgen_hooks); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1316, __pyx_L10_error)
  25093. __Pyx_GOTREF(__pyx_t_4);
  25094. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  25095. if (unlikely(!__pyx_v_old_agen_hooks)) { __Pyx_RaiseUnboundLocalError("old_agen_hooks"); __PYX_ERR(2, 1316, __pyx_L10_error) }
  25096. __pyx_t_5 = __Pyx_PySequence_Tuple(__pyx_v_old_agen_hooks); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1316, __pyx_L10_error)
  25097. __Pyx_GOTREF(__pyx_t_5);
  25098. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1316, __pyx_L10_error)
  25099. __Pyx_GOTREF(__pyx_t_1);
  25100. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  25101. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  25102. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  25103. /* "uvloop/loop.pyx":1315
  25104. * finally:
  25105. * self._set_coroutine_debug(False)
  25106. * if self._asyncgens is not None: # <<<<<<<<<<<<<<
  25107. * sys.set_asyncgen_hooks(*old_agen_hooks)
  25108. *
  25109. */
  25110. }
  25111. }
  25112. if (PY_MAJOR_VERSION >= 3) {
  25113. __Pyx_XGIVEREF(__pyx_t_12);
  25114. __Pyx_XGIVEREF(__pyx_t_13);
  25115. __Pyx_XGIVEREF(__pyx_t_14);
  25116. __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
  25117. }
  25118. __Pyx_XGIVEREF(__pyx_t_9);
  25119. __Pyx_XGIVEREF(__pyx_t_10);
  25120. __Pyx_XGIVEREF(__pyx_t_11);
  25121. __Pyx_ErrRestore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
  25122. __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0;
  25123. __pyx_lineno = __pyx_t_6; __pyx_clineno = __pyx_t_7; __pyx_filename = __pyx_t_8;
  25124. goto __pyx_L1_error;
  25125. __pyx_L10_error:;
  25126. if (PY_MAJOR_VERSION >= 3) {
  25127. __Pyx_XGIVEREF(__pyx_t_12);
  25128. __Pyx_XGIVEREF(__pyx_t_13);
  25129. __Pyx_XGIVEREF(__pyx_t_14);
  25130. __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
  25131. }
  25132. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  25133. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  25134. __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
  25135. __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0;
  25136. goto __pyx_L1_error;
  25137. }
  25138. __pyx_L7:;
  25139. }
  25140. /* "uvloop/loop.pyx":1298
  25141. * None))
  25142. *
  25143. * def run_forever(self): # <<<<<<<<<<<<<<
  25144. * """Run the event loop until stop() is called."""
  25145. * self._check_closed()
  25146. */
  25147. /* function exit code */
  25148. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  25149. goto __pyx_L0;
  25150. __pyx_L1_error:;
  25151. __Pyx_XDECREF(__pyx_t_1);
  25152. __Pyx_XDECREF(__pyx_t_4);
  25153. __Pyx_XDECREF(__pyx_t_5);
  25154. __Pyx_AddTraceback("uvloop.loop.Loop.run_forever", __pyx_clineno, __pyx_lineno, __pyx_filename);
  25155. __pyx_r = NULL;
  25156. __pyx_L0:;
  25157. __Pyx_XDECREF(__pyx_v_old_agen_hooks);
  25158. __Pyx_XGIVEREF(__pyx_r);
  25159. __Pyx_RefNannyFinishContext();
  25160. return __pyx_r;
  25161. }
  25162. /* "uvloop/loop.pyx":1318
  25163. * sys.set_asyncgen_hooks(*old_agen_hooks)
  25164. *
  25165. * def close(self): # <<<<<<<<<<<<<<
  25166. * """Close the event loop.
  25167. *
  25168. */
  25169. /* Python wrapper */
  25170. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_27close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  25171. static char __pyx_doc_6uvloop_4loop_4Loop_26close[] = "Loop.close(self)\nClose the event loop.\n\n The event loop must not be running.\n\n This is idempotent and irreversible.\n\n No other methods should be called after this one.\n ";
  25172. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_27close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  25173. PyObject *__pyx_r = 0;
  25174. __Pyx_RefNannyDeclarations
  25175. __Pyx_RefNannySetupContext("close (wrapper)", 0);
  25176. __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_26close(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self));
  25177. /* function exit code */
  25178. __Pyx_RefNannyFinishContext();
  25179. return __pyx_r;
  25180. }
  25181. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_26close(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) {
  25182. PyObject *__pyx_r = NULL;
  25183. __Pyx_RefNannyDeclarations
  25184. PyObject *__pyx_t_1 = NULL;
  25185. __Pyx_RefNannySetupContext("close", 0);
  25186. /* "uvloop/loop.pyx":1327
  25187. * No other methods should be called after this one.
  25188. * """
  25189. * self._close() # <<<<<<<<<<<<<<
  25190. *
  25191. * def get_debug(self):
  25192. */
  25193. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_vtab)->_close(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1327, __pyx_L1_error)
  25194. __Pyx_GOTREF(__pyx_t_1);
  25195. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  25196. /* "uvloop/loop.pyx":1318
  25197. * sys.set_asyncgen_hooks(*old_agen_hooks)
  25198. *
  25199. * def close(self): # <<<<<<<<<<<<<<
  25200. * """Close the event loop.
  25201. *
  25202. */
  25203. /* function exit code */
  25204. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  25205. goto __pyx_L0;
  25206. __pyx_L1_error:;
  25207. __Pyx_XDECREF(__pyx_t_1);
  25208. __Pyx_AddTraceback("uvloop.loop.Loop.close", __pyx_clineno, __pyx_lineno, __pyx_filename);
  25209. __pyx_r = NULL;
  25210. __pyx_L0:;
  25211. __Pyx_XGIVEREF(__pyx_r);
  25212. __Pyx_RefNannyFinishContext();
  25213. return __pyx_r;
  25214. }
  25215. /* "uvloop/loop.pyx":1329
  25216. * self._close()
  25217. *
  25218. * def get_debug(self): # <<<<<<<<<<<<<<
  25219. * return bool(self._debug)
  25220. *
  25221. */
  25222. /* Python wrapper */
  25223. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_29get_debug(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  25224. static char __pyx_doc_6uvloop_4loop_4Loop_28get_debug[] = "Loop.get_debug(self)";
  25225. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_29get_debug(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  25226. PyObject *__pyx_r = 0;
  25227. __Pyx_RefNannyDeclarations
  25228. __Pyx_RefNannySetupContext("get_debug (wrapper)", 0);
  25229. __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_28get_debug(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self));
  25230. /* function exit code */
  25231. __Pyx_RefNannyFinishContext();
  25232. return __pyx_r;
  25233. }
  25234. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_28get_debug(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) {
  25235. PyObject *__pyx_r = NULL;
  25236. __Pyx_RefNannyDeclarations
  25237. int __pyx_t_1;
  25238. PyObject *__pyx_t_2 = NULL;
  25239. __Pyx_RefNannySetupContext("get_debug", 0);
  25240. /* "uvloop/loop.pyx":1330
  25241. *
  25242. * def get_debug(self):
  25243. * return bool(self._debug) # <<<<<<<<<<<<<<
  25244. *
  25245. * def set_debug(self, enabled):
  25246. */
  25247. __Pyx_XDECREF(__pyx_r);
  25248. __pyx_t_1 = __pyx_v_self->_debug;
  25249. __pyx_t_2 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1330, __pyx_L1_error)
  25250. __Pyx_GOTREF(__pyx_t_2);
  25251. __pyx_r = __pyx_t_2;
  25252. __pyx_t_2 = 0;
  25253. goto __pyx_L0;
  25254. /* "uvloop/loop.pyx":1329
  25255. * self._close()
  25256. *
  25257. * def get_debug(self): # <<<<<<<<<<<<<<
  25258. * return bool(self._debug)
  25259. *
  25260. */
  25261. /* function exit code */
  25262. __pyx_L1_error:;
  25263. __Pyx_XDECREF(__pyx_t_2);
  25264. __Pyx_AddTraceback("uvloop.loop.Loop.get_debug", __pyx_clineno, __pyx_lineno, __pyx_filename);
  25265. __pyx_r = NULL;
  25266. __pyx_L0:;
  25267. __Pyx_XGIVEREF(__pyx_r);
  25268. __Pyx_RefNannyFinishContext();
  25269. return __pyx_r;
  25270. }
  25271. /* "uvloop/loop.pyx":1332
  25272. * return bool(self._debug)
  25273. *
  25274. * def set_debug(self, enabled): # <<<<<<<<<<<<<<
  25275. * self._debug = bool(enabled)
  25276. * if self.is_running():
  25277. */
  25278. /* Python wrapper */
  25279. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_31set_debug(PyObject *__pyx_v_self, PyObject *__pyx_v_enabled); /*proto*/
  25280. static char __pyx_doc_6uvloop_4loop_4Loop_30set_debug[] = "Loop.set_debug(self, enabled)";
  25281. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_31set_debug(PyObject *__pyx_v_self, PyObject *__pyx_v_enabled) {
  25282. PyObject *__pyx_r = 0;
  25283. __Pyx_RefNannyDeclarations
  25284. __Pyx_RefNannySetupContext("set_debug (wrapper)", 0);
  25285. __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_30set_debug(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self), ((PyObject *)__pyx_v_enabled));
  25286. /* function exit code */
  25287. __Pyx_RefNannyFinishContext();
  25288. return __pyx_r;
  25289. }
  25290. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_30set_debug(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_enabled) {
  25291. PyObject *__pyx_r = NULL;
  25292. __Pyx_RefNannyDeclarations
  25293. int __pyx_t_1;
  25294. PyObject *__pyx_t_2 = NULL;
  25295. PyObject *__pyx_t_3 = NULL;
  25296. PyObject *__pyx_t_4 = NULL;
  25297. PyObject *__pyx_t_5 = NULL;
  25298. PyObject *__pyx_t_6 = NULL;
  25299. int __pyx_t_7;
  25300. PyObject *__pyx_t_8 = NULL;
  25301. __Pyx_RefNannySetupContext("set_debug", 0);
  25302. /* "uvloop/loop.pyx":1333
  25303. *
  25304. * def set_debug(self, enabled):
  25305. * self._debug = bool(enabled) # <<<<<<<<<<<<<<
  25306. * if self.is_running():
  25307. * self.call_soon_threadsafe(
  25308. */
  25309. __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_enabled); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 1333, __pyx_L1_error)
  25310. __pyx_v_self->_debug = (!(!__pyx_t_1));
  25311. /* "uvloop/loop.pyx":1334
  25312. * def set_debug(self, enabled):
  25313. * self._debug = bool(enabled)
  25314. * if self.is_running(): # <<<<<<<<<<<<<<
  25315. * self.call_soon_threadsafe(
  25316. * self._set_coroutine_debug, self, self._debug)
  25317. */
  25318. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_running); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1334, __pyx_L1_error)
  25319. __Pyx_GOTREF(__pyx_t_3);
  25320. __pyx_t_4 = NULL;
  25321. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
  25322. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
  25323. if (likely(__pyx_t_4)) {
  25324. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  25325. __Pyx_INCREF(__pyx_t_4);
  25326. __Pyx_INCREF(function);
  25327. __Pyx_DECREF_SET(__pyx_t_3, function);
  25328. }
  25329. }
  25330. __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
  25331. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  25332. if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1334, __pyx_L1_error)
  25333. __Pyx_GOTREF(__pyx_t_2);
  25334. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  25335. __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 1334, __pyx_L1_error)
  25336. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  25337. if (__pyx_t_1) {
  25338. /* "uvloop/loop.pyx":1335
  25339. * self._debug = bool(enabled)
  25340. * if self.is_running():
  25341. * self.call_soon_threadsafe( # <<<<<<<<<<<<<<
  25342. * self._set_coroutine_debug, self, self._debug)
  25343. *
  25344. */
  25345. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_call_soon_threadsafe); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1335, __pyx_L1_error)
  25346. __Pyx_GOTREF(__pyx_t_3);
  25347. /* "uvloop/loop.pyx":1336
  25348. * if self.is_running():
  25349. * self.call_soon_threadsafe(
  25350. * self._set_coroutine_debug, self, self._debug) # <<<<<<<<<<<<<<
  25351. *
  25352. * def is_running(self):
  25353. */
  25354. __pyx_t_4 = __Pyx_CFunc_object____Loop____bint___to_py(((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_vtab)->_set_coroutine_debug); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1336, __pyx_L1_error)
  25355. __Pyx_GOTREF(__pyx_t_4);
  25356. __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_self->_debug); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1336, __pyx_L1_error)
  25357. __Pyx_GOTREF(__pyx_t_5);
  25358. __pyx_t_6 = NULL;
  25359. __pyx_t_7 = 0;
  25360. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
  25361. __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
  25362. if (likely(__pyx_t_6)) {
  25363. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  25364. __Pyx_INCREF(__pyx_t_6);
  25365. __Pyx_INCREF(function);
  25366. __Pyx_DECREF_SET(__pyx_t_3, function);
  25367. __pyx_t_7 = 1;
  25368. }
  25369. }
  25370. #if CYTHON_FAST_PYCALL
  25371. if (PyFunction_Check(__pyx_t_3)) {
  25372. PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_t_4, ((PyObject *)__pyx_v_self), __pyx_t_5};
  25373. __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1335, __pyx_L1_error)
  25374. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  25375. __Pyx_GOTREF(__pyx_t_2);
  25376. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  25377. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  25378. } else
  25379. #endif
  25380. #if CYTHON_FAST_PYCCALL
  25381. if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
  25382. PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_t_4, ((PyObject *)__pyx_v_self), __pyx_t_5};
  25383. __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1335, __pyx_L1_error)
  25384. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  25385. __Pyx_GOTREF(__pyx_t_2);
  25386. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  25387. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  25388. } else
  25389. #endif
  25390. {
  25391. __pyx_t_8 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1335, __pyx_L1_error)
  25392. __Pyx_GOTREF(__pyx_t_8);
  25393. if (__pyx_t_6) {
  25394. __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
  25395. }
  25396. __Pyx_GIVEREF(__pyx_t_4);
  25397. PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_4);
  25398. __Pyx_INCREF(((PyObject *)__pyx_v_self));
  25399. __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  25400. PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, ((PyObject *)__pyx_v_self));
  25401. __Pyx_GIVEREF(__pyx_t_5);
  25402. PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_t_5);
  25403. __pyx_t_4 = 0;
  25404. __pyx_t_5 = 0;
  25405. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1335, __pyx_L1_error)
  25406. __Pyx_GOTREF(__pyx_t_2);
  25407. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  25408. }
  25409. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  25410. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  25411. /* "uvloop/loop.pyx":1334
  25412. * def set_debug(self, enabled):
  25413. * self._debug = bool(enabled)
  25414. * if self.is_running(): # <<<<<<<<<<<<<<
  25415. * self.call_soon_threadsafe(
  25416. * self._set_coroutine_debug, self, self._debug)
  25417. */
  25418. }
  25419. /* "uvloop/loop.pyx":1332
  25420. * return bool(self._debug)
  25421. *
  25422. * def set_debug(self, enabled): # <<<<<<<<<<<<<<
  25423. * self._debug = bool(enabled)
  25424. * if self.is_running():
  25425. */
  25426. /* function exit code */
  25427. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  25428. goto __pyx_L0;
  25429. __pyx_L1_error:;
  25430. __Pyx_XDECREF(__pyx_t_2);
  25431. __Pyx_XDECREF(__pyx_t_3);
  25432. __Pyx_XDECREF(__pyx_t_4);
  25433. __Pyx_XDECREF(__pyx_t_5);
  25434. __Pyx_XDECREF(__pyx_t_6);
  25435. __Pyx_XDECREF(__pyx_t_8);
  25436. __Pyx_AddTraceback("uvloop.loop.Loop.set_debug", __pyx_clineno, __pyx_lineno, __pyx_filename);
  25437. __pyx_r = NULL;
  25438. __pyx_L0:;
  25439. __Pyx_XGIVEREF(__pyx_r);
  25440. __Pyx_RefNannyFinishContext();
  25441. return __pyx_r;
  25442. }
  25443. /* "uvloop/loop.pyx":1338
  25444. * self._set_coroutine_debug, self, self._debug)
  25445. *
  25446. * def is_running(self): # <<<<<<<<<<<<<<
  25447. * """Return whether the event loop is currently running."""
  25448. * return bool(self._running)
  25449. */
  25450. /* Python wrapper */
  25451. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_33is_running(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  25452. static char __pyx_doc_6uvloop_4loop_4Loop_32is_running[] = "Loop.is_running(self)\nReturn whether the event loop is currently running.";
  25453. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_33is_running(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  25454. PyObject *__pyx_r = 0;
  25455. __Pyx_RefNannyDeclarations
  25456. __Pyx_RefNannySetupContext("is_running (wrapper)", 0);
  25457. __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_32is_running(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self));
  25458. /* function exit code */
  25459. __Pyx_RefNannyFinishContext();
  25460. return __pyx_r;
  25461. }
  25462. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_32is_running(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) {
  25463. PyObject *__pyx_r = NULL;
  25464. __Pyx_RefNannyDeclarations
  25465. int __pyx_t_1;
  25466. PyObject *__pyx_t_2 = NULL;
  25467. __Pyx_RefNannySetupContext("is_running", 0);
  25468. /* "uvloop/loop.pyx":1340
  25469. * def is_running(self):
  25470. * """Return whether the event loop is currently running."""
  25471. * return bool(self._running) # <<<<<<<<<<<<<<
  25472. *
  25473. * def is_closed(self):
  25474. */
  25475. __Pyx_XDECREF(__pyx_r);
  25476. __pyx_t_1 = __pyx_v_self->_running;
  25477. __pyx_t_2 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1340, __pyx_L1_error)
  25478. __Pyx_GOTREF(__pyx_t_2);
  25479. __pyx_r = __pyx_t_2;
  25480. __pyx_t_2 = 0;
  25481. goto __pyx_L0;
  25482. /* "uvloop/loop.pyx":1338
  25483. * self._set_coroutine_debug, self, self._debug)
  25484. *
  25485. * def is_running(self): # <<<<<<<<<<<<<<
  25486. * """Return whether the event loop is currently running."""
  25487. * return bool(self._running)
  25488. */
  25489. /* function exit code */
  25490. __pyx_L1_error:;
  25491. __Pyx_XDECREF(__pyx_t_2);
  25492. __Pyx_AddTraceback("uvloop.loop.Loop.is_running", __pyx_clineno, __pyx_lineno, __pyx_filename);
  25493. __pyx_r = NULL;
  25494. __pyx_L0:;
  25495. __Pyx_XGIVEREF(__pyx_r);
  25496. __Pyx_RefNannyFinishContext();
  25497. return __pyx_r;
  25498. }
  25499. /* "uvloop/loop.pyx":1342
  25500. * return bool(self._running)
  25501. *
  25502. * def is_closed(self): # <<<<<<<<<<<<<<
  25503. * """Returns True if the event loop was closed."""
  25504. * return bool(self._closed)
  25505. */
  25506. /* Python wrapper */
  25507. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_35is_closed(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  25508. static char __pyx_doc_6uvloop_4loop_4Loop_34is_closed[] = "Loop.is_closed(self)\nReturns True if the event loop was closed.";
  25509. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_35is_closed(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  25510. PyObject *__pyx_r = 0;
  25511. __Pyx_RefNannyDeclarations
  25512. __Pyx_RefNannySetupContext("is_closed (wrapper)", 0);
  25513. __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_34is_closed(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self));
  25514. /* function exit code */
  25515. __Pyx_RefNannyFinishContext();
  25516. return __pyx_r;
  25517. }
  25518. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_34is_closed(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) {
  25519. PyObject *__pyx_r = NULL;
  25520. __Pyx_RefNannyDeclarations
  25521. int __pyx_t_1;
  25522. PyObject *__pyx_t_2 = NULL;
  25523. __Pyx_RefNannySetupContext("is_closed", 0);
  25524. /* "uvloop/loop.pyx":1344
  25525. * def is_closed(self):
  25526. * """Returns True if the event loop was closed."""
  25527. * return bool(self._closed) # <<<<<<<<<<<<<<
  25528. *
  25529. * def create_future(self):
  25530. */
  25531. __Pyx_XDECREF(__pyx_r);
  25532. __pyx_t_1 = __pyx_v_self->_closed;
  25533. __pyx_t_2 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1344, __pyx_L1_error)
  25534. __Pyx_GOTREF(__pyx_t_2);
  25535. __pyx_r = __pyx_t_2;
  25536. __pyx_t_2 = 0;
  25537. goto __pyx_L0;
  25538. /* "uvloop/loop.pyx":1342
  25539. * return bool(self._running)
  25540. *
  25541. * def is_closed(self): # <<<<<<<<<<<<<<
  25542. * """Returns True if the event loop was closed."""
  25543. * return bool(self._closed)
  25544. */
  25545. /* function exit code */
  25546. __pyx_L1_error:;
  25547. __Pyx_XDECREF(__pyx_t_2);
  25548. __Pyx_AddTraceback("uvloop.loop.Loop.is_closed", __pyx_clineno, __pyx_lineno, __pyx_filename);
  25549. __pyx_r = NULL;
  25550. __pyx_L0:;
  25551. __Pyx_XGIVEREF(__pyx_r);
  25552. __Pyx_RefNannyFinishContext();
  25553. return __pyx_r;
  25554. }
  25555. /* "uvloop/loop.pyx":1346
  25556. * return bool(self._closed)
  25557. *
  25558. * def create_future(self): # <<<<<<<<<<<<<<
  25559. * """Create a Future object attached to the loop."""
  25560. * return self._new_future()
  25561. */
  25562. /* Python wrapper */
  25563. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_37create_future(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  25564. static char __pyx_doc_6uvloop_4loop_4Loop_36create_future[] = "Loop.create_future(self)\nCreate a Future object attached to the loop.";
  25565. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_37create_future(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  25566. PyObject *__pyx_r = 0;
  25567. __Pyx_RefNannyDeclarations
  25568. __Pyx_RefNannySetupContext("create_future (wrapper)", 0);
  25569. __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_36create_future(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self));
  25570. /* function exit code */
  25571. __Pyx_RefNannyFinishContext();
  25572. return __pyx_r;
  25573. }
  25574. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_36create_future(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) {
  25575. PyObject *__pyx_r = NULL;
  25576. __Pyx_RefNannyDeclarations
  25577. PyObject *__pyx_t_1 = NULL;
  25578. __Pyx_RefNannySetupContext("create_future", 0);
  25579. /* "uvloop/loop.pyx":1348
  25580. * def create_future(self):
  25581. * """Create a Future object attached to the loop."""
  25582. * return self._new_future() # <<<<<<<<<<<<<<
  25583. *
  25584. * def create_task(self, coro):
  25585. */
  25586. __Pyx_XDECREF(__pyx_r);
  25587. __pyx_t_1 = __pyx_f_6uvloop_4loop_4Loop__new_future(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1348, __pyx_L1_error)
  25588. __Pyx_GOTREF(__pyx_t_1);
  25589. __pyx_r = __pyx_t_1;
  25590. __pyx_t_1 = 0;
  25591. goto __pyx_L0;
  25592. /* "uvloop/loop.pyx":1346
  25593. * return bool(self._closed)
  25594. *
  25595. * def create_future(self): # <<<<<<<<<<<<<<
  25596. * """Create a Future object attached to the loop."""
  25597. * return self._new_future()
  25598. */
  25599. /* function exit code */
  25600. __pyx_L1_error:;
  25601. __Pyx_XDECREF(__pyx_t_1);
  25602. __Pyx_AddTraceback("uvloop.loop.Loop.create_future", __pyx_clineno, __pyx_lineno, __pyx_filename);
  25603. __pyx_r = NULL;
  25604. __pyx_L0:;
  25605. __Pyx_XGIVEREF(__pyx_r);
  25606. __Pyx_RefNannyFinishContext();
  25607. return __pyx_r;
  25608. }
  25609. /* "uvloop/loop.pyx":1350
  25610. * return self._new_future()
  25611. *
  25612. * def create_task(self, coro): # <<<<<<<<<<<<<<
  25613. * """Schedule a coroutine object.
  25614. *
  25615. */
  25616. /* Python wrapper */
  25617. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_39create_task(PyObject *__pyx_v_self, PyObject *__pyx_v_coro); /*proto*/
  25618. static char __pyx_doc_6uvloop_4loop_4Loop_38create_task[] = "Loop.create_task(self, coro)\nSchedule a coroutine object.\n\n Return a task object.\n ";
  25619. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_39create_task(PyObject *__pyx_v_self, PyObject *__pyx_v_coro) {
  25620. PyObject *__pyx_r = 0;
  25621. __Pyx_RefNannyDeclarations
  25622. __Pyx_RefNannySetupContext("create_task (wrapper)", 0);
  25623. __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_38create_task(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self), ((PyObject *)__pyx_v_coro));
  25624. /* function exit code */
  25625. __Pyx_RefNannyFinishContext();
  25626. return __pyx_r;
  25627. }
  25628. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_38create_task(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_coro) {
  25629. PyObject *__pyx_v_task = NULL;
  25630. PyObject *__pyx_r = NULL;
  25631. __Pyx_RefNannyDeclarations
  25632. PyObject *__pyx_t_1 = NULL;
  25633. int __pyx_t_2;
  25634. int __pyx_t_3;
  25635. PyObject *__pyx_t_4 = NULL;
  25636. PyObject *__pyx_t_5 = NULL;
  25637. int __pyx_t_6;
  25638. PyObject *__pyx_t_7 = NULL;
  25639. __Pyx_RefNannySetupContext("create_task", 0);
  25640. /* "uvloop/loop.pyx":1355
  25641. * Return a task object.
  25642. * """
  25643. * self._check_closed() # <<<<<<<<<<<<<<
  25644. * if self._task_factory is None:
  25645. * task = aio_Task(coro, loop=self)
  25646. */
  25647. __pyx_t_1 = __pyx_f_6uvloop_4loop_4Loop__check_closed(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1355, __pyx_L1_error)
  25648. __Pyx_GOTREF(__pyx_t_1);
  25649. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  25650. /* "uvloop/loop.pyx":1356
  25651. * """
  25652. * self._check_closed()
  25653. * if self._task_factory is None: # <<<<<<<<<<<<<<
  25654. * task = aio_Task(coro, loop=self)
  25655. * else:
  25656. */
  25657. __pyx_t_2 = (__pyx_v_self->_task_factory == Py_None);
  25658. __pyx_t_3 = (__pyx_t_2 != 0);
  25659. if (__pyx_t_3) {
  25660. /* "uvloop/loop.pyx":1357
  25661. * self._check_closed()
  25662. * if self._task_factory is None:
  25663. * task = aio_Task(coro, loop=self) # <<<<<<<<<<<<<<
  25664. * else:
  25665. * task = self._task_factory(self, coro)
  25666. */
  25667. __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1357, __pyx_L1_error)
  25668. __Pyx_GOTREF(__pyx_t_1);
  25669. __Pyx_INCREF(__pyx_v_coro);
  25670. __Pyx_GIVEREF(__pyx_v_coro);
  25671. PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_coro);
  25672. __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1357, __pyx_L1_error)
  25673. __Pyx_GOTREF(__pyx_t_4);
  25674. if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_loop, ((PyObject *)__pyx_v_self)) < 0) __PYX_ERR(2, 1357, __pyx_L1_error)
  25675. __pyx_t_5 = __Pyx_PyObject_Call(__pyx_v_6uvloop_4loop_aio_Task, __pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1357, __pyx_L1_error)
  25676. __Pyx_GOTREF(__pyx_t_5);
  25677. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  25678. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  25679. __pyx_v_task = __pyx_t_5;
  25680. __pyx_t_5 = 0;
  25681. /* "uvloop/loop.pyx":1356
  25682. * """
  25683. * self._check_closed()
  25684. * if self._task_factory is None: # <<<<<<<<<<<<<<
  25685. * task = aio_Task(coro, loop=self)
  25686. * else:
  25687. */
  25688. goto __pyx_L3;
  25689. }
  25690. /* "uvloop/loop.pyx":1359
  25691. * task = aio_Task(coro, loop=self)
  25692. * else:
  25693. * task = self._task_factory(self, coro) # <<<<<<<<<<<<<<
  25694. * return task
  25695. *
  25696. */
  25697. /*else*/ {
  25698. __Pyx_INCREF(__pyx_v_self->_task_factory);
  25699. __pyx_t_4 = __pyx_v_self->_task_factory; __pyx_t_1 = NULL;
  25700. __pyx_t_6 = 0;
  25701. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
  25702. __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4);
  25703. if (likely(__pyx_t_1)) {
  25704. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  25705. __Pyx_INCREF(__pyx_t_1);
  25706. __Pyx_INCREF(function);
  25707. __Pyx_DECREF_SET(__pyx_t_4, function);
  25708. __pyx_t_6 = 1;
  25709. }
  25710. }
  25711. #if CYTHON_FAST_PYCALL
  25712. if (PyFunction_Check(__pyx_t_4)) {
  25713. PyObject *__pyx_temp[3] = {__pyx_t_1, ((PyObject *)__pyx_v_self), __pyx_v_coro};
  25714. __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1359, __pyx_L1_error)
  25715. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  25716. __Pyx_GOTREF(__pyx_t_5);
  25717. } else
  25718. #endif
  25719. #if CYTHON_FAST_PYCCALL
  25720. if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
  25721. PyObject *__pyx_temp[3] = {__pyx_t_1, ((PyObject *)__pyx_v_self), __pyx_v_coro};
  25722. __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1359, __pyx_L1_error)
  25723. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  25724. __Pyx_GOTREF(__pyx_t_5);
  25725. } else
  25726. #endif
  25727. {
  25728. __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 1359, __pyx_L1_error)
  25729. __Pyx_GOTREF(__pyx_t_7);
  25730. if (__pyx_t_1) {
  25731. __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1); __pyx_t_1 = NULL;
  25732. }
  25733. __Pyx_INCREF(((PyObject *)__pyx_v_self));
  25734. __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  25735. PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, ((PyObject *)__pyx_v_self));
  25736. __Pyx_INCREF(__pyx_v_coro);
  25737. __Pyx_GIVEREF(__pyx_v_coro);
  25738. PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_v_coro);
  25739. __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1359, __pyx_L1_error)
  25740. __Pyx_GOTREF(__pyx_t_5);
  25741. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  25742. }
  25743. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  25744. __pyx_v_task = __pyx_t_5;
  25745. __pyx_t_5 = 0;
  25746. }
  25747. __pyx_L3:;
  25748. /* "uvloop/loop.pyx":1360
  25749. * else:
  25750. * task = self._task_factory(self, coro)
  25751. * return task # <<<<<<<<<<<<<<
  25752. *
  25753. * def set_task_factory(self, factory):
  25754. */
  25755. __Pyx_XDECREF(__pyx_r);
  25756. __Pyx_INCREF(__pyx_v_task);
  25757. __pyx_r = __pyx_v_task;
  25758. goto __pyx_L0;
  25759. /* "uvloop/loop.pyx":1350
  25760. * return self._new_future()
  25761. *
  25762. * def create_task(self, coro): # <<<<<<<<<<<<<<
  25763. * """Schedule a coroutine object.
  25764. *
  25765. */
  25766. /* function exit code */
  25767. __pyx_L1_error:;
  25768. __Pyx_XDECREF(__pyx_t_1);
  25769. __Pyx_XDECREF(__pyx_t_4);
  25770. __Pyx_XDECREF(__pyx_t_5);
  25771. __Pyx_XDECREF(__pyx_t_7);
  25772. __Pyx_AddTraceback("uvloop.loop.Loop.create_task", __pyx_clineno, __pyx_lineno, __pyx_filename);
  25773. __pyx_r = NULL;
  25774. __pyx_L0:;
  25775. __Pyx_XDECREF(__pyx_v_task);
  25776. __Pyx_XGIVEREF(__pyx_r);
  25777. __Pyx_RefNannyFinishContext();
  25778. return __pyx_r;
  25779. }
  25780. /* "uvloop/loop.pyx":1362
  25781. * return task
  25782. *
  25783. * def set_task_factory(self, factory): # <<<<<<<<<<<<<<
  25784. * """Set a task factory that will be used by loop.create_task().
  25785. *
  25786. */
  25787. /* Python wrapper */
  25788. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_41set_task_factory(PyObject *__pyx_v_self, PyObject *__pyx_v_factory); /*proto*/
  25789. static char __pyx_doc_6uvloop_4loop_4Loop_40set_task_factory[] = "Loop.set_task_factory(self, factory)\nSet a task factory that will be used by loop.create_task().\n\n If factory is None the default task factory will be set.\n\n If factory is a callable, it should have a signature matching\n '(loop, coro)', where 'loop' will be a reference to the active\n event loop, 'coro' will be a coroutine object. The callable\n must return a Future.\n ";
  25790. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_41set_task_factory(PyObject *__pyx_v_self, PyObject *__pyx_v_factory) {
  25791. PyObject *__pyx_r = 0;
  25792. __Pyx_RefNannyDeclarations
  25793. __Pyx_RefNannySetupContext("set_task_factory (wrapper)", 0);
  25794. __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_40set_task_factory(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self), ((PyObject *)__pyx_v_factory));
  25795. /* function exit code */
  25796. __Pyx_RefNannyFinishContext();
  25797. return __pyx_r;
  25798. }
  25799. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_40set_task_factory(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_factory) {
  25800. PyObject *__pyx_r = NULL;
  25801. __Pyx_RefNannyDeclarations
  25802. int __pyx_t_1;
  25803. int __pyx_t_2;
  25804. int __pyx_t_3;
  25805. PyObject *__pyx_t_4 = NULL;
  25806. __Pyx_RefNannySetupContext("set_task_factory", 0);
  25807. /* "uvloop/loop.pyx":1372
  25808. * must return a Future.
  25809. * """
  25810. * if factory is not None and not callable(factory): # <<<<<<<<<<<<<<
  25811. * raise TypeError('task factory must be a callable or None')
  25812. * self._task_factory = factory
  25813. */
  25814. __pyx_t_2 = (__pyx_v_factory != Py_None);
  25815. __pyx_t_3 = (__pyx_t_2 != 0);
  25816. if (__pyx_t_3) {
  25817. } else {
  25818. __pyx_t_1 = __pyx_t_3;
  25819. goto __pyx_L4_bool_binop_done;
  25820. }
  25821. __pyx_t_3 = __Pyx_PyCallable_Check(__pyx_v_factory); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(2, 1372, __pyx_L1_error)
  25822. __pyx_t_2 = ((!(__pyx_t_3 != 0)) != 0);
  25823. __pyx_t_1 = __pyx_t_2;
  25824. __pyx_L4_bool_binop_done:;
  25825. if (unlikely(__pyx_t_1)) {
  25826. /* "uvloop/loop.pyx":1373
  25827. * """
  25828. * if factory is not None and not callable(factory):
  25829. * raise TypeError('task factory must be a callable or None') # <<<<<<<<<<<<<<
  25830. * self._task_factory = factory
  25831. *
  25832. */
  25833. __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__31, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1373, __pyx_L1_error)
  25834. __Pyx_GOTREF(__pyx_t_4);
  25835. __Pyx_Raise(__pyx_t_4, 0, 0, 0);
  25836. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  25837. __PYX_ERR(2, 1373, __pyx_L1_error)
  25838. /* "uvloop/loop.pyx":1372
  25839. * must return a Future.
  25840. * """
  25841. * if factory is not None and not callable(factory): # <<<<<<<<<<<<<<
  25842. * raise TypeError('task factory must be a callable or None')
  25843. * self._task_factory = factory
  25844. */
  25845. }
  25846. /* "uvloop/loop.pyx":1374
  25847. * if factory is not None and not callable(factory):
  25848. * raise TypeError('task factory must be a callable or None')
  25849. * self._task_factory = factory # <<<<<<<<<<<<<<
  25850. *
  25851. * def get_task_factory(self):
  25852. */
  25853. __Pyx_INCREF(__pyx_v_factory);
  25854. __Pyx_GIVEREF(__pyx_v_factory);
  25855. __Pyx_GOTREF(__pyx_v_self->_task_factory);
  25856. __Pyx_DECREF(__pyx_v_self->_task_factory);
  25857. __pyx_v_self->_task_factory = __pyx_v_factory;
  25858. /* "uvloop/loop.pyx":1362
  25859. * return task
  25860. *
  25861. * def set_task_factory(self, factory): # <<<<<<<<<<<<<<
  25862. * """Set a task factory that will be used by loop.create_task().
  25863. *
  25864. */
  25865. /* function exit code */
  25866. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  25867. goto __pyx_L0;
  25868. __pyx_L1_error:;
  25869. __Pyx_XDECREF(__pyx_t_4);
  25870. __Pyx_AddTraceback("uvloop.loop.Loop.set_task_factory", __pyx_clineno, __pyx_lineno, __pyx_filename);
  25871. __pyx_r = NULL;
  25872. __pyx_L0:;
  25873. __Pyx_XGIVEREF(__pyx_r);
  25874. __Pyx_RefNannyFinishContext();
  25875. return __pyx_r;
  25876. }
  25877. /* "uvloop/loop.pyx":1376
  25878. * self._task_factory = factory
  25879. *
  25880. * def get_task_factory(self): # <<<<<<<<<<<<<<
  25881. * """Return a task factory, or None if the default one is in use."""
  25882. * return self._task_factory
  25883. */
  25884. /* Python wrapper */
  25885. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_43get_task_factory(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  25886. static char __pyx_doc_6uvloop_4loop_4Loop_42get_task_factory[] = "Loop.get_task_factory(self)\nReturn a task factory, or None if the default one is in use.";
  25887. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_43get_task_factory(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  25888. PyObject *__pyx_r = 0;
  25889. __Pyx_RefNannyDeclarations
  25890. __Pyx_RefNannySetupContext("get_task_factory (wrapper)", 0);
  25891. __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_42get_task_factory(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self));
  25892. /* function exit code */
  25893. __Pyx_RefNannyFinishContext();
  25894. return __pyx_r;
  25895. }
  25896. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_42get_task_factory(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) {
  25897. PyObject *__pyx_r = NULL;
  25898. __Pyx_RefNannyDeclarations
  25899. __Pyx_RefNannySetupContext("get_task_factory", 0);
  25900. /* "uvloop/loop.pyx":1378
  25901. * def get_task_factory(self):
  25902. * """Return a task factory, or None if the default one is in use."""
  25903. * return self._task_factory # <<<<<<<<<<<<<<
  25904. *
  25905. * def run_until_complete(self, future):
  25906. */
  25907. __Pyx_XDECREF(__pyx_r);
  25908. __Pyx_INCREF(__pyx_v_self->_task_factory);
  25909. __pyx_r = __pyx_v_self->_task_factory;
  25910. goto __pyx_L0;
  25911. /* "uvloop/loop.pyx":1376
  25912. * self._task_factory = factory
  25913. *
  25914. * def get_task_factory(self): # <<<<<<<<<<<<<<
  25915. * """Return a task factory, or None if the default one is in use."""
  25916. * return self._task_factory
  25917. */
  25918. /* function exit code */
  25919. __pyx_L0:;
  25920. __Pyx_XGIVEREF(__pyx_r);
  25921. __Pyx_RefNannyFinishContext();
  25922. return __pyx_r;
  25923. }
  25924. /* "uvloop/loop.pyx":1380
  25925. * return self._task_factory
  25926. *
  25927. * def run_until_complete(self, future): # <<<<<<<<<<<<<<
  25928. * """Run until the Future is done.
  25929. *
  25930. */
  25931. /* Python wrapper */
  25932. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_45run_until_complete(PyObject *__pyx_v_self, PyObject *__pyx_v_future); /*proto*/
  25933. static char __pyx_doc_6uvloop_4loop_4Loop_44run_until_complete[] = "Loop.run_until_complete(self, future)\nRun until the Future is done.\n\n If the argument is a coroutine, it is wrapped in a Task.\n\n WARNING: It would be disastrous to call run_until_complete()\n with the same coroutine twice -- it would wrap it in two\n different Tasks and that can't be good.\n\n Return the Future's result, or raise its exception.\n ";
  25934. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_45run_until_complete(PyObject *__pyx_v_self, PyObject *__pyx_v_future) {
  25935. PyObject *__pyx_r = 0;
  25936. __Pyx_RefNannyDeclarations
  25937. __Pyx_RefNannySetupContext("run_until_complete (wrapper)", 0);
  25938. __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_44run_until_complete(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self), ((PyObject *)__pyx_v_future));
  25939. /* function exit code */
  25940. __Pyx_RefNannyFinishContext();
  25941. return __pyx_r;
  25942. }
  25943. /* "uvloop/loop.pyx":1400
  25944. * future._log_destroy_pending = False
  25945. *
  25946. * done_cb = lambda fut: self.stop() # <<<<<<<<<<<<<<
  25947. *
  25948. * future.add_done_callback(done_cb)
  25949. */
  25950. /* Python wrapper */
  25951. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_18run_until_complete_lambda2(PyObject *__pyx_self, PyObject *__pyx_v_fut); /*proto*/
  25952. static PyMethodDef __pyx_mdef_6uvloop_4loop_4Loop_18run_until_complete_lambda2 = {"lambda2", (PyCFunction)__pyx_pw_6uvloop_4loop_4Loop_18run_until_complete_lambda2, METH_O, 0};
  25953. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_18run_until_complete_lambda2(PyObject *__pyx_self, PyObject *__pyx_v_fut) {
  25954. PyObject *__pyx_r = 0;
  25955. __Pyx_RefNannyDeclarations
  25956. __Pyx_RefNannySetupContext("lambda2 (wrapper)", 0);
  25957. __pyx_r = __pyx_lambda_funcdef_lambda2(__pyx_self, ((PyObject *)__pyx_v_fut));
  25958. /* function exit code */
  25959. __Pyx_RefNannyFinishContext();
  25960. return __pyx_r;
  25961. }
  25962. static PyObject *__pyx_lambda_funcdef_lambda2(PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_fut) {
  25963. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_4_run_until_complete *__pyx_cur_scope;
  25964. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_4_run_until_complete *__pyx_outer_scope;
  25965. PyObject *__pyx_r = NULL;
  25966. __Pyx_RefNannyDeclarations
  25967. PyObject *__pyx_t_1 = NULL;
  25968. PyObject *__pyx_t_2 = NULL;
  25969. PyObject *__pyx_t_3 = NULL;
  25970. __Pyx_RefNannySetupContext("lambda2", 0);
  25971. __pyx_outer_scope = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_4_run_until_complete *) __Pyx_CyFunction_GetClosure(__pyx_self);
  25972. __pyx_cur_scope = __pyx_outer_scope;
  25973. __Pyx_XDECREF(__pyx_r);
  25974. if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(2, 1400, __pyx_L1_error) }
  25975. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_stop); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1400, __pyx_L1_error)
  25976. __Pyx_GOTREF(__pyx_t_2);
  25977. __pyx_t_3 = NULL;
  25978. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
  25979. __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
  25980. if (likely(__pyx_t_3)) {
  25981. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  25982. __Pyx_INCREF(__pyx_t_3);
  25983. __Pyx_INCREF(function);
  25984. __Pyx_DECREF_SET(__pyx_t_2, function);
  25985. }
  25986. }
  25987. __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  25988. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  25989. if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1400, __pyx_L1_error)
  25990. __Pyx_GOTREF(__pyx_t_1);
  25991. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  25992. __pyx_r = __pyx_t_1;
  25993. __pyx_t_1 = 0;
  25994. goto __pyx_L0;
  25995. /* function exit code */
  25996. __pyx_L1_error:;
  25997. __Pyx_XDECREF(__pyx_t_1);
  25998. __Pyx_XDECREF(__pyx_t_2);
  25999. __Pyx_XDECREF(__pyx_t_3);
  26000. __Pyx_AddTraceback("uvloop.loop.Loop.run_until_complete.lambda2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  26001. __pyx_r = NULL;
  26002. __pyx_L0:;
  26003. __Pyx_XGIVEREF(__pyx_r);
  26004. __Pyx_RefNannyFinishContext();
  26005. return __pyx_r;
  26006. }
  26007. /* "uvloop/loop.pyx":1380
  26008. * return self._task_factory
  26009. *
  26010. * def run_until_complete(self, future): # <<<<<<<<<<<<<<
  26011. * """Run until the Future is done.
  26012. *
  26013. */
  26014. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_44run_until_complete(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_future) {
  26015. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_4_run_until_complete *__pyx_cur_scope;
  26016. int __pyx_v_new_task;
  26017. PyObject *__pyx_v_done_cb = NULL;
  26018. PyObject *__pyx_r = NULL;
  26019. __Pyx_RefNannyDeclarations
  26020. PyObject *__pyx_t_1 = NULL;
  26021. int __pyx_t_2;
  26022. PyObject *__pyx_t_3 = NULL;
  26023. PyObject *__pyx_t_4 = NULL;
  26024. PyObject *__pyx_t_5 = NULL;
  26025. PyObject *__pyx_t_6 = NULL;
  26026. PyObject *__pyx_t_7 = NULL;
  26027. int __pyx_t_8;
  26028. int __pyx_t_9;
  26029. PyObject *__pyx_t_10 = NULL;
  26030. PyObject *__pyx_t_11 = NULL;
  26031. PyObject *__pyx_t_12 = NULL;
  26032. int __pyx_t_13;
  26033. int __pyx_t_14;
  26034. char const *__pyx_t_15;
  26035. PyObject *__pyx_t_16 = NULL;
  26036. PyObject *__pyx_t_17 = NULL;
  26037. PyObject *__pyx_t_18 = NULL;
  26038. __Pyx_RefNannySetupContext("run_until_complete", 0);
  26039. __pyx_cur_scope = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_4_run_until_complete *)__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_4_run_until_complete(__pyx_ptype_6uvloop_4loop___pyx_scope_struct_4_run_until_complete, __pyx_empty_tuple, NULL);
  26040. if (unlikely(!__pyx_cur_scope)) {
  26041. __pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_4_run_until_complete *)Py_None);
  26042. __Pyx_INCREF(Py_None);
  26043. __PYX_ERR(2, 1380, __pyx_L1_error)
  26044. } else {
  26045. __Pyx_GOTREF(__pyx_cur_scope);
  26046. }
  26047. __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  26048. __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  26049. __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  26050. __Pyx_INCREF(__pyx_v_future);
  26051. /* "uvloop/loop.pyx":1391
  26052. * Return the Future's result, or raise its exception.
  26053. * """
  26054. * self._check_closed() # <<<<<<<<<<<<<<
  26055. *
  26056. * new_task = not isfuture(future)
  26057. */
  26058. __pyx_t_1 = __pyx_f_6uvloop_4loop_4Loop__check_closed(__pyx_cur_scope->__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1391, __pyx_L1_error)
  26059. __Pyx_GOTREF(__pyx_t_1);
  26060. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  26061. /* "uvloop/loop.pyx":1393
  26062. * self._check_closed()
  26063. *
  26064. * new_task = not isfuture(future) # <<<<<<<<<<<<<<
  26065. * future = aio_ensure_future(future, loop=self)
  26066. * if new_task:
  26067. */
  26068. __pyx_t_1 = __pyx_f_6uvloop_4loop_isfuture(__pyx_v_future); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1393, __pyx_L1_error)
  26069. __Pyx_GOTREF(__pyx_t_1);
  26070. __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(2, 1393, __pyx_L1_error)
  26071. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  26072. __pyx_v_new_task = (!__pyx_t_2);
  26073. /* "uvloop/loop.pyx":1394
  26074. *
  26075. * new_task = not isfuture(future)
  26076. * future = aio_ensure_future(future, loop=self) # <<<<<<<<<<<<<<
  26077. * if new_task:
  26078. * # An exception is raised if the future didn't complete, so there
  26079. */
  26080. __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1394, __pyx_L1_error)
  26081. __Pyx_GOTREF(__pyx_t_1);
  26082. __Pyx_INCREF(__pyx_v_future);
  26083. __Pyx_GIVEREF(__pyx_v_future);
  26084. PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_future);
  26085. __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1394, __pyx_L1_error)
  26086. __Pyx_GOTREF(__pyx_t_3);
  26087. if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_loop, ((PyObject *)__pyx_cur_scope->__pyx_v_self)) < 0) __PYX_ERR(2, 1394, __pyx_L1_error)
  26088. __pyx_t_4 = __Pyx_PyObject_Call(__pyx_v_6uvloop_4loop_aio_ensure_future, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1394, __pyx_L1_error)
  26089. __Pyx_GOTREF(__pyx_t_4);
  26090. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  26091. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  26092. __Pyx_DECREF_SET(__pyx_v_future, __pyx_t_4);
  26093. __pyx_t_4 = 0;
  26094. /* "uvloop/loop.pyx":1395
  26095. * new_task = not isfuture(future)
  26096. * future = aio_ensure_future(future, loop=self)
  26097. * if new_task: # <<<<<<<<<<<<<<
  26098. * # An exception is raised if the future didn't complete, so there
  26099. * # is no need to log the "destroy pending task" message
  26100. */
  26101. __pyx_t_2 = (__pyx_v_new_task != 0);
  26102. if (__pyx_t_2) {
  26103. /* "uvloop/loop.pyx":1398
  26104. * # An exception is raised if the future didn't complete, so there
  26105. * # is no need to log the "destroy pending task" message
  26106. * future._log_destroy_pending = False # <<<<<<<<<<<<<<
  26107. *
  26108. * done_cb = lambda fut: self.stop()
  26109. */
  26110. if (__Pyx_PyObject_SetAttrStr(__pyx_v_future, __pyx_n_s_log_destroy_pending, Py_False) < 0) __PYX_ERR(2, 1398, __pyx_L1_error)
  26111. /* "uvloop/loop.pyx":1395
  26112. * new_task = not isfuture(future)
  26113. * future = aio_ensure_future(future, loop=self)
  26114. * if new_task: # <<<<<<<<<<<<<<
  26115. * # An exception is raised if the future didn't complete, so there
  26116. * # is no need to log the "destroy pending task" message
  26117. */
  26118. }
  26119. /* "uvloop/loop.pyx":1400
  26120. * future._log_destroy_pending = False
  26121. *
  26122. * done_cb = lambda fut: self.stop() # <<<<<<<<<<<<<<
  26123. *
  26124. * future.add_done_callback(done_cb)
  26125. */
  26126. __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6uvloop_4loop_4Loop_18run_until_complete_lambda2, 0, __pyx_n_s_run_until_complete_locals_lambda, ((PyObject*)__pyx_cur_scope), __pyx_n_s_uvloop_loop, __pyx_d, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1400, __pyx_L1_error)
  26127. __Pyx_GOTREF(__pyx_t_4);
  26128. __pyx_v_done_cb = __pyx_t_4;
  26129. __pyx_t_4 = 0;
  26130. /* "uvloop/loop.pyx":1402
  26131. * done_cb = lambda fut: self.stop()
  26132. *
  26133. * future.add_done_callback(done_cb) # <<<<<<<<<<<<<<
  26134. * try:
  26135. * self.run_forever()
  26136. */
  26137. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_future, __pyx_n_s_add_done_callback); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1402, __pyx_L1_error)
  26138. __Pyx_GOTREF(__pyx_t_3);
  26139. __pyx_t_1 = NULL;
  26140. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
  26141. __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
  26142. if (likely(__pyx_t_1)) {
  26143. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  26144. __Pyx_INCREF(__pyx_t_1);
  26145. __Pyx_INCREF(function);
  26146. __Pyx_DECREF_SET(__pyx_t_3, function);
  26147. }
  26148. }
  26149. __pyx_t_4 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_1, __pyx_v_done_cb) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_done_cb);
  26150. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  26151. if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1402, __pyx_L1_error)
  26152. __Pyx_GOTREF(__pyx_t_4);
  26153. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  26154. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  26155. /* "uvloop/loop.pyx":1403
  26156. *
  26157. * future.add_done_callback(done_cb)
  26158. * try: # <<<<<<<<<<<<<<
  26159. * self.run_forever()
  26160. * except BaseException:
  26161. */
  26162. /*try:*/ {
  26163. {
  26164. __Pyx_PyThreadState_declare
  26165. __Pyx_PyThreadState_assign
  26166. __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7);
  26167. __Pyx_XGOTREF(__pyx_t_5);
  26168. __Pyx_XGOTREF(__pyx_t_6);
  26169. __Pyx_XGOTREF(__pyx_t_7);
  26170. /*try:*/ {
  26171. /* "uvloop/loop.pyx":1404
  26172. * future.add_done_callback(done_cb)
  26173. * try:
  26174. * self.run_forever() # <<<<<<<<<<<<<<
  26175. * except BaseException:
  26176. * if new_task and future.done() and not future.cancelled():
  26177. */
  26178. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_run_forever); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1404, __pyx_L7_error)
  26179. __Pyx_GOTREF(__pyx_t_3);
  26180. __pyx_t_1 = NULL;
  26181. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
  26182. __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
  26183. if (likely(__pyx_t_1)) {
  26184. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  26185. __Pyx_INCREF(__pyx_t_1);
  26186. __Pyx_INCREF(function);
  26187. __Pyx_DECREF_SET(__pyx_t_3, function);
  26188. }
  26189. }
  26190. __pyx_t_4 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
  26191. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  26192. if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1404, __pyx_L7_error)
  26193. __Pyx_GOTREF(__pyx_t_4);
  26194. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  26195. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  26196. /* "uvloop/loop.pyx":1403
  26197. *
  26198. * future.add_done_callback(done_cb)
  26199. * try: # <<<<<<<<<<<<<<
  26200. * self.run_forever()
  26201. * except BaseException:
  26202. */
  26203. }
  26204. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  26205. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  26206. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  26207. goto __pyx_L12_try_end;
  26208. __pyx_L7_error:;
  26209. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  26210. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  26211. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  26212. /* "uvloop/loop.pyx":1405
  26213. * try:
  26214. * self.run_forever()
  26215. * except BaseException: # <<<<<<<<<<<<<<
  26216. * if new_task and future.done() and not future.cancelled():
  26217. * # The coroutine raised a BaseException. Consume the exception
  26218. */
  26219. __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_BaseException);
  26220. if (__pyx_t_8) {
  26221. __Pyx_AddTraceback("uvloop.loop.Loop.run_until_complete", __pyx_clineno, __pyx_lineno, __pyx_filename);
  26222. if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_3, &__pyx_t_1) < 0) __PYX_ERR(2, 1405, __pyx_L9_except_error)
  26223. __Pyx_GOTREF(__pyx_t_4);
  26224. __Pyx_GOTREF(__pyx_t_3);
  26225. __Pyx_GOTREF(__pyx_t_1);
  26226. /* "uvloop/loop.pyx":1406
  26227. * self.run_forever()
  26228. * except BaseException:
  26229. * if new_task and future.done() and not future.cancelled(): # <<<<<<<<<<<<<<
  26230. * # The coroutine raised a BaseException. Consume the exception
  26231. * # to not log a warning, the caller doesn't have access to the
  26232. */
  26233. __pyx_t_9 = (__pyx_v_new_task != 0);
  26234. if (__pyx_t_9) {
  26235. } else {
  26236. __pyx_t_2 = __pyx_t_9;
  26237. goto __pyx_L16_bool_binop_done;
  26238. }
  26239. __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_future, __pyx_n_s_done); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 1406, __pyx_L9_except_error)
  26240. __Pyx_GOTREF(__pyx_t_11);
  26241. __pyx_t_12 = NULL;
  26242. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) {
  26243. __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_11);
  26244. if (likely(__pyx_t_12)) {
  26245. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
  26246. __Pyx_INCREF(__pyx_t_12);
  26247. __Pyx_INCREF(function);
  26248. __Pyx_DECREF_SET(__pyx_t_11, function);
  26249. }
  26250. }
  26251. __pyx_t_10 = (__pyx_t_12) ? __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_12) : __Pyx_PyObject_CallNoArg(__pyx_t_11);
  26252. __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
  26253. if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 1406, __pyx_L9_except_error)
  26254. __Pyx_GOTREF(__pyx_t_10);
  26255. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  26256. __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(2, 1406, __pyx_L9_except_error)
  26257. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  26258. if (__pyx_t_9) {
  26259. } else {
  26260. __pyx_t_2 = __pyx_t_9;
  26261. goto __pyx_L16_bool_binop_done;
  26262. }
  26263. __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_future, __pyx_n_s_cancelled); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 1406, __pyx_L9_except_error)
  26264. __Pyx_GOTREF(__pyx_t_11);
  26265. __pyx_t_12 = NULL;
  26266. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) {
  26267. __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_11);
  26268. if (likely(__pyx_t_12)) {
  26269. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
  26270. __Pyx_INCREF(__pyx_t_12);
  26271. __Pyx_INCREF(function);
  26272. __Pyx_DECREF_SET(__pyx_t_11, function);
  26273. }
  26274. }
  26275. __pyx_t_10 = (__pyx_t_12) ? __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_12) : __Pyx_PyObject_CallNoArg(__pyx_t_11);
  26276. __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
  26277. if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 1406, __pyx_L9_except_error)
  26278. __Pyx_GOTREF(__pyx_t_10);
  26279. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  26280. __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(2, 1406, __pyx_L9_except_error)
  26281. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  26282. __pyx_t_13 = ((!__pyx_t_9) != 0);
  26283. __pyx_t_2 = __pyx_t_13;
  26284. __pyx_L16_bool_binop_done:;
  26285. if (__pyx_t_2) {
  26286. /* "uvloop/loop.pyx":1410
  26287. * # to not log a warning, the caller doesn't have access to the
  26288. * # local task.
  26289. * future.exception() # <<<<<<<<<<<<<<
  26290. * raise
  26291. * finally:
  26292. */
  26293. __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_future, __pyx_n_s_exception); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 1410, __pyx_L9_except_error)
  26294. __Pyx_GOTREF(__pyx_t_11);
  26295. __pyx_t_12 = NULL;
  26296. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) {
  26297. __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_11);
  26298. if (likely(__pyx_t_12)) {
  26299. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
  26300. __Pyx_INCREF(__pyx_t_12);
  26301. __Pyx_INCREF(function);
  26302. __Pyx_DECREF_SET(__pyx_t_11, function);
  26303. }
  26304. }
  26305. __pyx_t_10 = (__pyx_t_12) ? __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_12) : __Pyx_PyObject_CallNoArg(__pyx_t_11);
  26306. __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
  26307. if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 1410, __pyx_L9_except_error)
  26308. __Pyx_GOTREF(__pyx_t_10);
  26309. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  26310. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  26311. /* "uvloop/loop.pyx":1406
  26312. * self.run_forever()
  26313. * except BaseException:
  26314. * if new_task and future.done() and not future.cancelled(): # <<<<<<<<<<<<<<
  26315. * # The coroutine raised a BaseException. Consume the exception
  26316. * # to not log a warning, the caller doesn't have access to the
  26317. */
  26318. }
  26319. /* "uvloop/loop.pyx":1411
  26320. * # local task.
  26321. * future.exception()
  26322. * raise # <<<<<<<<<<<<<<
  26323. * finally:
  26324. * future.remove_done_callback(done_cb)
  26325. */
  26326. __Pyx_GIVEREF(__pyx_t_4);
  26327. __Pyx_GIVEREF(__pyx_t_3);
  26328. __Pyx_XGIVEREF(__pyx_t_1);
  26329. __Pyx_ErrRestoreWithState(__pyx_t_4, __pyx_t_3, __pyx_t_1);
  26330. __pyx_t_4 = 0; __pyx_t_3 = 0; __pyx_t_1 = 0;
  26331. __PYX_ERR(2, 1411, __pyx_L9_except_error)
  26332. }
  26333. goto __pyx_L9_except_error;
  26334. __pyx_L9_except_error:;
  26335. /* "uvloop/loop.pyx":1403
  26336. *
  26337. * future.add_done_callback(done_cb)
  26338. * try: # <<<<<<<<<<<<<<
  26339. * self.run_forever()
  26340. * except BaseException:
  26341. */
  26342. __Pyx_XGIVEREF(__pyx_t_5);
  26343. __Pyx_XGIVEREF(__pyx_t_6);
  26344. __Pyx_XGIVEREF(__pyx_t_7);
  26345. __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
  26346. goto __pyx_L5_error;
  26347. __pyx_L12_try_end:;
  26348. }
  26349. }
  26350. /* "uvloop/loop.pyx":1413
  26351. * raise
  26352. * finally:
  26353. * future.remove_done_callback(done_cb) # <<<<<<<<<<<<<<
  26354. * if not future.done():
  26355. * raise RuntimeError('Event loop stopped before Future completed.')
  26356. */
  26357. /*finally:*/ {
  26358. /*normal exit:*/{
  26359. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_future, __pyx_n_s_remove_done_callback); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1413, __pyx_L1_error)
  26360. __Pyx_GOTREF(__pyx_t_3);
  26361. __pyx_t_4 = NULL;
  26362. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
  26363. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
  26364. if (likely(__pyx_t_4)) {
  26365. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  26366. __Pyx_INCREF(__pyx_t_4);
  26367. __Pyx_INCREF(function);
  26368. __Pyx_DECREF_SET(__pyx_t_3, function);
  26369. }
  26370. }
  26371. __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_done_cb) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_done_cb);
  26372. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  26373. if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1413, __pyx_L1_error)
  26374. __Pyx_GOTREF(__pyx_t_1);
  26375. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  26376. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  26377. goto __pyx_L6;
  26378. }
  26379. __pyx_L5_error:;
  26380. /*exception exit:*/{
  26381. __Pyx_PyThreadState_declare
  26382. __Pyx_PyThreadState_assign
  26383. __pyx_t_7 = 0; __pyx_t_6 = 0; __pyx_t_5 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0;
  26384. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  26385. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  26386. __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
  26387. __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
  26388. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  26389. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  26390. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18);
  26391. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_7, &__pyx_t_6, &__pyx_t_5) < 0)) __Pyx_ErrFetch(&__pyx_t_7, &__pyx_t_6, &__pyx_t_5);
  26392. __Pyx_XGOTREF(__pyx_t_7);
  26393. __Pyx_XGOTREF(__pyx_t_6);
  26394. __Pyx_XGOTREF(__pyx_t_5);
  26395. __Pyx_XGOTREF(__pyx_t_16);
  26396. __Pyx_XGOTREF(__pyx_t_17);
  26397. __Pyx_XGOTREF(__pyx_t_18);
  26398. __pyx_t_8 = __pyx_lineno; __pyx_t_14 = __pyx_clineno; __pyx_t_15 = __pyx_filename;
  26399. {
  26400. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_future, __pyx_n_s_remove_done_callback); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1413, __pyx_L20_error)
  26401. __Pyx_GOTREF(__pyx_t_3);
  26402. __pyx_t_4 = NULL;
  26403. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
  26404. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
  26405. if (likely(__pyx_t_4)) {
  26406. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  26407. __Pyx_INCREF(__pyx_t_4);
  26408. __Pyx_INCREF(function);
  26409. __Pyx_DECREF_SET(__pyx_t_3, function);
  26410. }
  26411. }
  26412. __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_done_cb) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_done_cb);
  26413. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  26414. if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1413, __pyx_L20_error)
  26415. __Pyx_GOTREF(__pyx_t_1);
  26416. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  26417. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  26418. }
  26419. if (PY_MAJOR_VERSION >= 3) {
  26420. __Pyx_XGIVEREF(__pyx_t_16);
  26421. __Pyx_XGIVEREF(__pyx_t_17);
  26422. __Pyx_XGIVEREF(__pyx_t_18);
  26423. __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18);
  26424. }
  26425. __Pyx_XGIVEREF(__pyx_t_7);
  26426. __Pyx_XGIVEREF(__pyx_t_6);
  26427. __Pyx_XGIVEREF(__pyx_t_5);
  26428. __Pyx_ErrRestore(__pyx_t_7, __pyx_t_6, __pyx_t_5);
  26429. __pyx_t_7 = 0; __pyx_t_6 = 0; __pyx_t_5 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0;
  26430. __pyx_lineno = __pyx_t_8; __pyx_clineno = __pyx_t_14; __pyx_filename = __pyx_t_15;
  26431. goto __pyx_L1_error;
  26432. __pyx_L20_error:;
  26433. if (PY_MAJOR_VERSION >= 3) {
  26434. __Pyx_XGIVEREF(__pyx_t_16);
  26435. __Pyx_XGIVEREF(__pyx_t_17);
  26436. __Pyx_XGIVEREF(__pyx_t_18);
  26437. __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18);
  26438. }
  26439. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  26440. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  26441. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  26442. __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0;
  26443. goto __pyx_L1_error;
  26444. }
  26445. __pyx_L6:;
  26446. }
  26447. /* "uvloop/loop.pyx":1414
  26448. * finally:
  26449. * future.remove_done_callback(done_cb)
  26450. * if not future.done(): # <<<<<<<<<<<<<<
  26451. * raise RuntimeError('Event loop stopped before Future completed.')
  26452. *
  26453. */
  26454. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_future, __pyx_n_s_done); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1414, __pyx_L1_error)
  26455. __Pyx_GOTREF(__pyx_t_3);
  26456. __pyx_t_4 = NULL;
  26457. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
  26458. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
  26459. if (likely(__pyx_t_4)) {
  26460. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  26461. __Pyx_INCREF(__pyx_t_4);
  26462. __Pyx_INCREF(function);
  26463. __Pyx_DECREF_SET(__pyx_t_3, function);
  26464. }
  26465. }
  26466. __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
  26467. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  26468. if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1414, __pyx_L1_error)
  26469. __Pyx_GOTREF(__pyx_t_1);
  26470. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  26471. __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(2, 1414, __pyx_L1_error)
  26472. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  26473. __pyx_t_13 = ((!__pyx_t_2) != 0);
  26474. if (unlikely(__pyx_t_13)) {
  26475. /* "uvloop/loop.pyx":1415
  26476. * future.remove_done_callback(done_cb)
  26477. * if not future.done():
  26478. * raise RuntimeError('Event loop stopped before Future completed.') # <<<<<<<<<<<<<<
  26479. *
  26480. * return future.result()
  26481. */
  26482. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__32, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1415, __pyx_L1_error)
  26483. __Pyx_GOTREF(__pyx_t_1);
  26484. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  26485. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  26486. __PYX_ERR(2, 1415, __pyx_L1_error)
  26487. /* "uvloop/loop.pyx":1414
  26488. * finally:
  26489. * future.remove_done_callback(done_cb)
  26490. * if not future.done(): # <<<<<<<<<<<<<<
  26491. * raise RuntimeError('Event loop stopped before Future completed.')
  26492. *
  26493. */
  26494. }
  26495. /* "uvloop/loop.pyx":1417
  26496. * raise RuntimeError('Event loop stopped before Future completed.')
  26497. *
  26498. * return future.result() # <<<<<<<<<<<<<<
  26499. *
  26500. * @cython.iterable_coroutine
  26501. */
  26502. __Pyx_XDECREF(__pyx_r);
  26503. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_future, __pyx_n_s_result); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1417, __pyx_L1_error)
  26504. __Pyx_GOTREF(__pyx_t_3);
  26505. __pyx_t_4 = NULL;
  26506. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
  26507. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
  26508. if (likely(__pyx_t_4)) {
  26509. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  26510. __Pyx_INCREF(__pyx_t_4);
  26511. __Pyx_INCREF(function);
  26512. __Pyx_DECREF_SET(__pyx_t_3, function);
  26513. }
  26514. }
  26515. __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
  26516. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  26517. if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1417, __pyx_L1_error)
  26518. __Pyx_GOTREF(__pyx_t_1);
  26519. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  26520. __pyx_r = __pyx_t_1;
  26521. __pyx_t_1 = 0;
  26522. goto __pyx_L0;
  26523. /* "uvloop/loop.pyx":1380
  26524. * return self._task_factory
  26525. *
  26526. * def run_until_complete(self, future): # <<<<<<<<<<<<<<
  26527. * """Run until the Future is done.
  26528. *
  26529. */
  26530. /* function exit code */
  26531. __pyx_L1_error:;
  26532. __Pyx_XDECREF(__pyx_t_1);
  26533. __Pyx_XDECREF(__pyx_t_3);
  26534. __Pyx_XDECREF(__pyx_t_4);
  26535. __Pyx_XDECREF(__pyx_t_10);
  26536. __Pyx_XDECREF(__pyx_t_11);
  26537. __Pyx_XDECREF(__pyx_t_12);
  26538. __Pyx_AddTraceback("uvloop.loop.Loop.run_until_complete", __pyx_clineno, __pyx_lineno, __pyx_filename);
  26539. __pyx_r = NULL;
  26540. __pyx_L0:;
  26541. __Pyx_XDECREF(__pyx_v_done_cb);
  26542. __Pyx_XDECREF(__pyx_v_future);
  26543. __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  26544. __Pyx_XGIVEREF(__pyx_r);
  26545. __Pyx_RefNannyFinishContext();
  26546. return __pyx_r;
  26547. }
  26548. static PyObject *__pyx_gb_6uvloop_4loop_4Loop_48generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
  26549. /* "uvloop/loop.pyx":1420
  26550. *
  26551. * @cython.iterable_coroutine
  26552. * async def getaddrinfo(self, object host, object port, *, # <<<<<<<<<<<<<<
  26553. * int family=0, int type=0, int proto=0, int flags=0):
  26554. *
  26555. */
  26556. /* Python wrapper */
  26557. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_47getaddrinfo(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  26558. static char __pyx_doc_6uvloop_4loop_4Loop_46getaddrinfo[] = "Loop.getaddrinfo(self, host, port, *, int family=0, int type=0, int proto=0, int flags=0)";
  26559. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_47getaddrinfo(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  26560. PyObject *__pyx_v_host = 0;
  26561. PyObject *__pyx_v_port = 0;
  26562. int __pyx_v_family;
  26563. int __pyx_v_type;
  26564. int __pyx_v_proto;
  26565. int __pyx_v_flags;
  26566. PyObject *__pyx_r = 0;
  26567. __Pyx_RefNannyDeclarations
  26568. __Pyx_RefNannySetupContext("getaddrinfo (wrapper)", 0);
  26569. {
  26570. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_host,&__pyx_n_s_port,&__pyx_n_s_family,&__pyx_n_s_type,&__pyx_n_s_proto,&__pyx_n_s_flags,0};
  26571. PyObject* values[6] = {0,0,0,0,0,0};
  26572. if (unlikely(__pyx_kwds)) {
  26573. Py_ssize_t kw_args;
  26574. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  26575. switch (pos_args) {
  26576. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  26577. CYTHON_FALLTHROUGH;
  26578. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  26579. CYTHON_FALLTHROUGH;
  26580. case 0: break;
  26581. default: goto __pyx_L5_argtuple_error;
  26582. }
  26583. kw_args = PyDict_Size(__pyx_kwds);
  26584. switch (pos_args) {
  26585. case 0:
  26586. if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_host)) != 0)) kw_args--;
  26587. else goto __pyx_L5_argtuple_error;
  26588. CYTHON_FALLTHROUGH;
  26589. case 1:
  26590. if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_port)) != 0)) kw_args--;
  26591. else {
  26592. __Pyx_RaiseArgtupleInvalid("getaddrinfo", 1, 2, 2, 1); __PYX_ERR(2, 1420, __pyx_L3_error)
  26593. }
  26594. }
  26595. if (kw_args > 0 && likely(kw_args <= 4)) {
  26596. Py_ssize_t index;
  26597. for (index = 2; index < 6 && kw_args > 0; index++) {
  26598. PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, *__pyx_pyargnames[index]);
  26599. if (value) { values[index] = value; kw_args--; }
  26600. }
  26601. }
  26602. if (unlikely(kw_args > 0)) {
  26603. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getaddrinfo") < 0)) __PYX_ERR(2, 1420, __pyx_L3_error)
  26604. }
  26605. } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
  26606. goto __pyx_L5_argtuple_error;
  26607. } else {
  26608. values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  26609. values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  26610. }
  26611. __pyx_v_host = values[0];
  26612. __pyx_v_port = values[1];
  26613. if (values[2]) {
  26614. __pyx_v_family = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_family == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 1421, __pyx_L3_error)
  26615. } else {
  26616. __pyx_v_family = ((int)0);
  26617. }
  26618. if (values[3]) {
  26619. __pyx_v_type = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_type == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 1421, __pyx_L3_error)
  26620. } else {
  26621. __pyx_v_type = ((int)0);
  26622. }
  26623. if (values[4]) {
  26624. __pyx_v_proto = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_proto == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 1421, __pyx_L3_error)
  26625. } else {
  26626. __pyx_v_proto = ((int)0);
  26627. }
  26628. if (values[5]) {
  26629. __pyx_v_flags = __Pyx_PyInt_As_int(values[5]); if (unlikely((__pyx_v_flags == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 1421, __pyx_L3_error)
  26630. } else {
  26631. __pyx_v_flags = ((int)0);
  26632. }
  26633. }
  26634. goto __pyx_L4_argument_unpacking_done;
  26635. __pyx_L5_argtuple_error:;
  26636. __Pyx_RaiseArgtupleInvalid("getaddrinfo", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 1420, __pyx_L3_error)
  26637. __pyx_L3_error:;
  26638. __Pyx_AddTraceback("uvloop.loop.Loop.getaddrinfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
  26639. __Pyx_RefNannyFinishContext();
  26640. return NULL;
  26641. __pyx_L4_argument_unpacking_done:;
  26642. __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_46getaddrinfo(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self), __pyx_v_host, __pyx_v_port, __pyx_v_family, __pyx_v_type, __pyx_v_proto, __pyx_v_flags);
  26643. /* function exit code */
  26644. __Pyx_RefNannyFinishContext();
  26645. return __pyx_r;
  26646. }
  26647. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_46getaddrinfo(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_host, PyObject *__pyx_v_port, int __pyx_v_family, int __pyx_v_type, int __pyx_v_proto, int __pyx_v_flags) {
  26648. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_5_getaddrinfo *__pyx_cur_scope;
  26649. PyObject *__pyx_r = NULL;
  26650. __Pyx_RefNannyDeclarations
  26651. __Pyx_RefNannySetupContext("getaddrinfo", 0);
  26652. __pyx_cur_scope = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_5_getaddrinfo *)__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_5_getaddrinfo(__pyx_ptype_6uvloop_4loop___pyx_scope_struct_5_getaddrinfo, __pyx_empty_tuple, NULL);
  26653. if (unlikely(!__pyx_cur_scope)) {
  26654. __pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_5_getaddrinfo *)Py_None);
  26655. __Pyx_INCREF(Py_None);
  26656. __PYX_ERR(2, 1420, __pyx_L1_error)
  26657. } else {
  26658. __Pyx_GOTREF(__pyx_cur_scope);
  26659. }
  26660. __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  26661. __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  26662. __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  26663. __pyx_cur_scope->__pyx_v_host = __pyx_v_host;
  26664. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_host);
  26665. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_host);
  26666. __pyx_cur_scope->__pyx_v_port = __pyx_v_port;
  26667. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_port);
  26668. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_port);
  26669. __pyx_cur_scope->__pyx_v_family = __pyx_v_family;
  26670. __pyx_cur_scope->__pyx_v_type = __pyx_v_type;
  26671. __pyx_cur_scope->__pyx_v_proto = __pyx_v_proto;
  26672. __pyx_cur_scope->__pyx_v_flags = __pyx_v_flags;
  26673. {
  26674. __pyx_CoroutineObject *gen = __Pyx_IterableCoroutine_New((__pyx_coroutine_body_t) __pyx_gb_6uvloop_4loop_4Loop_48generator, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_getaddrinfo, __pyx_n_s_Loop_getaddrinfo, __pyx_n_s_uvloop_loop); if (unlikely(!gen)) __PYX_ERR(2, 1420, __pyx_L1_error)
  26675. __Pyx_DECREF(__pyx_cur_scope);
  26676. __Pyx_RefNannyFinishContext();
  26677. return (PyObject *) gen;
  26678. }
  26679. /* function exit code */
  26680. __pyx_L1_error:;
  26681. __Pyx_AddTraceback("uvloop.loop.Loop.getaddrinfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
  26682. __pyx_r = NULL;
  26683. __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  26684. __Pyx_XGIVEREF(__pyx_r);
  26685. __Pyx_RefNannyFinishContext();
  26686. return __pyx_r;
  26687. }
  26688. static PyObject *__pyx_gb_6uvloop_4loop_4Loop_48generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
  26689. {
  26690. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_5_getaddrinfo *__pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_5_getaddrinfo *)__pyx_generator->closure);
  26691. PyObject *__pyx_r = NULL;
  26692. PyObject *__pyx_t_1 = NULL;
  26693. int __pyx_t_2;
  26694. int __pyx_t_3;
  26695. PyObject *__pyx_t_4 = NULL;
  26696. PyObject *__pyx_t_5 = NULL;
  26697. PyObject *__pyx_t_6 = NULL;
  26698. __Pyx_RefNannyDeclarations
  26699. __Pyx_RefNannySetupContext("getaddrinfo", 0);
  26700. switch (__pyx_generator->resume_label) {
  26701. case 0: goto __pyx_L3_first_run;
  26702. case 1: goto __pyx_L5_resume_from_await;
  26703. case 2: goto __pyx_L6_resume_from_await;
  26704. default: /* CPython raises the right error here */
  26705. __Pyx_RefNannyFinishContext();
  26706. return NULL;
  26707. }
  26708. __pyx_L3_first_run:;
  26709. if (unlikely(!__pyx_sent_value)) __PYX_ERR(2, 1420, __pyx_L1_error)
  26710. /* "uvloop/loop.pyx":1423
  26711. * int family=0, int type=0, int proto=0, int flags=0):
  26712. *
  26713. * addr = __static_getaddrinfo_pyaddr(host, port, family, # <<<<<<<<<<<<<<
  26714. * type, proto, flags)
  26715. * if addr is not None:
  26716. */
  26717. __pyx_t_1 = __pyx_f_6uvloop_4loop___static_getaddrinfo_pyaddr(__pyx_cur_scope->__pyx_v_host, __pyx_cur_scope->__pyx_v_port, __pyx_cur_scope->__pyx_v_family, __pyx_cur_scope->__pyx_v_type, __pyx_cur_scope->__pyx_v_proto, __pyx_cur_scope->__pyx_v_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1423, __pyx_L1_error)
  26718. __Pyx_GOTREF(__pyx_t_1);
  26719. __Pyx_GIVEREF(__pyx_t_1);
  26720. __pyx_cur_scope->__pyx_v_addr = __pyx_t_1;
  26721. __pyx_t_1 = 0;
  26722. /* "uvloop/loop.pyx":1425
  26723. * addr = __static_getaddrinfo_pyaddr(host, port, family,
  26724. * type, proto, flags)
  26725. * if addr is not None: # <<<<<<<<<<<<<<
  26726. * fut = self._new_future()
  26727. * fut.set_result([addr])
  26728. */
  26729. __pyx_t_2 = (__pyx_cur_scope->__pyx_v_addr != Py_None);
  26730. __pyx_t_3 = (__pyx_t_2 != 0);
  26731. if (__pyx_t_3) {
  26732. /* "uvloop/loop.pyx":1426
  26733. * type, proto, flags)
  26734. * if addr is not None:
  26735. * fut = self._new_future() # <<<<<<<<<<<<<<
  26736. * fut.set_result([addr])
  26737. * return await fut
  26738. */
  26739. __pyx_t_1 = __pyx_f_6uvloop_4loop_4Loop__new_future(__pyx_cur_scope->__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1426, __pyx_L1_error)
  26740. __Pyx_GOTREF(__pyx_t_1);
  26741. __Pyx_GIVEREF(__pyx_t_1);
  26742. __pyx_cur_scope->__pyx_v_fut = __pyx_t_1;
  26743. __pyx_t_1 = 0;
  26744. /* "uvloop/loop.pyx":1427
  26745. * if addr is not None:
  26746. * fut = self._new_future()
  26747. * fut.set_result([addr]) # <<<<<<<<<<<<<<
  26748. * return await fut
  26749. *
  26750. */
  26751. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_fut, __pyx_n_s_set_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1427, __pyx_L1_error)
  26752. __Pyx_GOTREF(__pyx_t_4);
  26753. __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1427, __pyx_L1_error)
  26754. __Pyx_GOTREF(__pyx_t_5);
  26755. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_addr);
  26756. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_addr);
  26757. PyList_SET_ITEM(__pyx_t_5, 0, __pyx_cur_scope->__pyx_v_addr);
  26758. __pyx_t_6 = NULL;
  26759. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
  26760. __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
  26761. if (likely(__pyx_t_6)) {
  26762. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  26763. __Pyx_INCREF(__pyx_t_6);
  26764. __Pyx_INCREF(function);
  26765. __Pyx_DECREF_SET(__pyx_t_4, function);
  26766. }
  26767. }
  26768. __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5);
  26769. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  26770. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  26771. if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1427, __pyx_L1_error)
  26772. __Pyx_GOTREF(__pyx_t_1);
  26773. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  26774. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  26775. /* "uvloop/loop.pyx":1428
  26776. * fut = self._new_future()
  26777. * fut.set_result([addr])
  26778. * return await fut # <<<<<<<<<<<<<<
  26779. *
  26780. * return await self._getaddrinfo(
  26781. */
  26782. __Pyx_XDECREF(__pyx_r);
  26783. __pyx_r = __Pyx_Coroutine_Yield_From(__pyx_generator, __pyx_cur_scope->__pyx_v_fut);
  26784. __Pyx_XGOTREF(__pyx_r);
  26785. if (likely(__pyx_r)) {
  26786. __Pyx_XGIVEREF(__pyx_r);
  26787. __Pyx_RefNannyFinishContext();
  26788. __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  26789. /* return from generator, awaiting value */
  26790. __pyx_generator->resume_label = 1;
  26791. return __pyx_r;
  26792. __pyx_L5_resume_from_await:;
  26793. if (unlikely(!__pyx_sent_value)) __PYX_ERR(2, 1428, __pyx_L1_error)
  26794. __pyx_t_1 = __pyx_sent_value; __Pyx_INCREF(__pyx_t_1);
  26795. } else {
  26796. __pyx_t_1 = NULL;
  26797. if (__Pyx_PyGen_FetchStopIterationValue(&__pyx_t_1) < 0) __PYX_ERR(2, 1428, __pyx_L1_error)
  26798. __Pyx_GOTREF(__pyx_t_1);
  26799. }
  26800. __pyx_r = NULL; __Pyx_ReturnWithStopIteration(__pyx_t_1);
  26801. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  26802. __pyx_t_1 = 0;
  26803. goto __pyx_L0;
  26804. /* "uvloop/loop.pyx":1425
  26805. * addr = __static_getaddrinfo_pyaddr(host, port, family,
  26806. * type, proto, flags)
  26807. * if addr is not None: # <<<<<<<<<<<<<<
  26808. * fut = self._new_future()
  26809. * fut.set_result([addr])
  26810. */
  26811. }
  26812. /* "uvloop/loop.pyx":1430
  26813. * return await fut
  26814. *
  26815. * return await self._getaddrinfo( # <<<<<<<<<<<<<<
  26816. * host, port, family, type, proto, flags, 1)
  26817. *
  26818. */
  26819. __Pyx_XDECREF(__pyx_r);
  26820. /* "uvloop/loop.pyx":1431
  26821. *
  26822. * return await self._getaddrinfo(
  26823. * host, port, family, type, proto, flags, 1) # <<<<<<<<<<<<<<
  26824. *
  26825. * @cython.iterable_coroutine
  26826. */
  26827. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->_getaddrinfo(__pyx_cur_scope->__pyx_v_self, __pyx_cur_scope->__pyx_v_host, __pyx_cur_scope->__pyx_v_port, __pyx_cur_scope->__pyx_v_family, __pyx_cur_scope->__pyx_v_type, __pyx_cur_scope->__pyx_v_proto, __pyx_cur_scope->__pyx_v_flags, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1430, __pyx_L1_error)
  26828. __Pyx_GOTREF(__pyx_t_1);
  26829. __pyx_r = __Pyx_Coroutine_Yield_From(__pyx_generator, __pyx_t_1);
  26830. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  26831. __Pyx_XGOTREF(__pyx_r);
  26832. if (likely(__pyx_r)) {
  26833. __Pyx_XGIVEREF(__pyx_r);
  26834. __Pyx_RefNannyFinishContext();
  26835. __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  26836. /* return from generator, awaiting value */
  26837. __pyx_generator->resume_label = 2;
  26838. return __pyx_r;
  26839. __pyx_L6_resume_from_await:;
  26840. if (unlikely(!__pyx_sent_value)) __PYX_ERR(2, 1430, __pyx_L1_error)
  26841. __pyx_t_1 = __pyx_sent_value; __Pyx_INCREF(__pyx_t_1);
  26842. } else {
  26843. __pyx_t_1 = NULL;
  26844. if (__Pyx_PyGen_FetchStopIterationValue(&__pyx_t_1) < 0) __PYX_ERR(2, 1430, __pyx_L1_error)
  26845. __Pyx_GOTREF(__pyx_t_1);
  26846. }
  26847. __pyx_r = NULL; __Pyx_ReturnWithStopIteration(__pyx_t_1);
  26848. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  26849. __pyx_t_1 = 0;
  26850. goto __pyx_L0;
  26851. CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
  26852. /* "uvloop/loop.pyx":1420
  26853. *
  26854. * @cython.iterable_coroutine
  26855. * async def getaddrinfo(self, object host, object port, *, # <<<<<<<<<<<<<<
  26856. * int family=0, int type=0, int proto=0, int flags=0):
  26857. *
  26858. */
  26859. /* function exit code */
  26860. __pyx_L1_error:;
  26861. __Pyx_XDECREF(__pyx_t_1);
  26862. __Pyx_XDECREF(__pyx_t_4);
  26863. __Pyx_XDECREF(__pyx_t_5);
  26864. __Pyx_XDECREF(__pyx_t_6);
  26865. __Pyx_AddTraceback("getaddrinfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
  26866. __pyx_L0:;
  26867. __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  26868. #if !CYTHON_USE_EXC_INFO_STACK
  26869. __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  26870. #endif
  26871. __pyx_generator->resume_label = -1;
  26872. __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  26873. __Pyx_RefNannyFinishContext();
  26874. return __pyx_r;
  26875. }
  26876. static PyObject *__pyx_gb_6uvloop_4loop_4Loop_51generator1(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
  26877. /* "uvloop/loop.pyx":1434
  26878. *
  26879. * @cython.iterable_coroutine
  26880. * async def getnameinfo(self, sockaddr, int flags=0): # <<<<<<<<<<<<<<
  26881. * cdef:
  26882. * AddrInfo ai_cnt
  26883. */
  26884. /* Python wrapper */
  26885. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_50getnameinfo(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  26886. static char __pyx_doc_6uvloop_4loop_4Loop_49getnameinfo[] = "Loop.getnameinfo(self, sockaddr, int flags=0)";
  26887. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_50getnameinfo(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  26888. PyObject *__pyx_v_sockaddr = 0;
  26889. int __pyx_v_flags;
  26890. PyObject *__pyx_r = 0;
  26891. __Pyx_RefNannyDeclarations
  26892. __Pyx_RefNannySetupContext("getnameinfo (wrapper)", 0);
  26893. {
  26894. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sockaddr,&__pyx_n_s_flags,0};
  26895. PyObject* values[2] = {0,0};
  26896. if (unlikely(__pyx_kwds)) {
  26897. Py_ssize_t kw_args;
  26898. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  26899. switch (pos_args) {
  26900. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  26901. CYTHON_FALLTHROUGH;
  26902. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  26903. CYTHON_FALLTHROUGH;
  26904. case 0: break;
  26905. default: goto __pyx_L5_argtuple_error;
  26906. }
  26907. kw_args = PyDict_Size(__pyx_kwds);
  26908. switch (pos_args) {
  26909. case 0:
  26910. if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sockaddr)) != 0)) kw_args--;
  26911. else goto __pyx_L5_argtuple_error;
  26912. CYTHON_FALLTHROUGH;
  26913. case 1:
  26914. if (kw_args > 0) {
  26915. PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_flags);
  26916. if (value) { values[1] = value; kw_args--; }
  26917. }
  26918. }
  26919. if (unlikely(kw_args > 0)) {
  26920. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getnameinfo") < 0)) __PYX_ERR(2, 1434, __pyx_L3_error)
  26921. }
  26922. } else {
  26923. switch (PyTuple_GET_SIZE(__pyx_args)) {
  26924. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  26925. CYTHON_FALLTHROUGH;
  26926. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  26927. break;
  26928. default: goto __pyx_L5_argtuple_error;
  26929. }
  26930. }
  26931. __pyx_v_sockaddr = values[0];
  26932. if (values[1]) {
  26933. __pyx_v_flags = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_flags == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 1434, __pyx_L3_error)
  26934. } else {
  26935. __pyx_v_flags = ((int)0);
  26936. }
  26937. }
  26938. goto __pyx_L4_argument_unpacking_done;
  26939. __pyx_L5_argtuple_error:;
  26940. __Pyx_RaiseArgtupleInvalid("getnameinfo", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 1434, __pyx_L3_error)
  26941. __pyx_L3_error:;
  26942. __Pyx_AddTraceback("uvloop.loop.Loop.getnameinfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
  26943. __Pyx_RefNannyFinishContext();
  26944. return NULL;
  26945. __pyx_L4_argument_unpacking_done:;
  26946. __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_49getnameinfo(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self), __pyx_v_sockaddr, __pyx_v_flags);
  26947. /* function exit code */
  26948. __Pyx_RefNannyFinishContext();
  26949. return __pyx_r;
  26950. }
  26951. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_49getnameinfo(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_sockaddr, int __pyx_v_flags) {
  26952. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_6_getnameinfo *__pyx_cur_scope;
  26953. PyObject *__pyx_r = NULL;
  26954. __Pyx_RefNannyDeclarations
  26955. __Pyx_RefNannySetupContext("getnameinfo", 0);
  26956. __pyx_cur_scope = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_6_getnameinfo *)__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_6_getnameinfo(__pyx_ptype_6uvloop_4loop___pyx_scope_struct_6_getnameinfo, __pyx_empty_tuple, NULL);
  26957. if (unlikely(!__pyx_cur_scope)) {
  26958. __pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_6_getnameinfo *)Py_None);
  26959. __Pyx_INCREF(Py_None);
  26960. __PYX_ERR(2, 1434, __pyx_L1_error)
  26961. } else {
  26962. __Pyx_GOTREF(__pyx_cur_scope);
  26963. }
  26964. __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  26965. __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  26966. __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  26967. __pyx_cur_scope->__pyx_v_sockaddr = __pyx_v_sockaddr;
  26968. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_sockaddr);
  26969. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_sockaddr);
  26970. __pyx_cur_scope->__pyx_v_flags = __pyx_v_flags;
  26971. {
  26972. __pyx_CoroutineObject *gen = __Pyx_IterableCoroutine_New((__pyx_coroutine_body_t) __pyx_gb_6uvloop_4loop_4Loop_51generator1, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_getnameinfo, __pyx_n_s_Loop_getnameinfo, __pyx_n_s_uvloop_loop); if (unlikely(!gen)) __PYX_ERR(2, 1434, __pyx_L1_error)
  26973. __Pyx_DECREF(__pyx_cur_scope);
  26974. __Pyx_RefNannyFinishContext();
  26975. return (PyObject *) gen;
  26976. }
  26977. /* function exit code */
  26978. __pyx_L1_error:;
  26979. __Pyx_AddTraceback("uvloop.loop.Loop.getnameinfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
  26980. __pyx_r = NULL;
  26981. __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  26982. __Pyx_XGIVEREF(__pyx_r);
  26983. __Pyx_RefNannyFinishContext();
  26984. return __pyx_r;
  26985. }
  26986. static PyObject *__pyx_gb_6uvloop_4loop_4Loop_51generator1(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
  26987. {
  26988. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_6_getnameinfo *__pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_6_getnameinfo *)__pyx_generator->closure);
  26989. PyObject *__pyx_r = NULL;
  26990. int __pyx_t_1;
  26991. int __pyx_t_2;
  26992. PyObject *__pyx_t_3 = NULL;
  26993. Py_ssize_t __pyx_t_4;
  26994. PyObject *__pyx_t_5 = NULL;
  26995. PyObject *__pyx_t_6 = NULL;
  26996. struct addrinfo *__pyx_t_7;
  26997. int __pyx_t_8;
  26998. unsigned long __pyx_t_9;
  26999. __Pyx_RefNannyDeclarations
  27000. __Pyx_RefNannySetupContext("getnameinfo", 0);
  27001. switch (__pyx_generator->resume_label) {
  27002. case 0: goto __pyx_L3_first_run;
  27003. case 1: goto __pyx_L17_resume_from_await;
  27004. case 2: goto __pyx_L21_resume_from_await;
  27005. default: /* CPython raises the right error here */
  27006. __Pyx_RefNannyFinishContext();
  27007. return NULL;
  27008. }
  27009. __pyx_L3_first_run:;
  27010. if (unlikely(!__pyx_sent_value)) __PYX_ERR(2, 1434, __pyx_L1_error)
  27011. /* "uvloop/loop.pyx":1440
  27012. * system.sockaddr_in6 *sin6
  27013. *
  27014. * if not isinstance(sockaddr, tuple): # <<<<<<<<<<<<<<
  27015. * raise TypeError('getnameinfo() argument 1 must be a tuple')
  27016. *
  27017. */
  27018. __pyx_t_1 = PyTuple_Check(__pyx_cur_scope->__pyx_v_sockaddr);
  27019. __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
  27020. if (unlikely(__pyx_t_2)) {
  27021. /* "uvloop/loop.pyx":1441
  27022. *
  27023. * if not isinstance(sockaddr, tuple):
  27024. * raise TypeError('getnameinfo() argument 1 must be a tuple') # <<<<<<<<<<<<<<
  27025. *
  27026. * sl = len(sockaddr)
  27027. */
  27028. __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__33, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1441, __pyx_L1_error)
  27029. __Pyx_GOTREF(__pyx_t_3);
  27030. __Pyx_Raise(__pyx_t_3, 0, 0, 0);
  27031. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  27032. __PYX_ERR(2, 1441, __pyx_L1_error)
  27033. /* "uvloop/loop.pyx":1440
  27034. * system.sockaddr_in6 *sin6
  27035. *
  27036. * if not isinstance(sockaddr, tuple): # <<<<<<<<<<<<<<
  27037. * raise TypeError('getnameinfo() argument 1 must be a tuple')
  27038. *
  27039. */
  27040. }
  27041. /* "uvloop/loop.pyx":1443
  27042. * raise TypeError('getnameinfo() argument 1 must be a tuple')
  27043. *
  27044. * sl = len(sockaddr) # <<<<<<<<<<<<<<
  27045. *
  27046. * if sl < 2 or sl > 4:
  27047. */
  27048. __pyx_t_4 = PyObject_Length(__pyx_cur_scope->__pyx_v_sockaddr); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(2, 1443, __pyx_L1_error)
  27049. __pyx_cur_scope->__pyx_v_sl = __pyx_t_4;
  27050. /* "uvloop/loop.pyx":1445
  27051. * sl = len(sockaddr)
  27052. *
  27053. * if sl < 2 or sl > 4: # <<<<<<<<<<<<<<
  27054. * raise ValueError('sockaddr must be a tuple of 2, 3 or 4 values')
  27055. *
  27056. */
  27057. __pyx_t_1 = ((__pyx_cur_scope->__pyx_v_sl < 2) != 0);
  27058. if (!__pyx_t_1) {
  27059. } else {
  27060. __pyx_t_2 = __pyx_t_1;
  27061. goto __pyx_L6_bool_binop_done;
  27062. }
  27063. __pyx_t_1 = ((__pyx_cur_scope->__pyx_v_sl > 4) != 0);
  27064. __pyx_t_2 = __pyx_t_1;
  27065. __pyx_L6_bool_binop_done:;
  27066. if (unlikely(__pyx_t_2)) {
  27067. /* "uvloop/loop.pyx":1446
  27068. *
  27069. * if sl < 2 or sl > 4:
  27070. * raise ValueError('sockaddr must be a tuple of 2, 3 or 4 values') # <<<<<<<<<<<<<<
  27071. *
  27072. * if sl > 2:
  27073. */
  27074. __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__34, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1446, __pyx_L1_error)
  27075. __Pyx_GOTREF(__pyx_t_3);
  27076. __Pyx_Raise(__pyx_t_3, 0, 0, 0);
  27077. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  27078. __PYX_ERR(2, 1446, __pyx_L1_error)
  27079. /* "uvloop/loop.pyx":1445
  27080. * sl = len(sockaddr)
  27081. *
  27082. * if sl < 2 or sl > 4: # <<<<<<<<<<<<<<
  27083. * raise ValueError('sockaddr must be a tuple of 2, 3 or 4 values')
  27084. *
  27085. */
  27086. }
  27087. /* "uvloop/loop.pyx":1448
  27088. * raise ValueError('sockaddr must be a tuple of 2, 3 or 4 values')
  27089. *
  27090. * if sl > 2: # <<<<<<<<<<<<<<
  27091. * flowinfo = sockaddr[2]
  27092. * if flowinfo < 0 or flowinfo > 0xfffff:
  27093. */
  27094. __pyx_t_2 = ((__pyx_cur_scope->__pyx_v_sl > 2) != 0);
  27095. if (__pyx_t_2) {
  27096. /* "uvloop/loop.pyx":1449
  27097. *
  27098. * if sl > 2:
  27099. * flowinfo = sockaddr[2] # <<<<<<<<<<<<<<
  27100. * if flowinfo < 0 or flowinfo > 0xfffff:
  27101. * if PY37:
  27102. */
  27103. __pyx_t_3 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_sockaddr, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1449, __pyx_L1_error)
  27104. __Pyx_GOTREF(__pyx_t_3);
  27105. __Pyx_GIVEREF(__pyx_t_3);
  27106. __pyx_cur_scope->__pyx_v_flowinfo = __pyx_t_3;
  27107. __pyx_t_3 = 0;
  27108. /* "uvloop/loop.pyx":1450
  27109. * if sl > 2:
  27110. * flowinfo = sockaddr[2]
  27111. * if flowinfo < 0 or flowinfo > 0xfffff: # <<<<<<<<<<<<<<
  27112. * if PY37:
  27113. * msg = 'getnameinfo(): flowinfo must be 0-1048575.'
  27114. */
  27115. __pyx_t_3 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_flowinfo, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1450, __pyx_L1_error)
  27116. __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 1450, __pyx_L1_error)
  27117. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  27118. if (!__pyx_t_1) {
  27119. } else {
  27120. __pyx_t_2 = __pyx_t_1;
  27121. goto __pyx_L10_bool_binop_done;
  27122. }
  27123. __pyx_t_3 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_flowinfo, __pyx_int_1048575, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1450, __pyx_L1_error)
  27124. __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 1450, __pyx_L1_error)
  27125. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  27126. __pyx_t_2 = __pyx_t_1;
  27127. __pyx_L10_bool_binop_done:;
  27128. if (__pyx_t_2) {
  27129. /* "uvloop/loop.pyx":1451
  27130. * flowinfo = sockaddr[2]
  27131. * if flowinfo < 0 or flowinfo > 0xfffff:
  27132. * if PY37: # <<<<<<<<<<<<<<
  27133. * msg = 'getnameinfo(): flowinfo must be 0-1048575.'
  27134. * else:
  27135. */
  27136. __pyx_t_2 = (__pyx_v_6uvloop_4loop_PY37 != 0);
  27137. if (__pyx_t_2) {
  27138. /* "uvloop/loop.pyx":1452
  27139. * if flowinfo < 0 or flowinfo > 0xfffff:
  27140. * if PY37:
  27141. * msg = 'getnameinfo(): flowinfo must be 0-1048575.' # <<<<<<<<<<<<<<
  27142. * else:
  27143. * msg = 'getsockaddrarg: flowinfo must be 0-1048575.'
  27144. */
  27145. __Pyx_INCREF(__pyx_kp_u_getnameinfo_flowinfo_must_be_0_1);
  27146. __Pyx_GIVEREF(__pyx_kp_u_getnameinfo_flowinfo_must_be_0_1);
  27147. __pyx_cur_scope->__pyx_v_msg = __pyx_kp_u_getnameinfo_flowinfo_must_be_0_1;
  27148. /* "uvloop/loop.pyx":1451
  27149. * flowinfo = sockaddr[2]
  27150. * if flowinfo < 0 or flowinfo > 0xfffff:
  27151. * if PY37: # <<<<<<<<<<<<<<
  27152. * msg = 'getnameinfo(): flowinfo must be 0-1048575.'
  27153. * else:
  27154. */
  27155. goto __pyx_L12;
  27156. }
  27157. /* "uvloop/loop.pyx":1454
  27158. * msg = 'getnameinfo(): flowinfo must be 0-1048575.'
  27159. * else:
  27160. * msg = 'getsockaddrarg: flowinfo must be 0-1048575.' # <<<<<<<<<<<<<<
  27161. * raise OverflowError(msg)
  27162. * else:
  27163. */
  27164. /*else*/ {
  27165. __Pyx_INCREF(__pyx_kp_u_getsockaddrarg_flowinfo_must_be);
  27166. __Pyx_GIVEREF(__pyx_kp_u_getsockaddrarg_flowinfo_must_be);
  27167. __pyx_cur_scope->__pyx_v_msg = __pyx_kp_u_getsockaddrarg_flowinfo_must_be;
  27168. }
  27169. __pyx_L12:;
  27170. /* "uvloop/loop.pyx":1455
  27171. * else:
  27172. * msg = 'getsockaddrarg: flowinfo must be 0-1048575.'
  27173. * raise OverflowError(msg) # <<<<<<<<<<<<<<
  27174. * else:
  27175. * flowinfo = 0
  27176. */
  27177. __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_OverflowError, __pyx_cur_scope->__pyx_v_msg); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1455, __pyx_L1_error)
  27178. __Pyx_GOTREF(__pyx_t_3);
  27179. __Pyx_Raise(__pyx_t_3, 0, 0, 0);
  27180. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  27181. __PYX_ERR(2, 1455, __pyx_L1_error)
  27182. /* "uvloop/loop.pyx":1450
  27183. * if sl > 2:
  27184. * flowinfo = sockaddr[2]
  27185. * if flowinfo < 0 or flowinfo > 0xfffff: # <<<<<<<<<<<<<<
  27186. * if PY37:
  27187. * msg = 'getnameinfo(): flowinfo must be 0-1048575.'
  27188. */
  27189. }
  27190. /* "uvloop/loop.pyx":1448
  27191. * raise ValueError('sockaddr must be a tuple of 2, 3 or 4 values')
  27192. *
  27193. * if sl > 2: # <<<<<<<<<<<<<<
  27194. * flowinfo = sockaddr[2]
  27195. * if flowinfo < 0 or flowinfo > 0xfffff:
  27196. */
  27197. goto __pyx_L8;
  27198. }
  27199. /* "uvloop/loop.pyx":1457
  27200. * raise OverflowError(msg)
  27201. * else:
  27202. * flowinfo = 0 # <<<<<<<<<<<<<<
  27203. *
  27204. * if sl > 3:
  27205. */
  27206. /*else*/ {
  27207. __Pyx_INCREF(__pyx_int_0);
  27208. __Pyx_GIVEREF(__pyx_int_0);
  27209. __pyx_cur_scope->__pyx_v_flowinfo = __pyx_int_0;
  27210. }
  27211. __pyx_L8:;
  27212. /* "uvloop/loop.pyx":1459
  27213. * flowinfo = 0
  27214. *
  27215. * if sl > 3: # <<<<<<<<<<<<<<
  27216. * scope_id = sockaddr[3]
  27217. * if scope_id < 0 or scope_id > 2 ** 32:
  27218. */
  27219. __pyx_t_2 = ((__pyx_cur_scope->__pyx_v_sl > 3) != 0);
  27220. if (__pyx_t_2) {
  27221. /* "uvloop/loop.pyx":1460
  27222. *
  27223. * if sl > 3:
  27224. * scope_id = sockaddr[3] # <<<<<<<<<<<<<<
  27225. * if scope_id < 0 or scope_id > 2 ** 32:
  27226. * raise OverflowError(
  27227. */
  27228. __pyx_t_3 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_sockaddr, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1460, __pyx_L1_error)
  27229. __Pyx_GOTREF(__pyx_t_3);
  27230. __Pyx_GIVEREF(__pyx_t_3);
  27231. __pyx_cur_scope->__pyx_v_scope_id = __pyx_t_3;
  27232. __pyx_t_3 = 0;
  27233. /* "uvloop/loop.pyx":1461
  27234. * if sl > 3:
  27235. * scope_id = sockaddr[3]
  27236. * if scope_id < 0 or scope_id > 2 ** 32: # <<<<<<<<<<<<<<
  27237. * raise OverflowError(
  27238. * 'getsockaddrarg: scope_id must be unsigned 32 bit integer')
  27239. */
  27240. __pyx_t_3 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_scope_id, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1461, __pyx_L1_error)
  27241. __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 1461, __pyx_L1_error)
  27242. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  27243. if (!__pyx_t_1) {
  27244. } else {
  27245. __pyx_t_2 = __pyx_t_1;
  27246. goto __pyx_L15_bool_binop_done;
  27247. }
  27248. __pyx_t_3 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_scope_id, __pyx_int_4294967296, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1461, __pyx_L1_error)
  27249. __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 1461, __pyx_L1_error)
  27250. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  27251. __pyx_t_2 = __pyx_t_1;
  27252. __pyx_L15_bool_binop_done:;
  27253. if (unlikely(__pyx_t_2)) {
  27254. /* "uvloop/loop.pyx":1462
  27255. * scope_id = sockaddr[3]
  27256. * if scope_id < 0 or scope_id > 2 ** 32:
  27257. * raise OverflowError( # <<<<<<<<<<<<<<
  27258. * 'getsockaddrarg: scope_id must be unsigned 32 bit integer')
  27259. * else:
  27260. */
  27261. __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_OverflowError, __pyx_tuple__35, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1462, __pyx_L1_error)
  27262. __Pyx_GOTREF(__pyx_t_3);
  27263. __Pyx_Raise(__pyx_t_3, 0, 0, 0);
  27264. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  27265. __PYX_ERR(2, 1462, __pyx_L1_error)
  27266. /* "uvloop/loop.pyx":1461
  27267. * if sl > 3:
  27268. * scope_id = sockaddr[3]
  27269. * if scope_id < 0 or scope_id > 2 ** 32: # <<<<<<<<<<<<<<
  27270. * raise OverflowError(
  27271. * 'getsockaddrarg: scope_id must be unsigned 32 bit integer')
  27272. */
  27273. }
  27274. /* "uvloop/loop.pyx":1459
  27275. * flowinfo = 0
  27276. *
  27277. * if sl > 3: # <<<<<<<<<<<<<<
  27278. * scope_id = sockaddr[3]
  27279. * if scope_id < 0 or scope_id > 2 ** 32:
  27280. */
  27281. goto __pyx_L13;
  27282. }
  27283. /* "uvloop/loop.pyx":1465
  27284. * 'getsockaddrarg: scope_id must be unsigned 32 bit integer')
  27285. * else:
  27286. * scope_id = 0 # <<<<<<<<<<<<<<
  27287. *
  27288. * ai_cnt = await self._getaddrinfo(
  27289. */
  27290. /*else*/ {
  27291. __Pyx_INCREF(__pyx_int_0);
  27292. __Pyx_GIVEREF(__pyx_int_0);
  27293. __pyx_cur_scope->__pyx_v_scope_id = __pyx_int_0;
  27294. }
  27295. __pyx_L13:;
  27296. /* "uvloop/loop.pyx":1468
  27297. *
  27298. * ai_cnt = await self._getaddrinfo(
  27299. * sockaddr[0], sockaddr[1], # <<<<<<<<<<<<<<
  27300. * uv.AF_UNSPEC, # family
  27301. * uv.SOCK_DGRAM, # type
  27302. */
  27303. __pyx_t_3 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_sockaddr, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1468, __pyx_L1_error)
  27304. __Pyx_GOTREF(__pyx_t_3);
  27305. __pyx_t_5 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_sockaddr, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1468, __pyx_L1_error)
  27306. __Pyx_GOTREF(__pyx_t_5);
  27307. /* "uvloop/loop.pyx":1467
  27308. * scope_id = 0
  27309. *
  27310. * ai_cnt = await self._getaddrinfo( # <<<<<<<<<<<<<<
  27311. * sockaddr[0], sockaddr[1],
  27312. * uv.AF_UNSPEC, # family
  27313. */
  27314. __pyx_t_6 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->_getaddrinfo(__pyx_cur_scope->__pyx_v_self, __pyx_t_3, __pyx_t_5, AF_UNSPEC, SOCK_DGRAM, 0, AI_NUMERICHOST, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1467, __pyx_L1_error)
  27315. __Pyx_GOTREF(__pyx_t_6);
  27316. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  27317. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  27318. __pyx_r = __Pyx_Coroutine_Yield_From(__pyx_generator, __pyx_t_6);
  27319. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  27320. __Pyx_XGOTREF(__pyx_r);
  27321. if (likely(__pyx_r)) {
  27322. __Pyx_XGIVEREF(__pyx_r);
  27323. __Pyx_RefNannyFinishContext();
  27324. __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  27325. /* return from generator, awaiting value */
  27326. __pyx_generator->resume_label = 1;
  27327. return __pyx_r;
  27328. __pyx_L17_resume_from_await:;
  27329. if (unlikely(!__pyx_sent_value)) __PYX_ERR(2, 1467, __pyx_L1_error)
  27330. __pyx_t_6 = __pyx_sent_value; __Pyx_INCREF(__pyx_t_6);
  27331. } else {
  27332. __pyx_t_6 = NULL;
  27333. if (__Pyx_PyGen_FetchStopIterationValue(&__pyx_t_6) < 0) __PYX_ERR(2, 1467, __pyx_L1_error)
  27334. __Pyx_GOTREF(__pyx_t_6);
  27335. }
  27336. if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_6uvloop_4loop_AddrInfo))))) __PYX_ERR(2, 1467, __pyx_L1_error)
  27337. __Pyx_GIVEREF(__pyx_t_6);
  27338. __pyx_cur_scope->__pyx_v_ai_cnt = ((struct __pyx_obj_6uvloop_4loop_AddrInfo *)__pyx_t_6);
  27339. __pyx_t_6 = 0;
  27340. /* "uvloop/loop.pyx":1475
  27341. * 0) # unpack
  27342. *
  27343. * ai = ai_cnt.data # <<<<<<<<<<<<<<
  27344. *
  27345. * if ai.ai_next:
  27346. */
  27347. __pyx_t_7 = __pyx_cur_scope->__pyx_v_ai_cnt->data;
  27348. __pyx_cur_scope->__pyx_v_ai = __pyx_t_7;
  27349. /* "uvloop/loop.pyx":1477
  27350. * ai = ai_cnt.data
  27351. *
  27352. * if ai.ai_next: # <<<<<<<<<<<<<<
  27353. * raise OSError("sockaddr resolved to multiple addresses")
  27354. *
  27355. */
  27356. __pyx_t_2 = (__pyx_cur_scope->__pyx_v_ai->ai_next != 0);
  27357. if (unlikely(__pyx_t_2)) {
  27358. /* "uvloop/loop.pyx":1478
  27359. *
  27360. * if ai.ai_next:
  27361. * raise OSError("sockaddr resolved to multiple addresses") # <<<<<<<<<<<<<<
  27362. *
  27363. * if ai.ai_family == uv.AF_INET:
  27364. */
  27365. __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_OSError, __pyx_tuple__36, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1478, __pyx_L1_error)
  27366. __Pyx_GOTREF(__pyx_t_6);
  27367. __Pyx_Raise(__pyx_t_6, 0, 0, 0);
  27368. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  27369. __PYX_ERR(2, 1478, __pyx_L1_error)
  27370. /* "uvloop/loop.pyx":1477
  27371. * ai = ai_cnt.data
  27372. *
  27373. * if ai.ai_next: # <<<<<<<<<<<<<<
  27374. * raise OSError("sockaddr resolved to multiple addresses")
  27375. *
  27376. */
  27377. }
  27378. /* "uvloop/loop.pyx":1480
  27379. * raise OSError("sockaddr resolved to multiple addresses")
  27380. *
  27381. * if ai.ai_family == uv.AF_INET: # <<<<<<<<<<<<<<
  27382. * if sl > 2:
  27383. * raise OSError("IPv4 sockaddr must be 2 tuple")
  27384. */
  27385. __pyx_t_2 = ((__pyx_cur_scope->__pyx_v_ai->ai_family == AF_INET) != 0);
  27386. if (__pyx_t_2) {
  27387. /* "uvloop/loop.pyx":1481
  27388. *
  27389. * if ai.ai_family == uv.AF_INET:
  27390. * if sl > 2: # <<<<<<<<<<<<<<
  27391. * raise OSError("IPv4 sockaddr must be 2 tuple")
  27392. * elif ai.ai_family == uv.AF_INET6:
  27393. */
  27394. __pyx_t_2 = ((__pyx_cur_scope->__pyx_v_sl > 2) != 0);
  27395. if (unlikely(__pyx_t_2)) {
  27396. /* "uvloop/loop.pyx":1482
  27397. * if ai.ai_family == uv.AF_INET:
  27398. * if sl > 2:
  27399. * raise OSError("IPv4 sockaddr must be 2 tuple") # <<<<<<<<<<<<<<
  27400. * elif ai.ai_family == uv.AF_INET6:
  27401. * # Modify some fields in `ai`
  27402. */
  27403. __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_OSError, __pyx_tuple__37, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1482, __pyx_L1_error)
  27404. __Pyx_GOTREF(__pyx_t_6);
  27405. __Pyx_Raise(__pyx_t_6, 0, 0, 0);
  27406. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  27407. __PYX_ERR(2, 1482, __pyx_L1_error)
  27408. /* "uvloop/loop.pyx":1481
  27409. *
  27410. * if ai.ai_family == uv.AF_INET:
  27411. * if sl > 2: # <<<<<<<<<<<<<<
  27412. * raise OSError("IPv4 sockaddr must be 2 tuple")
  27413. * elif ai.ai_family == uv.AF_INET6:
  27414. */
  27415. }
  27416. /* "uvloop/loop.pyx":1480
  27417. * raise OSError("sockaddr resolved to multiple addresses")
  27418. *
  27419. * if ai.ai_family == uv.AF_INET: # <<<<<<<<<<<<<<
  27420. * if sl > 2:
  27421. * raise OSError("IPv4 sockaddr must be 2 tuple")
  27422. */
  27423. goto __pyx_L19;
  27424. }
  27425. /* "uvloop/loop.pyx":1483
  27426. * if sl > 2:
  27427. * raise OSError("IPv4 sockaddr must be 2 tuple")
  27428. * elif ai.ai_family == uv.AF_INET6: # <<<<<<<<<<<<<<
  27429. * # Modify some fields in `ai`
  27430. * sin6 = <system.sockaddr_in6*> ai.ai_addr
  27431. */
  27432. __pyx_t_2 = ((__pyx_cur_scope->__pyx_v_ai->ai_family == AF_INET6) != 0);
  27433. if (__pyx_t_2) {
  27434. /* "uvloop/loop.pyx":1485
  27435. * elif ai.ai_family == uv.AF_INET6:
  27436. * # Modify some fields in `ai`
  27437. * sin6 = <system.sockaddr_in6*> ai.ai_addr # <<<<<<<<<<<<<<
  27438. * sin6.sin6_flowinfo = system.htonl(flowinfo)
  27439. * sin6.sin6_scope_id = scope_id
  27440. */
  27441. __pyx_cur_scope->__pyx_v_sin6 = ((struct sockaddr_in6 *)__pyx_cur_scope->__pyx_v_ai->ai_addr);
  27442. /* "uvloop/loop.pyx":1486
  27443. * # Modify some fields in `ai`
  27444. * sin6 = <system.sockaddr_in6*> ai.ai_addr
  27445. * sin6.sin6_flowinfo = system.htonl(flowinfo) # <<<<<<<<<<<<<<
  27446. * sin6.sin6_scope_id = scope_id
  27447. *
  27448. */
  27449. __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_cur_scope->__pyx_v_flowinfo); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 1486, __pyx_L1_error)
  27450. __pyx_cur_scope->__pyx_v_sin6->sin6_flowinfo = htonl(__pyx_t_8);
  27451. /* "uvloop/loop.pyx":1487
  27452. * sin6 = <system.sockaddr_in6*> ai.ai_addr
  27453. * sin6.sin6_flowinfo = system.htonl(flowinfo)
  27454. * sin6.sin6_scope_id = scope_id # <<<<<<<<<<<<<<
  27455. *
  27456. * return await self._getnameinfo(ai.ai_addr, flags)
  27457. */
  27458. __pyx_t_9 = __Pyx_PyInt_As_unsigned_long(__pyx_cur_scope->__pyx_v_scope_id); if (unlikely((__pyx_t_9 == (unsigned long)-1) && PyErr_Occurred())) __PYX_ERR(2, 1487, __pyx_L1_error)
  27459. __pyx_cur_scope->__pyx_v_sin6->sin6_scope_id = __pyx_t_9;
  27460. /* "uvloop/loop.pyx":1483
  27461. * if sl > 2:
  27462. * raise OSError("IPv4 sockaddr must be 2 tuple")
  27463. * elif ai.ai_family == uv.AF_INET6: # <<<<<<<<<<<<<<
  27464. * # Modify some fields in `ai`
  27465. * sin6 = <system.sockaddr_in6*> ai.ai_addr
  27466. */
  27467. }
  27468. __pyx_L19:;
  27469. /* "uvloop/loop.pyx":1489
  27470. * sin6.sin6_scope_id = scope_id
  27471. *
  27472. * return await self._getnameinfo(ai.ai_addr, flags) # <<<<<<<<<<<<<<
  27473. *
  27474. * @cython.iterable_coroutine
  27475. */
  27476. __Pyx_XDECREF(__pyx_r);
  27477. __pyx_t_6 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->_getnameinfo(__pyx_cur_scope->__pyx_v_self, __pyx_cur_scope->__pyx_v_ai->ai_addr, __pyx_cur_scope->__pyx_v_flags); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1489, __pyx_L1_error)
  27478. __Pyx_GOTREF(__pyx_t_6);
  27479. __pyx_r = __Pyx_Coroutine_Yield_From(__pyx_generator, __pyx_t_6);
  27480. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  27481. __Pyx_XGOTREF(__pyx_r);
  27482. if (likely(__pyx_r)) {
  27483. __Pyx_XGIVEREF(__pyx_r);
  27484. __Pyx_RefNannyFinishContext();
  27485. __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  27486. /* return from generator, awaiting value */
  27487. __pyx_generator->resume_label = 2;
  27488. return __pyx_r;
  27489. __pyx_L21_resume_from_await:;
  27490. if (unlikely(!__pyx_sent_value)) __PYX_ERR(2, 1489, __pyx_L1_error)
  27491. __pyx_t_6 = __pyx_sent_value; __Pyx_INCREF(__pyx_t_6);
  27492. } else {
  27493. __pyx_t_6 = NULL;
  27494. if (__Pyx_PyGen_FetchStopIterationValue(&__pyx_t_6) < 0) __PYX_ERR(2, 1489, __pyx_L1_error)
  27495. __Pyx_GOTREF(__pyx_t_6);
  27496. }
  27497. __pyx_r = NULL; __Pyx_ReturnWithStopIteration(__pyx_t_6);
  27498. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  27499. __pyx_t_6 = 0;
  27500. goto __pyx_L0;
  27501. CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
  27502. /* "uvloop/loop.pyx":1434
  27503. *
  27504. * @cython.iterable_coroutine
  27505. * async def getnameinfo(self, sockaddr, int flags=0): # <<<<<<<<<<<<<<
  27506. * cdef:
  27507. * AddrInfo ai_cnt
  27508. */
  27509. /* function exit code */
  27510. __pyx_L1_error:;
  27511. __Pyx_XDECREF(__pyx_t_3);
  27512. __Pyx_XDECREF(__pyx_t_5);
  27513. __Pyx_XDECREF(__pyx_t_6);
  27514. __Pyx_AddTraceback("getnameinfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
  27515. __pyx_L0:;
  27516. __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  27517. #if !CYTHON_USE_EXC_INFO_STACK
  27518. __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  27519. #endif
  27520. __pyx_generator->resume_label = -1;
  27521. __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  27522. __Pyx_RefNannyFinishContext();
  27523. return __pyx_r;
  27524. }
  27525. static PyObject *__pyx_gb_6uvloop_4loop_4Loop_54generator2(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
  27526. /* "uvloop/loop.pyx":1492
  27527. *
  27528. * @cython.iterable_coroutine
  27529. * async def start_tls(self, transport, protocol, sslcontext, *, # <<<<<<<<<<<<<<
  27530. * server_side=False,
  27531. * server_hostname=None,
  27532. */
  27533. /* Python wrapper */
  27534. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_53start_tls(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  27535. static char __pyx_doc_6uvloop_4loop_4Loop_52start_tls[] = "Loop.start_tls(self, transport, protocol, sslcontext, *, server_side=False, server_hostname=None, ssl_handshake_timeout=None, ssl_shutdown_timeout=None)\nUpgrade transport to TLS.\n\n Return a new transport that *protocol* should start using\n immediately.\n ";
  27536. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_53start_tls(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  27537. PyObject *__pyx_v_transport = 0;
  27538. PyObject *__pyx_v_protocol = 0;
  27539. PyObject *__pyx_v_sslcontext = 0;
  27540. PyObject *__pyx_v_server_side = 0;
  27541. PyObject *__pyx_v_server_hostname = 0;
  27542. PyObject *__pyx_v_ssl_handshake_timeout = 0;
  27543. PyObject *__pyx_v_ssl_shutdown_timeout = 0;
  27544. PyObject *__pyx_r = 0;
  27545. __Pyx_RefNannyDeclarations
  27546. __Pyx_RefNannySetupContext("start_tls (wrapper)", 0);
  27547. {
  27548. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_transport,&__pyx_n_s_protocol,&__pyx_n_s_sslcontext,&__pyx_n_s_server_side,&__pyx_n_s_server_hostname,&__pyx_n_s_ssl_handshake_timeout,&__pyx_n_s_ssl_shutdown_timeout,0};
  27549. PyObject* values[7] = {0,0,0,0,0,0,0};
  27550. /* "uvloop/loop.pyx":1493
  27551. * @cython.iterable_coroutine
  27552. * async def start_tls(self, transport, protocol, sslcontext, *,
  27553. * server_side=False, # <<<<<<<<<<<<<<
  27554. * server_hostname=None,
  27555. * ssl_handshake_timeout=None,
  27556. */
  27557. values[3] = ((PyObject *)Py_False);
  27558. /* "uvloop/loop.pyx":1494
  27559. * async def start_tls(self, transport, protocol, sslcontext, *,
  27560. * server_side=False,
  27561. * server_hostname=None, # <<<<<<<<<<<<<<
  27562. * ssl_handshake_timeout=None,
  27563. * ssl_shutdown_timeout=None):
  27564. */
  27565. values[4] = ((PyObject *)Py_None);
  27566. /* "uvloop/loop.pyx":1495
  27567. * server_side=False,
  27568. * server_hostname=None,
  27569. * ssl_handshake_timeout=None, # <<<<<<<<<<<<<<
  27570. * ssl_shutdown_timeout=None):
  27571. * """Upgrade transport to TLS.
  27572. */
  27573. values[5] = ((PyObject *)Py_None);
  27574. /* "uvloop/loop.pyx":1496
  27575. * server_hostname=None,
  27576. * ssl_handshake_timeout=None,
  27577. * ssl_shutdown_timeout=None): # <<<<<<<<<<<<<<
  27578. * """Upgrade transport to TLS.
  27579. *
  27580. */
  27581. values[6] = ((PyObject *)Py_None);
  27582. if (unlikely(__pyx_kwds)) {
  27583. Py_ssize_t kw_args;
  27584. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  27585. switch (pos_args) {
  27586. case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
  27587. CYTHON_FALLTHROUGH;
  27588. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  27589. CYTHON_FALLTHROUGH;
  27590. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  27591. CYTHON_FALLTHROUGH;
  27592. case 0: break;
  27593. default: goto __pyx_L5_argtuple_error;
  27594. }
  27595. kw_args = PyDict_Size(__pyx_kwds);
  27596. switch (pos_args) {
  27597. case 0:
  27598. if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_transport)) != 0)) kw_args--;
  27599. else goto __pyx_L5_argtuple_error;
  27600. CYTHON_FALLTHROUGH;
  27601. case 1:
  27602. if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_protocol)) != 0)) kw_args--;
  27603. else {
  27604. __Pyx_RaiseArgtupleInvalid("start_tls", 1, 3, 3, 1); __PYX_ERR(2, 1492, __pyx_L3_error)
  27605. }
  27606. CYTHON_FALLTHROUGH;
  27607. case 2:
  27608. if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sslcontext)) != 0)) kw_args--;
  27609. else {
  27610. __Pyx_RaiseArgtupleInvalid("start_tls", 1, 3, 3, 2); __PYX_ERR(2, 1492, __pyx_L3_error)
  27611. }
  27612. }
  27613. if (kw_args > 0 && likely(kw_args <= 4)) {
  27614. Py_ssize_t index;
  27615. for (index = 3; index < 7 && kw_args > 0; index++) {
  27616. PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, *__pyx_pyargnames[index]);
  27617. if (value) { values[index] = value; kw_args--; }
  27618. }
  27619. }
  27620. if (unlikely(kw_args > 0)) {
  27621. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "start_tls") < 0)) __PYX_ERR(2, 1492, __pyx_L3_error)
  27622. }
  27623. } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
  27624. goto __pyx_L5_argtuple_error;
  27625. } else {
  27626. values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  27627. values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  27628. values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
  27629. }
  27630. __pyx_v_transport = values[0];
  27631. __pyx_v_protocol = values[1];
  27632. __pyx_v_sslcontext = values[2];
  27633. __pyx_v_server_side = values[3];
  27634. __pyx_v_server_hostname = values[4];
  27635. __pyx_v_ssl_handshake_timeout = values[5];
  27636. __pyx_v_ssl_shutdown_timeout = values[6];
  27637. }
  27638. goto __pyx_L4_argument_unpacking_done;
  27639. __pyx_L5_argtuple_error:;
  27640. __Pyx_RaiseArgtupleInvalid("start_tls", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 1492, __pyx_L3_error)
  27641. __pyx_L3_error:;
  27642. __Pyx_AddTraceback("uvloop.loop.Loop.start_tls", __pyx_clineno, __pyx_lineno, __pyx_filename);
  27643. __Pyx_RefNannyFinishContext();
  27644. return NULL;
  27645. __pyx_L4_argument_unpacking_done:;
  27646. __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_52start_tls(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self), __pyx_v_transport, __pyx_v_protocol, __pyx_v_sslcontext, __pyx_v_server_side, __pyx_v_server_hostname, __pyx_v_ssl_handshake_timeout, __pyx_v_ssl_shutdown_timeout);
  27647. /* "uvloop/loop.pyx":1492
  27648. *
  27649. * @cython.iterable_coroutine
  27650. * async def start_tls(self, transport, protocol, sslcontext, *, # <<<<<<<<<<<<<<
  27651. * server_side=False,
  27652. * server_hostname=None,
  27653. */
  27654. /* function exit code */
  27655. __Pyx_RefNannyFinishContext();
  27656. return __pyx_r;
  27657. }
  27658. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_52start_tls(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_transport, PyObject *__pyx_v_protocol, PyObject *__pyx_v_sslcontext, PyObject *__pyx_v_server_side, PyObject *__pyx_v_server_hostname, PyObject *__pyx_v_ssl_handshake_timeout, PyObject *__pyx_v_ssl_shutdown_timeout) {
  27659. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_7_start_tls *__pyx_cur_scope;
  27660. PyObject *__pyx_r = NULL;
  27661. __Pyx_RefNannyDeclarations
  27662. __Pyx_RefNannySetupContext("start_tls", 0);
  27663. __pyx_cur_scope = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_7_start_tls *)__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_7_start_tls(__pyx_ptype_6uvloop_4loop___pyx_scope_struct_7_start_tls, __pyx_empty_tuple, NULL);
  27664. if (unlikely(!__pyx_cur_scope)) {
  27665. __pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_7_start_tls *)Py_None);
  27666. __Pyx_INCREF(Py_None);
  27667. __PYX_ERR(2, 1492, __pyx_L1_error)
  27668. } else {
  27669. __Pyx_GOTREF(__pyx_cur_scope);
  27670. }
  27671. __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  27672. __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  27673. __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  27674. __pyx_cur_scope->__pyx_v_transport = __pyx_v_transport;
  27675. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_transport);
  27676. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_transport);
  27677. __pyx_cur_scope->__pyx_v_protocol = __pyx_v_protocol;
  27678. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_protocol);
  27679. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_protocol);
  27680. __pyx_cur_scope->__pyx_v_sslcontext = __pyx_v_sslcontext;
  27681. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_sslcontext);
  27682. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_sslcontext);
  27683. __pyx_cur_scope->__pyx_v_server_side = __pyx_v_server_side;
  27684. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_server_side);
  27685. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_server_side);
  27686. __pyx_cur_scope->__pyx_v_server_hostname = __pyx_v_server_hostname;
  27687. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_server_hostname);
  27688. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_server_hostname);
  27689. __pyx_cur_scope->__pyx_v_ssl_handshake_timeout = __pyx_v_ssl_handshake_timeout;
  27690. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_ssl_handshake_timeout);
  27691. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_ssl_handshake_timeout);
  27692. __pyx_cur_scope->__pyx_v_ssl_shutdown_timeout = __pyx_v_ssl_shutdown_timeout;
  27693. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_ssl_shutdown_timeout);
  27694. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_ssl_shutdown_timeout);
  27695. {
  27696. __pyx_CoroutineObject *gen = __Pyx_IterableCoroutine_New((__pyx_coroutine_body_t) __pyx_gb_6uvloop_4loop_4Loop_54generator2, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_start_tls, __pyx_n_s_Loop_start_tls, __pyx_n_s_uvloop_loop); if (unlikely(!gen)) __PYX_ERR(2, 1492, __pyx_L1_error)
  27697. __Pyx_DECREF(__pyx_cur_scope);
  27698. __Pyx_RefNannyFinishContext();
  27699. return (PyObject *) gen;
  27700. }
  27701. /* function exit code */
  27702. __pyx_L1_error:;
  27703. __Pyx_AddTraceback("uvloop.loop.Loop.start_tls", __pyx_clineno, __pyx_lineno, __pyx_filename);
  27704. __pyx_r = NULL;
  27705. __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  27706. __Pyx_XGIVEREF(__pyx_r);
  27707. __Pyx_RefNannyFinishContext();
  27708. return __pyx_r;
  27709. }
  27710. static PyObject *__pyx_gb_6uvloop_4loop_4Loop_54generator2(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
  27711. {
  27712. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_7_start_tls *__pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_7_start_tls *)__pyx_generator->closure);
  27713. PyObject *__pyx_r = NULL;
  27714. PyObject *__pyx_t_1 = NULL;
  27715. int __pyx_t_2;
  27716. int __pyx_t_3;
  27717. PyObject *__pyx_t_4 = NULL;
  27718. int __pyx_t_5;
  27719. Py_ssize_t __pyx_t_6;
  27720. Py_UCS4 __pyx_t_7;
  27721. PyObject *__pyx_t_8 = NULL;
  27722. PyObject *__pyx_t_9 = NULL;
  27723. int __pyx_t_10;
  27724. PyObject *__pyx_t_11 = NULL;
  27725. PyObject *__pyx_t_12 = NULL;
  27726. PyObject *__pyx_t_13 = NULL;
  27727. PyObject *__pyx_t_14 = NULL;
  27728. PyObject *__pyx_t_15 = NULL;
  27729. __Pyx_RefNannyDeclarations
  27730. __Pyx_RefNannySetupContext("start_tls", 0);
  27731. switch (__pyx_generator->resume_label) {
  27732. case 0: goto __pyx_L3_first_run;
  27733. case 1: goto __pyx_L15_resume_from_await;
  27734. default: /* CPython raises the right error here */
  27735. __Pyx_RefNannyFinishContext();
  27736. return NULL;
  27737. }
  27738. __pyx_L3_first_run:;
  27739. if (unlikely(!__pyx_sent_value)) __PYX_ERR(2, 1492, __pyx_L1_error)
  27740. /* "uvloop/loop.pyx":1502
  27741. * immediately.
  27742. * """
  27743. * if not isinstance(sslcontext, ssl_SSLContext): # <<<<<<<<<<<<<<
  27744. * raise TypeError(
  27745. * f'sslcontext is expected to be an instance of ssl.SSLContext, '
  27746. */
  27747. __pyx_t_1 = __pyx_v_6uvloop_4loop_ssl_SSLContext;
  27748. __Pyx_INCREF(__pyx_t_1);
  27749. __pyx_t_2 = PyObject_IsInstance(__pyx_cur_scope->__pyx_v_sslcontext, __pyx_t_1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(2, 1502, __pyx_L1_error)
  27750. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  27751. __pyx_t_3 = ((!(__pyx_t_2 != 0)) != 0);
  27752. if (unlikely(__pyx_t_3)) {
  27753. /* "uvloop/loop.pyx":1505
  27754. * raise TypeError(
  27755. * f'sslcontext is expected to be an instance of ssl.SSLContext, '
  27756. * f'got {sslcontext!r}') # <<<<<<<<<<<<<<
  27757. *
  27758. * if not isinstance(transport, (TCPTransport, UnixTransport,
  27759. */
  27760. __pyx_t_1 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_cur_scope->__pyx_v_sslcontext), __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1505, __pyx_L1_error)
  27761. __Pyx_GOTREF(__pyx_t_1);
  27762. /* "uvloop/loop.pyx":1504
  27763. * if not isinstance(sslcontext, ssl_SSLContext):
  27764. * raise TypeError(
  27765. * f'sslcontext is expected to be an instance of ssl.SSLContext, ' # <<<<<<<<<<<<<<
  27766. * f'got {sslcontext!r}')
  27767. *
  27768. */
  27769. __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_sslcontext_is_expected_to_be_an, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1504, __pyx_L1_error)
  27770. __Pyx_GOTREF(__pyx_t_4);
  27771. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  27772. /* "uvloop/loop.pyx":1503
  27773. * """
  27774. * if not isinstance(sslcontext, ssl_SSLContext):
  27775. * raise TypeError( # <<<<<<<<<<<<<<
  27776. * f'sslcontext is expected to be an instance of ssl.SSLContext, '
  27777. * f'got {sslcontext!r}')
  27778. */
  27779. __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1503, __pyx_L1_error)
  27780. __Pyx_GOTREF(__pyx_t_1);
  27781. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  27782. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  27783. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  27784. __PYX_ERR(2, 1503, __pyx_L1_error)
  27785. /* "uvloop/loop.pyx":1502
  27786. * immediately.
  27787. * """
  27788. * if not isinstance(sslcontext, ssl_SSLContext): # <<<<<<<<<<<<<<
  27789. * raise TypeError(
  27790. * f'sslcontext is expected to be an instance of ssl.SSLContext, '
  27791. */
  27792. }
  27793. /* "uvloop/loop.pyx":1507
  27794. * f'got {sslcontext!r}')
  27795. *
  27796. * if not isinstance(transport, (TCPTransport, UnixTransport, # <<<<<<<<<<<<<<
  27797. * _SSLProtocolTransport)):
  27798. * raise TypeError(
  27799. */
  27800. __pyx_t_2 = __Pyx_TypeCheck(__pyx_cur_scope->__pyx_v_transport, __pyx_ptype_6uvloop_4loop_TCPTransport);
  27801. __pyx_t_5 = (__pyx_t_2 != 0);
  27802. if (!__pyx_t_5) {
  27803. } else {
  27804. __pyx_t_3 = __pyx_t_5;
  27805. goto __pyx_L6_bool_binop_done;
  27806. }
  27807. __pyx_t_5 = __Pyx_TypeCheck(__pyx_cur_scope->__pyx_v_transport, __pyx_ptype_6uvloop_4loop_UnixTransport);
  27808. __pyx_t_2 = (__pyx_t_5 != 0);
  27809. if (!__pyx_t_2) {
  27810. } else {
  27811. __pyx_t_3 = __pyx_t_2;
  27812. goto __pyx_L6_bool_binop_done;
  27813. }
  27814. /* "uvloop/loop.pyx":1508
  27815. *
  27816. * if not isinstance(transport, (TCPTransport, UnixTransport,
  27817. * _SSLProtocolTransport)): # <<<<<<<<<<<<<<
  27818. * raise TypeError(
  27819. * f'transport {transport!r} is not supported by start_tls()')
  27820. */
  27821. __pyx_t_2 = __Pyx_TypeCheck(__pyx_cur_scope->__pyx_v_transport, __pyx_ptype_6uvloop_4loop__SSLProtocolTransport);
  27822. __pyx_t_5 = (__pyx_t_2 != 0);
  27823. __pyx_t_3 = __pyx_t_5;
  27824. __pyx_L6_bool_binop_done:;
  27825. /* "uvloop/loop.pyx":1507
  27826. * f'got {sslcontext!r}')
  27827. *
  27828. * if not isinstance(transport, (TCPTransport, UnixTransport, # <<<<<<<<<<<<<<
  27829. * _SSLProtocolTransport)):
  27830. * raise TypeError(
  27831. */
  27832. __pyx_t_5 = ((!(__pyx_t_3 != 0)) != 0);
  27833. if (unlikely(__pyx_t_5)) {
  27834. /* "uvloop/loop.pyx":1510
  27835. * _SSLProtocolTransport)):
  27836. * raise TypeError(
  27837. * f'transport {transport!r} is not supported by start_tls()') # <<<<<<<<<<<<<<
  27838. *
  27839. * waiter = self._new_future()
  27840. */
  27841. __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1510, __pyx_L1_error)
  27842. __Pyx_GOTREF(__pyx_t_1);
  27843. __pyx_t_6 = 0;
  27844. __pyx_t_7 = 127;
  27845. __Pyx_INCREF(__pyx_kp_u_transport_2);
  27846. __pyx_t_6 += 10;
  27847. __Pyx_GIVEREF(__pyx_kp_u_transport_2);
  27848. PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_transport_2);
  27849. __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_cur_scope->__pyx_v_transport), __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1510, __pyx_L1_error)
  27850. __Pyx_GOTREF(__pyx_t_4);
  27851. __pyx_t_7 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_7) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_7;
  27852. __pyx_t_6 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
  27853. __Pyx_GIVEREF(__pyx_t_4);
  27854. PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_4);
  27855. __pyx_t_4 = 0;
  27856. __Pyx_INCREF(__pyx_kp_u_is_not_supported_by_start_tls);
  27857. __pyx_t_6 += 32;
  27858. __Pyx_GIVEREF(__pyx_kp_u_is_not_supported_by_start_tls);
  27859. PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u_is_not_supported_by_start_tls);
  27860. __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_1, 3, __pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1510, __pyx_L1_error)
  27861. __Pyx_GOTREF(__pyx_t_4);
  27862. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  27863. /* "uvloop/loop.pyx":1509
  27864. * if not isinstance(transport, (TCPTransport, UnixTransport,
  27865. * _SSLProtocolTransport)):
  27866. * raise TypeError( # <<<<<<<<<<<<<<
  27867. * f'transport {transport!r} is not supported by start_tls()')
  27868. *
  27869. */
  27870. __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1509, __pyx_L1_error)
  27871. __Pyx_GOTREF(__pyx_t_1);
  27872. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  27873. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  27874. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  27875. __PYX_ERR(2, 1509, __pyx_L1_error)
  27876. /* "uvloop/loop.pyx":1507
  27877. * f'got {sslcontext!r}')
  27878. *
  27879. * if not isinstance(transport, (TCPTransport, UnixTransport, # <<<<<<<<<<<<<<
  27880. * _SSLProtocolTransport)):
  27881. * raise TypeError(
  27882. */
  27883. }
  27884. /* "uvloop/loop.pyx":1512
  27885. * f'transport {transport!r} is not supported by start_tls()')
  27886. *
  27887. * waiter = self._new_future() # <<<<<<<<<<<<<<
  27888. * ssl_protocol = SSLProtocol(
  27889. * self, protocol, sslcontext, waiter,
  27890. */
  27891. __pyx_t_1 = __pyx_f_6uvloop_4loop_4Loop__new_future(__pyx_cur_scope->__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1512, __pyx_L1_error)
  27892. __Pyx_GOTREF(__pyx_t_1);
  27893. __Pyx_GIVEREF(__pyx_t_1);
  27894. __pyx_cur_scope->__pyx_v_waiter = __pyx_t_1;
  27895. __pyx_t_1 = 0;
  27896. /* "uvloop/loop.pyx":1513
  27897. *
  27898. * waiter = self._new_future()
  27899. * ssl_protocol = SSLProtocol( # <<<<<<<<<<<<<<
  27900. * self, protocol, sslcontext, waiter,
  27901. * server_side, server_hostname,
  27902. */
  27903. __pyx_t_1 = PyTuple_New(6); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1513, __pyx_L1_error)
  27904. __Pyx_GOTREF(__pyx_t_1);
  27905. __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_self));
  27906. __Pyx_GIVEREF(((PyObject *)__pyx_cur_scope->__pyx_v_self));
  27907. PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_cur_scope->__pyx_v_self));
  27908. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_protocol);
  27909. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_protocol);
  27910. PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_cur_scope->__pyx_v_protocol);
  27911. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_sslcontext);
  27912. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_sslcontext);
  27913. PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_cur_scope->__pyx_v_sslcontext);
  27914. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_waiter);
  27915. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_waiter);
  27916. PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_cur_scope->__pyx_v_waiter);
  27917. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_server_side);
  27918. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_server_side);
  27919. PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_cur_scope->__pyx_v_server_side);
  27920. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_server_hostname);
  27921. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_server_hostname);
  27922. PyTuple_SET_ITEM(__pyx_t_1, 5, __pyx_cur_scope->__pyx_v_server_hostname);
  27923. /* "uvloop/loop.pyx":1516
  27924. * self, protocol, sslcontext, waiter,
  27925. * server_side, server_hostname,
  27926. * ssl_handshake_timeout=ssl_handshake_timeout, # <<<<<<<<<<<<<<
  27927. * ssl_shutdown_timeout=ssl_shutdown_timeout,
  27928. * call_connection_made=False)
  27929. */
  27930. __pyx_t_4 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1516, __pyx_L1_error)
  27931. __Pyx_GOTREF(__pyx_t_4);
  27932. if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_ssl_handshake_timeout, __pyx_cur_scope->__pyx_v_ssl_handshake_timeout) < 0) __PYX_ERR(2, 1516, __pyx_L1_error)
  27933. /* "uvloop/loop.pyx":1517
  27934. * server_side, server_hostname,
  27935. * ssl_handshake_timeout=ssl_handshake_timeout,
  27936. * ssl_shutdown_timeout=ssl_shutdown_timeout, # <<<<<<<<<<<<<<
  27937. * call_connection_made=False)
  27938. *
  27939. */
  27940. if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_ssl_shutdown_timeout, __pyx_cur_scope->__pyx_v_ssl_shutdown_timeout) < 0) __PYX_ERR(2, 1516, __pyx_L1_error)
  27941. /* "uvloop/loop.pyx":1518
  27942. * ssl_handshake_timeout=ssl_handshake_timeout,
  27943. * ssl_shutdown_timeout=ssl_shutdown_timeout,
  27944. * call_connection_made=False) # <<<<<<<<<<<<<<
  27945. *
  27946. * # Pause early so that "ssl_protocol.data_received()" doesn't
  27947. */
  27948. if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_call_connection_made, Py_False) < 0) __PYX_ERR(2, 1516, __pyx_L1_error)
  27949. /* "uvloop/loop.pyx":1513
  27950. *
  27951. * waiter = self._new_future()
  27952. * ssl_protocol = SSLProtocol( # <<<<<<<<<<<<<<
  27953. * self, protocol, sslcontext, waiter,
  27954. * server_side, server_hostname,
  27955. */
  27956. __pyx_t_8 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6uvloop_4loop_SSLProtocol), __pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1513, __pyx_L1_error)
  27957. __Pyx_GOTREF(__pyx_t_8);
  27958. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  27959. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  27960. __Pyx_GIVEREF(__pyx_t_8);
  27961. __pyx_cur_scope->__pyx_v_ssl_protocol = ((struct __pyx_obj_6uvloop_4loop_SSLProtocol *)__pyx_t_8);
  27962. __pyx_t_8 = 0;
  27963. /* "uvloop/loop.pyx":1522
  27964. * # Pause early so that "ssl_protocol.data_received()" doesn't
  27965. * # have a chance to get called before "ssl_protocol.connection_made()".
  27966. * transport.pause_reading() # <<<<<<<<<<<<<<
  27967. *
  27968. * transport.set_protocol(ssl_protocol)
  27969. */
  27970. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_transport, __pyx_n_s_pause_reading); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1522, __pyx_L1_error)
  27971. __Pyx_GOTREF(__pyx_t_4);
  27972. __pyx_t_1 = NULL;
  27973. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
  27974. __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4);
  27975. if (likely(__pyx_t_1)) {
  27976. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  27977. __Pyx_INCREF(__pyx_t_1);
  27978. __Pyx_INCREF(function);
  27979. __Pyx_DECREF_SET(__pyx_t_4, function);
  27980. }
  27981. }
  27982. __pyx_t_8 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
  27983. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  27984. if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1522, __pyx_L1_error)
  27985. __Pyx_GOTREF(__pyx_t_8);
  27986. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  27987. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  27988. /* "uvloop/loop.pyx":1524
  27989. * transport.pause_reading()
  27990. *
  27991. * transport.set_protocol(ssl_protocol) # <<<<<<<<<<<<<<
  27992. * conmade_cb = self.call_soon(ssl_protocol.connection_made, transport)
  27993. * resume_cb = self.call_soon(transport.resume_reading)
  27994. */
  27995. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_transport, __pyx_n_s_set_protocol); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1524, __pyx_L1_error)
  27996. __Pyx_GOTREF(__pyx_t_4);
  27997. __pyx_t_1 = NULL;
  27998. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
  27999. __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4);
  28000. if (likely(__pyx_t_1)) {
  28001. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  28002. __Pyx_INCREF(__pyx_t_1);
  28003. __Pyx_INCREF(function);
  28004. __Pyx_DECREF_SET(__pyx_t_4, function);
  28005. }
  28006. }
  28007. __pyx_t_8 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_1, ((PyObject *)__pyx_cur_scope->__pyx_v_ssl_protocol)) : __Pyx_PyObject_CallOneArg(__pyx_t_4, ((PyObject *)__pyx_cur_scope->__pyx_v_ssl_protocol));
  28008. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  28009. if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1524, __pyx_L1_error)
  28010. __Pyx_GOTREF(__pyx_t_8);
  28011. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  28012. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  28013. /* "uvloop/loop.pyx":1525
  28014. *
  28015. * transport.set_protocol(ssl_protocol)
  28016. * conmade_cb = self.call_soon(ssl_protocol.connection_made, transport) # <<<<<<<<<<<<<<
  28017. * resume_cb = self.call_soon(transport.resume_reading)
  28018. * app_transport = ssl_protocol._get_app_transport()
  28019. */
  28020. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_call_soon); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1525, __pyx_L1_error)
  28021. __Pyx_GOTREF(__pyx_t_4);
  28022. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_ssl_protocol), __pyx_n_s_connection_made); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1525, __pyx_L1_error)
  28023. __Pyx_GOTREF(__pyx_t_1);
  28024. __pyx_t_9 = NULL;
  28025. __pyx_t_10 = 0;
  28026. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
  28027. __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_4);
  28028. if (likely(__pyx_t_9)) {
  28029. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  28030. __Pyx_INCREF(__pyx_t_9);
  28031. __Pyx_INCREF(function);
  28032. __Pyx_DECREF_SET(__pyx_t_4, function);
  28033. __pyx_t_10 = 1;
  28034. }
  28035. }
  28036. #if CYTHON_FAST_PYCALL
  28037. if (PyFunction_Check(__pyx_t_4)) {
  28038. PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_t_1, __pyx_cur_scope->__pyx_v_transport};
  28039. __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1525, __pyx_L1_error)
  28040. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  28041. __Pyx_GOTREF(__pyx_t_8);
  28042. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  28043. } else
  28044. #endif
  28045. #if CYTHON_FAST_PYCCALL
  28046. if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
  28047. PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_t_1, __pyx_cur_scope->__pyx_v_transport};
  28048. __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1525, __pyx_L1_error)
  28049. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  28050. __Pyx_GOTREF(__pyx_t_8);
  28051. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  28052. } else
  28053. #endif
  28054. {
  28055. __pyx_t_11 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 1525, __pyx_L1_error)
  28056. __Pyx_GOTREF(__pyx_t_11);
  28057. if (__pyx_t_9) {
  28058. __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); __pyx_t_9 = NULL;
  28059. }
  28060. __Pyx_GIVEREF(__pyx_t_1);
  28061. PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_10, __pyx_t_1);
  28062. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_transport);
  28063. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_transport);
  28064. PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_10, __pyx_cur_scope->__pyx_v_transport);
  28065. __pyx_t_1 = 0;
  28066. __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_11, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1525, __pyx_L1_error)
  28067. __Pyx_GOTREF(__pyx_t_8);
  28068. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  28069. }
  28070. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  28071. __Pyx_GIVEREF(__pyx_t_8);
  28072. __pyx_cur_scope->__pyx_v_conmade_cb = __pyx_t_8;
  28073. __pyx_t_8 = 0;
  28074. /* "uvloop/loop.pyx":1526
  28075. * transport.set_protocol(ssl_protocol)
  28076. * conmade_cb = self.call_soon(ssl_protocol.connection_made, transport)
  28077. * resume_cb = self.call_soon(transport.resume_reading) # <<<<<<<<<<<<<<
  28078. * app_transport = ssl_protocol._get_app_transport()
  28079. *
  28080. */
  28081. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_call_soon); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1526, __pyx_L1_error)
  28082. __Pyx_GOTREF(__pyx_t_4);
  28083. __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_transport, __pyx_n_s_resume_reading); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 1526, __pyx_L1_error)
  28084. __Pyx_GOTREF(__pyx_t_11);
  28085. __pyx_t_1 = NULL;
  28086. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
  28087. __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4);
  28088. if (likely(__pyx_t_1)) {
  28089. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  28090. __Pyx_INCREF(__pyx_t_1);
  28091. __Pyx_INCREF(function);
  28092. __Pyx_DECREF_SET(__pyx_t_4, function);
  28093. }
  28094. }
  28095. __pyx_t_8 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_1, __pyx_t_11) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_11);
  28096. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  28097. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  28098. if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1526, __pyx_L1_error)
  28099. __Pyx_GOTREF(__pyx_t_8);
  28100. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  28101. __Pyx_GIVEREF(__pyx_t_8);
  28102. __pyx_cur_scope->__pyx_v_resume_cb = __pyx_t_8;
  28103. __pyx_t_8 = 0;
  28104. /* "uvloop/loop.pyx":1527
  28105. * conmade_cb = self.call_soon(ssl_protocol.connection_made, transport)
  28106. * resume_cb = self.call_soon(transport.resume_reading)
  28107. * app_transport = ssl_protocol._get_app_transport() # <<<<<<<<<<<<<<
  28108. *
  28109. * try:
  28110. */
  28111. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_ssl_protocol), __pyx_n_s_get_app_transport); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1527, __pyx_L1_error)
  28112. __Pyx_GOTREF(__pyx_t_4);
  28113. __pyx_t_11 = NULL;
  28114. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
  28115. __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_4);
  28116. if (likely(__pyx_t_11)) {
  28117. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  28118. __Pyx_INCREF(__pyx_t_11);
  28119. __Pyx_INCREF(function);
  28120. __Pyx_DECREF_SET(__pyx_t_4, function);
  28121. }
  28122. }
  28123. __pyx_t_8 = (__pyx_t_11) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_11) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
  28124. __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
  28125. if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1527, __pyx_L1_error)
  28126. __Pyx_GOTREF(__pyx_t_8);
  28127. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  28128. __Pyx_GIVEREF(__pyx_t_8);
  28129. __pyx_cur_scope->__pyx_v_app_transport = __pyx_t_8;
  28130. __pyx_t_8 = 0;
  28131. /* "uvloop/loop.pyx":1529
  28132. * app_transport = ssl_protocol._get_app_transport()
  28133. *
  28134. * try: # <<<<<<<<<<<<<<
  28135. * await waiter
  28136. * except Exception:
  28137. */
  28138. {
  28139. __Pyx_ExceptionSave(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
  28140. __Pyx_XGOTREF(__pyx_t_12);
  28141. __Pyx_XGOTREF(__pyx_t_13);
  28142. __Pyx_XGOTREF(__pyx_t_14);
  28143. /*try:*/ {
  28144. /* "uvloop/loop.pyx":1530
  28145. *
  28146. * try:
  28147. * await waiter # <<<<<<<<<<<<<<
  28148. * except Exception:
  28149. * app_transport.close()
  28150. */
  28151. __pyx_r = __Pyx_Coroutine_Yield_From(__pyx_generator, __pyx_cur_scope->__pyx_v_waiter);
  28152. __Pyx_XGOTREF(__pyx_r);
  28153. if (likely(__pyx_r)) {
  28154. __Pyx_XGIVEREF(__pyx_t_12);
  28155. __pyx_cur_scope->__pyx_t_0 = __pyx_t_12;
  28156. __Pyx_XGIVEREF(__pyx_t_13);
  28157. __pyx_cur_scope->__pyx_t_1 = __pyx_t_13;
  28158. __Pyx_XGIVEREF(__pyx_t_14);
  28159. __pyx_cur_scope->__pyx_t_2 = __pyx_t_14;
  28160. __Pyx_XGIVEREF(__pyx_r);
  28161. __Pyx_RefNannyFinishContext();
  28162. __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  28163. /* return from generator, awaiting value */
  28164. __pyx_generator->resume_label = 1;
  28165. return __pyx_r;
  28166. __pyx_L15_resume_from_await:;
  28167. __pyx_t_12 = __pyx_cur_scope->__pyx_t_0;
  28168. __pyx_cur_scope->__pyx_t_0 = 0;
  28169. __Pyx_XGOTREF(__pyx_t_12);
  28170. __pyx_t_13 = __pyx_cur_scope->__pyx_t_1;
  28171. __pyx_cur_scope->__pyx_t_1 = 0;
  28172. __Pyx_XGOTREF(__pyx_t_13);
  28173. __pyx_t_14 = __pyx_cur_scope->__pyx_t_2;
  28174. __pyx_cur_scope->__pyx_t_2 = 0;
  28175. __Pyx_XGOTREF(__pyx_t_14);
  28176. if (unlikely(!__pyx_sent_value)) __PYX_ERR(2, 1530, __pyx_L9_error)
  28177. } else {
  28178. PyObject* exc_type = __Pyx_PyErr_Occurred();
  28179. if (exc_type) {
  28180. if (likely(exc_type == PyExc_StopIteration || (exc_type != PyExc_GeneratorExit && __Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)))) PyErr_Clear();
  28181. else __PYX_ERR(2, 1530, __pyx_L9_error)
  28182. }
  28183. }
  28184. /* "uvloop/loop.pyx":1529
  28185. * app_transport = ssl_protocol._get_app_transport()
  28186. *
  28187. * try: # <<<<<<<<<<<<<<
  28188. * await waiter
  28189. * except Exception:
  28190. */
  28191. }
  28192. __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
  28193. __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
  28194. __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
  28195. goto __pyx_L14_try_end;
  28196. __pyx_L9_error:;
  28197. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  28198. __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
  28199. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  28200. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  28201. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  28202. /* "uvloop/loop.pyx":1531
  28203. * try:
  28204. * await waiter
  28205. * except Exception: # <<<<<<<<<<<<<<
  28206. * app_transport.close()
  28207. * conmade_cb.cancel()
  28208. */
  28209. __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
  28210. if (__pyx_t_10) {
  28211. __Pyx_AddTraceback("uvloop.loop.Loop.start_tls", __pyx_clineno, __pyx_lineno, __pyx_filename);
  28212. if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_4, &__pyx_t_11) < 0) __PYX_ERR(2, 1531, __pyx_L11_except_error)
  28213. __Pyx_GOTREF(__pyx_t_8);
  28214. __Pyx_GOTREF(__pyx_t_4);
  28215. __Pyx_GOTREF(__pyx_t_11);
  28216. /* "uvloop/loop.pyx":1532
  28217. * await waiter
  28218. * except Exception:
  28219. * app_transport.close() # <<<<<<<<<<<<<<
  28220. * conmade_cb.cancel()
  28221. * resume_cb.cancel()
  28222. */
  28223. __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_app_transport, __pyx_n_s_close); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 1532, __pyx_L11_except_error)
  28224. __Pyx_GOTREF(__pyx_t_9);
  28225. __pyx_t_15 = NULL;
  28226. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
  28227. __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_9);
  28228. if (likely(__pyx_t_15)) {
  28229. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
  28230. __Pyx_INCREF(__pyx_t_15);
  28231. __Pyx_INCREF(function);
  28232. __Pyx_DECREF_SET(__pyx_t_9, function);
  28233. }
  28234. }
  28235. __pyx_t_1 = (__pyx_t_15) ? __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_15) : __Pyx_PyObject_CallNoArg(__pyx_t_9);
  28236. __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
  28237. if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1532, __pyx_L11_except_error)
  28238. __Pyx_GOTREF(__pyx_t_1);
  28239. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  28240. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  28241. /* "uvloop/loop.pyx":1533
  28242. * except Exception:
  28243. * app_transport.close()
  28244. * conmade_cb.cancel() # <<<<<<<<<<<<<<
  28245. * resume_cb.cancel()
  28246. * raise
  28247. */
  28248. __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_conmade_cb, __pyx_n_s_cancel); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 1533, __pyx_L11_except_error)
  28249. __Pyx_GOTREF(__pyx_t_9);
  28250. __pyx_t_15 = NULL;
  28251. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
  28252. __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_9);
  28253. if (likely(__pyx_t_15)) {
  28254. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
  28255. __Pyx_INCREF(__pyx_t_15);
  28256. __Pyx_INCREF(function);
  28257. __Pyx_DECREF_SET(__pyx_t_9, function);
  28258. }
  28259. }
  28260. __pyx_t_1 = (__pyx_t_15) ? __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_15) : __Pyx_PyObject_CallNoArg(__pyx_t_9);
  28261. __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
  28262. if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1533, __pyx_L11_except_error)
  28263. __Pyx_GOTREF(__pyx_t_1);
  28264. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  28265. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  28266. /* "uvloop/loop.pyx":1534
  28267. * app_transport.close()
  28268. * conmade_cb.cancel()
  28269. * resume_cb.cancel() # <<<<<<<<<<<<<<
  28270. * raise
  28271. *
  28272. */
  28273. __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_resume_cb, __pyx_n_s_cancel); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 1534, __pyx_L11_except_error)
  28274. __Pyx_GOTREF(__pyx_t_9);
  28275. __pyx_t_15 = NULL;
  28276. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
  28277. __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_9);
  28278. if (likely(__pyx_t_15)) {
  28279. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
  28280. __Pyx_INCREF(__pyx_t_15);
  28281. __Pyx_INCREF(function);
  28282. __Pyx_DECREF_SET(__pyx_t_9, function);
  28283. }
  28284. }
  28285. __pyx_t_1 = (__pyx_t_15) ? __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_15) : __Pyx_PyObject_CallNoArg(__pyx_t_9);
  28286. __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
  28287. if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1534, __pyx_L11_except_error)
  28288. __Pyx_GOTREF(__pyx_t_1);
  28289. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  28290. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  28291. /* "uvloop/loop.pyx":1535
  28292. * conmade_cb.cancel()
  28293. * resume_cb.cancel()
  28294. * raise # <<<<<<<<<<<<<<
  28295. *
  28296. * return app_transport
  28297. */
  28298. __Pyx_GIVEREF(__pyx_t_8);
  28299. __Pyx_GIVEREF(__pyx_t_4);
  28300. __Pyx_XGIVEREF(__pyx_t_11);
  28301. __Pyx_ErrRestoreWithState(__pyx_t_8, __pyx_t_4, __pyx_t_11);
  28302. __pyx_t_8 = 0; __pyx_t_4 = 0; __pyx_t_11 = 0;
  28303. __PYX_ERR(2, 1535, __pyx_L11_except_error)
  28304. }
  28305. goto __pyx_L11_except_error;
  28306. __pyx_L11_except_error:;
  28307. /* "uvloop/loop.pyx":1529
  28308. * app_transport = ssl_protocol._get_app_transport()
  28309. *
  28310. * try: # <<<<<<<<<<<<<<
  28311. * await waiter
  28312. * except Exception:
  28313. */
  28314. __Pyx_XGIVEREF(__pyx_t_12);
  28315. __Pyx_XGIVEREF(__pyx_t_13);
  28316. __Pyx_XGIVEREF(__pyx_t_14);
  28317. __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
  28318. goto __pyx_L1_error;
  28319. __pyx_L14_try_end:;
  28320. }
  28321. /* "uvloop/loop.pyx":1537
  28322. * raise
  28323. *
  28324. * return app_transport # <<<<<<<<<<<<<<
  28325. *
  28326. * @cython.iterable_coroutine
  28327. */
  28328. __Pyx_XDECREF(__pyx_r);
  28329. __pyx_r = NULL; __Pyx_ReturnWithStopIteration(__pyx_cur_scope->__pyx_v_app_transport);
  28330. goto __pyx_L0;
  28331. CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
  28332. /* "uvloop/loop.pyx":1492
  28333. *
  28334. * @cython.iterable_coroutine
  28335. * async def start_tls(self, transport, protocol, sslcontext, *, # <<<<<<<<<<<<<<
  28336. * server_side=False,
  28337. * server_hostname=None,
  28338. */
  28339. /* function exit code */
  28340. __pyx_L1_error:;
  28341. __Pyx_XDECREF(__pyx_t_1);
  28342. __Pyx_XDECREF(__pyx_t_4);
  28343. __Pyx_XDECREF(__pyx_t_8);
  28344. __Pyx_XDECREF(__pyx_t_9);
  28345. __Pyx_XDECREF(__pyx_t_11);
  28346. __Pyx_XDECREF(__pyx_t_15);
  28347. __Pyx_AddTraceback("start_tls", __pyx_clineno, __pyx_lineno, __pyx_filename);
  28348. __pyx_L0:;
  28349. __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  28350. #if !CYTHON_USE_EXC_INFO_STACK
  28351. __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  28352. #endif
  28353. __pyx_generator->resume_label = -1;
  28354. __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  28355. __Pyx_RefNannyFinishContext();
  28356. return __pyx_r;
  28357. }
  28358. static PyObject *__pyx_gb_6uvloop_4loop_4Loop_57generator3(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
  28359. /* "uvloop/loop.pyx":1540
  28360. *
  28361. * @cython.iterable_coroutine
  28362. * async def create_server(self, protocol_factory, host=None, port=None, # <<<<<<<<<<<<<<
  28363. * *,
  28364. * int family=uv.AF_UNSPEC,
  28365. */
  28366. /* Python wrapper */
  28367. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_56create_server(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  28368. static char __pyx_doc_6uvloop_4loop_4Loop_55create_server[] = "Loop.create_server(self, protocol_factory, host=None, port=None, *, int family=uv.AF_UNSPEC, int flags=uv.AI_PASSIVE, sock=None, backlog=100, ssl=None, reuse_address=None, reuse_port=None, ssl_handshake_timeout=None, ssl_shutdown_timeout=None, start_serving=True)\nA coroutine which creates a TCP server bound to host and port.\n\n The return value is a Server object which can be used to stop\n the service.\n\n If host is an empty string or None all interfaces are assumed\n and a list of multiple sockets will be returned (most likely\n one for IPv4 and another one for IPv6). The host parameter can also be\n a sequence (e.g. list) of hosts to bind to.\n\n family can be set to either AF_INET or AF_INET6 to force the\n socket to use IPv4 or IPv6. If not set it will be determined\n from host (defaults to AF_UNSPEC).\n\n flags is a bitmask for getaddrinfo().\n\n sock can optionally be specified in order to use a preexisting\n socket object.\n\n backlog is the maximum number of queued connections passed to\n listen() (defaults to 100).\n\n ssl can be set to an SSLContext to enable SSL over the\n accepted connections.\n\n reuse_address tells the kernel to reuse a local socket in\n TIME_WAIT state, without waiting for its natural timeout to\n expire. If not specified will automatically be set to True on\n UNIX.\n\n reuse_port tells the kernel to allow this endpoint to be bound to\n the same port as other existing endpoints are bound to, so long as\n they all set this flag when being created. This option is not\n supported on Windows.\n\n ssl_handshake_timeout is the time in seconds that an SSL server\n will wait for completion of the SSL handshake before aborting the\n connection. Default is 60s.\n\n ssl_shutdown_timeout is the time in seconds that an SSL server\n will wait fo""r completion of the SSL shutdown before aborting the\n connection. Default is 30s.\n ";
  28369. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_56create_server(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  28370. PyObject *__pyx_v_protocol_factory = 0;
  28371. PyObject *__pyx_v_host = 0;
  28372. PyObject *__pyx_v_port = 0;
  28373. int __pyx_v_family;
  28374. int __pyx_v_flags;
  28375. PyObject *__pyx_v_sock = 0;
  28376. PyObject *__pyx_v_backlog = 0;
  28377. PyObject *__pyx_v_ssl = 0;
  28378. PyObject *__pyx_v_reuse_address = 0;
  28379. PyObject *__pyx_v_reuse_port = 0;
  28380. PyObject *__pyx_v_ssl_handshake_timeout = 0;
  28381. PyObject *__pyx_v_ssl_shutdown_timeout = 0;
  28382. PyObject *__pyx_v_start_serving = 0;
  28383. PyObject *__pyx_r = 0;
  28384. __Pyx_RefNannyDeclarations
  28385. __Pyx_RefNannySetupContext("create_server (wrapper)", 0);
  28386. {
  28387. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_protocol_factory,&__pyx_n_s_host,&__pyx_n_s_port,&__pyx_n_s_family,&__pyx_n_s_flags,&__pyx_n_s_sock,&__pyx_n_s_backlog,&__pyx_n_s_ssl,&__pyx_n_s_reuse_address,&__pyx_n_s_reuse_port,&__pyx_n_s_ssl_handshake_timeout,&__pyx_n_s_ssl_shutdown_timeout,&__pyx_n_s_start_serving,0};
  28388. PyObject* values[13] = {0,0,0,0,0,0,0,0,0,0,0,0,0};
  28389. values[1] = ((PyObject *)Py_None);
  28390. values[2] = ((PyObject *)Py_None);
  28391. /* "uvloop/loop.pyx":1544
  28392. * int family=uv.AF_UNSPEC,
  28393. * int flags=uv.AI_PASSIVE,
  28394. * sock=None, # <<<<<<<<<<<<<<
  28395. * backlog=100,
  28396. * ssl=None,
  28397. */
  28398. values[5] = ((PyObject *)Py_None);
  28399. values[6] = ((PyObject *)__pyx_int_100);
  28400. /* "uvloop/loop.pyx":1546
  28401. * sock=None,
  28402. * backlog=100,
  28403. * ssl=None, # <<<<<<<<<<<<<<
  28404. * reuse_address=None,
  28405. * reuse_port=None,
  28406. */
  28407. values[7] = ((PyObject *)Py_None);
  28408. /* "uvloop/loop.pyx":1547
  28409. * backlog=100,
  28410. * ssl=None,
  28411. * reuse_address=None, # <<<<<<<<<<<<<<
  28412. * reuse_port=None,
  28413. * ssl_handshake_timeout=None,
  28414. */
  28415. values[8] = ((PyObject *)Py_None);
  28416. /* "uvloop/loop.pyx":1548
  28417. * ssl=None,
  28418. * reuse_address=None,
  28419. * reuse_port=None, # <<<<<<<<<<<<<<
  28420. * ssl_handshake_timeout=None,
  28421. * ssl_shutdown_timeout=None,
  28422. */
  28423. values[9] = ((PyObject *)Py_None);
  28424. /* "uvloop/loop.pyx":1549
  28425. * reuse_address=None,
  28426. * reuse_port=None,
  28427. * ssl_handshake_timeout=None, # <<<<<<<<<<<<<<
  28428. * ssl_shutdown_timeout=None,
  28429. * start_serving=True):
  28430. */
  28431. values[10] = ((PyObject *)Py_None);
  28432. /* "uvloop/loop.pyx":1550
  28433. * reuse_port=None,
  28434. * ssl_handshake_timeout=None,
  28435. * ssl_shutdown_timeout=None, # <<<<<<<<<<<<<<
  28436. * start_serving=True):
  28437. * """A coroutine which creates a TCP server bound to host and port.
  28438. */
  28439. values[11] = ((PyObject *)Py_None);
  28440. /* "uvloop/loop.pyx":1551
  28441. * ssl_handshake_timeout=None,
  28442. * ssl_shutdown_timeout=None,
  28443. * start_serving=True): # <<<<<<<<<<<<<<
  28444. * """A coroutine which creates a TCP server bound to host and port.
  28445. *
  28446. */
  28447. values[12] = ((PyObject *)Py_True);
  28448. if (unlikely(__pyx_kwds)) {
  28449. Py_ssize_t kw_args;
  28450. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  28451. switch (pos_args) {
  28452. case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
  28453. CYTHON_FALLTHROUGH;
  28454. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  28455. CYTHON_FALLTHROUGH;
  28456. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  28457. CYTHON_FALLTHROUGH;
  28458. case 0: break;
  28459. default: goto __pyx_L5_argtuple_error;
  28460. }
  28461. kw_args = PyDict_Size(__pyx_kwds);
  28462. switch (pos_args) {
  28463. case 0:
  28464. if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_protocol_factory)) != 0)) kw_args--;
  28465. else goto __pyx_L5_argtuple_error;
  28466. CYTHON_FALLTHROUGH;
  28467. case 1:
  28468. if (kw_args > 0) {
  28469. PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_host);
  28470. if (value) { values[1] = value; kw_args--; }
  28471. }
  28472. CYTHON_FALLTHROUGH;
  28473. case 2:
  28474. if (kw_args > 0) {
  28475. PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_port);
  28476. if (value) { values[2] = value; kw_args--; }
  28477. }
  28478. }
  28479. if (kw_args > 0 && likely(kw_args <= 10)) {
  28480. Py_ssize_t index;
  28481. for (index = 3; index < 13 && kw_args > 0; index++) {
  28482. PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, *__pyx_pyargnames[index]);
  28483. if (value) { values[index] = value; kw_args--; }
  28484. }
  28485. }
  28486. if (unlikely(kw_args > 0)) {
  28487. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "create_server") < 0)) __PYX_ERR(2, 1540, __pyx_L3_error)
  28488. }
  28489. } else {
  28490. switch (PyTuple_GET_SIZE(__pyx_args)) {
  28491. case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
  28492. CYTHON_FALLTHROUGH;
  28493. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  28494. CYTHON_FALLTHROUGH;
  28495. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  28496. break;
  28497. default: goto __pyx_L5_argtuple_error;
  28498. }
  28499. }
  28500. __pyx_v_protocol_factory = values[0];
  28501. __pyx_v_host = values[1];
  28502. __pyx_v_port = values[2];
  28503. if (values[3]) {
  28504. __pyx_v_family = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_family == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 1542, __pyx_L3_error)
  28505. } else {
  28506. __pyx_v_family = __pyx_k__38;
  28507. }
  28508. if (values[4]) {
  28509. __pyx_v_flags = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_flags == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 1543, __pyx_L3_error)
  28510. } else {
  28511. __pyx_v_flags = __pyx_k__39;
  28512. }
  28513. __pyx_v_sock = values[5];
  28514. __pyx_v_backlog = values[6];
  28515. __pyx_v_ssl = values[7];
  28516. __pyx_v_reuse_address = values[8];
  28517. __pyx_v_reuse_port = values[9];
  28518. __pyx_v_ssl_handshake_timeout = values[10];
  28519. __pyx_v_ssl_shutdown_timeout = values[11];
  28520. __pyx_v_start_serving = values[12];
  28521. }
  28522. goto __pyx_L4_argument_unpacking_done;
  28523. __pyx_L5_argtuple_error:;
  28524. __Pyx_RaiseArgtupleInvalid("create_server", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 1540, __pyx_L3_error)
  28525. __pyx_L3_error:;
  28526. __Pyx_AddTraceback("uvloop.loop.Loop.create_server", __pyx_clineno, __pyx_lineno, __pyx_filename);
  28527. __Pyx_RefNannyFinishContext();
  28528. return NULL;
  28529. __pyx_L4_argument_unpacking_done:;
  28530. __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_55create_server(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self), __pyx_v_protocol_factory, __pyx_v_host, __pyx_v_port, __pyx_v_family, __pyx_v_flags, __pyx_v_sock, __pyx_v_backlog, __pyx_v_ssl, __pyx_v_reuse_address, __pyx_v_reuse_port, __pyx_v_ssl_handshake_timeout, __pyx_v_ssl_shutdown_timeout, __pyx_v_start_serving);
  28531. /* "uvloop/loop.pyx":1540
  28532. *
  28533. * @cython.iterable_coroutine
  28534. * async def create_server(self, protocol_factory, host=None, port=None, # <<<<<<<<<<<<<<
  28535. * *,
  28536. * int family=uv.AF_UNSPEC,
  28537. */
  28538. /* function exit code */
  28539. __Pyx_RefNannyFinishContext();
  28540. return __pyx_r;
  28541. }
  28542. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_55create_server(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_protocol_factory, PyObject *__pyx_v_host, PyObject *__pyx_v_port, int __pyx_v_family, int __pyx_v_flags, PyObject *__pyx_v_sock, PyObject *__pyx_v_backlog, PyObject *__pyx_v_ssl, PyObject *__pyx_v_reuse_address, PyObject *__pyx_v_reuse_port, PyObject *__pyx_v_ssl_handshake_timeout, PyObject *__pyx_v_ssl_shutdown_timeout, PyObject *__pyx_v_start_serving) {
  28543. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_8_create_server *__pyx_cur_scope;
  28544. PyObject *__pyx_r = NULL;
  28545. __Pyx_RefNannyDeclarations
  28546. __Pyx_RefNannySetupContext("create_server", 0);
  28547. __pyx_cur_scope = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_8_create_server *)__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_8_create_server(__pyx_ptype_6uvloop_4loop___pyx_scope_struct_8_create_server, __pyx_empty_tuple, NULL);
  28548. if (unlikely(!__pyx_cur_scope)) {
  28549. __pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_8_create_server *)Py_None);
  28550. __Pyx_INCREF(Py_None);
  28551. __PYX_ERR(2, 1540, __pyx_L1_error)
  28552. } else {
  28553. __Pyx_GOTREF(__pyx_cur_scope);
  28554. }
  28555. __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  28556. __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  28557. __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  28558. __pyx_cur_scope->__pyx_v_protocol_factory = __pyx_v_protocol_factory;
  28559. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_protocol_factory);
  28560. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_protocol_factory);
  28561. __pyx_cur_scope->__pyx_v_host = __pyx_v_host;
  28562. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_host);
  28563. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_host);
  28564. __pyx_cur_scope->__pyx_v_port = __pyx_v_port;
  28565. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_port);
  28566. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_port);
  28567. __pyx_cur_scope->__pyx_v_family = __pyx_v_family;
  28568. __pyx_cur_scope->__pyx_v_flags = __pyx_v_flags;
  28569. __pyx_cur_scope->__pyx_v_sock = __pyx_v_sock;
  28570. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_sock);
  28571. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_sock);
  28572. __pyx_cur_scope->__pyx_v_backlog = __pyx_v_backlog;
  28573. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_backlog);
  28574. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_backlog);
  28575. __pyx_cur_scope->__pyx_v_ssl = __pyx_v_ssl;
  28576. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_ssl);
  28577. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_ssl);
  28578. __pyx_cur_scope->__pyx_v_reuse_address = __pyx_v_reuse_address;
  28579. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_reuse_address);
  28580. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_reuse_address);
  28581. __pyx_cur_scope->__pyx_v_reuse_port = __pyx_v_reuse_port;
  28582. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_reuse_port);
  28583. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_reuse_port);
  28584. __pyx_cur_scope->__pyx_v_ssl_handshake_timeout = __pyx_v_ssl_handshake_timeout;
  28585. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_ssl_handshake_timeout);
  28586. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_ssl_handshake_timeout);
  28587. __pyx_cur_scope->__pyx_v_ssl_shutdown_timeout = __pyx_v_ssl_shutdown_timeout;
  28588. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_ssl_shutdown_timeout);
  28589. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_ssl_shutdown_timeout);
  28590. __pyx_cur_scope->__pyx_v_start_serving = __pyx_v_start_serving;
  28591. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_start_serving);
  28592. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_start_serving);
  28593. {
  28594. __pyx_CoroutineObject *gen = __Pyx_IterableCoroutine_New((__pyx_coroutine_body_t) __pyx_gb_6uvloop_4loop_4Loop_57generator3, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_create_server, __pyx_n_s_Loop_create_server, __pyx_n_s_uvloop_loop); if (unlikely(!gen)) __PYX_ERR(2, 1540, __pyx_L1_error)
  28595. __Pyx_DECREF(__pyx_cur_scope);
  28596. __Pyx_RefNannyFinishContext();
  28597. return (PyObject *) gen;
  28598. }
  28599. /* function exit code */
  28600. __pyx_L1_error:;
  28601. __Pyx_AddTraceback("uvloop.loop.Loop.create_server", __pyx_clineno, __pyx_lineno, __pyx_filename);
  28602. __pyx_r = NULL;
  28603. __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  28604. __Pyx_XGIVEREF(__pyx_r);
  28605. __Pyx_RefNannyFinishContext();
  28606. return __pyx_r;
  28607. }
  28608. static PyObject *__pyx_gb_6uvloop_4loop_4Loop_57generator3(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
  28609. {
  28610. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_8_create_server *__pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_8_create_server *)__pyx_generator->closure);
  28611. PyObject *__pyx_r = NULL;
  28612. int __pyx_t_1;
  28613. int __pyx_t_2;
  28614. int __pyx_t_3;
  28615. PyObject *__pyx_t_4 = NULL;
  28616. PyObject *__pyx_t_5 = NULL;
  28617. PyObject *__pyx_t_6 = NULL;
  28618. PyObject *__pyx_t_7 = NULL;
  28619. Py_ssize_t __pyx_t_8;
  28620. PyObject *(*__pyx_t_9)(PyObject *);
  28621. struct addrinfo *__pyx_t_10;
  28622. PyObject *__pyx_t_11 = NULL;
  28623. PyObject *__pyx_t_12 = NULL;
  28624. PyObject *__pyx_t_13 = NULL;
  28625. PyObject *__pyx_t_14 = NULL;
  28626. PyObject *__pyx_t_15 = NULL;
  28627. PyObject *__pyx_t_16 = NULL;
  28628. int __pyx_t_17;
  28629. PyObject *__pyx_t_18 = NULL;
  28630. PyObject *__pyx_t_19 = NULL;
  28631. Py_ssize_t __pyx_t_20;
  28632. Py_UCS4 __pyx_t_21;
  28633. int __pyx_t_22;
  28634. char const *__pyx_t_23;
  28635. PyObject *__pyx_t_24 = NULL;
  28636. PyObject *__pyx_t_25 = NULL;
  28637. PyObject *__pyx_t_26 = NULL;
  28638. PyObject *__pyx_t_27 = NULL;
  28639. PyObject *__pyx_t_28 = NULL;
  28640. PyObject *__pyx_t_29 = NULL;
  28641. char const *__pyx_t_30;
  28642. __Pyx_RefNannyDeclarations
  28643. __Pyx_RefNannySetupContext("create_server", 0);
  28644. switch (__pyx_generator->resume_label) {
  28645. case 0: goto __pyx_L3_first_run;
  28646. case 1: goto __pyx_L10_resume_from_await;
  28647. case 2: goto __pyx_L30_resume_from_await;
  28648. default: /* CPython raises the right error here */
  28649. __Pyx_RefNannyFinishContext();
  28650. return NULL;
  28651. }
  28652. __pyx_L3_first_run:;
  28653. if (unlikely(!__pyx_sent_value)) __PYX_ERR(2, 1540, __pyx_L1_error)
  28654. /* "uvloop/loop.pyx":1600
  28655. * Server server
  28656. *
  28657. * if sock is not None and sock.family == uv.AF_UNIX: # <<<<<<<<<<<<<<
  28658. * if host is not None or port is not None:
  28659. * raise ValueError(
  28660. */
  28661. __pyx_t_2 = (__pyx_cur_scope->__pyx_v_sock != Py_None);
  28662. __pyx_t_3 = (__pyx_t_2 != 0);
  28663. if (__pyx_t_3) {
  28664. } else {
  28665. __pyx_t_1 = __pyx_t_3;
  28666. goto __pyx_L5_bool_binop_done;
  28667. }
  28668. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_sock, __pyx_n_s_family); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1600, __pyx_L1_error)
  28669. __Pyx_GOTREF(__pyx_t_4);
  28670. __pyx_t_5 = __Pyx_PyInt_From_int(AF_UNIX); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1600, __pyx_L1_error)
  28671. __Pyx_GOTREF(__pyx_t_5);
  28672. __pyx_t_6 = PyObject_RichCompare(__pyx_t_4, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1600, __pyx_L1_error)
  28673. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  28674. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  28675. __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(2, 1600, __pyx_L1_error)
  28676. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  28677. __pyx_t_1 = __pyx_t_3;
  28678. __pyx_L5_bool_binop_done:;
  28679. if (__pyx_t_1) {
  28680. /* "uvloop/loop.pyx":1601
  28681. *
  28682. * if sock is not None and sock.family == uv.AF_UNIX:
  28683. * if host is not None or port is not None: # <<<<<<<<<<<<<<
  28684. * raise ValueError(
  28685. * 'host/port and sock can not be specified at the same time')
  28686. */
  28687. __pyx_t_3 = (__pyx_cur_scope->__pyx_v_host != Py_None);
  28688. __pyx_t_2 = (__pyx_t_3 != 0);
  28689. if (!__pyx_t_2) {
  28690. } else {
  28691. __pyx_t_1 = __pyx_t_2;
  28692. goto __pyx_L8_bool_binop_done;
  28693. }
  28694. __pyx_t_2 = (__pyx_cur_scope->__pyx_v_port != Py_None);
  28695. __pyx_t_3 = (__pyx_t_2 != 0);
  28696. __pyx_t_1 = __pyx_t_3;
  28697. __pyx_L8_bool_binop_done:;
  28698. if (unlikely(__pyx_t_1)) {
  28699. /* "uvloop/loop.pyx":1602
  28700. * if sock is not None and sock.family == uv.AF_UNIX:
  28701. * if host is not None or port is not None:
  28702. * raise ValueError( # <<<<<<<<<<<<<<
  28703. * 'host/port and sock can not be specified at the same time')
  28704. * return await self.create_unix_server(
  28705. */
  28706. __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__40, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1602, __pyx_L1_error)
  28707. __Pyx_GOTREF(__pyx_t_6);
  28708. __Pyx_Raise(__pyx_t_6, 0, 0, 0);
  28709. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  28710. __PYX_ERR(2, 1602, __pyx_L1_error)
  28711. /* "uvloop/loop.pyx":1601
  28712. *
  28713. * if sock is not None and sock.family == uv.AF_UNIX:
  28714. * if host is not None or port is not None: # <<<<<<<<<<<<<<
  28715. * raise ValueError(
  28716. * 'host/port and sock can not be specified at the same time')
  28717. */
  28718. }
  28719. /* "uvloop/loop.pyx":1604
  28720. * raise ValueError(
  28721. * 'host/port and sock can not be specified at the same time')
  28722. * return await self.create_unix_server( # <<<<<<<<<<<<<<
  28723. * protocol_factory, sock=sock, backlog=backlog, ssl=ssl,
  28724. * start_serving=start_serving)
  28725. */
  28726. __Pyx_XDECREF(__pyx_r);
  28727. __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_create_unix_server); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1604, __pyx_L1_error)
  28728. __Pyx_GOTREF(__pyx_t_6);
  28729. /* "uvloop/loop.pyx":1605
  28730. * 'host/port and sock can not be specified at the same time')
  28731. * return await self.create_unix_server(
  28732. * protocol_factory, sock=sock, backlog=backlog, ssl=ssl, # <<<<<<<<<<<<<<
  28733. * start_serving=start_serving)
  28734. *
  28735. */
  28736. __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1604, __pyx_L1_error)
  28737. __Pyx_GOTREF(__pyx_t_5);
  28738. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_protocol_factory);
  28739. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_protocol_factory);
  28740. PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_cur_scope->__pyx_v_protocol_factory);
  28741. __pyx_t_4 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1605, __pyx_L1_error)
  28742. __Pyx_GOTREF(__pyx_t_4);
  28743. if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_sock, __pyx_cur_scope->__pyx_v_sock) < 0) __PYX_ERR(2, 1605, __pyx_L1_error)
  28744. if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_backlog, __pyx_cur_scope->__pyx_v_backlog) < 0) __PYX_ERR(2, 1605, __pyx_L1_error)
  28745. if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_ssl, __pyx_cur_scope->__pyx_v_ssl) < 0) __PYX_ERR(2, 1605, __pyx_L1_error)
  28746. /* "uvloop/loop.pyx":1606
  28747. * return await self.create_unix_server(
  28748. * protocol_factory, sock=sock, backlog=backlog, ssl=ssl,
  28749. * start_serving=start_serving) # <<<<<<<<<<<<<<
  28750. *
  28751. * server = Server(self)
  28752. */
  28753. if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_start_serving, __pyx_cur_scope->__pyx_v_start_serving) < 0) __PYX_ERR(2, 1605, __pyx_L1_error)
  28754. /* "uvloop/loop.pyx":1604
  28755. * raise ValueError(
  28756. * 'host/port and sock can not be specified at the same time')
  28757. * return await self.create_unix_server( # <<<<<<<<<<<<<<
  28758. * protocol_factory, sock=sock, backlog=backlog, ssl=ssl,
  28759. * start_serving=start_serving)
  28760. */
  28761. __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 1604, __pyx_L1_error)
  28762. __Pyx_GOTREF(__pyx_t_7);
  28763. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  28764. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  28765. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  28766. __pyx_r = __Pyx_Coroutine_Yield_From(__pyx_generator, __pyx_t_7);
  28767. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  28768. __Pyx_XGOTREF(__pyx_r);
  28769. if (likely(__pyx_r)) {
  28770. __Pyx_XGIVEREF(__pyx_r);
  28771. __Pyx_RefNannyFinishContext();
  28772. __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  28773. /* return from generator, awaiting value */
  28774. __pyx_generator->resume_label = 1;
  28775. return __pyx_r;
  28776. __pyx_L10_resume_from_await:;
  28777. if (unlikely(!__pyx_sent_value)) __PYX_ERR(2, 1604, __pyx_L1_error)
  28778. __pyx_t_7 = __pyx_sent_value; __Pyx_INCREF(__pyx_t_7);
  28779. } else {
  28780. __pyx_t_7 = NULL;
  28781. if (__Pyx_PyGen_FetchStopIterationValue(&__pyx_t_7) < 0) __PYX_ERR(2, 1604, __pyx_L1_error)
  28782. __Pyx_GOTREF(__pyx_t_7);
  28783. }
  28784. __pyx_r = NULL; __Pyx_ReturnWithStopIteration(__pyx_t_7);
  28785. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  28786. __pyx_t_7 = 0;
  28787. goto __pyx_L0;
  28788. /* "uvloop/loop.pyx":1600
  28789. * Server server
  28790. *
  28791. * if sock is not None and sock.family == uv.AF_UNIX: # <<<<<<<<<<<<<<
  28792. * if host is not None or port is not None:
  28793. * raise ValueError(
  28794. */
  28795. }
  28796. /* "uvloop/loop.pyx":1608
  28797. * start_serving=start_serving)
  28798. *
  28799. * server = Server(self) # <<<<<<<<<<<<<<
  28800. *
  28801. * if ssl is not None:
  28802. */
  28803. __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_6uvloop_4loop_Server), ((PyObject *)__pyx_cur_scope->__pyx_v_self)); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 1608, __pyx_L1_error)
  28804. __Pyx_GOTREF(__pyx_t_7);
  28805. __Pyx_GIVEREF(__pyx_t_7);
  28806. __pyx_cur_scope->__pyx_v_server = ((struct __pyx_obj_6uvloop_4loop_Server *)__pyx_t_7);
  28807. __pyx_t_7 = 0;
  28808. /* "uvloop/loop.pyx":1610
  28809. * server = Server(self)
  28810. *
  28811. * if ssl is not None: # <<<<<<<<<<<<<<
  28812. * if not isinstance(ssl, ssl_SSLContext):
  28813. * raise TypeError('ssl argument must be an SSLContext or None')
  28814. */
  28815. __pyx_t_1 = (__pyx_cur_scope->__pyx_v_ssl != Py_None);
  28816. __pyx_t_3 = (__pyx_t_1 != 0);
  28817. if (__pyx_t_3) {
  28818. /* "uvloop/loop.pyx":1611
  28819. *
  28820. * if ssl is not None:
  28821. * if not isinstance(ssl, ssl_SSLContext): # <<<<<<<<<<<<<<
  28822. * raise TypeError('ssl argument must be an SSLContext or None')
  28823. * else:
  28824. */
  28825. __pyx_t_7 = __pyx_v_6uvloop_4loop_ssl_SSLContext;
  28826. __Pyx_INCREF(__pyx_t_7);
  28827. __pyx_t_3 = PyObject_IsInstance(__pyx_cur_scope->__pyx_v_ssl, __pyx_t_7); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(2, 1611, __pyx_L1_error)
  28828. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  28829. __pyx_t_1 = ((!(__pyx_t_3 != 0)) != 0);
  28830. if (unlikely(__pyx_t_1)) {
  28831. /* "uvloop/loop.pyx":1612
  28832. * if ssl is not None:
  28833. * if not isinstance(ssl, ssl_SSLContext):
  28834. * raise TypeError('ssl argument must be an SSLContext or None') # <<<<<<<<<<<<<<
  28835. * else:
  28836. * if ssl_handshake_timeout is not None:
  28837. */
  28838. __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__41, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 1612, __pyx_L1_error)
  28839. __Pyx_GOTREF(__pyx_t_7);
  28840. __Pyx_Raise(__pyx_t_7, 0, 0, 0);
  28841. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  28842. __PYX_ERR(2, 1612, __pyx_L1_error)
  28843. /* "uvloop/loop.pyx":1611
  28844. *
  28845. * if ssl is not None:
  28846. * if not isinstance(ssl, ssl_SSLContext): # <<<<<<<<<<<<<<
  28847. * raise TypeError('ssl argument must be an SSLContext or None')
  28848. * else:
  28849. */
  28850. }
  28851. /* "uvloop/loop.pyx":1610
  28852. * server = Server(self)
  28853. *
  28854. * if ssl is not None: # <<<<<<<<<<<<<<
  28855. * if not isinstance(ssl, ssl_SSLContext):
  28856. * raise TypeError('ssl argument must be an SSLContext or None')
  28857. */
  28858. goto __pyx_L11;
  28859. }
  28860. /* "uvloop/loop.pyx":1614
  28861. * raise TypeError('ssl argument must be an SSLContext or None')
  28862. * else:
  28863. * if ssl_handshake_timeout is not None: # <<<<<<<<<<<<<<
  28864. * raise ValueError(
  28865. * 'ssl_handshake_timeout is only meaningful with ssl')
  28866. */
  28867. /*else*/ {
  28868. __pyx_t_1 = (__pyx_cur_scope->__pyx_v_ssl_handshake_timeout != Py_None);
  28869. __pyx_t_3 = (__pyx_t_1 != 0);
  28870. if (unlikely(__pyx_t_3)) {
  28871. /* "uvloop/loop.pyx":1615
  28872. * else:
  28873. * if ssl_handshake_timeout is not None:
  28874. * raise ValueError( # <<<<<<<<<<<<<<
  28875. * 'ssl_handshake_timeout is only meaningful with ssl')
  28876. * if ssl_shutdown_timeout is not None:
  28877. */
  28878. __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__42, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 1615, __pyx_L1_error)
  28879. __Pyx_GOTREF(__pyx_t_7);
  28880. __Pyx_Raise(__pyx_t_7, 0, 0, 0);
  28881. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  28882. __PYX_ERR(2, 1615, __pyx_L1_error)
  28883. /* "uvloop/loop.pyx":1614
  28884. * raise TypeError('ssl argument must be an SSLContext or None')
  28885. * else:
  28886. * if ssl_handshake_timeout is not None: # <<<<<<<<<<<<<<
  28887. * raise ValueError(
  28888. * 'ssl_handshake_timeout is only meaningful with ssl')
  28889. */
  28890. }
  28891. /* "uvloop/loop.pyx":1617
  28892. * raise ValueError(
  28893. * 'ssl_handshake_timeout is only meaningful with ssl')
  28894. * if ssl_shutdown_timeout is not None: # <<<<<<<<<<<<<<
  28895. * raise ValueError(
  28896. * 'ssl_shutdown_timeout is only meaningful with ssl')
  28897. */
  28898. __pyx_t_3 = (__pyx_cur_scope->__pyx_v_ssl_shutdown_timeout != Py_None);
  28899. __pyx_t_1 = (__pyx_t_3 != 0);
  28900. if (unlikely(__pyx_t_1)) {
  28901. /* "uvloop/loop.pyx":1618
  28902. * 'ssl_handshake_timeout is only meaningful with ssl')
  28903. * if ssl_shutdown_timeout is not None:
  28904. * raise ValueError( # <<<<<<<<<<<<<<
  28905. * 'ssl_shutdown_timeout is only meaningful with ssl')
  28906. *
  28907. */
  28908. __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 1618, __pyx_L1_error)
  28909. __Pyx_GOTREF(__pyx_t_7);
  28910. __Pyx_Raise(__pyx_t_7, 0, 0, 0);
  28911. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  28912. __PYX_ERR(2, 1618, __pyx_L1_error)
  28913. /* "uvloop/loop.pyx":1617
  28914. * raise ValueError(
  28915. * 'ssl_handshake_timeout is only meaningful with ssl')
  28916. * if ssl_shutdown_timeout is not None: # <<<<<<<<<<<<<<
  28917. * raise ValueError(
  28918. * 'ssl_shutdown_timeout is only meaningful with ssl')
  28919. */
  28920. }
  28921. }
  28922. __pyx_L11:;
  28923. /* "uvloop/loop.pyx":1621
  28924. * 'ssl_shutdown_timeout is only meaningful with ssl')
  28925. *
  28926. * if host is not None or port is not None: # <<<<<<<<<<<<<<
  28927. * if sock is not None:
  28928. * raise ValueError(
  28929. */
  28930. __pyx_t_3 = (__pyx_cur_scope->__pyx_v_host != Py_None);
  28931. __pyx_t_2 = (__pyx_t_3 != 0);
  28932. if (!__pyx_t_2) {
  28933. } else {
  28934. __pyx_t_1 = __pyx_t_2;
  28935. goto __pyx_L16_bool_binop_done;
  28936. }
  28937. __pyx_t_2 = (__pyx_cur_scope->__pyx_v_port != Py_None);
  28938. __pyx_t_3 = (__pyx_t_2 != 0);
  28939. __pyx_t_1 = __pyx_t_3;
  28940. __pyx_L16_bool_binop_done:;
  28941. if (__pyx_t_1) {
  28942. /* "uvloop/loop.pyx":1622
  28943. *
  28944. * if host is not None or port is not None:
  28945. * if sock is not None: # <<<<<<<<<<<<<<
  28946. * raise ValueError(
  28947. * 'host/port and sock can not be specified at the same time')
  28948. */
  28949. __pyx_t_1 = (__pyx_cur_scope->__pyx_v_sock != Py_None);
  28950. __pyx_t_3 = (__pyx_t_1 != 0);
  28951. if (unlikely(__pyx_t_3)) {
  28952. /* "uvloop/loop.pyx":1623
  28953. * if host is not None or port is not None:
  28954. * if sock is not None:
  28955. * raise ValueError( # <<<<<<<<<<<<<<
  28956. * 'host/port and sock can not be specified at the same time')
  28957. *
  28958. */
  28959. __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__40, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 1623, __pyx_L1_error)
  28960. __Pyx_GOTREF(__pyx_t_7);
  28961. __Pyx_Raise(__pyx_t_7, 0, 0, 0);
  28962. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  28963. __PYX_ERR(2, 1623, __pyx_L1_error)
  28964. /* "uvloop/loop.pyx":1622
  28965. *
  28966. * if host is not None or port is not None:
  28967. * if sock is not None: # <<<<<<<<<<<<<<
  28968. * raise ValueError(
  28969. * 'host/port and sock can not be specified at the same time')
  28970. */
  28971. }
  28972. /* "uvloop/loop.pyx":1626
  28973. * 'host/port and sock can not be specified at the same time')
  28974. *
  28975. * if reuse_address is None: # <<<<<<<<<<<<<<
  28976. * reuse_address = os_name == 'posix' and sys_platform != 'cygwin'
  28977. * reuse_port = bool(reuse_port)
  28978. */
  28979. __pyx_t_3 = (__pyx_cur_scope->__pyx_v_reuse_address == Py_None);
  28980. __pyx_t_1 = (__pyx_t_3 != 0);
  28981. if (__pyx_t_1) {
  28982. /* "uvloop/loop.pyx":1627
  28983. *
  28984. * if reuse_address is None:
  28985. * reuse_address = os_name == 'posix' and sys_platform != 'cygwin' # <<<<<<<<<<<<<<
  28986. * reuse_port = bool(reuse_port)
  28987. * if reuse_port and not has_SO_REUSEPORT:
  28988. */
  28989. __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_6uvloop_4loop_os_name, __pyx_n_u_posix, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 1627, __pyx_L1_error)
  28990. if (__pyx_t_1) {
  28991. } else {
  28992. __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1627, __pyx_L1_error)
  28993. __Pyx_GOTREF(__pyx_t_4);
  28994. __pyx_t_7 = __pyx_t_4;
  28995. __pyx_t_4 = 0;
  28996. goto __pyx_L20_bool_binop_done;
  28997. }
  28998. __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_6uvloop_4loop_sys_platform, __pyx_n_u_cygwin, Py_NE)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 1627, __pyx_L1_error)
  28999. __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1627, __pyx_L1_error)
  29000. __Pyx_GOTREF(__pyx_t_4);
  29001. __pyx_t_7 = __pyx_t_4;
  29002. __pyx_t_4 = 0;
  29003. __pyx_L20_bool_binop_done:;
  29004. __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_reuse_address);
  29005. __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_reuse_address, __pyx_t_7);
  29006. __Pyx_GIVEREF(__pyx_t_7);
  29007. __pyx_t_7 = 0;
  29008. /* "uvloop/loop.pyx":1626
  29009. * 'host/port and sock can not be specified at the same time')
  29010. *
  29011. * if reuse_address is None: # <<<<<<<<<<<<<<
  29012. * reuse_address = os_name == 'posix' and sys_platform != 'cygwin'
  29013. * reuse_port = bool(reuse_port)
  29014. */
  29015. }
  29016. /* "uvloop/loop.pyx":1628
  29017. * if reuse_address is None:
  29018. * reuse_address = os_name == 'posix' and sys_platform != 'cygwin'
  29019. * reuse_port = bool(reuse_port) # <<<<<<<<<<<<<<
  29020. * if reuse_port and not has_SO_REUSEPORT:
  29021. * raise ValueError(
  29022. */
  29023. __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_reuse_port); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 1628, __pyx_L1_error)
  29024. __pyx_t_7 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 1628, __pyx_L1_error)
  29025. __Pyx_GOTREF(__pyx_t_7);
  29026. __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_reuse_port);
  29027. __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_reuse_port, __pyx_t_7);
  29028. __Pyx_GIVEREF(__pyx_t_7);
  29029. __pyx_t_7 = 0;
  29030. /* "uvloop/loop.pyx":1629
  29031. * reuse_address = os_name == 'posix' and sys_platform != 'cygwin'
  29032. * reuse_port = bool(reuse_port)
  29033. * if reuse_port and not has_SO_REUSEPORT: # <<<<<<<<<<<<<<
  29034. * raise ValueError(
  29035. * 'reuse_port not supported by socket module')
  29036. */
  29037. __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_reuse_port); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(2, 1629, __pyx_L1_error)
  29038. if (__pyx_t_3) {
  29039. } else {
  29040. __pyx_t_1 = __pyx_t_3;
  29041. goto __pyx_L23_bool_binop_done;
  29042. }
  29043. __pyx_t_3 = ((!(__pyx_v_6uvloop_4loop_has_SO_REUSEPORT != 0)) != 0);
  29044. __pyx_t_1 = __pyx_t_3;
  29045. __pyx_L23_bool_binop_done:;
  29046. if (unlikely(__pyx_t_1)) {
  29047. /* "uvloop/loop.pyx":1630
  29048. * reuse_port = bool(reuse_port)
  29049. * if reuse_port and not has_SO_REUSEPORT:
  29050. * raise ValueError( # <<<<<<<<<<<<<<
  29051. * 'reuse_port not supported by socket module')
  29052. *
  29053. */
  29054. __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__44, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 1630, __pyx_L1_error)
  29055. __Pyx_GOTREF(__pyx_t_7);
  29056. __Pyx_Raise(__pyx_t_7, 0, 0, 0);
  29057. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  29058. __PYX_ERR(2, 1630, __pyx_L1_error)
  29059. /* "uvloop/loop.pyx":1629
  29060. * reuse_address = os_name == 'posix' and sys_platform != 'cygwin'
  29061. * reuse_port = bool(reuse_port)
  29062. * if reuse_port and not has_SO_REUSEPORT: # <<<<<<<<<<<<<<
  29063. * raise ValueError(
  29064. * 'reuse_port not supported by socket module')
  29065. */
  29066. }
  29067. /* "uvloop/loop.pyx":1633
  29068. * 'reuse_port not supported by socket module')
  29069. *
  29070. * if host == '': # <<<<<<<<<<<<<<
  29071. * hosts = [None]
  29072. * elif (isinstance(host, str) or not isinstance(host, col_Iterable)):
  29073. */
  29074. __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_cur_scope->__pyx_v_host, __pyx_kp_u__2, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 1633, __pyx_L1_error)
  29075. if (__pyx_t_1) {
  29076. /* "uvloop/loop.pyx":1634
  29077. *
  29078. * if host == '':
  29079. * hosts = [None] # <<<<<<<<<<<<<<
  29080. * elif (isinstance(host, str) or not isinstance(host, col_Iterable)):
  29081. * hosts = [host]
  29082. */
  29083. __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 1634, __pyx_L1_error)
  29084. __Pyx_GOTREF(__pyx_t_7);
  29085. __Pyx_INCREF(Py_None);
  29086. __Pyx_GIVEREF(Py_None);
  29087. PyList_SET_ITEM(__pyx_t_7, 0, Py_None);
  29088. __Pyx_GIVEREF(__pyx_t_7);
  29089. __pyx_cur_scope->__pyx_v_hosts = __pyx_t_7;
  29090. __pyx_t_7 = 0;
  29091. /* "uvloop/loop.pyx":1633
  29092. * 'reuse_port not supported by socket module')
  29093. *
  29094. * if host == '': # <<<<<<<<<<<<<<
  29095. * hosts = [None]
  29096. * elif (isinstance(host, str) or not isinstance(host, col_Iterable)):
  29097. */
  29098. goto __pyx_L25;
  29099. }
  29100. /* "uvloop/loop.pyx":1635
  29101. * if host == '':
  29102. * hosts = [None]
  29103. * elif (isinstance(host, str) or not isinstance(host, col_Iterable)): # <<<<<<<<<<<<<<
  29104. * hosts = [host]
  29105. * else:
  29106. */
  29107. __pyx_t_3 = PyUnicode_Check(__pyx_cur_scope->__pyx_v_host);
  29108. __pyx_t_2 = (__pyx_t_3 != 0);
  29109. if (!__pyx_t_2) {
  29110. } else {
  29111. __pyx_t_1 = __pyx_t_2;
  29112. goto __pyx_L26_bool_binop_done;
  29113. }
  29114. __pyx_t_7 = __pyx_v_6uvloop_4loop_col_Iterable;
  29115. __Pyx_INCREF(__pyx_t_7);
  29116. __pyx_t_2 = PyObject_IsInstance(__pyx_cur_scope->__pyx_v_host, __pyx_t_7); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(2, 1635, __pyx_L1_error)
  29117. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  29118. __pyx_t_3 = ((!(__pyx_t_2 != 0)) != 0);
  29119. __pyx_t_1 = __pyx_t_3;
  29120. __pyx_L26_bool_binop_done:;
  29121. if (__pyx_t_1) {
  29122. /* "uvloop/loop.pyx":1636
  29123. * hosts = [None]
  29124. * elif (isinstance(host, str) or not isinstance(host, col_Iterable)):
  29125. * hosts = [host] # <<<<<<<<<<<<<<
  29126. * else:
  29127. * hosts = host
  29128. */
  29129. __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 1636, __pyx_L1_error)
  29130. __Pyx_GOTREF(__pyx_t_7);
  29131. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_host);
  29132. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_host);
  29133. PyList_SET_ITEM(__pyx_t_7, 0, __pyx_cur_scope->__pyx_v_host);
  29134. __Pyx_GIVEREF(__pyx_t_7);
  29135. __pyx_cur_scope->__pyx_v_hosts = __pyx_t_7;
  29136. __pyx_t_7 = 0;
  29137. /* "uvloop/loop.pyx":1635
  29138. * if host == '':
  29139. * hosts = [None]
  29140. * elif (isinstance(host, str) or not isinstance(host, col_Iterable)): # <<<<<<<<<<<<<<
  29141. * hosts = [host]
  29142. * else:
  29143. */
  29144. goto __pyx_L25;
  29145. }
  29146. /* "uvloop/loop.pyx":1638
  29147. * hosts = [host]
  29148. * else:
  29149. * hosts = host # <<<<<<<<<<<<<<
  29150. *
  29151. * fs = [self._getaddrinfo(host, port, family,
  29152. */
  29153. /*else*/ {
  29154. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_host);
  29155. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_host);
  29156. __pyx_cur_scope->__pyx_v_hosts = __pyx_cur_scope->__pyx_v_host;
  29157. }
  29158. __pyx_L25:;
  29159. /* "uvloop/loop.pyx":1640
  29160. * hosts = host
  29161. *
  29162. * fs = [self._getaddrinfo(host, port, family, # <<<<<<<<<<<<<<
  29163. * uv.SOCK_STREAM, 0, flags,
  29164. * 0) for host in hosts]
  29165. */
  29166. { /* enter inner scope */
  29167. __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 1640, __pyx_L1_error)
  29168. __Pyx_GOTREF(__pyx_t_7);
  29169. /* "uvloop/loop.pyx":1642
  29170. * fs = [self._getaddrinfo(host, port, family,
  29171. * uv.SOCK_STREAM, 0, flags,
  29172. * 0) for host in hosts] # <<<<<<<<<<<<<<
  29173. *
  29174. * infos = await aio_gather(*fs, loop=self)
  29175. */
  29176. if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_v_hosts)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_hosts)) {
  29177. __pyx_t_4 = __pyx_cur_scope->__pyx_v_hosts; __Pyx_INCREF(__pyx_t_4); __pyx_t_8 = 0;
  29178. __pyx_t_9 = NULL;
  29179. } else {
  29180. __pyx_t_8 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_hosts); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1642, __pyx_L1_error)
  29181. __Pyx_GOTREF(__pyx_t_4);
  29182. __pyx_t_9 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 1642, __pyx_L1_error)
  29183. }
  29184. for (;;) {
  29185. if (likely(!__pyx_t_9)) {
  29186. if (likely(PyList_CheckExact(__pyx_t_4))) {
  29187. if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_4)) break;
  29188. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  29189. __pyx_t_5 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_8); __Pyx_INCREF(__pyx_t_5); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(2, 1642, __pyx_L1_error)
  29190. #else
  29191. __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1642, __pyx_L1_error)
  29192. __Pyx_GOTREF(__pyx_t_5);
  29193. #endif
  29194. } else {
  29195. if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
  29196. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  29197. __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_8); __Pyx_INCREF(__pyx_t_5); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(2, 1642, __pyx_L1_error)
  29198. #else
  29199. __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1642, __pyx_L1_error)
  29200. __Pyx_GOTREF(__pyx_t_5);
  29201. #endif
  29202. }
  29203. } else {
  29204. __pyx_t_5 = __pyx_t_9(__pyx_t_4);
  29205. if (unlikely(!__pyx_t_5)) {
  29206. PyObject* exc_type = PyErr_Occurred();
  29207. if (exc_type) {
  29208. if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
  29209. else __PYX_ERR(2, 1642, __pyx_L1_error)
  29210. }
  29211. break;
  29212. }
  29213. __Pyx_GOTREF(__pyx_t_5);
  29214. }
  29215. __Pyx_XGOTREF(__pyx_cur_scope->__pyx_7genexpr__pyx_v_host);
  29216. __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_7genexpr__pyx_v_host, __pyx_t_5);
  29217. __Pyx_GIVEREF(__pyx_t_5);
  29218. __pyx_t_5 = 0;
  29219. /* "uvloop/loop.pyx":1640
  29220. * hosts = host
  29221. *
  29222. * fs = [self._getaddrinfo(host, port, family, # <<<<<<<<<<<<<<
  29223. * uv.SOCK_STREAM, 0, flags,
  29224. * 0) for host in hosts]
  29225. */
  29226. __pyx_t_5 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->_getaddrinfo(__pyx_cur_scope->__pyx_v_self, __pyx_cur_scope->__pyx_7genexpr__pyx_v_host, __pyx_cur_scope->__pyx_v_port, __pyx_cur_scope->__pyx_v_family, SOCK_STREAM, 0, __pyx_cur_scope->__pyx_v_flags, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1640, __pyx_L1_error)
  29227. __Pyx_GOTREF(__pyx_t_5);
  29228. if (unlikely(__Pyx_ListComp_Append(__pyx_t_7, (PyObject*)__pyx_t_5))) __PYX_ERR(2, 1640, __pyx_L1_error)
  29229. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  29230. /* "uvloop/loop.pyx":1642
  29231. * fs = [self._getaddrinfo(host, port, family,
  29232. * uv.SOCK_STREAM, 0, flags,
  29233. * 0) for host in hosts] # <<<<<<<<<<<<<<
  29234. *
  29235. * infos = await aio_gather(*fs, loop=self)
  29236. */
  29237. }
  29238. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  29239. } /* exit inner scope */
  29240. __Pyx_GIVEREF(__pyx_t_7);
  29241. __pyx_cur_scope->__pyx_v_fs = ((PyObject*)__pyx_t_7);
  29242. __pyx_t_7 = 0;
  29243. /* "uvloop/loop.pyx":1644
  29244. * 0) for host in hosts]
  29245. *
  29246. * infos = await aio_gather(*fs, loop=self) # <<<<<<<<<<<<<<
  29247. *
  29248. * completed = False
  29249. */
  29250. __pyx_t_7 = PySequence_Tuple(__pyx_cur_scope->__pyx_v_fs); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 1644, __pyx_L1_error)
  29251. __Pyx_GOTREF(__pyx_t_7);
  29252. __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1644, __pyx_L1_error)
  29253. __Pyx_GOTREF(__pyx_t_4);
  29254. if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_loop, ((PyObject *)__pyx_cur_scope->__pyx_v_self)) < 0) __PYX_ERR(2, 1644, __pyx_L1_error)
  29255. __pyx_t_5 = __Pyx_PyObject_Call(__pyx_v_6uvloop_4loop_aio_gather, __pyx_t_7, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1644, __pyx_L1_error)
  29256. __Pyx_GOTREF(__pyx_t_5);
  29257. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  29258. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  29259. __pyx_r = __Pyx_Coroutine_Yield_From(__pyx_generator, __pyx_t_5);
  29260. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  29261. __Pyx_XGOTREF(__pyx_r);
  29262. if (likely(__pyx_r)) {
  29263. __Pyx_XGIVEREF(__pyx_r);
  29264. __Pyx_RefNannyFinishContext();
  29265. __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  29266. /* return from generator, awaiting value */
  29267. __pyx_generator->resume_label = 2;
  29268. return __pyx_r;
  29269. __pyx_L30_resume_from_await:;
  29270. if (unlikely(!__pyx_sent_value)) __PYX_ERR(2, 1644, __pyx_L1_error)
  29271. __pyx_t_5 = __pyx_sent_value; __Pyx_INCREF(__pyx_t_5);
  29272. } else {
  29273. __pyx_t_5 = NULL;
  29274. if (__Pyx_PyGen_FetchStopIterationValue(&__pyx_t_5) < 0) __PYX_ERR(2, 1644, __pyx_L1_error)
  29275. __Pyx_GOTREF(__pyx_t_5);
  29276. }
  29277. __Pyx_GIVEREF(__pyx_t_5);
  29278. __pyx_cur_scope->__pyx_v_infos = __pyx_t_5;
  29279. __pyx_t_5 = 0;
  29280. /* "uvloop/loop.pyx":1646
  29281. * infos = await aio_gather(*fs, loop=self)
  29282. *
  29283. * completed = False # <<<<<<<<<<<<<<
  29284. * sock = None
  29285. * try:
  29286. */
  29287. __pyx_cur_scope->__pyx_v_completed = 0;
  29288. /* "uvloop/loop.pyx":1647
  29289. *
  29290. * completed = False
  29291. * sock = None # <<<<<<<<<<<<<<
  29292. * try:
  29293. * for info in infos:
  29294. */
  29295. __Pyx_INCREF(Py_None);
  29296. __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_sock);
  29297. __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_sock, Py_None);
  29298. __Pyx_GIVEREF(Py_None);
  29299. /* "uvloop/loop.pyx":1648
  29300. * completed = False
  29301. * sock = None
  29302. * try: # <<<<<<<<<<<<<<
  29303. * for info in infos:
  29304. * addrinfo = (<AddrInfo>info).data
  29305. */
  29306. /*try:*/ {
  29307. /* "uvloop/loop.pyx":1649
  29308. * sock = None
  29309. * try:
  29310. * for info in infos: # <<<<<<<<<<<<<<
  29311. * addrinfo = (<AddrInfo>info).data
  29312. * while addrinfo != NULL:
  29313. */
  29314. if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_v_infos)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_infos)) {
  29315. __pyx_t_5 = __pyx_cur_scope->__pyx_v_infos; __Pyx_INCREF(__pyx_t_5); __pyx_t_8 = 0;
  29316. __pyx_t_9 = NULL;
  29317. } else {
  29318. __pyx_t_8 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_infos); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1649, __pyx_L32_error)
  29319. __Pyx_GOTREF(__pyx_t_5);
  29320. __pyx_t_9 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 1649, __pyx_L32_error)
  29321. }
  29322. for (;;) {
  29323. if (likely(!__pyx_t_9)) {
  29324. if (likely(PyList_CheckExact(__pyx_t_5))) {
  29325. if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_5)) break;
  29326. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  29327. __pyx_t_4 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_8); __Pyx_INCREF(__pyx_t_4); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(2, 1649, __pyx_L32_error)
  29328. #else
  29329. __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1649, __pyx_L32_error)
  29330. __Pyx_GOTREF(__pyx_t_4);
  29331. #endif
  29332. } else {
  29333. if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
  29334. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  29335. __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_8); __Pyx_INCREF(__pyx_t_4); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(2, 1649, __pyx_L32_error)
  29336. #else
  29337. __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1649, __pyx_L32_error)
  29338. __Pyx_GOTREF(__pyx_t_4);
  29339. #endif
  29340. }
  29341. } else {
  29342. __pyx_t_4 = __pyx_t_9(__pyx_t_5);
  29343. if (unlikely(!__pyx_t_4)) {
  29344. PyObject* exc_type = PyErr_Occurred();
  29345. if (exc_type) {
  29346. if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
  29347. else __PYX_ERR(2, 1649, __pyx_L32_error)
  29348. }
  29349. break;
  29350. }
  29351. __Pyx_GOTREF(__pyx_t_4);
  29352. }
  29353. __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_info);
  29354. __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_info, __pyx_t_4);
  29355. __Pyx_GIVEREF(__pyx_t_4);
  29356. __pyx_t_4 = 0;
  29357. /* "uvloop/loop.pyx":1650
  29358. * try:
  29359. * for info in infos:
  29360. * addrinfo = (<AddrInfo>info).data # <<<<<<<<<<<<<<
  29361. * while addrinfo != NULL:
  29362. * if addrinfo.ai_family == uv.AF_UNSPEC:
  29363. */
  29364. __pyx_t_10 = ((struct __pyx_obj_6uvloop_4loop_AddrInfo *)__pyx_cur_scope->__pyx_v_info)->data;
  29365. __pyx_cur_scope->__pyx_v_addrinfo = __pyx_t_10;
  29366. /* "uvloop/loop.pyx":1651
  29367. * for info in infos:
  29368. * addrinfo = (<AddrInfo>info).data
  29369. * while addrinfo != NULL: # <<<<<<<<<<<<<<
  29370. * if addrinfo.ai_family == uv.AF_UNSPEC:
  29371. * raise RuntimeError('AF_UNSPEC in DNS results')
  29372. */
  29373. while (1) {
  29374. __pyx_t_1 = ((__pyx_cur_scope->__pyx_v_addrinfo != NULL) != 0);
  29375. if (!__pyx_t_1) break;
  29376. /* "uvloop/loop.pyx":1652
  29377. * addrinfo = (<AddrInfo>info).data
  29378. * while addrinfo != NULL:
  29379. * if addrinfo.ai_family == uv.AF_UNSPEC: # <<<<<<<<<<<<<<
  29380. * raise RuntimeError('AF_UNSPEC in DNS results')
  29381. *
  29382. */
  29383. __pyx_t_1 = ((__pyx_cur_scope->__pyx_v_addrinfo->ai_family == AF_UNSPEC) != 0);
  29384. if (unlikely(__pyx_t_1)) {
  29385. /* "uvloop/loop.pyx":1653
  29386. * while addrinfo != NULL:
  29387. * if addrinfo.ai_family == uv.AF_UNSPEC:
  29388. * raise RuntimeError('AF_UNSPEC in DNS results') # <<<<<<<<<<<<<<
  29389. *
  29390. * try:
  29391. */
  29392. __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__45, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1653, __pyx_L32_error)
  29393. __Pyx_GOTREF(__pyx_t_4);
  29394. __Pyx_Raise(__pyx_t_4, 0, 0, 0);
  29395. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  29396. __PYX_ERR(2, 1653, __pyx_L32_error)
  29397. /* "uvloop/loop.pyx":1652
  29398. * addrinfo = (<AddrInfo>info).data
  29399. * while addrinfo != NULL:
  29400. * if addrinfo.ai_family == uv.AF_UNSPEC: # <<<<<<<<<<<<<<
  29401. * raise RuntimeError('AF_UNSPEC in DNS results')
  29402. *
  29403. */
  29404. }
  29405. /* "uvloop/loop.pyx":1655
  29406. * raise RuntimeError('AF_UNSPEC in DNS results')
  29407. *
  29408. * try: # <<<<<<<<<<<<<<
  29409. * sock = socket_socket(addrinfo.ai_family,
  29410. * addrinfo.ai_socktype,
  29411. */
  29412. {
  29413. __Pyx_ExceptionSave(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
  29414. __Pyx_XGOTREF(__pyx_t_11);
  29415. __Pyx_XGOTREF(__pyx_t_12);
  29416. __Pyx_XGOTREF(__pyx_t_13);
  29417. /*try:*/ {
  29418. /* "uvloop/loop.pyx":1656
  29419. *
  29420. * try:
  29421. * sock = socket_socket(addrinfo.ai_family, # <<<<<<<<<<<<<<
  29422. * addrinfo.ai_socktype,
  29423. * addrinfo.ai_protocol)
  29424. */
  29425. __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_addrinfo->ai_family); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 1656, __pyx_L39_error)
  29426. __Pyx_GOTREF(__pyx_t_7);
  29427. /* "uvloop/loop.pyx":1657
  29428. * try:
  29429. * sock = socket_socket(addrinfo.ai_family,
  29430. * addrinfo.ai_socktype, # <<<<<<<<<<<<<<
  29431. * addrinfo.ai_protocol)
  29432. * except socket_error:
  29433. */
  29434. __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_addrinfo->ai_socktype); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1657, __pyx_L39_error)
  29435. __Pyx_GOTREF(__pyx_t_6);
  29436. /* "uvloop/loop.pyx":1658
  29437. * sock = socket_socket(addrinfo.ai_family,
  29438. * addrinfo.ai_socktype,
  29439. * addrinfo.ai_protocol) # <<<<<<<<<<<<<<
  29440. * except socket_error:
  29441. * # Assume it's a bad family/type/protocol
  29442. */
  29443. __pyx_t_14 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_addrinfo->ai_protocol); if (unlikely(!__pyx_t_14)) __PYX_ERR(2, 1658, __pyx_L39_error)
  29444. __Pyx_GOTREF(__pyx_t_14);
  29445. __Pyx_INCREF(__pyx_v_6uvloop_4loop_socket_socket);
  29446. __pyx_t_15 = __pyx_v_6uvloop_4loop_socket_socket; __pyx_t_16 = NULL;
  29447. __pyx_t_17 = 0;
  29448. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_15))) {
  29449. __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_15);
  29450. if (likely(__pyx_t_16)) {
  29451. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
  29452. __Pyx_INCREF(__pyx_t_16);
  29453. __Pyx_INCREF(function);
  29454. __Pyx_DECREF_SET(__pyx_t_15, function);
  29455. __pyx_t_17 = 1;
  29456. }
  29457. }
  29458. #if CYTHON_FAST_PYCALL
  29459. if (PyFunction_Check(__pyx_t_15)) {
  29460. PyObject *__pyx_temp[4] = {__pyx_t_16, __pyx_t_7, __pyx_t_6, __pyx_t_14};
  29461. __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_15, __pyx_temp+1-__pyx_t_17, 3+__pyx_t_17); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1656, __pyx_L39_error)
  29462. __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
  29463. __Pyx_GOTREF(__pyx_t_4);
  29464. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  29465. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  29466. __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  29467. } else
  29468. #endif
  29469. #if CYTHON_FAST_PYCCALL
  29470. if (__Pyx_PyFastCFunction_Check(__pyx_t_15)) {
  29471. PyObject *__pyx_temp[4] = {__pyx_t_16, __pyx_t_7, __pyx_t_6, __pyx_t_14};
  29472. __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_15, __pyx_temp+1-__pyx_t_17, 3+__pyx_t_17); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1656, __pyx_L39_error)
  29473. __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
  29474. __Pyx_GOTREF(__pyx_t_4);
  29475. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  29476. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  29477. __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  29478. } else
  29479. #endif
  29480. {
  29481. __pyx_t_18 = PyTuple_New(3+__pyx_t_17); if (unlikely(!__pyx_t_18)) __PYX_ERR(2, 1656, __pyx_L39_error)
  29482. __Pyx_GOTREF(__pyx_t_18);
  29483. if (__pyx_t_16) {
  29484. __Pyx_GIVEREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_16); __pyx_t_16 = NULL;
  29485. }
  29486. __Pyx_GIVEREF(__pyx_t_7);
  29487. PyTuple_SET_ITEM(__pyx_t_18, 0+__pyx_t_17, __pyx_t_7);
  29488. __Pyx_GIVEREF(__pyx_t_6);
  29489. PyTuple_SET_ITEM(__pyx_t_18, 1+__pyx_t_17, __pyx_t_6);
  29490. __Pyx_GIVEREF(__pyx_t_14);
  29491. PyTuple_SET_ITEM(__pyx_t_18, 2+__pyx_t_17, __pyx_t_14);
  29492. __pyx_t_7 = 0;
  29493. __pyx_t_6 = 0;
  29494. __pyx_t_14 = 0;
  29495. __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_t_18, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1656, __pyx_L39_error)
  29496. __Pyx_GOTREF(__pyx_t_4);
  29497. __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  29498. }
  29499. __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  29500. __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_sock);
  29501. __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_sock, __pyx_t_4);
  29502. __Pyx_GIVEREF(__pyx_t_4);
  29503. __pyx_t_4 = 0;
  29504. /* "uvloop/loop.pyx":1655
  29505. * raise RuntimeError('AF_UNSPEC in DNS results')
  29506. *
  29507. * try: # <<<<<<<<<<<<<<
  29508. * sock = socket_socket(addrinfo.ai_family,
  29509. * addrinfo.ai_socktype,
  29510. */
  29511. }
  29512. __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
  29513. __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
  29514. __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
  29515. goto __pyx_L46_try_end;
  29516. __pyx_L39_error:;
  29517. __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
  29518. __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
  29519. __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
  29520. __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
  29521. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  29522. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  29523. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  29524. /* "uvloop/loop.pyx":1659
  29525. * addrinfo.ai_socktype,
  29526. * addrinfo.ai_protocol)
  29527. * except socket_error: # <<<<<<<<<<<<<<
  29528. * # Assume it's a bad family/type/protocol
  29529. * # combination.
  29530. */
  29531. __pyx_t_17 = __Pyx_PyErr_ExceptionMatches(__pyx_v_6uvloop_4loop_socket_error);
  29532. if (__pyx_t_17) {
  29533. __Pyx_AddTraceback("uvloop.loop.Loop.create_server", __pyx_clineno, __pyx_lineno, __pyx_filename);
  29534. if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_15, &__pyx_t_18) < 0) __PYX_ERR(2, 1659, __pyx_L41_except_error)
  29535. __Pyx_GOTREF(__pyx_t_4);
  29536. __Pyx_GOTREF(__pyx_t_15);
  29537. __Pyx_GOTREF(__pyx_t_18);
  29538. /* "uvloop/loop.pyx":1662
  29539. * # Assume it's a bad family/type/protocol
  29540. * # combination.
  29541. * if self._debug: # <<<<<<<<<<<<<<
  29542. * aio_logger.warning(
  29543. * 'create_server() failed to create '
  29544. */
  29545. __pyx_t_1 = (__pyx_cur_scope->__pyx_v_self->_debug != 0);
  29546. if (__pyx_t_1) {
  29547. /* "uvloop/loop.pyx":1663
  29548. * # combination.
  29549. * if self._debug:
  29550. * aio_logger.warning( # <<<<<<<<<<<<<<
  29551. * 'create_server() failed to create '
  29552. * 'socket.socket(%r, %r, %r)',
  29553. */
  29554. __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_6uvloop_4loop_aio_logger, __pyx_n_s_warning); if (unlikely(!__pyx_t_14)) __PYX_ERR(2, 1663, __pyx_L41_except_error)
  29555. __Pyx_GOTREF(__pyx_t_14);
  29556. /* "uvloop/loop.pyx":1666
  29557. * 'create_server() failed to create '
  29558. * 'socket.socket(%r, %r, %r)',
  29559. * addrinfo.ai_family, # <<<<<<<<<<<<<<
  29560. * addrinfo.ai_socktype,
  29561. * addrinfo.ai_protocol, exc_info=True)
  29562. */
  29563. __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_addrinfo->ai_family); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1666, __pyx_L41_except_error)
  29564. __Pyx_GOTREF(__pyx_t_6);
  29565. /* "uvloop/loop.pyx":1667
  29566. * 'socket.socket(%r, %r, %r)',
  29567. * addrinfo.ai_family,
  29568. * addrinfo.ai_socktype, # <<<<<<<<<<<<<<
  29569. * addrinfo.ai_protocol, exc_info=True)
  29570. * continue
  29571. */
  29572. __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_addrinfo->ai_socktype); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 1667, __pyx_L41_except_error)
  29573. __Pyx_GOTREF(__pyx_t_7);
  29574. /* "uvloop/loop.pyx":1668
  29575. * addrinfo.ai_family,
  29576. * addrinfo.ai_socktype,
  29577. * addrinfo.ai_protocol, exc_info=True) # <<<<<<<<<<<<<<
  29578. * continue
  29579. *
  29580. */
  29581. __pyx_t_16 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_addrinfo->ai_protocol); if (unlikely(!__pyx_t_16)) __PYX_ERR(2, 1668, __pyx_L41_except_error)
  29582. __Pyx_GOTREF(__pyx_t_16);
  29583. /* "uvloop/loop.pyx":1663
  29584. * # combination.
  29585. * if self._debug:
  29586. * aio_logger.warning( # <<<<<<<<<<<<<<
  29587. * 'create_server() failed to create '
  29588. * 'socket.socket(%r, %r, %r)',
  29589. */
  29590. __pyx_t_19 = PyTuple_New(4); if (unlikely(!__pyx_t_19)) __PYX_ERR(2, 1663, __pyx_L41_except_error)
  29591. __Pyx_GOTREF(__pyx_t_19);
  29592. __Pyx_INCREF(__pyx_kp_u_create_server_failed_to_create_s);
  29593. __Pyx_GIVEREF(__pyx_kp_u_create_server_failed_to_create_s);
  29594. PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_kp_u_create_server_failed_to_create_s);
  29595. __Pyx_GIVEREF(__pyx_t_6);
  29596. PyTuple_SET_ITEM(__pyx_t_19, 1, __pyx_t_6);
  29597. __Pyx_GIVEREF(__pyx_t_7);
  29598. PyTuple_SET_ITEM(__pyx_t_19, 2, __pyx_t_7);
  29599. __Pyx_GIVEREF(__pyx_t_16);
  29600. PyTuple_SET_ITEM(__pyx_t_19, 3, __pyx_t_16);
  29601. __pyx_t_6 = 0;
  29602. __pyx_t_7 = 0;
  29603. __pyx_t_16 = 0;
  29604. /* "uvloop/loop.pyx":1668
  29605. * addrinfo.ai_family,
  29606. * addrinfo.ai_socktype,
  29607. * addrinfo.ai_protocol, exc_info=True) # <<<<<<<<<<<<<<
  29608. * continue
  29609. *
  29610. */
  29611. __pyx_t_16 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_16)) __PYX_ERR(2, 1668, __pyx_L41_except_error)
  29612. __Pyx_GOTREF(__pyx_t_16);
  29613. if (PyDict_SetItem(__pyx_t_16, __pyx_n_s_exc_info, Py_True) < 0) __PYX_ERR(2, 1668, __pyx_L41_except_error)
  29614. /* "uvloop/loop.pyx":1663
  29615. * # combination.
  29616. * if self._debug:
  29617. * aio_logger.warning( # <<<<<<<<<<<<<<
  29618. * 'create_server() failed to create '
  29619. * 'socket.socket(%r, %r, %r)',
  29620. */
  29621. __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_t_19, __pyx_t_16); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 1663, __pyx_L41_except_error)
  29622. __Pyx_GOTREF(__pyx_t_7);
  29623. __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  29624. __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  29625. __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
  29626. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  29627. /* "uvloop/loop.pyx":1662
  29628. * # Assume it's a bad family/type/protocol
  29629. * # combination.
  29630. * if self._debug: # <<<<<<<<<<<<<<
  29631. * aio_logger.warning(
  29632. * 'create_server() failed to create '
  29633. */
  29634. }
  29635. /* "uvloop/loop.pyx":1669
  29636. * addrinfo.ai_socktype,
  29637. * addrinfo.ai_protocol, exc_info=True)
  29638. * continue # <<<<<<<<<<<<<<
  29639. *
  29640. * if reuse_address:
  29641. */
  29642. goto __pyx_L48_except_continue;
  29643. __pyx_L48_except_continue:;
  29644. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  29645. __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  29646. __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  29647. goto __pyx_L45_try_continue;
  29648. }
  29649. goto __pyx_L41_except_error;
  29650. __pyx_L41_except_error:;
  29651. /* "uvloop/loop.pyx":1655
  29652. * raise RuntimeError('AF_UNSPEC in DNS results')
  29653. *
  29654. * try: # <<<<<<<<<<<<<<
  29655. * sock = socket_socket(addrinfo.ai_family,
  29656. * addrinfo.ai_socktype,
  29657. */
  29658. __Pyx_XGIVEREF(__pyx_t_11);
  29659. __Pyx_XGIVEREF(__pyx_t_12);
  29660. __Pyx_XGIVEREF(__pyx_t_13);
  29661. __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13);
  29662. goto __pyx_L32_error;
  29663. __pyx_L45_try_continue:;
  29664. __Pyx_XGIVEREF(__pyx_t_11);
  29665. __Pyx_XGIVEREF(__pyx_t_12);
  29666. __Pyx_XGIVEREF(__pyx_t_13);
  29667. __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13);
  29668. goto __pyx_L36_continue;
  29669. __pyx_L46_try_end:;
  29670. }
  29671. /* "uvloop/loop.pyx":1671
  29672. * continue
  29673. *
  29674. * if reuse_address: # <<<<<<<<<<<<<<
  29675. * sock.setsockopt(uv.SOL_SOCKET, uv.SO_REUSEADDR, 1)
  29676. * if reuse_port:
  29677. */
  29678. __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_reuse_address); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 1671, __pyx_L32_error)
  29679. if (__pyx_t_1) {
  29680. /* "uvloop/loop.pyx":1672
  29681. *
  29682. * if reuse_address:
  29683. * sock.setsockopt(uv.SOL_SOCKET, uv.SO_REUSEADDR, 1) # <<<<<<<<<<<<<<
  29684. * if reuse_port:
  29685. * sock.setsockopt(uv.SOL_SOCKET, uv.SO_REUSEPORT, 1)
  29686. */
  29687. __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_sock, __pyx_n_s_setsockopt); if (unlikely(!__pyx_t_15)) __PYX_ERR(2, 1672, __pyx_L32_error)
  29688. __Pyx_GOTREF(__pyx_t_15);
  29689. __pyx_t_4 = __Pyx_PyInt_From_int(SOL_SOCKET); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1672, __pyx_L32_error)
  29690. __Pyx_GOTREF(__pyx_t_4);
  29691. __pyx_t_7 = __Pyx_PyInt_From_int(SO_REUSEADDR); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 1672, __pyx_L32_error)
  29692. __Pyx_GOTREF(__pyx_t_7);
  29693. __pyx_t_16 = NULL;
  29694. __pyx_t_17 = 0;
  29695. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_15))) {
  29696. __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_15);
  29697. if (likely(__pyx_t_16)) {
  29698. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
  29699. __Pyx_INCREF(__pyx_t_16);
  29700. __Pyx_INCREF(function);
  29701. __Pyx_DECREF_SET(__pyx_t_15, function);
  29702. __pyx_t_17 = 1;
  29703. }
  29704. }
  29705. #if CYTHON_FAST_PYCALL
  29706. if (PyFunction_Check(__pyx_t_15)) {
  29707. PyObject *__pyx_temp[4] = {__pyx_t_16, __pyx_t_4, __pyx_t_7, __pyx_int_1};
  29708. __pyx_t_18 = __Pyx_PyFunction_FastCall(__pyx_t_15, __pyx_temp+1-__pyx_t_17, 3+__pyx_t_17); if (unlikely(!__pyx_t_18)) __PYX_ERR(2, 1672, __pyx_L32_error)
  29709. __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
  29710. __Pyx_GOTREF(__pyx_t_18);
  29711. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  29712. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  29713. } else
  29714. #endif
  29715. #if CYTHON_FAST_PYCCALL
  29716. if (__Pyx_PyFastCFunction_Check(__pyx_t_15)) {
  29717. PyObject *__pyx_temp[4] = {__pyx_t_16, __pyx_t_4, __pyx_t_7, __pyx_int_1};
  29718. __pyx_t_18 = __Pyx_PyCFunction_FastCall(__pyx_t_15, __pyx_temp+1-__pyx_t_17, 3+__pyx_t_17); if (unlikely(!__pyx_t_18)) __PYX_ERR(2, 1672, __pyx_L32_error)
  29719. __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
  29720. __Pyx_GOTREF(__pyx_t_18);
  29721. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  29722. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  29723. } else
  29724. #endif
  29725. {
  29726. __pyx_t_19 = PyTuple_New(3+__pyx_t_17); if (unlikely(!__pyx_t_19)) __PYX_ERR(2, 1672, __pyx_L32_error)
  29727. __Pyx_GOTREF(__pyx_t_19);
  29728. if (__pyx_t_16) {
  29729. __Pyx_GIVEREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_t_16); __pyx_t_16 = NULL;
  29730. }
  29731. __Pyx_GIVEREF(__pyx_t_4);
  29732. PyTuple_SET_ITEM(__pyx_t_19, 0+__pyx_t_17, __pyx_t_4);
  29733. __Pyx_GIVEREF(__pyx_t_7);
  29734. PyTuple_SET_ITEM(__pyx_t_19, 1+__pyx_t_17, __pyx_t_7);
  29735. __Pyx_INCREF(__pyx_int_1);
  29736. __Pyx_GIVEREF(__pyx_int_1);
  29737. PyTuple_SET_ITEM(__pyx_t_19, 2+__pyx_t_17, __pyx_int_1);
  29738. __pyx_t_4 = 0;
  29739. __pyx_t_7 = 0;
  29740. __pyx_t_18 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_t_19, NULL); if (unlikely(!__pyx_t_18)) __PYX_ERR(2, 1672, __pyx_L32_error)
  29741. __Pyx_GOTREF(__pyx_t_18);
  29742. __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  29743. }
  29744. __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  29745. __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  29746. /* "uvloop/loop.pyx":1671
  29747. * continue
  29748. *
  29749. * if reuse_address: # <<<<<<<<<<<<<<
  29750. * sock.setsockopt(uv.SOL_SOCKET, uv.SO_REUSEADDR, 1)
  29751. * if reuse_port:
  29752. */
  29753. }
  29754. /* "uvloop/loop.pyx":1673
  29755. * if reuse_address:
  29756. * sock.setsockopt(uv.SOL_SOCKET, uv.SO_REUSEADDR, 1)
  29757. * if reuse_port: # <<<<<<<<<<<<<<
  29758. * sock.setsockopt(uv.SOL_SOCKET, uv.SO_REUSEPORT, 1)
  29759. * # Disable IPv4/IPv6 dual stack support (enabled by
  29760. */
  29761. __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_reuse_port); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 1673, __pyx_L32_error)
  29762. if (__pyx_t_1) {
  29763. /* "uvloop/loop.pyx":1674
  29764. * sock.setsockopt(uv.SOL_SOCKET, uv.SO_REUSEADDR, 1)
  29765. * if reuse_port:
  29766. * sock.setsockopt(uv.SOL_SOCKET, uv.SO_REUSEPORT, 1) # <<<<<<<<<<<<<<
  29767. * # Disable IPv4/IPv6 dual stack support (enabled by
  29768. * # default on Linux) which makes a single socket
  29769. */
  29770. __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_sock, __pyx_n_s_setsockopt); if (unlikely(!__pyx_t_15)) __PYX_ERR(2, 1674, __pyx_L32_error)
  29771. __Pyx_GOTREF(__pyx_t_15);
  29772. __pyx_t_19 = __Pyx_PyInt_From_int(SOL_SOCKET); if (unlikely(!__pyx_t_19)) __PYX_ERR(2, 1674, __pyx_L32_error)
  29773. __Pyx_GOTREF(__pyx_t_19);
  29774. __pyx_t_7 = __Pyx_PyInt_From_int(SO_REUSEPORT); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 1674, __pyx_L32_error)
  29775. __Pyx_GOTREF(__pyx_t_7);
  29776. __pyx_t_4 = NULL;
  29777. __pyx_t_17 = 0;
  29778. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_15))) {
  29779. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_15);
  29780. if (likely(__pyx_t_4)) {
  29781. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
  29782. __Pyx_INCREF(__pyx_t_4);
  29783. __Pyx_INCREF(function);
  29784. __Pyx_DECREF_SET(__pyx_t_15, function);
  29785. __pyx_t_17 = 1;
  29786. }
  29787. }
  29788. #if CYTHON_FAST_PYCALL
  29789. if (PyFunction_Check(__pyx_t_15)) {
  29790. PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_19, __pyx_t_7, __pyx_int_1};
  29791. __pyx_t_18 = __Pyx_PyFunction_FastCall(__pyx_t_15, __pyx_temp+1-__pyx_t_17, 3+__pyx_t_17); if (unlikely(!__pyx_t_18)) __PYX_ERR(2, 1674, __pyx_L32_error)
  29792. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  29793. __Pyx_GOTREF(__pyx_t_18);
  29794. __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  29795. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  29796. } else
  29797. #endif
  29798. #if CYTHON_FAST_PYCCALL
  29799. if (__Pyx_PyFastCFunction_Check(__pyx_t_15)) {
  29800. PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_19, __pyx_t_7, __pyx_int_1};
  29801. __pyx_t_18 = __Pyx_PyCFunction_FastCall(__pyx_t_15, __pyx_temp+1-__pyx_t_17, 3+__pyx_t_17); if (unlikely(!__pyx_t_18)) __PYX_ERR(2, 1674, __pyx_L32_error)
  29802. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  29803. __Pyx_GOTREF(__pyx_t_18);
  29804. __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  29805. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  29806. } else
  29807. #endif
  29808. {
  29809. __pyx_t_16 = PyTuple_New(3+__pyx_t_17); if (unlikely(!__pyx_t_16)) __PYX_ERR(2, 1674, __pyx_L32_error)
  29810. __Pyx_GOTREF(__pyx_t_16);
  29811. if (__pyx_t_4) {
  29812. __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_4); __pyx_t_4 = NULL;
  29813. }
  29814. __Pyx_GIVEREF(__pyx_t_19);
  29815. PyTuple_SET_ITEM(__pyx_t_16, 0+__pyx_t_17, __pyx_t_19);
  29816. __Pyx_GIVEREF(__pyx_t_7);
  29817. PyTuple_SET_ITEM(__pyx_t_16, 1+__pyx_t_17, __pyx_t_7);
  29818. __Pyx_INCREF(__pyx_int_1);
  29819. __Pyx_GIVEREF(__pyx_int_1);
  29820. PyTuple_SET_ITEM(__pyx_t_16, 2+__pyx_t_17, __pyx_int_1);
  29821. __pyx_t_19 = 0;
  29822. __pyx_t_7 = 0;
  29823. __pyx_t_18 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_t_16, NULL); if (unlikely(!__pyx_t_18)) __PYX_ERR(2, 1674, __pyx_L32_error)
  29824. __Pyx_GOTREF(__pyx_t_18);
  29825. __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
  29826. }
  29827. __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  29828. __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  29829. /* "uvloop/loop.pyx":1673
  29830. * if reuse_address:
  29831. * sock.setsockopt(uv.SOL_SOCKET, uv.SO_REUSEADDR, 1)
  29832. * if reuse_port: # <<<<<<<<<<<<<<
  29833. * sock.setsockopt(uv.SOL_SOCKET, uv.SO_REUSEPORT, 1)
  29834. * # Disable IPv4/IPv6 dual stack support (enabled by
  29835. */
  29836. }
  29837. /* "uvloop/loop.pyx":1678
  29838. * # default on Linux) which makes a single socket
  29839. * # listen on both address families.
  29840. * if (addrinfo.ai_family == uv.AF_INET6 and # <<<<<<<<<<<<<<
  29841. * has_IPV6_V6ONLY):
  29842. * sock.setsockopt(uv.IPPROTO_IPV6, IPV6_V6ONLY, 1)
  29843. */
  29844. __pyx_t_3 = ((__pyx_cur_scope->__pyx_v_addrinfo->ai_family == AF_INET6) != 0);
  29845. if (__pyx_t_3) {
  29846. } else {
  29847. __pyx_t_1 = __pyx_t_3;
  29848. goto __pyx_L53_bool_binop_done;
  29849. }
  29850. /* "uvloop/loop.pyx":1679
  29851. * # listen on both address families.
  29852. * if (addrinfo.ai_family == uv.AF_INET6 and
  29853. * has_IPV6_V6ONLY): # <<<<<<<<<<<<<<
  29854. * sock.setsockopt(uv.IPPROTO_IPV6, IPV6_V6ONLY, 1)
  29855. *
  29856. */
  29857. __pyx_t_3 = (__pyx_v_6uvloop_4loop_has_IPV6_V6ONLY != 0);
  29858. __pyx_t_1 = __pyx_t_3;
  29859. __pyx_L53_bool_binop_done:;
  29860. /* "uvloop/loop.pyx":1678
  29861. * # default on Linux) which makes a single socket
  29862. * # listen on both address families.
  29863. * if (addrinfo.ai_family == uv.AF_INET6 and # <<<<<<<<<<<<<<
  29864. * has_IPV6_V6ONLY):
  29865. * sock.setsockopt(uv.IPPROTO_IPV6, IPV6_V6ONLY, 1)
  29866. */
  29867. if (__pyx_t_1) {
  29868. /* "uvloop/loop.pyx":1680
  29869. * if (addrinfo.ai_family == uv.AF_INET6 and
  29870. * has_IPV6_V6ONLY):
  29871. * sock.setsockopt(uv.IPPROTO_IPV6, IPV6_V6ONLY, 1) # <<<<<<<<<<<<<<
  29872. *
  29873. * pyaddr = __convert_sockaddr_to_pyaddr(addrinfo.ai_addr)
  29874. */
  29875. __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_sock, __pyx_n_s_setsockopt); if (unlikely(!__pyx_t_15)) __PYX_ERR(2, 1680, __pyx_L32_error)
  29876. __Pyx_GOTREF(__pyx_t_15);
  29877. __pyx_t_16 = __Pyx_PyInt_From_int(IPPROTO_IPV6); if (unlikely(!__pyx_t_16)) __PYX_ERR(2, 1680, __pyx_L32_error)
  29878. __Pyx_GOTREF(__pyx_t_16);
  29879. __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_6uvloop_4loop_IPV6_V6ONLY); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 1680, __pyx_L32_error)
  29880. __Pyx_GOTREF(__pyx_t_7);
  29881. __pyx_t_19 = NULL;
  29882. __pyx_t_17 = 0;
  29883. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_15))) {
  29884. __pyx_t_19 = PyMethod_GET_SELF(__pyx_t_15);
  29885. if (likely(__pyx_t_19)) {
  29886. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
  29887. __Pyx_INCREF(__pyx_t_19);
  29888. __Pyx_INCREF(function);
  29889. __Pyx_DECREF_SET(__pyx_t_15, function);
  29890. __pyx_t_17 = 1;
  29891. }
  29892. }
  29893. #if CYTHON_FAST_PYCALL
  29894. if (PyFunction_Check(__pyx_t_15)) {
  29895. PyObject *__pyx_temp[4] = {__pyx_t_19, __pyx_t_16, __pyx_t_7, __pyx_int_1};
  29896. __pyx_t_18 = __Pyx_PyFunction_FastCall(__pyx_t_15, __pyx_temp+1-__pyx_t_17, 3+__pyx_t_17); if (unlikely(!__pyx_t_18)) __PYX_ERR(2, 1680, __pyx_L32_error)
  29897. __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
  29898. __Pyx_GOTREF(__pyx_t_18);
  29899. __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
  29900. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  29901. } else
  29902. #endif
  29903. #if CYTHON_FAST_PYCCALL
  29904. if (__Pyx_PyFastCFunction_Check(__pyx_t_15)) {
  29905. PyObject *__pyx_temp[4] = {__pyx_t_19, __pyx_t_16, __pyx_t_7, __pyx_int_1};
  29906. __pyx_t_18 = __Pyx_PyCFunction_FastCall(__pyx_t_15, __pyx_temp+1-__pyx_t_17, 3+__pyx_t_17); if (unlikely(!__pyx_t_18)) __PYX_ERR(2, 1680, __pyx_L32_error)
  29907. __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
  29908. __Pyx_GOTREF(__pyx_t_18);
  29909. __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
  29910. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  29911. } else
  29912. #endif
  29913. {
  29914. __pyx_t_4 = PyTuple_New(3+__pyx_t_17); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1680, __pyx_L32_error)
  29915. __Pyx_GOTREF(__pyx_t_4);
  29916. if (__pyx_t_19) {
  29917. __Pyx_GIVEREF(__pyx_t_19); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_19); __pyx_t_19 = NULL;
  29918. }
  29919. __Pyx_GIVEREF(__pyx_t_16);
  29920. PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_17, __pyx_t_16);
  29921. __Pyx_GIVEREF(__pyx_t_7);
  29922. PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_17, __pyx_t_7);
  29923. __Pyx_INCREF(__pyx_int_1);
  29924. __Pyx_GIVEREF(__pyx_int_1);
  29925. PyTuple_SET_ITEM(__pyx_t_4, 2+__pyx_t_17, __pyx_int_1);
  29926. __pyx_t_16 = 0;
  29927. __pyx_t_7 = 0;
  29928. __pyx_t_18 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_t_4, NULL); if (unlikely(!__pyx_t_18)) __PYX_ERR(2, 1680, __pyx_L32_error)
  29929. __Pyx_GOTREF(__pyx_t_18);
  29930. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  29931. }
  29932. __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  29933. __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  29934. /* "uvloop/loop.pyx":1678
  29935. * # default on Linux) which makes a single socket
  29936. * # listen on both address families.
  29937. * if (addrinfo.ai_family == uv.AF_INET6 and # <<<<<<<<<<<<<<
  29938. * has_IPV6_V6ONLY):
  29939. * sock.setsockopt(uv.IPPROTO_IPV6, IPV6_V6ONLY, 1)
  29940. */
  29941. }
  29942. /* "uvloop/loop.pyx":1682
  29943. * sock.setsockopt(uv.IPPROTO_IPV6, IPV6_V6ONLY, 1)
  29944. *
  29945. * pyaddr = __convert_sockaddr_to_pyaddr(addrinfo.ai_addr) # <<<<<<<<<<<<<<
  29946. * try:
  29947. * sock.bind(pyaddr)
  29948. */
  29949. __pyx_t_18 = __pyx_f_6uvloop_4loop___convert_sockaddr_to_pyaddr(__pyx_cur_scope->__pyx_v_addrinfo->ai_addr); if (unlikely(!__pyx_t_18)) __PYX_ERR(2, 1682, __pyx_L32_error)
  29950. __Pyx_GOTREF(__pyx_t_18);
  29951. __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_pyaddr);
  29952. __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_pyaddr, __pyx_t_18);
  29953. __Pyx_GIVEREF(__pyx_t_18);
  29954. __pyx_t_18 = 0;
  29955. /* "uvloop/loop.pyx":1683
  29956. *
  29957. * pyaddr = __convert_sockaddr_to_pyaddr(addrinfo.ai_addr)
  29958. * try: # <<<<<<<<<<<<<<
  29959. * sock.bind(pyaddr)
  29960. * except OSError as err:
  29961. */
  29962. {
  29963. __Pyx_ExceptionSave(&__pyx_t_13, &__pyx_t_12, &__pyx_t_11);
  29964. __Pyx_XGOTREF(__pyx_t_13);
  29965. __Pyx_XGOTREF(__pyx_t_12);
  29966. __Pyx_XGOTREF(__pyx_t_11);
  29967. /*try:*/ {
  29968. /* "uvloop/loop.pyx":1684
  29969. * pyaddr = __convert_sockaddr_to_pyaddr(addrinfo.ai_addr)
  29970. * try:
  29971. * sock.bind(pyaddr) # <<<<<<<<<<<<<<
  29972. * except OSError as err:
  29973. * raise OSError(
  29974. */
  29975. __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_sock, __pyx_n_s_bind); if (unlikely(!__pyx_t_15)) __PYX_ERR(2, 1684, __pyx_L55_error)
  29976. __Pyx_GOTREF(__pyx_t_15);
  29977. __pyx_t_4 = NULL;
  29978. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_15))) {
  29979. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_15);
  29980. if (likely(__pyx_t_4)) {
  29981. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
  29982. __Pyx_INCREF(__pyx_t_4);
  29983. __Pyx_INCREF(function);
  29984. __Pyx_DECREF_SET(__pyx_t_15, function);
  29985. }
  29986. }
  29987. __pyx_t_18 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_15, __pyx_t_4, __pyx_cur_scope->__pyx_v_pyaddr) : __Pyx_PyObject_CallOneArg(__pyx_t_15, __pyx_cur_scope->__pyx_v_pyaddr);
  29988. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  29989. if (unlikely(!__pyx_t_18)) __PYX_ERR(2, 1684, __pyx_L55_error)
  29990. __Pyx_GOTREF(__pyx_t_18);
  29991. __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  29992. __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  29993. /* "uvloop/loop.pyx":1683
  29994. *
  29995. * pyaddr = __convert_sockaddr_to_pyaddr(addrinfo.ai_addr)
  29996. * try: # <<<<<<<<<<<<<<
  29997. * sock.bind(pyaddr)
  29998. * except OSError as err:
  29999. */
  30000. }
  30001. __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
  30002. __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
  30003. __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
  30004. goto __pyx_L62_try_end;
  30005. __pyx_L55_error:;
  30006. __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
  30007. __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
  30008. __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
  30009. __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
  30010. __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
  30011. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  30012. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  30013. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  30014. /* "uvloop/loop.pyx":1685
  30015. * try:
  30016. * sock.bind(pyaddr)
  30017. * except OSError as err: # <<<<<<<<<<<<<<
  30018. * raise OSError(
  30019. * err.errno, 'error while attempting '
  30020. */
  30021. __pyx_t_17 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_OSError);
  30022. if (__pyx_t_17) {
  30023. __Pyx_AddTraceback("uvloop.loop.Loop.create_server", __pyx_clineno, __pyx_lineno, __pyx_filename);
  30024. if (__Pyx_GetException(&__pyx_t_18, &__pyx_t_15, &__pyx_t_4) < 0) __PYX_ERR(2, 1685, __pyx_L57_except_error)
  30025. __Pyx_GOTREF(__pyx_t_18);
  30026. __Pyx_GOTREF(__pyx_t_15);
  30027. __Pyx_GOTREF(__pyx_t_4);
  30028. __Pyx_INCREF(__pyx_t_15);
  30029. __Pyx_GIVEREF(__pyx_t_15);
  30030. __pyx_cur_scope->__pyx_v_err = __pyx_t_15;
  30031. /*try:*/ {
  30032. /* "uvloop/loop.pyx":1687
  30033. * except OSError as err:
  30034. * raise OSError(
  30035. * err.errno, 'error while attempting ' # <<<<<<<<<<<<<<
  30036. * 'to bind on address %r: %s'
  30037. * % (pyaddr, err.strerror.lower())) from None
  30038. */
  30039. __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_err, __pyx_n_s_errno); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 1687, __pyx_L68_error)
  30040. __Pyx_GOTREF(__pyx_t_7);
  30041. __pyx_t_16 = PyTuple_New(4); if (unlikely(!__pyx_t_16)) __PYX_ERR(2, 1687, __pyx_L68_error)
  30042. __Pyx_GOTREF(__pyx_t_16);
  30043. __pyx_t_20 = 0;
  30044. __pyx_t_21 = 127;
  30045. __Pyx_INCREF(__pyx_kp_u_error_while_attempting_to_bind_o);
  30046. __pyx_t_20 += 42;
  30047. __Pyx_GIVEREF(__pyx_kp_u_error_while_attempting_to_bind_o);
  30048. PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_kp_u_error_while_attempting_to_bind_o);
  30049. /* "uvloop/loop.pyx":1689
  30050. * err.errno, 'error while attempting '
  30051. * 'to bind on address %r: %s'
  30052. * % (pyaddr, err.strerror.lower())) from None # <<<<<<<<<<<<<<
  30053. *
  30054. * tcp = TCPServer.new(self, protocol_factory, server,
  30055. */
  30056. __pyx_t_19 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_cur_scope->__pyx_v_pyaddr), __pyx_empty_unicode); if (unlikely(!__pyx_t_19)) __PYX_ERR(2, 1689, __pyx_L68_error)
  30057. __Pyx_GOTREF(__pyx_t_19);
  30058. __pyx_t_21 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_19) > __pyx_t_21) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_19) : __pyx_t_21;
  30059. __pyx_t_20 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_19);
  30060. __Pyx_GIVEREF(__pyx_t_19);
  30061. PyTuple_SET_ITEM(__pyx_t_16, 1, __pyx_t_19);
  30062. __pyx_t_19 = 0;
  30063. __Pyx_INCREF(__pyx_kp_u__46);
  30064. __pyx_t_20 += 2;
  30065. __Pyx_GIVEREF(__pyx_kp_u__46);
  30066. PyTuple_SET_ITEM(__pyx_t_16, 2, __pyx_kp_u__46);
  30067. __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_err, __pyx_n_s_strerror); if (unlikely(!__pyx_t_14)) __PYX_ERR(2, 1689, __pyx_L68_error)
  30068. __Pyx_GOTREF(__pyx_t_14);
  30069. __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_lower); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1689, __pyx_L68_error)
  30070. __Pyx_GOTREF(__pyx_t_6);
  30071. __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  30072. __pyx_t_14 = NULL;
  30073. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
  30074. __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_6);
  30075. if (likely(__pyx_t_14)) {
  30076. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
  30077. __Pyx_INCREF(__pyx_t_14);
  30078. __Pyx_INCREF(function);
  30079. __Pyx_DECREF_SET(__pyx_t_6, function);
  30080. }
  30081. }
  30082. __pyx_t_19 = (__pyx_t_14) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_14) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
  30083. __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
  30084. if (unlikely(!__pyx_t_19)) __PYX_ERR(2, 1689, __pyx_L68_error)
  30085. __Pyx_GOTREF(__pyx_t_19);
  30086. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  30087. __pyx_t_6 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_19), __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1689, __pyx_L68_error)
  30088. __Pyx_GOTREF(__pyx_t_6);
  30089. __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  30090. __pyx_t_21 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_21) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_21;
  30091. __pyx_t_20 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
  30092. __Pyx_GIVEREF(__pyx_t_6);
  30093. PyTuple_SET_ITEM(__pyx_t_16, 3, __pyx_t_6);
  30094. __pyx_t_6 = 0;
  30095. /* "uvloop/loop.pyx":1687
  30096. * except OSError as err:
  30097. * raise OSError(
  30098. * err.errno, 'error while attempting ' # <<<<<<<<<<<<<<
  30099. * 'to bind on address %r: %s'
  30100. * % (pyaddr, err.strerror.lower())) from None
  30101. */
  30102. __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_16, 4, __pyx_t_20, __pyx_t_21); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1687, __pyx_L68_error)
  30103. __Pyx_GOTREF(__pyx_t_6);
  30104. __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
  30105. /* "uvloop/loop.pyx":1686
  30106. * sock.bind(pyaddr)
  30107. * except OSError as err:
  30108. * raise OSError( # <<<<<<<<<<<<<<
  30109. * err.errno, 'error while attempting '
  30110. * 'to bind on address %r: %s'
  30111. */
  30112. __pyx_t_16 = PyTuple_New(2); if (unlikely(!__pyx_t_16)) __PYX_ERR(2, 1686, __pyx_L68_error)
  30113. __Pyx_GOTREF(__pyx_t_16);
  30114. __Pyx_GIVEREF(__pyx_t_7);
  30115. PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_7);
  30116. __Pyx_GIVEREF(__pyx_t_6);
  30117. PyTuple_SET_ITEM(__pyx_t_16, 1, __pyx_t_6);
  30118. __pyx_t_7 = 0;
  30119. __pyx_t_6 = 0;
  30120. __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_OSError, __pyx_t_16, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1686, __pyx_L68_error)
  30121. __Pyx_GOTREF(__pyx_t_6);
  30122. __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
  30123. /* "uvloop/loop.pyx":1689
  30124. * err.errno, 'error while attempting '
  30125. * 'to bind on address %r: %s'
  30126. * % (pyaddr, err.strerror.lower())) from None # <<<<<<<<<<<<<<
  30127. *
  30128. * tcp = TCPServer.new(self, protocol_factory, server,
  30129. */
  30130. __Pyx_Raise(__pyx_t_6, 0, 0, Py_None);
  30131. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  30132. __PYX_ERR(2, 1686, __pyx_L68_error)
  30133. }
  30134. /* "uvloop/loop.pyx":1685
  30135. * try:
  30136. * sock.bind(pyaddr)
  30137. * except OSError as err: # <<<<<<<<<<<<<<
  30138. * raise OSError(
  30139. * err.errno, 'error while attempting '
  30140. */
  30141. /*finally:*/ {
  30142. __pyx_L68_error:;
  30143. /*exception exit:*/{
  30144. __Pyx_PyThreadState_assign
  30145. __pyx_t_24 = 0; __pyx_t_25 = 0; __pyx_t_26 = 0; __pyx_t_27 = 0; __pyx_t_28 = 0; __pyx_t_29 = 0;
  30146. __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
  30147. __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
  30148. __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
  30149. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  30150. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  30151. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_27, &__pyx_t_28, &__pyx_t_29);
  30152. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_24, &__pyx_t_25, &__pyx_t_26) < 0)) __Pyx_ErrFetch(&__pyx_t_24, &__pyx_t_25, &__pyx_t_26);
  30153. __Pyx_XGOTREF(__pyx_t_24);
  30154. __Pyx_XGOTREF(__pyx_t_25);
  30155. __Pyx_XGOTREF(__pyx_t_26);
  30156. __Pyx_XGOTREF(__pyx_t_27);
  30157. __Pyx_XGOTREF(__pyx_t_28);
  30158. __Pyx_XGOTREF(__pyx_t_29);
  30159. __pyx_t_17 = __pyx_lineno; __pyx_t_22 = __pyx_clineno; __pyx_t_23 = __pyx_filename;
  30160. {
  30161. __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_err);
  30162. __Pyx_DECREF(__pyx_cur_scope->__pyx_v_err);
  30163. __pyx_cur_scope->__pyx_v_err = NULL;
  30164. }
  30165. if (PY_MAJOR_VERSION >= 3) {
  30166. __Pyx_XGIVEREF(__pyx_t_27);
  30167. __Pyx_XGIVEREF(__pyx_t_28);
  30168. __Pyx_XGIVEREF(__pyx_t_29);
  30169. __Pyx_ExceptionReset(__pyx_t_27, __pyx_t_28, __pyx_t_29);
  30170. }
  30171. __Pyx_XGIVEREF(__pyx_t_24);
  30172. __Pyx_XGIVEREF(__pyx_t_25);
  30173. __Pyx_XGIVEREF(__pyx_t_26);
  30174. __Pyx_ErrRestore(__pyx_t_24, __pyx_t_25, __pyx_t_26);
  30175. __pyx_t_24 = 0; __pyx_t_25 = 0; __pyx_t_26 = 0; __pyx_t_27 = 0; __pyx_t_28 = 0; __pyx_t_29 = 0;
  30176. __pyx_lineno = __pyx_t_17; __pyx_clineno = __pyx_t_22; __pyx_filename = __pyx_t_23;
  30177. goto __pyx_L57_except_error;
  30178. }
  30179. }
  30180. }
  30181. goto __pyx_L57_except_error;
  30182. __pyx_L57_except_error:;
  30183. /* "uvloop/loop.pyx":1683
  30184. *
  30185. * pyaddr = __convert_sockaddr_to_pyaddr(addrinfo.ai_addr)
  30186. * try: # <<<<<<<<<<<<<<
  30187. * sock.bind(pyaddr)
  30188. * except OSError as err:
  30189. */
  30190. __Pyx_XGIVEREF(__pyx_t_13);
  30191. __Pyx_XGIVEREF(__pyx_t_12);
  30192. __Pyx_XGIVEREF(__pyx_t_11);
  30193. __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_12, __pyx_t_11);
  30194. goto __pyx_L32_error;
  30195. __pyx_L62_try_end:;
  30196. }
  30197. /* "uvloop/loop.pyx":1691
  30198. * % (pyaddr, err.strerror.lower())) from None
  30199. *
  30200. * tcp = TCPServer.new(self, protocol_factory, server, # <<<<<<<<<<<<<<
  30201. * uv.AF_UNSPEC, backlog,
  30202. * ssl, ssl_handshake_timeout,
  30203. */
  30204. __pyx_t_4 = ((PyObject *)__pyx_f_6uvloop_4loop_9TCPServer_new(__pyx_cur_scope->__pyx_v_self, __pyx_cur_scope->__pyx_v_protocol_factory, __pyx_cur_scope->__pyx_v_server, AF_UNSPEC, __pyx_cur_scope->__pyx_v_backlog, __pyx_cur_scope->__pyx_v_ssl, __pyx_cur_scope->__pyx_v_ssl_handshake_timeout, __pyx_cur_scope->__pyx_v_ssl_shutdown_timeout)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1691, __pyx_L32_error)
  30205. __Pyx_GOTREF(__pyx_t_4);
  30206. __Pyx_XGOTREF(((PyObject *)__pyx_cur_scope->__pyx_v_tcp));
  30207. __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_tcp, ((struct __pyx_obj_6uvloop_4loop_TCPServer *)__pyx_t_4));
  30208. __Pyx_GIVEREF(__pyx_t_4);
  30209. __pyx_t_4 = 0;
  30210. /* "uvloop/loop.pyx":1696
  30211. * ssl_shutdown_timeout)
  30212. *
  30213. * try: # <<<<<<<<<<<<<<
  30214. * tcp._open(sock.fileno())
  30215. * except Exception:
  30216. */
  30217. {
  30218. __Pyx_ExceptionSave(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
  30219. __Pyx_XGOTREF(__pyx_t_11);
  30220. __Pyx_XGOTREF(__pyx_t_12);
  30221. __Pyx_XGOTREF(__pyx_t_13);
  30222. /*try:*/ {
  30223. /* "uvloop/loop.pyx":1697
  30224. *
  30225. * try:
  30226. * tcp._open(sock.fileno()) # <<<<<<<<<<<<<<
  30227. * except Exception:
  30228. * tcp._close()
  30229. */
  30230. __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_sock, __pyx_n_s_fileno); if (unlikely(!__pyx_t_15)) __PYX_ERR(2, 1697, __pyx_L74_error)
  30231. __Pyx_GOTREF(__pyx_t_15);
  30232. __pyx_t_18 = NULL;
  30233. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_15))) {
  30234. __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_15);
  30235. if (likely(__pyx_t_18)) {
  30236. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
  30237. __Pyx_INCREF(__pyx_t_18);
  30238. __Pyx_INCREF(function);
  30239. __Pyx_DECREF_SET(__pyx_t_15, function);
  30240. }
  30241. }
  30242. __pyx_t_4 = (__pyx_t_18) ? __Pyx_PyObject_CallOneArg(__pyx_t_15, __pyx_t_18) : __Pyx_PyObject_CallNoArg(__pyx_t_15);
  30243. __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
  30244. if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1697, __pyx_L74_error)
  30245. __Pyx_GOTREF(__pyx_t_4);
  30246. __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  30247. __pyx_t_22 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_22 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 1697, __pyx_L74_error)
  30248. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  30249. __pyx_t_4 = ((struct __pyx_vtabstruct_6uvloop_4loop_TCPServer *)__pyx_cur_scope->__pyx_v_tcp->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._open(((struct __pyx_obj_6uvloop_4loop_UVSocketHandle *)__pyx_cur_scope->__pyx_v_tcp), __pyx_t_22); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1697, __pyx_L74_error)
  30250. __Pyx_GOTREF(__pyx_t_4);
  30251. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  30252. /* "uvloop/loop.pyx":1696
  30253. * ssl_shutdown_timeout)
  30254. *
  30255. * try: # <<<<<<<<<<<<<<
  30256. * tcp._open(sock.fileno())
  30257. * except Exception:
  30258. */
  30259. }
  30260. __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
  30261. __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
  30262. __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
  30263. goto __pyx_L81_try_end;
  30264. __pyx_L74_error:;
  30265. __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
  30266. __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
  30267. __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
  30268. __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
  30269. __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
  30270. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  30271. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  30272. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  30273. /* "uvloop/loop.pyx":1698
  30274. * try:
  30275. * tcp._open(sock.fileno())
  30276. * except Exception: # <<<<<<<<<<<<<<
  30277. * tcp._close()
  30278. * raise
  30279. */
  30280. __pyx_t_22 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
  30281. if (__pyx_t_22) {
  30282. __Pyx_AddTraceback("uvloop.loop.Loop.create_server", __pyx_clineno, __pyx_lineno, __pyx_filename);
  30283. if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_15, &__pyx_t_18) < 0) __PYX_ERR(2, 1698, __pyx_L76_except_error)
  30284. __Pyx_GOTREF(__pyx_t_4);
  30285. __Pyx_GOTREF(__pyx_t_15);
  30286. __Pyx_GOTREF(__pyx_t_18);
  30287. /* "uvloop/loop.pyx":1699
  30288. * tcp._open(sock.fileno())
  30289. * except Exception:
  30290. * tcp._close() # <<<<<<<<<<<<<<
  30291. * raise
  30292. *
  30293. */
  30294. __pyx_t_6 = ((struct __pyx_vtabstruct_6uvloop_4loop_TCPServer *)__pyx_cur_scope->__pyx_v_tcp->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._close(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_cur_scope->__pyx_v_tcp)); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1699, __pyx_L76_except_error)
  30295. __Pyx_GOTREF(__pyx_t_6);
  30296. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  30297. /* "uvloop/loop.pyx":1700
  30298. * except Exception:
  30299. * tcp._close()
  30300. * raise # <<<<<<<<<<<<<<
  30301. *
  30302. * server._add_server(tcp)
  30303. */
  30304. __Pyx_GIVEREF(__pyx_t_4);
  30305. __Pyx_GIVEREF(__pyx_t_15);
  30306. __Pyx_XGIVEREF(__pyx_t_18);
  30307. __Pyx_ErrRestoreWithState(__pyx_t_4, __pyx_t_15, __pyx_t_18);
  30308. __pyx_t_4 = 0; __pyx_t_15 = 0; __pyx_t_18 = 0;
  30309. __PYX_ERR(2, 1700, __pyx_L76_except_error)
  30310. }
  30311. goto __pyx_L76_except_error;
  30312. __pyx_L76_except_error:;
  30313. /* "uvloop/loop.pyx":1696
  30314. * ssl_shutdown_timeout)
  30315. *
  30316. * try: # <<<<<<<<<<<<<<
  30317. * tcp._open(sock.fileno())
  30318. * except Exception:
  30319. */
  30320. __Pyx_XGIVEREF(__pyx_t_11);
  30321. __Pyx_XGIVEREF(__pyx_t_12);
  30322. __Pyx_XGIVEREF(__pyx_t_13);
  30323. __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13);
  30324. goto __pyx_L32_error;
  30325. __pyx_L81_try_end:;
  30326. }
  30327. /* "uvloop/loop.pyx":1702
  30328. * raise
  30329. *
  30330. * server._add_server(tcp) # <<<<<<<<<<<<<<
  30331. * sock.detach()
  30332. * sock = None
  30333. */
  30334. __pyx_t_18 = ((struct __pyx_vtabstruct_6uvloop_4loop_Server *)__pyx_cur_scope->__pyx_v_server->__pyx_vtab)->_add_server(__pyx_cur_scope->__pyx_v_server, ((struct __pyx_obj_6uvloop_4loop_UVStreamServer *)__pyx_cur_scope->__pyx_v_tcp)); if (unlikely(!__pyx_t_18)) __PYX_ERR(2, 1702, __pyx_L32_error)
  30335. __Pyx_GOTREF(__pyx_t_18);
  30336. __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  30337. /* "uvloop/loop.pyx":1703
  30338. *
  30339. * server._add_server(tcp)
  30340. * sock.detach() # <<<<<<<<<<<<<<
  30341. * sock = None
  30342. *
  30343. */
  30344. __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_sock, __pyx_n_s_detach); if (unlikely(!__pyx_t_15)) __PYX_ERR(2, 1703, __pyx_L32_error)
  30345. __Pyx_GOTREF(__pyx_t_15);
  30346. __pyx_t_4 = NULL;
  30347. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_15))) {
  30348. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_15);
  30349. if (likely(__pyx_t_4)) {
  30350. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
  30351. __Pyx_INCREF(__pyx_t_4);
  30352. __Pyx_INCREF(function);
  30353. __Pyx_DECREF_SET(__pyx_t_15, function);
  30354. }
  30355. }
  30356. __pyx_t_18 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_15, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_15);
  30357. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  30358. if (unlikely(!__pyx_t_18)) __PYX_ERR(2, 1703, __pyx_L32_error)
  30359. __Pyx_GOTREF(__pyx_t_18);
  30360. __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  30361. __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  30362. /* "uvloop/loop.pyx":1704
  30363. * server._add_server(tcp)
  30364. * sock.detach()
  30365. * sock = None # <<<<<<<<<<<<<<
  30366. *
  30367. * addrinfo = addrinfo.ai_next
  30368. */
  30369. __Pyx_INCREF(Py_None);
  30370. __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_sock);
  30371. __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_sock, Py_None);
  30372. __Pyx_GIVEREF(Py_None);
  30373. /* "uvloop/loop.pyx":1706
  30374. * sock = None
  30375. *
  30376. * addrinfo = addrinfo.ai_next # <<<<<<<<<<<<<<
  30377. *
  30378. * completed = True
  30379. */
  30380. __pyx_t_10 = __pyx_cur_scope->__pyx_v_addrinfo->ai_next;
  30381. __pyx_cur_scope->__pyx_v_addrinfo = __pyx_t_10;
  30382. __pyx_L36_continue:;
  30383. }
  30384. /* "uvloop/loop.pyx":1649
  30385. * sock = None
  30386. * try:
  30387. * for info in infos: # <<<<<<<<<<<<<<
  30388. * addrinfo = (<AddrInfo>info).data
  30389. * while addrinfo != NULL:
  30390. */
  30391. }
  30392. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  30393. /* "uvloop/loop.pyx":1708
  30394. * addrinfo = addrinfo.ai_next
  30395. *
  30396. * completed = True # <<<<<<<<<<<<<<
  30397. * finally:
  30398. * if not completed:
  30399. */
  30400. __pyx_cur_scope->__pyx_v_completed = 1;
  30401. }
  30402. /* "uvloop/loop.pyx":1710
  30403. * completed = True
  30404. * finally:
  30405. * if not completed: # <<<<<<<<<<<<<<
  30406. * if sock is not None:
  30407. * sock.close()
  30408. */
  30409. /*finally:*/ {
  30410. /*normal exit:*/{
  30411. __pyx_t_1 = ((!(__pyx_cur_scope->__pyx_v_completed != 0)) != 0);
  30412. if (__pyx_t_1) {
  30413. /* "uvloop/loop.pyx":1711
  30414. * finally:
  30415. * if not completed:
  30416. * if sock is not None: # <<<<<<<<<<<<<<
  30417. * sock.close()
  30418. * server.close()
  30419. */
  30420. __pyx_t_1 = (__pyx_cur_scope->__pyx_v_sock != Py_None);
  30421. __pyx_t_3 = (__pyx_t_1 != 0);
  30422. if (__pyx_t_3) {
  30423. /* "uvloop/loop.pyx":1712
  30424. * if not completed:
  30425. * if sock is not None:
  30426. * sock.close() # <<<<<<<<<<<<<<
  30427. * server.close()
  30428. * else:
  30429. */
  30430. __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_sock, __pyx_n_s_close); if (unlikely(!__pyx_t_18)) __PYX_ERR(2, 1712, __pyx_L1_error)
  30431. __Pyx_GOTREF(__pyx_t_18);
  30432. __pyx_t_15 = NULL;
  30433. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_18))) {
  30434. __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_18);
  30435. if (likely(__pyx_t_15)) {
  30436. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_18);
  30437. __Pyx_INCREF(__pyx_t_15);
  30438. __Pyx_INCREF(function);
  30439. __Pyx_DECREF_SET(__pyx_t_18, function);
  30440. }
  30441. }
  30442. __pyx_t_5 = (__pyx_t_15) ? __Pyx_PyObject_CallOneArg(__pyx_t_18, __pyx_t_15) : __Pyx_PyObject_CallNoArg(__pyx_t_18);
  30443. __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
  30444. if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1712, __pyx_L1_error)
  30445. __Pyx_GOTREF(__pyx_t_5);
  30446. __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  30447. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  30448. /* "uvloop/loop.pyx":1711
  30449. * finally:
  30450. * if not completed:
  30451. * if sock is not None: # <<<<<<<<<<<<<<
  30452. * sock.close()
  30453. * server.close()
  30454. */
  30455. }
  30456. /* "uvloop/loop.pyx":1713
  30457. * if sock is not None:
  30458. * sock.close()
  30459. * server.close() # <<<<<<<<<<<<<<
  30460. * else:
  30461. * if sock is None:
  30462. */
  30463. __pyx_t_18 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_server), __pyx_n_s_close); if (unlikely(!__pyx_t_18)) __PYX_ERR(2, 1713, __pyx_L1_error)
  30464. __Pyx_GOTREF(__pyx_t_18);
  30465. __pyx_t_15 = NULL;
  30466. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_18))) {
  30467. __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_18);
  30468. if (likely(__pyx_t_15)) {
  30469. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_18);
  30470. __Pyx_INCREF(__pyx_t_15);
  30471. __Pyx_INCREF(function);
  30472. __Pyx_DECREF_SET(__pyx_t_18, function);
  30473. }
  30474. }
  30475. __pyx_t_5 = (__pyx_t_15) ? __Pyx_PyObject_CallOneArg(__pyx_t_18, __pyx_t_15) : __Pyx_PyObject_CallNoArg(__pyx_t_18);
  30476. __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
  30477. if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1713, __pyx_L1_error)
  30478. __Pyx_GOTREF(__pyx_t_5);
  30479. __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  30480. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  30481. /* "uvloop/loop.pyx":1710
  30482. * completed = True
  30483. * finally:
  30484. * if not completed: # <<<<<<<<<<<<<<
  30485. * if sock is not None:
  30486. * sock.close()
  30487. */
  30488. }
  30489. goto __pyx_L33;
  30490. }
  30491. __pyx_L32_error:;
  30492. /*exception exit:*/{
  30493. __Pyx_PyThreadState_assign
  30494. __pyx_t_13 = 0; __pyx_t_12 = 0; __pyx_t_11 = 0; __pyx_t_29 = 0; __pyx_t_28 = 0; __pyx_t_27 = 0;
  30495. __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
  30496. __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
  30497. __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
  30498. __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
  30499. __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
  30500. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  30501. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  30502. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  30503. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  30504. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_29, &__pyx_t_28, &__pyx_t_27);
  30505. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_13, &__pyx_t_12, &__pyx_t_11) < 0)) __Pyx_ErrFetch(&__pyx_t_13, &__pyx_t_12, &__pyx_t_11);
  30506. __Pyx_XGOTREF(__pyx_t_13);
  30507. __Pyx_XGOTREF(__pyx_t_12);
  30508. __Pyx_XGOTREF(__pyx_t_11);
  30509. __Pyx_XGOTREF(__pyx_t_29);
  30510. __Pyx_XGOTREF(__pyx_t_28);
  30511. __Pyx_XGOTREF(__pyx_t_27);
  30512. __pyx_t_22 = __pyx_lineno; __pyx_t_17 = __pyx_clineno; __pyx_t_30 = __pyx_filename;
  30513. {
  30514. __pyx_t_3 = ((!(__pyx_cur_scope->__pyx_v_completed != 0)) != 0);
  30515. if (__pyx_t_3) {
  30516. /* "uvloop/loop.pyx":1711
  30517. * finally:
  30518. * if not completed:
  30519. * if sock is not None: # <<<<<<<<<<<<<<
  30520. * sock.close()
  30521. * server.close()
  30522. */
  30523. __pyx_t_3 = (__pyx_cur_scope->__pyx_v_sock != Py_None);
  30524. __pyx_t_1 = (__pyx_t_3 != 0);
  30525. if (__pyx_t_1) {
  30526. /* "uvloop/loop.pyx":1712
  30527. * if not completed:
  30528. * if sock is not None:
  30529. * sock.close() # <<<<<<<<<<<<<<
  30530. * server.close()
  30531. * else:
  30532. */
  30533. __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_sock, __pyx_n_s_close); if (unlikely(!__pyx_t_18)) __PYX_ERR(2, 1712, __pyx_L87_error)
  30534. __Pyx_GOTREF(__pyx_t_18);
  30535. __pyx_t_15 = NULL;
  30536. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_18))) {
  30537. __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_18);
  30538. if (likely(__pyx_t_15)) {
  30539. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_18);
  30540. __Pyx_INCREF(__pyx_t_15);
  30541. __Pyx_INCREF(function);
  30542. __Pyx_DECREF_SET(__pyx_t_18, function);
  30543. }
  30544. }
  30545. __pyx_t_5 = (__pyx_t_15) ? __Pyx_PyObject_CallOneArg(__pyx_t_18, __pyx_t_15) : __Pyx_PyObject_CallNoArg(__pyx_t_18);
  30546. __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
  30547. if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1712, __pyx_L87_error)
  30548. __Pyx_GOTREF(__pyx_t_5);
  30549. __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  30550. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  30551. /* "uvloop/loop.pyx":1711
  30552. * finally:
  30553. * if not completed:
  30554. * if sock is not None: # <<<<<<<<<<<<<<
  30555. * sock.close()
  30556. * server.close()
  30557. */
  30558. }
  30559. /* "uvloop/loop.pyx":1713
  30560. * if sock is not None:
  30561. * sock.close()
  30562. * server.close() # <<<<<<<<<<<<<<
  30563. * else:
  30564. * if sock is None:
  30565. */
  30566. __pyx_t_18 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_server), __pyx_n_s_close); if (unlikely(!__pyx_t_18)) __PYX_ERR(2, 1713, __pyx_L87_error)
  30567. __Pyx_GOTREF(__pyx_t_18);
  30568. __pyx_t_15 = NULL;
  30569. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_18))) {
  30570. __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_18);
  30571. if (likely(__pyx_t_15)) {
  30572. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_18);
  30573. __Pyx_INCREF(__pyx_t_15);
  30574. __Pyx_INCREF(function);
  30575. __Pyx_DECREF_SET(__pyx_t_18, function);
  30576. }
  30577. }
  30578. __pyx_t_5 = (__pyx_t_15) ? __Pyx_PyObject_CallOneArg(__pyx_t_18, __pyx_t_15) : __Pyx_PyObject_CallNoArg(__pyx_t_18);
  30579. __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
  30580. if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1713, __pyx_L87_error)
  30581. __Pyx_GOTREF(__pyx_t_5);
  30582. __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  30583. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  30584. /* "uvloop/loop.pyx":1710
  30585. * completed = True
  30586. * finally:
  30587. * if not completed: # <<<<<<<<<<<<<<
  30588. * if sock is not None:
  30589. * sock.close()
  30590. */
  30591. }
  30592. }
  30593. if (PY_MAJOR_VERSION >= 3) {
  30594. __Pyx_XGIVEREF(__pyx_t_29);
  30595. __Pyx_XGIVEREF(__pyx_t_28);
  30596. __Pyx_XGIVEREF(__pyx_t_27);
  30597. __Pyx_ExceptionReset(__pyx_t_29, __pyx_t_28, __pyx_t_27);
  30598. }
  30599. __Pyx_XGIVEREF(__pyx_t_13);
  30600. __Pyx_XGIVEREF(__pyx_t_12);
  30601. __Pyx_XGIVEREF(__pyx_t_11);
  30602. __Pyx_ErrRestore(__pyx_t_13, __pyx_t_12, __pyx_t_11);
  30603. __pyx_t_13 = 0; __pyx_t_12 = 0; __pyx_t_11 = 0; __pyx_t_29 = 0; __pyx_t_28 = 0; __pyx_t_27 = 0;
  30604. __pyx_lineno = __pyx_t_22; __pyx_clineno = __pyx_t_17; __pyx_filename = __pyx_t_30;
  30605. goto __pyx_L1_error;
  30606. __pyx_L87_error:;
  30607. if (PY_MAJOR_VERSION >= 3) {
  30608. __Pyx_XGIVEREF(__pyx_t_29);
  30609. __Pyx_XGIVEREF(__pyx_t_28);
  30610. __Pyx_XGIVEREF(__pyx_t_27);
  30611. __Pyx_ExceptionReset(__pyx_t_29, __pyx_t_28, __pyx_t_27);
  30612. }
  30613. __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
  30614. __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
  30615. __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
  30616. __pyx_t_29 = 0; __pyx_t_28 = 0; __pyx_t_27 = 0;
  30617. goto __pyx_L1_error;
  30618. }
  30619. __pyx_L33:;
  30620. }
  30621. /* "uvloop/loop.pyx":1621
  30622. * 'ssl_shutdown_timeout is only meaningful with ssl')
  30623. *
  30624. * if host is not None or port is not None: # <<<<<<<<<<<<<<
  30625. * if sock is not None:
  30626. * raise ValueError(
  30627. */
  30628. goto __pyx_L15;
  30629. }
  30630. /* "uvloop/loop.pyx":1715
  30631. * server.close()
  30632. * else:
  30633. * if sock is None: # <<<<<<<<<<<<<<
  30634. * raise ValueError('Neither host/port nor sock were specified')
  30635. * if not _is_sock_stream(sock.type):
  30636. */
  30637. /*else*/ {
  30638. __pyx_t_1 = (__pyx_cur_scope->__pyx_v_sock == Py_None);
  30639. __pyx_t_3 = (__pyx_t_1 != 0);
  30640. if (unlikely(__pyx_t_3)) {
  30641. /* "uvloop/loop.pyx":1716
  30642. * else:
  30643. * if sock is None:
  30644. * raise ValueError('Neither host/port nor sock were specified') # <<<<<<<<<<<<<<
  30645. * if not _is_sock_stream(sock.type):
  30646. * raise ValueError(
  30647. */
  30648. __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__47, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1716, __pyx_L1_error)
  30649. __Pyx_GOTREF(__pyx_t_5);
  30650. __Pyx_Raise(__pyx_t_5, 0, 0, 0);
  30651. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  30652. __PYX_ERR(2, 1716, __pyx_L1_error)
  30653. /* "uvloop/loop.pyx":1715
  30654. * server.close()
  30655. * else:
  30656. * if sock is None: # <<<<<<<<<<<<<<
  30657. * raise ValueError('Neither host/port nor sock were specified')
  30658. * if not _is_sock_stream(sock.type):
  30659. */
  30660. }
  30661. /* "uvloop/loop.pyx":1717
  30662. * if sock is None:
  30663. * raise ValueError('Neither host/port nor sock were specified')
  30664. * if not _is_sock_stream(sock.type): # <<<<<<<<<<<<<<
  30665. * raise ValueError(
  30666. * 'A Stream Socket was expected, got {!r}'.format(sock))
  30667. */
  30668. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_sock, __pyx_n_s_type); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1717, __pyx_L1_error)
  30669. __Pyx_GOTREF(__pyx_t_5);
  30670. __pyx_t_18 = __pyx_f_6uvloop_4loop__is_sock_stream(__pyx_t_5); if (unlikely(!__pyx_t_18)) __PYX_ERR(2, 1717, __pyx_L1_error)
  30671. __Pyx_GOTREF(__pyx_t_18);
  30672. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  30673. __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_18); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(2, 1717, __pyx_L1_error)
  30674. __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  30675. __pyx_t_1 = ((!__pyx_t_3) != 0);
  30676. if (unlikely(__pyx_t_1)) {
  30677. /* "uvloop/loop.pyx":1719
  30678. * if not _is_sock_stream(sock.type):
  30679. * raise ValueError(
  30680. * 'A Stream Socket was expected, got {!r}'.format(sock)) # <<<<<<<<<<<<<<
  30681. *
  30682. * # libuv will set the socket to non-blocking mode, but
  30683. */
  30684. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_A_Stream_Socket_was_expected_got, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1719, __pyx_L1_error)
  30685. __Pyx_GOTREF(__pyx_t_5);
  30686. __pyx_t_15 = NULL;
  30687. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
  30688. __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_5);
  30689. if (likely(__pyx_t_15)) {
  30690. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
  30691. __Pyx_INCREF(__pyx_t_15);
  30692. __Pyx_INCREF(function);
  30693. __Pyx_DECREF_SET(__pyx_t_5, function);
  30694. }
  30695. }
  30696. __pyx_t_18 = (__pyx_t_15) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_15, __pyx_cur_scope->__pyx_v_sock) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_cur_scope->__pyx_v_sock);
  30697. __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
  30698. if (unlikely(!__pyx_t_18)) __PYX_ERR(2, 1719, __pyx_L1_error)
  30699. __Pyx_GOTREF(__pyx_t_18);
  30700. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  30701. /* "uvloop/loop.pyx":1718
  30702. * raise ValueError('Neither host/port nor sock were specified')
  30703. * if not _is_sock_stream(sock.type):
  30704. * raise ValueError( # <<<<<<<<<<<<<<
  30705. * 'A Stream Socket was expected, got {!r}'.format(sock))
  30706. *
  30707. */
  30708. __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_18); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1718, __pyx_L1_error)
  30709. __Pyx_GOTREF(__pyx_t_5);
  30710. __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  30711. __Pyx_Raise(__pyx_t_5, 0, 0, 0);
  30712. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  30713. __PYX_ERR(2, 1718, __pyx_L1_error)
  30714. /* "uvloop/loop.pyx":1717
  30715. * if sock is None:
  30716. * raise ValueError('Neither host/port nor sock were specified')
  30717. * if not _is_sock_stream(sock.type): # <<<<<<<<<<<<<<
  30718. * raise ValueError(
  30719. * 'A Stream Socket was expected, got {!r}'.format(sock))
  30720. */
  30721. }
  30722. /* "uvloop/loop.pyx":1723
  30723. * # libuv will set the socket to non-blocking mode, but
  30724. * # we want Python socket object to notice that.
  30725. * sock.setblocking(False) # <<<<<<<<<<<<<<
  30726. *
  30727. * tcp = TCPServer.new(self, protocol_factory, server,
  30728. */
  30729. __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_sock, __pyx_n_s_setblocking); if (unlikely(!__pyx_t_18)) __PYX_ERR(2, 1723, __pyx_L1_error)
  30730. __Pyx_GOTREF(__pyx_t_18);
  30731. __pyx_t_15 = NULL;
  30732. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_18))) {
  30733. __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_18);
  30734. if (likely(__pyx_t_15)) {
  30735. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_18);
  30736. __Pyx_INCREF(__pyx_t_15);
  30737. __Pyx_INCREF(function);
  30738. __Pyx_DECREF_SET(__pyx_t_18, function);
  30739. }
  30740. }
  30741. __pyx_t_5 = (__pyx_t_15) ? __Pyx_PyObject_Call2Args(__pyx_t_18, __pyx_t_15, Py_False) : __Pyx_PyObject_CallOneArg(__pyx_t_18, Py_False);
  30742. __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
  30743. if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1723, __pyx_L1_error)
  30744. __Pyx_GOTREF(__pyx_t_5);
  30745. __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  30746. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  30747. /* "uvloop/loop.pyx":1725
  30748. * sock.setblocking(False)
  30749. *
  30750. * tcp = TCPServer.new(self, protocol_factory, server, # <<<<<<<<<<<<<<
  30751. * uv.AF_UNSPEC, backlog,
  30752. * ssl, ssl_handshake_timeout,
  30753. */
  30754. __pyx_t_5 = ((PyObject *)__pyx_f_6uvloop_4loop_9TCPServer_new(__pyx_cur_scope->__pyx_v_self, __pyx_cur_scope->__pyx_v_protocol_factory, __pyx_cur_scope->__pyx_v_server, AF_UNSPEC, __pyx_cur_scope->__pyx_v_backlog, __pyx_cur_scope->__pyx_v_ssl, __pyx_cur_scope->__pyx_v_ssl_handshake_timeout, __pyx_cur_scope->__pyx_v_ssl_shutdown_timeout)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1725, __pyx_L1_error)
  30755. __Pyx_GOTREF(__pyx_t_5);
  30756. __Pyx_GIVEREF(__pyx_t_5);
  30757. __pyx_cur_scope->__pyx_v_tcp = ((struct __pyx_obj_6uvloop_4loop_TCPServer *)__pyx_t_5);
  30758. __pyx_t_5 = 0;
  30759. /* "uvloop/loop.pyx":1730
  30760. * ssl_shutdown_timeout)
  30761. *
  30762. * try: # <<<<<<<<<<<<<<
  30763. * tcp._open(sock.fileno())
  30764. * except Exception:
  30765. */
  30766. {
  30767. __Pyx_ExceptionSave(&__pyx_t_27, &__pyx_t_28, &__pyx_t_29);
  30768. __Pyx_XGOTREF(__pyx_t_27);
  30769. __Pyx_XGOTREF(__pyx_t_28);
  30770. __Pyx_XGOTREF(__pyx_t_29);
  30771. /*try:*/ {
  30772. /* "uvloop/loop.pyx":1731
  30773. *
  30774. * try:
  30775. * tcp._open(sock.fileno()) # <<<<<<<<<<<<<<
  30776. * except Exception:
  30777. * tcp._close()
  30778. */
  30779. __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_sock, __pyx_n_s_fileno); if (unlikely(!__pyx_t_18)) __PYX_ERR(2, 1731, __pyx_L92_error)
  30780. __Pyx_GOTREF(__pyx_t_18);
  30781. __pyx_t_15 = NULL;
  30782. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_18))) {
  30783. __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_18);
  30784. if (likely(__pyx_t_15)) {
  30785. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_18);
  30786. __Pyx_INCREF(__pyx_t_15);
  30787. __Pyx_INCREF(function);
  30788. __Pyx_DECREF_SET(__pyx_t_18, function);
  30789. }
  30790. }
  30791. __pyx_t_5 = (__pyx_t_15) ? __Pyx_PyObject_CallOneArg(__pyx_t_18, __pyx_t_15) : __Pyx_PyObject_CallNoArg(__pyx_t_18);
  30792. __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
  30793. if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1731, __pyx_L92_error)
  30794. __Pyx_GOTREF(__pyx_t_5);
  30795. __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  30796. __pyx_t_17 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_17 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 1731, __pyx_L92_error)
  30797. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  30798. __pyx_t_5 = ((struct __pyx_vtabstruct_6uvloop_4loop_TCPServer *)__pyx_cur_scope->__pyx_v_tcp->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._open(((struct __pyx_obj_6uvloop_4loop_UVSocketHandle *)__pyx_cur_scope->__pyx_v_tcp), __pyx_t_17); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1731, __pyx_L92_error)
  30799. __Pyx_GOTREF(__pyx_t_5);
  30800. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  30801. /* "uvloop/loop.pyx":1730
  30802. * ssl_shutdown_timeout)
  30803. *
  30804. * try: # <<<<<<<<<<<<<<
  30805. * tcp._open(sock.fileno())
  30806. * except Exception:
  30807. */
  30808. }
  30809. __Pyx_XDECREF(__pyx_t_27); __pyx_t_27 = 0;
  30810. __Pyx_XDECREF(__pyx_t_28); __pyx_t_28 = 0;
  30811. __Pyx_XDECREF(__pyx_t_29); __pyx_t_29 = 0;
  30812. goto __pyx_L97_try_end;
  30813. __pyx_L92_error:;
  30814. __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
  30815. __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
  30816. __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
  30817. __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
  30818. __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
  30819. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  30820. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  30821. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  30822. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  30823. /* "uvloop/loop.pyx":1732
  30824. * try:
  30825. * tcp._open(sock.fileno())
  30826. * except Exception: # <<<<<<<<<<<<<<
  30827. * tcp._close()
  30828. * raise
  30829. */
  30830. __pyx_t_17 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
  30831. if (__pyx_t_17) {
  30832. __Pyx_AddTraceback("uvloop.loop.Loop.create_server", __pyx_clineno, __pyx_lineno, __pyx_filename);
  30833. if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_18, &__pyx_t_15) < 0) __PYX_ERR(2, 1732, __pyx_L94_except_error)
  30834. __Pyx_GOTREF(__pyx_t_5);
  30835. __Pyx_GOTREF(__pyx_t_18);
  30836. __Pyx_GOTREF(__pyx_t_15);
  30837. /* "uvloop/loop.pyx":1733
  30838. * tcp._open(sock.fileno())
  30839. * except Exception:
  30840. * tcp._close() # <<<<<<<<<<<<<<
  30841. * raise
  30842. *
  30843. */
  30844. __pyx_t_4 = ((struct __pyx_vtabstruct_6uvloop_4loop_TCPServer *)__pyx_cur_scope->__pyx_v_tcp->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._close(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_cur_scope->__pyx_v_tcp)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1733, __pyx_L94_except_error)
  30845. __Pyx_GOTREF(__pyx_t_4);
  30846. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  30847. /* "uvloop/loop.pyx":1734
  30848. * except Exception:
  30849. * tcp._close()
  30850. * raise # <<<<<<<<<<<<<<
  30851. *
  30852. * tcp._attach_fileobj(sock)
  30853. */
  30854. __Pyx_GIVEREF(__pyx_t_5);
  30855. __Pyx_GIVEREF(__pyx_t_18);
  30856. __Pyx_XGIVEREF(__pyx_t_15);
  30857. __Pyx_ErrRestoreWithState(__pyx_t_5, __pyx_t_18, __pyx_t_15);
  30858. __pyx_t_5 = 0; __pyx_t_18 = 0; __pyx_t_15 = 0;
  30859. __PYX_ERR(2, 1734, __pyx_L94_except_error)
  30860. }
  30861. goto __pyx_L94_except_error;
  30862. __pyx_L94_except_error:;
  30863. /* "uvloop/loop.pyx":1730
  30864. * ssl_shutdown_timeout)
  30865. *
  30866. * try: # <<<<<<<<<<<<<<
  30867. * tcp._open(sock.fileno())
  30868. * except Exception:
  30869. */
  30870. __Pyx_XGIVEREF(__pyx_t_27);
  30871. __Pyx_XGIVEREF(__pyx_t_28);
  30872. __Pyx_XGIVEREF(__pyx_t_29);
  30873. __Pyx_ExceptionReset(__pyx_t_27, __pyx_t_28, __pyx_t_29);
  30874. goto __pyx_L1_error;
  30875. __pyx_L97_try_end:;
  30876. }
  30877. /* "uvloop/loop.pyx":1736
  30878. * raise
  30879. *
  30880. * tcp._attach_fileobj(sock) # <<<<<<<<<<<<<<
  30881. * server._add_server(tcp)
  30882. *
  30883. */
  30884. __pyx_t_15 = ((struct __pyx_vtabstruct_6uvloop_4loop_TCPServer *)__pyx_cur_scope->__pyx_v_tcp->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._attach_fileobj(((struct __pyx_obj_6uvloop_4loop_UVSocketHandle *)__pyx_cur_scope->__pyx_v_tcp), __pyx_cur_scope->__pyx_v_sock); if (unlikely(!__pyx_t_15)) __PYX_ERR(2, 1736, __pyx_L1_error)
  30885. __Pyx_GOTREF(__pyx_t_15);
  30886. __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  30887. /* "uvloop/loop.pyx":1737
  30888. *
  30889. * tcp._attach_fileobj(sock)
  30890. * server._add_server(tcp) # <<<<<<<<<<<<<<
  30891. *
  30892. * if start_serving:
  30893. */
  30894. __pyx_t_15 = ((struct __pyx_vtabstruct_6uvloop_4loop_Server *)__pyx_cur_scope->__pyx_v_server->__pyx_vtab)->_add_server(__pyx_cur_scope->__pyx_v_server, ((struct __pyx_obj_6uvloop_4loop_UVStreamServer *)__pyx_cur_scope->__pyx_v_tcp)); if (unlikely(!__pyx_t_15)) __PYX_ERR(2, 1737, __pyx_L1_error)
  30895. __Pyx_GOTREF(__pyx_t_15);
  30896. __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  30897. }
  30898. __pyx_L15:;
  30899. /* "uvloop/loop.pyx":1739
  30900. * server._add_server(tcp)
  30901. *
  30902. * if start_serving: # <<<<<<<<<<<<<<
  30903. * server._start_serving()
  30904. *
  30905. */
  30906. __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_start_serving); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 1739, __pyx_L1_error)
  30907. if (__pyx_t_1) {
  30908. /* "uvloop/loop.pyx":1740
  30909. *
  30910. * if start_serving:
  30911. * server._start_serving() # <<<<<<<<<<<<<<
  30912. *
  30913. * server._ref()
  30914. */
  30915. __pyx_t_15 = ((struct __pyx_vtabstruct_6uvloop_4loop_Server *)__pyx_cur_scope->__pyx_v_server->__pyx_vtab)->_start_serving(__pyx_cur_scope->__pyx_v_server); if (unlikely(!__pyx_t_15)) __PYX_ERR(2, 1740, __pyx_L1_error)
  30916. __Pyx_GOTREF(__pyx_t_15);
  30917. __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  30918. /* "uvloop/loop.pyx":1739
  30919. * server._add_server(tcp)
  30920. *
  30921. * if start_serving: # <<<<<<<<<<<<<<
  30922. * server._start_serving()
  30923. *
  30924. */
  30925. }
  30926. /* "uvloop/loop.pyx":1742
  30927. * server._start_serving()
  30928. *
  30929. * server._ref() # <<<<<<<<<<<<<<
  30930. * return server
  30931. *
  30932. */
  30933. __pyx_t_15 = ((struct __pyx_vtabstruct_6uvloop_4loop_Server *)__pyx_cur_scope->__pyx_v_server->__pyx_vtab)->_ref(__pyx_cur_scope->__pyx_v_server); if (unlikely(!__pyx_t_15)) __PYX_ERR(2, 1742, __pyx_L1_error)
  30934. __Pyx_GOTREF(__pyx_t_15);
  30935. __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  30936. /* "uvloop/loop.pyx":1743
  30937. *
  30938. * server._ref()
  30939. * return server # <<<<<<<<<<<<<<
  30940. *
  30941. * @cython.iterable_coroutine
  30942. */
  30943. __Pyx_XDECREF(__pyx_r);
  30944. __pyx_r = NULL; __Pyx_ReturnWithStopIteration(((PyObject *)__pyx_cur_scope->__pyx_v_server));
  30945. goto __pyx_L0;
  30946. CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
  30947. /* "uvloop/loop.pyx":1540
  30948. *
  30949. * @cython.iterable_coroutine
  30950. * async def create_server(self, protocol_factory, host=None, port=None, # <<<<<<<<<<<<<<
  30951. * *,
  30952. * int family=uv.AF_UNSPEC,
  30953. */
  30954. /* function exit code */
  30955. __pyx_L1_error:;
  30956. __Pyx_XDECREF(__pyx_t_4);
  30957. __Pyx_XDECREF(__pyx_t_5);
  30958. __Pyx_XDECREF(__pyx_t_6);
  30959. __Pyx_XDECREF(__pyx_t_7);
  30960. __Pyx_XDECREF(__pyx_t_14);
  30961. __Pyx_XDECREF(__pyx_t_15);
  30962. __Pyx_XDECREF(__pyx_t_16);
  30963. __Pyx_XDECREF(__pyx_t_18);
  30964. __Pyx_XDECREF(__pyx_t_19);
  30965. __Pyx_AddTraceback("create_server", __pyx_clineno, __pyx_lineno, __pyx_filename);
  30966. __pyx_L0:;
  30967. __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  30968. #if !CYTHON_USE_EXC_INFO_STACK
  30969. __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  30970. #endif
  30971. __pyx_generator->resume_label = -1;
  30972. __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  30973. __Pyx_RefNannyFinishContext();
  30974. return __pyx_r;
  30975. }
  30976. static PyObject *__pyx_gb_6uvloop_4loop_4Loop_60generator4(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
  30977. /* "uvloop/loop.pyx":1746
  30978. *
  30979. * @cython.iterable_coroutine
  30980. * async def create_connection(self, protocol_factory, host=None, port=None, # <<<<<<<<<<<<<<
  30981. * *,
  30982. * ssl=None,
  30983. */
  30984. /* Python wrapper */
  30985. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_59create_connection(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  30986. static char __pyx_doc_6uvloop_4loop_4Loop_58create_connection[] = "Loop.create_connection(self, protocol_factory, host=None, port=None, *, ssl=None, family=0, proto=0, flags=0, sock=None, local_addr=None, server_hostname=None, ssl_handshake_timeout=None, ssl_shutdown_timeout=None)\nConnect to a TCP server.\n\n Create a streaming transport connection to a given Internet host and\n port: socket family AF_INET or socket.AF_INET6 depending on host (or\n family if specified), socket type SOCK_STREAM. protocol_factory must be\n a callable returning a protocol instance.\n\n This method is a coroutine which will try to establish the connection\n in the background. When successful, the coroutine returns a\n (transport, protocol) pair.\n ";
  30987. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_59create_connection(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  30988. PyObject *__pyx_v_protocol_factory = 0;
  30989. PyObject *__pyx_v_host = 0;
  30990. PyObject *__pyx_v_port = 0;
  30991. PyObject *__pyx_v_ssl = 0;
  30992. PyObject *__pyx_v_family = 0;
  30993. PyObject *__pyx_v_proto = 0;
  30994. PyObject *__pyx_v_flags = 0;
  30995. PyObject *__pyx_v_sock = 0;
  30996. PyObject *__pyx_v_local_addr = 0;
  30997. PyObject *__pyx_v_server_hostname = 0;
  30998. PyObject *__pyx_v_ssl_handshake_timeout = 0;
  30999. PyObject *__pyx_v_ssl_shutdown_timeout = 0;
  31000. PyObject *__pyx_r = 0;
  31001. __Pyx_RefNannyDeclarations
  31002. __Pyx_RefNannySetupContext("create_connection (wrapper)", 0);
  31003. {
  31004. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_protocol_factory,&__pyx_n_s_host,&__pyx_n_s_port,&__pyx_n_s_ssl,&__pyx_n_s_family,&__pyx_n_s_proto,&__pyx_n_s_flags,&__pyx_n_s_sock,&__pyx_n_s_local_addr,&__pyx_n_s_server_hostname,&__pyx_n_s_ssl_handshake_timeout,&__pyx_n_s_ssl_shutdown_timeout,0};
  31005. PyObject* values[12] = {0,0,0,0,0,0,0,0,0,0,0,0};
  31006. values[1] = ((PyObject *)Py_None);
  31007. values[2] = ((PyObject *)Py_None);
  31008. /* "uvloop/loop.pyx":1748
  31009. * async def create_connection(self, protocol_factory, host=None, port=None,
  31010. * *,
  31011. * ssl=None, # <<<<<<<<<<<<<<
  31012. * family=0, proto=0, flags=0, sock=None,
  31013. * local_addr=None, server_hostname=None,
  31014. */
  31015. values[3] = ((PyObject *)Py_None);
  31016. values[4] = ((PyObject *)__pyx_int_0);
  31017. values[5] = ((PyObject *)__pyx_int_0);
  31018. values[6] = ((PyObject *)__pyx_int_0);
  31019. /* "uvloop/loop.pyx":1749
  31020. * *,
  31021. * ssl=None,
  31022. * family=0, proto=0, flags=0, sock=None, # <<<<<<<<<<<<<<
  31023. * local_addr=None, server_hostname=None,
  31024. * ssl_handshake_timeout=None,
  31025. */
  31026. values[7] = ((PyObject *)Py_None);
  31027. /* "uvloop/loop.pyx":1750
  31028. * ssl=None,
  31029. * family=0, proto=0, flags=0, sock=None,
  31030. * local_addr=None, server_hostname=None, # <<<<<<<<<<<<<<
  31031. * ssl_handshake_timeout=None,
  31032. * ssl_shutdown_timeout=None):
  31033. */
  31034. values[8] = ((PyObject *)Py_None);
  31035. values[9] = ((PyObject *)Py_None);
  31036. /* "uvloop/loop.pyx":1751
  31037. * family=0, proto=0, flags=0, sock=None,
  31038. * local_addr=None, server_hostname=None,
  31039. * ssl_handshake_timeout=None, # <<<<<<<<<<<<<<
  31040. * ssl_shutdown_timeout=None):
  31041. * """Connect to a TCP server.
  31042. */
  31043. values[10] = ((PyObject *)Py_None);
  31044. /* "uvloop/loop.pyx":1752
  31045. * local_addr=None, server_hostname=None,
  31046. * ssl_handshake_timeout=None,
  31047. * ssl_shutdown_timeout=None): # <<<<<<<<<<<<<<
  31048. * """Connect to a TCP server.
  31049. *
  31050. */
  31051. values[11] = ((PyObject *)Py_None);
  31052. if (unlikely(__pyx_kwds)) {
  31053. Py_ssize_t kw_args;
  31054. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  31055. switch (pos_args) {
  31056. case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
  31057. CYTHON_FALLTHROUGH;
  31058. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  31059. CYTHON_FALLTHROUGH;
  31060. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  31061. CYTHON_FALLTHROUGH;
  31062. case 0: break;
  31063. default: goto __pyx_L5_argtuple_error;
  31064. }
  31065. kw_args = PyDict_Size(__pyx_kwds);
  31066. switch (pos_args) {
  31067. case 0:
  31068. if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_protocol_factory)) != 0)) kw_args--;
  31069. else goto __pyx_L5_argtuple_error;
  31070. CYTHON_FALLTHROUGH;
  31071. case 1:
  31072. if (kw_args > 0) {
  31073. PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_host);
  31074. if (value) { values[1] = value; kw_args--; }
  31075. }
  31076. CYTHON_FALLTHROUGH;
  31077. case 2:
  31078. if (kw_args > 0) {
  31079. PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_port);
  31080. if (value) { values[2] = value; kw_args--; }
  31081. }
  31082. }
  31083. if (kw_args > 0 && likely(kw_args <= 9)) {
  31084. Py_ssize_t index;
  31085. for (index = 3; index < 12 && kw_args > 0; index++) {
  31086. PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, *__pyx_pyargnames[index]);
  31087. if (value) { values[index] = value; kw_args--; }
  31088. }
  31089. }
  31090. if (unlikely(kw_args > 0)) {
  31091. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "create_connection") < 0)) __PYX_ERR(2, 1746, __pyx_L3_error)
  31092. }
  31093. } else {
  31094. switch (PyTuple_GET_SIZE(__pyx_args)) {
  31095. case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
  31096. CYTHON_FALLTHROUGH;
  31097. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  31098. CYTHON_FALLTHROUGH;
  31099. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  31100. break;
  31101. default: goto __pyx_L5_argtuple_error;
  31102. }
  31103. }
  31104. __pyx_v_protocol_factory = values[0];
  31105. __pyx_v_host = values[1];
  31106. __pyx_v_port = values[2];
  31107. __pyx_v_ssl = values[3];
  31108. __pyx_v_family = values[4];
  31109. __pyx_v_proto = values[5];
  31110. __pyx_v_flags = values[6];
  31111. __pyx_v_sock = values[7];
  31112. __pyx_v_local_addr = values[8];
  31113. __pyx_v_server_hostname = values[9];
  31114. __pyx_v_ssl_handshake_timeout = values[10];
  31115. __pyx_v_ssl_shutdown_timeout = values[11];
  31116. }
  31117. goto __pyx_L4_argument_unpacking_done;
  31118. __pyx_L5_argtuple_error:;
  31119. __Pyx_RaiseArgtupleInvalid("create_connection", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 1746, __pyx_L3_error)
  31120. __pyx_L3_error:;
  31121. __Pyx_AddTraceback("uvloop.loop.Loop.create_connection", __pyx_clineno, __pyx_lineno, __pyx_filename);
  31122. __Pyx_RefNannyFinishContext();
  31123. return NULL;
  31124. __pyx_L4_argument_unpacking_done:;
  31125. __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_58create_connection(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self), __pyx_v_protocol_factory, __pyx_v_host, __pyx_v_port, __pyx_v_ssl, __pyx_v_family, __pyx_v_proto, __pyx_v_flags, __pyx_v_sock, __pyx_v_local_addr, __pyx_v_server_hostname, __pyx_v_ssl_handshake_timeout, __pyx_v_ssl_shutdown_timeout);
  31126. /* "uvloop/loop.pyx":1746
  31127. *
  31128. * @cython.iterable_coroutine
  31129. * async def create_connection(self, protocol_factory, host=None, port=None, # <<<<<<<<<<<<<<
  31130. * *,
  31131. * ssl=None,
  31132. */
  31133. /* function exit code */
  31134. __Pyx_RefNannyFinishContext();
  31135. return __pyx_r;
  31136. }
  31137. static PyObject *__pyx_gb_6uvloop_4loop_4Loop_17create_connection_2generator26(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
  31138. /* "uvloop/loop.pyx":1926
  31139. * # If they all have the same str(), raise one.
  31140. * model = str(exceptions[0])
  31141. * if all(str(exc) == model for exc in exceptions): # <<<<<<<<<<<<<<
  31142. * raise exceptions[0]
  31143. * # Raise a combined exception so the user can see all
  31144. */
  31145. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_17create_connection_genexpr(PyObject *__pyx_self) {
  31146. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_10_genexpr *__pyx_cur_scope;
  31147. PyObject *__pyx_r = NULL;
  31148. __Pyx_RefNannyDeclarations
  31149. __Pyx_RefNannySetupContext("genexpr", 0);
  31150. __pyx_cur_scope = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_10_genexpr *)__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_10_genexpr(__pyx_ptype_6uvloop_4loop___pyx_scope_struct_10_genexpr, __pyx_empty_tuple, NULL);
  31151. if (unlikely(!__pyx_cur_scope)) {
  31152. __pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_10_genexpr *)Py_None);
  31153. __Pyx_INCREF(Py_None);
  31154. __PYX_ERR(2, 1926, __pyx_L1_error)
  31155. } else {
  31156. __Pyx_GOTREF(__pyx_cur_scope);
  31157. }
  31158. __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_9_create_connection *) __pyx_self;
  31159. __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
  31160. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
  31161. {
  31162. __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_6uvloop_4loop_4Loop_17create_connection_2generator26, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_create_connection_locals_genexpr, __pyx_n_s_uvloop_loop); if (unlikely(!gen)) __PYX_ERR(2, 1926, __pyx_L1_error)
  31163. __Pyx_DECREF(__pyx_cur_scope);
  31164. __Pyx_RefNannyFinishContext();
  31165. return (PyObject *) gen;
  31166. }
  31167. /* function exit code */
  31168. __pyx_L1_error:;
  31169. __Pyx_AddTraceback("uvloop.loop.Loop.create_connection.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  31170. __pyx_r = NULL;
  31171. __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  31172. __Pyx_XGIVEREF(__pyx_r);
  31173. __Pyx_RefNannyFinishContext();
  31174. return __pyx_r;
  31175. }
  31176. static PyObject *__pyx_gb_6uvloop_4loop_4Loop_17create_connection_2generator26(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
  31177. {
  31178. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_10_genexpr *__pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_10_genexpr *)__pyx_generator->closure);
  31179. PyObject *__pyx_r = NULL;
  31180. PyObject *__pyx_t_1 = NULL;
  31181. Py_ssize_t __pyx_t_2;
  31182. PyObject *__pyx_t_3 = NULL;
  31183. int __pyx_t_4;
  31184. int __pyx_t_5;
  31185. __Pyx_RefNannyDeclarations
  31186. __Pyx_RefNannySetupContext("genexpr", 0);
  31187. switch (__pyx_generator->resume_label) {
  31188. case 0: goto __pyx_L3_first_run;
  31189. default: /* CPython raises the right error here */
  31190. __Pyx_RefNannyFinishContext();
  31191. return NULL;
  31192. }
  31193. __pyx_L3_first_run:;
  31194. if (unlikely(!__pyx_sent_value)) __PYX_ERR(2, 1926, __pyx_L1_error)
  31195. if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_exceptions)) { __Pyx_RaiseClosureNameError("exceptions"); __PYX_ERR(2, 1926, __pyx_L1_error) }
  31196. if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_exceptions == Py_None)) {
  31197. PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
  31198. __PYX_ERR(2, 1926, __pyx_L1_error)
  31199. }
  31200. __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_exceptions; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
  31201. for (;;) {
  31202. if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
  31203. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  31204. __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(2, 1926, __pyx_L1_error)
  31205. #else
  31206. __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1926, __pyx_L1_error)
  31207. __Pyx_GOTREF(__pyx_t_3);
  31208. #endif
  31209. __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_exc);
  31210. __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_exc, __pyx_t_3);
  31211. __Pyx_GIVEREF(__pyx_t_3);
  31212. __pyx_t_3 = 0;
  31213. __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_cur_scope->__pyx_v_exc); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1926, __pyx_L1_error)
  31214. __Pyx_GOTREF(__pyx_t_3);
  31215. if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_model)) { __Pyx_RaiseClosureNameError("model"); __PYX_ERR(2, 1926, __pyx_L1_error) }
  31216. __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_3, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_model, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(2, 1926, __pyx_L1_error)
  31217. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  31218. __pyx_t_5 = ((!__pyx_t_4) != 0);
  31219. if (__pyx_t_5) {
  31220. __Pyx_XDECREF(__pyx_r);
  31221. __Pyx_INCREF(Py_False);
  31222. __pyx_r = Py_False;
  31223. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  31224. goto __pyx_L0;
  31225. }
  31226. }
  31227. /*else*/ {
  31228. __Pyx_XDECREF(__pyx_r);
  31229. __Pyx_INCREF(Py_True);
  31230. __pyx_r = Py_True;
  31231. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  31232. goto __pyx_L0;
  31233. }
  31234. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  31235. CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
  31236. /* function exit code */
  31237. goto __pyx_L0;
  31238. __pyx_L1_error:;
  31239. __Pyx_XDECREF(__pyx_t_1);
  31240. __Pyx_XDECREF(__pyx_t_3);
  31241. __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  31242. __pyx_L0:;
  31243. __Pyx_XGIVEREF(__pyx_r);
  31244. #if !CYTHON_USE_EXC_INFO_STACK
  31245. __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  31246. #endif
  31247. __pyx_generator->resume_label = -1;
  31248. __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  31249. __Pyx_RefNannyFinishContext();
  31250. return __pyx_r;
  31251. }
  31252. static PyObject *__pyx_gb_6uvloop_4loop_4Loop_17create_connection_5generator27(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
  31253. /* "uvloop/loop.pyx":1931
  31254. * # the various error messages.
  31255. * raise OSError('Multiple exceptions: {}'.format(
  31256. * ', '.join(str(exc) for exc in exceptions))) # <<<<<<<<<<<<<<
  31257. * else:
  31258. * if sock is None:
  31259. */
  31260. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_17create_connection_3genexpr(PyObject *__pyx_self) {
  31261. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_11_genexpr *__pyx_cur_scope;
  31262. PyObject *__pyx_r = NULL;
  31263. __Pyx_RefNannyDeclarations
  31264. __Pyx_RefNannySetupContext("genexpr", 0);
  31265. __pyx_cur_scope = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_11_genexpr *)__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_11_genexpr(__pyx_ptype_6uvloop_4loop___pyx_scope_struct_11_genexpr, __pyx_empty_tuple, NULL);
  31266. if (unlikely(!__pyx_cur_scope)) {
  31267. __pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_11_genexpr *)Py_None);
  31268. __Pyx_INCREF(Py_None);
  31269. __PYX_ERR(2, 1931, __pyx_L1_error)
  31270. } else {
  31271. __Pyx_GOTREF(__pyx_cur_scope);
  31272. }
  31273. __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_9_create_connection *) __pyx_self;
  31274. __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
  31275. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
  31276. {
  31277. __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_6uvloop_4loop_4Loop_17create_connection_5generator27, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_create_connection_locals_genexpr, __pyx_n_s_uvloop_loop); if (unlikely(!gen)) __PYX_ERR(2, 1931, __pyx_L1_error)
  31278. __Pyx_DECREF(__pyx_cur_scope);
  31279. __Pyx_RefNannyFinishContext();
  31280. return (PyObject *) gen;
  31281. }
  31282. /* function exit code */
  31283. __pyx_L1_error:;
  31284. __Pyx_AddTraceback("uvloop.loop.Loop.create_connection.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  31285. __pyx_r = NULL;
  31286. __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  31287. __Pyx_XGIVEREF(__pyx_r);
  31288. __Pyx_RefNannyFinishContext();
  31289. return __pyx_r;
  31290. }
  31291. static PyObject *__pyx_gb_6uvloop_4loop_4Loop_17create_connection_5generator27(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
  31292. {
  31293. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_11_genexpr *__pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_11_genexpr *)__pyx_generator->closure);
  31294. PyObject *__pyx_r = NULL;
  31295. PyObject *__pyx_t_1 = NULL;
  31296. Py_ssize_t __pyx_t_2;
  31297. PyObject *__pyx_t_3 = NULL;
  31298. __Pyx_RefNannyDeclarations
  31299. __Pyx_RefNannySetupContext("genexpr", 0);
  31300. switch (__pyx_generator->resume_label) {
  31301. case 0: goto __pyx_L3_first_run;
  31302. default: /* CPython raises the right error here */
  31303. __Pyx_RefNannyFinishContext();
  31304. return NULL;
  31305. }
  31306. __pyx_L3_first_run:;
  31307. if (unlikely(!__pyx_sent_value)) __PYX_ERR(2, 1931, __pyx_L1_error)
  31308. __pyx_r = PyList_New(0); if (unlikely(!__pyx_r)) __PYX_ERR(2, 1931, __pyx_L1_error)
  31309. __Pyx_GOTREF(__pyx_r);
  31310. if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_exceptions)) { __Pyx_RaiseClosureNameError("exceptions"); __PYX_ERR(2, 1931, __pyx_L1_error) }
  31311. if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_exceptions == Py_None)) {
  31312. PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
  31313. __PYX_ERR(2, 1931, __pyx_L1_error)
  31314. }
  31315. __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_exceptions; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
  31316. for (;;) {
  31317. if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
  31318. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  31319. __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(2, 1931, __pyx_L1_error)
  31320. #else
  31321. __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1931, __pyx_L1_error)
  31322. __Pyx_GOTREF(__pyx_t_3);
  31323. #endif
  31324. __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_exc);
  31325. __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_exc, __pyx_t_3);
  31326. __Pyx_GIVEREF(__pyx_t_3);
  31327. __pyx_t_3 = 0;
  31328. __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_cur_scope->__pyx_v_exc); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1931, __pyx_L1_error)
  31329. __Pyx_GOTREF(__pyx_t_3);
  31330. if (unlikely(__Pyx_ListComp_Append(__pyx_r, (PyObject*)__pyx_t_3))) __PYX_ERR(2, 1931, __pyx_L1_error)
  31331. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  31332. }
  31333. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  31334. CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
  31335. /* function exit code */
  31336. goto __pyx_L0;
  31337. __pyx_L1_error:;
  31338. __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  31339. __Pyx_XDECREF(__pyx_t_1);
  31340. __Pyx_XDECREF(__pyx_t_3);
  31341. __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  31342. __pyx_L0:;
  31343. __Pyx_XGIVEREF(__pyx_r);
  31344. #if !CYTHON_USE_EXC_INFO_STACK
  31345. __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  31346. #endif
  31347. __pyx_generator->resume_label = -1;
  31348. __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  31349. __Pyx_RefNannyFinishContext();
  31350. return __pyx_r;
  31351. }
  31352. /* "uvloop/loop.pyx":1746
  31353. *
  31354. * @cython.iterable_coroutine
  31355. * async def create_connection(self, protocol_factory, host=None, port=None, # <<<<<<<<<<<<<<
  31356. * *,
  31357. * ssl=None,
  31358. */
  31359. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_58create_connection(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_protocol_factory, PyObject *__pyx_v_host, PyObject *__pyx_v_port, PyObject *__pyx_v_ssl, PyObject *__pyx_v_family, PyObject *__pyx_v_proto, PyObject *__pyx_v_flags, PyObject *__pyx_v_sock, PyObject *__pyx_v_local_addr, PyObject *__pyx_v_server_hostname, PyObject *__pyx_v_ssl_handshake_timeout, PyObject *__pyx_v_ssl_shutdown_timeout) {
  31360. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_9_create_connection *__pyx_cur_scope;
  31361. PyObject *__pyx_r = NULL;
  31362. __Pyx_RefNannyDeclarations
  31363. __Pyx_RefNannySetupContext("create_connection", 0);
  31364. __pyx_cur_scope = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_9_create_connection *)__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_9_create_connection(__pyx_ptype_6uvloop_4loop___pyx_scope_struct_9_create_connection, __pyx_empty_tuple, NULL);
  31365. if (unlikely(!__pyx_cur_scope)) {
  31366. __pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_9_create_connection *)Py_None);
  31367. __Pyx_INCREF(Py_None);
  31368. __PYX_ERR(2, 1746, __pyx_L1_error)
  31369. } else {
  31370. __Pyx_GOTREF(__pyx_cur_scope);
  31371. }
  31372. __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  31373. __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  31374. __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  31375. __pyx_cur_scope->__pyx_v_protocol_factory = __pyx_v_protocol_factory;
  31376. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_protocol_factory);
  31377. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_protocol_factory);
  31378. __pyx_cur_scope->__pyx_v_host = __pyx_v_host;
  31379. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_host);
  31380. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_host);
  31381. __pyx_cur_scope->__pyx_v_port = __pyx_v_port;
  31382. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_port);
  31383. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_port);
  31384. __pyx_cur_scope->__pyx_v_ssl = __pyx_v_ssl;
  31385. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_ssl);
  31386. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_ssl);
  31387. __pyx_cur_scope->__pyx_v_family = __pyx_v_family;
  31388. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_family);
  31389. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_family);
  31390. __pyx_cur_scope->__pyx_v_proto = __pyx_v_proto;
  31391. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_proto);
  31392. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_proto);
  31393. __pyx_cur_scope->__pyx_v_flags = __pyx_v_flags;
  31394. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_flags);
  31395. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_flags);
  31396. __pyx_cur_scope->__pyx_v_sock = __pyx_v_sock;
  31397. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_sock);
  31398. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_sock);
  31399. __pyx_cur_scope->__pyx_v_local_addr = __pyx_v_local_addr;
  31400. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_local_addr);
  31401. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_local_addr);
  31402. __pyx_cur_scope->__pyx_v_server_hostname = __pyx_v_server_hostname;
  31403. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_server_hostname);
  31404. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_server_hostname);
  31405. __pyx_cur_scope->__pyx_v_ssl_handshake_timeout = __pyx_v_ssl_handshake_timeout;
  31406. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_ssl_handshake_timeout);
  31407. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_ssl_handshake_timeout);
  31408. __pyx_cur_scope->__pyx_v_ssl_shutdown_timeout = __pyx_v_ssl_shutdown_timeout;
  31409. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_ssl_shutdown_timeout);
  31410. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_ssl_shutdown_timeout);
  31411. {
  31412. __pyx_CoroutineObject *gen = __Pyx_IterableCoroutine_New((__pyx_coroutine_body_t) __pyx_gb_6uvloop_4loop_4Loop_60generator4, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_create_connection, __pyx_n_s_Loop_create_connection, __pyx_n_s_uvloop_loop); if (unlikely(!gen)) __PYX_ERR(2, 1746, __pyx_L1_error)
  31413. __Pyx_DECREF(__pyx_cur_scope);
  31414. __Pyx_RefNannyFinishContext();
  31415. return (PyObject *) gen;
  31416. }
  31417. /* function exit code */
  31418. __pyx_L1_error:;
  31419. __Pyx_AddTraceback("uvloop.loop.Loop.create_connection", __pyx_clineno, __pyx_lineno, __pyx_filename);
  31420. __pyx_r = NULL;
  31421. __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  31422. __Pyx_XGIVEREF(__pyx_r);
  31423. __Pyx_RefNannyFinishContext();
  31424. return __pyx_r;
  31425. }
  31426. static PyObject *__pyx_gb_6uvloop_4loop_4Loop_60generator4(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
  31427. {
  31428. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_9_create_connection *__pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_9_create_connection *)__pyx_generator->closure);
  31429. PyObject *__pyx_r = NULL;
  31430. int __pyx_t_1;
  31431. int __pyx_t_2;
  31432. int __pyx_t_3;
  31433. PyObject *__pyx_t_4 = NULL;
  31434. PyObject *__pyx_t_5 = NULL;
  31435. PyObject *__pyx_t_6 = NULL;
  31436. PyObject *__pyx_t_7 = NULL;
  31437. int __pyx_t_8;
  31438. int __pyx_t_9;
  31439. int __pyx_t_10;
  31440. int __pyx_t_11;
  31441. int __pyx_t_12;
  31442. Py_ssize_t __pyx_t_13;
  31443. struct addrinfo *__pyx_t_14;
  31444. PyObject *__pyx_t_15 = NULL;
  31445. PyObject *__pyx_t_16 = NULL;
  31446. PyObject *__pyx_t_17 = NULL;
  31447. PyObject *__pyx_t_18 = NULL;
  31448. PyObject *__pyx_t_19 = NULL;
  31449. PyObject *__pyx_t_20 = NULL;
  31450. char const *__pyx_t_21;
  31451. PyObject *__pyx_t_22 = NULL;
  31452. PyObject *__pyx_t_23 = NULL;
  31453. PyObject *__pyx_t_24 = NULL;
  31454. PyObject *__pyx_t_25 = NULL;
  31455. PyObject *__pyx_t_26 = NULL;
  31456. PyObject *__pyx_t_27 = NULL;
  31457. char const *__pyx_t_28;
  31458. PyObject *__pyx_t_29 = NULL;
  31459. PyObject *__pyx_t_30 = NULL;
  31460. __Pyx_RefNannyDeclarations
  31461. __Pyx_RefNannySetupContext("create_connection", 0);
  31462. switch (__pyx_generator->resume_label) {
  31463. case 0: goto __pyx_L3_first_run;
  31464. case 1: goto __pyx_L10_resume_from_await;
  31465. case 2: goto __pyx_L30_resume_from_await;
  31466. case 3: goto __pyx_L69_resume_from_await;
  31467. case 4: goto __pyx_L94_resume_from_await;
  31468. case 5: goto __pyx_L104_resume_from_await;
  31469. default: /* CPython raises the right error here */
  31470. __Pyx_RefNannyFinishContext();
  31471. return NULL;
  31472. }
  31473. __pyx_L3_first_run:;
  31474. if (unlikely(!__pyx_sent_value)) __PYX_ERR(2, 1746, __pyx_L1_error)
  31475. /* "uvloop/loop.pyx":1765
  31476. * """
  31477. * cdef:
  31478. * AddrInfo ai_local = None # <<<<<<<<<<<<<<
  31479. * AddrInfo ai_remote
  31480. * TCPTransport tr
  31481. */
  31482. __Pyx_INCREF(Py_None);
  31483. __Pyx_GIVEREF(Py_None);
  31484. __pyx_cur_scope->__pyx_v_ai_local = ((struct __pyx_obj_6uvloop_4loop_AddrInfo *)Py_None);
  31485. /* "uvloop/loop.pyx":1769
  31486. * TCPTransport tr
  31487. *
  31488. * system.addrinfo *rai = NULL # <<<<<<<<<<<<<<
  31489. * system.addrinfo *lai = NULL
  31490. *
  31491. */
  31492. __pyx_cur_scope->__pyx_v_rai = NULL;
  31493. /* "uvloop/loop.pyx":1770
  31494. *
  31495. * system.addrinfo *rai = NULL
  31496. * system.addrinfo *lai = NULL # <<<<<<<<<<<<<<
  31497. *
  31498. * system.addrinfo *rai_iter = NULL
  31499. */
  31500. __pyx_cur_scope->__pyx_v_lai = NULL;
  31501. /* "uvloop/loop.pyx":1772
  31502. * system.addrinfo *lai = NULL
  31503. *
  31504. * system.addrinfo *rai_iter = NULL # <<<<<<<<<<<<<<
  31505. * system.addrinfo *lai_iter = NULL
  31506. *
  31507. */
  31508. __pyx_cur_scope->__pyx_v_rai_iter = NULL;
  31509. /* "uvloop/loop.pyx":1773
  31510. *
  31511. * system.addrinfo *rai_iter = NULL
  31512. * system.addrinfo *lai_iter = NULL # <<<<<<<<<<<<<<
  31513. *
  31514. * system.addrinfo rai_static
  31515. */
  31516. __pyx_cur_scope->__pyx_v_lai_iter = NULL;
  31517. /* "uvloop/loop.pyx":1785
  31518. * object ssl_waiter
  31519. *
  31520. * if sock is not None and sock.family == uv.AF_UNIX: # <<<<<<<<<<<<<<
  31521. * if host is not None or port is not None:
  31522. * raise ValueError(
  31523. */
  31524. __pyx_t_2 = (__pyx_cur_scope->__pyx_v_sock != Py_None);
  31525. __pyx_t_3 = (__pyx_t_2 != 0);
  31526. if (__pyx_t_3) {
  31527. } else {
  31528. __pyx_t_1 = __pyx_t_3;
  31529. goto __pyx_L5_bool_binop_done;
  31530. }
  31531. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_sock, __pyx_n_s_family); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1785, __pyx_L1_error)
  31532. __Pyx_GOTREF(__pyx_t_4);
  31533. __pyx_t_5 = __Pyx_PyInt_From_int(AF_UNIX); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1785, __pyx_L1_error)
  31534. __Pyx_GOTREF(__pyx_t_5);
  31535. __pyx_t_6 = PyObject_RichCompare(__pyx_t_4, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1785, __pyx_L1_error)
  31536. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  31537. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  31538. __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(2, 1785, __pyx_L1_error)
  31539. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  31540. __pyx_t_1 = __pyx_t_3;
  31541. __pyx_L5_bool_binop_done:;
  31542. if (__pyx_t_1) {
  31543. /* "uvloop/loop.pyx":1786
  31544. *
  31545. * if sock is not None and sock.family == uv.AF_UNIX:
  31546. * if host is not None or port is not None: # <<<<<<<<<<<<<<
  31547. * raise ValueError(
  31548. * 'host/port and sock can not be specified at the same time')
  31549. */
  31550. __pyx_t_3 = (__pyx_cur_scope->__pyx_v_host != Py_None);
  31551. __pyx_t_2 = (__pyx_t_3 != 0);
  31552. if (!__pyx_t_2) {
  31553. } else {
  31554. __pyx_t_1 = __pyx_t_2;
  31555. goto __pyx_L8_bool_binop_done;
  31556. }
  31557. __pyx_t_2 = (__pyx_cur_scope->__pyx_v_port != Py_None);
  31558. __pyx_t_3 = (__pyx_t_2 != 0);
  31559. __pyx_t_1 = __pyx_t_3;
  31560. __pyx_L8_bool_binop_done:;
  31561. if (unlikely(__pyx_t_1)) {
  31562. /* "uvloop/loop.pyx":1787
  31563. * if sock is not None and sock.family == uv.AF_UNIX:
  31564. * if host is not None or port is not None:
  31565. * raise ValueError( # <<<<<<<<<<<<<<
  31566. * 'host/port and sock can not be specified at the same time')
  31567. * return await self.create_unix_connection(
  31568. */
  31569. __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__40, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1787, __pyx_L1_error)
  31570. __Pyx_GOTREF(__pyx_t_6);
  31571. __Pyx_Raise(__pyx_t_6, 0, 0, 0);
  31572. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  31573. __PYX_ERR(2, 1787, __pyx_L1_error)
  31574. /* "uvloop/loop.pyx":1786
  31575. *
  31576. * if sock is not None and sock.family == uv.AF_UNIX:
  31577. * if host is not None or port is not None: # <<<<<<<<<<<<<<
  31578. * raise ValueError(
  31579. * 'host/port and sock can not be specified at the same time')
  31580. */
  31581. }
  31582. /* "uvloop/loop.pyx":1789
  31583. * raise ValueError(
  31584. * 'host/port and sock can not be specified at the same time')
  31585. * return await self.create_unix_connection( # <<<<<<<<<<<<<<
  31586. * protocol_factory, None,
  31587. * sock=sock, ssl=ssl, server_hostname=server_hostname)
  31588. */
  31589. __Pyx_XDECREF(__pyx_r);
  31590. __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_create_unix_connection); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1789, __pyx_L1_error)
  31591. __Pyx_GOTREF(__pyx_t_6);
  31592. /* "uvloop/loop.pyx":1790
  31593. * 'host/port and sock can not be specified at the same time')
  31594. * return await self.create_unix_connection(
  31595. * protocol_factory, None, # <<<<<<<<<<<<<<
  31596. * sock=sock, ssl=ssl, server_hostname=server_hostname)
  31597. *
  31598. */
  31599. __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1789, __pyx_L1_error)
  31600. __Pyx_GOTREF(__pyx_t_5);
  31601. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_protocol_factory);
  31602. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_protocol_factory);
  31603. PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_cur_scope->__pyx_v_protocol_factory);
  31604. __Pyx_INCREF(Py_None);
  31605. __Pyx_GIVEREF(Py_None);
  31606. PyTuple_SET_ITEM(__pyx_t_5, 1, Py_None);
  31607. /* "uvloop/loop.pyx":1791
  31608. * return await self.create_unix_connection(
  31609. * protocol_factory, None,
  31610. * sock=sock, ssl=ssl, server_hostname=server_hostname) # <<<<<<<<<<<<<<
  31611. *
  31612. * app_protocol = protocol = protocol_factory()
  31613. */
  31614. __pyx_t_4 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1791, __pyx_L1_error)
  31615. __Pyx_GOTREF(__pyx_t_4);
  31616. if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_sock, __pyx_cur_scope->__pyx_v_sock) < 0) __PYX_ERR(2, 1791, __pyx_L1_error)
  31617. if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_ssl, __pyx_cur_scope->__pyx_v_ssl) < 0) __PYX_ERR(2, 1791, __pyx_L1_error)
  31618. if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_server_hostname, __pyx_cur_scope->__pyx_v_server_hostname) < 0) __PYX_ERR(2, 1791, __pyx_L1_error)
  31619. /* "uvloop/loop.pyx":1789
  31620. * raise ValueError(
  31621. * 'host/port and sock can not be specified at the same time')
  31622. * return await self.create_unix_connection( # <<<<<<<<<<<<<<
  31623. * protocol_factory, None,
  31624. * sock=sock, ssl=ssl, server_hostname=server_hostname)
  31625. */
  31626. __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 1789, __pyx_L1_error)
  31627. __Pyx_GOTREF(__pyx_t_7);
  31628. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  31629. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  31630. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  31631. __pyx_r = __Pyx_Coroutine_Yield_From(__pyx_generator, __pyx_t_7);
  31632. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  31633. __Pyx_XGOTREF(__pyx_r);
  31634. if (likely(__pyx_r)) {
  31635. __Pyx_XGIVEREF(__pyx_r);
  31636. __Pyx_RefNannyFinishContext();
  31637. __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  31638. /* return from generator, awaiting value */
  31639. __pyx_generator->resume_label = 1;
  31640. return __pyx_r;
  31641. __pyx_L10_resume_from_await:;
  31642. if (unlikely(!__pyx_sent_value)) __PYX_ERR(2, 1789, __pyx_L1_error)
  31643. __pyx_t_7 = __pyx_sent_value; __Pyx_INCREF(__pyx_t_7);
  31644. } else {
  31645. __pyx_t_7 = NULL;
  31646. if (__Pyx_PyGen_FetchStopIterationValue(&__pyx_t_7) < 0) __PYX_ERR(2, 1789, __pyx_L1_error)
  31647. __Pyx_GOTREF(__pyx_t_7);
  31648. }
  31649. __pyx_r = NULL; __Pyx_ReturnWithStopIteration(__pyx_t_7);
  31650. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  31651. __pyx_t_7 = 0;
  31652. goto __pyx_L0;
  31653. /* "uvloop/loop.pyx":1785
  31654. * object ssl_waiter
  31655. *
  31656. * if sock is not None and sock.family == uv.AF_UNIX: # <<<<<<<<<<<<<<
  31657. * if host is not None or port is not None:
  31658. * raise ValueError(
  31659. */
  31660. }
  31661. /* "uvloop/loop.pyx":1793
  31662. * sock=sock, ssl=ssl, server_hostname=server_hostname)
  31663. *
  31664. * app_protocol = protocol = protocol_factory() # <<<<<<<<<<<<<<
  31665. * ssl_waiter = None
  31666. * if ssl:
  31667. */
  31668. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_protocol_factory);
  31669. __pyx_t_4 = __pyx_cur_scope->__pyx_v_protocol_factory; __pyx_t_5 = NULL;
  31670. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
  31671. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
  31672. if (likely(__pyx_t_5)) {
  31673. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  31674. __Pyx_INCREF(__pyx_t_5);
  31675. __Pyx_INCREF(function);
  31676. __Pyx_DECREF_SET(__pyx_t_4, function);
  31677. }
  31678. }
  31679. __pyx_t_7 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
  31680. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  31681. if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 1793, __pyx_L1_error)
  31682. __Pyx_GOTREF(__pyx_t_7);
  31683. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  31684. __Pyx_INCREF(__pyx_t_7);
  31685. __Pyx_GIVEREF(__pyx_t_7);
  31686. __pyx_cur_scope->__pyx_v_app_protocol = __pyx_t_7;
  31687. __Pyx_INCREF(__pyx_t_7);
  31688. __Pyx_GIVEREF(__pyx_t_7);
  31689. __pyx_cur_scope->__pyx_v_protocol = __pyx_t_7;
  31690. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  31691. /* "uvloop/loop.pyx":1794
  31692. *
  31693. * app_protocol = protocol = protocol_factory()
  31694. * ssl_waiter = None # <<<<<<<<<<<<<<
  31695. * if ssl:
  31696. * if server_hostname is None:
  31697. */
  31698. __Pyx_INCREF(Py_None);
  31699. __Pyx_GIVEREF(Py_None);
  31700. __pyx_cur_scope->__pyx_v_ssl_waiter = Py_None;
  31701. /* "uvloop/loop.pyx":1795
  31702. * app_protocol = protocol = protocol_factory()
  31703. * ssl_waiter = None
  31704. * if ssl: # <<<<<<<<<<<<<<
  31705. * if server_hostname is None:
  31706. * if not host:
  31707. */
  31708. __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_ssl); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 1795, __pyx_L1_error)
  31709. if (__pyx_t_1) {
  31710. /* "uvloop/loop.pyx":1796
  31711. * ssl_waiter = None
  31712. * if ssl:
  31713. * if server_hostname is None: # <<<<<<<<<<<<<<
  31714. * if not host:
  31715. * raise ValueError('You must set server_hostname '
  31716. */
  31717. __pyx_t_1 = (__pyx_cur_scope->__pyx_v_server_hostname == Py_None);
  31718. __pyx_t_3 = (__pyx_t_1 != 0);
  31719. if (__pyx_t_3) {
  31720. /* "uvloop/loop.pyx":1797
  31721. * if ssl:
  31722. * if server_hostname is None:
  31723. * if not host: # <<<<<<<<<<<<<<
  31724. * raise ValueError('You must set server_hostname '
  31725. * 'when using ssl without a host')
  31726. */
  31727. __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_host); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(2, 1797, __pyx_L1_error)
  31728. __pyx_t_1 = ((!__pyx_t_3) != 0);
  31729. if (unlikely(__pyx_t_1)) {
  31730. /* "uvloop/loop.pyx":1798
  31731. * if server_hostname is None:
  31732. * if not host:
  31733. * raise ValueError('You must set server_hostname ' # <<<<<<<<<<<<<<
  31734. * 'when using ssl without a host')
  31735. * server_hostname = host
  31736. */
  31737. __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__48, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 1798, __pyx_L1_error)
  31738. __Pyx_GOTREF(__pyx_t_7);
  31739. __Pyx_Raise(__pyx_t_7, 0, 0, 0);
  31740. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  31741. __PYX_ERR(2, 1798, __pyx_L1_error)
  31742. /* "uvloop/loop.pyx":1797
  31743. * if ssl:
  31744. * if server_hostname is None:
  31745. * if not host: # <<<<<<<<<<<<<<
  31746. * raise ValueError('You must set server_hostname '
  31747. * 'when using ssl without a host')
  31748. */
  31749. }
  31750. /* "uvloop/loop.pyx":1800
  31751. * raise ValueError('You must set server_hostname '
  31752. * 'when using ssl without a host')
  31753. * server_hostname = host # <<<<<<<<<<<<<<
  31754. *
  31755. * ssl_waiter = self._new_future()
  31756. */
  31757. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_host);
  31758. __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_server_hostname);
  31759. __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_server_hostname, __pyx_cur_scope->__pyx_v_host);
  31760. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_host);
  31761. /* "uvloop/loop.pyx":1796
  31762. * ssl_waiter = None
  31763. * if ssl:
  31764. * if server_hostname is None: # <<<<<<<<<<<<<<
  31765. * if not host:
  31766. * raise ValueError('You must set server_hostname '
  31767. */
  31768. }
  31769. /* "uvloop/loop.pyx":1802
  31770. * server_hostname = host
  31771. *
  31772. * ssl_waiter = self._new_future() # <<<<<<<<<<<<<<
  31773. * sslcontext = None if isinstance(ssl, bool) else ssl
  31774. * protocol = SSLProtocol(
  31775. */
  31776. __pyx_t_7 = __pyx_f_6uvloop_4loop_4Loop__new_future(__pyx_cur_scope->__pyx_v_self); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 1802, __pyx_L1_error)
  31777. __Pyx_GOTREF(__pyx_t_7);
  31778. __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_ssl_waiter);
  31779. __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_ssl_waiter, __pyx_t_7);
  31780. __Pyx_GIVEREF(__pyx_t_7);
  31781. __pyx_t_7 = 0;
  31782. /* "uvloop/loop.pyx":1803
  31783. *
  31784. * ssl_waiter = self._new_future()
  31785. * sslcontext = None if isinstance(ssl, bool) else ssl # <<<<<<<<<<<<<<
  31786. * protocol = SSLProtocol(
  31787. * self, app_protocol, sslcontext, ssl_waiter,
  31788. */
  31789. __pyx_t_4 = ((PyObject*)&PyBool_Type);
  31790. __Pyx_INCREF(__pyx_t_4);
  31791. __pyx_t_1 = PyObject_IsInstance(__pyx_cur_scope->__pyx_v_ssl, __pyx_t_4); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(2, 1803, __pyx_L1_error)
  31792. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  31793. if ((__pyx_t_1 != 0)) {
  31794. __Pyx_INCREF(Py_None);
  31795. __pyx_t_7 = Py_None;
  31796. } else {
  31797. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_ssl);
  31798. __pyx_t_7 = __pyx_cur_scope->__pyx_v_ssl;
  31799. }
  31800. __Pyx_GIVEREF(__pyx_t_7);
  31801. __pyx_cur_scope->__pyx_v_sslcontext = __pyx_t_7;
  31802. __pyx_t_7 = 0;
  31803. /* "uvloop/loop.pyx":1804
  31804. * ssl_waiter = self._new_future()
  31805. * sslcontext = None if isinstance(ssl, bool) else ssl
  31806. * protocol = SSLProtocol( # <<<<<<<<<<<<<<
  31807. * self, app_protocol, sslcontext, ssl_waiter,
  31808. * False, server_hostname,
  31809. */
  31810. __pyx_t_7 = PyTuple_New(6); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 1804, __pyx_L1_error)
  31811. __Pyx_GOTREF(__pyx_t_7);
  31812. __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_self));
  31813. __Pyx_GIVEREF(((PyObject *)__pyx_cur_scope->__pyx_v_self));
  31814. PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_cur_scope->__pyx_v_self));
  31815. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_app_protocol);
  31816. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_app_protocol);
  31817. PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_cur_scope->__pyx_v_app_protocol);
  31818. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_sslcontext);
  31819. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_sslcontext);
  31820. PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_cur_scope->__pyx_v_sslcontext);
  31821. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_ssl_waiter);
  31822. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_ssl_waiter);
  31823. PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_cur_scope->__pyx_v_ssl_waiter);
  31824. __Pyx_INCREF(Py_False);
  31825. __Pyx_GIVEREF(Py_False);
  31826. PyTuple_SET_ITEM(__pyx_t_7, 4, Py_False);
  31827. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_server_hostname);
  31828. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_server_hostname);
  31829. PyTuple_SET_ITEM(__pyx_t_7, 5, __pyx_cur_scope->__pyx_v_server_hostname);
  31830. /* "uvloop/loop.pyx":1807
  31831. * self, app_protocol, sslcontext, ssl_waiter,
  31832. * False, server_hostname,
  31833. * ssl_handshake_timeout=ssl_handshake_timeout, # <<<<<<<<<<<<<<
  31834. * ssl_shutdown_timeout=ssl_shutdown_timeout)
  31835. * else:
  31836. */
  31837. __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1807, __pyx_L1_error)
  31838. __Pyx_GOTREF(__pyx_t_4);
  31839. if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_ssl_handshake_timeout, __pyx_cur_scope->__pyx_v_ssl_handshake_timeout) < 0) __PYX_ERR(2, 1807, __pyx_L1_error)
  31840. /* "uvloop/loop.pyx":1808
  31841. * False, server_hostname,
  31842. * ssl_handshake_timeout=ssl_handshake_timeout,
  31843. * ssl_shutdown_timeout=ssl_shutdown_timeout) # <<<<<<<<<<<<<<
  31844. * else:
  31845. * if server_hostname is not None:
  31846. */
  31847. if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_ssl_shutdown_timeout, __pyx_cur_scope->__pyx_v_ssl_shutdown_timeout) < 0) __PYX_ERR(2, 1807, __pyx_L1_error)
  31848. /* "uvloop/loop.pyx":1804
  31849. * ssl_waiter = self._new_future()
  31850. * sslcontext = None if isinstance(ssl, bool) else ssl
  31851. * protocol = SSLProtocol( # <<<<<<<<<<<<<<
  31852. * self, app_protocol, sslcontext, ssl_waiter,
  31853. * False, server_hostname,
  31854. */
  31855. __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6uvloop_4loop_SSLProtocol), __pyx_t_7, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1804, __pyx_L1_error)
  31856. __Pyx_GOTREF(__pyx_t_5);
  31857. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  31858. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  31859. __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_protocol);
  31860. __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_protocol, __pyx_t_5);
  31861. __Pyx_GIVEREF(__pyx_t_5);
  31862. __pyx_t_5 = 0;
  31863. /* "uvloop/loop.pyx":1795
  31864. * app_protocol = protocol = protocol_factory()
  31865. * ssl_waiter = None
  31866. * if ssl: # <<<<<<<<<<<<<<
  31867. * if server_hostname is None:
  31868. * if not host:
  31869. */
  31870. goto __pyx_L11;
  31871. }
  31872. /* "uvloop/loop.pyx":1810
  31873. * ssl_shutdown_timeout=ssl_shutdown_timeout)
  31874. * else:
  31875. * if server_hostname is not None: # <<<<<<<<<<<<<<
  31876. * raise ValueError('server_hostname is only meaningful with ssl')
  31877. * if ssl_handshake_timeout is not None:
  31878. */
  31879. /*else*/ {
  31880. __pyx_t_1 = (__pyx_cur_scope->__pyx_v_server_hostname != Py_None);
  31881. __pyx_t_3 = (__pyx_t_1 != 0);
  31882. if (unlikely(__pyx_t_3)) {
  31883. /* "uvloop/loop.pyx":1811
  31884. * else:
  31885. * if server_hostname is not None:
  31886. * raise ValueError('server_hostname is only meaningful with ssl') # <<<<<<<<<<<<<<
  31887. * if ssl_handshake_timeout is not None:
  31888. * raise ValueError(
  31889. */
  31890. __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__49, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1811, __pyx_L1_error)
  31891. __Pyx_GOTREF(__pyx_t_5);
  31892. __Pyx_Raise(__pyx_t_5, 0, 0, 0);
  31893. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  31894. __PYX_ERR(2, 1811, __pyx_L1_error)
  31895. /* "uvloop/loop.pyx":1810
  31896. * ssl_shutdown_timeout=ssl_shutdown_timeout)
  31897. * else:
  31898. * if server_hostname is not None: # <<<<<<<<<<<<<<
  31899. * raise ValueError('server_hostname is only meaningful with ssl')
  31900. * if ssl_handshake_timeout is not None:
  31901. */
  31902. }
  31903. /* "uvloop/loop.pyx":1812
  31904. * if server_hostname is not None:
  31905. * raise ValueError('server_hostname is only meaningful with ssl')
  31906. * if ssl_handshake_timeout is not None: # <<<<<<<<<<<<<<
  31907. * raise ValueError(
  31908. * 'ssl_handshake_timeout is only meaningful with ssl')
  31909. */
  31910. __pyx_t_3 = (__pyx_cur_scope->__pyx_v_ssl_handshake_timeout != Py_None);
  31911. __pyx_t_1 = (__pyx_t_3 != 0);
  31912. if (unlikely(__pyx_t_1)) {
  31913. /* "uvloop/loop.pyx":1813
  31914. * raise ValueError('server_hostname is only meaningful with ssl')
  31915. * if ssl_handshake_timeout is not None:
  31916. * raise ValueError( # <<<<<<<<<<<<<<
  31917. * 'ssl_handshake_timeout is only meaningful with ssl')
  31918. * if ssl_shutdown_timeout is not None:
  31919. */
  31920. __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__42, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1813, __pyx_L1_error)
  31921. __Pyx_GOTREF(__pyx_t_5);
  31922. __Pyx_Raise(__pyx_t_5, 0, 0, 0);
  31923. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  31924. __PYX_ERR(2, 1813, __pyx_L1_error)
  31925. /* "uvloop/loop.pyx":1812
  31926. * if server_hostname is not None:
  31927. * raise ValueError('server_hostname is only meaningful with ssl')
  31928. * if ssl_handshake_timeout is not None: # <<<<<<<<<<<<<<
  31929. * raise ValueError(
  31930. * 'ssl_handshake_timeout is only meaningful with ssl')
  31931. */
  31932. }
  31933. /* "uvloop/loop.pyx":1815
  31934. * raise ValueError(
  31935. * 'ssl_handshake_timeout is only meaningful with ssl')
  31936. * if ssl_shutdown_timeout is not None: # <<<<<<<<<<<<<<
  31937. * raise ValueError(
  31938. * 'ssl_shutdown_timeout is only meaningful with ssl')
  31939. */
  31940. __pyx_t_1 = (__pyx_cur_scope->__pyx_v_ssl_shutdown_timeout != Py_None);
  31941. __pyx_t_3 = (__pyx_t_1 != 0);
  31942. if (unlikely(__pyx_t_3)) {
  31943. /* "uvloop/loop.pyx":1816
  31944. * 'ssl_handshake_timeout is only meaningful with ssl')
  31945. * if ssl_shutdown_timeout is not None:
  31946. * raise ValueError( # <<<<<<<<<<<<<<
  31947. * 'ssl_shutdown_timeout is only meaningful with ssl')
  31948. *
  31949. */
  31950. __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1816, __pyx_L1_error)
  31951. __Pyx_GOTREF(__pyx_t_5);
  31952. __Pyx_Raise(__pyx_t_5, 0, 0, 0);
  31953. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  31954. __PYX_ERR(2, 1816, __pyx_L1_error)
  31955. /* "uvloop/loop.pyx":1815
  31956. * raise ValueError(
  31957. * 'ssl_handshake_timeout is only meaningful with ssl')
  31958. * if ssl_shutdown_timeout is not None: # <<<<<<<<<<<<<<
  31959. * raise ValueError(
  31960. * 'ssl_shutdown_timeout is only meaningful with ssl')
  31961. */
  31962. }
  31963. }
  31964. __pyx_L11:;
  31965. /* "uvloop/loop.pyx":1819
  31966. * 'ssl_shutdown_timeout is only meaningful with ssl')
  31967. *
  31968. * if host is not None or port is not None: # <<<<<<<<<<<<<<
  31969. * if sock is not None:
  31970. * raise ValueError(
  31971. */
  31972. __pyx_t_1 = (__pyx_cur_scope->__pyx_v_host != Py_None);
  31973. __pyx_t_2 = (__pyx_t_1 != 0);
  31974. if (!__pyx_t_2) {
  31975. } else {
  31976. __pyx_t_3 = __pyx_t_2;
  31977. goto __pyx_L18_bool_binop_done;
  31978. }
  31979. __pyx_t_2 = (__pyx_cur_scope->__pyx_v_port != Py_None);
  31980. __pyx_t_1 = (__pyx_t_2 != 0);
  31981. __pyx_t_3 = __pyx_t_1;
  31982. __pyx_L18_bool_binop_done:;
  31983. if (__pyx_t_3) {
  31984. /* "uvloop/loop.pyx":1820
  31985. *
  31986. * if host is not None or port is not None:
  31987. * if sock is not None: # <<<<<<<<<<<<<<
  31988. * raise ValueError(
  31989. * 'host/port and sock can not be specified at the same time')
  31990. */
  31991. __pyx_t_3 = (__pyx_cur_scope->__pyx_v_sock != Py_None);
  31992. __pyx_t_1 = (__pyx_t_3 != 0);
  31993. if (unlikely(__pyx_t_1)) {
  31994. /* "uvloop/loop.pyx":1821
  31995. * if host is not None or port is not None:
  31996. * if sock is not None:
  31997. * raise ValueError( # <<<<<<<<<<<<<<
  31998. * 'host/port and sock can not be specified at the same time')
  31999. *
  32000. */
  32001. __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__40, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1821, __pyx_L1_error)
  32002. __Pyx_GOTREF(__pyx_t_5);
  32003. __Pyx_Raise(__pyx_t_5, 0, 0, 0);
  32004. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  32005. __PYX_ERR(2, 1821, __pyx_L1_error)
  32006. /* "uvloop/loop.pyx":1820
  32007. *
  32008. * if host is not None or port is not None:
  32009. * if sock is not None: # <<<<<<<<<<<<<<
  32010. * raise ValueError(
  32011. * 'host/port and sock can not be specified at the same time')
  32012. */
  32013. }
  32014. /* "uvloop/loop.pyx":1824
  32015. * 'host/port and sock can not be specified at the same time')
  32016. *
  32017. * fs = [] # <<<<<<<<<<<<<<
  32018. * f1 = f2 = None
  32019. *
  32020. */
  32021. __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1824, __pyx_L1_error)
  32022. __Pyx_GOTREF(__pyx_t_5);
  32023. __Pyx_GIVEREF(__pyx_t_5);
  32024. __pyx_cur_scope->__pyx_v_fs = ((PyObject*)__pyx_t_5);
  32025. __pyx_t_5 = 0;
  32026. /* "uvloop/loop.pyx":1825
  32027. *
  32028. * fs = []
  32029. * f1 = f2 = None # <<<<<<<<<<<<<<
  32030. *
  32031. * addr = __static_getaddrinfo(
  32032. */
  32033. __Pyx_INCREF(Py_None);
  32034. __Pyx_GIVEREF(Py_None);
  32035. __pyx_cur_scope->__pyx_v_f1 = Py_None;
  32036. __Pyx_INCREF(Py_None);
  32037. __Pyx_GIVEREF(Py_None);
  32038. __pyx_cur_scope->__pyx_v_f2 = Py_None;
  32039. /* "uvloop/loop.pyx":1828
  32040. *
  32041. * addr = __static_getaddrinfo(
  32042. * host, port, family, uv.SOCK_STREAM, # <<<<<<<<<<<<<<
  32043. * proto, <system.sockaddr*>&rai_addr_static)
  32044. *
  32045. */
  32046. __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_cur_scope->__pyx_v_family); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 1828, __pyx_L1_error)
  32047. /* "uvloop/loop.pyx":1829
  32048. * addr = __static_getaddrinfo(
  32049. * host, port, family, uv.SOCK_STREAM,
  32050. * proto, <system.sockaddr*>&rai_addr_static) # <<<<<<<<<<<<<<
  32051. *
  32052. * if addr is None:
  32053. */
  32054. __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_cur_scope->__pyx_v_proto); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 1829, __pyx_L1_error)
  32055. /* "uvloop/loop.pyx":1827
  32056. * f1 = f2 = None
  32057. *
  32058. * addr = __static_getaddrinfo( # <<<<<<<<<<<<<<
  32059. * host, port, family, uv.SOCK_STREAM,
  32060. * proto, <system.sockaddr*>&rai_addr_static)
  32061. */
  32062. __pyx_t_5 = __pyx_f_6uvloop_4loop___static_getaddrinfo(__pyx_cur_scope->__pyx_v_host, __pyx_cur_scope->__pyx_v_port, __pyx_t_8, SOCK_STREAM, __pyx_t_9, ((struct sockaddr *)(&__pyx_cur_scope->__pyx_v_rai_addr_static))); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1827, __pyx_L1_error)
  32063. __Pyx_GOTREF(__pyx_t_5);
  32064. __Pyx_GIVEREF(__pyx_t_5);
  32065. __pyx_cur_scope->__pyx_v_addr = __pyx_t_5;
  32066. __pyx_t_5 = 0;
  32067. /* "uvloop/loop.pyx":1831
  32068. * proto, <system.sockaddr*>&rai_addr_static)
  32069. *
  32070. * if addr is None: # <<<<<<<<<<<<<<
  32071. * f1 = self._getaddrinfo(
  32072. * host, port, family,
  32073. */
  32074. __pyx_t_1 = (__pyx_cur_scope->__pyx_v_addr == Py_None);
  32075. __pyx_t_3 = (__pyx_t_1 != 0);
  32076. if (__pyx_t_3) {
  32077. /* "uvloop/loop.pyx":1833
  32078. * if addr is None:
  32079. * f1 = self._getaddrinfo(
  32080. * host, port, family, # <<<<<<<<<<<<<<
  32081. * uv.SOCK_STREAM, proto, flags,
  32082. * 0) # 0 == don't unpack
  32083. */
  32084. __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_cur_scope->__pyx_v_family); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 1833, __pyx_L1_error)
  32085. /* "uvloop/loop.pyx":1834
  32086. * f1 = self._getaddrinfo(
  32087. * host, port, family,
  32088. * uv.SOCK_STREAM, proto, flags, # <<<<<<<<<<<<<<
  32089. * 0) # 0 == don't unpack
  32090. *
  32091. */
  32092. __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_cur_scope->__pyx_v_proto); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 1834, __pyx_L1_error)
  32093. __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_cur_scope->__pyx_v_flags); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 1834, __pyx_L1_error)
  32094. /* "uvloop/loop.pyx":1832
  32095. *
  32096. * if addr is None:
  32097. * f1 = self._getaddrinfo( # <<<<<<<<<<<<<<
  32098. * host, port, family,
  32099. * uv.SOCK_STREAM, proto, flags,
  32100. */
  32101. __pyx_t_5 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->_getaddrinfo(__pyx_cur_scope->__pyx_v_self, __pyx_cur_scope->__pyx_v_host, __pyx_cur_scope->__pyx_v_port, __pyx_t_9, SOCK_STREAM, __pyx_t_8, __pyx_t_10, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1832, __pyx_L1_error)
  32102. __Pyx_GOTREF(__pyx_t_5);
  32103. __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_f1);
  32104. __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_f1, __pyx_t_5);
  32105. __Pyx_GIVEREF(__pyx_t_5);
  32106. __pyx_t_5 = 0;
  32107. /* "uvloop/loop.pyx":1837
  32108. * 0) # 0 == don't unpack
  32109. *
  32110. * fs.append(f1) # <<<<<<<<<<<<<<
  32111. * else:
  32112. * rai_static.ai_addr = <system.sockaddr*>&rai_addr_static
  32113. */
  32114. __pyx_t_11 = __Pyx_PyList_Append(__pyx_cur_scope->__pyx_v_fs, __pyx_cur_scope->__pyx_v_f1); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(2, 1837, __pyx_L1_error)
  32115. /* "uvloop/loop.pyx":1831
  32116. * proto, <system.sockaddr*>&rai_addr_static)
  32117. *
  32118. * if addr is None: # <<<<<<<<<<<<<<
  32119. * f1 = self._getaddrinfo(
  32120. * host, port, family,
  32121. */
  32122. goto __pyx_L21;
  32123. }
  32124. /* "uvloop/loop.pyx":1839
  32125. * fs.append(f1)
  32126. * else:
  32127. * rai_static.ai_addr = <system.sockaddr*>&rai_addr_static # <<<<<<<<<<<<<<
  32128. * rai_static.ai_next = NULL
  32129. * rai = &rai_static
  32130. */
  32131. /*else*/ {
  32132. __pyx_cur_scope->__pyx_v_rai_static.ai_addr = ((struct sockaddr *)(&__pyx_cur_scope->__pyx_v_rai_addr_static));
  32133. /* "uvloop/loop.pyx":1840
  32134. * else:
  32135. * rai_static.ai_addr = <system.sockaddr*>&rai_addr_static
  32136. * rai_static.ai_next = NULL # <<<<<<<<<<<<<<
  32137. * rai = &rai_static
  32138. *
  32139. */
  32140. __pyx_cur_scope->__pyx_v_rai_static.ai_next = NULL;
  32141. /* "uvloop/loop.pyx":1841
  32142. * rai_static.ai_addr = <system.sockaddr*>&rai_addr_static
  32143. * rai_static.ai_next = NULL
  32144. * rai = &rai_static # <<<<<<<<<<<<<<
  32145. *
  32146. * if local_addr is not None:
  32147. */
  32148. __pyx_cur_scope->__pyx_v_rai = (&__pyx_cur_scope->__pyx_v_rai_static);
  32149. }
  32150. __pyx_L21:;
  32151. /* "uvloop/loop.pyx":1843
  32152. * rai = &rai_static
  32153. *
  32154. * if local_addr is not None: # <<<<<<<<<<<<<<
  32155. * if not isinstance(local_addr, (tuple, list)) or \
  32156. * len(local_addr) != 2:
  32157. */
  32158. __pyx_t_3 = (__pyx_cur_scope->__pyx_v_local_addr != Py_None);
  32159. __pyx_t_1 = (__pyx_t_3 != 0);
  32160. if (__pyx_t_1) {
  32161. /* "uvloop/loop.pyx":1844
  32162. *
  32163. * if local_addr is not None:
  32164. * if not isinstance(local_addr, (tuple, list)) or \ # <<<<<<<<<<<<<<
  32165. * len(local_addr) != 2:
  32166. * raise ValueError(
  32167. */
  32168. __pyx_t_2 = PyTuple_Check(__pyx_cur_scope->__pyx_v_local_addr);
  32169. __pyx_t_12 = (__pyx_t_2 != 0);
  32170. if (!__pyx_t_12) {
  32171. } else {
  32172. __pyx_t_3 = __pyx_t_12;
  32173. goto __pyx_L26_bool_binop_done;
  32174. }
  32175. __pyx_t_12 = PyList_Check(__pyx_cur_scope->__pyx_v_local_addr);
  32176. __pyx_t_2 = (__pyx_t_12 != 0);
  32177. __pyx_t_3 = __pyx_t_2;
  32178. __pyx_L26_bool_binop_done:;
  32179. __pyx_t_2 = ((!(__pyx_t_3 != 0)) != 0);
  32180. if (!__pyx_t_2) {
  32181. } else {
  32182. __pyx_t_1 = __pyx_t_2;
  32183. goto __pyx_L24_bool_binop_done;
  32184. }
  32185. /* "uvloop/loop.pyx":1845
  32186. * if local_addr is not None:
  32187. * if not isinstance(local_addr, (tuple, list)) or \
  32188. * len(local_addr) != 2: # <<<<<<<<<<<<<<
  32189. * raise ValueError(
  32190. * 'local_addr must be a tuple of host and port')
  32191. */
  32192. __pyx_t_13 = PyObject_Length(__pyx_cur_scope->__pyx_v_local_addr); if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(2, 1845, __pyx_L1_error)
  32193. __pyx_t_2 = ((__pyx_t_13 != 2) != 0);
  32194. __pyx_t_1 = __pyx_t_2;
  32195. __pyx_L24_bool_binop_done:;
  32196. /* "uvloop/loop.pyx":1844
  32197. *
  32198. * if local_addr is not None:
  32199. * if not isinstance(local_addr, (tuple, list)) or \ # <<<<<<<<<<<<<<
  32200. * len(local_addr) != 2:
  32201. * raise ValueError(
  32202. */
  32203. if (unlikely(__pyx_t_1)) {
  32204. /* "uvloop/loop.pyx":1846
  32205. * if not isinstance(local_addr, (tuple, list)) or \
  32206. * len(local_addr) != 2:
  32207. * raise ValueError( # <<<<<<<<<<<<<<
  32208. * 'local_addr must be a tuple of host and port')
  32209. *
  32210. */
  32211. __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__50, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1846, __pyx_L1_error)
  32212. __Pyx_GOTREF(__pyx_t_5);
  32213. __Pyx_Raise(__pyx_t_5, 0, 0, 0);
  32214. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  32215. __PYX_ERR(2, 1846, __pyx_L1_error)
  32216. /* "uvloop/loop.pyx":1844
  32217. *
  32218. * if local_addr is not None:
  32219. * if not isinstance(local_addr, (tuple, list)) or \ # <<<<<<<<<<<<<<
  32220. * len(local_addr) != 2:
  32221. * raise ValueError(
  32222. */
  32223. }
  32224. /* "uvloop/loop.pyx":1850
  32225. *
  32226. * addr = __static_getaddrinfo(
  32227. * local_addr[0], local_addr[1], # <<<<<<<<<<<<<<
  32228. * family, uv.SOCK_STREAM,
  32229. * proto, <system.sockaddr*>&lai_addr_static)
  32230. */
  32231. __pyx_t_5 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_local_addr, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1850, __pyx_L1_error)
  32232. __Pyx_GOTREF(__pyx_t_5);
  32233. __pyx_t_4 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_local_addr, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1850, __pyx_L1_error)
  32234. __Pyx_GOTREF(__pyx_t_4);
  32235. /* "uvloop/loop.pyx":1851
  32236. * addr = __static_getaddrinfo(
  32237. * local_addr[0], local_addr[1],
  32238. * family, uv.SOCK_STREAM, # <<<<<<<<<<<<<<
  32239. * proto, <system.sockaddr*>&lai_addr_static)
  32240. * if addr is None:
  32241. */
  32242. __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_cur_scope->__pyx_v_family); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 1851, __pyx_L1_error)
  32243. /* "uvloop/loop.pyx":1852
  32244. * local_addr[0], local_addr[1],
  32245. * family, uv.SOCK_STREAM,
  32246. * proto, <system.sockaddr*>&lai_addr_static) # <<<<<<<<<<<<<<
  32247. * if addr is None:
  32248. * f2 = self._getaddrinfo(
  32249. */
  32250. __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_cur_scope->__pyx_v_proto); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 1852, __pyx_L1_error)
  32251. /* "uvloop/loop.pyx":1849
  32252. * 'local_addr must be a tuple of host and port')
  32253. *
  32254. * addr = __static_getaddrinfo( # <<<<<<<<<<<<<<
  32255. * local_addr[0], local_addr[1],
  32256. * family, uv.SOCK_STREAM,
  32257. */
  32258. __pyx_t_7 = __pyx_f_6uvloop_4loop___static_getaddrinfo(__pyx_t_5, __pyx_t_4, __pyx_t_10, SOCK_STREAM, __pyx_t_8, ((struct sockaddr *)(&__pyx_cur_scope->__pyx_v_lai_addr_static))); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 1849, __pyx_L1_error)
  32259. __Pyx_GOTREF(__pyx_t_7);
  32260. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  32261. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  32262. __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_addr);
  32263. __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_addr, __pyx_t_7);
  32264. __Pyx_GIVEREF(__pyx_t_7);
  32265. __pyx_t_7 = 0;
  32266. /* "uvloop/loop.pyx":1853
  32267. * family, uv.SOCK_STREAM,
  32268. * proto, <system.sockaddr*>&lai_addr_static)
  32269. * if addr is None: # <<<<<<<<<<<<<<
  32270. * f2 = self._getaddrinfo(
  32271. * local_addr[0], local_addr[1], family,
  32272. */
  32273. __pyx_t_1 = (__pyx_cur_scope->__pyx_v_addr == Py_None);
  32274. __pyx_t_2 = (__pyx_t_1 != 0);
  32275. if (__pyx_t_2) {
  32276. /* "uvloop/loop.pyx":1855
  32277. * if addr is None:
  32278. * f2 = self._getaddrinfo(
  32279. * local_addr[0], local_addr[1], family, # <<<<<<<<<<<<<<
  32280. * uv.SOCK_STREAM, proto, flags,
  32281. * 0) # 0 == don't unpack
  32282. */
  32283. __pyx_t_7 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_local_addr, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 1855, __pyx_L1_error)
  32284. __Pyx_GOTREF(__pyx_t_7);
  32285. __pyx_t_4 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_local_addr, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1855, __pyx_L1_error)
  32286. __Pyx_GOTREF(__pyx_t_4);
  32287. __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_cur_scope->__pyx_v_family); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 1855, __pyx_L1_error)
  32288. /* "uvloop/loop.pyx":1856
  32289. * f2 = self._getaddrinfo(
  32290. * local_addr[0], local_addr[1], family,
  32291. * uv.SOCK_STREAM, proto, flags, # <<<<<<<<<<<<<<
  32292. * 0) # 0 == don't unpack
  32293. *
  32294. */
  32295. __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_cur_scope->__pyx_v_proto); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 1856, __pyx_L1_error)
  32296. __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_cur_scope->__pyx_v_flags); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 1856, __pyx_L1_error)
  32297. /* "uvloop/loop.pyx":1854
  32298. * proto, <system.sockaddr*>&lai_addr_static)
  32299. * if addr is None:
  32300. * f2 = self._getaddrinfo( # <<<<<<<<<<<<<<
  32301. * local_addr[0], local_addr[1], family,
  32302. * uv.SOCK_STREAM, proto, flags,
  32303. */
  32304. __pyx_t_5 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->_getaddrinfo(__pyx_cur_scope->__pyx_v_self, __pyx_t_7, __pyx_t_4, __pyx_t_8, SOCK_STREAM, __pyx_t_10, __pyx_t_9, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1854, __pyx_L1_error)
  32305. __Pyx_GOTREF(__pyx_t_5);
  32306. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  32307. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  32308. __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_f2);
  32309. __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_f2, __pyx_t_5);
  32310. __Pyx_GIVEREF(__pyx_t_5);
  32311. __pyx_t_5 = 0;
  32312. /* "uvloop/loop.pyx":1859
  32313. * 0) # 0 == don't unpack
  32314. *
  32315. * fs.append(f2) # <<<<<<<<<<<<<<
  32316. * else:
  32317. * lai_static.ai_addr = <system.sockaddr*>&lai_addr_static
  32318. */
  32319. __pyx_t_11 = __Pyx_PyList_Append(__pyx_cur_scope->__pyx_v_fs, __pyx_cur_scope->__pyx_v_f2); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(2, 1859, __pyx_L1_error)
  32320. /* "uvloop/loop.pyx":1853
  32321. * family, uv.SOCK_STREAM,
  32322. * proto, <system.sockaddr*>&lai_addr_static)
  32323. * if addr is None: # <<<<<<<<<<<<<<
  32324. * f2 = self._getaddrinfo(
  32325. * local_addr[0], local_addr[1], family,
  32326. */
  32327. goto __pyx_L28;
  32328. }
  32329. /* "uvloop/loop.pyx":1861
  32330. * fs.append(f2)
  32331. * else:
  32332. * lai_static.ai_addr = <system.sockaddr*>&lai_addr_static # <<<<<<<<<<<<<<
  32333. * lai_static.ai_next = NULL
  32334. * lai = &lai_static
  32335. */
  32336. /*else*/ {
  32337. __pyx_cur_scope->__pyx_v_lai_static.ai_addr = ((struct sockaddr *)(&__pyx_cur_scope->__pyx_v_lai_addr_static));
  32338. /* "uvloop/loop.pyx":1862
  32339. * else:
  32340. * lai_static.ai_addr = <system.sockaddr*>&lai_addr_static
  32341. * lai_static.ai_next = NULL # <<<<<<<<<<<<<<
  32342. * lai = &lai_static
  32343. *
  32344. */
  32345. __pyx_cur_scope->__pyx_v_lai_static.ai_next = NULL;
  32346. /* "uvloop/loop.pyx":1863
  32347. * lai_static.ai_addr = <system.sockaddr*>&lai_addr_static
  32348. * lai_static.ai_next = NULL
  32349. * lai = &lai_static # <<<<<<<<<<<<<<
  32350. *
  32351. * if len(fs):
  32352. */
  32353. __pyx_cur_scope->__pyx_v_lai = (&__pyx_cur_scope->__pyx_v_lai_static);
  32354. }
  32355. __pyx_L28:;
  32356. /* "uvloop/loop.pyx":1843
  32357. * rai = &rai_static
  32358. *
  32359. * if local_addr is not None: # <<<<<<<<<<<<<<
  32360. * if not isinstance(local_addr, (tuple, list)) or \
  32361. * len(local_addr) != 2:
  32362. */
  32363. }
  32364. /* "uvloop/loop.pyx":1865
  32365. * lai = &lai_static
  32366. *
  32367. * if len(fs): # <<<<<<<<<<<<<<
  32368. * await aio_wait(fs, loop=self)
  32369. *
  32370. */
  32371. __pyx_t_13 = PyList_GET_SIZE(__pyx_cur_scope->__pyx_v_fs); if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(2, 1865, __pyx_L1_error)
  32372. __pyx_t_2 = (__pyx_t_13 != 0);
  32373. if (__pyx_t_2) {
  32374. /* "uvloop/loop.pyx":1866
  32375. *
  32376. * if len(fs):
  32377. * await aio_wait(fs, loop=self) # <<<<<<<<<<<<<<
  32378. *
  32379. * if rai is NULL:
  32380. */
  32381. __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1866, __pyx_L1_error)
  32382. __Pyx_GOTREF(__pyx_t_5);
  32383. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_fs);
  32384. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_fs);
  32385. PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_cur_scope->__pyx_v_fs);
  32386. __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1866, __pyx_L1_error)
  32387. __Pyx_GOTREF(__pyx_t_4);
  32388. if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_loop, ((PyObject *)__pyx_cur_scope->__pyx_v_self)) < 0) __PYX_ERR(2, 1866, __pyx_L1_error)
  32389. __pyx_t_7 = __Pyx_PyObject_Call(__pyx_v_6uvloop_4loop_aio_wait, __pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 1866, __pyx_L1_error)
  32390. __Pyx_GOTREF(__pyx_t_7);
  32391. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  32392. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  32393. __pyx_r = __Pyx_Coroutine_Yield_From(__pyx_generator, __pyx_t_7);
  32394. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  32395. __Pyx_XGOTREF(__pyx_r);
  32396. if (likely(__pyx_r)) {
  32397. __Pyx_XGIVEREF(__pyx_r);
  32398. __Pyx_RefNannyFinishContext();
  32399. __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  32400. /* return from generator, awaiting value */
  32401. __pyx_generator->resume_label = 2;
  32402. return __pyx_r;
  32403. __pyx_L30_resume_from_await:;
  32404. if (unlikely(!__pyx_sent_value)) __PYX_ERR(2, 1866, __pyx_L1_error)
  32405. } else {
  32406. PyObject* exc_type = __Pyx_PyErr_Occurred();
  32407. if (exc_type) {
  32408. if (likely(exc_type == PyExc_StopIteration || (exc_type != PyExc_GeneratorExit && __Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)))) PyErr_Clear();
  32409. else __PYX_ERR(2, 1866, __pyx_L1_error)
  32410. }
  32411. }
  32412. /* "uvloop/loop.pyx":1865
  32413. * lai = &lai_static
  32414. *
  32415. * if len(fs): # <<<<<<<<<<<<<<
  32416. * await aio_wait(fs, loop=self)
  32417. *
  32418. */
  32419. }
  32420. /* "uvloop/loop.pyx":1868
  32421. * await aio_wait(fs, loop=self)
  32422. *
  32423. * if rai is NULL: # <<<<<<<<<<<<<<
  32424. * ai_remote = f1.result()
  32425. * if ai_remote.data is NULL:
  32426. */
  32427. __pyx_t_2 = ((__pyx_cur_scope->__pyx_v_rai == NULL) != 0);
  32428. if (__pyx_t_2) {
  32429. /* "uvloop/loop.pyx":1869
  32430. *
  32431. * if rai is NULL:
  32432. * ai_remote = f1.result() # <<<<<<<<<<<<<<
  32433. * if ai_remote.data is NULL:
  32434. * raise OSError('getaddrinfo() returned empty list')
  32435. */
  32436. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_f1, __pyx_n_s_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1869, __pyx_L1_error)
  32437. __Pyx_GOTREF(__pyx_t_4);
  32438. __pyx_t_5 = NULL;
  32439. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
  32440. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
  32441. if (likely(__pyx_t_5)) {
  32442. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  32443. __Pyx_INCREF(__pyx_t_5);
  32444. __Pyx_INCREF(function);
  32445. __Pyx_DECREF_SET(__pyx_t_4, function);
  32446. }
  32447. }
  32448. __pyx_t_7 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
  32449. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  32450. if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 1869, __pyx_L1_error)
  32451. __Pyx_GOTREF(__pyx_t_7);
  32452. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  32453. if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_6uvloop_4loop_AddrInfo))))) __PYX_ERR(2, 1869, __pyx_L1_error)
  32454. __Pyx_GIVEREF(__pyx_t_7);
  32455. __pyx_cur_scope->__pyx_v_ai_remote = ((struct __pyx_obj_6uvloop_4loop_AddrInfo *)__pyx_t_7);
  32456. __pyx_t_7 = 0;
  32457. /* "uvloop/loop.pyx":1870
  32458. * if rai is NULL:
  32459. * ai_remote = f1.result()
  32460. * if ai_remote.data is NULL: # <<<<<<<<<<<<<<
  32461. * raise OSError('getaddrinfo() returned empty list')
  32462. * rai = ai_remote.data
  32463. */
  32464. __pyx_t_2 = ((__pyx_cur_scope->__pyx_v_ai_remote->data == NULL) != 0);
  32465. if (unlikely(__pyx_t_2)) {
  32466. /* "uvloop/loop.pyx":1871
  32467. * ai_remote = f1.result()
  32468. * if ai_remote.data is NULL:
  32469. * raise OSError('getaddrinfo() returned empty list') # <<<<<<<<<<<<<<
  32470. * rai = ai_remote.data
  32471. *
  32472. */
  32473. __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_OSError, __pyx_tuple__51, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 1871, __pyx_L1_error)
  32474. __Pyx_GOTREF(__pyx_t_7);
  32475. __Pyx_Raise(__pyx_t_7, 0, 0, 0);
  32476. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  32477. __PYX_ERR(2, 1871, __pyx_L1_error)
  32478. /* "uvloop/loop.pyx":1870
  32479. * if rai is NULL:
  32480. * ai_remote = f1.result()
  32481. * if ai_remote.data is NULL: # <<<<<<<<<<<<<<
  32482. * raise OSError('getaddrinfo() returned empty list')
  32483. * rai = ai_remote.data
  32484. */
  32485. }
  32486. /* "uvloop/loop.pyx":1872
  32487. * if ai_remote.data is NULL:
  32488. * raise OSError('getaddrinfo() returned empty list')
  32489. * rai = ai_remote.data # <<<<<<<<<<<<<<
  32490. *
  32491. * if lai is NULL and f2 is not None:
  32492. */
  32493. __pyx_t_14 = __pyx_cur_scope->__pyx_v_ai_remote->data;
  32494. __pyx_cur_scope->__pyx_v_rai = __pyx_t_14;
  32495. /* "uvloop/loop.pyx":1868
  32496. * await aio_wait(fs, loop=self)
  32497. *
  32498. * if rai is NULL: # <<<<<<<<<<<<<<
  32499. * ai_remote = f1.result()
  32500. * if ai_remote.data is NULL:
  32501. */
  32502. }
  32503. /* "uvloop/loop.pyx":1874
  32504. * rai = ai_remote.data
  32505. *
  32506. * if lai is NULL and f2 is not None: # <<<<<<<<<<<<<<
  32507. * ai_local = f2.result()
  32508. * if ai_local.data is NULL:
  32509. */
  32510. __pyx_t_1 = ((__pyx_cur_scope->__pyx_v_lai == NULL) != 0);
  32511. if (__pyx_t_1) {
  32512. } else {
  32513. __pyx_t_2 = __pyx_t_1;
  32514. goto __pyx_L34_bool_binop_done;
  32515. }
  32516. __pyx_t_1 = (__pyx_cur_scope->__pyx_v_f2 != Py_None);
  32517. __pyx_t_3 = (__pyx_t_1 != 0);
  32518. __pyx_t_2 = __pyx_t_3;
  32519. __pyx_L34_bool_binop_done:;
  32520. if (__pyx_t_2) {
  32521. /* "uvloop/loop.pyx":1875
  32522. *
  32523. * if lai is NULL and f2 is not None:
  32524. * ai_local = f2.result() # <<<<<<<<<<<<<<
  32525. * if ai_local.data is NULL:
  32526. * raise OSError(
  32527. */
  32528. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_f2, __pyx_n_s_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1875, __pyx_L1_error)
  32529. __Pyx_GOTREF(__pyx_t_4);
  32530. __pyx_t_5 = NULL;
  32531. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
  32532. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
  32533. if (likely(__pyx_t_5)) {
  32534. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  32535. __Pyx_INCREF(__pyx_t_5);
  32536. __Pyx_INCREF(function);
  32537. __Pyx_DECREF_SET(__pyx_t_4, function);
  32538. }
  32539. }
  32540. __pyx_t_7 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
  32541. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  32542. if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 1875, __pyx_L1_error)
  32543. __Pyx_GOTREF(__pyx_t_7);
  32544. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  32545. if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_6uvloop_4loop_AddrInfo))))) __PYX_ERR(2, 1875, __pyx_L1_error)
  32546. __Pyx_GOTREF(((PyObject *)__pyx_cur_scope->__pyx_v_ai_local));
  32547. __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_ai_local, ((struct __pyx_obj_6uvloop_4loop_AddrInfo *)__pyx_t_7));
  32548. __Pyx_GIVEREF(__pyx_t_7);
  32549. __pyx_t_7 = 0;
  32550. /* "uvloop/loop.pyx":1876
  32551. * if lai is NULL and f2 is not None:
  32552. * ai_local = f2.result()
  32553. * if ai_local.data is NULL: # <<<<<<<<<<<<<<
  32554. * raise OSError(
  32555. * 'getaddrinfo() returned empty list for local_addr')
  32556. */
  32557. __pyx_t_2 = ((__pyx_cur_scope->__pyx_v_ai_local->data == NULL) != 0);
  32558. if (unlikely(__pyx_t_2)) {
  32559. /* "uvloop/loop.pyx":1877
  32560. * ai_local = f2.result()
  32561. * if ai_local.data is NULL:
  32562. * raise OSError( # <<<<<<<<<<<<<<
  32563. * 'getaddrinfo() returned empty list for local_addr')
  32564. * lai = ai_local.data
  32565. */
  32566. __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_OSError, __pyx_tuple__52, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 1877, __pyx_L1_error)
  32567. __Pyx_GOTREF(__pyx_t_7);
  32568. __Pyx_Raise(__pyx_t_7, 0, 0, 0);
  32569. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  32570. __PYX_ERR(2, 1877, __pyx_L1_error)
  32571. /* "uvloop/loop.pyx":1876
  32572. * if lai is NULL and f2 is not None:
  32573. * ai_local = f2.result()
  32574. * if ai_local.data is NULL: # <<<<<<<<<<<<<<
  32575. * raise OSError(
  32576. * 'getaddrinfo() returned empty list for local_addr')
  32577. */
  32578. }
  32579. /* "uvloop/loop.pyx":1879
  32580. * raise OSError(
  32581. * 'getaddrinfo() returned empty list for local_addr')
  32582. * lai = ai_local.data # <<<<<<<<<<<<<<
  32583. *
  32584. * exceptions = []
  32585. */
  32586. __pyx_t_14 = __pyx_cur_scope->__pyx_v_ai_local->data;
  32587. __pyx_cur_scope->__pyx_v_lai = __pyx_t_14;
  32588. /* "uvloop/loop.pyx":1874
  32589. * rai = ai_remote.data
  32590. *
  32591. * if lai is NULL and f2 is not None: # <<<<<<<<<<<<<<
  32592. * ai_local = f2.result()
  32593. * if ai_local.data is NULL:
  32594. */
  32595. }
  32596. /* "uvloop/loop.pyx":1881
  32597. * lai = ai_local.data
  32598. *
  32599. * exceptions = [] # <<<<<<<<<<<<<<
  32600. * rai_iter = rai
  32601. * while rai_iter is not NULL:
  32602. */
  32603. __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 1881, __pyx_L1_error)
  32604. __Pyx_GOTREF(__pyx_t_7);
  32605. __Pyx_GIVEREF(__pyx_t_7);
  32606. __pyx_cur_scope->__pyx_v_exceptions = ((PyObject*)__pyx_t_7);
  32607. __pyx_t_7 = 0;
  32608. /* "uvloop/loop.pyx":1882
  32609. *
  32610. * exceptions = []
  32611. * rai_iter = rai # <<<<<<<<<<<<<<
  32612. * while rai_iter is not NULL:
  32613. * tr = None
  32614. */
  32615. __pyx_cur_scope->__pyx_v_rai_iter = __pyx_cur_scope->__pyx_v_rai;
  32616. /* "uvloop/loop.pyx":1883
  32617. * exceptions = []
  32618. * rai_iter = rai
  32619. * while rai_iter is not NULL: # <<<<<<<<<<<<<<
  32620. * tr = None
  32621. * try:
  32622. */
  32623. while (1) {
  32624. __pyx_t_2 = ((__pyx_cur_scope->__pyx_v_rai_iter != NULL) != 0);
  32625. if (!__pyx_t_2) break;
  32626. /* "uvloop/loop.pyx":1884
  32627. * rai_iter = rai
  32628. * while rai_iter is not NULL:
  32629. * tr = None # <<<<<<<<<<<<<<
  32630. * try:
  32631. * waiter = self._new_future()
  32632. */
  32633. __Pyx_INCREF(Py_None);
  32634. __Pyx_XGOTREF(((PyObject *)__pyx_cur_scope->__pyx_v_tr));
  32635. __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_tr, ((struct __pyx_obj_6uvloop_4loop_TCPTransport *)Py_None));
  32636. __Pyx_GIVEREF(Py_None);
  32637. /* "uvloop/loop.pyx":1885
  32638. * while rai_iter is not NULL:
  32639. * tr = None
  32640. * try: # <<<<<<<<<<<<<<
  32641. * waiter = self._new_future()
  32642. * tr = TCPTransport.new(self, protocol, None, waiter)
  32643. */
  32644. {
  32645. __Pyx_ExceptionSave(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17);
  32646. __Pyx_XGOTREF(__pyx_t_15);
  32647. __Pyx_XGOTREF(__pyx_t_16);
  32648. __Pyx_XGOTREF(__pyx_t_17);
  32649. /*try:*/ {
  32650. /* "uvloop/loop.pyx":1886
  32651. * tr = None
  32652. * try:
  32653. * waiter = self._new_future() # <<<<<<<<<<<<<<
  32654. * tr = TCPTransport.new(self, protocol, None, waiter)
  32655. *
  32656. */
  32657. __pyx_t_7 = __pyx_f_6uvloop_4loop_4Loop__new_future(__pyx_cur_scope->__pyx_v_self); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 1886, __pyx_L39_error)
  32658. __Pyx_GOTREF(__pyx_t_7);
  32659. __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_waiter);
  32660. __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_waiter, __pyx_t_7);
  32661. __Pyx_GIVEREF(__pyx_t_7);
  32662. __pyx_t_7 = 0;
  32663. /* "uvloop/loop.pyx":1887
  32664. * try:
  32665. * waiter = self._new_future()
  32666. * tr = TCPTransport.new(self, protocol, None, waiter) # <<<<<<<<<<<<<<
  32667. *
  32668. * if lai is not NULL:
  32669. */
  32670. __pyx_t_7 = ((PyObject *)__pyx_f_6uvloop_4loop_12TCPTransport_new(__pyx_cur_scope->__pyx_v_self, __pyx_cur_scope->__pyx_v_protocol, ((struct __pyx_obj_6uvloop_4loop_Server *)Py_None), __pyx_cur_scope->__pyx_v_waiter)); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 1887, __pyx_L39_error)
  32671. __Pyx_GOTREF(__pyx_t_7);
  32672. __Pyx_GOTREF(((PyObject *)__pyx_cur_scope->__pyx_v_tr));
  32673. __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_tr, ((struct __pyx_obj_6uvloop_4loop_TCPTransport *)__pyx_t_7));
  32674. __Pyx_GIVEREF(__pyx_t_7);
  32675. __pyx_t_7 = 0;
  32676. /* "uvloop/loop.pyx":1889
  32677. * tr = TCPTransport.new(self, protocol, None, waiter)
  32678. *
  32679. * if lai is not NULL: # <<<<<<<<<<<<<<
  32680. * lai_iter = lai
  32681. * while lai_iter is not NULL:
  32682. */
  32683. __pyx_t_2 = ((__pyx_cur_scope->__pyx_v_lai != NULL) != 0);
  32684. if (__pyx_t_2) {
  32685. /* "uvloop/loop.pyx":1890
  32686. *
  32687. * if lai is not NULL:
  32688. * lai_iter = lai # <<<<<<<<<<<<<<
  32689. * while lai_iter is not NULL:
  32690. * try:
  32691. */
  32692. __pyx_cur_scope->__pyx_v_lai_iter = __pyx_cur_scope->__pyx_v_lai;
  32693. /* "uvloop/loop.pyx":1891
  32694. * if lai is not NULL:
  32695. * lai_iter = lai
  32696. * while lai_iter is not NULL: # <<<<<<<<<<<<<<
  32697. * try:
  32698. * tr.bind(lai_iter.ai_addr)
  32699. */
  32700. while (1) {
  32701. __pyx_t_2 = ((__pyx_cur_scope->__pyx_v_lai_iter != NULL) != 0);
  32702. if (!__pyx_t_2) break;
  32703. /* "uvloop/loop.pyx":1892
  32704. * lai_iter = lai
  32705. * while lai_iter is not NULL:
  32706. * try: # <<<<<<<<<<<<<<
  32707. * tr.bind(lai_iter.ai_addr)
  32708. * break
  32709. */
  32710. {
  32711. __Pyx_ExceptionSave(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20);
  32712. __Pyx_XGOTREF(__pyx_t_18);
  32713. __Pyx_XGOTREF(__pyx_t_19);
  32714. __Pyx_XGOTREF(__pyx_t_20);
  32715. /*try:*/ {
  32716. /* "uvloop/loop.pyx":1893
  32717. * while lai_iter is not NULL:
  32718. * try:
  32719. * tr.bind(lai_iter.ai_addr) # <<<<<<<<<<<<<<
  32720. * break
  32721. * except OSError as exc:
  32722. */
  32723. __pyx_t_7 = ((struct __pyx_vtabstruct_6uvloop_4loop_TCPTransport *)__pyx_cur_scope->__pyx_v_tr->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->bind(__pyx_cur_scope->__pyx_v_tr, __pyx_cur_scope->__pyx_v_lai_iter->ai_addr, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 1893, __pyx_L50_error)
  32724. __Pyx_GOTREF(__pyx_t_7);
  32725. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  32726. /* "uvloop/loop.pyx":1894
  32727. * try:
  32728. * tr.bind(lai_iter.ai_addr)
  32729. * break # <<<<<<<<<<<<<<
  32730. * except OSError as exc:
  32731. * exceptions.append(exc)
  32732. */
  32733. goto __pyx_L55_try_break;
  32734. /* "uvloop/loop.pyx":1892
  32735. * lai_iter = lai
  32736. * while lai_iter is not NULL:
  32737. * try: # <<<<<<<<<<<<<<
  32738. * tr.bind(lai_iter.ai_addr)
  32739. * break
  32740. */
  32741. }
  32742. __pyx_L50_error:;
  32743. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  32744. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  32745. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  32746. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  32747. /* "uvloop/loop.pyx":1895
  32748. * tr.bind(lai_iter.ai_addr)
  32749. * break
  32750. * except OSError as exc: # <<<<<<<<<<<<<<
  32751. * exceptions.append(exc)
  32752. * lai_iter = lai_iter.ai_next
  32753. */
  32754. __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_OSError);
  32755. if (__pyx_t_9) {
  32756. __Pyx_AddTraceback("uvloop.loop.Loop.create_connection", __pyx_clineno, __pyx_lineno, __pyx_filename);
  32757. if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_4, &__pyx_t_5) < 0) __PYX_ERR(2, 1895, __pyx_L52_except_error)
  32758. __Pyx_GOTREF(__pyx_t_7);
  32759. __Pyx_GOTREF(__pyx_t_4);
  32760. __Pyx_GOTREF(__pyx_t_5);
  32761. __Pyx_INCREF(__pyx_t_4);
  32762. __Pyx_GIVEREF(__pyx_t_4);
  32763. __pyx_cur_scope->__pyx_v_exc = __pyx_t_4;
  32764. /*try:*/ {
  32765. /* "uvloop/loop.pyx":1896
  32766. * break
  32767. * except OSError as exc:
  32768. * exceptions.append(exc) # <<<<<<<<<<<<<<
  32769. * lai_iter = lai_iter.ai_next
  32770. * else:
  32771. */
  32772. __pyx_t_11 = __Pyx_PyList_Append(__pyx_cur_scope->__pyx_v_exceptions, __pyx_cur_scope->__pyx_v_exc); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(2, 1896, __pyx_L63_error)
  32773. }
  32774. /* "uvloop/loop.pyx":1895
  32775. * tr.bind(lai_iter.ai_addr)
  32776. * break
  32777. * except OSError as exc: # <<<<<<<<<<<<<<
  32778. * exceptions.append(exc)
  32779. * lai_iter = lai_iter.ai_next
  32780. */
  32781. /*finally:*/ {
  32782. /*normal exit:*/{
  32783. __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_exc);
  32784. __Pyx_DECREF(__pyx_cur_scope->__pyx_v_exc);
  32785. __pyx_cur_scope->__pyx_v_exc = NULL;
  32786. goto __pyx_L64;
  32787. }
  32788. __pyx_L63_error:;
  32789. /*exception exit:*/{
  32790. __Pyx_PyThreadState_assign
  32791. __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0; __pyx_t_26 = 0; __pyx_t_27 = 0;
  32792. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  32793. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_25, &__pyx_t_26, &__pyx_t_27);
  32794. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_22, &__pyx_t_23, &__pyx_t_24) < 0)) __Pyx_ErrFetch(&__pyx_t_22, &__pyx_t_23, &__pyx_t_24);
  32795. __Pyx_XGOTREF(__pyx_t_22);
  32796. __Pyx_XGOTREF(__pyx_t_23);
  32797. __Pyx_XGOTREF(__pyx_t_24);
  32798. __Pyx_XGOTREF(__pyx_t_25);
  32799. __Pyx_XGOTREF(__pyx_t_26);
  32800. __Pyx_XGOTREF(__pyx_t_27);
  32801. __pyx_t_9 = __pyx_lineno; __pyx_t_10 = __pyx_clineno; __pyx_t_21 = __pyx_filename;
  32802. {
  32803. __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_exc);
  32804. __Pyx_DECREF(__pyx_cur_scope->__pyx_v_exc);
  32805. __pyx_cur_scope->__pyx_v_exc = NULL;
  32806. }
  32807. if (PY_MAJOR_VERSION >= 3) {
  32808. __Pyx_XGIVEREF(__pyx_t_25);
  32809. __Pyx_XGIVEREF(__pyx_t_26);
  32810. __Pyx_XGIVEREF(__pyx_t_27);
  32811. __Pyx_ExceptionReset(__pyx_t_25, __pyx_t_26, __pyx_t_27);
  32812. }
  32813. __Pyx_XGIVEREF(__pyx_t_22);
  32814. __Pyx_XGIVEREF(__pyx_t_23);
  32815. __Pyx_XGIVEREF(__pyx_t_24);
  32816. __Pyx_ErrRestore(__pyx_t_22, __pyx_t_23, __pyx_t_24);
  32817. __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0; __pyx_t_26 = 0; __pyx_t_27 = 0;
  32818. __pyx_lineno = __pyx_t_9; __pyx_clineno = __pyx_t_10; __pyx_filename = __pyx_t_21;
  32819. goto __pyx_L52_except_error;
  32820. }
  32821. __pyx_L64:;
  32822. }
  32823. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  32824. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  32825. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  32826. goto __pyx_L51_exception_handled;
  32827. }
  32828. goto __pyx_L52_except_error;
  32829. __pyx_L52_except_error:;
  32830. /* "uvloop/loop.pyx":1892
  32831. * lai_iter = lai
  32832. * while lai_iter is not NULL:
  32833. * try: # <<<<<<<<<<<<<<
  32834. * tr.bind(lai_iter.ai_addr)
  32835. * break
  32836. */
  32837. __Pyx_XGIVEREF(__pyx_t_18);
  32838. __Pyx_XGIVEREF(__pyx_t_19);
  32839. __Pyx_XGIVEREF(__pyx_t_20);
  32840. __Pyx_ExceptionReset(__pyx_t_18, __pyx_t_19, __pyx_t_20);
  32841. goto __pyx_L39_error;
  32842. __pyx_L55_try_break:;
  32843. __Pyx_XGIVEREF(__pyx_t_18);
  32844. __Pyx_XGIVEREF(__pyx_t_19);
  32845. __Pyx_XGIVEREF(__pyx_t_20);
  32846. __Pyx_ExceptionReset(__pyx_t_18, __pyx_t_19, __pyx_t_20);
  32847. goto __pyx_L49_break;
  32848. __pyx_L51_exception_handled:;
  32849. __Pyx_XGIVEREF(__pyx_t_18);
  32850. __Pyx_XGIVEREF(__pyx_t_19);
  32851. __Pyx_XGIVEREF(__pyx_t_20);
  32852. __Pyx_ExceptionReset(__pyx_t_18, __pyx_t_19, __pyx_t_20);
  32853. }
  32854. /* "uvloop/loop.pyx":1897
  32855. * except OSError as exc:
  32856. * exceptions.append(exc)
  32857. * lai_iter = lai_iter.ai_next # <<<<<<<<<<<<<<
  32858. * else:
  32859. * tr._close()
  32860. */
  32861. __pyx_t_14 = __pyx_cur_scope->__pyx_v_lai_iter->ai_next;
  32862. __pyx_cur_scope->__pyx_v_lai_iter = __pyx_t_14;
  32863. }
  32864. /* "uvloop/loop.pyx":1899
  32865. * lai_iter = lai_iter.ai_next
  32866. * else:
  32867. * tr._close() # <<<<<<<<<<<<<<
  32868. * tr = None
  32869. *
  32870. */
  32871. /*else*/ {
  32872. __pyx_t_5 = ((struct __pyx_vtabstruct_6uvloop_4loop_TCPTransport *)__pyx_cur_scope->__pyx_v_tr->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base.__pyx_base._close(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_cur_scope->__pyx_v_tr)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1899, __pyx_L39_error)
  32873. __Pyx_GOTREF(__pyx_t_5);
  32874. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  32875. /* "uvloop/loop.pyx":1900
  32876. * else:
  32877. * tr._close()
  32878. * tr = None # <<<<<<<<<<<<<<
  32879. *
  32880. * rai_iter = rai_iter.ai_next
  32881. */
  32882. __Pyx_INCREF(Py_None);
  32883. __Pyx_GOTREF(((PyObject *)__pyx_cur_scope->__pyx_v_tr));
  32884. __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_tr, ((struct __pyx_obj_6uvloop_4loop_TCPTransport *)Py_None));
  32885. __Pyx_GIVEREF(Py_None);
  32886. /* "uvloop/loop.pyx":1902
  32887. * tr = None
  32888. *
  32889. * rai_iter = rai_iter.ai_next # <<<<<<<<<<<<<<
  32890. * continue
  32891. *
  32892. */
  32893. __pyx_t_14 = __pyx_cur_scope->__pyx_v_rai_iter->ai_next;
  32894. __pyx_cur_scope->__pyx_v_rai_iter = __pyx_t_14;
  32895. /* "uvloop/loop.pyx":1903
  32896. *
  32897. * rai_iter = rai_iter.ai_next
  32898. * continue # <<<<<<<<<<<<<<
  32899. *
  32900. * tr.connect(rai_iter.ai_addr)
  32901. */
  32902. goto __pyx_L45_try_continue;
  32903. }
  32904. __pyx_L49_break:;
  32905. /* "uvloop/loop.pyx":1889
  32906. * tr = TCPTransport.new(self, protocol, None, waiter)
  32907. *
  32908. * if lai is not NULL: # <<<<<<<<<<<<<<
  32909. * lai_iter = lai
  32910. * while lai_iter is not NULL:
  32911. */
  32912. }
  32913. /* "uvloop/loop.pyx":1905
  32914. * continue
  32915. *
  32916. * tr.connect(rai_iter.ai_addr) # <<<<<<<<<<<<<<
  32917. * await waiter
  32918. *
  32919. */
  32920. __pyx_t_5 = ((struct __pyx_vtabstruct_6uvloop_4loop_TCPTransport *)__pyx_cur_scope->__pyx_v_tr->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->connect(__pyx_cur_scope->__pyx_v_tr, __pyx_cur_scope->__pyx_v_rai_iter->ai_addr); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1905, __pyx_L39_error)
  32921. __Pyx_GOTREF(__pyx_t_5);
  32922. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  32923. /* "uvloop/loop.pyx":1906
  32924. *
  32925. * tr.connect(rai_iter.ai_addr)
  32926. * await waiter # <<<<<<<<<<<<<<
  32927. *
  32928. * except OSError as exc:
  32929. */
  32930. __pyx_r = __Pyx_Coroutine_Yield_From(__pyx_generator, __pyx_cur_scope->__pyx_v_waiter);
  32931. __Pyx_XGOTREF(__pyx_r);
  32932. if (likely(__pyx_r)) {
  32933. __Pyx_XGIVEREF(__pyx_t_15);
  32934. __pyx_cur_scope->__pyx_t_0 = __pyx_t_15;
  32935. __Pyx_XGIVEREF(__pyx_t_16);
  32936. __pyx_cur_scope->__pyx_t_1 = __pyx_t_16;
  32937. __Pyx_XGIVEREF(__pyx_t_17);
  32938. __pyx_cur_scope->__pyx_t_2 = __pyx_t_17;
  32939. __Pyx_XGIVEREF(__pyx_r);
  32940. __Pyx_RefNannyFinishContext();
  32941. __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  32942. /* return from generator, awaiting value */
  32943. __pyx_generator->resume_label = 3;
  32944. return __pyx_r;
  32945. __pyx_L69_resume_from_await:;
  32946. __pyx_t_15 = __pyx_cur_scope->__pyx_t_0;
  32947. __pyx_cur_scope->__pyx_t_0 = 0;
  32948. __Pyx_XGOTREF(__pyx_t_15);
  32949. __pyx_t_16 = __pyx_cur_scope->__pyx_t_1;
  32950. __pyx_cur_scope->__pyx_t_1 = 0;
  32951. __Pyx_XGOTREF(__pyx_t_16);
  32952. __pyx_t_17 = __pyx_cur_scope->__pyx_t_2;
  32953. __pyx_cur_scope->__pyx_t_2 = 0;
  32954. __Pyx_XGOTREF(__pyx_t_17);
  32955. if (unlikely(!__pyx_sent_value)) __PYX_ERR(2, 1906, __pyx_L39_error)
  32956. } else {
  32957. PyObject* exc_type = __Pyx_PyErr_Occurred();
  32958. if (exc_type) {
  32959. if (likely(exc_type == PyExc_StopIteration || (exc_type != PyExc_GeneratorExit && __Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)))) PyErr_Clear();
  32960. else __PYX_ERR(2, 1906, __pyx_L39_error)
  32961. }
  32962. }
  32963. /* "uvloop/loop.pyx":1885
  32964. * while rai_iter is not NULL:
  32965. * tr = None
  32966. * try: # <<<<<<<<<<<<<<
  32967. * waiter = self._new_future()
  32968. * tr = TCPTransport.new(self, protocol, None, waiter)
  32969. */
  32970. }
  32971. /* "uvloop/loop.pyx":1919
  32972. * raise
  32973. * else:
  32974. * break # <<<<<<<<<<<<<<
  32975. *
  32976. * rai_iter = rai_iter.ai_next
  32977. */
  32978. /*else:*/ {
  32979. goto __pyx_L44_try_break;
  32980. }
  32981. __pyx_L39_error:;
  32982. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  32983. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  32984. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  32985. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  32986. /* "uvloop/loop.pyx":1908
  32987. * await waiter
  32988. *
  32989. * except OSError as exc: # <<<<<<<<<<<<<<
  32990. * if tr is not None:
  32991. * tr._close()
  32992. */
  32993. __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_OSError);
  32994. if (__pyx_t_10) {
  32995. __Pyx_AddTraceback("uvloop.loop.Loop.create_connection", __pyx_clineno, __pyx_lineno, __pyx_filename);
  32996. if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_7) < 0) __PYX_ERR(2, 1908, __pyx_L41_except_error)
  32997. __Pyx_GOTREF(__pyx_t_5);
  32998. __Pyx_GOTREF(__pyx_t_4);
  32999. __Pyx_GOTREF(__pyx_t_7);
  33000. __Pyx_INCREF(__pyx_t_4);
  33001. __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_exc);
  33002. __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_exc, __pyx_t_4);
  33003. __Pyx_GIVEREF(__pyx_t_4);
  33004. /*try:*/ {
  33005. /* "uvloop/loop.pyx":1909
  33006. *
  33007. * except OSError as exc:
  33008. * if tr is not None: # <<<<<<<<<<<<<<
  33009. * tr._close()
  33010. * tr = None
  33011. */
  33012. __pyx_t_2 = (((PyObject *)__pyx_cur_scope->__pyx_v_tr) != Py_None);
  33013. __pyx_t_3 = (__pyx_t_2 != 0);
  33014. if (__pyx_t_3) {
  33015. /* "uvloop/loop.pyx":1910
  33016. * except OSError as exc:
  33017. * if tr is not None:
  33018. * tr._close() # <<<<<<<<<<<<<<
  33019. * tr = None
  33020. * exceptions.append(exc)
  33021. */
  33022. __pyx_t_6 = ((struct __pyx_vtabstruct_6uvloop_4loop_TCPTransport *)__pyx_cur_scope->__pyx_v_tr->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base.__pyx_base._close(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_cur_scope->__pyx_v_tr)); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1910, __pyx_L75_error)
  33023. __Pyx_GOTREF(__pyx_t_6);
  33024. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  33025. /* "uvloop/loop.pyx":1911
  33026. * if tr is not None:
  33027. * tr._close()
  33028. * tr = None # <<<<<<<<<<<<<<
  33029. * exceptions.append(exc)
  33030. * except Exception:
  33031. */
  33032. __Pyx_INCREF(Py_None);
  33033. __Pyx_GOTREF(((PyObject *)__pyx_cur_scope->__pyx_v_tr));
  33034. __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_tr, ((struct __pyx_obj_6uvloop_4loop_TCPTransport *)Py_None));
  33035. __Pyx_GIVEREF(Py_None);
  33036. /* "uvloop/loop.pyx":1909
  33037. *
  33038. * except OSError as exc:
  33039. * if tr is not None: # <<<<<<<<<<<<<<
  33040. * tr._close()
  33041. * tr = None
  33042. */
  33043. }
  33044. /* "uvloop/loop.pyx":1912
  33045. * tr._close()
  33046. * tr = None
  33047. * exceptions.append(exc) # <<<<<<<<<<<<<<
  33048. * except Exception:
  33049. * if tr is not None:
  33050. */
  33051. __pyx_t_11 = __Pyx_PyList_Append(__pyx_cur_scope->__pyx_v_exceptions, __pyx_cur_scope->__pyx_v_exc); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(2, 1912, __pyx_L75_error)
  33052. }
  33053. /* "uvloop/loop.pyx":1908
  33054. * await waiter
  33055. *
  33056. * except OSError as exc: # <<<<<<<<<<<<<<
  33057. * if tr is not None:
  33058. * tr._close()
  33059. */
  33060. /*finally:*/ {
  33061. /*normal exit:*/{
  33062. __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_exc);
  33063. __Pyx_DECREF(__pyx_cur_scope->__pyx_v_exc);
  33064. __pyx_cur_scope->__pyx_v_exc = NULL;
  33065. goto __pyx_L76;
  33066. }
  33067. __pyx_L75_error:;
  33068. /*exception exit:*/{
  33069. __Pyx_PyThreadState_assign
  33070. __pyx_t_20 = 0; __pyx_t_19 = 0; __pyx_t_18 = 0; __pyx_t_27 = 0; __pyx_t_26 = 0; __pyx_t_25 = 0;
  33071. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  33072. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_27, &__pyx_t_26, &__pyx_t_25);
  33073. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_20, &__pyx_t_19, &__pyx_t_18) < 0)) __Pyx_ErrFetch(&__pyx_t_20, &__pyx_t_19, &__pyx_t_18);
  33074. __Pyx_XGOTREF(__pyx_t_20);
  33075. __Pyx_XGOTREF(__pyx_t_19);
  33076. __Pyx_XGOTREF(__pyx_t_18);
  33077. __Pyx_XGOTREF(__pyx_t_27);
  33078. __Pyx_XGOTREF(__pyx_t_26);
  33079. __Pyx_XGOTREF(__pyx_t_25);
  33080. __pyx_t_10 = __pyx_lineno; __pyx_t_9 = __pyx_clineno; __pyx_t_28 = __pyx_filename;
  33081. {
  33082. __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_exc);
  33083. __Pyx_DECREF(__pyx_cur_scope->__pyx_v_exc);
  33084. __pyx_cur_scope->__pyx_v_exc = NULL;
  33085. }
  33086. if (PY_MAJOR_VERSION >= 3) {
  33087. __Pyx_XGIVEREF(__pyx_t_27);
  33088. __Pyx_XGIVEREF(__pyx_t_26);
  33089. __Pyx_XGIVEREF(__pyx_t_25);
  33090. __Pyx_ExceptionReset(__pyx_t_27, __pyx_t_26, __pyx_t_25);
  33091. }
  33092. __Pyx_XGIVEREF(__pyx_t_20);
  33093. __Pyx_XGIVEREF(__pyx_t_19);
  33094. __Pyx_XGIVEREF(__pyx_t_18);
  33095. __Pyx_ErrRestore(__pyx_t_20, __pyx_t_19, __pyx_t_18);
  33096. __pyx_t_20 = 0; __pyx_t_19 = 0; __pyx_t_18 = 0; __pyx_t_27 = 0; __pyx_t_26 = 0; __pyx_t_25 = 0;
  33097. __pyx_lineno = __pyx_t_10; __pyx_clineno = __pyx_t_9; __pyx_filename = __pyx_t_28;
  33098. goto __pyx_L41_except_error;
  33099. }
  33100. __pyx_L76:;
  33101. }
  33102. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  33103. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  33104. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  33105. goto __pyx_L40_exception_handled;
  33106. }
  33107. /* "uvloop/loop.pyx":1913
  33108. * tr = None
  33109. * exceptions.append(exc)
  33110. * except Exception: # <<<<<<<<<<<<<<
  33111. * if tr is not None:
  33112. * tr._close()
  33113. */
  33114. __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
  33115. if (__pyx_t_9) {
  33116. __Pyx_AddTraceback("uvloop.loop.Loop.create_connection", __pyx_clineno, __pyx_lineno, __pyx_filename);
  33117. if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_4, &__pyx_t_5) < 0) __PYX_ERR(2, 1913, __pyx_L41_except_error)
  33118. __Pyx_GOTREF(__pyx_t_7);
  33119. __Pyx_GOTREF(__pyx_t_4);
  33120. __Pyx_GOTREF(__pyx_t_5);
  33121. /* "uvloop/loop.pyx":1914
  33122. * exceptions.append(exc)
  33123. * except Exception:
  33124. * if tr is not None: # <<<<<<<<<<<<<<
  33125. * tr._close()
  33126. * tr = None
  33127. */
  33128. __pyx_t_3 = (((PyObject *)__pyx_cur_scope->__pyx_v_tr) != Py_None);
  33129. __pyx_t_2 = (__pyx_t_3 != 0);
  33130. if (__pyx_t_2) {
  33131. /* "uvloop/loop.pyx":1915
  33132. * except Exception:
  33133. * if tr is not None:
  33134. * tr._close() # <<<<<<<<<<<<<<
  33135. * tr = None
  33136. * raise
  33137. */
  33138. __pyx_t_6 = ((struct __pyx_vtabstruct_6uvloop_4loop_TCPTransport *)__pyx_cur_scope->__pyx_v_tr->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base.__pyx_base._close(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_cur_scope->__pyx_v_tr)); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1915, __pyx_L41_except_error)
  33139. __Pyx_GOTREF(__pyx_t_6);
  33140. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  33141. /* "uvloop/loop.pyx":1916
  33142. * if tr is not None:
  33143. * tr._close()
  33144. * tr = None # <<<<<<<<<<<<<<
  33145. * raise
  33146. * else:
  33147. */
  33148. __Pyx_INCREF(Py_None);
  33149. __Pyx_GOTREF(((PyObject *)__pyx_cur_scope->__pyx_v_tr));
  33150. __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_tr, ((struct __pyx_obj_6uvloop_4loop_TCPTransport *)Py_None));
  33151. __Pyx_GIVEREF(Py_None);
  33152. /* "uvloop/loop.pyx":1914
  33153. * exceptions.append(exc)
  33154. * except Exception:
  33155. * if tr is not None: # <<<<<<<<<<<<<<
  33156. * tr._close()
  33157. * tr = None
  33158. */
  33159. }
  33160. /* "uvloop/loop.pyx":1917
  33161. * tr._close()
  33162. * tr = None
  33163. * raise # <<<<<<<<<<<<<<
  33164. * else:
  33165. * break
  33166. */
  33167. __Pyx_GIVEREF(__pyx_t_7);
  33168. __Pyx_GIVEREF(__pyx_t_4);
  33169. __Pyx_XGIVEREF(__pyx_t_5);
  33170. __Pyx_ErrRestoreWithState(__pyx_t_7, __pyx_t_4, __pyx_t_5);
  33171. __pyx_t_7 = 0; __pyx_t_4 = 0; __pyx_t_5 = 0;
  33172. __PYX_ERR(2, 1917, __pyx_L41_except_error)
  33173. }
  33174. goto __pyx_L41_except_error;
  33175. __pyx_L41_except_error:;
  33176. /* "uvloop/loop.pyx":1885
  33177. * while rai_iter is not NULL:
  33178. * tr = None
  33179. * try: # <<<<<<<<<<<<<<
  33180. * waiter = self._new_future()
  33181. * tr = TCPTransport.new(self, protocol, None, waiter)
  33182. */
  33183. __Pyx_XGIVEREF(__pyx_t_15);
  33184. __Pyx_XGIVEREF(__pyx_t_16);
  33185. __Pyx_XGIVEREF(__pyx_t_17);
  33186. __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17);
  33187. goto __pyx_L1_error;
  33188. __pyx_L44_try_break:;
  33189. __Pyx_XGIVEREF(__pyx_t_15);
  33190. __Pyx_XGIVEREF(__pyx_t_16);
  33191. __Pyx_XGIVEREF(__pyx_t_17);
  33192. __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17);
  33193. goto __pyx_L38_break;
  33194. __pyx_L45_try_continue:;
  33195. __Pyx_XGIVEREF(__pyx_t_15);
  33196. __Pyx_XGIVEREF(__pyx_t_16);
  33197. __Pyx_XGIVEREF(__pyx_t_17);
  33198. __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17);
  33199. goto __pyx_L37_continue;
  33200. __pyx_L40_exception_handled:;
  33201. __Pyx_XGIVEREF(__pyx_t_15);
  33202. __Pyx_XGIVEREF(__pyx_t_16);
  33203. __Pyx_XGIVEREF(__pyx_t_17);
  33204. __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17);
  33205. }
  33206. /* "uvloop/loop.pyx":1921
  33207. * break
  33208. *
  33209. * rai_iter = rai_iter.ai_next # <<<<<<<<<<<<<<
  33210. *
  33211. * else:
  33212. */
  33213. __pyx_t_14 = __pyx_cur_scope->__pyx_v_rai_iter->ai_next;
  33214. __pyx_cur_scope->__pyx_v_rai_iter = __pyx_t_14;
  33215. __pyx_L37_continue:;
  33216. }
  33217. /* "uvloop/loop.pyx":1925
  33218. * else:
  33219. * # If they all have the same str(), raise one.
  33220. * model = str(exceptions[0]) # <<<<<<<<<<<<<<
  33221. * if all(str(exc) == model for exc in exceptions):
  33222. * raise exceptions[0]
  33223. */
  33224. /*else*/ {
  33225. __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_cur_scope->__pyx_v_exceptions, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1925, __pyx_L1_error)
  33226. __Pyx_GOTREF(__pyx_t_5);
  33227. __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1925, __pyx_L1_error)
  33228. __Pyx_GOTREF(__pyx_t_4);
  33229. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  33230. __Pyx_GIVEREF(__pyx_t_4);
  33231. __pyx_cur_scope->__pyx_v_model = __pyx_t_4;
  33232. __pyx_t_4 = 0;
  33233. /* "uvloop/loop.pyx":1926
  33234. * # If they all have the same str(), raise one.
  33235. * model = str(exceptions[0])
  33236. * if all(str(exc) == model for exc in exceptions): # <<<<<<<<<<<<<<
  33237. * raise exceptions[0]
  33238. * # Raise a combined exception so the user can see all
  33239. */
  33240. __pyx_t_4 = __pyx_pf_6uvloop_4loop_4Loop_17create_connection_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1926, __pyx_L1_error)
  33241. __Pyx_GOTREF(__pyx_t_4);
  33242. __pyx_t_5 = __Pyx_Generator_Next(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1926, __pyx_L1_error)
  33243. __Pyx_GOTREF(__pyx_t_5);
  33244. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  33245. __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(2, 1926, __pyx_L1_error)
  33246. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  33247. if (unlikely(__pyx_t_2)) {
  33248. /* "uvloop/loop.pyx":1927
  33249. * model = str(exceptions[0])
  33250. * if all(str(exc) == model for exc in exceptions):
  33251. * raise exceptions[0] # <<<<<<<<<<<<<<
  33252. * # Raise a combined exception so the user can see all
  33253. * # the various error messages.
  33254. */
  33255. __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_cur_scope->__pyx_v_exceptions, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1927, __pyx_L1_error)
  33256. __Pyx_GOTREF(__pyx_t_5);
  33257. __Pyx_Raise(__pyx_t_5, 0, 0, 0);
  33258. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  33259. __PYX_ERR(2, 1927, __pyx_L1_error)
  33260. /* "uvloop/loop.pyx":1926
  33261. * # If they all have the same str(), raise one.
  33262. * model = str(exceptions[0])
  33263. * if all(str(exc) == model for exc in exceptions): # <<<<<<<<<<<<<<
  33264. * raise exceptions[0]
  33265. * # Raise a combined exception so the user can see all
  33266. */
  33267. }
  33268. /* "uvloop/loop.pyx":1930
  33269. * # Raise a combined exception so the user can see all
  33270. * # the various error messages.
  33271. * raise OSError('Multiple exceptions: {}'.format( # <<<<<<<<<<<<<<
  33272. * ', '.join(str(exc) for exc in exceptions)))
  33273. * else:
  33274. */
  33275. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Multiple_exceptions, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1930, __pyx_L1_error)
  33276. __Pyx_GOTREF(__pyx_t_4);
  33277. /* "uvloop/loop.pyx":1931
  33278. * # the various error messages.
  33279. * raise OSError('Multiple exceptions: {}'.format(
  33280. * ', '.join(str(exc) for exc in exceptions))) # <<<<<<<<<<<<<<
  33281. * else:
  33282. * if sock is None:
  33283. */
  33284. __pyx_t_7 = __pyx_pf_6uvloop_4loop_4Loop_17create_connection_3genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 1931, __pyx_L1_error)
  33285. __Pyx_GOTREF(__pyx_t_7);
  33286. __pyx_t_6 = __Pyx_Generator_Next(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1931, __pyx_L1_error)
  33287. __Pyx_GOTREF(__pyx_t_6);
  33288. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  33289. __pyx_t_7 = PyUnicode_Join(__pyx_kp_u__53, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 1931, __pyx_L1_error)
  33290. __Pyx_GOTREF(__pyx_t_7);
  33291. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  33292. __pyx_t_6 = NULL;
  33293. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
  33294. __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
  33295. if (likely(__pyx_t_6)) {
  33296. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  33297. __Pyx_INCREF(__pyx_t_6);
  33298. __Pyx_INCREF(function);
  33299. __Pyx_DECREF_SET(__pyx_t_4, function);
  33300. }
  33301. }
  33302. __pyx_t_5 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_7);
  33303. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  33304. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  33305. if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1930, __pyx_L1_error)
  33306. __Pyx_GOTREF(__pyx_t_5);
  33307. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  33308. /* "uvloop/loop.pyx":1930
  33309. * # Raise a combined exception so the user can see all
  33310. * # the various error messages.
  33311. * raise OSError('Multiple exceptions: {}'.format( # <<<<<<<<<<<<<<
  33312. * ', '.join(str(exc) for exc in exceptions)))
  33313. * else:
  33314. */
  33315. __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_OSError, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1930, __pyx_L1_error)
  33316. __Pyx_GOTREF(__pyx_t_4);
  33317. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  33318. __Pyx_Raise(__pyx_t_4, 0, 0, 0);
  33319. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  33320. __PYX_ERR(2, 1930, __pyx_L1_error)
  33321. }
  33322. __pyx_L38_break:;
  33323. /* "uvloop/loop.pyx":1819
  33324. * 'ssl_shutdown_timeout is only meaningful with ssl')
  33325. *
  33326. * if host is not None or port is not None: # <<<<<<<<<<<<<<
  33327. * if sock is not None:
  33328. * raise ValueError(
  33329. */
  33330. goto __pyx_L17;
  33331. }
  33332. /* "uvloop/loop.pyx":1933
  33333. * ', '.join(str(exc) for exc in exceptions)))
  33334. * else:
  33335. * if sock is None: # <<<<<<<<<<<<<<
  33336. * raise ValueError(
  33337. * 'host and port was not specified and no sock specified')
  33338. */
  33339. /*else*/ {
  33340. __pyx_t_2 = (__pyx_cur_scope->__pyx_v_sock == Py_None);
  33341. __pyx_t_3 = (__pyx_t_2 != 0);
  33342. if (unlikely(__pyx_t_3)) {
  33343. /* "uvloop/loop.pyx":1934
  33344. * else:
  33345. * if sock is None:
  33346. * raise ValueError( # <<<<<<<<<<<<<<
  33347. * 'host and port was not specified and no sock specified')
  33348. * if not _is_sock_stream(sock.type):
  33349. */
  33350. __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__54, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1934, __pyx_L1_error)
  33351. __Pyx_GOTREF(__pyx_t_4);
  33352. __Pyx_Raise(__pyx_t_4, 0, 0, 0);
  33353. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  33354. __PYX_ERR(2, 1934, __pyx_L1_error)
  33355. /* "uvloop/loop.pyx":1933
  33356. * ', '.join(str(exc) for exc in exceptions)))
  33357. * else:
  33358. * if sock is None: # <<<<<<<<<<<<<<
  33359. * raise ValueError(
  33360. * 'host and port was not specified and no sock specified')
  33361. */
  33362. }
  33363. /* "uvloop/loop.pyx":1936
  33364. * raise ValueError(
  33365. * 'host and port was not specified and no sock specified')
  33366. * if not _is_sock_stream(sock.type): # <<<<<<<<<<<<<<
  33367. * raise ValueError(
  33368. * 'A Stream Socket was expected, got {!r}'.format(sock))
  33369. */
  33370. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_sock, __pyx_n_s_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1936, __pyx_L1_error)
  33371. __Pyx_GOTREF(__pyx_t_4);
  33372. __pyx_t_5 = __pyx_f_6uvloop_4loop__is_sock_stream(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1936, __pyx_L1_error)
  33373. __Pyx_GOTREF(__pyx_t_5);
  33374. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  33375. __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(2, 1936, __pyx_L1_error)
  33376. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  33377. __pyx_t_2 = ((!__pyx_t_3) != 0);
  33378. if (unlikely(__pyx_t_2)) {
  33379. /* "uvloop/loop.pyx":1938
  33380. * if not _is_sock_stream(sock.type):
  33381. * raise ValueError(
  33382. * 'A Stream Socket was expected, got {!r}'.format(sock)) # <<<<<<<<<<<<<<
  33383. *
  33384. * # libuv will set the socket to non-blocking mode, but
  33385. */
  33386. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_A_Stream_Socket_was_expected_got, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1938, __pyx_L1_error)
  33387. __Pyx_GOTREF(__pyx_t_4);
  33388. __pyx_t_7 = NULL;
  33389. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
  33390. __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
  33391. if (likely(__pyx_t_7)) {
  33392. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  33393. __Pyx_INCREF(__pyx_t_7);
  33394. __Pyx_INCREF(function);
  33395. __Pyx_DECREF_SET(__pyx_t_4, function);
  33396. }
  33397. }
  33398. __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_7, __pyx_cur_scope->__pyx_v_sock) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_cur_scope->__pyx_v_sock);
  33399. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  33400. if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1938, __pyx_L1_error)
  33401. __Pyx_GOTREF(__pyx_t_5);
  33402. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  33403. /* "uvloop/loop.pyx":1937
  33404. * 'host and port was not specified and no sock specified')
  33405. * if not _is_sock_stream(sock.type):
  33406. * raise ValueError( # <<<<<<<<<<<<<<
  33407. * 'A Stream Socket was expected, got {!r}'.format(sock))
  33408. *
  33409. */
  33410. __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1937, __pyx_L1_error)
  33411. __Pyx_GOTREF(__pyx_t_4);
  33412. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  33413. __Pyx_Raise(__pyx_t_4, 0, 0, 0);
  33414. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  33415. __PYX_ERR(2, 1937, __pyx_L1_error)
  33416. /* "uvloop/loop.pyx":1936
  33417. * raise ValueError(
  33418. * 'host and port was not specified and no sock specified')
  33419. * if not _is_sock_stream(sock.type): # <<<<<<<<<<<<<<
  33420. * raise ValueError(
  33421. * 'A Stream Socket was expected, got {!r}'.format(sock))
  33422. */
  33423. }
  33424. /* "uvloop/loop.pyx":1942
  33425. * # libuv will set the socket to non-blocking mode, but
  33426. * # we want Python socket object to notice that.
  33427. * sock.setblocking(False) # <<<<<<<<<<<<<<
  33428. *
  33429. * waiter = self._new_future()
  33430. */
  33431. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_sock, __pyx_n_s_setblocking); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1942, __pyx_L1_error)
  33432. __Pyx_GOTREF(__pyx_t_5);
  33433. __pyx_t_7 = NULL;
  33434. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
  33435. __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
  33436. if (likely(__pyx_t_7)) {
  33437. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
  33438. __Pyx_INCREF(__pyx_t_7);
  33439. __Pyx_INCREF(function);
  33440. __Pyx_DECREF_SET(__pyx_t_5, function);
  33441. }
  33442. }
  33443. __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_7, Py_False) : __Pyx_PyObject_CallOneArg(__pyx_t_5, Py_False);
  33444. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  33445. if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1942, __pyx_L1_error)
  33446. __Pyx_GOTREF(__pyx_t_4);
  33447. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  33448. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  33449. /* "uvloop/loop.pyx":1944
  33450. * sock.setblocking(False)
  33451. *
  33452. * waiter = self._new_future() # <<<<<<<<<<<<<<
  33453. * tr = TCPTransport.new(self, protocol, None, waiter)
  33454. * try:
  33455. */
  33456. __pyx_t_4 = __pyx_f_6uvloop_4loop_4Loop__new_future(__pyx_cur_scope->__pyx_v_self); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1944, __pyx_L1_error)
  33457. __Pyx_GOTREF(__pyx_t_4);
  33458. __Pyx_GIVEREF(__pyx_t_4);
  33459. __pyx_cur_scope->__pyx_v_waiter = __pyx_t_4;
  33460. __pyx_t_4 = 0;
  33461. /* "uvloop/loop.pyx":1945
  33462. *
  33463. * waiter = self._new_future()
  33464. * tr = TCPTransport.new(self, protocol, None, waiter) # <<<<<<<<<<<<<<
  33465. * try:
  33466. * # libuv will make socket non-blocking
  33467. */
  33468. __pyx_t_4 = ((PyObject *)__pyx_f_6uvloop_4loop_12TCPTransport_new(__pyx_cur_scope->__pyx_v_self, __pyx_cur_scope->__pyx_v_protocol, ((struct __pyx_obj_6uvloop_4loop_Server *)Py_None), __pyx_cur_scope->__pyx_v_waiter)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1945, __pyx_L1_error)
  33469. __Pyx_GOTREF(__pyx_t_4);
  33470. __Pyx_GIVEREF(__pyx_t_4);
  33471. __pyx_cur_scope->__pyx_v_tr = ((struct __pyx_obj_6uvloop_4loop_TCPTransport *)__pyx_t_4);
  33472. __pyx_t_4 = 0;
  33473. /* "uvloop/loop.pyx":1946
  33474. * waiter = self._new_future()
  33475. * tr = TCPTransport.new(self, protocol, None, waiter)
  33476. * try: # <<<<<<<<<<<<<<
  33477. * # libuv will make socket non-blocking
  33478. * tr._open(sock.fileno())
  33479. */
  33480. {
  33481. __Pyx_ExceptionSave(&__pyx_t_17, &__pyx_t_16, &__pyx_t_15);
  33482. __Pyx_XGOTREF(__pyx_t_17);
  33483. __Pyx_XGOTREF(__pyx_t_16);
  33484. __Pyx_XGOTREF(__pyx_t_15);
  33485. /*try:*/ {
  33486. /* "uvloop/loop.pyx":1948
  33487. * try:
  33488. * # libuv will make socket non-blocking
  33489. * tr._open(sock.fileno()) # <<<<<<<<<<<<<<
  33490. * tr._init_protocol()
  33491. * await waiter
  33492. */
  33493. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_sock, __pyx_n_s_fileno); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1948, __pyx_L88_error)
  33494. __Pyx_GOTREF(__pyx_t_5);
  33495. __pyx_t_7 = NULL;
  33496. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
  33497. __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
  33498. if (likely(__pyx_t_7)) {
  33499. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
  33500. __Pyx_INCREF(__pyx_t_7);
  33501. __Pyx_INCREF(function);
  33502. __Pyx_DECREF_SET(__pyx_t_5, function);
  33503. }
  33504. }
  33505. __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
  33506. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  33507. if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1948, __pyx_L88_error)
  33508. __Pyx_GOTREF(__pyx_t_4);
  33509. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  33510. __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 1948, __pyx_L88_error)
  33511. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  33512. __pyx_t_4 = ((struct __pyx_vtabstruct_6uvloop_4loop_TCPTransport *)__pyx_cur_scope->__pyx_v_tr->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._open(((struct __pyx_obj_6uvloop_4loop_UVSocketHandle *)__pyx_cur_scope->__pyx_v_tr), __pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1948, __pyx_L88_error)
  33513. __Pyx_GOTREF(__pyx_t_4);
  33514. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  33515. /* "uvloop/loop.pyx":1949
  33516. * # libuv will make socket non-blocking
  33517. * tr._open(sock.fileno())
  33518. * tr._init_protocol() # <<<<<<<<<<<<<<
  33519. * await waiter
  33520. * except Exception:
  33521. */
  33522. __pyx_t_4 = ((struct __pyx_vtabstruct_6uvloop_4loop_TCPTransport *)__pyx_cur_scope->__pyx_v_tr->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._init_protocol(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_cur_scope->__pyx_v_tr)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1949, __pyx_L88_error)
  33523. __Pyx_GOTREF(__pyx_t_4);
  33524. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  33525. /* "uvloop/loop.pyx":1950
  33526. * tr._open(sock.fileno())
  33527. * tr._init_protocol()
  33528. * await waiter # <<<<<<<<<<<<<<
  33529. * except Exception:
  33530. * # It's OK to call `_close()` here, as opposed to
  33531. */
  33532. __pyx_r = __Pyx_Coroutine_Yield_From(__pyx_generator, __pyx_cur_scope->__pyx_v_waiter);
  33533. __Pyx_XGOTREF(__pyx_r);
  33534. if (likely(__pyx_r)) {
  33535. __Pyx_XGIVEREF(__pyx_t_15);
  33536. __pyx_cur_scope->__pyx_t_0 = __pyx_t_15;
  33537. __Pyx_XGIVEREF(__pyx_t_16);
  33538. __pyx_cur_scope->__pyx_t_1 = __pyx_t_16;
  33539. __Pyx_XGIVEREF(__pyx_t_17);
  33540. __pyx_cur_scope->__pyx_t_2 = __pyx_t_17;
  33541. __Pyx_XGIVEREF(__pyx_r);
  33542. __Pyx_RefNannyFinishContext();
  33543. __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  33544. /* return from generator, awaiting value */
  33545. __pyx_generator->resume_label = 4;
  33546. return __pyx_r;
  33547. __pyx_L94_resume_from_await:;
  33548. __pyx_t_15 = __pyx_cur_scope->__pyx_t_0;
  33549. __pyx_cur_scope->__pyx_t_0 = 0;
  33550. __Pyx_XGOTREF(__pyx_t_15);
  33551. __pyx_t_16 = __pyx_cur_scope->__pyx_t_1;
  33552. __pyx_cur_scope->__pyx_t_1 = 0;
  33553. __Pyx_XGOTREF(__pyx_t_16);
  33554. __pyx_t_17 = __pyx_cur_scope->__pyx_t_2;
  33555. __pyx_cur_scope->__pyx_t_2 = 0;
  33556. __Pyx_XGOTREF(__pyx_t_17);
  33557. if (unlikely(!__pyx_sent_value)) __PYX_ERR(2, 1950, __pyx_L88_error)
  33558. } else {
  33559. PyObject* exc_type = __Pyx_PyErr_Occurred();
  33560. if (exc_type) {
  33561. if (likely(exc_type == PyExc_StopIteration || (exc_type != PyExc_GeneratorExit && __Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)))) PyErr_Clear();
  33562. else __PYX_ERR(2, 1950, __pyx_L88_error)
  33563. }
  33564. }
  33565. /* "uvloop/loop.pyx":1946
  33566. * waiter = self._new_future()
  33567. * tr = TCPTransport.new(self, protocol, None, waiter)
  33568. * try: # <<<<<<<<<<<<<<
  33569. * # libuv will make socket non-blocking
  33570. * tr._open(sock.fileno())
  33571. */
  33572. }
  33573. __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
  33574. __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
  33575. __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
  33576. goto __pyx_L93_try_end;
  33577. __pyx_L88_error:;
  33578. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  33579. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  33580. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  33581. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  33582. /* "uvloop/loop.pyx":1951
  33583. * tr._init_protocol()
  33584. * await waiter
  33585. * except Exception: # <<<<<<<<<<<<<<
  33586. * # It's OK to call `_close()` here, as opposed to
  33587. * # `_force_close()` or `close()` as we want to terminate the
  33588. */
  33589. __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
  33590. if (__pyx_t_9) {
  33591. __Pyx_AddTraceback("uvloop.loop.Loop.create_connection", __pyx_clineno, __pyx_lineno, __pyx_filename);
  33592. if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_7) < 0) __PYX_ERR(2, 1951, __pyx_L90_except_error)
  33593. __Pyx_GOTREF(__pyx_t_4);
  33594. __Pyx_GOTREF(__pyx_t_5);
  33595. __Pyx_GOTREF(__pyx_t_7);
  33596. /* "uvloop/loop.pyx":1957
  33597. * # up in `Transport._call_connection_made()`, and calling
  33598. * # `_close()` before it is fine.
  33599. * tr._close() # <<<<<<<<<<<<<<
  33600. * raise
  33601. *
  33602. */
  33603. __pyx_t_6 = ((struct __pyx_vtabstruct_6uvloop_4loop_TCPTransport *)__pyx_cur_scope->__pyx_v_tr->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base.__pyx_base._close(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_cur_scope->__pyx_v_tr)); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1957, __pyx_L90_except_error)
  33604. __Pyx_GOTREF(__pyx_t_6);
  33605. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  33606. /* "uvloop/loop.pyx":1958
  33607. * # `_close()` before it is fine.
  33608. * tr._close()
  33609. * raise # <<<<<<<<<<<<<<
  33610. *
  33611. * tr._attach_fileobj(sock)
  33612. */
  33613. __Pyx_GIVEREF(__pyx_t_4);
  33614. __Pyx_GIVEREF(__pyx_t_5);
  33615. __Pyx_XGIVEREF(__pyx_t_7);
  33616. __Pyx_ErrRestoreWithState(__pyx_t_4, __pyx_t_5, __pyx_t_7);
  33617. __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_7 = 0;
  33618. __PYX_ERR(2, 1958, __pyx_L90_except_error)
  33619. }
  33620. goto __pyx_L90_except_error;
  33621. __pyx_L90_except_error:;
  33622. /* "uvloop/loop.pyx":1946
  33623. * waiter = self._new_future()
  33624. * tr = TCPTransport.new(self, protocol, None, waiter)
  33625. * try: # <<<<<<<<<<<<<<
  33626. * # libuv will make socket non-blocking
  33627. * tr._open(sock.fileno())
  33628. */
  33629. __Pyx_XGIVEREF(__pyx_t_17);
  33630. __Pyx_XGIVEREF(__pyx_t_16);
  33631. __Pyx_XGIVEREF(__pyx_t_15);
  33632. __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_16, __pyx_t_15);
  33633. goto __pyx_L1_error;
  33634. __pyx_L93_try_end:;
  33635. }
  33636. /* "uvloop/loop.pyx":1960
  33637. * raise
  33638. *
  33639. * tr._attach_fileobj(sock) # <<<<<<<<<<<<<<
  33640. *
  33641. * if ssl:
  33642. */
  33643. __pyx_t_7 = ((struct __pyx_vtabstruct_6uvloop_4loop_TCPTransport *)__pyx_cur_scope->__pyx_v_tr->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._attach_fileobj(((struct __pyx_obj_6uvloop_4loop_UVSocketHandle *)__pyx_cur_scope->__pyx_v_tr), __pyx_cur_scope->__pyx_v_sock); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 1960, __pyx_L1_error)
  33644. __Pyx_GOTREF(__pyx_t_7);
  33645. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  33646. }
  33647. __pyx_L17:;
  33648. /* "uvloop/loop.pyx":1962
  33649. * tr._attach_fileobj(sock)
  33650. *
  33651. * if ssl: # <<<<<<<<<<<<<<
  33652. * app_transport = protocol._get_app_transport()
  33653. * try:
  33654. */
  33655. __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_ssl); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(2, 1962, __pyx_L1_error)
  33656. if (__pyx_t_2) {
  33657. /* "uvloop/loop.pyx":1963
  33658. *
  33659. * if ssl:
  33660. * app_transport = protocol._get_app_transport() # <<<<<<<<<<<<<<
  33661. * try:
  33662. * await ssl_waiter
  33663. */
  33664. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_protocol, __pyx_n_s_get_app_transport); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1963, __pyx_L1_error)
  33665. __Pyx_GOTREF(__pyx_t_5);
  33666. __pyx_t_4 = NULL;
  33667. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
  33668. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
  33669. if (likely(__pyx_t_4)) {
  33670. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
  33671. __Pyx_INCREF(__pyx_t_4);
  33672. __Pyx_INCREF(function);
  33673. __Pyx_DECREF_SET(__pyx_t_5, function);
  33674. }
  33675. }
  33676. __pyx_t_7 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
  33677. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  33678. if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 1963, __pyx_L1_error)
  33679. __Pyx_GOTREF(__pyx_t_7);
  33680. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  33681. __Pyx_GIVEREF(__pyx_t_7);
  33682. __pyx_cur_scope->__pyx_v_app_transport = __pyx_t_7;
  33683. __pyx_t_7 = 0;
  33684. /* "uvloop/loop.pyx":1964
  33685. * if ssl:
  33686. * app_transport = protocol._get_app_transport()
  33687. * try: # <<<<<<<<<<<<<<
  33688. * await ssl_waiter
  33689. * except Exception:
  33690. */
  33691. {
  33692. __Pyx_ExceptionSave(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17);
  33693. __Pyx_XGOTREF(__pyx_t_15);
  33694. __Pyx_XGOTREF(__pyx_t_16);
  33695. __Pyx_XGOTREF(__pyx_t_17);
  33696. /*try:*/ {
  33697. /* "uvloop/loop.pyx":1965
  33698. * app_transport = protocol._get_app_transport()
  33699. * try:
  33700. * await ssl_waiter # <<<<<<<<<<<<<<
  33701. * except Exception:
  33702. * app_transport.close()
  33703. */
  33704. __pyx_r = __Pyx_Coroutine_Yield_From(__pyx_generator, __pyx_cur_scope->__pyx_v_ssl_waiter);
  33705. __Pyx_XGOTREF(__pyx_r);
  33706. if (likely(__pyx_r)) {
  33707. __Pyx_XGIVEREF(__pyx_t_15);
  33708. __pyx_cur_scope->__pyx_t_0 = __pyx_t_15;
  33709. __Pyx_XGIVEREF(__pyx_t_16);
  33710. __pyx_cur_scope->__pyx_t_1 = __pyx_t_16;
  33711. __Pyx_XGIVEREF(__pyx_t_17);
  33712. __pyx_cur_scope->__pyx_t_2 = __pyx_t_17;
  33713. __Pyx_XGIVEREF(__pyx_r);
  33714. __Pyx_RefNannyFinishContext();
  33715. __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  33716. /* return from generator, awaiting value */
  33717. __pyx_generator->resume_label = 5;
  33718. return __pyx_r;
  33719. __pyx_L104_resume_from_await:;
  33720. __pyx_t_15 = __pyx_cur_scope->__pyx_t_0;
  33721. __pyx_cur_scope->__pyx_t_0 = 0;
  33722. __Pyx_XGOTREF(__pyx_t_15);
  33723. __pyx_t_16 = __pyx_cur_scope->__pyx_t_1;
  33724. __pyx_cur_scope->__pyx_t_1 = 0;
  33725. __Pyx_XGOTREF(__pyx_t_16);
  33726. __pyx_t_17 = __pyx_cur_scope->__pyx_t_2;
  33727. __pyx_cur_scope->__pyx_t_2 = 0;
  33728. __Pyx_XGOTREF(__pyx_t_17);
  33729. if (unlikely(!__pyx_sent_value)) __PYX_ERR(2, 1965, __pyx_L98_error)
  33730. } else {
  33731. PyObject* exc_type = __Pyx_PyErr_Occurred();
  33732. if (exc_type) {
  33733. if (likely(exc_type == PyExc_StopIteration || (exc_type != PyExc_GeneratorExit && __Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)))) PyErr_Clear();
  33734. else __PYX_ERR(2, 1965, __pyx_L98_error)
  33735. }
  33736. }
  33737. /* "uvloop/loop.pyx":1964
  33738. * if ssl:
  33739. * app_transport = protocol._get_app_transport()
  33740. * try: # <<<<<<<<<<<<<<
  33741. * await ssl_waiter
  33742. * except Exception:
  33743. */
  33744. }
  33745. __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
  33746. __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
  33747. __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
  33748. goto __pyx_L103_try_end;
  33749. __pyx_L98_error:;
  33750. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  33751. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  33752. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  33753. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  33754. /* "uvloop/loop.pyx":1966
  33755. * try:
  33756. * await ssl_waiter
  33757. * except Exception: # <<<<<<<<<<<<<<
  33758. * app_transport.close()
  33759. * raise
  33760. */
  33761. __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
  33762. if (__pyx_t_9) {
  33763. __Pyx_AddTraceback("uvloop.loop.Loop.create_connection", __pyx_clineno, __pyx_lineno, __pyx_filename);
  33764. if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_5, &__pyx_t_4) < 0) __PYX_ERR(2, 1966, __pyx_L100_except_error)
  33765. __Pyx_GOTREF(__pyx_t_7);
  33766. __Pyx_GOTREF(__pyx_t_5);
  33767. __Pyx_GOTREF(__pyx_t_4);
  33768. /* "uvloop/loop.pyx":1967
  33769. * await ssl_waiter
  33770. * except Exception:
  33771. * app_transport.close() # <<<<<<<<<<<<<<
  33772. * raise
  33773. * return app_transport, app_protocol
  33774. */
  33775. __pyx_t_29 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_app_transport, __pyx_n_s_close); if (unlikely(!__pyx_t_29)) __PYX_ERR(2, 1967, __pyx_L100_except_error)
  33776. __Pyx_GOTREF(__pyx_t_29);
  33777. __pyx_t_30 = NULL;
  33778. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_29))) {
  33779. __pyx_t_30 = PyMethod_GET_SELF(__pyx_t_29);
  33780. if (likely(__pyx_t_30)) {
  33781. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_29);
  33782. __Pyx_INCREF(__pyx_t_30);
  33783. __Pyx_INCREF(function);
  33784. __Pyx_DECREF_SET(__pyx_t_29, function);
  33785. }
  33786. }
  33787. __pyx_t_6 = (__pyx_t_30) ? __Pyx_PyObject_CallOneArg(__pyx_t_29, __pyx_t_30) : __Pyx_PyObject_CallNoArg(__pyx_t_29);
  33788. __Pyx_XDECREF(__pyx_t_30); __pyx_t_30 = 0;
  33789. if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1967, __pyx_L100_except_error)
  33790. __Pyx_GOTREF(__pyx_t_6);
  33791. __Pyx_DECREF(__pyx_t_29); __pyx_t_29 = 0;
  33792. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  33793. /* "uvloop/loop.pyx":1968
  33794. * except Exception:
  33795. * app_transport.close()
  33796. * raise # <<<<<<<<<<<<<<
  33797. * return app_transport, app_protocol
  33798. * else:
  33799. */
  33800. __Pyx_GIVEREF(__pyx_t_7);
  33801. __Pyx_GIVEREF(__pyx_t_5);
  33802. __Pyx_XGIVEREF(__pyx_t_4);
  33803. __Pyx_ErrRestoreWithState(__pyx_t_7, __pyx_t_5, __pyx_t_4);
  33804. __pyx_t_7 = 0; __pyx_t_5 = 0; __pyx_t_4 = 0;
  33805. __PYX_ERR(2, 1968, __pyx_L100_except_error)
  33806. }
  33807. goto __pyx_L100_except_error;
  33808. __pyx_L100_except_error:;
  33809. /* "uvloop/loop.pyx":1964
  33810. * if ssl:
  33811. * app_transport = protocol._get_app_transport()
  33812. * try: # <<<<<<<<<<<<<<
  33813. * await ssl_waiter
  33814. * except Exception:
  33815. */
  33816. __Pyx_XGIVEREF(__pyx_t_15);
  33817. __Pyx_XGIVEREF(__pyx_t_16);
  33818. __Pyx_XGIVEREF(__pyx_t_17);
  33819. __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17);
  33820. goto __pyx_L1_error;
  33821. __pyx_L103_try_end:;
  33822. }
  33823. /* "uvloop/loop.pyx":1969
  33824. * app_transport.close()
  33825. * raise
  33826. * return app_transport, app_protocol # <<<<<<<<<<<<<<
  33827. * else:
  33828. * return tr, protocol
  33829. */
  33830. __Pyx_XDECREF(__pyx_r);
  33831. __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1969, __pyx_L1_error)
  33832. __Pyx_GOTREF(__pyx_t_4);
  33833. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_app_transport);
  33834. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_app_transport);
  33835. PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_cur_scope->__pyx_v_app_transport);
  33836. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_app_protocol);
  33837. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_app_protocol);
  33838. PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_cur_scope->__pyx_v_app_protocol);
  33839. __pyx_r = NULL; __Pyx_ReturnWithStopIteration(__pyx_t_4);
  33840. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  33841. __pyx_t_4 = 0;
  33842. goto __pyx_L0;
  33843. /* "uvloop/loop.pyx":1962
  33844. * tr._attach_fileobj(sock)
  33845. *
  33846. * if ssl: # <<<<<<<<<<<<<<
  33847. * app_transport = protocol._get_app_transport()
  33848. * try:
  33849. */
  33850. }
  33851. /* "uvloop/loop.pyx":1971
  33852. * return app_transport, app_protocol
  33853. * else:
  33854. * return tr, protocol # <<<<<<<<<<<<<<
  33855. *
  33856. * @cython.iterable_coroutine
  33857. */
  33858. /*else*/ {
  33859. __Pyx_XDECREF(__pyx_r);
  33860. __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1971, __pyx_L1_error)
  33861. __Pyx_GOTREF(__pyx_t_4);
  33862. __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_tr));
  33863. __Pyx_GIVEREF(((PyObject *)__pyx_cur_scope->__pyx_v_tr));
  33864. PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_cur_scope->__pyx_v_tr));
  33865. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_protocol);
  33866. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_protocol);
  33867. PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_cur_scope->__pyx_v_protocol);
  33868. __pyx_r = NULL; __Pyx_ReturnWithStopIteration(__pyx_t_4);
  33869. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  33870. __pyx_t_4 = 0;
  33871. goto __pyx_L0;
  33872. }
  33873. CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
  33874. /* "uvloop/loop.pyx":1746
  33875. *
  33876. * @cython.iterable_coroutine
  33877. * async def create_connection(self, protocol_factory, host=None, port=None, # <<<<<<<<<<<<<<
  33878. * *,
  33879. * ssl=None,
  33880. */
  33881. /* function exit code */
  33882. __pyx_L1_error:;
  33883. __Pyx_XDECREF(__pyx_t_4);
  33884. __Pyx_XDECREF(__pyx_t_5);
  33885. __Pyx_XDECREF(__pyx_t_6);
  33886. __Pyx_XDECREF(__pyx_t_7);
  33887. __Pyx_XDECREF(__pyx_t_29);
  33888. __Pyx_XDECREF(__pyx_t_30);
  33889. __Pyx_AddTraceback("create_connection", __pyx_clineno, __pyx_lineno, __pyx_filename);
  33890. __pyx_L0:;
  33891. __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  33892. #if !CYTHON_USE_EXC_INFO_STACK
  33893. __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  33894. #endif
  33895. __pyx_generator->resume_label = -1;
  33896. __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  33897. __Pyx_RefNannyFinishContext();
  33898. return __pyx_r;
  33899. }
  33900. static PyObject *__pyx_gb_6uvloop_4loop_4Loop_63generator5(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
  33901. /* "uvloop/loop.pyx":1974
  33902. *
  33903. * @cython.iterable_coroutine
  33904. * async def create_unix_server(self, protocol_factory, path=None, # <<<<<<<<<<<<<<
  33905. * *, backlog=100, sock=None, ssl=None,
  33906. * ssl_handshake_timeout=None,
  33907. */
  33908. /* Python wrapper */
  33909. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_62create_unix_server(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  33910. static char __pyx_doc_6uvloop_4loop_4Loop_61create_unix_server[] = "Loop.create_unix_server(self, protocol_factory, path=None, *, backlog=100, sock=None, ssl=None, ssl_handshake_timeout=None, ssl_shutdown_timeout=None, start_serving=True)\nA coroutine which creates a UNIX Domain Socket server.\n\n The return value is a Server object, which can be used to stop\n the service.\n\n path is a str, representing a file systsem path to bind the\n server socket to.\n\n sock can optionally be specified in order to use a preexisting\n socket object.\n\n backlog is the maximum number of queued connections passed to\n listen() (defaults to 100).\n\n ssl can be set to an SSLContext to enable SSL over the\n accepted connections.\n\n ssl_handshake_timeout is the time in seconds that an SSL server\n will wait for completion of the SSL handshake before aborting the\n connection. Default is 60s.\n\n ssl_shutdown_timeout is the time in seconds that an SSL server\n will wait for completion of the SSL shutdown before aborting the\n connection. Default is 30s.\n ";
  33911. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_62create_unix_server(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  33912. PyObject *__pyx_v_protocol_factory = 0;
  33913. PyObject *__pyx_v_path = 0;
  33914. PyObject *__pyx_v_backlog = 0;
  33915. PyObject *__pyx_v_sock = 0;
  33916. PyObject *__pyx_v_ssl = 0;
  33917. PyObject *__pyx_v_ssl_handshake_timeout = 0;
  33918. PyObject *__pyx_v_ssl_shutdown_timeout = 0;
  33919. PyObject *__pyx_v_start_serving = 0;
  33920. PyObject *__pyx_r = 0;
  33921. __Pyx_RefNannyDeclarations
  33922. __Pyx_RefNannySetupContext("create_unix_server (wrapper)", 0);
  33923. {
  33924. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_protocol_factory,&__pyx_n_s_path,&__pyx_n_s_backlog,&__pyx_n_s_sock,&__pyx_n_s_ssl,&__pyx_n_s_ssl_handshake_timeout,&__pyx_n_s_ssl_shutdown_timeout,&__pyx_n_s_start_serving,0};
  33925. PyObject* values[8] = {0,0,0,0,0,0,0,0};
  33926. values[1] = ((PyObject *)Py_None);
  33927. values[2] = ((PyObject *)__pyx_int_100);
  33928. /* "uvloop/loop.pyx":1975
  33929. * @cython.iterable_coroutine
  33930. * async def create_unix_server(self, protocol_factory, path=None,
  33931. * *, backlog=100, sock=None, ssl=None, # <<<<<<<<<<<<<<
  33932. * ssl_handshake_timeout=None,
  33933. * ssl_shutdown_timeout=None,
  33934. */
  33935. values[3] = ((PyObject *)Py_None);
  33936. values[4] = ((PyObject *)Py_None);
  33937. /* "uvloop/loop.pyx":1976
  33938. * async def create_unix_server(self, protocol_factory, path=None,
  33939. * *, backlog=100, sock=None, ssl=None,
  33940. * ssl_handshake_timeout=None, # <<<<<<<<<<<<<<
  33941. * ssl_shutdown_timeout=None,
  33942. * start_serving=True):
  33943. */
  33944. values[5] = ((PyObject *)Py_None);
  33945. /* "uvloop/loop.pyx":1977
  33946. * *, backlog=100, sock=None, ssl=None,
  33947. * ssl_handshake_timeout=None,
  33948. * ssl_shutdown_timeout=None, # <<<<<<<<<<<<<<
  33949. * start_serving=True):
  33950. * """A coroutine which creates a UNIX Domain Socket server.
  33951. */
  33952. values[6] = ((PyObject *)Py_None);
  33953. /* "uvloop/loop.pyx":1978
  33954. * ssl_handshake_timeout=None,
  33955. * ssl_shutdown_timeout=None,
  33956. * start_serving=True): # <<<<<<<<<<<<<<
  33957. * """A coroutine which creates a UNIX Domain Socket server.
  33958. *
  33959. */
  33960. values[7] = ((PyObject *)Py_True);
  33961. if (unlikely(__pyx_kwds)) {
  33962. Py_ssize_t kw_args;
  33963. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  33964. switch (pos_args) {
  33965. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  33966. CYTHON_FALLTHROUGH;
  33967. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  33968. CYTHON_FALLTHROUGH;
  33969. case 0: break;
  33970. default: goto __pyx_L5_argtuple_error;
  33971. }
  33972. kw_args = PyDict_Size(__pyx_kwds);
  33973. switch (pos_args) {
  33974. case 0:
  33975. if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_protocol_factory)) != 0)) kw_args--;
  33976. else goto __pyx_L5_argtuple_error;
  33977. CYTHON_FALLTHROUGH;
  33978. case 1:
  33979. if (kw_args > 0) {
  33980. PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_path);
  33981. if (value) { values[1] = value; kw_args--; }
  33982. }
  33983. }
  33984. if (kw_args > 0 && likely(kw_args <= 6)) {
  33985. Py_ssize_t index;
  33986. for (index = 2; index < 8 && kw_args > 0; index++) {
  33987. PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, *__pyx_pyargnames[index]);
  33988. if (value) { values[index] = value; kw_args--; }
  33989. }
  33990. }
  33991. if (unlikely(kw_args > 0)) {
  33992. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "create_unix_server") < 0)) __PYX_ERR(2, 1974, __pyx_L3_error)
  33993. }
  33994. } else {
  33995. switch (PyTuple_GET_SIZE(__pyx_args)) {
  33996. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  33997. CYTHON_FALLTHROUGH;
  33998. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  33999. break;
  34000. default: goto __pyx_L5_argtuple_error;
  34001. }
  34002. }
  34003. __pyx_v_protocol_factory = values[0];
  34004. __pyx_v_path = values[1];
  34005. __pyx_v_backlog = values[2];
  34006. __pyx_v_sock = values[3];
  34007. __pyx_v_ssl = values[4];
  34008. __pyx_v_ssl_handshake_timeout = values[5];
  34009. __pyx_v_ssl_shutdown_timeout = values[6];
  34010. __pyx_v_start_serving = values[7];
  34011. }
  34012. goto __pyx_L4_argument_unpacking_done;
  34013. __pyx_L5_argtuple_error:;
  34014. __Pyx_RaiseArgtupleInvalid("create_unix_server", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 1974, __pyx_L3_error)
  34015. __pyx_L3_error:;
  34016. __Pyx_AddTraceback("uvloop.loop.Loop.create_unix_server", __pyx_clineno, __pyx_lineno, __pyx_filename);
  34017. __Pyx_RefNannyFinishContext();
  34018. return NULL;
  34019. __pyx_L4_argument_unpacking_done:;
  34020. __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_61create_unix_server(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self), __pyx_v_protocol_factory, __pyx_v_path, __pyx_v_backlog, __pyx_v_sock, __pyx_v_ssl, __pyx_v_ssl_handshake_timeout, __pyx_v_ssl_shutdown_timeout, __pyx_v_start_serving);
  34021. /* "uvloop/loop.pyx":1974
  34022. *
  34023. * @cython.iterable_coroutine
  34024. * async def create_unix_server(self, protocol_factory, path=None, # <<<<<<<<<<<<<<
  34025. * *, backlog=100, sock=None, ssl=None,
  34026. * ssl_handshake_timeout=None,
  34027. */
  34028. /* function exit code */
  34029. __Pyx_RefNannyFinishContext();
  34030. return __pyx_r;
  34031. }
  34032. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_61create_unix_server(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_protocol_factory, PyObject *__pyx_v_path, PyObject *__pyx_v_backlog, PyObject *__pyx_v_sock, PyObject *__pyx_v_ssl, PyObject *__pyx_v_ssl_handshake_timeout, PyObject *__pyx_v_ssl_shutdown_timeout, PyObject *__pyx_v_start_serving) {
  34033. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_12_create_unix_server *__pyx_cur_scope;
  34034. PyObject *__pyx_r = NULL;
  34035. __Pyx_RefNannyDeclarations
  34036. __Pyx_RefNannySetupContext("create_unix_server", 0);
  34037. __pyx_cur_scope = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_12_create_unix_server *)__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_12_create_unix_server(__pyx_ptype_6uvloop_4loop___pyx_scope_struct_12_create_unix_server, __pyx_empty_tuple, NULL);
  34038. if (unlikely(!__pyx_cur_scope)) {
  34039. __pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_12_create_unix_server *)Py_None);
  34040. __Pyx_INCREF(Py_None);
  34041. __PYX_ERR(2, 1974, __pyx_L1_error)
  34042. } else {
  34043. __Pyx_GOTREF(__pyx_cur_scope);
  34044. }
  34045. __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  34046. __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  34047. __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  34048. __pyx_cur_scope->__pyx_v_protocol_factory = __pyx_v_protocol_factory;
  34049. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_protocol_factory);
  34050. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_protocol_factory);
  34051. __pyx_cur_scope->__pyx_v_path = __pyx_v_path;
  34052. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_path);
  34053. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_path);
  34054. __pyx_cur_scope->__pyx_v_backlog = __pyx_v_backlog;
  34055. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_backlog);
  34056. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_backlog);
  34057. __pyx_cur_scope->__pyx_v_sock = __pyx_v_sock;
  34058. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_sock);
  34059. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_sock);
  34060. __pyx_cur_scope->__pyx_v_ssl = __pyx_v_ssl;
  34061. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_ssl);
  34062. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_ssl);
  34063. __pyx_cur_scope->__pyx_v_ssl_handshake_timeout = __pyx_v_ssl_handshake_timeout;
  34064. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_ssl_handshake_timeout);
  34065. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_ssl_handshake_timeout);
  34066. __pyx_cur_scope->__pyx_v_ssl_shutdown_timeout = __pyx_v_ssl_shutdown_timeout;
  34067. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_ssl_shutdown_timeout);
  34068. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_ssl_shutdown_timeout);
  34069. __pyx_cur_scope->__pyx_v_start_serving = __pyx_v_start_serving;
  34070. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_start_serving);
  34071. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_start_serving);
  34072. {
  34073. __pyx_CoroutineObject *gen = __Pyx_IterableCoroutine_New((__pyx_coroutine_body_t) __pyx_gb_6uvloop_4loop_4Loop_63generator5, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_create_unix_server, __pyx_n_s_Loop_create_unix_server, __pyx_n_s_uvloop_loop); if (unlikely(!gen)) __PYX_ERR(2, 1974, __pyx_L1_error)
  34074. __Pyx_DECREF(__pyx_cur_scope);
  34075. __Pyx_RefNannyFinishContext();
  34076. return (PyObject *) gen;
  34077. }
  34078. /* function exit code */
  34079. __pyx_L1_error:;
  34080. __Pyx_AddTraceback("uvloop.loop.Loop.create_unix_server", __pyx_clineno, __pyx_lineno, __pyx_filename);
  34081. __pyx_r = NULL;
  34082. __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  34083. __Pyx_XGIVEREF(__pyx_r);
  34084. __Pyx_RefNannyFinishContext();
  34085. return __pyx_r;
  34086. }
  34087. static PyObject *__pyx_gb_6uvloop_4loop_4Loop_63generator5(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
  34088. {
  34089. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_12_create_unix_server *__pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_12_create_unix_server *)__pyx_generator->closure);
  34090. PyObject *__pyx_r = NULL;
  34091. PyObject *__pyx_t_1 = NULL;
  34092. int __pyx_t_2;
  34093. int __pyx_t_3;
  34094. PyObject *__pyx_t_4 = NULL;
  34095. PyObject *__pyx_t_5 = NULL;
  34096. PyObject *__pyx_t_6 = NULL;
  34097. PyObject *__pyx_t_7 = NULL;
  34098. PyObject *__pyx_t_8 = NULL;
  34099. int __pyx_t_9;
  34100. PyObject *__pyx_t_10 = NULL;
  34101. PyObject *__pyx_t_11 = NULL;
  34102. PyObject *__pyx_t_12 = NULL;
  34103. PyObject *__pyx_t_13 = NULL;
  34104. int __pyx_t_14;
  34105. char const *__pyx_t_15;
  34106. PyObject *__pyx_t_16 = NULL;
  34107. PyObject *__pyx_t_17 = NULL;
  34108. PyObject *__pyx_t_18 = NULL;
  34109. PyObject *__pyx_t_19 = NULL;
  34110. PyObject *__pyx_t_20 = NULL;
  34111. PyObject *__pyx_t_21 = NULL;
  34112. char const *__pyx_t_22;
  34113. int __pyx_t_23;
  34114. __Pyx_RefNannyDeclarations
  34115. __Pyx_RefNannySetupContext("create_unix_server", 0);
  34116. switch (__pyx_generator->resume_label) {
  34117. case 0: goto __pyx_L3_first_run;
  34118. default: /* CPython raises the right error here */
  34119. __Pyx_RefNannyFinishContext();
  34120. return NULL;
  34121. }
  34122. __pyx_L3_first_run:;
  34123. if (unlikely(!__pyx_sent_value)) __PYX_ERR(2, 1974, __pyx_L1_error)
  34124. /* "uvloop/loop.pyx":2006
  34125. * cdef:
  34126. * UnixServer pipe
  34127. * Server server = Server(self) # <<<<<<<<<<<<<<
  34128. *
  34129. * if ssl is not None:
  34130. */
  34131. __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_6uvloop_4loop_Server), ((PyObject *)__pyx_cur_scope->__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2006, __pyx_L1_error)
  34132. __Pyx_GOTREF(__pyx_t_1);
  34133. __Pyx_GIVEREF(__pyx_t_1);
  34134. __pyx_cur_scope->__pyx_v_server = ((struct __pyx_obj_6uvloop_4loop_Server *)__pyx_t_1);
  34135. __pyx_t_1 = 0;
  34136. /* "uvloop/loop.pyx":2008
  34137. * Server server = Server(self)
  34138. *
  34139. * if ssl is not None: # <<<<<<<<<<<<<<
  34140. * if not isinstance(ssl, ssl_SSLContext):
  34141. * raise TypeError('ssl argument must be an SSLContext or None')
  34142. */
  34143. __pyx_t_2 = (__pyx_cur_scope->__pyx_v_ssl != Py_None);
  34144. __pyx_t_3 = (__pyx_t_2 != 0);
  34145. if (__pyx_t_3) {
  34146. /* "uvloop/loop.pyx":2009
  34147. *
  34148. * if ssl is not None:
  34149. * if not isinstance(ssl, ssl_SSLContext): # <<<<<<<<<<<<<<
  34150. * raise TypeError('ssl argument must be an SSLContext or None')
  34151. * else:
  34152. */
  34153. __pyx_t_1 = __pyx_v_6uvloop_4loop_ssl_SSLContext;
  34154. __Pyx_INCREF(__pyx_t_1);
  34155. __pyx_t_3 = PyObject_IsInstance(__pyx_cur_scope->__pyx_v_ssl, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(2, 2009, __pyx_L1_error)
  34156. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  34157. __pyx_t_2 = ((!(__pyx_t_3 != 0)) != 0);
  34158. if (unlikely(__pyx_t_2)) {
  34159. /* "uvloop/loop.pyx":2010
  34160. * if ssl is not None:
  34161. * if not isinstance(ssl, ssl_SSLContext):
  34162. * raise TypeError('ssl argument must be an SSLContext or None') # <<<<<<<<<<<<<<
  34163. * else:
  34164. * if ssl_handshake_timeout is not None:
  34165. */
  34166. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__41, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2010, __pyx_L1_error)
  34167. __Pyx_GOTREF(__pyx_t_1);
  34168. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  34169. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  34170. __PYX_ERR(2, 2010, __pyx_L1_error)
  34171. /* "uvloop/loop.pyx":2009
  34172. *
  34173. * if ssl is not None:
  34174. * if not isinstance(ssl, ssl_SSLContext): # <<<<<<<<<<<<<<
  34175. * raise TypeError('ssl argument must be an SSLContext or None')
  34176. * else:
  34177. */
  34178. }
  34179. /* "uvloop/loop.pyx":2008
  34180. * Server server = Server(self)
  34181. *
  34182. * if ssl is not None: # <<<<<<<<<<<<<<
  34183. * if not isinstance(ssl, ssl_SSLContext):
  34184. * raise TypeError('ssl argument must be an SSLContext or None')
  34185. */
  34186. goto __pyx_L4;
  34187. }
  34188. /* "uvloop/loop.pyx":2012
  34189. * raise TypeError('ssl argument must be an SSLContext or None')
  34190. * else:
  34191. * if ssl_handshake_timeout is not None: # <<<<<<<<<<<<<<
  34192. * raise ValueError(
  34193. * 'ssl_handshake_timeout is only meaningful with ssl')
  34194. */
  34195. /*else*/ {
  34196. __pyx_t_2 = (__pyx_cur_scope->__pyx_v_ssl_handshake_timeout != Py_None);
  34197. __pyx_t_3 = (__pyx_t_2 != 0);
  34198. if (unlikely(__pyx_t_3)) {
  34199. /* "uvloop/loop.pyx":2013
  34200. * else:
  34201. * if ssl_handshake_timeout is not None:
  34202. * raise ValueError( # <<<<<<<<<<<<<<
  34203. * 'ssl_handshake_timeout is only meaningful with ssl')
  34204. * if ssl_shutdown_timeout is not None:
  34205. */
  34206. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__42, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2013, __pyx_L1_error)
  34207. __Pyx_GOTREF(__pyx_t_1);
  34208. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  34209. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  34210. __PYX_ERR(2, 2013, __pyx_L1_error)
  34211. /* "uvloop/loop.pyx":2012
  34212. * raise TypeError('ssl argument must be an SSLContext or None')
  34213. * else:
  34214. * if ssl_handshake_timeout is not None: # <<<<<<<<<<<<<<
  34215. * raise ValueError(
  34216. * 'ssl_handshake_timeout is only meaningful with ssl')
  34217. */
  34218. }
  34219. /* "uvloop/loop.pyx":2015
  34220. * raise ValueError(
  34221. * 'ssl_handshake_timeout is only meaningful with ssl')
  34222. * if ssl_shutdown_timeout is not None: # <<<<<<<<<<<<<<
  34223. * raise ValueError(
  34224. * 'ssl_shutdown_timeout is only meaningful with ssl')
  34225. */
  34226. __pyx_t_3 = (__pyx_cur_scope->__pyx_v_ssl_shutdown_timeout != Py_None);
  34227. __pyx_t_2 = (__pyx_t_3 != 0);
  34228. if (unlikely(__pyx_t_2)) {
  34229. /* "uvloop/loop.pyx":2016
  34230. * 'ssl_handshake_timeout is only meaningful with ssl')
  34231. * if ssl_shutdown_timeout is not None:
  34232. * raise ValueError( # <<<<<<<<<<<<<<
  34233. * 'ssl_shutdown_timeout is only meaningful with ssl')
  34234. *
  34235. */
  34236. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2016, __pyx_L1_error)
  34237. __Pyx_GOTREF(__pyx_t_1);
  34238. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  34239. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  34240. __PYX_ERR(2, 2016, __pyx_L1_error)
  34241. /* "uvloop/loop.pyx":2015
  34242. * raise ValueError(
  34243. * 'ssl_handshake_timeout is only meaningful with ssl')
  34244. * if ssl_shutdown_timeout is not None: # <<<<<<<<<<<<<<
  34245. * raise ValueError(
  34246. * 'ssl_shutdown_timeout is only meaningful with ssl')
  34247. */
  34248. }
  34249. }
  34250. __pyx_L4:;
  34251. /* "uvloop/loop.pyx":2019
  34252. * 'ssl_shutdown_timeout is only meaningful with ssl')
  34253. *
  34254. * if path is not None: # <<<<<<<<<<<<<<
  34255. * if sock is not None:
  34256. * raise ValueError(
  34257. */
  34258. __pyx_t_2 = (__pyx_cur_scope->__pyx_v_path != Py_None);
  34259. __pyx_t_3 = (__pyx_t_2 != 0);
  34260. if (__pyx_t_3) {
  34261. /* "uvloop/loop.pyx":2020
  34262. *
  34263. * if path is not None:
  34264. * if sock is not None: # <<<<<<<<<<<<<<
  34265. * raise ValueError(
  34266. * 'path and sock can not be specified at the same time')
  34267. */
  34268. __pyx_t_3 = (__pyx_cur_scope->__pyx_v_sock != Py_None);
  34269. __pyx_t_2 = (__pyx_t_3 != 0);
  34270. if (unlikely(__pyx_t_2)) {
  34271. /* "uvloop/loop.pyx":2021
  34272. * if path is not None:
  34273. * if sock is not None:
  34274. * raise ValueError( # <<<<<<<<<<<<<<
  34275. * 'path and sock can not be specified at the same time')
  34276. * orig_path = path
  34277. */
  34278. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__55, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2021, __pyx_L1_error)
  34279. __Pyx_GOTREF(__pyx_t_1);
  34280. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  34281. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  34282. __PYX_ERR(2, 2021, __pyx_L1_error)
  34283. /* "uvloop/loop.pyx":2020
  34284. *
  34285. * if path is not None:
  34286. * if sock is not None: # <<<<<<<<<<<<<<
  34287. * raise ValueError(
  34288. * 'path and sock can not be specified at the same time')
  34289. */
  34290. }
  34291. /* "uvloop/loop.pyx":2023
  34292. * raise ValueError(
  34293. * 'path and sock can not be specified at the same time')
  34294. * orig_path = path # <<<<<<<<<<<<<<
  34295. *
  34296. * try:
  34297. */
  34298. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_path);
  34299. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_path);
  34300. __pyx_cur_scope->__pyx_v_orig_path = __pyx_cur_scope->__pyx_v_path;
  34301. /* "uvloop/loop.pyx":2025
  34302. * orig_path = path
  34303. *
  34304. * try: # <<<<<<<<<<<<<<
  34305. * # Lookup __fspath__ manually, as os.fspath() isn't
  34306. * # available on Python 3.5.
  34307. */
  34308. {
  34309. __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
  34310. __Pyx_XGOTREF(__pyx_t_4);
  34311. __Pyx_XGOTREF(__pyx_t_5);
  34312. __Pyx_XGOTREF(__pyx_t_6);
  34313. /*try:*/ {
  34314. /* "uvloop/loop.pyx":2028
  34315. * # Lookup __fspath__ manually, as os.fspath() isn't
  34316. * # available on Python 3.5.
  34317. * fspath = type(path).__fspath__ # <<<<<<<<<<<<<<
  34318. * except AttributeError:
  34319. * pass
  34320. */
  34321. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(__pyx_cur_scope->__pyx_v_path)), __pyx_n_s_fspath); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2028, __pyx_L10_error)
  34322. __Pyx_GOTREF(__pyx_t_1);
  34323. __Pyx_GIVEREF(__pyx_t_1);
  34324. __pyx_cur_scope->__pyx_v_fspath = __pyx_t_1;
  34325. __pyx_t_1 = 0;
  34326. /* "uvloop/loop.pyx":2025
  34327. * orig_path = path
  34328. *
  34329. * try: # <<<<<<<<<<<<<<
  34330. * # Lookup __fspath__ manually, as os.fspath() isn't
  34331. * # available on Python 3.5.
  34332. */
  34333. }
  34334. /* "uvloop/loop.pyx":2032
  34335. * pass
  34336. * else:
  34337. * path = fspath(path) # <<<<<<<<<<<<<<
  34338. *
  34339. * if isinstance(path, str):
  34340. */
  34341. /*else:*/ {
  34342. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_fspath);
  34343. __pyx_t_7 = __pyx_cur_scope->__pyx_v_fspath; __pyx_t_8 = NULL;
  34344. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
  34345. __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
  34346. if (likely(__pyx_t_8)) {
  34347. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
  34348. __Pyx_INCREF(__pyx_t_8);
  34349. __Pyx_INCREF(function);
  34350. __Pyx_DECREF_SET(__pyx_t_7, function);
  34351. }
  34352. }
  34353. __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_cur_scope->__pyx_v_path) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_cur_scope->__pyx_v_path);
  34354. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  34355. if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2032, __pyx_L12_except_error)
  34356. __Pyx_GOTREF(__pyx_t_1);
  34357. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  34358. __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_path);
  34359. __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_path, __pyx_t_1);
  34360. __Pyx_GIVEREF(__pyx_t_1);
  34361. __pyx_t_1 = 0;
  34362. }
  34363. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  34364. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  34365. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  34366. goto __pyx_L15_try_end;
  34367. __pyx_L10_error:;
  34368. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  34369. /* "uvloop/loop.pyx":2029
  34370. * # available on Python 3.5.
  34371. * fspath = type(path).__fspath__
  34372. * except AttributeError: # <<<<<<<<<<<<<<
  34373. * pass
  34374. * else:
  34375. */
  34376. __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
  34377. if (__pyx_t_9) {
  34378. __Pyx_ErrRestore(0,0,0);
  34379. goto __pyx_L11_exception_handled;
  34380. }
  34381. goto __pyx_L12_except_error;
  34382. __pyx_L12_except_error:;
  34383. /* "uvloop/loop.pyx":2025
  34384. * orig_path = path
  34385. *
  34386. * try: # <<<<<<<<<<<<<<
  34387. * # Lookup __fspath__ manually, as os.fspath() isn't
  34388. * # available on Python 3.5.
  34389. */
  34390. __Pyx_XGIVEREF(__pyx_t_4);
  34391. __Pyx_XGIVEREF(__pyx_t_5);
  34392. __Pyx_XGIVEREF(__pyx_t_6);
  34393. __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
  34394. goto __pyx_L1_error;
  34395. __pyx_L11_exception_handled:;
  34396. __Pyx_XGIVEREF(__pyx_t_4);
  34397. __Pyx_XGIVEREF(__pyx_t_5);
  34398. __Pyx_XGIVEREF(__pyx_t_6);
  34399. __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
  34400. __pyx_L15_try_end:;
  34401. }
  34402. /* "uvloop/loop.pyx":2034
  34403. * path = fspath(path)
  34404. *
  34405. * if isinstance(path, str): # <<<<<<<<<<<<<<
  34406. * path = PyUnicode_EncodeFSDefault(path)
  34407. *
  34408. */
  34409. __pyx_t_2 = PyUnicode_Check(__pyx_cur_scope->__pyx_v_path);
  34410. __pyx_t_3 = (__pyx_t_2 != 0);
  34411. if (__pyx_t_3) {
  34412. /* "uvloop/loop.pyx":2035
  34413. *
  34414. * if isinstance(path, str):
  34415. * path = PyUnicode_EncodeFSDefault(path) # <<<<<<<<<<<<<<
  34416. *
  34417. * # Check for abstract socket.
  34418. */
  34419. __pyx_t_1 = PyUnicode_EncodeFSDefault(__pyx_cur_scope->__pyx_v_path); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2035, __pyx_L1_error)
  34420. __Pyx_GOTREF(__pyx_t_1);
  34421. __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_path);
  34422. __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_path, __pyx_t_1);
  34423. __Pyx_GIVEREF(__pyx_t_1);
  34424. __pyx_t_1 = 0;
  34425. /* "uvloop/loop.pyx":2034
  34426. * path = fspath(path)
  34427. *
  34428. * if isinstance(path, str): # <<<<<<<<<<<<<<
  34429. * path = PyUnicode_EncodeFSDefault(path)
  34430. *
  34431. */
  34432. }
  34433. /* "uvloop/loop.pyx":2038
  34434. *
  34435. * # Check for abstract socket.
  34436. * if path[0] != 0: # <<<<<<<<<<<<<<
  34437. * try:
  34438. * if stat_S_ISSOCK(os_stat(path).st_mode):
  34439. */
  34440. __pyx_t_1 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_path, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2038, __pyx_L1_error)
  34441. __Pyx_GOTREF(__pyx_t_1);
  34442. __pyx_t_7 = __Pyx_PyInt_NeObjC(__pyx_t_1, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 2038, __pyx_L1_error)
  34443. __Pyx_GOTREF(__pyx_t_7);
  34444. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  34445. __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(2, 2038, __pyx_L1_error)
  34446. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  34447. if (__pyx_t_3) {
  34448. /* "uvloop/loop.pyx":2039
  34449. * # Check for abstract socket.
  34450. * if path[0] != 0:
  34451. * try: # <<<<<<<<<<<<<<
  34452. * if stat_S_ISSOCK(os_stat(path).st_mode):
  34453. * os_remove(path)
  34454. */
  34455. {
  34456. __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4);
  34457. __Pyx_XGOTREF(__pyx_t_6);
  34458. __Pyx_XGOTREF(__pyx_t_5);
  34459. __Pyx_XGOTREF(__pyx_t_4);
  34460. /*try:*/ {
  34461. /* "uvloop/loop.pyx":2040
  34462. * if path[0] != 0:
  34463. * try:
  34464. * if stat_S_ISSOCK(os_stat(path).st_mode): # <<<<<<<<<<<<<<
  34465. * os_remove(path)
  34466. * except FileNotFoundError:
  34467. */
  34468. __Pyx_INCREF(__pyx_v_6uvloop_4loop_os_stat);
  34469. __pyx_t_8 = __pyx_v_6uvloop_4loop_os_stat; __pyx_t_10 = NULL;
  34470. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
  34471. __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_8);
  34472. if (likely(__pyx_t_10)) {
  34473. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
  34474. __Pyx_INCREF(__pyx_t_10);
  34475. __Pyx_INCREF(function);
  34476. __Pyx_DECREF_SET(__pyx_t_8, function);
  34477. }
  34478. }
  34479. __pyx_t_1 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_10, __pyx_cur_scope->__pyx_v_path) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_cur_scope->__pyx_v_path);
  34480. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  34481. if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2040, __pyx_L18_error)
  34482. __Pyx_GOTREF(__pyx_t_1);
  34483. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  34484. __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_st_mode); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 2040, __pyx_L18_error)
  34485. __Pyx_GOTREF(__pyx_t_8);
  34486. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  34487. __Pyx_INCREF(__pyx_v_6uvloop_4loop_stat_S_ISSOCK);
  34488. __pyx_t_1 = __pyx_v_6uvloop_4loop_stat_S_ISSOCK; __pyx_t_10 = NULL;
  34489. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
  34490. __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_1);
  34491. if (likely(__pyx_t_10)) {
  34492. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
  34493. __Pyx_INCREF(__pyx_t_10);
  34494. __Pyx_INCREF(function);
  34495. __Pyx_DECREF_SET(__pyx_t_1, function);
  34496. }
  34497. }
  34498. __pyx_t_7 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_10, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_8);
  34499. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  34500. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  34501. if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 2040, __pyx_L18_error)
  34502. __Pyx_GOTREF(__pyx_t_7);
  34503. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  34504. __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(2, 2040, __pyx_L18_error)
  34505. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  34506. if (__pyx_t_3) {
  34507. /* "uvloop/loop.pyx":2041
  34508. * try:
  34509. * if stat_S_ISSOCK(os_stat(path).st_mode):
  34510. * os_remove(path) # <<<<<<<<<<<<<<
  34511. * except FileNotFoundError:
  34512. * pass
  34513. */
  34514. __Pyx_INCREF(__pyx_v_6uvloop_4loop_os_remove);
  34515. __pyx_t_1 = __pyx_v_6uvloop_4loop_os_remove; __pyx_t_8 = NULL;
  34516. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
  34517. __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_1);
  34518. if (likely(__pyx_t_8)) {
  34519. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
  34520. __Pyx_INCREF(__pyx_t_8);
  34521. __Pyx_INCREF(function);
  34522. __Pyx_DECREF_SET(__pyx_t_1, function);
  34523. }
  34524. }
  34525. __pyx_t_7 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_8, __pyx_cur_scope->__pyx_v_path) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_cur_scope->__pyx_v_path);
  34526. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  34527. if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 2041, __pyx_L18_error)
  34528. __Pyx_GOTREF(__pyx_t_7);
  34529. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  34530. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  34531. /* "uvloop/loop.pyx":2040
  34532. * if path[0] != 0:
  34533. * try:
  34534. * if stat_S_ISSOCK(os_stat(path).st_mode): # <<<<<<<<<<<<<<
  34535. * os_remove(path)
  34536. * except FileNotFoundError:
  34537. */
  34538. }
  34539. /* "uvloop/loop.pyx":2039
  34540. * # Check for abstract socket.
  34541. * if path[0] != 0:
  34542. * try: # <<<<<<<<<<<<<<
  34543. * if stat_S_ISSOCK(os_stat(path).st_mode):
  34544. * os_remove(path)
  34545. */
  34546. }
  34547. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  34548. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  34549. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  34550. goto __pyx_L23_try_end;
  34551. __pyx_L18_error:;
  34552. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  34553. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  34554. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  34555. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  34556. /* "uvloop/loop.pyx":2042
  34557. * if stat_S_ISSOCK(os_stat(path).st_mode):
  34558. * os_remove(path)
  34559. * except FileNotFoundError: # <<<<<<<<<<<<<<
  34560. * pass
  34561. * except OSError as err:
  34562. */
  34563. __Pyx_ErrFetch(&__pyx_t_7, &__pyx_t_1, &__pyx_t_8);
  34564. __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_FileNotFoundError); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 2042, __pyx_L20_except_error)
  34565. __Pyx_GOTREF(__pyx_t_10);
  34566. __pyx_t_9 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_7, __pyx_t_10);
  34567. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  34568. __Pyx_ErrRestore(__pyx_t_7, __pyx_t_1, __pyx_t_8);
  34569. __pyx_t_7 = 0; __pyx_t_1 = 0; __pyx_t_8 = 0;
  34570. if (__pyx_t_9) {
  34571. __Pyx_ErrRestore(0,0,0);
  34572. goto __pyx_L19_exception_handled;
  34573. }
  34574. /* "uvloop/loop.pyx":2044
  34575. * except FileNotFoundError:
  34576. * pass
  34577. * except OSError as err: # <<<<<<<<<<<<<<
  34578. * # Directory may have permissions only to create socket.
  34579. * aio_logger.error(
  34580. */
  34581. __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_OSError);
  34582. if (__pyx_t_9) {
  34583. __Pyx_AddTraceback("uvloop.loop.Loop.create_unix_server", __pyx_clineno, __pyx_lineno, __pyx_filename);
  34584. if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_1, &__pyx_t_7) < 0) __PYX_ERR(2, 2044, __pyx_L20_except_error)
  34585. __Pyx_GOTREF(__pyx_t_8);
  34586. __Pyx_GOTREF(__pyx_t_1);
  34587. __Pyx_GOTREF(__pyx_t_7);
  34588. __Pyx_INCREF(__pyx_t_1);
  34589. __Pyx_GIVEREF(__pyx_t_1);
  34590. __pyx_cur_scope->__pyx_v_err = __pyx_t_1;
  34591. /*try:*/ {
  34592. /* "uvloop/loop.pyx":2046
  34593. * except OSError as err:
  34594. * # Directory may have permissions only to create socket.
  34595. * aio_logger.error( # <<<<<<<<<<<<<<
  34596. * 'Unable to check or remove stale UNIX socket %r: %r',
  34597. * orig_path, err)
  34598. */
  34599. __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_6uvloop_4loop_aio_logger, __pyx_n_s_error); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 2046, __pyx_L30_error)
  34600. __Pyx_GOTREF(__pyx_t_11);
  34601. /* "uvloop/loop.pyx":2048
  34602. * aio_logger.error(
  34603. * 'Unable to check or remove stale UNIX socket %r: %r',
  34604. * orig_path, err) # <<<<<<<<<<<<<<
  34605. *
  34606. * # We use Python sockets to create a UNIX server socket because
  34607. */
  34608. __pyx_t_12 = NULL;
  34609. __pyx_t_9 = 0;
  34610. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) {
  34611. __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_11);
  34612. if (likely(__pyx_t_12)) {
  34613. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
  34614. __Pyx_INCREF(__pyx_t_12);
  34615. __Pyx_INCREF(function);
  34616. __Pyx_DECREF_SET(__pyx_t_11, function);
  34617. __pyx_t_9 = 1;
  34618. }
  34619. }
  34620. #if CYTHON_FAST_PYCALL
  34621. if (PyFunction_Check(__pyx_t_11)) {
  34622. PyObject *__pyx_temp[4] = {__pyx_t_12, __pyx_kp_u_Unable_to_check_or_remove_stale, __pyx_cur_scope->__pyx_v_orig_path, __pyx_cur_scope->__pyx_v_err};
  34623. __pyx_t_10 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_9, 3+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 2046, __pyx_L30_error)
  34624. __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
  34625. __Pyx_GOTREF(__pyx_t_10);
  34626. } else
  34627. #endif
  34628. #if CYTHON_FAST_PYCCALL
  34629. if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) {
  34630. PyObject *__pyx_temp[4] = {__pyx_t_12, __pyx_kp_u_Unable_to_check_or_remove_stale, __pyx_cur_scope->__pyx_v_orig_path, __pyx_cur_scope->__pyx_v_err};
  34631. __pyx_t_10 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_9, 3+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 2046, __pyx_L30_error)
  34632. __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
  34633. __Pyx_GOTREF(__pyx_t_10);
  34634. } else
  34635. #endif
  34636. {
  34637. __pyx_t_13 = PyTuple_New(3+__pyx_t_9); if (unlikely(!__pyx_t_13)) __PYX_ERR(2, 2046, __pyx_L30_error)
  34638. __Pyx_GOTREF(__pyx_t_13);
  34639. if (__pyx_t_12) {
  34640. __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_12); __pyx_t_12 = NULL;
  34641. }
  34642. __Pyx_INCREF(__pyx_kp_u_Unable_to_check_or_remove_stale);
  34643. __Pyx_GIVEREF(__pyx_kp_u_Unable_to_check_or_remove_stale);
  34644. PyTuple_SET_ITEM(__pyx_t_13, 0+__pyx_t_9, __pyx_kp_u_Unable_to_check_or_remove_stale);
  34645. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_orig_path);
  34646. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_orig_path);
  34647. PyTuple_SET_ITEM(__pyx_t_13, 1+__pyx_t_9, __pyx_cur_scope->__pyx_v_orig_path);
  34648. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_err);
  34649. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_err);
  34650. PyTuple_SET_ITEM(__pyx_t_13, 2+__pyx_t_9, __pyx_cur_scope->__pyx_v_err);
  34651. __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_13, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 2046, __pyx_L30_error)
  34652. __Pyx_GOTREF(__pyx_t_10);
  34653. __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  34654. }
  34655. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  34656. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  34657. }
  34658. /* "uvloop/loop.pyx":2044
  34659. * except FileNotFoundError:
  34660. * pass
  34661. * except OSError as err: # <<<<<<<<<<<<<<
  34662. * # Directory may have permissions only to create socket.
  34663. * aio_logger.error(
  34664. */
  34665. /*finally:*/ {
  34666. /*normal exit:*/{
  34667. __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_err);
  34668. __Pyx_DECREF(__pyx_cur_scope->__pyx_v_err);
  34669. __pyx_cur_scope->__pyx_v_err = NULL;
  34670. goto __pyx_L31;
  34671. }
  34672. __pyx_L30_error:;
  34673. /*exception exit:*/{
  34674. __Pyx_PyThreadState_assign
  34675. __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0;
  34676. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  34677. __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
  34678. __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
  34679. __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
  34680. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21);
  34681. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18) < 0)) __Pyx_ErrFetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18);
  34682. __Pyx_XGOTREF(__pyx_t_16);
  34683. __Pyx_XGOTREF(__pyx_t_17);
  34684. __Pyx_XGOTREF(__pyx_t_18);
  34685. __Pyx_XGOTREF(__pyx_t_19);
  34686. __Pyx_XGOTREF(__pyx_t_20);
  34687. __Pyx_XGOTREF(__pyx_t_21);
  34688. __pyx_t_9 = __pyx_lineno; __pyx_t_14 = __pyx_clineno; __pyx_t_15 = __pyx_filename;
  34689. {
  34690. __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_err);
  34691. __Pyx_DECREF(__pyx_cur_scope->__pyx_v_err);
  34692. __pyx_cur_scope->__pyx_v_err = NULL;
  34693. }
  34694. if (PY_MAJOR_VERSION >= 3) {
  34695. __Pyx_XGIVEREF(__pyx_t_19);
  34696. __Pyx_XGIVEREF(__pyx_t_20);
  34697. __Pyx_XGIVEREF(__pyx_t_21);
  34698. __Pyx_ExceptionReset(__pyx_t_19, __pyx_t_20, __pyx_t_21);
  34699. }
  34700. __Pyx_XGIVEREF(__pyx_t_16);
  34701. __Pyx_XGIVEREF(__pyx_t_17);
  34702. __Pyx_XGIVEREF(__pyx_t_18);
  34703. __Pyx_ErrRestore(__pyx_t_16, __pyx_t_17, __pyx_t_18);
  34704. __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0;
  34705. __pyx_lineno = __pyx_t_9; __pyx_clineno = __pyx_t_14; __pyx_filename = __pyx_t_15;
  34706. goto __pyx_L20_except_error;
  34707. }
  34708. __pyx_L31:;
  34709. }
  34710. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  34711. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  34712. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  34713. goto __pyx_L19_exception_handled;
  34714. }
  34715. goto __pyx_L20_except_error;
  34716. __pyx_L20_except_error:;
  34717. /* "uvloop/loop.pyx":2039
  34718. * # Check for abstract socket.
  34719. * if path[0] != 0:
  34720. * try: # <<<<<<<<<<<<<<
  34721. * if stat_S_ISSOCK(os_stat(path).st_mode):
  34722. * os_remove(path)
  34723. */
  34724. __Pyx_XGIVEREF(__pyx_t_6);
  34725. __Pyx_XGIVEREF(__pyx_t_5);
  34726. __Pyx_XGIVEREF(__pyx_t_4);
  34727. __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_5, __pyx_t_4);
  34728. goto __pyx_L1_error;
  34729. __pyx_L19_exception_handled:;
  34730. __Pyx_XGIVEREF(__pyx_t_6);
  34731. __Pyx_XGIVEREF(__pyx_t_5);
  34732. __Pyx_XGIVEREF(__pyx_t_4);
  34733. __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_5, __pyx_t_4);
  34734. __pyx_L23_try_end:;
  34735. }
  34736. /* "uvloop/loop.pyx":2038
  34737. *
  34738. * # Check for abstract socket.
  34739. * if path[0] != 0: # <<<<<<<<<<<<<<
  34740. * try:
  34741. * if stat_S_ISSOCK(os_stat(path).st_mode):
  34742. */
  34743. }
  34744. /* "uvloop/loop.pyx":2054
  34745. * # they were bound to. This is different from asyncio, which
  34746. * # doesn't cleanup the socket path.
  34747. * sock = socket_socket(uv.AF_UNIX) # <<<<<<<<<<<<<<
  34748. *
  34749. * try:
  34750. */
  34751. __pyx_t_1 = __Pyx_PyInt_From_int(AF_UNIX); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2054, __pyx_L1_error)
  34752. __Pyx_GOTREF(__pyx_t_1);
  34753. __Pyx_INCREF(__pyx_v_6uvloop_4loop_socket_socket);
  34754. __pyx_t_8 = __pyx_v_6uvloop_4loop_socket_socket; __pyx_t_10 = NULL;
  34755. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
  34756. __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_8);
  34757. if (likely(__pyx_t_10)) {
  34758. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
  34759. __Pyx_INCREF(__pyx_t_10);
  34760. __Pyx_INCREF(function);
  34761. __Pyx_DECREF_SET(__pyx_t_8, function);
  34762. }
  34763. }
  34764. __pyx_t_7 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_10, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_1);
  34765. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  34766. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  34767. if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 2054, __pyx_L1_error)
  34768. __Pyx_GOTREF(__pyx_t_7);
  34769. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  34770. __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_sock);
  34771. __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_sock, __pyx_t_7);
  34772. __Pyx_GIVEREF(__pyx_t_7);
  34773. __pyx_t_7 = 0;
  34774. /* "uvloop/loop.pyx":2056
  34775. * sock = socket_socket(uv.AF_UNIX)
  34776. *
  34777. * try: # <<<<<<<<<<<<<<
  34778. * sock.bind(path)
  34779. * except OSError as exc:
  34780. */
  34781. {
  34782. __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
  34783. __Pyx_XGOTREF(__pyx_t_4);
  34784. __Pyx_XGOTREF(__pyx_t_5);
  34785. __Pyx_XGOTREF(__pyx_t_6);
  34786. /*try:*/ {
  34787. /* "uvloop/loop.pyx":2057
  34788. *
  34789. * try:
  34790. * sock.bind(path) # <<<<<<<<<<<<<<
  34791. * except OSError as exc:
  34792. * sock.close()
  34793. */
  34794. __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_sock, __pyx_n_s_bind); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 2057, __pyx_L36_error)
  34795. __Pyx_GOTREF(__pyx_t_8);
  34796. __pyx_t_1 = NULL;
  34797. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
  34798. __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_8);
  34799. if (likely(__pyx_t_1)) {
  34800. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
  34801. __Pyx_INCREF(__pyx_t_1);
  34802. __Pyx_INCREF(function);
  34803. __Pyx_DECREF_SET(__pyx_t_8, function);
  34804. }
  34805. }
  34806. __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_1, __pyx_cur_scope->__pyx_v_path) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_cur_scope->__pyx_v_path);
  34807. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  34808. if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 2057, __pyx_L36_error)
  34809. __Pyx_GOTREF(__pyx_t_7);
  34810. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  34811. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  34812. /* "uvloop/loop.pyx":2056
  34813. * sock = socket_socket(uv.AF_UNIX)
  34814. *
  34815. * try: # <<<<<<<<<<<<<<
  34816. * sock.bind(path)
  34817. * except OSError as exc:
  34818. */
  34819. }
  34820. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  34821. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  34822. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  34823. goto __pyx_L41_try_end;
  34824. __pyx_L36_error:;
  34825. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  34826. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  34827. __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
  34828. __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
  34829. __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
  34830. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  34831. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  34832. /* "uvloop/loop.pyx":2058
  34833. * try:
  34834. * sock.bind(path)
  34835. * except OSError as exc: # <<<<<<<<<<<<<<
  34836. * sock.close()
  34837. * if exc.errno == errno.EADDRINUSE:
  34838. */
  34839. __pyx_t_14 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_OSError);
  34840. if (__pyx_t_14) {
  34841. __Pyx_AddTraceback("uvloop.loop.Loop.create_unix_server", __pyx_clineno, __pyx_lineno, __pyx_filename);
  34842. if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_8, &__pyx_t_1) < 0) __PYX_ERR(2, 2058, __pyx_L38_except_error)
  34843. __Pyx_GOTREF(__pyx_t_7);
  34844. __Pyx_GOTREF(__pyx_t_8);
  34845. __Pyx_GOTREF(__pyx_t_1);
  34846. __Pyx_INCREF(__pyx_t_8);
  34847. __Pyx_GIVEREF(__pyx_t_8);
  34848. __pyx_cur_scope->__pyx_v_exc = __pyx_t_8;
  34849. /*try:*/ {
  34850. /* "uvloop/loop.pyx":2059
  34851. * sock.bind(path)
  34852. * except OSError as exc:
  34853. * sock.close() # <<<<<<<<<<<<<<
  34854. * if exc.errno == errno.EADDRINUSE:
  34855. * # Let's improve the error message by adding
  34856. */
  34857. __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_sock, __pyx_n_s_close); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 2059, __pyx_L47_error)
  34858. __Pyx_GOTREF(__pyx_t_11);
  34859. __pyx_t_13 = NULL;
  34860. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) {
  34861. __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_11);
  34862. if (likely(__pyx_t_13)) {
  34863. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
  34864. __Pyx_INCREF(__pyx_t_13);
  34865. __Pyx_INCREF(function);
  34866. __Pyx_DECREF_SET(__pyx_t_11, function);
  34867. }
  34868. }
  34869. __pyx_t_10 = (__pyx_t_13) ? __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_13) : __Pyx_PyObject_CallNoArg(__pyx_t_11);
  34870. __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
  34871. if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 2059, __pyx_L47_error)
  34872. __Pyx_GOTREF(__pyx_t_10);
  34873. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  34874. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  34875. /* "uvloop/loop.pyx":2060
  34876. * except OSError as exc:
  34877. * sock.close()
  34878. * if exc.errno == errno.EADDRINUSE: # <<<<<<<<<<<<<<
  34879. * # Let's improve the error message by adding
  34880. * # with what exact address it occurs.
  34881. */
  34882. __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_exc, __pyx_n_s_errno); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 2060, __pyx_L47_error)
  34883. __Pyx_GOTREF(__pyx_t_10);
  34884. __pyx_t_11 = __Pyx_PyInt_From_int(EADDRINUSE); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 2060, __pyx_L47_error)
  34885. __Pyx_GOTREF(__pyx_t_11);
  34886. __pyx_t_13 = PyObject_RichCompare(__pyx_t_10, __pyx_t_11, Py_EQ); __Pyx_XGOTREF(__pyx_t_13); if (unlikely(!__pyx_t_13)) __PYX_ERR(2, 2060, __pyx_L47_error)
  34887. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  34888. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  34889. __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_13); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(2, 2060, __pyx_L47_error)
  34890. __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  34891. if (unlikely(__pyx_t_3)) {
  34892. /* "uvloop/loop.pyx":2063
  34893. * # Let's improve the error message by adding
  34894. * # with what exact address it occurs.
  34895. * msg = 'Address {!r} is already in use'.format(orig_path) # <<<<<<<<<<<<<<
  34896. * raise OSError(errno.EADDRINUSE, msg) from None
  34897. * else:
  34898. */
  34899. __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Address_r_is_already_in_use, __pyx_n_s_format); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 2063, __pyx_L47_error)
  34900. __Pyx_GOTREF(__pyx_t_11);
  34901. __pyx_t_10 = NULL;
  34902. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) {
  34903. __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_11);
  34904. if (likely(__pyx_t_10)) {
  34905. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
  34906. __Pyx_INCREF(__pyx_t_10);
  34907. __Pyx_INCREF(function);
  34908. __Pyx_DECREF_SET(__pyx_t_11, function);
  34909. }
  34910. }
  34911. __pyx_t_13 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_11, __pyx_t_10, __pyx_cur_scope->__pyx_v_orig_path) : __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_cur_scope->__pyx_v_orig_path);
  34912. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  34913. if (unlikely(!__pyx_t_13)) __PYX_ERR(2, 2063, __pyx_L47_error)
  34914. __Pyx_GOTREF(__pyx_t_13);
  34915. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  34916. __Pyx_GIVEREF(__pyx_t_13);
  34917. __pyx_cur_scope->__pyx_v_msg = __pyx_t_13;
  34918. __pyx_t_13 = 0;
  34919. /* "uvloop/loop.pyx":2064
  34920. * # with what exact address it occurs.
  34921. * msg = 'Address {!r} is already in use'.format(orig_path)
  34922. * raise OSError(errno.EADDRINUSE, msg) from None # <<<<<<<<<<<<<<
  34923. * else:
  34924. * raise
  34925. */
  34926. __pyx_t_13 = __Pyx_PyInt_From_int(EADDRINUSE); if (unlikely(!__pyx_t_13)) __PYX_ERR(2, 2064, __pyx_L47_error)
  34927. __Pyx_GOTREF(__pyx_t_13);
  34928. __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 2064, __pyx_L47_error)
  34929. __Pyx_GOTREF(__pyx_t_11);
  34930. __Pyx_GIVEREF(__pyx_t_13);
  34931. PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_13);
  34932. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_msg);
  34933. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_msg);
  34934. PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_cur_scope->__pyx_v_msg);
  34935. __pyx_t_13 = 0;
  34936. __pyx_t_13 = __Pyx_PyObject_Call(__pyx_builtin_OSError, __pyx_t_11, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(2, 2064, __pyx_L47_error)
  34937. __Pyx_GOTREF(__pyx_t_13);
  34938. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  34939. __Pyx_Raise(__pyx_t_13, 0, 0, Py_None);
  34940. __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  34941. __PYX_ERR(2, 2064, __pyx_L47_error)
  34942. /* "uvloop/loop.pyx":2060
  34943. * except OSError as exc:
  34944. * sock.close()
  34945. * if exc.errno == errno.EADDRINUSE: # <<<<<<<<<<<<<<
  34946. * # Let's improve the error message by adding
  34947. * # with what exact address it occurs.
  34948. */
  34949. }
  34950. /* "uvloop/loop.pyx":2066
  34951. * raise OSError(errno.EADDRINUSE, msg) from None
  34952. * else:
  34953. * raise # <<<<<<<<<<<<<<
  34954. * except Exception:
  34955. * sock.close()
  34956. */
  34957. /*else*/ {
  34958. __Pyx_GIVEREF(__pyx_t_7);
  34959. __Pyx_GIVEREF(__pyx_t_8);
  34960. __Pyx_XGIVEREF(__pyx_t_1);
  34961. __Pyx_ErrRestoreWithState(__pyx_t_7, __pyx_t_8, __pyx_t_1);
  34962. __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_1 = 0;
  34963. __PYX_ERR(2, 2066, __pyx_L47_error)
  34964. }
  34965. }
  34966. /* "uvloop/loop.pyx":2058
  34967. * try:
  34968. * sock.bind(path)
  34969. * except OSError as exc: # <<<<<<<<<<<<<<
  34970. * sock.close()
  34971. * if exc.errno == errno.EADDRINUSE:
  34972. */
  34973. /*finally:*/ {
  34974. __pyx_L47_error:;
  34975. /*exception exit:*/{
  34976. __Pyx_PyThreadState_assign
  34977. __pyx_t_21 = 0; __pyx_t_20 = 0; __pyx_t_19 = 0; __pyx_t_18 = 0; __pyx_t_17 = 0; __pyx_t_16 = 0;
  34978. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  34979. __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
  34980. __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
  34981. __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
  34982. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_18, &__pyx_t_17, &__pyx_t_16);
  34983. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_21, &__pyx_t_20, &__pyx_t_19) < 0)) __Pyx_ErrFetch(&__pyx_t_21, &__pyx_t_20, &__pyx_t_19);
  34984. __Pyx_XGOTREF(__pyx_t_21);
  34985. __Pyx_XGOTREF(__pyx_t_20);
  34986. __Pyx_XGOTREF(__pyx_t_19);
  34987. __Pyx_XGOTREF(__pyx_t_18);
  34988. __Pyx_XGOTREF(__pyx_t_17);
  34989. __Pyx_XGOTREF(__pyx_t_16);
  34990. __pyx_t_14 = __pyx_lineno; __pyx_t_9 = __pyx_clineno; __pyx_t_22 = __pyx_filename;
  34991. {
  34992. __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_exc);
  34993. __Pyx_DECREF(__pyx_cur_scope->__pyx_v_exc);
  34994. __pyx_cur_scope->__pyx_v_exc = NULL;
  34995. }
  34996. if (PY_MAJOR_VERSION >= 3) {
  34997. __Pyx_XGIVEREF(__pyx_t_18);
  34998. __Pyx_XGIVEREF(__pyx_t_17);
  34999. __Pyx_XGIVEREF(__pyx_t_16);
  35000. __Pyx_ExceptionReset(__pyx_t_18, __pyx_t_17, __pyx_t_16);
  35001. }
  35002. __Pyx_XGIVEREF(__pyx_t_21);
  35003. __Pyx_XGIVEREF(__pyx_t_20);
  35004. __Pyx_XGIVEREF(__pyx_t_19);
  35005. __Pyx_ErrRestore(__pyx_t_21, __pyx_t_20, __pyx_t_19);
  35006. __pyx_t_21 = 0; __pyx_t_20 = 0; __pyx_t_19 = 0; __pyx_t_18 = 0; __pyx_t_17 = 0; __pyx_t_16 = 0;
  35007. __pyx_lineno = __pyx_t_14; __pyx_clineno = __pyx_t_9; __pyx_filename = __pyx_t_22;
  35008. goto __pyx_L38_except_error;
  35009. }
  35010. }
  35011. }
  35012. /* "uvloop/loop.pyx":2067
  35013. * else:
  35014. * raise
  35015. * except Exception: # <<<<<<<<<<<<<<
  35016. * sock.close()
  35017. * raise
  35018. */
  35019. __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
  35020. if (__pyx_t_9) {
  35021. __Pyx_AddTraceback("uvloop.loop.Loop.create_unix_server", __pyx_clineno, __pyx_lineno, __pyx_filename);
  35022. if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_8, &__pyx_t_7) < 0) __PYX_ERR(2, 2067, __pyx_L38_except_error)
  35023. __Pyx_GOTREF(__pyx_t_1);
  35024. __Pyx_GOTREF(__pyx_t_8);
  35025. __Pyx_GOTREF(__pyx_t_7);
  35026. /* "uvloop/loop.pyx":2068
  35027. * raise
  35028. * except Exception:
  35029. * sock.close() # <<<<<<<<<<<<<<
  35030. * raise
  35031. *
  35032. */
  35033. __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_sock, __pyx_n_s_close); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 2068, __pyx_L38_except_error)
  35034. __Pyx_GOTREF(__pyx_t_11);
  35035. __pyx_t_10 = NULL;
  35036. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) {
  35037. __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_11);
  35038. if (likely(__pyx_t_10)) {
  35039. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
  35040. __Pyx_INCREF(__pyx_t_10);
  35041. __Pyx_INCREF(function);
  35042. __Pyx_DECREF_SET(__pyx_t_11, function);
  35043. }
  35044. }
  35045. __pyx_t_13 = (__pyx_t_10) ? __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_10) : __Pyx_PyObject_CallNoArg(__pyx_t_11);
  35046. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  35047. if (unlikely(!__pyx_t_13)) __PYX_ERR(2, 2068, __pyx_L38_except_error)
  35048. __Pyx_GOTREF(__pyx_t_13);
  35049. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  35050. __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  35051. /* "uvloop/loop.pyx":2069
  35052. * except Exception:
  35053. * sock.close()
  35054. * raise # <<<<<<<<<<<<<<
  35055. *
  35056. * else:
  35057. */
  35058. __Pyx_GIVEREF(__pyx_t_1);
  35059. __Pyx_GIVEREF(__pyx_t_8);
  35060. __Pyx_XGIVEREF(__pyx_t_7);
  35061. __Pyx_ErrRestoreWithState(__pyx_t_1, __pyx_t_8, __pyx_t_7);
  35062. __pyx_t_1 = 0; __pyx_t_8 = 0; __pyx_t_7 = 0;
  35063. __PYX_ERR(2, 2069, __pyx_L38_except_error)
  35064. }
  35065. goto __pyx_L38_except_error;
  35066. __pyx_L38_except_error:;
  35067. /* "uvloop/loop.pyx":2056
  35068. * sock = socket_socket(uv.AF_UNIX)
  35069. *
  35070. * try: # <<<<<<<<<<<<<<
  35071. * sock.bind(path)
  35072. * except OSError as exc:
  35073. */
  35074. __Pyx_XGIVEREF(__pyx_t_4);
  35075. __Pyx_XGIVEREF(__pyx_t_5);
  35076. __Pyx_XGIVEREF(__pyx_t_6);
  35077. __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
  35078. goto __pyx_L1_error;
  35079. __pyx_L41_try_end:;
  35080. }
  35081. /* "uvloop/loop.pyx":2019
  35082. * 'ssl_shutdown_timeout is only meaningful with ssl')
  35083. *
  35084. * if path is not None: # <<<<<<<<<<<<<<
  35085. * if sock is not None:
  35086. * raise ValueError(
  35087. */
  35088. goto __pyx_L8;
  35089. }
  35090. /* "uvloop/loop.pyx":2072
  35091. *
  35092. * else:
  35093. * if sock is None: # <<<<<<<<<<<<<<
  35094. * raise ValueError(
  35095. * 'path was not specified, and no sock specified')
  35096. */
  35097. /*else*/ {
  35098. __pyx_t_3 = (__pyx_cur_scope->__pyx_v_sock == Py_None);
  35099. __pyx_t_2 = (__pyx_t_3 != 0);
  35100. if (unlikely(__pyx_t_2)) {
  35101. /* "uvloop/loop.pyx":2073
  35102. * else:
  35103. * if sock is None:
  35104. * raise ValueError( # <<<<<<<<<<<<<<
  35105. * 'path was not specified, and no sock specified')
  35106. *
  35107. */
  35108. __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__56, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 2073, __pyx_L1_error)
  35109. __Pyx_GOTREF(__pyx_t_7);
  35110. __Pyx_Raise(__pyx_t_7, 0, 0, 0);
  35111. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  35112. __PYX_ERR(2, 2073, __pyx_L1_error)
  35113. /* "uvloop/loop.pyx":2072
  35114. *
  35115. * else:
  35116. * if sock is None: # <<<<<<<<<<<<<<
  35117. * raise ValueError(
  35118. * 'path was not specified, and no sock specified')
  35119. */
  35120. }
  35121. /* "uvloop/loop.pyx":2076
  35122. * 'path was not specified, and no sock specified')
  35123. *
  35124. * if sock.family != uv.AF_UNIX or not _is_sock_stream(sock.type): # <<<<<<<<<<<<<<
  35125. * raise ValueError(
  35126. * 'A UNIX Domain Stream Socket was expected, got {!r}'
  35127. */
  35128. __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_sock, __pyx_n_s_family); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 2076, __pyx_L1_error)
  35129. __Pyx_GOTREF(__pyx_t_7);
  35130. __pyx_t_8 = __Pyx_PyInt_From_int(AF_UNIX); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 2076, __pyx_L1_error)
  35131. __Pyx_GOTREF(__pyx_t_8);
  35132. __pyx_t_1 = PyObject_RichCompare(__pyx_t_7, __pyx_t_8, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2076, __pyx_L1_error)
  35133. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  35134. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  35135. __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(2, 2076, __pyx_L1_error)
  35136. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  35137. if (!__pyx_t_3) {
  35138. } else {
  35139. __pyx_t_2 = __pyx_t_3;
  35140. goto __pyx_L58_bool_binop_done;
  35141. }
  35142. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_sock, __pyx_n_s_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2076, __pyx_L1_error)
  35143. __Pyx_GOTREF(__pyx_t_1);
  35144. __pyx_t_8 = __pyx_f_6uvloop_4loop__is_sock_stream(__pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 2076, __pyx_L1_error)
  35145. __Pyx_GOTREF(__pyx_t_8);
  35146. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  35147. __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(2, 2076, __pyx_L1_error)
  35148. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  35149. __pyx_t_23 = ((!__pyx_t_3) != 0);
  35150. __pyx_t_2 = __pyx_t_23;
  35151. __pyx_L58_bool_binop_done:;
  35152. if (unlikely(__pyx_t_2)) {
  35153. /* "uvloop/loop.pyx":2079
  35154. * raise ValueError(
  35155. * 'A UNIX Domain Stream Socket was expected, got {!r}'
  35156. * .format(sock)) # <<<<<<<<<<<<<<
  35157. *
  35158. * # libuv will set the socket to non-blocking mode, but
  35159. */
  35160. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_A_UNIX_Domain_Stream_Socket_was, __pyx_n_s_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2079, __pyx_L1_error)
  35161. __Pyx_GOTREF(__pyx_t_1);
  35162. __pyx_t_7 = NULL;
  35163. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
  35164. __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1);
  35165. if (likely(__pyx_t_7)) {
  35166. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
  35167. __Pyx_INCREF(__pyx_t_7);
  35168. __Pyx_INCREF(function);
  35169. __Pyx_DECREF_SET(__pyx_t_1, function);
  35170. }
  35171. }
  35172. __pyx_t_8 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_7, __pyx_cur_scope->__pyx_v_sock) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_cur_scope->__pyx_v_sock);
  35173. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  35174. if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 2079, __pyx_L1_error)
  35175. __Pyx_GOTREF(__pyx_t_8);
  35176. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  35177. /* "uvloop/loop.pyx":2077
  35178. *
  35179. * if sock.family != uv.AF_UNIX or not _is_sock_stream(sock.type):
  35180. * raise ValueError( # <<<<<<<<<<<<<<
  35181. * 'A UNIX Domain Stream Socket was expected, got {!r}'
  35182. * .format(sock))
  35183. */
  35184. __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2077, __pyx_L1_error)
  35185. __Pyx_GOTREF(__pyx_t_1);
  35186. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  35187. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  35188. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  35189. __PYX_ERR(2, 2077, __pyx_L1_error)
  35190. /* "uvloop/loop.pyx":2076
  35191. * 'path was not specified, and no sock specified')
  35192. *
  35193. * if sock.family != uv.AF_UNIX or not _is_sock_stream(sock.type): # <<<<<<<<<<<<<<
  35194. * raise ValueError(
  35195. * 'A UNIX Domain Stream Socket was expected, got {!r}'
  35196. */
  35197. }
  35198. /* "uvloop/loop.pyx":2083
  35199. * # libuv will set the socket to non-blocking mode, but
  35200. * # we want Python socket object to notice that.
  35201. * sock.setblocking(False) # <<<<<<<<<<<<<<
  35202. *
  35203. * pipe = UnixServer.new(
  35204. */
  35205. __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_sock, __pyx_n_s_setblocking); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 2083, __pyx_L1_error)
  35206. __Pyx_GOTREF(__pyx_t_8);
  35207. __pyx_t_7 = NULL;
  35208. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
  35209. __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8);
  35210. if (likely(__pyx_t_7)) {
  35211. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
  35212. __Pyx_INCREF(__pyx_t_7);
  35213. __Pyx_INCREF(function);
  35214. __Pyx_DECREF_SET(__pyx_t_8, function);
  35215. }
  35216. }
  35217. __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_7, Py_False) : __Pyx_PyObject_CallOneArg(__pyx_t_8, Py_False);
  35218. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  35219. if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2083, __pyx_L1_error)
  35220. __Pyx_GOTREF(__pyx_t_1);
  35221. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  35222. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  35223. }
  35224. __pyx_L8:;
  35225. /* "uvloop/loop.pyx":2085
  35226. * sock.setblocking(False)
  35227. *
  35228. * pipe = UnixServer.new( # <<<<<<<<<<<<<<
  35229. * self, protocol_factory, server, backlog,
  35230. * ssl, ssl_handshake_timeout, ssl_shutdown_timeout)
  35231. */
  35232. __pyx_t_1 = ((PyObject *)__pyx_f_6uvloop_4loop_10UnixServer_new(__pyx_cur_scope->__pyx_v_self, __pyx_cur_scope->__pyx_v_protocol_factory, __pyx_cur_scope->__pyx_v_server, __pyx_cur_scope->__pyx_v_backlog, __pyx_cur_scope->__pyx_v_ssl, __pyx_cur_scope->__pyx_v_ssl_handshake_timeout, __pyx_cur_scope->__pyx_v_ssl_shutdown_timeout)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2085, __pyx_L1_error)
  35233. __Pyx_GOTREF(__pyx_t_1);
  35234. __Pyx_GIVEREF(__pyx_t_1);
  35235. __pyx_cur_scope->__pyx_v_pipe = ((struct __pyx_obj_6uvloop_4loop_UnixServer *)__pyx_t_1);
  35236. __pyx_t_1 = 0;
  35237. /* "uvloop/loop.pyx":2089
  35238. * ssl, ssl_handshake_timeout, ssl_shutdown_timeout)
  35239. *
  35240. * try: # <<<<<<<<<<<<<<
  35241. * pipe._open(sock.fileno())
  35242. * except Exception:
  35243. */
  35244. {
  35245. __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4);
  35246. __Pyx_XGOTREF(__pyx_t_6);
  35247. __Pyx_XGOTREF(__pyx_t_5);
  35248. __Pyx_XGOTREF(__pyx_t_4);
  35249. /*try:*/ {
  35250. /* "uvloop/loop.pyx":2090
  35251. *
  35252. * try:
  35253. * pipe._open(sock.fileno()) # <<<<<<<<<<<<<<
  35254. * except Exception:
  35255. * pipe._close()
  35256. */
  35257. __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_sock, __pyx_n_s_fileno); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 2090, __pyx_L60_error)
  35258. __Pyx_GOTREF(__pyx_t_8);
  35259. __pyx_t_7 = NULL;
  35260. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
  35261. __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8);
  35262. if (likely(__pyx_t_7)) {
  35263. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
  35264. __Pyx_INCREF(__pyx_t_7);
  35265. __Pyx_INCREF(function);
  35266. __Pyx_DECREF_SET(__pyx_t_8, function);
  35267. }
  35268. }
  35269. __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_8);
  35270. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  35271. if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2090, __pyx_L60_error)
  35272. __Pyx_GOTREF(__pyx_t_1);
  35273. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  35274. __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 2090, __pyx_L60_error)
  35275. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  35276. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UnixServer *)__pyx_cur_scope->__pyx_v_pipe->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._open(((struct __pyx_obj_6uvloop_4loop_UVSocketHandle *)__pyx_cur_scope->__pyx_v_pipe), __pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2090, __pyx_L60_error)
  35277. __Pyx_GOTREF(__pyx_t_1);
  35278. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  35279. /* "uvloop/loop.pyx":2089
  35280. * ssl, ssl_handshake_timeout, ssl_shutdown_timeout)
  35281. *
  35282. * try: # <<<<<<<<<<<<<<
  35283. * pipe._open(sock.fileno())
  35284. * except Exception:
  35285. */
  35286. }
  35287. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  35288. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  35289. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  35290. goto __pyx_L65_try_end;
  35291. __pyx_L60_error:;
  35292. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  35293. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  35294. __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
  35295. __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
  35296. __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
  35297. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  35298. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  35299. /* "uvloop/loop.pyx":2091
  35300. * try:
  35301. * pipe._open(sock.fileno())
  35302. * except Exception: # <<<<<<<<<<<<<<
  35303. * pipe._close()
  35304. * sock.close()
  35305. */
  35306. __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
  35307. if (__pyx_t_9) {
  35308. __Pyx_AddTraceback("uvloop.loop.Loop.create_unix_server", __pyx_clineno, __pyx_lineno, __pyx_filename);
  35309. if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_8, &__pyx_t_7) < 0) __PYX_ERR(2, 2091, __pyx_L62_except_error)
  35310. __Pyx_GOTREF(__pyx_t_1);
  35311. __Pyx_GOTREF(__pyx_t_8);
  35312. __Pyx_GOTREF(__pyx_t_7);
  35313. /* "uvloop/loop.pyx":2092
  35314. * pipe._open(sock.fileno())
  35315. * except Exception:
  35316. * pipe._close() # <<<<<<<<<<<<<<
  35317. * sock.close()
  35318. * raise
  35319. */
  35320. __pyx_t_13 = ((struct __pyx_vtabstruct_6uvloop_4loop_UnixServer *)__pyx_cur_scope->__pyx_v_pipe->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._close(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_cur_scope->__pyx_v_pipe)); if (unlikely(!__pyx_t_13)) __PYX_ERR(2, 2092, __pyx_L62_except_error)
  35321. __Pyx_GOTREF(__pyx_t_13);
  35322. __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  35323. /* "uvloop/loop.pyx":2093
  35324. * except Exception:
  35325. * pipe._close()
  35326. * sock.close() # <<<<<<<<<<<<<<
  35327. * raise
  35328. *
  35329. */
  35330. __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_sock, __pyx_n_s_close); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 2093, __pyx_L62_except_error)
  35331. __Pyx_GOTREF(__pyx_t_11);
  35332. __pyx_t_10 = NULL;
  35333. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) {
  35334. __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_11);
  35335. if (likely(__pyx_t_10)) {
  35336. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
  35337. __Pyx_INCREF(__pyx_t_10);
  35338. __Pyx_INCREF(function);
  35339. __Pyx_DECREF_SET(__pyx_t_11, function);
  35340. }
  35341. }
  35342. __pyx_t_13 = (__pyx_t_10) ? __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_10) : __Pyx_PyObject_CallNoArg(__pyx_t_11);
  35343. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  35344. if (unlikely(!__pyx_t_13)) __PYX_ERR(2, 2093, __pyx_L62_except_error)
  35345. __Pyx_GOTREF(__pyx_t_13);
  35346. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  35347. __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  35348. /* "uvloop/loop.pyx":2094
  35349. * pipe._close()
  35350. * sock.close()
  35351. * raise # <<<<<<<<<<<<<<
  35352. *
  35353. * pipe._attach_fileobj(sock)
  35354. */
  35355. __Pyx_GIVEREF(__pyx_t_1);
  35356. __Pyx_GIVEREF(__pyx_t_8);
  35357. __Pyx_XGIVEREF(__pyx_t_7);
  35358. __Pyx_ErrRestoreWithState(__pyx_t_1, __pyx_t_8, __pyx_t_7);
  35359. __pyx_t_1 = 0; __pyx_t_8 = 0; __pyx_t_7 = 0;
  35360. __PYX_ERR(2, 2094, __pyx_L62_except_error)
  35361. }
  35362. goto __pyx_L62_except_error;
  35363. __pyx_L62_except_error:;
  35364. /* "uvloop/loop.pyx":2089
  35365. * ssl, ssl_handshake_timeout, ssl_shutdown_timeout)
  35366. *
  35367. * try: # <<<<<<<<<<<<<<
  35368. * pipe._open(sock.fileno())
  35369. * except Exception:
  35370. */
  35371. __Pyx_XGIVEREF(__pyx_t_6);
  35372. __Pyx_XGIVEREF(__pyx_t_5);
  35373. __Pyx_XGIVEREF(__pyx_t_4);
  35374. __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_5, __pyx_t_4);
  35375. goto __pyx_L1_error;
  35376. __pyx_L65_try_end:;
  35377. }
  35378. /* "uvloop/loop.pyx":2096
  35379. * raise
  35380. *
  35381. * pipe._attach_fileobj(sock) # <<<<<<<<<<<<<<
  35382. * server._add_server(pipe)
  35383. *
  35384. */
  35385. __pyx_t_7 = ((struct __pyx_vtabstruct_6uvloop_4loop_UnixServer *)__pyx_cur_scope->__pyx_v_pipe->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._attach_fileobj(((struct __pyx_obj_6uvloop_4loop_UVSocketHandle *)__pyx_cur_scope->__pyx_v_pipe), __pyx_cur_scope->__pyx_v_sock); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 2096, __pyx_L1_error)
  35386. __Pyx_GOTREF(__pyx_t_7);
  35387. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  35388. /* "uvloop/loop.pyx":2097
  35389. *
  35390. * pipe._attach_fileobj(sock)
  35391. * server._add_server(pipe) # <<<<<<<<<<<<<<
  35392. *
  35393. * if start_serving:
  35394. */
  35395. __pyx_t_7 = ((struct __pyx_vtabstruct_6uvloop_4loop_Server *)__pyx_cur_scope->__pyx_v_server->__pyx_vtab)->_add_server(__pyx_cur_scope->__pyx_v_server, ((struct __pyx_obj_6uvloop_4loop_UVStreamServer *)__pyx_cur_scope->__pyx_v_pipe)); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 2097, __pyx_L1_error)
  35396. __Pyx_GOTREF(__pyx_t_7);
  35397. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  35398. /* "uvloop/loop.pyx":2099
  35399. * server._add_server(pipe)
  35400. *
  35401. * if start_serving: # <<<<<<<<<<<<<<
  35402. * server._start_serving()
  35403. *
  35404. */
  35405. __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_start_serving); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(2, 2099, __pyx_L1_error)
  35406. if (__pyx_t_2) {
  35407. /* "uvloop/loop.pyx":2100
  35408. *
  35409. * if start_serving:
  35410. * server._start_serving() # <<<<<<<<<<<<<<
  35411. *
  35412. * return server
  35413. */
  35414. __pyx_t_7 = ((struct __pyx_vtabstruct_6uvloop_4loop_Server *)__pyx_cur_scope->__pyx_v_server->__pyx_vtab)->_start_serving(__pyx_cur_scope->__pyx_v_server); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 2100, __pyx_L1_error)
  35415. __Pyx_GOTREF(__pyx_t_7);
  35416. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  35417. /* "uvloop/loop.pyx":2099
  35418. * server._add_server(pipe)
  35419. *
  35420. * if start_serving: # <<<<<<<<<<<<<<
  35421. * server._start_serving()
  35422. *
  35423. */
  35424. }
  35425. /* "uvloop/loop.pyx":2102
  35426. * server._start_serving()
  35427. *
  35428. * return server # <<<<<<<<<<<<<<
  35429. *
  35430. * @cython.iterable_coroutine
  35431. */
  35432. __Pyx_XDECREF(__pyx_r);
  35433. __pyx_r = NULL; __Pyx_ReturnWithStopIteration(((PyObject *)__pyx_cur_scope->__pyx_v_server));
  35434. goto __pyx_L0;
  35435. CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
  35436. /* "uvloop/loop.pyx":1974
  35437. *
  35438. * @cython.iterable_coroutine
  35439. * async def create_unix_server(self, protocol_factory, path=None, # <<<<<<<<<<<<<<
  35440. * *, backlog=100, sock=None, ssl=None,
  35441. * ssl_handshake_timeout=None,
  35442. */
  35443. /* function exit code */
  35444. __pyx_L1_error:;
  35445. __Pyx_XDECREF(__pyx_t_1);
  35446. __Pyx_XDECREF(__pyx_t_7);
  35447. __Pyx_XDECREF(__pyx_t_8);
  35448. __Pyx_XDECREF(__pyx_t_10);
  35449. __Pyx_XDECREF(__pyx_t_11);
  35450. __Pyx_XDECREF(__pyx_t_12);
  35451. __Pyx_XDECREF(__pyx_t_13);
  35452. __Pyx_AddTraceback("create_unix_server", __pyx_clineno, __pyx_lineno, __pyx_filename);
  35453. __pyx_L0:;
  35454. __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  35455. #if !CYTHON_USE_EXC_INFO_STACK
  35456. __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  35457. #endif
  35458. __pyx_generator->resume_label = -1;
  35459. __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  35460. __Pyx_RefNannyFinishContext();
  35461. return __pyx_r;
  35462. }
  35463. static PyObject *__pyx_gb_6uvloop_4loop_4Loop_66generator6(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
  35464. /* "uvloop/loop.pyx":2105
  35465. *
  35466. * @cython.iterable_coroutine
  35467. * async def create_unix_connection(self, protocol_factory, path=None, *, # <<<<<<<<<<<<<<
  35468. * ssl=None, sock=None,
  35469. * server_hostname=None,
  35470. */
  35471. /* Python wrapper */
  35472. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_65create_unix_connection(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  35473. static char __pyx_doc_6uvloop_4loop_4Loop_64create_unix_connection[] = "Loop.create_unix_connection(self, protocol_factory, path=None, *, ssl=None, sock=None, server_hostname=None, ssl_handshake_timeout=None, ssl_shutdown_timeout=None)";
  35474. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_65create_unix_connection(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  35475. PyObject *__pyx_v_protocol_factory = 0;
  35476. PyObject *__pyx_v_path = 0;
  35477. PyObject *__pyx_v_ssl = 0;
  35478. PyObject *__pyx_v_sock = 0;
  35479. PyObject *__pyx_v_server_hostname = 0;
  35480. PyObject *__pyx_v_ssl_handshake_timeout = 0;
  35481. PyObject *__pyx_v_ssl_shutdown_timeout = 0;
  35482. PyObject *__pyx_r = 0;
  35483. __Pyx_RefNannyDeclarations
  35484. __Pyx_RefNannySetupContext("create_unix_connection (wrapper)", 0);
  35485. {
  35486. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_protocol_factory,&__pyx_n_s_path,&__pyx_n_s_ssl,&__pyx_n_s_sock,&__pyx_n_s_server_hostname,&__pyx_n_s_ssl_handshake_timeout,&__pyx_n_s_ssl_shutdown_timeout,0};
  35487. PyObject* values[7] = {0,0,0,0,0,0,0};
  35488. values[1] = ((PyObject *)Py_None);
  35489. /* "uvloop/loop.pyx":2106
  35490. * @cython.iterable_coroutine
  35491. * async def create_unix_connection(self, protocol_factory, path=None, *,
  35492. * ssl=None, sock=None, # <<<<<<<<<<<<<<
  35493. * server_hostname=None,
  35494. * ssl_handshake_timeout=None,
  35495. */
  35496. values[2] = ((PyObject *)Py_None);
  35497. values[3] = ((PyObject *)Py_None);
  35498. /* "uvloop/loop.pyx":2107
  35499. * async def create_unix_connection(self, protocol_factory, path=None, *,
  35500. * ssl=None, sock=None,
  35501. * server_hostname=None, # <<<<<<<<<<<<<<
  35502. * ssl_handshake_timeout=None,
  35503. * ssl_shutdown_timeout=None):
  35504. */
  35505. values[4] = ((PyObject *)Py_None);
  35506. /* "uvloop/loop.pyx":2108
  35507. * ssl=None, sock=None,
  35508. * server_hostname=None,
  35509. * ssl_handshake_timeout=None, # <<<<<<<<<<<<<<
  35510. * ssl_shutdown_timeout=None):
  35511. *
  35512. */
  35513. values[5] = ((PyObject *)Py_None);
  35514. /* "uvloop/loop.pyx":2109
  35515. * server_hostname=None,
  35516. * ssl_handshake_timeout=None,
  35517. * ssl_shutdown_timeout=None): # <<<<<<<<<<<<<<
  35518. *
  35519. * cdef:
  35520. */
  35521. values[6] = ((PyObject *)Py_None);
  35522. if (unlikely(__pyx_kwds)) {
  35523. Py_ssize_t kw_args;
  35524. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  35525. switch (pos_args) {
  35526. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  35527. CYTHON_FALLTHROUGH;
  35528. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  35529. CYTHON_FALLTHROUGH;
  35530. case 0: break;
  35531. default: goto __pyx_L5_argtuple_error;
  35532. }
  35533. kw_args = PyDict_Size(__pyx_kwds);
  35534. switch (pos_args) {
  35535. case 0:
  35536. if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_protocol_factory)) != 0)) kw_args--;
  35537. else goto __pyx_L5_argtuple_error;
  35538. CYTHON_FALLTHROUGH;
  35539. case 1:
  35540. if (kw_args > 0) {
  35541. PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_path);
  35542. if (value) { values[1] = value; kw_args--; }
  35543. }
  35544. }
  35545. if (kw_args > 0 && likely(kw_args <= 5)) {
  35546. Py_ssize_t index;
  35547. for (index = 2; index < 7 && kw_args > 0; index++) {
  35548. PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, *__pyx_pyargnames[index]);
  35549. if (value) { values[index] = value; kw_args--; }
  35550. }
  35551. }
  35552. if (unlikely(kw_args > 0)) {
  35553. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "create_unix_connection") < 0)) __PYX_ERR(2, 2105, __pyx_L3_error)
  35554. }
  35555. } else {
  35556. switch (PyTuple_GET_SIZE(__pyx_args)) {
  35557. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  35558. CYTHON_FALLTHROUGH;
  35559. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  35560. break;
  35561. default: goto __pyx_L5_argtuple_error;
  35562. }
  35563. }
  35564. __pyx_v_protocol_factory = values[0];
  35565. __pyx_v_path = values[1];
  35566. __pyx_v_ssl = values[2];
  35567. __pyx_v_sock = values[3];
  35568. __pyx_v_server_hostname = values[4];
  35569. __pyx_v_ssl_handshake_timeout = values[5];
  35570. __pyx_v_ssl_shutdown_timeout = values[6];
  35571. }
  35572. goto __pyx_L4_argument_unpacking_done;
  35573. __pyx_L5_argtuple_error:;
  35574. __Pyx_RaiseArgtupleInvalid("create_unix_connection", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 2105, __pyx_L3_error)
  35575. __pyx_L3_error:;
  35576. __Pyx_AddTraceback("uvloop.loop.Loop.create_unix_connection", __pyx_clineno, __pyx_lineno, __pyx_filename);
  35577. __Pyx_RefNannyFinishContext();
  35578. return NULL;
  35579. __pyx_L4_argument_unpacking_done:;
  35580. __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_64create_unix_connection(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self), __pyx_v_protocol_factory, __pyx_v_path, __pyx_v_ssl, __pyx_v_sock, __pyx_v_server_hostname, __pyx_v_ssl_handshake_timeout, __pyx_v_ssl_shutdown_timeout);
  35581. /* "uvloop/loop.pyx":2105
  35582. *
  35583. * @cython.iterable_coroutine
  35584. * async def create_unix_connection(self, protocol_factory, path=None, *, # <<<<<<<<<<<<<<
  35585. * ssl=None, sock=None,
  35586. * server_hostname=None,
  35587. */
  35588. /* function exit code */
  35589. __Pyx_RefNannyFinishContext();
  35590. return __pyx_r;
  35591. }
  35592. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_64create_unix_connection(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_protocol_factory, PyObject *__pyx_v_path, PyObject *__pyx_v_ssl, PyObject *__pyx_v_sock, PyObject *__pyx_v_server_hostname, PyObject *__pyx_v_ssl_handshake_timeout, PyObject *__pyx_v_ssl_shutdown_timeout) {
  35593. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_13_create_unix_connection *__pyx_cur_scope;
  35594. PyObject *__pyx_r = NULL;
  35595. __Pyx_RefNannyDeclarations
  35596. __Pyx_RefNannySetupContext("create_unix_connection", 0);
  35597. __pyx_cur_scope = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_13_create_unix_connection *)__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_13_create_unix_connection(__pyx_ptype_6uvloop_4loop___pyx_scope_struct_13_create_unix_connection, __pyx_empty_tuple, NULL);
  35598. if (unlikely(!__pyx_cur_scope)) {
  35599. __pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_13_create_unix_connection *)Py_None);
  35600. __Pyx_INCREF(Py_None);
  35601. __PYX_ERR(2, 2105, __pyx_L1_error)
  35602. } else {
  35603. __Pyx_GOTREF(__pyx_cur_scope);
  35604. }
  35605. __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  35606. __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  35607. __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  35608. __pyx_cur_scope->__pyx_v_protocol_factory = __pyx_v_protocol_factory;
  35609. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_protocol_factory);
  35610. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_protocol_factory);
  35611. __pyx_cur_scope->__pyx_v_path = __pyx_v_path;
  35612. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_path);
  35613. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_path);
  35614. __pyx_cur_scope->__pyx_v_ssl = __pyx_v_ssl;
  35615. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_ssl);
  35616. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_ssl);
  35617. __pyx_cur_scope->__pyx_v_sock = __pyx_v_sock;
  35618. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_sock);
  35619. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_sock);
  35620. __pyx_cur_scope->__pyx_v_server_hostname = __pyx_v_server_hostname;
  35621. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_server_hostname);
  35622. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_server_hostname);
  35623. __pyx_cur_scope->__pyx_v_ssl_handshake_timeout = __pyx_v_ssl_handshake_timeout;
  35624. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_ssl_handshake_timeout);
  35625. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_ssl_handshake_timeout);
  35626. __pyx_cur_scope->__pyx_v_ssl_shutdown_timeout = __pyx_v_ssl_shutdown_timeout;
  35627. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_ssl_shutdown_timeout);
  35628. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_ssl_shutdown_timeout);
  35629. {
  35630. __pyx_CoroutineObject *gen = __Pyx_IterableCoroutine_New((__pyx_coroutine_body_t) __pyx_gb_6uvloop_4loop_4Loop_66generator6, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_create_unix_connection, __pyx_n_s_Loop_create_unix_connection, __pyx_n_s_uvloop_loop); if (unlikely(!gen)) __PYX_ERR(2, 2105, __pyx_L1_error)
  35631. __Pyx_DECREF(__pyx_cur_scope);
  35632. __Pyx_RefNannyFinishContext();
  35633. return (PyObject *) gen;
  35634. }
  35635. /* function exit code */
  35636. __pyx_L1_error:;
  35637. __Pyx_AddTraceback("uvloop.loop.Loop.create_unix_connection", __pyx_clineno, __pyx_lineno, __pyx_filename);
  35638. __pyx_r = NULL;
  35639. __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  35640. __Pyx_XGIVEREF(__pyx_r);
  35641. __Pyx_RefNannyFinishContext();
  35642. return __pyx_r;
  35643. }
  35644. static PyObject *__pyx_gb_6uvloop_4loop_4Loop_66generator6(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
  35645. {
  35646. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_13_create_unix_connection *__pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_13_create_unix_connection *)__pyx_generator->closure);
  35647. PyObject *__pyx_r = NULL;
  35648. PyObject *__pyx_t_1 = NULL;
  35649. PyObject *__pyx_t_2 = NULL;
  35650. PyObject *__pyx_t_3 = NULL;
  35651. int __pyx_t_4;
  35652. int __pyx_t_5;
  35653. PyObject *__pyx_t_6 = NULL;
  35654. PyObject *__pyx_t_7 = NULL;
  35655. PyObject *__pyx_t_8 = NULL;
  35656. int __pyx_t_9;
  35657. char *__pyx_t_10;
  35658. PyObject *__pyx_t_11 = NULL;
  35659. int __pyx_t_12;
  35660. PyObject *__pyx_t_13 = NULL;
  35661. PyObject *__pyx_t_14 = NULL;
  35662. __Pyx_RefNannyDeclarations
  35663. __Pyx_RefNannySetupContext("create_unix_connection", 0);
  35664. switch (__pyx_generator->resume_label) {
  35665. case 0: goto __pyx_L3_first_run;
  35666. case 1: goto __pyx_L24_resume_from_await;
  35667. case 2: goto __pyx_L37_resume_from_await;
  35668. case 3: goto __pyx_L47_resume_from_await;
  35669. default: /* CPython raises the right error here */
  35670. __Pyx_RefNannyFinishContext();
  35671. return NULL;
  35672. }
  35673. __pyx_L3_first_run:;
  35674. if (unlikely(!__pyx_sent_value)) __PYX_ERR(2, 2105, __pyx_L1_error)
  35675. /* "uvloop/loop.pyx":2118
  35676. * object ssl_waiter
  35677. *
  35678. * app_protocol = protocol = protocol_factory() # <<<<<<<<<<<<<<
  35679. * ssl_waiter = None
  35680. * if ssl:
  35681. */
  35682. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_protocol_factory);
  35683. __pyx_t_2 = __pyx_cur_scope->__pyx_v_protocol_factory; __pyx_t_3 = NULL;
  35684. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
  35685. __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
  35686. if (likely(__pyx_t_3)) {
  35687. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  35688. __Pyx_INCREF(__pyx_t_3);
  35689. __Pyx_INCREF(function);
  35690. __Pyx_DECREF_SET(__pyx_t_2, function);
  35691. }
  35692. }
  35693. __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  35694. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  35695. if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2118, __pyx_L1_error)
  35696. __Pyx_GOTREF(__pyx_t_1);
  35697. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  35698. __Pyx_INCREF(__pyx_t_1);
  35699. __Pyx_GIVEREF(__pyx_t_1);
  35700. __pyx_cur_scope->__pyx_v_app_protocol = __pyx_t_1;
  35701. __Pyx_INCREF(__pyx_t_1);
  35702. __Pyx_GIVEREF(__pyx_t_1);
  35703. __pyx_cur_scope->__pyx_v_protocol = __pyx_t_1;
  35704. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  35705. /* "uvloop/loop.pyx":2119
  35706. *
  35707. * app_protocol = protocol = protocol_factory()
  35708. * ssl_waiter = None # <<<<<<<<<<<<<<
  35709. * if ssl:
  35710. * if server_hostname is None:
  35711. */
  35712. __Pyx_INCREF(Py_None);
  35713. __Pyx_GIVEREF(Py_None);
  35714. __pyx_cur_scope->__pyx_v_ssl_waiter = Py_None;
  35715. /* "uvloop/loop.pyx":2120
  35716. * app_protocol = protocol = protocol_factory()
  35717. * ssl_waiter = None
  35718. * if ssl: # <<<<<<<<<<<<<<
  35719. * if server_hostname is None:
  35720. * raise ValueError('You must set server_hostname '
  35721. */
  35722. __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_ssl); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(2, 2120, __pyx_L1_error)
  35723. if (__pyx_t_4) {
  35724. /* "uvloop/loop.pyx":2121
  35725. * ssl_waiter = None
  35726. * if ssl:
  35727. * if server_hostname is None: # <<<<<<<<<<<<<<
  35728. * raise ValueError('You must set server_hostname '
  35729. * 'when using ssl without a host')
  35730. */
  35731. __pyx_t_4 = (__pyx_cur_scope->__pyx_v_server_hostname == Py_None);
  35732. __pyx_t_5 = (__pyx_t_4 != 0);
  35733. if (unlikely(__pyx_t_5)) {
  35734. /* "uvloop/loop.pyx":2122
  35735. * if ssl:
  35736. * if server_hostname is None:
  35737. * raise ValueError('You must set server_hostname ' # <<<<<<<<<<<<<<
  35738. * 'when using ssl without a host')
  35739. *
  35740. */
  35741. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__48, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2122, __pyx_L1_error)
  35742. __Pyx_GOTREF(__pyx_t_1);
  35743. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  35744. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  35745. __PYX_ERR(2, 2122, __pyx_L1_error)
  35746. /* "uvloop/loop.pyx":2121
  35747. * ssl_waiter = None
  35748. * if ssl:
  35749. * if server_hostname is None: # <<<<<<<<<<<<<<
  35750. * raise ValueError('You must set server_hostname '
  35751. * 'when using ssl without a host')
  35752. */
  35753. }
  35754. /* "uvloop/loop.pyx":2125
  35755. * 'when using ssl without a host')
  35756. *
  35757. * ssl_waiter = self._new_future() # <<<<<<<<<<<<<<
  35758. * sslcontext = None if isinstance(ssl, bool) else ssl
  35759. * protocol = SSLProtocol(
  35760. */
  35761. __pyx_t_1 = __pyx_f_6uvloop_4loop_4Loop__new_future(__pyx_cur_scope->__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2125, __pyx_L1_error)
  35762. __Pyx_GOTREF(__pyx_t_1);
  35763. __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_ssl_waiter);
  35764. __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_ssl_waiter, __pyx_t_1);
  35765. __Pyx_GIVEREF(__pyx_t_1);
  35766. __pyx_t_1 = 0;
  35767. /* "uvloop/loop.pyx":2126
  35768. *
  35769. * ssl_waiter = self._new_future()
  35770. * sslcontext = None if isinstance(ssl, bool) else ssl # <<<<<<<<<<<<<<
  35771. * protocol = SSLProtocol(
  35772. * self, app_protocol, sslcontext, ssl_waiter,
  35773. */
  35774. __pyx_t_2 = ((PyObject*)&PyBool_Type);
  35775. __Pyx_INCREF(__pyx_t_2);
  35776. __pyx_t_5 = PyObject_IsInstance(__pyx_cur_scope->__pyx_v_ssl, __pyx_t_2); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(2, 2126, __pyx_L1_error)
  35777. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  35778. if ((__pyx_t_5 != 0)) {
  35779. __Pyx_INCREF(Py_None);
  35780. __pyx_t_1 = Py_None;
  35781. } else {
  35782. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_ssl);
  35783. __pyx_t_1 = __pyx_cur_scope->__pyx_v_ssl;
  35784. }
  35785. __Pyx_GIVEREF(__pyx_t_1);
  35786. __pyx_cur_scope->__pyx_v_sslcontext = __pyx_t_1;
  35787. __pyx_t_1 = 0;
  35788. /* "uvloop/loop.pyx":2127
  35789. * ssl_waiter = self._new_future()
  35790. * sslcontext = None if isinstance(ssl, bool) else ssl
  35791. * protocol = SSLProtocol( # <<<<<<<<<<<<<<
  35792. * self, app_protocol, sslcontext, ssl_waiter,
  35793. * False, server_hostname,
  35794. */
  35795. __pyx_t_1 = PyTuple_New(6); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2127, __pyx_L1_error)
  35796. __Pyx_GOTREF(__pyx_t_1);
  35797. __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_self));
  35798. __Pyx_GIVEREF(((PyObject *)__pyx_cur_scope->__pyx_v_self));
  35799. PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_cur_scope->__pyx_v_self));
  35800. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_app_protocol);
  35801. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_app_protocol);
  35802. PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_cur_scope->__pyx_v_app_protocol);
  35803. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_sslcontext);
  35804. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_sslcontext);
  35805. PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_cur_scope->__pyx_v_sslcontext);
  35806. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_ssl_waiter);
  35807. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_ssl_waiter);
  35808. PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_cur_scope->__pyx_v_ssl_waiter);
  35809. __Pyx_INCREF(Py_False);
  35810. __Pyx_GIVEREF(Py_False);
  35811. PyTuple_SET_ITEM(__pyx_t_1, 4, Py_False);
  35812. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_server_hostname);
  35813. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_server_hostname);
  35814. PyTuple_SET_ITEM(__pyx_t_1, 5, __pyx_cur_scope->__pyx_v_server_hostname);
  35815. /* "uvloop/loop.pyx":2130
  35816. * self, app_protocol, sslcontext, ssl_waiter,
  35817. * False, server_hostname,
  35818. * ssl_handshake_timeout=ssl_handshake_timeout, # <<<<<<<<<<<<<<
  35819. * ssl_shutdown_timeout=ssl_shutdown_timeout)
  35820. * else:
  35821. */
  35822. __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 2130, __pyx_L1_error)
  35823. __Pyx_GOTREF(__pyx_t_2);
  35824. if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_ssl_handshake_timeout, __pyx_cur_scope->__pyx_v_ssl_handshake_timeout) < 0) __PYX_ERR(2, 2130, __pyx_L1_error)
  35825. /* "uvloop/loop.pyx":2131
  35826. * False, server_hostname,
  35827. * ssl_handshake_timeout=ssl_handshake_timeout,
  35828. * ssl_shutdown_timeout=ssl_shutdown_timeout) # <<<<<<<<<<<<<<
  35829. * else:
  35830. * if server_hostname is not None:
  35831. */
  35832. if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_ssl_shutdown_timeout, __pyx_cur_scope->__pyx_v_ssl_shutdown_timeout) < 0) __PYX_ERR(2, 2130, __pyx_L1_error)
  35833. /* "uvloop/loop.pyx":2127
  35834. * ssl_waiter = self._new_future()
  35835. * sslcontext = None if isinstance(ssl, bool) else ssl
  35836. * protocol = SSLProtocol( # <<<<<<<<<<<<<<
  35837. * self, app_protocol, sslcontext, ssl_waiter,
  35838. * False, server_hostname,
  35839. */
  35840. __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6uvloop_4loop_SSLProtocol), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2127, __pyx_L1_error)
  35841. __Pyx_GOTREF(__pyx_t_3);
  35842. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  35843. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  35844. __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_protocol);
  35845. __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_protocol, __pyx_t_3);
  35846. __Pyx_GIVEREF(__pyx_t_3);
  35847. __pyx_t_3 = 0;
  35848. /* "uvloop/loop.pyx":2120
  35849. * app_protocol = protocol = protocol_factory()
  35850. * ssl_waiter = None
  35851. * if ssl: # <<<<<<<<<<<<<<
  35852. * if server_hostname is None:
  35853. * raise ValueError('You must set server_hostname '
  35854. */
  35855. goto __pyx_L4;
  35856. }
  35857. /* "uvloop/loop.pyx":2133
  35858. * ssl_shutdown_timeout=ssl_shutdown_timeout)
  35859. * else:
  35860. * if server_hostname is not None: # <<<<<<<<<<<<<<
  35861. * raise ValueError('server_hostname is only meaningful with ssl')
  35862. * if ssl_handshake_timeout is not None:
  35863. */
  35864. /*else*/ {
  35865. __pyx_t_5 = (__pyx_cur_scope->__pyx_v_server_hostname != Py_None);
  35866. __pyx_t_4 = (__pyx_t_5 != 0);
  35867. if (unlikely(__pyx_t_4)) {
  35868. /* "uvloop/loop.pyx":2134
  35869. * else:
  35870. * if server_hostname is not None:
  35871. * raise ValueError('server_hostname is only meaningful with ssl') # <<<<<<<<<<<<<<
  35872. * if ssl_handshake_timeout is not None:
  35873. * raise ValueError(
  35874. */
  35875. __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__49, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2134, __pyx_L1_error)
  35876. __Pyx_GOTREF(__pyx_t_3);
  35877. __Pyx_Raise(__pyx_t_3, 0, 0, 0);
  35878. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  35879. __PYX_ERR(2, 2134, __pyx_L1_error)
  35880. /* "uvloop/loop.pyx":2133
  35881. * ssl_shutdown_timeout=ssl_shutdown_timeout)
  35882. * else:
  35883. * if server_hostname is not None: # <<<<<<<<<<<<<<
  35884. * raise ValueError('server_hostname is only meaningful with ssl')
  35885. * if ssl_handshake_timeout is not None:
  35886. */
  35887. }
  35888. /* "uvloop/loop.pyx":2135
  35889. * if server_hostname is not None:
  35890. * raise ValueError('server_hostname is only meaningful with ssl')
  35891. * if ssl_handshake_timeout is not None: # <<<<<<<<<<<<<<
  35892. * raise ValueError(
  35893. * 'ssl_handshake_timeout is only meaningful with ssl')
  35894. */
  35895. __pyx_t_4 = (__pyx_cur_scope->__pyx_v_ssl_handshake_timeout != Py_None);
  35896. __pyx_t_5 = (__pyx_t_4 != 0);
  35897. if (unlikely(__pyx_t_5)) {
  35898. /* "uvloop/loop.pyx":2136
  35899. * raise ValueError('server_hostname is only meaningful with ssl')
  35900. * if ssl_handshake_timeout is not None:
  35901. * raise ValueError( # <<<<<<<<<<<<<<
  35902. * 'ssl_handshake_timeout is only meaningful with ssl')
  35903. * if ssl_shutdown_timeout is not None:
  35904. */
  35905. __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__42, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2136, __pyx_L1_error)
  35906. __Pyx_GOTREF(__pyx_t_3);
  35907. __Pyx_Raise(__pyx_t_3, 0, 0, 0);
  35908. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  35909. __PYX_ERR(2, 2136, __pyx_L1_error)
  35910. /* "uvloop/loop.pyx":2135
  35911. * if server_hostname is not None:
  35912. * raise ValueError('server_hostname is only meaningful with ssl')
  35913. * if ssl_handshake_timeout is not None: # <<<<<<<<<<<<<<
  35914. * raise ValueError(
  35915. * 'ssl_handshake_timeout is only meaningful with ssl')
  35916. */
  35917. }
  35918. /* "uvloop/loop.pyx":2138
  35919. * raise ValueError(
  35920. * 'ssl_handshake_timeout is only meaningful with ssl')
  35921. * if ssl_shutdown_timeout is not None: # <<<<<<<<<<<<<<
  35922. * raise ValueError(
  35923. * 'ssl_shutdown_timeout is only meaningful with ssl')
  35924. */
  35925. __pyx_t_5 = (__pyx_cur_scope->__pyx_v_ssl_shutdown_timeout != Py_None);
  35926. __pyx_t_4 = (__pyx_t_5 != 0);
  35927. if (unlikely(__pyx_t_4)) {
  35928. /* "uvloop/loop.pyx":2139
  35929. * 'ssl_handshake_timeout is only meaningful with ssl')
  35930. * if ssl_shutdown_timeout is not None:
  35931. * raise ValueError( # <<<<<<<<<<<<<<
  35932. * 'ssl_shutdown_timeout is only meaningful with ssl')
  35933. *
  35934. */
  35935. __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2139, __pyx_L1_error)
  35936. __Pyx_GOTREF(__pyx_t_3);
  35937. __Pyx_Raise(__pyx_t_3, 0, 0, 0);
  35938. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  35939. __PYX_ERR(2, 2139, __pyx_L1_error)
  35940. /* "uvloop/loop.pyx":2138
  35941. * raise ValueError(
  35942. * 'ssl_handshake_timeout is only meaningful with ssl')
  35943. * if ssl_shutdown_timeout is not None: # <<<<<<<<<<<<<<
  35944. * raise ValueError(
  35945. * 'ssl_shutdown_timeout is only meaningful with ssl')
  35946. */
  35947. }
  35948. }
  35949. __pyx_L4:;
  35950. /* "uvloop/loop.pyx":2142
  35951. * 'ssl_shutdown_timeout is only meaningful with ssl')
  35952. *
  35953. * if path is not None: # <<<<<<<<<<<<<<
  35954. * if sock is not None:
  35955. * raise ValueError(
  35956. */
  35957. __pyx_t_4 = (__pyx_cur_scope->__pyx_v_path != Py_None);
  35958. __pyx_t_5 = (__pyx_t_4 != 0);
  35959. if (__pyx_t_5) {
  35960. /* "uvloop/loop.pyx":2143
  35961. *
  35962. * if path is not None:
  35963. * if sock is not None: # <<<<<<<<<<<<<<
  35964. * raise ValueError(
  35965. * 'path and sock can not be specified at the same time')
  35966. */
  35967. __pyx_t_5 = (__pyx_cur_scope->__pyx_v_sock != Py_None);
  35968. __pyx_t_4 = (__pyx_t_5 != 0);
  35969. if (unlikely(__pyx_t_4)) {
  35970. /* "uvloop/loop.pyx":2144
  35971. * if path is not None:
  35972. * if sock is not None:
  35973. * raise ValueError( # <<<<<<<<<<<<<<
  35974. * 'path and sock can not be specified at the same time')
  35975. *
  35976. */
  35977. __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__55, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2144, __pyx_L1_error)
  35978. __Pyx_GOTREF(__pyx_t_3);
  35979. __Pyx_Raise(__pyx_t_3, 0, 0, 0);
  35980. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  35981. __PYX_ERR(2, 2144, __pyx_L1_error)
  35982. /* "uvloop/loop.pyx":2143
  35983. *
  35984. * if path is not None:
  35985. * if sock is not None: # <<<<<<<<<<<<<<
  35986. * raise ValueError(
  35987. * 'path and sock can not be specified at the same time')
  35988. */
  35989. }
  35990. /* "uvloop/loop.pyx":2147
  35991. * 'path and sock can not be specified at the same time')
  35992. *
  35993. * try: # <<<<<<<<<<<<<<
  35994. * # Lookup __fspath__ manually, as os.fspath() isn't
  35995. * # available on Python 3.5.
  35996. */
  35997. {
  35998. __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
  35999. __Pyx_XGOTREF(__pyx_t_6);
  36000. __Pyx_XGOTREF(__pyx_t_7);
  36001. __Pyx_XGOTREF(__pyx_t_8);
  36002. /*try:*/ {
  36003. /* "uvloop/loop.pyx":2150
  36004. * # Lookup __fspath__ manually, as os.fspath() isn't
  36005. * # available on Python 3.5.
  36006. * fspath = type(path).__fspath__ # <<<<<<<<<<<<<<
  36007. * except AttributeError:
  36008. * pass
  36009. */
  36010. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(__pyx_cur_scope->__pyx_v_path)), __pyx_n_s_fspath); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2150, __pyx_L11_error)
  36011. __Pyx_GOTREF(__pyx_t_3);
  36012. __Pyx_GIVEREF(__pyx_t_3);
  36013. __pyx_cur_scope->__pyx_v_fspath = __pyx_t_3;
  36014. __pyx_t_3 = 0;
  36015. /* "uvloop/loop.pyx":2147
  36016. * 'path and sock can not be specified at the same time')
  36017. *
  36018. * try: # <<<<<<<<<<<<<<
  36019. * # Lookup __fspath__ manually, as os.fspath() isn't
  36020. * # available on Python 3.5.
  36021. */
  36022. }
  36023. /* "uvloop/loop.pyx":2154
  36024. * pass
  36025. * else:
  36026. * path = fspath(path) # <<<<<<<<<<<<<<
  36027. *
  36028. * if isinstance(path, str):
  36029. */
  36030. /*else:*/ {
  36031. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_fspath);
  36032. __pyx_t_2 = __pyx_cur_scope->__pyx_v_fspath; __pyx_t_1 = NULL;
  36033. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
  36034. __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
  36035. if (likely(__pyx_t_1)) {
  36036. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  36037. __Pyx_INCREF(__pyx_t_1);
  36038. __Pyx_INCREF(function);
  36039. __Pyx_DECREF_SET(__pyx_t_2, function);
  36040. }
  36041. }
  36042. __pyx_t_3 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_1, __pyx_cur_scope->__pyx_v_path) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_cur_scope->__pyx_v_path);
  36043. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  36044. if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2154, __pyx_L13_except_error)
  36045. __Pyx_GOTREF(__pyx_t_3);
  36046. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  36047. __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_path);
  36048. __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_path, __pyx_t_3);
  36049. __Pyx_GIVEREF(__pyx_t_3);
  36050. __pyx_t_3 = 0;
  36051. }
  36052. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  36053. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  36054. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  36055. goto __pyx_L16_try_end;
  36056. __pyx_L11_error:;
  36057. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  36058. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  36059. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  36060. /* "uvloop/loop.pyx":2151
  36061. * # available on Python 3.5.
  36062. * fspath = type(path).__fspath__
  36063. * except AttributeError: # <<<<<<<<<<<<<<
  36064. * pass
  36065. * else:
  36066. */
  36067. __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
  36068. if (__pyx_t_9) {
  36069. __Pyx_ErrRestore(0,0,0);
  36070. goto __pyx_L12_exception_handled;
  36071. }
  36072. goto __pyx_L13_except_error;
  36073. __pyx_L13_except_error:;
  36074. /* "uvloop/loop.pyx":2147
  36075. * 'path and sock can not be specified at the same time')
  36076. *
  36077. * try: # <<<<<<<<<<<<<<
  36078. * # Lookup __fspath__ manually, as os.fspath() isn't
  36079. * # available on Python 3.5.
  36080. */
  36081. __Pyx_XGIVEREF(__pyx_t_6);
  36082. __Pyx_XGIVEREF(__pyx_t_7);
  36083. __Pyx_XGIVEREF(__pyx_t_8);
  36084. __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
  36085. goto __pyx_L1_error;
  36086. __pyx_L12_exception_handled:;
  36087. __Pyx_XGIVEREF(__pyx_t_6);
  36088. __Pyx_XGIVEREF(__pyx_t_7);
  36089. __Pyx_XGIVEREF(__pyx_t_8);
  36090. __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
  36091. __pyx_L16_try_end:;
  36092. }
  36093. /* "uvloop/loop.pyx":2156
  36094. * path = fspath(path)
  36095. *
  36096. * if isinstance(path, str): # <<<<<<<<<<<<<<
  36097. * path = PyUnicode_EncodeFSDefault(path)
  36098. *
  36099. */
  36100. __pyx_t_4 = PyUnicode_Check(__pyx_cur_scope->__pyx_v_path);
  36101. __pyx_t_5 = (__pyx_t_4 != 0);
  36102. if (__pyx_t_5) {
  36103. /* "uvloop/loop.pyx":2157
  36104. *
  36105. * if isinstance(path, str):
  36106. * path = PyUnicode_EncodeFSDefault(path) # <<<<<<<<<<<<<<
  36107. *
  36108. * waiter = self._new_future()
  36109. */
  36110. __pyx_t_3 = PyUnicode_EncodeFSDefault(__pyx_cur_scope->__pyx_v_path); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2157, __pyx_L1_error)
  36111. __Pyx_GOTREF(__pyx_t_3);
  36112. __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_path);
  36113. __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_path, __pyx_t_3);
  36114. __Pyx_GIVEREF(__pyx_t_3);
  36115. __pyx_t_3 = 0;
  36116. /* "uvloop/loop.pyx":2156
  36117. * path = fspath(path)
  36118. *
  36119. * if isinstance(path, str): # <<<<<<<<<<<<<<
  36120. * path = PyUnicode_EncodeFSDefault(path)
  36121. *
  36122. */
  36123. }
  36124. /* "uvloop/loop.pyx":2159
  36125. * path = PyUnicode_EncodeFSDefault(path)
  36126. *
  36127. * waiter = self._new_future() # <<<<<<<<<<<<<<
  36128. * tr = UnixTransport.new(self, protocol, None, waiter)
  36129. * tr.connect(path)
  36130. */
  36131. __pyx_t_3 = __pyx_f_6uvloop_4loop_4Loop__new_future(__pyx_cur_scope->__pyx_v_self); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2159, __pyx_L1_error)
  36132. __Pyx_GOTREF(__pyx_t_3);
  36133. __Pyx_GIVEREF(__pyx_t_3);
  36134. __pyx_cur_scope->__pyx_v_waiter = __pyx_t_3;
  36135. __pyx_t_3 = 0;
  36136. /* "uvloop/loop.pyx":2160
  36137. *
  36138. * waiter = self._new_future()
  36139. * tr = UnixTransport.new(self, protocol, None, waiter) # <<<<<<<<<<<<<<
  36140. * tr.connect(path)
  36141. * try:
  36142. */
  36143. __pyx_t_3 = ((PyObject *)__pyx_f_6uvloop_4loop_13UnixTransport_new(__pyx_cur_scope->__pyx_v_self, __pyx_cur_scope->__pyx_v_protocol, ((struct __pyx_obj_6uvloop_4loop_Server *)Py_None), __pyx_cur_scope->__pyx_v_waiter)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2160, __pyx_L1_error)
  36144. __Pyx_GOTREF(__pyx_t_3);
  36145. __Pyx_GIVEREF(__pyx_t_3);
  36146. __pyx_cur_scope->__pyx_v_tr = ((struct __pyx_obj_6uvloop_4loop_UnixTransport *)__pyx_t_3);
  36147. __pyx_t_3 = 0;
  36148. /* "uvloop/loop.pyx":2161
  36149. * waiter = self._new_future()
  36150. * tr = UnixTransport.new(self, protocol, None, waiter)
  36151. * tr.connect(path) # <<<<<<<<<<<<<<
  36152. * try:
  36153. * await waiter
  36154. */
  36155. __pyx_t_10 = __Pyx_PyObject_AsWritableString(__pyx_cur_scope->__pyx_v_path); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(2, 2161, __pyx_L1_error)
  36156. __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_UnixTransport *)__pyx_cur_scope->__pyx_v_tr->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->connect(__pyx_cur_scope->__pyx_v_tr, __pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2161, __pyx_L1_error)
  36157. __Pyx_GOTREF(__pyx_t_3);
  36158. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  36159. /* "uvloop/loop.pyx":2162
  36160. * tr = UnixTransport.new(self, protocol, None, waiter)
  36161. * tr.connect(path)
  36162. * try: # <<<<<<<<<<<<<<
  36163. * await waiter
  36164. * except Exception:
  36165. */
  36166. {
  36167. __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_7, &__pyx_t_6);
  36168. __Pyx_XGOTREF(__pyx_t_8);
  36169. __Pyx_XGOTREF(__pyx_t_7);
  36170. __Pyx_XGOTREF(__pyx_t_6);
  36171. /*try:*/ {
  36172. /* "uvloop/loop.pyx":2163
  36173. * tr.connect(path)
  36174. * try:
  36175. * await waiter # <<<<<<<<<<<<<<
  36176. * except Exception:
  36177. * tr._close()
  36178. */
  36179. __pyx_r = __Pyx_Coroutine_Yield_From(__pyx_generator, __pyx_cur_scope->__pyx_v_waiter);
  36180. __Pyx_XGOTREF(__pyx_r);
  36181. if (likely(__pyx_r)) {
  36182. __Pyx_XGIVEREF(__pyx_t_6);
  36183. __pyx_cur_scope->__pyx_t_0 = __pyx_t_6;
  36184. __Pyx_XGIVEREF(__pyx_t_7);
  36185. __pyx_cur_scope->__pyx_t_1 = __pyx_t_7;
  36186. __Pyx_XGIVEREF(__pyx_t_8);
  36187. __pyx_cur_scope->__pyx_t_2 = __pyx_t_8;
  36188. __Pyx_XGIVEREF(__pyx_r);
  36189. __Pyx_RefNannyFinishContext();
  36190. __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  36191. /* return from generator, awaiting value */
  36192. __pyx_generator->resume_label = 1;
  36193. return __pyx_r;
  36194. __pyx_L24_resume_from_await:;
  36195. __pyx_t_6 = __pyx_cur_scope->__pyx_t_0;
  36196. __pyx_cur_scope->__pyx_t_0 = 0;
  36197. __Pyx_XGOTREF(__pyx_t_6);
  36198. __pyx_t_7 = __pyx_cur_scope->__pyx_t_1;
  36199. __pyx_cur_scope->__pyx_t_1 = 0;
  36200. __Pyx_XGOTREF(__pyx_t_7);
  36201. __pyx_t_8 = __pyx_cur_scope->__pyx_t_2;
  36202. __pyx_cur_scope->__pyx_t_2 = 0;
  36203. __Pyx_XGOTREF(__pyx_t_8);
  36204. if (unlikely(!__pyx_sent_value)) __PYX_ERR(2, 2163, __pyx_L18_error)
  36205. } else {
  36206. PyObject* exc_type = __Pyx_PyErr_Occurred();
  36207. if (exc_type) {
  36208. if (likely(exc_type == PyExc_StopIteration || (exc_type != PyExc_GeneratorExit && __Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)))) PyErr_Clear();
  36209. else __PYX_ERR(2, 2163, __pyx_L18_error)
  36210. }
  36211. }
  36212. /* "uvloop/loop.pyx":2162
  36213. * tr = UnixTransport.new(self, protocol, None, waiter)
  36214. * tr.connect(path)
  36215. * try: # <<<<<<<<<<<<<<
  36216. * await waiter
  36217. * except Exception:
  36218. */
  36219. }
  36220. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  36221. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  36222. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  36223. goto __pyx_L23_try_end;
  36224. __pyx_L18_error:;
  36225. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  36226. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  36227. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  36228. /* "uvloop/loop.pyx":2164
  36229. * try:
  36230. * await waiter
  36231. * except Exception: # <<<<<<<<<<<<<<
  36232. * tr._close()
  36233. * raise
  36234. */
  36235. __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
  36236. if (__pyx_t_9) {
  36237. __Pyx_AddTraceback("uvloop.loop.Loop.create_unix_connection", __pyx_clineno, __pyx_lineno, __pyx_filename);
  36238. if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_2, &__pyx_t_1) < 0) __PYX_ERR(2, 2164, __pyx_L20_except_error)
  36239. __Pyx_GOTREF(__pyx_t_3);
  36240. __Pyx_GOTREF(__pyx_t_2);
  36241. __Pyx_GOTREF(__pyx_t_1);
  36242. /* "uvloop/loop.pyx":2165
  36243. * await waiter
  36244. * except Exception:
  36245. * tr._close() # <<<<<<<<<<<<<<
  36246. * raise
  36247. *
  36248. */
  36249. __pyx_t_11 = ((struct __pyx_vtabstruct_6uvloop_4loop_UnixTransport *)__pyx_cur_scope->__pyx_v_tr->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base.__pyx_base._close(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_cur_scope->__pyx_v_tr)); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 2165, __pyx_L20_except_error)
  36250. __Pyx_GOTREF(__pyx_t_11);
  36251. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  36252. /* "uvloop/loop.pyx":2166
  36253. * except Exception:
  36254. * tr._close()
  36255. * raise # <<<<<<<<<<<<<<
  36256. *
  36257. * else:
  36258. */
  36259. __Pyx_GIVEREF(__pyx_t_3);
  36260. __Pyx_GIVEREF(__pyx_t_2);
  36261. __Pyx_XGIVEREF(__pyx_t_1);
  36262. __Pyx_ErrRestoreWithState(__pyx_t_3, __pyx_t_2, __pyx_t_1);
  36263. __pyx_t_3 = 0; __pyx_t_2 = 0; __pyx_t_1 = 0;
  36264. __PYX_ERR(2, 2166, __pyx_L20_except_error)
  36265. }
  36266. goto __pyx_L20_except_error;
  36267. __pyx_L20_except_error:;
  36268. /* "uvloop/loop.pyx":2162
  36269. * tr = UnixTransport.new(self, protocol, None, waiter)
  36270. * tr.connect(path)
  36271. * try: # <<<<<<<<<<<<<<
  36272. * await waiter
  36273. * except Exception:
  36274. */
  36275. __Pyx_XGIVEREF(__pyx_t_8);
  36276. __Pyx_XGIVEREF(__pyx_t_7);
  36277. __Pyx_XGIVEREF(__pyx_t_6);
  36278. __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_7, __pyx_t_6);
  36279. goto __pyx_L1_error;
  36280. __pyx_L23_try_end:;
  36281. }
  36282. /* "uvloop/loop.pyx":2142
  36283. * 'ssl_shutdown_timeout is only meaningful with ssl')
  36284. *
  36285. * if path is not None: # <<<<<<<<<<<<<<
  36286. * if sock is not None:
  36287. * raise ValueError(
  36288. */
  36289. goto __pyx_L9;
  36290. }
  36291. /* "uvloop/loop.pyx":2169
  36292. *
  36293. * else:
  36294. * if sock is None: # <<<<<<<<<<<<<<
  36295. * raise ValueError('no path and sock were specified')
  36296. *
  36297. */
  36298. /*else*/ {
  36299. __pyx_t_5 = (__pyx_cur_scope->__pyx_v_sock == Py_None);
  36300. __pyx_t_4 = (__pyx_t_5 != 0);
  36301. if (unlikely(__pyx_t_4)) {
  36302. /* "uvloop/loop.pyx":2170
  36303. * else:
  36304. * if sock is None:
  36305. * raise ValueError('no path and sock were specified') # <<<<<<<<<<<<<<
  36306. *
  36307. * if sock.family != uv.AF_UNIX or not _is_sock_stream(sock.type):
  36308. */
  36309. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__57, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2170, __pyx_L1_error)
  36310. __Pyx_GOTREF(__pyx_t_1);
  36311. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  36312. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  36313. __PYX_ERR(2, 2170, __pyx_L1_error)
  36314. /* "uvloop/loop.pyx":2169
  36315. *
  36316. * else:
  36317. * if sock is None: # <<<<<<<<<<<<<<
  36318. * raise ValueError('no path and sock were specified')
  36319. *
  36320. */
  36321. }
  36322. /* "uvloop/loop.pyx":2172
  36323. * raise ValueError('no path and sock were specified')
  36324. *
  36325. * if sock.family != uv.AF_UNIX or not _is_sock_stream(sock.type): # <<<<<<<<<<<<<<
  36326. * raise ValueError(
  36327. * 'A UNIX Domain Stream Socket was expected, got {!r}'
  36328. */
  36329. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_sock, __pyx_n_s_family); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2172, __pyx_L1_error)
  36330. __Pyx_GOTREF(__pyx_t_1);
  36331. __pyx_t_2 = __Pyx_PyInt_From_int(AF_UNIX); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 2172, __pyx_L1_error)
  36332. __Pyx_GOTREF(__pyx_t_2);
  36333. __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2172, __pyx_L1_error)
  36334. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  36335. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  36336. __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(2, 2172, __pyx_L1_error)
  36337. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  36338. if (!__pyx_t_5) {
  36339. } else {
  36340. __pyx_t_4 = __pyx_t_5;
  36341. goto __pyx_L29_bool_binop_done;
  36342. }
  36343. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_sock, __pyx_n_s_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2172, __pyx_L1_error)
  36344. __Pyx_GOTREF(__pyx_t_3);
  36345. __pyx_t_2 = __pyx_f_6uvloop_4loop__is_sock_stream(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 2172, __pyx_L1_error)
  36346. __Pyx_GOTREF(__pyx_t_2);
  36347. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  36348. __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(2, 2172, __pyx_L1_error)
  36349. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  36350. __pyx_t_12 = ((!__pyx_t_5) != 0);
  36351. __pyx_t_4 = __pyx_t_12;
  36352. __pyx_L29_bool_binop_done:;
  36353. if (unlikely(__pyx_t_4)) {
  36354. /* "uvloop/loop.pyx":2175
  36355. * raise ValueError(
  36356. * 'A UNIX Domain Stream Socket was expected, got {!r}'
  36357. * .format(sock)) # <<<<<<<<<<<<<<
  36358. *
  36359. * # libuv will set the socket to non-blocking mode, but
  36360. */
  36361. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_A_UNIX_Domain_Stream_Socket_was, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2175, __pyx_L1_error)
  36362. __Pyx_GOTREF(__pyx_t_3);
  36363. __pyx_t_1 = NULL;
  36364. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
  36365. __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
  36366. if (likely(__pyx_t_1)) {
  36367. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  36368. __Pyx_INCREF(__pyx_t_1);
  36369. __Pyx_INCREF(function);
  36370. __Pyx_DECREF_SET(__pyx_t_3, function);
  36371. }
  36372. }
  36373. __pyx_t_2 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_1, __pyx_cur_scope->__pyx_v_sock) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_cur_scope->__pyx_v_sock);
  36374. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  36375. if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 2175, __pyx_L1_error)
  36376. __Pyx_GOTREF(__pyx_t_2);
  36377. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  36378. /* "uvloop/loop.pyx":2173
  36379. *
  36380. * if sock.family != uv.AF_UNIX or not _is_sock_stream(sock.type):
  36381. * raise ValueError( # <<<<<<<<<<<<<<
  36382. * 'A UNIX Domain Stream Socket was expected, got {!r}'
  36383. * .format(sock))
  36384. */
  36385. __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2173, __pyx_L1_error)
  36386. __Pyx_GOTREF(__pyx_t_3);
  36387. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  36388. __Pyx_Raise(__pyx_t_3, 0, 0, 0);
  36389. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  36390. __PYX_ERR(2, 2173, __pyx_L1_error)
  36391. /* "uvloop/loop.pyx":2172
  36392. * raise ValueError('no path and sock were specified')
  36393. *
  36394. * if sock.family != uv.AF_UNIX or not _is_sock_stream(sock.type): # <<<<<<<<<<<<<<
  36395. * raise ValueError(
  36396. * 'A UNIX Domain Stream Socket was expected, got {!r}'
  36397. */
  36398. }
  36399. /* "uvloop/loop.pyx":2179
  36400. * # libuv will set the socket to non-blocking mode, but
  36401. * # we want Python socket object to notice that.
  36402. * sock.setblocking(False) # <<<<<<<<<<<<<<
  36403. *
  36404. * waiter = self._new_future()
  36405. */
  36406. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_sock, __pyx_n_s_setblocking); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 2179, __pyx_L1_error)
  36407. __Pyx_GOTREF(__pyx_t_2);
  36408. __pyx_t_1 = NULL;
  36409. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
  36410. __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
  36411. if (likely(__pyx_t_1)) {
  36412. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  36413. __Pyx_INCREF(__pyx_t_1);
  36414. __Pyx_INCREF(function);
  36415. __Pyx_DECREF_SET(__pyx_t_2, function);
  36416. }
  36417. }
  36418. __pyx_t_3 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_1, Py_False) : __Pyx_PyObject_CallOneArg(__pyx_t_2, Py_False);
  36419. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  36420. if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2179, __pyx_L1_error)
  36421. __Pyx_GOTREF(__pyx_t_3);
  36422. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  36423. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  36424. /* "uvloop/loop.pyx":2181
  36425. * sock.setblocking(False)
  36426. *
  36427. * waiter = self._new_future() # <<<<<<<<<<<<<<
  36428. * tr = UnixTransport.new(self, protocol, None, waiter)
  36429. * try:
  36430. */
  36431. __pyx_t_3 = __pyx_f_6uvloop_4loop_4Loop__new_future(__pyx_cur_scope->__pyx_v_self); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2181, __pyx_L1_error)
  36432. __Pyx_GOTREF(__pyx_t_3);
  36433. __Pyx_GIVEREF(__pyx_t_3);
  36434. __pyx_cur_scope->__pyx_v_waiter = __pyx_t_3;
  36435. __pyx_t_3 = 0;
  36436. /* "uvloop/loop.pyx":2182
  36437. *
  36438. * waiter = self._new_future()
  36439. * tr = UnixTransport.new(self, protocol, None, waiter) # <<<<<<<<<<<<<<
  36440. * try:
  36441. * tr._open(sock.fileno())
  36442. */
  36443. __pyx_t_3 = ((PyObject *)__pyx_f_6uvloop_4loop_13UnixTransport_new(__pyx_cur_scope->__pyx_v_self, __pyx_cur_scope->__pyx_v_protocol, ((struct __pyx_obj_6uvloop_4loop_Server *)Py_None), __pyx_cur_scope->__pyx_v_waiter)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2182, __pyx_L1_error)
  36444. __Pyx_GOTREF(__pyx_t_3);
  36445. __Pyx_GIVEREF(__pyx_t_3);
  36446. __pyx_cur_scope->__pyx_v_tr = ((struct __pyx_obj_6uvloop_4loop_UnixTransport *)__pyx_t_3);
  36447. __pyx_t_3 = 0;
  36448. /* "uvloop/loop.pyx":2183
  36449. * waiter = self._new_future()
  36450. * tr = UnixTransport.new(self, protocol, None, waiter)
  36451. * try: # <<<<<<<<<<<<<<
  36452. * tr._open(sock.fileno())
  36453. * tr._init_protocol()
  36454. */
  36455. {
  36456. __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
  36457. __Pyx_XGOTREF(__pyx_t_6);
  36458. __Pyx_XGOTREF(__pyx_t_7);
  36459. __Pyx_XGOTREF(__pyx_t_8);
  36460. /*try:*/ {
  36461. /* "uvloop/loop.pyx":2184
  36462. * tr = UnixTransport.new(self, protocol, None, waiter)
  36463. * try:
  36464. * tr._open(sock.fileno()) # <<<<<<<<<<<<<<
  36465. * tr._init_protocol()
  36466. * await waiter
  36467. */
  36468. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_sock, __pyx_n_s_fileno); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 2184, __pyx_L31_error)
  36469. __Pyx_GOTREF(__pyx_t_2);
  36470. __pyx_t_1 = NULL;
  36471. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
  36472. __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
  36473. if (likely(__pyx_t_1)) {
  36474. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  36475. __Pyx_INCREF(__pyx_t_1);
  36476. __Pyx_INCREF(function);
  36477. __Pyx_DECREF_SET(__pyx_t_2, function);
  36478. }
  36479. }
  36480. __pyx_t_3 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  36481. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  36482. if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2184, __pyx_L31_error)
  36483. __Pyx_GOTREF(__pyx_t_3);
  36484. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  36485. __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 2184, __pyx_L31_error)
  36486. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  36487. __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_UnixTransport *)__pyx_cur_scope->__pyx_v_tr->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._open(((struct __pyx_obj_6uvloop_4loop_UVSocketHandle *)__pyx_cur_scope->__pyx_v_tr), __pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2184, __pyx_L31_error)
  36488. __Pyx_GOTREF(__pyx_t_3);
  36489. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  36490. /* "uvloop/loop.pyx":2185
  36491. * try:
  36492. * tr._open(sock.fileno())
  36493. * tr._init_protocol() # <<<<<<<<<<<<<<
  36494. * await waiter
  36495. * except Exception:
  36496. */
  36497. __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_UnixTransport *)__pyx_cur_scope->__pyx_v_tr->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._init_protocol(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_cur_scope->__pyx_v_tr)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2185, __pyx_L31_error)
  36498. __Pyx_GOTREF(__pyx_t_3);
  36499. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  36500. /* "uvloop/loop.pyx":2186
  36501. * tr._open(sock.fileno())
  36502. * tr._init_protocol()
  36503. * await waiter # <<<<<<<<<<<<<<
  36504. * except Exception:
  36505. * tr._close()
  36506. */
  36507. __pyx_r = __Pyx_Coroutine_Yield_From(__pyx_generator, __pyx_cur_scope->__pyx_v_waiter);
  36508. __Pyx_XGOTREF(__pyx_r);
  36509. if (likely(__pyx_r)) {
  36510. __Pyx_XGIVEREF(__pyx_t_6);
  36511. __pyx_cur_scope->__pyx_t_0 = __pyx_t_6;
  36512. __Pyx_XGIVEREF(__pyx_t_7);
  36513. __pyx_cur_scope->__pyx_t_1 = __pyx_t_7;
  36514. __Pyx_XGIVEREF(__pyx_t_8);
  36515. __pyx_cur_scope->__pyx_t_2 = __pyx_t_8;
  36516. __Pyx_XGIVEREF(__pyx_r);
  36517. __Pyx_RefNannyFinishContext();
  36518. __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  36519. /* return from generator, awaiting value */
  36520. __pyx_generator->resume_label = 2;
  36521. return __pyx_r;
  36522. __pyx_L37_resume_from_await:;
  36523. __pyx_t_6 = __pyx_cur_scope->__pyx_t_0;
  36524. __pyx_cur_scope->__pyx_t_0 = 0;
  36525. __Pyx_XGOTREF(__pyx_t_6);
  36526. __pyx_t_7 = __pyx_cur_scope->__pyx_t_1;
  36527. __pyx_cur_scope->__pyx_t_1 = 0;
  36528. __Pyx_XGOTREF(__pyx_t_7);
  36529. __pyx_t_8 = __pyx_cur_scope->__pyx_t_2;
  36530. __pyx_cur_scope->__pyx_t_2 = 0;
  36531. __Pyx_XGOTREF(__pyx_t_8);
  36532. if (unlikely(!__pyx_sent_value)) __PYX_ERR(2, 2186, __pyx_L31_error)
  36533. } else {
  36534. PyObject* exc_type = __Pyx_PyErr_Occurred();
  36535. if (exc_type) {
  36536. if (likely(exc_type == PyExc_StopIteration || (exc_type != PyExc_GeneratorExit && __Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)))) PyErr_Clear();
  36537. else __PYX_ERR(2, 2186, __pyx_L31_error)
  36538. }
  36539. }
  36540. /* "uvloop/loop.pyx":2183
  36541. * waiter = self._new_future()
  36542. * tr = UnixTransport.new(self, protocol, None, waiter)
  36543. * try: # <<<<<<<<<<<<<<
  36544. * tr._open(sock.fileno())
  36545. * tr._init_protocol()
  36546. */
  36547. }
  36548. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  36549. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  36550. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  36551. goto __pyx_L36_try_end;
  36552. __pyx_L31_error:;
  36553. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  36554. __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
  36555. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  36556. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  36557. /* "uvloop/loop.pyx":2187
  36558. * tr._init_protocol()
  36559. * await waiter
  36560. * except Exception: # <<<<<<<<<<<<<<
  36561. * tr._close()
  36562. * raise
  36563. */
  36564. __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
  36565. if (__pyx_t_9) {
  36566. __Pyx_AddTraceback("uvloop.loop.Loop.create_unix_connection", __pyx_clineno, __pyx_lineno, __pyx_filename);
  36567. if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_2, &__pyx_t_1) < 0) __PYX_ERR(2, 2187, __pyx_L33_except_error)
  36568. __Pyx_GOTREF(__pyx_t_3);
  36569. __Pyx_GOTREF(__pyx_t_2);
  36570. __Pyx_GOTREF(__pyx_t_1);
  36571. /* "uvloop/loop.pyx":2188
  36572. * await waiter
  36573. * except Exception:
  36574. * tr._close() # <<<<<<<<<<<<<<
  36575. * raise
  36576. *
  36577. */
  36578. __pyx_t_11 = ((struct __pyx_vtabstruct_6uvloop_4loop_UnixTransport *)__pyx_cur_scope->__pyx_v_tr->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base.__pyx_base._close(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_cur_scope->__pyx_v_tr)); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 2188, __pyx_L33_except_error)
  36579. __Pyx_GOTREF(__pyx_t_11);
  36580. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  36581. /* "uvloop/loop.pyx":2189
  36582. * except Exception:
  36583. * tr._close()
  36584. * raise # <<<<<<<<<<<<<<
  36585. *
  36586. * tr._attach_fileobj(sock)
  36587. */
  36588. __Pyx_GIVEREF(__pyx_t_3);
  36589. __Pyx_GIVEREF(__pyx_t_2);
  36590. __Pyx_XGIVEREF(__pyx_t_1);
  36591. __Pyx_ErrRestoreWithState(__pyx_t_3, __pyx_t_2, __pyx_t_1);
  36592. __pyx_t_3 = 0; __pyx_t_2 = 0; __pyx_t_1 = 0;
  36593. __PYX_ERR(2, 2189, __pyx_L33_except_error)
  36594. }
  36595. goto __pyx_L33_except_error;
  36596. __pyx_L33_except_error:;
  36597. /* "uvloop/loop.pyx":2183
  36598. * waiter = self._new_future()
  36599. * tr = UnixTransport.new(self, protocol, None, waiter)
  36600. * try: # <<<<<<<<<<<<<<
  36601. * tr._open(sock.fileno())
  36602. * tr._init_protocol()
  36603. */
  36604. __Pyx_XGIVEREF(__pyx_t_6);
  36605. __Pyx_XGIVEREF(__pyx_t_7);
  36606. __Pyx_XGIVEREF(__pyx_t_8);
  36607. __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
  36608. goto __pyx_L1_error;
  36609. __pyx_L36_try_end:;
  36610. }
  36611. /* "uvloop/loop.pyx":2191
  36612. * raise
  36613. *
  36614. * tr._attach_fileobj(sock) # <<<<<<<<<<<<<<
  36615. *
  36616. * if ssl:
  36617. */
  36618. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UnixTransport *)__pyx_cur_scope->__pyx_v_tr->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._attach_fileobj(((struct __pyx_obj_6uvloop_4loop_UVSocketHandle *)__pyx_cur_scope->__pyx_v_tr), __pyx_cur_scope->__pyx_v_sock); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2191, __pyx_L1_error)
  36619. __Pyx_GOTREF(__pyx_t_1);
  36620. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  36621. }
  36622. __pyx_L9:;
  36623. /* "uvloop/loop.pyx":2193
  36624. * tr._attach_fileobj(sock)
  36625. *
  36626. * if ssl: # <<<<<<<<<<<<<<
  36627. * app_transport = protocol._get_app_transport()
  36628. * try:
  36629. */
  36630. __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_ssl); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(2, 2193, __pyx_L1_error)
  36631. if (__pyx_t_4) {
  36632. /* "uvloop/loop.pyx":2194
  36633. *
  36634. * if ssl:
  36635. * app_transport = protocol._get_app_transport() # <<<<<<<<<<<<<<
  36636. * try:
  36637. * await ssl_waiter
  36638. */
  36639. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_protocol, __pyx_n_s_get_app_transport); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 2194, __pyx_L1_error)
  36640. __Pyx_GOTREF(__pyx_t_2);
  36641. __pyx_t_3 = NULL;
  36642. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
  36643. __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
  36644. if (likely(__pyx_t_3)) {
  36645. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  36646. __Pyx_INCREF(__pyx_t_3);
  36647. __Pyx_INCREF(function);
  36648. __Pyx_DECREF_SET(__pyx_t_2, function);
  36649. }
  36650. }
  36651. __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  36652. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  36653. if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2194, __pyx_L1_error)
  36654. __Pyx_GOTREF(__pyx_t_1);
  36655. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  36656. __Pyx_GIVEREF(__pyx_t_1);
  36657. __pyx_cur_scope->__pyx_v_app_transport = __pyx_t_1;
  36658. __pyx_t_1 = 0;
  36659. /* "uvloop/loop.pyx":2195
  36660. * if ssl:
  36661. * app_transport = protocol._get_app_transport()
  36662. * try: # <<<<<<<<<<<<<<
  36663. * await ssl_waiter
  36664. * except Exception:
  36665. */
  36666. {
  36667. __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_7, &__pyx_t_6);
  36668. __Pyx_XGOTREF(__pyx_t_8);
  36669. __Pyx_XGOTREF(__pyx_t_7);
  36670. __Pyx_XGOTREF(__pyx_t_6);
  36671. /*try:*/ {
  36672. /* "uvloop/loop.pyx":2196
  36673. * app_transport = protocol._get_app_transport()
  36674. * try:
  36675. * await ssl_waiter # <<<<<<<<<<<<<<
  36676. * except Exception:
  36677. * app_transport.close()
  36678. */
  36679. __pyx_r = __Pyx_Coroutine_Yield_From(__pyx_generator, __pyx_cur_scope->__pyx_v_ssl_waiter);
  36680. __Pyx_XGOTREF(__pyx_r);
  36681. if (likely(__pyx_r)) {
  36682. __Pyx_XGIVEREF(__pyx_t_6);
  36683. __pyx_cur_scope->__pyx_t_0 = __pyx_t_6;
  36684. __Pyx_XGIVEREF(__pyx_t_7);
  36685. __pyx_cur_scope->__pyx_t_1 = __pyx_t_7;
  36686. __Pyx_XGIVEREF(__pyx_t_8);
  36687. __pyx_cur_scope->__pyx_t_2 = __pyx_t_8;
  36688. __Pyx_XGIVEREF(__pyx_r);
  36689. __Pyx_RefNannyFinishContext();
  36690. __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  36691. /* return from generator, awaiting value */
  36692. __pyx_generator->resume_label = 3;
  36693. return __pyx_r;
  36694. __pyx_L47_resume_from_await:;
  36695. __pyx_t_6 = __pyx_cur_scope->__pyx_t_0;
  36696. __pyx_cur_scope->__pyx_t_0 = 0;
  36697. __Pyx_XGOTREF(__pyx_t_6);
  36698. __pyx_t_7 = __pyx_cur_scope->__pyx_t_1;
  36699. __pyx_cur_scope->__pyx_t_1 = 0;
  36700. __Pyx_XGOTREF(__pyx_t_7);
  36701. __pyx_t_8 = __pyx_cur_scope->__pyx_t_2;
  36702. __pyx_cur_scope->__pyx_t_2 = 0;
  36703. __Pyx_XGOTREF(__pyx_t_8);
  36704. if (unlikely(!__pyx_sent_value)) __PYX_ERR(2, 2196, __pyx_L41_error)
  36705. } else {
  36706. PyObject* exc_type = __Pyx_PyErr_Occurred();
  36707. if (exc_type) {
  36708. if (likely(exc_type == PyExc_StopIteration || (exc_type != PyExc_GeneratorExit && __Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)))) PyErr_Clear();
  36709. else __PYX_ERR(2, 2196, __pyx_L41_error)
  36710. }
  36711. }
  36712. /* "uvloop/loop.pyx":2195
  36713. * if ssl:
  36714. * app_transport = protocol._get_app_transport()
  36715. * try: # <<<<<<<<<<<<<<
  36716. * await ssl_waiter
  36717. * except Exception:
  36718. */
  36719. }
  36720. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  36721. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  36722. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  36723. goto __pyx_L46_try_end;
  36724. __pyx_L41_error:;
  36725. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  36726. __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
  36727. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  36728. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  36729. /* "uvloop/loop.pyx":2197
  36730. * try:
  36731. * await ssl_waiter
  36732. * except Exception: # <<<<<<<<<<<<<<
  36733. * app_transport.close()
  36734. * raise
  36735. */
  36736. __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
  36737. if (__pyx_t_9) {
  36738. __Pyx_AddTraceback("uvloop.loop.Loop.create_unix_connection", __pyx_clineno, __pyx_lineno, __pyx_filename);
  36739. if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3) < 0) __PYX_ERR(2, 2197, __pyx_L43_except_error)
  36740. __Pyx_GOTREF(__pyx_t_1);
  36741. __Pyx_GOTREF(__pyx_t_2);
  36742. __Pyx_GOTREF(__pyx_t_3);
  36743. /* "uvloop/loop.pyx":2198
  36744. * await ssl_waiter
  36745. * except Exception:
  36746. * app_transport.close() # <<<<<<<<<<<<<<
  36747. * raise
  36748. * return app_transport, app_protocol
  36749. */
  36750. __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_app_transport, __pyx_n_s_close); if (unlikely(!__pyx_t_13)) __PYX_ERR(2, 2198, __pyx_L43_except_error)
  36751. __Pyx_GOTREF(__pyx_t_13);
  36752. __pyx_t_14 = NULL;
  36753. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_13))) {
  36754. __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_13);
  36755. if (likely(__pyx_t_14)) {
  36756. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
  36757. __Pyx_INCREF(__pyx_t_14);
  36758. __Pyx_INCREF(function);
  36759. __Pyx_DECREF_SET(__pyx_t_13, function);
  36760. }
  36761. }
  36762. __pyx_t_11 = (__pyx_t_14) ? __Pyx_PyObject_CallOneArg(__pyx_t_13, __pyx_t_14) : __Pyx_PyObject_CallNoArg(__pyx_t_13);
  36763. __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
  36764. if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 2198, __pyx_L43_except_error)
  36765. __Pyx_GOTREF(__pyx_t_11);
  36766. __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  36767. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  36768. /* "uvloop/loop.pyx":2199
  36769. * except Exception:
  36770. * app_transport.close()
  36771. * raise # <<<<<<<<<<<<<<
  36772. * return app_transport, app_protocol
  36773. * else:
  36774. */
  36775. __Pyx_GIVEREF(__pyx_t_1);
  36776. __Pyx_GIVEREF(__pyx_t_2);
  36777. __Pyx_XGIVEREF(__pyx_t_3);
  36778. __Pyx_ErrRestoreWithState(__pyx_t_1, __pyx_t_2, __pyx_t_3);
  36779. __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_3 = 0;
  36780. __PYX_ERR(2, 2199, __pyx_L43_except_error)
  36781. }
  36782. goto __pyx_L43_except_error;
  36783. __pyx_L43_except_error:;
  36784. /* "uvloop/loop.pyx":2195
  36785. * if ssl:
  36786. * app_transport = protocol._get_app_transport()
  36787. * try: # <<<<<<<<<<<<<<
  36788. * await ssl_waiter
  36789. * except Exception:
  36790. */
  36791. __Pyx_XGIVEREF(__pyx_t_8);
  36792. __Pyx_XGIVEREF(__pyx_t_7);
  36793. __Pyx_XGIVEREF(__pyx_t_6);
  36794. __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_7, __pyx_t_6);
  36795. goto __pyx_L1_error;
  36796. __pyx_L46_try_end:;
  36797. }
  36798. /* "uvloop/loop.pyx":2200
  36799. * app_transport.close()
  36800. * raise
  36801. * return app_transport, app_protocol # <<<<<<<<<<<<<<
  36802. * else:
  36803. * return tr, protocol
  36804. */
  36805. __Pyx_XDECREF(__pyx_r);
  36806. __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2200, __pyx_L1_error)
  36807. __Pyx_GOTREF(__pyx_t_3);
  36808. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_app_transport);
  36809. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_app_transport);
  36810. PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_cur_scope->__pyx_v_app_transport);
  36811. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_app_protocol);
  36812. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_app_protocol);
  36813. PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_cur_scope->__pyx_v_app_protocol);
  36814. __pyx_r = NULL; __Pyx_ReturnWithStopIteration(__pyx_t_3);
  36815. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  36816. __pyx_t_3 = 0;
  36817. goto __pyx_L0;
  36818. /* "uvloop/loop.pyx":2193
  36819. * tr._attach_fileobj(sock)
  36820. *
  36821. * if ssl: # <<<<<<<<<<<<<<
  36822. * app_transport = protocol._get_app_transport()
  36823. * try:
  36824. */
  36825. }
  36826. /* "uvloop/loop.pyx":2202
  36827. * return app_transport, app_protocol
  36828. * else:
  36829. * return tr, protocol # <<<<<<<<<<<<<<
  36830. *
  36831. * def default_exception_handler(self, context):
  36832. */
  36833. /*else*/ {
  36834. __Pyx_XDECREF(__pyx_r);
  36835. __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2202, __pyx_L1_error)
  36836. __Pyx_GOTREF(__pyx_t_3);
  36837. __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_tr));
  36838. __Pyx_GIVEREF(((PyObject *)__pyx_cur_scope->__pyx_v_tr));
  36839. PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_cur_scope->__pyx_v_tr));
  36840. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_protocol);
  36841. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_protocol);
  36842. PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_cur_scope->__pyx_v_protocol);
  36843. __pyx_r = NULL; __Pyx_ReturnWithStopIteration(__pyx_t_3);
  36844. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  36845. __pyx_t_3 = 0;
  36846. goto __pyx_L0;
  36847. }
  36848. CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
  36849. /* "uvloop/loop.pyx":2105
  36850. *
  36851. * @cython.iterable_coroutine
  36852. * async def create_unix_connection(self, protocol_factory, path=None, *, # <<<<<<<<<<<<<<
  36853. * ssl=None, sock=None,
  36854. * server_hostname=None,
  36855. */
  36856. /* function exit code */
  36857. __pyx_L1_error:;
  36858. __Pyx_XDECREF(__pyx_t_1);
  36859. __Pyx_XDECREF(__pyx_t_2);
  36860. __Pyx_XDECREF(__pyx_t_3);
  36861. __Pyx_XDECREF(__pyx_t_11);
  36862. __Pyx_XDECREF(__pyx_t_13);
  36863. __Pyx_XDECREF(__pyx_t_14);
  36864. __Pyx_AddTraceback("create_unix_connection", __pyx_clineno, __pyx_lineno, __pyx_filename);
  36865. __pyx_L0:;
  36866. __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  36867. #if !CYTHON_USE_EXC_INFO_STACK
  36868. __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  36869. #endif
  36870. __pyx_generator->resume_label = -1;
  36871. __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  36872. __Pyx_RefNannyFinishContext();
  36873. return __pyx_r;
  36874. }
  36875. /* "uvloop/loop.pyx":2204
  36876. * return tr, protocol
  36877. *
  36878. * def default_exception_handler(self, context): # <<<<<<<<<<<<<<
  36879. * """Default exception handler.
  36880. *
  36881. */
  36882. /* Python wrapper */
  36883. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_68default_exception_handler(PyObject *__pyx_v_self, PyObject *__pyx_v_context); /*proto*/
  36884. static char __pyx_doc_6uvloop_4loop_4Loop_67default_exception_handler[] = "Loop.default_exception_handler(self, context)\nDefault exception handler.\n\n This is called when an exception occurs and no exception\n handler is set, and can be called by a custom exception\n handler that wants to defer to the default behavior.\n\n The context parameter has the same meaning as in\n `call_exception_handler()`.\n ";
  36885. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_68default_exception_handler(PyObject *__pyx_v_self, PyObject *__pyx_v_context) {
  36886. PyObject *__pyx_r = 0;
  36887. __Pyx_RefNannyDeclarations
  36888. __Pyx_RefNannySetupContext("default_exception_handler (wrapper)", 0);
  36889. __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_67default_exception_handler(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self), ((PyObject *)__pyx_v_context));
  36890. /* function exit code */
  36891. __Pyx_RefNannyFinishContext();
  36892. return __pyx_r;
  36893. }
  36894. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_67default_exception_handler(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_context) {
  36895. PyObject *__pyx_v_message = NULL;
  36896. PyObject *__pyx_v_exception = NULL;
  36897. PyObject *__pyx_v_exc_info = NULL;
  36898. PyObject *__pyx_v_log_lines = NULL;
  36899. PyObject *__pyx_v_key = NULL;
  36900. PyObject *__pyx_v_value = NULL;
  36901. PyObject *__pyx_v_tb = NULL;
  36902. PyObject *__pyx_v_ex = NULL;
  36903. PyObject *__pyx_r = NULL;
  36904. __Pyx_RefNannyDeclarations
  36905. PyObject *__pyx_t_1 = NULL;
  36906. PyObject *__pyx_t_2 = NULL;
  36907. PyObject *__pyx_t_3 = NULL;
  36908. int __pyx_t_4;
  36909. int __pyx_t_5;
  36910. int __pyx_t_6;
  36911. Py_ssize_t __pyx_t_7;
  36912. PyObject *__pyx_t_8 = NULL;
  36913. PyObject *__pyx_t_9 = NULL;
  36914. PyObject *__pyx_t_10 = NULL;
  36915. PyObject *__pyx_t_11 = NULL;
  36916. int __pyx_t_12;
  36917. PyObject *__pyx_t_13 = NULL;
  36918. PyObject *__pyx_t_14 = NULL;
  36919. PyObject *__pyx_t_15 = NULL;
  36920. PyObject *__pyx_t_16 = NULL;
  36921. int __pyx_t_17;
  36922. char const *__pyx_t_18;
  36923. PyObject *__pyx_t_19 = NULL;
  36924. PyObject *__pyx_t_20 = NULL;
  36925. PyObject *__pyx_t_21 = NULL;
  36926. PyObject *__pyx_t_22 = NULL;
  36927. PyObject *__pyx_t_23 = NULL;
  36928. PyObject *__pyx_t_24 = NULL;
  36929. __Pyx_RefNannySetupContext("default_exception_handler", 0);
  36930. /* "uvloop/loop.pyx":2214
  36931. * `call_exception_handler()`.
  36932. * """
  36933. * message = context.get('message') # <<<<<<<<<<<<<<
  36934. * if not message:
  36935. * message = 'Unhandled exception in event loop'
  36936. */
  36937. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_context, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 2214, __pyx_L1_error)
  36938. __Pyx_GOTREF(__pyx_t_2);
  36939. __pyx_t_3 = NULL;
  36940. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
  36941. __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
  36942. if (likely(__pyx_t_3)) {
  36943. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  36944. __Pyx_INCREF(__pyx_t_3);
  36945. __Pyx_INCREF(function);
  36946. __Pyx_DECREF_SET(__pyx_t_2, function);
  36947. }
  36948. }
  36949. __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_n_u_message) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_n_u_message);
  36950. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  36951. if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2214, __pyx_L1_error)
  36952. __Pyx_GOTREF(__pyx_t_1);
  36953. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  36954. __pyx_v_message = __pyx_t_1;
  36955. __pyx_t_1 = 0;
  36956. /* "uvloop/loop.pyx":2215
  36957. * """
  36958. * message = context.get('message')
  36959. * if not message: # <<<<<<<<<<<<<<
  36960. * message = 'Unhandled exception in event loop'
  36961. *
  36962. */
  36963. __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_message); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(2, 2215, __pyx_L1_error)
  36964. __pyx_t_5 = ((!__pyx_t_4) != 0);
  36965. if (__pyx_t_5) {
  36966. /* "uvloop/loop.pyx":2216
  36967. * message = context.get('message')
  36968. * if not message:
  36969. * message = 'Unhandled exception in event loop' # <<<<<<<<<<<<<<
  36970. *
  36971. * exception = context.get('exception')
  36972. */
  36973. __Pyx_INCREF(__pyx_kp_u_Unhandled_exception_in_event_loo);
  36974. __Pyx_DECREF_SET(__pyx_v_message, __pyx_kp_u_Unhandled_exception_in_event_loo);
  36975. /* "uvloop/loop.pyx":2215
  36976. * """
  36977. * message = context.get('message')
  36978. * if not message: # <<<<<<<<<<<<<<
  36979. * message = 'Unhandled exception in event loop'
  36980. *
  36981. */
  36982. }
  36983. /* "uvloop/loop.pyx":2218
  36984. * message = 'Unhandled exception in event loop'
  36985. *
  36986. * exception = context.get('exception') # <<<<<<<<<<<<<<
  36987. * if exception is not None:
  36988. * exc_info = (type(exception), exception, exception.__traceback__)
  36989. */
  36990. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_context, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 2218, __pyx_L1_error)
  36991. __Pyx_GOTREF(__pyx_t_2);
  36992. __pyx_t_3 = NULL;
  36993. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
  36994. __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
  36995. if (likely(__pyx_t_3)) {
  36996. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  36997. __Pyx_INCREF(__pyx_t_3);
  36998. __Pyx_INCREF(function);
  36999. __Pyx_DECREF_SET(__pyx_t_2, function);
  37000. }
  37001. }
  37002. __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_n_u_exception) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_n_u_exception);
  37003. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  37004. if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2218, __pyx_L1_error)
  37005. __Pyx_GOTREF(__pyx_t_1);
  37006. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  37007. __pyx_v_exception = __pyx_t_1;
  37008. __pyx_t_1 = 0;
  37009. /* "uvloop/loop.pyx":2219
  37010. *
  37011. * exception = context.get('exception')
  37012. * if exception is not None: # <<<<<<<<<<<<<<
  37013. * exc_info = (type(exception), exception, exception.__traceback__)
  37014. * else:
  37015. */
  37016. __pyx_t_5 = (__pyx_v_exception != Py_None);
  37017. __pyx_t_4 = (__pyx_t_5 != 0);
  37018. if (__pyx_t_4) {
  37019. /* "uvloop/loop.pyx":2220
  37020. * exception = context.get('exception')
  37021. * if exception is not None:
  37022. * exc_info = (type(exception), exception, exception.__traceback__) # <<<<<<<<<<<<<<
  37023. * else:
  37024. * exc_info = False
  37025. */
  37026. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_exception, __pyx_n_s_traceback); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2220, __pyx_L1_error)
  37027. __Pyx_GOTREF(__pyx_t_1);
  37028. __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 2220, __pyx_L1_error)
  37029. __Pyx_GOTREF(__pyx_t_2);
  37030. __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_exception)));
  37031. __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_exception)));
  37032. PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(__pyx_v_exception)));
  37033. __Pyx_INCREF(__pyx_v_exception);
  37034. __Pyx_GIVEREF(__pyx_v_exception);
  37035. PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_exception);
  37036. __Pyx_GIVEREF(__pyx_t_1);
  37037. PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_1);
  37038. __pyx_t_1 = 0;
  37039. __pyx_v_exc_info = __pyx_t_2;
  37040. __pyx_t_2 = 0;
  37041. /* "uvloop/loop.pyx":2219
  37042. *
  37043. * exception = context.get('exception')
  37044. * if exception is not None: # <<<<<<<<<<<<<<
  37045. * exc_info = (type(exception), exception, exception.__traceback__)
  37046. * else:
  37047. */
  37048. goto __pyx_L4;
  37049. }
  37050. /* "uvloop/loop.pyx":2222
  37051. * exc_info = (type(exception), exception, exception.__traceback__)
  37052. * else:
  37053. * exc_info = False # <<<<<<<<<<<<<<
  37054. *
  37055. * log_lines = [message]
  37056. */
  37057. /*else*/ {
  37058. __Pyx_INCREF(Py_False);
  37059. __pyx_v_exc_info = Py_False;
  37060. }
  37061. __pyx_L4:;
  37062. /* "uvloop/loop.pyx":2224
  37063. * exc_info = False
  37064. *
  37065. * log_lines = [message] # <<<<<<<<<<<<<<
  37066. * for key in sorted(context):
  37067. * if key in {'message', 'exception'}:
  37068. */
  37069. __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 2224, __pyx_L1_error)
  37070. __Pyx_GOTREF(__pyx_t_2);
  37071. __Pyx_INCREF(__pyx_v_message);
  37072. __Pyx_GIVEREF(__pyx_v_message);
  37073. PyList_SET_ITEM(__pyx_t_2, 0, __pyx_v_message);
  37074. __pyx_v_log_lines = ((PyObject*)__pyx_t_2);
  37075. __pyx_t_2 = 0;
  37076. /* "uvloop/loop.pyx":2225
  37077. *
  37078. * log_lines = [message]
  37079. * for key in sorted(context): # <<<<<<<<<<<<<<
  37080. * if key in {'message', 'exception'}:
  37081. * continue
  37082. */
  37083. __pyx_t_1 = PySequence_List(__pyx_v_context); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2225, __pyx_L1_error)
  37084. __Pyx_GOTREF(__pyx_t_1);
  37085. __pyx_t_2 = ((PyObject*)__pyx_t_1);
  37086. __pyx_t_1 = 0;
  37087. __pyx_t_6 = PyList_Sort(__pyx_t_2); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(2, 2225, __pyx_L1_error)
  37088. if (unlikely(__pyx_t_2 == Py_None)) {
  37089. PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
  37090. __PYX_ERR(2, 2225, __pyx_L1_error)
  37091. }
  37092. __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_7 = 0;
  37093. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  37094. for (;;) {
  37095. if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_1)) break;
  37096. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  37097. __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(2, 2225, __pyx_L1_error)
  37098. #else
  37099. __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 2225, __pyx_L1_error)
  37100. __Pyx_GOTREF(__pyx_t_2);
  37101. #endif
  37102. __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_2);
  37103. __pyx_t_2 = 0;
  37104. /* "uvloop/loop.pyx":2226
  37105. * log_lines = [message]
  37106. * for key in sorted(context):
  37107. * if key in {'message', 'exception'}: # <<<<<<<<<<<<<<
  37108. * continue
  37109. * value = context[key]
  37110. */
  37111. __Pyx_INCREF(__pyx_v_key);
  37112. __pyx_t_2 = __pyx_v_key;
  37113. __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_message, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(2, 2226, __pyx_L1_error)
  37114. if (!__pyx_t_5) {
  37115. } else {
  37116. __pyx_t_4 = __pyx_t_5;
  37117. goto __pyx_L8_bool_binop_done;
  37118. }
  37119. __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_exception, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(2, 2226, __pyx_L1_error)
  37120. __pyx_t_4 = __pyx_t_5;
  37121. __pyx_L8_bool_binop_done:;
  37122. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  37123. __pyx_t_5 = (__pyx_t_4 != 0);
  37124. if (__pyx_t_5) {
  37125. /* "uvloop/loop.pyx":2227
  37126. * for key in sorted(context):
  37127. * if key in {'message', 'exception'}:
  37128. * continue # <<<<<<<<<<<<<<
  37129. * value = context[key]
  37130. * if key == 'source_traceback':
  37131. */
  37132. goto __pyx_L5_continue;
  37133. /* "uvloop/loop.pyx":2226
  37134. * log_lines = [message]
  37135. * for key in sorted(context):
  37136. * if key in {'message', 'exception'}: # <<<<<<<<<<<<<<
  37137. * continue
  37138. * value = context[key]
  37139. */
  37140. }
  37141. /* "uvloop/loop.pyx":2228
  37142. * if key in {'message', 'exception'}:
  37143. * continue
  37144. * value = context[key] # <<<<<<<<<<<<<<
  37145. * if key == 'source_traceback':
  37146. * tb = ''.join(tb_format_list(value))
  37147. */
  37148. __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_context, __pyx_v_key); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 2228, __pyx_L1_error)
  37149. __Pyx_GOTREF(__pyx_t_2);
  37150. __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_2);
  37151. __pyx_t_2 = 0;
  37152. /* "uvloop/loop.pyx":2229
  37153. * continue
  37154. * value = context[key]
  37155. * if key == 'source_traceback': # <<<<<<<<<<<<<<
  37156. * tb = ''.join(tb_format_list(value))
  37157. * value = 'Object created at (most recent call last):\n'
  37158. */
  37159. __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_v_key, __pyx_n_u_source_traceback, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(2, 2229, __pyx_L1_error)
  37160. if (__pyx_t_5) {
  37161. /* "uvloop/loop.pyx":2230
  37162. * value = context[key]
  37163. * if key == 'source_traceback':
  37164. * tb = ''.join(tb_format_list(value)) # <<<<<<<<<<<<<<
  37165. * value = 'Object created at (most recent call last):\n'
  37166. * value += tb.rstrip()
  37167. */
  37168. __Pyx_INCREF(__pyx_v_6uvloop_4loop_tb_format_list);
  37169. __pyx_t_3 = __pyx_v_6uvloop_4loop_tb_format_list; __pyx_t_8 = NULL;
  37170. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
  37171. __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
  37172. if (likely(__pyx_t_8)) {
  37173. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  37174. __Pyx_INCREF(__pyx_t_8);
  37175. __Pyx_INCREF(function);
  37176. __Pyx_DECREF_SET(__pyx_t_3, function);
  37177. }
  37178. }
  37179. __pyx_t_2 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_value);
  37180. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  37181. if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 2230, __pyx_L1_error)
  37182. __Pyx_GOTREF(__pyx_t_2);
  37183. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  37184. __pyx_t_3 = PyUnicode_Join(__pyx_kp_u__2, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2230, __pyx_L1_error)
  37185. __Pyx_GOTREF(__pyx_t_3);
  37186. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  37187. __Pyx_XDECREF_SET(__pyx_v_tb, ((PyObject*)__pyx_t_3));
  37188. __pyx_t_3 = 0;
  37189. /* "uvloop/loop.pyx":2231
  37190. * if key == 'source_traceback':
  37191. * tb = ''.join(tb_format_list(value))
  37192. * value = 'Object created at (most recent call last):\n' # <<<<<<<<<<<<<<
  37193. * value += tb.rstrip()
  37194. * else:
  37195. */
  37196. __Pyx_INCREF(__pyx_kp_u_Object_created_at_most_recent_ca);
  37197. __Pyx_DECREF_SET(__pyx_v_value, __pyx_kp_u_Object_created_at_most_recent_ca);
  37198. /* "uvloop/loop.pyx":2232
  37199. * tb = ''.join(tb_format_list(value))
  37200. * value = 'Object created at (most recent call last):\n'
  37201. * value += tb.rstrip() # <<<<<<<<<<<<<<
  37202. * else:
  37203. * try:
  37204. */
  37205. __pyx_t_3 = __Pyx_CallUnboundCMethod0(&__pyx_umethod_PyUnicode_Type_rstrip, __pyx_v_tb); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2232, __pyx_L1_error)
  37206. __Pyx_GOTREF(__pyx_t_3);
  37207. __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_value, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 2232, __pyx_L1_error)
  37208. __Pyx_GOTREF(__pyx_t_2);
  37209. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  37210. __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_2);
  37211. __pyx_t_2 = 0;
  37212. /* "uvloop/loop.pyx":2229
  37213. * continue
  37214. * value = context[key]
  37215. * if key == 'source_traceback': # <<<<<<<<<<<<<<
  37216. * tb = ''.join(tb_format_list(value))
  37217. * value = 'Object created at (most recent call last):\n'
  37218. */
  37219. goto __pyx_L10;
  37220. }
  37221. /* "uvloop/loop.pyx":2234
  37222. * value += tb.rstrip()
  37223. * else:
  37224. * try: # <<<<<<<<<<<<<<
  37225. * value = repr(value)
  37226. * except Exception as ex:
  37227. */
  37228. /*else*/ {
  37229. {
  37230. __Pyx_PyThreadState_declare
  37231. __Pyx_PyThreadState_assign
  37232. __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
  37233. __Pyx_XGOTREF(__pyx_t_9);
  37234. __Pyx_XGOTREF(__pyx_t_10);
  37235. __Pyx_XGOTREF(__pyx_t_11);
  37236. /*try:*/ {
  37237. /* "uvloop/loop.pyx":2235
  37238. * else:
  37239. * try:
  37240. * value = repr(value) # <<<<<<<<<<<<<<
  37241. * except Exception as ex:
  37242. * value = ('Exception in __repr__ {!r}; '
  37243. */
  37244. __pyx_t_2 = PyObject_Repr(__pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 2235, __pyx_L11_error)
  37245. __Pyx_GOTREF(__pyx_t_2);
  37246. __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_2);
  37247. __pyx_t_2 = 0;
  37248. /* "uvloop/loop.pyx":2234
  37249. * value += tb.rstrip()
  37250. * else:
  37251. * try: # <<<<<<<<<<<<<<
  37252. * value = repr(value)
  37253. * except Exception as ex:
  37254. */
  37255. }
  37256. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  37257. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  37258. __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
  37259. goto __pyx_L18_try_end;
  37260. __pyx_L11_error:;
  37261. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  37262. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  37263. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  37264. /* "uvloop/loop.pyx":2236
  37265. * try:
  37266. * value = repr(value)
  37267. * except Exception as ex: # <<<<<<<<<<<<<<
  37268. * value = ('Exception in __repr__ {!r}; '
  37269. * 'value type: {!r}'.format(ex, type(value)))
  37270. */
  37271. __pyx_t_12 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
  37272. if (__pyx_t_12) {
  37273. __Pyx_AddTraceback("uvloop.loop.Loop.default_exception_handler", __pyx_clineno, __pyx_lineno, __pyx_filename);
  37274. if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_3, &__pyx_t_8) < 0) __PYX_ERR(2, 2236, __pyx_L13_except_error)
  37275. __Pyx_GOTREF(__pyx_t_2);
  37276. __Pyx_GOTREF(__pyx_t_3);
  37277. __Pyx_GOTREF(__pyx_t_8);
  37278. __Pyx_INCREF(__pyx_t_3);
  37279. __pyx_v_ex = __pyx_t_3;
  37280. /*try:*/ {
  37281. /* "uvloop/loop.pyx":2238
  37282. * except Exception as ex:
  37283. * value = ('Exception in __repr__ {!r}; '
  37284. * 'value type: {!r}'.format(ex, type(value))) # <<<<<<<<<<<<<<
  37285. * log_lines.append('{}: {}'.format(key, value))
  37286. *
  37287. */
  37288. __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Exception_in___repr___r_value_ty, __pyx_n_s_format); if (unlikely(!__pyx_t_14)) __PYX_ERR(2, 2238, __pyx_L24_error)
  37289. __Pyx_GOTREF(__pyx_t_14);
  37290. __pyx_t_15 = NULL;
  37291. __pyx_t_12 = 0;
  37292. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_14))) {
  37293. __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_14);
  37294. if (likely(__pyx_t_15)) {
  37295. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14);
  37296. __Pyx_INCREF(__pyx_t_15);
  37297. __Pyx_INCREF(function);
  37298. __Pyx_DECREF_SET(__pyx_t_14, function);
  37299. __pyx_t_12 = 1;
  37300. }
  37301. }
  37302. #if CYTHON_FAST_PYCALL
  37303. if (PyFunction_Check(__pyx_t_14)) {
  37304. PyObject *__pyx_temp[3] = {__pyx_t_15, __pyx_v_ex, ((PyObject *)Py_TYPE(__pyx_v_value))};
  37305. __pyx_t_13 = __Pyx_PyFunction_FastCall(__pyx_t_14, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_13)) __PYX_ERR(2, 2238, __pyx_L24_error)
  37306. __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
  37307. __Pyx_GOTREF(__pyx_t_13);
  37308. } else
  37309. #endif
  37310. #if CYTHON_FAST_PYCCALL
  37311. if (__Pyx_PyFastCFunction_Check(__pyx_t_14)) {
  37312. PyObject *__pyx_temp[3] = {__pyx_t_15, __pyx_v_ex, ((PyObject *)Py_TYPE(__pyx_v_value))};
  37313. __pyx_t_13 = __Pyx_PyCFunction_FastCall(__pyx_t_14, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_13)) __PYX_ERR(2, 2238, __pyx_L24_error)
  37314. __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
  37315. __Pyx_GOTREF(__pyx_t_13);
  37316. } else
  37317. #endif
  37318. {
  37319. __pyx_t_16 = PyTuple_New(2+__pyx_t_12); if (unlikely(!__pyx_t_16)) __PYX_ERR(2, 2238, __pyx_L24_error)
  37320. __Pyx_GOTREF(__pyx_t_16);
  37321. if (__pyx_t_15) {
  37322. __Pyx_GIVEREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_15); __pyx_t_15 = NULL;
  37323. }
  37324. __Pyx_INCREF(__pyx_v_ex);
  37325. __Pyx_GIVEREF(__pyx_v_ex);
  37326. PyTuple_SET_ITEM(__pyx_t_16, 0+__pyx_t_12, __pyx_v_ex);
  37327. __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_value)));
  37328. __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_value)));
  37329. PyTuple_SET_ITEM(__pyx_t_16, 1+__pyx_t_12, ((PyObject *)Py_TYPE(__pyx_v_value)));
  37330. __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_t_16, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(2, 2238, __pyx_L24_error)
  37331. __Pyx_GOTREF(__pyx_t_13);
  37332. __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
  37333. }
  37334. __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  37335. __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_13);
  37336. __pyx_t_13 = 0;
  37337. }
  37338. /* "uvloop/loop.pyx":2236
  37339. * try:
  37340. * value = repr(value)
  37341. * except Exception as ex: # <<<<<<<<<<<<<<
  37342. * value = ('Exception in __repr__ {!r}; '
  37343. * 'value type: {!r}'.format(ex, type(value)))
  37344. */
  37345. /*finally:*/ {
  37346. /*normal exit:*/{
  37347. __Pyx_DECREF(__pyx_v_ex);
  37348. __pyx_v_ex = NULL;
  37349. goto __pyx_L25;
  37350. }
  37351. __pyx_L24_error:;
  37352. /*exception exit:*/{
  37353. __Pyx_PyThreadState_declare
  37354. __Pyx_PyThreadState_assign
  37355. __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0;
  37356. __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
  37357. __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
  37358. __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
  37359. __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
  37360. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_22, &__pyx_t_23, &__pyx_t_24);
  37361. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21) < 0)) __Pyx_ErrFetch(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21);
  37362. __Pyx_XGOTREF(__pyx_t_19);
  37363. __Pyx_XGOTREF(__pyx_t_20);
  37364. __Pyx_XGOTREF(__pyx_t_21);
  37365. __Pyx_XGOTREF(__pyx_t_22);
  37366. __Pyx_XGOTREF(__pyx_t_23);
  37367. __Pyx_XGOTREF(__pyx_t_24);
  37368. __pyx_t_12 = __pyx_lineno; __pyx_t_17 = __pyx_clineno; __pyx_t_18 = __pyx_filename;
  37369. {
  37370. __Pyx_DECREF(__pyx_v_ex);
  37371. __pyx_v_ex = NULL;
  37372. }
  37373. if (PY_MAJOR_VERSION >= 3) {
  37374. __Pyx_XGIVEREF(__pyx_t_22);
  37375. __Pyx_XGIVEREF(__pyx_t_23);
  37376. __Pyx_XGIVEREF(__pyx_t_24);
  37377. __Pyx_ExceptionReset(__pyx_t_22, __pyx_t_23, __pyx_t_24);
  37378. }
  37379. __Pyx_XGIVEREF(__pyx_t_19);
  37380. __Pyx_XGIVEREF(__pyx_t_20);
  37381. __Pyx_XGIVEREF(__pyx_t_21);
  37382. __Pyx_ErrRestore(__pyx_t_19, __pyx_t_20, __pyx_t_21);
  37383. __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0;
  37384. __pyx_lineno = __pyx_t_12; __pyx_clineno = __pyx_t_17; __pyx_filename = __pyx_t_18;
  37385. goto __pyx_L13_except_error;
  37386. }
  37387. __pyx_L25:;
  37388. }
  37389. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  37390. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  37391. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  37392. goto __pyx_L12_exception_handled;
  37393. }
  37394. goto __pyx_L13_except_error;
  37395. __pyx_L13_except_error:;
  37396. /* "uvloop/loop.pyx":2234
  37397. * value += tb.rstrip()
  37398. * else:
  37399. * try: # <<<<<<<<<<<<<<
  37400. * value = repr(value)
  37401. * except Exception as ex:
  37402. */
  37403. __Pyx_XGIVEREF(__pyx_t_9);
  37404. __Pyx_XGIVEREF(__pyx_t_10);
  37405. __Pyx_XGIVEREF(__pyx_t_11);
  37406. __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11);
  37407. goto __pyx_L1_error;
  37408. __pyx_L12_exception_handled:;
  37409. __Pyx_XGIVEREF(__pyx_t_9);
  37410. __Pyx_XGIVEREF(__pyx_t_10);
  37411. __Pyx_XGIVEREF(__pyx_t_11);
  37412. __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11);
  37413. __pyx_L18_try_end:;
  37414. }
  37415. }
  37416. __pyx_L10:;
  37417. /* "uvloop/loop.pyx":2239
  37418. * value = ('Exception in __repr__ {!r}; '
  37419. * 'value type: {!r}'.format(ex, type(value)))
  37420. * log_lines.append('{}: {}'.format(key, value)) # <<<<<<<<<<<<<<
  37421. *
  37422. * aio_logger.error('\n'.join(log_lines), exc_info=exc_info)
  37423. */
  37424. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__58, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2239, __pyx_L1_error)
  37425. __Pyx_GOTREF(__pyx_t_3);
  37426. __pyx_t_2 = NULL;
  37427. __pyx_t_17 = 0;
  37428. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
  37429. __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
  37430. if (likely(__pyx_t_2)) {
  37431. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  37432. __Pyx_INCREF(__pyx_t_2);
  37433. __Pyx_INCREF(function);
  37434. __Pyx_DECREF_SET(__pyx_t_3, function);
  37435. __pyx_t_17 = 1;
  37436. }
  37437. }
  37438. #if CYTHON_FAST_PYCALL
  37439. if (PyFunction_Check(__pyx_t_3)) {
  37440. PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_key, __pyx_v_value};
  37441. __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_17, 2+__pyx_t_17); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 2239, __pyx_L1_error)
  37442. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  37443. __Pyx_GOTREF(__pyx_t_8);
  37444. } else
  37445. #endif
  37446. #if CYTHON_FAST_PYCCALL
  37447. if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
  37448. PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_key, __pyx_v_value};
  37449. __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_17, 2+__pyx_t_17); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 2239, __pyx_L1_error)
  37450. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  37451. __Pyx_GOTREF(__pyx_t_8);
  37452. } else
  37453. #endif
  37454. {
  37455. __pyx_t_13 = PyTuple_New(2+__pyx_t_17); if (unlikely(!__pyx_t_13)) __PYX_ERR(2, 2239, __pyx_L1_error)
  37456. __Pyx_GOTREF(__pyx_t_13);
  37457. if (__pyx_t_2) {
  37458. __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_2); __pyx_t_2 = NULL;
  37459. }
  37460. __Pyx_INCREF(__pyx_v_key);
  37461. __Pyx_GIVEREF(__pyx_v_key);
  37462. PyTuple_SET_ITEM(__pyx_t_13, 0+__pyx_t_17, __pyx_v_key);
  37463. __Pyx_INCREF(__pyx_v_value);
  37464. __Pyx_GIVEREF(__pyx_v_value);
  37465. PyTuple_SET_ITEM(__pyx_t_13, 1+__pyx_t_17, __pyx_v_value);
  37466. __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_13, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 2239, __pyx_L1_error)
  37467. __Pyx_GOTREF(__pyx_t_8);
  37468. __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  37469. }
  37470. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  37471. __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_log_lines, __pyx_t_8); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(2, 2239, __pyx_L1_error)
  37472. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  37473. /* "uvloop/loop.pyx":2225
  37474. *
  37475. * log_lines = [message]
  37476. * for key in sorted(context): # <<<<<<<<<<<<<<
  37477. * if key in {'message', 'exception'}:
  37478. * continue
  37479. */
  37480. __pyx_L5_continue:;
  37481. }
  37482. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  37483. /* "uvloop/loop.pyx":2241
  37484. * log_lines.append('{}: {}'.format(key, value))
  37485. *
  37486. * aio_logger.error('\n'.join(log_lines), exc_info=exc_info) # <<<<<<<<<<<<<<
  37487. *
  37488. * def get_exception_handler(self):
  37489. */
  37490. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_6uvloop_4loop_aio_logger, __pyx_n_s_error); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2241, __pyx_L1_error)
  37491. __Pyx_GOTREF(__pyx_t_1);
  37492. __pyx_t_8 = PyUnicode_Join(__pyx_kp_u__59, __pyx_v_log_lines); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 2241, __pyx_L1_error)
  37493. __Pyx_GOTREF(__pyx_t_8);
  37494. __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2241, __pyx_L1_error)
  37495. __Pyx_GOTREF(__pyx_t_3);
  37496. __Pyx_GIVEREF(__pyx_t_8);
  37497. PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_8);
  37498. __pyx_t_8 = 0;
  37499. __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 2241, __pyx_L1_error)
  37500. __Pyx_GOTREF(__pyx_t_8);
  37501. if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_exc_info, __pyx_v_exc_info) < 0) __PYX_ERR(2, 2241, __pyx_L1_error)
  37502. __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_8); if (unlikely(!__pyx_t_13)) __PYX_ERR(2, 2241, __pyx_L1_error)
  37503. __Pyx_GOTREF(__pyx_t_13);
  37504. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  37505. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  37506. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  37507. __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  37508. /* "uvloop/loop.pyx":2204
  37509. * return tr, protocol
  37510. *
  37511. * def default_exception_handler(self, context): # <<<<<<<<<<<<<<
  37512. * """Default exception handler.
  37513. *
  37514. */
  37515. /* function exit code */
  37516. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  37517. goto __pyx_L0;
  37518. __pyx_L1_error:;
  37519. __Pyx_XDECREF(__pyx_t_1);
  37520. __Pyx_XDECREF(__pyx_t_2);
  37521. __Pyx_XDECREF(__pyx_t_3);
  37522. __Pyx_XDECREF(__pyx_t_8);
  37523. __Pyx_XDECREF(__pyx_t_13);
  37524. __Pyx_XDECREF(__pyx_t_14);
  37525. __Pyx_XDECREF(__pyx_t_15);
  37526. __Pyx_XDECREF(__pyx_t_16);
  37527. __Pyx_AddTraceback("uvloop.loop.Loop.default_exception_handler", __pyx_clineno, __pyx_lineno, __pyx_filename);
  37528. __pyx_r = NULL;
  37529. __pyx_L0:;
  37530. __Pyx_XDECREF(__pyx_v_message);
  37531. __Pyx_XDECREF(__pyx_v_exception);
  37532. __Pyx_XDECREF(__pyx_v_exc_info);
  37533. __Pyx_XDECREF(__pyx_v_log_lines);
  37534. __Pyx_XDECREF(__pyx_v_key);
  37535. __Pyx_XDECREF(__pyx_v_value);
  37536. __Pyx_XDECREF(__pyx_v_tb);
  37537. __Pyx_XDECREF(__pyx_v_ex);
  37538. __Pyx_XGIVEREF(__pyx_r);
  37539. __Pyx_RefNannyFinishContext();
  37540. return __pyx_r;
  37541. }
  37542. /* "uvloop/loop.pyx":2243
  37543. * aio_logger.error('\n'.join(log_lines), exc_info=exc_info)
  37544. *
  37545. * def get_exception_handler(self): # <<<<<<<<<<<<<<
  37546. * """Return an exception handler, or None if the default one is in use.
  37547. * """
  37548. */
  37549. /* Python wrapper */
  37550. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_70get_exception_handler(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  37551. static char __pyx_doc_6uvloop_4loop_4Loop_69get_exception_handler[] = "Loop.get_exception_handler(self)\nReturn an exception handler, or None if the default one is in use.\n ";
  37552. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_70get_exception_handler(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  37553. PyObject *__pyx_r = 0;
  37554. __Pyx_RefNannyDeclarations
  37555. __Pyx_RefNannySetupContext("get_exception_handler (wrapper)", 0);
  37556. __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_69get_exception_handler(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self));
  37557. /* function exit code */
  37558. __Pyx_RefNannyFinishContext();
  37559. return __pyx_r;
  37560. }
  37561. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_69get_exception_handler(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) {
  37562. PyObject *__pyx_r = NULL;
  37563. __Pyx_RefNannyDeclarations
  37564. __Pyx_RefNannySetupContext("get_exception_handler", 0);
  37565. /* "uvloop/loop.pyx":2246
  37566. * """Return an exception handler, or None if the default one is in use.
  37567. * """
  37568. * return self._exception_handler # <<<<<<<<<<<<<<
  37569. *
  37570. * def set_exception_handler(self, handler):
  37571. */
  37572. __Pyx_XDECREF(__pyx_r);
  37573. __Pyx_INCREF(__pyx_v_self->_exception_handler);
  37574. __pyx_r = __pyx_v_self->_exception_handler;
  37575. goto __pyx_L0;
  37576. /* "uvloop/loop.pyx":2243
  37577. * aio_logger.error('\n'.join(log_lines), exc_info=exc_info)
  37578. *
  37579. * def get_exception_handler(self): # <<<<<<<<<<<<<<
  37580. * """Return an exception handler, or None if the default one is in use.
  37581. * """
  37582. */
  37583. /* function exit code */
  37584. __pyx_L0:;
  37585. __Pyx_XGIVEREF(__pyx_r);
  37586. __Pyx_RefNannyFinishContext();
  37587. return __pyx_r;
  37588. }
  37589. /* "uvloop/loop.pyx":2248
  37590. * return self._exception_handler
  37591. *
  37592. * def set_exception_handler(self, handler): # <<<<<<<<<<<<<<
  37593. * """Set handler as the new event loop exception handler.
  37594. *
  37595. */
  37596. /* Python wrapper */
  37597. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_72set_exception_handler(PyObject *__pyx_v_self, PyObject *__pyx_v_handler); /*proto*/
  37598. static char __pyx_doc_6uvloop_4loop_4Loop_71set_exception_handler[] = "Loop.set_exception_handler(self, handler)\nSet handler as the new event loop exception handler.\n\n If handler is None, the default exception handler will\n be set.\n\n If handler is a callable object, it should have a\n signature matching '(loop, context)', where 'loop'\n will be a reference to the active event loop, 'context'\n will be a dict object (see `call_exception_handler()`\n documentation for details about context).\n ";
  37599. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_72set_exception_handler(PyObject *__pyx_v_self, PyObject *__pyx_v_handler) {
  37600. PyObject *__pyx_r = 0;
  37601. __Pyx_RefNannyDeclarations
  37602. __Pyx_RefNannySetupContext("set_exception_handler (wrapper)", 0);
  37603. __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_71set_exception_handler(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self), ((PyObject *)__pyx_v_handler));
  37604. /* function exit code */
  37605. __Pyx_RefNannyFinishContext();
  37606. return __pyx_r;
  37607. }
  37608. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_71set_exception_handler(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_handler) {
  37609. PyObject *__pyx_r = NULL;
  37610. __Pyx_RefNannyDeclarations
  37611. int __pyx_t_1;
  37612. int __pyx_t_2;
  37613. int __pyx_t_3;
  37614. PyObject *__pyx_t_4 = NULL;
  37615. PyObject *__pyx_t_5 = NULL;
  37616. PyObject *__pyx_t_6 = NULL;
  37617. __Pyx_RefNannySetupContext("set_exception_handler", 0);
  37618. /* "uvloop/loop.pyx":2260
  37619. * documentation for details about context).
  37620. * """
  37621. * if handler is not None and not callable(handler): # <<<<<<<<<<<<<<
  37622. * raise TypeError('A callable object or None is expected, '
  37623. * 'got {!r}'.format(handler))
  37624. */
  37625. __pyx_t_2 = (__pyx_v_handler != Py_None);
  37626. __pyx_t_3 = (__pyx_t_2 != 0);
  37627. if (__pyx_t_3) {
  37628. } else {
  37629. __pyx_t_1 = __pyx_t_3;
  37630. goto __pyx_L4_bool_binop_done;
  37631. }
  37632. __pyx_t_3 = __Pyx_PyCallable_Check(__pyx_v_handler); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(2, 2260, __pyx_L1_error)
  37633. __pyx_t_2 = ((!(__pyx_t_3 != 0)) != 0);
  37634. __pyx_t_1 = __pyx_t_2;
  37635. __pyx_L4_bool_binop_done:;
  37636. if (unlikely(__pyx_t_1)) {
  37637. /* "uvloop/loop.pyx":2262
  37638. * if handler is not None and not callable(handler):
  37639. * raise TypeError('A callable object or None is expected, '
  37640. * 'got {!r}'.format(handler)) # <<<<<<<<<<<<<<
  37641. * self._exception_handler = handler
  37642. *
  37643. */
  37644. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_A_callable_object_or_None_is_exp, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2262, __pyx_L1_error)
  37645. __Pyx_GOTREF(__pyx_t_5);
  37646. __pyx_t_6 = NULL;
  37647. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
  37648. __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
  37649. if (likely(__pyx_t_6)) {
  37650. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
  37651. __Pyx_INCREF(__pyx_t_6);
  37652. __Pyx_INCREF(function);
  37653. __Pyx_DECREF_SET(__pyx_t_5, function);
  37654. }
  37655. }
  37656. __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_v_handler) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_handler);
  37657. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  37658. if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2262, __pyx_L1_error)
  37659. __Pyx_GOTREF(__pyx_t_4);
  37660. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  37661. /* "uvloop/loop.pyx":2261
  37662. * """
  37663. * if handler is not None and not callable(handler):
  37664. * raise TypeError('A callable object or None is expected, ' # <<<<<<<<<<<<<<
  37665. * 'got {!r}'.format(handler))
  37666. * self._exception_handler = handler
  37667. */
  37668. __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2261, __pyx_L1_error)
  37669. __Pyx_GOTREF(__pyx_t_5);
  37670. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  37671. __Pyx_Raise(__pyx_t_5, 0, 0, 0);
  37672. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  37673. __PYX_ERR(2, 2261, __pyx_L1_error)
  37674. /* "uvloop/loop.pyx":2260
  37675. * documentation for details about context).
  37676. * """
  37677. * if handler is not None and not callable(handler): # <<<<<<<<<<<<<<
  37678. * raise TypeError('A callable object or None is expected, '
  37679. * 'got {!r}'.format(handler))
  37680. */
  37681. }
  37682. /* "uvloop/loop.pyx":2263
  37683. * raise TypeError('A callable object or None is expected, '
  37684. * 'got {!r}'.format(handler))
  37685. * self._exception_handler = handler # <<<<<<<<<<<<<<
  37686. *
  37687. * def call_exception_handler(self, context):
  37688. */
  37689. __Pyx_INCREF(__pyx_v_handler);
  37690. __Pyx_GIVEREF(__pyx_v_handler);
  37691. __Pyx_GOTREF(__pyx_v_self->_exception_handler);
  37692. __Pyx_DECREF(__pyx_v_self->_exception_handler);
  37693. __pyx_v_self->_exception_handler = __pyx_v_handler;
  37694. /* "uvloop/loop.pyx":2248
  37695. * return self._exception_handler
  37696. *
  37697. * def set_exception_handler(self, handler): # <<<<<<<<<<<<<<
  37698. * """Set handler as the new event loop exception handler.
  37699. *
  37700. */
  37701. /* function exit code */
  37702. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  37703. goto __pyx_L0;
  37704. __pyx_L1_error:;
  37705. __Pyx_XDECREF(__pyx_t_4);
  37706. __Pyx_XDECREF(__pyx_t_5);
  37707. __Pyx_XDECREF(__pyx_t_6);
  37708. __Pyx_AddTraceback("uvloop.loop.Loop.set_exception_handler", __pyx_clineno, __pyx_lineno, __pyx_filename);
  37709. __pyx_r = NULL;
  37710. __pyx_L0:;
  37711. __Pyx_XGIVEREF(__pyx_r);
  37712. __Pyx_RefNannyFinishContext();
  37713. return __pyx_r;
  37714. }
  37715. /* "uvloop/loop.pyx":2265
  37716. * self._exception_handler = handler
  37717. *
  37718. * def call_exception_handler(self, context): # <<<<<<<<<<<<<<
  37719. * """Call the current event loop's exception handler.
  37720. *
  37721. */
  37722. /* Python wrapper */
  37723. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_74call_exception_handler(PyObject *__pyx_v_self, PyObject *__pyx_v_context); /*proto*/
  37724. static char __pyx_doc_6uvloop_4loop_4Loop_73call_exception_handler[] = "Loop.call_exception_handler(self, context)\nCall the current event loop's exception handler.\n\n The context argument is a dict containing the following keys:\n\n - 'message': Error message;\n - 'exception' (optional): Exception object;\n - 'future' (optional): Future instance;\n - 'handle' (optional): Handle instance;\n - 'protocol' (optional): Protocol instance;\n - 'transport' (optional): Transport instance;\n - 'socket' (optional): Socket instance.\n\n New keys maybe introduced in the future.\n\n Note: do not overload this method in an event loop subclass.\n For custom exception handling, use the\n `set_exception_handler()` method.\n ";
  37725. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_74call_exception_handler(PyObject *__pyx_v_self, PyObject *__pyx_v_context) {
  37726. PyObject *__pyx_r = 0;
  37727. __Pyx_RefNannyDeclarations
  37728. __Pyx_RefNannySetupContext("call_exception_handler (wrapper)", 0);
  37729. __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_73call_exception_handler(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self), ((PyObject *)__pyx_v_context));
  37730. /* function exit code */
  37731. __Pyx_RefNannyFinishContext();
  37732. return __pyx_r;
  37733. }
  37734. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_73call_exception_handler(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_context) {
  37735. PyObject *__pyx_v_exc = NULL;
  37736. PyObject *__pyx_r = NULL;
  37737. __Pyx_RefNannyDeclarations
  37738. int __pyx_t_1;
  37739. int __pyx_t_2;
  37740. PyObject *__pyx_t_3 = NULL;
  37741. PyObject *__pyx_t_4 = NULL;
  37742. PyObject *__pyx_t_5 = NULL;
  37743. PyObject *__pyx_t_6 = NULL;
  37744. PyObject *__pyx_t_7 = NULL;
  37745. PyObject *__pyx_t_8 = NULL;
  37746. int __pyx_t_9;
  37747. PyObject *__pyx_t_10 = NULL;
  37748. PyObject *__pyx_t_11 = NULL;
  37749. PyObject *__pyx_t_12 = NULL;
  37750. PyObject *__pyx_t_13 = NULL;
  37751. PyObject *__pyx_t_14 = NULL;
  37752. PyObject *__pyx_t_15 = NULL;
  37753. PyObject *__pyx_t_16 = NULL;
  37754. PyObject *__pyx_t_17 = NULL;
  37755. PyObject *__pyx_t_18 = NULL;
  37756. int __pyx_t_19;
  37757. char const *__pyx_t_20;
  37758. PyObject *__pyx_t_21 = NULL;
  37759. PyObject *__pyx_t_22 = NULL;
  37760. PyObject *__pyx_t_23 = NULL;
  37761. __Pyx_RefNannySetupContext("call_exception_handler", 0);
  37762. /* "uvloop/loop.pyx":2284
  37763. * `set_exception_handler()` method.
  37764. * """
  37765. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  37766. * self._debug_exception_handler_cnt += 1
  37767. *
  37768. */
  37769. __pyx_t_1 = (UVLOOP_DEBUG != 0);
  37770. if (__pyx_t_1) {
  37771. /* "uvloop/loop.pyx":2285
  37772. * """
  37773. * if UVLOOP_DEBUG:
  37774. * self._debug_exception_handler_cnt += 1 # <<<<<<<<<<<<<<
  37775. *
  37776. * if self._exception_handler is None:
  37777. */
  37778. __pyx_v_self->_debug_exception_handler_cnt = (__pyx_v_self->_debug_exception_handler_cnt + 1);
  37779. /* "uvloop/loop.pyx":2284
  37780. * `set_exception_handler()` method.
  37781. * """
  37782. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  37783. * self._debug_exception_handler_cnt += 1
  37784. *
  37785. */
  37786. }
  37787. /* "uvloop/loop.pyx":2287
  37788. * self._debug_exception_handler_cnt += 1
  37789. *
  37790. * if self._exception_handler is None: # <<<<<<<<<<<<<<
  37791. * try:
  37792. * self.default_exception_handler(context)
  37793. */
  37794. __pyx_t_1 = (__pyx_v_self->_exception_handler == Py_None);
  37795. __pyx_t_2 = (__pyx_t_1 != 0);
  37796. if (__pyx_t_2) {
  37797. /* "uvloop/loop.pyx":2288
  37798. *
  37799. * if self._exception_handler is None:
  37800. * try: # <<<<<<<<<<<<<<
  37801. * self.default_exception_handler(context)
  37802. * except Exception:
  37803. */
  37804. {
  37805. __Pyx_PyThreadState_declare
  37806. __Pyx_PyThreadState_assign
  37807. __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
  37808. __Pyx_XGOTREF(__pyx_t_3);
  37809. __Pyx_XGOTREF(__pyx_t_4);
  37810. __Pyx_XGOTREF(__pyx_t_5);
  37811. /*try:*/ {
  37812. /* "uvloop/loop.pyx":2289
  37813. * if self._exception_handler is None:
  37814. * try:
  37815. * self.default_exception_handler(context) # <<<<<<<<<<<<<<
  37816. * except Exception:
  37817. * # Second protection layer for unexpected errors
  37818. */
  37819. __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_default_exception_handler); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 2289, __pyx_L5_error)
  37820. __Pyx_GOTREF(__pyx_t_7);
  37821. __pyx_t_8 = NULL;
  37822. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
  37823. __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
  37824. if (likely(__pyx_t_8)) {
  37825. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
  37826. __Pyx_INCREF(__pyx_t_8);
  37827. __Pyx_INCREF(function);
  37828. __Pyx_DECREF_SET(__pyx_t_7, function);
  37829. }
  37830. }
  37831. __pyx_t_6 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_v_context) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_context);
  37832. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  37833. if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 2289, __pyx_L5_error)
  37834. __Pyx_GOTREF(__pyx_t_6);
  37835. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  37836. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  37837. /* "uvloop/loop.pyx":2288
  37838. *
  37839. * if self._exception_handler is None:
  37840. * try: # <<<<<<<<<<<<<<
  37841. * self.default_exception_handler(context)
  37842. * except Exception:
  37843. */
  37844. }
  37845. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  37846. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  37847. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  37848. goto __pyx_L10_try_end;
  37849. __pyx_L5_error:;
  37850. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  37851. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  37852. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  37853. /* "uvloop/loop.pyx":2290
  37854. * try:
  37855. * self.default_exception_handler(context)
  37856. * except Exception: # <<<<<<<<<<<<<<
  37857. * # Second protection layer for unexpected errors
  37858. * # in the default implementation, as well as for subclassed
  37859. */
  37860. __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
  37861. if (__pyx_t_9) {
  37862. __Pyx_AddTraceback("uvloop.loop.Loop.call_exception_handler", __pyx_clineno, __pyx_lineno, __pyx_filename);
  37863. if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8) < 0) __PYX_ERR(2, 2290, __pyx_L7_except_error)
  37864. __Pyx_GOTREF(__pyx_t_6);
  37865. __Pyx_GOTREF(__pyx_t_7);
  37866. __Pyx_GOTREF(__pyx_t_8);
  37867. /* "uvloop/loop.pyx":2294
  37868. * # in the default implementation, as well as for subclassed
  37869. * # event loops with overloaded "default_exception_handler".
  37870. * aio_logger.error('Exception in default exception handler', # <<<<<<<<<<<<<<
  37871. * exc_info=True)
  37872. * else:
  37873. */
  37874. __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_6uvloop_4loop_aio_logger, __pyx_n_s_error); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 2294, __pyx_L7_except_error)
  37875. __Pyx_GOTREF(__pyx_t_10);
  37876. /* "uvloop/loop.pyx":2295
  37877. * # event loops with overloaded "default_exception_handler".
  37878. * aio_logger.error('Exception in default exception handler',
  37879. * exc_info=True) # <<<<<<<<<<<<<<
  37880. * else:
  37881. * try:
  37882. */
  37883. __pyx_t_11 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 2295, __pyx_L7_except_error)
  37884. __Pyx_GOTREF(__pyx_t_11);
  37885. if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_exc_info, Py_True) < 0) __PYX_ERR(2, 2295, __pyx_L7_except_error)
  37886. /* "uvloop/loop.pyx":2294
  37887. * # in the default implementation, as well as for subclassed
  37888. * # event loops with overloaded "default_exception_handler".
  37889. * aio_logger.error('Exception in default exception handler', # <<<<<<<<<<<<<<
  37890. * exc_info=True)
  37891. * else:
  37892. */
  37893. __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_tuple__60, __pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(2, 2294, __pyx_L7_except_error)
  37894. __Pyx_GOTREF(__pyx_t_12);
  37895. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  37896. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  37897. __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  37898. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  37899. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  37900. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  37901. goto __pyx_L6_exception_handled;
  37902. }
  37903. goto __pyx_L7_except_error;
  37904. __pyx_L7_except_error:;
  37905. /* "uvloop/loop.pyx":2288
  37906. *
  37907. * if self._exception_handler is None:
  37908. * try: # <<<<<<<<<<<<<<
  37909. * self.default_exception_handler(context)
  37910. * except Exception:
  37911. */
  37912. __Pyx_XGIVEREF(__pyx_t_3);
  37913. __Pyx_XGIVEREF(__pyx_t_4);
  37914. __Pyx_XGIVEREF(__pyx_t_5);
  37915. __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
  37916. goto __pyx_L1_error;
  37917. __pyx_L6_exception_handled:;
  37918. __Pyx_XGIVEREF(__pyx_t_3);
  37919. __Pyx_XGIVEREF(__pyx_t_4);
  37920. __Pyx_XGIVEREF(__pyx_t_5);
  37921. __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
  37922. __pyx_L10_try_end:;
  37923. }
  37924. /* "uvloop/loop.pyx":2287
  37925. * self._debug_exception_handler_cnt += 1
  37926. *
  37927. * if self._exception_handler is None: # <<<<<<<<<<<<<<
  37928. * try:
  37929. * self.default_exception_handler(context)
  37930. */
  37931. goto __pyx_L4;
  37932. }
  37933. /* "uvloop/loop.pyx":2297
  37934. * exc_info=True)
  37935. * else:
  37936. * try: # <<<<<<<<<<<<<<
  37937. * self._exception_handler(self, context)
  37938. * except Exception as exc:
  37939. */
  37940. /*else*/ {
  37941. {
  37942. __Pyx_PyThreadState_declare
  37943. __Pyx_PyThreadState_assign
  37944. __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_4, &__pyx_t_3);
  37945. __Pyx_XGOTREF(__pyx_t_5);
  37946. __Pyx_XGOTREF(__pyx_t_4);
  37947. __Pyx_XGOTREF(__pyx_t_3);
  37948. /*try:*/ {
  37949. /* "uvloop/loop.pyx":2298
  37950. * else:
  37951. * try:
  37952. * self._exception_handler(self, context) # <<<<<<<<<<<<<<
  37953. * except Exception as exc:
  37954. * # Exception in the user set custom exception handler.
  37955. */
  37956. __Pyx_INCREF(__pyx_v_self->_exception_handler);
  37957. __pyx_t_7 = __pyx_v_self->_exception_handler; __pyx_t_6 = NULL;
  37958. __pyx_t_9 = 0;
  37959. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
  37960. __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
  37961. if (likely(__pyx_t_6)) {
  37962. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
  37963. __Pyx_INCREF(__pyx_t_6);
  37964. __Pyx_INCREF(function);
  37965. __Pyx_DECREF_SET(__pyx_t_7, function);
  37966. __pyx_t_9 = 1;
  37967. }
  37968. }
  37969. #if CYTHON_FAST_PYCALL
  37970. if (PyFunction_Check(__pyx_t_7)) {
  37971. PyObject *__pyx_temp[3] = {__pyx_t_6, ((PyObject *)__pyx_v_self), __pyx_v_context};
  37972. __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 2298, __pyx_L13_error)
  37973. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  37974. __Pyx_GOTREF(__pyx_t_8);
  37975. } else
  37976. #endif
  37977. #if CYTHON_FAST_PYCCALL
  37978. if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
  37979. PyObject *__pyx_temp[3] = {__pyx_t_6, ((PyObject *)__pyx_v_self), __pyx_v_context};
  37980. __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 2298, __pyx_L13_error)
  37981. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  37982. __Pyx_GOTREF(__pyx_t_8);
  37983. } else
  37984. #endif
  37985. {
  37986. __pyx_t_12 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_12)) __PYX_ERR(2, 2298, __pyx_L13_error)
  37987. __Pyx_GOTREF(__pyx_t_12);
  37988. if (__pyx_t_6) {
  37989. __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_6); __pyx_t_6 = NULL;
  37990. }
  37991. __Pyx_INCREF(((PyObject *)__pyx_v_self));
  37992. __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  37993. PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_9, ((PyObject *)__pyx_v_self));
  37994. __Pyx_INCREF(__pyx_v_context);
  37995. __Pyx_GIVEREF(__pyx_v_context);
  37996. PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_9, __pyx_v_context);
  37997. __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_12, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 2298, __pyx_L13_error)
  37998. __Pyx_GOTREF(__pyx_t_8);
  37999. __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  38000. }
  38001. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  38002. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  38003. /* "uvloop/loop.pyx":2297
  38004. * exc_info=True)
  38005. * else:
  38006. * try: # <<<<<<<<<<<<<<
  38007. * self._exception_handler(self, context)
  38008. * except Exception as exc:
  38009. */
  38010. }
  38011. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  38012. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  38013. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  38014. goto __pyx_L18_try_end;
  38015. __pyx_L13_error:;
  38016. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  38017. __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
  38018. __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
  38019. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  38020. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  38021. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  38022. /* "uvloop/loop.pyx":2299
  38023. * try:
  38024. * self._exception_handler(self, context)
  38025. * except Exception as exc: # <<<<<<<<<<<<<<
  38026. * # Exception in the user set custom exception handler.
  38027. * try:
  38028. */
  38029. __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
  38030. if (__pyx_t_9) {
  38031. __Pyx_AddTraceback("uvloop.loop.Loop.call_exception_handler", __pyx_clineno, __pyx_lineno, __pyx_filename);
  38032. if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_12) < 0) __PYX_ERR(2, 2299, __pyx_L15_except_error)
  38033. __Pyx_GOTREF(__pyx_t_8);
  38034. __Pyx_GOTREF(__pyx_t_7);
  38035. __Pyx_GOTREF(__pyx_t_12);
  38036. __Pyx_INCREF(__pyx_t_7);
  38037. __pyx_v_exc = __pyx_t_7;
  38038. /*try:*/ {
  38039. /* "uvloop/loop.pyx":2301
  38040. * except Exception as exc:
  38041. * # Exception in the user set custom exception handler.
  38042. * try: # <<<<<<<<<<<<<<
  38043. * # Let's try default handler.
  38044. * self.default_exception_handler({
  38045. */
  38046. {
  38047. __Pyx_PyThreadState_declare
  38048. __Pyx_PyThreadState_assign
  38049. __Pyx_ExceptionSave(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
  38050. __Pyx_XGOTREF(__pyx_t_13);
  38051. __Pyx_XGOTREF(__pyx_t_14);
  38052. __Pyx_XGOTREF(__pyx_t_15);
  38053. /*try:*/ {
  38054. /* "uvloop/loop.pyx":2303
  38055. * try:
  38056. * # Let's try default handler.
  38057. * self.default_exception_handler({ # <<<<<<<<<<<<<<
  38058. * 'message': 'Unhandled error in exception handler',
  38059. * 'exception': exc,
  38060. */
  38061. __pyx_t_11 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_default_exception_handler); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 2303, __pyx_L26_error)
  38062. __Pyx_GOTREF(__pyx_t_11);
  38063. /* "uvloop/loop.pyx":2304
  38064. * # Let's try default handler.
  38065. * self.default_exception_handler({
  38066. * 'message': 'Unhandled error in exception handler', # <<<<<<<<<<<<<<
  38067. * 'exception': exc,
  38068. * 'context': context,
  38069. */
  38070. __pyx_t_10 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 2304, __pyx_L26_error)
  38071. __Pyx_GOTREF(__pyx_t_10);
  38072. if (PyDict_SetItem(__pyx_t_10, __pyx_n_u_message, __pyx_kp_u_Unhandled_error_in_exception_han) < 0) __PYX_ERR(2, 2304, __pyx_L26_error)
  38073. /* "uvloop/loop.pyx":2305
  38074. * self.default_exception_handler({
  38075. * 'message': 'Unhandled error in exception handler',
  38076. * 'exception': exc, # <<<<<<<<<<<<<<
  38077. * 'context': context,
  38078. * })
  38079. */
  38080. if (PyDict_SetItem(__pyx_t_10, __pyx_n_u_exception, __pyx_v_exc) < 0) __PYX_ERR(2, 2304, __pyx_L26_error)
  38081. /* "uvloop/loop.pyx":2306
  38082. * 'message': 'Unhandled error in exception handler',
  38083. * 'exception': exc,
  38084. * 'context': context, # <<<<<<<<<<<<<<
  38085. * })
  38086. * except Exception:
  38087. */
  38088. if (PyDict_SetItem(__pyx_t_10, __pyx_n_u_context, __pyx_v_context) < 0) __PYX_ERR(2, 2304, __pyx_L26_error)
  38089. __pyx_t_16 = NULL;
  38090. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) {
  38091. __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_11);
  38092. if (likely(__pyx_t_16)) {
  38093. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
  38094. __Pyx_INCREF(__pyx_t_16);
  38095. __Pyx_INCREF(function);
  38096. __Pyx_DECREF_SET(__pyx_t_11, function);
  38097. }
  38098. }
  38099. __pyx_t_6 = (__pyx_t_16) ? __Pyx_PyObject_Call2Args(__pyx_t_11, __pyx_t_16, __pyx_t_10) : __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_10);
  38100. __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
  38101. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  38102. if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 2303, __pyx_L26_error)
  38103. __Pyx_GOTREF(__pyx_t_6);
  38104. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  38105. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  38106. /* "uvloop/loop.pyx":2301
  38107. * except Exception as exc:
  38108. * # Exception in the user set custom exception handler.
  38109. * try: # <<<<<<<<<<<<<<
  38110. * # Let's try default handler.
  38111. * self.default_exception_handler({
  38112. */
  38113. }
  38114. __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
  38115. __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
  38116. __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
  38117. goto __pyx_L33_try_end;
  38118. __pyx_L26_error:;
  38119. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  38120. __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
  38121. __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
  38122. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  38123. /* "uvloop/loop.pyx":2308
  38124. * 'context': context,
  38125. * })
  38126. * except Exception: # <<<<<<<<<<<<<<
  38127. * # Guard 'default_exception_handler' in case it is
  38128. * # overloaded.
  38129. */
  38130. __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
  38131. if (__pyx_t_9) {
  38132. __Pyx_AddTraceback("uvloop.loop.Loop.call_exception_handler", __pyx_clineno, __pyx_lineno, __pyx_filename);
  38133. if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_11, &__pyx_t_10) < 0) __PYX_ERR(2, 2308, __pyx_L28_except_error)
  38134. __Pyx_GOTREF(__pyx_t_6);
  38135. __Pyx_GOTREF(__pyx_t_11);
  38136. __Pyx_GOTREF(__pyx_t_10);
  38137. /* "uvloop/loop.pyx":2311
  38138. * # Guard 'default_exception_handler' in case it is
  38139. * # overloaded.
  38140. * aio_logger.error('Exception in default exception handler ' # <<<<<<<<<<<<<<
  38141. * 'while handling an unexpected error '
  38142. * 'in custom exception handler',
  38143. */
  38144. __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_6uvloop_4loop_aio_logger, __pyx_n_s_error); if (unlikely(!__pyx_t_16)) __PYX_ERR(2, 2311, __pyx_L28_except_error)
  38145. __Pyx_GOTREF(__pyx_t_16);
  38146. /* "uvloop/loop.pyx":2314
  38147. * 'while handling an unexpected error '
  38148. * 'in custom exception handler',
  38149. * exc_info=True) # <<<<<<<<<<<<<<
  38150. *
  38151. * def add_reader(self, fileobj, callback, *args):
  38152. */
  38153. __pyx_t_17 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_17)) __PYX_ERR(2, 2314, __pyx_L28_except_error)
  38154. __Pyx_GOTREF(__pyx_t_17);
  38155. if (PyDict_SetItem(__pyx_t_17, __pyx_n_s_exc_info, Py_True) < 0) __PYX_ERR(2, 2314, __pyx_L28_except_error)
  38156. /* "uvloop/loop.pyx":2311
  38157. * # Guard 'default_exception_handler' in case it is
  38158. * # overloaded.
  38159. * aio_logger.error('Exception in default exception handler ' # <<<<<<<<<<<<<<
  38160. * 'while handling an unexpected error '
  38161. * 'in custom exception handler',
  38162. */
  38163. __pyx_t_18 = __Pyx_PyObject_Call(__pyx_t_16, __pyx_tuple__61, __pyx_t_17); if (unlikely(!__pyx_t_18)) __PYX_ERR(2, 2311, __pyx_L28_except_error)
  38164. __Pyx_GOTREF(__pyx_t_18);
  38165. __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
  38166. __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
  38167. __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  38168. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  38169. __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
  38170. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  38171. goto __pyx_L27_exception_handled;
  38172. }
  38173. goto __pyx_L28_except_error;
  38174. __pyx_L28_except_error:;
  38175. /* "uvloop/loop.pyx":2301
  38176. * except Exception as exc:
  38177. * # Exception in the user set custom exception handler.
  38178. * try: # <<<<<<<<<<<<<<
  38179. * # Let's try default handler.
  38180. * self.default_exception_handler({
  38181. */
  38182. __Pyx_XGIVEREF(__pyx_t_13);
  38183. __Pyx_XGIVEREF(__pyx_t_14);
  38184. __Pyx_XGIVEREF(__pyx_t_15);
  38185. __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
  38186. goto __pyx_L24_error;
  38187. __pyx_L27_exception_handled:;
  38188. __Pyx_XGIVEREF(__pyx_t_13);
  38189. __Pyx_XGIVEREF(__pyx_t_14);
  38190. __Pyx_XGIVEREF(__pyx_t_15);
  38191. __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
  38192. __pyx_L33_try_end:;
  38193. }
  38194. }
  38195. /* "uvloop/loop.pyx":2299
  38196. * try:
  38197. * self._exception_handler(self, context)
  38198. * except Exception as exc: # <<<<<<<<<<<<<<
  38199. * # Exception in the user set custom exception handler.
  38200. * try:
  38201. */
  38202. /*finally:*/ {
  38203. /*normal exit:*/{
  38204. __Pyx_DECREF(__pyx_v_exc);
  38205. __pyx_v_exc = NULL;
  38206. goto __pyx_L25;
  38207. }
  38208. __pyx_L24_error:;
  38209. /*exception exit:*/{
  38210. __Pyx_PyThreadState_declare
  38211. __Pyx_PyThreadState_assign
  38212. __pyx_t_15 = 0; __pyx_t_14 = 0; __pyx_t_13 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0;
  38213. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  38214. __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
  38215. __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
  38216. __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
  38217. __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
  38218. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  38219. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_21, &__pyx_t_22, &__pyx_t_23);
  38220. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13) < 0)) __Pyx_ErrFetch(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13);
  38221. __Pyx_XGOTREF(__pyx_t_15);
  38222. __Pyx_XGOTREF(__pyx_t_14);
  38223. __Pyx_XGOTREF(__pyx_t_13);
  38224. __Pyx_XGOTREF(__pyx_t_21);
  38225. __Pyx_XGOTREF(__pyx_t_22);
  38226. __Pyx_XGOTREF(__pyx_t_23);
  38227. __pyx_t_9 = __pyx_lineno; __pyx_t_19 = __pyx_clineno; __pyx_t_20 = __pyx_filename;
  38228. {
  38229. __Pyx_DECREF(__pyx_v_exc);
  38230. __pyx_v_exc = NULL;
  38231. }
  38232. if (PY_MAJOR_VERSION >= 3) {
  38233. __Pyx_XGIVEREF(__pyx_t_21);
  38234. __Pyx_XGIVEREF(__pyx_t_22);
  38235. __Pyx_XGIVEREF(__pyx_t_23);
  38236. __Pyx_ExceptionReset(__pyx_t_21, __pyx_t_22, __pyx_t_23);
  38237. }
  38238. __Pyx_XGIVEREF(__pyx_t_15);
  38239. __Pyx_XGIVEREF(__pyx_t_14);
  38240. __Pyx_XGIVEREF(__pyx_t_13);
  38241. __Pyx_ErrRestore(__pyx_t_15, __pyx_t_14, __pyx_t_13);
  38242. __pyx_t_15 = 0; __pyx_t_14 = 0; __pyx_t_13 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0;
  38243. __pyx_lineno = __pyx_t_9; __pyx_clineno = __pyx_t_19; __pyx_filename = __pyx_t_20;
  38244. goto __pyx_L15_except_error;
  38245. }
  38246. __pyx_L25:;
  38247. }
  38248. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  38249. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  38250. __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
  38251. goto __pyx_L14_exception_handled;
  38252. }
  38253. goto __pyx_L15_except_error;
  38254. __pyx_L15_except_error:;
  38255. /* "uvloop/loop.pyx":2297
  38256. * exc_info=True)
  38257. * else:
  38258. * try: # <<<<<<<<<<<<<<
  38259. * self._exception_handler(self, context)
  38260. * except Exception as exc:
  38261. */
  38262. __Pyx_XGIVEREF(__pyx_t_5);
  38263. __Pyx_XGIVEREF(__pyx_t_4);
  38264. __Pyx_XGIVEREF(__pyx_t_3);
  38265. __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_4, __pyx_t_3);
  38266. goto __pyx_L1_error;
  38267. __pyx_L14_exception_handled:;
  38268. __Pyx_XGIVEREF(__pyx_t_5);
  38269. __Pyx_XGIVEREF(__pyx_t_4);
  38270. __Pyx_XGIVEREF(__pyx_t_3);
  38271. __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_4, __pyx_t_3);
  38272. __pyx_L18_try_end:;
  38273. }
  38274. }
  38275. __pyx_L4:;
  38276. /* "uvloop/loop.pyx":2265
  38277. * self._exception_handler = handler
  38278. *
  38279. * def call_exception_handler(self, context): # <<<<<<<<<<<<<<
  38280. * """Call the current event loop's exception handler.
  38281. *
  38282. */
  38283. /* function exit code */
  38284. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  38285. goto __pyx_L0;
  38286. __pyx_L1_error:;
  38287. __Pyx_XDECREF(__pyx_t_6);
  38288. __Pyx_XDECREF(__pyx_t_7);
  38289. __Pyx_XDECREF(__pyx_t_8);
  38290. __Pyx_XDECREF(__pyx_t_10);
  38291. __Pyx_XDECREF(__pyx_t_11);
  38292. __Pyx_XDECREF(__pyx_t_12);
  38293. __Pyx_XDECREF(__pyx_t_16);
  38294. __Pyx_XDECREF(__pyx_t_17);
  38295. __Pyx_XDECREF(__pyx_t_18);
  38296. __Pyx_AddTraceback("uvloop.loop.Loop.call_exception_handler", __pyx_clineno, __pyx_lineno, __pyx_filename);
  38297. __pyx_r = NULL;
  38298. __pyx_L0:;
  38299. __Pyx_XDECREF(__pyx_v_exc);
  38300. __Pyx_XGIVEREF(__pyx_r);
  38301. __Pyx_RefNannyFinishContext();
  38302. return __pyx_r;
  38303. }
  38304. /* "uvloop/loop.pyx":2316
  38305. * exc_info=True)
  38306. *
  38307. * def add_reader(self, fileobj, callback, *args): # <<<<<<<<<<<<<<
  38308. * """Add a reader callback."""
  38309. * if len(args) == 0:
  38310. */
  38311. /* Python wrapper */
  38312. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_76add_reader(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  38313. static char __pyx_doc_6uvloop_4loop_4Loop_75add_reader[] = "Loop.add_reader(self, fileobj, callback, *args)\nAdd a reader callback.";
  38314. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_76add_reader(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  38315. PyObject *__pyx_v_fileobj = 0;
  38316. PyObject *__pyx_v_callback = 0;
  38317. PyObject *__pyx_v_args = 0;
  38318. PyObject *__pyx_r = 0;
  38319. __Pyx_RefNannyDeclarations
  38320. __Pyx_RefNannySetupContext("add_reader (wrapper)", 0);
  38321. if (PyTuple_GET_SIZE(__pyx_args) > 2) {
  38322. __pyx_v_args = PyTuple_GetSlice(__pyx_args, 2, PyTuple_GET_SIZE(__pyx_args));
  38323. if (unlikely(!__pyx_v_args)) {
  38324. __Pyx_RefNannyFinishContext();
  38325. return NULL;
  38326. }
  38327. __Pyx_GOTREF(__pyx_v_args);
  38328. } else {
  38329. __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  38330. }
  38331. {
  38332. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_fileobj,&__pyx_n_s_callback,0};
  38333. PyObject* values[2] = {0,0};
  38334. if (unlikely(__pyx_kwds)) {
  38335. Py_ssize_t kw_args;
  38336. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  38337. switch (pos_args) {
  38338. default:
  38339. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  38340. CYTHON_FALLTHROUGH;
  38341. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  38342. CYTHON_FALLTHROUGH;
  38343. case 0: break;
  38344. }
  38345. kw_args = PyDict_Size(__pyx_kwds);
  38346. switch (pos_args) {
  38347. case 0:
  38348. if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_fileobj)) != 0)) kw_args--;
  38349. else goto __pyx_L5_argtuple_error;
  38350. CYTHON_FALLTHROUGH;
  38351. case 1:
  38352. if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_callback)) != 0)) kw_args--;
  38353. else {
  38354. __Pyx_RaiseArgtupleInvalid("add_reader", 0, 2, 2, 1); __PYX_ERR(2, 2316, __pyx_L3_error)
  38355. }
  38356. }
  38357. if (unlikely(kw_args > 0)) {
  38358. const Py_ssize_t used_pos_args = (pos_args < 2) ? pos_args : 2;
  38359. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "add_reader") < 0)) __PYX_ERR(2, 2316, __pyx_L3_error)
  38360. }
  38361. } else if (PyTuple_GET_SIZE(__pyx_args) < 2) {
  38362. goto __pyx_L5_argtuple_error;
  38363. } else {
  38364. values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  38365. values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  38366. }
  38367. __pyx_v_fileobj = values[0];
  38368. __pyx_v_callback = values[1];
  38369. }
  38370. goto __pyx_L4_argument_unpacking_done;
  38371. __pyx_L5_argtuple_error:;
  38372. __Pyx_RaiseArgtupleInvalid("add_reader", 0, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 2316, __pyx_L3_error)
  38373. __pyx_L3_error:;
  38374. __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  38375. __Pyx_AddTraceback("uvloop.loop.Loop.add_reader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  38376. __Pyx_RefNannyFinishContext();
  38377. return NULL;
  38378. __pyx_L4_argument_unpacking_done:;
  38379. __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_75add_reader(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self), __pyx_v_fileobj, __pyx_v_callback, __pyx_v_args);
  38380. /* function exit code */
  38381. __Pyx_XDECREF(__pyx_v_args);
  38382. __Pyx_RefNannyFinishContext();
  38383. return __pyx_r;
  38384. }
  38385. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_75add_reader(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_fileobj, PyObject *__pyx_v_callback, PyObject *__pyx_v_args) {
  38386. PyObject *__pyx_r = NULL;
  38387. __Pyx_RefNannyDeclarations
  38388. Py_ssize_t __pyx_t_1;
  38389. int __pyx_t_2;
  38390. PyObject *__pyx_t_3 = NULL;
  38391. PyObject *__pyx_t_4 = NULL;
  38392. __Pyx_RefNannySetupContext("add_reader", 0);
  38393. __Pyx_INCREF(__pyx_v_args);
  38394. /* "uvloop/loop.pyx":2318
  38395. * def add_reader(self, fileobj, callback, *args):
  38396. * """Add a reader callback."""
  38397. * if len(args) == 0: # <<<<<<<<<<<<<<
  38398. * args = None
  38399. * self._add_reader(fileobj, new_Handle(self, callback, args, None))
  38400. */
  38401. __pyx_t_1 = PyTuple_GET_SIZE(__pyx_v_args); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(2, 2318, __pyx_L1_error)
  38402. __pyx_t_2 = ((__pyx_t_1 == 0) != 0);
  38403. if (__pyx_t_2) {
  38404. /* "uvloop/loop.pyx":2319
  38405. * """Add a reader callback."""
  38406. * if len(args) == 0:
  38407. * args = None # <<<<<<<<<<<<<<
  38408. * self._add_reader(fileobj, new_Handle(self, callback, args, None))
  38409. *
  38410. */
  38411. __Pyx_INCREF(Py_None);
  38412. __Pyx_DECREF_SET(__pyx_v_args, ((PyObject*)Py_None));
  38413. /* "uvloop/loop.pyx":2318
  38414. * def add_reader(self, fileobj, callback, *args):
  38415. * """Add a reader callback."""
  38416. * if len(args) == 0: # <<<<<<<<<<<<<<
  38417. * args = None
  38418. * self._add_reader(fileobj, new_Handle(self, callback, args, None))
  38419. */
  38420. }
  38421. /* "uvloop/loop.pyx":2320
  38422. * if len(args) == 0:
  38423. * args = None
  38424. * self._add_reader(fileobj, new_Handle(self, callback, args, None)) # <<<<<<<<<<<<<<
  38425. *
  38426. * def remove_reader(self, fileobj):
  38427. */
  38428. __pyx_t_3 = __pyx_f_6uvloop_4loop_new_Handle(__pyx_v_self, __pyx_v_callback, __pyx_v_args, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2320, __pyx_L1_error)
  38429. __Pyx_GOTREF(__pyx_t_3);
  38430. if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6uvloop_4loop_Handle))))) __PYX_ERR(2, 2320, __pyx_L1_error)
  38431. __pyx_t_4 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_vtab)->_add_reader(__pyx_v_self, __pyx_v_fileobj, ((struct __pyx_obj_6uvloop_4loop_Handle *)__pyx_t_3)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2320, __pyx_L1_error)
  38432. __Pyx_GOTREF(__pyx_t_4);
  38433. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  38434. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  38435. /* "uvloop/loop.pyx":2316
  38436. * exc_info=True)
  38437. *
  38438. * def add_reader(self, fileobj, callback, *args): # <<<<<<<<<<<<<<
  38439. * """Add a reader callback."""
  38440. * if len(args) == 0:
  38441. */
  38442. /* function exit code */
  38443. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  38444. goto __pyx_L0;
  38445. __pyx_L1_error:;
  38446. __Pyx_XDECREF(__pyx_t_3);
  38447. __Pyx_XDECREF(__pyx_t_4);
  38448. __Pyx_AddTraceback("uvloop.loop.Loop.add_reader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  38449. __pyx_r = NULL;
  38450. __pyx_L0:;
  38451. __Pyx_XDECREF(__pyx_v_args);
  38452. __Pyx_XGIVEREF(__pyx_r);
  38453. __Pyx_RefNannyFinishContext();
  38454. return __pyx_r;
  38455. }
  38456. /* "uvloop/loop.pyx":2322
  38457. * self._add_reader(fileobj, new_Handle(self, callback, args, None))
  38458. *
  38459. * def remove_reader(self, fileobj): # <<<<<<<<<<<<<<
  38460. * """Remove a reader callback."""
  38461. * self._remove_reader(fileobj)
  38462. */
  38463. /* Python wrapper */
  38464. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_78remove_reader(PyObject *__pyx_v_self, PyObject *__pyx_v_fileobj); /*proto*/
  38465. static char __pyx_doc_6uvloop_4loop_4Loop_77remove_reader[] = "Loop.remove_reader(self, fileobj)\nRemove a reader callback.";
  38466. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_78remove_reader(PyObject *__pyx_v_self, PyObject *__pyx_v_fileobj) {
  38467. PyObject *__pyx_r = 0;
  38468. __Pyx_RefNannyDeclarations
  38469. __Pyx_RefNannySetupContext("remove_reader (wrapper)", 0);
  38470. __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_77remove_reader(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self), ((PyObject *)__pyx_v_fileobj));
  38471. /* function exit code */
  38472. __Pyx_RefNannyFinishContext();
  38473. return __pyx_r;
  38474. }
  38475. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_77remove_reader(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_fileobj) {
  38476. PyObject *__pyx_r = NULL;
  38477. __Pyx_RefNannyDeclarations
  38478. PyObject *__pyx_t_1 = NULL;
  38479. __Pyx_RefNannySetupContext("remove_reader", 0);
  38480. /* "uvloop/loop.pyx":2324
  38481. * def remove_reader(self, fileobj):
  38482. * """Remove a reader callback."""
  38483. * self._remove_reader(fileobj) # <<<<<<<<<<<<<<
  38484. *
  38485. * def add_writer(self, fileobj, callback, *args):
  38486. */
  38487. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_vtab)->_remove_reader(__pyx_v_self, __pyx_v_fileobj); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2324, __pyx_L1_error)
  38488. __Pyx_GOTREF(__pyx_t_1);
  38489. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  38490. /* "uvloop/loop.pyx":2322
  38491. * self._add_reader(fileobj, new_Handle(self, callback, args, None))
  38492. *
  38493. * def remove_reader(self, fileobj): # <<<<<<<<<<<<<<
  38494. * """Remove a reader callback."""
  38495. * self._remove_reader(fileobj)
  38496. */
  38497. /* function exit code */
  38498. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  38499. goto __pyx_L0;
  38500. __pyx_L1_error:;
  38501. __Pyx_XDECREF(__pyx_t_1);
  38502. __Pyx_AddTraceback("uvloop.loop.Loop.remove_reader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  38503. __pyx_r = NULL;
  38504. __pyx_L0:;
  38505. __Pyx_XGIVEREF(__pyx_r);
  38506. __Pyx_RefNannyFinishContext();
  38507. return __pyx_r;
  38508. }
  38509. /* "uvloop/loop.pyx":2326
  38510. * self._remove_reader(fileobj)
  38511. *
  38512. * def add_writer(self, fileobj, callback, *args): # <<<<<<<<<<<<<<
  38513. * """Add a writer callback.."""
  38514. * if len(args) == 0:
  38515. */
  38516. /* Python wrapper */
  38517. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_80add_writer(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  38518. static char __pyx_doc_6uvloop_4loop_4Loop_79add_writer[] = "Loop.add_writer(self, fileobj, callback, *args)\nAdd a writer callback..";
  38519. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_80add_writer(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  38520. PyObject *__pyx_v_fileobj = 0;
  38521. PyObject *__pyx_v_callback = 0;
  38522. PyObject *__pyx_v_args = 0;
  38523. PyObject *__pyx_r = 0;
  38524. __Pyx_RefNannyDeclarations
  38525. __Pyx_RefNannySetupContext("add_writer (wrapper)", 0);
  38526. if (PyTuple_GET_SIZE(__pyx_args) > 2) {
  38527. __pyx_v_args = PyTuple_GetSlice(__pyx_args, 2, PyTuple_GET_SIZE(__pyx_args));
  38528. if (unlikely(!__pyx_v_args)) {
  38529. __Pyx_RefNannyFinishContext();
  38530. return NULL;
  38531. }
  38532. __Pyx_GOTREF(__pyx_v_args);
  38533. } else {
  38534. __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  38535. }
  38536. {
  38537. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_fileobj,&__pyx_n_s_callback,0};
  38538. PyObject* values[2] = {0,0};
  38539. if (unlikely(__pyx_kwds)) {
  38540. Py_ssize_t kw_args;
  38541. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  38542. switch (pos_args) {
  38543. default:
  38544. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  38545. CYTHON_FALLTHROUGH;
  38546. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  38547. CYTHON_FALLTHROUGH;
  38548. case 0: break;
  38549. }
  38550. kw_args = PyDict_Size(__pyx_kwds);
  38551. switch (pos_args) {
  38552. case 0:
  38553. if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_fileobj)) != 0)) kw_args--;
  38554. else goto __pyx_L5_argtuple_error;
  38555. CYTHON_FALLTHROUGH;
  38556. case 1:
  38557. if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_callback)) != 0)) kw_args--;
  38558. else {
  38559. __Pyx_RaiseArgtupleInvalid("add_writer", 0, 2, 2, 1); __PYX_ERR(2, 2326, __pyx_L3_error)
  38560. }
  38561. }
  38562. if (unlikely(kw_args > 0)) {
  38563. const Py_ssize_t used_pos_args = (pos_args < 2) ? pos_args : 2;
  38564. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "add_writer") < 0)) __PYX_ERR(2, 2326, __pyx_L3_error)
  38565. }
  38566. } else if (PyTuple_GET_SIZE(__pyx_args) < 2) {
  38567. goto __pyx_L5_argtuple_error;
  38568. } else {
  38569. values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  38570. values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  38571. }
  38572. __pyx_v_fileobj = values[0];
  38573. __pyx_v_callback = values[1];
  38574. }
  38575. goto __pyx_L4_argument_unpacking_done;
  38576. __pyx_L5_argtuple_error:;
  38577. __Pyx_RaiseArgtupleInvalid("add_writer", 0, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 2326, __pyx_L3_error)
  38578. __pyx_L3_error:;
  38579. __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  38580. __Pyx_AddTraceback("uvloop.loop.Loop.add_writer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  38581. __Pyx_RefNannyFinishContext();
  38582. return NULL;
  38583. __pyx_L4_argument_unpacking_done:;
  38584. __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_79add_writer(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self), __pyx_v_fileobj, __pyx_v_callback, __pyx_v_args);
  38585. /* function exit code */
  38586. __Pyx_XDECREF(__pyx_v_args);
  38587. __Pyx_RefNannyFinishContext();
  38588. return __pyx_r;
  38589. }
  38590. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_79add_writer(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_fileobj, PyObject *__pyx_v_callback, PyObject *__pyx_v_args) {
  38591. PyObject *__pyx_r = NULL;
  38592. __Pyx_RefNannyDeclarations
  38593. Py_ssize_t __pyx_t_1;
  38594. int __pyx_t_2;
  38595. PyObject *__pyx_t_3 = NULL;
  38596. PyObject *__pyx_t_4 = NULL;
  38597. __Pyx_RefNannySetupContext("add_writer", 0);
  38598. __Pyx_INCREF(__pyx_v_args);
  38599. /* "uvloop/loop.pyx":2328
  38600. * def add_writer(self, fileobj, callback, *args):
  38601. * """Add a writer callback.."""
  38602. * if len(args) == 0: # <<<<<<<<<<<<<<
  38603. * args = None
  38604. * self._add_writer(fileobj, new_Handle(self, callback, args, None))
  38605. */
  38606. __pyx_t_1 = PyTuple_GET_SIZE(__pyx_v_args); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(2, 2328, __pyx_L1_error)
  38607. __pyx_t_2 = ((__pyx_t_1 == 0) != 0);
  38608. if (__pyx_t_2) {
  38609. /* "uvloop/loop.pyx":2329
  38610. * """Add a writer callback.."""
  38611. * if len(args) == 0:
  38612. * args = None # <<<<<<<<<<<<<<
  38613. * self._add_writer(fileobj, new_Handle(self, callback, args, None))
  38614. *
  38615. */
  38616. __Pyx_INCREF(Py_None);
  38617. __Pyx_DECREF_SET(__pyx_v_args, ((PyObject*)Py_None));
  38618. /* "uvloop/loop.pyx":2328
  38619. * def add_writer(self, fileobj, callback, *args):
  38620. * """Add a writer callback.."""
  38621. * if len(args) == 0: # <<<<<<<<<<<<<<
  38622. * args = None
  38623. * self._add_writer(fileobj, new_Handle(self, callback, args, None))
  38624. */
  38625. }
  38626. /* "uvloop/loop.pyx":2330
  38627. * if len(args) == 0:
  38628. * args = None
  38629. * self._add_writer(fileobj, new_Handle(self, callback, args, None)) # <<<<<<<<<<<<<<
  38630. *
  38631. * def remove_writer(self, fileobj):
  38632. */
  38633. __pyx_t_3 = __pyx_f_6uvloop_4loop_new_Handle(__pyx_v_self, __pyx_v_callback, __pyx_v_args, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2330, __pyx_L1_error)
  38634. __Pyx_GOTREF(__pyx_t_3);
  38635. if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6uvloop_4loop_Handle))))) __PYX_ERR(2, 2330, __pyx_L1_error)
  38636. __pyx_t_4 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_vtab)->_add_writer(__pyx_v_self, __pyx_v_fileobj, ((struct __pyx_obj_6uvloop_4loop_Handle *)__pyx_t_3)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2330, __pyx_L1_error)
  38637. __Pyx_GOTREF(__pyx_t_4);
  38638. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  38639. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  38640. /* "uvloop/loop.pyx":2326
  38641. * self._remove_reader(fileobj)
  38642. *
  38643. * def add_writer(self, fileobj, callback, *args): # <<<<<<<<<<<<<<
  38644. * """Add a writer callback.."""
  38645. * if len(args) == 0:
  38646. */
  38647. /* function exit code */
  38648. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  38649. goto __pyx_L0;
  38650. __pyx_L1_error:;
  38651. __Pyx_XDECREF(__pyx_t_3);
  38652. __Pyx_XDECREF(__pyx_t_4);
  38653. __Pyx_AddTraceback("uvloop.loop.Loop.add_writer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  38654. __pyx_r = NULL;
  38655. __pyx_L0:;
  38656. __Pyx_XDECREF(__pyx_v_args);
  38657. __Pyx_XGIVEREF(__pyx_r);
  38658. __Pyx_RefNannyFinishContext();
  38659. return __pyx_r;
  38660. }
  38661. /* "uvloop/loop.pyx":2332
  38662. * self._add_writer(fileobj, new_Handle(self, callback, args, None))
  38663. *
  38664. * def remove_writer(self, fileobj): # <<<<<<<<<<<<<<
  38665. * """Remove a writer callback."""
  38666. * self._remove_writer(fileobj)
  38667. */
  38668. /* Python wrapper */
  38669. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_82remove_writer(PyObject *__pyx_v_self, PyObject *__pyx_v_fileobj); /*proto*/
  38670. static char __pyx_doc_6uvloop_4loop_4Loop_81remove_writer[] = "Loop.remove_writer(self, fileobj)\nRemove a writer callback.";
  38671. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_82remove_writer(PyObject *__pyx_v_self, PyObject *__pyx_v_fileobj) {
  38672. PyObject *__pyx_r = 0;
  38673. __Pyx_RefNannyDeclarations
  38674. __Pyx_RefNannySetupContext("remove_writer (wrapper)", 0);
  38675. __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_81remove_writer(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self), ((PyObject *)__pyx_v_fileobj));
  38676. /* function exit code */
  38677. __Pyx_RefNannyFinishContext();
  38678. return __pyx_r;
  38679. }
  38680. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_81remove_writer(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_fileobj) {
  38681. PyObject *__pyx_r = NULL;
  38682. __Pyx_RefNannyDeclarations
  38683. PyObject *__pyx_t_1 = NULL;
  38684. __Pyx_RefNannySetupContext("remove_writer", 0);
  38685. /* "uvloop/loop.pyx":2334
  38686. * def remove_writer(self, fileobj):
  38687. * """Remove a writer callback."""
  38688. * self._remove_writer(fileobj) # <<<<<<<<<<<<<<
  38689. *
  38690. * @cython.iterable_coroutine
  38691. */
  38692. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_vtab)->_remove_writer(__pyx_v_self, __pyx_v_fileobj); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2334, __pyx_L1_error)
  38693. __Pyx_GOTREF(__pyx_t_1);
  38694. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  38695. /* "uvloop/loop.pyx":2332
  38696. * self._add_writer(fileobj, new_Handle(self, callback, args, None))
  38697. *
  38698. * def remove_writer(self, fileobj): # <<<<<<<<<<<<<<
  38699. * """Remove a writer callback."""
  38700. * self._remove_writer(fileobj)
  38701. */
  38702. /* function exit code */
  38703. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  38704. goto __pyx_L0;
  38705. __pyx_L1_error:;
  38706. __Pyx_XDECREF(__pyx_t_1);
  38707. __Pyx_AddTraceback("uvloop.loop.Loop.remove_writer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  38708. __pyx_r = NULL;
  38709. __pyx_L0:;
  38710. __Pyx_XGIVEREF(__pyx_r);
  38711. __Pyx_RefNannyFinishContext();
  38712. return __pyx_r;
  38713. }
  38714. static PyObject *__pyx_gb_6uvloop_4loop_4Loop_85generator7(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
  38715. /* "uvloop/loop.pyx":2337
  38716. *
  38717. * @cython.iterable_coroutine
  38718. * async def sock_recv(self, sock, n): # <<<<<<<<<<<<<<
  38719. * """Receive data from the socket.
  38720. *
  38721. */
  38722. /* Python wrapper */
  38723. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_84sock_recv(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  38724. static char __pyx_doc_6uvloop_4loop_4Loop_83sock_recv[] = "Loop.sock_recv(self, sock, n)\nReceive data from the socket.\n\n The return value is a bytes object representing the data received.\n The maximum amount of data to be received at once is specified by\n nbytes.\n\n This method is a coroutine.\n ";
  38725. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_84sock_recv(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  38726. PyObject *__pyx_v_sock = 0;
  38727. PyObject *__pyx_v_n = 0;
  38728. PyObject *__pyx_r = 0;
  38729. __Pyx_RefNannyDeclarations
  38730. __Pyx_RefNannySetupContext("sock_recv (wrapper)", 0);
  38731. {
  38732. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sock,&__pyx_n_s_n,0};
  38733. PyObject* values[2] = {0,0};
  38734. if (unlikely(__pyx_kwds)) {
  38735. Py_ssize_t kw_args;
  38736. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  38737. switch (pos_args) {
  38738. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  38739. CYTHON_FALLTHROUGH;
  38740. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  38741. CYTHON_FALLTHROUGH;
  38742. case 0: break;
  38743. default: goto __pyx_L5_argtuple_error;
  38744. }
  38745. kw_args = PyDict_Size(__pyx_kwds);
  38746. switch (pos_args) {
  38747. case 0:
  38748. if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sock)) != 0)) kw_args--;
  38749. else goto __pyx_L5_argtuple_error;
  38750. CYTHON_FALLTHROUGH;
  38751. case 1:
  38752. if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n)) != 0)) kw_args--;
  38753. else {
  38754. __Pyx_RaiseArgtupleInvalid("sock_recv", 1, 2, 2, 1); __PYX_ERR(2, 2337, __pyx_L3_error)
  38755. }
  38756. }
  38757. if (unlikely(kw_args > 0)) {
  38758. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sock_recv") < 0)) __PYX_ERR(2, 2337, __pyx_L3_error)
  38759. }
  38760. } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
  38761. goto __pyx_L5_argtuple_error;
  38762. } else {
  38763. values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  38764. values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  38765. }
  38766. __pyx_v_sock = values[0];
  38767. __pyx_v_n = values[1];
  38768. }
  38769. goto __pyx_L4_argument_unpacking_done;
  38770. __pyx_L5_argtuple_error:;
  38771. __Pyx_RaiseArgtupleInvalid("sock_recv", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 2337, __pyx_L3_error)
  38772. __pyx_L3_error:;
  38773. __Pyx_AddTraceback("uvloop.loop.Loop.sock_recv", __pyx_clineno, __pyx_lineno, __pyx_filename);
  38774. __Pyx_RefNannyFinishContext();
  38775. return NULL;
  38776. __pyx_L4_argument_unpacking_done:;
  38777. __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_83sock_recv(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self), __pyx_v_sock, __pyx_v_n);
  38778. /* function exit code */
  38779. __Pyx_RefNannyFinishContext();
  38780. return __pyx_r;
  38781. }
  38782. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_83sock_recv(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_sock, PyObject *__pyx_v_n) {
  38783. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_14_sock_recv *__pyx_cur_scope;
  38784. PyObject *__pyx_r = NULL;
  38785. __Pyx_RefNannyDeclarations
  38786. __Pyx_RefNannySetupContext("sock_recv", 0);
  38787. __pyx_cur_scope = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_14_sock_recv *)__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_14_sock_recv(__pyx_ptype_6uvloop_4loop___pyx_scope_struct_14_sock_recv, __pyx_empty_tuple, NULL);
  38788. if (unlikely(!__pyx_cur_scope)) {
  38789. __pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_14_sock_recv *)Py_None);
  38790. __Pyx_INCREF(Py_None);
  38791. __PYX_ERR(2, 2337, __pyx_L1_error)
  38792. } else {
  38793. __Pyx_GOTREF(__pyx_cur_scope);
  38794. }
  38795. __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  38796. __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  38797. __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  38798. __pyx_cur_scope->__pyx_v_sock = __pyx_v_sock;
  38799. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_sock);
  38800. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_sock);
  38801. __pyx_cur_scope->__pyx_v_n = __pyx_v_n;
  38802. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_n);
  38803. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_n);
  38804. {
  38805. __pyx_CoroutineObject *gen = __Pyx_IterableCoroutine_New((__pyx_coroutine_body_t) __pyx_gb_6uvloop_4loop_4Loop_85generator7, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_sock_recv, __pyx_n_s_Loop_sock_recv, __pyx_n_s_uvloop_loop); if (unlikely(!gen)) __PYX_ERR(2, 2337, __pyx_L1_error)
  38806. __Pyx_DECREF(__pyx_cur_scope);
  38807. __Pyx_RefNannyFinishContext();
  38808. return (PyObject *) gen;
  38809. }
  38810. /* function exit code */
  38811. __pyx_L1_error:;
  38812. __Pyx_AddTraceback("uvloop.loop.Loop.sock_recv", __pyx_clineno, __pyx_lineno, __pyx_filename);
  38813. __pyx_r = NULL;
  38814. __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  38815. __Pyx_XGIVEREF(__pyx_r);
  38816. __Pyx_RefNannyFinishContext();
  38817. return __pyx_r;
  38818. }
  38819. static PyObject *__pyx_gb_6uvloop_4loop_4Loop_85generator7(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
  38820. {
  38821. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_14_sock_recv *__pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_14_sock_recv *)__pyx_generator->closure);
  38822. PyObject *__pyx_r = NULL;
  38823. int __pyx_t_1;
  38824. int __pyx_t_2;
  38825. PyObject *__pyx_t_3 = NULL;
  38826. PyObject *__pyx_t_4 = NULL;
  38827. PyObject *__pyx_t_5 = NULL;
  38828. int __pyx_t_6;
  38829. PyObject *__pyx_t_7 = NULL;
  38830. __Pyx_RefNannyDeclarations
  38831. __Pyx_RefNannySetupContext("sock_recv", 0);
  38832. switch (__pyx_generator->resume_label) {
  38833. case 0: goto __pyx_L3_first_run;
  38834. case 1: goto __pyx_L7_resume_from_await;
  38835. default: /* CPython raises the right error here */
  38836. __Pyx_RefNannyFinishContext();
  38837. return NULL;
  38838. }
  38839. __pyx_L3_first_run:;
  38840. if (unlikely(!__pyx_sent_value)) __PYX_ERR(2, 2337, __pyx_L1_error)
  38841. /* "uvloop/loop.pyx":2349
  38842. * Handle handle
  38843. *
  38844. * if self._debug and sock.gettimeout() != 0: # <<<<<<<<<<<<<<
  38845. * raise ValueError("the socket must be non-blocking")
  38846. *
  38847. */
  38848. __pyx_t_2 = (__pyx_cur_scope->__pyx_v_self->_debug != 0);
  38849. if (__pyx_t_2) {
  38850. } else {
  38851. __pyx_t_1 = __pyx_t_2;
  38852. goto __pyx_L5_bool_binop_done;
  38853. }
  38854. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_sock, __pyx_n_s_gettimeout); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2349, __pyx_L1_error)
  38855. __Pyx_GOTREF(__pyx_t_4);
  38856. __pyx_t_5 = NULL;
  38857. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
  38858. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
  38859. if (likely(__pyx_t_5)) {
  38860. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  38861. __Pyx_INCREF(__pyx_t_5);
  38862. __Pyx_INCREF(function);
  38863. __Pyx_DECREF_SET(__pyx_t_4, function);
  38864. }
  38865. }
  38866. __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
  38867. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  38868. if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2349, __pyx_L1_error)
  38869. __Pyx_GOTREF(__pyx_t_3);
  38870. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  38871. __pyx_t_4 = __Pyx_PyInt_NeObjC(__pyx_t_3, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2349, __pyx_L1_error)
  38872. __Pyx_GOTREF(__pyx_t_4);
  38873. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  38874. __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(2, 2349, __pyx_L1_error)
  38875. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  38876. __pyx_t_1 = __pyx_t_2;
  38877. __pyx_L5_bool_binop_done:;
  38878. if (unlikely(__pyx_t_1)) {
  38879. /* "uvloop/loop.pyx":2350
  38880. *
  38881. * if self._debug and sock.gettimeout() != 0:
  38882. * raise ValueError("the socket must be non-blocking") # <<<<<<<<<<<<<<
  38883. *
  38884. * fut = _SyncSocketReaderFuture(sock, self)
  38885. */
  38886. __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__62, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2350, __pyx_L1_error)
  38887. __Pyx_GOTREF(__pyx_t_4);
  38888. __Pyx_Raise(__pyx_t_4, 0, 0, 0);
  38889. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  38890. __PYX_ERR(2, 2350, __pyx_L1_error)
  38891. /* "uvloop/loop.pyx":2349
  38892. * Handle handle
  38893. *
  38894. * if self._debug and sock.gettimeout() != 0: # <<<<<<<<<<<<<<
  38895. * raise ValueError("the socket must be non-blocking")
  38896. *
  38897. */
  38898. }
  38899. /* "uvloop/loop.pyx":2352
  38900. * raise ValueError("the socket must be non-blocking")
  38901. *
  38902. * fut = _SyncSocketReaderFuture(sock, self) # <<<<<<<<<<<<<<
  38903. * handle = new_MethodHandle3(
  38904. * self,
  38905. */
  38906. __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_SyncSocketReaderFuture); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2352, __pyx_L1_error)
  38907. __Pyx_GOTREF(__pyx_t_3);
  38908. __pyx_t_5 = NULL;
  38909. __pyx_t_6 = 0;
  38910. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
  38911. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
  38912. if (likely(__pyx_t_5)) {
  38913. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  38914. __Pyx_INCREF(__pyx_t_5);
  38915. __Pyx_INCREF(function);
  38916. __Pyx_DECREF_SET(__pyx_t_3, function);
  38917. __pyx_t_6 = 1;
  38918. }
  38919. }
  38920. #if CYTHON_FAST_PYCALL
  38921. if (PyFunction_Check(__pyx_t_3)) {
  38922. PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_cur_scope->__pyx_v_sock, ((PyObject *)__pyx_cur_scope->__pyx_v_self)};
  38923. __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2352, __pyx_L1_error)
  38924. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  38925. __Pyx_GOTREF(__pyx_t_4);
  38926. } else
  38927. #endif
  38928. #if CYTHON_FAST_PYCCALL
  38929. if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
  38930. PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_cur_scope->__pyx_v_sock, ((PyObject *)__pyx_cur_scope->__pyx_v_self)};
  38931. __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2352, __pyx_L1_error)
  38932. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  38933. __Pyx_GOTREF(__pyx_t_4);
  38934. } else
  38935. #endif
  38936. {
  38937. __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 2352, __pyx_L1_error)
  38938. __Pyx_GOTREF(__pyx_t_7);
  38939. if (__pyx_t_5) {
  38940. __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
  38941. }
  38942. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_sock);
  38943. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_sock);
  38944. PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_cur_scope->__pyx_v_sock);
  38945. __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_self));
  38946. __Pyx_GIVEREF(((PyObject *)__pyx_cur_scope->__pyx_v_self));
  38947. PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, ((PyObject *)__pyx_cur_scope->__pyx_v_self));
  38948. __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2352, __pyx_L1_error)
  38949. __Pyx_GOTREF(__pyx_t_4);
  38950. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  38951. }
  38952. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  38953. __Pyx_GIVEREF(__pyx_t_4);
  38954. __pyx_cur_scope->__pyx_v_fut = __pyx_t_4;
  38955. __pyx_t_4 = 0;
  38956. /* "uvloop/loop.pyx":2353
  38957. *
  38958. * fut = _SyncSocketReaderFuture(sock, self)
  38959. * handle = new_MethodHandle3( # <<<<<<<<<<<<<<
  38960. * self,
  38961. * "Loop._sock_recv",
  38962. */
  38963. __pyx_t_4 = __pyx_f_6uvloop_4loop_new_MethodHandle3(__pyx_cur_scope->__pyx_v_self, __pyx_kp_u_Loop__sock_recv, ((__pyx_t_6uvloop_4loop_method3_t)((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->_sock_recv), ((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_cur_scope->__pyx_v_fut, __pyx_cur_scope->__pyx_v_sock, __pyx_cur_scope->__pyx_v_n); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2353, __pyx_L1_error)
  38964. __Pyx_GOTREF(__pyx_t_4);
  38965. if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_6uvloop_4loop_Handle))))) __PYX_ERR(2, 2353, __pyx_L1_error)
  38966. __Pyx_GIVEREF(__pyx_t_4);
  38967. __pyx_cur_scope->__pyx_v_handle = ((struct __pyx_obj_6uvloop_4loop_Handle *)__pyx_t_4);
  38968. __pyx_t_4 = 0;
  38969. /* "uvloop/loop.pyx":2360
  38970. * fut, sock, n)
  38971. *
  38972. * self._add_reader(sock, handle) # <<<<<<<<<<<<<<
  38973. * return await fut
  38974. *
  38975. */
  38976. __pyx_t_4 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->_add_reader(__pyx_cur_scope->__pyx_v_self, __pyx_cur_scope->__pyx_v_sock, __pyx_cur_scope->__pyx_v_handle); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2360, __pyx_L1_error)
  38977. __Pyx_GOTREF(__pyx_t_4);
  38978. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  38979. /* "uvloop/loop.pyx":2361
  38980. *
  38981. * self._add_reader(sock, handle)
  38982. * return await fut # <<<<<<<<<<<<<<
  38983. *
  38984. * @cython.iterable_coroutine
  38985. */
  38986. __Pyx_XDECREF(__pyx_r);
  38987. __pyx_r = __Pyx_Coroutine_Yield_From(__pyx_generator, __pyx_cur_scope->__pyx_v_fut);
  38988. __Pyx_XGOTREF(__pyx_r);
  38989. if (likely(__pyx_r)) {
  38990. __Pyx_XGIVEREF(__pyx_r);
  38991. __Pyx_RefNannyFinishContext();
  38992. __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  38993. /* return from generator, awaiting value */
  38994. __pyx_generator->resume_label = 1;
  38995. return __pyx_r;
  38996. __pyx_L7_resume_from_await:;
  38997. if (unlikely(!__pyx_sent_value)) __PYX_ERR(2, 2361, __pyx_L1_error)
  38998. __pyx_t_4 = __pyx_sent_value; __Pyx_INCREF(__pyx_t_4);
  38999. } else {
  39000. __pyx_t_4 = NULL;
  39001. if (__Pyx_PyGen_FetchStopIterationValue(&__pyx_t_4) < 0) __PYX_ERR(2, 2361, __pyx_L1_error)
  39002. __Pyx_GOTREF(__pyx_t_4);
  39003. }
  39004. __pyx_r = NULL; __Pyx_ReturnWithStopIteration(__pyx_t_4);
  39005. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  39006. __pyx_t_4 = 0;
  39007. goto __pyx_L0;
  39008. CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
  39009. /* "uvloop/loop.pyx":2337
  39010. *
  39011. * @cython.iterable_coroutine
  39012. * async def sock_recv(self, sock, n): # <<<<<<<<<<<<<<
  39013. * """Receive data from the socket.
  39014. *
  39015. */
  39016. /* function exit code */
  39017. __pyx_L1_error:;
  39018. __Pyx_XDECREF(__pyx_t_3);
  39019. __Pyx_XDECREF(__pyx_t_4);
  39020. __Pyx_XDECREF(__pyx_t_5);
  39021. __Pyx_XDECREF(__pyx_t_7);
  39022. __Pyx_AddTraceback("sock_recv", __pyx_clineno, __pyx_lineno, __pyx_filename);
  39023. __pyx_L0:;
  39024. __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  39025. #if !CYTHON_USE_EXC_INFO_STACK
  39026. __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  39027. #endif
  39028. __pyx_generator->resume_label = -1;
  39029. __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  39030. __Pyx_RefNannyFinishContext();
  39031. return __pyx_r;
  39032. }
  39033. static PyObject *__pyx_gb_6uvloop_4loop_4Loop_88generator8(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
  39034. /* "uvloop/loop.pyx":2364
  39035. *
  39036. * @cython.iterable_coroutine
  39037. * async def sock_recv_into(self, sock, buf): # <<<<<<<<<<<<<<
  39038. * """Receive data from the socket.
  39039. *
  39040. */
  39041. /* Python wrapper */
  39042. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_87sock_recv_into(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  39043. static char __pyx_doc_6uvloop_4loop_4Loop_86sock_recv_into[] = "Loop.sock_recv_into(self, sock, buf)\nReceive data from the socket.\n\n The received data is written into *buf* (a writable buffer).\n The return value is the number of bytes written.\n\n This method is a coroutine.\n ";
  39044. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_87sock_recv_into(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  39045. PyObject *__pyx_v_sock = 0;
  39046. PyObject *__pyx_v_buf = 0;
  39047. PyObject *__pyx_r = 0;
  39048. __Pyx_RefNannyDeclarations
  39049. __Pyx_RefNannySetupContext("sock_recv_into (wrapper)", 0);
  39050. {
  39051. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sock,&__pyx_n_s_buf,0};
  39052. PyObject* values[2] = {0,0};
  39053. if (unlikely(__pyx_kwds)) {
  39054. Py_ssize_t kw_args;
  39055. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  39056. switch (pos_args) {
  39057. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  39058. CYTHON_FALLTHROUGH;
  39059. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  39060. CYTHON_FALLTHROUGH;
  39061. case 0: break;
  39062. default: goto __pyx_L5_argtuple_error;
  39063. }
  39064. kw_args = PyDict_Size(__pyx_kwds);
  39065. switch (pos_args) {
  39066. case 0:
  39067. if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sock)) != 0)) kw_args--;
  39068. else goto __pyx_L5_argtuple_error;
  39069. CYTHON_FALLTHROUGH;
  39070. case 1:
  39071. if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_buf)) != 0)) kw_args--;
  39072. else {
  39073. __Pyx_RaiseArgtupleInvalid("sock_recv_into", 1, 2, 2, 1); __PYX_ERR(2, 2364, __pyx_L3_error)
  39074. }
  39075. }
  39076. if (unlikely(kw_args > 0)) {
  39077. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sock_recv_into") < 0)) __PYX_ERR(2, 2364, __pyx_L3_error)
  39078. }
  39079. } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
  39080. goto __pyx_L5_argtuple_error;
  39081. } else {
  39082. values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  39083. values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  39084. }
  39085. __pyx_v_sock = values[0];
  39086. __pyx_v_buf = values[1];
  39087. }
  39088. goto __pyx_L4_argument_unpacking_done;
  39089. __pyx_L5_argtuple_error:;
  39090. __Pyx_RaiseArgtupleInvalid("sock_recv_into", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 2364, __pyx_L3_error)
  39091. __pyx_L3_error:;
  39092. __Pyx_AddTraceback("uvloop.loop.Loop.sock_recv_into", __pyx_clineno, __pyx_lineno, __pyx_filename);
  39093. __Pyx_RefNannyFinishContext();
  39094. return NULL;
  39095. __pyx_L4_argument_unpacking_done:;
  39096. __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_86sock_recv_into(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self), __pyx_v_sock, __pyx_v_buf);
  39097. /* function exit code */
  39098. __Pyx_RefNannyFinishContext();
  39099. return __pyx_r;
  39100. }
  39101. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_86sock_recv_into(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_sock, PyObject *__pyx_v_buf) {
  39102. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_15_sock_recv_into *__pyx_cur_scope;
  39103. PyObject *__pyx_r = NULL;
  39104. __Pyx_RefNannyDeclarations
  39105. __Pyx_RefNannySetupContext("sock_recv_into", 0);
  39106. __pyx_cur_scope = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_15_sock_recv_into *)__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_15_sock_recv_into(__pyx_ptype_6uvloop_4loop___pyx_scope_struct_15_sock_recv_into, __pyx_empty_tuple, NULL);
  39107. if (unlikely(!__pyx_cur_scope)) {
  39108. __pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_15_sock_recv_into *)Py_None);
  39109. __Pyx_INCREF(Py_None);
  39110. __PYX_ERR(2, 2364, __pyx_L1_error)
  39111. } else {
  39112. __Pyx_GOTREF(__pyx_cur_scope);
  39113. }
  39114. __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  39115. __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  39116. __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  39117. __pyx_cur_scope->__pyx_v_sock = __pyx_v_sock;
  39118. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_sock);
  39119. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_sock);
  39120. __pyx_cur_scope->__pyx_v_buf = __pyx_v_buf;
  39121. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_buf);
  39122. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_buf);
  39123. {
  39124. __pyx_CoroutineObject *gen = __Pyx_IterableCoroutine_New((__pyx_coroutine_body_t) __pyx_gb_6uvloop_4loop_4Loop_88generator8, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_sock_recv_into, __pyx_n_s_Loop_sock_recv_into, __pyx_n_s_uvloop_loop); if (unlikely(!gen)) __PYX_ERR(2, 2364, __pyx_L1_error)
  39125. __Pyx_DECREF(__pyx_cur_scope);
  39126. __Pyx_RefNannyFinishContext();
  39127. return (PyObject *) gen;
  39128. }
  39129. /* function exit code */
  39130. __pyx_L1_error:;
  39131. __Pyx_AddTraceback("uvloop.loop.Loop.sock_recv_into", __pyx_clineno, __pyx_lineno, __pyx_filename);
  39132. __pyx_r = NULL;
  39133. __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  39134. __Pyx_XGIVEREF(__pyx_r);
  39135. __Pyx_RefNannyFinishContext();
  39136. return __pyx_r;
  39137. }
  39138. static PyObject *__pyx_gb_6uvloop_4loop_4Loop_88generator8(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
  39139. {
  39140. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_15_sock_recv_into *__pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_15_sock_recv_into *)__pyx_generator->closure);
  39141. PyObject *__pyx_r = NULL;
  39142. int __pyx_t_1;
  39143. int __pyx_t_2;
  39144. PyObject *__pyx_t_3 = NULL;
  39145. PyObject *__pyx_t_4 = NULL;
  39146. PyObject *__pyx_t_5 = NULL;
  39147. int __pyx_t_6;
  39148. PyObject *__pyx_t_7 = NULL;
  39149. __Pyx_RefNannyDeclarations
  39150. __Pyx_RefNannySetupContext("sock_recv_into", 0);
  39151. switch (__pyx_generator->resume_label) {
  39152. case 0: goto __pyx_L3_first_run;
  39153. case 1: goto __pyx_L7_resume_from_await;
  39154. default: /* CPython raises the right error here */
  39155. __Pyx_RefNannyFinishContext();
  39156. return NULL;
  39157. }
  39158. __pyx_L3_first_run:;
  39159. if (unlikely(!__pyx_sent_value)) __PYX_ERR(2, 2364, __pyx_L1_error)
  39160. /* "uvloop/loop.pyx":2375
  39161. * Handle handle
  39162. *
  39163. * if self._debug and sock.gettimeout() != 0: # <<<<<<<<<<<<<<
  39164. * raise ValueError("the socket must be non-blocking")
  39165. *
  39166. */
  39167. __pyx_t_2 = (__pyx_cur_scope->__pyx_v_self->_debug != 0);
  39168. if (__pyx_t_2) {
  39169. } else {
  39170. __pyx_t_1 = __pyx_t_2;
  39171. goto __pyx_L5_bool_binop_done;
  39172. }
  39173. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_sock, __pyx_n_s_gettimeout); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2375, __pyx_L1_error)
  39174. __Pyx_GOTREF(__pyx_t_4);
  39175. __pyx_t_5 = NULL;
  39176. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
  39177. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
  39178. if (likely(__pyx_t_5)) {
  39179. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  39180. __Pyx_INCREF(__pyx_t_5);
  39181. __Pyx_INCREF(function);
  39182. __Pyx_DECREF_SET(__pyx_t_4, function);
  39183. }
  39184. }
  39185. __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
  39186. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  39187. if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2375, __pyx_L1_error)
  39188. __Pyx_GOTREF(__pyx_t_3);
  39189. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  39190. __pyx_t_4 = __Pyx_PyInt_NeObjC(__pyx_t_3, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2375, __pyx_L1_error)
  39191. __Pyx_GOTREF(__pyx_t_4);
  39192. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  39193. __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(2, 2375, __pyx_L1_error)
  39194. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  39195. __pyx_t_1 = __pyx_t_2;
  39196. __pyx_L5_bool_binop_done:;
  39197. if (unlikely(__pyx_t_1)) {
  39198. /* "uvloop/loop.pyx":2376
  39199. *
  39200. * if self._debug and sock.gettimeout() != 0:
  39201. * raise ValueError("the socket must be non-blocking") # <<<<<<<<<<<<<<
  39202. *
  39203. * fut = _SyncSocketReaderFuture(sock, self)
  39204. */
  39205. __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__62, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2376, __pyx_L1_error)
  39206. __Pyx_GOTREF(__pyx_t_4);
  39207. __Pyx_Raise(__pyx_t_4, 0, 0, 0);
  39208. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  39209. __PYX_ERR(2, 2376, __pyx_L1_error)
  39210. /* "uvloop/loop.pyx":2375
  39211. * Handle handle
  39212. *
  39213. * if self._debug and sock.gettimeout() != 0: # <<<<<<<<<<<<<<
  39214. * raise ValueError("the socket must be non-blocking")
  39215. *
  39216. */
  39217. }
  39218. /* "uvloop/loop.pyx":2378
  39219. * raise ValueError("the socket must be non-blocking")
  39220. *
  39221. * fut = _SyncSocketReaderFuture(sock, self) # <<<<<<<<<<<<<<
  39222. * handle = new_MethodHandle3(
  39223. * self,
  39224. */
  39225. __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_SyncSocketReaderFuture); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2378, __pyx_L1_error)
  39226. __Pyx_GOTREF(__pyx_t_3);
  39227. __pyx_t_5 = NULL;
  39228. __pyx_t_6 = 0;
  39229. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
  39230. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
  39231. if (likely(__pyx_t_5)) {
  39232. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  39233. __Pyx_INCREF(__pyx_t_5);
  39234. __Pyx_INCREF(function);
  39235. __Pyx_DECREF_SET(__pyx_t_3, function);
  39236. __pyx_t_6 = 1;
  39237. }
  39238. }
  39239. #if CYTHON_FAST_PYCALL
  39240. if (PyFunction_Check(__pyx_t_3)) {
  39241. PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_cur_scope->__pyx_v_sock, ((PyObject *)__pyx_cur_scope->__pyx_v_self)};
  39242. __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2378, __pyx_L1_error)
  39243. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  39244. __Pyx_GOTREF(__pyx_t_4);
  39245. } else
  39246. #endif
  39247. #if CYTHON_FAST_PYCCALL
  39248. if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
  39249. PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_cur_scope->__pyx_v_sock, ((PyObject *)__pyx_cur_scope->__pyx_v_self)};
  39250. __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2378, __pyx_L1_error)
  39251. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  39252. __Pyx_GOTREF(__pyx_t_4);
  39253. } else
  39254. #endif
  39255. {
  39256. __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 2378, __pyx_L1_error)
  39257. __Pyx_GOTREF(__pyx_t_7);
  39258. if (__pyx_t_5) {
  39259. __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
  39260. }
  39261. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_sock);
  39262. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_sock);
  39263. PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_cur_scope->__pyx_v_sock);
  39264. __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_self));
  39265. __Pyx_GIVEREF(((PyObject *)__pyx_cur_scope->__pyx_v_self));
  39266. PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, ((PyObject *)__pyx_cur_scope->__pyx_v_self));
  39267. __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2378, __pyx_L1_error)
  39268. __Pyx_GOTREF(__pyx_t_4);
  39269. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  39270. }
  39271. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  39272. __Pyx_GIVEREF(__pyx_t_4);
  39273. __pyx_cur_scope->__pyx_v_fut = __pyx_t_4;
  39274. __pyx_t_4 = 0;
  39275. /* "uvloop/loop.pyx":2379
  39276. *
  39277. * fut = _SyncSocketReaderFuture(sock, self)
  39278. * handle = new_MethodHandle3( # <<<<<<<<<<<<<<
  39279. * self,
  39280. * "Loop._sock_recv_into",
  39281. */
  39282. __pyx_t_4 = __pyx_f_6uvloop_4loop_new_MethodHandle3(__pyx_cur_scope->__pyx_v_self, __pyx_kp_u_Loop__sock_recv_into, ((__pyx_t_6uvloop_4loop_method3_t)((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->_sock_recv_into), ((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_cur_scope->__pyx_v_fut, __pyx_cur_scope->__pyx_v_sock, __pyx_cur_scope->__pyx_v_buf); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2379, __pyx_L1_error)
  39283. __Pyx_GOTREF(__pyx_t_4);
  39284. if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_6uvloop_4loop_Handle))))) __PYX_ERR(2, 2379, __pyx_L1_error)
  39285. __Pyx_GIVEREF(__pyx_t_4);
  39286. __pyx_cur_scope->__pyx_v_handle = ((struct __pyx_obj_6uvloop_4loop_Handle *)__pyx_t_4);
  39287. __pyx_t_4 = 0;
  39288. /* "uvloop/loop.pyx":2386
  39289. * fut, sock, buf)
  39290. *
  39291. * self._add_reader(sock, handle) # <<<<<<<<<<<<<<
  39292. * return await fut
  39293. *
  39294. */
  39295. __pyx_t_4 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->_add_reader(__pyx_cur_scope->__pyx_v_self, __pyx_cur_scope->__pyx_v_sock, __pyx_cur_scope->__pyx_v_handle); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2386, __pyx_L1_error)
  39296. __Pyx_GOTREF(__pyx_t_4);
  39297. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  39298. /* "uvloop/loop.pyx":2387
  39299. *
  39300. * self._add_reader(sock, handle)
  39301. * return await fut # <<<<<<<<<<<<<<
  39302. *
  39303. * @cython.iterable_coroutine
  39304. */
  39305. __Pyx_XDECREF(__pyx_r);
  39306. __pyx_r = __Pyx_Coroutine_Yield_From(__pyx_generator, __pyx_cur_scope->__pyx_v_fut);
  39307. __Pyx_XGOTREF(__pyx_r);
  39308. if (likely(__pyx_r)) {
  39309. __Pyx_XGIVEREF(__pyx_r);
  39310. __Pyx_RefNannyFinishContext();
  39311. __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  39312. /* return from generator, awaiting value */
  39313. __pyx_generator->resume_label = 1;
  39314. return __pyx_r;
  39315. __pyx_L7_resume_from_await:;
  39316. if (unlikely(!__pyx_sent_value)) __PYX_ERR(2, 2387, __pyx_L1_error)
  39317. __pyx_t_4 = __pyx_sent_value; __Pyx_INCREF(__pyx_t_4);
  39318. } else {
  39319. __pyx_t_4 = NULL;
  39320. if (__Pyx_PyGen_FetchStopIterationValue(&__pyx_t_4) < 0) __PYX_ERR(2, 2387, __pyx_L1_error)
  39321. __Pyx_GOTREF(__pyx_t_4);
  39322. }
  39323. __pyx_r = NULL; __Pyx_ReturnWithStopIteration(__pyx_t_4);
  39324. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  39325. __pyx_t_4 = 0;
  39326. goto __pyx_L0;
  39327. CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
  39328. /* "uvloop/loop.pyx":2364
  39329. *
  39330. * @cython.iterable_coroutine
  39331. * async def sock_recv_into(self, sock, buf): # <<<<<<<<<<<<<<
  39332. * """Receive data from the socket.
  39333. *
  39334. */
  39335. /* function exit code */
  39336. __pyx_L1_error:;
  39337. __Pyx_XDECREF(__pyx_t_3);
  39338. __Pyx_XDECREF(__pyx_t_4);
  39339. __Pyx_XDECREF(__pyx_t_5);
  39340. __Pyx_XDECREF(__pyx_t_7);
  39341. __Pyx_AddTraceback("sock_recv_into", __pyx_clineno, __pyx_lineno, __pyx_filename);
  39342. __pyx_L0:;
  39343. __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  39344. #if !CYTHON_USE_EXC_INFO_STACK
  39345. __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  39346. #endif
  39347. __pyx_generator->resume_label = -1;
  39348. __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  39349. __Pyx_RefNannyFinishContext();
  39350. return __pyx_r;
  39351. }
  39352. static PyObject *__pyx_gb_6uvloop_4loop_4Loop_91generator9(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
  39353. /* "uvloop/loop.pyx":2390
  39354. *
  39355. * @cython.iterable_coroutine
  39356. * async def sock_sendall(self, sock, data): # <<<<<<<<<<<<<<
  39357. * """Send data to the socket.
  39358. *
  39359. */
  39360. /* Python wrapper */
  39361. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_90sock_sendall(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  39362. static char __pyx_doc_6uvloop_4loop_4Loop_89sock_sendall[] = "Loop.sock_sendall(self, sock, data)\nSend data to the socket.\n\n The socket must be connected to a remote socket. This method continues\n to send data from data until either all data has been sent or an\n error occurs. None is returned on success. On error, an exception is\n raised, and there is no way to determine how much data, if any, was\n successfully processed by the receiving end of the connection.\n\n This method is a coroutine.\n ";
  39363. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_90sock_sendall(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  39364. PyObject *__pyx_v_sock = 0;
  39365. PyObject *__pyx_v_data = 0;
  39366. PyObject *__pyx_r = 0;
  39367. __Pyx_RefNannyDeclarations
  39368. __Pyx_RefNannySetupContext("sock_sendall (wrapper)", 0);
  39369. {
  39370. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sock,&__pyx_n_s_data,0};
  39371. PyObject* values[2] = {0,0};
  39372. if (unlikely(__pyx_kwds)) {
  39373. Py_ssize_t kw_args;
  39374. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  39375. switch (pos_args) {
  39376. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  39377. CYTHON_FALLTHROUGH;
  39378. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  39379. CYTHON_FALLTHROUGH;
  39380. case 0: break;
  39381. default: goto __pyx_L5_argtuple_error;
  39382. }
  39383. kw_args = PyDict_Size(__pyx_kwds);
  39384. switch (pos_args) {
  39385. case 0:
  39386. if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sock)) != 0)) kw_args--;
  39387. else goto __pyx_L5_argtuple_error;
  39388. CYTHON_FALLTHROUGH;
  39389. case 1:
  39390. if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--;
  39391. else {
  39392. __Pyx_RaiseArgtupleInvalid("sock_sendall", 1, 2, 2, 1); __PYX_ERR(2, 2390, __pyx_L3_error)
  39393. }
  39394. }
  39395. if (unlikely(kw_args > 0)) {
  39396. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sock_sendall") < 0)) __PYX_ERR(2, 2390, __pyx_L3_error)
  39397. }
  39398. } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
  39399. goto __pyx_L5_argtuple_error;
  39400. } else {
  39401. values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  39402. values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  39403. }
  39404. __pyx_v_sock = values[0];
  39405. __pyx_v_data = values[1];
  39406. }
  39407. goto __pyx_L4_argument_unpacking_done;
  39408. __pyx_L5_argtuple_error:;
  39409. __Pyx_RaiseArgtupleInvalid("sock_sendall", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 2390, __pyx_L3_error)
  39410. __pyx_L3_error:;
  39411. __Pyx_AddTraceback("uvloop.loop.Loop.sock_sendall", __pyx_clineno, __pyx_lineno, __pyx_filename);
  39412. __Pyx_RefNannyFinishContext();
  39413. return NULL;
  39414. __pyx_L4_argument_unpacking_done:;
  39415. __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_89sock_sendall(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self), __pyx_v_sock, __pyx_v_data);
  39416. /* function exit code */
  39417. __Pyx_RefNannyFinishContext();
  39418. return __pyx_r;
  39419. }
  39420. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_89sock_sendall(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_sock, PyObject *__pyx_v_data) {
  39421. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_16_sock_sendall *__pyx_cur_scope;
  39422. PyObject *__pyx_r = NULL;
  39423. __Pyx_RefNannyDeclarations
  39424. __Pyx_RefNannySetupContext("sock_sendall", 0);
  39425. __pyx_cur_scope = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_16_sock_sendall *)__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_16_sock_sendall(__pyx_ptype_6uvloop_4loop___pyx_scope_struct_16_sock_sendall, __pyx_empty_tuple, NULL);
  39426. if (unlikely(!__pyx_cur_scope)) {
  39427. __pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_16_sock_sendall *)Py_None);
  39428. __Pyx_INCREF(Py_None);
  39429. __PYX_ERR(2, 2390, __pyx_L1_error)
  39430. } else {
  39431. __Pyx_GOTREF(__pyx_cur_scope);
  39432. }
  39433. __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  39434. __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  39435. __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  39436. __pyx_cur_scope->__pyx_v_sock = __pyx_v_sock;
  39437. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_sock);
  39438. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_sock);
  39439. __pyx_cur_scope->__pyx_v_data = __pyx_v_data;
  39440. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_data);
  39441. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_data);
  39442. {
  39443. __pyx_CoroutineObject *gen = __Pyx_IterableCoroutine_New((__pyx_coroutine_body_t) __pyx_gb_6uvloop_4loop_4Loop_91generator9, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_sock_sendall, __pyx_n_s_Loop_sock_sendall, __pyx_n_s_uvloop_loop); if (unlikely(!gen)) __PYX_ERR(2, 2390, __pyx_L1_error)
  39444. __Pyx_DECREF(__pyx_cur_scope);
  39445. __Pyx_RefNannyFinishContext();
  39446. return (PyObject *) gen;
  39447. }
  39448. /* function exit code */
  39449. __pyx_L1_error:;
  39450. __Pyx_AddTraceback("uvloop.loop.Loop.sock_sendall", __pyx_clineno, __pyx_lineno, __pyx_filename);
  39451. __pyx_r = NULL;
  39452. __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  39453. __Pyx_XGIVEREF(__pyx_r);
  39454. __Pyx_RefNannyFinishContext();
  39455. return __pyx_r;
  39456. }
  39457. static PyObject *__pyx_gb_6uvloop_4loop_4Loop_91generator9(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
  39458. {
  39459. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_16_sock_sendall *__pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_16_sock_sendall *)__pyx_generator->closure);
  39460. PyObject *__pyx_r = NULL;
  39461. int __pyx_t_1;
  39462. int __pyx_t_2;
  39463. PyObject *__pyx_t_3 = NULL;
  39464. PyObject *__pyx_t_4 = NULL;
  39465. PyObject *__pyx_t_5 = NULL;
  39466. PyObject *__pyx_t_6 = NULL;
  39467. PyObject *__pyx_t_7 = NULL;
  39468. PyObject *__pyx_t_8 = NULL;
  39469. Py_ssize_t __pyx_t_9;
  39470. Py_ssize_t __pyx_t_10;
  39471. PyObject *__pyx_t_11 = NULL;
  39472. PyObject *__pyx_t_12 = NULL;
  39473. int __pyx_t_13;
  39474. int __pyx_t_14;
  39475. char const *__pyx_t_15;
  39476. PyObject *__pyx_t_16 = NULL;
  39477. PyObject *__pyx_t_17 = NULL;
  39478. PyObject *__pyx_t_18 = NULL;
  39479. PyObject *__pyx_t_19 = NULL;
  39480. __Pyx_RefNannyDeclarations
  39481. __Pyx_RefNannySetupContext("sock_sendall", 0);
  39482. switch (__pyx_generator->resume_label) {
  39483. case 0: goto __pyx_L3_first_run;
  39484. case 1: goto __pyx_L20_resume_from_await;
  39485. default: /* CPython raises the right error here */
  39486. __Pyx_RefNannyFinishContext();
  39487. return NULL;
  39488. }
  39489. __pyx_L3_first_run:;
  39490. if (unlikely(!__pyx_sent_value)) __PYX_ERR(2, 2390, __pyx_L1_error)
  39491. /* "uvloop/loop.pyx":2405
  39492. * ssize_t n
  39493. *
  39494. * if self._debug and sock.gettimeout() != 0: # <<<<<<<<<<<<<<
  39495. * raise ValueError("the socket must be non-blocking")
  39496. *
  39497. */
  39498. __pyx_t_2 = (__pyx_cur_scope->__pyx_v_self->_debug != 0);
  39499. if (__pyx_t_2) {
  39500. } else {
  39501. __pyx_t_1 = __pyx_t_2;
  39502. goto __pyx_L5_bool_binop_done;
  39503. }
  39504. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_sock, __pyx_n_s_gettimeout); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2405, __pyx_L1_error)
  39505. __Pyx_GOTREF(__pyx_t_4);
  39506. __pyx_t_5 = NULL;
  39507. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
  39508. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
  39509. if (likely(__pyx_t_5)) {
  39510. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  39511. __Pyx_INCREF(__pyx_t_5);
  39512. __Pyx_INCREF(function);
  39513. __Pyx_DECREF_SET(__pyx_t_4, function);
  39514. }
  39515. }
  39516. __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
  39517. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  39518. if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2405, __pyx_L1_error)
  39519. __Pyx_GOTREF(__pyx_t_3);
  39520. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  39521. __pyx_t_4 = __Pyx_PyInt_NeObjC(__pyx_t_3, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2405, __pyx_L1_error)
  39522. __Pyx_GOTREF(__pyx_t_4);
  39523. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  39524. __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(2, 2405, __pyx_L1_error)
  39525. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  39526. __pyx_t_1 = __pyx_t_2;
  39527. __pyx_L5_bool_binop_done:;
  39528. if (unlikely(__pyx_t_1)) {
  39529. /* "uvloop/loop.pyx":2406
  39530. *
  39531. * if self._debug and sock.gettimeout() != 0:
  39532. * raise ValueError("the socket must be non-blocking") # <<<<<<<<<<<<<<
  39533. *
  39534. * if not data:
  39535. */
  39536. __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__62, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2406, __pyx_L1_error)
  39537. __Pyx_GOTREF(__pyx_t_4);
  39538. __Pyx_Raise(__pyx_t_4, 0, 0, 0);
  39539. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  39540. __PYX_ERR(2, 2406, __pyx_L1_error)
  39541. /* "uvloop/loop.pyx":2405
  39542. * ssize_t n
  39543. *
  39544. * if self._debug and sock.gettimeout() != 0: # <<<<<<<<<<<<<<
  39545. * raise ValueError("the socket must be non-blocking")
  39546. *
  39547. */
  39548. }
  39549. /* "uvloop/loop.pyx":2408
  39550. * raise ValueError("the socket must be non-blocking")
  39551. *
  39552. * if not data: # <<<<<<<<<<<<<<
  39553. * return
  39554. *
  39555. */
  39556. __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_data); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 2408, __pyx_L1_error)
  39557. __pyx_t_2 = ((!__pyx_t_1) != 0);
  39558. if (__pyx_t_2) {
  39559. /* "uvloop/loop.pyx":2409
  39560. *
  39561. * if not data:
  39562. * return # <<<<<<<<<<<<<<
  39563. *
  39564. * socket_inc_io_ref(sock)
  39565. */
  39566. __Pyx_XDECREF(__pyx_r);
  39567. __pyx_r = NULL;
  39568. goto __pyx_L0;
  39569. /* "uvloop/loop.pyx":2408
  39570. * raise ValueError("the socket must be non-blocking")
  39571. *
  39572. * if not data: # <<<<<<<<<<<<<<
  39573. * return
  39574. *
  39575. */
  39576. }
  39577. /* "uvloop/loop.pyx":2411
  39578. * return
  39579. *
  39580. * socket_inc_io_ref(sock) # <<<<<<<<<<<<<<
  39581. * try:
  39582. * try:
  39583. */
  39584. __pyx_t_4 = __pyx_f_6uvloop_4loop_socket_inc_io_ref(__pyx_cur_scope->__pyx_v_sock); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2411, __pyx_L1_error)
  39585. __Pyx_GOTREF(__pyx_t_4);
  39586. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  39587. /* "uvloop/loop.pyx":2412
  39588. *
  39589. * socket_inc_io_ref(sock)
  39590. * try: # <<<<<<<<<<<<<<
  39591. * try:
  39592. * n = sock.send(data)
  39593. */
  39594. /*try:*/ {
  39595. /* "uvloop/loop.pyx":2413
  39596. * socket_inc_io_ref(sock)
  39597. * try:
  39598. * try: # <<<<<<<<<<<<<<
  39599. * n = sock.send(data)
  39600. * except (BlockingIOError, InterruptedError):
  39601. */
  39602. {
  39603. __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
  39604. __Pyx_XGOTREF(__pyx_t_6);
  39605. __Pyx_XGOTREF(__pyx_t_7);
  39606. __Pyx_XGOTREF(__pyx_t_8);
  39607. /*try:*/ {
  39608. /* "uvloop/loop.pyx":2414
  39609. * try:
  39610. * try:
  39611. * n = sock.send(data) # <<<<<<<<<<<<<<
  39612. * except (BlockingIOError, InterruptedError):
  39613. * pass
  39614. */
  39615. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_sock, __pyx_n_s_send); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2414, __pyx_L11_error)
  39616. __Pyx_GOTREF(__pyx_t_3);
  39617. __pyx_t_5 = NULL;
  39618. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
  39619. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
  39620. if (likely(__pyx_t_5)) {
  39621. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  39622. __Pyx_INCREF(__pyx_t_5);
  39623. __Pyx_INCREF(function);
  39624. __Pyx_DECREF_SET(__pyx_t_3, function);
  39625. }
  39626. }
  39627. __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_cur_scope->__pyx_v_data) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_cur_scope->__pyx_v_data);
  39628. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  39629. if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2414, __pyx_L11_error)
  39630. __Pyx_GOTREF(__pyx_t_4);
  39631. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  39632. __pyx_t_9 = PyInt_AsSsize_t(__pyx_t_4); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(2, 2414, __pyx_L11_error)
  39633. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  39634. __pyx_cur_scope->__pyx_v_n = __pyx_t_9;
  39635. /* "uvloop/loop.pyx":2413
  39636. * socket_inc_io_ref(sock)
  39637. * try:
  39638. * try: # <<<<<<<<<<<<<<
  39639. * n = sock.send(data)
  39640. * except (BlockingIOError, InterruptedError):
  39641. */
  39642. }
  39643. /* "uvloop/loop.pyx":2418
  39644. * pass
  39645. * else:
  39646. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  39647. * # This can be a partial success, i.e. only part
  39648. * # of the data was sent
  39649. */
  39650. /*else:*/ {
  39651. __pyx_t_2 = (UVLOOP_DEBUG != 0);
  39652. if (__pyx_t_2) {
  39653. /* "uvloop/loop.pyx":2421
  39654. * # This can be a partial success, i.e. only part
  39655. * # of the data was sent
  39656. * self._sock_try_write_total += 1 # <<<<<<<<<<<<<<
  39657. *
  39658. * if n == len(data):
  39659. */
  39660. __pyx_cur_scope->__pyx_v_self->_sock_try_write_total = (__pyx_cur_scope->__pyx_v_self->_sock_try_write_total + 1);
  39661. /* "uvloop/loop.pyx":2418
  39662. * pass
  39663. * else:
  39664. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  39665. * # This can be a partial success, i.e. only part
  39666. * # of the data was sent
  39667. */
  39668. }
  39669. /* "uvloop/loop.pyx":2423
  39670. * self._sock_try_write_total += 1
  39671. *
  39672. * if n == len(data): # <<<<<<<<<<<<<<
  39673. * return
  39674. * if not isinstance(data, memoryview):
  39675. */
  39676. __pyx_t_10 = PyObject_Length(__pyx_cur_scope->__pyx_v_data); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(2, 2423, __pyx_L13_except_error)
  39677. __pyx_t_2 = ((__pyx_cur_scope->__pyx_v_n == __pyx_t_10) != 0);
  39678. if (__pyx_t_2) {
  39679. /* "uvloop/loop.pyx":2424
  39680. *
  39681. * if n == len(data):
  39682. * return # <<<<<<<<<<<<<<
  39683. * if not isinstance(data, memoryview):
  39684. * data = memoryview(data)
  39685. */
  39686. __Pyx_XDECREF(__pyx_r);
  39687. __pyx_r = NULL;
  39688. goto __pyx_L14_except_return;
  39689. /* "uvloop/loop.pyx":2423
  39690. * self._sock_try_write_total += 1
  39691. *
  39692. * if n == len(data): # <<<<<<<<<<<<<<
  39693. * return
  39694. * if not isinstance(data, memoryview):
  39695. */
  39696. }
  39697. /* "uvloop/loop.pyx":2425
  39698. * if n == len(data):
  39699. * return
  39700. * if not isinstance(data, memoryview): # <<<<<<<<<<<<<<
  39701. * data = memoryview(data)
  39702. * data = data[n:]
  39703. */
  39704. __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_memoryview); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2425, __pyx_L13_except_error)
  39705. __Pyx_GOTREF(__pyx_t_4);
  39706. __pyx_t_2 = PyObject_IsInstance(__pyx_cur_scope->__pyx_v_data, __pyx_t_4); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(2, 2425, __pyx_L13_except_error)
  39707. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  39708. __pyx_t_1 = ((!(__pyx_t_2 != 0)) != 0);
  39709. if (__pyx_t_1) {
  39710. /* "uvloop/loop.pyx":2426
  39711. * return
  39712. * if not isinstance(data, memoryview):
  39713. * data = memoryview(data) # <<<<<<<<<<<<<<
  39714. * data = data[n:]
  39715. *
  39716. */
  39717. __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_memoryview); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2426, __pyx_L13_except_error)
  39718. __Pyx_GOTREF(__pyx_t_4);
  39719. __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_cur_scope->__pyx_v_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2426, __pyx_L13_except_error)
  39720. __Pyx_GOTREF(__pyx_t_3);
  39721. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  39722. __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_data);
  39723. __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_data, __pyx_t_3);
  39724. __Pyx_GIVEREF(__pyx_t_3);
  39725. __pyx_t_3 = 0;
  39726. /* "uvloop/loop.pyx":2425
  39727. * if n == len(data):
  39728. * return
  39729. * if not isinstance(data, memoryview): # <<<<<<<<<<<<<<
  39730. * data = memoryview(data)
  39731. * data = data[n:]
  39732. */
  39733. }
  39734. /* "uvloop/loop.pyx":2427
  39735. * if not isinstance(data, memoryview):
  39736. * data = memoryview(data)
  39737. * data = data[n:] # <<<<<<<<<<<<<<
  39738. *
  39739. * fut = _SyncSocketWriterFuture(sock, self)
  39740. */
  39741. __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_cur_scope->__pyx_v_data, __pyx_cur_scope->__pyx_v_n, 0, NULL, NULL, NULL, 1, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2427, __pyx_L13_except_error)
  39742. __Pyx_GOTREF(__pyx_t_3);
  39743. __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_data);
  39744. __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_data, __pyx_t_3);
  39745. __Pyx_GIVEREF(__pyx_t_3);
  39746. __pyx_t_3 = 0;
  39747. }
  39748. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  39749. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  39750. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  39751. goto __pyx_L16_try_end;
  39752. __pyx_L11_error:;
  39753. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  39754. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  39755. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  39756. /* "uvloop/loop.pyx":2415
  39757. * try:
  39758. * n = sock.send(data)
  39759. * except (BlockingIOError, InterruptedError): # <<<<<<<<<<<<<<
  39760. * pass
  39761. * else:
  39762. */
  39763. __Pyx_ErrFetch(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
  39764. __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_BlockingIOError); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 2415, __pyx_L13_except_error)
  39765. __Pyx_GOTREF(__pyx_t_11);
  39766. __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_InterruptedError); if (unlikely(!__pyx_t_12)) __PYX_ERR(2, 2415, __pyx_L13_except_error)
  39767. __Pyx_GOTREF(__pyx_t_12);
  39768. __pyx_t_13 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_3, __pyx_t_11) || __Pyx_PyErr_GivenExceptionMatches(__pyx_t_3, __pyx_t_12);
  39769. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  39770. __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  39771. __Pyx_ErrRestore(__pyx_t_3, __pyx_t_4, __pyx_t_5);
  39772. __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_5 = 0;
  39773. if (__pyx_t_13) {
  39774. __Pyx_ErrRestore(0,0,0);
  39775. goto __pyx_L12_exception_handled;
  39776. }
  39777. goto __pyx_L13_except_error;
  39778. __pyx_L13_except_error:;
  39779. /* "uvloop/loop.pyx":2413
  39780. * socket_inc_io_ref(sock)
  39781. * try:
  39782. * try: # <<<<<<<<<<<<<<
  39783. * n = sock.send(data)
  39784. * except (BlockingIOError, InterruptedError):
  39785. */
  39786. __Pyx_XGIVEREF(__pyx_t_6);
  39787. __Pyx_XGIVEREF(__pyx_t_7);
  39788. __Pyx_XGIVEREF(__pyx_t_8);
  39789. __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
  39790. goto __pyx_L9_error;
  39791. __pyx_L14_except_return:;
  39792. __Pyx_XGIVEREF(__pyx_t_6);
  39793. __Pyx_XGIVEREF(__pyx_t_7);
  39794. __Pyx_XGIVEREF(__pyx_t_8);
  39795. __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
  39796. goto __pyx_L8_return;
  39797. __pyx_L12_exception_handled:;
  39798. __Pyx_XGIVEREF(__pyx_t_6);
  39799. __Pyx_XGIVEREF(__pyx_t_7);
  39800. __Pyx_XGIVEREF(__pyx_t_8);
  39801. __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
  39802. __pyx_L16_try_end:;
  39803. }
  39804. /* "uvloop/loop.pyx":2429
  39805. * data = data[n:]
  39806. *
  39807. * fut = _SyncSocketWriterFuture(sock, self) # <<<<<<<<<<<<<<
  39808. * handle = new_MethodHandle3(
  39809. * self,
  39810. */
  39811. __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_SyncSocketWriterFuture); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2429, __pyx_L9_error)
  39812. __Pyx_GOTREF(__pyx_t_4);
  39813. __pyx_t_3 = NULL;
  39814. __pyx_t_13 = 0;
  39815. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
  39816. __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
  39817. if (likely(__pyx_t_3)) {
  39818. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  39819. __Pyx_INCREF(__pyx_t_3);
  39820. __Pyx_INCREF(function);
  39821. __Pyx_DECREF_SET(__pyx_t_4, function);
  39822. __pyx_t_13 = 1;
  39823. }
  39824. }
  39825. #if CYTHON_FAST_PYCALL
  39826. if (PyFunction_Check(__pyx_t_4)) {
  39827. PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_cur_scope->__pyx_v_sock, ((PyObject *)__pyx_cur_scope->__pyx_v_self)};
  39828. __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2429, __pyx_L9_error)
  39829. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  39830. __Pyx_GOTREF(__pyx_t_5);
  39831. } else
  39832. #endif
  39833. #if CYTHON_FAST_PYCCALL
  39834. if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
  39835. PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_cur_scope->__pyx_v_sock, ((PyObject *)__pyx_cur_scope->__pyx_v_self)};
  39836. __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2429, __pyx_L9_error)
  39837. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  39838. __Pyx_GOTREF(__pyx_t_5);
  39839. } else
  39840. #endif
  39841. {
  39842. __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(2, 2429, __pyx_L9_error)
  39843. __Pyx_GOTREF(__pyx_t_12);
  39844. if (__pyx_t_3) {
  39845. __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_3); __pyx_t_3 = NULL;
  39846. }
  39847. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_sock);
  39848. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_sock);
  39849. PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_cur_scope->__pyx_v_sock);
  39850. __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_self));
  39851. __Pyx_GIVEREF(((PyObject *)__pyx_cur_scope->__pyx_v_self));
  39852. PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, ((PyObject *)__pyx_cur_scope->__pyx_v_self));
  39853. __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_12, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2429, __pyx_L9_error)
  39854. __Pyx_GOTREF(__pyx_t_5);
  39855. __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  39856. }
  39857. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  39858. __Pyx_GIVEREF(__pyx_t_5);
  39859. __pyx_cur_scope->__pyx_v_fut = __pyx_t_5;
  39860. __pyx_t_5 = 0;
  39861. /* "uvloop/loop.pyx":2430
  39862. *
  39863. * fut = _SyncSocketWriterFuture(sock, self)
  39864. * handle = new_MethodHandle3( # <<<<<<<<<<<<<<
  39865. * self,
  39866. * "Loop._sock_sendall",
  39867. */
  39868. __pyx_t_5 = __pyx_f_6uvloop_4loop_new_MethodHandle3(__pyx_cur_scope->__pyx_v_self, __pyx_kp_u_Loop__sock_sendall, ((__pyx_t_6uvloop_4loop_method3_t)((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->_sock_sendall), ((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_cur_scope->__pyx_v_fut, __pyx_cur_scope->__pyx_v_sock, __pyx_cur_scope->__pyx_v_data); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2430, __pyx_L9_error)
  39869. __Pyx_GOTREF(__pyx_t_5);
  39870. if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_6uvloop_4loop_Handle))))) __PYX_ERR(2, 2430, __pyx_L9_error)
  39871. __Pyx_GIVEREF(__pyx_t_5);
  39872. __pyx_cur_scope->__pyx_v_handle = ((struct __pyx_obj_6uvloop_4loop_Handle *)__pyx_t_5);
  39873. __pyx_t_5 = 0;
  39874. /* "uvloop/loop.pyx":2437
  39875. * fut, sock, data)
  39876. *
  39877. * self._add_writer(sock, handle) # <<<<<<<<<<<<<<
  39878. * return await fut
  39879. * finally:
  39880. */
  39881. __pyx_t_5 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->_add_writer(__pyx_cur_scope->__pyx_v_self, __pyx_cur_scope->__pyx_v_sock, __pyx_cur_scope->__pyx_v_handle); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2437, __pyx_L9_error)
  39882. __Pyx_GOTREF(__pyx_t_5);
  39883. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  39884. /* "uvloop/loop.pyx":2438
  39885. *
  39886. * self._add_writer(sock, handle)
  39887. * return await fut # <<<<<<<<<<<<<<
  39888. * finally:
  39889. * socket_dec_io_ref(sock)
  39890. */
  39891. __Pyx_XDECREF(__pyx_r);
  39892. __pyx_r = __Pyx_Coroutine_Yield_From(__pyx_generator, __pyx_cur_scope->__pyx_v_fut);
  39893. __Pyx_XGOTREF(__pyx_r);
  39894. if (likely(__pyx_r)) {
  39895. __Pyx_XGIVEREF(__pyx_r);
  39896. __Pyx_RefNannyFinishContext();
  39897. __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  39898. /* return from generator, awaiting value */
  39899. __pyx_generator->resume_label = 1;
  39900. return __pyx_r;
  39901. __pyx_L20_resume_from_await:;
  39902. if (unlikely(!__pyx_sent_value)) __PYX_ERR(2, 2438, __pyx_L9_error)
  39903. __pyx_t_5 = __pyx_sent_value; __Pyx_INCREF(__pyx_t_5);
  39904. } else {
  39905. __pyx_t_5 = NULL;
  39906. if (__Pyx_PyGen_FetchStopIterationValue(&__pyx_t_5) < 0) __PYX_ERR(2, 2438, __pyx_L9_error)
  39907. __Pyx_GOTREF(__pyx_t_5);
  39908. }
  39909. __pyx_r = NULL; __Pyx_ReturnWithStopIteration(__pyx_t_5);
  39910. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  39911. __pyx_t_5 = 0;
  39912. goto __pyx_L8_return;
  39913. }
  39914. /* "uvloop/loop.pyx":2440
  39915. * return await fut
  39916. * finally:
  39917. * socket_dec_io_ref(sock) # <<<<<<<<<<<<<<
  39918. *
  39919. * @cython.iterable_coroutine
  39920. */
  39921. /*finally:*/ {
  39922. __pyx_L9_error:;
  39923. /*exception exit:*/{
  39924. __Pyx_PyThreadState_assign
  39925. __pyx_t_8 = 0; __pyx_t_7 = 0; __pyx_t_6 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0;
  39926. __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
  39927. __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
  39928. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  39929. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  39930. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  39931. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18);
  39932. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_6) < 0)) __Pyx_ErrFetch(&__pyx_t_8, &__pyx_t_7, &__pyx_t_6);
  39933. __Pyx_XGOTREF(__pyx_t_8);
  39934. __Pyx_XGOTREF(__pyx_t_7);
  39935. __Pyx_XGOTREF(__pyx_t_6);
  39936. __Pyx_XGOTREF(__pyx_t_16);
  39937. __Pyx_XGOTREF(__pyx_t_17);
  39938. __Pyx_XGOTREF(__pyx_t_18);
  39939. __pyx_t_13 = __pyx_lineno; __pyx_t_14 = __pyx_clineno; __pyx_t_15 = __pyx_filename;
  39940. {
  39941. __pyx_t_5 = __pyx_f_6uvloop_4loop_socket_dec_io_ref(__pyx_cur_scope->__pyx_v_sock); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2440, __pyx_L22_error)
  39942. __Pyx_GOTREF(__pyx_t_5);
  39943. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  39944. }
  39945. if (PY_MAJOR_VERSION >= 3) {
  39946. __Pyx_XGIVEREF(__pyx_t_16);
  39947. __Pyx_XGIVEREF(__pyx_t_17);
  39948. __Pyx_XGIVEREF(__pyx_t_18);
  39949. __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18);
  39950. }
  39951. __Pyx_XGIVEREF(__pyx_t_8);
  39952. __Pyx_XGIVEREF(__pyx_t_7);
  39953. __Pyx_XGIVEREF(__pyx_t_6);
  39954. __Pyx_ErrRestore(__pyx_t_8, __pyx_t_7, __pyx_t_6);
  39955. __pyx_t_8 = 0; __pyx_t_7 = 0; __pyx_t_6 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0;
  39956. __pyx_lineno = __pyx_t_13; __pyx_clineno = __pyx_t_14; __pyx_filename = __pyx_t_15;
  39957. goto __pyx_L1_error;
  39958. __pyx_L22_error:;
  39959. if (PY_MAJOR_VERSION >= 3) {
  39960. __Pyx_XGIVEREF(__pyx_t_16);
  39961. __Pyx_XGIVEREF(__pyx_t_17);
  39962. __Pyx_XGIVEREF(__pyx_t_18);
  39963. __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18);
  39964. }
  39965. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  39966. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  39967. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  39968. __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0;
  39969. goto __pyx_L1_error;
  39970. }
  39971. __pyx_L8_return: {
  39972. __Pyx_PyThreadState_assign
  39973. __pyx_t_18 = 0; __pyx_t_17 = 0; __pyx_t_16 = 0; __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_8 = 0;
  39974. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
  39975. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_18, &__pyx_t_17, &__pyx_t_16) < 0)) __Pyx_ErrFetch(&__pyx_t_18, &__pyx_t_17, &__pyx_t_16);
  39976. __Pyx_XGOTREF(__pyx_t_18);
  39977. __Pyx_XGOTREF(__pyx_t_17);
  39978. __Pyx_XGOTREF(__pyx_t_16);
  39979. __Pyx_XGOTREF(__pyx_t_6);
  39980. __Pyx_XGOTREF(__pyx_t_7);
  39981. __Pyx_XGOTREF(__pyx_t_8);
  39982. __pyx_t_19 = __pyx_r;
  39983. __pyx_r = 0;
  39984. __pyx_t_5 = __pyx_f_6uvloop_4loop_socket_dec_io_ref(__pyx_cur_scope->__pyx_v_sock); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2440, __pyx_L1_error)
  39985. __Pyx_GOTREF(__pyx_t_5);
  39986. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  39987. __pyx_r = __pyx_t_19;
  39988. __pyx_t_19 = 0;
  39989. if (PY_MAJOR_VERSION >= 3) {
  39990. __Pyx_XGIVEREF(__pyx_t_6);
  39991. __Pyx_XGIVEREF(__pyx_t_7);
  39992. __Pyx_XGIVEREF(__pyx_t_8);
  39993. __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
  39994. }
  39995. __Pyx_XGIVEREF(__pyx_t_18);
  39996. __Pyx_XGIVEREF(__pyx_t_17);
  39997. __Pyx_XGIVEREF(__pyx_t_16);
  39998. __Pyx_ErrRestore(__pyx_t_18, __pyx_t_17, __pyx_t_16);
  39999. __pyx_t_18 = 0; __pyx_t_17 = 0; __pyx_t_16 = 0; __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_8 = 0;
  40000. goto __pyx_L0;
  40001. }
  40002. }
  40003. CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
  40004. /* "uvloop/loop.pyx":2390
  40005. *
  40006. * @cython.iterable_coroutine
  40007. * async def sock_sendall(self, sock, data): # <<<<<<<<<<<<<<
  40008. * """Send data to the socket.
  40009. *
  40010. */
  40011. /* function exit code */
  40012. __pyx_L1_error:;
  40013. __Pyx_XDECREF(__pyx_t_3);
  40014. __Pyx_XDECREF(__pyx_t_4);
  40015. __Pyx_XDECREF(__pyx_t_5);
  40016. __Pyx_XDECREF(__pyx_t_11);
  40017. __Pyx_XDECREF(__pyx_t_12);
  40018. __Pyx_AddTraceback("sock_sendall", __pyx_clineno, __pyx_lineno, __pyx_filename);
  40019. __pyx_L0:;
  40020. __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  40021. #if !CYTHON_USE_EXC_INFO_STACK
  40022. __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  40023. #endif
  40024. __pyx_generator->resume_label = -1;
  40025. __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  40026. __Pyx_RefNannyFinishContext();
  40027. return __pyx_r;
  40028. }
  40029. static PyObject *__pyx_gb_6uvloop_4loop_4Loop_94generator10(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
  40030. /* "uvloop/loop.pyx":2443
  40031. *
  40032. * @cython.iterable_coroutine
  40033. * async def sock_accept(self, sock): # <<<<<<<<<<<<<<
  40034. * """Accept a connection.
  40035. *
  40036. */
  40037. /* Python wrapper */
  40038. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_93sock_accept(PyObject *__pyx_v_self, PyObject *__pyx_v_sock); /*proto*/
  40039. static char __pyx_doc_6uvloop_4loop_4Loop_92sock_accept[] = "Loop.sock_accept(self, sock)\nAccept a connection.\n\n The socket must be bound to an address and listening for connections.\n The return value is a pair (conn, address) where conn is a new socket\n object usable to send and receive data on the connection, and address\n is the address bound to the socket on the other end of the connection.\n\n This method is a coroutine.\n ";
  40040. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_93sock_accept(PyObject *__pyx_v_self, PyObject *__pyx_v_sock) {
  40041. PyObject *__pyx_r = 0;
  40042. __Pyx_RefNannyDeclarations
  40043. __Pyx_RefNannySetupContext("sock_accept (wrapper)", 0);
  40044. __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_92sock_accept(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self), ((PyObject *)__pyx_v_sock));
  40045. /* function exit code */
  40046. __Pyx_RefNannyFinishContext();
  40047. return __pyx_r;
  40048. }
  40049. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_92sock_accept(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_sock) {
  40050. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_17_sock_accept *__pyx_cur_scope;
  40051. PyObject *__pyx_r = NULL;
  40052. __Pyx_RefNannyDeclarations
  40053. __Pyx_RefNannySetupContext("sock_accept", 0);
  40054. __pyx_cur_scope = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_17_sock_accept *)__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_17_sock_accept(__pyx_ptype_6uvloop_4loop___pyx_scope_struct_17_sock_accept, __pyx_empty_tuple, NULL);
  40055. if (unlikely(!__pyx_cur_scope)) {
  40056. __pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_17_sock_accept *)Py_None);
  40057. __Pyx_INCREF(Py_None);
  40058. __PYX_ERR(2, 2443, __pyx_L1_error)
  40059. } else {
  40060. __Pyx_GOTREF(__pyx_cur_scope);
  40061. }
  40062. __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  40063. __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  40064. __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  40065. __pyx_cur_scope->__pyx_v_sock = __pyx_v_sock;
  40066. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_sock);
  40067. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_sock);
  40068. {
  40069. __pyx_CoroutineObject *gen = __Pyx_IterableCoroutine_New((__pyx_coroutine_body_t) __pyx_gb_6uvloop_4loop_4Loop_94generator10, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_sock_accept, __pyx_n_s_Loop_sock_accept, __pyx_n_s_uvloop_loop); if (unlikely(!gen)) __PYX_ERR(2, 2443, __pyx_L1_error)
  40070. __Pyx_DECREF(__pyx_cur_scope);
  40071. __Pyx_RefNannyFinishContext();
  40072. return (PyObject *) gen;
  40073. }
  40074. /* function exit code */
  40075. __pyx_L1_error:;
  40076. __Pyx_AddTraceback("uvloop.loop.Loop.sock_accept", __pyx_clineno, __pyx_lineno, __pyx_filename);
  40077. __pyx_r = NULL;
  40078. __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  40079. __Pyx_XGIVEREF(__pyx_r);
  40080. __Pyx_RefNannyFinishContext();
  40081. return __pyx_r;
  40082. }
  40083. static PyObject *__pyx_gb_6uvloop_4loop_4Loop_94generator10(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
  40084. {
  40085. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_17_sock_accept *__pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_17_sock_accept *)__pyx_generator->closure);
  40086. PyObject *__pyx_r = NULL;
  40087. int __pyx_t_1;
  40088. int __pyx_t_2;
  40089. PyObject *__pyx_t_3 = NULL;
  40090. PyObject *__pyx_t_4 = NULL;
  40091. PyObject *__pyx_t_5 = NULL;
  40092. int __pyx_t_6;
  40093. PyObject *__pyx_t_7 = NULL;
  40094. __Pyx_RefNannyDeclarations
  40095. __Pyx_RefNannySetupContext("sock_accept", 0);
  40096. switch (__pyx_generator->resume_label) {
  40097. case 0: goto __pyx_L3_first_run;
  40098. case 1: goto __pyx_L7_resume_from_await;
  40099. default: /* CPython raises the right error here */
  40100. __Pyx_RefNannyFinishContext();
  40101. return NULL;
  40102. }
  40103. __pyx_L3_first_run:;
  40104. if (unlikely(!__pyx_sent_value)) __PYX_ERR(2, 2443, __pyx_L1_error)
  40105. /* "uvloop/loop.pyx":2456
  40106. * Handle handle
  40107. *
  40108. * if self._debug and sock.gettimeout() != 0: # <<<<<<<<<<<<<<
  40109. * raise ValueError("the socket must be non-blocking")
  40110. *
  40111. */
  40112. __pyx_t_2 = (__pyx_cur_scope->__pyx_v_self->_debug != 0);
  40113. if (__pyx_t_2) {
  40114. } else {
  40115. __pyx_t_1 = __pyx_t_2;
  40116. goto __pyx_L5_bool_binop_done;
  40117. }
  40118. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_sock, __pyx_n_s_gettimeout); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2456, __pyx_L1_error)
  40119. __Pyx_GOTREF(__pyx_t_4);
  40120. __pyx_t_5 = NULL;
  40121. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
  40122. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
  40123. if (likely(__pyx_t_5)) {
  40124. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  40125. __Pyx_INCREF(__pyx_t_5);
  40126. __Pyx_INCREF(function);
  40127. __Pyx_DECREF_SET(__pyx_t_4, function);
  40128. }
  40129. }
  40130. __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
  40131. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  40132. if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2456, __pyx_L1_error)
  40133. __Pyx_GOTREF(__pyx_t_3);
  40134. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  40135. __pyx_t_4 = __Pyx_PyInt_NeObjC(__pyx_t_3, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2456, __pyx_L1_error)
  40136. __Pyx_GOTREF(__pyx_t_4);
  40137. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  40138. __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(2, 2456, __pyx_L1_error)
  40139. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  40140. __pyx_t_1 = __pyx_t_2;
  40141. __pyx_L5_bool_binop_done:;
  40142. if (unlikely(__pyx_t_1)) {
  40143. /* "uvloop/loop.pyx":2457
  40144. *
  40145. * if self._debug and sock.gettimeout() != 0:
  40146. * raise ValueError("the socket must be non-blocking") # <<<<<<<<<<<<<<
  40147. *
  40148. * fut = _SyncSocketReaderFuture(sock, self)
  40149. */
  40150. __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__62, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2457, __pyx_L1_error)
  40151. __Pyx_GOTREF(__pyx_t_4);
  40152. __Pyx_Raise(__pyx_t_4, 0, 0, 0);
  40153. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  40154. __PYX_ERR(2, 2457, __pyx_L1_error)
  40155. /* "uvloop/loop.pyx":2456
  40156. * Handle handle
  40157. *
  40158. * if self._debug and sock.gettimeout() != 0: # <<<<<<<<<<<<<<
  40159. * raise ValueError("the socket must be non-blocking")
  40160. *
  40161. */
  40162. }
  40163. /* "uvloop/loop.pyx":2459
  40164. * raise ValueError("the socket must be non-blocking")
  40165. *
  40166. * fut = _SyncSocketReaderFuture(sock, self) # <<<<<<<<<<<<<<
  40167. * handle = new_MethodHandle2(
  40168. * self,
  40169. */
  40170. __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_SyncSocketReaderFuture); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2459, __pyx_L1_error)
  40171. __Pyx_GOTREF(__pyx_t_3);
  40172. __pyx_t_5 = NULL;
  40173. __pyx_t_6 = 0;
  40174. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
  40175. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
  40176. if (likely(__pyx_t_5)) {
  40177. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  40178. __Pyx_INCREF(__pyx_t_5);
  40179. __Pyx_INCREF(function);
  40180. __Pyx_DECREF_SET(__pyx_t_3, function);
  40181. __pyx_t_6 = 1;
  40182. }
  40183. }
  40184. #if CYTHON_FAST_PYCALL
  40185. if (PyFunction_Check(__pyx_t_3)) {
  40186. PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_cur_scope->__pyx_v_sock, ((PyObject *)__pyx_cur_scope->__pyx_v_self)};
  40187. __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2459, __pyx_L1_error)
  40188. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  40189. __Pyx_GOTREF(__pyx_t_4);
  40190. } else
  40191. #endif
  40192. #if CYTHON_FAST_PYCCALL
  40193. if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
  40194. PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_cur_scope->__pyx_v_sock, ((PyObject *)__pyx_cur_scope->__pyx_v_self)};
  40195. __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2459, __pyx_L1_error)
  40196. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  40197. __Pyx_GOTREF(__pyx_t_4);
  40198. } else
  40199. #endif
  40200. {
  40201. __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 2459, __pyx_L1_error)
  40202. __Pyx_GOTREF(__pyx_t_7);
  40203. if (__pyx_t_5) {
  40204. __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
  40205. }
  40206. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_sock);
  40207. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_sock);
  40208. PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_cur_scope->__pyx_v_sock);
  40209. __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_self));
  40210. __Pyx_GIVEREF(((PyObject *)__pyx_cur_scope->__pyx_v_self));
  40211. PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, ((PyObject *)__pyx_cur_scope->__pyx_v_self));
  40212. __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2459, __pyx_L1_error)
  40213. __Pyx_GOTREF(__pyx_t_4);
  40214. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  40215. }
  40216. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  40217. __Pyx_GIVEREF(__pyx_t_4);
  40218. __pyx_cur_scope->__pyx_v_fut = __pyx_t_4;
  40219. __pyx_t_4 = 0;
  40220. /* "uvloop/loop.pyx":2460
  40221. *
  40222. * fut = _SyncSocketReaderFuture(sock, self)
  40223. * handle = new_MethodHandle2( # <<<<<<<<<<<<<<
  40224. * self,
  40225. * "Loop._sock_accept",
  40226. */
  40227. __pyx_t_4 = __pyx_f_6uvloop_4loop_new_MethodHandle2(__pyx_cur_scope->__pyx_v_self, __pyx_kp_u_Loop__sock_accept, ((__pyx_t_6uvloop_4loop_method2_t)((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->_sock_accept), ((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_cur_scope->__pyx_v_fut, __pyx_cur_scope->__pyx_v_sock); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2460, __pyx_L1_error)
  40228. __Pyx_GOTREF(__pyx_t_4);
  40229. if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_6uvloop_4loop_Handle))))) __PYX_ERR(2, 2460, __pyx_L1_error)
  40230. __Pyx_GIVEREF(__pyx_t_4);
  40231. __pyx_cur_scope->__pyx_v_handle = ((struct __pyx_obj_6uvloop_4loop_Handle *)__pyx_t_4);
  40232. __pyx_t_4 = 0;
  40233. /* "uvloop/loop.pyx":2467
  40234. * fut, sock)
  40235. *
  40236. * self._add_reader(sock, handle) # <<<<<<<<<<<<<<
  40237. * return await fut
  40238. *
  40239. */
  40240. __pyx_t_4 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->_add_reader(__pyx_cur_scope->__pyx_v_self, __pyx_cur_scope->__pyx_v_sock, __pyx_cur_scope->__pyx_v_handle); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2467, __pyx_L1_error)
  40241. __Pyx_GOTREF(__pyx_t_4);
  40242. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  40243. /* "uvloop/loop.pyx":2468
  40244. *
  40245. * self._add_reader(sock, handle)
  40246. * return await fut # <<<<<<<<<<<<<<
  40247. *
  40248. * @cython.iterable_coroutine
  40249. */
  40250. __Pyx_XDECREF(__pyx_r);
  40251. __pyx_r = __Pyx_Coroutine_Yield_From(__pyx_generator, __pyx_cur_scope->__pyx_v_fut);
  40252. __Pyx_XGOTREF(__pyx_r);
  40253. if (likely(__pyx_r)) {
  40254. __Pyx_XGIVEREF(__pyx_r);
  40255. __Pyx_RefNannyFinishContext();
  40256. __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  40257. /* return from generator, awaiting value */
  40258. __pyx_generator->resume_label = 1;
  40259. return __pyx_r;
  40260. __pyx_L7_resume_from_await:;
  40261. if (unlikely(!__pyx_sent_value)) __PYX_ERR(2, 2468, __pyx_L1_error)
  40262. __pyx_t_4 = __pyx_sent_value; __Pyx_INCREF(__pyx_t_4);
  40263. } else {
  40264. __pyx_t_4 = NULL;
  40265. if (__Pyx_PyGen_FetchStopIterationValue(&__pyx_t_4) < 0) __PYX_ERR(2, 2468, __pyx_L1_error)
  40266. __Pyx_GOTREF(__pyx_t_4);
  40267. }
  40268. __pyx_r = NULL; __Pyx_ReturnWithStopIteration(__pyx_t_4);
  40269. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  40270. __pyx_t_4 = 0;
  40271. goto __pyx_L0;
  40272. CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
  40273. /* "uvloop/loop.pyx":2443
  40274. *
  40275. * @cython.iterable_coroutine
  40276. * async def sock_accept(self, sock): # <<<<<<<<<<<<<<
  40277. * """Accept a connection.
  40278. *
  40279. */
  40280. /* function exit code */
  40281. __pyx_L1_error:;
  40282. __Pyx_XDECREF(__pyx_t_3);
  40283. __Pyx_XDECREF(__pyx_t_4);
  40284. __Pyx_XDECREF(__pyx_t_5);
  40285. __Pyx_XDECREF(__pyx_t_7);
  40286. __Pyx_AddTraceback("sock_accept", __pyx_clineno, __pyx_lineno, __pyx_filename);
  40287. __pyx_L0:;
  40288. __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  40289. #if !CYTHON_USE_EXC_INFO_STACK
  40290. __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  40291. #endif
  40292. __pyx_generator->resume_label = -1;
  40293. __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  40294. __Pyx_RefNannyFinishContext();
  40295. return __pyx_r;
  40296. }
  40297. static PyObject *__pyx_gb_6uvloop_4loop_4Loop_97generator11(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
  40298. /* "uvloop/loop.pyx":2471
  40299. *
  40300. * @cython.iterable_coroutine
  40301. * async def sock_connect(self, sock, address): # <<<<<<<<<<<<<<
  40302. * """Connect to a remote socket at address.
  40303. *
  40304. */
  40305. /* Python wrapper */
  40306. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_96sock_connect(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  40307. static char __pyx_doc_6uvloop_4loop_4Loop_95sock_connect[] = "Loop.sock_connect(self, sock, address)\nConnect to a remote socket at address.\n\n This method is a coroutine.\n ";
  40308. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_96sock_connect(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  40309. PyObject *__pyx_v_sock = 0;
  40310. PyObject *__pyx_v_address = 0;
  40311. PyObject *__pyx_r = 0;
  40312. __Pyx_RefNannyDeclarations
  40313. __Pyx_RefNannySetupContext("sock_connect (wrapper)", 0);
  40314. {
  40315. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sock,&__pyx_n_s_address,0};
  40316. PyObject* values[2] = {0,0};
  40317. if (unlikely(__pyx_kwds)) {
  40318. Py_ssize_t kw_args;
  40319. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  40320. switch (pos_args) {
  40321. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  40322. CYTHON_FALLTHROUGH;
  40323. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  40324. CYTHON_FALLTHROUGH;
  40325. case 0: break;
  40326. default: goto __pyx_L5_argtuple_error;
  40327. }
  40328. kw_args = PyDict_Size(__pyx_kwds);
  40329. switch (pos_args) {
  40330. case 0:
  40331. if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sock)) != 0)) kw_args--;
  40332. else goto __pyx_L5_argtuple_error;
  40333. CYTHON_FALLTHROUGH;
  40334. case 1:
  40335. if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_address)) != 0)) kw_args--;
  40336. else {
  40337. __Pyx_RaiseArgtupleInvalid("sock_connect", 1, 2, 2, 1); __PYX_ERR(2, 2471, __pyx_L3_error)
  40338. }
  40339. }
  40340. if (unlikely(kw_args > 0)) {
  40341. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sock_connect") < 0)) __PYX_ERR(2, 2471, __pyx_L3_error)
  40342. }
  40343. } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
  40344. goto __pyx_L5_argtuple_error;
  40345. } else {
  40346. values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  40347. values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  40348. }
  40349. __pyx_v_sock = values[0];
  40350. __pyx_v_address = values[1];
  40351. }
  40352. goto __pyx_L4_argument_unpacking_done;
  40353. __pyx_L5_argtuple_error:;
  40354. __Pyx_RaiseArgtupleInvalid("sock_connect", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 2471, __pyx_L3_error)
  40355. __pyx_L3_error:;
  40356. __Pyx_AddTraceback("uvloop.loop.Loop.sock_connect", __pyx_clineno, __pyx_lineno, __pyx_filename);
  40357. __Pyx_RefNannyFinishContext();
  40358. return NULL;
  40359. __pyx_L4_argument_unpacking_done:;
  40360. __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_95sock_connect(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self), __pyx_v_sock, __pyx_v_address);
  40361. /* function exit code */
  40362. __Pyx_RefNannyFinishContext();
  40363. return __pyx_r;
  40364. }
  40365. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_95sock_connect(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_sock, PyObject *__pyx_v_address) {
  40366. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_18_sock_connect *__pyx_cur_scope;
  40367. PyObject *__pyx_r = NULL;
  40368. __Pyx_RefNannyDeclarations
  40369. __Pyx_RefNannySetupContext("sock_connect", 0);
  40370. __pyx_cur_scope = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_18_sock_connect *)__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_18_sock_connect(__pyx_ptype_6uvloop_4loop___pyx_scope_struct_18_sock_connect, __pyx_empty_tuple, NULL);
  40371. if (unlikely(!__pyx_cur_scope)) {
  40372. __pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_18_sock_connect *)Py_None);
  40373. __Pyx_INCREF(Py_None);
  40374. __PYX_ERR(2, 2471, __pyx_L1_error)
  40375. } else {
  40376. __Pyx_GOTREF(__pyx_cur_scope);
  40377. }
  40378. __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  40379. __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  40380. __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  40381. __pyx_cur_scope->__pyx_v_sock = __pyx_v_sock;
  40382. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_sock);
  40383. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_sock);
  40384. __pyx_cur_scope->__pyx_v_address = __pyx_v_address;
  40385. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_address);
  40386. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_address);
  40387. {
  40388. __pyx_CoroutineObject *gen = __Pyx_IterableCoroutine_New((__pyx_coroutine_body_t) __pyx_gb_6uvloop_4loop_4Loop_97generator11, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_sock_connect, __pyx_n_s_Loop_sock_connect, __pyx_n_s_uvloop_loop); if (unlikely(!gen)) __PYX_ERR(2, 2471, __pyx_L1_error)
  40389. __Pyx_DECREF(__pyx_cur_scope);
  40390. __Pyx_RefNannyFinishContext();
  40391. return (PyObject *) gen;
  40392. }
  40393. /* function exit code */
  40394. __pyx_L1_error:;
  40395. __Pyx_AddTraceback("uvloop.loop.Loop.sock_connect", __pyx_clineno, __pyx_lineno, __pyx_filename);
  40396. __pyx_r = NULL;
  40397. __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  40398. __Pyx_XGIVEREF(__pyx_r);
  40399. __Pyx_RefNannyFinishContext();
  40400. return __pyx_r;
  40401. }
  40402. static PyObject *__pyx_gb_6uvloop_4loop_4Loop_97generator11(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
  40403. {
  40404. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_18_sock_connect *__pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_18_sock_connect *)__pyx_generator->closure);
  40405. PyObject *__pyx_r = NULL;
  40406. int __pyx_t_1;
  40407. int __pyx_t_2;
  40408. PyObject *__pyx_t_3 = NULL;
  40409. PyObject *__pyx_t_4 = NULL;
  40410. PyObject *__pyx_t_5 = NULL;
  40411. PyObject *__pyx_t_6 = NULL;
  40412. PyObject *__pyx_t_7 = NULL;
  40413. PyObject *__pyx_t_8 = NULL;
  40414. PyObject *__pyx_t_9 = NULL;
  40415. PyObject *(*__pyx_t_10)(PyObject *);
  40416. int __pyx_t_11;
  40417. int __pyx_t_12;
  40418. char const *__pyx_t_13;
  40419. PyObject *__pyx_t_14 = NULL;
  40420. PyObject *__pyx_t_15 = NULL;
  40421. PyObject *__pyx_t_16 = NULL;
  40422. PyObject *__pyx_t_17 = NULL;
  40423. PyObject *__pyx_t_18 = NULL;
  40424. PyObject *__pyx_t_19 = NULL;
  40425. __Pyx_RefNannyDeclarations
  40426. __Pyx_RefNannySetupContext("sock_connect", 0);
  40427. switch (__pyx_generator->resume_label) {
  40428. case 0: goto __pyx_L3_first_run;
  40429. case 1: goto __pyx_L11_resume_from_await;
  40430. case 2: goto __pyx_L15_resume_from_await;
  40431. default: /* CPython raises the right error here */
  40432. __Pyx_RefNannyFinishContext();
  40433. return NULL;
  40434. }
  40435. __pyx_L3_first_run:;
  40436. if (unlikely(!__pyx_sent_value)) __PYX_ERR(2, 2471, __pyx_L1_error)
  40437. /* "uvloop/loop.pyx":2476
  40438. * This method is a coroutine.
  40439. * """
  40440. * if self._debug and sock.gettimeout() != 0: # <<<<<<<<<<<<<<
  40441. * raise ValueError("the socket must be non-blocking")
  40442. *
  40443. */
  40444. __pyx_t_2 = (__pyx_cur_scope->__pyx_v_self->_debug != 0);
  40445. if (__pyx_t_2) {
  40446. } else {
  40447. __pyx_t_1 = __pyx_t_2;
  40448. goto __pyx_L5_bool_binop_done;
  40449. }
  40450. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_sock, __pyx_n_s_gettimeout); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2476, __pyx_L1_error)
  40451. __Pyx_GOTREF(__pyx_t_4);
  40452. __pyx_t_5 = NULL;
  40453. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
  40454. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
  40455. if (likely(__pyx_t_5)) {
  40456. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  40457. __Pyx_INCREF(__pyx_t_5);
  40458. __Pyx_INCREF(function);
  40459. __Pyx_DECREF_SET(__pyx_t_4, function);
  40460. }
  40461. }
  40462. __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
  40463. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  40464. if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2476, __pyx_L1_error)
  40465. __Pyx_GOTREF(__pyx_t_3);
  40466. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  40467. __pyx_t_4 = __Pyx_PyInt_NeObjC(__pyx_t_3, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2476, __pyx_L1_error)
  40468. __Pyx_GOTREF(__pyx_t_4);
  40469. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  40470. __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(2, 2476, __pyx_L1_error)
  40471. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  40472. __pyx_t_1 = __pyx_t_2;
  40473. __pyx_L5_bool_binop_done:;
  40474. if (unlikely(__pyx_t_1)) {
  40475. /* "uvloop/loop.pyx":2477
  40476. * """
  40477. * if self._debug and sock.gettimeout() != 0:
  40478. * raise ValueError("the socket must be non-blocking") # <<<<<<<<<<<<<<
  40479. *
  40480. * socket_inc_io_ref(sock)
  40481. */
  40482. __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__62, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2477, __pyx_L1_error)
  40483. __Pyx_GOTREF(__pyx_t_4);
  40484. __Pyx_Raise(__pyx_t_4, 0, 0, 0);
  40485. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  40486. __PYX_ERR(2, 2477, __pyx_L1_error)
  40487. /* "uvloop/loop.pyx":2476
  40488. * This method is a coroutine.
  40489. * """
  40490. * if self._debug and sock.gettimeout() != 0: # <<<<<<<<<<<<<<
  40491. * raise ValueError("the socket must be non-blocking")
  40492. *
  40493. */
  40494. }
  40495. /* "uvloop/loop.pyx":2479
  40496. * raise ValueError("the socket must be non-blocking")
  40497. *
  40498. * socket_inc_io_ref(sock) # <<<<<<<<<<<<<<
  40499. * try:
  40500. * if sock.family == uv.AF_UNIX:
  40501. */
  40502. __pyx_t_4 = __pyx_f_6uvloop_4loop_socket_inc_io_ref(__pyx_cur_scope->__pyx_v_sock); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2479, __pyx_L1_error)
  40503. __Pyx_GOTREF(__pyx_t_4);
  40504. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  40505. /* "uvloop/loop.pyx":2480
  40506. *
  40507. * socket_inc_io_ref(sock)
  40508. * try: # <<<<<<<<<<<<<<
  40509. * if sock.family == uv.AF_UNIX:
  40510. * fut = self._sock_connect(sock, address)
  40511. */
  40512. /*try:*/ {
  40513. /* "uvloop/loop.pyx":2481
  40514. * socket_inc_io_ref(sock)
  40515. * try:
  40516. * if sock.family == uv.AF_UNIX: # <<<<<<<<<<<<<<
  40517. * fut = self._sock_connect(sock, address)
  40518. * else:
  40519. */
  40520. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_sock, __pyx_n_s_family); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2481, __pyx_L8_error)
  40521. __Pyx_GOTREF(__pyx_t_4);
  40522. __pyx_t_3 = __Pyx_PyInt_From_int(AF_UNIX); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2481, __pyx_L8_error)
  40523. __Pyx_GOTREF(__pyx_t_3);
  40524. __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2481, __pyx_L8_error)
  40525. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  40526. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  40527. __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 2481, __pyx_L8_error)
  40528. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  40529. if (__pyx_t_1) {
  40530. /* "uvloop/loop.pyx":2482
  40531. * try:
  40532. * if sock.family == uv.AF_UNIX:
  40533. * fut = self._sock_connect(sock, address) # <<<<<<<<<<<<<<
  40534. * else:
  40535. * addrs = await self.getaddrinfo(
  40536. */
  40537. __pyx_t_5 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->_sock_connect(__pyx_cur_scope->__pyx_v_self, __pyx_cur_scope->__pyx_v_sock, __pyx_cur_scope->__pyx_v_address); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2482, __pyx_L8_error)
  40538. __Pyx_GOTREF(__pyx_t_5);
  40539. __Pyx_GIVEREF(__pyx_t_5);
  40540. __pyx_cur_scope->__pyx_v_fut = __pyx_t_5;
  40541. __pyx_t_5 = 0;
  40542. /* "uvloop/loop.pyx":2481
  40543. * socket_inc_io_ref(sock)
  40544. * try:
  40545. * if sock.family == uv.AF_UNIX: # <<<<<<<<<<<<<<
  40546. * fut = self._sock_connect(sock, address)
  40547. * else:
  40548. */
  40549. goto __pyx_L10;
  40550. }
  40551. /* "uvloop/loop.pyx":2484
  40552. * fut = self._sock_connect(sock, address)
  40553. * else:
  40554. * addrs = await self.getaddrinfo( # <<<<<<<<<<<<<<
  40555. * *address[:2], family=sock.family)
  40556. *
  40557. */
  40558. /*else*/ {
  40559. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_getaddrinfo); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2484, __pyx_L8_error)
  40560. __Pyx_GOTREF(__pyx_t_5);
  40561. /* "uvloop/loop.pyx":2485
  40562. * else:
  40563. * addrs = await self.getaddrinfo(
  40564. * *address[:2], family=sock.family) # <<<<<<<<<<<<<<
  40565. *
  40566. * _, _, _, _, address = addrs[0]
  40567. */
  40568. __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_cur_scope->__pyx_v_address, 0, 2, NULL, NULL, &__pyx_slice__63, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2485, __pyx_L8_error)
  40569. __Pyx_GOTREF(__pyx_t_3);
  40570. /* "uvloop/loop.pyx":2484
  40571. * fut = self._sock_connect(sock, address)
  40572. * else:
  40573. * addrs = await self.getaddrinfo( # <<<<<<<<<<<<<<
  40574. * *address[:2], family=sock.family)
  40575. *
  40576. */
  40577. __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2484, __pyx_L8_error)
  40578. __Pyx_GOTREF(__pyx_t_4);
  40579. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  40580. /* "uvloop/loop.pyx":2485
  40581. * else:
  40582. * addrs = await self.getaddrinfo(
  40583. * *address[:2], family=sock.family) # <<<<<<<<<<<<<<
  40584. *
  40585. * _, _, _, _, address = addrs[0]
  40586. */
  40587. __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2485, __pyx_L8_error)
  40588. __Pyx_GOTREF(__pyx_t_3);
  40589. __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_sock, __pyx_n_s_family); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 2485, __pyx_L8_error)
  40590. __Pyx_GOTREF(__pyx_t_6);
  40591. if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_family, __pyx_t_6) < 0) __PYX_ERR(2, 2485, __pyx_L8_error)
  40592. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  40593. /* "uvloop/loop.pyx":2484
  40594. * fut = self._sock_connect(sock, address)
  40595. * else:
  40596. * addrs = await self.getaddrinfo( # <<<<<<<<<<<<<<
  40597. * *address[:2], family=sock.family)
  40598. *
  40599. */
  40600. __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 2484, __pyx_L8_error)
  40601. __Pyx_GOTREF(__pyx_t_6);
  40602. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  40603. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  40604. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  40605. __pyx_r = __Pyx_Coroutine_Yield_From(__pyx_generator, __pyx_t_6);
  40606. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  40607. __Pyx_XGOTREF(__pyx_r);
  40608. if (likely(__pyx_r)) {
  40609. __Pyx_XGIVEREF(__pyx_r);
  40610. __Pyx_RefNannyFinishContext();
  40611. __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  40612. /* return from generator, awaiting value */
  40613. __pyx_generator->resume_label = 1;
  40614. return __pyx_r;
  40615. __pyx_L11_resume_from_await:;
  40616. if (unlikely(!__pyx_sent_value)) __PYX_ERR(2, 2484, __pyx_L8_error)
  40617. __pyx_t_6 = __pyx_sent_value; __Pyx_INCREF(__pyx_t_6);
  40618. } else {
  40619. __pyx_t_6 = NULL;
  40620. if (__Pyx_PyGen_FetchStopIterationValue(&__pyx_t_6) < 0) __PYX_ERR(2, 2484, __pyx_L8_error)
  40621. __Pyx_GOTREF(__pyx_t_6);
  40622. }
  40623. __Pyx_GIVEREF(__pyx_t_6);
  40624. __pyx_cur_scope->__pyx_v_addrs = __pyx_t_6;
  40625. __pyx_t_6 = 0;
  40626. /* "uvloop/loop.pyx":2487
  40627. * *address[:2], family=sock.family)
  40628. *
  40629. * _, _, _, _, address = addrs[0] # <<<<<<<<<<<<<<
  40630. * fut = self._sock_connect(sock, address)
  40631. * if fut is not None:
  40632. */
  40633. __pyx_t_6 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_addrs, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 2487, __pyx_L8_error)
  40634. __Pyx_GOTREF(__pyx_t_6);
  40635. if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) {
  40636. PyObject* sequence = __pyx_t_6;
  40637. Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
  40638. if (unlikely(size != 5)) {
  40639. if (size > 5) __Pyx_RaiseTooManyValuesError(5);
  40640. else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
  40641. __PYX_ERR(2, 2487, __pyx_L8_error)
  40642. }
  40643. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  40644. if (likely(PyTuple_CheckExact(sequence))) {
  40645. __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0);
  40646. __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1);
  40647. __pyx_t_5 = PyTuple_GET_ITEM(sequence, 2);
  40648. __pyx_t_7 = PyTuple_GET_ITEM(sequence, 3);
  40649. __pyx_t_8 = PyTuple_GET_ITEM(sequence, 4);
  40650. } else {
  40651. __pyx_t_3 = PyList_GET_ITEM(sequence, 0);
  40652. __pyx_t_4 = PyList_GET_ITEM(sequence, 1);
  40653. __pyx_t_5 = PyList_GET_ITEM(sequence, 2);
  40654. __pyx_t_7 = PyList_GET_ITEM(sequence, 3);
  40655. __pyx_t_8 = PyList_GET_ITEM(sequence, 4);
  40656. }
  40657. __Pyx_INCREF(__pyx_t_3);
  40658. __Pyx_INCREF(__pyx_t_4);
  40659. __Pyx_INCREF(__pyx_t_5);
  40660. __Pyx_INCREF(__pyx_t_7);
  40661. __Pyx_INCREF(__pyx_t_8);
  40662. #else
  40663. {
  40664. Py_ssize_t i;
  40665. PyObject** temps[5] = {&__pyx_t_3,&__pyx_t_4,&__pyx_t_5,&__pyx_t_7,&__pyx_t_8};
  40666. for (i=0; i < 5; i++) {
  40667. PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(2, 2487, __pyx_L8_error)
  40668. __Pyx_GOTREF(item);
  40669. *(temps[i]) = item;
  40670. }
  40671. }
  40672. #endif
  40673. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  40674. } else {
  40675. Py_ssize_t index = -1;
  40676. PyObject** temps[5] = {&__pyx_t_3,&__pyx_t_4,&__pyx_t_5,&__pyx_t_7,&__pyx_t_8};
  40677. __pyx_t_9 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 2487, __pyx_L8_error)
  40678. __Pyx_GOTREF(__pyx_t_9);
  40679. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  40680. __pyx_t_10 = Py_TYPE(__pyx_t_9)->tp_iternext;
  40681. for (index=0; index < 5; index++) {
  40682. PyObject* item = __pyx_t_10(__pyx_t_9); if (unlikely(!item)) goto __pyx_L12_unpacking_failed;
  40683. __Pyx_GOTREF(item);
  40684. *(temps[index]) = item;
  40685. }
  40686. if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 5) < 0) __PYX_ERR(2, 2487, __pyx_L8_error)
  40687. __pyx_t_10 = NULL;
  40688. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  40689. goto __pyx_L13_unpacking_done;
  40690. __pyx_L12_unpacking_failed:;
  40691. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  40692. __pyx_t_10 = NULL;
  40693. if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
  40694. __PYX_ERR(2, 2487, __pyx_L8_error)
  40695. __pyx_L13_unpacking_done:;
  40696. }
  40697. __Pyx_GIVEREF(__pyx_t_3);
  40698. __pyx_cur_scope->__pyx_v__ = __pyx_t_3;
  40699. __pyx_t_3 = 0;
  40700. __Pyx_GOTREF(__pyx_cur_scope->__pyx_v__);
  40701. __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v__, __pyx_t_4);
  40702. __Pyx_GIVEREF(__pyx_t_4);
  40703. __pyx_t_4 = 0;
  40704. __Pyx_GOTREF(__pyx_cur_scope->__pyx_v__);
  40705. __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v__, __pyx_t_5);
  40706. __Pyx_GIVEREF(__pyx_t_5);
  40707. __pyx_t_5 = 0;
  40708. __Pyx_GOTREF(__pyx_cur_scope->__pyx_v__);
  40709. __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v__, __pyx_t_7);
  40710. __Pyx_GIVEREF(__pyx_t_7);
  40711. __pyx_t_7 = 0;
  40712. __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_address);
  40713. __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_address, __pyx_t_8);
  40714. __Pyx_GIVEREF(__pyx_t_8);
  40715. __pyx_t_8 = 0;
  40716. /* "uvloop/loop.pyx":2488
  40717. *
  40718. * _, _, _, _, address = addrs[0]
  40719. * fut = self._sock_connect(sock, address) # <<<<<<<<<<<<<<
  40720. * if fut is not None:
  40721. * await fut
  40722. */
  40723. __pyx_t_6 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->_sock_connect(__pyx_cur_scope->__pyx_v_self, __pyx_cur_scope->__pyx_v_sock, __pyx_cur_scope->__pyx_v_address); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 2488, __pyx_L8_error)
  40724. __Pyx_GOTREF(__pyx_t_6);
  40725. __Pyx_GIVEREF(__pyx_t_6);
  40726. __pyx_cur_scope->__pyx_v_fut = __pyx_t_6;
  40727. __pyx_t_6 = 0;
  40728. }
  40729. __pyx_L10:;
  40730. /* "uvloop/loop.pyx":2489
  40731. * _, _, _, _, address = addrs[0]
  40732. * fut = self._sock_connect(sock, address)
  40733. * if fut is not None: # <<<<<<<<<<<<<<
  40734. * await fut
  40735. * finally:
  40736. */
  40737. __pyx_t_1 = (__pyx_cur_scope->__pyx_v_fut != Py_None);
  40738. __pyx_t_2 = (__pyx_t_1 != 0);
  40739. if (__pyx_t_2) {
  40740. /* "uvloop/loop.pyx":2490
  40741. * fut = self._sock_connect(sock, address)
  40742. * if fut is not None:
  40743. * await fut # <<<<<<<<<<<<<<
  40744. * finally:
  40745. * socket_dec_io_ref(sock)
  40746. */
  40747. __pyx_r = __Pyx_Coroutine_Yield_From(__pyx_generator, __pyx_cur_scope->__pyx_v_fut);
  40748. __Pyx_XGOTREF(__pyx_r);
  40749. if (likely(__pyx_r)) {
  40750. __Pyx_XGIVEREF(__pyx_r);
  40751. __Pyx_RefNannyFinishContext();
  40752. __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  40753. /* return from generator, awaiting value */
  40754. __pyx_generator->resume_label = 2;
  40755. return __pyx_r;
  40756. __pyx_L15_resume_from_await:;
  40757. if (unlikely(!__pyx_sent_value)) __PYX_ERR(2, 2490, __pyx_L8_error)
  40758. } else {
  40759. PyObject* exc_type = __Pyx_PyErr_Occurred();
  40760. if (exc_type) {
  40761. if (likely(exc_type == PyExc_StopIteration || (exc_type != PyExc_GeneratorExit && __Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)))) PyErr_Clear();
  40762. else __PYX_ERR(2, 2490, __pyx_L8_error)
  40763. }
  40764. }
  40765. /* "uvloop/loop.pyx":2489
  40766. * _, _, _, _, address = addrs[0]
  40767. * fut = self._sock_connect(sock, address)
  40768. * if fut is not None: # <<<<<<<<<<<<<<
  40769. * await fut
  40770. * finally:
  40771. */
  40772. }
  40773. }
  40774. /* "uvloop/loop.pyx":2492
  40775. * await fut
  40776. * finally:
  40777. * socket_dec_io_ref(sock) # <<<<<<<<<<<<<<
  40778. *
  40779. * @cython.iterable_coroutine
  40780. */
  40781. /*finally:*/ {
  40782. /*normal exit:*/{
  40783. __pyx_t_6 = __pyx_f_6uvloop_4loop_socket_dec_io_ref(__pyx_cur_scope->__pyx_v_sock); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 2492, __pyx_L1_error)
  40784. __Pyx_GOTREF(__pyx_t_6);
  40785. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  40786. goto __pyx_L9;
  40787. }
  40788. __pyx_L8_error:;
  40789. /*exception exit:*/{
  40790. __Pyx_PyThreadState_assign
  40791. __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0;
  40792. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  40793. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  40794. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  40795. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  40796. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  40797. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  40798. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  40799. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19);
  40800. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16) < 0)) __Pyx_ErrFetch(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16);
  40801. __Pyx_XGOTREF(__pyx_t_14);
  40802. __Pyx_XGOTREF(__pyx_t_15);
  40803. __Pyx_XGOTREF(__pyx_t_16);
  40804. __Pyx_XGOTREF(__pyx_t_17);
  40805. __Pyx_XGOTREF(__pyx_t_18);
  40806. __Pyx_XGOTREF(__pyx_t_19);
  40807. __pyx_t_11 = __pyx_lineno; __pyx_t_12 = __pyx_clineno; __pyx_t_13 = __pyx_filename;
  40808. {
  40809. __pyx_t_6 = __pyx_f_6uvloop_4loop_socket_dec_io_ref(__pyx_cur_scope->__pyx_v_sock); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 2492, __pyx_L17_error)
  40810. __Pyx_GOTREF(__pyx_t_6);
  40811. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  40812. }
  40813. if (PY_MAJOR_VERSION >= 3) {
  40814. __Pyx_XGIVEREF(__pyx_t_17);
  40815. __Pyx_XGIVEREF(__pyx_t_18);
  40816. __Pyx_XGIVEREF(__pyx_t_19);
  40817. __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_18, __pyx_t_19);
  40818. }
  40819. __Pyx_XGIVEREF(__pyx_t_14);
  40820. __Pyx_XGIVEREF(__pyx_t_15);
  40821. __Pyx_XGIVEREF(__pyx_t_16);
  40822. __Pyx_ErrRestore(__pyx_t_14, __pyx_t_15, __pyx_t_16);
  40823. __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0;
  40824. __pyx_lineno = __pyx_t_11; __pyx_clineno = __pyx_t_12; __pyx_filename = __pyx_t_13;
  40825. goto __pyx_L1_error;
  40826. __pyx_L17_error:;
  40827. if (PY_MAJOR_VERSION >= 3) {
  40828. __Pyx_XGIVEREF(__pyx_t_17);
  40829. __Pyx_XGIVEREF(__pyx_t_18);
  40830. __Pyx_XGIVEREF(__pyx_t_19);
  40831. __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_18, __pyx_t_19);
  40832. }
  40833. __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
  40834. __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
  40835. __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
  40836. __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0;
  40837. goto __pyx_L1_error;
  40838. }
  40839. __pyx_L9:;
  40840. }
  40841. CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
  40842. /* "uvloop/loop.pyx":2471
  40843. *
  40844. * @cython.iterable_coroutine
  40845. * async def sock_connect(self, sock, address): # <<<<<<<<<<<<<<
  40846. * """Connect to a remote socket at address.
  40847. *
  40848. */
  40849. /* function exit code */
  40850. PyErr_SetNone(PyExc_StopIteration);
  40851. goto __pyx_L0;
  40852. __pyx_L1_error:;
  40853. __Pyx_XDECREF(__pyx_t_3);
  40854. __Pyx_XDECREF(__pyx_t_4);
  40855. __Pyx_XDECREF(__pyx_t_5);
  40856. __Pyx_XDECREF(__pyx_t_6);
  40857. __Pyx_XDECREF(__pyx_t_7);
  40858. __Pyx_XDECREF(__pyx_t_8);
  40859. __Pyx_XDECREF(__pyx_t_9);
  40860. __Pyx_AddTraceback("sock_connect", __pyx_clineno, __pyx_lineno, __pyx_filename);
  40861. __pyx_L0:;
  40862. __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  40863. #if !CYTHON_USE_EXC_INFO_STACK
  40864. __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  40865. #endif
  40866. __pyx_generator->resume_label = -1;
  40867. __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  40868. __Pyx_RefNannyFinishContext();
  40869. return __pyx_r;
  40870. }
  40871. static PyObject *__pyx_gb_6uvloop_4loop_4Loop_100generator12(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
  40872. /* "uvloop/loop.pyx":2495
  40873. *
  40874. * @cython.iterable_coroutine
  40875. * async def connect_accepted_socket(self, protocol_factory, sock, *, # <<<<<<<<<<<<<<
  40876. * ssl=None,
  40877. * ssl_handshake_timeout=None,
  40878. */
  40879. /* Python wrapper */
  40880. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_99connect_accepted_socket(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  40881. static char __pyx_doc_6uvloop_4loop_4Loop_98connect_accepted_socket[] = "Loop.connect_accepted_socket(self, protocol_factory, sock, *, ssl=None, ssl_handshake_timeout=None, ssl_shutdown_timeout=None)\nHandle an accepted connection.\n\n This is used by servers that accept connections outside of\n asyncio but that use asyncio to handle connections.\n\n This method is a coroutine. When completed, the coroutine\n returns a (transport, protocol) pair.\n ";
  40882. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_99connect_accepted_socket(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  40883. PyObject *__pyx_v_protocol_factory = 0;
  40884. PyObject *__pyx_v_sock = 0;
  40885. PyObject *__pyx_v_ssl = 0;
  40886. PyObject *__pyx_v_ssl_handshake_timeout = 0;
  40887. PyObject *__pyx_v_ssl_shutdown_timeout = 0;
  40888. PyObject *__pyx_r = 0;
  40889. __Pyx_RefNannyDeclarations
  40890. __Pyx_RefNannySetupContext("connect_accepted_socket (wrapper)", 0);
  40891. {
  40892. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_protocol_factory,&__pyx_n_s_sock,&__pyx_n_s_ssl,&__pyx_n_s_ssl_handshake_timeout,&__pyx_n_s_ssl_shutdown_timeout,0};
  40893. PyObject* values[5] = {0,0,0,0,0};
  40894. /* "uvloop/loop.pyx":2496
  40895. * @cython.iterable_coroutine
  40896. * async def connect_accepted_socket(self, protocol_factory, sock, *,
  40897. * ssl=None, # <<<<<<<<<<<<<<
  40898. * ssl_handshake_timeout=None,
  40899. * ssl_shutdown_timeout=None):
  40900. */
  40901. values[2] = ((PyObject *)Py_None);
  40902. /* "uvloop/loop.pyx":2497
  40903. * async def connect_accepted_socket(self, protocol_factory, sock, *,
  40904. * ssl=None,
  40905. * ssl_handshake_timeout=None, # <<<<<<<<<<<<<<
  40906. * ssl_shutdown_timeout=None):
  40907. * """Handle an accepted connection.
  40908. */
  40909. values[3] = ((PyObject *)Py_None);
  40910. /* "uvloop/loop.pyx":2498
  40911. * ssl=None,
  40912. * ssl_handshake_timeout=None,
  40913. * ssl_shutdown_timeout=None): # <<<<<<<<<<<<<<
  40914. * """Handle an accepted connection.
  40915. *
  40916. */
  40917. values[4] = ((PyObject *)Py_None);
  40918. if (unlikely(__pyx_kwds)) {
  40919. Py_ssize_t kw_args;
  40920. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  40921. switch (pos_args) {
  40922. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  40923. CYTHON_FALLTHROUGH;
  40924. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  40925. CYTHON_FALLTHROUGH;
  40926. case 0: break;
  40927. default: goto __pyx_L5_argtuple_error;
  40928. }
  40929. kw_args = PyDict_Size(__pyx_kwds);
  40930. switch (pos_args) {
  40931. case 0:
  40932. if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_protocol_factory)) != 0)) kw_args--;
  40933. else goto __pyx_L5_argtuple_error;
  40934. CYTHON_FALLTHROUGH;
  40935. case 1:
  40936. if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sock)) != 0)) kw_args--;
  40937. else {
  40938. __Pyx_RaiseArgtupleInvalid("connect_accepted_socket", 1, 2, 2, 1); __PYX_ERR(2, 2495, __pyx_L3_error)
  40939. }
  40940. }
  40941. if (kw_args > 0 && likely(kw_args <= 3)) {
  40942. Py_ssize_t index;
  40943. for (index = 2; index < 5 && kw_args > 0; index++) {
  40944. PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, *__pyx_pyargnames[index]);
  40945. if (value) { values[index] = value; kw_args--; }
  40946. }
  40947. }
  40948. if (unlikely(kw_args > 0)) {
  40949. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "connect_accepted_socket") < 0)) __PYX_ERR(2, 2495, __pyx_L3_error)
  40950. }
  40951. } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
  40952. goto __pyx_L5_argtuple_error;
  40953. } else {
  40954. values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  40955. values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  40956. }
  40957. __pyx_v_protocol_factory = values[0];
  40958. __pyx_v_sock = values[1];
  40959. __pyx_v_ssl = values[2];
  40960. __pyx_v_ssl_handshake_timeout = values[3];
  40961. __pyx_v_ssl_shutdown_timeout = values[4];
  40962. }
  40963. goto __pyx_L4_argument_unpacking_done;
  40964. __pyx_L5_argtuple_error:;
  40965. __Pyx_RaiseArgtupleInvalid("connect_accepted_socket", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 2495, __pyx_L3_error)
  40966. __pyx_L3_error:;
  40967. __Pyx_AddTraceback("uvloop.loop.Loop.connect_accepted_socket", __pyx_clineno, __pyx_lineno, __pyx_filename);
  40968. __Pyx_RefNannyFinishContext();
  40969. return NULL;
  40970. __pyx_L4_argument_unpacking_done:;
  40971. __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_98connect_accepted_socket(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self), __pyx_v_protocol_factory, __pyx_v_sock, __pyx_v_ssl, __pyx_v_ssl_handshake_timeout, __pyx_v_ssl_shutdown_timeout);
  40972. /* "uvloop/loop.pyx":2495
  40973. *
  40974. * @cython.iterable_coroutine
  40975. * async def connect_accepted_socket(self, protocol_factory, sock, *, # <<<<<<<<<<<<<<
  40976. * ssl=None,
  40977. * ssl_handshake_timeout=None,
  40978. */
  40979. /* function exit code */
  40980. __Pyx_RefNannyFinishContext();
  40981. return __pyx_r;
  40982. }
  40983. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_98connect_accepted_socket(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_protocol_factory, PyObject *__pyx_v_sock, PyObject *__pyx_v_ssl, PyObject *__pyx_v_ssl_handshake_timeout, PyObject *__pyx_v_ssl_shutdown_timeout) {
  40984. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_19_connect_accepted_socket *__pyx_cur_scope;
  40985. PyObject *__pyx_r = NULL;
  40986. __Pyx_RefNannyDeclarations
  40987. __Pyx_RefNannySetupContext("connect_accepted_socket", 0);
  40988. __pyx_cur_scope = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_19_connect_accepted_socket *)__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_19_connect_accepted_socket(__pyx_ptype_6uvloop_4loop___pyx_scope_struct_19_connect_accepted_socket, __pyx_empty_tuple, NULL);
  40989. if (unlikely(!__pyx_cur_scope)) {
  40990. __pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_19_connect_accepted_socket *)Py_None);
  40991. __Pyx_INCREF(Py_None);
  40992. __PYX_ERR(2, 2495, __pyx_L1_error)
  40993. } else {
  40994. __Pyx_GOTREF(__pyx_cur_scope);
  40995. }
  40996. __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  40997. __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  40998. __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  40999. __pyx_cur_scope->__pyx_v_protocol_factory = __pyx_v_protocol_factory;
  41000. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_protocol_factory);
  41001. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_protocol_factory);
  41002. __pyx_cur_scope->__pyx_v_sock = __pyx_v_sock;
  41003. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_sock);
  41004. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_sock);
  41005. __pyx_cur_scope->__pyx_v_ssl = __pyx_v_ssl;
  41006. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_ssl);
  41007. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_ssl);
  41008. __pyx_cur_scope->__pyx_v_ssl_handshake_timeout = __pyx_v_ssl_handshake_timeout;
  41009. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_ssl_handshake_timeout);
  41010. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_ssl_handshake_timeout);
  41011. __pyx_cur_scope->__pyx_v_ssl_shutdown_timeout = __pyx_v_ssl_shutdown_timeout;
  41012. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_ssl_shutdown_timeout);
  41013. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_ssl_shutdown_timeout);
  41014. {
  41015. __pyx_CoroutineObject *gen = __Pyx_IterableCoroutine_New((__pyx_coroutine_body_t) __pyx_gb_6uvloop_4loop_4Loop_100generator12, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_connect_accepted_socket, __pyx_n_s_Loop_connect_accepted_socket, __pyx_n_s_uvloop_loop); if (unlikely(!gen)) __PYX_ERR(2, 2495, __pyx_L1_error)
  41016. __Pyx_DECREF(__pyx_cur_scope);
  41017. __Pyx_RefNannyFinishContext();
  41018. return (PyObject *) gen;
  41019. }
  41020. /* function exit code */
  41021. __pyx_L1_error:;
  41022. __Pyx_AddTraceback("uvloop.loop.Loop.connect_accepted_socket", __pyx_clineno, __pyx_lineno, __pyx_filename);
  41023. __pyx_r = NULL;
  41024. __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  41025. __Pyx_XGIVEREF(__pyx_r);
  41026. __Pyx_RefNannyFinishContext();
  41027. return __pyx_r;
  41028. }
  41029. static PyObject *__pyx_gb_6uvloop_4loop_4Loop_100generator12(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
  41030. {
  41031. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_19_connect_accepted_socket *__pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_19_connect_accepted_socket *)__pyx_generator->closure);
  41032. PyObject *__pyx_r = NULL;
  41033. int __pyx_t_1;
  41034. int __pyx_t_2;
  41035. PyObject *__pyx_t_3 = NULL;
  41036. PyObject *__pyx_t_4 = NULL;
  41037. PyObject *__pyx_t_5 = NULL;
  41038. int __pyx_t_6;
  41039. PyObject *__pyx_t_7 = NULL;
  41040. PyObject *__pyx_t_8 = NULL;
  41041. PyObject *__pyx_t_9 = NULL;
  41042. PyObject *__pyx_t_10 = NULL;
  41043. PyObject *__pyx_t_11 = NULL;
  41044. PyObject *__pyx_t_12 = NULL;
  41045. __Pyx_RefNannyDeclarations
  41046. __Pyx_RefNannySetupContext("connect_accepted_socket", 0);
  41047. switch (__pyx_generator->resume_label) {
  41048. case 0: goto __pyx_L3_first_run;
  41049. case 1: goto __pyx_L21_resume_from_await;
  41050. case 2: goto __pyx_L30_resume_from_await;
  41051. default: /* CPython raises the right error here */
  41052. __Pyx_RefNannyFinishContext();
  41053. return NULL;
  41054. }
  41055. __pyx_L3_first_run:;
  41056. if (unlikely(!__pyx_sent_value)) __PYX_ERR(2, 2495, __pyx_L1_error)
  41057. /* "uvloop/loop.pyx":2509
  41058. *
  41059. * cdef:
  41060. * UVStream transport = None # <<<<<<<<<<<<<<
  41061. *
  41062. * if ssl is not None:
  41063. */
  41064. __Pyx_INCREF(Py_None);
  41065. __Pyx_GIVEREF(Py_None);
  41066. __pyx_cur_scope->__pyx_v_transport = ((struct __pyx_obj_6uvloop_4loop_UVStream *)Py_None);
  41067. /* "uvloop/loop.pyx":2511
  41068. * UVStream transport = None
  41069. *
  41070. * if ssl is not None: # <<<<<<<<<<<<<<
  41071. * if not isinstance(ssl, ssl_SSLContext):
  41072. * raise TypeError('ssl argument must be an SSLContext or None')
  41073. */
  41074. __pyx_t_1 = (__pyx_cur_scope->__pyx_v_ssl != Py_None);
  41075. __pyx_t_2 = (__pyx_t_1 != 0);
  41076. if (__pyx_t_2) {
  41077. /* "uvloop/loop.pyx":2512
  41078. *
  41079. * if ssl is not None:
  41080. * if not isinstance(ssl, ssl_SSLContext): # <<<<<<<<<<<<<<
  41081. * raise TypeError('ssl argument must be an SSLContext or None')
  41082. * else:
  41083. */
  41084. __pyx_t_3 = __pyx_v_6uvloop_4loop_ssl_SSLContext;
  41085. __Pyx_INCREF(__pyx_t_3);
  41086. __pyx_t_2 = PyObject_IsInstance(__pyx_cur_scope->__pyx_v_ssl, __pyx_t_3); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(2, 2512, __pyx_L1_error)
  41087. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  41088. __pyx_t_1 = ((!(__pyx_t_2 != 0)) != 0);
  41089. if (unlikely(__pyx_t_1)) {
  41090. /* "uvloop/loop.pyx":2513
  41091. * if ssl is not None:
  41092. * if not isinstance(ssl, ssl_SSLContext):
  41093. * raise TypeError('ssl argument must be an SSLContext or None') # <<<<<<<<<<<<<<
  41094. * else:
  41095. * if ssl_handshake_timeout is not None:
  41096. */
  41097. __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__41, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2513, __pyx_L1_error)
  41098. __Pyx_GOTREF(__pyx_t_3);
  41099. __Pyx_Raise(__pyx_t_3, 0, 0, 0);
  41100. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  41101. __PYX_ERR(2, 2513, __pyx_L1_error)
  41102. /* "uvloop/loop.pyx":2512
  41103. *
  41104. * if ssl is not None:
  41105. * if not isinstance(ssl, ssl_SSLContext): # <<<<<<<<<<<<<<
  41106. * raise TypeError('ssl argument must be an SSLContext or None')
  41107. * else:
  41108. */
  41109. }
  41110. /* "uvloop/loop.pyx":2511
  41111. * UVStream transport = None
  41112. *
  41113. * if ssl is not None: # <<<<<<<<<<<<<<
  41114. * if not isinstance(ssl, ssl_SSLContext):
  41115. * raise TypeError('ssl argument must be an SSLContext or None')
  41116. */
  41117. goto __pyx_L4;
  41118. }
  41119. /* "uvloop/loop.pyx":2515
  41120. * raise TypeError('ssl argument must be an SSLContext or None')
  41121. * else:
  41122. * if ssl_handshake_timeout is not None: # <<<<<<<<<<<<<<
  41123. * raise ValueError(
  41124. * 'ssl_handshake_timeout is only meaningful with ssl')
  41125. */
  41126. /*else*/ {
  41127. __pyx_t_1 = (__pyx_cur_scope->__pyx_v_ssl_handshake_timeout != Py_None);
  41128. __pyx_t_2 = (__pyx_t_1 != 0);
  41129. if (unlikely(__pyx_t_2)) {
  41130. /* "uvloop/loop.pyx":2516
  41131. * else:
  41132. * if ssl_handshake_timeout is not None:
  41133. * raise ValueError( # <<<<<<<<<<<<<<
  41134. * 'ssl_handshake_timeout is only meaningful with ssl')
  41135. * if ssl_shutdown_timeout is not None:
  41136. */
  41137. __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__42, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2516, __pyx_L1_error)
  41138. __Pyx_GOTREF(__pyx_t_3);
  41139. __Pyx_Raise(__pyx_t_3, 0, 0, 0);
  41140. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  41141. __PYX_ERR(2, 2516, __pyx_L1_error)
  41142. /* "uvloop/loop.pyx":2515
  41143. * raise TypeError('ssl argument must be an SSLContext or None')
  41144. * else:
  41145. * if ssl_handshake_timeout is not None: # <<<<<<<<<<<<<<
  41146. * raise ValueError(
  41147. * 'ssl_handshake_timeout is only meaningful with ssl')
  41148. */
  41149. }
  41150. /* "uvloop/loop.pyx":2518
  41151. * raise ValueError(
  41152. * 'ssl_handshake_timeout is only meaningful with ssl')
  41153. * if ssl_shutdown_timeout is not None: # <<<<<<<<<<<<<<
  41154. * raise ValueError(
  41155. * 'ssl_shutdown_timeout is only meaningful with ssl')
  41156. */
  41157. __pyx_t_2 = (__pyx_cur_scope->__pyx_v_ssl_shutdown_timeout != Py_None);
  41158. __pyx_t_1 = (__pyx_t_2 != 0);
  41159. if (unlikely(__pyx_t_1)) {
  41160. /* "uvloop/loop.pyx":2519
  41161. * 'ssl_handshake_timeout is only meaningful with ssl')
  41162. * if ssl_shutdown_timeout is not None:
  41163. * raise ValueError( # <<<<<<<<<<<<<<
  41164. * 'ssl_shutdown_timeout is only meaningful with ssl')
  41165. *
  41166. */
  41167. __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2519, __pyx_L1_error)
  41168. __Pyx_GOTREF(__pyx_t_3);
  41169. __Pyx_Raise(__pyx_t_3, 0, 0, 0);
  41170. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  41171. __PYX_ERR(2, 2519, __pyx_L1_error)
  41172. /* "uvloop/loop.pyx":2518
  41173. * raise ValueError(
  41174. * 'ssl_handshake_timeout is only meaningful with ssl')
  41175. * if ssl_shutdown_timeout is not None: # <<<<<<<<<<<<<<
  41176. * raise ValueError(
  41177. * 'ssl_shutdown_timeout is only meaningful with ssl')
  41178. */
  41179. }
  41180. }
  41181. __pyx_L4:;
  41182. /* "uvloop/loop.pyx":2522
  41183. * 'ssl_shutdown_timeout is only meaningful with ssl')
  41184. *
  41185. * if not _is_sock_stream(sock.type): # <<<<<<<<<<<<<<
  41186. * raise ValueError(
  41187. * 'A Stream Socket was expected, got {!r}'.format(sock))
  41188. */
  41189. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_sock, __pyx_n_s_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2522, __pyx_L1_error)
  41190. __Pyx_GOTREF(__pyx_t_3);
  41191. __pyx_t_4 = __pyx_f_6uvloop_4loop__is_sock_stream(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2522, __pyx_L1_error)
  41192. __Pyx_GOTREF(__pyx_t_4);
  41193. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  41194. __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 2522, __pyx_L1_error)
  41195. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  41196. __pyx_t_2 = ((!__pyx_t_1) != 0);
  41197. if (unlikely(__pyx_t_2)) {
  41198. /* "uvloop/loop.pyx":2524
  41199. * if not _is_sock_stream(sock.type):
  41200. * raise ValueError(
  41201. * 'A Stream Socket was expected, got {!r}'.format(sock)) # <<<<<<<<<<<<<<
  41202. *
  41203. * app_protocol = protocol_factory()
  41204. */
  41205. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_A_Stream_Socket_was_expected_got, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2524, __pyx_L1_error)
  41206. __Pyx_GOTREF(__pyx_t_3);
  41207. __pyx_t_5 = NULL;
  41208. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
  41209. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
  41210. if (likely(__pyx_t_5)) {
  41211. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  41212. __Pyx_INCREF(__pyx_t_5);
  41213. __Pyx_INCREF(function);
  41214. __Pyx_DECREF_SET(__pyx_t_3, function);
  41215. }
  41216. }
  41217. __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_cur_scope->__pyx_v_sock) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_cur_scope->__pyx_v_sock);
  41218. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  41219. if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2524, __pyx_L1_error)
  41220. __Pyx_GOTREF(__pyx_t_4);
  41221. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  41222. /* "uvloop/loop.pyx":2523
  41223. *
  41224. * if not _is_sock_stream(sock.type):
  41225. * raise ValueError( # <<<<<<<<<<<<<<
  41226. * 'A Stream Socket was expected, got {!r}'.format(sock))
  41227. *
  41228. */
  41229. __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2523, __pyx_L1_error)
  41230. __Pyx_GOTREF(__pyx_t_3);
  41231. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  41232. __Pyx_Raise(__pyx_t_3, 0, 0, 0);
  41233. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  41234. __PYX_ERR(2, 2523, __pyx_L1_error)
  41235. /* "uvloop/loop.pyx":2522
  41236. * 'ssl_shutdown_timeout is only meaningful with ssl')
  41237. *
  41238. * if not _is_sock_stream(sock.type): # <<<<<<<<<<<<<<
  41239. * raise ValueError(
  41240. * 'A Stream Socket was expected, got {!r}'.format(sock))
  41241. */
  41242. }
  41243. /* "uvloop/loop.pyx":2526
  41244. * 'A Stream Socket was expected, got {!r}'.format(sock))
  41245. *
  41246. * app_protocol = protocol_factory() # <<<<<<<<<<<<<<
  41247. * waiter = self._new_future()
  41248. * transport_waiter = None
  41249. */
  41250. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_protocol_factory);
  41251. __pyx_t_4 = __pyx_cur_scope->__pyx_v_protocol_factory; __pyx_t_5 = NULL;
  41252. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
  41253. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
  41254. if (likely(__pyx_t_5)) {
  41255. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  41256. __Pyx_INCREF(__pyx_t_5);
  41257. __Pyx_INCREF(function);
  41258. __Pyx_DECREF_SET(__pyx_t_4, function);
  41259. }
  41260. }
  41261. __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
  41262. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  41263. if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2526, __pyx_L1_error)
  41264. __Pyx_GOTREF(__pyx_t_3);
  41265. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  41266. __Pyx_GIVEREF(__pyx_t_3);
  41267. __pyx_cur_scope->__pyx_v_app_protocol = __pyx_t_3;
  41268. __pyx_t_3 = 0;
  41269. /* "uvloop/loop.pyx":2527
  41270. *
  41271. * app_protocol = protocol_factory()
  41272. * waiter = self._new_future() # <<<<<<<<<<<<<<
  41273. * transport_waiter = None
  41274. *
  41275. */
  41276. __pyx_t_3 = __pyx_f_6uvloop_4loop_4Loop__new_future(__pyx_cur_scope->__pyx_v_self); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2527, __pyx_L1_error)
  41277. __Pyx_GOTREF(__pyx_t_3);
  41278. __Pyx_GIVEREF(__pyx_t_3);
  41279. __pyx_cur_scope->__pyx_v_waiter = __pyx_t_3;
  41280. __pyx_t_3 = 0;
  41281. /* "uvloop/loop.pyx":2528
  41282. * app_protocol = protocol_factory()
  41283. * waiter = self._new_future()
  41284. * transport_waiter = None # <<<<<<<<<<<<<<
  41285. *
  41286. * if ssl is None:
  41287. */
  41288. __Pyx_INCREF(Py_None);
  41289. __Pyx_GIVEREF(Py_None);
  41290. __pyx_cur_scope->__pyx_v_transport_waiter = Py_None;
  41291. /* "uvloop/loop.pyx":2530
  41292. * transport_waiter = None
  41293. *
  41294. * if ssl is None: # <<<<<<<<<<<<<<
  41295. * protocol = app_protocol
  41296. * transport_waiter = waiter
  41297. */
  41298. __pyx_t_2 = (__pyx_cur_scope->__pyx_v_ssl == Py_None);
  41299. __pyx_t_1 = (__pyx_t_2 != 0);
  41300. if (__pyx_t_1) {
  41301. /* "uvloop/loop.pyx":2531
  41302. *
  41303. * if ssl is None:
  41304. * protocol = app_protocol # <<<<<<<<<<<<<<
  41305. * transport_waiter = waiter
  41306. * else:
  41307. */
  41308. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_app_protocol);
  41309. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_app_protocol);
  41310. __pyx_cur_scope->__pyx_v_protocol = __pyx_cur_scope->__pyx_v_app_protocol;
  41311. /* "uvloop/loop.pyx":2532
  41312. * if ssl is None:
  41313. * protocol = app_protocol
  41314. * transport_waiter = waiter # <<<<<<<<<<<<<<
  41315. * else:
  41316. * protocol = SSLProtocol(
  41317. */
  41318. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_waiter);
  41319. __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_transport_waiter);
  41320. __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_transport_waiter, __pyx_cur_scope->__pyx_v_waiter);
  41321. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_waiter);
  41322. /* "uvloop/loop.pyx":2530
  41323. * transport_waiter = None
  41324. *
  41325. * if ssl is None: # <<<<<<<<<<<<<<
  41326. * protocol = app_protocol
  41327. * transport_waiter = waiter
  41328. */
  41329. goto __pyx_L9;
  41330. }
  41331. /* "uvloop/loop.pyx":2534
  41332. * transport_waiter = waiter
  41333. * else:
  41334. * protocol = SSLProtocol( # <<<<<<<<<<<<<<
  41335. * self, app_protocol, ssl, waiter,
  41336. * server_side=True,
  41337. */
  41338. /*else*/ {
  41339. /* "uvloop/loop.pyx":2535
  41340. * else:
  41341. * protocol = SSLProtocol(
  41342. * self, app_protocol, ssl, waiter, # <<<<<<<<<<<<<<
  41343. * server_side=True,
  41344. * server_hostname=None,
  41345. */
  41346. __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2534, __pyx_L1_error)
  41347. __Pyx_GOTREF(__pyx_t_3);
  41348. __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_self));
  41349. __Pyx_GIVEREF(((PyObject *)__pyx_cur_scope->__pyx_v_self));
  41350. PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_cur_scope->__pyx_v_self));
  41351. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_app_protocol);
  41352. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_app_protocol);
  41353. PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_cur_scope->__pyx_v_app_protocol);
  41354. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_ssl);
  41355. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_ssl);
  41356. PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_cur_scope->__pyx_v_ssl);
  41357. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_waiter);
  41358. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_waiter);
  41359. PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_cur_scope->__pyx_v_waiter);
  41360. /* "uvloop/loop.pyx":2536
  41361. * protocol = SSLProtocol(
  41362. * self, app_protocol, ssl, waiter,
  41363. * server_side=True, # <<<<<<<<<<<<<<
  41364. * server_hostname=None,
  41365. * ssl_handshake_timeout=ssl_handshake_timeout,
  41366. */
  41367. __pyx_t_4 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2536, __pyx_L1_error)
  41368. __Pyx_GOTREF(__pyx_t_4);
  41369. if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_server_side, Py_True) < 0) __PYX_ERR(2, 2536, __pyx_L1_error)
  41370. /* "uvloop/loop.pyx":2537
  41371. * self, app_protocol, ssl, waiter,
  41372. * server_side=True,
  41373. * server_hostname=None, # <<<<<<<<<<<<<<
  41374. * ssl_handshake_timeout=ssl_handshake_timeout,
  41375. * ssl_shutdown_timeout=ssl_shutdown_timeout)
  41376. */
  41377. if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_server_hostname, Py_None) < 0) __PYX_ERR(2, 2536, __pyx_L1_error)
  41378. /* "uvloop/loop.pyx":2538
  41379. * server_side=True,
  41380. * server_hostname=None,
  41381. * ssl_handshake_timeout=ssl_handshake_timeout, # <<<<<<<<<<<<<<
  41382. * ssl_shutdown_timeout=ssl_shutdown_timeout)
  41383. * transport_waiter = None
  41384. */
  41385. if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_ssl_handshake_timeout, __pyx_cur_scope->__pyx_v_ssl_handshake_timeout) < 0) __PYX_ERR(2, 2536, __pyx_L1_error)
  41386. /* "uvloop/loop.pyx":2539
  41387. * server_hostname=None,
  41388. * ssl_handshake_timeout=ssl_handshake_timeout,
  41389. * ssl_shutdown_timeout=ssl_shutdown_timeout) # <<<<<<<<<<<<<<
  41390. * transport_waiter = None
  41391. *
  41392. */
  41393. if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_ssl_shutdown_timeout, __pyx_cur_scope->__pyx_v_ssl_shutdown_timeout) < 0) __PYX_ERR(2, 2536, __pyx_L1_error)
  41394. /* "uvloop/loop.pyx":2534
  41395. * transport_waiter = waiter
  41396. * else:
  41397. * protocol = SSLProtocol( # <<<<<<<<<<<<<<
  41398. * self, app_protocol, ssl, waiter,
  41399. * server_side=True,
  41400. */
  41401. __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6uvloop_4loop_SSLProtocol), __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2534, __pyx_L1_error)
  41402. __Pyx_GOTREF(__pyx_t_5);
  41403. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  41404. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  41405. __Pyx_GIVEREF(__pyx_t_5);
  41406. __pyx_cur_scope->__pyx_v_protocol = __pyx_t_5;
  41407. __pyx_t_5 = 0;
  41408. /* "uvloop/loop.pyx":2540
  41409. * ssl_handshake_timeout=ssl_handshake_timeout,
  41410. * ssl_shutdown_timeout=ssl_shutdown_timeout)
  41411. * transport_waiter = None # <<<<<<<<<<<<<<
  41412. *
  41413. * if sock.family == uv.AF_UNIX:
  41414. */
  41415. __Pyx_INCREF(Py_None);
  41416. __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_transport_waiter);
  41417. __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_transport_waiter, Py_None);
  41418. __Pyx_GIVEREF(Py_None);
  41419. }
  41420. __pyx_L9:;
  41421. /* "uvloop/loop.pyx":2542
  41422. * transport_waiter = None
  41423. *
  41424. * if sock.family == uv.AF_UNIX: # <<<<<<<<<<<<<<
  41425. * transport = <UVStream>UnixTransport.new(
  41426. * self, protocol, None, transport_waiter)
  41427. */
  41428. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_sock, __pyx_n_s_family); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2542, __pyx_L1_error)
  41429. __Pyx_GOTREF(__pyx_t_5);
  41430. __pyx_t_4 = __Pyx_PyInt_From_int(AF_UNIX); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2542, __pyx_L1_error)
  41431. __Pyx_GOTREF(__pyx_t_4);
  41432. __pyx_t_3 = PyObject_RichCompare(__pyx_t_5, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2542, __pyx_L1_error)
  41433. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  41434. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  41435. __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 2542, __pyx_L1_error)
  41436. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  41437. if (__pyx_t_1) {
  41438. /* "uvloop/loop.pyx":2543
  41439. *
  41440. * if sock.family == uv.AF_UNIX:
  41441. * transport = <UVStream>UnixTransport.new( # <<<<<<<<<<<<<<
  41442. * self, protocol, None, transport_waiter)
  41443. * elif sock.family in (uv.AF_INET, uv.AF_INET6):
  41444. */
  41445. __pyx_t_3 = ((PyObject *)__pyx_f_6uvloop_4loop_13UnixTransport_new(__pyx_cur_scope->__pyx_v_self, __pyx_cur_scope->__pyx_v_protocol, ((struct __pyx_obj_6uvloop_4loop_Server *)Py_None), __pyx_cur_scope->__pyx_v_transport_waiter)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2543, __pyx_L1_error)
  41446. __Pyx_GOTREF(__pyx_t_3);
  41447. __pyx_t_4 = __pyx_t_3;
  41448. __Pyx_INCREF(__pyx_t_4);
  41449. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  41450. __Pyx_GOTREF(((PyObject *)__pyx_cur_scope->__pyx_v_transport));
  41451. __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_transport, ((struct __pyx_obj_6uvloop_4loop_UVStream *)__pyx_t_4));
  41452. __Pyx_GIVEREF(__pyx_t_4);
  41453. __pyx_t_4 = 0;
  41454. /* "uvloop/loop.pyx":2542
  41455. * transport_waiter = None
  41456. *
  41457. * if sock.family == uv.AF_UNIX: # <<<<<<<<<<<<<<
  41458. * transport = <UVStream>UnixTransport.new(
  41459. * self, protocol, None, transport_waiter)
  41460. */
  41461. goto __pyx_L10;
  41462. }
  41463. /* "uvloop/loop.pyx":2545
  41464. * transport = <UVStream>UnixTransport.new(
  41465. * self, protocol, None, transport_waiter)
  41466. * elif sock.family in (uv.AF_INET, uv.AF_INET6): # <<<<<<<<<<<<<<
  41467. * transport = <UVStream>TCPTransport.new(
  41468. * self, protocol, None, transport_waiter)
  41469. */
  41470. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_sock, __pyx_n_s_family); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2545, __pyx_L1_error)
  41471. __Pyx_GOTREF(__pyx_t_4);
  41472. __pyx_t_3 = __Pyx_PyInt_From_int(AF_INET); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2545, __pyx_L1_error)
  41473. __Pyx_GOTREF(__pyx_t_3);
  41474. __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2545, __pyx_L1_error)
  41475. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  41476. __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(2, 2545, __pyx_L1_error)
  41477. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  41478. if (!__pyx_t_2) {
  41479. } else {
  41480. __pyx_t_1 = __pyx_t_2;
  41481. goto __pyx_L11_bool_binop_done;
  41482. }
  41483. __pyx_t_5 = __Pyx_PyInt_From_int(AF_INET6); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2545, __pyx_L1_error)
  41484. __Pyx_GOTREF(__pyx_t_5);
  41485. __pyx_t_3 = PyObject_RichCompare(__pyx_t_4, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2545, __pyx_L1_error)
  41486. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  41487. __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(2, 2545, __pyx_L1_error)
  41488. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  41489. __pyx_t_1 = __pyx_t_2;
  41490. __pyx_L11_bool_binop_done:;
  41491. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  41492. __pyx_t_2 = (__pyx_t_1 != 0);
  41493. if (__pyx_t_2) {
  41494. /* "uvloop/loop.pyx":2546
  41495. * self, protocol, None, transport_waiter)
  41496. * elif sock.family in (uv.AF_INET, uv.AF_INET6):
  41497. * transport = <UVStream>TCPTransport.new( # <<<<<<<<<<<<<<
  41498. * self, protocol, None, transport_waiter)
  41499. *
  41500. */
  41501. __pyx_t_4 = ((PyObject *)__pyx_f_6uvloop_4loop_12TCPTransport_new(__pyx_cur_scope->__pyx_v_self, __pyx_cur_scope->__pyx_v_protocol, ((struct __pyx_obj_6uvloop_4loop_Server *)Py_None), __pyx_cur_scope->__pyx_v_transport_waiter)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2546, __pyx_L1_error)
  41502. __Pyx_GOTREF(__pyx_t_4);
  41503. __pyx_t_3 = __pyx_t_4;
  41504. __Pyx_INCREF(__pyx_t_3);
  41505. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  41506. __Pyx_GOTREF(((PyObject *)__pyx_cur_scope->__pyx_v_transport));
  41507. __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_transport, ((struct __pyx_obj_6uvloop_4loop_UVStream *)__pyx_t_3));
  41508. __Pyx_GIVEREF(__pyx_t_3);
  41509. __pyx_t_3 = 0;
  41510. /* "uvloop/loop.pyx":2545
  41511. * transport = <UVStream>UnixTransport.new(
  41512. * self, protocol, None, transport_waiter)
  41513. * elif sock.family in (uv.AF_INET, uv.AF_INET6): # <<<<<<<<<<<<<<
  41514. * transport = <UVStream>TCPTransport.new(
  41515. * self, protocol, None, transport_waiter)
  41516. */
  41517. }
  41518. __pyx_L10:;
  41519. /* "uvloop/loop.pyx":2549
  41520. * self, protocol, None, transport_waiter)
  41521. *
  41522. * if transport is None: # <<<<<<<<<<<<<<
  41523. * raise ValueError(
  41524. * 'invalid socket family, expected AF_UNIX, AF_INET or AF_INET6')
  41525. */
  41526. __pyx_t_2 = (((PyObject *)__pyx_cur_scope->__pyx_v_transport) == Py_None);
  41527. __pyx_t_1 = (__pyx_t_2 != 0);
  41528. if (unlikely(__pyx_t_1)) {
  41529. /* "uvloop/loop.pyx":2550
  41530. *
  41531. * if transport is None:
  41532. * raise ValueError( # <<<<<<<<<<<<<<
  41533. * 'invalid socket family, expected AF_UNIX, AF_INET or AF_INET6')
  41534. *
  41535. */
  41536. __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__64, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2550, __pyx_L1_error)
  41537. __Pyx_GOTREF(__pyx_t_3);
  41538. __Pyx_Raise(__pyx_t_3, 0, 0, 0);
  41539. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  41540. __PYX_ERR(2, 2550, __pyx_L1_error)
  41541. /* "uvloop/loop.pyx":2549
  41542. * self, protocol, None, transport_waiter)
  41543. *
  41544. * if transport is None: # <<<<<<<<<<<<<<
  41545. * raise ValueError(
  41546. * 'invalid socket family, expected AF_UNIX, AF_INET or AF_INET6')
  41547. */
  41548. }
  41549. /* "uvloop/loop.pyx":2553
  41550. * 'invalid socket family, expected AF_UNIX, AF_INET or AF_INET6')
  41551. *
  41552. * transport._open(sock.fileno()) # <<<<<<<<<<<<<<
  41553. * transport._init_protocol()
  41554. * transport._attach_fileobj(sock)
  41555. */
  41556. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_sock, __pyx_n_s_fileno); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2553, __pyx_L1_error)
  41557. __Pyx_GOTREF(__pyx_t_4);
  41558. __pyx_t_5 = NULL;
  41559. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
  41560. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
  41561. if (likely(__pyx_t_5)) {
  41562. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  41563. __Pyx_INCREF(__pyx_t_5);
  41564. __Pyx_INCREF(function);
  41565. __Pyx_DECREF_SET(__pyx_t_4, function);
  41566. }
  41567. }
  41568. __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
  41569. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  41570. if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2553, __pyx_L1_error)
  41571. __Pyx_GOTREF(__pyx_t_3);
  41572. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  41573. __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 2553, __pyx_L1_error)
  41574. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  41575. __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_cur_scope->__pyx_v_transport->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._open(((struct __pyx_obj_6uvloop_4loop_UVSocketHandle *)__pyx_cur_scope->__pyx_v_transport), __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2553, __pyx_L1_error)
  41576. __Pyx_GOTREF(__pyx_t_3);
  41577. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  41578. /* "uvloop/loop.pyx":2554
  41579. *
  41580. * transport._open(sock.fileno())
  41581. * transport._init_protocol() # <<<<<<<<<<<<<<
  41582. * transport._attach_fileobj(sock)
  41583. *
  41584. */
  41585. __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_cur_scope->__pyx_v_transport->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._init_protocol(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_cur_scope->__pyx_v_transport)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2554, __pyx_L1_error)
  41586. __Pyx_GOTREF(__pyx_t_3);
  41587. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  41588. /* "uvloop/loop.pyx":2555
  41589. * transport._open(sock.fileno())
  41590. * transport._init_protocol()
  41591. * transport._attach_fileobj(sock) # <<<<<<<<<<<<<<
  41592. *
  41593. * if ssl:
  41594. */
  41595. __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_cur_scope->__pyx_v_transport->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._attach_fileobj(((struct __pyx_obj_6uvloop_4loop_UVSocketHandle *)__pyx_cur_scope->__pyx_v_transport), __pyx_cur_scope->__pyx_v_sock); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2555, __pyx_L1_error)
  41596. __Pyx_GOTREF(__pyx_t_3);
  41597. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  41598. /* "uvloop/loop.pyx":2557
  41599. * transport._attach_fileobj(sock)
  41600. *
  41601. * if ssl: # <<<<<<<<<<<<<<
  41602. * app_transport = protocol._get_app_transport()
  41603. * try:
  41604. */
  41605. __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_ssl); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 2557, __pyx_L1_error)
  41606. if (__pyx_t_1) {
  41607. /* "uvloop/loop.pyx":2558
  41608. *
  41609. * if ssl:
  41610. * app_transport = protocol._get_app_transport() # <<<<<<<<<<<<<<
  41611. * try:
  41612. * await waiter
  41613. */
  41614. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_protocol, __pyx_n_s_get_app_transport); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2558, __pyx_L1_error)
  41615. __Pyx_GOTREF(__pyx_t_4);
  41616. __pyx_t_5 = NULL;
  41617. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
  41618. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
  41619. if (likely(__pyx_t_5)) {
  41620. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  41621. __Pyx_INCREF(__pyx_t_5);
  41622. __Pyx_INCREF(function);
  41623. __Pyx_DECREF_SET(__pyx_t_4, function);
  41624. }
  41625. }
  41626. __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
  41627. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  41628. if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2558, __pyx_L1_error)
  41629. __Pyx_GOTREF(__pyx_t_3);
  41630. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  41631. __Pyx_GIVEREF(__pyx_t_3);
  41632. __pyx_cur_scope->__pyx_v_app_transport = __pyx_t_3;
  41633. __pyx_t_3 = 0;
  41634. /* "uvloop/loop.pyx":2559
  41635. * if ssl:
  41636. * app_transport = protocol._get_app_transport()
  41637. * try: # <<<<<<<<<<<<<<
  41638. * await waiter
  41639. * except Exception:
  41640. */
  41641. {
  41642. __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
  41643. __Pyx_XGOTREF(__pyx_t_7);
  41644. __Pyx_XGOTREF(__pyx_t_8);
  41645. __Pyx_XGOTREF(__pyx_t_9);
  41646. /*try:*/ {
  41647. /* "uvloop/loop.pyx":2560
  41648. * app_transport = protocol._get_app_transport()
  41649. * try:
  41650. * await waiter # <<<<<<<<<<<<<<
  41651. * except Exception:
  41652. * app_transport.close()
  41653. */
  41654. __pyx_r = __Pyx_Coroutine_Yield_From(__pyx_generator, __pyx_cur_scope->__pyx_v_waiter);
  41655. __Pyx_XGOTREF(__pyx_r);
  41656. if (likely(__pyx_r)) {
  41657. __Pyx_XGIVEREF(__pyx_t_7);
  41658. __pyx_cur_scope->__pyx_t_0 = __pyx_t_7;
  41659. __Pyx_XGIVEREF(__pyx_t_8);
  41660. __pyx_cur_scope->__pyx_t_1 = __pyx_t_8;
  41661. __Pyx_XGIVEREF(__pyx_t_9);
  41662. __pyx_cur_scope->__pyx_t_2 = __pyx_t_9;
  41663. __Pyx_XGIVEREF(__pyx_r);
  41664. __Pyx_RefNannyFinishContext();
  41665. __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  41666. /* return from generator, awaiting value */
  41667. __pyx_generator->resume_label = 1;
  41668. return __pyx_r;
  41669. __pyx_L21_resume_from_await:;
  41670. __pyx_t_7 = __pyx_cur_scope->__pyx_t_0;
  41671. __pyx_cur_scope->__pyx_t_0 = 0;
  41672. __Pyx_XGOTREF(__pyx_t_7);
  41673. __pyx_t_8 = __pyx_cur_scope->__pyx_t_1;
  41674. __pyx_cur_scope->__pyx_t_1 = 0;
  41675. __Pyx_XGOTREF(__pyx_t_8);
  41676. __pyx_t_9 = __pyx_cur_scope->__pyx_t_2;
  41677. __pyx_cur_scope->__pyx_t_2 = 0;
  41678. __Pyx_XGOTREF(__pyx_t_9);
  41679. if (unlikely(!__pyx_sent_value)) __PYX_ERR(2, 2560, __pyx_L15_error)
  41680. } else {
  41681. PyObject* exc_type = __Pyx_PyErr_Occurred();
  41682. if (exc_type) {
  41683. if (likely(exc_type == PyExc_StopIteration || (exc_type != PyExc_GeneratorExit && __Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)))) PyErr_Clear();
  41684. else __PYX_ERR(2, 2560, __pyx_L15_error)
  41685. }
  41686. }
  41687. /* "uvloop/loop.pyx":2559
  41688. * if ssl:
  41689. * app_transport = protocol._get_app_transport()
  41690. * try: # <<<<<<<<<<<<<<
  41691. * await waiter
  41692. * except Exception:
  41693. */
  41694. }
  41695. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  41696. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  41697. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  41698. goto __pyx_L20_try_end;
  41699. __pyx_L15_error:;
  41700. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  41701. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  41702. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  41703. /* "uvloop/loop.pyx":2561
  41704. * try:
  41705. * await waiter
  41706. * except Exception: # <<<<<<<<<<<<<<
  41707. * app_transport.close()
  41708. * raise
  41709. */
  41710. __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
  41711. if (__pyx_t_6) {
  41712. __Pyx_AddTraceback("uvloop.loop.Loop.connect_accepted_socket", __pyx_clineno, __pyx_lineno, __pyx_filename);
  41713. if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5) < 0) __PYX_ERR(2, 2561, __pyx_L17_except_error)
  41714. __Pyx_GOTREF(__pyx_t_3);
  41715. __Pyx_GOTREF(__pyx_t_4);
  41716. __Pyx_GOTREF(__pyx_t_5);
  41717. /* "uvloop/loop.pyx":2562
  41718. * await waiter
  41719. * except Exception:
  41720. * app_transport.close() # <<<<<<<<<<<<<<
  41721. * raise
  41722. * return app_transport, protocol
  41723. */
  41724. __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_app_transport, __pyx_n_s_close); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 2562, __pyx_L17_except_error)
  41725. __Pyx_GOTREF(__pyx_t_11);
  41726. __pyx_t_12 = NULL;
  41727. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) {
  41728. __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_11);
  41729. if (likely(__pyx_t_12)) {
  41730. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
  41731. __Pyx_INCREF(__pyx_t_12);
  41732. __Pyx_INCREF(function);
  41733. __Pyx_DECREF_SET(__pyx_t_11, function);
  41734. }
  41735. }
  41736. __pyx_t_10 = (__pyx_t_12) ? __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_12) : __Pyx_PyObject_CallNoArg(__pyx_t_11);
  41737. __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
  41738. if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 2562, __pyx_L17_except_error)
  41739. __Pyx_GOTREF(__pyx_t_10);
  41740. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  41741. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  41742. /* "uvloop/loop.pyx":2563
  41743. * except Exception:
  41744. * app_transport.close()
  41745. * raise # <<<<<<<<<<<<<<
  41746. * return app_transport, protocol
  41747. * else:
  41748. */
  41749. __Pyx_GIVEREF(__pyx_t_3);
  41750. __Pyx_GIVEREF(__pyx_t_4);
  41751. __Pyx_XGIVEREF(__pyx_t_5);
  41752. __Pyx_ErrRestoreWithState(__pyx_t_3, __pyx_t_4, __pyx_t_5);
  41753. __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_5 = 0;
  41754. __PYX_ERR(2, 2563, __pyx_L17_except_error)
  41755. }
  41756. goto __pyx_L17_except_error;
  41757. __pyx_L17_except_error:;
  41758. /* "uvloop/loop.pyx":2559
  41759. * if ssl:
  41760. * app_transport = protocol._get_app_transport()
  41761. * try: # <<<<<<<<<<<<<<
  41762. * await waiter
  41763. * except Exception:
  41764. */
  41765. __Pyx_XGIVEREF(__pyx_t_7);
  41766. __Pyx_XGIVEREF(__pyx_t_8);
  41767. __Pyx_XGIVEREF(__pyx_t_9);
  41768. __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
  41769. goto __pyx_L1_error;
  41770. __pyx_L20_try_end:;
  41771. }
  41772. /* "uvloop/loop.pyx":2564
  41773. * app_transport.close()
  41774. * raise
  41775. * return app_transport, protocol # <<<<<<<<<<<<<<
  41776. * else:
  41777. * try:
  41778. */
  41779. __Pyx_XDECREF(__pyx_r);
  41780. __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2564, __pyx_L1_error)
  41781. __Pyx_GOTREF(__pyx_t_5);
  41782. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_app_transport);
  41783. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_app_transport);
  41784. PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_cur_scope->__pyx_v_app_transport);
  41785. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_protocol);
  41786. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_protocol);
  41787. PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_cur_scope->__pyx_v_protocol);
  41788. __pyx_r = NULL; __Pyx_ReturnWithStopIteration(__pyx_t_5);
  41789. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  41790. __pyx_t_5 = 0;
  41791. goto __pyx_L0;
  41792. /* "uvloop/loop.pyx":2557
  41793. * transport._attach_fileobj(sock)
  41794. *
  41795. * if ssl: # <<<<<<<<<<<<<<
  41796. * app_transport = protocol._get_app_transport()
  41797. * try:
  41798. */
  41799. }
  41800. /* "uvloop/loop.pyx":2566
  41801. * return app_transport, protocol
  41802. * else:
  41803. * try: # <<<<<<<<<<<<<<
  41804. * await waiter
  41805. * except Exception:
  41806. */
  41807. /*else*/ {
  41808. {
  41809. __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
  41810. __Pyx_XGOTREF(__pyx_t_9);
  41811. __Pyx_XGOTREF(__pyx_t_8);
  41812. __Pyx_XGOTREF(__pyx_t_7);
  41813. /*try:*/ {
  41814. /* "uvloop/loop.pyx":2567
  41815. * else:
  41816. * try:
  41817. * await waiter # <<<<<<<<<<<<<<
  41818. * except Exception:
  41819. * transport._close()
  41820. */
  41821. __pyx_r = __Pyx_Coroutine_Yield_From(__pyx_generator, __pyx_cur_scope->__pyx_v_waiter);
  41822. __Pyx_XGOTREF(__pyx_r);
  41823. if (likely(__pyx_r)) {
  41824. __Pyx_XGIVEREF(__pyx_t_7);
  41825. __pyx_cur_scope->__pyx_t_0 = __pyx_t_7;
  41826. __Pyx_XGIVEREF(__pyx_t_8);
  41827. __pyx_cur_scope->__pyx_t_1 = __pyx_t_8;
  41828. __Pyx_XGIVEREF(__pyx_t_9);
  41829. __pyx_cur_scope->__pyx_t_2 = __pyx_t_9;
  41830. __Pyx_XGIVEREF(__pyx_r);
  41831. __Pyx_RefNannyFinishContext();
  41832. __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  41833. /* return from generator, awaiting value */
  41834. __pyx_generator->resume_label = 2;
  41835. return __pyx_r;
  41836. __pyx_L30_resume_from_await:;
  41837. __pyx_t_7 = __pyx_cur_scope->__pyx_t_0;
  41838. __pyx_cur_scope->__pyx_t_0 = 0;
  41839. __Pyx_XGOTREF(__pyx_t_7);
  41840. __pyx_t_8 = __pyx_cur_scope->__pyx_t_1;
  41841. __pyx_cur_scope->__pyx_t_1 = 0;
  41842. __Pyx_XGOTREF(__pyx_t_8);
  41843. __pyx_t_9 = __pyx_cur_scope->__pyx_t_2;
  41844. __pyx_cur_scope->__pyx_t_2 = 0;
  41845. __Pyx_XGOTREF(__pyx_t_9);
  41846. if (unlikely(!__pyx_sent_value)) __PYX_ERR(2, 2567, __pyx_L24_error)
  41847. } else {
  41848. PyObject* exc_type = __Pyx_PyErr_Occurred();
  41849. if (exc_type) {
  41850. if (likely(exc_type == PyExc_StopIteration || (exc_type != PyExc_GeneratorExit && __Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)))) PyErr_Clear();
  41851. else __PYX_ERR(2, 2567, __pyx_L24_error)
  41852. }
  41853. }
  41854. /* "uvloop/loop.pyx":2566
  41855. * return app_transport, protocol
  41856. * else:
  41857. * try: # <<<<<<<<<<<<<<
  41858. * await waiter
  41859. * except Exception:
  41860. */
  41861. }
  41862. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  41863. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  41864. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  41865. goto __pyx_L29_try_end;
  41866. __pyx_L24_error:;
  41867. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  41868. __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
  41869. __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
  41870. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  41871. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  41872. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  41873. /* "uvloop/loop.pyx":2568
  41874. * try:
  41875. * await waiter
  41876. * except Exception: # <<<<<<<<<<<<<<
  41877. * transport._close()
  41878. * raise
  41879. */
  41880. __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
  41881. if (__pyx_t_6) {
  41882. __Pyx_AddTraceback("uvloop.loop.Loop.connect_accepted_socket", __pyx_clineno, __pyx_lineno, __pyx_filename);
  41883. if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_3) < 0) __PYX_ERR(2, 2568, __pyx_L26_except_error)
  41884. __Pyx_GOTREF(__pyx_t_5);
  41885. __Pyx_GOTREF(__pyx_t_4);
  41886. __Pyx_GOTREF(__pyx_t_3);
  41887. /* "uvloop/loop.pyx":2569
  41888. * await waiter
  41889. * except Exception:
  41890. * transport._close() # <<<<<<<<<<<<<<
  41891. * raise
  41892. * return transport, protocol
  41893. */
  41894. __pyx_t_10 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_cur_scope->__pyx_v_transport->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._close(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_cur_scope->__pyx_v_transport)); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 2569, __pyx_L26_except_error)
  41895. __Pyx_GOTREF(__pyx_t_10);
  41896. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  41897. /* "uvloop/loop.pyx":2570
  41898. * except Exception:
  41899. * transport._close()
  41900. * raise # <<<<<<<<<<<<<<
  41901. * return transport, protocol
  41902. *
  41903. */
  41904. __Pyx_GIVEREF(__pyx_t_5);
  41905. __Pyx_GIVEREF(__pyx_t_4);
  41906. __Pyx_XGIVEREF(__pyx_t_3);
  41907. __Pyx_ErrRestoreWithState(__pyx_t_5, __pyx_t_4, __pyx_t_3);
  41908. __pyx_t_5 = 0; __pyx_t_4 = 0; __pyx_t_3 = 0;
  41909. __PYX_ERR(2, 2570, __pyx_L26_except_error)
  41910. }
  41911. goto __pyx_L26_except_error;
  41912. __pyx_L26_except_error:;
  41913. /* "uvloop/loop.pyx":2566
  41914. * return app_transport, protocol
  41915. * else:
  41916. * try: # <<<<<<<<<<<<<<
  41917. * await waiter
  41918. * except Exception:
  41919. */
  41920. __Pyx_XGIVEREF(__pyx_t_9);
  41921. __Pyx_XGIVEREF(__pyx_t_8);
  41922. __Pyx_XGIVEREF(__pyx_t_7);
  41923. __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
  41924. goto __pyx_L1_error;
  41925. __pyx_L29_try_end:;
  41926. }
  41927. /* "uvloop/loop.pyx":2571
  41928. * transport._close()
  41929. * raise
  41930. * return transport, protocol # <<<<<<<<<<<<<<
  41931. *
  41932. * def run_in_executor(self, executor, func, *args):
  41933. */
  41934. __Pyx_XDECREF(__pyx_r);
  41935. __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2571, __pyx_L1_error)
  41936. __Pyx_GOTREF(__pyx_t_3);
  41937. __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_transport));
  41938. __Pyx_GIVEREF(((PyObject *)__pyx_cur_scope->__pyx_v_transport));
  41939. PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_cur_scope->__pyx_v_transport));
  41940. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_protocol);
  41941. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_protocol);
  41942. PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_cur_scope->__pyx_v_protocol);
  41943. __pyx_r = NULL; __Pyx_ReturnWithStopIteration(__pyx_t_3);
  41944. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  41945. __pyx_t_3 = 0;
  41946. goto __pyx_L0;
  41947. }
  41948. CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
  41949. /* "uvloop/loop.pyx":2495
  41950. *
  41951. * @cython.iterable_coroutine
  41952. * async def connect_accepted_socket(self, protocol_factory, sock, *, # <<<<<<<<<<<<<<
  41953. * ssl=None,
  41954. * ssl_handshake_timeout=None,
  41955. */
  41956. /* function exit code */
  41957. __pyx_L1_error:;
  41958. __Pyx_XDECREF(__pyx_t_3);
  41959. __Pyx_XDECREF(__pyx_t_4);
  41960. __Pyx_XDECREF(__pyx_t_5);
  41961. __Pyx_XDECREF(__pyx_t_10);
  41962. __Pyx_XDECREF(__pyx_t_11);
  41963. __Pyx_XDECREF(__pyx_t_12);
  41964. __Pyx_AddTraceback("connect_accepted_socket", __pyx_clineno, __pyx_lineno, __pyx_filename);
  41965. __pyx_L0:;
  41966. __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  41967. #if !CYTHON_USE_EXC_INFO_STACK
  41968. __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  41969. #endif
  41970. __pyx_generator->resume_label = -1;
  41971. __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  41972. __Pyx_RefNannyFinishContext();
  41973. return __pyx_r;
  41974. }
  41975. /* "uvloop/loop.pyx":2573
  41976. * return transport, protocol
  41977. *
  41978. * def run_in_executor(self, executor, func, *args): # <<<<<<<<<<<<<<
  41979. * if aio_iscoroutine(func) or aio_iscoroutinefunction(func):
  41980. * raise TypeError("coroutines cannot be used with run_in_executor()")
  41981. */
  41982. /* Python wrapper */
  41983. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_102run_in_executor(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  41984. static char __pyx_doc_6uvloop_4loop_4Loop_101run_in_executor[] = "Loop.run_in_executor(self, executor, func, *args)";
  41985. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_102run_in_executor(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  41986. PyObject *__pyx_v_executor = 0;
  41987. PyObject *__pyx_v_func = 0;
  41988. PyObject *__pyx_v_args = 0;
  41989. PyObject *__pyx_r = 0;
  41990. __Pyx_RefNannyDeclarations
  41991. __Pyx_RefNannySetupContext("run_in_executor (wrapper)", 0);
  41992. if (PyTuple_GET_SIZE(__pyx_args) > 2) {
  41993. __pyx_v_args = PyTuple_GetSlice(__pyx_args, 2, PyTuple_GET_SIZE(__pyx_args));
  41994. if (unlikely(!__pyx_v_args)) {
  41995. __Pyx_RefNannyFinishContext();
  41996. return NULL;
  41997. }
  41998. __Pyx_GOTREF(__pyx_v_args);
  41999. } else {
  42000. __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  42001. }
  42002. {
  42003. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_executor,&__pyx_n_s_func,0};
  42004. PyObject* values[2] = {0,0};
  42005. if (unlikely(__pyx_kwds)) {
  42006. Py_ssize_t kw_args;
  42007. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  42008. switch (pos_args) {
  42009. default:
  42010. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  42011. CYTHON_FALLTHROUGH;
  42012. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  42013. CYTHON_FALLTHROUGH;
  42014. case 0: break;
  42015. }
  42016. kw_args = PyDict_Size(__pyx_kwds);
  42017. switch (pos_args) {
  42018. case 0:
  42019. if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_executor)) != 0)) kw_args--;
  42020. else goto __pyx_L5_argtuple_error;
  42021. CYTHON_FALLTHROUGH;
  42022. case 1:
  42023. if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_func)) != 0)) kw_args--;
  42024. else {
  42025. __Pyx_RaiseArgtupleInvalid("run_in_executor", 0, 2, 2, 1); __PYX_ERR(2, 2573, __pyx_L3_error)
  42026. }
  42027. }
  42028. if (unlikely(kw_args > 0)) {
  42029. const Py_ssize_t used_pos_args = (pos_args < 2) ? pos_args : 2;
  42030. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "run_in_executor") < 0)) __PYX_ERR(2, 2573, __pyx_L3_error)
  42031. }
  42032. } else if (PyTuple_GET_SIZE(__pyx_args) < 2) {
  42033. goto __pyx_L5_argtuple_error;
  42034. } else {
  42035. values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  42036. values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  42037. }
  42038. __pyx_v_executor = values[0];
  42039. __pyx_v_func = values[1];
  42040. }
  42041. goto __pyx_L4_argument_unpacking_done;
  42042. __pyx_L5_argtuple_error:;
  42043. __Pyx_RaiseArgtupleInvalid("run_in_executor", 0, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 2573, __pyx_L3_error)
  42044. __pyx_L3_error:;
  42045. __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  42046. __Pyx_AddTraceback("uvloop.loop.Loop.run_in_executor", __pyx_clineno, __pyx_lineno, __pyx_filename);
  42047. __Pyx_RefNannyFinishContext();
  42048. return NULL;
  42049. __pyx_L4_argument_unpacking_done:;
  42050. __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_101run_in_executor(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self), __pyx_v_executor, __pyx_v_func, __pyx_v_args);
  42051. /* function exit code */
  42052. __Pyx_XDECREF(__pyx_v_args);
  42053. __Pyx_RefNannyFinishContext();
  42054. return __pyx_r;
  42055. }
  42056. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_101run_in_executor(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_executor, PyObject *__pyx_v_func, PyObject *__pyx_v_args) {
  42057. PyObject *__pyx_r = NULL;
  42058. __Pyx_RefNannyDeclarations
  42059. int __pyx_t_1;
  42060. PyObject *__pyx_t_2 = NULL;
  42061. PyObject *__pyx_t_3 = NULL;
  42062. PyObject *__pyx_t_4 = NULL;
  42063. int __pyx_t_5;
  42064. __Pyx_RefNannySetupContext("run_in_executor", 0);
  42065. __Pyx_INCREF(__pyx_v_executor);
  42066. /* "uvloop/loop.pyx":2574
  42067. *
  42068. * def run_in_executor(self, executor, func, *args):
  42069. * if aio_iscoroutine(func) or aio_iscoroutinefunction(func): # <<<<<<<<<<<<<<
  42070. * raise TypeError("coroutines cannot be used with run_in_executor()")
  42071. *
  42072. */
  42073. __Pyx_INCREF(__pyx_v_6uvloop_4loop_aio_iscoroutine);
  42074. __pyx_t_3 = __pyx_v_6uvloop_4loop_aio_iscoroutine; __pyx_t_4 = NULL;
  42075. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
  42076. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
  42077. if (likely(__pyx_t_4)) {
  42078. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  42079. __Pyx_INCREF(__pyx_t_4);
  42080. __Pyx_INCREF(function);
  42081. __Pyx_DECREF_SET(__pyx_t_3, function);
  42082. }
  42083. }
  42084. __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_func) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_func);
  42085. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  42086. if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 2574, __pyx_L1_error)
  42087. __Pyx_GOTREF(__pyx_t_2);
  42088. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  42089. __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(2, 2574, __pyx_L1_error)
  42090. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  42091. if (!__pyx_t_5) {
  42092. } else {
  42093. __pyx_t_1 = __pyx_t_5;
  42094. goto __pyx_L4_bool_binop_done;
  42095. }
  42096. __Pyx_INCREF(__pyx_v_6uvloop_4loop_aio_iscoroutinefunction);
  42097. __pyx_t_3 = __pyx_v_6uvloop_4loop_aio_iscoroutinefunction; __pyx_t_4 = NULL;
  42098. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
  42099. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
  42100. if (likely(__pyx_t_4)) {
  42101. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  42102. __Pyx_INCREF(__pyx_t_4);
  42103. __Pyx_INCREF(function);
  42104. __Pyx_DECREF_SET(__pyx_t_3, function);
  42105. }
  42106. }
  42107. __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_func) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_func);
  42108. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  42109. if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 2574, __pyx_L1_error)
  42110. __Pyx_GOTREF(__pyx_t_2);
  42111. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  42112. __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(2, 2574, __pyx_L1_error)
  42113. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  42114. __pyx_t_1 = __pyx_t_5;
  42115. __pyx_L4_bool_binop_done:;
  42116. if (unlikely(__pyx_t_1)) {
  42117. /* "uvloop/loop.pyx":2575
  42118. * def run_in_executor(self, executor, func, *args):
  42119. * if aio_iscoroutine(func) or aio_iscoroutinefunction(func):
  42120. * raise TypeError("coroutines cannot be used with run_in_executor()") # <<<<<<<<<<<<<<
  42121. *
  42122. * self._check_closed()
  42123. */
  42124. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__65, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 2575, __pyx_L1_error)
  42125. __Pyx_GOTREF(__pyx_t_2);
  42126. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  42127. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  42128. __PYX_ERR(2, 2575, __pyx_L1_error)
  42129. /* "uvloop/loop.pyx":2574
  42130. *
  42131. * def run_in_executor(self, executor, func, *args):
  42132. * if aio_iscoroutine(func) or aio_iscoroutinefunction(func): # <<<<<<<<<<<<<<
  42133. * raise TypeError("coroutines cannot be used with run_in_executor()")
  42134. *
  42135. */
  42136. }
  42137. /* "uvloop/loop.pyx":2577
  42138. * raise TypeError("coroutines cannot be used with run_in_executor()")
  42139. *
  42140. * self._check_closed() # <<<<<<<<<<<<<<
  42141. *
  42142. * if executor is None:
  42143. */
  42144. __pyx_t_2 = __pyx_f_6uvloop_4loop_4Loop__check_closed(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 2577, __pyx_L1_error)
  42145. __Pyx_GOTREF(__pyx_t_2);
  42146. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  42147. /* "uvloop/loop.pyx":2579
  42148. * self._check_closed()
  42149. *
  42150. * if executor is None: # <<<<<<<<<<<<<<
  42151. * executor = self._default_executor
  42152. * if executor is None:
  42153. */
  42154. __pyx_t_1 = (__pyx_v_executor == Py_None);
  42155. __pyx_t_5 = (__pyx_t_1 != 0);
  42156. if (__pyx_t_5) {
  42157. /* "uvloop/loop.pyx":2580
  42158. *
  42159. * if executor is None:
  42160. * executor = self._default_executor # <<<<<<<<<<<<<<
  42161. * if executor is None:
  42162. * executor = cc_ThreadPoolExecutor()
  42163. */
  42164. __pyx_t_2 = __pyx_v_self->_default_executor;
  42165. __Pyx_INCREF(__pyx_t_2);
  42166. __Pyx_DECREF_SET(__pyx_v_executor, __pyx_t_2);
  42167. __pyx_t_2 = 0;
  42168. /* "uvloop/loop.pyx":2581
  42169. * if executor is None:
  42170. * executor = self._default_executor
  42171. * if executor is None: # <<<<<<<<<<<<<<
  42172. * executor = cc_ThreadPoolExecutor()
  42173. * self._default_executor = executor
  42174. */
  42175. __pyx_t_5 = (__pyx_v_executor == Py_None);
  42176. __pyx_t_1 = (__pyx_t_5 != 0);
  42177. if (__pyx_t_1) {
  42178. /* "uvloop/loop.pyx":2582
  42179. * executor = self._default_executor
  42180. * if executor is None:
  42181. * executor = cc_ThreadPoolExecutor() # <<<<<<<<<<<<<<
  42182. * self._default_executor = executor
  42183. *
  42184. */
  42185. __Pyx_INCREF(__pyx_v_6uvloop_4loop_cc_ThreadPoolExecutor);
  42186. __pyx_t_3 = __pyx_v_6uvloop_4loop_cc_ThreadPoolExecutor; __pyx_t_4 = NULL;
  42187. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
  42188. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
  42189. if (likely(__pyx_t_4)) {
  42190. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  42191. __Pyx_INCREF(__pyx_t_4);
  42192. __Pyx_INCREF(function);
  42193. __Pyx_DECREF_SET(__pyx_t_3, function);
  42194. }
  42195. }
  42196. __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
  42197. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  42198. if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 2582, __pyx_L1_error)
  42199. __Pyx_GOTREF(__pyx_t_2);
  42200. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  42201. __Pyx_DECREF_SET(__pyx_v_executor, __pyx_t_2);
  42202. __pyx_t_2 = 0;
  42203. /* "uvloop/loop.pyx":2583
  42204. * if executor is None:
  42205. * executor = cc_ThreadPoolExecutor()
  42206. * self._default_executor = executor # <<<<<<<<<<<<<<
  42207. *
  42208. * return aio_wrap_future(executor.submit(func, *args), loop=self)
  42209. */
  42210. __Pyx_INCREF(__pyx_v_executor);
  42211. __Pyx_GIVEREF(__pyx_v_executor);
  42212. __Pyx_GOTREF(__pyx_v_self->_default_executor);
  42213. __Pyx_DECREF(__pyx_v_self->_default_executor);
  42214. __pyx_v_self->_default_executor = __pyx_v_executor;
  42215. /* "uvloop/loop.pyx":2581
  42216. * if executor is None:
  42217. * executor = self._default_executor
  42218. * if executor is None: # <<<<<<<<<<<<<<
  42219. * executor = cc_ThreadPoolExecutor()
  42220. * self._default_executor = executor
  42221. */
  42222. }
  42223. /* "uvloop/loop.pyx":2579
  42224. * self._check_closed()
  42225. *
  42226. * if executor is None: # <<<<<<<<<<<<<<
  42227. * executor = self._default_executor
  42228. * if executor is None:
  42229. */
  42230. }
  42231. /* "uvloop/loop.pyx":2585
  42232. * self._default_executor = executor
  42233. *
  42234. * return aio_wrap_future(executor.submit(func, *args), loop=self) # <<<<<<<<<<<<<<
  42235. *
  42236. * def set_default_executor(self, executor):
  42237. */
  42238. __Pyx_XDECREF(__pyx_r);
  42239. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_executor, __pyx_n_s_submit); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 2585, __pyx_L1_error)
  42240. __Pyx_GOTREF(__pyx_t_2);
  42241. __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2585, __pyx_L1_error)
  42242. __Pyx_GOTREF(__pyx_t_3);
  42243. __Pyx_INCREF(__pyx_v_func);
  42244. __Pyx_GIVEREF(__pyx_v_func);
  42245. PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_func);
  42246. __pyx_t_4 = PyNumber_Add(__pyx_t_3, __pyx_v_args); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2585, __pyx_L1_error)
  42247. __Pyx_GOTREF(__pyx_t_4);
  42248. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  42249. __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2585, __pyx_L1_error)
  42250. __Pyx_GOTREF(__pyx_t_3);
  42251. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  42252. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  42253. __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2585, __pyx_L1_error)
  42254. __Pyx_GOTREF(__pyx_t_4);
  42255. __Pyx_GIVEREF(__pyx_t_3);
  42256. PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
  42257. __pyx_t_3 = 0;
  42258. __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2585, __pyx_L1_error)
  42259. __Pyx_GOTREF(__pyx_t_3);
  42260. if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_loop, ((PyObject *)__pyx_v_self)) < 0) __PYX_ERR(2, 2585, __pyx_L1_error)
  42261. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_v_6uvloop_4loop_aio_wrap_future, __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 2585, __pyx_L1_error)
  42262. __Pyx_GOTREF(__pyx_t_2);
  42263. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  42264. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  42265. __pyx_r = __pyx_t_2;
  42266. __pyx_t_2 = 0;
  42267. goto __pyx_L0;
  42268. /* "uvloop/loop.pyx":2573
  42269. * return transport, protocol
  42270. *
  42271. * def run_in_executor(self, executor, func, *args): # <<<<<<<<<<<<<<
  42272. * if aio_iscoroutine(func) or aio_iscoroutinefunction(func):
  42273. * raise TypeError("coroutines cannot be used with run_in_executor()")
  42274. */
  42275. /* function exit code */
  42276. __pyx_L1_error:;
  42277. __Pyx_XDECREF(__pyx_t_2);
  42278. __Pyx_XDECREF(__pyx_t_3);
  42279. __Pyx_XDECREF(__pyx_t_4);
  42280. __Pyx_AddTraceback("uvloop.loop.Loop.run_in_executor", __pyx_clineno, __pyx_lineno, __pyx_filename);
  42281. __pyx_r = NULL;
  42282. __pyx_L0:;
  42283. __Pyx_XDECREF(__pyx_v_executor);
  42284. __Pyx_XGIVEREF(__pyx_r);
  42285. __Pyx_RefNannyFinishContext();
  42286. return __pyx_r;
  42287. }
  42288. /* "uvloop/loop.pyx":2587
  42289. * return aio_wrap_future(executor.submit(func, *args), loop=self)
  42290. *
  42291. * def set_default_executor(self, executor): # <<<<<<<<<<<<<<
  42292. * self._default_executor = executor
  42293. *
  42294. */
  42295. /* Python wrapper */
  42296. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_104set_default_executor(PyObject *__pyx_v_self, PyObject *__pyx_v_executor); /*proto*/
  42297. static char __pyx_doc_6uvloop_4loop_4Loop_103set_default_executor[] = "Loop.set_default_executor(self, executor)";
  42298. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_104set_default_executor(PyObject *__pyx_v_self, PyObject *__pyx_v_executor) {
  42299. PyObject *__pyx_r = 0;
  42300. __Pyx_RefNannyDeclarations
  42301. __Pyx_RefNannySetupContext("set_default_executor (wrapper)", 0);
  42302. __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_103set_default_executor(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self), ((PyObject *)__pyx_v_executor));
  42303. /* function exit code */
  42304. __Pyx_RefNannyFinishContext();
  42305. return __pyx_r;
  42306. }
  42307. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_103set_default_executor(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_executor) {
  42308. PyObject *__pyx_r = NULL;
  42309. __Pyx_RefNannyDeclarations
  42310. __Pyx_RefNannySetupContext("set_default_executor", 0);
  42311. /* "uvloop/loop.pyx":2588
  42312. *
  42313. * def set_default_executor(self, executor):
  42314. * self._default_executor = executor # <<<<<<<<<<<<<<
  42315. *
  42316. * @cython.iterable_coroutine
  42317. */
  42318. __Pyx_INCREF(__pyx_v_executor);
  42319. __Pyx_GIVEREF(__pyx_v_executor);
  42320. __Pyx_GOTREF(__pyx_v_self->_default_executor);
  42321. __Pyx_DECREF(__pyx_v_self->_default_executor);
  42322. __pyx_v_self->_default_executor = __pyx_v_executor;
  42323. /* "uvloop/loop.pyx":2587
  42324. * return aio_wrap_future(executor.submit(func, *args), loop=self)
  42325. *
  42326. * def set_default_executor(self, executor): # <<<<<<<<<<<<<<
  42327. * self._default_executor = executor
  42328. *
  42329. */
  42330. /* function exit code */
  42331. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  42332. __Pyx_XGIVEREF(__pyx_r);
  42333. __Pyx_RefNannyFinishContext();
  42334. return __pyx_r;
  42335. }
  42336. static PyObject *__pyx_gb_6uvloop_4loop_4Loop_107generator13(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
  42337. /* "uvloop/loop.pyx":2591
  42338. *
  42339. * @cython.iterable_coroutine
  42340. * async def __subprocess_run(self, protocol_factory, args, # <<<<<<<<<<<<<<
  42341. * stdin=subprocess_PIPE,
  42342. * stdout=subprocess_PIPE,
  42343. */
  42344. /* Python wrapper */
  42345. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_106__subprocess_run(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  42346. static char __pyx_doc_6uvloop_4loop_4Loop_105__subprocess_run[] = "Loop.__subprocess_run(self, protocol_factory, args, stdin=subprocess_PIPE, stdout=subprocess_PIPE, stderr=subprocess_PIPE, universal_newlines=False, shell=True, bufsize=0, preexec_fn=None, close_fds=None, cwd=None, env=None, startupinfo=None, creationflags=0, restore_signals=True, start_new_session=False, executable=None, pass_fds=(), __uvloop_sleep_after_fork=False)";
  42347. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_106__subprocess_run(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  42348. PyObject *__pyx_v_protocol_factory = 0;
  42349. PyObject *__pyx_v_args = 0;
  42350. PyObject *__pyx_v_stdin = 0;
  42351. PyObject *__pyx_v_stdout = 0;
  42352. PyObject *__pyx_v_stderr = 0;
  42353. PyObject *__pyx_v_universal_newlines = 0;
  42354. CYTHON_UNUSED PyObject *__pyx_v_shell = 0;
  42355. PyObject *__pyx_v_bufsize = 0;
  42356. PyObject *__pyx_v_preexec_fn = 0;
  42357. CYTHON_UNUSED PyObject *__pyx_v_close_fds = 0;
  42358. PyObject *__pyx_v_cwd = 0;
  42359. PyObject *__pyx_v_env = 0;
  42360. PyObject *__pyx_v_startupinfo = 0;
  42361. PyObject *__pyx_v_creationflags = 0;
  42362. PyObject *__pyx_v_restore_signals = 0;
  42363. PyObject *__pyx_v_start_new_session = 0;
  42364. PyObject *__pyx_v_executable = 0;
  42365. PyObject *__pyx_v_pass_fds = 0;
  42366. PyObject *__pyx_v___uvloop_sleep_after_fork = 0;
  42367. PyObject *__pyx_r = 0;
  42368. __Pyx_RefNannyDeclarations
  42369. __Pyx_RefNannySetupContext("__subprocess_run (wrapper)", 0);
  42370. {
  42371. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_protocol_factory,&__pyx_n_s_args,&__pyx_n_s_stdin,&__pyx_n_s_stdout,&__pyx_n_s_stderr,&__pyx_n_s_universal_newlines,&__pyx_n_s_shell,&__pyx_n_s_bufsize,&__pyx_n_s_preexec_fn,&__pyx_n_s_close_fds,&__pyx_n_s_cwd,&__pyx_n_s_env,&__pyx_n_s_startupinfo,&__pyx_n_s_creationflags,&__pyx_n_s_restore_signals,&__pyx_n_s_start_new_session,&__pyx_n_s_executable,&__pyx_n_s_pass_fds,&__pyx_n_s_uvloop_sleep_after_fork,0};
  42372. PyObject* values[19] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
  42373. values[2] = __pyx_k__66;
  42374. values[3] = __pyx_k__67;
  42375. values[4] = __pyx_k__68;
  42376. /* "uvloop/loop.pyx":2595
  42377. * stdout=subprocess_PIPE,
  42378. * stderr=subprocess_PIPE,
  42379. * universal_newlines=False, # <<<<<<<<<<<<<<
  42380. * shell=True,
  42381. * bufsize=0,
  42382. */
  42383. values[5] = ((PyObject *)Py_False);
  42384. /* "uvloop/loop.pyx":2596
  42385. * stderr=subprocess_PIPE,
  42386. * universal_newlines=False,
  42387. * shell=True, # <<<<<<<<<<<<<<
  42388. * bufsize=0,
  42389. * preexec_fn=None,
  42390. */
  42391. values[6] = ((PyObject *)Py_True);
  42392. values[7] = ((PyObject *)__pyx_int_0);
  42393. /* "uvloop/loop.pyx":2598
  42394. * shell=True,
  42395. * bufsize=0,
  42396. * preexec_fn=None, # <<<<<<<<<<<<<<
  42397. * close_fds=None,
  42398. * cwd=None,
  42399. */
  42400. values[8] = ((PyObject *)Py_None);
  42401. /* "uvloop/loop.pyx":2599
  42402. * bufsize=0,
  42403. * preexec_fn=None,
  42404. * close_fds=None, # <<<<<<<<<<<<<<
  42405. * cwd=None,
  42406. * env=None,
  42407. */
  42408. values[9] = ((PyObject *)Py_None);
  42409. /* "uvloop/loop.pyx":2600
  42410. * preexec_fn=None,
  42411. * close_fds=None,
  42412. * cwd=None, # <<<<<<<<<<<<<<
  42413. * env=None,
  42414. * startupinfo=None,
  42415. */
  42416. values[10] = ((PyObject *)Py_None);
  42417. /* "uvloop/loop.pyx":2601
  42418. * close_fds=None,
  42419. * cwd=None,
  42420. * env=None, # <<<<<<<<<<<<<<
  42421. * startupinfo=None,
  42422. * creationflags=0,
  42423. */
  42424. values[11] = ((PyObject *)Py_None);
  42425. /* "uvloop/loop.pyx":2602
  42426. * cwd=None,
  42427. * env=None,
  42428. * startupinfo=None, # <<<<<<<<<<<<<<
  42429. * creationflags=0,
  42430. * restore_signals=True,
  42431. */
  42432. values[12] = ((PyObject *)Py_None);
  42433. values[13] = ((PyObject *)__pyx_int_0);
  42434. /* "uvloop/loop.pyx":2604
  42435. * startupinfo=None,
  42436. * creationflags=0,
  42437. * restore_signals=True, # <<<<<<<<<<<<<<
  42438. * start_new_session=False,
  42439. * executable=None,
  42440. */
  42441. values[14] = ((PyObject *)Py_True);
  42442. /* "uvloop/loop.pyx":2605
  42443. * creationflags=0,
  42444. * restore_signals=True,
  42445. * start_new_session=False, # <<<<<<<<<<<<<<
  42446. * executable=None,
  42447. * pass_fds=(),
  42448. */
  42449. values[15] = ((PyObject *)Py_False);
  42450. /* "uvloop/loop.pyx":2606
  42451. * restore_signals=True,
  42452. * start_new_session=False,
  42453. * executable=None, # <<<<<<<<<<<<<<
  42454. * pass_fds=(),
  42455. * # For tests only! Do not use in your code. Ever.
  42456. */
  42457. values[16] = ((PyObject *)Py_None);
  42458. /* "uvloop/loop.pyx":2607
  42459. * start_new_session=False,
  42460. * executable=None,
  42461. * pass_fds=(), # <<<<<<<<<<<<<<
  42462. * # For tests only! Do not use in your code. Ever.
  42463. * __uvloop_sleep_after_fork=False):
  42464. */
  42465. values[17] = ((PyObject *)__pyx_empty_tuple);
  42466. /* "uvloop/loop.pyx":2609
  42467. * pass_fds=(),
  42468. * # For tests only! Do not use in your code. Ever.
  42469. * __uvloop_sleep_after_fork=False): # <<<<<<<<<<<<<<
  42470. *
  42471. * # TODO: Implement close_fds (might not be very important in
  42472. */
  42473. values[18] = ((PyObject *)Py_False);
  42474. if (unlikely(__pyx_kwds)) {
  42475. Py_ssize_t kw_args;
  42476. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  42477. switch (pos_args) {
  42478. case 19: values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
  42479. CYTHON_FALLTHROUGH;
  42480. case 18: values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
  42481. CYTHON_FALLTHROUGH;
  42482. case 17: values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
  42483. CYTHON_FALLTHROUGH;
  42484. case 16: values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
  42485. CYTHON_FALLTHROUGH;
  42486. case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
  42487. CYTHON_FALLTHROUGH;
  42488. case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
  42489. CYTHON_FALLTHROUGH;
  42490. case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
  42491. CYTHON_FALLTHROUGH;
  42492. case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
  42493. CYTHON_FALLTHROUGH;
  42494. case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
  42495. CYTHON_FALLTHROUGH;
  42496. case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
  42497. CYTHON_FALLTHROUGH;
  42498. case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
  42499. CYTHON_FALLTHROUGH;
  42500. case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
  42501. CYTHON_FALLTHROUGH;
  42502. case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
  42503. CYTHON_FALLTHROUGH;
  42504. case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
  42505. CYTHON_FALLTHROUGH;
  42506. case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
  42507. CYTHON_FALLTHROUGH;
  42508. case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
  42509. CYTHON_FALLTHROUGH;
  42510. case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
  42511. CYTHON_FALLTHROUGH;
  42512. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  42513. CYTHON_FALLTHROUGH;
  42514. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  42515. CYTHON_FALLTHROUGH;
  42516. case 0: break;
  42517. default: goto __pyx_L5_argtuple_error;
  42518. }
  42519. kw_args = PyDict_Size(__pyx_kwds);
  42520. switch (pos_args) {
  42521. case 0:
  42522. if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_protocol_factory)) != 0)) kw_args--;
  42523. else goto __pyx_L5_argtuple_error;
  42524. CYTHON_FALLTHROUGH;
  42525. case 1:
  42526. if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_args)) != 0)) kw_args--;
  42527. else {
  42528. __Pyx_RaiseArgtupleInvalid("__subprocess_run", 0, 2, 19, 1); __PYX_ERR(2, 2591, __pyx_L3_error)
  42529. }
  42530. CYTHON_FALLTHROUGH;
  42531. case 2:
  42532. if (kw_args > 0) {
  42533. PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_stdin);
  42534. if (value) { values[2] = value; kw_args--; }
  42535. }
  42536. CYTHON_FALLTHROUGH;
  42537. case 3:
  42538. if (kw_args > 0) {
  42539. PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_stdout);
  42540. if (value) { values[3] = value; kw_args--; }
  42541. }
  42542. CYTHON_FALLTHROUGH;
  42543. case 4:
  42544. if (kw_args > 0) {
  42545. PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_stderr);
  42546. if (value) { values[4] = value; kw_args--; }
  42547. }
  42548. CYTHON_FALLTHROUGH;
  42549. case 5:
  42550. if (kw_args > 0) {
  42551. PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_universal_newlines);
  42552. if (value) { values[5] = value; kw_args--; }
  42553. }
  42554. CYTHON_FALLTHROUGH;
  42555. case 6:
  42556. if (kw_args > 0) {
  42557. PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_shell);
  42558. if (value) { values[6] = value; kw_args--; }
  42559. }
  42560. CYTHON_FALLTHROUGH;
  42561. case 7:
  42562. if (kw_args > 0) {
  42563. PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_bufsize);
  42564. if (value) { values[7] = value; kw_args--; }
  42565. }
  42566. CYTHON_FALLTHROUGH;
  42567. case 8:
  42568. if (kw_args > 0) {
  42569. PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_preexec_fn);
  42570. if (value) { values[8] = value; kw_args--; }
  42571. }
  42572. CYTHON_FALLTHROUGH;
  42573. case 9:
  42574. if (kw_args > 0) {
  42575. PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_close_fds);
  42576. if (value) { values[9] = value; kw_args--; }
  42577. }
  42578. CYTHON_FALLTHROUGH;
  42579. case 10:
  42580. if (kw_args > 0) {
  42581. PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cwd);
  42582. if (value) { values[10] = value; kw_args--; }
  42583. }
  42584. CYTHON_FALLTHROUGH;
  42585. case 11:
  42586. if (kw_args > 0) {
  42587. PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_env);
  42588. if (value) { values[11] = value; kw_args--; }
  42589. }
  42590. CYTHON_FALLTHROUGH;
  42591. case 12:
  42592. if (kw_args > 0) {
  42593. PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_startupinfo);
  42594. if (value) { values[12] = value; kw_args--; }
  42595. }
  42596. CYTHON_FALLTHROUGH;
  42597. case 13:
  42598. if (kw_args > 0) {
  42599. PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_creationflags);
  42600. if (value) { values[13] = value; kw_args--; }
  42601. }
  42602. CYTHON_FALLTHROUGH;
  42603. case 14:
  42604. if (kw_args > 0) {
  42605. PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_restore_signals);
  42606. if (value) { values[14] = value; kw_args--; }
  42607. }
  42608. CYTHON_FALLTHROUGH;
  42609. case 15:
  42610. if (kw_args > 0) {
  42611. PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_start_new_session);
  42612. if (value) { values[15] = value; kw_args--; }
  42613. }
  42614. CYTHON_FALLTHROUGH;
  42615. case 16:
  42616. if (kw_args > 0) {
  42617. PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_executable);
  42618. if (value) { values[16] = value; kw_args--; }
  42619. }
  42620. CYTHON_FALLTHROUGH;
  42621. case 17:
  42622. if (kw_args > 0) {
  42623. PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pass_fds);
  42624. if (value) { values[17] = value; kw_args--; }
  42625. }
  42626. CYTHON_FALLTHROUGH;
  42627. case 18:
  42628. if (kw_args > 0) {
  42629. PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_uvloop_sleep_after_fork);
  42630. if (value) { values[18] = value; kw_args--; }
  42631. }
  42632. }
  42633. if (unlikely(kw_args > 0)) {
  42634. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__subprocess_run") < 0)) __PYX_ERR(2, 2591, __pyx_L3_error)
  42635. }
  42636. } else {
  42637. switch (PyTuple_GET_SIZE(__pyx_args)) {
  42638. case 19: values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
  42639. CYTHON_FALLTHROUGH;
  42640. case 18: values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
  42641. CYTHON_FALLTHROUGH;
  42642. case 17: values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
  42643. CYTHON_FALLTHROUGH;
  42644. case 16: values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
  42645. CYTHON_FALLTHROUGH;
  42646. case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
  42647. CYTHON_FALLTHROUGH;
  42648. case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
  42649. CYTHON_FALLTHROUGH;
  42650. case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
  42651. CYTHON_FALLTHROUGH;
  42652. case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
  42653. CYTHON_FALLTHROUGH;
  42654. case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
  42655. CYTHON_FALLTHROUGH;
  42656. case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
  42657. CYTHON_FALLTHROUGH;
  42658. case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
  42659. CYTHON_FALLTHROUGH;
  42660. case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
  42661. CYTHON_FALLTHROUGH;
  42662. case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
  42663. CYTHON_FALLTHROUGH;
  42664. case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
  42665. CYTHON_FALLTHROUGH;
  42666. case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
  42667. CYTHON_FALLTHROUGH;
  42668. case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
  42669. CYTHON_FALLTHROUGH;
  42670. case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
  42671. CYTHON_FALLTHROUGH;
  42672. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  42673. values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  42674. break;
  42675. default: goto __pyx_L5_argtuple_error;
  42676. }
  42677. }
  42678. __pyx_v_protocol_factory = values[0];
  42679. __pyx_v_args = values[1];
  42680. __pyx_v_stdin = values[2];
  42681. __pyx_v_stdout = values[3];
  42682. __pyx_v_stderr = values[4];
  42683. __pyx_v_universal_newlines = values[5];
  42684. __pyx_v_shell = values[6];
  42685. __pyx_v_bufsize = values[7];
  42686. __pyx_v_preexec_fn = values[8];
  42687. __pyx_v_close_fds = values[9];
  42688. __pyx_v_cwd = values[10];
  42689. __pyx_v_env = values[11];
  42690. __pyx_v_startupinfo = values[12];
  42691. __pyx_v_creationflags = values[13];
  42692. __pyx_v_restore_signals = values[14];
  42693. __pyx_v_start_new_session = values[15];
  42694. __pyx_v_executable = values[16];
  42695. __pyx_v_pass_fds = values[17];
  42696. __pyx_v___uvloop_sleep_after_fork = values[18];
  42697. }
  42698. goto __pyx_L4_argument_unpacking_done;
  42699. __pyx_L5_argtuple_error:;
  42700. __Pyx_RaiseArgtupleInvalid("__subprocess_run", 0, 2, 19, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 2591, __pyx_L3_error)
  42701. __pyx_L3_error:;
  42702. __Pyx_AddTraceback("uvloop.loop.Loop.__subprocess_run", __pyx_clineno, __pyx_lineno, __pyx_filename);
  42703. __Pyx_RefNannyFinishContext();
  42704. return NULL;
  42705. __pyx_L4_argument_unpacking_done:;
  42706. __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_105__subprocess_run(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self), __pyx_v_protocol_factory, __pyx_v_args, __pyx_v_stdin, __pyx_v_stdout, __pyx_v_stderr, __pyx_v_universal_newlines, __pyx_v_shell, __pyx_v_bufsize, __pyx_v_preexec_fn, __pyx_v_close_fds, __pyx_v_cwd, __pyx_v_env, __pyx_v_startupinfo, __pyx_v_creationflags, __pyx_v_restore_signals, __pyx_v_start_new_session, __pyx_v_executable, __pyx_v_pass_fds, __pyx_v___uvloop_sleep_after_fork);
  42707. /* "uvloop/loop.pyx":2591
  42708. *
  42709. * @cython.iterable_coroutine
  42710. * async def __subprocess_run(self, protocol_factory, args, # <<<<<<<<<<<<<<
  42711. * stdin=subprocess_PIPE,
  42712. * stdout=subprocess_PIPE,
  42713. */
  42714. /* function exit code */
  42715. __Pyx_RefNannyFinishContext();
  42716. return __pyx_r;
  42717. }
  42718. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_105__subprocess_run(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_protocol_factory, PyObject *__pyx_v_args, PyObject *__pyx_v_stdin, PyObject *__pyx_v_stdout, PyObject *__pyx_v_stderr, PyObject *__pyx_v_universal_newlines, CYTHON_UNUSED PyObject *__pyx_v_shell, PyObject *__pyx_v_bufsize, PyObject *__pyx_v_preexec_fn, CYTHON_UNUSED PyObject *__pyx_v_close_fds, PyObject *__pyx_v_cwd, PyObject *__pyx_v_env, PyObject *__pyx_v_startupinfo, PyObject *__pyx_v_creationflags, PyObject *__pyx_v_restore_signals, PyObject *__pyx_v_start_new_session, PyObject *__pyx_v_executable, PyObject *__pyx_v_pass_fds, PyObject *__pyx_v___uvloop_sleep_after_fork) {
  42719. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_20___subprocess_run *__pyx_cur_scope;
  42720. PyObject *__pyx_r = NULL;
  42721. __Pyx_RefNannyDeclarations
  42722. __Pyx_RefNannySetupContext("__subprocess_run", 0);
  42723. __pyx_cur_scope = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_20___subprocess_run *)__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_20___subprocess_run(__pyx_ptype_6uvloop_4loop___pyx_scope_struct_20___subprocess_run, __pyx_empty_tuple, NULL);
  42724. if (unlikely(!__pyx_cur_scope)) {
  42725. __pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_20___subprocess_run *)Py_None);
  42726. __Pyx_INCREF(Py_None);
  42727. __PYX_ERR(2, 2591, __pyx_L1_error)
  42728. } else {
  42729. __Pyx_GOTREF(__pyx_cur_scope);
  42730. }
  42731. __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  42732. __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  42733. __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  42734. __pyx_cur_scope->__pyx_v_protocol_factory = __pyx_v_protocol_factory;
  42735. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_protocol_factory);
  42736. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_protocol_factory);
  42737. __pyx_cur_scope->__pyx_v_args = __pyx_v_args;
  42738. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_args);
  42739. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_args);
  42740. __pyx_cur_scope->__pyx_v_stdin = __pyx_v_stdin;
  42741. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_stdin);
  42742. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_stdin);
  42743. __pyx_cur_scope->__pyx_v_stdout = __pyx_v_stdout;
  42744. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_stdout);
  42745. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_stdout);
  42746. __pyx_cur_scope->__pyx_v_stderr = __pyx_v_stderr;
  42747. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_stderr);
  42748. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_stderr);
  42749. __pyx_cur_scope->__pyx_v_universal_newlines = __pyx_v_universal_newlines;
  42750. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_universal_newlines);
  42751. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_universal_newlines);
  42752. __pyx_cur_scope->__pyx_v_shell = __pyx_v_shell;
  42753. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_shell);
  42754. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_shell);
  42755. __pyx_cur_scope->__pyx_v_bufsize = __pyx_v_bufsize;
  42756. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_bufsize);
  42757. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_bufsize);
  42758. __pyx_cur_scope->__pyx_v_preexec_fn = __pyx_v_preexec_fn;
  42759. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_preexec_fn);
  42760. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_preexec_fn);
  42761. __pyx_cur_scope->__pyx_v_close_fds = __pyx_v_close_fds;
  42762. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_close_fds);
  42763. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_close_fds);
  42764. __pyx_cur_scope->__pyx_v_cwd = __pyx_v_cwd;
  42765. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_cwd);
  42766. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_cwd);
  42767. __pyx_cur_scope->__pyx_v_env = __pyx_v_env;
  42768. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_env);
  42769. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_env);
  42770. __pyx_cur_scope->__pyx_v_startupinfo = __pyx_v_startupinfo;
  42771. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_startupinfo);
  42772. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_startupinfo);
  42773. __pyx_cur_scope->__pyx_v_creationflags = __pyx_v_creationflags;
  42774. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_creationflags);
  42775. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_creationflags);
  42776. __pyx_cur_scope->__pyx_v_restore_signals = __pyx_v_restore_signals;
  42777. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_restore_signals);
  42778. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_restore_signals);
  42779. __pyx_cur_scope->__pyx_v_start_new_session = __pyx_v_start_new_session;
  42780. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_start_new_session);
  42781. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_start_new_session);
  42782. __pyx_cur_scope->__pyx_v_executable = __pyx_v_executable;
  42783. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_executable);
  42784. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_executable);
  42785. __pyx_cur_scope->__pyx_v_pass_fds = __pyx_v_pass_fds;
  42786. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_pass_fds);
  42787. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_pass_fds);
  42788. __pyx_cur_scope->__pyx_v___uvloop_sleep_after_fork = __pyx_v___uvloop_sleep_after_fork;
  42789. __Pyx_INCREF(__pyx_cur_scope->__pyx_v___uvloop_sleep_after_fork);
  42790. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v___uvloop_sleep_after_fork);
  42791. {
  42792. __pyx_CoroutineObject *gen = __Pyx_IterableCoroutine_New((__pyx_coroutine_body_t) __pyx_gb_6uvloop_4loop_4Loop_107generator13, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_subprocess_run, __pyx_n_s_Loop___subprocess_run, __pyx_n_s_uvloop_loop); if (unlikely(!gen)) __PYX_ERR(2, 2591, __pyx_L1_error)
  42793. __Pyx_DECREF(__pyx_cur_scope);
  42794. __Pyx_RefNannyFinishContext();
  42795. return (PyObject *) gen;
  42796. }
  42797. /* function exit code */
  42798. __pyx_L1_error:;
  42799. __Pyx_AddTraceback("uvloop.loop.Loop.__subprocess_run", __pyx_clineno, __pyx_lineno, __pyx_filename);
  42800. __pyx_r = NULL;
  42801. __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  42802. __Pyx_XGIVEREF(__pyx_r);
  42803. __Pyx_RefNannyFinishContext();
  42804. return __pyx_r;
  42805. }
  42806. static PyObject *__pyx_gb_6uvloop_4loop_4Loop_107generator13(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
  42807. {
  42808. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_20___subprocess_run *__pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_20___subprocess_run *)__pyx_generator->closure);
  42809. PyObject *__pyx_r = NULL;
  42810. int __pyx_t_1;
  42811. PyObject *__pyx_t_2 = NULL;
  42812. int __pyx_t_3;
  42813. PyObject *__pyx_t_4 = NULL;
  42814. PyObject *__pyx_t_5 = NULL;
  42815. PyObject *__pyx_t_6 = NULL;
  42816. PyObject *__pyx_t_7 = NULL;
  42817. PyObject *__pyx_t_8 = NULL;
  42818. int __pyx_t_9;
  42819. PyObject *__pyx_t_10 = NULL;
  42820. PyObject *__pyx_t_11 = NULL;
  42821. PyObject *__pyx_t_12 = NULL;
  42822. __Pyx_RefNannyDeclarations
  42823. __Pyx_RefNannySetupContext("__subprocess_run", 0);
  42824. switch (__pyx_generator->resume_label) {
  42825. case 0: goto __pyx_L3_first_run;
  42826. case 1: goto __pyx_L16_resume_from_await;
  42827. default: /* CPython raises the right error here */
  42828. __Pyx_RefNannyFinishContext();
  42829. return NULL;
  42830. }
  42831. __pyx_L3_first_run:;
  42832. if (unlikely(!__pyx_sent_value)) __PYX_ERR(2, 2591, __pyx_L1_error)
  42833. /* "uvloop/loop.pyx":2615
  42834. *
  42835. * cdef:
  42836. * int debug_flags = 0 # <<<<<<<<<<<<<<
  42837. *
  42838. * if universal_newlines:
  42839. */
  42840. __pyx_cur_scope->__pyx_v_debug_flags = 0;
  42841. /* "uvloop/loop.pyx":2617
  42842. * int debug_flags = 0
  42843. *
  42844. * if universal_newlines: # <<<<<<<<<<<<<<
  42845. * raise ValueError("universal_newlines must be False")
  42846. * if bufsize != 0:
  42847. */
  42848. __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_universal_newlines); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 2617, __pyx_L1_error)
  42849. if (unlikely(__pyx_t_1)) {
  42850. /* "uvloop/loop.pyx":2618
  42851. *
  42852. * if universal_newlines:
  42853. * raise ValueError("universal_newlines must be False") # <<<<<<<<<<<<<<
  42854. * if bufsize != 0:
  42855. * raise ValueError("bufsize must be 0")
  42856. */
  42857. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__69, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 2618, __pyx_L1_error)
  42858. __Pyx_GOTREF(__pyx_t_2);
  42859. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  42860. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  42861. __PYX_ERR(2, 2618, __pyx_L1_error)
  42862. /* "uvloop/loop.pyx":2617
  42863. * int debug_flags = 0
  42864. *
  42865. * if universal_newlines: # <<<<<<<<<<<<<<
  42866. * raise ValueError("universal_newlines must be False")
  42867. * if bufsize != 0:
  42868. */
  42869. }
  42870. /* "uvloop/loop.pyx":2619
  42871. * if universal_newlines:
  42872. * raise ValueError("universal_newlines must be False")
  42873. * if bufsize != 0: # <<<<<<<<<<<<<<
  42874. * raise ValueError("bufsize must be 0")
  42875. * if startupinfo is not None:
  42876. */
  42877. __pyx_t_2 = __Pyx_PyInt_NeObjC(__pyx_cur_scope->__pyx_v_bufsize, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 2619, __pyx_L1_error)
  42878. __Pyx_GOTREF(__pyx_t_2);
  42879. __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 2619, __pyx_L1_error)
  42880. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  42881. if (unlikely(__pyx_t_1)) {
  42882. /* "uvloop/loop.pyx":2620
  42883. * raise ValueError("universal_newlines must be False")
  42884. * if bufsize != 0:
  42885. * raise ValueError("bufsize must be 0") # <<<<<<<<<<<<<<
  42886. * if startupinfo is not None:
  42887. * raise ValueError('startupinfo is not supported')
  42888. */
  42889. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__70, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 2620, __pyx_L1_error)
  42890. __Pyx_GOTREF(__pyx_t_2);
  42891. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  42892. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  42893. __PYX_ERR(2, 2620, __pyx_L1_error)
  42894. /* "uvloop/loop.pyx":2619
  42895. * if universal_newlines:
  42896. * raise ValueError("universal_newlines must be False")
  42897. * if bufsize != 0: # <<<<<<<<<<<<<<
  42898. * raise ValueError("bufsize must be 0")
  42899. * if startupinfo is not None:
  42900. */
  42901. }
  42902. /* "uvloop/loop.pyx":2621
  42903. * if bufsize != 0:
  42904. * raise ValueError("bufsize must be 0")
  42905. * if startupinfo is not None: # <<<<<<<<<<<<<<
  42906. * raise ValueError('startupinfo is not supported')
  42907. * if creationflags != 0:
  42908. */
  42909. __pyx_t_1 = (__pyx_cur_scope->__pyx_v_startupinfo != Py_None);
  42910. __pyx_t_3 = (__pyx_t_1 != 0);
  42911. if (unlikely(__pyx_t_3)) {
  42912. /* "uvloop/loop.pyx":2622
  42913. * raise ValueError("bufsize must be 0")
  42914. * if startupinfo is not None:
  42915. * raise ValueError('startupinfo is not supported') # <<<<<<<<<<<<<<
  42916. * if creationflags != 0:
  42917. * raise ValueError('creationflags is not supported')
  42918. */
  42919. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__71, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 2622, __pyx_L1_error)
  42920. __Pyx_GOTREF(__pyx_t_2);
  42921. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  42922. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  42923. __PYX_ERR(2, 2622, __pyx_L1_error)
  42924. /* "uvloop/loop.pyx":2621
  42925. * if bufsize != 0:
  42926. * raise ValueError("bufsize must be 0")
  42927. * if startupinfo is not None: # <<<<<<<<<<<<<<
  42928. * raise ValueError('startupinfo is not supported')
  42929. * if creationflags != 0:
  42930. */
  42931. }
  42932. /* "uvloop/loop.pyx":2623
  42933. * if startupinfo is not None:
  42934. * raise ValueError('startupinfo is not supported')
  42935. * if creationflags != 0: # <<<<<<<<<<<<<<
  42936. * raise ValueError('creationflags is not supported')
  42937. *
  42938. */
  42939. __pyx_t_2 = __Pyx_PyInt_NeObjC(__pyx_cur_scope->__pyx_v_creationflags, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 2623, __pyx_L1_error)
  42940. __Pyx_GOTREF(__pyx_t_2);
  42941. __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(2, 2623, __pyx_L1_error)
  42942. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  42943. if (unlikely(__pyx_t_3)) {
  42944. /* "uvloop/loop.pyx":2624
  42945. * raise ValueError('startupinfo is not supported')
  42946. * if creationflags != 0:
  42947. * raise ValueError('creationflags is not supported') # <<<<<<<<<<<<<<
  42948. *
  42949. * if executable is not None:
  42950. */
  42951. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__72, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 2624, __pyx_L1_error)
  42952. __Pyx_GOTREF(__pyx_t_2);
  42953. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  42954. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  42955. __PYX_ERR(2, 2624, __pyx_L1_error)
  42956. /* "uvloop/loop.pyx":2623
  42957. * if startupinfo is not None:
  42958. * raise ValueError('startupinfo is not supported')
  42959. * if creationflags != 0: # <<<<<<<<<<<<<<
  42960. * raise ValueError('creationflags is not supported')
  42961. *
  42962. */
  42963. }
  42964. /* "uvloop/loop.pyx":2626
  42965. * raise ValueError('creationflags is not supported')
  42966. *
  42967. * if executable is not None: # <<<<<<<<<<<<<<
  42968. * args[0] = executable
  42969. *
  42970. */
  42971. __pyx_t_3 = (__pyx_cur_scope->__pyx_v_executable != Py_None);
  42972. __pyx_t_1 = (__pyx_t_3 != 0);
  42973. if (__pyx_t_1) {
  42974. /* "uvloop/loop.pyx":2627
  42975. *
  42976. * if executable is not None:
  42977. * args[0] = executable # <<<<<<<<<<<<<<
  42978. *
  42979. * if __uvloop_sleep_after_fork:
  42980. */
  42981. if (unlikely(__Pyx_SetItemInt(__pyx_cur_scope->__pyx_v_args, 0, __pyx_cur_scope->__pyx_v_executable, long, 1, __Pyx_PyInt_From_long, 0, 0, 1) < 0)) __PYX_ERR(2, 2627, __pyx_L1_error)
  42982. /* "uvloop/loop.pyx":2626
  42983. * raise ValueError('creationflags is not supported')
  42984. *
  42985. * if executable is not None: # <<<<<<<<<<<<<<
  42986. * args[0] = executable
  42987. *
  42988. */
  42989. }
  42990. /* "uvloop/loop.pyx":2629
  42991. * args[0] = executable
  42992. *
  42993. * if __uvloop_sleep_after_fork: # <<<<<<<<<<<<<<
  42994. * debug_flags |= __PROCESS_DEBUG_SLEEP_AFTER_FORK
  42995. *
  42996. */
  42997. __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v___uvloop_sleep_after_fork); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 2629, __pyx_L1_error)
  42998. if (__pyx_t_1) {
  42999. /* "uvloop/loop.pyx":2630
  43000. *
  43001. * if __uvloop_sleep_after_fork:
  43002. * debug_flags |= __PROCESS_DEBUG_SLEEP_AFTER_FORK # <<<<<<<<<<<<<<
  43003. *
  43004. * waiter = self._new_future()
  43005. */
  43006. __pyx_cur_scope->__pyx_v_debug_flags = (__pyx_cur_scope->__pyx_v_debug_flags | 1);
  43007. /* "uvloop/loop.pyx":2629
  43008. * args[0] = executable
  43009. *
  43010. * if __uvloop_sleep_after_fork: # <<<<<<<<<<<<<<
  43011. * debug_flags |= __PROCESS_DEBUG_SLEEP_AFTER_FORK
  43012. *
  43013. */
  43014. }
  43015. /* "uvloop/loop.pyx":2632
  43016. * debug_flags |= __PROCESS_DEBUG_SLEEP_AFTER_FORK
  43017. *
  43018. * waiter = self._new_future() # <<<<<<<<<<<<<<
  43019. * protocol = protocol_factory()
  43020. * proc = UVProcessTransport.new(self, protocol,
  43021. */
  43022. __pyx_t_2 = __pyx_f_6uvloop_4loop_4Loop__new_future(__pyx_cur_scope->__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 2632, __pyx_L1_error)
  43023. __Pyx_GOTREF(__pyx_t_2);
  43024. __Pyx_GIVEREF(__pyx_t_2);
  43025. __pyx_cur_scope->__pyx_v_waiter = __pyx_t_2;
  43026. __pyx_t_2 = 0;
  43027. /* "uvloop/loop.pyx":2633
  43028. *
  43029. * waiter = self._new_future()
  43030. * protocol = protocol_factory() # <<<<<<<<<<<<<<
  43031. * proc = UVProcessTransport.new(self, protocol,
  43032. * args, env, cwd, start_new_session,
  43033. */
  43034. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_protocol_factory);
  43035. __pyx_t_4 = __pyx_cur_scope->__pyx_v_protocol_factory; __pyx_t_5 = NULL;
  43036. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
  43037. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
  43038. if (likely(__pyx_t_5)) {
  43039. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  43040. __Pyx_INCREF(__pyx_t_5);
  43041. __Pyx_INCREF(function);
  43042. __Pyx_DECREF_SET(__pyx_t_4, function);
  43043. }
  43044. }
  43045. __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
  43046. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  43047. if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 2633, __pyx_L1_error)
  43048. __Pyx_GOTREF(__pyx_t_2);
  43049. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  43050. __Pyx_GIVEREF(__pyx_t_2);
  43051. __pyx_cur_scope->__pyx_v_protocol = __pyx_t_2;
  43052. __pyx_t_2 = 0;
  43053. /* "uvloop/loop.pyx":2638
  43054. * stdin, stdout, stderr, pass_fds,
  43055. * waiter,
  43056. * debug_flags, # <<<<<<<<<<<<<<
  43057. * preexec_fn,
  43058. * restore_signals)
  43059. */
  43060. __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_debug_flags); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 2638, __pyx_L1_error)
  43061. __Pyx_GOTREF(__pyx_t_2);
  43062. /* "uvloop/loop.pyx":2634
  43063. * waiter = self._new_future()
  43064. * protocol = protocol_factory()
  43065. * proc = UVProcessTransport.new(self, protocol, # <<<<<<<<<<<<<<
  43066. * args, env, cwd, start_new_session,
  43067. * stdin, stdout, stderr, pass_fds,
  43068. */
  43069. __pyx_t_4 = ((PyObject *)__pyx_f_6uvloop_4loop_18UVProcessTransport_new(__pyx_cur_scope->__pyx_v_self, __pyx_cur_scope->__pyx_v_protocol, __pyx_cur_scope->__pyx_v_args, __pyx_cur_scope->__pyx_v_env, __pyx_cur_scope->__pyx_v_cwd, __pyx_cur_scope->__pyx_v_start_new_session, __pyx_cur_scope->__pyx_v_stdin, __pyx_cur_scope->__pyx_v_stdout, __pyx_cur_scope->__pyx_v_stderr, __pyx_cur_scope->__pyx_v_pass_fds, __pyx_cur_scope->__pyx_v_waiter, __pyx_t_2, __pyx_cur_scope->__pyx_v_preexec_fn, __pyx_cur_scope->__pyx_v_restore_signals)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2634, __pyx_L1_error)
  43070. __Pyx_GOTREF(__pyx_t_4);
  43071. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  43072. __Pyx_GIVEREF(__pyx_t_4);
  43073. __pyx_cur_scope->__pyx_v_proc = ((struct __pyx_obj_6uvloop_4loop_UVProcessTransport *)__pyx_t_4);
  43074. __pyx_t_4 = 0;
  43075. /* "uvloop/loop.pyx":2642
  43076. * restore_signals)
  43077. *
  43078. * try: # <<<<<<<<<<<<<<
  43079. * await waiter
  43080. * except Exception:
  43081. */
  43082. {
  43083. __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
  43084. __Pyx_XGOTREF(__pyx_t_6);
  43085. __Pyx_XGOTREF(__pyx_t_7);
  43086. __Pyx_XGOTREF(__pyx_t_8);
  43087. /*try:*/ {
  43088. /* "uvloop/loop.pyx":2643
  43089. *
  43090. * try:
  43091. * await waiter # <<<<<<<<<<<<<<
  43092. * except Exception:
  43093. * proc.close()
  43094. */
  43095. __pyx_r = __Pyx_Coroutine_Yield_From(__pyx_generator, __pyx_cur_scope->__pyx_v_waiter);
  43096. __Pyx_XGOTREF(__pyx_r);
  43097. if (likely(__pyx_r)) {
  43098. __Pyx_XGIVEREF(__pyx_t_6);
  43099. __pyx_cur_scope->__pyx_t_0 = __pyx_t_6;
  43100. __Pyx_XGIVEREF(__pyx_t_7);
  43101. __pyx_cur_scope->__pyx_t_1 = __pyx_t_7;
  43102. __Pyx_XGIVEREF(__pyx_t_8);
  43103. __pyx_cur_scope->__pyx_t_2 = __pyx_t_8;
  43104. __Pyx_XGIVEREF(__pyx_r);
  43105. __Pyx_RefNannyFinishContext();
  43106. __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  43107. /* return from generator, awaiting value */
  43108. __pyx_generator->resume_label = 1;
  43109. return __pyx_r;
  43110. __pyx_L16_resume_from_await:;
  43111. __pyx_t_6 = __pyx_cur_scope->__pyx_t_0;
  43112. __pyx_cur_scope->__pyx_t_0 = 0;
  43113. __Pyx_XGOTREF(__pyx_t_6);
  43114. __pyx_t_7 = __pyx_cur_scope->__pyx_t_1;
  43115. __pyx_cur_scope->__pyx_t_1 = 0;
  43116. __Pyx_XGOTREF(__pyx_t_7);
  43117. __pyx_t_8 = __pyx_cur_scope->__pyx_t_2;
  43118. __pyx_cur_scope->__pyx_t_2 = 0;
  43119. __Pyx_XGOTREF(__pyx_t_8);
  43120. if (unlikely(!__pyx_sent_value)) __PYX_ERR(2, 2643, __pyx_L10_error)
  43121. } else {
  43122. PyObject* exc_type = __Pyx_PyErr_Occurred();
  43123. if (exc_type) {
  43124. if (likely(exc_type == PyExc_StopIteration || (exc_type != PyExc_GeneratorExit && __Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)))) PyErr_Clear();
  43125. else __PYX_ERR(2, 2643, __pyx_L10_error)
  43126. }
  43127. }
  43128. /* "uvloop/loop.pyx":2642
  43129. * restore_signals)
  43130. *
  43131. * try: # <<<<<<<<<<<<<<
  43132. * await waiter
  43133. * except Exception:
  43134. */
  43135. }
  43136. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  43137. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  43138. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  43139. goto __pyx_L15_try_end;
  43140. __pyx_L10_error:;
  43141. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  43142. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  43143. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  43144. /* "uvloop/loop.pyx":2644
  43145. * try:
  43146. * await waiter
  43147. * except Exception: # <<<<<<<<<<<<<<
  43148. * proc.close()
  43149. * raise
  43150. */
  43151. __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
  43152. if (__pyx_t_9) {
  43153. __Pyx_AddTraceback("uvloop.loop.Loop.__subprocess_run", __pyx_clineno, __pyx_lineno, __pyx_filename);
  43154. if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_2, &__pyx_t_5) < 0) __PYX_ERR(2, 2644, __pyx_L12_except_error)
  43155. __Pyx_GOTREF(__pyx_t_4);
  43156. __Pyx_GOTREF(__pyx_t_2);
  43157. __Pyx_GOTREF(__pyx_t_5);
  43158. /* "uvloop/loop.pyx":2645
  43159. * await waiter
  43160. * except Exception:
  43161. * proc.close() # <<<<<<<<<<<<<<
  43162. * raise
  43163. *
  43164. */
  43165. __pyx_t_11 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_proc), __pyx_n_s_close); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 2645, __pyx_L12_except_error)
  43166. __Pyx_GOTREF(__pyx_t_11);
  43167. __pyx_t_12 = NULL;
  43168. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) {
  43169. __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_11);
  43170. if (likely(__pyx_t_12)) {
  43171. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
  43172. __Pyx_INCREF(__pyx_t_12);
  43173. __Pyx_INCREF(function);
  43174. __Pyx_DECREF_SET(__pyx_t_11, function);
  43175. }
  43176. }
  43177. __pyx_t_10 = (__pyx_t_12) ? __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_12) : __Pyx_PyObject_CallNoArg(__pyx_t_11);
  43178. __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
  43179. if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 2645, __pyx_L12_except_error)
  43180. __Pyx_GOTREF(__pyx_t_10);
  43181. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  43182. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  43183. /* "uvloop/loop.pyx":2646
  43184. * except Exception:
  43185. * proc.close()
  43186. * raise # <<<<<<<<<<<<<<
  43187. *
  43188. * return proc, protocol
  43189. */
  43190. __Pyx_GIVEREF(__pyx_t_4);
  43191. __Pyx_GIVEREF(__pyx_t_2);
  43192. __Pyx_XGIVEREF(__pyx_t_5);
  43193. __Pyx_ErrRestoreWithState(__pyx_t_4, __pyx_t_2, __pyx_t_5);
  43194. __pyx_t_4 = 0; __pyx_t_2 = 0; __pyx_t_5 = 0;
  43195. __PYX_ERR(2, 2646, __pyx_L12_except_error)
  43196. }
  43197. goto __pyx_L12_except_error;
  43198. __pyx_L12_except_error:;
  43199. /* "uvloop/loop.pyx":2642
  43200. * restore_signals)
  43201. *
  43202. * try: # <<<<<<<<<<<<<<
  43203. * await waiter
  43204. * except Exception:
  43205. */
  43206. __Pyx_XGIVEREF(__pyx_t_6);
  43207. __Pyx_XGIVEREF(__pyx_t_7);
  43208. __Pyx_XGIVEREF(__pyx_t_8);
  43209. __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
  43210. goto __pyx_L1_error;
  43211. __pyx_L15_try_end:;
  43212. }
  43213. /* "uvloop/loop.pyx":2648
  43214. * raise
  43215. *
  43216. * return proc, protocol # <<<<<<<<<<<<<<
  43217. *
  43218. * @cython.iterable_coroutine
  43219. */
  43220. __Pyx_XDECREF(__pyx_r);
  43221. __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2648, __pyx_L1_error)
  43222. __Pyx_GOTREF(__pyx_t_5);
  43223. __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_proc));
  43224. __Pyx_GIVEREF(((PyObject *)__pyx_cur_scope->__pyx_v_proc));
  43225. PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_cur_scope->__pyx_v_proc));
  43226. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_protocol);
  43227. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_protocol);
  43228. PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_cur_scope->__pyx_v_protocol);
  43229. __pyx_r = NULL; __Pyx_ReturnWithStopIteration(__pyx_t_5);
  43230. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  43231. __pyx_t_5 = 0;
  43232. goto __pyx_L0;
  43233. CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
  43234. /* "uvloop/loop.pyx":2591
  43235. *
  43236. * @cython.iterable_coroutine
  43237. * async def __subprocess_run(self, protocol_factory, args, # <<<<<<<<<<<<<<
  43238. * stdin=subprocess_PIPE,
  43239. * stdout=subprocess_PIPE,
  43240. */
  43241. /* function exit code */
  43242. __pyx_L1_error:;
  43243. __Pyx_XDECREF(__pyx_t_2);
  43244. __Pyx_XDECREF(__pyx_t_4);
  43245. __Pyx_XDECREF(__pyx_t_5);
  43246. __Pyx_XDECREF(__pyx_t_10);
  43247. __Pyx_XDECREF(__pyx_t_11);
  43248. __Pyx_XDECREF(__pyx_t_12);
  43249. __Pyx_AddTraceback("__subprocess_run", __pyx_clineno, __pyx_lineno, __pyx_filename);
  43250. __pyx_L0:;
  43251. __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  43252. #if !CYTHON_USE_EXC_INFO_STACK
  43253. __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  43254. #endif
  43255. __pyx_generator->resume_label = -1;
  43256. __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  43257. __Pyx_RefNannyFinishContext();
  43258. return __pyx_r;
  43259. }
  43260. static PyObject *__pyx_gb_6uvloop_4loop_4Loop_110generator14(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
  43261. /* "uvloop/loop.pyx":2651
  43262. *
  43263. * @cython.iterable_coroutine
  43264. * async def subprocess_shell(self, protocol_factory, cmd, *, # <<<<<<<<<<<<<<
  43265. * shell=True,
  43266. * **kwargs):
  43267. */
  43268. /* Python wrapper */
  43269. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_109subprocess_shell(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  43270. static char __pyx_doc_6uvloop_4loop_4Loop_108subprocess_shell[] = "Loop.subprocess_shell(self, protocol_factory, cmd, *, shell=True, **kwargs)";
  43271. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_109subprocess_shell(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  43272. PyObject *__pyx_v_protocol_factory = 0;
  43273. PyObject *__pyx_v_cmd = 0;
  43274. PyObject *__pyx_v_shell = 0;
  43275. PyObject *__pyx_v_kwargs = 0;
  43276. PyObject *__pyx_r = 0;
  43277. __Pyx_RefNannyDeclarations
  43278. __Pyx_RefNannySetupContext("subprocess_shell (wrapper)", 0);
  43279. __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  43280. __Pyx_GOTREF(__pyx_v_kwargs);
  43281. {
  43282. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_protocol_factory,&__pyx_n_s_cmd,&__pyx_n_s_shell,0};
  43283. PyObject* values[3] = {0,0,0};
  43284. /* "uvloop/loop.pyx":2652
  43285. * @cython.iterable_coroutine
  43286. * async def subprocess_shell(self, protocol_factory, cmd, *,
  43287. * shell=True, # <<<<<<<<<<<<<<
  43288. * **kwargs):
  43289. *
  43290. */
  43291. values[2] = ((PyObject *)Py_True);
  43292. if (unlikely(__pyx_kwds)) {
  43293. Py_ssize_t kw_args;
  43294. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  43295. switch (pos_args) {
  43296. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  43297. CYTHON_FALLTHROUGH;
  43298. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  43299. CYTHON_FALLTHROUGH;
  43300. case 0: break;
  43301. default: goto __pyx_L5_argtuple_error;
  43302. }
  43303. kw_args = PyDict_Size(__pyx_kwds);
  43304. switch (pos_args) {
  43305. case 0:
  43306. if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_protocol_factory)) != 0)) kw_args--;
  43307. else goto __pyx_L5_argtuple_error;
  43308. CYTHON_FALLTHROUGH;
  43309. case 1:
  43310. if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cmd)) != 0)) kw_args--;
  43311. else {
  43312. __Pyx_RaiseArgtupleInvalid("subprocess_shell", 1, 2, 2, 1); __PYX_ERR(2, 2651, __pyx_L3_error)
  43313. }
  43314. }
  43315. if (kw_args == 1) {
  43316. const Py_ssize_t index = 2;
  43317. PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, *__pyx_pyargnames[index]);
  43318. if (value) { values[index] = value; kw_args--; }
  43319. }
  43320. if (unlikely(kw_args > 0)) {
  43321. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "subprocess_shell") < 0)) __PYX_ERR(2, 2651, __pyx_L3_error)
  43322. }
  43323. } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
  43324. goto __pyx_L5_argtuple_error;
  43325. } else {
  43326. values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  43327. values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  43328. }
  43329. __pyx_v_protocol_factory = values[0];
  43330. __pyx_v_cmd = values[1];
  43331. __pyx_v_shell = values[2];
  43332. }
  43333. goto __pyx_L4_argument_unpacking_done;
  43334. __pyx_L5_argtuple_error:;
  43335. __Pyx_RaiseArgtupleInvalid("subprocess_shell", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 2651, __pyx_L3_error)
  43336. __pyx_L3_error:;
  43337. __Pyx_CLEAR(__pyx_v_kwargs);
  43338. __Pyx_AddTraceback("uvloop.loop.Loop.subprocess_shell", __pyx_clineno, __pyx_lineno, __pyx_filename);
  43339. __Pyx_RefNannyFinishContext();
  43340. return NULL;
  43341. __pyx_L4_argument_unpacking_done:;
  43342. __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_108subprocess_shell(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self), __pyx_v_protocol_factory, __pyx_v_cmd, __pyx_v_shell, __pyx_v_kwargs);
  43343. /* "uvloop/loop.pyx":2651
  43344. *
  43345. * @cython.iterable_coroutine
  43346. * async def subprocess_shell(self, protocol_factory, cmd, *, # <<<<<<<<<<<<<<
  43347. * shell=True,
  43348. * **kwargs):
  43349. */
  43350. /* function exit code */
  43351. __Pyx_XDECREF(__pyx_v_kwargs);
  43352. __Pyx_RefNannyFinishContext();
  43353. return __pyx_r;
  43354. }
  43355. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_108subprocess_shell(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_protocol_factory, PyObject *__pyx_v_cmd, PyObject *__pyx_v_shell, PyObject *__pyx_v_kwargs) {
  43356. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_21_subprocess_shell *__pyx_cur_scope;
  43357. PyObject *__pyx_r = NULL;
  43358. __Pyx_RefNannyDeclarations
  43359. __Pyx_RefNannySetupContext("subprocess_shell", 0);
  43360. __pyx_cur_scope = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_21_subprocess_shell *)__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_21_subprocess_shell(__pyx_ptype_6uvloop_4loop___pyx_scope_struct_21_subprocess_shell, __pyx_empty_tuple, NULL);
  43361. if (unlikely(!__pyx_cur_scope)) {
  43362. __pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_21_subprocess_shell *)Py_None);
  43363. __Pyx_INCREF(Py_None);
  43364. __PYX_ERR(2, 2651, __pyx_L1_error)
  43365. } else {
  43366. __Pyx_GOTREF(__pyx_cur_scope);
  43367. }
  43368. __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  43369. __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  43370. __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  43371. __pyx_cur_scope->__pyx_v_protocol_factory = __pyx_v_protocol_factory;
  43372. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_protocol_factory);
  43373. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_protocol_factory);
  43374. __pyx_cur_scope->__pyx_v_cmd = __pyx_v_cmd;
  43375. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_cmd);
  43376. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_cmd);
  43377. __pyx_cur_scope->__pyx_v_shell = __pyx_v_shell;
  43378. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_shell);
  43379. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_shell);
  43380. __pyx_cur_scope->__pyx_v_kwargs = __pyx_v_kwargs;
  43381. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_kwargs);
  43382. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_kwargs);
  43383. {
  43384. __pyx_CoroutineObject *gen = __Pyx_IterableCoroutine_New((__pyx_coroutine_body_t) __pyx_gb_6uvloop_4loop_4Loop_110generator14, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_subprocess_shell, __pyx_n_s_Loop_subprocess_shell, __pyx_n_s_uvloop_loop); if (unlikely(!gen)) __PYX_ERR(2, 2651, __pyx_L1_error)
  43385. __Pyx_DECREF(__pyx_cur_scope);
  43386. __Pyx_RefNannyFinishContext();
  43387. return (PyObject *) gen;
  43388. }
  43389. /* function exit code */
  43390. __pyx_L1_error:;
  43391. __Pyx_AddTraceback("uvloop.loop.Loop.subprocess_shell", __pyx_clineno, __pyx_lineno, __pyx_filename);
  43392. __pyx_r = NULL;
  43393. __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  43394. __Pyx_XGIVEREF(__pyx_r);
  43395. __Pyx_RefNannyFinishContext();
  43396. return __pyx_r;
  43397. }
  43398. static PyObject *__pyx_gb_6uvloop_4loop_4Loop_110generator14(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
  43399. {
  43400. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_21_subprocess_shell *__pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_21_subprocess_shell *)__pyx_generator->closure);
  43401. PyObject *__pyx_r = NULL;
  43402. int __pyx_t_1;
  43403. int __pyx_t_2;
  43404. PyObject *__pyx_t_3 = NULL;
  43405. PyObject *__pyx_t_4 = NULL;
  43406. PyObject *__pyx_t_5 = NULL;
  43407. PyObject *__pyx_t_6 = NULL;
  43408. __Pyx_RefNannyDeclarations
  43409. __Pyx_RefNannySetupContext("subprocess_shell", 0);
  43410. switch (__pyx_generator->resume_label) {
  43411. case 0: goto __pyx_L3_first_run;
  43412. case 1: goto __pyx_L6_resume_from_await;
  43413. default: /* CPython raises the right error here */
  43414. __Pyx_RefNannyFinishContext();
  43415. return NULL;
  43416. }
  43417. __pyx_L3_first_run:;
  43418. if (unlikely(!__pyx_sent_value)) __PYX_ERR(2, 2651, __pyx_L1_error)
  43419. /* "uvloop/loop.pyx":2655
  43420. * **kwargs):
  43421. *
  43422. * if not shell: # <<<<<<<<<<<<<<
  43423. * raise ValueError("shell must be True")
  43424. *
  43425. */
  43426. __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_shell); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 2655, __pyx_L1_error)
  43427. __pyx_t_2 = ((!__pyx_t_1) != 0);
  43428. if (unlikely(__pyx_t_2)) {
  43429. /* "uvloop/loop.pyx":2656
  43430. *
  43431. * if not shell:
  43432. * raise ValueError("shell must be True") # <<<<<<<<<<<<<<
  43433. *
  43434. * args = [cmd]
  43435. */
  43436. __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__73, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2656, __pyx_L1_error)
  43437. __Pyx_GOTREF(__pyx_t_3);
  43438. __Pyx_Raise(__pyx_t_3, 0, 0, 0);
  43439. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  43440. __PYX_ERR(2, 2656, __pyx_L1_error)
  43441. /* "uvloop/loop.pyx":2655
  43442. * **kwargs):
  43443. *
  43444. * if not shell: # <<<<<<<<<<<<<<
  43445. * raise ValueError("shell must be True")
  43446. *
  43447. */
  43448. }
  43449. /* "uvloop/loop.pyx":2658
  43450. * raise ValueError("shell must be True")
  43451. *
  43452. * args = [cmd] # <<<<<<<<<<<<<<
  43453. * if shell:
  43454. * args = [b'/bin/sh', b'-c'] + args
  43455. */
  43456. __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2658, __pyx_L1_error)
  43457. __Pyx_GOTREF(__pyx_t_3);
  43458. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_cmd);
  43459. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_cmd);
  43460. PyList_SET_ITEM(__pyx_t_3, 0, __pyx_cur_scope->__pyx_v_cmd);
  43461. __Pyx_GIVEREF(__pyx_t_3);
  43462. __pyx_cur_scope->__pyx_v_args = ((PyObject*)__pyx_t_3);
  43463. __pyx_t_3 = 0;
  43464. /* "uvloop/loop.pyx":2659
  43465. *
  43466. * args = [cmd]
  43467. * if shell: # <<<<<<<<<<<<<<
  43468. * args = [b'/bin/sh', b'-c'] + args
  43469. *
  43470. */
  43471. __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_shell); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(2, 2659, __pyx_L1_error)
  43472. if (__pyx_t_2) {
  43473. /* "uvloop/loop.pyx":2660
  43474. * args = [cmd]
  43475. * if shell:
  43476. * args = [b'/bin/sh', b'-c'] + args # <<<<<<<<<<<<<<
  43477. *
  43478. * return await self.__subprocess_run(protocol_factory, args, shell=True,
  43479. */
  43480. __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2660, __pyx_L1_error)
  43481. __Pyx_GOTREF(__pyx_t_3);
  43482. __Pyx_INCREF(__pyx_kp_b_bin_sh);
  43483. __Pyx_GIVEREF(__pyx_kp_b_bin_sh);
  43484. PyList_SET_ITEM(__pyx_t_3, 0, __pyx_kp_b_bin_sh);
  43485. __Pyx_INCREF(__pyx_kp_b_c);
  43486. __Pyx_GIVEREF(__pyx_kp_b_c);
  43487. PyList_SET_ITEM(__pyx_t_3, 1, __pyx_kp_b_c);
  43488. __pyx_t_4 = PyNumber_Add(__pyx_t_3, __pyx_cur_scope->__pyx_v_args); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2660, __pyx_L1_error)
  43489. __Pyx_GOTREF(__pyx_t_4);
  43490. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  43491. __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_args);
  43492. __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_args, ((PyObject*)__pyx_t_4));
  43493. __Pyx_GIVEREF(__pyx_t_4);
  43494. __pyx_t_4 = 0;
  43495. /* "uvloop/loop.pyx":2659
  43496. *
  43497. * args = [cmd]
  43498. * if shell: # <<<<<<<<<<<<<<
  43499. * args = [b'/bin/sh', b'-c'] + args
  43500. *
  43501. */
  43502. }
  43503. /* "uvloop/loop.pyx":2662
  43504. * args = [b'/bin/sh', b'-c'] + args
  43505. *
  43506. * return await self.__subprocess_run(protocol_factory, args, shell=True, # <<<<<<<<<<<<<<
  43507. * **kwargs)
  43508. *
  43509. */
  43510. __Pyx_XDECREF(__pyx_r);
  43511. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_subprocess_run); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2662, __pyx_L1_error)
  43512. __Pyx_GOTREF(__pyx_t_4);
  43513. __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2662, __pyx_L1_error)
  43514. __Pyx_GOTREF(__pyx_t_3);
  43515. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_protocol_factory);
  43516. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_protocol_factory);
  43517. PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_cur_scope->__pyx_v_protocol_factory);
  43518. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_args);
  43519. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_args);
  43520. PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_cur_scope->__pyx_v_args);
  43521. __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 2662, __pyx_L1_error)
  43522. __Pyx_GOTREF(__pyx_t_6);
  43523. if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_shell, Py_True) < 0) __PYX_ERR(2, 2662, __pyx_L1_error)
  43524. __pyx_t_5 = __pyx_t_6;
  43525. __pyx_t_6 = 0;
  43526. /* "uvloop/loop.pyx":2663
  43527. *
  43528. * return await self.__subprocess_run(protocol_factory, args, shell=True,
  43529. * **kwargs) # <<<<<<<<<<<<<<
  43530. *
  43531. * @cython.iterable_coroutine
  43532. */
  43533. if (__Pyx_MergeKeywords(__pyx_t_5, __pyx_cur_scope->__pyx_v_kwargs) < 0) __PYX_ERR(2, 2663, __pyx_L1_error)
  43534. /* "uvloop/loop.pyx":2662
  43535. * args = [b'/bin/sh', b'-c'] + args
  43536. *
  43537. * return await self.__subprocess_run(protocol_factory, args, shell=True, # <<<<<<<<<<<<<<
  43538. * **kwargs)
  43539. *
  43540. */
  43541. __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 2662, __pyx_L1_error)
  43542. __Pyx_GOTREF(__pyx_t_6);
  43543. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  43544. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  43545. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  43546. __pyx_r = __Pyx_Coroutine_Yield_From(__pyx_generator, __pyx_t_6);
  43547. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  43548. __Pyx_XGOTREF(__pyx_r);
  43549. if (likely(__pyx_r)) {
  43550. __Pyx_XGIVEREF(__pyx_r);
  43551. __Pyx_RefNannyFinishContext();
  43552. __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  43553. /* return from generator, awaiting value */
  43554. __pyx_generator->resume_label = 1;
  43555. return __pyx_r;
  43556. __pyx_L6_resume_from_await:;
  43557. if (unlikely(!__pyx_sent_value)) __PYX_ERR(2, 2662, __pyx_L1_error)
  43558. __pyx_t_6 = __pyx_sent_value; __Pyx_INCREF(__pyx_t_6);
  43559. } else {
  43560. __pyx_t_6 = NULL;
  43561. if (__Pyx_PyGen_FetchStopIterationValue(&__pyx_t_6) < 0) __PYX_ERR(2, 2662, __pyx_L1_error)
  43562. __Pyx_GOTREF(__pyx_t_6);
  43563. }
  43564. __pyx_r = NULL; __Pyx_ReturnWithStopIteration(__pyx_t_6);
  43565. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  43566. __pyx_t_6 = 0;
  43567. goto __pyx_L0;
  43568. CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
  43569. /* "uvloop/loop.pyx":2651
  43570. *
  43571. * @cython.iterable_coroutine
  43572. * async def subprocess_shell(self, protocol_factory, cmd, *, # <<<<<<<<<<<<<<
  43573. * shell=True,
  43574. * **kwargs):
  43575. */
  43576. /* function exit code */
  43577. __pyx_L1_error:;
  43578. __Pyx_XDECREF(__pyx_t_3);
  43579. __Pyx_XDECREF(__pyx_t_4);
  43580. __Pyx_XDECREF(__pyx_t_5);
  43581. __Pyx_XDECREF(__pyx_t_6);
  43582. __Pyx_AddTraceback("subprocess_shell", __pyx_clineno, __pyx_lineno, __pyx_filename);
  43583. __pyx_L0:;
  43584. __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  43585. #if !CYTHON_USE_EXC_INFO_STACK
  43586. __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  43587. #endif
  43588. __pyx_generator->resume_label = -1;
  43589. __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  43590. __Pyx_RefNannyFinishContext();
  43591. return __pyx_r;
  43592. }
  43593. static PyObject *__pyx_gb_6uvloop_4loop_4Loop_113generator15(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
  43594. /* "uvloop/loop.pyx":2666
  43595. *
  43596. * @cython.iterable_coroutine
  43597. * async def subprocess_exec(self, protocol_factory, program, *args, # <<<<<<<<<<<<<<
  43598. * shell=False, **kwargs):
  43599. *
  43600. */
  43601. /* Python wrapper */
  43602. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_112subprocess_exec(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  43603. static char __pyx_doc_6uvloop_4loop_4Loop_111subprocess_exec[] = "Loop.subprocess_exec(self, protocol_factory, program, *args, shell=False, **kwargs)";
  43604. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_112subprocess_exec(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  43605. PyObject *__pyx_v_protocol_factory = 0;
  43606. PyObject *__pyx_v_program = 0;
  43607. PyObject *__pyx_v_shell = 0;
  43608. PyObject *__pyx_v_args = 0;
  43609. PyObject *__pyx_v_kwargs = 0;
  43610. PyObject *__pyx_r = 0;
  43611. __Pyx_RefNannyDeclarations
  43612. __Pyx_RefNannySetupContext("subprocess_exec (wrapper)", 0);
  43613. __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  43614. __Pyx_GOTREF(__pyx_v_kwargs);
  43615. if (PyTuple_GET_SIZE(__pyx_args) > 2) {
  43616. __pyx_v_args = PyTuple_GetSlice(__pyx_args, 2, PyTuple_GET_SIZE(__pyx_args));
  43617. if (unlikely(!__pyx_v_args)) {
  43618. __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  43619. __Pyx_RefNannyFinishContext();
  43620. return NULL;
  43621. }
  43622. __Pyx_GOTREF(__pyx_v_args);
  43623. } else {
  43624. __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  43625. }
  43626. {
  43627. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_protocol_factory,&__pyx_n_s_program,&__pyx_n_s_shell,0};
  43628. PyObject* values[3] = {0,0,0};
  43629. /* "uvloop/loop.pyx":2667
  43630. * @cython.iterable_coroutine
  43631. * async def subprocess_exec(self, protocol_factory, program, *args,
  43632. * shell=False, **kwargs): # <<<<<<<<<<<<<<
  43633. *
  43634. * if shell:
  43635. */
  43636. values[2] = ((PyObject *)Py_False);
  43637. if (unlikely(__pyx_kwds)) {
  43638. Py_ssize_t kw_args;
  43639. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  43640. switch (pos_args) {
  43641. default:
  43642. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  43643. CYTHON_FALLTHROUGH;
  43644. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  43645. CYTHON_FALLTHROUGH;
  43646. case 0: break;
  43647. }
  43648. kw_args = PyDict_Size(__pyx_kwds);
  43649. switch (pos_args) {
  43650. case 0:
  43651. if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_protocol_factory)) != 0)) kw_args--;
  43652. else goto __pyx_L5_argtuple_error;
  43653. CYTHON_FALLTHROUGH;
  43654. case 1:
  43655. if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_program)) != 0)) kw_args--;
  43656. else {
  43657. __Pyx_RaiseArgtupleInvalid("subprocess_exec", 0, 2, 2, 1); __PYX_ERR(2, 2666, __pyx_L3_error)
  43658. }
  43659. }
  43660. if (kw_args == 1) {
  43661. const Py_ssize_t index = 2;
  43662. PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, *__pyx_pyargnames[index]);
  43663. if (value) { values[index] = value; kw_args--; }
  43664. }
  43665. if (unlikely(kw_args > 0)) {
  43666. const Py_ssize_t used_pos_args = (pos_args < 2) ? pos_args : 2;
  43667. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "subprocess_exec") < 0)) __PYX_ERR(2, 2666, __pyx_L3_error)
  43668. }
  43669. } else if (PyTuple_GET_SIZE(__pyx_args) < 2) {
  43670. goto __pyx_L5_argtuple_error;
  43671. } else {
  43672. values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  43673. values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  43674. }
  43675. __pyx_v_protocol_factory = values[0];
  43676. __pyx_v_program = values[1];
  43677. __pyx_v_shell = values[2];
  43678. }
  43679. goto __pyx_L4_argument_unpacking_done;
  43680. __pyx_L5_argtuple_error:;
  43681. __Pyx_RaiseArgtupleInvalid("subprocess_exec", 0, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 2666, __pyx_L3_error)
  43682. __pyx_L3_error:;
  43683. __Pyx_CLEAR(__pyx_v_args);
  43684. __Pyx_CLEAR(__pyx_v_kwargs);
  43685. __Pyx_AddTraceback("uvloop.loop.Loop.subprocess_exec", __pyx_clineno, __pyx_lineno, __pyx_filename);
  43686. __Pyx_RefNannyFinishContext();
  43687. return NULL;
  43688. __pyx_L4_argument_unpacking_done:;
  43689. __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_111subprocess_exec(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self), __pyx_v_protocol_factory, __pyx_v_program, __pyx_v_shell, __pyx_v_args, __pyx_v_kwargs);
  43690. /* "uvloop/loop.pyx":2666
  43691. *
  43692. * @cython.iterable_coroutine
  43693. * async def subprocess_exec(self, protocol_factory, program, *args, # <<<<<<<<<<<<<<
  43694. * shell=False, **kwargs):
  43695. *
  43696. */
  43697. /* function exit code */
  43698. __Pyx_XDECREF(__pyx_v_args);
  43699. __Pyx_XDECREF(__pyx_v_kwargs);
  43700. __Pyx_RefNannyFinishContext();
  43701. return __pyx_r;
  43702. }
  43703. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_111subprocess_exec(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_protocol_factory, PyObject *__pyx_v_program, PyObject *__pyx_v_shell, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
  43704. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_22_subprocess_exec *__pyx_cur_scope;
  43705. PyObject *__pyx_r = NULL;
  43706. __Pyx_RefNannyDeclarations
  43707. __Pyx_RefNannySetupContext("subprocess_exec", 0);
  43708. __pyx_cur_scope = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_22_subprocess_exec *)__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_22_subprocess_exec(__pyx_ptype_6uvloop_4loop___pyx_scope_struct_22_subprocess_exec, __pyx_empty_tuple, NULL);
  43709. if (unlikely(!__pyx_cur_scope)) {
  43710. __pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_22_subprocess_exec *)Py_None);
  43711. __Pyx_INCREF(Py_None);
  43712. __PYX_ERR(2, 2666, __pyx_L1_error)
  43713. } else {
  43714. __Pyx_GOTREF(__pyx_cur_scope);
  43715. }
  43716. __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  43717. __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  43718. __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  43719. __pyx_cur_scope->__pyx_v_protocol_factory = __pyx_v_protocol_factory;
  43720. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_protocol_factory);
  43721. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_protocol_factory);
  43722. __pyx_cur_scope->__pyx_v_program = __pyx_v_program;
  43723. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_program);
  43724. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_program);
  43725. __pyx_cur_scope->__pyx_v_shell = __pyx_v_shell;
  43726. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_shell);
  43727. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_shell);
  43728. __pyx_cur_scope->__pyx_v_args = __pyx_v_args;
  43729. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_args);
  43730. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_args);
  43731. __pyx_cur_scope->__pyx_v_kwargs = __pyx_v_kwargs;
  43732. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_kwargs);
  43733. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_kwargs);
  43734. {
  43735. __pyx_CoroutineObject *gen = __Pyx_IterableCoroutine_New((__pyx_coroutine_body_t) __pyx_gb_6uvloop_4loop_4Loop_113generator15, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_subprocess_exec, __pyx_n_s_Loop_subprocess_exec, __pyx_n_s_uvloop_loop); if (unlikely(!gen)) __PYX_ERR(2, 2666, __pyx_L1_error)
  43736. __Pyx_DECREF(__pyx_cur_scope);
  43737. __Pyx_RefNannyFinishContext();
  43738. return (PyObject *) gen;
  43739. }
  43740. /* function exit code */
  43741. __pyx_L1_error:;
  43742. __Pyx_AddTraceback("uvloop.loop.Loop.subprocess_exec", __pyx_clineno, __pyx_lineno, __pyx_filename);
  43743. __pyx_r = NULL;
  43744. __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  43745. __Pyx_XGIVEREF(__pyx_r);
  43746. __Pyx_RefNannyFinishContext();
  43747. return __pyx_r;
  43748. }
  43749. static PyObject *__pyx_gb_6uvloop_4loop_4Loop_113generator15(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
  43750. {
  43751. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_22_subprocess_exec *__pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_22_subprocess_exec *)__pyx_generator->closure);
  43752. PyObject *__pyx_r = NULL;
  43753. int __pyx_t_1;
  43754. PyObject *__pyx_t_2 = NULL;
  43755. PyObject *__pyx_t_3 = NULL;
  43756. PyObject *__pyx_t_4 = NULL;
  43757. PyObject *__pyx_t_5 = NULL;
  43758. __Pyx_RefNannyDeclarations
  43759. __Pyx_RefNannySetupContext("subprocess_exec", 0);
  43760. switch (__pyx_generator->resume_label) {
  43761. case 0: goto __pyx_L3_first_run;
  43762. case 1: goto __pyx_L5_resume_from_await;
  43763. default: /* CPython raises the right error here */
  43764. __Pyx_RefNannyFinishContext();
  43765. return NULL;
  43766. }
  43767. __pyx_L3_first_run:;
  43768. if (unlikely(!__pyx_sent_value)) __PYX_ERR(2, 2666, __pyx_L1_error)
  43769. /* "uvloop/loop.pyx":2669
  43770. * shell=False, **kwargs):
  43771. *
  43772. * if shell: # <<<<<<<<<<<<<<
  43773. * raise ValueError("shell must be False")
  43774. *
  43775. */
  43776. __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_shell); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 2669, __pyx_L1_error)
  43777. if (unlikely(__pyx_t_1)) {
  43778. /* "uvloop/loop.pyx":2670
  43779. *
  43780. * if shell:
  43781. * raise ValueError("shell must be False") # <<<<<<<<<<<<<<
  43782. *
  43783. * args = list((program,) + args)
  43784. */
  43785. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__74, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 2670, __pyx_L1_error)
  43786. __Pyx_GOTREF(__pyx_t_2);
  43787. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  43788. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  43789. __PYX_ERR(2, 2670, __pyx_L1_error)
  43790. /* "uvloop/loop.pyx":2669
  43791. * shell=False, **kwargs):
  43792. *
  43793. * if shell: # <<<<<<<<<<<<<<
  43794. * raise ValueError("shell must be False")
  43795. *
  43796. */
  43797. }
  43798. /* "uvloop/loop.pyx":2672
  43799. * raise ValueError("shell must be False")
  43800. *
  43801. * args = list((program,) + args) # <<<<<<<<<<<<<<
  43802. *
  43803. * return await self.__subprocess_run(protocol_factory, args, shell=False,
  43804. */
  43805. __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 2672, __pyx_L1_error)
  43806. __Pyx_GOTREF(__pyx_t_2);
  43807. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_program);
  43808. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_program);
  43809. PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_cur_scope->__pyx_v_program);
  43810. __pyx_t_3 = PyNumber_Add(__pyx_t_2, __pyx_cur_scope->__pyx_v_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2672, __pyx_L1_error)
  43811. __Pyx_GOTREF(__pyx_t_3);
  43812. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  43813. __pyx_t_2 = PySequence_List(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 2672, __pyx_L1_error)
  43814. __Pyx_GOTREF(__pyx_t_2);
  43815. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  43816. __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_args);
  43817. __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_args, __pyx_t_2);
  43818. __Pyx_GIVEREF(__pyx_t_2);
  43819. __pyx_t_2 = 0;
  43820. /* "uvloop/loop.pyx":2674
  43821. * args = list((program,) + args)
  43822. *
  43823. * return await self.__subprocess_run(protocol_factory, args, shell=False, # <<<<<<<<<<<<<<
  43824. * **kwargs)
  43825. *
  43826. */
  43827. __Pyx_XDECREF(__pyx_r);
  43828. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_subprocess_run); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 2674, __pyx_L1_error)
  43829. __Pyx_GOTREF(__pyx_t_2);
  43830. __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2674, __pyx_L1_error)
  43831. __Pyx_GOTREF(__pyx_t_3);
  43832. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_protocol_factory);
  43833. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_protocol_factory);
  43834. PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_cur_scope->__pyx_v_protocol_factory);
  43835. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_args);
  43836. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_args);
  43837. PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_cur_scope->__pyx_v_args);
  43838. __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2674, __pyx_L1_error)
  43839. __Pyx_GOTREF(__pyx_t_5);
  43840. if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_shell, Py_False) < 0) __PYX_ERR(2, 2674, __pyx_L1_error)
  43841. __pyx_t_4 = __pyx_t_5;
  43842. __pyx_t_5 = 0;
  43843. /* "uvloop/loop.pyx":2675
  43844. *
  43845. * return await self.__subprocess_run(protocol_factory, args, shell=False,
  43846. * **kwargs) # <<<<<<<<<<<<<<
  43847. *
  43848. * @cython.iterable_coroutine
  43849. */
  43850. if (__Pyx_MergeKeywords(__pyx_t_4, __pyx_cur_scope->__pyx_v_kwargs) < 0) __PYX_ERR(2, 2675, __pyx_L1_error)
  43851. /* "uvloop/loop.pyx":2674
  43852. * args = list((program,) + args)
  43853. *
  43854. * return await self.__subprocess_run(protocol_factory, args, shell=False, # <<<<<<<<<<<<<<
  43855. * **kwargs)
  43856. *
  43857. */
  43858. __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2674, __pyx_L1_error)
  43859. __Pyx_GOTREF(__pyx_t_5);
  43860. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  43861. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  43862. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  43863. __pyx_r = __Pyx_Coroutine_Yield_From(__pyx_generator, __pyx_t_5);
  43864. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  43865. __Pyx_XGOTREF(__pyx_r);
  43866. if (likely(__pyx_r)) {
  43867. __Pyx_XGIVEREF(__pyx_r);
  43868. __Pyx_RefNannyFinishContext();
  43869. __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  43870. /* return from generator, awaiting value */
  43871. __pyx_generator->resume_label = 1;
  43872. return __pyx_r;
  43873. __pyx_L5_resume_from_await:;
  43874. if (unlikely(!__pyx_sent_value)) __PYX_ERR(2, 2674, __pyx_L1_error)
  43875. __pyx_t_5 = __pyx_sent_value; __Pyx_INCREF(__pyx_t_5);
  43876. } else {
  43877. __pyx_t_5 = NULL;
  43878. if (__Pyx_PyGen_FetchStopIterationValue(&__pyx_t_5) < 0) __PYX_ERR(2, 2674, __pyx_L1_error)
  43879. __Pyx_GOTREF(__pyx_t_5);
  43880. }
  43881. __pyx_r = NULL; __Pyx_ReturnWithStopIteration(__pyx_t_5);
  43882. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  43883. __pyx_t_5 = 0;
  43884. goto __pyx_L0;
  43885. CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
  43886. /* "uvloop/loop.pyx":2666
  43887. *
  43888. * @cython.iterable_coroutine
  43889. * async def subprocess_exec(self, protocol_factory, program, *args, # <<<<<<<<<<<<<<
  43890. * shell=False, **kwargs):
  43891. *
  43892. */
  43893. /* function exit code */
  43894. __pyx_L1_error:;
  43895. __Pyx_XDECREF(__pyx_t_2);
  43896. __Pyx_XDECREF(__pyx_t_3);
  43897. __Pyx_XDECREF(__pyx_t_4);
  43898. __Pyx_XDECREF(__pyx_t_5);
  43899. __Pyx_AddTraceback("subprocess_exec", __pyx_clineno, __pyx_lineno, __pyx_filename);
  43900. __pyx_L0:;
  43901. __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  43902. #if !CYTHON_USE_EXC_INFO_STACK
  43903. __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  43904. #endif
  43905. __pyx_generator->resume_label = -1;
  43906. __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  43907. __Pyx_RefNannyFinishContext();
  43908. return __pyx_r;
  43909. }
  43910. static PyObject *__pyx_gb_6uvloop_4loop_4Loop_116generator16(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
  43911. /* "uvloop/loop.pyx":2678
  43912. *
  43913. * @cython.iterable_coroutine
  43914. * async def connect_read_pipe(self, proto_factory, pipe): # <<<<<<<<<<<<<<
  43915. * """Register read pipe in event loop. Set the pipe to non-blocking mode.
  43916. *
  43917. */
  43918. /* Python wrapper */
  43919. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_115connect_read_pipe(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  43920. static char __pyx_doc_6uvloop_4loop_4Loop_114connect_read_pipe[] = "Loop.connect_read_pipe(self, proto_factory, pipe)\nRegister read pipe in event loop. Set the pipe to non-blocking mode.\n\n protocol_factory should instantiate object with Protocol interface.\n pipe is a file-like object.\n Return pair (transport, protocol), where transport supports the\n ReadTransport interface.";
  43921. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_115connect_read_pipe(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  43922. PyObject *__pyx_v_proto_factory = 0;
  43923. PyObject *__pyx_v_pipe = 0;
  43924. PyObject *__pyx_r = 0;
  43925. __Pyx_RefNannyDeclarations
  43926. __Pyx_RefNannySetupContext("connect_read_pipe (wrapper)", 0);
  43927. {
  43928. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_proto_factory,&__pyx_n_s_pipe,0};
  43929. PyObject* values[2] = {0,0};
  43930. if (unlikely(__pyx_kwds)) {
  43931. Py_ssize_t kw_args;
  43932. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  43933. switch (pos_args) {
  43934. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  43935. CYTHON_FALLTHROUGH;
  43936. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  43937. CYTHON_FALLTHROUGH;
  43938. case 0: break;
  43939. default: goto __pyx_L5_argtuple_error;
  43940. }
  43941. kw_args = PyDict_Size(__pyx_kwds);
  43942. switch (pos_args) {
  43943. case 0:
  43944. if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_proto_factory)) != 0)) kw_args--;
  43945. else goto __pyx_L5_argtuple_error;
  43946. CYTHON_FALLTHROUGH;
  43947. case 1:
  43948. if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pipe)) != 0)) kw_args--;
  43949. else {
  43950. __Pyx_RaiseArgtupleInvalid("connect_read_pipe", 1, 2, 2, 1); __PYX_ERR(2, 2678, __pyx_L3_error)
  43951. }
  43952. }
  43953. if (unlikely(kw_args > 0)) {
  43954. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "connect_read_pipe") < 0)) __PYX_ERR(2, 2678, __pyx_L3_error)
  43955. }
  43956. } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
  43957. goto __pyx_L5_argtuple_error;
  43958. } else {
  43959. values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  43960. values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  43961. }
  43962. __pyx_v_proto_factory = values[0];
  43963. __pyx_v_pipe = values[1];
  43964. }
  43965. goto __pyx_L4_argument_unpacking_done;
  43966. __pyx_L5_argtuple_error:;
  43967. __Pyx_RaiseArgtupleInvalid("connect_read_pipe", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 2678, __pyx_L3_error)
  43968. __pyx_L3_error:;
  43969. __Pyx_AddTraceback("uvloop.loop.Loop.connect_read_pipe", __pyx_clineno, __pyx_lineno, __pyx_filename);
  43970. __Pyx_RefNannyFinishContext();
  43971. return NULL;
  43972. __pyx_L4_argument_unpacking_done:;
  43973. __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_114connect_read_pipe(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self), __pyx_v_proto_factory, __pyx_v_pipe);
  43974. /* function exit code */
  43975. __Pyx_RefNannyFinishContext();
  43976. return __pyx_r;
  43977. }
  43978. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_114connect_read_pipe(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_proto_factory, PyObject *__pyx_v_pipe) {
  43979. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_23_connect_read_pipe *__pyx_cur_scope;
  43980. PyObject *__pyx_r = NULL;
  43981. __Pyx_RefNannyDeclarations
  43982. __Pyx_RefNannySetupContext("connect_read_pipe", 0);
  43983. __pyx_cur_scope = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_23_connect_read_pipe *)__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_23_connect_read_pipe(__pyx_ptype_6uvloop_4loop___pyx_scope_struct_23_connect_read_pipe, __pyx_empty_tuple, NULL);
  43984. if (unlikely(!__pyx_cur_scope)) {
  43985. __pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_23_connect_read_pipe *)Py_None);
  43986. __Pyx_INCREF(Py_None);
  43987. __PYX_ERR(2, 2678, __pyx_L1_error)
  43988. } else {
  43989. __Pyx_GOTREF(__pyx_cur_scope);
  43990. }
  43991. __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  43992. __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  43993. __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  43994. __pyx_cur_scope->__pyx_v_proto_factory = __pyx_v_proto_factory;
  43995. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_proto_factory);
  43996. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_proto_factory);
  43997. __pyx_cur_scope->__pyx_v_pipe = __pyx_v_pipe;
  43998. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_pipe);
  43999. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_pipe);
  44000. {
  44001. __pyx_CoroutineObject *gen = __Pyx_IterableCoroutine_New((__pyx_coroutine_body_t) __pyx_gb_6uvloop_4loop_4Loop_116generator16, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_connect_read_pipe, __pyx_n_s_Loop_connect_read_pipe, __pyx_n_s_uvloop_loop); if (unlikely(!gen)) __PYX_ERR(2, 2678, __pyx_L1_error)
  44002. __Pyx_DECREF(__pyx_cur_scope);
  44003. __Pyx_RefNannyFinishContext();
  44004. return (PyObject *) gen;
  44005. }
  44006. /* function exit code */
  44007. __pyx_L1_error:;
  44008. __Pyx_AddTraceback("uvloop.loop.Loop.connect_read_pipe", __pyx_clineno, __pyx_lineno, __pyx_filename);
  44009. __pyx_r = NULL;
  44010. __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  44011. __Pyx_XGIVEREF(__pyx_r);
  44012. __Pyx_RefNannyFinishContext();
  44013. return __pyx_r;
  44014. }
  44015. static PyObject *__pyx_gb_6uvloop_4loop_4Loop_116generator16(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
  44016. {
  44017. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_23_connect_read_pipe *__pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_23_connect_read_pipe *)__pyx_generator->closure);
  44018. PyObject *__pyx_r = NULL;
  44019. PyObject *__pyx_t_1 = NULL;
  44020. PyObject *__pyx_t_2 = NULL;
  44021. PyObject *__pyx_t_3 = NULL;
  44022. PyObject *__pyx_t_4 = NULL;
  44023. PyObject *__pyx_t_5 = NULL;
  44024. PyObject *__pyx_t_6 = NULL;
  44025. int __pyx_t_7;
  44026. PyObject *__pyx_t_8 = NULL;
  44027. __Pyx_RefNannyDeclarations
  44028. __Pyx_RefNannySetupContext("connect_read_pipe", 0);
  44029. switch (__pyx_generator->resume_label) {
  44030. case 0: goto __pyx_L3_first_run;
  44031. case 1: goto __pyx_L10_resume_from_await;
  44032. default: /* CPython raises the right error here */
  44033. __Pyx_RefNannyFinishContext();
  44034. return NULL;
  44035. }
  44036. __pyx_L3_first_run:;
  44037. if (unlikely(!__pyx_sent_value)) __PYX_ERR(2, 2678, __pyx_L1_error)
  44038. /* "uvloop/loop.pyx":2688
  44039. * ReadUnixTransport transp
  44040. *
  44041. * waiter = self._new_future() # <<<<<<<<<<<<<<
  44042. * proto = proto_factory()
  44043. * transp = ReadUnixTransport.new(self, proto, None, waiter)
  44044. */
  44045. __pyx_t_1 = __pyx_f_6uvloop_4loop_4Loop__new_future(__pyx_cur_scope->__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2688, __pyx_L1_error)
  44046. __Pyx_GOTREF(__pyx_t_1);
  44047. __Pyx_GIVEREF(__pyx_t_1);
  44048. __pyx_cur_scope->__pyx_v_waiter = __pyx_t_1;
  44049. __pyx_t_1 = 0;
  44050. /* "uvloop/loop.pyx":2689
  44051. *
  44052. * waiter = self._new_future()
  44053. * proto = proto_factory() # <<<<<<<<<<<<<<
  44054. * transp = ReadUnixTransport.new(self, proto, None, waiter)
  44055. * transp._add_extra_info('pipe', pipe)
  44056. */
  44057. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_proto_factory);
  44058. __pyx_t_2 = __pyx_cur_scope->__pyx_v_proto_factory; __pyx_t_3 = NULL;
  44059. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
  44060. __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
  44061. if (likely(__pyx_t_3)) {
  44062. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  44063. __Pyx_INCREF(__pyx_t_3);
  44064. __Pyx_INCREF(function);
  44065. __Pyx_DECREF_SET(__pyx_t_2, function);
  44066. }
  44067. }
  44068. __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  44069. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  44070. if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2689, __pyx_L1_error)
  44071. __Pyx_GOTREF(__pyx_t_1);
  44072. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  44073. __Pyx_GIVEREF(__pyx_t_1);
  44074. __pyx_cur_scope->__pyx_v_proto = __pyx_t_1;
  44075. __pyx_t_1 = 0;
  44076. /* "uvloop/loop.pyx":2690
  44077. * waiter = self._new_future()
  44078. * proto = proto_factory()
  44079. * transp = ReadUnixTransport.new(self, proto, None, waiter) # <<<<<<<<<<<<<<
  44080. * transp._add_extra_info('pipe', pipe)
  44081. * try:
  44082. */
  44083. __pyx_t_1 = ((PyObject *)__pyx_f_6uvloop_4loop_17ReadUnixTransport_new(__pyx_cur_scope->__pyx_v_self, __pyx_cur_scope->__pyx_v_proto, ((struct __pyx_obj_6uvloop_4loop_Server *)Py_None), __pyx_cur_scope->__pyx_v_waiter)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2690, __pyx_L1_error)
  44084. __Pyx_GOTREF(__pyx_t_1);
  44085. __Pyx_GIVEREF(__pyx_t_1);
  44086. __pyx_cur_scope->__pyx_v_transp = ((struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *)__pyx_t_1);
  44087. __pyx_t_1 = 0;
  44088. /* "uvloop/loop.pyx":2691
  44089. * proto = proto_factory()
  44090. * transp = ReadUnixTransport.new(self, proto, None, waiter)
  44091. * transp._add_extra_info('pipe', pipe) # <<<<<<<<<<<<<<
  44092. * try:
  44093. * transp._open(pipe.fileno())
  44094. */
  44095. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_ReadUnixTransport *)__pyx_cur_scope->__pyx_v_transp->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._add_extra_info(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_cur_scope->__pyx_v_transp), __pyx_n_u_pipe, __pyx_cur_scope->__pyx_v_pipe); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2691, __pyx_L1_error)
  44096. __Pyx_GOTREF(__pyx_t_1);
  44097. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  44098. /* "uvloop/loop.pyx":2692
  44099. * transp = ReadUnixTransport.new(self, proto, None, waiter)
  44100. * transp._add_extra_info('pipe', pipe)
  44101. * try: # <<<<<<<<<<<<<<
  44102. * transp._open(pipe.fileno())
  44103. * transp._init_protocol()
  44104. */
  44105. {
  44106. __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
  44107. __Pyx_XGOTREF(__pyx_t_4);
  44108. __Pyx_XGOTREF(__pyx_t_5);
  44109. __Pyx_XGOTREF(__pyx_t_6);
  44110. /*try:*/ {
  44111. /* "uvloop/loop.pyx":2693
  44112. * transp._add_extra_info('pipe', pipe)
  44113. * try:
  44114. * transp._open(pipe.fileno()) # <<<<<<<<<<<<<<
  44115. * transp._init_protocol()
  44116. * await waiter
  44117. */
  44118. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_pipe, __pyx_n_s_fileno); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 2693, __pyx_L4_error)
  44119. __Pyx_GOTREF(__pyx_t_2);
  44120. __pyx_t_3 = NULL;
  44121. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
  44122. __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
  44123. if (likely(__pyx_t_3)) {
  44124. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  44125. __Pyx_INCREF(__pyx_t_3);
  44126. __Pyx_INCREF(function);
  44127. __Pyx_DECREF_SET(__pyx_t_2, function);
  44128. }
  44129. }
  44130. __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  44131. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  44132. if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2693, __pyx_L4_error)
  44133. __Pyx_GOTREF(__pyx_t_1);
  44134. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  44135. __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 2693, __pyx_L4_error)
  44136. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  44137. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_ReadUnixTransport *)__pyx_cur_scope->__pyx_v_transp->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._open(((struct __pyx_obj_6uvloop_4loop_UVSocketHandle *)__pyx_cur_scope->__pyx_v_transp), __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2693, __pyx_L4_error)
  44138. __Pyx_GOTREF(__pyx_t_1);
  44139. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  44140. /* "uvloop/loop.pyx":2694
  44141. * try:
  44142. * transp._open(pipe.fileno())
  44143. * transp._init_protocol() # <<<<<<<<<<<<<<
  44144. * await waiter
  44145. * except Exception:
  44146. */
  44147. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_ReadUnixTransport *)__pyx_cur_scope->__pyx_v_transp->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._init_protocol(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_cur_scope->__pyx_v_transp)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2694, __pyx_L4_error)
  44148. __Pyx_GOTREF(__pyx_t_1);
  44149. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  44150. /* "uvloop/loop.pyx":2695
  44151. * transp._open(pipe.fileno())
  44152. * transp._init_protocol()
  44153. * await waiter # <<<<<<<<<<<<<<
  44154. * except Exception:
  44155. * transp._close()
  44156. */
  44157. __pyx_r = __Pyx_Coroutine_Yield_From(__pyx_generator, __pyx_cur_scope->__pyx_v_waiter);
  44158. __Pyx_XGOTREF(__pyx_r);
  44159. if (likely(__pyx_r)) {
  44160. __Pyx_XGIVEREF(__pyx_t_4);
  44161. __pyx_cur_scope->__pyx_t_0 = __pyx_t_4;
  44162. __Pyx_XGIVEREF(__pyx_t_5);
  44163. __pyx_cur_scope->__pyx_t_1 = __pyx_t_5;
  44164. __Pyx_XGIVEREF(__pyx_t_6);
  44165. __pyx_cur_scope->__pyx_t_2 = __pyx_t_6;
  44166. __Pyx_XGIVEREF(__pyx_r);
  44167. __Pyx_RefNannyFinishContext();
  44168. __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  44169. /* return from generator, awaiting value */
  44170. __pyx_generator->resume_label = 1;
  44171. return __pyx_r;
  44172. __pyx_L10_resume_from_await:;
  44173. __pyx_t_4 = __pyx_cur_scope->__pyx_t_0;
  44174. __pyx_cur_scope->__pyx_t_0 = 0;
  44175. __Pyx_XGOTREF(__pyx_t_4);
  44176. __pyx_t_5 = __pyx_cur_scope->__pyx_t_1;
  44177. __pyx_cur_scope->__pyx_t_1 = 0;
  44178. __Pyx_XGOTREF(__pyx_t_5);
  44179. __pyx_t_6 = __pyx_cur_scope->__pyx_t_2;
  44180. __pyx_cur_scope->__pyx_t_2 = 0;
  44181. __Pyx_XGOTREF(__pyx_t_6);
  44182. if (unlikely(!__pyx_sent_value)) __PYX_ERR(2, 2695, __pyx_L4_error)
  44183. } else {
  44184. PyObject* exc_type = __Pyx_PyErr_Occurred();
  44185. if (exc_type) {
  44186. if (likely(exc_type == PyExc_StopIteration || (exc_type != PyExc_GeneratorExit && __Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)))) PyErr_Clear();
  44187. else __PYX_ERR(2, 2695, __pyx_L4_error)
  44188. }
  44189. }
  44190. /* "uvloop/loop.pyx":2692
  44191. * transp = ReadUnixTransport.new(self, proto, None, waiter)
  44192. * transp._add_extra_info('pipe', pipe)
  44193. * try: # <<<<<<<<<<<<<<
  44194. * transp._open(pipe.fileno())
  44195. * transp._init_protocol()
  44196. */
  44197. }
  44198. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  44199. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  44200. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  44201. goto __pyx_L9_try_end;
  44202. __pyx_L4_error:;
  44203. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  44204. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  44205. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  44206. /* "uvloop/loop.pyx":2696
  44207. * transp._init_protocol()
  44208. * await waiter
  44209. * except Exception: # <<<<<<<<<<<<<<
  44210. * transp._close()
  44211. * raise
  44212. */
  44213. __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
  44214. if (__pyx_t_7) {
  44215. __Pyx_AddTraceback("uvloop.loop.Loop.connect_read_pipe", __pyx_clineno, __pyx_lineno, __pyx_filename);
  44216. if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3) < 0) __PYX_ERR(2, 2696, __pyx_L6_except_error)
  44217. __Pyx_GOTREF(__pyx_t_1);
  44218. __Pyx_GOTREF(__pyx_t_2);
  44219. __Pyx_GOTREF(__pyx_t_3);
  44220. /* "uvloop/loop.pyx":2697
  44221. * await waiter
  44222. * except Exception:
  44223. * transp._close() # <<<<<<<<<<<<<<
  44224. * raise
  44225. * transp._attach_fileobj(pipe)
  44226. */
  44227. __pyx_t_8 = ((struct __pyx_vtabstruct_6uvloop_4loop_ReadUnixTransport *)__pyx_cur_scope->__pyx_v_transp->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base.__pyx_base._close(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_cur_scope->__pyx_v_transp)); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 2697, __pyx_L6_except_error)
  44228. __Pyx_GOTREF(__pyx_t_8);
  44229. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  44230. /* "uvloop/loop.pyx":2698
  44231. * except Exception:
  44232. * transp._close()
  44233. * raise # <<<<<<<<<<<<<<
  44234. * transp._attach_fileobj(pipe)
  44235. * return transp, proto
  44236. */
  44237. __Pyx_GIVEREF(__pyx_t_1);
  44238. __Pyx_GIVEREF(__pyx_t_2);
  44239. __Pyx_XGIVEREF(__pyx_t_3);
  44240. __Pyx_ErrRestoreWithState(__pyx_t_1, __pyx_t_2, __pyx_t_3);
  44241. __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_3 = 0;
  44242. __PYX_ERR(2, 2698, __pyx_L6_except_error)
  44243. }
  44244. goto __pyx_L6_except_error;
  44245. __pyx_L6_except_error:;
  44246. /* "uvloop/loop.pyx":2692
  44247. * transp = ReadUnixTransport.new(self, proto, None, waiter)
  44248. * transp._add_extra_info('pipe', pipe)
  44249. * try: # <<<<<<<<<<<<<<
  44250. * transp._open(pipe.fileno())
  44251. * transp._init_protocol()
  44252. */
  44253. __Pyx_XGIVEREF(__pyx_t_4);
  44254. __Pyx_XGIVEREF(__pyx_t_5);
  44255. __Pyx_XGIVEREF(__pyx_t_6);
  44256. __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
  44257. goto __pyx_L1_error;
  44258. __pyx_L9_try_end:;
  44259. }
  44260. /* "uvloop/loop.pyx":2699
  44261. * transp._close()
  44262. * raise
  44263. * transp._attach_fileobj(pipe) # <<<<<<<<<<<<<<
  44264. * return transp, proto
  44265. *
  44266. */
  44267. __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_ReadUnixTransport *)__pyx_cur_scope->__pyx_v_transp->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._attach_fileobj(((struct __pyx_obj_6uvloop_4loop_UVSocketHandle *)__pyx_cur_scope->__pyx_v_transp), __pyx_cur_scope->__pyx_v_pipe); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2699, __pyx_L1_error)
  44268. __Pyx_GOTREF(__pyx_t_3);
  44269. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  44270. /* "uvloop/loop.pyx":2700
  44271. * raise
  44272. * transp._attach_fileobj(pipe)
  44273. * return transp, proto # <<<<<<<<<<<<<<
  44274. *
  44275. * @cython.iterable_coroutine
  44276. */
  44277. __Pyx_XDECREF(__pyx_r);
  44278. __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2700, __pyx_L1_error)
  44279. __Pyx_GOTREF(__pyx_t_3);
  44280. __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_transp));
  44281. __Pyx_GIVEREF(((PyObject *)__pyx_cur_scope->__pyx_v_transp));
  44282. PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_cur_scope->__pyx_v_transp));
  44283. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_proto);
  44284. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_proto);
  44285. PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_cur_scope->__pyx_v_proto);
  44286. __pyx_r = NULL; __Pyx_ReturnWithStopIteration(__pyx_t_3);
  44287. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  44288. __pyx_t_3 = 0;
  44289. goto __pyx_L0;
  44290. CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
  44291. /* "uvloop/loop.pyx":2678
  44292. *
  44293. * @cython.iterable_coroutine
  44294. * async def connect_read_pipe(self, proto_factory, pipe): # <<<<<<<<<<<<<<
  44295. * """Register read pipe in event loop. Set the pipe to non-blocking mode.
  44296. *
  44297. */
  44298. /* function exit code */
  44299. __pyx_L1_error:;
  44300. __Pyx_XDECREF(__pyx_t_1);
  44301. __Pyx_XDECREF(__pyx_t_2);
  44302. __Pyx_XDECREF(__pyx_t_3);
  44303. __Pyx_XDECREF(__pyx_t_8);
  44304. __Pyx_AddTraceback("connect_read_pipe", __pyx_clineno, __pyx_lineno, __pyx_filename);
  44305. __pyx_L0:;
  44306. __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  44307. #if !CYTHON_USE_EXC_INFO_STACK
  44308. __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  44309. #endif
  44310. __pyx_generator->resume_label = -1;
  44311. __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  44312. __Pyx_RefNannyFinishContext();
  44313. return __pyx_r;
  44314. }
  44315. static PyObject *__pyx_gb_6uvloop_4loop_4Loop_119generator17(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
  44316. /* "uvloop/loop.pyx":2703
  44317. *
  44318. * @cython.iterable_coroutine
  44319. * async def connect_write_pipe(self, proto_factory, pipe): # <<<<<<<<<<<<<<
  44320. * """Register write pipe in event loop.
  44321. *
  44322. */
  44323. /* Python wrapper */
  44324. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_118connect_write_pipe(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  44325. static char __pyx_doc_6uvloop_4loop_4Loop_117connect_write_pipe[] = "Loop.connect_write_pipe(self, proto_factory, pipe)\nRegister write pipe in event loop.\n\n protocol_factory should instantiate object with BaseProtocol interface.\n Pipe is file-like object already switched to nonblocking.\n Return pair (transport, protocol), where transport support\n WriteTransport interface.";
  44326. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_118connect_write_pipe(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  44327. PyObject *__pyx_v_proto_factory = 0;
  44328. PyObject *__pyx_v_pipe = 0;
  44329. PyObject *__pyx_r = 0;
  44330. __Pyx_RefNannyDeclarations
  44331. __Pyx_RefNannySetupContext("connect_write_pipe (wrapper)", 0);
  44332. {
  44333. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_proto_factory,&__pyx_n_s_pipe,0};
  44334. PyObject* values[2] = {0,0};
  44335. if (unlikely(__pyx_kwds)) {
  44336. Py_ssize_t kw_args;
  44337. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  44338. switch (pos_args) {
  44339. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  44340. CYTHON_FALLTHROUGH;
  44341. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  44342. CYTHON_FALLTHROUGH;
  44343. case 0: break;
  44344. default: goto __pyx_L5_argtuple_error;
  44345. }
  44346. kw_args = PyDict_Size(__pyx_kwds);
  44347. switch (pos_args) {
  44348. case 0:
  44349. if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_proto_factory)) != 0)) kw_args--;
  44350. else goto __pyx_L5_argtuple_error;
  44351. CYTHON_FALLTHROUGH;
  44352. case 1:
  44353. if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pipe)) != 0)) kw_args--;
  44354. else {
  44355. __Pyx_RaiseArgtupleInvalid("connect_write_pipe", 1, 2, 2, 1); __PYX_ERR(2, 2703, __pyx_L3_error)
  44356. }
  44357. }
  44358. if (unlikely(kw_args > 0)) {
  44359. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "connect_write_pipe") < 0)) __PYX_ERR(2, 2703, __pyx_L3_error)
  44360. }
  44361. } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
  44362. goto __pyx_L5_argtuple_error;
  44363. } else {
  44364. values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  44365. values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  44366. }
  44367. __pyx_v_proto_factory = values[0];
  44368. __pyx_v_pipe = values[1];
  44369. }
  44370. goto __pyx_L4_argument_unpacking_done;
  44371. __pyx_L5_argtuple_error:;
  44372. __Pyx_RaiseArgtupleInvalid("connect_write_pipe", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 2703, __pyx_L3_error)
  44373. __pyx_L3_error:;
  44374. __Pyx_AddTraceback("uvloop.loop.Loop.connect_write_pipe", __pyx_clineno, __pyx_lineno, __pyx_filename);
  44375. __Pyx_RefNannyFinishContext();
  44376. return NULL;
  44377. __pyx_L4_argument_unpacking_done:;
  44378. __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_117connect_write_pipe(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self), __pyx_v_proto_factory, __pyx_v_pipe);
  44379. /* function exit code */
  44380. __Pyx_RefNannyFinishContext();
  44381. return __pyx_r;
  44382. }
  44383. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_117connect_write_pipe(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_proto_factory, PyObject *__pyx_v_pipe) {
  44384. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_24_connect_write_pipe *__pyx_cur_scope;
  44385. PyObject *__pyx_r = NULL;
  44386. __Pyx_RefNannyDeclarations
  44387. __Pyx_RefNannySetupContext("connect_write_pipe", 0);
  44388. __pyx_cur_scope = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_24_connect_write_pipe *)__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_24_connect_write_pipe(__pyx_ptype_6uvloop_4loop___pyx_scope_struct_24_connect_write_pipe, __pyx_empty_tuple, NULL);
  44389. if (unlikely(!__pyx_cur_scope)) {
  44390. __pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_24_connect_write_pipe *)Py_None);
  44391. __Pyx_INCREF(Py_None);
  44392. __PYX_ERR(2, 2703, __pyx_L1_error)
  44393. } else {
  44394. __Pyx_GOTREF(__pyx_cur_scope);
  44395. }
  44396. __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  44397. __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  44398. __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  44399. __pyx_cur_scope->__pyx_v_proto_factory = __pyx_v_proto_factory;
  44400. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_proto_factory);
  44401. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_proto_factory);
  44402. __pyx_cur_scope->__pyx_v_pipe = __pyx_v_pipe;
  44403. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_pipe);
  44404. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_pipe);
  44405. {
  44406. __pyx_CoroutineObject *gen = __Pyx_IterableCoroutine_New((__pyx_coroutine_body_t) __pyx_gb_6uvloop_4loop_4Loop_119generator17, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_connect_write_pipe, __pyx_n_s_Loop_connect_write_pipe, __pyx_n_s_uvloop_loop); if (unlikely(!gen)) __PYX_ERR(2, 2703, __pyx_L1_error)
  44407. __Pyx_DECREF(__pyx_cur_scope);
  44408. __Pyx_RefNannyFinishContext();
  44409. return (PyObject *) gen;
  44410. }
  44411. /* function exit code */
  44412. __pyx_L1_error:;
  44413. __Pyx_AddTraceback("uvloop.loop.Loop.connect_write_pipe", __pyx_clineno, __pyx_lineno, __pyx_filename);
  44414. __pyx_r = NULL;
  44415. __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  44416. __Pyx_XGIVEREF(__pyx_r);
  44417. __Pyx_RefNannyFinishContext();
  44418. return __pyx_r;
  44419. }
  44420. static PyObject *__pyx_gb_6uvloop_4loop_4Loop_119generator17(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
  44421. {
  44422. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_24_connect_write_pipe *__pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_24_connect_write_pipe *)__pyx_generator->closure);
  44423. PyObject *__pyx_r = NULL;
  44424. PyObject *__pyx_t_1 = NULL;
  44425. PyObject *__pyx_t_2 = NULL;
  44426. PyObject *__pyx_t_3 = NULL;
  44427. PyObject *__pyx_t_4 = NULL;
  44428. PyObject *__pyx_t_5 = NULL;
  44429. PyObject *__pyx_t_6 = NULL;
  44430. int __pyx_t_7;
  44431. PyObject *__pyx_t_8 = NULL;
  44432. __Pyx_RefNannyDeclarations
  44433. __Pyx_RefNannySetupContext("connect_write_pipe", 0);
  44434. switch (__pyx_generator->resume_label) {
  44435. case 0: goto __pyx_L3_first_run;
  44436. case 1: goto __pyx_L10_resume_from_await;
  44437. default: /* CPython raises the right error here */
  44438. __Pyx_RefNannyFinishContext();
  44439. return NULL;
  44440. }
  44441. __pyx_L3_first_run:;
  44442. if (unlikely(!__pyx_sent_value)) __PYX_ERR(2, 2703, __pyx_L1_error)
  44443. /* "uvloop/loop.pyx":2713
  44444. * WriteUnixTransport transp
  44445. *
  44446. * waiter = self._new_future() # <<<<<<<<<<<<<<
  44447. * proto = proto_factory()
  44448. * transp = WriteUnixTransport.new(self, proto, None, waiter)
  44449. */
  44450. __pyx_t_1 = __pyx_f_6uvloop_4loop_4Loop__new_future(__pyx_cur_scope->__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2713, __pyx_L1_error)
  44451. __Pyx_GOTREF(__pyx_t_1);
  44452. __Pyx_GIVEREF(__pyx_t_1);
  44453. __pyx_cur_scope->__pyx_v_waiter = __pyx_t_1;
  44454. __pyx_t_1 = 0;
  44455. /* "uvloop/loop.pyx":2714
  44456. *
  44457. * waiter = self._new_future()
  44458. * proto = proto_factory() # <<<<<<<<<<<<<<
  44459. * transp = WriteUnixTransport.new(self, proto, None, waiter)
  44460. * transp._add_extra_info('pipe', pipe)
  44461. */
  44462. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_proto_factory);
  44463. __pyx_t_2 = __pyx_cur_scope->__pyx_v_proto_factory; __pyx_t_3 = NULL;
  44464. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
  44465. __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
  44466. if (likely(__pyx_t_3)) {
  44467. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  44468. __Pyx_INCREF(__pyx_t_3);
  44469. __Pyx_INCREF(function);
  44470. __Pyx_DECREF_SET(__pyx_t_2, function);
  44471. }
  44472. }
  44473. __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  44474. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  44475. if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2714, __pyx_L1_error)
  44476. __Pyx_GOTREF(__pyx_t_1);
  44477. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  44478. __Pyx_GIVEREF(__pyx_t_1);
  44479. __pyx_cur_scope->__pyx_v_proto = __pyx_t_1;
  44480. __pyx_t_1 = 0;
  44481. /* "uvloop/loop.pyx":2715
  44482. * waiter = self._new_future()
  44483. * proto = proto_factory()
  44484. * transp = WriteUnixTransport.new(self, proto, None, waiter) # <<<<<<<<<<<<<<
  44485. * transp._add_extra_info('pipe', pipe)
  44486. * try:
  44487. */
  44488. __pyx_t_1 = ((PyObject *)__pyx_f_6uvloop_4loop_18WriteUnixTransport_new(__pyx_cur_scope->__pyx_v_self, __pyx_cur_scope->__pyx_v_proto, ((struct __pyx_obj_6uvloop_4loop_Server *)Py_None), __pyx_cur_scope->__pyx_v_waiter)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2715, __pyx_L1_error)
  44489. __Pyx_GOTREF(__pyx_t_1);
  44490. __Pyx_GIVEREF(__pyx_t_1);
  44491. __pyx_cur_scope->__pyx_v_transp = ((struct __pyx_obj_6uvloop_4loop_WriteUnixTransport *)__pyx_t_1);
  44492. __pyx_t_1 = 0;
  44493. /* "uvloop/loop.pyx":2716
  44494. * proto = proto_factory()
  44495. * transp = WriteUnixTransport.new(self, proto, None, waiter)
  44496. * transp._add_extra_info('pipe', pipe) # <<<<<<<<<<<<<<
  44497. * try:
  44498. * transp._open(pipe.fileno())
  44499. */
  44500. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_WriteUnixTransport *)__pyx_cur_scope->__pyx_v_transp->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._add_extra_info(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_cur_scope->__pyx_v_transp), __pyx_n_u_pipe, __pyx_cur_scope->__pyx_v_pipe); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2716, __pyx_L1_error)
  44501. __Pyx_GOTREF(__pyx_t_1);
  44502. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  44503. /* "uvloop/loop.pyx":2717
  44504. * transp = WriteUnixTransport.new(self, proto, None, waiter)
  44505. * transp._add_extra_info('pipe', pipe)
  44506. * try: # <<<<<<<<<<<<<<
  44507. * transp._open(pipe.fileno())
  44508. * transp._init_protocol()
  44509. */
  44510. {
  44511. __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
  44512. __Pyx_XGOTREF(__pyx_t_4);
  44513. __Pyx_XGOTREF(__pyx_t_5);
  44514. __Pyx_XGOTREF(__pyx_t_6);
  44515. /*try:*/ {
  44516. /* "uvloop/loop.pyx":2718
  44517. * transp._add_extra_info('pipe', pipe)
  44518. * try:
  44519. * transp._open(pipe.fileno()) # <<<<<<<<<<<<<<
  44520. * transp._init_protocol()
  44521. * await waiter
  44522. */
  44523. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_pipe, __pyx_n_s_fileno); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 2718, __pyx_L4_error)
  44524. __Pyx_GOTREF(__pyx_t_2);
  44525. __pyx_t_3 = NULL;
  44526. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
  44527. __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
  44528. if (likely(__pyx_t_3)) {
  44529. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  44530. __Pyx_INCREF(__pyx_t_3);
  44531. __Pyx_INCREF(function);
  44532. __Pyx_DECREF_SET(__pyx_t_2, function);
  44533. }
  44534. }
  44535. __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  44536. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  44537. if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2718, __pyx_L4_error)
  44538. __Pyx_GOTREF(__pyx_t_1);
  44539. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  44540. __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 2718, __pyx_L4_error)
  44541. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  44542. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_WriteUnixTransport *)__pyx_cur_scope->__pyx_v_transp->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._open(((struct __pyx_obj_6uvloop_4loop_UVSocketHandle *)__pyx_cur_scope->__pyx_v_transp), __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2718, __pyx_L4_error)
  44543. __Pyx_GOTREF(__pyx_t_1);
  44544. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  44545. /* "uvloop/loop.pyx":2719
  44546. * try:
  44547. * transp._open(pipe.fileno())
  44548. * transp._init_protocol() # <<<<<<<<<<<<<<
  44549. * await waiter
  44550. * except Exception:
  44551. */
  44552. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_WriteUnixTransport *)__pyx_cur_scope->__pyx_v_transp->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._init_protocol(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_cur_scope->__pyx_v_transp)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2719, __pyx_L4_error)
  44553. __Pyx_GOTREF(__pyx_t_1);
  44554. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  44555. /* "uvloop/loop.pyx":2720
  44556. * transp._open(pipe.fileno())
  44557. * transp._init_protocol()
  44558. * await waiter # <<<<<<<<<<<<<<
  44559. * except Exception:
  44560. * transp._close()
  44561. */
  44562. __pyx_r = __Pyx_Coroutine_Yield_From(__pyx_generator, __pyx_cur_scope->__pyx_v_waiter);
  44563. __Pyx_XGOTREF(__pyx_r);
  44564. if (likely(__pyx_r)) {
  44565. __Pyx_XGIVEREF(__pyx_t_4);
  44566. __pyx_cur_scope->__pyx_t_0 = __pyx_t_4;
  44567. __Pyx_XGIVEREF(__pyx_t_5);
  44568. __pyx_cur_scope->__pyx_t_1 = __pyx_t_5;
  44569. __Pyx_XGIVEREF(__pyx_t_6);
  44570. __pyx_cur_scope->__pyx_t_2 = __pyx_t_6;
  44571. __Pyx_XGIVEREF(__pyx_r);
  44572. __Pyx_RefNannyFinishContext();
  44573. __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  44574. /* return from generator, awaiting value */
  44575. __pyx_generator->resume_label = 1;
  44576. return __pyx_r;
  44577. __pyx_L10_resume_from_await:;
  44578. __pyx_t_4 = __pyx_cur_scope->__pyx_t_0;
  44579. __pyx_cur_scope->__pyx_t_0 = 0;
  44580. __Pyx_XGOTREF(__pyx_t_4);
  44581. __pyx_t_5 = __pyx_cur_scope->__pyx_t_1;
  44582. __pyx_cur_scope->__pyx_t_1 = 0;
  44583. __Pyx_XGOTREF(__pyx_t_5);
  44584. __pyx_t_6 = __pyx_cur_scope->__pyx_t_2;
  44585. __pyx_cur_scope->__pyx_t_2 = 0;
  44586. __Pyx_XGOTREF(__pyx_t_6);
  44587. if (unlikely(!__pyx_sent_value)) __PYX_ERR(2, 2720, __pyx_L4_error)
  44588. } else {
  44589. PyObject* exc_type = __Pyx_PyErr_Occurred();
  44590. if (exc_type) {
  44591. if (likely(exc_type == PyExc_StopIteration || (exc_type != PyExc_GeneratorExit && __Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)))) PyErr_Clear();
  44592. else __PYX_ERR(2, 2720, __pyx_L4_error)
  44593. }
  44594. }
  44595. /* "uvloop/loop.pyx":2717
  44596. * transp = WriteUnixTransport.new(self, proto, None, waiter)
  44597. * transp._add_extra_info('pipe', pipe)
  44598. * try: # <<<<<<<<<<<<<<
  44599. * transp._open(pipe.fileno())
  44600. * transp._init_protocol()
  44601. */
  44602. }
  44603. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  44604. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  44605. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  44606. goto __pyx_L9_try_end;
  44607. __pyx_L4_error:;
  44608. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  44609. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  44610. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  44611. /* "uvloop/loop.pyx":2721
  44612. * transp._init_protocol()
  44613. * await waiter
  44614. * except Exception: # <<<<<<<<<<<<<<
  44615. * transp._close()
  44616. * raise
  44617. */
  44618. __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
  44619. if (__pyx_t_7) {
  44620. __Pyx_AddTraceback("uvloop.loop.Loop.connect_write_pipe", __pyx_clineno, __pyx_lineno, __pyx_filename);
  44621. if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3) < 0) __PYX_ERR(2, 2721, __pyx_L6_except_error)
  44622. __Pyx_GOTREF(__pyx_t_1);
  44623. __Pyx_GOTREF(__pyx_t_2);
  44624. __Pyx_GOTREF(__pyx_t_3);
  44625. /* "uvloop/loop.pyx":2722
  44626. * await waiter
  44627. * except Exception:
  44628. * transp._close() # <<<<<<<<<<<<<<
  44629. * raise
  44630. * transp._attach_fileobj(pipe)
  44631. */
  44632. __pyx_t_8 = ((struct __pyx_vtabstruct_6uvloop_4loop_WriteUnixTransport *)__pyx_cur_scope->__pyx_v_transp->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base.__pyx_base._close(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_cur_scope->__pyx_v_transp)); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 2722, __pyx_L6_except_error)
  44633. __Pyx_GOTREF(__pyx_t_8);
  44634. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  44635. /* "uvloop/loop.pyx":2723
  44636. * except Exception:
  44637. * transp._close()
  44638. * raise # <<<<<<<<<<<<<<
  44639. * transp._attach_fileobj(pipe)
  44640. * return transp, proto
  44641. */
  44642. __Pyx_GIVEREF(__pyx_t_1);
  44643. __Pyx_GIVEREF(__pyx_t_2);
  44644. __Pyx_XGIVEREF(__pyx_t_3);
  44645. __Pyx_ErrRestoreWithState(__pyx_t_1, __pyx_t_2, __pyx_t_3);
  44646. __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_3 = 0;
  44647. __PYX_ERR(2, 2723, __pyx_L6_except_error)
  44648. }
  44649. goto __pyx_L6_except_error;
  44650. __pyx_L6_except_error:;
  44651. /* "uvloop/loop.pyx":2717
  44652. * transp = WriteUnixTransport.new(self, proto, None, waiter)
  44653. * transp._add_extra_info('pipe', pipe)
  44654. * try: # <<<<<<<<<<<<<<
  44655. * transp._open(pipe.fileno())
  44656. * transp._init_protocol()
  44657. */
  44658. __Pyx_XGIVEREF(__pyx_t_4);
  44659. __Pyx_XGIVEREF(__pyx_t_5);
  44660. __Pyx_XGIVEREF(__pyx_t_6);
  44661. __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
  44662. goto __pyx_L1_error;
  44663. __pyx_L9_try_end:;
  44664. }
  44665. /* "uvloop/loop.pyx":2724
  44666. * transp._close()
  44667. * raise
  44668. * transp._attach_fileobj(pipe) # <<<<<<<<<<<<<<
  44669. * return transp, proto
  44670. *
  44671. */
  44672. __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_WriteUnixTransport *)__pyx_cur_scope->__pyx_v_transp->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._attach_fileobj(((struct __pyx_obj_6uvloop_4loop_UVSocketHandle *)__pyx_cur_scope->__pyx_v_transp), __pyx_cur_scope->__pyx_v_pipe); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2724, __pyx_L1_error)
  44673. __Pyx_GOTREF(__pyx_t_3);
  44674. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  44675. /* "uvloop/loop.pyx":2725
  44676. * raise
  44677. * transp._attach_fileobj(pipe)
  44678. * return transp, proto # <<<<<<<<<<<<<<
  44679. *
  44680. * def add_signal_handler(self, sig, callback, *args):
  44681. */
  44682. __Pyx_XDECREF(__pyx_r);
  44683. __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2725, __pyx_L1_error)
  44684. __Pyx_GOTREF(__pyx_t_3);
  44685. __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_transp));
  44686. __Pyx_GIVEREF(((PyObject *)__pyx_cur_scope->__pyx_v_transp));
  44687. PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_cur_scope->__pyx_v_transp));
  44688. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_proto);
  44689. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_proto);
  44690. PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_cur_scope->__pyx_v_proto);
  44691. __pyx_r = NULL; __Pyx_ReturnWithStopIteration(__pyx_t_3);
  44692. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  44693. __pyx_t_3 = 0;
  44694. goto __pyx_L0;
  44695. CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
  44696. /* "uvloop/loop.pyx":2703
  44697. *
  44698. * @cython.iterable_coroutine
  44699. * async def connect_write_pipe(self, proto_factory, pipe): # <<<<<<<<<<<<<<
  44700. * """Register write pipe in event loop.
  44701. *
  44702. */
  44703. /* function exit code */
  44704. __pyx_L1_error:;
  44705. __Pyx_XDECREF(__pyx_t_1);
  44706. __Pyx_XDECREF(__pyx_t_2);
  44707. __Pyx_XDECREF(__pyx_t_3);
  44708. __Pyx_XDECREF(__pyx_t_8);
  44709. __Pyx_AddTraceback("connect_write_pipe", __pyx_clineno, __pyx_lineno, __pyx_filename);
  44710. __pyx_L0:;
  44711. __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  44712. #if !CYTHON_USE_EXC_INFO_STACK
  44713. __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  44714. #endif
  44715. __pyx_generator->resume_label = -1;
  44716. __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  44717. __Pyx_RefNannyFinishContext();
  44718. return __pyx_r;
  44719. }
  44720. /* "uvloop/loop.pyx":2727
  44721. * return transp, proto
  44722. *
  44723. * def add_signal_handler(self, sig, callback, *args): # <<<<<<<<<<<<<<
  44724. * """Add a handler for a signal. UNIX only.
  44725. *
  44726. */
  44727. /* Python wrapper */
  44728. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_121add_signal_handler(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  44729. static char __pyx_doc_6uvloop_4loop_4Loop_120add_signal_handler[] = "Loop.add_signal_handler(self, sig, callback, *args)\nAdd a handler for a signal. UNIX only.\n\n Raise ValueError if the signal number is invalid or uncatchable.\n Raise RuntimeError if there is a problem setting up the handler.\n ";
  44730. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_121add_signal_handler(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  44731. PyObject *__pyx_v_sig = 0;
  44732. PyObject *__pyx_v_callback = 0;
  44733. PyObject *__pyx_v_args = 0;
  44734. PyObject *__pyx_r = 0;
  44735. __Pyx_RefNannyDeclarations
  44736. __Pyx_RefNannySetupContext("add_signal_handler (wrapper)", 0);
  44737. if (PyTuple_GET_SIZE(__pyx_args) > 2) {
  44738. __pyx_v_args = PyTuple_GetSlice(__pyx_args, 2, PyTuple_GET_SIZE(__pyx_args));
  44739. if (unlikely(!__pyx_v_args)) {
  44740. __Pyx_RefNannyFinishContext();
  44741. return NULL;
  44742. }
  44743. __Pyx_GOTREF(__pyx_v_args);
  44744. } else {
  44745. __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  44746. }
  44747. {
  44748. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sig,&__pyx_n_s_callback,0};
  44749. PyObject* values[2] = {0,0};
  44750. if (unlikely(__pyx_kwds)) {
  44751. Py_ssize_t kw_args;
  44752. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  44753. switch (pos_args) {
  44754. default:
  44755. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  44756. CYTHON_FALLTHROUGH;
  44757. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  44758. CYTHON_FALLTHROUGH;
  44759. case 0: break;
  44760. }
  44761. kw_args = PyDict_Size(__pyx_kwds);
  44762. switch (pos_args) {
  44763. case 0:
  44764. if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sig)) != 0)) kw_args--;
  44765. else goto __pyx_L5_argtuple_error;
  44766. CYTHON_FALLTHROUGH;
  44767. case 1:
  44768. if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_callback)) != 0)) kw_args--;
  44769. else {
  44770. __Pyx_RaiseArgtupleInvalid("add_signal_handler", 0, 2, 2, 1); __PYX_ERR(2, 2727, __pyx_L3_error)
  44771. }
  44772. }
  44773. if (unlikely(kw_args > 0)) {
  44774. const Py_ssize_t used_pos_args = (pos_args < 2) ? pos_args : 2;
  44775. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "add_signal_handler") < 0)) __PYX_ERR(2, 2727, __pyx_L3_error)
  44776. }
  44777. } else if (PyTuple_GET_SIZE(__pyx_args) < 2) {
  44778. goto __pyx_L5_argtuple_error;
  44779. } else {
  44780. values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  44781. values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  44782. }
  44783. __pyx_v_sig = values[0];
  44784. __pyx_v_callback = values[1];
  44785. }
  44786. goto __pyx_L4_argument_unpacking_done;
  44787. __pyx_L5_argtuple_error:;
  44788. __Pyx_RaiseArgtupleInvalid("add_signal_handler", 0, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 2727, __pyx_L3_error)
  44789. __pyx_L3_error:;
  44790. __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  44791. __Pyx_AddTraceback("uvloop.loop.Loop.add_signal_handler", __pyx_clineno, __pyx_lineno, __pyx_filename);
  44792. __Pyx_RefNannyFinishContext();
  44793. return NULL;
  44794. __pyx_L4_argument_unpacking_done:;
  44795. __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_120add_signal_handler(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self), __pyx_v_sig, __pyx_v_callback, __pyx_v_args);
  44796. /* function exit code */
  44797. __Pyx_XDECREF(__pyx_v_args);
  44798. __Pyx_RefNannyFinishContext();
  44799. return __pyx_r;
  44800. }
  44801. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_120add_signal_handler(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_sig, PyObject *__pyx_v_callback, PyObject *__pyx_v_args) {
  44802. struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_h = 0;
  44803. PyObject *__pyx_v_exc = NULL;
  44804. PyObject *__pyx_v_nexc = NULL;
  44805. PyObject *__pyx_r = NULL;
  44806. __Pyx_RefNannyDeclarations
  44807. int __pyx_t_1;
  44808. PyObject *__pyx_t_2 = NULL;
  44809. PyObject *__pyx_t_3 = NULL;
  44810. PyObject *__pyx_t_4 = NULL;
  44811. int __pyx_t_5;
  44812. int __pyx_t_6;
  44813. PyObject *__pyx_t_7 = NULL;
  44814. PyObject *__pyx_t_8 = NULL;
  44815. PyObject *__pyx_t_9 = NULL;
  44816. int __pyx_t_10;
  44817. PyObject *__pyx_t_11 = NULL;
  44818. PyObject *__pyx_t_12 = NULL;
  44819. int __pyx_t_13;
  44820. char const *__pyx_t_14;
  44821. PyObject *__pyx_t_15 = NULL;
  44822. PyObject *__pyx_t_16 = NULL;
  44823. PyObject *__pyx_t_17 = NULL;
  44824. PyObject *__pyx_t_18 = NULL;
  44825. PyObject *__pyx_t_19 = NULL;
  44826. PyObject *__pyx_t_20 = NULL;
  44827. PyObject *__pyx_t_21 = NULL;
  44828. PyObject *__pyx_t_22 = NULL;
  44829. PyObject *__pyx_t_23 = NULL;
  44830. PyObject *__pyx_t_24 = NULL;
  44831. PyObject *__pyx_t_25 = NULL;
  44832. char const *__pyx_t_26;
  44833. PyObject *__pyx_t_27 = NULL;
  44834. PyObject *__pyx_t_28 = NULL;
  44835. PyObject *__pyx_t_29 = NULL;
  44836. char const *__pyx_t_30;
  44837. __Pyx_RefNannySetupContext("add_signal_handler", 0);
  44838. /* "uvloop/loop.pyx":2736
  44839. * Handle h
  44840. *
  44841. * if not self._listening_signals: # <<<<<<<<<<<<<<
  44842. * self._setup_signals()
  44843. * if not self._listening_signals:
  44844. */
  44845. __pyx_t_1 = ((!(__pyx_v_self->_listening_signals != 0)) != 0);
  44846. if (__pyx_t_1) {
  44847. /* "uvloop/loop.pyx":2737
  44848. *
  44849. * if not self._listening_signals:
  44850. * self._setup_signals() # <<<<<<<<<<<<<<
  44851. * if not self._listening_signals:
  44852. * raise ValueError('set_wakeup_fd only works in main thread')
  44853. */
  44854. __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_vtab)->_setup_signals(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 2737, __pyx_L1_error)
  44855. __Pyx_GOTREF(__pyx_t_2);
  44856. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  44857. /* "uvloop/loop.pyx":2738
  44858. * if not self._listening_signals:
  44859. * self._setup_signals()
  44860. * if not self._listening_signals: # <<<<<<<<<<<<<<
  44861. * raise ValueError('set_wakeup_fd only works in main thread')
  44862. *
  44863. */
  44864. __pyx_t_1 = ((!(__pyx_v_self->_listening_signals != 0)) != 0);
  44865. if (unlikely(__pyx_t_1)) {
  44866. /* "uvloop/loop.pyx":2739
  44867. * self._setup_signals()
  44868. * if not self._listening_signals:
  44869. * raise ValueError('set_wakeup_fd only works in main thread') # <<<<<<<<<<<<<<
  44870. *
  44871. * if (aio_iscoroutine(callback)
  44872. */
  44873. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__75, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 2739, __pyx_L1_error)
  44874. __Pyx_GOTREF(__pyx_t_2);
  44875. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  44876. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  44877. __PYX_ERR(2, 2739, __pyx_L1_error)
  44878. /* "uvloop/loop.pyx":2738
  44879. * if not self._listening_signals:
  44880. * self._setup_signals()
  44881. * if not self._listening_signals: # <<<<<<<<<<<<<<
  44882. * raise ValueError('set_wakeup_fd only works in main thread')
  44883. *
  44884. */
  44885. }
  44886. /* "uvloop/loop.pyx":2736
  44887. * Handle h
  44888. *
  44889. * if not self._listening_signals: # <<<<<<<<<<<<<<
  44890. * self._setup_signals()
  44891. * if not self._listening_signals:
  44892. */
  44893. }
  44894. /* "uvloop/loop.pyx":2741
  44895. * raise ValueError('set_wakeup_fd only works in main thread')
  44896. *
  44897. * if (aio_iscoroutine(callback) # <<<<<<<<<<<<<<
  44898. * or aio_iscoroutinefunction(callback)):
  44899. * raise TypeError(
  44900. */
  44901. __Pyx_INCREF(__pyx_v_6uvloop_4loop_aio_iscoroutine);
  44902. __pyx_t_3 = __pyx_v_6uvloop_4loop_aio_iscoroutine; __pyx_t_4 = NULL;
  44903. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
  44904. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
  44905. if (likely(__pyx_t_4)) {
  44906. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  44907. __Pyx_INCREF(__pyx_t_4);
  44908. __Pyx_INCREF(function);
  44909. __Pyx_DECREF_SET(__pyx_t_3, function);
  44910. }
  44911. }
  44912. __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_callback) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_callback);
  44913. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  44914. if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 2741, __pyx_L1_error)
  44915. __Pyx_GOTREF(__pyx_t_2);
  44916. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  44917. __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(2, 2741, __pyx_L1_error)
  44918. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  44919. if (!__pyx_t_5) {
  44920. } else {
  44921. __pyx_t_1 = __pyx_t_5;
  44922. goto __pyx_L6_bool_binop_done;
  44923. }
  44924. /* "uvloop/loop.pyx":2742
  44925. *
  44926. * if (aio_iscoroutine(callback)
  44927. * or aio_iscoroutinefunction(callback)): # <<<<<<<<<<<<<<
  44928. * raise TypeError(
  44929. * "coroutines cannot be used with add_signal_handler()")
  44930. */
  44931. __Pyx_INCREF(__pyx_v_6uvloop_4loop_aio_iscoroutinefunction);
  44932. __pyx_t_3 = __pyx_v_6uvloop_4loop_aio_iscoroutinefunction; __pyx_t_4 = NULL;
  44933. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
  44934. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
  44935. if (likely(__pyx_t_4)) {
  44936. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  44937. __Pyx_INCREF(__pyx_t_4);
  44938. __Pyx_INCREF(function);
  44939. __Pyx_DECREF_SET(__pyx_t_3, function);
  44940. }
  44941. }
  44942. __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_callback) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_callback);
  44943. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  44944. if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 2742, __pyx_L1_error)
  44945. __Pyx_GOTREF(__pyx_t_2);
  44946. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  44947. __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(2, 2742, __pyx_L1_error)
  44948. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  44949. __pyx_t_1 = __pyx_t_5;
  44950. __pyx_L6_bool_binop_done:;
  44951. /* "uvloop/loop.pyx":2741
  44952. * raise ValueError('set_wakeup_fd only works in main thread')
  44953. *
  44954. * if (aio_iscoroutine(callback) # <<<<<<<<<<<<<<
  44955. * or aio_iscoroutinefunction(callback)):
  44956. * raise TypeError(
  44957. */
  44958. if (unlikely(__pyx_t_1)) {
  44959. /* "uvloop/loop.pyx":2743
  44960. * if (aio_iscoroutine(callback)
  44961. * or aio_iscoroutinefunction(callback)):
  44962. * raise TypeError( # <<<<<<<<<<<<<<
  44963. * "coroutines cannot be used with add_signal_handler()")
  44964. *
  44965. */
  44966. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__76, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 2743, __pyx_L1_error)
  44967. __Pyx_GOTREF(__pyx_t_2);
  44968. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  44969. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  44970. __PYX_ERR(2, 2743, __pyx_L1_error)
  44971. /* "uvloop/loop.pyx":2741
  44972. * raise ValueError('set_wakeup_fd only works in main thread')
  44973. *
  44974. * if (aio_iscoroutine(callback) # <<<<<<<<<<<<<<
  44975. * or aio_iscoroutinefunction(callback)):
  44976. * raise TypeError(
  44977. */
  44978. }
  44979. /* "uvloop/loop.pyx":2746
  44980. * "coroutines cannot be used with add_signal_handler()")
  44981. *
  44982. * if sig == uv.SIGCHLD: # <<<<<<<<<<<<<<
  44983. * if (hasattr(callback, '__self__') and
  44984. * isinstance(callback.__self__, aio_AbstractChildWatcher)):
  44985. */
  44986. __pyx_t_2 = __Pyx_PyInt_From_int(SIGCHLD); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 2746, __pyx_L1_error)
  44987. __Pyx_GOTREF(__pyx_t_2);
  44988. __pyx_t_3 = PyObject_RichCompare(__pyx_v_sig, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2746, __pyx_L1_error)
  44989. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  44990. __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 2746, __pyx_L1_error)
  44991. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  44992. if (__pyx_t_1) {
  44993. /* "uvloop/loop.pyx":2747
  44994. *
  44995. * if sig == uv.SIGCHLD:
  44996. * if (hasattr(callback, '__self__') and # <<<<<<<<<<<<<<
  44997. * isinstance(callback.__self__, aio_AbstractChildWatcher)):
  44998. *
  44999. */
  45000. __pyx_t_5 = __Pyx_HasAttr(__pyx_v_callback, __pyx_n_u_self); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(2, 2747, __pyx_L1_error)
  45001. __pyx_t_6 = (__pyx_t_5 != 0);
  45002. if (__pyx_t_6) {
  45003. } else {
  45004. __pyx_t_1 = __pyx_t_6;
  45005. goto __pyx_L10_bool_binop_done;
  45006. }
  45007. /* "uvloop/loop.pyx":2748
  45008. * if sig == uv.SIGCHLD:
  45009. * if (hasattr(callback, '__self__') and
  45010. * isinstance(callback.__self__, aio_AbstractChildWatcher)): # <<<<<<<<<<<<<<
  45011. *
  45012. * _warn_with_source(
  45013. */
  45014. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_callback, __pyx_n_s_self); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2748, __pyx_L1_error)
  45015. __Pyx_GOTREF(__pyx_t_3);
  45016. __pyx_t_2 = __pyx_v_6uvloop_4loop_aio_AbstractChildWatcher;
  45017. __Pyx_INCREF(__pyx_t_2);
  45018. __pyx_t_6 = PyObject_IsInstance(__pyx_t_3, __pyx_t_2); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(2, 2748, __pyx_L1_error)
  45019. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  45020. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  45021. __pyx_t_5 = (__pyx_t_6 != 0);
  45022. __pyx_t_1 = __pyx_t_5;
  45023. __pyx_L10_bool_binop_done:;
  45024. /* "uvloop/loop.pyx":2747
  45025. *
  45026. * if sig == uv.SIGCHLD:
  45027. * if (hasattr(callback, '__self__') and # <<<<<<<<<<<<<<
  45028. * isinstance(callback.__self__, aio_AbstractChildWatcher)):
  45029. *
  45030. */
  45031. if (__pyx_t_1) {
  45032. /* "uvloop/loop.pyx":2750
  45033. * isinstance(callback.__self__, aio_AbstractChildWatcher)):
  45034. *
  45035. * _warn_with_source( # <<<<<<<<<<<<<<
  45036. * "!!! asyncio is trying to install its ChildWatcher for "
  45037. * "SIGCHLD signal !!!\n\nThis is probably because a uvloop "
  45038. */
  45039. __pyx_t_2 = __pyx_f_6uvloop_4loop__warn_with_source(__pyx_kp_u_asyncio_is_trying_to_install_it, __pyx_builtin_RuntimeWarning, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 2750, __pyx_L1_error)
  45040. __Pyx_GOTREF(__pyx_t_2);
  45041. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  45042. /* "uvloop/loop.pyx":2763
  45043. * # in our README. Need to start a deprecation period
  45044. * # at some point to turn this warning into an error.
  45045. * return # <<<<<<<<<<<<<<
  45046. *
  45047. * raise RuntimeError(
  45048. */
  45049. __Pyx_XDECREF(__pyx_r);
  45050. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  45051. goto __pyx_L0;
  45052. /* "uvloop/loop.pyx":2747
  45053. *
  45054. * if sig == uv.SIGCHLD:
  45055. * if (hasattr(callback, '__self__') and # <<<<<<<<<<<<<<
  45056. * isinstance(callback.__self__, aio_AbstractChildWatcher)):
  45057. *
  45058. */
  45059. }
  45060. /* "uvloop/loop.pyx":2765
  45061. * return
  45062. *
  45063. * raise RuntimeError( # <<<<<<<<<<<<<<
  45064. * 'cannot add a signal handler for SIGCHLD: it is used '
  45065. * 'by the event loop to track subprocesses')
  45066. */
  45067. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__77, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 2765, __pyx_L1_error)
  45068. __Pyx_GOTREF(__pyx_t_2);
  45069. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  45070. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  45071. __PYX_ERR(2, 2765, __pyx_L1_error)
  45072. /* "uvloop/loop.pyx":2746
  45073. * "coroutines cannot be used with add_signal_handler()")
  45074. *
  45075. * if sig == uv.SIGCHLD: # <<<<<<<<<<<<<<
  45076. * if (hasattr(callback, '__self__') and
  45077. * isinstance(callback.__self__, aio_AbstractChildWatcher)):
  45078. */
  45079. }
  45080. /* "uvloop/loop.pyx":2769
  45081. * 'by the event loop to track subprocesses')
  45082. *
  45083. * self._check_signal(sig) # <<<<<<<<<<<<<<
  45084. * self._check_closed()
  45085. * try:
  45086. */
  45087. __pyx_t_2 = __pyx_f_6uvloop_4loop_4Loop__check_signal(__pyx_v_self, __pyx_v_sig); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 2769, __pyx_L1_error)
  45088. __Pyx_GOTREF(__pyx_t_2);
  45089. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  45090. /* "uvloop/loop.pyx":2770
  45091. *
  45092. * self._check_signal(sig)
  45093. * self._check_closed() # <<<<<<<<<<<<<<
  45094. * try:
  45095. * # set_wakeup_fd() raises ValueError if this is not the
  45096. */
  45097. __pyx_t_2 = __pyx_f_6uvloop_4loop_4Loop__check_closed(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 2770, __pyx_L1_error)
  45098. __Pyx_GOTREF(__pyx_t_2);
  45099. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  45100. /* "uvloop/loop.pyx":2771
  45101. * self._check_signal(sig)
  45102. * self._check_closed()
  45103. * try: # <<<<<<<<<<<<<<
  45104. * # set_wakeup_fd() raises ValueError if this is not the
  45105. * # main thread. By calling it early we ensure that an
  45106. */
  45107. {
  45108. __Pyx_PyThreadState_declare
  45109. __Pyx_PyThreadState_assign
  45110. __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
  45111. __Pyx_XGOTREF(__pyx_t_7);
  45112. __Pyx_XGOTREF(__pyx_t_8);
  45113. __Pyx_XGOTREF(__pyx_t_9);
  45114. /*try:*/ {
  45115. /* "uvloop/loop.pyx":2776
  45116. * # event loop running in another thread cannot add a signal
  45117. * # handler.
  45118. * _set_signal_wakeup_fd(self._csock.fileno()) # <<<<<<<<<<<<<<
  45119. * except (ValueError, OSError) as exc:
  45120. * raise RuntimeError(str(exc))
  45121. */
  45122. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_csock, __pyx_n_s_fileno); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2776, __pyx_L12_error)
  45123. __Pyx_GOTREF(__pyx_t_3);
  45124. __pyx_t_4 = NULL;
  45125. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
  45126. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
  45127. if (likely(__pyx_t_4)) {
  45128. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  45129. __Pyx_INCREF(__pyx_t_4);
  45130. __Pyx_INCREF(function);
  45131. __Pyx_DECREF_SET(__pyx_t_3, function);
  45132. }
  45133. }
  45134. __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
  45135. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  45136. if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 2776, __pyx_L12_error)
  45137. __Pyx_GOTREF(__pyx_t_2);
  45138. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  45139. __pyx_t_3 = __pyx_f_6uvloop_4loop__set_signal_wakeup_fd(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2776, __pyx_L12_error)
  45140. __Pyx_GOTREF(__pyx_t_3);
  45141. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  45142. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  45143. /* "uvloop/loop.pyx":2771
  45144. * self._check_signal(sig)
  45145. * self._check_closed()
  45146. * try: # <<<<<<<<<<<<<<
  45147. * # set_wakeup_fd() raises ValueError if this is not the
  45148. * # main thread. By calling it early we ensure that an
  45149. */
  45150. }
  45151. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  45152. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  45153. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  45154. goto __pyx_L17_try_end;
  45155. __pyx_L12_error:;
  45156. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  45157. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  45158. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  45159. /* "uvloop/loop.pyx":2777
  45160. * # handler.
  45161. * _set_signal_wakeup_fd(self._csock.fileno())
  45162. * except (ValueError, OSError) as exc: # <<<<<<<<<<<<<<
  45163. * raise RuntimeError(str(exc))
  45164. *
  45165. */
  45166. __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_OSError);
  45167. if (__pyx_t_10) {
  45168. __Pyx_AddTraceback("uvloop.loop.Loop.add_signal_handler", __pyx_clineno, __pyx_lineno, __pyx_filename);
  45169. if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_2, &__pyx_t_4) < 0) __PYX_ERR(2, 2777, __pyx_L14_except_error)
  45170. __Pyx_GOTREF(__pyx_t_3);
  45171. __Pyx_GOTREF(__pyx_t_2);
  45172. __Pyx_GOTREF(__pyx_t_4);
  45173. __Pyx_INCREF(__pyx_t_2);
  45174. __pyx_v_exc = __pyx_t_2;
  45175. /*try:*/ {
  45176. /* "uvloop/loop.pyx":2778
  45177. * _set_signal_wakeup_fd(self._csock.fileno())
  45178. * except (ValueError, OSError) as exc:
  45179. * raise RuntimeError(str(exc)) # <<<<<<<<<<<<<<
  45180. *
  45181. * h = new_Handle(self, callback, args or None, None)
  45182. */
  45183. __pyx_t_11 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_v_exc); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 2778, __pyx_L23_error)
  45184. __Pyx_GOTREF(__pyx_t_11);
  45185. __pyx_t_12 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(2, 2778, __pyx_L23_error)
  45186. __Pyx_GOTREF(__pyx_t_12);
  45187. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  45188. __Pyx_Raise(__pyx_t_12, 0, 0, 0);
  45189. __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  45190. __PYX_ERR(2, 2778, __pyx_L23_error)
  45191. }
  45192. /* "uvloop/loop.pyx":2777
  45193. * # handler.
  45194. * _set_signal_wakeup_fd(self._csock.fileno())
  45195. * except (ValueError, OSError) as exc: # <<<<<<<<<<<<<<
  45196. * raise RuntimeError(str(exc))
  45197. *
  45198. */
  45199. /*finally:*/ {
  45200. __pyx_L23_error:;
  45201. /*exception exit:*/{
  45202. __Pyx_PyThreadState_declare
  45203. __Pyx_PyThreadState_assign
  45204. __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0;
  45205. __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
  45206. __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
  45207. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20);
  45208. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17) < 0)) __Pyx_ErrFetch(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17);
  45209. __Pyx_XGOTREF(__pyx_t_15);
  45210. __Pyx_XGOTREF(__pyx_t_16);
  45211. __Pyx_XGOTREF(__pyx_t_17);
  45212. __Pyx_XGOTREF(__pyx_t_18);
  45213. __Pyx_XGOTREF(__pyx_t_19);
  45214. __Pyx_XGOTREF(__pyx_t_20);
  45215. __pyx_t_10 = __pyx_lineno; __pyx_t_13 = __pyx_clineno; __pyx_t_14 = __pyx_filename;
  45216. {
  45217. __Pyx_DECREF(__pyx_v_exc);
  45218. __pyx_v_exc = NULL;
  45219. }
  45220. if (PY_MAJOR_VERSION >= 3) {
  45221. __Pyx_XGIVEREF(__pyx_t_18);
  45222. __Pyx_XGIVEREF(__pyx_t_19);
  45223. __Pyx_XGIVEREF(__pyx_t_20);
  45224. __Pyx_ExceptionReset(__pyx_t_18, __pyx_t_19, __pyx_t_20);
  45225. }
  45226. __Pyx_XGIVEREF(__pyx_t_15);
  45227. __Pyx_XGIVEREF(__pyx_t_16);
  45228. __Pyx_XGIVEREF(__pyx_t_17);
  45229. __Pyx_ErrRestore(__pyx_t_15, __pyx_t_16, __pyx_t_17);
  45230. __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0;
  45231. __pyx_lineno = __pyx_t_10; __pyx_clineno = __pyx_t_13; __pyx_filename = __pyx_t_14;
  45232. goto __pyx_L14_except_error;
  45233. }
  45234. }
  45235. }
  45236. goto __pyx_L14_except_error;
  45237. __pyx_L14_except_error:;
  45238. /* "uvloop/loop.pyx":2771
  45239. * self._check_signal(sig)
  45240. * self._check_closed()
  45241. * try: # <<<<<<<<<<<<<<
  45242. * # set_wakeup_fd() raises ValueError if this is not the
  45243. * # main thread. By calling it early we ensure that an
  45244. */
  45245. __Pyx_XGIVEREF(__pyx_t_7);
  45246. __Pyx_XGIVEREF(__pyx_t_8);
  45247. __Pyx_XGIVEREF(__pyx_t_9);
  45248. __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
  45249. goto __pyx_L1_error;
  45250. __pyx_L17_try_end:;
  45251. }
  45252. /* "uvloop/loop.pyx":2780
  45253. * raise RuntimeError(str(exc))
  45254. *
  45255. * h = new_Handle(self, callback, args or None, None) # <<<<<<<<<<<<<<
  45256. * self._signal_handlers[sig] = h
  45257. *
  45258. */
  45259. __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_args); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 2780, __pyx_L1_error)
  45260. if (!__pyx_t_1) {
  45261. } else {
  45262. __Pyx_INCREF(__pyx_v_args);
  45263. __pyx_t_4 = __pyx_v_args;
  45264. goto __pyx_L29_bool_binop_done;
  45265. }
  45266. __Pyx_INCREF(Py_None);
  45267. __pyx_t_4 = Py_None;
  45268. __pyx_L29_bool_binop_done:;
  45269. __pyx_t_2 = __pyx_f_6uvloop_4loop_new_Handle(__pyx_v_self, __pyx_v_callback, __pyx_t_4, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 2780, __pyx_L1_error)
  45270. __Pyx_GOTREF(__pyx_t_2);
  45271. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  45272. if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_6uvloop_4loop_Handle))))) __PYX_ERR(2, 2780, __pyx_L1_error)
  45273. __pyx_v_h = ((struct __pyx_obj_6uvloop_4loop_Handle *)__pyx_t_2);
  45274. __pyx_t_2 = 0;
  45275. /* "uvloop/loop.pyx":2781
  45276. *
  45277. * h = new_Handle(self, callback, args or None, None)
  45278. * self._signal_handlers[sig] = h # <<<<<<<<<<<<<<
  45279. *
  45280. * try:
  45281. */
  45282. if (unlikely(__pyx_v_self->_signal_handlers == Py_None)) {
  45283. PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
  45284. __PYX_ERR(2, 2781, __pyx_L1_error)
  45285. }
  45286. if (unlikely(PyDict_SetItem(__pyx_v_self->_signal_handlers, __pyx_v_sig, ((PyObject *)__pyx_v_h)) < 0)) __PYX_ERR(2, 2781, __pyx_L1_error)
  45287. /* "uvloop/loop.pyx":2783
  45288. * self._signal_handlers[sig] = h
  45289. *
  45290. * try: # <<<<<<<<<<<<<<
  45291. * # Register a dummy signal handler to ask Python to write the signal
  45292. * # number in the wakeup file descriptor.
  45293. */
  45294. {
  45295. __Pyx_PyThreadState_declare
  45296. __Pyx_PyThreadState_assign
  45297. __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
  45298. __Pyx_XGOTREF(__pyx_t_9);
  45299. __Pyx_XGOTREF(__pyx_t_8);
  45300. __Pyx_XGOTREF(__pyx_t_7);
  45301. /*try:*/ {
  45302. /* "uvloop/loop.pyx":2786
  45303. * # Register a dummy signal handler to ask Python to write the signal
  45304. * # number in the wakeup file descriptor.
  45305. * signal_signal(sig, self.__sighandler) # <<<<<<<<<<<<<<
  45306. *
  45307. * # Set SA_RESTART to limit EINTR occurrences.
  45308. */
  45309. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_sighandler); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2786, __pyx_L31_error)
  45310. __Pyx_GOTREF(__pyx_t_4);
  45311. __Pyx_INCREF(__pyx_v_6uvloop_4loop_signal_signal);
  45312. __pyx_t_3 = __pyx_v_6uvloop_4loop_signal_signal; __pyx_t_12 = NULL;
  45313. __pyx_t_13 = 0;
  45314. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
  45315. __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_3);
  45316. if (likely(__pyx_t_12)) {
  45317. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  45318. __Pyx_INCREF(__pyx_t_12);
  45319. __Pyx_INCREF(function);
  45320. __Pyx_DECREF_SET(__pyx_t_3, function);
  45321. __pyx_t_13 = 1;
  45322. }
  45323. }
  45324. #if CYTHON_FAST_PYCALL
  45325. if (PyFunction_Check(__pyx_t_3)) {
  45326. PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_sig, __pyx_t_4};
  45327. __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 2786, __pyx_L31_error)
  45328. __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
  45329. __Pyx_GOTREF(__pyx_t_2);
  45330. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  45331. } else
  45332. #endif
  45333. #if CYTHON_FAST_PYCCALL
  45334. if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
  45335. PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_sig, __pyx_t_4};
  45336. __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 2786, __pyx_L31_error)
  45337. __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
  45338. __Pyx_GOTREF(__pyx_t_2);
  45339. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  45340. } else
  45341. #endif
  45342. {
  45343. __pyx_t_11 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 2786, __pyx_L31_error)
  45344. __Pyx_GOTREF(__pyx_t_11);
  45345. if (__pyx_t_12) {
  45346. __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_12); __pyx_t_12 = NULL;
  45347. }
  45348. __Pyx_INCREF(__pyx_v_sig);
  45349. __Pyx_GIVEREF(__pyx_v_sig);
  45350. PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_13, __pyx_v_sig);
  45351. __Pyx_GIVEREF(__pyx_t_4);
  45352. PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_13, __pyx_t_4);
  45353. __pyx_t_4 = 0;
  45354. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_11, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 2786, __pyx_L31_error)
  45355. __Pyx_GOTREF(__pyx_t_2);
  45356. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  45357. }
  45358. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  45359. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  45360. /* "uvloop/loop.pyx":2789
  45361. *
  45362. * # Set SA_RESTART to limit EINTR occurrences.
  45363. * signal_siginterrupt(sig, False) # <<<<<<<<<<<<<<
  45364. * except OSError as exc:
  45365. * del self._signal_handlers[sig]
  45366. */
  45367. __Pyx_INCREF(__pyx_v_6uvloop_4loop_signal_siginterrupt);
  45368. __pyx_t_3 = __pyx_v_6uvloop_4loop_signal_siginterrupt; __pyx_t_11 = NULL;
  45369. __pyx_t_13 = 0;
  45370. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
  45371. __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_3);
  45372. if (likely(__pyx_t_11)) {
  45373. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  45374. __Pyx_INCREF(__pyx_t_11);
  45375. __Pyx_INCREF(function);
  45376. __Pyx_DECREF_SET(__pyx_t_3, function);
  45377. __pyx_t_13 = 1;
  45378. }
  45379. }
  45380. #if CYTHON_FAST_PYCALL
  45381. if (PyFunction_Check(__pyx_t_3)) {
  45382. PyObject *__pyx_temp[3] = {__pyx_t_11, __pyx_v_sig, Py_False};
  45383. __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 2789, __pyx_L31_error)
  45384. __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
  45385. __Pyx_GOTREF(__pyx_t_2);
  45386. } else
  45387. #endif
  45388. #if CYTHON_FAST_PYCCALL
  45389. if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
  45390. PyObject *__pyx_temp[3] = {__pyx_t_11, __pyx_v_sig, Py_False};
  45391. __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 2789, __pyx_L31_error)
  45392. __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
  45393. __Pyx_GOTREF(__pyx_t_2);
  45394. } else
  45395. #endif
  45396. {
  45397. __pyx_t_4 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2789, __pyx_L31_error)
  45398. __Pyx_GOTREF(__pyx_t_4);
  45399. if (__pyx_t_11) {
  45400. __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_11); __pyx_t_11 = NULL;
  45401. }
  45402. __Pyx_INCREF(__pyx_v_sig);
  45403. __Pyx_GIVEREF(__pyx_v_sig);
  45404. PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_13, __pyx_v_sig);
  45405. __Pyx_INCREF(Py_False);
  45406. __Pyx_GIVEREF(Py_False);
  45407. PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_13, Py_False);
  45408. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 2789, __pyx_L31_error)
  45409. __Pyx_GOTREF(__pyx_t_2);
  45410. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  45411. }
  45412. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  45413. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  45414. /* "uvloop/loop.pyx":2783
  45415. * self._signal_handlers[sig] = h
  45416. *
  45417. * try: # <<<<<<<<<<<<<<
  45418. * # Register a dummy signal handler to ask Python to write the signal
  45419. * # number in the wakeup file descriptor.
  45420. */
  45421. }
  45422. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  45423. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  45424. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  45425. goto __pyx_L36_try_end;
  45426. __pyx_L31_error:;
  45427. __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
  45428. __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
  45429. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  45430. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  45431. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  45432. /* "uvloop/loop.pyx":2790
  45433. * # Set SA_RESTART to limit EINTR occurrences.
  45434. * signal_siginterrupt(sig, False)
  45435. * except OSError as exc: # <<<<<<<<<<<<<<
  45436. * del self._signal_handlers[sig]
  45437. * if not self._signal_handlers:
  45438. */
  45439. __pyx_t_13 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_OSError);
  45440. if (__pyx_t_13) {
  45441. __Pyx_AddTraceback("uvloop.loop.Loop.add_signal_handler", __pyx_clineno, __pyx_lineno, __pyx_filename);
  45442. if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4) < 0) __PYX_ERR(2, 2790, __pyx_L33_except_error)
  45443. __Pyx_GOTREF(__pyx_t_2);
  45444. __Pyx_GOTREF(__pyx_t_3);
  45445. __Pyx_GOTREF(__pyx_t_4);
  45446. __Pyx_INCREF(__pyx_t_3);
  45447. __pyx_v_exc = __pyx_t_3;
  45448. /*try:*/ {
  45449. /* "uvloop/loop.pyx":2791
  45450. * signal_siginterrupt(sig, False)
  45451. * except OSError as exc:
  45452. * del self._signal_handlers[sig] # <<<<<<<<<<<<<<
  45453. * if not self._signal_handlers:
  45454. * try:
  45455. */
  45456. if (unlikely(__pyx_v_self->_signal_handlers == Py_None)) {
  45457. PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
  45458. __PYX_ERR(2, 2791, __pyx_L42_error)
  45459. }
  45460. if (unlikely(PyDict_DelItem(__pyx_v_self->_signal_handlers, __pyx_v_sig) < 0)) __PYX_ERR(2, 2791, __pyx_L42_error)
  45461. /* "uvloop/loop.pyx":2792
  45462. * except OSError as exc:
  45463. * del self._signal_handlers[sig]
  45464. * if not self._signal_handlers: # <<<<<<<<<<<<<<
  45465. * try:
  45466. * signal_set_wakeup_fd(-1)
  45467. */
  45468. __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->_signal_handlers); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 2792, __pyx_L42_error)
  45469. __pyx_t_5 = ((!__pyx_t_1) != 0);
  45470. if (__pyx_t_5) {
  45471. /* "uvloop/loop.pyx":2793
  45472. * del self._signal_handlers[sig]
  45473. * if not self._signal_handlers:
  45474. * try: # <<<<<<<<<<<<<<
  45475. * signal_set_wakeup_fd(-1)
  45476. * except (ValueError, OSError) as nexc:
  45477. */
  45478. {
  45479. __Pyx_PyThreadState_declare
  45480. __Pyx_PyThreadState_assign
  45481. __Pyx_ExceptionSave(&__pyx_t_20, &__pyx_t_19, &__pyx_t_18);
  45482. __Pyx_XGOTREF(__pyx_t_20);
  45483. __Pyx_XGOTREF(__pyx_t_19);
  45484. __Pyx_XGOTREF(__pyx_t_18);
  45485. /*try:*/ {
  45486. /* "uvloop/loop.pyx":2794
  45487. * if not self._signal_handlers:
  45488. * try:
  45489. * signal_set_wakeup_fd(-1) # <<<<<<<<<<<<<<
  45490. * except (ValueError, OSError) as nexc:
  45491. * aio_logger.info('set_wakeup_fd(-1) failed: %s', nexc)
  45492. */
  45493. __Pyx_INCREF(__pyx_v_6uvloop_4loop_signal_set_wakeup_fd);
  45494. __pyx_t_12 = __pyx_v_6uvloop_4loop_signal_set_wakeup_fd; __pyx_t_21 = NULL;
  45495. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
  45496. __pyx_t_21 = PyMethod_GET_SELF(__pyx_t_12);
  45497. if (likely(__pyx_t_21)) {
  45498. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
  45499. __Pyx_INCREF(__pyx_t_21);
  45500. __Pyx_INCREF(function);
  45501. __Pyx_DECREF_SET(__pyx_t_12, function);
  45502. }
  45503. }
  45504. __pyx_t_11 = (__pyx_t_21) ? __Pyx_PyObject_Call2Args(__pyx_t_12, __pyx_t_21, __pyx_int_neg_1) : __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_int_neg_1);
  45505. __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0;
  45506. if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 2794, __pyx_L45_error)
  45507. __Pyx_GOTREF(__pyx_t_11);
  45508. __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  45509. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  45510. /* "uvloop/loop.pyx":2793
  45511. * del self._signal_handlers[sig]
  45512. * if not self._signal_handlers:
  45513. * try: # <<<<<<<<<<<<<<
  45514. * signal_set_wakeup_fd(-1)
  45515. * except (ValueError, OSError) as nexc:
  45516. */
  45517. }
  45518. __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0;
  45519. __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
  45520. __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
  45521. goto __pyx_L52_try_end;
  45522. __pyx_L45_error:;
  45523. __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
  45524. __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
  45525. __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0;
  45526. /* "uvloop/loop.pyx":2795
  45527. * try:
  45528. * signal_set_wakeup_fd(-1)
  45529. * except (ValueError, OSError) as nexc: # <<<<<<<<<<<<<<
  45530. * aio_logger.info('set_wakeup_fd(-1) failed: %s', nexc)
  45531. *
  45532. */
  45533. __pyx_t_13 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_OSError);
  45534. if (__pyx_t_13) {
  45535. __Pyx_AddTraceback("uvloop.loop.Loop.add_signal_handler", __pyx_clineno, __pyx_lineno, __pyx_filename);
  45536. if (__Pyx_GetException(&__pyx_t_11, &__pyx_t_12, &__pyx_t_21) < 0) __PYX_ERR(2, 2795, __pyx_L47_except_error)
  45537. __Pyx_GOTREF(__pyx_t_11);
  45538. __Pyx_GOTREF(__pyx_t_12);
  45539. __Pyx_GOTREF(__pyx_t_21);
  45540. __Pyx_INCREF(__pyx_t_12);
  45541. __pyx_v_nexc = __pyx_t_12;
  45542. /*try:*/ {
  45543. /* "uvloop/loop.pyx":2796
  45544. * signal_set_wakeup_fd(-1)
  45545. * except (ValueError, OSError) as nexc:
  45546. * aio_logger.info('set_wakeup_fd(-1) failed: %s', nexc) # <<<<<<<<<<<<<<
  45547. *
  45548. * if exc.errno == errno_EINVAL:
  45549. */
  45550. __pyx_t_23 = __Pyx_PyObject_GetAttrStr(__pyx_v_6uvloop_4loop_aio_logger, __pyx_n_s_info); if (unlikely(!__pyx_t_23)) __PYX_ERR(2, 2796, __pyx_L58_error)
  45551. __Pyx_GOTREF(__pyx_t_23);
  45552. __pyx_t_24 = NULL;
  45553. __pyx_t_13 = 0;
  45554. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_23))) {
  45555. __pyx_t_24 = PyMethod_GET_SELF(__pyx_t_23);
  45556. if (likely(__pyx_t_24)) {
  45557. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_23);
  45558. __Pyx_INCREF(__pyx_t_24);
  45559. __Pyx_INCREF(function);
  45560. __Pyx_DECREF_SET(__pyx_t_23, function);
  45561. __pyx_t_13 = 1;
  45562. }
  45563. }
  45564. #if CYTHON_FAST_PYCALL
  45565. if (PyFunction_Check(__pyx_t_23)) {
  45566. PyObject *__pyx_temp[3] = {__pyx_t_24, __pyx_kp_u_set_wakeup_fd_1_failed_s, __pyx_v_nexc};
  45567. __pyx_t_22 = __Pyx_PyFunction_FastCall(__pyx_t_23, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_22)) __PYX_ERR(2, 2796, __pyx_L58_error)
  45568. __Pyx_XDECREF(__pyx_t_24); __pyx_t_24 = 0;
  45569. __Pyx_GOTREF(__pyx_t_22);
  45570. } else
  45571. #endif
  45572. #if CYTHON_FAST_PYCCALL
  45573. if (__Pyx_PyFastCFunction_Check(__pyx_t_23)) {
  45574. PyObject *__pyx_temp[3] = {__pyx_t_24, __pyx_kp_u_set_wakeup_fd_1_failed_s, __pyx_v_nexc};
  45575. __pyx_t_22 = __Pyx_PyCFunction_FastCall(__pyx_t_23, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_22)) __PYX_ERR(2, 2796, __pyx_L58_error)
  45576. __Pyx_XDECREF(__pyx_t_24); __pyx_t_24 = 0;
  45577. __Pyx_GOTREF(__pyx_t_22);
  45578. } else
  45579. #endif
  45580. {
  45581. __pyx_t_25 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_25)) __PYX_ERR(2, 2796, __pyx_L58_error)
  45582. __Pyx_GOTREF(__pyx_t_25);
  45583. if (__pyx_t_24) {
  45584. __Pyx_GIVEREF(__pyx_t_24); PyTuple_SET_ITEM(__pyx_t_25, 0, __pyx_t_24); __pyx_t_24 = NULL;
  45585. }
  45586. __Pyx_INCREF(__pyx_kp_u_set_wakeup_fd_1_failed_s);
  45587. __Pyx_GIVEREF(__pyx_kp_u_set_wakeup_fd_1_failed_s);
  45588. PyTuple_SET_ITEM(__pyx_t_25, 0+__pyx_t_13, __pyx_kp_u_set_wakeup_fd_1_failed_s);
  45589. __Pyx_INCREF(__pyx_v_nexc);
  45590. __Pyx_GIVEREF(__pyx_v_nexc);
  45591. PyTuple_SET_ITEM(__pyx_t_25, 1+__pyx_t_13, __pyx_v_nexc);
  45592. __pyx_t_22 = __Pyx_PyObject_Call(__pyx_t_23, __pyx_t_25, NULL); if (unlikely(!__pyx_t_22)) __PYX_ERR(2, 2796, __pyx_L58_error)
  45593. __Pyx_GOTREF(__pyx_t_22);
  45594. __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
  45595. }
  45596. __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
  45597. __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
  45598. }
  45599. /* "uvloop/loop.pyx":2795
  45600. * try:
  45601. * signal_set_wakeup_fd(-1)
  45602. * except (ValueError, OSError) as nexc: # <<<<<<<<<<<<<<
  45603. * aio_logger.info('set_wakeup_fd(-1) failed: %s', nexc)
  45604. *
  45605. */
  45606. /*finally:*/ {
  45607. /*normal exit:*/{
  45608. __Pyx_DECREF(__pyx_v_nexc);
  45609. __pyx_v_nexc = NULL;
  45610. goto __pyx_L59;
  45611. }
  45612. __pyx_L58_error:;
  45613. /*exception exit:*/{
  45614. __Pyx_PyThreadState_declare
  45615. __Pyx_PyThreadState_assign
  45616. __pyx_t_17 = 0; __pyx_t_16 = 0; __pyx_t_15 = 0; __pyx_t_27 = 0; __pyx_t_28 = 0; __pyx_t_29 = 0;
  45617. __Pyx_XDECREF(__pyx_t_22); __pyx_t_22 = 0;
  45618. __Pyx_XDECREF(__pyx_t_23); __pyx_t_23 = 0;
  45619. __Pyx_XDECREF(__pyx_t_24); __pyx_t_24 = 0;
  45620. __Pyx_XDECREF(__pyx_t_25); __pyx_t_25 = 0;
  45621. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_27, &__pyx_t_28, &__pyx_t_29);
  45622. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_17, &__pyx_t_16, &__pyx_t_15) < 0)) __Pyx_ErrFetch(&__pyx_t_17, &__pyx_t_16, &__pyx_t_15);
  45623. __Pyx_XGOTREF(__pyx_t_17);
  45624. __Pyx_XGOTREF(__pyx_t_16);
  45625. __Pyx_XGOTREF(__pyx_t_15);
  45626. __Pyx_XGOTREF(__pyx_t_27);
  45627. __Pyx_XGOTREF(__pyx_t_28);
  45628. __Pyx_XGOTREF(__pyx_t_29);
  45629. __pyx_t_13 = __pyx_lineno; __pyx_t_10 = __pyx_clineno; __pyx_t_26 = __pyx_filename;
  45630. {
  45631. __Pyx_DECREF(__pyx_v_nexc);
  45632. __pyx_v_nexc = NULL;
  45633. }
  45634. if (PY_MAJOR_VERSION >= 3) {
  45635. __Pyx_XGIVEREF(__pyx_t_27);
  45636. __Pyx_XGIVEREF(__pyx_t_28);
  45637. __Pyx_XGIVEREF(__pyx_t_29);
  45638. __Pyx_ExceptionReset(__pyx_t_27, __pyx_t_28, __pyx_t_29);
  45639. }
  45640. __Pyx_XGIVEREF(__pyx_t_17);
  45641. __Pyx_XGIVEREF(__pyx_t_16);
  45642. __Pyx_XGIVEREF(__pyx_t_15);
  45643. __Pyx_ErrRestore(__pyx_t_17, __pyx_t_16, __pyx_t_15);
  45644. __pyx_t_17 = 0; __pyx_t_16 = 0; __pyx_t_15 = 0; __pyx_t_27 = 0; __pyx_t_28 = 0; __pyx_t_29 = 0;
  45645. __pyx_lineno = __pyx_t_13; __pyx_clineno = __pyx_t_10; __pyx_filename = __pyx_t_26;
  45646. goto __pyx_L47_except_error;
  45647. }
  45648. __pyx_L59:;
  45649. }
  45650. __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
  45651. __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
  45652. __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0;
  45653. goto __pyx_L46_exception_handled;
  45654. }
  45655. goto __pyx_L47_except_error;
  45656. __pyx_L47_except_error:;
  45657. /* "uvloop/loop.pyx":2793
  45658. * del self._signal_handlers[sig]
  45659. * if not self._signal_handlers:
  45660. * try: # <<<<<<<<<<<<<<
  45661. * signal_set_wakeup_fd(-1)
  45662. * except (ValueError, OSError) as nexc:
  45663. */
  45664. __Pyx_XGIVEREF(__pyx_t_20);
  45665. __Pyx_XGIVEREF(__pyx_t_19);
  45666. __Pyx_XGIVEREF(__pyx_t_18);
  45667. __Pyx_ExceptionReset(__pyx_t_20, __pyx_t_19, __pyx_t_18);
  45668. goto __pyx_L42_error;
  45669. __pyx_L46_exception_handled:;
  45670. __Pyx_XGIVEREF(__pyx_t_20);
  45671. __Pyx_XGIVEREF(__pyx_t_19);
  45672. __Pyx_XGIVEREF(__pyx_t_18);
  45673. __Pyx_ExceptionReset(__pyx_t_20, __pyx_t_19, __pyx_t_18);
  45674. __pyx_L52_try_end:;
  45675. }
  45676. /* "uvloop/loop.pyx":2792
  45677. * except OSError as exc:
  45678. * del self._signal_handlers[sig]
  45679. * if not self._signal_handlers: # <<<<<<<<<<<<<<
  45680. * try:
  45681. * signal_set_wakeup_fd(-1)
  45682. */
  45683. }
  45684. /* "uvloop/loop.pyx":2798
  45685. * aio_logger.info('set_wakeup_fd(-1) failed: %s', nexc)
  45686. *
  45687. * if exc.errno == errno_EINVAL: # <<<<<<<<<<<<<<
  45688. * raise RuntimeError('sig {} cannot be caught'.format(sig))
  45689. * else:
  45690. */
  45691. __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_v_exc, __pyx_n_s_errno); if (unlikely(!__pyx_t_21)) __PYX_ERR(2, 2798, __pyx_L42_error)
  45692. __Pyx_GOTREF(__pyx_t_21);
  45693. __pyx_t_12 = PyObject_RichCompare(__pyx_t_21, __pyx_v_6uvloop_4loop_errno_EINVAL, Py_EQ); __Pyx_XGOTREF(__pyx_t_12); if (unlikely(!__pyx_t_12)) __PYX_ERR(2, 2798, __pyx_L42_error)
  45694. __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
  45695. __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(2, 2798, __pyx_L42_error)
  45696. __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  45697. if (unlikely(__pyx_t_5)) {
  45698. /* "uvloop/loop.pyx":2799
  45699. *
  45700. * if exc.errno == errno_EINVAL:
  45701. * raise RuntimeError('sig {} cannot be caught'.format(sig)) # <<<<<<<<<<<<<<
  45702. * else:
  45703. * raise
  45704. */
  45705. __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_sig_cannot_be_caught, __pyx_n_s_format); if (unlikely(!__pyx_t_21)) __PYX_ERR(2, 2799, __pyx_L42_error)
  45706. __Pyx_GOTREF(__pyx_t_21);
  45707. __pyx_t_11 = NULL;
  45708. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_21))) {
  45709. __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_21);
  45710. if (likely(__pyx_t_11)) {
  45711. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_21);
  45712. __Pyx_INCREF(__pyx_t_11);
  45713. __Pyx_INCREF(function);
  45714. __Pyx_DECREF_SET(__pyx_t_21, function);
  45715. }
  45716. }
  45717. __pyx_t_12 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_21, __pyx_t_11, __pyx_v_sig) : __Pyx_PyObject_CallOneArg(__pyx_t_21, __pyx_v_sig);
  45718. __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
  45719. if (unlikely(!__pyx_t_12)) __PYX_ERR(2, 2799, __pyx_L42_error)
  45720. __Pyx_GOTREF(__pyx_t_12);
  45721. __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
  45722. __pyx_t_21 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_12); if (unlikely(!__pyx_t_21)) __PYX_ERR(2, 2799, __pyx_L42_error)
  45723. __Pyx_GOTREF(__pyx_t_21);
  45724. __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  45725. __Pyx_Raise(__pyx_t_21, 0, 0, 0);
  45726. __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
  45727. __PYX_ERR(2, 2799, __pyx_L42_error)
  45728. /* "uvloop/loop.pyx":2798
  45729. * aio_logger.info('set_wakeup_fd(-1) failed: %s', nexc)
  45730. *
  45731. * if exc.errno == errno_EINVAL: # <<<<<<<<<<<<<<
  45732. * raise RuntimeError('sig {} cannot be caught'.format(sig))
  45733. * else:
  45734. */
  45735. }
  45736. /* "uvloop/loop.pyx":2801
  45737. * raise RuntimeError('sig {} cannot be caught'.format(sig))
  45738. * else:
  45739. * raise # <<<<<<<<<<<<<<
  45740. *
  45741. * def remove_signal_handler(self, sig):
  45742. */
  45743. /*else*/ {
  45744. __Pyx_GIVEREF(__pyx_t_2);
  45745. __Pyx_GIVEREF(__pyx_t_3);
  45746. __Pyx_XGIVEREF(__pyx_t_4);
  45747. __Pyx_ErrRestoreWithState(__pyx_t_2, __pyx_t_3, __pyx_t_4);
  45748. __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_t_4 = 0;
  45749. __PYX_ERR(2, 2801, __pyx_L42_error)
  45750. }
  45751. }
  45752. /* "uvloop/loop.pyx":2790
  45753. * # Set SA_RESTART to limit EINTR occurrences.
  45754. * signal_siginterrupt(sig, False)
  45755. * except OSError as exc: # <<<<<<<<<<<<<<
  45756. * del self._signal_handlers[sig]
  45757. * if not self._signal_handlers:
  45758. */
  45759. /*finally:*/ {
  45760. __pyx_L42_error:;
  45761. /*exception exit:*/{
  45762. __Pyx_PyThreadState_declare
  45763. __Pyx_PyThreadState_assign
  45764. __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_29 = 0; __pyx_t_28 = 0; __pyx_t_27 = 0;
  45765. __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
  45766. __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
  45767. __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0;
  45768. __Pyx_XDECREF(__pyx_t_22); __pyx_t_22 = 0;
  45769. __Pyx_XDECREF(__pyx_t_23); __pyx_t_23 = 0;
  45770. __Pyx_XDECREF(__pyx_t_24); __pyx_t_24 = 0;
  45771. __Pyx_XDECREF(__pyx_t_25); __pyx_t_25 = 0;
  45772. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_29, &__pyx_t_28, &__pyx_t_27);
  45773. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20) < 0)) __Pyx_ErrFetch(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20);
  45774. __Pyx_XGOTREF(__pyx_t_18);
  45775. __Pyx_XGOTREF(__pyx_t_19);
  45776. __Pyx_XGOTREF(__pyx_t_20);
  45777. __Pyx_XGOTREF(__pyx_t_29);
  45778. __Pyx_XGOTREF(__pyx_t_28);
  45779. __Pyx_XGOTREF(__pyx_t_27);
  45780. __pyx_t_10 = __pyx_lineno; __pyx_t_13 = __pyx_clineno; __pyx_t_30 = __pyx_filename;
  45781. {
  45782. __Pyx_DECREF(__pyx_v_exc);
  45783. __pyx_v_exc = NULL;
  45784. }
  45785. if (PY_MAJOR_VERSION >= 3) {
  45786. __Pyx_XGIVEREF(__pyx_t_29);
  45787. __Pyx_XGIVEREF(__pyx_t_28);
  45788. __Pyx_XGIVEREF(__pyx_t_27);
  45789. __Pyx_ExceptionReset(__pyx_t_29, __pyx_t_28, __pyx_t_27);
  45790. }
  45791. __Pyx_XGIVEREF(__pyx_t_18);
  45792. __Pyx_XGIVEREF(__pyx_t_19);
  45793. __Pyx_XGIVEREF(__pyx_t_20);
  45794. __Pyx_ErrRestore(__pyx_t_18, __pyx_t_19, __pyx_t_20);
  45795. __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_29 = 0; __pyx_t_28 = 0; __pyx_t_27 = 0;
  45796. __pyx_lineno = __pyx_t_10; __pyx_clineno = __pyx_t_13; __pyx_filename = __pyx_t_30;
  45797. goto __pyx_L33_except_error;
  45798. }
  45799. }
  45800. }
  45801. goto __pyx_L33_except_error;
  45802. __pyx_L33_except_error:;
  45803. /* "uvloop/loop.pyx":2783
  45804. * self._signal_handlers[sig] = h
  45805. *
  45806. * try: # <<<<<<<<<<<<<<
  45807. * # Register a dummy signal handler to ask Python to write the signal
  45808. * # number in the wakeup file descriptor.
  45809. */
  45810. __Pyx_XGIVEREF(__pyx_t_9);
  45811. __Pyx_XGIVEREF(__pyx_t_8);
  45812. __Pyx_XGIVEREF(__pyx_t_7);
  45813. __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
  45814. goto __pyx_L1_error;
  45815. __pyx_L36_try_end:;
  45816. }
  45817. /* "uvloop/loop.pyx":2727
  45818. * return transp, proto
  45819. *
  45820. * def add_signal_handler(self, sig, callback, *args): # <<<<<<<<<<<<<<
  45821. * """Add a handler for a signal. UNIX only.
  45822. *
  45823. */
  45824. /* function exit code */
  45825. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  45826. goto __pyx_L0;
  45827. __pyx_L1_error:;
  45828. __Pyx_XDECREF(__pyx_t_2);
  45829. __Pyx_XDECREF(__pyx_t_3);
  45830. __Pyx_XDECREF(__pyx_t_4);
  45831. __Pyx_XDECREF(__pyx_t_11);
  45832. __Pyx_XDECREF(__pyx_t_12);
  45833. __Pyx_XDECREF(__pyx_t_21);
  45834. __Pyx_XDECREF(__pyx_t_22);
  45835. __Pyx_XDECREF(__pyx_t_23);
  45836. __Pyx_XDECREF(__pyx_t_24);
  45837. __Pyx_XDECREF(__pyx_t_25);
  45838. __Pyx_AddTraceback("uvloop.loop.Loop.add_signal_handler", __pyx_clineno, __pyx_lineno, __pyx_filename);
  45839. __pyx_r = NULL;
  45840. __pyx_L0:;
  45841. __Pyx_XDECREF((PyObject *)__pyx_v_h);
  45842. __Pyx_XDECREF(__pyx_v_exc);
  45843. __Pyx_XDECREF(__pyx_v_nexc);
  45844. __Pyx_XGIVEREF(__pyx_r);
  45845. __Pyx_RefNannyFinishContext();
  45846. return __pyx_r;
  45847. }
  45848. /* "uvloop/loop.pyx":2803
  45849. * raise
  45850. *
  45851. * def remove_signal_handler(self, sig): # <<<<<<<<<<<<<<
  45852. * """Remove a handler for a signal. UNIX only.
  45853. *
  45854. */
  45855. /* Python wrapper */
  45856. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_123remove_signal_handler(PyObject *__pyx_v_self, PyObject *__pyx_v_sig); /*proto*/
  45857. static char __pyx_doc_6uvloop_4loop_4Loop_122remove_signal_handler[] = "Loop.remove_signal_handler(self, sig)\nRemove a handler for a signal. UNIX only.\n\n Return True if a signal handler was removed, False if not.\n ";
  45858. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_123remove_signal_handler(PyObject *__pyx_v_self, PyObject *__pyx_v_sig) {
  45859. PyObject *__pyx_r = 0;
  45860. __Pyx_RefNannyDeclarations
  45861. __Pyx_RefNannySetupContext("remove_signal_handler (wrapper)", 0);
  45862. __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_122remove_signal_handler(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self), ((PyObject *)__pyx_v_sig));
  45863. /* function exit code */
  45864. __Pyx_RefNannyFinishContext();
  45865. return __pyx_r;
  45866. }
  45867. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_122remove_signal_handler(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_sig) {
  45868. PyObject *__pyx_v_handler = NULL;
  45869. PyObject *__pyx_v_exc = NULL;
  45870. PyObject *__pyx_r = NULL;
  45871. __Pyx_RefNannyDeclarations
  45872. PyObject *__pyx_t_1 = NULL;
  45873. int __pyx_t_2;
  45874. PyObject *__pyx_t_3 = NULL;
  45875. PyObject *__pyx_t_4 = NULL;
  45876. PyObject *__pyx_t_5 = NULL;
  45877. int __pyx_t_6;
  45878. PyObject *__pyx_t_7 = NULL;
  45879. PyObject *__pyx_t_8 = NULL;
  45880. PyObject *__pyx_t_9 = NULL;
  45881. PyObject *__pyx_t_10 = NULL;
  45882. PyObject *__pyx_t_11 = NULL;
  45883. int __pyx_t_12;
  45884. char const *__pyx_t_13;
  45885. PyObject *__pyx_t_14 = NULL;
  45886. PyObject *__pyx_t_15 = NULL;
  45887. PyObject *__pyx_t_16 = NULL;
  45888. PyObject *__pyx_t_17 = NULL;
  45889. PyObject *__pyx_t_18 = NULL;
  45890. PyObject *__pyx_t_19 = NULL;
  45891. int __pyx_t_20;
  45892. __Pyx_RefNannySetupContext("remove_signal_handler", 0);
  45893. /* "uvloop/loop.pyx":2808
  45894. * Return True if a signal handler was removed, False if not.
  45895. * """
  45896. * self._check_signal(sig) # <<<<<<<<<<<<<<
  45897. *
  45898. * if not self._listening_signals:
  45899. */
  45900. __pyx_t_1 = __pyx_f_6uvloop_4loop_4Loop__check_signal(__pyx_v_self, __pyx_v_sig); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2808, __pyx_L1_error)
  45901. __Pyx_GOTREF(__pyx_t_1);
  45902. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  45903. /* "uvloop/loop.pyx":2810
  45904. * self._check_signal(sig)
  45905. *
  45906. * if not self._listening_signals: # <<<<<<<<<<<<<<
  45907. * return False
  45908. *
  45909. */
  45910. __pyx_t_2 = ((!(__pyx_v_self->_listening_signals != 0)) != 0);
  45911. if (__pyx_t_2) {
  45912. /* "uvloop/loop.pyx":2811
  45913. *
  45914. * if not self._listening_signals:
  45915. * return False # <<<<<<<<<<<<<<
  45916. *
  45917. * try:
  45918. */
  45919. __Pyx_XDECREF(__pyx_r);
  45920. __Pyx_INCREF(Py_False);
  45921. __pyx_r = Py_False;
  45922. goto __pyx_L0;
  45923. /* "uvloop/loop.pyx":2810
  45924. * self._check_signal(sig)
  45925. *
  45926. * if not self._listening_signals: # <<<<<<<<<<<<<<
  45927. * return False
  45928. *
  45929. */
  45930. }
  45931. /* "uvloop/loop.pyx":2813
  45932. * return False
  45933. *
  45934. * try: # <<<<<<<<<<<<<<
  45935. * del self._signal_handlers[sig]
  45936. * except KeyError:
  45937. */
  45938. {
  45939. __Pyx_PyThreadState_declare
  45940. __Pyx_PyThreadState_assign
  45941. __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
  45942. __Pyx_XGOTREF(__pyx_t_3);
  45943. __Pyx_XGOTREF(__pyx_t_4);
  45944. __Pyx_XGOTREF(__pyx_t_5);
  45945. /*try:*/ {
  45946. /* "uvloop/loop.pyx":2814
  45947. *
  45948. * try:
  45949. * del self._signal_handlers[sig] # <<<<<<<<<<<<<<
  45950. * except KeyError:
  45951. * return False
  45952. */
  45953. if (unlikely(__pyx_v_self->_signal_handlers == Py_None)) {
  45954. PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
  45955. __PYX_ERR(2, 2814, __pyx_L4_error)
  45956. }
  45957. if (unlikely(PyDict_DelItem(__pyx_v_self->_signal_handlers, __pyx_v_sig) < 0)) __PYX_ERR(2, 2814, __pyx_L4_error)
  45958. /* "uvloop/loop.pyx":2813
  45959. * return False
  45960. *
  45961. * try: # <<<<<<<<<<<<<<
  45962. * del self._signal_handlers[sig]
  45963. * except KeyError:
  45964. */
  45965. }
  45966. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  45967. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  45968. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  45969. goto __pyx_L9_try_end;
  45970. __pyx_L4_error:;
  45971. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  45972. /* "uvloop/loop.pyx":2815
  45973. * try:
  45974. * del self._signal_handlers[sig]
  45975. * except KeyError: # <<<<<<<<<<<<<<
  45976. * return False
  45977. *
  45978. */
  45979. __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
  45980. if (__pyx_t_6) {
  45981. __Pyx_AddTraceback("uvloop.loop.Loop.remove_signal_handler", __pyx_clineno, __pyx_lineno, __pyx_filename);
  45982. if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_7, &__pyx_t_8) < 0) __PYX_ERR(2, 2815, __pyx_L6_except_error)
  45983. __Pyx_GOTREF(__pyx_t_1);
  45984. __Pyx_GOTREF(__pyx_t_7);
  45985. __Pyx_GOTREF(__pyx_t_8);
  45986. /* "uvloop/loop.pyx":2816
  45987. * del self._signal_handlers[sig]
  45988. * except KeyError:
  45989. * return False # <<<<<<<<<<<<<<
  45990. *
  45991. * if sig == uv.SIGINT:
  45992. */
  45993. __Pyx_XDECREF(__pyx_r);
  45994. __Pyx_INCREF(Py_False);
  45995. __pyx_r = Py_False;
  45996. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  45997. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  45998. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  45999. goto __pyx_L7_except_return;
  46000. }
  46001. goto __pyx_L6_except_error;
  46002. __pyx_L6_except_error:;
  46003. /* "uvloop/loop.pyx":2813
  46004. * return False
  46005. *
  46006. * try: # <<<<<<<<<<<<<<
  46007. * del self._signal_handlers[sig]
  46008. * except KeyError:
  46009. */
  46010. __Pyx_XGIVEREF(__pyx_t_3);
  46011. __Pyx_XGIVEREF(__pyx_t_4);
  46012. __Pyx_XGIVEREF(__pyx_t_5);
  46013. __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
  46014. goto __pyx_L1_error;
  46015. __pyx_L7_except_return:;
  46016. __Pyx_XGIVEREF(__pyx_t_3);
  46017. __Pyx_XGIVEREF(__pyx_t_4);
  46018. __Pyx_XGIVEREF(__pyx_t_5);
  46019. __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
  46020. goto __pyx_L0;
  46021. __pyx_L9_try_end:;
  46022. }
  46023. /* "uvloop/loop.pyx":2818
  46024. * return False
  46025. *
  46026. * if sig == uv.SIGINT: # <<<<<<<<<<<<<<
  46027. * handler = signal_default_int_handler
  46028. * else:
  46029. */
  46030. __pyx_t_8 = __Pyx_PyInt_From_int(SIGINT); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 2818, __pyx_L1_error)
  46031. __Pyx_GOTREF(__pyx_t_8);
  46032. __pyx_t_7 = PyObject_RichCompare(__pyx_v_sig, __pyx_t_8, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 2818, __pyx_L1_error)
  46033. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  46034. __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(2, 2818, __pyx_L1_error)
  46035. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  46036. if (__pyx_t_2) {
  46037. /* "uvloop/loop.pyx":2819
  46038. *
  46039. * if sig == uv.SIGINT:
  46040. * handler = signal_default_int_handler # <<<<<<<<<<<<<<
  46041. * else:
  46042. * handler = signal_SIG_DFL
  46043. */
  46044. __Pyx_INCREF(__pyx_v_6uvloop_4loop_signal_default_int_handler);
  46045. __pyx_v_handler = __pyx_v_6uvloop_4loop_signal_default_int_handler;
  46046. /* "uvloop/loop.pyx":2818
  46047. * return False
  46048. *
  46049. * if sig == uv.SIGINT: # <<<<<<<<<<<<<<
  46050. * handler = signal_default_int_handler
  46051. * else:
  46052. */
  46053. goto __pyx_L12;
  46054. }
  46055. /* "uvloop/loop.pyx":2821
  46056. * handler = signal_default_int_handler
  46057. * else:
  46058. * handler = signal_SIG_DFL # <<<<<<<<<<<<<<
  46059. *
  46060. * try:
  46061. */
  46062. /*else*/ {
  46063. __Pyx_INCREF(__pyx_v_6uvloop_4loop_signal_SIG_DFL);
  46064. __pyx_v_handler = __pyx_v_6uvloop_4loop_signal_SIG_DFL;
  46065. }
  46066. __pyx_L12:;
  46067. /* "uvloop/loop.pyx":2823
  46068. * handler = signal_SIG_DFL
  46069. *
  46070. * try: # <<<<<<<<<<<<<<
  46071. * signal_signal(sig, handler)
  46072. * except OSError as exc:
  46073. */
  46074. {
  46075. __Pyx_PyThreadState_declare
  46076. __Pyx_PyThreadState_assign
  46077. __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_4, &__pyx_t_3);
  46078. __Pyx_XGOTREF(__pyx_t_5);
  46079. __Pyx_XGOTREF(__pyx_t_4);
  46080. __Pyx_XGOTREF(__pyx_t_3);
  46081. /*try:*/ {
  46082. /* "uvloop/loop.pyx":2824
  46083. *
  46084. * try:
  46085. * signal_signal(sig, handler) # <<<<<<<<<<<<<<
  46086. * except OSError as exc:
  46087. * if exc.errno == errno_EINVAL:
  46088. */
  46089. __Pyx_INCREF(__pyx_v_6uvloop_4loop_signal_signal);
  46090. __pyx_t_8 = __pyx_v_6uvloop_4loop_signal_signal; __pyx_t_1 = NULL;
  46091. __pyx_t_6 = 0;
  46092. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
  46093. __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_8);
  46094. if (likely(__pyx_t_1)) {
  46095. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
  46096. __Pyx_INCREF(__pyx_t_1);
  46097. __Pyx_INCREF(function);
  46098. __Pyx_DECREF_SET(__pyx_t_8, function);
  46099. __pyx_t_6 = 1;
  46100. }
  46101. }
  46102. #if CYTHON_FAST_PYCALL
  46103. if (PyFunction_Check(__pyx_t_8)) {
  46104. PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_sig, __pyx_v_handler};
  46105. __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 2824, __pyx_L13_error)
  46106. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  46107. __Pyx_GOTREF(__pyx_t_7);
  46108. } else
  46109. #endif
  46110. #if CYTHON_FAST_PYCCALL
  46111. if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
  46112. PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_sig, __pyx_v_handler};
  46113. __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 2824, __pyx_L13_error)
  46114. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  46115. __Pyx_GOTREF(__pyx_t_7);
  46116. } else
  46117. #endif
  46118. {
  46119. __pyx_t_9 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 2824, __pyx_L13_error)
  46120. __Pyx_GOTREF(__pyx_t_9);
  46121. if (__pyx_t_1) {
  46122. __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_1); __pyx_t_1 = NULL;
  46123. }
  46124. __Pyx_INCREF(__pyx_v_sig);
  46125. __Pyx_GIVEREF(__pyx_v_sig);
  46126. PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_6, __pyx_v_sig);
  46127. __Pyx_INCREF(__pyx_v_handler);
  46128. __Pyx_GIVEREF(__pyx_v_handler);
  46129. PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_6, __pyx_v_handler);
  46130. __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_9, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 2824, __pyx_L13_error)
  46131. __Pyx_GOTREF(__pyx_t_7);
  46132. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  46133. }
  46134. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  46135. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  46136. /* "uvloop/loop.pyx":2823
  46137. * handler = signal_SIG_DFL
  46138. *
  46139. * try: # <<<<<<<<<<<<<<
  46140. * signal_signal(sig, handler)
  46141. * except OSError as exc:
  46142. */
  46143. }
  46144. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  46145. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  46146. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  46147. goto __pyx_L18_try_end;
  46148. __pyx_L13_error:;
  46149. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  46150. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  46151. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  46152. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  46153. /* "uvloop/loop.pyx":2825
  46154. * try:
  46155. * signal_signal(sig, handler)
  46156. * except OSError as exc: # <<<<<<<<<<<<<<
  46157. * if exc.errno == errno_EINVAL:
  46158. * raise RuntimeError('sig {} cannot be caught'.format(sig))
  46159. */
  46160. __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_OSError);
  46161. if (__pyx_t_6) {
  46162. __Pyx_AddTraceback("uvloop.loop.Loop.remove_signal_handler", __pyx_clineno, __pyx_lineno, __pyx_filename);
  46163. if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9) < 0) __PYX_ERR(2, 2825, __pyx_L15_except_error)
  46164. __Pyx_GOTREF(__pyx_t_7);
  46165. __Pyx_GOTREF(__pyx_t_8);
  46166. __Pyx_GOTREF(__pyx_t_9);
  46167. __Pyx_INCREF(__pyx_t_8);
  46168. __pyx_v_exc = __pyx_t_8;
  46169. /*try:*/ {
  46170. /* "uvloop/loop.pyx":2826
  46171. * signal_signal(sig, handler)
  46172. * except OSError as exc:
  46173. * if exc.errno == errno_EINVAL: # <<<<<<<<<<<<<<
  46174. * raise RuntimeError('sig {} cannot be caught'.format(sig))
  46175. * else:
  46176. */
  46177. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_exc, __pyx_n_s_errno); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2826, __pyx_L24_error)
  46178. __Pyx_GOTREF(__pyx_t_1);
  46179. __pyx_t_10 = PyObject_RichCompare(__pyx_t_1, __pyx_v_6uvloop_4loop_errno_EINVAL, Py_EQ); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 2826, __pyx_L24_error)
  46180. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  46181. __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(2, 2826, __pyx_L24_error)
  46182. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  46183. if (unlikely(__pyx_t_2)) {
  46184. /* "uvloop/loop.pyx":2827
  46185. * except OSError as exc:
  46186. * if exc.errno == errno_EINVAL:
  46187. * raise RuntimeError('sig {} cannot be caught'.format(sig)) # <<<<<<<<<<<<<<
  46188. * else:
  46189. * raise
  46190. */
  46191. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_sig_cannot_be_caught, __pyx_n_s_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2827, __pyx_L24_error)
  46192. __Pyx_GOTREF(__pyx_t_1);
  46193. __pyx_t_11 = NULL;
  46194. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
  46195. __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_1);
  46196. if (likely(__pyx_t_11)) {
  46197. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
  46198. __Pyx_INCREF(__pyx_t_11);
  46199. __Pyx_INCREF(function);
  46200. __Pyx_DECREF_SET(__pyx_t_1, function);
  46201. }
  46202. }
  46203. __pyx_t_10 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_11, __pyx_v_sig) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_sig);
  46204. __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
  46205. if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 2827, __pyx_L24_error)
  46206. __Pyx_GOTREF(__pyx_t_10);
  46207. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  46208. __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2827, __pyx_L24_error)
  46209. __Pyx_GOTREF(__pyx_t_1);
  46210. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  46211. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  46212. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  46213. __PYX_ERR(2, 2827, __pyx_L24_error)
  46214. /* "uvloop/loop.pyx":2826
  46215. * signal_signal(sig, handler)
  46216. * except OSError as exc:
  46217. * if exc.errno == errno_EINVAL: # <<<<<<<<<<<<<<
  46218. * raise RuntimeError('sig {} cannot be caught'.format(sig))
  46219. * else:
  46220. */
  46221. }
  46222. /* "uvloop/loop.pyx":2829
  46223. * raise RuntimeError('sig {} cannot be caught'.format(sig))
  46224. * else:
  46225. * raise # <<<<<<<<<<<<<<
  46226. *
  46227. * if not self._signal_handlers:
  46228. */
  46229. /*else*/ {
  46230. __Pyx_GIVEREF(__pyx_t_7);
  46231. __Pyx_GIVEREF(__pyx_t_8);
  46232. __Pyx_XGIVEREF(__pyx_t_9);
  46233. __Pyx_ErrRestoreWithState(__pyx_t_7, __pyx_t_8, __pyx_t_9);
  46234. __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0;
  46235. __PYX_ERR(2, 2829, __pyx_L24_error)
  46236. }
  46237. }
  46238. /* "uvloop/loop.pyx":2825
  46239. * try:
  46240. * signal_signal(sig, handler)
  46241. * except OSError as exc: # <<<<<<<<<<<<<<
  46242. * if exc.errno == errno_EINVAL:
  46243. * raise RuntimeError('sig {} cannot be caught'.format(sig))
  46244. */
  46245. /*finally:*/ {
  46246. __pyx_L24_error:;
  46247. /*exception exit:*/{
  46248. __Pyx_PyThreadState_declare
  46249. __Pyx_PyThreadState_assign
  46250. __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0;
  46251. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  46252. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  46253. __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
  46254. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19);
  46255. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16) < 0)) __Pyx_ErrFetch(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16);
  46256. __Pyx_XGOTREF(__pyx_t_14);
  46257. __Pyx_XGOTREF(__pyx_t_15);
  46258. __Pyx_XGOTREF(__pyx_t_16);
  46259. __Pyx_XGOTREF(__pyx_t_17);
  46260. __Pyx_XGOTREF(__pyx_t_18);
  46261. __Pyx_XGOTREF(__pyx_t_19);
  46262. __pyx_t_6 = __pyx_lineno; __pyx_t_12 = __pyx_clineno; __pyx_t_13 = __pyx_filename;
  46263. {
  46264. __Pyx_DECREF(__pyx_v_exc);
  46265. __pyx_v_exc = NULL;
  46266. }
  46267. if (PY_MAJOR_VERSION >= 3) {
  46268. __Pyx_XGIVEREF(__pyx_t_17);
  46269. __Pyx_XGIVEREF(__pyx_t_18);
  46270. __Pyx_XGIVEREF(__pyx_t_19);
  46271. __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_18, __pyx_t_19);
  46272. }
  46273. __Pyx_XGIVEREF(__pyx_t_14);
  46274. __Pyx_XGIVEREF(__pyx_t_15);
  46275. __Pyx_XGIVEREF(__pyx_t_16);
  46276. __Pyx_ErrRestore(__pyx_t_14, __pyx_t_15, __pyx_t_16);
  46277. __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0;
  46278. __pyx_lineno = __pyx_t_6; __pyx_clineno = __pyx_t_12; __pyx_filename = __pyx_t_13;
  46279. goto __pyx_L15_except_error;
  46280. }
  46281. }
  46282. }
  46283. goto __pyx_L15_except_error;
  46284. __pyx_L15_except_error:;
  46285. /* "uvloop/loop.pyx":2823
  46286. * handler = signal_SIG_DFL
  46287. *
  46288. * try: # <<<<<<<<<<<<<<
  46289. * signal_signal(sig, handler)
  46290. * except OSError as exc:
  46291. */
  46292. __Pyx_XGIVEREF(__pyx_t_5);
  46293. __Pyx_XGIVEREF(__pyx_t_4);
  46294. __Pyx_XGIVEREF(__pyx_t_3);
  46295. __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_4, __pyx_t_3);
  46296. goto __pyx_L1_error;
  46297. __pyx_L18_try_end:;
  46298. }
  46299. /* "uvloop/loop.pyx":2831
  46300. * raise
  46301. *
  46302. * if not self._signal_handlers: # <<<<<<<<<<<<<<
  46303. * self._shutdown_signals()
  46304. *
  46305. */
  46306. __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_self->_signal_handlers); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(2, 2831, __pyx_L1_error)
  46307. __pyx_t_20 = ((!__pyx_t_2) != 0);
  46308. if (__pyx_t_20) {
  46309. /* "uvloop/loop.pyx":2832
  46310. *
  46311. * if not self._signal_handlers:
  46312. * self._shutdown_signals() # <<<<<<<<<<<<<<
  46313. *
  46314. * return True
  46315. */
  46316. __pyx_t_9 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_vtab)->_shutdown_signals(__pyx_v_self); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 2832, __pyx_L1_error)
  46317. __Pyx_GOTREF(__pyx_t_9);
  46318. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  46319. /* "uvloop/loop.pyx":2831
  46320. * raise
  46321. *
  46322. * if not self._signal_handlers: # <<<<<<<<<<<<<<
  46323. * self._shutdown_signals()
  46324. *
  46325. */
  46326. }
  46327. /* "uvloop/loop.pyx":2834
  46328. * self._shutdown_signals()
  46329. *
  46330. * return True # <<<<<<<<<<<<<<
  46331. *
  46332. * @cython.iterable_coroutine
  46333. */
  46334. __Pyx_XDECREF(__pyx_r);
  46335. __Pyx_INCREF(Py_True);
  46336. __pyx_r = Py_True;
  46337. goto __pyx_L0;
  46338. /* "uvloop/loop.pyx":2803
  46339. * raise
  46340. *
  46341. * def remove_signal_handler(self, sig): # <<<<<<<<<<<<<<
  46342. * """Remove a handler for a signal. UNIX only.
  46343. *
  46344. */
  46345. /* function exit code */
  46346. __pyx_L1_error:;
  46347. __Pyx_XDECREF(__pyx_t_1);
  46348. __Pyx_XDECREF(__pyx_t_7);
  46349. __Pyx_XDECREF(__pyx_t_8);
  46350. __Pyx_XDECREF(__pyx_t_9);
  46351. __Pyx_XDECREF(__pyx_t_10);
  46352. __Pyx_XDECREF(__pyx_t_11);
  46353. __Pyx_AddTraceback("uvloop.loop.Loop.remove_signal_handler", __pyx_clineno, __pyx_lineno, __pyx_filename);
  46354. __pyx_r = NULL;
  46355. __pyx_L0:;
  46356. __Pyx_XDECREF(__pyx_v_handler);
  46357. __Pyx_XDECREF(__pyx_v_exc);
  46358. __Pyx_XGIVEREF(__pyx_r);
  46359. __Pyx_RefNannyFinishContext();
  46360. return __pyx_r;
  46361. }
  46362. static PyObject *__pyx_gb_6uvloop_4loop_4Loop_126generator18(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
  46363. /* "uvloop/loop.pyx":2837
  46364. *
  46365. * @cython.iterable_coroutine
  46366. * async def create_datagram_endpoint(self, protocol_factory, # <<<<<<<<<<<<<<
  46367. * local_addr=None, remote_addr=None, *,
  46368. * family=0, proto=0, flags=0,
  46369. */
  46370. /* Python wrapper */
  46371. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_125create_datagram_endpoint(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  46372. static char __pyx_doc_6uvloop_4loop_4Loop_124create_datagram_endpoint[] = "Loop.create_datagram_endpoint(self, protocol_factory, local_addr=None, remote_addr=None, *, family=0, proto=0, flags=0, reuse_address=None, reuse_port=None, allow_broadcast=None, sock=None)\nA coroutine which creates a datagram endpoint.\n\n This method will try to establish the endpoint in the background.\n When successful, the coroutine returns a (transport, protocol) pair.\n\n protocol_factory must be a callable returning a protocol instance.\n\n socket family AF_INET or socket.AF_INET6 depending on host (or\n family if specified), socket type SOCK_DGRAM.\n\n reuse_address tells the kernel to reuse a local socket in\n TIME_WAIT state, without waiting for its natural timeout to\n expire. If not specified it will automatically be set to True on\n UNIX.\n\n reuse_port tells the kernel to allow this endpoint to be bound to\n the same port as other existing endpoints are bound to, so long as\n they all set this flag when being created. This option is not\n supported on Windows and some UNIX's. If the\n :py:data:`~socket.SO_REUSEPORT` constant is not defined then this\n capability is unsupported.\n\n allow_broadcast tells the kernel to allow this endpoint to send\n messages to the broadcast address.\n\n sock can optionally be specified in order to use a preexisting\n socket object.\n ";
  46373. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_125create_datagram_endpoint(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  46374. PyObject *__pyx_v_protocol_factory = 0;
  46375. PyObject *__pyx_v_local_addr = 0;
  46376. PyObject *__pyx_v_remote_addr = 0;
  46377. PyObject *__pyx_v_family = 0;
  46378. PyObject *__pyx_v_proto = 0;
  46379. PyObject *__pyx_v_flags = 0;
  46380. PyObject *__pyx_v_reuse_address = 0;
  46381. PyObject *__pyx_v_reuse_port = 0;
  46382. PyObject *__pyx_v_allow_broadcast = 0;
  46383. PyObject *__pyx_v_sock = 0;
  46384. PyObject *__pyx_r = 0;
  46385. __Pyx_RefNannyDeclarations
  46386. __Pyx_RefNannySetupContext("create_datagram_endpoint (wrapper)", 0);
  46387. {
  46388. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_protocol_factory,&__pyx_n_s_local_addr,&__pyx_n_s_remote_addr,&__pyx_n_s_family,&__pyx_n_s_proto,&__pyx_n_s_flags,&__pyx_n_s_reuse_address,&__pyx_n_s_reuse_port,&__pyx_n_s_allow_broadcast,&__pyx_n_s_sock,0};
  46389. PyObject* values[10] = {0,0,0,0,0,0,0,0,0,0};
  46390. /* "uvloop/loop.pyx":2838
  46391. * @cython.iterable_coroutine
  46392. * async def create_datagram_endpoint(self, protocol_factory,
  46393. * local_addr=None, remote_addr=None, *, # <<<<<<<<<<<<<<
  46394. * family=0, proto=0, flags=0,
  46395. * reuse_address=None, reuse_port=None,
  46396. */
  46397. values[1] = ((PyObject *)Py_None);
  46398. values[2] = ((PyObject *)Py_None);
  46399. values[3] = ((PyObject *)__pyx_int_0);
  46400. values[4] = ((PyObject *)__pyx_int_0);
  46401. values[5] = ((PyObject *)__pyx_int_0);
  46402. /* "uvloop/loop.pyx":2840
  46403. * local_addr=None, remote_addr=None, *,
  46404. * family=0, proto=0, flags=0,
  46405. * reuse_address=None, reuse_port=None, # <<<<<<<<<<<<<<
  46406. * allow_broadcast=None, sock=None):
  46407. * """A coroutine which creates a datagram endpoint.
  46408. */
  46409. values[6] = ((PyObject *)Py_None);
  46410. values[7] = ((PyObject *)Py_None);
  46411. /* "uvloop/loop.pyx":2841
  46412. * family=0, proto=0, flags=0,
  46413. * reuse_address=None, reuse_port=None,
  46414. * allow_broadcast=None, sock=None): # <<<<<<<<<<<<<<
  46415. * """A coroutine which creates a datagram endpoint.
  46416. *
  46417. */
  46418. values[8] = ((PyObject *)Py_None);
  46419. values[9] = ((PyObject *)Py_None);
  46420. if (unlikely(__pyx_kwds)) {
  46421. Py_ssize_t kw_args;
  46422. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  46423. switch (pos_args) {
  46424. case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
  46425. CYTHON_FALLTHROUGH;
  46426. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  46427. CYTHON_FALLTHROUGH;
  46428. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  46429. CYTHON_FALLTHROUGH;
  46430. case 0: break;
  46431. default: goto __pyx_L5_argtuple_error;
  46432. }
  46433. kw_args = PyDict_Size(__pyx_kwds);
  46434. switch (pos_args) {
  46435. case 0:
  46436. if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_protocol_factory)) != 0)) kw_args--;
  46437. else goto __pyx_L5_argtuple_error;
  46438. CYTHON_FALLTHROUGH;
  46439. case 1:
  46440. if (kw_args > 0) {
  46441. PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_local_addr);
  46442. if (value) { values[1] = value; kw_args--; }
  46443. }
  46444. CYTHON_FALLTHROUGH;
  46445. case 2:
  46446. if (kw_args > 0) {
  46447. PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_remote_addr);
  46448. if (value) { values[2] = value; kw_args--; }
  46449. }
  46450. }
  46451. if (kw_args > 0 && likely(kw_args <= 7)) {
  46452. Py_ssize_t index;
  46453. for (index = 3; index < 10 && kw_args > 0; index++) {
  46454. PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, *__pyx_pyargnames[index]);
  46455. if (value) { values[index] = value; kw_args--; }
  46456. }
  46457. }
  46458. if (unlikely(kw_args > 0)) {
  46459. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "create_datagram_endpoint") < 0)) __PYX_ERR(2, 2837, __pyx_L3_error)
  46460. }
  46461. } else {
  46462. switch (PyTuple_GET_SIZE(__pyx_args)) {
  46463. case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
  46464. CYTHON_FALLTHROUGH;
  46465. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  46466. CYTHON_FALLTHROUGH;
  46467. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  46468. break;
  46469. default: goto __pyx_L5_argtuple_error;
  46470. }
  46471. }
  46472. __pyx_v_protocol_factory = values[0];
  46473. __pyx_v_local_addr = values[1];
  46474. __pyx_v_remote_addr = values[2];
  46475. __pyx_v_family = values[3];
  46476. __pyx_v_proto = values[4];
  46477. __pyx_v_flags = values[5];
  46478. __pyx_v_reuse_address = values[6];
  46479. __pyx_v_reuse_port = values[7];
  46480. __pyx_v_allow_broadcast = values[8];
  46481. __pyx_v_sock = values[9];
  46482. }
  46483. goto __pyx_L4_argument_unpacking_done;
  46484. __pyx_L5_argtuple_error:;
  46485. __Pyx_RaiseArgtupleInvalid("create_datagram_endpoint", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 2837, __pyx_L3_error)
  46486. __pyx_L3_error:;
  46487. __Pyx_AddTraceback("uvloop.loop.Loop.create_datagram_endpoint", __pyx_clineno, __pyx_lineno, __pyx_filename);
  46488. __Pyx_RefNannyFinishContext();
  46489. return NULL;
  46490. __pyx_L4_argument_unpacking_done:;
  46491. __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_124create_datagram_endpoint(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self), __pyx_v_protocol_factory, __pyx_v_local_addr, __pyx_v_remote_addr, __pyx_v_family, __pyx_v_proto, __pyx_v_flags, __pyx_v_reuse_address, __pyx_v_reuse_port, __pyx_v_allow_broadcast, __pyx_v_sock);
  46492. /* "uvloop/loop.pyx":2837
  46493. *
  46494. * @cython.iterable_coroutine
  46495. * async def create_datagram_endpoint(self, protocol_factory, # <<<<<<<<<<<<<<
  46496. * local_addr=None, remote_addr=None, *,
  46497. * family=0, proto=0, flags=0,
  46498. */
  46499. /* function exit code */
  46500. __Pyx_RefNannyFinishContext();
  46501. return __pyx_r;
  46502. }
  46503. static PyObject *__pyx_gb_6uvloop_4loop_4Loop_24create_datagram_endpoint_2generator28(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
  46504. /* "uvloop/loop.pyx":2888
  46505. * allow_broadcast=allow_broadcast)
  46506. * problems = ', '.join(
  46507. * '{}={}'.format(k, v) for k, v in opts.items() if v) # <<<<<<<<<<<<<<
  46508. * raise ValueError(
  46509. * 'socket modifier keyword arguments can not be used '
  46510. */
  46511. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_24create_datagram_endpoint_genexpr(PyObject *__pyx_self) {
  46512. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_26_genexpr *__pyx_cur_scope;
  46513. PyObject *__pyx_r = NULL;
  46514. __Pyx_RefNannyDeclarations
  46515. __Pyx_RefNannySetupContext("genexpr", 0);
  46516. __pyx_cur_scope = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_26_genexpr *)__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_26_genexpr(__pyx_ptype_6uvloop_4loop___pyx_scope_struct_26_genexpr, __pyx_empty_tuple, NULL);
  46517. if (unlikely(!__pyx_cur_scope)) {
  46518. __pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_26_genexpr *)Py_None);
  46519. __Pyx_INCREF(Py_None);
  46520. __PYX_ERR(2, 2888, __pyx_L1_error)
  46521. } else {
  46522. __Pyx_GOTREF(__pyx_cur_scope);
  46523. }
  46524. __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_25_create_datagram_endpoint *) __pyx_self;
  46525. __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
  46526. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
  46527. {
  46528. __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_6uvloop_4loop_4Loop_24create_datagram_endpoint_2generator28, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_create_datagram_endpoint_locals, __pyx_n_s_uvloop_loop); if (unlikely(!gen)) __PYX_ERR(2, 2888, __pyx_L1_error)
  46529. __Pyx_DECREF(__pyx_cur_scope);
  46530. __Pyx_RefNannyFinishContext();
  46531. return (PyObject *) gen;
  46532. }
  46533. /* function exit code */
  46534. __pyx_L1_error:;
  46535. __Pyx_AddTraceback("uvloop.loop.Loop.create_datagram_endpoint.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  46536. __pyx_r = NULL;
  46537. __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  46538. __Pyx_XGIVEREF(__pyx_r);
  46539. __Pyx_RefNannyFinishContext();
  46540. return __pyx_r;
  46541. }
  46542. static PyObject *__pyx_gb_6uvloop_4loop_4Loop_24create_datagram_endpoint_2generator28(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
  46543. {
  46544. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_26_genexpr *__pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_26_genexpr *)__pyx_generator->closure);
  46545. PyObject *__pyx_r = NULL;
  46546. PyObject *__pyx_t_1 = NULL;
  46547. Py_ssize_t __pyx_t_2;
  46548. Py_ssize_t __pyx_t_3;
  46549. int __pyx_t_4;
  46550. PyObject *__pyx_t_5 = NULL;
  46551. PyObject *__pyx_t_6 = NULL;
  46552. int __pyx_t_7;
  46553. int __pyx_t_8;
  46554. PyObject *__pyx_t_9 = NULL;
  46555. PyObject *__pyx_t_10 = NULL;
  46556. __Pyx_RefNannyDeclarations
  46557. __Pyx_RefNannySetupContext("genexpr", 0);
  46558. switch (__pyx_generator->resume_label) {
  46559. case 0: goto __pyx_L3_first_run;
  46560. default: /* CPython raises the right error here */
  46561. __Pyx_RefNannyFinishContext();
  46562. return NULL;
  46563. }
  46564. __pyx_L3_first_run:;
  46565. if (unlikely(!__pyx_sent_value)) __PYX_ERR(2, 2888, __pyx_L1_error)
  46566. __pyx_r = PyList_New(0); if (unlikely(!__pyx_r)) __PYX_ERR(2, 2888, __pyx_L1_error)
  46567. __Pyx_GOTREF(__pyx_r);
  46568. __pyx_t_2 = 0;
  46569. if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_opts)) { __Pyx_RaiseClosureNameError("opts"); __PYX_ERR(2, 2888, __pyx_L1_error) }
  46570. if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_opts == Py_None)) {
  46571. PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items");
  46572. __PYX_ERR(2, 2888, __pyx_L1_error)
  46573. }
  46574. __pyx_t_5 = __Pyx_dict_iterator(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_opts, 1, __pyx_n_s_items, (&__pyx_t_3), (&__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2888, __pyx_L1_error)
  46575. __Pyx_GOTREF(__pyx_t_5);
  46576. __Pyx_XDECREF(__pyx_t_1);
  46577. __pyx_t_1 = __pyx_t_5;
  46578. __pyx_t_5 = 0;
  46579. while (1) {
  46580. __pyx_t_7 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_3, &__pyx_t_2, &__pyx_t_5, &__pyx_t_6, NULL, __pyx_t_4);
  46581. if (unlikely(__pyx_t_7 == 0)) break;
  46582. if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(2, 2888, __pyx_L1_error)
  46583. __Pyx_GOTREF(__pyx_t_5);
  46584. __Pyx_GOTREF(__pyx_t_6);
  46585. __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_k);
  46586. __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_k, __pyx_t_5);
  46587. __Pyx_GIVEREF(__pyx_t_5);
  46588. __pyx_t_5 = 0;
  46589. __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_v);
  46590. __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_v, __pyx_t_6);
  46591. __Pyx_GIVEREF(__pyx_t_6);
  46592. __pyx_t_6 = 0;
  46593. __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_v); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(2, 2888, __pyx_L1_error)
  46594. if (__pyx_t_8) {
  46595. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__78, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2888, __pyx_L1_error)
  46596. __Pyx_GOTREF(__pyx_t_5);
  46597. __pyx_t_9 = NULL;
  46598. __pyx_t_7 = 0;
  46599. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
  46600. __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5);
  46601. if (likely(__pyx_t_9)) {
  46602. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
  46603. __Pyx_INCREF(__pyx_t_9);
  46604. __Pyx_INCREF(function);
  46605. __Pyx_DECREF_SET(__pyx_t_5, function);
  46606. __pyx_t_7 = 1;
  46607. }
  46608. }
  46609. #if CYTHON_FAST_PYCALL
  46610. if (PyFunction_Check(__pyx_t_5)) {
  46611. PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_cur_scope->__pyx_v_k, __pyx_cur_scope->__pyx_v_v};
  46612. __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 2888, __pyx_L1_error)
  46613. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  46614. __Pyx_GOTREF(__pyx_t_6);
  46615. } else
  46616. #endif
  46617. #if CYTHON_FAST_PYCCALL
  46618. if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
  46619. PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_cur_scope->__pyx_v_k, __pyx_cur_scope->__pyx_v_v};
  46620. __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 2888, __pyx_L1_error)
  46621. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  46622. __Pyx_GOTREF(__pyx_t_6);
  46623. } else
  46624. #endif
  46625. {
  46626. __pyx_t_10 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 2888, __pyx_L1_error)
  46627. __Pyx_GOTREF(__pyx_t_10);
  46628. if (__pyx_t_9) {
  46629. __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9); __pyx_t_9 = NULL;
  46630. }
  46631. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_k);
  46632. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_k);
  46633. PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_7, __pyx_cur_scope->__pyx_v_k);
  46634. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_v);
  46635. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_v);
  46636. PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_7, __pyx_cur_scope->__pyx_v_v);
  46637. __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_10, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 2888, __pyx_L1_error)
  46638. __Pyx_GOTREF(__pyx_t_6);
  46639. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  46640. }
  46641. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  46642. if (unlikely(__Pyx_ListComp_Append(__pyx_r, (PyObject*)__pyx_t_6))) __PYX_ERR(2, 2888, __pyx_L1_error)
  46643. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  46644. }
  46645. }
  46646. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  46647. CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
  46648. /* function exit code */
  46649. goto __pyx_L0;
  46650. __pyx_L1_error:;
  46651. __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  46652. __Pyx_XDECREF(__pyx_t_1);
  46653. __Pyx_XDECREF(__pyx_t_5);
  46654. __Pyx_XDECREF(__pyx_t_6);
  46655. __Pyx_XDECREF(__pyx_t_9);
  46656. __Pyx_XDECREF(__pyx_t_10);
  46657. __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  46658. __pyx_L0:;
  46659. __Pyx_XGIVEREF(__pyx_r);
  46660. #if !CYTHON_USE_EXC_INFO_STACK
  46661. __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  46662. #endif
  46663. __pyx_generator->resume_label = -1;
  46664. __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  46665. __Pyx_RefNannyFinishContext();
  46666. return __pyx_r;
  46667. }
  46668. /* "uvloop/loop.pyx":2837
  46669. *
  46670. * @cython.iterable_coroutine
  46671. * async def create_datagram_endpoint(self, protocol_factory, # <<<<<<<<<<<<<<
  46672. * local_addr=None, remote_addr=None, *,
  46673. * family=0, proto=0, flags=0,
  46674. */
  46675. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_124create_datagram_endpoint(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_protocol_factory, PyObject *__pyx_v_local_addr, PyObject *__pyx_v_remote_addr, PyObject *__pyx_v_family, PyObject *__pyx_v_proto, PyObject *__pyx_v_flags, PyObject *__pyx_v_reuse_address, PyObject *__pyx_v_reuse_port, PyObject *__pyx_v_allow_broadcast, PyObject *__pyx_v_sock) {
  46676. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_25_create_datagram_endpoint *__pyx_cur_scope;
  46677. PyObject *__pyx_r = NULL;
  46678. __Pyx_RefNannyDeclarations
  46679. __Pyx_RefNannySetupContext("create_datagram_endpoint", 0);
  46680. __pyx_cur_scope = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_25_create_datagram_endpoint *)__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_25_create_datagram_endpoint(__pyx_ptype_6uvloop_4loop___pyx_scope_struct_25_create_datagram_endpoint, __pyx_empty_tuple, NULL);
  46681. if (unlikely(!__pyx_cur_scope)) {
  46682. __pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_25_create_datagram_endpoint *)Py_None);
  46683. __Pyx_INCREF(Py_None);
  46684. __PYX_ERR(2, 2837, __pyx_L1_error)
  46685. } else {
  46686. __Pyx_GOTREF(__pyx_cur_scope);
  46687. }
  46688. __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  46689. __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  46690. __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  46691. __pyx_cur_scope->__pyx_v_protocol_factory = __pyx_v_protocol_factory;
  46692. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_protocol_factory);
  46693. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_protocol_factory);
  46694. __pyx_cur_scope->__pyx_v_local_addr = __pyx_v_local_addr;
  46695. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_local_addr);
  46696. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_local_addr);
  46697. __pyx_cur_scope->__pyx_v_remote_addr = __pyx_v_remote_addr;
  46698. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_remote_addr);
  46699. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_remote_addr);
  46700. __pyx_cur_scope->__pyx_v_family = __pyx_v_family;
  46701. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_family);
  46702. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_family);
  46703. __pyx_cur_scope->__pyx_v_proto = __pyx_v_proto;
  46704. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_proto);
  46705. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_proto);
  46706. __pyx_cur_scope->__pyx_v_flags = __pyx_v_flags;
  46707. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_flags);
  46708. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_flags);
  46709. __pyx_cur_scope->__pyx_v_reuse_address = __pyx_v_reuse_address;
  46710. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_reuse_address);
  46711. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_reuse_address);
  46712. __pyx_cur_scope->__pyx_v_reuse_port = __pyx_v_reuse_port;
  46713. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_reuse_port);
  46714. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_reuse_port);
  46715. __pyx_cur_scope->__pyx_v_allow_broadcast = __pyx_v_allow_broadcast;
  46716. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_allow_broadcast);
  46717. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_allow_broadcast);
  46718. __pyx_cur_scope->__pyx_v_sock = __pyx_v_sock;
  46719. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_sock);
  46720. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_sock);
  46721. {
  46722. __pyx_CoroutineObject *gen = __Pyx_IterableCoroutine_New((__pyx_coroutine_body_t) __pyx_gb_6uvloop_4loop_4Loop_126generator18, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_create_datagram_endpoint, __pyx_n_s_Loop_create_datagram_endpoint, __pyx_n_s_uvloop_loop); if (unlikely(!gen)) __PYX_ERR(2, 2837, __pyx_L1_error)
  46723. __Pyx_DECREF(__pyx_cur_scope);
  46724. __Pyx_RefNannyFinishContext();
  46725. return (PyObject *) gen;
  46726. }
  46727. /* function exit code */
  46728. __pyx_L1_error:;
  46729. __Pyx_AddTraceback("uvloop.loop.Loop.create_datagram_endpoint", __pyx_clineno, __pyx_lineno, __pyx_filename);
  46730. __pyx_r = NULL;
  46731. __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  46732. __Pyx_XGIVEREF(__pyx_r);
  46733. __Pyx_RefNannyFinishContext();
  46734. return __pyx_r;
  46735. }
  46736. static PyObject *__pyx_gb_6uvloop_4loop_4Loop_126generator18(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
  46737. {
  46738. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_25_create_datagram_endpoint *__pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_25_create_datagram_endpoint *)__pyx_generator->closure);
  46739. PyObject *__pyx_r = NULL;
  46740. int __pyx_t_1;
  46741. int __pyx_t_2;
  46742. PyObject *__pyx_t_3 = NULL;
  46743. PyObject *__pyx_t_4 = NULL;
  46744. PyObject *__pyx_t_5 = NULL;
  46745. int __pyx_t_6;
  46746. int __pyx_t_7;
  46747. int __pyx_t_8;
  46748. int __pyx_t_9;
  46749. Py_ssize_t __pyx_t_10;
  46750. int __pyx_t_11;
  46751. struct addrinfo *__pyx_t_12;
  46752. unsigned int __pyx_t_13;
  46753. PyObject *__pyx_t_14 = NULL;
  46754. PyObject *__pyx_t_15 = NULL;
  46755. PyObject *__pyx_t_16 = NULL;
  46756. int __pyx_t_17;
  46757. char const *__pyx_t_18;
  46758. PyObject *__pyx_t_19 = NULL;
  46759. PyObject *__pyx_t_20 = NULL;
  46760. PyObject *__pyx_t_21 = NULL;
  46761. PyObject *__pyx_t_22 = NULL;
  46762. PyObject *__pyx_t_23 = NULL;
  46763. PyObject *__pyx_t_24 = NULL;
  46764. __Pyx_RefNannyDeclarations
  46765. __Pyx_RefNannySetupContext("create_datagram_endpoint", 0);
  46766. switch (__pyx_generator->resume_label) {
  46767. case 0: goto __pyx_L3_first_run;
  46768. case 1: goto __pyx_L24_resume_from_await;
  46769. case 2: goto __pyx_L31_resume_from_await;
  46770. case 3: goto __pyx_L67_resume_from_await;
  46771. default: /* CPython raises the right error here */
  46772. __Pyx_RefNannyFinishContext();
  46773. return NULL;
  46774. }
  46775. __pyx_L3_first_run:;
  46776. if (unlikely(!__pyx_sent_value)) __PYX_ERR(2, 2837, __pyx_L1_error)
  46777. /* "uvloop/loop.pyx":2871
  46778. * """
  46779. * cdef:
  46780. * UDPTransport udp = None # <<<<<<<<<<<<<<
  46781. * system.addrinfo * lai
  46782. * system.addrinfo * rai
  46783. */
  46784. __Pyx_INCREF(Py_None);
  46785. __Pyx_GIVEREF(Py_None);
  46786. __pyx_cur_scope->__pyx_v_udp = ((struct __pyx_obj_6uvloop_4loop_UDPTransport *)Py_None);
  46787. /* "uvloop/loop.pyx":2875
  46788. * system.addrinfo * rai
  46789. *
  46790. * if sock is not None: # <<<<<<<<<<<<<<
  46791. * if not _is_sock_dgram(sock.type):
  46792. * raise ValueError(
  46793. */
  46794. __pyx_t_1 = (__pyx_cur_scope->__pyx_v_sock != Py_None);
  46795. __pyx_t_2 = (__pyx_t_1 != 0);
  46796. if (__pyx_t_2) {
  46797. /* "uvloop/loop.pyx":2876
  46798. *
  46799. * if sock is not None:
  46800. * if not _is_sock_dgram(sock.type): # <<<<<<<<<<<<<<
  46801. * raise ValueError(
  46802. * 'A UDP Socket was expected, got {!r}'.format(sock))
  46803. */
  46804. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_sock, __pyx_n_s_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2876, __pyx_L1_error)
  46805. __Pyx_GOTREF(__pyx_t_3);
  46806. __pyx_t_4 = __pyx_f_6uvloop_4loop__is_sock_dgram(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2876, __pyx_L1_error)
  46807. __Pyx_GOTREF(__pyx_t_4);
  46808. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  46809. __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(2, 2876, __pyx_L1_error)
  46810. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  46811. __pyx_t_1 = ((!__pyx_t_2) != 0);
  46812. if (unlikely(__pyx_t_1)) {
  46813. /* "uvloop/loop.pyx":2878
  46814. * if not _is_sock_dgram(sock.type):
  46815. * raise ValueError(
  46816. * 'A UDP Socket was expected, got {!r}'.format(sock)) # <<<<<<<<<<<<<<
  46817. * if (local_addr or remote_addr or
  46818. * family or proto or flags or
  46819. */
  46820. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_A_UDP_Socket_was_expected_got_r, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2878, __pyx_L1_error)
  46821. __Pyx_GOTREF(__pyx_t_3);
  46822. __pyx_t_5 = NULL;
  46823. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
  46824. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
  46825. if (likely(__pyx_t_5)) {
  46826. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  46827. __Pyx_INCREF(__pyx_t_5);
  46828. __Pyx_INCREF(function);
  46829. __Pyx_DECREF_SET(__pyx_t_3, function);
  46830. }
  46831. }
  46832. __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_cur_scope->__pyx_v_sock) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_cur_scope->__pyx_v_sock);
  46833. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  46834. if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2878, __pyx_L1_error)
  46835. __Pyx_GOTREF(__pyx_t_4);
  46836. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  46837. /* "uvloop/loop.pyx":2877
  46838. * if sock is not None:
  46839. * if not _is_sock_dgram(sock.type):
  46840. * raise ValueError( # <<<<<<<<<<<<<<
  46841. * 'A UDP Socket was expected, got {!r}'.format(sock))
  46842. * if (local_addr or remote_addr or
  46843. */
  46844. __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2877, __pyx_L1_error)
  46845. __Pyx_GOTREF(__pyx_t_3);
  46846. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  46847. __Pyx_Raise(__pyx_t_3, 0, 0, 0);
  46848. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  46849. __PYX_ERR(2, 2877, __pyx_L1_error)
  46850. /* "uvloop/loop.pyx":2876
  46851. *
  46852. * if sock is not None:
  46853. * if not _is_sock_dgram(sock.type): # <<<<<<<<<<<<<<
  46854. * raise ValueError(
  46855. * 'A UDP Socket was expected, got {!r}'.format(sock))
  46856. */
  46857. }
  46858. /* "uvloop/loop.pyx":2879
  46859. * raise ValueError(
  46860. * 'A UDP Socket was expected, got {!r}'.format(sock))
  46861. * if (local_addr or remote_addr or # <<<<<<<<<<<<<<
  46862. * family or proto or flags or
  46863. * reuse_address or reuse_port or allow_broadcast):
  46864. */
  46865. __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_local_addr); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(2, 2879, __pyx_L1_error)
  46866. if (!__pyx_t_2) {
  46867. } else {
  46868. __pyx_t_1 = __pyx_t_2;
  46869. goto __pyx_L7_bool_binop_done;
  46870. }
  46871. __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_remote_addr); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(2, 2879, __pyx_L1_error)
  46872. if (!__pyx_t_2) {
  46873. } else {
  46874. __pyx_t_1 = __pyx_t_2;
  46875. goto __pyx_L7_bool_binop_done;
  46876. }
  46877. /* "uvloop/loop.pyx":2880
  46878. * 'A UDP Socket was expected, got {!r}'.format(sock))
  46879. * if (local_addr or remote_addr or
  46880. * family or proto or flags or # <<<<<<<<<<<<<<
  46881. * reuse_address or reuse_port or allow_broadcast):
  46882. * # show the problematic kwargs in exception msg
  46883. */
  46884. __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_family); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(2, 2880, __pyx_L1_error)
  46885. if (!__pyx_t_2) {
  46886. } else {
  46887. __pyx_t_1 = __pyx_t_2;
  46888. goto __pyx_L7_bool_binop_done;
  46889. }
  46890. __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_proto); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(2, 2880, __pyx_L1_error)
  46891. if (!__pyx_t_2) {
  46892. } else {
  46893. __pyx_t_1 = __pyx_t_2;
  46894. goto __pyx_L7_bool_binop_done;
  46895. }
  46896. __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_flags); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(2, 2880, __pyx_L1_error)
  46897. if (!__pyx_t_2) {
  46898. } else {
  46899. __pyx_t_1 = __pyx_t_2;
  46900. goto __pyx_L7_bool_binop_done;
  46901. }
  46902. /* "uvloop/loop.pyx":2881
  46903. * if (local_addr or remote_addr or
  46904. * family or proto or flags or
  46905. * reuse_address or reuse_port or allow_broadcast): # <<<<<<<<<<<<<<
  46906. * # show the problematic kwargs in exception msg
  46907. * opts = dict(local_addr=local_addr, remote_addr=remote_addr,
  46908. */
  46909. __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_reuse_address); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(2, 2881, __pyx_L1_error)
  46910. if (!__pyx_t_2) {
  46911. } else {
  46912. __pyx_t_1 = __pyx_t_2;
  46913. goto __pyx_L7_bool_binop_done;
  46914. }
  46915. __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_reuse_port); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(2, 2881, __pyx_L1_error)
  46916. if (!__pyx_t_2) {
  46917. } else {
  46918. __pyx_t_1 = __pyx_t_2;
  46919. goto __pyx_L7_bool_binop_done;
  46920. }
  46921. __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_allow_broadcast); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(2, 2881, __pyx_L1_error)
  46922. __pyx_t_1 = __pyx_t_2;
  46923. __pyx_L7_bool_binop_done:;
  46924. /* "uvloop/loop.pyx":2879
  46925. * raise ValueError(
  46926. * 'A UDP Socket was expected, got {!r}'.format(sock))
  46927. * if (local_addr or remote_addr or # <<<<<<<<<<<<<<
  46928. * family or proto or flags or
  46929. * reuse_address or reuse_port or allow_broadcast):
  46930. */
  46931. if (unlikely(__pyx_t_1)) {
  46932. /* "uvloop/loop.pyx":2883
  46933. * reuse_address or reuse_port or allow_broadcast):
  46934. * # show the problematic kwargs in exception msg
  46935. * opts = dict(local_addr=local_addr, remote_addr=remote_addr, # <<<<<<<<<<<<<<
  46936. * family=family, proto=proto, flags=flags,
  46937. * reuse_address=reuse_address, reuse_port=reuse_port,
  46938. */
  46939. __pyx_t_3 = __Pyx_PyDict_NewPresized(8); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2883, __pyx_L1_error)
  46940. __Pyx_GOTREF(__pyx_t_3);
  46941. if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_local_addr, __pyx_cur_scope->__pyx_v_local_addr) < 0) __PYX_ERR(2, 2883, __pyx_L1_error)
  46942. if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_remote_addr, __pyx_cur_scope->__pyx_v_remote_addr) < 0) __PYX_ERR(2, 2883, __pyx_L1_error)
  46943. /* "uvloop/loop.pyx":2884
  46944. * # show the problematic kwargs in exception msg
  46945. * opts = dict(local_addr=local_addr, remote_addr=remote_addr,
  46946. * family=family, proto=proto, flags=flags, # <<<<<<<<<<<<<<
  46947. * reuse_address=reuse_address, reuse_port=reuse_port,
  46948. * allow_broadcast=allow_broadcast)
  46949. */
  46950. if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_family, __pyx_cur_scope->__pyx_v_family) < 0) __PYX_ERR(2, 2883, __pyx_L1_error)
  46951. if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_proto, __pyx_cur_scope->__pyx_v_proto) < 0) __PYX_ERR(2, 2883, __pyx_L1_error)
  46952. if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_flags, __pyx_cur_scope->__pyx_v_flags) < 0) __PYX_ERR(2, 2883, __pyx_L1_error)
  46953. /* "uvloop/loop.pyx":2885
  46954. * opts = dict(local_addr=local_addr, remote_addr=remote_addr,
  46955. * family=family, proto=proto, flags=flags,
  46956. * reuse_address=reuse_address, reuse_port=reuse_port, # <<<<<<<<<<<<<<
  46957. * allow_broadcast=allow_broadcast)
  46958. * problems = ', '.join(
  46959. */
  46960. if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_reuse_address, __pyx_cur_scope->__pyx_v_reuse_address) < 0) __PYX_ERR(2, 2883, __pyx_L1_error)
  46961. if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_reuse_port, __pyx_cur_scope->__pyx_v_reuse_port) < 0) __PYX_ERR(2, 2883, __pyx_L1_error)
  46962. /* "uvloop/loop.pyx":2886
  46963. * family=family, proto=proto, flags=flags,
  46964. * reuse_address=reuse_address, reuse_port=reuse_port,
  46965. * allow_broadcast=allow_broadcast) # <<<<<<<<<<<<<<
  46966. * problems = ', '.join(
  46967. * '{}={}'.format(k, v) for k, v in opts.items() if v)
  46968. */
  46969. if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_allow_broadcast, __pyx_cur_scope->__pyx_v_allow_broadcast) < 0) __PYX_ERR(2, 2883, __pyx_L1_error)
  46970. __Pyx_GIVEREF(__pyx_t_3);
  46971. __pyx_cur_scope->__pyx_v_opts = ((PyObject*)__pyx_t_3);
  46972. __pyx_t_3 = 0;
  46973. /* "uvloop/loop.pyx":2888
  46974. * allow_broadcast=allow_broadcast)
  46975. * problems = ', '.join(
  46976. * '{}={}'.format(k, v) for k, v in opts.items() if v) # <<<<<<<<<<<<<<
  46977. * raise ValueError(
  46978. * 'socket modifier keyword arguments can not be used '
  46979. */
  46980. __pyx_t_3 = __pyx_pf_6uvloop_4loop_4Loop_24create_datagram_endpoint_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2888, __pyx_L1_error)
  46981. __Pyx_GOTREF(__pyx_t_3);
  46982. /* "uvloop/loop.pyx":2887
  46983. * reuse_address=reuse_address, reuse_port=reuse_port,
  46984. * allow_broadcast=allow_broadcast)
  46985. * problems = ', '.join( # <<<<<<<<<<<<<<
  46986. * '{}={}'.format(k, v) for k, v in opts.items() if v)
  46987. * raise ValueError(
  46988. */
  46989. __pyx_t_4 = __Pyx_Generator_Next(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2887, __pyx_L1_error)
  46990. __Pyx_GOTREF(__pyx_t_4);
  46991. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  46992. __pyx_t_3 = PyUnicode_Join(__pyx_kp_u__53, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2887, __pyx_L1_error)
  46993. __Pyx_GOTREF(__pyx_t_3);
  46994. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  46995. __Pyx_GIVEREF(__pyx_t_3);
  46996. __pyx_cur_scope->__pyx_v_problems = ((PyObject*)__pyx_t_3);
  46997. __pyx_t_3 = 0;
  46998. /* "uvloop/loop.pyx":2891
  46999. * raise ValueError(
  47000. * 'socket modifier keyword arguments can not be used '
  47001. * 'when sock is specified. ({})'.format(problems)) # <<<<<<<<<<<<<<
  47002. * sock.setblocking(False)
  47003. * udp = UDPTransport.__new__(UDPTransport)
  47004. */
  47005. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_socket_modifier_keyword_argument, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2891, __pyx_L1_error)
  47006. __Pyx_GOTREF(__pyx_t_4);
  47007. __pyx_t_5 = NULL;
  47008. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
  47009. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
  47010. if (likely(__pyx_t_5)) {
  47011. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  47012. __Pyx_INCREF(__pyx_t_5);
  47013. __Pyx_INCREF(function);
  47014. __Pyx_DECREF_SET(__pyx_t_4, function);
  47015. }
  47016. }
  47017. __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_cur_scope->__pyx_v_problems) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_cur_scope->__pyx_v_problems);
  47018. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  47019. if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2891, __pyx_L1_error)
  47020. __Pyx_GOTREF(__pyx_t_3);
  47021. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  47022. /* "uvloop/loop.pyx":2889
  47023. * problems = ', '.join(
  47024. * '{}={}'.format(k, v) for k, v in opts.items() if v)
  47025. * raise ValueError( # <<<<<<<<<<<<<<
  47026. * 'socket modifier keyword arguments can not be used '
  47027. * 'when sock is specified. ({})'.format(problems))
  47028. */
  47029. __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2889, __pyx_L1_error)
  47030. __Pyx_GOTREF(__pyx_t_4);
  47031. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  47032. __Pyx_Raise(__pyx_t_4, 0, 0, 0);
  47033. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  47034. __PYX_ERR(2, 2889, __pyx_L1_error)
  47035. /* "uvloop/loop.pyx":2879
  47036. * raise ValueError(
  47037. * 'A UDP Socket was expected, got {!r}'.format(sock))
  47038. * if (local_addr or remote_addr or # <<<<<<<<<<<<<<
  47039. * family or proto or flags or
  47040. * reuse_address or reuse_port or allow_broadcast):
  47041. */
  47042. }
  47043. /* "uvloop/loop.pyx":2892
  47044. * 'socket modifier keyword arguments can not be used '
  47045. * 'when sock is specified. ({})'.format(problems))
  47046. * sock.setblocking(False) # <<<<<<<<<<<<<<
  47047. * udp = UDPTransport.__new__(UDPTransport)
  47048. * udp._init(self, uv.AF_UNSPEC)
  47049. */
  47050. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_sock, __pyx_n_s_setblocking); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2892, __pyx_L1_error)
  47051. __Pyx_GOTREF(__pyx_t_3);
  47052. __pyx_t_5 = NULL;
  47053. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
  47054. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
  47055. if (likely(__pyx_t_5)) {
  47056. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  47057. __Pyx_INCREF(__pyx_t_5);
  47058. __Pyx_INCREF(function);
  47059. __Pyx_DECREF_SET(__pyx_t_3, function);
  47060. }
  47061. }
  47062. __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, Py_False) : __Pyx_PyObject_CallOneArg(__pyx_t_3, Py_False);
  47063. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  47064. if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2892, __pyx_L1_error)
  47065. __Pyx_GOTREF(__pyx_t_4);
  47066. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  47067. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  47068. /* "uvloop/loop.pyx":2893
  47069. * 'when sock is specified. ({})'.format(problems))
  47070. * sock.setblocking(False)
  47071. * udp = UDPTransport.__new__(UDPTransport) # <<<<<<<<<<<<<<
  47072. * udp._init(self, uv.AF_UNSPEC)
  47073. * udp.open(sock.family, sock.fileno())
  47074. */
  47075. __pyx_t_4 = ((PyObject *)__pyx_tp_new_6uvloop_4loop_UDPTransport(((PyTypeObject *)__pyx_ptype_6uvloop_4loop_UDPTransport), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2893, __pyx_L1_error)
  47076. __Pyx_GOTREF(((PyObject *)__pyx_t_4));
  47077. __Pyx_GOTREF(((PyObject *)__pyx_cur_scope->__pyx_v_udp));
  47078. __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_udp, ((struct __pyx_obj_6uvloop_4loop_UDPTransport *)__pyx_t_4));
  47079. __Pyx_GIVEREF(((PyObject *)__pyx_t_4));
  47080. __pyx_t_4 = 0;
  47081. /* "uvloop/loop.pyx":2894
  47082. * sock.setblocking(False)
  47083. * udp = UDPTransport.__new__(UDPTransport)
  47084. * udp._init(self, uv.AF_UNSPEC) # <<<<<<<<<<<<<<
  47085. * udp.open(sock.family, sock.fileno())
  47086. * udp._attach_fileobj(sock)
  47087. */
  47088. __pyx_t_4 = ((struct __pyx_vtabstruct_6uvloop_4loop_UDPTransport *)__pyx_cur_scope->__pyx_v_udp->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->_init(__pyx_cur_scope->__pyx_v_udp, __pyx_cur_scope->__pyx_v_self, AF_UNSPEC); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2894, __pyx_L1_error)
  47089. __Pyx_GOTREF(__pyx_t_4);
  47090. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  47091. /* "uvloop/loop.pyx":2895
  47092. * udp = UDPTransport.__new__(UDPTransport)
  47093. * udp._init(self, uv.AF_UNSPEC)
  47094. * udp.open(sock.family, sock.fileno()) # <<<<<<<<<<<<<<
  47095. * udp._attach_fileobj(sock)
  47096. * else:
  47097. */
  47098. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_sock, __pyx_n_s_family); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2895, __pyx_L1_error)
  47099. __Pyx_GOTREF(__pyx_t_4);
  47100. __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 2895, __pyx_L1_error)
  47101. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  47102. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_sock, __pyx_n_s_fileno); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2895, __pyx_L1_error)
  47103. __Pyx_GOTREF(__pyx_t_3);
  47104. __pyx_t_5 = NULL;
  47105. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
  47106. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
  47107. if (likely(__pyx_t_5)) {
  47108. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  47109. __Pyx_INCREF(__pyx_t_5);
  47110. __Pyx_INCREF(function);
  47111. __Pyx_DECREF_SET(__pyx_t_3, function);
  47112. }
  47113. }
  47114. __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
  47115. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  47116. if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2895, __pyx_L1_error)
  47117. __Pyx_GOTREF(__pyx_t_4);
  47118. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  47119. __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 2895, __pyx_L1_error)
  47120. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  47121. __pyx_t_4 = ((struct __pyx_vtabstruct_6uvloop_4loop_UDPTransport *)__pyx_cur_scope->__pyx_v_udp->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->open(__pyx_cur_scope->__pyx_v_udp, __pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2895, __pyx_L1_error)
  47122. __Pyx_GOTREF(__pyx_t_4);
  47123. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  47124. /* "uvloop/loop.pyx":2896
  47125. * udp._init(self, uv.AF_UNSPEC)
  47126. * udp.open(sock.family, sock.fileno())
  47127. * udp._attach_fileobj(sock) # <<<<<<<<<<<<<<
  47128. * else:
  47129. * reuse_address = bool(reuse_address)
  47130. */
  47131. __pyx_t_4 = ((struct __pyx_vtabstruct_6uvloop_4loop_UDPTransport *)__pyx_cur_scope->__pyx_v_udp->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._attach_fileobj(((struct __pyx_obj_6uvloop_4loop_UVSocketHandle *)__pyx_cur_scope->__pyx_v_udp), __pyx_cur_scope->__pyx_v_sock); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2896, __pyx_L1_error)
  47132. __Pyx_GOTREF(__pyx_t_4);
  47133. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  47134. /* "uvloop/loop.pyx":2875
  47135. * system.addrinfo * rai
  47136. *
  47137. * if sock is not None: # <<<<<<<<<<<<<<
  47138. * if not _is_sock_dgram(sock.type):
  47139. * raise ValueError(
  47140. */
  47141. goto __pyx_L4;
  47142. }
  47143. /* "uvloop/loop.pyx":2898
  47144. * udp._attach_fileobj(sock)
  47145. * else:
  47146. * reuse_address = bool(reuse_address) # <<<<<<<<<<<<<<
  47147. * reuse_port = bool(reuse_port)
  47148. * if reuse_port and not has_SO_REUSEPORT:
  47149. */
  47150. /*else*/ {
  47151. __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_reuse_address); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 2898, __pyx_L1_error)
  47152. __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2898, __pyx_L1_error)
  47153. __Pyx_GOTREF(__pyx_t_4);
  47154. __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_reuse_address);
  47155. __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_reuse_address, __pyx_t_4);
  47156. __Pyx_GIVEREF(__pyx_t_4);
  47157. __pyx_t_4 = 0;
  47158. /* "uvloop/loop.pyx":2899
  47159. * else:
  47160. * reuse_address = bool(reuse_address)
  47161. * reuse_port = bool(reuse_port) # <<<<<<<<<<<<<<
  47162. * if reuse_port and not has_SO_REUSEPORT:
  47163. * raise ValueError(
  47164. */
  47165. __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_reuse_port); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 2899, __pyx_L1_error)
  47166. __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2899, __pyx_L1_error)
  47167. __Pyx_GOTREF(__pyx_t_4);
  47168. __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_reuse_port);
  47169. __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_reuse_port, __pyx_t_4);
  47170. __Pyx_GIVEREF(__pyx_t_4);
  47171. __pyx_t_4 = 0;
  47172. /* "uvloop/loop.pyx":2900
  47173. * reuse_address = bool(reuse_address)
  47174. * reuse_port = bool(reuse_port)
  47175. * if reuse_port and not has_SO_REUSEPORT: # <<<<<<<<<<<<<<
  47176. * raise ValueError(
  47177. * 'reuse_port not supported by socket module')
  47178. */
  47179. __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_reuse_port); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(2, 2900, __pyx_L1_error)
  47180. if (__pyx_t_2) {
  47181. } else {
  47182. __pyx_t_1 = __pyx_t_2;
  47183. goto __pyx_L16_bool_binop_done;
  47184. }
  47185. __pyx_t_2 = ((!(__pyx_v_6uvloop_4loop_has_SO_REUSEPORT != 0)) != 0);
  47186. __pyx_t_1 = __pyx_t_2;
  47187. __pyx_L16_bool_binop_done:;
  47188. if (unlikely(__pyx_t_1)) {
  47189. /* "uvloop/loop.pyx":2901
  47190. * reuse_port = bool(reuse_port)
  47191. * if reuse_port and not has_SO_REUSEPORT:
  47192. * raise ValueError( # <<<<<<<<<<<<<<
  47193. * 'reuse_port not supported by socket module')
  47194. *
  47195. */
  47196. __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__44, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2901, __pyx_L1_error)
  47197. __Pyx_GOTREF(__pyx_t_4);
  47198. __Pyx_Raise(__pyx_t_4, 0, 0, 0);
  47199. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  47200. __PYX_ERR(2, 2901, __pyx_L1_error)
  47201. /* "uvloop/loop.pyx":2900
  47202. * reuse_address = bool(reuse_address)
  47203. * reuse_port = bool(reuse_port)
  47204. * if reuse_port and not has_SO_REUSEPORT: # <<<<<<<<<<<<<<
  47205. * raise ValueError(
  47206. * 'reuse_port not supported by socket module')
  47207. */
  47208. }
  47209. /* "uvloop/loop.pyx":2904
  47210. * 'reuse_port not supported by socket module')
  47211. *
  47212. * lads = None # <<<<<<<<<<<<<<
  47213. * if local_addr is not None:
  47214. * if (not isinstance(local_addr, (tuple, list)) or
  47215. */
  47216. __Pyx_INCREF(Py_None);
  47217. __Pyx_GIVEREF(Py_None);
  47218. __pyx_cur_scope->__pyx_v_lads = Py_None;
  47219. /* "uvloop/loop.pyx":2905
  47220. *
  47221. * lads = None
  47222. * if local_addr is not None: # <<<<<<<<<<<<<<
  47223. * if (not isinstance(local_addr, (tuple, list)) or
  47224. * len(local_addr) != 2):
  47225. */
  47226. __pyx_t_1 = (__pyx_cur_scope->__pyx_v_local_addr != Py_None);
  47227. __pyx_t_2 = (__pyx_t_1 != 0);
  47228. if (__pyx_t_2) {
  47229. /* "uvloop/loop.pyx":2906
  47230. * lads = None
  47231. * if local_addr is not None:
  47232. * if (not isinstance(local_addr, (tuple, list)) or # <<<<<<<<<<<<<<
  47233. * len(local_addr) != 2):
  47234. * raise TypeError(
  47235. */
  47236. __pyx_t_8 = PyTuple_Check(__pyx_cur_scope->__pyx_v_local_addr);
  47237. __pyx_t_9 = (__pyx_t_8 != 0);
  47238. if (!__pyx_t_9) {
  47239. } else {
  47240. __pyx_t_1 = __pyx_t_9;
  47241. goto __pyx_L22_bool_binop_done;
  47242. }
  47243. __pyx_t_9 = PyList_Check(__pyx_cur_scope->__pyx_v_local_addr);
  47244. __pyx_t_8 = (__pyx_t_9 != 0);
  47245. __pyx_t_1 = __pyx_t_8;
  47246. __pyx_L22_bool_binop_done:;
  47247. __pyx_t_8 = ((!(__pyx_t_1 != 0)) != 0);
  47248. if (!__pyx_t_8) {
  47249. } else {
  47250. __pyx_t_2 = __pyx_t_8;
  47251. goto __pyx_L20_bool_binop_done;
  47252. }
  47253. /* "uvloop/loop.pyx":2907
  47254. * if local_addr is not None:
  47255. * if (not isinstance(local_addr, (tuple, list)) or
  47256. * len(local_addr) != 2): # <<<<<<<<<<<<<<
  47257. * raise TypeError(
  47258. * 'local_addr must be a tuple of (host, port)')
  47259. */
  47260. __pyx_t_10 = PyObject_Length(__pyx_cur_scope->__pyx_v_local_addr); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(2, 2907, __pyx_L1_error)
  47261. __pyx_t_8 = ((__pyx_t_10 != 2) != 0);
  47262. __pyx_t_2 = __pyx_t_8;
  47263. __pyx_L20_bool_binop_done:;
  47264. /* "uvloop/loop.pyx":2906
  47265. * lads = None
  47266. * if local_addr is not None:
  47267. * if (not isinstance(local_addr, (tuple, list)) or # <<<<<<<<<<<<<<
  47268. * len(local_addr) != 2):
  47269. * raise TypeError(
  47270. */
  47271. if (unlikely(__pyx_t_2)) {
  47272. /* "uvloop/loop.pyx":2908
  47273. * if (not isinstance(local_addr, (tuple, list)) or
  47274. * len(local_addr) != 2):
  47275. * raise TypeError( # <<<<<<<<<<<<<<
  47276. * 'local_addr must be a tuple of (host, port)')
  47277. * lads = await self._getaddrinfo(
  47278. */
  47279. __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__79, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2908, __pyx_L1_error)
  47280. __Pyx_GOTREF(__pyx_t_4);
  47281. __Pyx_Raise(__pyx_t_4, 0, 0, 0);
  47282. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  47283. __PYX_ERR(2, 2908, __pyx_L1_error)
  47284. /* "uvloop/loop.pyx":2906
  47285. * lads = None
  47286. * if local_addr is not None:
  47287. * if (not isinstance(local_addr, (tuple, list)) or # <<<<<<<<<<<<<<
  47288. * len(local_addr) != 2):
  47289. * raise TypeError(
  47290. */
  47291. }
  47292. /* "uvloop/loop.pyx":2911
  47293. * 'local_addr must be a tuple of (host, port)')
  47294. * lads = await self._getaddrinfo(
  47295. * local_addr[0], local_addr[1], # <<<<<<<<<<<<<<
  47296. * family, uv.SOCK_DGRAM, proto, flags,
  47297. * 0)
  47298. */
  47299. __pyx_t_4 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_local_addr, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2911, __pyx_L1_error)
  47300. __Pyx_GOTREF(__pyx_t_4);
  47301. __pyx_t_3 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_local_addr, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2911, __pyx_L1_error)
  47302. __Pyx_GOTREF(__pyx_t_3);
  47303. /* "uvloop/loop.pyx":2912
  47304. * lads = await self._getaddrinfo(
  47305. * local_addr[0], local_addr[1],
  47306. * family, uv.SOCK_DGRAM, proto, flags, # <<<<<<<<<<<<<<
  47307. * 0)
  47308. *
  47309. */
  47310. __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_cur_scope->__pyx_v_family); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 2912, __pyx_L1_error)
  47311. __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_cur_scope->__pyx_v_proto); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 2912, __pyx_L1_error)
  47312. __pyx_t_11 = __Pyx_PyInt_As_int(__pyx_cur_scope->__pyx_v_flags); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 2912, __pyx_L1_error)
  47313. /* "uvloop/loop.pyx":2910
  47314. * raise TypeError(
  47315. * 'local_addr must be a tuple of (host, port)')
  47316. * lads = await self._getaddrinfo( # <<<<<<<<<<<<<<
  47317. * local_addr[0], local_addr[1],
  47318. * family, uv.SOCK_DGRAM, proto, flags,
  47319. */
  47320. __pyx_t_5 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->_getaddrinfo(__pyx_cur_scope->__pyx_v_self, __pyx_t_4, __pyx_t_3, __pyx_t_7, SOCK_DGRAM, __pyx_t_6, __pyx_t_11, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2910, __pyx_L1_error)
  47321. __Pyx_GOTREF(__pyx_t_5);
  47322. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  47323. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  47324. __pyx_r = __Pyx_Coroutine_Yield_From(__pyx_generator, __pyx_t_5);
  47325. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  47326. __Pyx_XGOTREF(__pyx_r);
  47327. if (likely(__pyx_r)) {
  47328. __Pyx_XGIVEREF(__pyx_r);
  47329. __Pyx_RefNannyFinishContext();
  47330. __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  47331. /* return from generator, awaiting value */
  47332. __pyx_generator->resume_label = 1;
  47333. return __pyx_r;
  47334. __pyx_L24_resume_from_await:;
  47335. if (unlikely(!__pyx_sent_value)) __PYX_ERR(2, 2910, __pyx_L1_error)
  47336. __pyx_t_5 = __pyx_sent_value; __Pyx_INCREF(__pyx_t_5);
  47337. } else {
  47338. __pyx_t_5 = NULL;
  47339. if (__Pyx_PyGen_FetchStopIterationValue(&__pyx_t_5) < 0) __PYX_ERR(2, 2910, __pyx_L1_error)
  47340. __Pyx_GOTREF(__pyx_t_5);
  47341. }
  47342. __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_lads);
  47343. __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_lads, __pyx_t_5);
  47344. __Pyx_GIVEREF(__pyx_t_5);
  47345. __pyx_t_5 = 0;
  47346. /* "uvloop/loop.pyx":2905
  47347. *
  47348. * lads = None
  47349. * if local_addr is not None: # <<<<<<<<<<<<<<
  47350. * if (not isinstance(local_addr, (tuple, list)) or
  47351. * len(local_addr) != 2):
  47352. */
  47353. }
  47354. /* "uvloop/loop.pyx":2915
  47355. * 0)
  47356. *
  47357. * rads = None # <<<<<<<<<<<<<<
  47358. * if remote_addr is not None:
  47359. * if (not isinstance(remote_addr, (tuple, list)) or
  47360. */
  47361. __Pyx_INCREF(Py_None);
  47362. __Pyx_GIVEREF(Py_None);
  47363. __pyx_cur_scope->__pyx_v_rads = Py_None;
  47364. /* "uvloop/loop.pyx":2916
  47365. *
  47366. * rads = None
  47367. * if remote_addr is not None: # <<<<<<<<<<<<<<
  47368. * if (not isinstance(remote_addr, (tuple, list)) or
  47369. * len(remote_addr) != 2):
  47370. */
  47371. __pyx_t_2 = (__pyx_cur_scope->__pyx_v_remote_addr != Py_None);
  47372. __pyx_t_8 = (__pyx_t_2 != 0);
  47373. if (__pyx_t_8) {
  47374. /* "uvloop/loop.pyx":2917
  47375. * rads = None
  47376. * if remote_addr is not None:
  47377. * if (not isinstance(remote_addr, (tuple, list)) or # <<<<<<<<<<<<<<
  47378. * len(remote_addr) != 2):
  47379. * raise TypeError(
  47380. */
  47381. __pyx_t_1 = PyTuple_Check(__pyx_cur_scope->__pyx_v_remote_addr);
  47382. __pyx_t_9 = (__pyx_t_1 != 0);
  47383. if (!__pyx_t_9) {
  47384. } else {
  47385. __pyx_t_2 = __pyx_t_9;
  47386. goto __pyx_L29_bool_binop_done;
  47387. }
  47388. __pyx_t_9 = PyList_Check(__pyx_cur_scope->__pyx_v_remote_addr);
  47389. __pyx_t_1 = (__pyx_t_9 != 0);
  47390. __pyx_t_2 = __pyx_t_1;
  47391. __pyx_L29_bool_binop_done:;
  47392. __pyx_t_1 = ((!(__pyx_t_2 != 0)) != 0);
  47393. if (!__pyx_t_1) {
  47394. } else {
  47395. __pyx_t_8 = __pyx_t_1;
  47396. goto __pyx_L27_bool_binop_done;
  47397. }
  47398. /* "uvloop/loop.pyx":2918
  47399. * if remote_addr is not None:
  47400. * if (not isinstance(remote_addr, (tuple, list)) or
  47401. * len(remote_addr) != 2): # <<<<<<<<<<<<<<
  47402. * raise TypeError(
  47403. * 'remote_addr must be a tuple of (host, port)')
  47404. */
  47405. __pyx_t_10 = PyObject_Length(__pyx_cur_scope->__pyx_v_remote_addr); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(2, 2918, __pyx_L1_error)
  47406. __pyx_t_1 = ((__pyx_t_10 != 2) != 0);
  47407. __pyx_t_8 = __pyx_t_1;
  47408. __pyx_L27_bool_binop_done:;
  47409. /* "uvloop/loop.pyx":2917
  47410. * rads = None
  47411. * if remote_addr is not None:
  47412. * if (not isinstance(remote_addr, (tuple, list)) or # <<<<<<<<<<<<<<
  47413. * len(remote_addr) != 2):
  47414. * raise TypeError(
  47415. */
  47416. if (unlikely(__pyx_t_8)) {
  47417. /* "uvloop/loop.pyx":2919
  47418. * if (not isinstance(remote_addr, (tuple, list)) or
  47419. * len(remote_addr) != 2):
  47420. * raise TypeError( # <<<<<<<<<<<<<<
  47421. * 'remote_addr must be a tuple of (host, port)')
  47422. * rads = await self._getaddrinfo(
  47423. */
  47424. __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__80, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2919, __pyx_L1_error)
  47425. __Pyx_GOTREF(__pyx_t_5);
  47426. __Pyx_Raise(__pyx_t_5, 0, 0, 0);
  47427. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  47428. __PYX_ERR(2, 2919, __pyx_L1_error)
  47429. /* "uvloop/loop.pyx":2917
  47430. * rads = None
  47431. * if remote_addr is not None:
  47432. * if (not isinstance(remote_addr, (tuple, list)) or # <<<<<<<<<<<<<<
  47433. * len(remote_addr) != 2):
  47434. * raise TypeError(
  47435. */
  47436. }
  47437. /* "uvloop/loop.pyx":2922
  47438. * 'remote_addr must be a tuple of (host, port)')
  47439. * rads = await self._getaddrinfo(
  47440. * remote_addr[0], remote_addr[1], # <<<<<<<<<<<<<<
  47441. * family, uv.SOCK_DGRAM, proto, flags,
  47442. * 0)
  47443. */
  47444. __pyx_t_5 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_remote_addr, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2922, __pyx_L1_error)
  47445. __Pyx_GOTREF(__pyx_t_5);
  47446. __pyx_t_3 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_remote_addr, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2922, __pyx_L1_error)
  47447. __Pyx_GOTREF(__pyx_t_3);
  47448. /* "uvloop/loop.pyx":2923
  47449. * rads = await self._getaddrinfo(
  47450. * remote_addr[0], remote_addr[1],
  47451. * family, uv.SOCK_DGRAM, proto, flags, # <<<<<<<<<<<<<<
  47452. * 0)
  47453. *
  47454. */
  47455. __pyx_t_11 = __Pyx_PyInt_As_int(__pyx_cur_scope->__pyx_v_family); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 2923, __pyx_L1_error)
  47456. __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_cur_scope->__pyx_v_proto); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 2923, __pyx_L1_error)
  47457. __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_cur_scope->__pyx_v_flags); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 2923, __pyx_L1_error)
  47458. /* "uvloop/loop.pyx":2921
  47459. * raise TypeError(
  47460. * 'remote_addr must be a tuple of (host, port)')
  47461. * rads = await self._getaddrinfo( # <<<<<<<<<<<<<<
  47462. * remote_addr[0], remote_addr[1],
  47463. * family, uv.SOCK_DGRAM, proto, flags,
  47464. */
  47465. __pyx_t_4 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->_getaddrinfo(__pyx_cur_scope->__pyx_v_self, __pyx_t_5, __pyx_t_3, __pyx_t_11, SOCK_DGRAM, __pyx_t_6, __pyx_t_7, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2921, __pyx_L1_error)
  47466. __Pyx_GOTREF(__pyx_t_4);
  47467. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  47468. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  47469. __pyx_r = __Pyx_Coroutine_Yield_From(__pyx_generator, __pyx_t_4);
  47470. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  47471. __Pyx_XGOTREF(__pyx_r);
  47472. if (likely(__pyx_r)) {
  47473. __Pyx_XGIVEREF(__pyx_r);
  47474. __Pyx_RefNannyFinishContext();
  47475. __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  47476. /* return from generator, awaiting value */
  47477. __pyx_generator->resume_label = 2;
  47478. return __pyx_r;
  47479. __pyx_L31_resume_from_await:;
  47480. if (unlikely(!__pyx_sent_value)) __PYX_ERR(2, 2921, __pyx_L1_error)
  47481. __pyx_t_4 = __pyx_sent_value; __Pyx_INCREF(__pyx_t_4);
  47482. } else {
  47483. __pyx_t_4 = NULL;
  47484. if (__Pyx_PyGen_FetchStopIterationValue(&__pyx_t_4) < 0) __PYX_ERR(2, 2921, __pyx_L1_error)
  47485. __Pyx_GOTREF(__pyx_t_4);
  47486. }
  47487. __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_rads);
  47488. __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_rads, __pyx_t_4);
  47489. __Pyx_GIVEREF(__pyx_t_4);
  47490. __pyx_t_4 = 0;
  47491. /* "uvloop/loop.pyx":2916
  47492. *
  47493. * rads = None
  47494. * if remote_addr is not None: # <<<<<<<<<<<<<<
  47495. * if (not isinstance(remote_addr, (tuple, list)) or
  47496. * len(remote_addr) != 2):
  47497. */
  47498. }
  47499. /* "uvloop/loop.pyx":2926
  47500. * 0)
  47501. *
  47502. * excs = [] # <<<<<<<<<<<<<<
  47503. * if lads is None:
  47504. * if rads is not None:
  47505. */
  47506. __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2926, __pyx_L1_error)
  47507. __Pyx_GOTREF(__pyx_t_4);
  47508. __Pyx_GIVEREF(__pyx_t_4);
  47509. __pyx_cur_scope->__pyx_v_excs = ((PyObject*)__pyx_t_4);
  47510. __pyx_t_4 = 0;
  47511. /* "uvloop/loop.pyx":2927
  47512. *
  47513. * excs = []
  47514. * if lads is None: # <<<<<<<<<<<<<<
  47515. * if rads is not None:
  47516. * udp = UDPTransport.__new__(UDPTransport)
  47517. */
  47518. __pyx_t_8 = (__pyx_cur_scope->__pyx_v_lads == Py_None);
  47519. __pyx_t_1 = (__pyx_t_8 != 0);
  47520. if (__pyx_t_1) {
  47521. /* "uvloop/loop.pyx":2928
  47522. * excs = []
  47523. * if lads is None:
  47524. * if rads is not None: # <<<<<<<<<<<<<<
  47525. * udp = UDPTransport.__new__(UDPTransport)
  47526. * rai = (<AddrInfo>rads).data
  47527. */
  47528. __pyx_t_1 = (__pyx_cur_scope->__pyx_v_rads != Py_None);
  47529. __pyx_t_8 = (__pyx_t_1 != 0);
  47530. if (__pyx_t_8) {
  47531. /* "uvloop/loop.pyx":2929
  47532. * if lads is None:
  47533. * if rads is not None:
  47534. * udp = UDPTransport.__new__(UDPTransport) # <<<<<<<<<<<<<<
  47535. * rai = (<AddrInfo>rads).data
  47536. * udp._init(self, rai.ai_family)
  47537. */
  47538. __pyx_t_4 = ((PyObject *)__pyx_tp_new_6uvloop_4loop_UDPTransport(((PyTypeObject *)__pyx_ptype_6uvloop_4loop_UDPTransport), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2929, __pyx_L1_error)
  47539. __Pyx_GOTREF(((PyObject *)__pyx_t_4));
  47540. __Pyx_GOTREF(((PyObject *)__pyx_cur_scope->__pyx_v_udp));
  47541. __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_udp, ((struct __pyx_obj_6uvloop_4loop_UDPTransport *)__pyx_t_4));
  47542. __Pyx_GIVEREF(((PyObject *)__pyx_t_4));
  47543. __pyx_t_4 = 0;
  47544. /* "uvloop/loop.pyx":2930
  47545. * if rads is not None:
  47546. * udp = UDPTransport.__new__(UDPTransport)
  47547. * rai = (<AddrInfo>rads).data # <<<<<<<<<<<<<<
  47548. * udp._init(self, rai.ai_family)
  47549. * udp._connect(rai.ai_addr, rai.ai_addrlen)
  47550. */
  47551. __pyx_t_12 = ((struct __pyx_obj_6uvloop_4loop_AddrInfo *)__pyx_cur_scope->__pyx_v_rads)->data;
  47552. __pyx_cur_scope->__pyx_v_rai = __pyx_t_12;
  47553. /* "uvloop/loop.pyx":2931
  47554. * udp = UDPTransport.__new__(UDPTransport)
  47555. * rai = (<AddrInfo>rads).data
  47556. * udp._init(self, rai.ai_family) # <<<<<<<<<<<<<<
  47557. * udp._connect(rai.ai_addr, rai.ai_addrlen)
  47558. * else:
  47559. */
  47560. __pyx_t_4 = ((struct __pyx_vtabstruct_6uvloop_4loop_UDPTransport *)__pyx_cur_scope->__pyx_v_udp->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->_init(__pyx_cur_scope->__pyx_v_udp, __pyx_cur_scope->__pyx_v_self, __pyx_cur_scope->__pyx_v_rai->ai_family); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2931, __pyx_L1_error)
  47561. __Pyx_GOTREF(__pyx_t_4);
  47562. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  47563. /* "uvloop/loop.pyx":2932
  47564. * rai = (<AddrInfo>rads).data
  47565. * udp._init(self, rai.ai_family)
  47566. * udp._connect(rai.ai_addr, rai.ai_addrlen) # <<<<<<<<<<<<<<
  47567. * else:
  47568. * if family not in (uv.AF_INET, uv.AF_INET6):
  47569. */
  47570. __pyx_t_4 = ((struct __pyx_vtabstruct_6uvloop_4loop_UDPTransport *)__pyx_cur_scope->__pyx_v_udp->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->_connect(__pyx_cur_scope->__pyx_v_udp, __pyx_cur_scope->__pyx_v_rai->ai_addr, __pyx_cur_scope->__pyx_v_rai->ai_addrlen); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2932, __pyx_L1_error)
  47571. __Pyx_GOTREF(__pyx_t_4);
  47572. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  47573. /* "uvloop/loop.pyx":2928
  47574. * excs = []
  47575. * if lads is None:
  47576. * if rads is not None: # <<<<<<<<<<<<<<
  47577. * udp = UDPTransport.__new__(UDPTransport)
  47578. * rai = (<AddrInfo>rads).data
  47579. */
  47580. goto __pyx_L33;
  47581. }
  47582. /* "uvloop/loop.pyx":2934
  47583. * udp._connect(rai.ai_addr, rai.ai_addrlen)
  47584. * else:
  47585. * if family not in (uv.AF_INET, uv.AF_INET6): # <<<<<<<<<<<<<<
  47586. * raise ValueError('unexpected address family')
  47587. * udp = UDPTransport.__new__(UDPTransport)
  47588. */
  47589. /*else*/ {
  47590. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_family);
  47591. __pyx_t_4 = __pyx_cur_scope->__pyx_v_family;
  47592. __pyx_t_3 = __Pyx_PyInt_From_int(AF_INET); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2934, __pyx_L1_error)
  47593. __Pyx_GOTREF(__pyx_t_3);
  47594. __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2934, __pyx_L1_error)
  47595. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  47596. __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 2934, __pyx_L1_error)
  47597. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  47598. if (__pyx_t_1) {
  47599. } else {
  47600. __pyx_t_8 = __pyx_t_1;
  47601. goto __pyx_L35_bool_binop_done;
  47602. }
  47603. __pyx_t_5 = __Pyx_PyInt_From_int(AF_INET6); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2934, __pyx_L1_error)
  47604. __Pyx_GOTREF(__pyx_t_5);
  47605. __pyx_t_3 = PyObject_RichCompare(__pyx_t_4, __pyx_t_5, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2934, __pyx_L1_error)
  47606. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  47607. __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 2934, __pyx_L1_error)
  47608. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  47609. __pyx_t_8 = __pyx_t_1;
  47610. __pyx_L35_bool_binop_done:;
  47611. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  47612. __pyx_t_1 = (__pyx_t_8 != 0);
  47613. if (unlikely(__pyx_t_1)) {
  47614. /* "uvloop/loop.pyx":2935
  47615. * else:
  47616. * if family not in (uv.AF_INET, uv.AF_INET6):
  47617. * raise ValueError('unexpected address family') # <<<<<<<<<<<<<<
  47618. * udp = UDPTransport.__new__(UDPTransport)
  47619. * udp._init(self, family)
  47620. */
  47621. __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__81, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2935, __pyx_L1_error)
  47622. __Pyx_GOTREF(__pyx_t_4);
  47623. __Pyx_Raise(__pyx_t_4, 0, 0, 0);
  47624. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  47625. __PYX_ERR(2, 2935, __pyx_L1_error)
  47626. /* "uvloop/loop.pyx":2934
  47627. * udp._connect(rai.ai_addr, rai.ai_addrlen)
  47628. * else:
  47629. * if family not in (uv.AF_INET, uv.AF_INET6): # <<<<<<<<<<<<<<
  47630. * raise ValueError('unexpected address family')
  47631. * udp = UDPTransport.__new__(UDPTransport)
  47632. */
  47633. }
  47634. /* "uvloop/loop.pyx":2936
  47635. * if family not in (uv.AF_INET, uv.AF_INET6):
  47636. * raise ValueError('unexpected address family')
  47637. * udp = UDPTransport.__new__(UDPTransport) # <<<<<<<<<<<<<<
  47638. * udp._init(self, family)
  47639. *
  47640. */
  47641. __pyx_t_4 = ((PyObject *)__pyx_tp_new_6uvloop_4loop_UDPTransport(((PyTypeObject *)__pyx_ptype_6uvloop_4loop_UDPTransport), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2936, __pyx_L1_error)
  47642. __Pyx_GOTREF(((PyObject *)__pyx_t_4));
  47643. __Pyx_GOTREF(((PyObject *)__pyx_cur_scope->__pyx_v_udp));
  47644. __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_udp, ((struct __pyx_obj_6uvloop_4loop_UDPTransport *)__pyx_t_4));
  47645. __Pyx_GIVEREF(((PyObject *)__pyx_t_4));
  47646. __pyx_t_4 = 0;
  47647. /* "uvloop/loop.pyx":2937
  47648. * raise ValueError('unexpected address family')
  47649. * udp = UDPTransport.__new__(UDPTransport)
  47650. * udp._init(self, family) # <<<<<<<<<<<<<<
  47651. *
  47652. * if reuse_port:
  47653. */
  47654. __pyx_t_13 = __Pyx_PyInt_As_unsigned_int(__pyx_cur_scope->__pyx_v_family); if (unlikely((__pyx_t_13 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(2, 2937, __pyx_L1_error)
  47655. __pyx_t_4 = ((struct __pyx_vtabstruct_6uvloop_4loop_UDPTransport *)__pyx_cur_scope->__pyx_v_udp->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->_init(__pyx_cur_scope->__pyx_v_udp, __pyx_cur_scope->__pyx_v_self, __pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2937, __pyx_L1_error)
  47656. __Pyx_GOTREF(__pyx_t_4);
  47657. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  47658. }
  47659. __pyx_L33:;
  47660. /* "uvloop/loop.pyx":2939
  47661. * udp._init(self, family)
  47662. *
  47663. * if reuse_port: # <<<<<<<<<<<<<<
  47664. * self._sock_set_reuseport(udp._fileno())
  47665. *
  47666. */
  47667. __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_reuse_port); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 2939, __pyx_L1_error)
  47668. if (__pyx_t_1) {
  47669. /* "uvloop/loop.pyx":2940
  47670. *
  47671. * if reuse_port:
  47672. * self._sock_set_reuseport(udp._fileno()) # <<<<<<<<<<<<<<
  47673. *
  47674. * else:
  47675. */
  47676. __pyx_t_4 = ((struct __pyx_vtabstruct_6uvloop_4loop_UDPTransport *)__pyx_cur_scope->__pyx_v_udp->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._fileno(((struct __pyx_obj_6uvloop_4loop_UVSocketHandle *)__pyx_cur_scope->__pyx_v_udp)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2940, __pyx_L1_error)
  47677. __Pyx_GOTREF(__pyx_t_4);
  47678. __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 2940, __pyx_L1_error)
  47679. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  47680. __pyx_t_4 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->_sock_set_reuseport(__pyx_cur_scope->__pyx_v_self, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2940, __pyx_L1_error)
  47681. __Pyx_GOTREF(__pyx_t_4);
  47682. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  47683. /* "uvloop/loop.pyx":2939
  47684. * udp._init(self, family)
  47685. *
  47686. * if reuse_port: # <<<<<<<<<<<<<<
  47687. * self._sock_set_reuseport(udp._fileno())
  47688. *
  47689. */
  47690. }
  47691. /* "uvloop/loop.pyx":2927
  47692. *
  47693. * excs = []
  47694. * if lads is None: # <<<<<<<<<<<<<<
  47695. * if rads is not None:
  47696. * udp = UDPTransport.__new__(UDPTransport)
  47697. */
  47698. goto __pyx_L32;
  47699. }
  47700. /* "uvloop/loop.pyx":2943
  47701. *
  47702. * else:
  47703. * lai = (<AddrInfo>lads).data # <<<<<<<<<<<<<<
  47704. * while lai is not NULL:
  47705. * try:
  47706. */
  47707. /*else*/ {
  47708. __pyx_t_12 = ((struct __pyx_obj_6uvloop_4loop_AddrInfo *)__pyx_cur_scope->__pyx_v_lads)->data;
  47709. __pyx_cur_scope->__pyx_v_lai = __pyx_t_12;
  47710. /* "uvloop/loop.pyx":2944
  47711. * else:
  47712. * lai = (<AddrInfo>lads).data
  47713. * while lai is not NULL: # <<<<<<<<<<<<<<
  47714. * try:
  47715. * udp = UDPTransport.__new__(UDPTransport)
  47716. */
  47717. while (1) {
  47718. __pyx_t_1 = ((__pyx_cur_scope->__pyx_v_lai != NULL) != 0);
  47719. if (!__pyx_t_1) break;
  47720. /* "uvloop/loop.pyx":2945
  47721. * lai = (<AddrInfo>lads).data
  47722. * while lai is not NULL:
  47723. * try: # <<<<<<<<<<<<<<
  47724. * udp = UDPTransport.__new__(UDPTransport)
  47725. * udp._init(self, lai.ai_family)
  47726. */
  47727. {
  47728. __Pyx_ExceptionSave(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16);
  47729. __Pyx_XGOTREF(__pyx_t_14);
  47730. __Pyx_XGOTREF(__pyx_t_15);
  47731. __Pyx_XGOTREF(__pyx_t_16);
  47732. /*try:*/ {
  47733. /* "uvloop/loop.pyx":2946
  47734. * while lai is not NULL:
  47735. * try:
  47736. * udp = UDPTransport.__new__(UDPTransport) # <<<<<<<<<<<<<<
  47737. * udp._init(self, lai.ai_family)
  47738. * if reuse_port:
  47739. */
  47740. __pyx_t_4 = ((PyObject *)__pyx_tp_new_6uvloop_4loop_UDPTransport(((PyTypeObject *)__pyx_ptype_6uvloop_4loop_UDPTransport), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2946, __pyx_L40_error)
  47741. __Pyx_GOTREF(((PyObject *)__pyx_t_4));
  47742. __Pyx_GOTREF(((PyObject *)__pyx_cur_scope->__pyx_v_udp));
  47743. __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_udp, ((struct __pyx_obj_6uvloop_4loop_UDPTransport *)__pyx_t_4));
  47744. __Pyx_GIVEREF(((PyObject *)__pyx_t_4));
  47745. __pyx_t_4 = 0;
  47746. /* "uvloop/loop.pyx":2947
  47747. * try:
  47748. * udp = UDPTransport.__new__(UDPTransport)
  47749. * udp._init(self, lai.ai_family) # <<<<<<<<<<<<<<
  47750. * if reuse_port:
  47751. * self._sock_set_reuseport(udp._fileno())
  47752. */
  47753. __pyx_t_4 = ((struct __pyx_vtabstruct_6uvloop_4loop_UDPTransport *)__pyx_cur_scope->__pyx_v_udp->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->_init(__pyx_cur_scope->__pyx_v_udp, __pyx_cur_scope->__pyx_v_self, __pyx_cur_scope->__pyx_v_lai->ai_family); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2947, __pyx_L40_error)
  47754. __Pyx_GOTREF(__pyx_t_4);
  47755. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  47756. /* "uvloop/loop.pyx":2948
  47757. * udp = UDPTransport.__new__(UDPTransport)
  47758. * udp._init(self, lai.ai_family)
  47759. * if reuse_port: # <<<<<<<<<<<<<<
  47760. * self._sock_set_reuseport(udp._fileno())
  47761. * udp._bind(lai.ai_addr, reuse_address)
  47762. */
  47763. __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_reuse_port); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 2948, __pyx_L40_error)
  47764. if (__pyx_t_1) {
  47765. /* "uvloop/loop.pyx":2949
  47766. * udp._init(self, lai.ai_family)
  47767. * if reuse_port:
  47768. * self._sock_set_reuseport(udp._fileno()) # <<<<<<<<<<<<<<
  47769. * udp._bind(lai.ai_addr, reuse_address)
  47770. * except Exception as ex:
  47771. */
  47772. __pyx_t_4 = ((struct __pyx_vtabstruct_6uvloop_4loop_UDPTransport *)__pyx_cur_scope->__pyx_v_udp->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._fileno(((struct __pyx_obj_6uvloop_4loop_UVSocketHandle *)__pyx_cur_scope->__pyx_v_udp)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2949, __pyx_L40_error)
  47773. __Pyx_GOTREF(__pyx_t_4);
  47774. __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 2949, __pyx_L40_error)
  47775. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  47776. __pyx_t_4 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->_sock_set_reuseport(__pyx_cur_scope->__pyx_v_self, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2949, __pyx_L40_error)
  47777. __Pyx_GOTREF(__pyx_t_4);
  47778. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  47779. /* "uvloop/loop.pyx":2948
  47780. * udp = UDPTransport.__new__(UDPTransport)
  47781. * udp._init(self, lai.ai_family)
  47782. * if reuse_port: # <<<<<<<<<<<<<<
  47783. * self._sock_set_reuseport(udp._fileno())
  47784. * udp._bind(lai.ai_addr, reuse_address)
  47785. */
  47786. }
  47787. /* "uvloop/loop.pyx":2950
  47788. * if reuse_port:
  47789. * self._sock_set_reuseport(udp._fileno())
  47790. * udp._bind(lai.ai_addr, reuse_address) # <<<<<<<<<<<<<<
  47791. * except Exception as ex:
  47792. * lai = lai.ai_next
  47793. */
  47794. __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_reuse_address); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 2950, __pyx_L40_error)
  47795. __pyx_t_4 = ((struct __pyx_vtabstruct_6uvloop_4loop_UDPTransport *)__pyx_cur_scope->__pyx_v_udp->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->_bind(__pyx_cur_scope->__pyx_v_udp, __pyx_cur_scope->__pyx_v_lai->ai_addr, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2950, __pyx_L40_error)
  47796. __Pyx_GOTREF(__pyx_t_4);
  47797. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  47798. /* "uvloop/loop.pyx":2945
  47799. * lai = (<AddrInfo>lads).data
  47800. * while lai is not NULL:
  47801. * try: # <<<<<<<<<<<<<<
  47802. * udp = UDPTransport.__new__(UDPTransport)
  47803. * udp._init(self, lai.ai_family)
  47804. */
  47805. }
  47806. /* "uvloop/loop.pyx":2956
  47807. * continue
  47808. * else:
  47809. * break # <<<<<<<<<<<<<<
  47810. * else:
  47811. * ctx = None
  47812. */
  47813. /*else:*/ {
  47814. goto __pyx_L45_try_break;
  47815. }
  47816. __pyx_L40_error:;
  47817. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  47818. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  47819. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  47820. /* "uvloop/loop.pyx":2951
  47821. * self._sock_set_reuseport(udp._fileno())
  47822. * udp._bind(lai.ai_addr, reuse_address)
  47823. * except Exception as ex: # <<<<<<<<<<<<<<
  47824. * lai = lai.ai_next
  47825. * excs.append(ex)
  47826. */
  47827. __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
  47828. if (__pyx_t_7) {
  47829. __Pyx_AddTraceback("uvloop.loop.Loop.create_datagram_endpoint", __pyx_clineno, __pyx_lineno, __pyx_filename);
  47830. if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_3, &__pyx_t_5) < 0) __PYX_ERR(2, 2951, __pyx_L42_except_error)
  47831. __Pyx_GOTREF(__pyx_t_4);
  47832. __Pyx_GOTREF(__pyx_t_3);
  47833. __Pyx_GOTREF(__pyx_t_5);
  47834. __Pyx_INCREF(__pyx_t_3);
  47835. __Pyx_GIVEREF(__pyx_t_3);
  47836. __pyx_cur_scope->__pyx_v_ex = __pyx_t_3;
  47837. /*try:*/ {
  47838. /* "uvloop/loop.pyx":2952
  47839. * udp._bind(lai.ai_addr, reuse_address)
  47840. * except Exception as ex:
  47841. * lai = lai.ai_next # <<<<<<<<<<<<<<
  47842. * excs.append(ex)
  47843. * continue
  47844. */
  47845. __pyx_t_12 = __pyx_cur_scope->__pyx_v_lai->ai_next;
  47846. __pyx_cur_scope->__pyx_v_lai = __pyx_t_12;
  47847. /* "uvloop/loop.pyx":2953
  47848. * except Exception as ex:
  47849. * lai = lai.ai_next
  47850. * excs.append(ex) # <<<<<<<<<<<<<<
  47851. * continue
  47852. * else:
  47853. */
  47854. __pyx_t_17 = __Pyx_PyList_Append(__pyx_cur_scope->__pyx_v_excs, __pyx_cur_scope->__pyx_v_ex); if (unlikely(__pyx_t_17 == ((int)-1))) __PYX_ERR(2, 2953, __pyx_L54_error)
  47855. /* "uvloop/loop.pyx":2954
  47856. * lai = lai.ai_next
  47857. * excs.append(ex)
  47858. * continue # <<<<<<<<<<<<<<
  47859. * else:
  47860. * break
  47861. */
  47862. goto __pyx_L51_continue;
  47863. }
  47864. /* "uvloop/loop.pyx":2951
  47865. * self._sock_set_reuseport(udp._fileno())
  47866. * udp._bind(lai.ai_addr, reuse_address)
  47867. * except Exception as ex: # <<<<<<<<<<<<<<
  47868. * lai = lai.ai_next
  47869. * excs.append(ex)
  47870. */
  47871. /*finally:*/ {
  47872. __pyx_L54_error:;
  47873. /*exception exit:*/{
  47874. __Pyx_PyThreadState_assign
  47875. __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0;
  47876. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_22, &__pyx_t_23, &__pyx_t_24);
  47877. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21) < 0)) __Pyx_ErrFetch(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21);
  47878. __Pyx_XGOTREF(__pyx_t_19);
  47879. __Pyx_XGOTREF(__pyx_t_20);
  47880. __Pyx_XGOTREF(__pyx_t_21);
  47881. __Pyx_XGOTREF(__pyx_t_22);
  47882. __Pyx_XGOTREF(__pyx_t_23);
  47883. __Pyx_XGOTREF(__pyx_t_24);
  47884. __pyx_t_7 = __pyx_lineno; __pyx_t_6 = __pyx_clineno; __pyx_t_18 = __pyx_filename;
  47885. {
  47886. __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_ex);
  47887. __Pyx_DECREF(__pyx_cur_scope->__pyx_v_ex);
  47888. __pyx_cur_scope->__pyx_v_ex = NULL;
  47889. }
  47890. if (PY_MAJOR_VERSION >= 3) {
  47891. __Pyx_XGIVEREF(__pyx_t_22);
  47892. __Pyx_XGIVEREF(__pyx_t_23);
  47893. __Pyx_XGIVEREF(__pyx_t_24);
  47894. __Pyx_ExceptionReset(__pyx_t_22, __pyx_t_23, __pyx_t_24);
  47895. }
  47896. __Pyx_XGIVEREF(__pyx_t_19);
  47897. __Pyx_XGIVEREF(__pyx_t_20);
  47898. __Pyx_XGIVEREF(__pyx_t_21);
  47899. __Pyx_ErrRestore(__pyx_t_19, __pyx_t_20, __pyx_t_21);
  47900. __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0;
  47901. __pyx_lineno = __pyx_t_7; __pyx_clineno = __pyx_t_6; __pyx_filename = __pyx_t_18;
  47902. goto __pyx_L42_except_error;
  47903. }
  47904. __pyx_L51_continue: {
  47905. __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_ex);
  47906. __Pyx_DECREF(__pyx_cur_scope->__pyx_v_ex);
  47907. __pyx_cur_scope->__pyx_v_ex = NULL;
  47908. goto __pyx_L50_except_continue;
  47909. }
  47910. }
  47911. __pyx_L50_except_continue:;
  47912. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  47913. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  47914. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  47915. goto __pyx_L46_try_continue;
  47916. }
  47917. goto __pyx_L42_except_error;
  47918. __pyx_L42_except_error:;
  47919. /* "uvloop/loop.pyx":2945
  47920. * lai = (<AddrInfo>lads).data
  47921. * while lai is not NULL:
  47922. * try: # <<<<<<<<<<<<<<
  47923. * udp = UDPTransport.__new__(UDPTransport)
  47924. * udp._init(self, lai.ai_family)
  47925. */
  47926. __Pyx_XGIVEREF(__pyx_t_14);
  47927. __Pyx_XGIVEREF(__pyx_t_15);
  47928. __Pyx_XGIVEREF(__pyx_t_16);
  47929. __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_15, __pyx_t_16);
  47930. goto __pyx_L1_error;
  47931. __pyx_L45_try_break:;
  47932. __Pyx_XGIVEREF(__pyx_t_14);
  47933. __Pyx_XGIVEREF(__pyx_t_15);
  47934. __Pyx_XGIVEREF(__pyx_t_16);
  47935. __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_15, __pyx_t_16);
  47936. goto __pyx_L39_break;
  47937. __pyx_L46_try_continue:;
  47938. __Pyx_XGIVEREF(__pyx_t_14);
  47939. __Pyx_XGIVEREF(__pyx_t_15);
  47940. __Pyx_XGIVEREF(__pyx_t_16);
  47941. __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_15, __pyx_t_16);
  47942. goto __pyx_L38_continue;
  47943. }
  47944. __pyx_L38_continue:;
  47945. }
  47946. /* "uvloop/loop.pyx":2958
  47947. * break
  47948. * else:
  47949. * ctx = None # <<<<<<<<<<<<<<
  47950. * if len(excs):
  47951. * ctx = excs[0]
  47952. */
  47953. /*else*/ {
  47954. __Pyx_INCREF(Py_None);
  47955. __Pyx_GIVEREF(Py_None);
  47956. __pyx_cur_scope->__pyx_v_ctx = Py_None;
  47957. /* "uvloop/loop.pyx":2959
  47958. * else:
  47959. * ctx = None
  47960. * if len(excs): # <<<<<<<<<<<<<<
  47961. * ctx = excs[0]
  47962. * raise OSError('could not bind to local_addr {}'.format(
  47963. */
  47964. __pyx_t_10 = PyList_GET_SIZE(__pyx_cur_scope->__pyx_v_excs); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(2, 2959, __pyx_L1_error)
  47965. __pyx_t_1 = (__pyx_t_10 != 0);
  47966. if (__pyx_t_1) {
  47967. /* "uvloop/loop.pyx":2960
  47968. * ctx = None
  47969. * if len(excs):
  47970. * ctx = excs[0] # <<<<<<<<<<<<<<
  47971. * raise OSError('could not bind to local_addr {}'.format(
  47972. * local_addr)) from ctx
  47973. */
  47974. __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_cur_scope->__pyx_v_excs, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2960, __pyx_L1_error)
  47975. __Pyx_GOTREF(__pyx_t_5);
  47976. __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_ctx);
  47977. __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_ctx, __pyx_t_5);
  47978. __Pyx_GIVEREF(__pyx_t_5);
  47979. __pyx_t_5 = 0;
  47980. /* "uvloop/loop.pyx":2959
  47981. * else:
  47982. * ctx = None
  47983. * if len(excs): # <<<<<<<<<<<<<<
  47984. * ctx = excs[0]
  47985. * raise OSError('could not bind to local_addr {}'.format(
  47986. */
  47987. }
  47988. /* "uvloop/loop.pyx":2961
  47989. * if len(excs):
  47990. * ctx = excs[0]
  47991. * raise OSError('could not bind to local_addr {}'.format( # <<<<<<<<<<<<<<
  47992. * local_addr)) from ctx
  47993. *
  47994. */
  47995. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_could_not_bind_to_local_addr, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2961, __pyx_L1_error)
  47996. __Pyx_GOTREF(__pyx_t_3);
  47997. /* "uvloop/loop.pyx":2962
  47998. * ctx = excs[0]
  47999. * raise OSError('could not bind to local_addr {}'.format(
  48000. * local_addr)) from ctx # <<<<<<<<<<<<<<
  48001. *
  48002. * if rads is not None:
  48003. */
  48004. __pyx_t_4 = NULL;
  48005. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
  48006. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
  48007. if (likely(__pyx_t_4)) {
  48008. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  48009. __Pyx_INCREF(__pyx_t_4);
  48010. __Pyx_INCREF(function);
  48011. __Pyx_DECREF_SET(__pyx_t_3, function);
  48012. }
  48013. }
  48014. __pyx_t_5 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_cur_scope->__pyx_v_local_addr) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_cur_scope->__pyx_v_local_addr);
  48015. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  48016. if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2961, __pyx_L1_error)
  48017. __Pyx_GOTREF(__pyx_t_5);
  48018. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  48019. /* "uvloop/loop.pyx":2961
  48020. * if len(excs):
  48021. * ctx = excs[0]
  48022. * raise OSError('could not bind to local_addr {}'.format( # <<<<<<<<<<<<<<
  48023. * local_addr)) from ctx
  48024. *
  48025. */
  48026. __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_OSError, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2961, __pyx_L1_error)
  48027. __Pyx_GOTREF(__pyx_t_3);
  48028. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  48029. /* "uvloop/loop.pyx":2962
  48030. * ctx = excs[0]
  48031. * raise OSError('could not bind to local_addr {}'.format(
  48032. * local_addr)) from ctx # <<<<<<<<<<<<<<
  48033. *
  48034. * if rads is not None:
  48035. */
  48036. __Pyx_Raise(__pyx_t_3, 0, 0, __pyx_cur_scope->__pyx_v_ctx);
  48037. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  48038. __PYX_ERR(2, 2961, __pyx_L1_error)
  48039. }
  48040. __pyx_L39_break:;
  48041. /* "uvloop/loop.pyx":2964
  48042. * local_addr)) from ctx
  48043. *
  48044. * if rads is not None: # <<<<<<<<<<<<<<
  48045. * rai = (<AddrInfo>rads).data
  48046. * while rai is not NULL:
  48047. */
  48048. __pyx_t_1 = (__pyx_cur_scope->__pyx_v_rads != Py_None);
  48049. __pyx_t_8 = (__pyx_t_1 != 0);
  48050. if (__pyx_t_8) {
  48051. /* "uvloop/loop.pyx":2965
  48052. *
  48053. * if rads is not None:
  48054. * rai = (<AddrInfo>rads).data # <<<<<<<<<<<<<<
  48055. * while rai is not NULL:
  48056. * if rai.ai_family != lai.ai_family:
  48057. */
  48058. __pyx_t_12 = ((struct __pyx_obj_6uvloop_4loop_AddrInfo *)__pyx_cur_scope->__pyx_v_rads)->data;
  48059. __pyx_cur_scope->__pyx_v_rai = __pyx_t_12;
  48060. /* "uvloop/loop.pyx":2966
  48061. * if rads is not None:
  48062. * rai = (<AddrInfo>rads).data
  48063. * while rai is not NULL: # <<<<<<<<<<<<<<
  48064. * if rai.ai_family != lai.ai_family:
  48065. * rai = rai.ai_next
  48066. */
  48067. while (1) {
  48068. __pyx_t_8 = ((__pyx_cur_scope->__pyx_v_rai != NULL) != 0);
  48069. if (!__pyx_t_8) break;
  48070. /* "uvloop/loop.pyx":2967
  48071. * rai = (<AddrInfo>rads).data
  48072. * while rai is not NULL:
  48073. * if rai.ai_family != lai.ai_family: # <<<<<<<<<<<<<<
  48074. * rai = rai.ai_next
  48075. * continue
  48076. */
  48077. __pyx_t_8 = ((__pyx_cur_scope->__pyx_v_rai->ai_family != __pyx_cur_scope->__pyx_v_lai->ai_family) != 0);
  48078. if (__pyx_t_8) {
  48079. /* "uvloop/loop.pyx":2968
  48080. * while rai is not NULL:
  48081. * if rai.ai_family != lai.ai_family:
  48082. * rai = rai.ai_next # <<<<<<<<<<<<<<
  48083. * continue
  48084. * if rai.ai_protocol != lai.ai_protocol:
  48085. */
  48086. __pyx_t_12 = __pyx_cur_scope->__pyx_v_rai->ai_next;
  48087. __pyx_cur_scope->__pyx_v_rai = __pyx_t_12;
  48088. /* "uvloop/loop.pyx":2969
  48089. * if rai.ai_family != lai.ai_family:
  48090. * rai = rai.ai_next
  48091. * continue # <<<<<<<<<<<<<<
  48092. * if rai.ai_protocol != lai.ai_protocol:
  48093. * rai = rai.ai_next
  48094. */
  48095. goto __pyx_L62_continue;
  48096. /* "uvloop/loop.pyx":2967
  48097. * rai = (<AddrInfo>rads).data
  48098. * while rai is not NULL:
  48099. * if rai.ai_family != lai.ai_family: # <<<<<<<<<<<<<<
  48100. * rai = rai.ai_next
  48101. * continue
  48102. */
  48103. }
  48104. /* "uvloop/loop.pyx":2970
  48105. * rai = rai.ai_next
  48106. * continue
  48107. * if rai.ai_protocol != lai.ai_protocol: # <<<<<<<<<<<<<<
  48108. * rai = rai.ai_next
  48109. * continue
  48110. */
  48111. __pyx_t_8 = ((__pyx_cur_scope->__pyx_v_rai->ai_protocol != __pyx_cur_scope->__pyx_v_lai->ai_protocol) != 0);
  48112. if (__pyx_t_8) {
  48113. /* "uvloop/loop.pyx":2971
  48114. * continue
  48115. * if rai.ai_protocol != lai.ai_protocol:
  48116. * rai = rai.ai_next # <<<<<<<<<<<<<<
  48117. * continue
  48118. * udp._connect(rai.ai_addr, rai.ai_addrlen)
  48119. */
  48120. __pyx_t_12 = __pyx_cur_scope->__pyx_v_rai->ai_next;
  48121. __pyx_cur_scope->__pyx_v_rai = __pyx_t_12;
  48122. /* "uvloop/loop.pyx":2972
  48123. * if rai.ai_protocol != lai.ai_protocol:
  48124. * rai = rai.ai_next
  48125. * continue # <<<<<<<<<<<<<<
  48126. * udp._connect(rai.ai_addr, rai.ai_addrlen)
  48127. * break
  48128. */
  48129. goto __pyx_L62_continue;
  48130. /* "uvloop/loop.pyx":2970
  48131. * rai = rai.ai_next
  48132. * continue
  48133. * if rai.ai_protocol != lai.ai_protocol: # <<<<<<<<<<<<<<
  48134. * rai = rai.ai_next
  48135. * continue
  48136. */
  48137. }
  48138. /* "uvloop/loop.pyx":2973
  48139. * rai = rai.ai_next
  48140. * continue
  48141. * udp._connect(rai.ai_addr, rai.ai_addrlen) # <<<<<<<<<<<<<<
  48142. * break
  48143. * else:
  48144. */
  48145. __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_UDPTransport *)__pyx_cur_scope->__pyx_v_udp->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->_connect(__pyx_cur_scope->__pyx_v_udp, __pyx_cur_scope->__pyx_v_rai->ai_addr, __pyx_cur_scope->__pyx_v_rai->ai_addrlen); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2973, __pyx_L1_error)
  48146. __Pyx_GOTREF(__pyx_t_3);
  48147. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  48148. /* "uvloop/loop.pyx":2974
  48149. * continue
  48150. * udp._connect(rai.ai_addr, rai.ai_addrlen)
  48151. * break # <<<<<<<<<<<<<<
  48152. * else:
  48153. * raise OSError(
  48154. */
  48155. goto __pyx_L63_break;
  48156. __pyx_L62_continue:;
  48157. }
  48158. /* "uvloop/loop.pyx":2976
  48159. * break
  48160. * else:
  48161. * raise OSError( # <<<<<<<<<<<<<<
  48162. * 'could not bind to remote_addr {}'.format(
  48163. * remote_addr))
  48164. */
  48165. /*else*/ {
  48166. /* "uvloop/loop.pyx":2977
  48167. * else:
  48168. * raise OSError(
  48169. * 'could not bind to remote_addr {}'.format( # <<<<<<<<<<<<<<
  48170. * remote_addr))
  48171. *
  48172. */
  48173. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_could_not_bind_to_remote_addr, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2977, __pyx_L1_error)
  48174. __Pyx_GOTREF(__pyx_t_5);
  48175. /* "uvloop/loop.pyx":2978
  48176. * raise OSError(
  48177. * 'could not bind to remote_addr {}'.format(
  48178. * remote_addr)) # <<<<<<<<<<<<<<
  48179. *
  48180. * udp._connect(rai.ai_addr, rai.ai_addrlen)
  48181. */
  48182. __pyx_t_4 = NULL;
  48183. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
  48184. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
  48185. if (likely(__pyx_t_4)) {
  48186. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
  48187. __Pyx_INCREF(__pyx_t_4);
  48188. __Pyx_INCREF(function);
  48189. __Pyx_DECREF_SET(__pyx_t_5, function);
  48190. }
  48191. }
  48192. __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_4, __pyx_cur_scope->__pyx_v_remote_addr) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_cur_scope->__pyx_v_remote_addr);
  48193. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  48194. if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2977, __pyx_L1_error)
  48195. __Pyx_GOTREF(__pyx_t_3);
  48196. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  48197. /* "uvloop/loop.pyx":2976
  48198. * break
  48199. * else:
  48200. * raise OSError( # <<<<<<<<<<<<<<
  48201. * 'could not bind to remote_addr {}'.format(
  48202. * remote_addr))
  48203. */
  48204. __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_OSError, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2976, __pyx_L1_error)
  48205. __Pyx_GOTREF(__pyx_t_5);
  48206. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  48207. __Pyx_Raise(__pyx_t_5, 0, 0, 0);
  48208. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  48209. __PYX_ERR(2, 2976, __pyx_L1_error)
  48210. }
  48211. __pyx_L63_break:;
  48212. /* "uvloop/loop.pyx":2980
  48213. * remote_addr))
  48214. *
  48215. * udp._connect(rai.ai_addr, rai.ai_addrlen) # <<<<<<<<<<<<<<
  48216. *
  48217. * if allow_broadcast:
  48218. */
  48219. __pyx_t_5 = ((struct __pyx_vtabstruct_6uvloop_4loop_UDPTransport *)__pyx_cur_scope->__pyx_v_udp->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->_connect(__pyx_cur_scope->__pyx_v_udp, __pyx_cur_scope->__pyx_v_rai->ai_addr, __pyx_cur_scope->__pyx_v_rai->ai_addrlen); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2980, __pyx_L1_error)
  48220. __Pyx_GOTREF(__pyx_t_5);
  48221. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  48222. /* "uvloop/loop.pyx":2964
  48223. * local_addr)) from ctx
  48224. *
  48225. * if rads is not None: # <<<<<<<<<<<<<<
  48226. * rai = (<AddrInfo>rads).data
  48227. * while rai is not NULL:
  48228. */
  48229. }
  48230. }
  48231. __pyx_L32:;
  48232. }
  48233. __pyx_L4:;
  48234. /* "uvloop/loop.pyx":2982
  48235. * udp._connect(rai.ai_addr, rai.ai_addrlen)
  48236. *
  48237. * if allow_broadcast: # <<<<<<<<<<<<<<
  48238. * udp._set_broadcast(1)
  48239. *
  48240. */
  48241. __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_allow_broadcast); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(2, 2982, __pyx_L1_error)
  48242. if (__pyx_t_8) {
  48243. /* "uvloop/loop.pyx":2983
  48244. *
  48245. * if allow_broadcast:
  48246. * udp._set_broadcast(1) # <<<<<<<<<<<<<<
  48247. *
  48248. * protocol = protocol_factory()
  48249. */
  48250. __pyx_t_5 = ((struct __pyx_vtabstruct_6uvloop_4loop_UDPTransport *)__pyx_cur_scope->__pyx_v_udp->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->_set_broadcast(__pyx_cur_scope->__pyx_v_udp, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2983, __pyx_L1_error)
  48251. __Pyx_GOTREF(__pyx_t_5);
  48252. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  48253. /* "uvloop/loop.pyx":2982
  48254. * udp._connect(rai.ai_addr, rai.ai_addrlen)
  48255. *
  48256. * if allow_broadcast: # <<<<<<<<<<<<<<
  48257. * udp._set_broadcast(1)
  48258. *
  48259. */
  48260. }
  48261. /* "uvloop/loop.pyx":2985
  48262. * udp._set_broadcast(1)
  48263. *
  48264. * protocol = protocol_factory() # <<<<<<<<<<<<<<
  48265. * waiter = self._new_future()
  48266. * assert udp is not None
  48267. */
  48268. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_protocol_factory);
  48269. __pyx_t_3 = __pyx_cur_scope->__pyx_v_protocol_factory; __pyx_t_4 = NULL;
  48270. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
  48271. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
  48272. if (likely(__pyx_t_4)) {
  48273. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  48274. __Pyx_INCREF(__pyx_t_4);
  48275. __Pyx_INCREF(function);
  48276. __Pyx_DECREF_SET(__pyx_t_3, function);
  48277. }
  48278. }
  48279. __pyx_t_5 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
  48280. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  48281. if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2985, __pyx_L1_error)
  48282. __Pyx_GOTREF(__pyx_t_5);
  48283. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  48284. __Pyx_GIVEREF(__pyx_t_5);
  48285. __pyx_cur_scope->__pyx_v_protocol = __pyx_t_5;
  48286. __pyx_t_5 = 0;
  48287. /* "uvloop/loop.pyx":2986
  48288. *
  48289. * protocol = protocol_factory()
  48290. * waiter = self._new_future() # <<<<<<<<<<<<<<
  48291. * assert udp is not None
  48292. * udp._set_protocol(protocol)
  48293. */
  48294. __pyx_t_5 = __pyx_f_6uvloop_4loop_4Loop__new_future(__pyx_cur_scope->__pyx_v_self); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2986, __pyx_L1_error)
  48295. __Pyx_GOTREF(__pyx_t_5);
  48296. __Pyx_GIVEREF(__pyx_t_5);
  48297. __pyx_cur_scope->__pyx_v_waiter = __pyx_t_5;
  48298. __pyx_t_5 = 0;
  48299. /* "uvloop/loop.pyx":2987
  48300. * protocol = protocol_factory()
  48301. * waiter = self._new_future()
  48302. * assert udp is not None # <<<<<<<<<<<<<<
  48303. * udp._set_protocol(protocol)
  48304. * udp._set_waiter(waiter)
  48305. */
  48306. #ifndef CYTHON_WITHOUT_ASSERTIONS
  48307. if (unlikely(!Py_OptimizeFlag)) {
  48308. __pyx_t_8 = (((PyObject *)__pyx_cur_scope->__pyx_v_udp) != Py_None);
  48309. if (unlikely(!(__pyx_t_8 != 0))) {
  48310. PyErr_SetNone(PyExc_AssertionError);
  48311. __PYX_ERR(2, 2987, __pyx_L1_error)
  48312. }
  48313. }
  48314. #endif
  48315. /* "uvloop/loop.pyx":2988
  48316. * waiter = self._new_future()
  48317. * assert udp is not None
  48318. * udp._set_protocol(protocol) # <<<<<<<<<<<<<<
  48319. * udp._set_waiter(waiter)
  48320. * udp._init_protocol()
  48321. */
  48322. __pyx_t_5 = ((struct __pyx_vtabstruct_6uvloop_4loop_UDPTransport *)__pyx_cur_scope->__pyx_v_udp->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._set_protocol(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_cur_scope->__pyx_v_udp), __pyx_cur_scope->__pyx_v_protocol); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2988, __pyx_L1_error)
  48323. __Pyx_GOTREF(__pyx_t_5);
  48324. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  48325. /* "uvloop/loop.pyx":2989
  48326. * assert udp is not None
  48327. * udp._set_protocol(protocol)
  48328. * udp._set_waiter(waiter) # <<<<<<<<<<<<<<
  48329. * udp._init_protocol()
  48330. *
  48331. */
  48332. __pyx_t_5 = ((struct __pyx_vtabstruct_6uvloop_4loop_UDPTransport *)__pyx_cur_scope->__pyx_v_udp->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._set_waiter(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_cur_scope->__pyx_v_udp), __pyx_cur_scope->__pyx_v_waiter); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2989, __pyx_L1_error)
  48333. __Pyx_GOTREF(__pyx_t_5);
  48334. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  48335. /* "uvloop/loop.pyx":2990
  48336. * udp._set_protocol(protocol)
  48337. * udp._set_waiter(waiter)
  48338. * udp._init_protocol() # <<<<<<<<<<<<<<
  48339. *
  48340. * await waiter
  48341. */
  48342. __pyx_t_5 = ((struct __pyx_vtabstruct_6uvloop_4loop_UDPTransport *)__pyx_cur_scope->__pyx_v_udp->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._init_protocol(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_cur_scope->__pyx_v_udp)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2990, __pyx_L1_error)
  48343. __Pyx_GOTREF(__pyx_t_5);
  48344. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  48345. /* "uvloop/loop.pyx":2992
  48346. * udp._init_protocol()
  48347. *
  48348. * await waiter # <<<<<<<<<<<<<<
  48349. * return udp, protocol
  48350. *
  48351. */
  48352. __pyx_r = __Pyx_Coroutine_Yield_From(__pyx_generator, __pyx_cur_scope->__pyx_v_waiter);
  48353. __Pyx_XGOTREF(__pyx_r);
  48354. if (likely(__pyx_r)) {
  48355. __Pyx_XGIVEREF(__pyx_r);
  48356. __Pyx_RefNannyFinishContext();
  48357. __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  48358. /* return from generator, awaiting value */
  48359. __pyx_generator->resume_label = 3;
  48360. return __pyx_r;
  48361. __pyx_L67_resume_from_await:;
  48362. if (unlikely(!__pyx_sent_value)) __PYX_ERR(2, 2992, __pyx_L1_error)
  48363. } else {
  48364. PyObject* exc_type = __Pyx_PyErr_Occurred();
  48365. if (exc_type) {
  48366. if (likely(exc_type == PyExc_StopIteration || (exc_type != PyExc_GeneratorExit && __Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)))) PyErr_Clear();
  48367. else __PYX_ERR(2, 2992, __pyx_L1_error)
  48368. }
  48369. }
  48370. /* "uvloop/loop.pyx":2993
  48371. *
  48372. * await waiter
  48373. * return udp, protocol # <<<<<<<<<<<<<<
  48374. *
  48375. * def _asyncgen_finalizer_hook(self, agen):
  48376. */
  48377. __Pyx_XDECREF(__pyx_r);
  48378. __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2993, __pyx_L1_error)
  48379. __Pyx_GOTREF(__pyx_t_5);
  48380. __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_udp));
  48381. __Pyx_GIVEREF(((PyObject *)__pyx_cur_scope->__pyx_v_udp));
  48382. PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_cur_scope->__pyx_v_udp));
  48383. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_protocol);
  48384. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_protocol);
  48385. PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_cur_scope->__pyx_v_protocol);
  48386. __pyx_r = NULL; __Pyx_ReturnWithStopIteration(__pyx_t_5);
  48387. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  48388. __pyx_t_5 = 0;
  48389. goto __pyx_L0;
  48390. CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
  48391. /* "uvloop/loop.pyx":2837
  48392. *
  48393. * @cython.iterable_coroutine
  48394. * async def create_datagram_endpoint(self, protocol_factory, # <<<<<<<<<<<<<<
  48395. * local_addr=None, remote_addr=None, *,
  48396. * family=0, proto=0, flags=0,
  48397. */
  48398. /* function exit code */
  48399. __pyx_L1_error:;
  48400. __Pyx_XDECREF(__pyx_t_3);
  48401. __Pyx_XDECREF(__pyx_t_4);
  48402. __Pyx_XDECREF(__pyx_t_5);
  48403. __Pyx_AddTraceback("create_datagram_endpoint", __pyx_clineno, __pyx_lineno, __pyx_filename);
  48404. __pyx_L0:;
  48405. __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  48406. #if !CYTHON_USE_EXC_INFO_STACK
  48407. __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  48408. #endif
  48409. __pyx_generator->resume_label = -1;
  48410. __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  48411. __Pyx_RefNannyFinishContext();
  48412. return __pyx_r;
  48413. }
  48414. /* "uvloop/loop.pyx":2995
  48415. * return udp, protocol
  48416. *
  48417. * def _asyncgen_finalizer_hook(self, agen): # <<<<<<<<<<<<<<
  48418. * self._asyncgens.discard(agen)
  48419. * if not self.is_closed():
  48420. */
  48421. /* Python wrapper */
  48422. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_128_asyncgen_finalizer_hook(PyObject *__pyx_v_self, PyObject *__pyx_v_agen); /*proto*/
  48423. static char __pyx_doc_6uvloop_4loop_4Loop_127_asyncgen_finalizer_hook[] = "Loop._asyncgen_finalizer_hook(self, agen)";
  48424. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_128_asyncgen_finalizer_hook(PyObject *__pyx_v_self, PyObject *__pyx_v_agen) {
  48425. PyObject *__pyx_r = 0;
  48426. __Pyx_RefNannyDeclarations
  48427. __Pyx_RefNannySetupContext("_asyncgen_finalizer_hook (wrapper)", 0);
  48428. __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_127_asyncgen_finalizer_hook(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self), ((PyObject *)__pyx_v_agen));
  48429. /* function exit code */
  48430. __Pyx_RefNannyFinishContext();
  48431. return __pyx_r;
  48432. }
  48433. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_127_asyncgen_finalizer_hook(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_agen) {
  48434. PyObject *__pyx_r = NULL;
  48435. __Pyx_RefNannyDeclarations
  48436. PyObject *__pyx_t_1 = NULL;
  48437. PyObject *__pyx_t_2 = NULL;
  48438. PyObject *__pyx_t_3 = NULL;
  48439. int __pyx_t_4;
  48440. int __pyx_t_5;
  48441. PyObject *__pyx_t_6 = NULL;
  48442. PyObject *__pyx_t_7 = NULL;
  48443. PyObject *__pyx_t_8 = NULL;
  48444. int __pyx_t_9;
  48445. __Pyx_RefNannySetupContext("_asyncgen_finalizer_hook", 0);
  48446. /* "uvloop/loop.pyx":2996
  48447. *
  48448. * def _asyncgen_finalizer_hook(self, agen):
  48449. * self._asyncgens.discard(agen) # <<<<<<<<<<<<<<
  48450. * if not self.is_closed():
  48451. * self.call_soon_threadsafe(self.create_task, agen.aclose())
  48452. */
  48453. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_asyncgens, __pyx_n_s_discard); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 2996, __pyx_L1_error)
  48454. __Pyx_GOTREF(__pyx_t_2);
  48455. __pyx_t_3 = NULL;
  48456. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
  48457. __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
  48458. if (likely(__pyx_t_3)) {
  48459. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  48460. __Pyx_INCREF(__pyx_t_3);
  48461. __Pyx_INCREF(function);
  48462. __Pyx_DECREF_SET(__pyx_t_2, function);
  48463. }
  48464. }
  48465. __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_agen) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_agen);
  48466. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  48467. if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2996, __pyx_L1_error)
  48468. __Pyx_GOTREF(__pyx_t_1);
  48469. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  48470. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  48471. /* "uvloop/loop.pyx":2997
  48472. * def _asyncgen_finalizer_hook(self, agen):
  48473. * self._asyncgens.discard(agen)
  48474. * if not self.is_closed(): # <<<<<<<<<<<<<<
  48475. * self.call_soon_threadsafe(self.create_task, agen.aclose())
  48476. *
  48477. */
  48478. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_closed); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 2997, __pyx_L1_error)
  48479. __Pyx_GOTREF(__pyx_t_2);
  48480. __pyx_t_3 = NULL;
  48481. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
  48482. __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
  48483. if (likely(__pyx_t_3)) {
  48484. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  48485. __Pyx_INCREF(__pyx_t_3);
  48486. __Pyx_INCREF(function);
  48487. __Pyx_DECREF_SET(__pyx_t_2, function);
  48488. }
  48489. }
  48490. __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  48491. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  48492. if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2997, __pyx_L1_error)
  48493. __Pyx_GOTREF(__pyx_t_1);
  48494. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  48495. __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(2, 2997, __pyx_L1_error)
  48496. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  48497. __pyx_t_5 = ((!__pyx_t_4) != 0);
  48498. if (__pyx_t_5) {
  48499. /* "uvloop/loop.pyx":2998
  48500. * self._asyncgens.discard(agen)
  48501. * if not self.is_closed():
  48502. * self.call_soon_threadsafe(self.create_task, agen.aclose()) # <<<<<<<<<<<<<<
  48503. *
  48504. * def _asyncgen_firstiter_hook(self, agen):
  48505. */
  48506. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_call_soon_threadsafe); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 2998, __pyx_L1_error)
  48507. __Pyx_GOTREF(__pyx_t_2);
  48508. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_create_task); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2998, __pyx_L1_error)
  48509. __Pyx_GOTREF(__pyx_t_3);
  48510. __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_agen, __pyx_n_s_aclose); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 2998, __pyx_L1_error)
  48511. __Pyx_GOTREF(__pyx_t_7);
  48512. __pyx_t_8 = NULL;
  48513. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
  48514. __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
  48515. if (likely(__pyx_t_8)) {
  48516. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
  48517. __Pyx_INCREF(__pyx_t_8);
  48518. __Pyx_INCREF(function);
  48519. __Pyx_DECREF_SET(__pyx_t_7, function);
  48520. }
  48521. }
  48522. __pyx_t_6 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_7);
  48523. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  48524. if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 2998, __pyx_L1_error)
  48525. __Pyx_GOTREF(__pyx_t_6);
  48526. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  48527. __pyx_t_7 = NULL;
  48528. __pyx_t_9 = 0;
  48529. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
  48530. __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
  48531. if (likely(__pyx_t_7)) {
  48532. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  48533. __Pyx_INCREF(__pyx_t_7);
  48534. __Pyx_INCREF(function);
  48535. __Pyx_DECREF_SET(__pyx_t_2, function);
  48536. __pyx_t_9 = 1;
  48537. }
  48538. }
  48539. #if CYTHON_FAST_PYCALL
  48540. if (PyFunction_Check(__pyx_t_2)) {
  48541. PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_3, __pyx_t_6};
  48542. __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2998, __pyx_L1_error)
  48543. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  48544. __Pyx_GOTREF(__pyx_t_1);
  48545. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  48546. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  48547. } else
  48548. #endif
  48549. #if CYTHON_FAST_PYCCALL
  48550. if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
  48551. PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_3, __pyx_t_6};
  48552. __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2998, __pyx_L1_error)
  48553. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  48554. __Pyx_GOTREF(__pyx_t_1);
  48555. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  48556. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  48557. } else
  48558. #endif
  48559. {
  48560. __pyx_t_8 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 2998, __pyx_L1_error)
  48561. __Pyx_GOTREF(__pyx_t_8);
  48562. if (__pyx_t_7) {
  48563. __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL;
  48564. }
  48565. __Pyx_GIVEREF(__pyx_t_3);
  48566. PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_9, __pyx_t_3);
  48567. __Pyx_GIVEREF(__pyx_t_6);
  48568. PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_9, __pyx_t_6);
  48569. __pyx_t_3 = 0;
  48570. __pyx_t_6 = 0;
  48571. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2998, __pyx_L1_error)
  48572. __Pyx_GOTREF(__pyx_t_1);
  48573. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  48574. }
  48575. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  48576. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  48577. /* "uvloop/loop.pyx":2997
  48578. * def _asyncgen_finalizer_hook(self, agen):
  48579. * self._asyncgens.discard(agen)
  48580. * if not self.is_closed(): # <<<<<<<<<<<<<<
  48581. * self.call_soon_threadsafe(self.create_task, agen.aclose())
  48582. *
  48583. */
  48584. }
  48585. /* "uvloop/loop.pyx":2995
  48586. * return udp, protocol
  48587. *
  48588. * def _asyncgen_finalizer_hook(self, agen): # <<<<<<<<<<<<<<
  48589. * self._asyncgens.discard(agen)
  48590. * if not self.is_closed():
  48591. */
  48592. /* function exit code */
  48593. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  48594. goto __pyx_L0;
  48595. __pyx_L1_error:;
  48596. __Pyx_XDECREF(__pyx_t_1);
  48597. __Pyx_XDECREF(__pyx_t_2);
  48598. __Pyx_XDECREF(__pyx_t_3);
  48599. __Pyx_XDECREF(__pyx_t_6);
  48600. __Pyx_XDECREF(__pyx_t_7);
  48601. __Pyx_XDECREF(__pyx_t_8);
  48602. __Pyx_AddTraceback("uvloop.loop.Loop._asyncgen_finalizer_hook", __pyx_clineno, __pyx_lineno, __pyx_filename);
  48603. __pyx_r = NULL;
  48604. __pyx_L0:;
  48605. __Pyx_XGIVEREF(__pyx_r);
  48606. __Pyx_RefNannyFinishContext();
  48607. return __pyx_r;
  48608. }
  48609. /* "uvloop/loop.pyx":3000
  48610. * self.call_soon_threadsafe(self.create_task, agen.aclose())
  48611. *
  48612. * def _asyncgen_firstiter_hook(self, agen): # <<<<<<<<<<<<<<
  48613. * if self._asyncgens_shutdown_called:
  48614. * _warn_with_source(
  48615. */
  48616. /* Python wrapper */
  48617. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_130_asyncgen_firstiter_hook(PyObject *__pyx_v_self, PyObject *__pyx_v_agen); /*proto*/
  48618. static char __pyx_doc_6uvloop_4loop_4Loop_129_asyncgen_firstiter_hook[] = "Loop._asyncgen_firstiter_hook(self, agen)";
  48619. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_130_asyncgen_firstiter_hook(PyObject *__pyx_v_self, PyObject *__pyx_v_agen) {
  48620. PyObject *__pyx_r = 0;
  48621. __Pyx_RefNannyDeclarations
  48622. __Pyx_RefNannySetupContext("_asyncgen_firstiter_hook (wrapper)", 0);
  48623. __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_129_asyncgen_firstiter_hook(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self), ((PyObject *)__pyx_v_agen));
  48624. /* function exit code */
  48625. __Pyx_RefNannyFinishContext();
  48626. return __pyx_r;
  48627. }
  48628. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_129_asyncgen_firstiter_hook(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_agen) {
  48629. PyObject *__pyx_r = NULL;
  48630. __Pyx_RefNannyDeclarations
  48631. int __pyx_t_1;
  48632. PyObject *__pyx_t_2 = NULL;
  48633. PyObject *__pyx_t_3 = NULL;
  48634. PyObject *__pyx_t_4 = NULL;
  48635. __Pyx_RefNannySetupContext("_asyncgen_firstiter_hook", 0);
  48636. /* "uvloop/loop.pyx":3001
  48637. *
  48638. * def _asyncgen_firstiter_hook(self, agen):
  48639. * if self._asyncgens_shutdown_called: # <<<<<<<<<<<<<<
  48640. * _warn_with_source(
  48641. * "asynchronous generator {!r} was scheduled after "
  48642. */
  48643. __pyx_t_1 = (__pyx_v_self->_asyncgens_shutdown_called != 0);
  48644. if (__pyx_t_1) {
  48645. /* "uvloop/loop.pyx":3004
  48646. * _warn_with_source(
  48647. * "asynchronous generator {!r} was scheduled after "
  48648. * "loop.shutdown_asyncgens() call".format(agen), # <<<<<<<<<<<<<<
  48649. * ResourceWarning, self)
  48650. *
  48651. */
  48652. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_asynchronous_generator_r_was_sch, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 3004, __pyx_L1_error)
  48653. __Pyx_GOTREF(__pyx_t_3);
  48654. __pyx_t_4 = NULL;
  48655. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
  48656. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
  48657. if (likely(__pyx_t_4)) {
  48658. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  48659. __Pyx_INCREF(__pyx_t_4);
  48660. __Pyx_INCREF(function);
  48661. __Pyx_DECREF_SET(__pyx_t_3, function);
  48662. }
  48663. }
  48664. __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_agen) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_agen);
  48665. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  48666. if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 3004, __pyx_L1_error)
  48667. __Pyx_GOTREF(__pyx_t_2);
  48668. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  48669. /* "uvloop/loop.pyx":3005
  48670. * "asynchronous generator {!r} was scheduled after "
  48671. * "loop.shutdown_asyncgens() call".format(agen),
  48672. * ResourceWarning, self) # <<<<<<<<<<<<<<
  48673. *
  48674. * self._asyncgens.add(agen)
  48675. */
  48676. __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ResourceWarning); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 3005, __pyx_L1_error)
  48677. __Pyx_GOTREF(__pyx_t_3);
  48678. /* "uvloop/loop.pyx":3002
  48679. * def _asyncgen_firstiter_hook(self, agen):
  48680. * if self._asyncgens_shutdown_called:
  48681. * _warn_with_source( # <<<<<<<<<<<<<<
  48682. * "asynchronous generator {!r} was scheduled after "
  48683. * "loop.shutdown_asyncgens() call".format(agen),
  48684. */
  48685. __pyx_t_4 = __pyx_f_6uvloop_4loop__warn_with_source(__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 3002, __pyx_L1_error)
  48686. __Pyx_GOTREF(__pyx_t_4);
  48687. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  48688. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  48689. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  48690. /* "uvloop/loop.pyx":3001
  48691. *
  48692. * def _asyncgen_firstiter_hook(self, agen):
  48693. * if self._asyncgens_shutdown_called: # <<<<<<<<<<<<<<
  48694. * _warn_with_source(
  48695. * "asynchronous generator {!r} was scheduled after "
  48696. */
  48697. }
  48698. /* "uvloop/loop.pyx":3007
  48699. * ResourceWarning, self)
  48700. *
  48701. * self._asyncgens.add(agen) # <<<<<<<<<<<<<<
  48702. *
  48703. * @cython.iterable_coroutine
  48704. */
  48705. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_asyncgens, __pyx_n_s_add); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 3007, __pyx_L1_error)
  48706. __Pyx_GOTREF(__pyx_t_3);
  48707. __pyx_t_2 = NULL;
  48708. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
  48709. __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
  48710. if (likely(__pyx_t_2)) {
  48711. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  48712. __Pyx_INCREF(__pyx_t_2);
  48713. __Pyx_INCREF(function);
  48714. __Pyx_DECREF_SET(__pyx_t_3, function);
  48715. }
  48716. }
  48717. __pyx_t_4 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_v_agen) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_agen);
  48718. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  48719. if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 3007, __pyx_L1_error)
  48720. __Pyx_GOTREF(__pyx_t_4);
  48721. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  48722. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  48723. /* "uvloop/loop.pyx":3000
  48724. * self.call_soon_threadsafe(self.create_task, agen.aclose())
  48725. *
  48726. * def _asyncgen_firstiter_hook(self, agen): # <<<<<<<<<<<<<<
  48727. * if self._asyncgens_shutdown_called:
  48728. * _warn_with_source(
  48729. */
  48730. /* function exit code */
  48731. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  48732. goto __pyx_L0;
  48733. __pyx_L1_error:;
  48734. __Pyx_XDECREF(__pyx_t_2);
  48735. __Pyx_XDECREF(__pyx_t_3);
  48736. __Pyx_XDECREF(__pyx_t_4);
  48737. __Pyx_AddTraceback("uvloop.loop.Loop._asyncgen_firstiter_hook", __pyx_clineno, __pyx_lineno, __pyx_filename);
  48738. __pyx_r = NULL;
  48739. __pyx_L0:;
  48740. __Pyx_XGIVEREF(__pyx_r);
  48741. __Pyx_RefNannyFinishContext();
  48742. return __pyx_r;
  48743. }
  48744. static PyObject *__pyx_gb_6uvloop_4loop_4Loop_133generator19(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
  48745. /* "uvloop/loop.pyx":3010
  48746. *
  48747. * @cython.iterable_coroutine
  48748. * async def shutdown_asyncgens(self): # <<<<<<<<<<<<<<
  48749. * """Shutdown all active asynchronous generators."""
  48750. * self._asyncgens_shutdown_called = True
  48751. */
  48752. /* Python wrapper */
  48753. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_132shutdown_asyncgens(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  48754. static char __pyx_doc_6uvloop_4loop_4Loop_131shutdown_asyncgens[] = "Loop.shutdown_asyncgens(self)\nShutdown all active asynchronous generators.";
  48755. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_132shutdown_asyncgens(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  48756. PyObject *__pyx_r = 0;
  48757. __Pyx_RefNannyDeclarations
  48758. __Pyx_RefNannySetupContext("shutdown_asyncgens (wrapper)", 0);
  48759. __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_131shutdown_asyncgens(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self));
  48760. /* function exit code */
  48761. __Pyx_RefNannyFinishContext();
  48762. return __pyx_r;
  48763. }
  48764. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_131shutdown_asyncgens(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) {
  48765. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_27_shutdown_asyncgens *__pyx_cur_scope;
  48766. PyObject *__pyx_r = NULL;
  48767. __Pyx_RefNannyDeclarations
  48768. __Pyx_RefNannySetupContext("shutdown_asyncgens", 0);
  48769. __pyx_cur_scope = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_27_shutdown_asyncgens *)__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_27_shutdown_asyncgens(__pyx_ptype_6uvloop_4loop___pyx_scope_struct_27_shutdown_asyncgens, __pyx_empty_tuple, NULL);
  48770. if (unlikely(!__pyx_cur_scope)) {
  48771. __pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_27_shutdown_asyncgens *)Py_None);
  48772. __Pyx_INCREF(Py_None);
  48773. __PYX_ERR(2, 3010, __pyx_L1_error)
  48774. } else {
  48775. __Pyx_GOTREF(__pyx_cur_scope);
  48776. }
  48777. __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  48778. __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  48779. __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  48780. {
  48781. __pyx_CoroutineObject *gen = __Pyx_IterableCoroutine_New((__pyx_coroutine_body_t) __pyx_gb_6uvloop_4loop_4Loop_133generator19, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_shutdown_asyncgens, __pyx_n_s_Loop_shutdown_asyncgens, __pyx_n_s_uvloop_loop); if (unlikely(!gen)) __PYX_ERR(2, 3010, __pyx_L1_error)
  48782. __Pyx_DECREF(__pyx_cur_scope);
  48783. __Pyx_RefNannyFinishContext();
  48784. return (PyObject *) gen;
  48785. }
  48786. /* function exit code */
  48787. __pyx_L1_error:;
  48788. __Pyx_AddTraceback("uvloop.loop.Loop.shutdown_asyncgens", __pyx_clineno, __pyx_lineno, __pyx_filename);
  48789. __pyx_r = NULL;
  48790. __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  48791. __Pyx_XGIVEREF(__pyx_r);
  48792. __Pyx_RefNannyFinishContext();
  48793. return __pyx_r;
  48794. }
  48795. static PyObject *__pyx_gb_6uvloop_4loop_4Loop_133generator19(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
  48796. {
  48797. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_27_shutdown_asyncgens *__pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_27_shutdown_asyncgens *)__pyx_generator->closure);
  48798. PyObject *__pyx_r = NULL;
  48799. int __pyx_t_1;
  48800. int __pyx_t_2;
  48801. int __pyx_t_3;
  48802. PyObject *__pyx_t_4 = NULL;
  48803. Py_ssize_t __pyx_t_5;
  48804. PyObject *__pyx_t_6 = NULL;
  48805. PyObject *__pyx_t_7 = NULL;
  48806. PyObject *__pyx_t_8 = NULL;
  48807. PyObject *__pyx_t_9 = NULL;
  48808. PyObject *(*__pyx_t_10)(PyObject *);
  48809. PyObject *(*__pyx_t_11)(PyObject *);
  48810. PyObject *__pyx_t_12 = NULL;
  48811. PyObject *__pyx_t_13 = NULL;
  48812. __Pyx_RefNannyDeclarations
  48813. __Pyx_RefNannySetupContext("shutdown_asyncgens", 0);
  48814. switch (__pyx_generator->resume_label) {
  48815. case 0: goto __pyx_L3_first_run;
  48816. case 1: goto __pyx_L9_resume_from_await;
  48817. default: /* CPython raises the right error here */
  48818. __Pyx_RefNannyFinishContext();
  48819. return NULL;
  48820. }
  48821. __pyx_L3_first_run:;
  48822. if (unlikely(!__pyx_sent_value)) __PYX_ERR(2, 3010, __pyx_L1_error)
  48823. /* "uvloop/loop.pyx":3012
  48824. * async def shutdown_asyncgens(self):
  48825. * """Shutdown all active asynchronous generators."""
  48826. * self._asyncgens_shutdown_called = True # <<<<<<<<<<<<<<
  48827. *
  48828. * if self._asyncgens is None or not len(self._asyncgens):
  48829. */
  48830. __pyx_cur_scope->__pyx_v_self->_asyncgens_shutdown_called = 1;
  48831. /* "uvloop/loop.pyx":3014
  48832. * self._asyncgens_shutdown_called = True
  48833. *
  48834. * if self._asyncgens is None or not len(self._asyncgens): # <<<<<<<<<<<<<<
  48835. * # If Python version is <3.6 or we don't have any asynchronous
  48836. * # generators alive.
  48837. */
  48838. __pyx_t_2 = (__pyx_cur_scope->__pyx_v_self->_asyncgens == Py_None);
  48839. __pyx_t_3 = (__pyx_t_2 != 0);
  48840. if (!__pyx_t_3) {
  48841. } else {
  48842. __pyx_t_1 = __pyx_t_3;
  48843. goto __pyx_L5_bool_binop_done;
  48844. }
  48845. __pyx_t_4 = __pyx_cur_scope->__pyx_v_self->_asyncgens;
  48846. __Pyx_INCREF(__pyx_t_4);
  48847. __pyx_t_5 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(2, 3014, __pyx_L1_error)
  48848. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  48849. __pyx_t_3 = ((!(__pyx_t_5 != 0)) != 0);
  48850. __pyx_t_1 = __pyx_t_3;
  48851. __pyx_L5_bool_binop_done:;
  48852. if (__pyx_t_1) {
  48853. /* "uvloop/loop.pyx":3017
  48854. * # If Python version is <3.6 or we don't have any asynchronous
  48855. * # generators alive.
  48856. * return # <<<<<<<<<<<<<<
  48857. *
  48858. * closing_agens = list(self._asyncgens)
  48859. */
  48860. __Pyx_XDECREF(__pyx_r);
  48861. __pyx_r = NULL;
  48862. goto __pyx_L0;
  48863. /* "uvloop/loop.pyx":3014
  48864. * self._asyncgens_shutdown_called = True
  48865. *
  48866. * if self._asyncgens is None or not len(self._asyncgens): # <<<<<<<<<<<<<<
  48867. * # If Python version is <3.6 or we don't have any asynchronous
  48868. * # generators alive.
  48869. */
  48870. }
  48871. /* "uvloop/loop.pyx":3019
  48872. * return
  48873. *
  48874. * closing_agens = list(self._asyncgens) # <<<<<<<<<<<<<<
  48875. * self._asyncgens.clear()
  48876. *
  48877. */
  48878. __pyx_t_4 = PySequence_List(__pyx_cur_scope->__pyx_v_self->_asyncgens); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 3019, __pyx_L1_error)
  48879. __Pyx_GOTREF(__pyx_t_4);
  48880. __Pyx_GIVEREF(__pyx_t_4);
  48881. __pyx_cur_scope->__pyx_v_closing_agens = ((PyObject*)__pyx_t_4);
  48882. __pyx_t_4 = 0;
  48883. /* "uvloop/loop.pyx":3020
  48884. *
  48885. * closing_agens = list(self._asyncgens)
  48886. * self._asyncgens.clear() # <<<<<<<<<<<<<<
  48887. *
  48888. * shutdown_coro = aio_gather(
  48889. */
  48890. __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self->_asyncgens, __pyx_n_s_clear); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 3020, __pyx_L1_error)
  48891. __Pyx_GOTREF(__pyx_t_6);
  48892. __pyx_t_7 = NULL;
  48893. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
  48894. __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
  48895. if (likely(__pyx_t_7)) {
  48896. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
  48897. __Pyx_INCREF(__pyx_t_7);
  48898. __Pyx_INCREF(function);
  48899. __Pyx_DECREF_SET(__pyx_t_6, function);
  48900. }
  48901. }
  48902. __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
  48903. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  48904. if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 3020, __pyx_L1_error)
  48905. __Pyx_GOTREF(__pyx_t_4);
  48906. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  48907. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  48908. /* "uvloop/loop.pyx":3022
  48909. * self._asyncgens.clear()
  48910. *
  48911. * shutdown_coro = aio_gather( # <<<<<<<<<<<<<<
  48912. * *[ag.aclose() for ag in closing_agens],
  48913. * return_exceptions=True,
  48914. */
  48915. { /* enter inner scope */
  48916. /* "uvloop/loop.pyx":3023
  48917. *
  48918. * shutdown_coro = aio_gather(
  48919. * *[ag.aclose() for ag in closing_agens], # <<<<<<<<<<<<<<
  48920. * return_exceptions=True,
  48921. * loop=self)
  48922. */
  48923. __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 3023, __pyx_L1_error)
  48924. __Pyx_GOTREF(__pyx_t_4);
  48925. __pyx_t_6 = __pyx_cur_scope->__pyx_v_closing_agens; __Pyx_INCREF(__pyx_t_6); __pyx_t_5 = 0;
  48926. for (;;) {
  48927. if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_6)) break;
  48928. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  48929. __pyx_t_7 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(2, 3023, __pyx_L1_error)
  48930. #else
  48931. __pyx_t_7 = PySequence_ITEM(__pyx_t_6, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 3023, __pyx_L1_error)
  48932. __Pyx_GOTREF(__pyx_t_7);
  48933. #endif
  48934. __Pyx_XGOTREF(__pyx_cur_scope->__pyx_8genexpr4__pyx_v_ag);
  48935. __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_8genexpr4__pyx_v_ag, __pyx_t_7);
  48936. __Pyx_GIVEREF(__pyx_t_7);
  48937. __pyx_t_7 = 0;
  48938. __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_8genexpr4__pyx_v_ag, __pyx_n_s_aclose); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 3023, __pyx_L1_error)
  48939. __Pyx_GOTREF(__pyx_t_8);
  48940. __pyx_t_9 = NULL;
  48941. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
  48942. __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
  48943. if (likely(__pyx_t_9)) {
  48944. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
  48945. __Pyx_INCREF(__pyx_t_9);
  48946. __Pyx_INCREF(function);
  48947. __Pyx_DECREF_SET(__pyx_t_8, function);
  48948. }
  48949. }
  48950. __pyx_t_7 = (__pyx_t_9) ? __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_9) : __Pyx_PyObject_CallNoArg(__pyx_t_8);
  48951. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  48952. if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 3023, __pyx_L1_error)
  48953. __Pyx_GOTREF(__pyx_t_7);
  48954. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  48955. if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_7))) __PYX_ERR(2, 3023, __pyx_L1_error)
  48956. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  48957. }
  48958. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  48959. } /* exit inner scope */
  48960. /* "uvloop/loop.pyx":3022
  48961. * self._asyncgens.clear()
  48962. *
  48963. * shutdown_coro = aio_gather( # <<<<<<<<<<<<<<
  48964. * *[ag.aclose() for ag in closing_agens],
  48965. * return_exceptions=True,
  48966. */
  48967. __pyx_t_6 = PySequence_Tuple(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 3022, __pyx_L1_error)
  48968. __Pyx_GOTREF(__pyx_t_6);
  48969. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  48970. /* "uvloop/loop.pyx":3024
  48971. * shutdown_coro = aio_gather(
  48972. * *[ag.aclose() for ag in closing_agens],
  48973. * return_exceptions=True, # <<<<<<<<<<<<<<
  48974. * loop=self)
  48975. *
  48976. */
  48977. __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 3024, __pyx_L1_error)
  48978. __Pyx_GOTREF(__pyx_t_4);
  48979. if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_return_exceptions, Py_True) < 0) __PYX_ERR(2, 3024, __pyx_L1_error)
  48980. /* "uvloop/loop.pyx":3025
  48981. * *[ag.aclose() for ag in closing_agens],
  48982. * return_exceptions=True,
  48983. * loop=self) # <<<<<<<<<<<<<<
  48984. *
  48985. * results = await shutdown_coro
  48986. */
  48987. if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_loop, ((PyObject *)__pyx_cur_scope->__pyx_v_self)) < 0) __PYX_ERR(2, 3024, __pyx_L1_error)
  48988. /* "uvloop/loop.pyx":3022
  48989. * self._asyncgens.clear()
  48990. *
  48991. * shutdown_coro = aio_gather( # <<<<<<<<<<<<<<
  48992. * *[ag.aclose() for ag in closing_agens],
  48993. * return_exceptions=True,
  48994. */
  48995. __pyx_t_7 = __Pyx_PyObject_Call(__pyx_v_6uvloop_4loop_aio_gather, __pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 3022, __pyx_L1_error)
  48996. __Pyx_GOTREF(__pyx_t_7);
  48997. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  48998. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  48999. __Pyx_GIVEREF(__pyx_t_7);
  49000. __pyx_cur_scope->__pyx_v_shutdown_coro = __pyx_t_7;
  49001. __pyx_t_7 = 0;
  49002. /* "uvloop/loop.pyx":3027
  49003. * loop=self)
  49004. *
  49005. * results = await shutdown_coro # <<<<<<<<<<<<<<
  49006. * for result, agen in zip(results, closing_agens):
  49007. * if isinstance(result, Exception):
  49008. */
  49009. __pyx_r = __Pyx_Coroutine_Yield_From(__pyx_generator, __pyx_cur_scope->__pyx_v_shutdown_coro);
  49010. __Pyx_XGOTREF(__pyx_r);
  49011. if (likely(__pyx_r)) {
  49012. __Pyx_XGIVEREF(__pyx_r);
  49013. __Pyx_RefNannyFinishContext();
  49014. __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  49015. /* return from generator, awaiting value */
  49016. __pyx_generator->resume_label = 1;
  49017. return __pyx_r;
  49018. __pyx_L9_resume_from_await:;
  49019. if (unlikely(!__pyx_sent_value)) __PYX_ERR(2, 3027, __pyx_L1_error)
  49020. __pyx_t_7 = __pyx_sent_value; __Pyx_INCREF(__pyx_t_7);
  49021. } else {
  49022. __pyx_t_7 = NULL;
  49023. if (__Pyx_PyGen_FetchStopIterationValue(&__pyx_t_7) < 0) __PYX_ERR(2, 3027, __pyx_L1_error)
  49024. __Pyx_GOTREF(__pyx_t_7);
  49025. }
  49026. __Pyx_GIVEREF(__pyx_t_7);
  49027. __pyx_cur_scope->__pyx_v_results = __pyx_t_7;
  49028. __pyx_t_7 = 0;
  49029. /* "uvloop/loop.pyx":3028
  49030. *
  49031. * results = await shutdown_coro
  49032. * for result, agen in zip(results, closing_agens): # <<<<<<<<<<<<<<
  49033. * if isinstance(result, Exception):
  49034. * self.call_exception_handler({
  49035. */
  49036. __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 3028, __pyx_L1_error)
  49037. __Pyx_GOTREF(__pyx_t_7);
  49038. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_results);
  49039. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_results);
  49040. PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_cur_scope->__pyx_v_results);
  49041. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_closing_agens);
  49042. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_closing_agens);
  49043. PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_cur_scope->__pyx_v_closing_agens);
  49044. __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 3028, __pyx_L1_error)
  49045. __Pyx_GOTREF(__pyx_t_4);
  49046. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  49047. if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
  49048. __pyx_t_7 = __pyx_t_4; __Pyx_INCREF(__pyx_t_7); __pyx_t_5 = 0;
  49049. __pyx_t_10 = NULL;
  49050. } else {
  49051. __pyx_t_5 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 3028, __pyx_L1_error)
  49052. __Pyx_GOTREF(__pyx_t_7);
  49053. __pyx_t_10 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 3028, __pyx_L1_error)
  49054. }
  49055. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  49056. for (;;) {
  49057. if (likely(!__pyx_t_10)) {
  49058. if (likely(PyList_CheckExact(__pyx_t_7))) {
  49059. if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_7)) break;
  49060. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  49061. __pyx_t_4 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(2, 3028, __pyx_L1_error)
  49062. #else
  49063. __pyx_t_4 = PySequence_ITEM(__pyx_t_7, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 3028, __pyx_L1_error)
  49064. __Pyx_GOTREF(__pyx_t_4);
  49065. #endif
  49066. } else {
  49067. if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
  49068. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  49069. __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(2, 3028, __pyx_L1_error)
  49070. #else
  49071. __pyx_t_4 = PySequence_ITEM(__pyx_t_7, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 3028, __pyx_L1_error)
  49072. __Pyx_GOTREF(__pyx_t_4);
  49073. #endif
  49074. }
  49075. } else {
  49076. __pyx_t_4 = __pyx_t_10(__pyx_t_7);
  49077. if (unlikely(!__pyx_t_4)) {
  49078. PyObject* exc_type = PyErr_Occurred();
  49079. if (exc_type) {
  49080. if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
  49081. else __PYX_ERR(2, 3028, __pyx_L1_error)
  49082. }
  49083. break;
  49084. }
  49085. __Pyx_GOTREF(__pyx_t_4);
  49086. }
  49087. if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
  49088. PyObject* sequence = __pyx_t_4;
  49089. Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
  49090. if (unlikely(size != 2)) {
  49091. if (size > 2) __Pyx_RaiseTooManyValuesError(2);
  49092. else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
  49093. __PYX_ERR(2, 3028, __pyx_L1_error)
  49094. }
  49095. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  49096. if (likely(PyTuple_CheckExact(sequence))) {
  49097. __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0);
  49098. __pyx_t_8 = PyTuple_GET_ITEM(sequence, 1);
  49099. } else {
  49100. __pyx_t_6 = PyList_GET_ITEM(sequence, 0);
  49101. __pyx_t_8 = PyList_GET_ITEM(sequence, 1);
  49102. }
  49103. __Pyx_INCREF(__pyx_t_6);
  49104. __Pyx_INCREF(__pyx_t_8);
  49105. #else
  49106. __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 3028, __pyx_L1_error)
  49107. __Pyx_GOTREF(__pyx_t_6);
  49108. __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 3028, __pyx_L1_error)
  49109. __Pyx_GOTREF(__pyx_t_8);
  49110. #endif
  49111. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  49112. } else {
  49113. Py_ssize_t index = -1;
  49114. __pyx_t_9 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 3028, __pyx_L1_error)
  49115. __Pyx_GOTREF(__pyx_t_9);
  49116. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  49117. __pyx_t_11 = Py_TYPE(__pyx_t_9)->tp_iternext;
  49118. index = 0; __pyx_t_6 = __pyx_t_11(__pyx_t_9); if (unlikely(!__pyx_t_6)) goto __pyx_L12_unpacking_failed;
  49119. __Pyx_GOTREF(__pyx_t_6);
  49120. index = 1; __pyx_t_8 = __pyx_t_11(__pyx_t_9); if (unlikely(!__pyx_t_8)) goto __pyx_L12_unpacking_failed;
  49121. __Pyx_GOTREF(__pyx_t_8);
  49122. if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_9), 2) < 0) __PYX_ERR(2, 3028, __pyx_L1_error)
  49123. __pyx_t_11 = NULL;
  49124. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  49125. goto __pyx_L13_unpacking_done;
  49126. __pyx_L12_unpacking_failed:;
  49127. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  49128. __pyx_t_11 = NULL;
  49129. if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
  49130. __PYX_ERR(2, 3028, __pyx_L1_error)
  49131. __pyx_L13_unpacking_done:;
  49132. }
  49133. __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_result);
  49134. __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_result, __pyx_t_6);
  49135. __Pyx_GIVEREF(__pyx_t_6);
  49136. __pyx_t_6 = 0;
  49137. __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_agen);
  49138. __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_agen, __pyx_t_8);
  49139. __Pyx_GIVEREF(__pyx_t_8);
  49140. __pyx_t_8 = 0;
  49141. /* "uvloop/loop.pyx":3029
  49142. * results = await shutdown_coro
  49143. * for result, agen in zip(results, closing_agens):
  49144. * if isinstance(result, Exception): # <<<<<<<<<<<<<<
  49145. * self.call_exception_handler({
  49146. * 'message': 'an error occurred during closing of '
  49147. */
  49148. __pyx_t_1 = __Pyx_PyException_Check(__pyx_cur_scope->__pyx_v_result);
  49149. __pyx_t_3 = (__pyx_t_1 != 0);
  49150. if (__pyx_t_3) {
  49151. /* "uvloop/loop.pyx":3030
  49152. * for result, agen in zip(results, closing_agens):
  49153. * if isinstance(result, Exception):
  49154. * self.call_exception_handler({ # <<<<<<<<<<<<<<
  49155. * 'message': 'an error occurred during closing of '
  49156. * 'asynchronous generator {!r}'.format(agen),
  49157. */
  49158. __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_call_exception_handler); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 3030, __pyx_L1_error)
  49159. __Pyx_GOTREF(__pyx_t_8);
  49160. /* "uvloop/loop.pyx":3031
  49161. * if isinstance(result, Exception):
  49162. * self.call_exception_handler({
  49163. * 'message': 'an error occurred during closing of ' # <<<<<<<<<<<<<<
  49164. * 'asynchronous generator {!r}'.format(agen),
  49165. * 'exception': result,
  49166. */
  49167. __pyx_t_6 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 3031, __pyx_L1_error)
  49168. __Pyx_GOTREF(__pyx_t_6);
  49169. /* "uvloop/loop.pyx":3032
  49170. * self.call_exception_handler({
  49171. * 'message': 'an error occurred during closing of '
  49172. * 'asynchronous generator {!r}'.format(agen), # <<<<<<<<<<<<<<
  49173. * 'exception': result,
  49174. * 'asyncgen': agen
  49175. */
  49176. __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_an_error_occurred_during_closing, __pyx_n_s_format); if (unlikely(!__pyx_t_12)) __PYX_ERR(2, 3032, __pyx_L1_error)
  49177. __Pyx_GOTREF(__pyx_t_12);
  49178. __pyx_t_13 = NULL;
  49179. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_12))) {
  49180. __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_12);
  49181. if (likely(__pyx_t_13)) {
  49182. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
  49183. __Pyx_INCREF(__pyx_t_13);
  49184. __Pyx_INCREF(function);
  49185. __Pyx_DECREF_SET(__pyx_t_12, function);
  49186. }
  49187. }
  49188. __pyx_t_9 = (__pyx_t_13) ? __Pyx_PyObject_Call2Args(__pyx_t_12, __pyx_t_13, __pyx_cur_scope->__pyx_v_agen) : __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_cur_scope->__pyx_v_agen);
  49189. __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
  49190. if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 3032, __pyx_L1_error)
  49191. __Pyx_GOTREF(__pyx_t_9);
  49192. __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  49193. if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_message, __pyx_t_9) < 0) __PYX_ERR(2, 3031, __pyx_L1_error)
  49194. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  49195. /* "uvloop/loop.pyx":3033
  49196. * 'message': 'an error occurred during closing of '
  49197. * 'asynchronous generator {!r}'.format(agen),
  49198. * 'exception': result, # <<<<<<<<<<<<<<
  49199. * 'asyncgen': agen
  49200. * })
  49201. */
  49202. if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_exception, __pyx_cur_scope->__pyx_v_result) < 0) __PYX_ERR(2, 3031, __pyx_L1_error)
  49203. /* "uvloop/loop.pyx":3034
  49204. * 'asynchronous generator {!r}'.format(agen),
  49205. * 'exception': result,
  49206. * 'asyncgen': agen # <<<<<<<<<<<<<<
  49207. * })
  49208. *
  49209. */
  49210. if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_asyncgen, __pyx_cur_scope->__pyx_v_agen) < 0) __PYX_ERR(2, 3031, __pyx_L1_error)
  49211. __pyx_t_9 = NULL;
  49212. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
  49213. __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
  49214. if (likely(__pyx_t_9)) {
  49215. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
  49216. __Pyx_INCREF(__pyx_t_9);
  49217. __Pyx_INCREF(function);
  49218. __Pyx_DECREF_SET(__pyx_t_8, function);
  49219. }
  49220. }
  49221. __pyx_t_4 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_6);
  49222. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  49223. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  49224. if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 3030, __pyx_L1_error)
  49225. __Pyx_GOTREF(__pyx_t_4);
  49226. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  49227. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  49228. /* "uvloop/loop.pyx":3029
  49229. * results = await shutdown_coro
  49230. * for result, agen in zip(results, closing_agens):
  49231. * if isinstance(result, Exception): # <<<<<<<<<<<<<<
  49232. * self.call_exception_handler({
  49233. * 'message': 'an error occurred during closing of '
  49234. */
  49235. }
  49236. /* "uvloop/loop.pyx":3028
  49237. *
  49238. * results = await shutdown_coro
  49239. * for result, agen in zip(results, closing_agens): # <<<<<<<<<<<<<<
  49240. * if isinstance(result, Exception):
  49241. * self.call_exception_handler({
  49242. */
  49243. }
  49244. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  49245. CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
  49246. /* "uvloop/loop.pyx":3010
  49247. *
  49248. * @cython.iterable_coroutine
  49249. * async def shutdown_asyncgens(self): # <<<<<<<<<<<<<<
  49250. * """Shutdown all active asynchronous generators."""
  49251. * self._asyncgens_shutdown_called = True
  49252. */
  49253. /* function exit code */
  49254. PyErr_SetNone(PyExc_StopIteration);
  49255. goto __pyx_L0;
  49256. __pyx_L1_error:;
  49257. __Pyx_XDECREF(__pyx_t_4);
  49258. __Pyx_XDECREF(__pyx_t_6);
  49259. __Pyx_XDECREF(__pyx_t_7);
  49260. __Pyx_XDECREF(__pyx_t_8);
  49261. __Pyx_XDECREF(__pyx_t_9);
  49262. __Pyx_XDECREF(__pyx_t_12);
  49263. __Pyx_XDECREF(__pyx_t_13);
  49264. __Pyx_AddTraceback("shutdown_asyncgens", __pyx_clineno, __pyx_lineno, __pyx_filename);
  49265. __pyx_L0:;
  49266. __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  49267. #if !CYTHON_USE_EXC_INFO_STACK
  49268. __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  49269. #endif
  49270. __pyx_generator->resume_label = -1;
  49271. __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  49272. __Pyx_RefNannyFinishContext();
  49273. return __pyx_r;
  49274. }
  49275. /* "uvloop/loop.pxd":39
  49276. * int _coroutine_origin_tracking_saved_depth
  49277. *
  49278. * public slow_callback_duration # <<<<<<<<<<<<<<
  49279. *
  49280. * readonly bint _closed
  49281. */
  49282. /* Python wrapper */
  49283. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_22slow_callback_duration_1__get__(PyObject *__pyx_v_self); /*proto*/
  49284. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_22slow_callback_duration_1__get__(PyObject *__pyx_v_self) {
  49285. PyObject *__pyx_r = 0;
  49286. __Pyx_RefNannyDeclarations
  49287. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  49288. __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_22slow_callback_duration___get__(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self));
  49289. /* function exit code */
  49290. __Pyx_RefNannyFinishContext();
  49291. return __pyx_r;
  49292. }
  49293. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_22slow_callback_duration___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) {
  49294. PyObject *__pyx_r = NULL;
  49295. __Pyx_RefNannyDeclarations
  49296. __Pyx_RefNannySetupContext("__get__", 0);
  49297. __Pyx_XDECREF(__pyx_r);
  49298. __Pyx_INCREF(__pyx_v_self->slow_callback_duration);
  49299. __pyx_r = __pyx_v_self->slow_callback_duration;
  49300. goto __pyx_L0;
  49301. /* function exit code */
  49302. __pyx_L0:;
  49303. __Pyx_XGIVEREF(__pyx_r);
  49304. __Pyx_RefNannyFinishContext();
  49305. return __pyx_r;
  49306. }
  49307. /* Python wrapper */
  49308. static int __pyx_pw_6uvloop_4loop_4Loop_22slow_callback_duration_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
  49309. static int __pyx_pw_6uvloop_4loop_4Loop_22slow_callback_duration_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  49310. int __pyx_r;
  49311. __Pyx_RefNannyDeclarations
  49312. __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  49313. __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_22slow_callback_duration_2__set__(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  49314. /* function exit code */
  49315. __Pyx_RefNannyFinishContext();
  49316. return __pyx_r;
  49317. }
  49318. static int __pyx_pf_6uvloop_4loop_4Loop_22slow_callback_duration_2__set__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_value) {
  49319. int __pyx_r;
  49320. __Pyx_RefNannyDeclarations
  49321. __Pyx_RefNannySetupContext("__set__", 0);
  49322. __Pyx_INCREF(__pyx_v_value);
  49323. __Pyx_GIVEREF(__pyx_v_value);
  49324. __Pyx_GOTREF(__pyx_v_self->slow_callback_duration);
  49325. __Pyx_DECREF(__pyx_v_self->slow_callback_duration);
  49326. __pyx_v_self->slow_callback_duration = __pyx_v_value;
  49327. /* function exit code */
  49328. __pyx_r = 0;
  49329. __Pyx_RefNannyFinishContext();
  49330. return __pyx_r;
  49331. }
  49332. /* Python wrapper */
  49333. static int __pyx_pw_6uvloop_4loop_4Loop_22slow_callback_duration_5__del__(PyObject *__pyx_v_self); /*proto*/
  49334. static int __pyx_pw_6uvloop_4loop_4Loop_22slow_callback_duration_5__del__(PyObject *__pyx_v_self) {
  49335. int __pyx_r;
  49336. __Pyx_RefNannyDeclarations
  49337. __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  49338. __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_22slow_callback_duration_4__del__(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self));
  49339. /* function exit code */
  49340. __Pyx_RefNannyFinishContext();
  49341. return __pyx_r;
  49342. }
  49343. static int __pyx_pf_6uvloop_4loop_4Loop_22slow_callback_duration_4__del__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) {
  49344. int __pyx_r;
  49345. __Pyx_RefNannyDeclarations
  49346. __Pyx_RefNannySetupContext("__del__", 0);
  49347. __Pyx_INCREF(Py_None);
  49348. __Pyx_GIVEREF(Py_None);
  49349. __Pyx_GOTREF(__pyx_v_self->slow_callback_duration);
  49350. __Pyx_DECREF(__pyx_v_self->slow_callback_duration);
  49351. __pyx_v_self->slow_callback_duration = Py_None;
  49352. /* function exit code */
  49353. __pyx_r = 0;
  49354. __Pyx_RefNannyFinishContext();
  49355. return __pyx_r;
  49356. }
  49357. /* "uvloop/loop.pxd":41
  49358. * public slow_callback_duration
  49359. *
  49360. * readonly bint _closed # <<<<<<<<<<<<<<
  49361. * bint _debug
  49362. * bint _running
  49363. */
  49364. /* Python wrapper */
  49365. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_7_closed_1__get__(PyObject *__pyx_v_self); /*proto*/
  49366. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_7_closed_1__get__(PyObject *__pyx_v_self) {
  49367. PyObject *__pyx_r = 0;
  49368. __Pyx_RefNannyDeclarations
  49369. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  49370. __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_7_closed___get__(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self));
  49371. /* function exit code */
  49372. __Pyx_RefNannyFinishContext();
  49373. return __pyx_r;
  49374. }
  49375. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_7_closed___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) {
  49376. PyObject *__pyx_r = NULL;
  49377. __Pyx_RefNannyDeclarations
  49378. PyObject *__pyx_t_1 = NULL;
  49379. __Pyx_RefNannySetupContext("__get__", 0);
  49380. __Pyx_XDECREF(__pyx_r);
  49381. __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->_closed); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 41, __pyx_L1_error)
  49382. __Pyx_GOTREF(__pyx_t_1);
  49383. __pyx_r = __pyx_t_1;
  49384. __pyx_t_1 = 0;
  49385. goto __pyx_L0;
  49386. /* function exit code */
  49387. __pyx_L1_error:;
  49388. __Pyx_XDECREF(__pyx_t_1);
  49389. __Pyx_AddTraceback("uvloop.loop.Loop._closed.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  49390. __pyx_r = NULL;
  49391. __pyx_L0:;
  49392. __Pyx_XGIVEREF(__pyx_r);
  49393. __Pyx_RefNannyFinishContext();
  49394. return __pyx_r;
  49395. }
  49396. /* "uvloop/loop.pxd":91
  49397. * # True when compiled with DEBUG.
  49398. * # Used only in unittests.
  49399. * readonly bint _debug_cc # <<<<<<<<<<<<<<
  49400. *
  49401. * readonly object _debug_handles_total
  49402. */
  49403. /* Python wrapper */
  49404. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_9_debug_cc_1__get__(PyObject *__pyx_v_self); /*proto*/
  49405. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_9_debug_cc_1__get__(PyObject *__pyx_v_self) {
  49406. PyObject *__pyx_r = 0;
  49407. __Pyx_RefNannyDeclarations
  49408. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  49409. __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_9_debug_cc___get__(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self));
  49410. /* function exit code */
  49411. __Pyx_RefNannyFinishContext();
  49412. return __pyx_r;
  49413. }
  49414. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_9_debug_cc___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) {
  49415. PyObject *__pyx_r = NULL;
  49416. __Pyx_RefNannyDeclarations
  49417. PyObject *__pyx_t_1 = NULL;
  49418. __Pyx_RefNannySetupContext("__get__", 0);
  49419. __Pyx_XDECREF(__pyx_r);
  49420. __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->_debug_cc); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 91, __pyx_L1_error)
  49421. __Pyx_GOTREF(__pyx_t_1);
  49422. __pyx_r = __pyx_t_1;
  49423. __pyx_t_1 = 0;
  49424. goto __pyx_L0;
  49425. /* function exit code */
  49426. __pyx_L1_error:;
  49427. __Pyx_XDECREF(__pyx_t_1);
  49428. __Pyx_AddTraceback("uvloop.loop.Loop._debug_cc.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  49429. __pyx_r = NULL;
  49430. __pyx_L0:;
  49431. __Pyx_XGIVEREF(__pyx_r);
  49432. __Pyx_RefNannyFinishContext();
  49433. return __pyx_r;
  49434. }
  49435. /* "uvloop/loop.pxd":93
  49436. * readonly bint _debug_cc
  49437. *
  49438. * readonly object _debug_handles_total # <<<<<<<<<<<<<<
  49439. * readonly object _debug_handles_closed
  49440. * readonly object _debug_handles_current
  49441. */
  49442. /* Python wrapper */
  49443. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_20_debug_handles_total_1__get__(PyObject *__pyx_v_self); /*proto*/
  49444. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_20_debug_handles_total_1__get__(PyObject *__pyx_v_self) {
  49445. PyObject *__pyx_r = 0;
  49446. __Pyx_RefNannyDeclarations
  49447. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  49448. __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_20_debug_handles_total___get__(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self));
  49449. /* function exit code */
  49450. __Pyx_RefNannyFinishContext();
  49451. return __pyx_r;
  49452. }
  49453. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_20_debug_handles_total___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) {
  49454. PyObject *__pyx_r = NULL;
  49455. __Pyx_RefNannyDeclarations
  49456. __Pyx_RefNannySetupContext("__get__", 0);
  49457. __Pyx_XDECREF(__pyx_r);
  49458. __Pyx_INCREF(__pyx_v_self->_debug_handles_total);
  49459. __pyx_r = __pyx_v_self->_debug_handles_total;
  49460. goto __pyx_L0;
  49461. /* function exit code */
  49462. __pyx_L0:;
  49463. __Pyx_XGIVEREF(__pyx_r);
  49464. __Pyx_RefNannyFinishContext();
  49465. return __pyx_r;
  49466. }
  49467. /* "uvloop/loop.pxd":94
  49468. *
  49469. * readonly object _debug_handles_total
  49470. * readonly object _debug_handles_closed # <<<<<<<<<<<<<<
  49471. * readonly object _debug_handles_current
  49472. *
  49473. */
  49474. /* Python wrapper */
  49475. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_21_debug_handles_closed_1__get__(PyObject *__pyx_v_self); /*proto*/
  49476. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_21_debug_handles_closed_1__get__(PyObject *__pyx_v_self) {
  49477. PyObject *__pyx_r = 0;
  49478. __Pyx_RefNannyDeclarations
  49479. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  49480. __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_21_debug_handles_closed___get__(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self));
  49481. /* function exit code */
  49482. __Pyx_RefNannyFinishContext();
  49483. return __pyx_r;
  49484. }
  49485. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_21_debug_handles_closed___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) {
  49486. PyObject *__pyx_r = NULL;
  49487. __Pyx_RefNannyDeclarations
  49488. __Pyx_RefNannySetupContext("__get__", 0);
  49489. __Pyx_XDECREF(__pyx_r);
  49490. __Pyx_INCREF(__pyx_v_self->_debug_handles_closed);
  49491. __pyx_r = __pyx_v_self->_debug_handles_closed;
  49492. goto __pyx_L0;
  49493. /* function exit code */
  49494. __pyx_L0:;
  49495. __Pyx_XGIVEREF(__pyx_r);
  49496. __Pyx_RefNannyFinishContext();
  49497. return __pyx_r;
  49498. }
  49499. /* "uvloop/loop.pxd":95
  49500. * readonly object _debug_handles_total
  49501. * readonly object _debug_handles_closed
  49502. * readonly object _debug_handles_current # <<<<<<<<<<<<<<
  49503. *
  49504. * readonly uint64_t _debug_uv_handles_total
  49505. */
  49506. /* Python wrapper */
  49507. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_22_debug_handles_current_1__get__(PyObject *__pyx_v_self); /*proto*/
  49508. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_22_debug_handles_current_1__get__(PyObject *__pyx_v_self) {
  49509. PyObject *__pyx_r = 0;
  49510. __Pyx_RefNannyDeclarations
  49511. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  49512. __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_22_debug_handles_current___get__(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self));
  49513. /* function exit code */
  49514. __Pyx_RefNannyFinishContext();
  49515. return __pyx_r;
  49516. }
  49517. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_22_debug_handles_current___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) {
  49518. PyObject *__pyx_r = NULL;
  49519. __Pyx_RefNannyDeclarations
  49520. __Pyx_RefNannySetupContext("__get__", 0);
  49521. __Pyx_XDECREF(__pyx_r);
  49522. __Pyx_INCREF(__pyx_v_self->_debug_handles_current);
  49523. __pyx_r = __pyx_v_self->_debug_handles_current;
  49524. goto __pyx_L0;
  49525. /* function exit code */
  49526. __pyx_L0:;
  49527. __Pyx_XGIVEREF(__pyx_r);
  49528. __Pyx_RefNannyFinishContext();
  49529. return __pyx_r;
  49530. }
  49531. /* "uvloop/loop.pxd":97
  49532. * readonly object _debug_handles_current
  49533. *
  49534. * readonly uint64_t _debug_uv_handles_total # <<<<<<<<<<<<<<
  49535. * readonly uint64_t _debug_uv_handles_freed
  49536. *
  49537. */
  49538. /* Python wrapper */
  49539. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_23_debug_uv_handles_total_1__get__(PyObject *__pyx_v_self); /*proto*/
  49540. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_23_debug_uv_handles_total_1__get__(PyObject *__pyx_v_self) {
  49541. PyObject *__pyx_r = 0;
  49542. __Pyx_RefNannyDeclarations
  49543. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  49544. __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_23_debug_uv_handles_total___get__(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self));
  49545. /* function exit code */
  49546. __Pyx_RefNannyFinishContext();
  49547. return __pyx_r;
  49548. }
  49549. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_23_debug_uv_handles_total___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) {
  49550. PyObject *__pyx_r = NULL;
  49551. __Pyx_RefNannyDeclarations
  49552. PyObject *__pyx_t_1 = NULL;
  49553. __Pyx_RefNannySetupContext("__get__", 0);
  49554. __Pyx_XDECREF(__pyx_r);
  49555. __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_debug_uv_handles_total); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 97, __pyx_L1_error)
  49556. __Pyx_GOTREF(__pyx_t_1);
  49557. __pyx_r = __pyx_t_1;
  49558. __pyx_t_1 = 0;
  49559. goto __pyx_L0;
  49560. /* function exit code */
  49561. __pyx_L1_error:;
  49562. __Pyx_XDECREF(__pyx_t_1);
  49563. __Pyx_AddTraceback("uvloop.loop.Loop._debug_uv_handles_total.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  49564. __pyx_r = NULL;
  49565. __pyx_L0:;
  49566. __Pyx_XGIVEREF(__pyx_r);
  49567. __Pyx_RefNannyFinishContext();
  49568. return __pyx_r;
  49569. }
  49570. /* "uvloop/loop.pxd":98
  49571. *
  49572. * readonly uint64_t _debug_uv_handles_total
  49573. * readonly uint64_t _debug_uv_handles_freed # <<<<<<<<<<<<<<
  49574. *
  49575. * readonly uint64_t _debug_cb_handles_total
  49576. */
  49577. /* Python wrapper */
  49578. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_23_debug_uv_handles_freed_1__get__(PyObject *__pyx_v_self); /*proto*/
  49579. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_23_debug_uv_handles_freed_1__get__(PyObject *__pyx_v_self) {
  49580. PyObject *__pyx_r = 0;
  49581. __Pyx_RefNannyDeclarations
  49582. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  49583. __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_23_debug_uv_handles_freed___get__(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self));
  49584. /* function exit code */
  49585. __Pyx_RefNannyFinishContext();
  49586. return __pyx_r;
  49587. }
  49588. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_23_debug_uv_handles_freed___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) {
  49589. PyObject *__pyx_r = NULL;
  49590. __Pyx_RefNannyDeclarations
  49591. PyObject *__pyx_t_1 = NULL;
  49592. __Pyx_RefNannySetupContext("__get__", 0);
  49593. __Pyx_XDECREF(__pyx_r);
  49594. __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_debug_uv_handles_freed); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 98, __pyx_L1_error)
  49595. __Pyx_GOTREF(__pyx_t_1);
  49596. __pyx_r = __pyx_t_1;
  49597. __pyx_t_1 = 0;
  49598. goto __pyx_L0;
  49599. /* function exit code */
  49600. __pyx_L1_error:;
  49601. __Pyx_XDECREF(__pyx_t_1);
  49602. __Pyx_AddTraceback("uvloop.loop.Loop._debug_uv_handles_freed.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  49603. __pyx_r = NULL;
  49604. __pyx_L0:;
  49605. __Pyx_XGIVEREF(__pyx_r);
  49606. __Pyx_RefNannyFinishContext();
  49607. return __pyx_r;
  49608. }
  49609. /* "uvloop/loop.pxd":100
  49610. * readonly uint64_t _debug_uv_handles_freed
  49611. *
  49612. * readonly uint64_t _debug_cb_handles_total # <<<<<<<<<<<<<<
  49613. * readonly uint64_t _debug_cb_handles_count
  49614. * readonly uint64_t _debug_cb_timer_handles_total
  49615. */
  49616. /* Python wrapper */
  49617. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_23_debug_cb_handles_total_1__get__(PyObject *__pyx_v_self); /*proto*/
  49618. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_23_debug_cb_handles_total_1__get__(PyObject *__pyx_v_self) {
  49619. PyObject *__pyx_r = 0;
  49620. __Pyx_RefNannyDeclarations
  49621. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  49622. __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_23_debug_cb_handles_total___get__(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self));
  49623. /* function exit code */
  49624. __Pyx_RefNannyFinishContext();
  49625. return __pyx_r;
  49626. }
  49627. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_23_debug_cb_handles_total___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) {
  49628. PyObject *__pyx_r = NULL;
  49629. __Pyx_RefNannyDeclarations
  49630. PyObject *__pyx_t_1 = NULL;
  49631. __Pyx_RefNannySetupContext("__get__", 0);
  49632. __Pyx_XDECREF(__pyx_r);
  49633. __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_debug_cb_handles_total); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 100, __pyx_L1_error)
  49634. __Pyx_GOTREF(__pyx_t_1);
  49635. __pyx_r = __pyx_t_1;
  49636. __pyx_t_1 = 0;
  49637. goto __pyx_L0;
  49638. /* function exit code */
  49639. __pyx_L1_error:;
  49640. __Pyx_XDECREF(__pyx_t_1);
  49641. __Pyx_AddTraceback("uvloop.loop.Loop._debug_cb_handles_total.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  49642. __pyx_r = NULL;
  49643. __pyx_L0:;
  49644. __Pyx_XGIVEREF(__pyx_r);
  49645. __Pyx_RefNannyFinishContext();
  49646. return __pyx_r;
  49647. }
  49648. /* "uvloop/loop.pxd":101
  49649. *
  49650. * readonly uint64_t _debug_cb_handles_total
  49651. * readonly uint64_t _debug_cb_handles_count # <<<<<<<<<<<<<<
  49652. * readonly uint64_t _debug_cb_timer_handles_total
  49653. * readonly uint64_t _debug_cb_timer_handles_count
  49654. */
  49655. /* Python wrapper */
  49656. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_23_debug_cb_handles_count_1__get__(PyObject *__pyx_v_self); /*proto*/
  49657. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_23_debug_cb_handles_count_1__get__(PyObject *__pyx_v_self) {
  49658. PyObject *__pyx_r = 0;
  49659. __Pyx_RefNannyDeclarations
  49660. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  49661. __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_23_debug_cb_handles_count___get__(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self));
  49662. /* function exit code */
  49663. __Pyx_RefNannyFinishContext();
  49664. return __pyx_r;
  49665. }
  49666. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_23_debug_cb_handles_count___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) {
  49667. PyObject *__pyx_r = NULL;
  49668. __Pyx_RefNannyDeclarations
  49669. PyObject *__pyx_t_1 = NULL;
  49670. __Pyx_RefNannySetupContext("__get__", 0);
  49671. __Pyx_XDECREF(__pyx_r);
  49672. __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_debug_cb_handles_count); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 101, __pyx_L1_error)
  49673. __Pyx_GOTREF(__pyx_t_1);
  49674. __pyx_r = __pyx_t_1;
  49675. __pyx_t_1 = 0;
  49676. goto __pyx_L0;
  49677. /* function exit code */
  49678. __pyx_L1_error:;
  49679. __Pyx_XDECREF(__pyx_t_1);
  49680. __Pyx_AddTraceback("uvloop.loop.Loop._debug_cb_handles_count.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  49681. __pyx_r = NULL;
  49682. __pyx_L0:;
  49683. __Pyx_XGIVEREF(__pyx_r);
  49684. __Pyx_RefNannyFinishContext();
  49685. return __pyx_r;
  49686. }
  49687. /* "uvloop/loop.pxd":102
  49688. * readonly uint64_t _debug_cb_handles_total
  49689. * readonly uint64_t _debug_cb_handles_count
  49690. * readonly uint64_t _debug_cb_timer_handles_total # <<<<<<<<<<<<<<
  49691. * readonly uint64_t _debug_cb_timer_handles_count
  49692. *
  49693. */
  49694. /* Python wrapper */
  49695. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_29_debug_cb_timer_handles_total_1__get__(PyObject *__pyx_v_self); /*proto*/
  49696. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_29_debug_cb_timer_handles_total_1__get__(PyObject *__pyx_v_self) {
  49697. PyObject *__pyx_r = 0;
  49698. __Pyx_RefNannyDeclarations
  49699. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  49700. __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_29_debug_cb_timer_handles_total___get__(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self));
  49701. /* function exit code */
  49702. __Pyx_RefNannyFinishContext();
  49703. return __pyx_r;
  49704. }
  49705. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_29_debug_cb_timer_handles_total___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) {
  49706. PyObject *__pyx_r = NULL;
  49707. __Pyx_RefNannyDeclarations
  49708. PyObject *__pyx_t_1 = NULL;
  49709. __Pyx_RefNannySetupContext("__get__", 0);
  49710. __Pyx_XDECREF(__pyx_r);
  49711. __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_debug_cb_timer_handles_total); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 102, __pyx_L1_error)
  49712. __Pyx_GOTREF(__pyx_t_1);
  49713. __pyx_r = __pyx_t_1;
  49714. __pyx_t_1 = 0;
  49715. goto __pyx_L0;
  49716. /* function exit code */
  49717. __pyx_L1_error:;
  49718. __Pyx_XDECREF(__pyx_t_1);
  49719. __Pyx_AddTraceback("uvloop.loop.Loop._debug_cb_timer_handles_total.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  49720. __pyx_r = NULL;
  49721. __pyx_L0:;
  49722. __Pyx_XGIVEREF(__pyx_r);
  49723. __Pyx_RefNannyFinishContext();
  49724. return __pyx_r;
  49725. }
  49726. /* "uvloop/loop.pxd":103
  49727. * readonly uint64_t _debug_cb_handles_count
  49728. * readonly uint64_t _debug_cb_timer_handles_total
  49729. * readonly uint64_t _debug_cb_timer_handles_count # <<<<<<<<<<<<<<
  49730. *
  49731. * readonly uint64_t _debug_stream_shutdown_errors_total
  49732. */
  49733. /* Python wrapper */
  49734. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_29_debug_cb_timer_handles_count_1__get__(PyObject *__pyx_v_self); /*proto*/
  49735. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_29_debug_cb_timer_handles_count_1__get__(PyObject *__pyx_v_self) {
  49736. PyObject *__pyx_r = 0;
  49737. __Pyx_RefNannyDeclarations
  49738. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  49739. __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_29_debug_cb_timer_handles_count___get__(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self));
  49740. /* function exit code */
  49741. __Pyx_RefNannyFinishContext();
  49742. return __pyx_r;
  49743. }
  49744. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_29_debug_cb_timer_handles_count___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) {
  49745. PyObject *__pyx_r = NULL;
  49746. __Pyx_RefNannyDeclarations
  49747. PyObject *__pyx_t_1 = NULL;
  49748. __Pyx_RefNannySetupContext("__get__", 0);
  49749. __Pyx_XDECREF(__pyx_r);
  49750. __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_debug_cb_timer_handles_count); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 103, __pyx_L1_error)
  49751. __Pyx_GOTREF(__pyx_t_1);
  49752. __pyx_r = __pyx_t_1;
  49753. __pyx_t_1 = 0;
  49754. goto __pyx_L0;
  49755. /* function exit code */
  49756. __pyx_L1_error:;
  49757. __Pyx_XDECREF(__pyx_t_1);
  49758. __Pyx_AddTraceback("uvloop.loop.Loop._debug_cb_timer_handles_count.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  49759. __pyx_r = NULL;
  49760. __pyx_L0:;
  49761. __Pyx_XGIVEREF(__pyx_r);
  49762. __Pyx_RefNannyFinishContext();
  49763. return __pyx_r;
  49764. }
  49765. /* "uvloop/loop.pxd":105
  49766. * readonly uint64_t _debug_cb_timer_handles_count
  49767. *
  49768. * readonly uint64_t _debug_stream_shutdown_errors_total # <<<<<<<<<<<<<<
  49769. * readonly uint64_t _debug_stream_listen_errors_total
  49770. *
  49771. */
  49772. /* Python wrapper */
  49773. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_35_debug_stream_shutdown_errors_total_1__get__(PyObject *__pyx_v_self); /*proto*/
  49774. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_35_debug_stream_shutdown_errors_total_1__get__(PyObject *__pyx_v_self) {
  49775. PyObject *__pyx_r = 0;
  49776. __Pyx_RefNannyDeclarations
  49777. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  49778. __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_35_debug_stream_shutdown_errors_total___get__(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self));
  49779. /* function exit code */
  49780. __Pyx_RefNannyFinishContext();
  49781. return __pyx_r;
  49782. }
  49783. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_35_debug_stream_shutdown_errors_total___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) {
  49784. PyObject *__pyx_r = NULL;
  49785. __Pyx_RefNannyDeclarations
  49786. PyObject *__pyx_t_1 = NULL;
  49787. __Pyx_RefNannySetupContext("__get__", 0);
  49788. __Pyx_XDECREF(__pyx_r);
  49789. __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_debug_stream_shutdown_errors_total); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 105, __pyx_L1_error)
  49790. __Pyx_GOTREF(__pyx_t_1);
  49791. __pyx_r = __pyx_t_1;
  49792. __pyx_t_1 = 0;
  49793. goto __pyx_L0;
  49794. /* function exit code */
  49795. __pyx_L1_error:;
  49796. __Pyx_XDECREF(__pyx_t_1);
  49797. __Pyx_AddTraceback("uvloop.loop.Loop._debug_stream_shutdown_errors_total.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  49798. __pyx_r = NULL;
  49799. __pyx_L0:;
  49800. __Pyx_XGIVEREF(__pyx_r);
  49801. __Pyx_RefNannyFinishContext();
  49802. return __pyx_r;
  49803. }
  49804. /* "uvloop/loop.pxd":106
  49805. *
  49806. * readonly uint64_t _debug_stream_shutdown_errors_total
  49807. * readonly uint64_t _debug_stream_listen_errors_total # <<<<<<<<<<<<<<
  49808. *
  49809. * readonly uint64_t _debug_stream_read_cb_total
  49810. */
  49811. /* Python wrapper */
  49812. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_33_debug_stream_listen_errors_total_1__get__(PyObject *__pyx_v_self); /*proto*/
  49813. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_33_debug_stream_listen_errors_total_1__get__(PyObject *__pyx_v_self) {
  49814. PyObject *__pyx_r = 0;
  49815. __Pyx_RefNannyDeclarations
  49816. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  49817. __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_33_debug_stream_listen_errors_total___get__(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self));
  49818. /* function exit code */
  49819. __Pyx_RefNannyFinishContext();
  49820. return __pyx_r;
  49821. }
  49822. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_33_debug_stream_listen_errors_total___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) {
  49823. PyObject *__pyx_r = NULL;
  49824. __Pyx_RefNannyDeclarations
  49825. PyObject *__pyx_t_1 = NULL;
  49826. __Pyx_RefNannySetupContext("__get__", 0);
  49827. __Pyx_XDECREF(__pyx_r);
  49828. __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_debug_stream_listen_errors_total); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 106, __pyx_L1_error)
  49829. __Pyx_GOTREF(__pyx_t_1);
  49830. __pyx_r = __pyx_t_1;
  49831. __pyx_t_1 = 0;
  49832. goto __pyx_L0;
  49833. /* function exit code */
  49834. __pyx_L1_error:;
  49835. __Pyx_XDECREF(__pyx_t_1);
  49836. __Pyx_AddTraceback("uvloop.loop.Loop._debug_stream_listen_errors_total.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  49837. __pyx_r = NULL;
  49838. __pyx_L0:;
  49839. __Pyx_XGIVEREF(__pyx_r);
  49840. __Pyx_RefNannyFinishContext();
  49841. return __pyx_r;
  49842. }
  49843. /* "uvloop/loop.pxd":108
  49844. * readonly uint64_t _debug_stream_listen_errors_total
  49845. *
  49846. * readonly uint64_t _debug_stream_read_cb_total # <<<<<<<<<<<<<<
  49847. * readonly uint64_t _debug_stream_read_cb_errors_total
  49848. * readonly uint64_t _debug_stream_read_eof_total
  49849. */
  49850. /* Python wrapper */
  49851. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_27_debug_stream_read_cb_total_1__get__(PyObject *__pyx_v_self); /*proto*/
  49852. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_27_debug_stream_read_cb_total_1__get__(PyObject *__pyx_v_self) {
  49853. PyObject *__pyx_r = 0;
  49854. __Pyx_RefNannyDeclarations
  49855. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  49856. __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_27_debug_stream_read_cb_total___get__(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self));
  49857. /* function exit code */
  49858. __Pyx_RefNannyFinishContext();
  49859. return __pyx_r;
  49860. }
  49861. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_27_debug_stream_read_cb_total___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) {
  49862. PyObject *__pyx_r = NULL;
  49863. __Pyx_RefNannyDeclarations
  49864. PyObject *__pyx_t_1 = NULL;
  49865. __Pyx_RefNannySetupContext("__get__", 0);
  49866. __Pyx_XDECREF(__pyx_r);
  49867. __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_debug_stream_read_cb_total); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 108, __pyx_L1_error)
  49868. __Pyx_GOTREF(__pyx_t_1);
  49869. __pyx_r = __pyx_t_1;
  49870. __pyx_t_1 = 0;
  49871. goto __pyx_L0;
  49872. /* function exit code */
  49873. __pyx_L1_error:;
  49874. __Pyx_XDECREF(__pyx_t_1);
  49875. __Pyx_AddTraceback("uvloop.loop.Loop._debug_stream_read_cb_total.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  49876. __pyx_r = NULL;
  49877. __pyx_L0:;
  49878. __Pyx_XGIVEREF(__pyx_r);
  49879. __Pyx_RefNannyFinishContext();
  49880. return __pyx_r;
  49881. }
  49882. /* "uvloop/loop.pxd":109
  49883. *
  49884. * readonly uint64_t _debug_stream_read_cb_total
  49885. * readonly uint64_t _debug_stream_read_cb_errors_total # <<<<<<<<<<<<<<
  49886. * readonly uint64_t _debug_stream_read_eof_total
  49887. * readonly uint64_t _debug_stream_read_eof_cb_errors_total
  49888. */
  49889. /* Python wrapper */
  49890. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_34_debug_stream_read_cb_errors_total_1__get__(PyObject *__pyx_v_self); /*proto*/
  49891. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_34_debug_stream_read_cb_errors_total_1__get__(PyObject *__pyx_v_self) {
  49892. PyObject *__pyx_r = 0;
  49893. __Pyx_RefNannyDeclarations
  49894. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  49895. __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_34_debug_stream_read_cb_errors_total___get__(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self));
  49896. /* function exit code */
  49897. __Pyx_RefNannyFinishContext();
  49898. return __pyx_r;
  49899. }
  49900. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_34_debug_stream_read_cb_errors_total___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) {
  49901. PyObject *__pyx_r = NULL;
  49902. __Pyx_RefNannyDeclarations
  49903. PyObject *__pyx_t_1 = NULL;
  49904. __Pyx_RefNannySetupContext("__get__", 0);
  49905. __Pyx_XDECREF(__pyx_r);
  49906. __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_debug_stream_read_cb_errors_total); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 109, __pyx_L1_error)
  49907. __Pyx_GOTREF(__pyx_t_1);
  49908. __pyx_r = __pyx_t_1;
  49909. __pyx_t_1 = 0;
  49910. goto __pyx_L0;
  49911. /* function exit code */
  49912. __pyx_L1_error:;
  49913. __Pyx_XDECREF(__pyx_t_1);
  49914. __Pyx_AddTraceback("uvloop.loop.Loop._debug_stream_read_cb_errors_total.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  49915. __pyx_r = NULL;
  49916. __pyx_L0:;
  49917. __Pyx_XGIVEREF(__pyx_r);
  49918. __Pyx_RefNannyFinishContext();
  49919. return __pyx_r;
  49920. }
  49921. /* "uvloop/loop.pxd":110
  49922. * readonly uint64_t _debug_stream_read_cb_total
  49923. * readonly uint64_t _debug_stream_read_cb_errors_total
  49924. * readonly uint64_t _debug_stream_read_eof_total # <<<<<<<<<<<<<<
  49925. * readonly uint64_t _debug_stream_read_eof_cb_errors_total
  49926. * readonly uint64_t _debug_stream_read_errors_total
  49927. */
  49928. /* Python wrapper */
  49929. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_28_debug_stream_read_eof_total_1__get__(PyObject *__pyx_v_self); /*proto*/
  49930. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_28_debug_stream_read_eof_total_1__get__(PyObject *__pyx_v_self) {
  49931. PyObject *__pyx_r = 0;
  49932. __Pyx_RefNannyDeclarations
  49933. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  49934. __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_28_debug_stream_read_eof_total___get__(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self));
  49935. /* function exit code */
  49936. __Pyx_RefNannyFinishContext();
  49937. return __pyx_r;
  49938. }
  49939. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_28_debug_stream_read_eof_total___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) {
  49940. PyObject *__pyx_r = NULL;
  49941. __Pyx_RefNannyDeclarations
  49942. PyObject *__pyx_t_1 = NULL;
  49943. __Pyx_RefNannySetupContext("__get__", 0);
  49944. __Pyx_XDECREF(__pyx_r);
  49945. __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_debug_stream_read_eof_total); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 110, __pyx_L1_error)
  49946. __Pyx_GOTREF(__pyx_t_1);
  49947. __pyx_r = __pyx_t_1;
  49948. __pyx_t_1 = 0;
  49949. goto __pyx_L0;
  49950. /* function exit code */
  49951. __pyx_L1_error:;
  49952. __Pyx_XDECREF(__pyx_t_1);
  49953. __Pyx_AddTraceback("uvloop.loop.Loop._debug_stream_read_eof_total.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  49954. __pyx_r = NULL;
  49955. __pyx_L0:;
  49956. __Pyx_XGIVEREF(__pyx_r);
  49957. __Pyx_RefNannyFinishContext();
  49958. return __pyx_r;
  49959. }
  49960. /* "uvloop/loop.pxd":111
  49961. * readonly uint64_t _debug_stream_read_cb_errors_total
  49962. * readonly uint64_t _debug_stream_read_eof_total
  49963. * readonly uint64_t _debug_stream_read_eof_cb_errors_total # <<<<<<<<<<<<<<
  49964. * readonly uint64_t _debug_stream_read_errors_total
  49965. *
  49966. */
  49967. /* Python wrapper */
  49968. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_38_debug_stream_read_eof_cb_errors_total_1__get__(PyObject *__pyx_v_self); /*proto*/
  49969. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_38_debug_stream_read_eof_cb_errors_total_1__get__(PyObject *__pyx_v_self) {
  49970. PyObject *__pyx_r = 0;
  49971. __Pyx_RefNannyDeclarations
  49972. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  49973. __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_38_debug_stream_read_eof_cb_errors_total___get__(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self));
  49974. /* function exit code */
  49975. __Pyx_RefNannyFinishContext();
  49976. return __pyx_r;
  49977. }
  49978. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_38_debug_stream_read_eof_cb_errors_total___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) {
  49979. PyObject *__pyx_r = NULL;
  49980. __Pyx_RefNannyDeclarations
  49981. PyObject *__pyx_t_1 = NULL;
  49982. __Pyx_RefNannySetupContext("__get__", 0);
  49983. __Pyx_XDECREF(__pyx_r);
  49984. __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_debug_stream_read_eof_cb_errors_total); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 111, __pyx_L1_error)
  49985. __Pyx_GOTREF(__pyx_t_1);
  49986. __pyx_r = __pyx_t_1;
  49987. __pyx_t_1 = 0;
  49988. goto __pyx_L0;
  49989. /* function exit code */
  49990. __pyx_L1_error:;
  49991. __Pyx_XDECREF(__pyx_t_1);
  49992. __Pyx_AddTraceback("uvloop.loop.Loop._debug_stream_read_eof_cb_errors_total.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  49993. __pyx_r = NULL;
  49994. __pyx_L0:;
  49995. __Pyx_XGIVEREF(__pyx_r);
  49996. __Pyx_RefNannyFinishContext();
  49997. return __pyx_r;
  49998. }
  49999. /* "uvloop/loop.pxd":112
  50000. * readonly uint64_t _debug_stream_read_eof_total
  50001. * readonly uint64_t _debug_stream_read_eof_cb_errors_total
  50002. * readonly uint64_t _debug_stream_read_errors_total # <<<<<<<<<<<<<<
  50003. *
  50004. * readonly uint64_t _debug_stream_write_tries
  50005. */
  50006. /* Python wrapper */
  50007. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_31_debug_stream_read_errors_total_1__get__(PyObject *__pyx_v_self); /*proto*/
  50008. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_31_debug_stream_read_errors_total_1__get__(PyObject *__pyx_v_self) {
  50009. PyObject *__pyx_r = 0;
  50010. __Pyx_RefNannyDeclarations
  50011. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  50012. __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_31_debug_stream_read_errors_total___get__(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self));
  50013. /* function exit code */
  50014. __Pyx_RefNannyFinishContext();
  50015. return __pyx_r;
  50016. }
  50017. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_31_debug_stream_read_errors_total___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) {
  50018. PyObject *__pyx_r = NULL;
  50019. __Pyx_RefNannyDeclarations
  50020. PyObject *__pyx_t_1 = NULL;
  50021. __Pyx_RefNannySetupContext("__get__", 0);
  50022. __Pyx_XDECREF(__pyx_r);
  50023. __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_debug_stream_read_errors_total); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 112, __pyx_L1_error)
  50024. __Pyx_GOTREF(__pyx_t_1);
  50025. __pyx_r = __pyx_t_1;
  50026. __pyx_t_1 = 0;
  50027. goto __pyx_L0;
  50028. /* function exit code */
  50029. __pyx_L1_error:;
  50030. __Pyx_XDECREF(__pyx_t_1);
  50031. __Pyx_AddTraceback("uvloop.loop.Loop._debug_stream_read_errors_total.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  50032. __pyx_r = NULL;
  50033. __pyx_L0:;
  50034. __Pyx_XGIVEREF(__pyx_r);
  50035. __Pyx_RefNannyFinishContext();
  50036. return __pyx_r;
  50037. }
  50038. /* "uvloop/loop.pxd":114
  50039. * readonly uint64_t _debug_stream_read_errors_total
  50040. *
  50041. * readonly uint64_t _debug_stream_write_tries # <<<<<<<<<<<<<<
  50042. * readonly uint64_t _debug_stream_write_errors_total
  50043. * readonly uint64_t _debug_stream_write_ctx_total
  50044. */
  50045. /* Python wrapper */
  50046. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_25_debug_stream_write_tries_1__get__(PyObject *__pyx_v_self); /*proto*/
  50047. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_25_debug_stream_write_tries_1__get__(PyObject *__pyx_v_self) {
  50048. PyObject *__pyx_r = 0;
  50049. __Pyx_RefNannyDeclarations
  50050. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  50051. __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_25_debug_stream_write_tries___get__(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self));
  50052. /* function exit code */
  50053. __Pyx_RefNannyFinishContext();
  50054. return __pyx_r;
  50055. }
  50056. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_25_debug_stream_write_tries___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) {
  50057. PyObject *__pyx_r = NULL;
  50058. __Pyx_RefNannyDeclarations
  50059. PyObject *__pyx_t_1 = NULL;
  50060. __Pyx_RefNannySetupContext("__get__", 0);
  50061. __Pyx_XDECREF(__pyx_r);
  50062. __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_debug_stream_write_tries); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 114, __pyx_L1_error)
  50063. __Pyx_GOTREF(__pyx_t_1);
  50064. __pyx_r = __pyx_t_1;
  50065. __pyx_t_1 = 0;
  50066. goto __pyx_L0;
  50067. /* function exit code */
  50068. __pyx_L1_error:;
  50069. __Pyx_XDECREF(__pyx_t_1);
  50070. __Pyx_AddTraceback("uvloop.loop.Loop._debug_stream_write_tries.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  50071. __pyx_r = NULL;
  50072. __pyx_L0:;
  50073. __Pyx_XGIVEREF(__pyx_r);
  50074. __Pyx_RefNannyFinishContext();
  50075. return __pyx_r;
  50076. }
  50077. /* "uvloop/loop.pxd":115
  50078. *
  50079. * readonly uint64_t _debug_stream_write_tries
  50080. * readonly uint64_t _debug_stream_write_errors_total # <<<<<<<<<<<<<<
  50081. * readonly uint64_t _debug_stream_write_ctx_total
  50082. * readonly uint64_t _debug_stream_write_ctx_cnt
  50083. */
  50084. /* Python wrapper */
  50085. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_32_debug_stream_write_errors_total_1__get__(PyObject *__pyx_v_self); /*proto*/
  50086. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_32_debug_stream_write_errors_total_1__get__(PyObject *__pyx_v_self) {
  50087. PyObject *__pyx_r = 0;
  50088. __Pyx_RefNannyDeclarations
  50089. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  50090. __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_32_debug_stream_write_errors_total___get__(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self));
  50091. /* function exit code */
  50092. __Pyx_RefNannyFinishContext();
  50093. return __pyx_r;
  50094. }
  50095. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_32_debug_stream_write_errors_total___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) {
  50096. PyObject *__pyx_r = NULL;
  50097. __Pyx_RefNannyDeclarations
  50098. PyObject *__pyx_t_1 = NULL;
  50099. __Pyx_RefNannySetupContext("__get__", 0);
  50100. __Pyx_XDECREF(__pyx_r);
  50101. __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_debug_stream_write_errors_total); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 115, __pyx_L1_error)
  50102. __Pyx_GOTREF(__pyx_t_1);
  50103. __pyx_r = __pyx_t_1;
  50104. __pyx_t_1 = 0;
  50105. goto __pyx_L0;
  50106. /* function exit code */
  50107. __pyx_L1_error:;
  50108. __Pyx_XDECREF(__pyx_t_1);
  50109. __Pyx_AddTraceback("uvloop.loop.Loop._debug_stream_write_errors_total.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  50110. __pyx_r = NULL;
  50111. __pyx_L0:;
  50112. __Pyx_XGIVEREF(__pyx_r);
  50113. __Pyx_RefNannyFinishContext();
  50114. return __pyx_r;
  50115. }
  50116. /* "uvloop/loop.pxd":116
  50117. * readonly uint64_t _debug_stream_write_tries
  50118. * readonly uint64_t _debug_stream_write_errors_total
  50119. * readonly uint64_t _debug_stream_write_ctx_total # <<<<<<<<<<<<<<
  50120. * readonly uint64_t _debug_stream_write_ctx_cnt
  50121. * readonly uint64_t _debug_stream_write_cb_errors_total
  50122. */
  50123. /* Python wrapper */
  50124. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_29_debug_stream_write_ctx_total_1__get__(PyObject *__pyx_v_self); /*proto*/
  50125. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_29_debug_stream_write_ctx_total_1__get__(PyObject *__pyx_v_self) {
  50126. PyObject *__pyx_r = 0;
  50127. __Pyx_RefNannyDeclarations
  50128. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  50129. __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_29_debug_stream_write_ctx_total___get__(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self));
  50130. /* function exit code */
  50131. __Pyx_RefNannyFinishContext();
  50132. return __pyx_r;
  50133. }
  50134. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_29_debug_stream_write_ctx_total___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) {
  50135. PyObject *__pyx_r = NULL;
  50136. __Pyx_RefNannyDeclarations
  50137. PyObject *__pyx_t_1 = NULL;
  50138. __Pyx_RefNannySetupContext("__get__", 0);
  50139. __Pyx_XDECREF(__pyx_r);
  50140. __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_debug_stream_write_ctx_total); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 116, __pyx_L1_error)
  50141. __Pyx_GOTREF(__pyx_t_1);
  50142. __pyx_r = __pyx_t_1;
  50143. __pyx_t_1 = 0;
  50144. goto __pyx_L0;
  50145. /* function exit code */
  50146. __pyx_L1_error:;
  50147. __Pyx_XDECREF(__pyx_t_1);
  50148. __Pyx_AddTraceback("uvloop.loop.Loop._debug_stream_write_ctx_total.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  50149. __pyx_r = NULL;
  50150. __pyx_L0:;
  50151. __Pyx_XGIVEREF(__pyx_r);
  50152. __Pyx_RefNannyFinishContext();
  50153. return __pyx_r;
  50154. }
  50155. /* "uvloop/loop.pxd":117
  50156. * readonly uint64_t _debug_stream_write_errors_total
  50157. * readonly uint64_t _debug_stream_write_ctx_total
  50158. * readonly uint64_t _debug_stream_write_ctx_cnt # <<<<<<<<<<<<<<
  50159. * readonly uint64_t _debug_stream_write_cb_errors_total
  50160. *
  50161. */
  50162. /* Python wrapper */
  50163. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_27_debug_stream_write_ctx_cnt_1__get__(PyObject *__pyx_v_self); /*proto*/
  50164. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_27_debug_stream_write_ctx_cnt_1__get__(PyObject *__pyx_v_self) {
  50165. PyObject *__pyx_r = 0;
  50166. __Pyx_RefNannyDeclarations
  50167. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  50168. __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_27_debug_stream_write_ctx_cnt___get__(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self));
  50169. /* function exit code */
  50170. __Pyx_RefNannyFinishContext();
  50171. return __pyx_r;
  50172. }
  50173. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_27_debug_stream_write_ctx_cnt___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) {
  50174. PyObject *__pyx_r = NULL;
  50175. __Pyx_RefNannyDeclarations
  50176. PyObject *__pyx_t_1 = NULL;
  50177. __Pyx_RefNannySetupContext("__get__", 0);
  50178. __Pyx_XDECREF(__pyx_r);
  50179. __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_debug_stream_write_ctx_cnt); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 117, __pyx_L1_error)
  50180. __Pyx_GOTREF(__pyx_t_1);
  50181. __pyx_r = __pyx_t_1;
  50182. __pyx_t_1 = 0;
  50183. goto __pyx_L0;
  50184. /* function exit code */
  50185. __pyx_L1_error:;
  50186. __Pyx_XDECREF(__pyx_t_1);
  50187. __Pyx_AddTraceback("uvloop.loop.Loop._debug_stream_write_ctx_cnt.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  50188. __pyx_r = NULL;
  50189. __pyx_L0:;
  50190. __Pyx_XGIVEREF(__pyx_r);
  50191. __Pyx_RefNannyFinishContext();
  50192. return __pyx_r;
  50193. }
  50194. /* "uvloop/loop.pxd":118
  50195. * readonly uint64_t _debug_stream_write_ctx_total
  50196. * readonly uint64_t _debug_stream_write_ctx_cnt
  50197. * readonly uint64_t _debug_stream_write_cb_errors_total # <<<<<<<<<<<<<<
  50198. *
  50199. * readonly uint64_t _poll_read_events_total
  50200. */
  50201. /* Python wrapper */
  50202. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_35_debug_stream_write_cb_errors_total_1__get__(PyObject *__pyx_v_self); /*proto*/
  50203. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_35_debug_stream_write_cb_errors_total_1__get__(PyObject *__pyx_v_self) {
  50204. PyObject *__pyx_r = 0;
  50205. __Pyx_RefNannyDeclarations
  50206. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  50207. __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_35_debug_stream_write_cb_errors_total___get__(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self));
  50208. /* function exit code */
  50209. __Pyx_RefNannyFinishContext();
  50210. return __pyx_r;
  50211. }
  50212. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_35_debug_stream_write_cb_errors_total___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) {
  50213. PyObject *__pyx_r = NULL;
  50214. __Pyx_RefNannyDeclarations
  50215. PyObject *__pyx_t_1 = NULL;
  50216. __Pyx_RefNannySetupContext("__get__", 0);
  50217. __Pyx_XDECREF(__pyx_r);
  50218. __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_debug_stream_write_cb_errors_total); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 118, __pyx_L1_error)
  50219. __Pyx_GOTREF(__pyx_t_1);
  50220. __pyx_r = __pyx_t_1;
  50221. __pyx_t_1 = 0;
  50222. goto __pyx_L0;
  50223. /* function exit code */
  50224. __pyx_L1_error:;
  50225. __Pyx_XDECREF(__pyx_t_1);
  50226. __Pyx_AddTraceback("uvloop.loop.Loop._debug_stream_write_cb_errors_total.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  50227. __pyx_r = NULL;
  50228. __pyx_L0:;
  50229. __Pyx_XGIVEREF(__pyx_r);
  50230. __Pyx_RefNannyFinishContext();
  50231. return __pyx_r;
  50232. }
  50233. /* "uvloop/loop.pxd":120
  50234. * readonly uint64_t _debug_stream_write_cb_errors_total
  50235. *
  50236. * readonly uint64_t _poll_read_events_total # <<<<<<<<<<<<<<
  50237. * readonly uint64_t _poll_read_cb_errors_total
  50238. * readonly uint64_t _poll_write_events_total
  50239. */
  50240. /* Python wrapper */
  50241. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_23_poll_read_events_total_1__get__(PyObject *__pyx_v_self); /*proto*/
  50242. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_23_poll_read_events_total_1__get__(PyObject *__pyx_v_self) {
  50243. PyObject *__pyx_r = 0;
  50244. __Pyx_RefNannyDeclarations
  50245. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  50246. __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_23_poll_read_events_total___get__(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self));
  50247. /* function exit code */
  50248. __Pyx_RefNannyFinishContext();
  50249. return __pyx_r;
  50250. }
  50251. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_23_poll_read_events_total___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) {
  50252. PyObject *__pyx_r = NULL;
  50253. __Pyx_RefNannyDeclarations
  50254. PyObject *__pyx_t_1 = NULL;
  50255. __Pyx_RefNannySetupContext("__get__", 0);
  50256. __Pyx_XDECREF(__pyx_r);
  50257. __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_poll_read_events_total); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 120, __pyx_L1_error)
  50258. __Pyx_GOTREF(__pyx_t_1);
  50259. __pyx_r = __pyx_t_1;
  50260. __pyx_t_1 = 0;
  50261. goto __pyx_L0;
  50262. /* function exit code */
  50263. __pyx_L1_error:;
  50264. __Pyx_XDECREF(__pyx_t_1);
  50265. __Pyx_AddTraceback("uvloop.loop.Loop._poll_read_events_total.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  50266. __pyx_r = NULL;
  50267. __pyx_L0:;
  50268. __Pyx_XGIVEREF(__pyx_r);
  50269. __Pyx_RefNannyFinishContext();
  50270. return __pyx_r;
  50271. }
  50272. /* "uvloop/loop.pxd":121
  50273. *
  50274. * readonly uint64_t _poll_read_events_total
  50275. * readonly uint64_t _poll_read_cb_errors_total # <<<<<<<<<<<<<<
  50276. * readonly uint64_t _poll_write_events_total
  50277. * readonly uint64_t _poll_write_cb_errors_total
  50278. */
  50279. /* Python wrapper */
  50280. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_26_poll_read_cb_errors_total_1__get__(PyObject *__pyx_v_self); /*proto*/
  50281. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_26_poll_read_cb_errors_total_1__get__(PyObject *__pyx_v_self) {
  50282. PyObject *__pyx_r = 0;
  50283. __Pyx_RefNannyDeclarations
  50284. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  50285. __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_26_poll_read_cb_errors_total___get__(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self));
  50286. /* function exit code */
  50287. __Pyx_RefNannyFinishContext();
  50288. return __pyx_r;
  50289. }
  50290. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_26_poll_read_cb_errors_total___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) {
  50291. PyObject *__pyx_r = NULL;
  50292. __Pyx_RefNannyDeclarations
  50293. PyObject *__pyx_t_1 = NULL;
  50294. __Pyx_RefNannySetupContext("__get__", 0);
  50295. __Pyx_XDECREF(__pyx_r);
  50296. __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_poll_read_cb_errors_total); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 121, __pyx_L1_error)
  50297. __Pyx_GOTREF(__pyx_t_1);
  50298. __pyx_r = __pyx_t_1;
  50299. __pyx_t_1 = 0;
  50300. goto __pyx_L0;
  50301. /* function exit code */
  50302. __pyx_L1_error:;
  50303. __Pyx_XDECREF(__pyx_t_1);
  50304. __Pyx_AddTraceback("uvloop.loop.Loop._poll_read_cb_errors_total.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  50305. __pyx_r = NULL;
  50306. __pyx_L0:;
  50307. __Pyx_XGIVEREF(__pyx_r);
  50308. __Pyx_RefNannyFinishContext();
  50309. return __pyx_r;
  50310. }
  50311. /* "uvloop/loop.pxd":122
  50312. * readonly uint64_t _poll_read_events_total
  50313. * readonly uint64_t _poll_read_cb_errors_total
  50314. * readonly uint64_t _poll_write_events_total # <<<<<<<<<<<<<<
  50315. * readonly uint64_t _poll_write_cb_errors_total
  50316. *
  50317. */
  50318. /* Python wrapper */
  50319. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_24_poll_write_events_total_1__get__(PyObject *__pyx_v_self); /*proto*/
  50320. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_24_poll_write_events_total_1__get__(PyObject *__pyx_v_self) {
  50321. PyObject *__pyx_r = 0;
  50322. __Pyx_RefNannyDeclarations
  50323. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  50324. __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_24_poll_write_events_total___get__(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self));
  50325. /* function exit code */
  50326. __Pyx_RefNannyFinishContext();
  50327. return __pyx_r;
  50328. }
  50329. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_24_poll_write_events_total___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) {
  50330. PyObject *__pyx_r = NULL;
  50331. __Pyx_RefNannyDeclarations
  50332. PyObject *__pyx_t_1 = NULL;
  50333. __Pyx_RefNannySetupContext("__get__", 0);
  50334. __Pyx_XDECREF(__pyx_r);
  50335. __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_poll_write_events_total); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 122, __pyx_L1_error)
  50336. __Pyx_GOTREF(__pyx_t_1);
  50337. __pyx_r = __pyx_t_1;
  50338. __pyx_t_1 = 0;
  50339. goto __pyx_L0;
  50340. /* function exit code */
  50341. __pyx_L1_error:;
  50342. __Pyx_XDECREF(__pyx_t_1);
  50343. __Pyx_AddTraceback("uvloop.loop.Loop._poll_write_events_total.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  50344. __pyx_r = NULL;
  50345. __pyx_L0:;
  50346. __Pyx_XGIVEREF(__pyx_r);
  50347. __Pyx_RefNannyFinishContext();
  50348. return __pyx_r;
  50349. }
  50350. /* "uvloop/loop.pxd":123
  50351. * readonly uint64_t _poll_read_cb_errors_total
  50352. * readonly uint64_t _poll_write_events_total
  50353. * readonly uint64_t _poll_write_cb_errors_total # <<<<<<<<<<<<<<
  50354. *
  50355. * readonly uint64_t _sock_try_write_total
  50356. */
  50357. /* Python wrapper */
  50358. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_27_poll_write_cb_errors_total_1__get__(PyObject *__pyx_v_self); /*proto*/
  50359. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_27_poll_write_cb_errors_total_1__get__(PyObject *__pyx_v_self) {
  50360. PyObject *__pyx_r = 0;
  50361. __Pyx_RefNannyDeclarations
  50362. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  50363. __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_27_poll_write_cb_errors_total___get__(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self));
  50364. /* function exit code */
  50365. __Pyx_RefNannyFinishContext();
  50366. return __pyx_r;
  50367. }
  50368. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_27_poll_write_cb_errors_total___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) {
  50369. PyObject *__pyx_r = NULL;
  50370. __Pyx_RefNannyDeclarations
  50371. PyObject *__pyx_t_1 = NULL;
  50372. __Pyx_RefNannySetupContext("__get__", 0);
  50373. __Pyx_XDECREF(__pyx_r);
  50374. __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_poll_write_cb_errors_total); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 123, __pyx_L1_error)
  50375. __Pyx_GOTREF(__pyx_t_1);
  50376. __pyx_r = __pyx_t_1;
  50377. __pyx_t_1 = 0;
  50378. goto __pyx_L0;
  50379. /* function exit code */
  50380. __pyx_L1_error:;
  50381. __Pyx_XDECREF(__pyx_t_1);
  50382. __Pyx_AddTraceback("uvloop.loop.Loop._poll_write_cb_errors_total.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  50383. __pyx_r = NULL;
  50384. __pyx_L0:;
  50385. __Pyx_XGIVEREF(__pyx_r);
  50386. __Pyx_RefNannyFinishContext();
  50387. return __pyx_r;
  50388. }
  50389. /* "uvloop/loop.pxd":125
  50390. * readonly uint64_t _poll_write_cb_errors_total
  50391. *
  50392. * readonly uint64_t _sock_try_write_total # <<<<<<<<<<<<<<
  50393. *
  50394. * readonly uint64_t _debug_exception_handler_cnt
  50395. */
  50396. /* Python wrapper */
  50397. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_21_sock_try_write_total_1__get__(PyObject *__pyx_v_self); /*proto*/
  50398. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_21_sock_try_write_total_1__get__(PyObject *__pyx_v_self) {
  50399. PyObject *__pyx_r = 0;
  50400. __Pyx_RefNannyDeclarations
  50401. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  50402. __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_21_sock_try_write_total___get__(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self));
  50403. /* function exit code */
  50404. __Pyx_RefNannyFinishContext();
  50405. return __pyx_r;
  50406. }
  50407. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_21_sock_try_write_total___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) {
  50408. PyObject *__pyx_r = NULL;
  50409. __Pyx_RefNannyDeclarations
  50410. PyObject *__pyx_t_1 = NULL;
  50411. __Pyx_RefNannySetupContext("__get__", 0);
  50412. __Pyx_XDECREF(__pyx_r);
  50413. __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_sock_try_write_total); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 125, __pyx_L1_error)
  50414. __Pyx_GOTREF(__pyx_t_1);
  50415. __pyx_r = __pyx_t_1;
  50416. __pyx_t_1 = 0;
  50417. goto __pyx_L0;
  50418. /* function exit code */
  50419. __pyx_L1_error:;
  50420. __Pyx_XDECREF(__pyx_t_1);
  50421. __Pyx_AddTraceback("uvloop.loop.Loop._sock_try_write_total.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  50422. __pyx_r = NULL;
  50423. __pyx_L0:;
  50424. __Pyx_XGIVEREF(__pyx_r);
  50425. __Pyx_RefNannyFinishContext();
  50426. return __pyx_r;
  50427. }
  50428. /* "uvloop/loop.pxd":127
  50429. * readonly uint64_t _sock_try_write_total
  50430. *
  50431. * readonly uint64_t _debug_exception_handler_cnt # <<<<<<<<<<<<<<
  50432. *
  50433. * cdef _init_debug_fields(self)
  50434. */
  50435. /* Python wrapper */
  50436. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_28_debug_exception_handler_cnt_1__get__(PyObject *__pyx_v_self); /*proto*/
  50437. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_28_debug_exception_handler_cnt_1__get__(PyObject *__pyx_v_self) {
  50438. PyObject *__pyx_r = 0;
  50439. __Pyx_RefNannyDeclarations
  50440. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  50441. __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_28_debug_exception_handler_cnt___get__(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self));
  50442. /* function exit code */
  50443. __Pyx_RefNannyFinishContext();
  50444. return __pyx_r;
  50445. }
  50446. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_28_debug_exception_handler_cnt___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) {
  50447. PyObject *__pyx_r = NULL;
  50448. __Pyx_RefNannyDeclarations
  50449. PyObject *__pyx_t_1 = NULL;
  50450. __Pyx_RefNannySetupContext("__get__", 0);
  50451. __Pyx_XDECREF(__pyx_r);
  50452. __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_debug_exception_handler_cnt); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 127, __pyx_L1_error)
  50453. __Pyx_GOTREF(__pyx_t_1);
  50454. __pyx_r = __pyx_t_1;
  50455. __pyx_t_1 = 0;
  50456. goto __pyx_L0;
  50457. /* function exit code */
  50458. __pyx_L1_error:;
  50459. __Pyx_XDECREF(__pyx_t_1);
  50460. __Pyx_AddTraceback("uvloop.loop.Loop._debug_exception_handler_cnt.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  50461. __pyx_r = NULL;
  50462. __pyx_L0:;
  50463. __Pyx_XGIVEREF(__pyx_r);
  50464. __Pyx_RefNannyFinishContext();
  50465. return __pyx_r;
  50466. }
  50467. /* "(tree fragment)":1
  50468. * def __reduce_cython__(self): # <<<<<<<<<<<<<<
  50469. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  50470. * def __setstate_cython__(self, __pyx_state):
  50471. */
  50472. /* Python wrapper */
  50473. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_135__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  50474. static char __pyx_doc_6uvloop_4loop_4Loop_134__reduce_cython__[] = "Loop.__reduce_cython__(self)";
  50475. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_135__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  50476. PyObject *__pyx_r = 0;
  50477. __Pyx_RefNannyDeclarations
  50478. __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  50479. __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_134__reduce_cython__(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self));
  50480. /* function exit code */
  50481. __Pyx_RefNannyFinishContext();
  50482. return __pyx_r;
  50483. }
  50484. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_134__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) {
  50485. PyObject *__pyx_r = NULL;
  50486. __Pyx_RefNannyDeclarations
  50487. PyObject *__pyx_t_1 = NULL;
  50488. __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  50489. /* "(tree fragment)":2
  50490. * def __reduce_cython__(self):
  50491. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  50492. * def __setstate_cython__(self, __pyx_state):
  50493. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  50494. */
  50495. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__82, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 2, __pyx_L1_error)
  50496. __Pyx_GOTREF(__pyx_t_1);
  50497. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  50498. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  50499. __PYX_ERR(9, 2, __pyx_L1_error)
  50500. /* "(tree fragment)":1
  50501. * def __reduce_cython__(self): # <<<<<<<<<<<<<<
  50502. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  50503. * def __setstate_cython__(self, __pyx_state):
  50504. */
  50505. /* function exit code */
  50506. __pyx_L1_error:;
  50507. __Pyx_XDECREF(__pyx_t_1);
  50508. __Pyx_AddTraceback("uvloop.loop.Loop.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  50509. __pyx_r = NULL;
  50510. __Pyx_XGIVEREF(__pyx_r);
  50511. __Pyx_RefNannyFinishContext();
  50512. return __pyx_r;
  50513. }
  50514. /* "(tree fragment)":3
  50515. * def __reduce_cython__(self):
  50516. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  50517. * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
  50518. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  50519. */
  50520. /* Python wrapper */
  50521. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_137__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
  50522. static char __pyx_doc_6uvloop_4loop_4Loop_136__setstate_cython__[] = "Loop.__setstate_cython__(self, __pyx_state)";
  50523. static PyObject *__pyx_pw_6uvloop_4loop_4Loop_137__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  50524. PyObject *__pyx_r = 0;
  50525. __Pyx_RefNannyDeclarations
  50526. __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  50527. __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_136__setstate_cython__(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
  50528. /* function exit code */
  50529. __Pyx_RefNannyFinishContext();
  50530. return __pyx_r;
  50531. }
  50532. static PyObject *__pyx_pf_6uvloop_4loop_4Loop_136__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  50533. PyObject *__pyx_r = NULL;
  50534. __Pyx_RefNannyDeclarations
  50535. PyObject *__pyx_t_1 = NULL;
  50536. __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  50537. /* "(tree fragment)":4
  50538. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  50539. * def __setstate_cython__(self, __pyx_state):
  50540. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  50541. */
  50542. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__83, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 4, __pyx_L1_error)
  50543. __Pyx_GOTREF(__pyx_t_1);
  50544. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  50545. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  50546. __PYX_ERR(9, 4, __pyx_L1_error)
  50547. /* "(tree fragment)":3
  50548. * def __reduce_cython__(self):
  50549. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  50550. * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
  50551. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  50552. */
  50553. /* function exit code */
  50554. __pyx_L1_error:;
  50555. __Pyx_XDECREF(__pyx_t_1);
  50556. __Pyx_AddTraceback("uvloop.loop.Loop.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  50557. __pyx_r = NULL;
  50558. __Pyx_XGIVEREF(__pyx_r);
  50559. __Pyx_RefNannyFinishContext();
  50560. return __pyx_r;
  50561. }
  50562. /* "uvloop/loop.pyx":3038
  50563. *
  50564. *
  50565. * cdef void __loop_alloc_buffer(uv.uv_handle_t* uvhandle, # <<<<<<<<<<<<<<
  50566. * size_t suggested_size,
  50567. * uv.uv_buf_t* buf) with gil:
  50568. */
  50569. static void __pyx_f_6uvloop_4loop___loop_alloc_buffer(uv_handle_t *__pyx_v_uvhandle, CYTHON_UNUSED size_t __pyx_v_suggested_size, uv_buf_t *__pyx_v_buf) {
  50570. struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop = 0;
  50571. PyObject *__pyx_v_exc = NULL;
  50572. __Pyx_RefNannyDeclarations
  50573. PyObject *__pyx_t_1 = NULL;
  50574. int __pyx_t_2;
  50575. char *__pyx_t_3;
  50576. #ifdef WITH_THREAD
  50577. PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  50578. #endif
  50579. __Pyx_RefNannySetupContext("__loop_alloc_buffer", 0);
  50580. /* "uvloop/loop.pyx":3042
  50581. * uv.uv_buf_t* buf) with gil:
  50582. * cdef:
  50583. * Loop loop = (<UVHandle>uvhandle.data)._loop # <<<<<<<<<<<<<<
  50584. *
  50585. * if loop._recv_buffer_in_use == 1:
  50586. */
  50587. __pyx_t_1 = ((PyObject *)((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_uvhandle->data)->_loop);
  50588. __Pyx_INCREF(__pyx_t_1);
  50589. __pyx_v_loop = ((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_t_1);
  50590. __pyx_t_1 = 0;
  50591. /* "uvloop/loop.pyx":3044
  50592. * Loop loop = (<UVHandle>uvhandle.data)._loop
  50593. *
  50594. * if loop._recv_buffer_in_use == 1: # <<<<<<<<<<<<<<
  50595. * buf.len = 0
  50596. * exc = RuntimeError('concurrent allocations')
  50597. */
  50598. __pyx_t_2 = ((__pyx_v_loop->_recv_buffer_in_use == 1) != 0);
  50599. if (__pyx_t_2) {
  50600. /* "uvloop/loop.pyx":3045
  50601. *
  50602. * if loop._recv_buffer_in_use == 1:
  50603. * buf.len = 0 # <<<<<<<<<<<<<<
  50604. * exc = RuntimeError('concurrent allocations')
  50605. * loop._handle_exception(exc)
  50606. */
  50607. __pyx_v_buf->len = 0;
  50608. /* "uvloop/loop.pyx":3046
  50609. * if loop._recv_buffer_in_use == 1:
  50610. * buf.len = 0
  50611. * exc = RuntimeError('concurrent allocations') # <<<<<<<<<<<<<<
  50612. * loop._handle_exception(exc)
  50613. * return
  50614. */
  50615. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__84, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 3046, __pyx_L1_error)
  50616. __Pyx_GOTREF(__pyx_t_1);
  50617. __pyx_v_exc = __pyx_t_1;
  50618. __pyx_t_1 = 0;
  50619. /* "uvloop/loop.pyx":3047
  50620. * buf.len = 0
  50621. * exc = RuntimeError('concurrent allocations')
  50622. * loop._handle_exception(exc) # <<<<<<<<<<<<<<
  50623. * return
  50624. *
  50625. */
  50626. ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_loop->__pyx_vtab)->_handle_exception(__pyx_v_loop, __pyx_v_exc);
  50627. /* "uvloop/loop.pyx":3048
  50628. * exc = RuntimeError('concurrent allocations')
  50629. * loop._handle_exception(exc)
  50630. * return # <<<<<<<<<<<<<<
  50631. *
  50632. * loop._recv_buffer_in_use = 1
  50633. */
  50634. goto __pyx_L0;
  50635. /* "uvloop/loop.pyx":3044
  50636. * Loop loop = (<UVHandle>uvhandle.data)._loop
  50637. *
  50638. * if loop._recv_buffer_in_use == 1: # <<<<<<<<<<<<<<
  50639. * buf.len = 0
  50640. * exc = RuntimeError('concurrent allocations')
  50641. */
  50642. }
  50643. /* "uvloop/loop.pyx":3050
  50644. * return
  50645. *
  50646. * loop._recv_buffer_in_use = 1 # <<<<<<<<<<<<<<
  50647. * buf.base = loop._recv_buffer
  50648. * buf.len = sizeof(loop._recv_buffer)
  50649. */
  50650. __pyx_v_loop->_recv_buffer_in_use = 1;
  50651. /* "uvloop/loop.pyx":3051
  50652. *
  50653. * loop._recv_buffer_in_use = 1
  50654. * buf.base = loop._recv_buffer # <<<<<<<<<<<<<<
  50655. * buf.len = sizeof(loop._recv_buffer)
  50656. *
  50657. */
  50658. __pyx_t_3 = __pyx_v_loop->_recv_buffer;
  50659. __pyx_v_buf->base = __pyx_t_3;
  50660. /* "uvloop/loop.pyx":3052
  50661. * loop._recv_buffer_in_use = 1
  50662. * buf.base = loop._recv_buffer
  50663. * buf.len = sizeof(loop._recv_buffer) # <<<<<<<<<<<<<<
  50664. *
  50665. *
  50666. */
  50667. __pyx_v_buf->len = (sizeof(__pyx_v_loop->_recv_buffer));
  50668. /* "uvloop/loop.pyx":3038
  50669. *
  50670. *
  50671. * cdef void __loop_alloc_buffer(uv.uv_handle_t* uvhandle, # <<<<<<<<<<<<<<
  50672. * size_t suggested_size,
  50673. * uv.uv_buf_t* buf) with gil:
  50674. */
  50675. /* function exit code */
  50676. goto __pyx_L0;
  50677. __pyx_L1_error:;
  50678. __Pyx_XDECREF(__pyx_t_1);
  50679. __Pyx_WriteUnraisable("uvloop.loop.__loop_alloc_buffer", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  50680. __pyx_L0:;
  50681. __Pyx_XDECREF((PyObject *)__pyx_v_loop);
  50682. __Pyx_XDECREF(__pyx_v_exc);
  50683. __Pyx_RefNannyFinishContext();
  50684. #ifdef WITH_THREAD
  50685. __Pyx_PyGILState_Release(__pyx_gilstate_save);
  50686. #endif
  50687. }
  50688. /* "uvloop/loop.pyx":3055
  50689. *
  50690. *
  50691. * cdef inline void __loop_free_buffer(Loop loop): # <<<<<<<<<<<<<<
  50692. * loop._recv_buffer_in_use = 0
  50693. *
  50694. */
  50695. static CYTHON_INLINE void __pyx_f_6uvloop_4loop___loop_free_buffer(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop) {
  50696. __Pyx_RefNannyDeclarations
  50697. __Pyx_RefNannySetupContext("__loop_free_buffer", 0);
  50698. /* "uvloop/loop.pyx":3056
  50699. *
  50700. * cdef inline void __loop_free_buffer(Loop loop):
  50701. * loop._recv_buffer_in_use = 0 # <<<<<<<<<<<<<<
  50702. *
  50703. *
  50704. */
  50705. __pyx_v_loop->_recv_buffer_in_use = 0;
  50706. /* "uvloop/loop.pyx":3055
  50707. *
  50708. *
  50709. * cdef inline void __loop_free_buffer(Loop loop): # <<<<<<<<<<<<<<
  50710. * loop._recv_buffer_in_use = 0
  50711. *
  50712. */
  50713. /* function exit code */
  50714. __Pyx_RefNannyFinishContext();
  50715. }
  50716. /* "uvloop/loop.pyx":3061
  50717. * class _SyncSocketReaderFuture(aio_Future):
  50718. *
  50719. * def __init__(self, sock, loop): # <<<<<<<<<<<<<<
  50720. * aio_Future.__init__(self, loop=loop)
  50721. * self.__sock = sock
  50722. */
  50723. /* Python wrapper */
  50724. static PyObject *__pyx_pw_6uvloop_4loop_23_SyncSocketReaderFuture_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  50725. static char __pyx_doc_6uvloop_4loop_23_SyncSocketReaderFuture___init__[] = "_SyncSocketReaderFuture.__init__(self, sock, loop)";
  50726. static PyMethodDef __pyx_mdef_6uvloop_4loop_23_SyncSocketReaderFuture_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6uvloop_4loop_23_SyncSocketReaderFuture_1__init__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_23_SyncSocketReaderFuture___init__};
  50727. static PyObject *__pyx_pw_6uvloop_4loop_23_SyncSocketReaderFuture_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  50728. PyObject *__pyx_v_self = 0;
  50729. PyObject *__pyx_v_sock = 0;
  50730. PyObject *__pyx_v_loop = 0;
  50731. PyObject *__pyx_r = 0;
  50732. __Pyx_RefNannyDeclarations
  50733. __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  50734. {
  50735. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self_2,&__pyx_n_s_sock,&__pyx_n_s_loop,0};
  50736. PyObject* values[3] = {0,0,0};
  50737. if (unlikely(__pyx_kwds)) {
  50738. Py_ssize_t kw_args;
  50739. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  50740. switch (pos_args) {
  50741. case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
  50742. CYTHON_FALLTHROUGH;
  50743. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  50744. CYTHON_FALLTHROUGH;
  50745. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  50746. CYTHON_FALLTHROUGH;
  50747. case 0: break;
  50748. default: goto __pyx_L5_argtuple_error;
  50749. }
  50750. kw_args = PyDict_Size(__pyx_kwds);
  50751. switch (pos_args) {
  50752. case 0:
  50753. if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self_2)) != 0)) kw_args--;
  50754. else goto __pyx_L5_argtuple_error;
  50755. CYTHON_FALLTHROUGH;
  50756. case 1:
  50757. if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sock)) != 0)) kw_args--;
  50758. else {
  50759. __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 1); __PYX_ERR(2, 3061, __pyx_L3_error)
  50760. }
  50761. CYTHON_FALLTHROUGH;
  50762. case 2:
  50763. if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_loop)) != 0)) kw_args--;
  50764. else {
  50765. __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 2); __PYX_ERR(2, 3061, __pyx_L3_error)
  50766. }
  50767. }
  50768. if (unlikely(kw_args > 0)) {
  50769. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(2, 3061, __pyx_L3_error)
  50770. }
  50771. } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
  50772. goto __pyx_L5_argtuple_error;
  50773. } else {
  50774. values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  50775. values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  50776. values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
  50777. }
  50778. __pyx_v_self = values[0];
  50779. __pyx_v_sock = values[1];
  50780. __pyx_v_loop = values[2];
  50781. }
  50782. goto __pyx_L4_argument_unpacking_done;
  50783. __pyx_L5_argtuple_error:;
  50784. __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 3061, __pyx_L3_error)
  50785. __pyx_L3_error:;
  50786. __Pyx_AddTraceback("uvloop.loop._SyncSocketReaderFuture.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  50787. __Pyx_RefNannyFinishContext();
  50788. return NULL;
  50789. __pyx_L4_argument_unpacking_done:;
  50790. __pyx_r = __pyx_pf_6uvloop_4loop_23_SyncSocketReaderFuture___init__(__pyx_self, __pyx_v_self, __pyx_v_sock, __pyx_v_loop);
  50791. /* function exit code */
  50792. __Pyx_RefNannyFinishContext();
  50793. return __pyx_r;
  50794. }
  50795. static PyObject *__pyx_pf_6uvloop_4loop_23_SyncSocketReaderFuture___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_sock, PyObject *__pyx_v_loop) {
  50796. PyObject *__pyx_r = NULL;
  50797. __Pyx_RefNannyDeclarations
  50798. PyObject *__pyx_t_1 = NULL;
  50799. PyObject *__pyx_t_2 = NULL;
  50800. PyObject *__pyx_t_3 = NULL;
  50801. PyObject *__pyx_t_4 = NULL;
  50802. __Pyx_RefNannySetupContext("__init__", 0);
  50803. /* "uvloop/loop.pyx":3062
  50804. *
  50805. * def __init__(self, sock, loop):
  50806. * aio_Future.__init__(self, loop=loop) # <<<<<<<<<<<<<<
  50807. * self.__sock = sock
  50808. * self.__loop = loop
  50809. */
  50810. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_6uvloop_4loop_aio_Future, __pyx_n_s_init); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 3062, __pyx_L1_error)
  50811. __Pyx_GOTREF(__pyx_t_1);
  50812. __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 3062, __pyx_L1_error)
  50813. __Pyx_GOTREF(__pyx_t_2);
  50814. __Pyx_INCREF(__pyx_v_self);
  50815. __Pyx_GIVEREF(__pyx_v_self);
  50816. PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self);
  50817. __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 3062, __pyx_L1_error)
  50818. __Pyx_GOTREF(__pyx_t_3);
  50819. if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_loop, __pyx_v_loop) < 0) __PYX_ERR(2, 3062, __pyx_L1_error)
  50820. __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 3062, __pyx_L1_error)
  50821. __Pyx_GOTREF(__pyx_t_4);
  50822. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  50823. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  50824. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  50825. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  50826. /* "uvloop/loop.pyx":3063
  50827. * def __init__(self, sock, loop):
  50828. * aio_Future.__init__(self, loop=loop)
  50829. * self.__sock = sock # <<<<<<<<<<<<<<
  50830. * self.__loop = loop
  50831. *
  50832. */
  50833. if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_SyncSocketReaderFuture__sock, __pyx_v_sock) < 0) __PYX_ERR(2, 3063, __pyx_L1_error)
  50834. /* "uvloop/loop.pyx":3064
  50835. * aio_Future.__init__(self, loop=loop)
  50836. * self.__sock = sock
  50837. * self.__loop = loop # <<<<<<<<<<<<<<
  50838. *
  50839. * def cancel(self):
  50840. */
  50841. if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_SyncSocketReaderFuture__loop, __pyx_v_loop) < 0) __PYX_ERR(2, 3064, __pyx_L1_error)
  50842. /* "uvloop/loop.pyx":3061
  50843. * class _SyncSocketReaderFuture(aio_Future):
  50844. *
  50845. * def __init__(self, sock, loop): # <<<<<<<<<<<<<<
  50846. * aio_Future.__init__(self, loop=loop)
  50847. * self.__sock = sock
  50848. */
  50849. /* function exit code */
  50850. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  50851. goto __pyx_L0;
  50852. __pyx_L1_error:;
  50853. __Pyx_XDECREF(__pyx_t_1);
  50854. __Pyx_XDECREF(__pyx_t_2);
  50855. __Pyx_XDECREF(__pyx_t_3);
  50856. __Pyx_XDECREF(__pyx_t_4);
  50857. __Pyx_AddTraceback("uvloop.loop._SyncSocketReaderFuture.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  50858. __pyx_r = NULL;
  50859. __pyx_L0:;
  50860. __Pyx_XGIVEREF(__pyx_r);
  50861. __Pyx_RefNannyFinishContext();
  50862. return __pyx_r;
  50863. }
  50864. /* "uvloop/loop.pyx":3066
  50865. * self.__loop = loop
  50866. *
  50867. * def cancel(self): # <<<<<<<<<<<<<<
  50868. * if self.__sock is not None and self.__sock.fileno() != -1:
  50869. * self.__loop.remove_reader(self.__sock)
  50870. */
  50871. /* Python wrapper */
  50872. static PyObject *__pyx_pw_6uvloop_4loop_23_SyncSocketReaderFuture_3cancel(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
  50873. static char __pyx_doc_6uvloop_4loop_23_SyncSocketReaderFuture_2cancel[] = "_SyncSocketReaderFuture.cancel(self)";
  50874. static PyMethodDef __pyx_mdef_6uvloop_4loop_23_SyncSocketReaderFuture_3cancel = {"cancel", (PyCFunction)__pyx_pw_6uvloop_4loop_23_SyncSocketReaderFuture_3cancel, METH_O, __pyx_doc_6uvloop_4loop_23_SyncSocketReaderFuture_2cancel};
  50875. static PyObject *__pyx_pw_6uvloop_4loop_23_SyncSocketReaderFuture_3cancel(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  50876. PyObject *__pyx_r = 0;
  50877. __Pyx_RefNannyDeclarations
  50878. __Pyx_RefNannySetupContext("cancel (wrapper)", 0);
  50879. __pyx_r = __pyx_pf_6uvloop_4loop_23_SyncSocketReaderFuture_2cancel(__pyx_self, ((PyObject *)__pyx_v_self));
  50880. /* function exit code */
  50881. __Pyx_RefNannyFinishContext();
  50882. return __pyx_r;
  50883. }
  50884. static PyObject *__pyx_pf_6uvloop_4loop_23_SyncSocketReaderFuture_2cancel(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  50885. PyObject *__pyx_r = NULL;
  50886. __Pyx_RefNannyDeclarations
  50887. int __pyx_t_1;
  50888. PyObject *__pyx_t_2 = NULL;
  50889. int __pyx_t_3;
  50890. int __pyx_t_4;
  50891. PyObject *__pyx_t_5 = NULL;
  50892. PyObject *__pyx_t_6 = NULL;
  50893. PyObject *__pyx_t_7 = NULL;
  50894. __Pyx_RefNannySetupContext("cancel", 0);
  50895. /* "uvloop/loop.pyx":3067
  50896. *
  50897. * def cancel(self):
  50898. * if self.__sock is not None and self.__sock.fileno() != -1: # <<<<<<<<<<<<<<
  50899. * self.__loop.remove_reader(self.__sock)
  50900. * self.__sock = None
  50901. */
  50902. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_SyncSocketReaderFuture__sock); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 3067, __pyx_L1_error)
  50903. __Pyx_GOTREF(__pyx_t_2);
  50904. __pyx_t_3 = (__pyx_t_2 != Py_None);
  50905. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  50906. __pyx_t_4 = (__pyx_t_3 != 0);
  50907. if (__pyx_t_4) {
  50908. } else {
  50909. __pyx_t_1 = __pyx_t_4;
  50910. goto __pyx_L4_bool_binop_done;
  50911. }
  50912. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_SyncSocketReaderFuture__sock); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 3067, __pyx_L1_error)
  50913. __Pyx_GOTREF(__pyx_t_5);
  50914. __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_fileno); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 3067, __pyx_L1_error)
  50915. __Pyx_GOTREF(__pyx_t_6);
  50916. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  50917. __pyx_t_5 = NULL;
  50918. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
  50919. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
  50920. if (likely(__pyx_t_5)) {
  50921. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
  50922. __Pyx_INCREF(__pyx_t_5);
  50923. __Pyx_INCREF(function);
  50924. __Pyx_DECREF_SET(__pyx_t_6, function);
  50925. }
  50926. }
  50927. __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
  50928. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  50929. if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 3067, __pyx_L1_error)
  50930. __Pyx_GOTREF(__pyx_t_2);
  50931. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  50932. __pyx_t_6 = __Pyx_PyInt_NeObjC(__pyx_t_2, __pyx_int_neg_1, -1L, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 3067, __pyx_L1_error)
  50933. __Pyx_GOTREF(__pyx_t_6);
  50934. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  50935. __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(2, 3067, __pyx_L1_error)
  50936. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  50937. __pyx_t_1 = __pyx_t_4;
  50938. __pyx_L4_bool_binop_done:;
  50939. if (__pyx_t_1) {
  50940. /* "uvloop/loop.pyx":3068
  50941. * def cancel(self):
  50942. * if self.__sock is not None and self.__sock.fileno() != -1:
  50943. * self.__loop.remove_reader(self.__sock) # <<<<<<<<<<<<<<
  50944. * self.__sock = None
  50945. *
  50946. */
  50947. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_SyncSocketReaderFuture__loop); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 3068, __pyx_L1_error)
  50948. __Pyx_GOTREF(__pyx_t_2);
  50949. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_remove_reader); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 3068, __pyx_L1_error)
  50950. __Pyx_GOTREF(__pyx_t_5);
  50951. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  50952. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_SyncSocketReaderFuture__sock); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 3068, __pyx_L1_error)
  50953. __Pyx_GOTREF(__pyx_t_2);
  50954. __pyx_t_7 = NULL;
  50955. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
  50956. __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
  50957. if (likely(__pyx_t_7)) {
  50958. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
  50959. __Pyx_INCREF(__pyx_t_7);
  50960. __Pyx_INCREF(function);
  50961. __Pyx_DECREF_SET(__pyx_t_5, function);
  50962. }
  50963. }
  50964. __pyx_t_6 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_7, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_2);
  50965. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  50966. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  50967. if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 3068, __pyx_L1_error)
  50968. __Pyx_GOTREF(__pyx_t_6);
  50969. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  50970. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  50971. /* "uvloop/loop.pyx":3069
  50972. * if self.__sock is not None and self.__sock.fileno() != -1:
  50973. * self.__loop.remove_reader(self.__sock)
  50974. * self.__sock = None # <<<<<<<<<<<<<<
  50975. *
  50976. * aio_Future.cancel(self)
  50977. */
  50978. if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_SyncSocketReaderFuture__sock, Py_None) < 0) __PYX_ERR(2, 3069, __pyx_L1_error)
  50979. /* "uvloop/loop.pyx":3067
  50980. *
  50981. * def cancel(self):
  50982. * if self.__sock is not None and self.__sock.fileno() != -1: # <<<<<<<<<<<<<<
  50983. * self.__loop.remove_reader(self.__sock)
  50984. * self.__sock = None
  50985. */
  50986. }
  50987. /* "uvloop/loop.pyx":3071
  50988. * self.__sock = None
  50989. *
  50990. * aio_Future.cancel(self) # <<<<<<<<<<<<<<
  50991. *
  50992. *
  50993. */
  50994. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_6uvloop_4loop_aio_Future, __pyx_n_s_cancel); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 3071, __pyx_L1_error)
  50995. __Pyx_GOTREF(__pyx_t_5);
  50996. __pyx_t_2 = NULL;
  50997. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
  50998. __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5);
  50999. if (likely(__pyx_t_2)) {
  51000. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
  51001. __Pyx_INCREF(__pyx_t_2);
  51002. __Pyx_INCREF(function);
  51003. __Pyx_DECREF_SET(__pyx_t_5, function);
  51004. }
  51005. }
  51006. __pyx_t_6 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_2, __pyx_v_self) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_self);
  51007. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  51008. if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 3071, __pyx_L1_error)
  51009. __Pyx_GOTREF(__pyx_t_6);
  51010. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  51011. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  51012. /* "uvloop/loop.pyx":3066
  51013. * self.__loop = loop
  51014. *
  51015. * def cancel(self): # <<<<<<<<<<<<<<
  51016. * if self.__sock is not None and self.__sock.fileno() != -1:
  51017. * self.__loop.remove_reader(self.__sock)
  51018. */
  51019. /* function exit code */
  51020. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  51021. goto __pyx_L0;
  51022. __pyx_L1_error:;
  51023. __Pyx_XDECREF(__pyx_t_2);
  51024. __Pyx_XDECREF(__pyx_t_5);
  51025. __Pyx_XDECREF(__pyx_t_6);
  51026. __Pyx_XDECREF(__pyx_t_7);
  51027. __Pyx_AddTraceback("uvloop.loop._SyncSocketReaderFuture.cancel", __pyx_clineno, __pyx_lineno, __pyx_filename);
  51028. __pyx_r = NULL;
  51029. __pyx_L0:;
  51030. __Pyx_XGIVEREF(__pyx_r);
  51031. __Pyx_RefNannyFinishContext();
  51032. return __pyx_r;
  51033. }
  51034. /* "uvloop/loop.pyx":3076
  51035. * class _SyncSocketWriterFuture(aio_Future):
  51036. *
  51037. * def __init__(self, sock, loop): # <<<<<<<<<<<<<<
  51038. * aio_Future.__init__(self, loop=loop)
  51039. * self.__sock = sock
  51040. */
  51041. /* Python wrapper */
  51042. static PyObject *__pyx_pw_6uvloop_4loop_23_SyncSocketWriterFuture_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  51043. static char __pyx_doc_6uvloop_4loop_23_SyncSocketWriterFuture___init__[] = "_SyncSocketWriterFuture.__init__(self, sock, loop)";
  51044. static PyMethodDef __pyx_mdef_6uvloop_4loop_23_SyncSocketWriterFuture_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6uvloop_4loop_23_SyncSocketWriterFuture_1__init__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_23_SyncSocketWriterFuture___init__};
  51045. static PyObject *__pyx_pw_6uvloop_4loop_23_SyncSocketWriterFuture_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  51046. PyObject *__pyx_v_self = 0;
  51047. PyObject *__pyx_v_sock = 0;
  51048. PyObject *__pyx_v_loop = 0;
  51049. PyObject *__pyx_r = 0;
  51050. __Pyx_RefNannyDeclarations
  51051. __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  51052. {
  51053. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self_2,&__pyx_n_s_sock,&__pyx_n_s_loop,0};
  51054. PyObject* values[3] = {0,0,0};
  51055. if (unlikely(__pyx_kwds)) {
  51056. Py_ssize_t kw_args;
  51057. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  51058. switch (pos_args) {
  51059. case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
  51060. CYTHON_FALLTHROUGH;
  51061. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  51062. CYTHON_FALLTHROUGH;
  51063. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  51064. CYTHON_FALLTHROUGH;
  51065. case 0: break;
  51066. default: goto __pyx_L5_argtuple_error;
  51067. }
  51068. kw_args = PyDict_Size(__pyx_kwds);
  51069. switch (pos_args) {
  51070. case 0:
  51071. if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self_2)) != 0)) kw_args--;
  51072. else goto __pyx_L5_argtuple_error;
  51073. CYTHON_FALLTHROUGH;
  51074. case 1:
  51075. if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sock)) != 0)) kw_args--;
  51076. else {
  51077. __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 1); __PYX_ERR(2, 3076, __pyx_L3_error)
  51078. }
  51079. CYTHON_FALLTHROUGH;
  51080. case 2:
  51081. if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_loop)) != 0)) kw_args--;
  51082. else {
  51083. __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 2); __PYX_ERR(2, 3076, __pyx_L3_error)
  51084. }
  51085. }
  51086. if (unlikely(kw_args > 0)) {
  51087. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(2, 3076, __pyx_L3_error)
  51088. }
  51089. } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
  51090. goto __pyx_L5_argtuple_error;
  51091. } else {
  51092. values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  51093. values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  51094. values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
  51095. }
  51096. __pyx_v_self = values[0];
  51097. __pyx_v_sock = values[1];
  51098. __pyx_v_loop = values[2];
  51099. }
  51100. goto __pyx_L4_argument_unpacking_done;
  51101. __pyx_L5_argtuple_error:;
  51102. __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 3076, __pyx_L3_error)
  51103. __pyx_L3_error:;
  51104. __Pyx_AddTraceback("uvloop.loop._SyncSocketWriterFuture.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  51105. __Pyx_RefNannyFinishContext();
  51106. return NULL;
  51107. __pyx_L4_argument_unpacking_done:;
  51108. __pyx_r = __pyx_pf_6uvloop_4loop_23_SyncSocketWriterFuture___init__(__pyx_self, __pyx_v_self, __pyx_v_sock, __pyx_v_loop);
  51109. /* function exit code */
  51110. __Pyx_RefNannyFinishContext();
  51111. return __pyx_r;
  51112. }
  51113. static PyObject *__pyx_pf_6uvloop_4loop_23_SyncSocketWriterFuture___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_sock, PyObject *__pyx_v_loop) {
  51114. PyObject *__pyx_r = NULL;
  51115. __Pyx_RefNannyDeclarations
  51116. PyObject *__pyx_t_1 = NULL;
  51117. PyObject *__pyx_t_2 = NULL;
  51118. PyObject *__pyx_t_3 = NULL;
  51119. PyObject *__pyx_t_4 = NULL;
  51120. __Pyx_RefNannySetupContext("__init__", 0);
  51121. /* "uvloop/loop.pyx":3077
  51122. *
  51123. * def __init__(self, sock, loop):
  51124. * aio_Future.__init__(self, loop=loop) # <<<<<<<<<<<<<<
  51125. * self.__sock = sock
  51126. * self.__loop = loop
  51127. */
  51128. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_6uvloop_4loop_aio_Future, __pyx_n_s_init); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 3077, __pyx_L1_error)
  51129. __Pyx_GOTREF(__pyx_t_1);
  51130. __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 3077, __pyx_L1_error)
  51131. __Pyx_GOTREF(__pyx_t_2);
  51132. __Pyx_INCREF(__pyx_v_self);
  51133. __Pyx_GIVEREF(__pyx_v_self);
  51134. PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self);
  51135. __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 3077, __pyx_L1_error)
  51136. __Pyx_GOTREF(__pyx_t_3);
  51137. if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_loop, __pyx_v_loop) < 0) __PYX_ERR(2, 3077, __pyx_L1_error)
  51138. __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 3077, __pyx_L1_error)
  51139. __Pyx_GOTREF(__pyx_t_4);
  51140. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  51141. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  51142. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  51143. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  51144. /* "uvloop/loop.pyx":3078
  51145. * def __init__(self, sock, loop):
  51146. * aio_Future.__init__(self, loop=loop)
  51147. * self.__sock = sock # <<<<<<<<<<<<<<
  51148. * self.__loop = loop
  51149. *
  51150. */
  51151. if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_SyncSocketWriterFuture__sock, __pyx_v_sock) < 0) __PYX_ERR(2, 3078, __pyx_L1_error)
  51152. /* "uvloop/loop.pyx":3079
  51153. * aio_Future.__init__(self, loop=loop)
  51154. * self.__sock = sock
  51155. * self.__loop = loop # <<<<<<<<<<<<<<
  51156. *
  51157. * def cancel(self):
  51158. */
  51159. if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_SyncSocketWriterFuture__loop, __pyx_v_loop) < 0) __PYX_ERR(2, 3079, __pyx_L1_error)
  51160. /* "uvloop/loop.pyx":3076
  51161. * class _SyncSocketWriterFuture(aio_Future):
  51162. *
  51163. * def __init__(self, sock, loop): # <<<<<<<<<<<<<<
  51164. * aio_Future.__init__(self, loop=loop)
  51165. * self.__sock = sock
  51166. */
  51167. /* function exit code */
  51168. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  51169. goto __pyx_L0;
  51170. __pyx_L1_error:;
  51171. __Pyx_XDECREF(__pyx_t_1);
  51172. __Pyx_XDECREF(__pyx_t_2);
  51173. __Pyx_XDECREF(__pyx_t_3);
  51174. __Pyx_XDECREF(__pyx_t_4);
  51175. __Pyx_AddTraceback("uvloop.loop._SyncSocketWriterFuture.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  51176. __pyx_r = NULL;
  51177. __pyx_L0:;
  51178. __Pyx_XGIVEREF(__pyx_r);
  51179. __Pyx_RefNannyFinishContext();
  51180. return __pyx_r;
  51181. }
  51182. /* "uvloop/loop.pyx":3081
  51183. * self.__loop = loop
  51184. *
  51185. * def cancel(self): # <<<<<<<<<<<<<<
  51186. * if self.__sock is not None and self.__sock.fileno() != -1:
  51187. * self.__loop.remove_writer(self.__sock)
  51188. */
  51189. /* Python wrapper */
  51190. static PyObject *__pyx_pw_6uvloop_4loop_23_SyncSocketWriterFuture_3cancel(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
  51191. static char __pyx_doc_6uvloop_4loop_23_SyncSocketWriterFuture_2cancel[] = "_SyncSocketWriterFuture.cancel(self)";
  51192. static PyMethodDef __pyx_mdef_6uvloop_4loop_23_SyncSocketWriterFuture_3cancel = {"cancel", (PyCFunction)__pyx_pw_6uvloop_4loop_23_SyncSocketWriterFuture_3cancel, METH_O, __pyx_doc_6uvloop_4loop_23_SyncSocketWriterFuture_2cancel};
  51193. static PyObject *__pyx_pw_6uvloop_4loop_23_SyncSocketWriterFuture_3cancel(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  51194. PyObject *__pyx_r = 0;
  51195. __Pyx_RefNannyDeclarations
  51196. __Pyx_RefNannySetupContext("cancel (wrapper)", 0);
  51197. __pyx_r = __pyx_pf_6uvloop_4loop_23_SyncSocketWriterFuture_2cancel(__pyx_self, ((PyObject *)__pyx_v_self));
  51198. /* function exit code */
  51199. __Pyx_RefNannyFinishContext();
  51200. return __pyx_r;
  51201. }
  51202. static PyObject *__pyx_pf_6uvloop_4loop_23_SyncSocketWriterFuture_2cancel(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  51203. PyObject *__pyx_r = NULL;
  51204. __Pyx_RefNannyDeclarations
  51205. int __pyx_t_1;
  51206. PyObject *__pyx_t_2 = NULL;
  51207. int __pyx_t_3;
  51208. int __pyx_t_4;
  51209. PyObject *__pyx_t_5 = NULL;
  51210. PyObject *__pyx_t_6 = NULL;
  51211. PyObject *__pyx_t_7 = NULL;
  51212. __Pyx_RefNannySetupContext("cancel", 0);
  51213. /* "uvloop/loop.pyx":3082
  51214. *
  51215. * def cancel(self):
  51216. * if self.__sock is not None and self.__sock.fileno() != -1: # <<<<<<<<<<<<<<
  51217. * self.__loop.remove_writer(self.__sock)
  51218. * self.__sock = None
  51219. */
  51220. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_SyncSocketWriterFuture__sock); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 3082, __pyx_L1_error)
  51221. __Pyx_GOTREF(__pyx_t_2);
  51222. __pyx_t_3 = (__pyx_t_2 != Py_None);
  51223. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  51224. __pyx_t_4 = (__pyx_t_3 != 0);
  51225. if (__pyx_t_4) {
  51226. } else {
  51227. __pyx_t_1 = __pyx_t_4;
  51228. goto __pyx_L4_bool_binop_done;
  51229. }
  51230. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_SyncSocketWriterFuture__sock); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 3082, __pyx_L1_error)
  51231. __Pyx_GOTREF(__pyx_t_5);
  51232. __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_fileno); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 3082, __pyx_L1_error)
  51233. __Pyx_GOTREF(__pyx_t_6);
  51234. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  51235. __pyx_t_5 = NULL;
  51236. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
  51237. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
  51238. if (likely(__pyx_t_5)) {
  51239. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
  51240. __Pyx_INCREF(__pyx_t_5);
  51241. __Pyx_INCREF(function);
  51242. __Pyx_DECREF_SET(__pyx_t_6, function);
  51243. }
  51244. }
  51245. __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
  51246. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  51247. if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 3082, __pyx_L1_error)
  51248. __Pyx_GOTREF(__pyx_t_2);
  51249. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  51250. __pyx_t_6 = __Pyx_PyInt_NeObjC(__pyx_t_2, __pyx_int_neg_1, -1L, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 3082, __pyx_L1_error)
  51251. __Pyx_GOTREF(__pyx_t_6);
  51252. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  51253. __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(2, 3082, __pyx_L1_error)
  51254. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  51255. __pyx_t_1 = __pyx_t_4;
  51256. __pyx_L4_bool_binop_done:;
  51257. if (__pyx_t_1) {
  51258. /* "uvloop/loop.pyx":3083
  51259. * def cancel(self):
  51260. * if self.__sock is not None and self.__sock.fileno() != -1:
  51261. * self.__loop.remove_writer(self.__sock) # <<<<<<<<<<<<<<
  51262. * self.__sock = None
  51263. *
  51264. */
  51265. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_SyncSocketWriterFuture__loop); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 3083, __pyx_L1_error)
  51266. __Pyx_GOTREF(__pyx_t_2);
  51267. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_remove_writer); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 3083, __pyx_L1_error)
  51268. __Pyx_GOTREF(__pyx_t_5);
  51269. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  51270. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_SyncSocketWriterFuture__sock); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 3083, __pyx_L1_error)
  51271. __Pyx_GOTREF(__pyx_t_2);
  51272. __pyx_t_7 = NULL;
  51273. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
  51274. __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
  51275. if (likely(__pyx_t_7)) {
  51276. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
  51277. __Pyx_INCREF(__pyx_t_7);
  51278. __Pyx_INCREF(function);
  51279. __Pyx_DECREF_SET(__pyx_t_5, function);
  51280. }
  51281. }
  51282. __pyx_t_6 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_7, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_2);
  51283. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  51284. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  51285. if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 3083, __pyx_L1_error)
  51286. __Pyx_GOTREF(__pyx_t_6);
  51287. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  51288. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  51289. /* "uvloop/loop.pyx":3084
  51290. * if self.__sock is not None and self.__sock.fileno() != -1:
  51291. * self.__loop.remove_writer(self.__sock)
  51292. * self.__sock = None # <<<<<<<<<<<<<<
  51293. *
  51294. * aio_Future.cancel(self)
  51295. */
  51296. if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_SyncSocketWriterFuture__sock, Py_None) < 0) __PYX_ERR(2, 3084, __pyx_L1_error)
  51297. /* "uvloop/loop.pyx":3082
  51298. *
  51299. * def cancel(self):
  51300. * if self.__sock is not None and self.__sock.fileno() != -1: # <<<<<<<<<<<<<<
  51301. * self.__loop.remove_writer(self.__sock)
  51302. * self.__sock = None
  51303. */
  51304. }
  51305. /* "uvloop/loop.pyx":3086
  51306. * self.__sock = None
  51307. *
  51308. * aio_Future.cancel(self) # <<<<<<<<<<<<<<
  51309. *
  51310. *
  51311. */
  51312. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_6uvloop_4loop_aio_Future, __pyx_n_s_cancel); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 3086, __pyx_L1_error)
  51313. __Pyx_GOTREF(__pyx_t_5);
  51314. __pyx_t_2 = NULL;
  51315. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
  51316. __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5);
  51317. if (likely(__pyx_t_2)) {
  51318. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
  51319. __Pyx_INCREF(__pyx_t_2);
  51320. __Pyx_INCREF(function);
  51321. __Pyx_DECREF_SET(__pyx_t_5, function);
  51322. }
  51323. }
  51324. __pyx_t_6 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_2, __pyx_v_self) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_self);
  51325. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  51326. if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 3086, __pyx_L1_error)
  51327. __Pyx_GOTREF(__pyx_t_6);
  51328. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  51329. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  51330. /* "uvloop/loop.pyx":3081
  51331. * self.__loop = loop
  51332. *
  51333. * def cancel(self): # <<<<<<<<<<<<<<
  51334. * if self.__sock is not None and self.__sock.fileno() != -1:
  51335. * self.__loop.remove_writer(self.__sock)
  51336. */
  51337. /* function exit code */
  51338. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  51339. goto __pyx_L0;
  51340. __pyx_L1_error:;
  51341. __Pyx_XDECREF(__pyx_t_2);
  51342. __Pyx_XDECREF(__pyx_t_5);
  51343. __Pyx_XDECREF(__pyx_t_6);
  51344. __Pyx_XDECREF(__pyx_t_7);
  51345. __Pyx_AddTraceback("uvloop.loop._SyncSocketWriterFuture.cancel", __pyx_clineno, __pyx_lineno, __pyx_filename);
  51346. __pyx_r = NULL;
  51347. __pyx_L0:;
  51348. __Pyx_XGIVEREF(__pyx_r);
  51349. __Pyx_RefNannyFinishContext();
  51350. return __pyx_r;
  51351. }
  51352. /* "uvloop/cbhandles.pyx":4
  51353. * @cython.freelist(DEFAULT_FREELIST_SIZE)
  51354. * cdef class Handle:
  51355. * def __cinit__(self): # <<<<<<<<<<<<<<
  51356. * self._cancelled = 0
  51357. * self.cb_type = 0
  51358. */
  51359. /* Python wrapper */
  51360. static int __pyx_pw_6uvloop_4loop_6Handle_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  51361. static int __pyx_pw_6uvloop_4loop_6Handle_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  51362. int __pyx_r;
  51363. __Pyx_RefNannyDeclarations
  51364. __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  51365. if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
  51366. __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  51367. if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
  51368. __pyx_r = __pyx_pf_6uvloop_4loop_6Handle___cinit__(((struct __pyx_obj_6uvloop_4loop_Handle *)__pyx_v_self));
  51369. /* function exit code */
  51370. __Pyx_RefNannyFinishContext();
  51371. return __pyx_r;
  51372. }
  51373. static int __pyx_pf_6uvloop_4loop_6Handle___cinit__(struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_self) {
  51374. int __pyx_r;
  51375. __Pyx_RefNannyDeclarations
  51376. __Pyx_RefNannySetupContext("__cinit__", 0);
  51377. /* "uvloop/cbhandles.pyx":5
  51378. * cdef class Handle:
  51379. * def __cinit__(self):
  51380. * self._cancelled = 0 # <<<<<<<<<<<<<<
  51381. * self.cb_type = 0
  51382. * self._source_traceback = None
  51383. */
  51384. __pyx_v_self->_cancelled = 0;
  51385. /* "uvloop/cbhandles.pyx":6
  51386. * def __cinit__(self):
  51387. * self._cancelled = 0
  51388. * self.cb_type = 0 # <<<<<<<<<<<<<<
  51389. * self._source_traceback = None
  51390. *
  51391. */
  51392. __pyx_v_self->cb_type = 0;
  51393. /* "uvloop/cbhandles.pyx":7
  51394. * self._cancelled = 0
  51395. * self.cb_type = 0
  51396. * self._source_traceback = None # <<<<<<<<<<<<<<
  51397. *
  51398. * cdef inline _set_loop(self, Loop loop):
  51399. */
  51400. __Pyx_INCREF(Py_None);
  51401. __Pyx_GIVEREF(Py_None);
  51402. __Pyx_GOTREF(__pyx_v_self->_source_traceback);
  51403. __Pyx_DECREF(__pyx_v_self->_source_traceback);
  51404. __pyx_v_self->_source_traceback = Py_None;
  51405. /* "uvloop/cbhandles.pyx":4
  51406. * @cython.freelist(DEFAULT_FREELIST_SIZE)
  51407. * cdef class Handle:
  51408. * def __cinit__(self): # <<<<<<<<<<<<<<
  51409. * self._cancelled = 0
  51410. * self.cb_type = 0
  51411. */
  51412. /* function exit code */
  51413. __pyx_r = 0;
  51414. __Pyx_RefNannyFinishContext();
  51415. return __pyx_r;
  51416. }
  51417. /* "uvloop/cbhandles.pyx":9
  51418. * self._source_traceback = None
  51419. *
  51420. * cdef inline _set_loop(self, Loop loop): # <<<<<<<<<<<<<<
  51421. * self.loop = loop
  51422. * if UVLOOP_DEBUG:
  51423. */
  51424. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_6Handle__set_loop(struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop) {
  51425. PyObject *__pyx_r = NULL;
  51426. __Pyx_RefNannyDeclarations
  51427. int __pyx_t_1;
  51428. PyObject *__pyx_t_2 = NULL;
  51429. __Pyx_RefNannySetupContext("_set_loop", 0);
  51430. /* "uvloop/cbhandles.pyx":10
  51431. *
  51432. * cdef inline _set_loop(self, Loop loop):
  51433. * self.loop = loop # <<<<<<<<<<<<<<
  51434. * if UVLOOP_DEBUG:
  51435. * loop._debug_cb_handles_total += 1
  51436. */
  51437. __Pyx_INCREF(((PyObject *)__pyx_v_loop));
  51438. __Pyx_GIVEREF(((PyObject *)__pyx_v_loop));
  51439. __Pyx_GOTREF(__pyx_v_self->loop);
  51440. __Pyx_DECREF(((PyObject *)__pyx_v_self->loop));
  51441. __pyx_v_self->loop = __pyx_v_loop;
  51442. /* "uvloop/cbhandles.pyx":11
  51443. * cdef inline _set_loop(self, Loop loop):
  51444. * self.loop = loop
  51445. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  51446. * loop._debug_cb_handles_total += 1
  51447. * loop._debug_cb_handles_count += 1
  51448. */
  51449. __pyx_t_1 = (UVLOOP_DEBUG != 0);
  51450. if (__pyx_t_1) {
  51451. /* "uvloop/cbhandles.pyx":12
  51452. * self.loop = loop
  51453. * if UVLOOP_DEBUG:
  51454. * loop._debug_cb_handles_total += 1 # <<<<<<<<<<<<<<
  51455. * loop._debug_cb_handles_count += 1
  51456. * if loop._debug:
  51457. */
  51458. __pyx_v_loop->_debug_cb_handles_total = (__pyx_v_loop->_debug_cb_handles_total + 1);
  51459. /* "uvloop/cbhandles.pyx":13
  51460. * if UVLOOP_DEBUG:
  51461. * loop._debug_cb_handles_total += 1
  51462. * loop._debug_cb_handles_count += 1 # <<<<<<<<<<<<<<
  51463. * if loop._debug:
  51464. * self._source_traceback = extract_stack()
  51465. */
  51466. __pyx_v_loop->_debug_cb_handles_count = (__pyx_v_loop->_debug_cb_handles_count + 1);
  51467. /* "uvloop/cbhandles.pyx":11
  51468. * cdef inline _set_loop(self, Loop loop):
  51469. * self.loop = loop
  51470. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  51471. * loop._debug_cb_handles_total += 1
  51472. * loop._debug_cb_handles_count += 1
  51473. */
  51474. }
  51475. /* "uvloop/cbhandles.pyx":14
  51476. * loop._debug_cb_handles_total += 1
  51477. * loop._debug_cb_handles_count += 1
  51478. * if loop._debug: # <<<<<<<<<<<<<<
  51479. * self._source_traceback = extract_stack()
  51480. *
  51481. */
  51482. __pyx_t_1 = (__pyx_v_loop->_debug != 0);
  51483. if (__pyx_t_1) {
  51484. /* "uvloop/cbhandles.pyx":15
  51485. * loop._debug_cb_handles_count += 1
  51486. * if loop._debug:
  51487. * self._source_traceback = extract_stack() # <<<<<<<<<<<<<<
  51488. *
  51489. * cdef inline _set_context(self, object context):
  51490. */
  51491. __pyx_t_2 = __pyx_f_6uvloop_4loop_extract_stack(); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 15, __pyx_L1_error)
  51492. __Pyx_GOTREF(__pyx_t_2);
  51493. __Pyx_GIVEREF(__pyx_t_2);
  51494. __Pyx_GOTREF(__pyx_v_self->_source_traceback);
  51495. __Pyx_DECREF(__pyx_v_self->_source_traceback);
  51496. __pyx_v_self->_source_traceback = __pyx_t_2;
  51497. __pyx_t_2 = 0;
  51498. /* "uvloop/cbhandles.pyx":14
  51499. * loop._debug_cb_handles_total += 1
  51500. * loop._debug_cb_handles_count += 1
  51501. * if loop._debug: # <<<<<<<<<<<<<<
  51502. * self._source_traceback = extract_stack()
  51503. *
  51504. */
  51505. }
  51506. /* "uvloop/cbhandles.pyx":9
  51507. * self._source_traceback = None
  51508. *
  51509. * cdef inline _set_loop(self, Loop loop): # <<<<<<<<<<<<<<
  51510. * self.loop = loop
  51511. * if UVLOOP_DEBUG:
  51512. */
  51513. /* function exit code */
  51514. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  51515. goto __pyx_L0;
  51516. __pyx_L1_error:;
  51517. __Pyx_XDECREF(__pyx_t_2);
  51518. __Pyx_AddTraceback("uvloop.loop.Handle._set_loop", __pyx_clineno, __pyx_lineno, __pyx_filename);
  51519. __pyx_r = 0;
  51520. __pyx_L0:;
  51521. __Pyx_XGIVEREF(__pyx_r);
  51522. __Pyx_RefNannyFinishContext();
  51523. return __pyx_r;
  51524. }
  51525. /* "uvloop/cbhandles.pyx":17
  51526. * self._source_traceback = extract_stack()
  51527. *
  51528. * cdef inline _set_context(self, object context): # <<<<<<<<<<<<<<
  51529. * if PY37:
  51530. * if context is None:
  51531. */
  51532. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_6Handle__set_context(struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_self, PyObject *__pyx_v_context) {
  51533. PyObject *__pyx_r = NULL;
  51534. __Pyx_RefNannyDeclarations
  51535. int __pyx_t_1;
  51536. int __pyx_t_2;
  51537. PyObject *__pyx_t_3 = NULL;
  51538. __Pyx_RefNannySetupContext("_set_context", 0);
  51539. __Pyx_INCREF(__pyx_v_context);
  51540. /* "uvloop/cbhandles.pyx":18
  51541. *
  51542. * cdef inline _set_context(self, object context):
  51543. * if PY37: # <<<<<<<<<<<<<<
  51544. * if context is None:
  51545. * context = Context_CopyCurrent()
  51546. */
  51547. __pyx_t_1 = (__pyx_v_6uvloop_4loop_PY37 != 0);
  51548. if (__pyx_t_1) {
  51549. /* "uvloop/cbhandles.pyx":19
  51550. * cdef inline _set_context(self, object context):
  51551. * if PY37:
  51552. * if context is None: # <<<<<<<<<<<<<<
  51553. * context = Context_CopyCurrent()
  51554. * self.context = context
  51555. */
  51556. __pyx_t_1 = (__pyx_v_context == Py_None);
  51557. __pyx_t_2 = (__pyx_t_1 != 0);
  51558. if (__pyx_t_2) {
  51559. /* "uvloop/cbhandles.pyx":20
  51560. * if PY37:
  51561. * if context is None:
  51562. * context = Context_CopyCurrent() # <<<<<<<<<<<<<<
  51563. * self.context = context
  51564. * else:
  51565. */
  51566. __pyx_t_3 = Context_CopyCurrent(); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 20, __pyx_L1_error)
  51567. __Pyx_GOTREF(__pyx_t_3);
  51568. __Pyx_DECREF_SET(__pyx_v_context, __pyx_t_3);
  51569. __pyx_t_3 = 0;
  51570. /* "uvloop/cbhandles.pyx":19
  51571. * cdef inline _set_context(self, object context):
  51572. * if PY37:
  51573. * if context is None: # <<<<<<<<<<<<<<
  51574. * context = Context_CopyCurrent()
  51575. * self.context = context
  51576. */
  51577. }
  51578. /* "uvloop/cbhandles.pyx":21
  51579. * if context is None:
  51580. * context = Context_CopyCurrent()
  51581. * self.context = context # <<<<<<<<<<<<<<
  51582. * else:
  51583. * if context is not None:
  51584. */
  51585. __Pyx_INCREF(__pyx_v_context);
  51586. __Pyx_GIVEREF(__pyx_v_context);
  51587. __Pyx_GOTREF(__pyx_v_self->context);
  51588. __Pyx_DECREF(__pyx_v_self->context);
  51589. __pyx_v_self->context = __pyx_v_context;
  51590. /* "uvloop/cbhandles.pyx":18
  51591. *
  51592. * cdef inline _set_context(self, object context):
  51593. * if PY37: # <<<<<<<<<<<<<<
  51594. * if context is None:
  51595. * context = Context_CopyCurrent()
  51596. */
  51597. goto __pyx_L3;
  51598. }
  51599. /* "uvloop/cbhandles.pyx":23
  51600. * self.context = context
  51601. * else:
  51602. * if context is not None: # <<<<<<<<<<<<<<
  51603. * raise NotImplementedError(
  51604. * '"context" argument requires Python 3.7')
  51605. */
  51606. /*else*/ {
  51607. __pyx_t_2 = (__pyx_v_context != Py_None);
  51608. __pyx_t_1 = (__pyx_t_2 != 0);
  51609. if (unlikely(__pyx_t_1)) {
  51610. /* "uvloop/cbhandles.pyx":24
  51611. * else:
  51612. * if context is not None:
  51613. * raise NotImplementedError( # <<<<<<<<<<<<<<
  51614. * '"context" argument requires Python 3.7')
  51615. * self.context = None
  51616. */
  51617. __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_NotImplementedError, __pyx_tuple__85, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 24, __pyx_L1_error)
  51618. __Pyx_GOTREF(__pyx_t_3);
  51619. __Pyx_Raise(__pyx_t_3, 0, 0, 0);
  51620. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  51621. __PYX_ERR(3, 24, __pyx_L1_error)
  51622. /* "uvloop/cbhandles.pyx":23
  51623. * self.context = context
  51624. * else:
  51625. * if context is not None: # <<<<<<<<<<<<<<
  51626. * raise NotImplementedError(
  51627. * '"context" argument requires Python 3.7')
  51628. */
  51629. }
  51630. /* "uvloop/cbhandles.pyx":26
  51631. * raise NotImplementedError(
  51632. * '"context" argument requires Python 3.7')
  51633. * self.context = None # <<<<<<<<<<<<<<
  51634. *
  51635. * def __dealloc__(self):
  51636. */
  51637. __Pyx_INCREF(Py_None);
  51638. __Pyx_GIVEREF(Py_None);
  51639. __Pyx_GOTREF(__pyx_v_self->context);
  51640. __Pyx_DECREF(__pyx_v_self->context);
  51641. __pyx_v_self->context = Py_None;
  51642. }
  51643. __pyx_L3:;
  51644. /* "uvloop/cbhandles.pyx":17
  51645. * self._source_traceback = extract_stack()
  51646. *
  51647. * cdef inline _set_context(self, object context): # <<<<<<<<<<<<<<
  51648. * if PY37:
  51649. * if context is None:
  51650. */
  51651. /* function exit code */
  51652. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  51653. goto __pyx_L0;
  51654. __pyx_L1_error:;
  51655. __Pyx_XDECREF(__pyx_t_3);
  51656. __Pyx_AddTraceback("uvloop.loop.Handle._set_context", __pyx_clineno, __pyx_lineno, __pyx_filename);
  51657. __pyx_r = 0;
  51658. __pyx_L0:;
  51659. __Pyx_XDECREF(__pyx_v_context);
  51660. __Pyx_XGIVEREF(__pyx_r);
  51661. __Pyx_RefNannyFinishContext();
  51662. return __pyx_r;
  51663. }
  51664. /* "uvloop/cbhandles.pyx":28
  51665. * self.context = None
  51666. *
  51667. * def __dealloc__(self): # <<<<<<<<<<<<<<
  51668. * if UVLOOP_DEBUG and self.loop is not None:
  51669. * self.loop._debug_cb_handles_count -= 1
  51670. */
  51671. /* Python wrapper */
  51672. static void __pyx_pw_6uvloop_4loop_6Handle_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
  51673. static void __pyx_pw_6uvloop_4loop_6Handle_3__dealloc__(PyObject *__pyx_v_self) {
  51674. __Pyx_RefNannyDeclarations
  51675. __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  51676. __pyx_pf_6uvloop_4loop_6Handle_2__dealloc__(((struct __pyx_obj_6uvloop_4loop_Handle *)__pyx_v_self));
  51677. /* function exit code */
  51678. __Pyx_RefNannyFinishContext();
  51679. }
  51680. static void __pyx_pf_6uvloop_4loop_6Handle_2__dealloc__(struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_self) {
  51681. __Pyx_RefNannyDeclarations
  51682. int __pyx_t_1;
  51683. int __pyx_t_2;
  51684. int __pyx_t_3;
  51685. struct __pyx_obj_6uvloop_4loop_Loop *__pyx_t_4 = NULL;
  51686. PyObject *__pyx_t_5 = NULL;
  51687. __Pyx_RefNannySetupContext("__dealloc__", 0);
  51688. /* "uvloop/cbhandles.pyx":29
  51689. *
  51690. * def __dealloc__(self):
  51691. * if UVLOOP_DEBUG and self.loop is not None: # <<<<<<<<<<<<<<
  51692. * self.loop._debug_cb_handles_count -= 1
  51693. * if self.loop is None:
  51694. */
  51695. __pyx_t_2 = (UVLOOP_DEBUG != 0);
  51696. if (__pyx_t_2) {
  51697. } else {
  51698. __pyx_t_1 = __pyx_t_2;
  51699. goto __pyx_L4_bool_binop_done;
  51700. }
  51701. __pyx_t_2 = (((PyObject *)__pyx_v_self->loop) != Py_None);
  51702. __pyx_t_3 = (__pyx_t_2 != 0);
  51703. __pyx_t_1 = __pyx_t_3;
  51704. __pyx_L4_bool_binop_done:;
  51705. if (__pyx_t_1) {
  51706. /* "uvloop/cbhandles.pyx":30
  51707. * def __dealloc__(self):
  51708. * if UVLOOP_DEBUG and self.loop is not None:
  51709. * self.loop._debug_cb_handles_count -= 1 # <<<<<<<<<<<<<<
  51710. * if self.loop is None:
  51711. * raise RuntimeError('Handle.loop is None in Handle.__dealloc__')
  51712. */
  51713. __Pyx_INCREF(((PyObject *)__pyx_v_self->loop));
  51714. __pyx_t_4 = __pyx_v_self->loop;
  51715. __pyx_t_4->_debug_cb_handles_count = (__pyx_t_4->_debug_cb_handles_count - 1);
  51716. __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  51717. /* "uvloop/cbhandles.pyx":29
  51718. *
  51719. * def __dealloc__(self):
  51720. * if UVLOOP_DEBUG and self.loop is not None: # <<<<<<<<<<<<<<
  51721. * self.loop._debug_cb_handles_count -= 1
  51722. * if self.loop is None:
  51723. */
  51724. }
  51725. /* "uvloop/cbhandles.pyx":31
  51726. * if UVLOOP_DEBUG and self.loop is not None:
  51727. * self.loop._debug_cb_handles_count -= 1
  51728. * if self.loop is None: # <<<<<<<<<<<<<<
  51729. * raise RuntimeError('Handle.loop is None in Handle.__dealloc__')
  51730. *
  51731. */
  51732. __pyx_t_1 = (((PyObject *)__pyx_v_self->loop) == Py_None);
  51733. __pyx_t_3 = (__pyx_t_1 != 0);
  51734. if (unlikely(__pyx_t_3)) {
  51735. /* "uvloop/cbhandles.pyx":32
  51736. * self.loop._debug_cb_handles_count -= 1
  51737. * if self.loop is None:
  51738. * raise RuntimeError('Handle.loop is None in Handle.__dealloc__') # <<<<<<<<<<<<<<
  51739. *
  51740. * def __init__(self):
  51741. */
  51742. __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__86, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 32, __pyx_L1_error)
  51743. __Pyx_GOTREF(__pyx_t_5);
  51744. __Pyx_Raise(__pyx_t_5, 0, 0, 0);
  51745. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  51746. __PYX_ERR(3, 32, __pyx_L1_error)
  51747. /* "uvloop/cbhandles.pyx":31
  51748. * if UVLOOP_DEBUG and self.loop is not None:
  51749. * self.loop._debug_cb_handles_count -= 1
  51750. * if self.loop is None: # <<<<<<<<<<<<<<
  51751. * raise RuntimeError('Handle.loop is None in Handle.__dealloc__')
  51752. *
  51753. */
  51754. }
  51755. /* "uvloop/cbhandles.pyx":28
  51756. * self.context = None
  51757. *
  51758. * def __dealloc__(self): # <<<<<<<<<<<<<<
  51759. * if UVLOOP_DEBUG and self.loop is not None:
  51760. * self.loop._debug_cb_handles_count -= 1
  51761. */
  51762. /* function exit code */
  51763. goto __pyx_L0;
  51764. __pyx_L1_error:;
  51765. __Pyx_XDECREF(((PyObject *)__pyx_t_4));
  51766. __Pyx_XDECREF(__pyx_t_5);
  51767. __Pyx_WriteUnraisable("uvloop.loop.Handle.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  51768. __pyx_L0:;
  51769. __Pyx_RefNannyFinishContext();
  51770. }
  51771. /* "uvloop/cbhandles.pyx":34
  51772. * raise RuntimeError('Handle.loop is None in Handle.__dealloc__')
  51773. *
  51774. * def __init__(self): # <<<<<<<<<<<<<<
  51775. * raise TypeError(
  51776. * '{} is not supposed to be instantiated from Python'.format(
  51777. */
  51778. /* Python wrapper */
  51779. static int __pyx_pw_6uvloop_4loop_6Handle_5__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  51780. static int __pyx_pw_6uvloop_4loop_6Handle_5__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  51781. int __pyx_r;
  51782. __Pyx_RefNannyDeclarations
  51783. __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  51784. if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
  51785. __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  51786. if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1;
  51787. __pyx_r = __pyx_pf_6uvloop_4loop_6Handle_4__init__(((struct __pyx_obj_6uvloop_4loop_Handle *)__pyx_v_self));
  51788. /* function exit code */
  51789. __Pyx_RefNannyFinishContext();
  51790. return __pyx_r;
  51791. }
  51792. static int __pyx_pf_6uvloop_4loop_6Handle_4__init__(struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_self) {
  51793. int __pyx_r;
  51794. __Pyx_RefNannyDeclarations
  51795. PyObject *__pyx_t_1 = NULL;
  51796. PyObject *__pyx_t_2 = NULL;
  51797. PyObject *__pyx_t_3 = NULL;
  51798. PyObject *__pyx_t_4 = NULL;
  51799. __Pyx_RefNannySetupContext("__init__", 0);
  51800. /* "uvloop/cbhandles.pyx":36
  51801. * def __init__(self):
  51802. * raise TypeError(
  51803. * '{} is not supposed to be instantiated from Python'.format( # <<<<<<<<<<<<<<
  51804. * self.__class__.__name__))
  51805. *
  51806. */
  51807. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_is_not_supposed_to_be_instantia, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 36, __pyx_L1_error)
  51808. __Pyx_GOTREF(__pyx_t_2);
  51809. /* "uvloop/cbhandles.pyx":37
  51810. * raise TypeError(
  51811. * '{} is not supposed to be instantiated from Python'.format(
  51812. * self.__class__.__name__)) # <<<<<<<<<<<<<<
  51813. *
  51814. * cdef inline _run(self):
  51815. */
  51816. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 37, __pyx_L1_error)
  51817. __Pyx_GOTREF(__pyx_t_3);
  51818. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 37, __pyx_L1_error)
  51819. __Pyx_GOTREF(__pyx_t_4);
  51820. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  51821. __pyx_t_3 = NULL;
  51822. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
  51823. __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
  51824. if (likely(__pyx_t_3)) {
  51825. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  51826. __Pyx_INCREF(__pyx_t_3);
  51827. __Pyx_INCREF(function);
  51828. __Pyx_DECREF_SET(__pyx_t_2, function);
  51829. }
  51830. }
  51831. __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
  51832. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  51833. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  51834. if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 36, __pyx_L1_error)
  51835. __Pyx_GOTREF(__pyx_t_1);
  51836. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  51837. /* "uvloop/cbhandles.pyx":35
  51838. *
  51839. * def __init__(self):
  51840. * raise TypeError( # <<<<<<<<<<<<<<
  51841. * '{} is not supposed to be instantiated from Python'.format(
  51842. * self.__class__.__name__))
  51843. */
  51844. __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 35, __pyx_L1_error)
  51845. __Pyx_GOTREF(__pyx_t_2);
  51846. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  51847. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  51848. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  51849. __PYX_ERR(3, 35, __pyx_L1_error)
  51850. /* "uvloop/cbhandles.pyx":34
  51851. * raise RuntimeError('Handle.loop is None in Handle.__dealloc__')
  51852. *
  51853. * def __init__(self): # <<<<<<<<<<<<<<
  51854. * raise TypeError(
  51855. * '{} is not supposed to be instantiated from Python'.format(
  51856. */
  51857. /* function exit code */
  51858. __pyx_L1_error:;
  51859. __Pyx_XDECREF(__pyx_t_1);
  51860. __Pyx_XDECREF(__pyx_t_2);
  51861. __Pyx_XDECREF(__pyx_t_3);
  51862. __Pyx_XDECREF(__pyx_t_4);
  51863. __Pyx_AddTraceback("uvloop.loop.Handle.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  51864. __pyx_r = -1;
  51865. __Pyx_RefNannyFinishContext();
  51866. return __pyx_r;
  51867. }
  51868. /* "uvloop/cbhandles.pyx":39
  51869. * self.__class__.__name__))
  51870. *
  51871. * cdef inline _run(self): # <<<<<<<<<<<<<<
  51872. * cdef:
  51873. * int cb_type
  51874. */
  51875. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_6Handle__run(struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_self) {
  51876. int __pyx_v_cb_type;
  51877. PyObject *__pyx_v_callback = 0;
  51878. PyObject *__pyx_v_args = NULL;
  51879. PyObject *__pyx_v_ex = NULL;
  51880. PyObject *__pyx_v_msg = NULL;
  51881. PyObject *__pyx_v_context = NULL;
  51882. PyObject *__pyx_r = NULL;
  51883. __Pyx_RefNannyDeclarations
  51884. int __pyx_t_1;
  51885. int __pyx_t_2;
  51886. PyObject *__pyx_t_3 = NULL;
  51887. PyObject *__pyx_t_4 = NULL;
  51888. PyObject *__pyx_t_5 = NULL;
  51889. PyObject *__pyx_t_6 = NULL;
  51890. int __pyx_t_7;
  51891. PyObject *__pyx_t_8 = NULL;
  51892. PyObject *__pyx_t_9 = NULL;
  51893. PyObject *__pyx_t_10 = NULL;
  51894. PyObject *__pyx_t_11 = NULL;
  51895. PyObject *__pyx_t_12 = NULL;
  51896. int __pyx_t_13;
  51897. char const *__pyx_t_14;
  51898. PyObject *__pyx_t_15 = NULL;
  51899. PyObject *__pyx_t_16 = NULL;
  51900. PyObject *__pyx_t_17 = NULL;
  51901. PyObject *__pyx_t_18 = NULL;
  51902. PyObject *__pyx_t_19 = NULL;
  51903. PyObject *__pyx_t_20 = NULL;
  51904. char const *__pyx_t_21;
  51905. int __pyx_t_22;
  51906. __Pyx_RefNannySetupContext("_run", 0);
  51907. /* "uvloop/cbhandles.pyx":44
  51908. * object callback
  51909. *
  51910. * if self._cancelled: # <<<<<<<<<<<<<<
  51911. * return
  51912. *
  51913. */
  51914. __pyx_t_1 = (__pyx_v_self->_cancelled != 0);
  51915. if (__pyx_t_1) {
  51916. /* "uvloop/cbhandles.pyx":45
  51917. *
  51918. * if self._cancelled:
  51919. * return # <<<<<<<<<<<<<<
  51920. *
  51921. * cb_type = self.cb_type
  51922. */
  51923. __Pyx_XDECREF(__pyx_r);
  51924. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  51925. goto __pyx_L0;
  51926. /* "uvloop/cbhandles.pyx":44
  51927. * object callback
  51928. *
  51929. * if self._cancelled: # <<<<<<<<<<<<<<
  51930. * return
  51931. *
  51932. */
  51933. }
  51934. /* "uvloop/cbhandles.pyx":47
  51935. * return
  51936. *
  51937. * cb_type = self.cb_type # <<<<<<<<<<<<<<
  51938. *
  51939. * # Since _run is a cdef and there's no BoundMethod,
  51940. */
  51941. __pyx_t_2 = __pyx_v_self->cb_type;
  51942. __pyx_v_cb_type = __pyx_t_2;
  51943. /* "uvloop/cbhandles.pyx":52
  51944. * # we guard 'self' manually (since the callback
  51945. * # might cause GC of the handle.)
  51946. * Py_INCREF(self) # <<<<<<<<<<<<<<
  51947. *
  51948. * try:
  51949. */
  51950. Py_INCREF(((PyObject *)__pyx_v_self));
  51951. /* "uvloop/cbhandles.pyx":54
  51952. * Py_INCREF(self)
  51953. *
  51954. * try: # <<<<<<<<<<<<<<
  51955. * if PY37:
  51956. * assert self.context is not None
  51957. */
  51958. /*try:*/ {
  51959. {
  51960. __Pyx_PyThreadState_declare
  51961. __Pyx_PyThreadState_assign
  51962. __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
  51963. __Pyx_XGOTREF(__pyx_t_3);
  51964. __Pyx_XGOTREF(__pyx_t_4);
  51965. __Pyx_XGOTREF(__pyx_t_5);
  51966. /*try:*/ {
  51967. /* "uvloop/cbhandles.pyx":55
  51968. *
  51969. * try:
  51970. * if PY37: # <<<<<<<<<<<<<<
  51971. * assert self.context is not None
  51972. * Context_Enter(self.context)
  51973. */
  51974. __pyx_t_1 = (__pyx_v_6uvloop_4loop_PY37 != 0);
  51975. if (__pyx_t_1) {
  51976. /* "uvloop/cbhandles.pyx":56
  51977. * try:
  51978. * if PY37:
  51979. * assert self.context is not None # <<<<<<<<<<<<<<
  51980. * Context_Enter(self.context)
  51981. *
  51982. */
  51983. #ifndef CYTHON_WITHOUT_ASSERTIONS
  51984. if (unlikely(!Py_OptimizeFlag)) {
  51985. __pyx_t_1 = (__pyx_v_self->context != Py_None);
  51986. if (unlikely(!(__pyx_t_1 != 0))) {
  51987. PyErr_SetNone(PyExc_AssertionError);
  51988. __PYX_ERR(3, 56, __pyx_L7_error)
  51989. }
  51990. }
  51991. #endif
  51992. /* "uvloop/cbhandles.pyx":57
  51993. * if PY37:
  51994. * assert self.context is not None
  51995. * Context_Enter(self.context) # <<<<<<<<<<<<<<
  51996. *
  51997. * if cb_type == 1:
  51998. */
  51999. __pyx_t_6 = __pyx_v_self->context;
  52000. __Pyx_INCREF(__pyx_t_6);
  52001. __pyx_t_2 = Context_Enter(__pyx_t_6); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(3, 57, __pyx_L7_error)
  52002. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  52003. /* "uvloop/cbhandles.pyx":55
  52004. *
  52005. * try:
  52006. * if PY37: # <<<<<<<<<<<<<<
  52007. * assert self.context is not None
  52008. * Context_Enter(self.context)
  52009. */
  52010. }
  52011. /* "uvloop/cbhandles.pyx":59
  52012. * Context_Enter(self.context)
  52013. *
  52014. * if cb_type == 1: # <<<<<<<<<<<<<<
  52015. * callback = self.arg1
  52016. * if callback is None:
  52017. */
  52018. switch (__pyx_v_cb_type) {
  52019. case 1:
  52020. /* "uvloop/cbhandles.pyx":60
  52021. *
  52022. * if cb_type == 1:
  52023. * callback = self.arg1 # <<<<<<<<<<<<<<
  52024. * if callback is None:
  52025. * raise RuntimeError(
  52026. */
  52027. __pyx_t_6 = __pyx_v_self->arg1;
  52028. __Pyx_INCREF(__pyx_t_6);
  52029. __pyx_v_callback = __pyx_t_6;
  52030. __pyx_t_6 = 0;
  52031. /* "uvloop/cbhandles.pyx":61
  52032. * if cb_type == 1:
  52033. * callback = self.arg1
  52034. * if callback is None: # <<<<<<<<<<<<<<
  52035. * raise RuntimeError(
  52036. * 'cannot run Handle; callback is not set')
  52037. */
  52038. __pyx_t_1 = (__pyx_v_callback == Py_None);
  52039. __pyx_t_7 = (__pyx_t_1 != 0);
  52040. if (unlikely(__pyx_t_7)) {
  52041. /* "uvloop/cbhandles.pyx":62
  52042. * callback = self.arg1
  52043. * if callback is None:
  52044. * raise RuntimeError( # <<<<<<<<<<<<<<
  52045. * 'cannot run Handle; callback is not set')
  52046. *
  52047. */
  52048. __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__87, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 62, __pyx_L7_error)
  52049. __Pyx_GOTREF(__pyx_t_6);
  52050. __Pyx_Raise(__pyx_t_6, 0, 0, 0);
  52051. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  52052. __PYX_ERR(3, 62, __pyx_L7_error)
  52053. /* "uvloop/cbhandles.pyx":61
  52054. * if cb_type == 1:
  52055. * callback = self.arg1
  52056. * if callback is None: # <<<<<<<<<<<<<<
  52057. * raise RuntimeError(
  52058. * 'cannot run Handle; callback is not set')
  52059. */
  52060. }
  52061. /* "uvloop/cbhandles.pyx":65
  52062. * 'cannot run Handle; callback is not set')
  52063. *
  52064. * args = self.arg2 # <<<<<<<<<<<<<<
  52065. *
  52066. * if args is None:
  52067. */
  52068. __pyx_t_6 = __pyx_v_self->arg2;
  52069. __Pyx_INCREF(__pyx_t_6);
  52070. __pyx_v_args = __pyx_t_6;
  52071. __pyx_t_6 = 0;
  52072. /* "uvloop/cbhandles.pyx":67
  52073. * args = self.arg2
  52074. *
  52075. * if args is None: # <<<<<<<<<<<<<<
  52076. * callback()
  52077. * else:
  52078. */
  52079. __pyx_t_7 = (__pyx_v_args == Py_None);
  52080. __pyx_t_1 = (__pyx_t_7 != 0);
  52081. if (__pyx_t_1) {
  52082. /* "uvloop/cbhandles.pyx":68
  52083. *
  52084. * if args is None:
  52085. * callback() # <<<<<<<<<<<<<<
  52086. * else:
  52087. * callback(*args)
  52088. */
  52089. __Pyx_INCREF(__pyx_v_callback);
  52090. __pyx_t_8 = __pyx_v_callback; __pyx_t_9 = NULL;
  52091. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
  52092. __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
  52093. if (likely(__pyx_t_9)) {
  52094. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
  52095. __Pyx_INCREF(__pyx_t_9);
  52096. __Pyx_INCREF(function);
  52097. __Pyx_DECREF_SET(__pyx_t_8, function);
  52098. }
  52099. }
  52100. __pyx_t_6 = (__pyx_t_9) ? __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_9) : __Pyx_PyObject_CallNoArg(__pyx_t_8);
  52101. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  52102. if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 68, __pyx_L7_error)
  52103. __Pyx_GOTREF(__pyx_t_6);
  52104. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  52105. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  52106. /* "uvloop/cbhandles.pyx":67
  52107. * args = self.arg2
  52108. *
  52109. * if args is None: # <<<<<<<<<<<<<<
  52110. * callback()
  52111. * else:
  52112. */
  52113. goto __pyx_L15;
  52114. }
  52115. /* "uvloop/cbhandles.pyx":70
  52116. * callback()
  52117. * else:
  52118. * callback(*args) # <<<<<<<<<<<<<<
  52119. *
  52120. * elif cb_type == 2:
  52121. */
  52122. /*else*/ {
  52123. __pyx_t_6 = __Pyx_PySequence_Tuple(__pyx_v_args); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 70, __pyx_L7_error)
  52124. __Pyx_GOTREF(__pyx_t_6);
  52125. __pyx_t_8 = __Pyx_PyObject_Call(__pyx_v_callback, __pyx_t_6, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 70, __pyx_L7_error)
  52126. __Pyx_GOTREF(__pyx_t_8);
  52127. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  52128. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  52129. }
  52130. __pyx_L15:;
  52131. /* "uvloop/cbhandles.pyx":59
  52132. * Context_Enter(self.context)
  52133. *
  52134. * if cb_type == 1: # <<<<<<<<<<<<<<
  52135. * callback = self.arg1
  52136. * if callback is None:
  52137. */
  52138. break;
  52139. case 2:
  52140. /* "uvloop/cbhandles.pyx":73
  52141. *
  52142. * elif cb_type == 2:
  52143. * (<method_t>self.callback)(self.arg1) # <<<<<<<<<<<<<<
  52144. *
  52145. * elif cb_type == 3:
  52146. */
  52147. __pyx_t_8 = __pyx_v_self->arg1;
  52148. __Pyx_INCREF(__pyx_t_8);
  52149. __pyx_t_6 = ((__pyx_t_6uvloop_4loop_method_t)__pyx_v_self->callback)(__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 73, __pyx_L7_error)
  52150. __Pyx_GOTREF(__pyx_t_6);
  52151. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  52152. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  52153. /* "uvloop/cbhandles.pyx":72
  52154. * callback(*args)
  52155. *
  52156. * elif cb_type == 2: # <<<<<<<<<<<<<<
  52157. * (<method_t>self.callback)(self.arg1)
  52158. *
  52159. */
  52160. break;
  52161. case 3:
  52162. /* "uvloop/cbhandles.pyx":76
  52163. *
  52164. * elif cb_type == 3:
  52165. * (<method1_t>self.callback)(self.arg1, self.arg2) # <<<<<<<<<<<<<<
  52166. *
  52167. * elif cb_type == 4:
  52168. */
  52169. __pyx_t_6 = __pyx_v_self->arg1;
  52170. __Pyx_INCREF(__pyx_t_6);
  52171. __pyx_t_8 = __pyx_v_self->arg2;
  52172. __Pyx_INCREF(__pyx_t_8);
  52173. __pyx_t_9 = ((__pyx_t_6uvloop_4loop_method1_t)__pyx_v_self->callback)(__pyx_t_6, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 76, __pyx_L7_error)
  52174. __Pyx_GOTREF(__pyx_t_9);
  52175. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  52176. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  52177. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  52178. /* "uvloop/cbhandles.pyx":75
  52179. * (<method_t>self.callback)(self.arg1)
  52180. *
  52181. * elif cb_type == 3: # <<<<<<<<<<<<<<
  52182. * (<method1_t>self.callback)(self.arg1, self.arg2)
  52183. *
  52184. */
  52185. break;
  52186. case 4:
  52187. /* "uvloop/cbhandles.pyx":79
  52188. *
  52189. * elif cb_type == 4:
  52190. * (<method2_t>self.callback)(self.arg1, self.arg2, self.arg3) # <<<<<<<<<<<<<<
  52191. *
  52192. * elif cb_type == 5:
  52193. */
  52194. __pyx_t_9 = __pyx_v_self->arg1;
  52195. __Pyx_INCREF(__pyx_t_9);
  52196. __pyx_t_8 = __pyx_v_self->arg2;
  52197. __Pyx_INCREF(__pyx_t_8);
  52198. __pyx_t_6 = __pyx_v_self->arg3;
  52199. __Pyx_INCREF(__pyx_t_6);
  52200. __pyx_t_10 = ((__pyx_t_6uvloop_4loop_method2_t)__pyx_v_self->callback)(__pyx_t_9, __pyx_t_8, __pyx_t_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 79, __pyx_L7_error)
  52201. __Pyx_GOTREF(__pyx_t_10);
  52202. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  52203. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  52204. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  52205. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  52206. /* "uvloop/cbhandles.pyx":78
  52207. * (<method1_t>self.callback)(self.arg1, self.arg2)
  52208. *
  52209. * elif cb_type == 4: # <<<<<<<<<<<<<<
  52210. * (<method2_t>self.callback)(self.arg1, self.arg2, self.arg3)
  52211. *
  52212. */
  52213. break;
  52214. case 5:
  52215. /* "uvloop/cbhandles.pyx":83
  52216. * elif cb_type == 5:
  52217. * (<method3_t>self.callback)(
  52218. * self.arg1, self.arg2, self.arg3, self.arg4) # <<<<<<<<<<<<<<
  52219. *
  52220. * else:
  52221. */
  52222. __pyx_t_10 = __pyx_v_self->arg1;
  52223. __Pyx_INCREF(__pyx_t_10);
  52224. __pyx_t_6 = __pyx_v_self->arg2;
  52225. __Pyx_INCREF(__pyx_t_6);
  52226. __pyx_t_8 = __pyx_v_self->arg3;
  52227. __Pyx_INCREF(__pyx_t_8);
  52228. __pyx_t_9 = __pyx_v_self->arg4;
  52229. __Pyx_INCREF(__pyx_t_9);
  52230. /* "uvloop/cbhandles.pyx":82
  52231. *
  52232. * elif cb_type == 5:
  52233. * (<method3_t>self.callback)( # <<<<<<<<<<<<<<
  52234. * self.arg1, self.arg2, self.arg3, self.arg4)
  52235. *
  52236. */
  52237. __pyx_t_11 = ((__pyx_t_6uvloop_4loop_method3_t)__pyx_v_self->callback)(__pyx_t_10, __pyx_t_6, __pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 82, __pyx_L7_error)
  52238. __Pyx_GOTREF(__pyx_t_11);
  52239. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  52240. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  52241. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  52242. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  52243. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  52244. /* "uvloop/cbhandles.pyx":81
  52245. * (<method2_t>self.callback)(self.arg1, self.arg2, self.arg3)
  52246. *
  52247. * elif cb_type == 5: # <<<<<<<<<<<<<<
  52248. * (<method3_t>self.callback)(
  52249. * self.arg1, self.arg2, self.arg3, self.arg4)
  52250. */
  52251. break;
  52252. default:
  52253. /* "uvloop/cbhandles.pyx":86
  52254. *
  52255. * else:
  52256. * raise RuntimeError('invalid Handle.cb_type: {}'.format( # <<<<<<<<<<<<<<
  52257. * cb_type))
  52258. *
  52259. */
  52260. __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_invalid_Handle_cb_type, __pyx_n_s_format); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 86, __pyx_L7_error)
  52261. __Pyx_GOTREF(__pyx_t_9);
  52262. /* "uvloop/cbhandles.pyx":87
  52263. * else:
  52264. * raise RuntimeError('invalid Handle.cb_type: {}'.format(
  52265. * cb_type)) # <<<<<<<<<<<<<<
  52266. *
  52267. * except Exception as ex:
  52268. */
  52269. __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_cb_type); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 87, __pyx_L7_error)
  52270. __Pyx_GOTREF(__pyx_t_8);
  52271. __pyx_t_6 = NULL;
  52272. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
  52273. __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_9);
  52274. if (likely(__pyx_t_6)) {
  52275. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
  52276. __Pyx_INCREF(__pyx_t_6);
  52277. __Pyx_INCREF(function);
  52278. __Pyx_DECREF_SET(__pyx_t_9, function);
  52279. }
  52280. }
  52281. __pyx_t_11 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_6, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_8);
  52282. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  52283. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  52284. if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 86, __pyx_L7_error)
  52285. __Pyx_GOTREF(__pyx_t_11);
  52286. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  52287. /* "uvloop/cbhandles.pyx":86
  52288. *
  52289. * else:
  52290. * raise RuntimeError('invalid Handle.cb_type: {}'.format( # <<<<<<<<<<<<<<
  52291. * cb_type))
  52292. *
  52293. */
  52294. __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_11); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 86, __pyx_L7_error)
  52295. __Pyx_GOTREF(__pyx_t_9);
  52296. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  52297. __Pyx_Raise(__pyx_t_9, 0, 0, 0);
  52298. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  52299. __PYX_ERR(3, 86, __pyx_L7_error)
  52300. break;
  52301. }
  52302. /* "uvloop/cbhandles.pyx":54
  52303. * Py_INCREF(self)
  52304. *
  52305. * try: # <<<<<<<<<<<<<<
  52306. * if PY37:
  52307. * assert self.context is not None
  52308. */
  52309. }
  52310. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  52311. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  52312. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  52313. goto __pyx_L12_try_end;
  52314. __pyx_L7_error:;
  52315. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  52316. __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
  52317. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  52318. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  52319. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  52320. /* "uvloop/cbhandles.pyx":89
  52321. * cb_type))
  52322. *
  52323. * except Exception as ex: # <<<<<<<<<<<<<<
  52324. * if cb_type == 1:
  52325. * msg = 'Exception in callback {}'.format(callback)
  52326. */
  52327. __pyx_t_2 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
  52328. if (__pyx_t_2) {
  52329. __Pyx_AddTraceback("uvloop.loop.Handle._run", __pyx_clineno, __pyx_lineno, __pyx_filename);
  52330. if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_11, &__pyx_t_8) < 0) __PYX_ERR(3, 89, __pyx_L9_except_error)
  52331. __Pyx_GOTREF(__pyx_t_9);
  52332. __Pyx_GOTREF(__pyx_t_11);
  52333. __Pyx_GOTREF(__pyx_t_8);
  52334. __Pyx_INCREF(__pyx_t_11);
  52335. __pyx_v_ex = __pyx_t_11;
  52336. /*try:*/ {
  52337. /* "uvloop/cbhandles.pyx":90
  52338. *
  52339. * except Exception as ex:
  52340. * if cb_type == 1: # <<<<<<<<<<<<<<
  52341. * msg = 'Exception in callback {}'.format(callback)
  52342. * else:
  52343. */
  52344. __pyx_t_1 = ((__pyx_v_cb_type == 1) != 0);
  52345. if (__pyx_t_1) {
  52346. /* "uvloop/cbhandles.pyx":91
  52347. * except Exception as ex:
  52348. * if cb_type == 1:
  52349. * msg = 'Exception in callback {}'.format(callback) # <<<<<<<<<<<<<<
  52350. * else:
  52351. * msg = 'Exception in callback {}'.format(self.meth_name)
  52352. */
  52353. __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Exception_in_callback, __pyx_n_s_format); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 91, __pyx_L21_error)
  52354. __Pyx_GOTREF(__pyx_t_10);
  52355. if (unlikely(!__pyx_v_callback)) { __Pyx_RaiseUnboundLocalError("callback"); __PYX_ERR(3, 91, __pyx_L21_error) }
  52356. __pyx_t_12 = NULL;
  52357. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) {
  52358. __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
  52359. if (likely(__pyx_t_12)) {
  52360. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
  52361. __Pyx_INCREF(__pyx_t_12);
  52362. __Pyx_INCREF(function);
  52363. __Pyx_DECREF_SET(__pyx_t_10, function);
  52364. }
  52365. }
  52366. __pyx_t_6 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_10, __pyx_t_12, __pyx_v_callback) : __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_v_callback);
  52367. __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
  52368. if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 91, __pyx_L21_error)
  52369. __Pyx_GOTREF(__pyx_t_6);
  52370. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  52371. __pyx_v_msg = __pyx_t_6;
  52372. __pyx_t_6 = 0;
  52373. /* "uvloop/cbhandles.pyx":90
  52374. *
  52375. * except Exception as ex:
  52376. * if cb_type == 1: # <<<<<<<<<<<<<<
  52377. * msg = 'Exception in callback {}'.format(callback)
  52378. * else:
  52379. */
  52380. goto __pyx_L23;
  52381. }
  52382. /* "uvloop/cbhandles.pyx":93
  52383. * msg = 'Exception in callback {}'.format(callback)
  52384. * else:
  52385. * msg = 'Exception in callback {}'.format(self.meth_name) # <<<<<<<<<<<<<<
  52386. *
  52387. * context = {
  52388. */
  52389. /*else*/ {
  52390. __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Exception_in_callback, __pyx_n_s_format); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 93, __pyx_L21_error)
  52391. __Pyx_GOTREF(__pyx_t_10);
  52392. __pyx_t_12 = NULL;
  52393. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) {
  52394. __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
  52395. if (likely(__pyx_t_12)) {
  52396. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
  52397. __Pyx_INCREF(__pyx_t_12);
  52398. __Pyx_INCREF(function);
  52399. __Pyx_DECREF_SET(__pyx_t_10, function);
  52400. }
  52401. }
  52402. __pyx_t_6 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_10, __pyx_t_12, __pyx_v_self->meth_name) : __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_v_self->meth_name);
  52403. __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
  52404. if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 93, __pyx_L21_error)
  52405. __Pyx_GOTREF(__pyx_t_6);
  52406. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  52407. __pyx_v_msg = __pyx_t_6;
  52408. __pyx_t_6 = 0;
  52409. }
  52410. __pyx_L23:;
  52411. /* "uvloop/cbhandles.pyx":96
  52412. *
  52413. * context = {
  52414. * 'message': msg, # <<<<<<<<<<<<<<
  52415. * 'exception': ex,
  52416. * 'handle': self,
  52417. */
  52418. __pyx_t_6 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 96, __pyx_L21_error)
  52419. __Pyx_GOTREF(__pyx_t_6);
  52420. if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_message, __pyx_v_msg) < 0) __PYX_ERR(3, 96, __pyx_L21_error)
  52421. /* "uvloop/cbhandles.pyx":97
  52422. * context = {
  52423. * 'message': msg,
  52424. * 'exception': ex, # <<<<<<<<<<<<<<
  52425. * 'handle': self,
  52426. * }
  52427. */
  52428. if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_exception, __pyx_v_ex) < 0) __PYX_ERR(3, 96, __pyx_L21_error)
  52429. /* "uvloop/cbhandles.pyx":98
  52430. * 'message': msg,
  52431. * 'exception': ex,
  52432. * 'handle': self, # <<<<<<<<<<<<<<
  52433. * }
  52434. *
  52435. */
  52436. if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_handle, ((PyObject *)__pyx_v_self)) < 0) __PYX_ERR(3, 96, __pyx_L21_error)
  52437. __pyx_v_context = __pyx_t_6;
  52438. __pyx_t_6 = 0;
  52439. /* "uvloop/cbhandles.pyx":101
  52440. * }
  52441. *
  52442. * if self._source_traceback is not None: # <<<<<<<<<<<<<<
  52443. * context['source_traceback'] = self._source_traceback
  52444. *
  52445. */
  52446. __pyx_t_1 = (__pyx_v_self->_source_traceback != Py_None);
  52447. __pyx_t_7 = (__pyx_t_1 != 0);
  52448. if (__pyx_t_7) {
  52449. /* "uvloop/cbhandles.pyx":102
  52450. *
  52451. * if self._source_traceback is not None:
  52452. * context['source_traceback'] = self._source_traceback # <<<<<<<<<<<<<<
  52453. *
  52454. * self.loop.call_exception_handler(context)
  52455. */
  52456. __pyx_t_6 = __pyx_v_self->_source_traceback;
  52457. __Pyx_INCREF(__pyx_t_6);
  52458. if (unlikely(PyObject_SetItem(__pyx_v_context, __pyx_n_u_source_traceback, __pyx_t_6) < 0)) __PYX_ERR(3, 102, __pyx_L21_error)
  52459. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  52460. /* "uvloop/cbhandles.pyx":101
  52461. * }
  52462. *
  52463. * if self._source_traceback is not None: # <<<<<<<<<<<<<<
  52464. * context['source_traceback'] = self._source_traceback
  52465. *
  52466. */
  52467. }
  52468. /* "uvloop/cbhandles.pyx":104
  52469. * context['source_traceback'] = self._source_traceback
  52470. *
  52471. * self.loop.call_exception_handler(context) # <<<<<<<<<<<<<<
  52472. *
  52473. * finally:
  52474. */
  52475. __pyx_t_10 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->loop), __pyx_n_s_call_exception_handler); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 104, __pyx_L21_error)
  52476. __Pyx_GOTREF(__pyx_t_10);
  52477. __pyx_t_12 = NULL;
  52478. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) {
  52479. __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
  52480. if (likely(__pyx_t_12)) {
  52481. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
  52482. __Pyx_INCREF(__pyx_t_12);
  52483. __Pyx_INCREF(function);
  52484. __Pyx_DECREF_SET(__pyx_t_10, function);
  52485. }
  52486. }
  52487. __pyx_t_6 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_10, __pyx_t_12, __pyx_v_context) : __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_v_context);
  52488. __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
  52489. if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 104, __pyx_L21_error)
  52490. __Pyx_GOTREF(__pyx_t_6);
  52491. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  52492. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  52493. }
  52494. /* "uvloop/cbhandles.pyx":89
  52495. * cb_type))
  52496. *
  52497. * except Exception as ex: # <<<<<<<<<<<<<<
  52498. * if cb_type == 1:
  52499. * msg = 'Exception in callback {}'.format(callback)
  52500. */
  52501. /*finally:*/ {
  52502. /*normal exit:*/{
  52503. __Pyx_DECREF(__pyx_v_ex);
  52504. __pyx_v_ex = NULL;
  52505. goto __pyx_L22;
  52506. }
  52507. __pyx_L21_error:;
  52508. /*exception exit:*/{
  52509. __Pyx_PyThreadState_declare
  52510. __Pyx_PyThreadState_assign
  52511. __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0;
  52512. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  52513. __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
  52514. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  52515. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20);
  52516. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17) < 0)) __Pyx_ErrFetch(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17);
  52517. __Pyx_XGOTREF(__pyx_t_15);
  52518. __Pyx_XGOTREF(__pyx_t_16);
  52519. __Pyx_XGOTREF(__pyx_t_17);
  52520. __Pyx_XGOTREF(__pyx_t_18);
  52521. __Pyx_XGOTREF(__pyx_t_19);
  52522. __Pyx_XGOTREF(__pyx_t_20);
  52523. __pyx_t_2 = __pyx_lineno; __pyx_t_13 = __pyx_clineno; __pyx_t_14 = __pyx_filename;
  52524. {
  52525. __Pyx_DECREF(__pyx_v_ex);
  52526. __pyx_v_ex = NULL;
  52527. }
  52528. if (PY_MAJOR_VERSION >= 3) {
  52529. __Pyx_XGIVEREF(__pyx_t_18);
  52530. __Pyx_XGIVEREF(__pyx_t_19);
  52531. __Pyx_XGIVEREF(__pyx_t_20);
  52532. __Pyx_ExceptionReset(__pyx_t_18, __pyx_t_19, __pyx_t_20);
  52533. }
  52534. __Pyx_XGIVEREF(__pyx_t_15);
  52535. __Pyx_XGIVEREF(__pyx_t_16);
  52536. __Pyx_XGIVEREF(__pyx_t_17);
  52537. __Pyx_ErrRestore(__pyx_t_15, __pyx_t_16, __pyx_t_17);
  52538. __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0;
  52539. __pyx_lineno = __pyx_t_2; __pyx_clineno = __pyx_t_13; __pyx_filename = __pyx_t_14;
  52540. goto __pyx_L9_except_error;
  52541. }
  52542. __pyx_L22:;
  52543. }
  52544. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  52545. __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
  52546. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  52547. goto __pyx_L8_exception_handled;
  52548. }
  52549. goto __pyx_L9_except_error;
  52550. __pyx_L9_except_error:;
  52551. /* "uvloop/cbhandles.pyx":54
  52552. * Py_INCREF(self)
  52553. *
  52554. * try: # <<<<<<<<<<<<<<
  52555. * if PY37:
  52556. * assert self.context is not None
  52557. */
  52558. __Pyx_XGIVEREF(__pyx_t_3);
  52559. __Pyx_XGIVEREF(__pyx_t_4);
  52560. __Pyx_XGIVEREF(__pyx_t_5);
  52561. __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
  52562. goto __pyx_L5_error;
  52563. __pyx_L8_exception_handled:;
  52564. __Pyx_XGIVEREF(__pyx_t_3);
  52565. __Pyx_XGIVEREF(__pyx_t_4);
  52566. __Pyx_XGIVEREF(__pyx_t_5);
  52567. __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
  52568. __pyx_L12_try_end:;
  52569. }
  52570. }
  52571. /* "uvloop/cbhandles.pyx":107
  52572. *
  52573. * finally:
  52574. * context = self.context # <<<<<<<<<<<<<<
  52575. * Py_DECREF(self)
  52576. * if PY37:
  52577. */
  52578. /*finally:*/ {
  52579. /*normal exit:*/{
  52580. __pyx_t_8 = __pyx_v_self->context;
  52581. __Pyx_INCREF(__pyx_t_8);
  52582. __Pyx_XDECREF_SET(__pyx_v_context, __pyx_t_8);
  52583. __pyx_t_8 = 0;
  52584. /* "uvloop/cbhandles.pyx":108
  52585. * finally:
  52586. * context = self.context
  52587. * Py_DECREF(self) # <<<<<<<<<<<<<<
  52588. * if PY37:
  52589. * Context_Exit(context)
  52590. */
  52591. Py_DECREF(((PyObject *)__pyx_v_self));
  52592. /* "uvloop/cbhandles.pyx":109
  52593. * context = self.context
  52594. * Py_DECREF(self)
  52595. * if PY37: # <<<<<<<<<<<<<<
  52596. * Context_Exit(context)
  52597. *
  52598. */
  52599. __pyx_t_7 = (__pyx_v_6uvloop_4loop_PY37 != 0);
  52600. if (__pyx_t_7) {
  52601. /* "uvloop/cbhandles.pyx":110
  52602. * Py_DECREF(self)
  52603. * if PY37:
  52604. * Context_Exit(context) # <<<<<<<<<<<<<<
  52605. *
  52606. * cdef _cancel(self):
  52607. */
  52608. __pyx_t_13 = Context_Exit(__pyx_v_context); if (unlikely(__pyx_t_13 == ((int)-1))) __PYX_ERR(3, 110, __pyx_L1_error)
  52609. /* "uvloop/cbhandles.pyx":109
  52610. * context = self.context
  52611. * Py_DECREF(self)
  52612. * if PY37: # <<<<<<<<<<<<<<
  52613. * Context_Exit(context)
  52614. *
  52615. */
  52616. }
  52617. goto __pyx_L6;
  52618. }
  52619. __pyx_L5_error:;
  52620. /*exception exit:*/{
  52621. __Pyx_PyThreadState_declare
  52622. __Pyx_PyThreadState_assign
  52623. __pyx_t_5 = 0; __pyx_t_4 = 0; __pyx_t_3 = 0; __pyx_t_20 = 0; __pyx_t_19 = 0; __pyx_t_18 = 0;
  52624. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  52625. __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
  52626. __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
  52627. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  52628. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  52629. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  52630. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_20, &__pyx_t_19, &__pyx_t_18);
  52631. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_3) < 0)) __Pyx_ErrFetch(&__pyx_t_5, &__pyx_t_4, &__pyx_t_3);
  52632. __Pyx_XGOTREF(__pyx_t_5);
  52633. __Pyx_XGOTREF(__pyx_t_4);
  52634. __Pyx_XGOTREF(__pyx_t_3);
  52635. __Pyx_XGOTREF(__pyx_t_20);
  52636. __Pyx_XGOTREF(__pyx_t_19);
  52637. __Pyx_XGOTREF(__pyx_t_18);
  52638. __pyx_t_13 = __pyx_lineno; __pyx_t_2 = __pyx_clineno; __pyx_t_21 = __pyx_filename;
  52639. {
  52640. /* "uvloop/cbhandles.pyx":107
  52641. *
  52642. * finally:
  52643. * context = self.context # <<<<<<<<<<<<<<
  52644. * Py_DECREF(self)
  52645. * if PY37:
  52646. */
  52647. __pyx_t_8 = __pyx_v_self->context;
  52648. __Pyx_INCREF(__pyx_t_8);
  52649. __Pyx_XDECREF_SET(__pyx_v_context, __pyx_t_8);
  52650. __pyx_t_8 = 0;
  52651. /* "uvloop/cbhandles.pyx":108
  52652. * finally:
  52653. * context = self.context
  52654. * Py_DECREF(self) # <<<<<<<<<<<<<<
  52655. * if PY37:
  52656. * Context_Exit(context)
  52657. */
  52658. Py_DECREF(((PyObject *)__pyx_v_self));
  52659. /* "uvloop/cbhandles.pyx":109
  52660. * context = self.context
  52661. * Py_DECREF(self)
  52662. * if PY37: # <<<<<<<<<<<<<<
  52663. * Context_Exit(context)
  52664. *
  52665. */
  52666. __pyx_t_7 = (__pyx_v_6uvloop_4loop_PY37 != 0);
  52667. if (__pyx_t_7) {
  52668. /* "uvloop/cbhandles.pyx":110
  52669. * Py_DECREF(self)
  52670. * if PY37:
  52671. * Context_Exit(context) # <<<<<<<<<<<<<<
  52672. *
  52673. * cdef _cancel(self):
  52674. */
  52675. __pyx_t_22 = Context_Exit(__pyx_v_context); if (unlikely(__pyx_t_22 == ((int)-1))) __PYX_ERR(3, 110, __pyx_L31_error)
  52676. /* "uvloop/cbhandles.pyx":109
  52677. * context = self.context
  52678. * Py_DECREF(self)
  52679. * if PY37: # <<<<<<<<<<<<<<
  52680. * Context_Exit(context)
  52681. *
  52682. */
  52683. }
  52684. }
  52685. if (PY_MAJOR_VERSION >= 3) {
  52686. __Pyx_XGIVEREF(__pyx_t_20);
  52687. __Pyx_XGIVEREF(__pyx_t_19);
  52688. __Pyx_XGIVEREF(__pyx_t_18);
  52689. __Pyx_ExceptionReset(__pyx_t_20, __pyx_t_19, __pyx_t_18);
  52690. }
  52691. __Pyx_XGIVEREF(__pyx_t_5);
  52692. __Pyx_XGIVEREF(__pyx_t_4);
  52693. __Pyx_XGIVEREF(__pyx_t_3);
  52694. __Pyx_ErrRestore(__pyx_t_5, __pyx_t_4, __pyx_t_3);
  52695. __pyx_t_5 = 0; __pyx_t_4 = 0; __pyx_t_3 = 0; __pyx_t_20 = 0; __pyx_t_19 = 0; __pyx_t_18 = 0;
  52696. __pyx_lineno = __pyx_t_13; __pyx_clineno = __pyx_t_2; __pyx_filename = __pyx_t_21;
  52697. goto __pyx_L1_error;
  52698. __pyx_L31_error:;
  52699. if (PY_MAJOR_VERSION >= 3) {
  52700. __Pyx_XGIVEREF(__pyx_t_20);
  52701. __Pyx_XGIVEREF(__pyx_t_19);
  52702. __Pyx_XGIVEREF(__pyx_t_18);
  52703. __Pyx_ExceptionReset(__pyx_t_20, __pyx_t_19, __pyx_t_18);
  52704. }
  52705. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  52706. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  52707. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  52708. __pyx_t_20 = 0; __pyx_t_19 = 0; __pyx_t_18 = 0;
  52709. goto __pyx_L1_error;
  52710. }
  52711. __pyx_L6:;
  52712. }
  52713. /* "uvloop/cbhandles.pyx":39
  52714. * self.__class__.__name__))
  52715. *
  52716. * cdef inline _run(self): # <<<<<<<<<<<<<<
  52717. * cdef:
  52718. * int cb_type
  52719. */
  52720. /* function exit code */
  52721. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  52722. goto __pyx_L0;
  52723. __pyx_L1_error:;
  52724. __Pyx_XDECREF(__pyx_t_6);
  52725. __Pyx_XDECREF(__pyx_t_8);
  52726. __Pyx_XDECREF(__pyx_t_9);
  52727. __Pyx_XDECREF(__pyx_t_10);
  52728. __Pyx_XDECREF(__pyx_t_11);
  52729. __Pyx_XDECREF(__pyx_t_12);
  52730. __Pyx_AddTraceback("uvloop.loop.Handle._run", __pyx_clineno, __pyx_lineno, __pyx_filename);
  52731. __pyx_r = 0;
  52732. __pyx_L0:;
  52733. __Pyx_XDECREF(__pyx_v_callback);
  52734. __Pyx_XDECREF(__pyx_v_args);
  52735. __Pyx_XDECREF(__pyx_v_ex);
  52736. __Pyx_XDECREF(__pyx_v_msg);
  52737. __Pyx_XDECREF(__pyx_v_context);
  52738. __Pyx_XGIVEREF(__pyx_r);
  52739. __Pyx_RefNannyFinishContext();
  52740. return __pyx_r;
  52741. }
  52742. /* "uvloop/cbhandles.pyx":112
  52743. * Context_Exit(context)
  52744. *
  52745. * cdef _cancel(self): # <<<<<<<<<<<<<<
  52746. * self._cancelled = 1
  52747. * self.callback = NULL
  52748. */
  52749. static PyObject *__pyx_f_6uvloop_4loop_6Handle__cancel(struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_self) {
  52750. PyObject *__pyx_r = NULL;
  52751. __Pyx_RefNannyDeclarations
  52752. __Pyx_RefNannySetupContext("_cancel", 0);
  52753. /* "uvloop/cbhandles.pyx":113
  52754. *
  52755. * cdef _cancel(self):
  52756. * self._cancelled = 1 # <<<<<<<<<<<<<<
  52757. * self.callback = NULL
  52758. * self.arg1 = self.arg2 = self.arg3 = self.arg4 = None
  52759. */
  52760. __pyx_v_self->_cancelled = 1;
  52761. /* "uvloop/cbhandles.pyx":114
  52762. * cdef _cancel(self):
  52763. * self._cancelled = 1
  52764. * self.callback = NULL # <<<<<<<<<<<<<<
  52765. * self.arg1 = self.arg2 = self.arg3 = self.arg4 = None
  52766. *
  52767. */
  52768. __pyx_v_self->callback = NULL;
  52769. /* "uvloop/cbhandles.pyx":115
  52770. * self._cancelled = 1
  52771. * self.callback = NULL
  52772. * self.arg1 = self.arg2 = self.arg3 = self.arg4 = None # <<<<<<<<<<<<<<
  52773. *
  52774. * cdef _format_handle(self):
  52775. */
  52776. __Pyx_INCREF(Py_None);
  52777. __Pyx_GIVEREF(Py_None);
  52778. __Pyx_GOTREF(__pyx_v_self->arg1);
  52779. __Pyx_DECREF(__pyx_v_self->arg1);
  52780. __pyx_v_self->arg1 = Py_None;
  52781. __Pyx_INCREF(Py_None);
  52782. __Pyx_GIVEREF(Py_None);
  52783. __Pyx_GOTREF(__pyx_v_self->arg2);
  52784. __Pyx_DECREF(__pyx_v_self->arg2);
  52785. __pyx_v_self->arg2 = Py_None;
  52786. __Pyx_INCREF(Py_None);
  52787. __Pyx_GIVEREF(Py_None);
  52788. __Pyx_GOTREF(__pyx_v_self->arg3);
  52789. __Pyx_DECREF(__pyx_v_self->arg3);
  52790. __pyx_v_self->arg3 = Py_None;
  52791. __Pyx_INCREF(Py_None);
  52792. __Pyx_GIVEREF(Py_None);
  52793. __Pyx_GOTREF(__pyx_v_self->arg4);
  52794. __Pyx_DECREF(__pyx_v_self->arg4);
  52795. __pyx_v_self->arg4 = Py_None;
  52796. /* "uvloop/cbhandles.pyx":112
  52797. * Context_Exit(context)
  52798. *
  52799. * cdef _cancel(self): # <<<<<<<<<<<<<<
  52800. * self._cancelled = 1
  52801. * self.callback = NULL
  52802. */
  52803. /* function exit code */
  52804. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  52805. __Pyx_XGIVEREF(__pyx_r);
  52806. __Pyx_RefNannyFinishContext();
  52807. return __pyx_r;
  52808. }
  52809. /* "uvloop/cbhandles.pyx":117
  52810. * self.arg1 = self.arg2 = self.arg3 = self.arg4 = None
  52811. *
  52812. * cdef _format_handle(self): # <<<<<<<<<<<<<<
  52813. * # Mirrors `asyncio.base_events._format_handle`.
  52814. * if self.cb_type == 1 and self.arg1 is not None:
  52815. */
  52816. static PyObject *__pyx_f_6uvloop_4loop_6Handle__format_handle(struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_self) {
  52817. PyObject *__pyx_v_cb = NULL;
  52818. PyObject *__pyx_v_ex = NULL;
  52819. PyObject *__pyx_r = NULL;
  52820. __Pyx_RefNannyDeclarations
  52821. int __pyx_t_1;
  52822. int __pyx_t_2;
  52823. int __pyx_t_3;
  52824. PyObject *__pyx_t_4 = NULL;
  52825. PyObject *__pyx_t_5 = NULL;
  52826. PyObject *__pyx_t_6 = NULL;
  52827. PyObject *__pyx_t_7 = NULL;
  52828. PyObject *__pyx_t_8 = NULL;
  52829. int __pyx_t_9;
  52830. PyObject *__pyx_t_10 = NULL;
  52831. PyObject *__pyx_t_11 = NULL;
  52832. PyObject *__pyx_t_12 = NULL;
  52833. PyObject *__pyx_t_13 = NULL;
  52834. PyObject *__pyx_t_14 = NULL;
  52835. int __pyx_t_15;
  52836. char const *__pyx_t_16;
  52837. PyObject *__pyx_t_17 = NULL;
  52838. PyObject *__pyx_t_18 = NULL;
  52839. PyObject *__pyx_t_19 = NULL;
  52840. PyObject *__pyx_t_20 = NULL;
  52841. PyObject *__pyx_t_21 = NULL;
  52842. PyObject *__pyx_t_22 = NULL;
  52843. __Pyx_RefNannySetupContext("_format_handle", 0);
  52844. /* "uvloop/cbhandles.pyx":119
  52845. * cdef _format_handle(self):
  52846. * # Mirrors `asyncio.base_events._format_handle`.
  52847. * if self.cb_type == 1 and self.arg1 is not None: # <<<<<<<<<<<<<<
  52848. * cb = self.arg1
  52849. * if isinstance(getattr(cb, '__self__', None), aio_Task):
  52850. */
  52851. __pyx_t_2 = ((__pyx_v_self->cb_type == 1) != 0);
  52852. if (__pyx_t_2) {
  52853. } else {
  52854. __pyx_t_1 = __pyx_t_2;
  52855. goto __pyx_L4_bool_binop_done;
  52856. }
  52857. __pyx_t_2 = (__pyx_v_self->arg1 != Py_None);
  52858. __pyx_t_3 = (__pyx_t_2 != 0);
  52859. __pyx_t_1 = __pyx_t_3;
  52860. __pyx_L4_bool_binop_done:;
  52861. if (__pyx_t_1) {
  52862. /* "uvloop/cbhandles.pyx":120
  52863. * # Mirrors `asyncio.base_events._format_handle`.
  52864. * if self.cb_type == 1 and self.arg1 is not None:
  52865. * cb = self.arg1 # <<<<<<<<<<<<<<
  52866. * if isinstance(getattr(cb, '__self__', None), aio_Task):
  52867. * try:
  52868. */
  52869. __pyx_t_4 = __pyx_v_self->arg1;
  52870. __Pyx_INCREF(__pyx_t_4);
  52871. __pyx_v_cb = __pyx_t_4;
  52872. __pyx_t_4 = 0;
  52873. /* "uvloop/cbhandles.pyx":121
  52874. * if self.cb_type == 1 and self.arg1 is not None:
  52875. * cb = self.arg1
  52876. * if isinstance(getattr(cb, '__self__', None), aio_Task): # <<<<<<<<<<<<<<
  52877. * try:
  52878. * return repr(cb.__self__)
  52879. */
  52880. __pyx_t_4 = __Pyx_GetAttr3(__pyx_v_cb, __pyx_n_u_self, Py_None); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 121, __pyx_L1_error)
  52881. __Pyx_GOTREF(__pyx_t_4);
  52882. __pyx_t_5 = __pyx_v_6uvloop_4loop_aio_Task;
  52883. __Pyx_INCREF(__pyx_t_5);
  52884. __pyx_t_1 = PyObject_IsInstance(__pyx_t_4, __pyx_t_5); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(3, 121, __pyx_L1_error)
  52885. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  52886. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  52887. __pyx_t_3 = (__pyx_t_1 != 0);
  52888. if (__pyx_t_3) {
  52889. /* "uvloop/cbhandles.pyx":122
  52890. * cb = self.arg1
  52891. * if isinstance(getattr(cb, '__self__', None), aio_Task):
  52892. * try: # <<<<<<<<<<<<<<
  52893. * return repr(cb.__self__)
  52894. * except (AttributeError, TypeError, ValueError) as ex:
  52895. */
  52896. {
  52897. __Pyx_PyThreadState_declare
  52898. __Pyx_PyThreadState_assign
  52899. __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
  52900. __Pyx_XGOTREF(__pyx_t_6);
  52901. __Pyx_XGOTREF(__pyx_t_7);
  52902. __Pyx_XGOTREF(__pyx_t_8);
  52903. /*try:*/ {
  52904. /* "uvloop/cbhandles.pyx":123
  52905. * if isinstance(getattr(cb, '__self__', None), aio_Task):
  52906. * try:
  52907. * return repr(cb.__self__) # <<<<<<<<<<<<<<
  52908. * except (AttributeError, TypeError, ValueError) as ex:
  52909. * # Cython generates empty __code__ objects for coroutines
  52910. */
  52911. __Pyx_XDECREF(__pyx_r);
  52912. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_cb, __pyx_n_s_self); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 123, __pyx_L7_error)
  52913. __Pyx_GOTREF(__pyx_t_5);
  52914. __pyx_t_4 = PyObject_Repr(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 123, __pyx_L7_error)
  52915. __Pyx_GOTREF(__pyx_t_4);
  52916. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  52917. __pyx_r = __pyx_t_4;
  52918. __pyx_t_4 = 0;
  52919. goto __pyx_L11_try_return;
  52920. /* "uvloop/cbhandles.pyx":122
  52921. * cb = self.arg1
  52922. * if isinstance(getattr(cb, '__self__', None), aio_Task):
  52923. * try: # <<<<<<<<<<<<<<
  52924. * return repr(cb.__self__)
  52925. * except (AttributeError, TypeError, ValueError) as ex:
  52926. */
  52927. }
  52928. __pyx_L7_error:;
  52929. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  52930. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  52931. /* "uvloop/cbhandles.pyx":124
  52932. * try:
  52933. * return repr(cb.__self__)
  52934. * except (AttributeError, TypeError, ValueError) as ex: # <<<<<<<<<<<<<<
  52935. * # Cython generates empty __code__ objects for coroutines
  52936. * # that can crash asyncio.Task.__repr__ with an
  52937. */
  52938. __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError);
  52939. if (__pyx_t_9) {
  52940. __Pyx_AddTraceback("uvloop.loop.Handle._format_handle", __pyx_clineno, __pyx_lineno, __pyx_filename);
  52941. if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_10) < 0) __PYX_ERR(3, 124, __pyx_L9_except_error)
  52942. __Pyx_GOTREF(__pyx_t_4);
  52943. __Pyx_GOTREF(__pyx_t_5);
  52944. __Pyx_GOTREF(__pyx_t_10);
  52945. __Pyx_INCREF(__pyx_t_5);
  52946. __pyx_v_ex = __pyx_t_5;
  52947. /*try:*/ {
  52948. /* "uvloop/cbhandles.pyx":128
  52949. * # that can crash asyncio.Task.__repr__ with an
  52950. * # AttributeError etc. Guard against that.
  52951. * self.loop.call_exception_handler({ # <<<<<<<<<<<<<<
  52952. * 'message': 'exception in Task.__repr__',
  52953. * 'task': cb.__self__,
  52954. */
  52955. __pyx_t_12 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->loop), __pyx_n_s_call_exception_handler); if (unlikely(!__pyx_t_12)) __PYX_ERR(3, 128, __pyx_L18_error)
  52956. __Pyx_GOTREF(__pyx_t_12);
  52957. /* "uvloop/cbhandles.pyx":129
  52958. * # AttributeError etc. Guard against that.
  52959. * self.loop.call_exception_handler({
  52960. * 'message': 'exception in Task.__repr__', # <<<<<<<<<<<<<<
  52961. * 'task': cb.__self__,
  52962. * 'exception': ex,
  52963. */
  52964. __pyx_t_13 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_13)) __PYX_ERR(3, 129, __pyx_L18_error)
  52965. __Pyx_GOTREF(__pyx_t_13);
  52966. if (PyDict_SetItem(__pyx_t_13, __pyx_n_u_message, __pyx_kp_u_exception_in_Task___repr) < 0) __PYX_ERR(3, 129, __pyx_L18_error)
  52967. /* "uvloop/cbhandles.pyx":130
  52968. * self.loop.call_exception_handler({
  52969. * 'message': 'exception in Task.__repr__',
  52970. * 'task': cb.__self__, # <<<<<<<<<<<<<<
  52971. * 'exception': ex,
  52972. * 'handle': self,
  52973. */
  52974. __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_cb, __pyx_n_s_self); if (unlikely(!__pyx_t_14)) __PYX_ERR(3, 130, __pyx_L18_error)
  52975. __Pyx_GOTREF(__pyx_t_14);
  52976. if (PyDict_SetItem(__pyx_t_13, __pyx_n_u_task, __pyx_t_14) < 0) __PYX_ERR(3, 129, __pyx_L18_error)
  52977. __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  52978. /* "uvloop/cbhandles.pyx":131
  52979. * 'message': 'exception in Task.__repr__',
  52980. * 'task': cb.__self__,
  52981. * 'exception': ex, # <<<<<<<<<<<<<<
  52982. * 'handle': self,
  52983. * })
  52984. */
  52985. if (PyDict_SetItem(__pyx_t_13, __pyx_n_u_exception, __pyx_v_ex) < 0) __PYX_ERR(3, 129, __pyx_L18_error)
  52986. /* "uvloop/cbhandles.pyx":132
  52987. * 'task': cb.__self__,
  52988. * 'exception': ex,
  52989. * 'handle': self, # <<<<<<<<<<<<<<
  52990. * })
  52991. * return repr(self)
  52992. */
  52993. if (PyDict_SetItem(__pyx_t_13, __pyx_n_u_handle, ((PyObject *)__pyx_v_self)) < 0) __PYX_ERR(3, 129, __pyx_L18_error)
  52994. __pyx_t_14 = NULL;
  52995. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_12))) {
  52996. __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_12);
  52997. if (likely(__pyx_t_14)) {
  52998. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
  52999. __Pyx_INCREF(__pyx_t_14);
  53000. __Pyx_INCREF(function);
  53001. __Pyx_DECREF_SET(__pyx_t_12, function);
  53002. }
  53003. }
  53004. __pyx_t_11 = (__pyx_t_14) ? __Pyx_PyObject_Call2Args(__pyx_t_12, __pyx_t_14, __pyx_t_13) : __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_13);
  53005. __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
  53006. __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  53007. if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 128, __pyx_L18_error)
  53008. __Pyx_GOTREF(__pyx_t_11);
  53009. __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  53010. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  53011. }
  53012. /* "uvloop/cbhandles.pyx":124
  53013. * try:
  53014. * return repr(cb.__self__)
  53015. * except (AttributeError, TypeError, ValueError) as ex: # <<<<<<<<<<<<<<
  53016. * # Cython generates empty __code__ objects for coroutines
  53017. * # that can crash asyncio.Task.__repr__ with an
  53018. */
  53019. /*finally:*/ {
  53020. /*normal exit:*/{
  53021. __Pyx_DECREF(__pyx_v_ex);
  53022. __pyx_v_ex = NULL;
  53023. goto __pyx_L19;
  53024. }
  53025. __pyx_L18_error:;
  53026. /*exception exit:*/{
  53027. __Pyx_PyThreadState_declare
  53028. __Pyx_PyThreadState_assign
  53029. __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
  53030. __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
  53031. __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
  53032. __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
  53033. __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
  53034. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22);
  53035. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19) < 0)) __Pyx_ErrFetch(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19);
  53036. __Pyx_XGOTREF(__pyx_t_17);
  53037. __Pyx_XGOTREF(__pyx_t_18);
  53038. __Pyx_XGOTREF(__pyx_t_19);
  53039. __Pyx_XGOTREF(__pyx_t_20);
  53040. __Pyx_XGOTREF(__pyx_t_21);
  53041. __Pyx_XGOTREF(__pyx_t_22);
  53042. __pyx_t_9 = __pyx_lineno; __pyx_t_15 = __pyx_clineno; __pyx_t_16 = __pyx_filename;
  53043. {
  53044. __Pyx_DECREF(__pyx_v_ex);
  53045. __pyx_v_ex = NULL;
  53046. }
  53047. if (PY_MAJOR_VERSION >= 3) {
  53048. __Pyx_XGIVEREF(__pyx_t_20);
  53049. __Pyx_XGIVEREF(__pyx_t_21);
  53050. __Pyx_XGIVEREF(__pyx_t_22);
  53051. __Pyx_ExceptionReset(__pyx_t_20, __pyx_t_21, __pyx_t_22);
  53052. }
  53053. __Pyx_XGIVEREF(__pyx_t_17);
  53054. __Pyx_XGIVEREF(__pyx_t_18);
  53055. __Pyx_XGIVEREF(__pyx_t_19);
  53056. __Pyx_ErrRestore(__pyx_t_17, __pyx_t_18, __pyx_t_19);
  53057. __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
  53058. __pyx_lineno = __pyx_t_9; __pyx_clineno = __pyx_t_15; __pyx_filename = __pyx_t_16;
  53059. goto __pyx_L9_except_error;
  53060. }
  53061. __pyx_L19:;
  53062. }
  53063. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  53064. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  53065. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  53066. goto __pyx_L8_exception_handled;
  53067. }
  53068. goto __pyx_L9_except_error;
  53069. __pyx_L9_except_error:;
  53070. /* "uvloop/cbhandles.pyx":122
  53071. * cb = self.arg1
  53072. * if isinstance(getattr(cb, '__self__', None), aio_Task):
  53073. * try: # <<<<<<<<<<<<<<
  53074. * return repr(cb.__self__)
  53075. * except (AttributeError, TypeError, ValueError) as ex:
  53076. */
  53077. __Pyx_XGIVEREF(__pyx_t_6);
  53078. __Pyx_XGIVEREF(__pyx_t_7);
  53079. __Pyx_XGIVEREF(__pyx_t_8);
  53080. __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
  53081. goto __pyx_L1_error;
  53082. __pyx_L11_try_return:;
  53083. __Pyx_XGIVEREF(__pyx_t_6);
  53084. __Pyx_XGIVEREF(__pyx_t_7);
  53085. __Pyx_XGIVEREF(__pyx_t_8);
  53086. __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
  53087. goto __pyx_L0;
  53088. __pyx_L8_exception_handled:;
  53089. __Pyx_XGIVEREF(__pyx_t_6);
  53090. __Pyx_XGIVEREF(__pyx_t_7);
  53091. __Pyx_XGIVEREF(__pyx_t_8);
  53092. __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
  53093. }
  53094. /* "uvloop/cbhandles.pyx":121
  53095. * if self.cb_type == 1 and self.arg1 is not None:
  53096. * cb = self.arg1
  53097. * if isinstance(getattr(cb, '__self__', None), aio_Task): # <<<<<<<<<<<<<<
  53098. * try:
  53099. * return repr(cb.__self__)
  53100. */
  53101. }
  53102. /* "uvloop/cbhandles.pyx":119
  53103. * cdef _format_handle(self):
  53104. * # Mirrors `asyncio.base_events._format_handle`.
  53105. * if self.cb_type == 1 and self.arg1 is not None: # <<<<<<<<<<<<<<
  53106. * cb = self.arg1
  53107. * if isinstance(getattr(cb, '__self__', None), aio_Task):
  53108. */
  53109. }
  53110. /* "uvloop/cbhandles.pyx":134
  53111. * 'handle': self,
  53112. * })
  53113. * return repr(self) # <<<<<<<<<<<<<<
  53114. *
  53115. * # Public API
  53116. */
  53117. __Pyx_XDECREF(__pyx_r);
  53118. __pyx_t_10 = PyObject_Repr(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 134, __pyx_L1_error)
  53119. __Pyx_GOTREF(__pyx_t_10);
  53120. __pyx_r = __pyx_t_10;
  53121. __pyx_t_10 = 0;
  53122. goto __pyx_L0;
  53123. /* "uvloop/cbhandles.pyx":117
  53124. * self.arg1 = self.arg2 = self.arg3 = self.arg4 = None
  53125. *
  53126. * cdef _format_handle(self): # <<<<<<<<<<<<<<
  53127. * # Mirrors `asyncio.base_events._format_handle`.
  53128. * if self.cb_type == 1 and self.arg1 is not None:
  53129. */
  53130. /* function exit code */
  53131. __pyx_L1_error:;
  53132. __Pyx_XDECREF(__pyx_t_4);
  53133. __Pyx_XDECREF(__pyx_t_5);
  53134. __Pyx_XDECREF(__pyx_t_10);
  53135. __Pyx_XDECREF(__pyx_t_11);
  53136. __Pyx_XDECREF(__pyx_t_12);
  53137. __Pyx_XDECREF(__pyx_t_13);
  53138. __Pyx_XDECREF(__pyx_t_14);
  53139. __Pyx_AddTraceback("uvloop.loop.Handle._format_handle", __pyx_clineno, __pyx_lineno, __pyx_filename);
  53140. __pyx_r = 0;
  53141. __pyx_L0:;
  53142. __Pyx_XDECREF(__pyx_v_cb);
  53143. __Pyx_XDECREF(__pyx_v_ex);
  53144. __Pyx_XGIVEREF(__pyx_r);
  53145. __Pyx_RefNannyFinishContext();
  53146. return __pyx_r;
  53147. }
  53148. /* "uvloop/cbhandles.pyx":138
  53149. * # Public API
  53150. *
  53151. * def __repr__(self): # <<<<<<<<<<<<<<
  53152. * info = [self.__class__.__name__]
  53153. *
  53154. */
  53155. /* Python wrapper */
  53156. static PyObject *__pyx_pw_6uvloop_4loop_6Handle_7__repr__(PyObject *__pyx_v_self); /*proto*/
  53157. static PyObject *__pyx_pw_6uvloop_4loop_6Handle_7__repr__(PyObject *__pyx_v_self) {
  53158. PyObject *__pyx_r = 0;
  53159. __Pyx_RefNannyDeclarations
  53160. __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  53161. __pyx_r = __pyx_pf_6uvloop_4loop_6Handle_6__repr__(((struct __pyx_obj_6uvloop_4loop_Handle *)__pyx_v_self));
  53162. /* function exit code */
  53163. __Pyx_RefNannyFinishContext();
  53164. return __pyx_r;
  53165. }
  53166. static PyObject *__pyx_pf_6uvloop_4loop_6Handle_6__repr__(struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_self) {
  53167. PyObject *__pyx_v_info = NULL;
  53168. PyObject *__pyx_v_func = NULL;
  53169. PyObject *__pyx_v_cb_name = NULL;
  53170. PyObject *__pyx_v_frame = NULL;
  53171. PyObject *__pyx_r = NULL;
  53172. __Pyx_RefNannyDeclarations
  53173. PyObject *__pyx_t_1 = NULL;
  53174. PyObject *__pyx_t_2 = NULL;
  53175. int __pyx_t_3;
  53176. int __pyx_t_4;
  53177. int __pyx_t_5;
  53178. int __pyx_t_6;
  53179. PyObject *__pyx_t_7 = NULL;
  53180. PyObject *__pyx_t_8 = NULL;
  53181. PyObject *__pyx_t_9 = NULL;
  53182. int __pyx_t_10;
  53183. PyObject *__pyx_t_11 = NULL;
  53184. __Pyx_RefNannySetupContext("__repr__", 0);
  53185. /* "uvloop/cbhandles.pyx":139
  53186. *
  53187. * def __repr__(self):
  53188. * info = [self.__class__.__name__] # <<<<<<<<<<<<<<
  53189. *
  53190. * if self._cancelled:
  53191. */
  53192. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 139, __pyx_L1_error)
  53193. __Pyx_GOTREF(__pyx_t_1);
  53194. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 139, __pyx_L1_error)
  53195. __Pyx_GOTREF(__pyx_t_2);
  53196. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  53197. __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 139, __pyx_L1_error)
  53198. __Pyx_GOTREF(__pyx_t_1);
  53199. __Pyx_GIVEREF(__pyx_t_2);
  53200. PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  53201. __pyx_t_2 = 0;
  53202. __pyx_v_info = ((PyObject*)__pyx_t_1);
  53203. __pyx_t_1 = 0;
  53204. /* "uvloop/cbhandles.pyx":141
  53205. * info = [self.__class__.__name__]
  53206. *
  53207. * if self._cancelled: # <<<<<<<<<<<<<<
  53208. * info.append('cancelled')
  53209. *
  53210. */
  53211. __pyx_t_3 = (__pyx_v_self->_cancelled != 0);
  53212. if (__pyx_t_3) {
  53213. /* "uvloop/cbhandles.pyx":142
  53214. *
  53215. * if self._cancelled:
  53216. * info.append('cancelled') # <<<<<<<<<<<<<<
  53217. *
  53218. * if self.cb_type == 1 and self.arg1 is not None:
  53219. */
  53220. __pyx_t_4 = __Pyx_PyList_Append(__pyx_v_info, __pyx_n_u_cancelled); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(3, 142, __pyx_L1_error)
  53221. /* "uvloop/cbhandles.pyx":141
  53222. * info = [self.__class__.__name__]
  53223. *
  53224. * if self._cancelled: # <<<<<<<<<<<<<<
  53225. * info.append('cancelled')
  53226. *
  53227. */
  53228. }
  53229. /* "uvloop/cbhandles.pyx":144
  53230. * info.append('cancelled')
  53231. *
  53232. * if self.cb_type == 1 and self.arg1 is not None: # <<<<<<<<<<<<<<
  53233. * func = self.arg1
  53234. * # Cython can unset func.__qualname__/__name__, hence the checks.
  53235. */
  53236. __pyx_t_5 = ((__pyx_v_self->cb_type == 1) != 0);
  53237. if (__pyx_t_5) {
  53238. } else {
  53239. __pyx_t_3 = __pyx_t_5;
  53240. goto __pyx_L5_bool_binop_done;
  53241. }
  53242. __pyx_t_5 = (__pyx_v_self->arg1 != Py_None);
  53243. __pyx_t_6 = (__pyx_t_5 != 0);
  53244. __pyx_t_3 = __pyx_t_6;
  53245. __pyx_L5_bool_binop_done:;
  53246. if (__pyx_t_3) {
  53247. /* "uvloop/cbhandles.pyx":145
  53248. *
  53249. * if self.cb_type == 1 and self.arg1 is not None:
  53250. * func = self.arg1 # <<<<<<<<<<<<<<
  53251. * # Cython can unset func.__qualname__/__name__, hence the checks.
  53252. * if hasattr(func, '__qualname__') and func.__qualname__:
  53253. */
  53254. __pyx_t_1 = __pyx_v_self->arg1;
  53255. __Pyx_INCREF(__pyx_t_1);
  53256. __pyx_v_func = __pyx_t_1;
  53257. __pyx_t_1 = 0;
  53258. /* "uvloop/cbhandles.pyx":147
  53259. * func = self.arg1
  53260. * # Cython can unset func.__qualname__/__name__, hence the checks.
  53261. * if hasattr(func, '__qualname__') and func.__qualname__: # <<<<<<<<<<<<<<
  53262. * cb_name = func.__qualname__
  53263. * elif hasattr(func, '__name__') and func.__name__:
  53264. */
  53265. __pyx_t_6 = __Pyx_HasAttr(__pyx_v_func, __pyx_n_u_qualname); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(3, 147, __pyx_L1_error)
  53266. __pyx_t_5 = (__pyx_t_6 != 0);
  53267. if (__pyx_t_5) {
  53268. } else {
  53269. __pyx_t_3 = __pyx_t_5;
  53270. goto __pyx_L8_bool_binop_done;
  53271. }
  53272. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_func, __pyx_n_s_qualname); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 147, __pyx_L1_error)
  53273. __Pyx_GOTREF(__pyx_t_1);
  53274. __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(3, 147, __pyx_L1_error)
  53275. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  53276. __pyx_t_3 = __pyx_t_5;
  53277. __pyx_L8_bool_binop_done:;
  53278. if (__pyx_t_3) {
  53279. /* "uvloop/cbhandles.pyx":148
  53280. * # Cython can unset func.__qualname__/__name__, hence the checks.
  53281. * if hasattr(func, '__qualname__') and func.__qualname__:
  53282. * cb_name = func.__qualname__ # <<<<<<<<<<<<<<
  53283. * elif hasattr(func, '__name__') and func.__name__:
  53284. * cb_name = func.__name__
  53285. */
  53286. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_func, __pyx_n_s_qualname); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 148, __pyx_L1_error)
  53287. __Pyx_GOTREF(__pyx_t_1);
  53288. __pyx_v_cb_name = __pyx_t_1;
  53289. __pyx_t_1 = 0;
  53290. /* "uvloop/cbhandles.pyx":147
  53291. * func = self.arg1
  53292. * # Cython can unset func.__qualname__/__name__, hence the checks.
  53293. * if hasattr(func, '__qualname__') and func.__qualname__: # <<<<<<<<<<<<<<
  53294. * cb_name = func.__qualname__
  53295. * elif hasattr(func, '__name__') and func.__name__:
  53296. */
  53297. goto __pyx_L7;
  53298. }
  53299. /* "uvloop/cbhandles.pyx":149
  53300. * if hasattr(func, '__qualname__') and func.__qualname__:
  53301. * cb_name = func.__qualname__
  53302. * elif hasattr(func, '__name__') and func.__name__: # <<<<<<<<<<<<<<
  53303. * cb_name = func.__name__
  53304. * else:
  53305. */
  53306. __pyx_t_5 = __Pyx_HasAttr(__pyx_v_func, __pyx_n_u_name); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(3, 149, __pyx_L1_error)
  53307. __pyx_t_6 = (__pyx_t_5 != 0);
  53308. if (__pyx_t_6) {
  53309. } else {
  53310. __pyx_t_3 = __pyx_t_6;
  53311. goto __pyx_L10_bool_binop_done;
  53312. }
  53313. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_func, __pyx_n_s_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 149, __pyx_L1_error)
  53314. __Pyx_GOTREF(__pyx_t_1);
  53315. __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 149, __pyx_L1_error)
  53316. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  53317. __pyx_t_3 = __pyx_t_6;
  53318. __pyx_L10_bool_binop_done:;
  53319. if (__pyx_t_3) {
  53320. /* "uvloop/cbhandles.pyx":150
  53321. * cb_name = func.__qualname__
  53322. * elif hasattr(func, '__name__') and func.__name__:
  53323. * cb_name = func.__name__ # <<<<<<<<<<<<<<
  53324. * else:
  53325. * cb_name = repr(func)
  53326. */
  53327. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_func, __pyx_n_s_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 150, __pyx_L1_error)
  53328. __Pyx_GOTREF(__pyx_t_1);
  53329. __pyx_v_cb_name = __pyx_t_1;
  53330. __pyx_t_1 = 0;
  53331. /* "uvloop/cbhandles.pyx":149
  53332. * if hasattr(func, '__qualname__') and func.__qualname__:
  53333. * cb_name = func.__qualname__
  53334. * elif hasattr(func, '__name__') and func.__name__: # <<<<<<<<<<<<<<
  53335. * cb_name = func.__name__
  53336. * else:
  53337. */
  53338. goto __pyx_L7;
  53339. }
  53340. /* "uvloop/cbhandles.pyx":152
  53341. * cb_name = func.__name__
  53342. * else:
  53343. * cb_name = repr(func) # <<<<<<<<<<<<<<
  53344. *
  53345. * info.append(cb_name)
  53346. */
  53347. /*else*/ {
  53348. __pyx_t_1 = PyObject_Repr(__pyx_v_func); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 152, __pyx_L1_error)
  53349. __Pyx_GOTREF(__pyx_t_1);
  53350. __pyx_v_cb_name = __pyx_t_1;
  53351. __pyx_t_1 = 0;
  53352. }
  53353. __pyx_L7:;
  53354. /* "uvloop/cbhandles.pyx":154
  53355. * cb_name = repr(func)
  53356. *
  53357. * info.append(cb_name) # <<<<<<<<<<<<<<
  53358. * elif self.meth_name is not None:
  53359. * info.append(self.meth_name)
  53360. */
  53361. __pyx_t_4 = __Pyx_PyList_Append(__pyx_v_info, __pyx_v_cb_name); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(3, 154, __pyx_L1_error)
  53362. /* "uvloop/cbhandles.pyx":144
  53363. * info.append('cancelled')
  53364. *
  53365. * if self.cb_type == 1 and self.arg1 is not None: # <<<<<<<<<<<<<<
  53366. * func = self.arg1
  53367. * # Cython can unset func.__qualname__/__name__, hence the checks.
  53368. */
  53369. goto __pyx_L4;
  53370. }
  53371. /* "uvloop/cbhandles.pyx":155
  53372. *
  53373. * info.append(cb_name)
  53374. * elif self.meth_name is not None: # <<<<<<<<<<<<<<
  53375. * info.append(self.meth_name)
  53376. *
  53377. */
  53378. __pyx_t_3 = (__pyx_v_self->meth_name != ((PyObject*)Py_None));
  53379. __pyx_t_6 = (__pyx_t_3 != 0);
  53380. if (__pyx_t_6) {
  53381. /* "uvloop/cbhandles.pyx":156
  53382. * info.append(cb_name)
  53383. * elif self.meth_name is not None:
  53384. * info.append(self.meth_name) # <<<<<<<<<<<<<<
  53385. *
  53386. * if self._source_traceback is not None:
  53387. */
  53388. __pyx_t_1 = __pyx_v_self->meth_name;
  53389. __Pyx_INCREF(__pyx_t_1);
  53390. __pyx_t_4 = __Pyx_PyList_Append(__pyx_v_info, __pyx_t_1); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(3, 156, __pyx_L1_error)
  53391. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  53392. /* "uvloop/cbhandles.pyx":155
  53393. *
  53394. * info.append(cb_name)
  53395. * elif self.meth_name is not None: # <<<<<<<<<<<<<<
  53396. * info.append(self.meth_name)
  53397. *
  53398. */
  53399. }
  53400. __pyx_L4:;
  53401. /* "uvloop/cbhandles.pyx":158
  53402. * info.append(self.meth_name)
  53403. *
  53404. * if self._source_traceback is not None: # <<<<<<<<<<<<<<
  53405. * frame = self._source_traceback[-1]
  53406. * info.append('created at {}:{}'.format(frame[0], frame[1]))
  53407. */
  53408. __pyx_t_6 = (__pyx_v_self->_source_traceback != Py_None);
  53409. __pyx_t_3 = (__pyx_t_6 != 0);
  53410. if (__pyx_t_3) {
  53411. /* "uvloop/cbhandles.pyx":159
  53412. *
  53413. * if self._source_traceback is not None:
  53414. * frame = self._source_traceback[-1] # <<<<<<<<<<<<<<
  53415. * info.append('created at {}:{}'.format(frame[0], frame[1]))
  53416. *
  53417. */
  53418. __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_self->_source_traceback, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 159, __pyx_L1_error)
  53419. __Pyx_GOTREF(__pyx_t_1);
  53420. __pyx_v_frame = __pyx_t_1;
  53421. __pyx_t_1 = 0;
  53422. /* "uvloop/cbhandles.pyx":160
  53423. * if self._source_traceback is not None:
  53424. * frame = self._source_traceback[-1]
  53425. * info.append('created at {}:{}'.format(frame[0], frame[1])) # <<<<<<<<<<<<<<
  53426. *
  53427. * return '<' + ' '.join(info) + '>'
  53428. */
  53429. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_created_at, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 160, __pyx_L1_error)
  53430. __Pyx_GOTREF(__pyx_t_2);
  53431. __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_frame, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 160, __pyx_L1_error)
  53432. __Pyx_GOTREF(__pyx_t_7);
  53433. __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_frame, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 160, __pyx_L1_error)
  53434. __Pyx_GOTREF(__pyx_t_8);
  53435. __pyx_t_9 = NULL;
  53436. __pyx_t_10 = 0;
  53437. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
  53438. __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
  53439. if (likely(__pyx_t_9)) {
  53440. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  53441. __Pyx_INCREF(__pyx_t_9);
  53442. __Pyx_INCREF(function);
  53443. __Pyx_DECREF_SET(__pyx_t_2, function);
  53444. __pyx_t_10 = 1;
  53445. }
  53446. }
  53447. #if CYTHON_FAST_PYCALL
  53448. if (PyFunction_Check(__pyx_t_2)) {
  53449. PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_t_7, __pyx_t_8};
  53450. __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 160, __pyx_L1_error)
  53451. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  53452. __Pyx_GOTREF(__pyx_t_1);
  53453. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  53454. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  53455. } else
  53456. #endif
  53457. #if CYTHON_FAST_PYCCALL
  53458. if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
  53459. PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_t_7, __pyx_t_8};
  53460. __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 160, __pyx_L1_error)
  53461. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  53462. __Pyx_GOTREF(__pyx_t_1);
  53463. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  53464. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  53465. } else
  53466. #endif
  53467. {
  53468. __pyx_t_11 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 160, __pyx_L1_error)
  53469. __Pyx_GOTREF(__pyx_t_11);
  53470. if (__pyx_t_9) {
  53471. __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); __pyx_t_9 = NULL;
  53472. }
  53473. __Pyx_GIVEREF(__pyx_t_7);
  53474. PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_10, __pyx_t_7);
  53475. __Pyx_GIVEREF(__pyx_t_8);
  53476. PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_10, __pyx_t_8);
  53477. __pyx_t_7 = 0;
  53478. __pyx_t_8 = 0;
  53479. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 160, __pyx_L1_error)
  53480. __Pyx_GOTREF(__pyx_t_1);
  53481. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  53482. }
  53483. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  53484. __pyx_t_4 = __Pyx_PyList_Append(__pyx_v_info, __pyx_t_1); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(3, 160, __pyx_L1_error)
  53485. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  53486. /* "uvloop/cbhandles.pyx":158
  53487. * info.append(self.meth_name)
  53488. *
  53489. * if self._source_traceback is not None: # <<<<<<<<<<<<<<
  53490. * frame = self._source_traceback[-1]
  53491. * info.append('created at {}:{}'.format(frame[0], frame[1]))
  53492. */
  53493. }
  53494. /* "uvloop/cbhandles.pyx":162
  53495. * info.append('created at {}:{}'.format(frame[0], frame[1]))
  53496. *
  53497. * return '<' + ' '.join(info) + '>' # <<<<<<<<<<<<<<
  53498. *
  53499. * def cancel(self):
  53500. */
  53501. __Pyx_XDECREF(__pyx_r);
  53502. __pyx_t_1 = PyUnicode_Join(__pyx_kp_u__89, __pyx_v_info); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 162, __pyx_L1_error)
  53503. __Pyx_GOTREF(__pyx_t_1);
  53504. __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u__88, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 162, __pyx_L1_error)
  53505. __Pyx_GOTREF(__pyx_t_2);
  53506. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  53507. __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_t_2, __pyx_kp_u__90); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 162, __pyx_L1_error)
  53508. __Pyx_GOTREF(__pyx_t_1);
  53509. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  53510. __pyx_r = __pyx_t_1;
  53511. __pyx_t_1 = 0;
  53512. goto __pyx_L0;
  53513. /* "uvloop/cbhandles.pyx":138
  53514. * # Public API
  53515. *
  53516. * def __repr__(self): # <<<<<<<<<<<<<<
  53517. * info = [self.__class__.__name__]
  53518. *
  53519. */
  53520. /* function exit code */
  53521. __pyx_L1_error:;
  53522. __Pyx_XDECREF(__pyx_t_1);
  53523. __Pyx_XDECREF(__pyx_t_2);
  53524. __Pyx_XDECREF(__pyx_t_7);
  53525. __Pyx_XDECREF(__pyx_t_8);
  53526. __Pyx_XDECREF(__pyx_t_9);
  53527. __Pyx_XDECREF(__pyx_t_11);
  53528. __Pyx_AddTraceback("uvloop.loop.Handle.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  53529. __pyx_r = NULL;
  53530. __pyx_L0:;
  53531. __Pyx_XDECREF(__pyx_v_info);
  53532. __Pyx_XDECREF(__pyx_v_func);
  53533. __Pyx_XDECREF(__pyx_v_cb_name);
  53534. __Pyx_XDECREF(__pyx_v_frame);
  53535. __Pyx_XGIVEREF(__pyx_r);
  53536. __Pyx_RefNannyFinishContext();
  53537. return __pyx_r;
  53538. }
  53539. /* "uvloop/cbhandles.pyx":164
  53540. * return '<' + ' '.join(info) + '>'
  53541. *
  53542. * def cancel(self): # <<<<<<<<<<<<<<
  53543. * self._cancel()
  53544. *
  53545. */
  53546. /* Python wrapper */
  53547. static PyObject *__pyx_pw_6uvloop_4loop_6Handle_9cancel(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  53548. static char __pyx_doc_6uvloop_4loop_6Handle_8cancel[] = "Handle.cancel(self)";
  53549. static PyObject *__pyx_pw_6uvloop_4loop_6Handle_9cancel(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  53550. PyObject *__pyx_r = 0;
  53551. __Pyx_RefNannyDeclarations
  53552. __Pyx_RefNannySetupContext("cancel (wrapper)", 0);
  53553. __pyx_r = __pyx_pf_6uvloop_4loop_6Handle_8cancel(((struct __pyx_obj_6uvloop_4loop_Handle *)__pyx_v_self));
  53554. /* function exit code */
  53555. __Pyx_RefNannyFinishContext();
  53556. return __pyx_r;
  53557. }
  53558. static PyObject *__pyx_pf_6uvloop_4loop_6Handle_8cancel(struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_self) {
  53559. PyObject *__pyx_r = NULL;
  53560. __Pyx_RefNannyDeclarations
  53561. PyObject *__pyx_t_1 = NULL;
  53562. __Pyx_RefNannySetupContext("cancel", 0);
  53563. /* "uvloop/cbhandles.pyx":165
  53564. *
  53565. * def cancel(self):
  53566. * self._cancel() # <<<<<<<<<<<<<<
  53567. *
  53568. * def cancelled(self):
  53569. */
  53570. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_Handle *)__pyx_v_self->__pyx_vtab)->_cancel(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 165, __pyx_L1_error)
  53571. __Pyx_GOTREF(__pyx_t_1);
  53572. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  53573. /* "uvloop/cbhandles.pyx":164
  53574. * return '<' + ' '.join(info) + '>'
  53575. *
  53576. * def cancel(self): # <<<<<<<<<<<<<<
  53577. * self._cancel()
  53578. *
  53579. */
  53580. /* function exit code */
  53581. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  53582. goto __pyx_L0;
  53583. __pyx_L1_error:;
  53584. __Pyx_XDECREF(__pyx_t_1);
  53585. __Pyx_AddTraceback("uvloop.loop.Handle.cancel", __pyx_clineno, __pyx_lineno, __pyx_filename);
  53586. __pyx_r = NULL;
  53587. __pyx_L0:;
  53588. __Pyx_XGIVEREF(__pyx_r);
  53589. __Pyx_RefNannyFinishContext();
  53590. return __pyx_r;
  53591. }
  53592. /* "uvloop/cbhandles.pyx":167
  53593. * self._cancel()
  53594. *
  53595. * def cancelled(self): # <<<<<<<<<<<<<<
  53596. * return self._cancelled
  53597. *
  53598. */
  53599. /* Python wrapper */
  53600. static PyObject *__pyx_pw_6uvloop_4loop_6Handle_11cancelled(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  53601. static char __pyx_doc_6uvloop_4loop_6Handle_10cancelled[] = "Handle.cancelled(self)";
  53602. static PyObject *__pyx_pw_6uvloop_4loop_6Handle_11cancelled(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  53603. PyObject *__pyx_r = 0;
  53604. __Pyx_RefNannyDeclarations
  53605. __Pyx_RefNannySetupContext("cancelled (wrapper)", 0);
  53606. __pyx_r = __pyx_pf_6uvloop_4loop_6Handle_10cancelled(((struct __pyx_obj_6uvloop_4loop_Handle *)__pyx_v_self));
  53607. /* function exit code */
  53608. __Pyx_RefNannyFinishContext();
  53609. return __pyx_r;
  53610. }
  53611. static PyObject *__pyx_pf_6uvloop_4loop_6Handle_10cancelled(struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_self) {
  53612. PyObject *__pyx_r = NULL;
  53613. __Pyx_RefNannyDeclarations
  53614. PyObject *__pyx_t_1 = NULL;
  53615. __Pyx_RefNannySetupContext("cancelled", 0);
  53616. /* "uvloop/cbhandles.pyx":168
  53617. *
  53618. * def cancelled(self):
  53619. * return self._cancelled # <<<<<<<<<<<<<<
  53620. *
  53621. *
  53622. */
  53623. __Pyx_XDECREF(__pyx_r);
  53624. __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->_cancelled); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 168, __pyx_L1_error)
  53625. __Pyx_GOTREF(__pyx_t_1);
  53626. __pyx_r = __pyx_t_1;
  53627. __pyx_t_1 = 0;
  53628. goto __pyx_L0;
  53629. /* "uvloop/cbhandles.pyx":167
  53630. * self._cancel()
  53631. *
  53632. * def cancelled(self): # <<<<<<<<<<<<<<
  53633. * return self._cancelled
  53634. *
  53635. */
  53636. /* function exit code */
  53637. __pyx_L1_error:;
  53638. __Pyx_XDECREF(__pyx_t_1);
  53639. __Pyx_AddTraceback("uvloop.loop.Handle.cancelled", __pyx_clineno, __pyx_lineno, __pyx_filename);
  53640. __pyx_r = NULL;
  53641. __pyx_L0:;
  53642. __Pyx_XGIVEREF(__pyx_r);
  53643. __Pyx_RefNannyFinishContext();
  53644. return __pyx_r;
  53645. }
  53646. /* "uvloop/cbhandles.pxd":14
  53647. * object __weakref__
  53648. *
  53649. * readonly _source_traceback # <<<<<<<<<<<<<<
  53650. *
  53651. * cdef inline _set_loop(self, Loop loop)
  53652. */
  53653. /* Python wrapper */
  53654. static PyObject *__pyx_pw_6uvloop_4loop_6Handle_17_source_traceback_1__get__(PyObject *__pyx_v_self); /*proto*/
  53655. static PyObject *__pyx_pw_6uvloop_4loop_6Handle_17_source_traceback_1__get__(PyObject *__pyx_v_self) {
  53656. PyObject *__pyx_r = 0;
  53657. __Pyx_RefNannyDeclarations
  53658. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  53659. __pyx_r = __pyx_pf_6uvloop_4loop_6Handle_17_source_traceback___get__(((struct __pyx_obj_6uvloop_4loop_Handle *)__pyx_v_self));
  53660. /* function exit code */
  53661. __Pyx_RefNannyFinishContext();
  53662. return __pyx_r;
  53663. }
  53664. static PyObject *__pyx_pf_6uvloop_4loop_6Handle_17_source_traceback___get__(struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_self) {
  53665. PyObject *__pyx_r = NULL;
  53666. __Pyx_RefNannyDeclarations
  53667. __Pyx_RefNannySetupContext("__get__", 0);
  53668. __Pyx_XDECREF(__pyx_r);
  53669. __Pyx_INCREF(__pyx_v_self->_source_traceback);
  53670. __pyx_r = __pyx_v_self->_source_traceback;
  53671. goto __pyx_L0;
  53672. /* function exit code */
  53673. __pyx_L0:;
  53674. __Pyx_XGIVEREF(__pyx_r);
  53675. __Pyx_RefNannyFinishContext();
  53676. return __pyx_r;
  53677. }
  53678. /* "(tree fragment)":1
  53679. * def __reduce_cython__(self): # <<<<<<<<<<<<<<
  53680. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  53681. * def __setstate_cython__(self, __pyx_state):
  53682. */
  53683. /* Python wrapper */
  53684. static PyObject *__pyx_pw_6uvloop_4loop_6Handle_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  53685. static char __pyx_doc_6uvloop_4loop_6Handle_12__reduce_cython__[] = "Handle.__reduce_cython__(self)";
  53686. static PyObject *__pyx_pw_6uvloop_4loop_6Handle_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  53687. PyObject *__pyx_r = 0;
  53688. __Pyx_RefNannyDeclarations
  53689. __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  53690. __pyx_r = __pyx_pf_6uvloop_4loop_6Handle_12__reduce_cython__(((struct __pyx_obj_6uvloop_4loop_Handle *)__pyx_v_self));
  53691. /* function exit code */
  53692. __Pyx_RefNannyFinishContext();
  53693. return __pyx_r;
  53694. }
  53695. static PyObject *__pyx_pf_6uvloop_4loop_6Handle_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_self) {
  53696. PyObject *__pyx_r = NULL;
  53697. __Pyx_RefNannyDeclarations
  53698. PyObject *__pyx_t_1 = NULL;
  53699. __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  53700. /* "(tree fragment)":2
  53701. * def __reduce_cython__(self):
  53702. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  53703. * def __setstate_cython__(self, __pyx_state):
  53704. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  53705. */
  53706. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__91, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 2, __pyx_L1_error)
  53707. __Pyx_GOTREF(__pyx_t_1);
  53708. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  53709. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  53710. __PYX_ERR(9, 2, __pyx_L1_error)
  53711. /* "(tree fragment)":1
  53712. * def __reduce_cython__(self): # <<<<<<<<<<<<<<
  53713. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  53714. * def __setstate_cython__(self, __pyx_state):
  53715. */
  53716. /* function exit code */
  53717. __pyx_L1_error:;
  53718. __Pyx_XDECREF(__pyx_t_1);
  53719. __Pyx_AddTraceback("uvloop.loop.Handle.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  53720. __pyx_r = NULL;
  53721. __Pyx_XGIVEREF(__pyx_r);
  53722. __Pyx_RefNannyFinishContext();
  53723. return __pyx_r;
  53724. }
  53725. /* "(tree fragment)":3
  53726. * def __reduce_cython__(self):
  53727. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  53728. * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
  53729. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  53730. */
  53731. /* Python wrapper */
  53732. static PyObject *__pyx_pw_6uvloop_4loop_6Handle_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
  53733. static char __pyx_doc_6uvloop_4loop_6Handle_14__setstate_cython__[] = "Handle.__setstate_cython__(self, __pyx_state)";
  53734. static PyObject *__pyx_pw_6uvloop_4loop_6Handle_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  53735. PyObject *__pyx_r = 0;
  53736. __Pyx_RefNannyDeclarations
  53737. __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  53738. __pyx_r = __pyx_pf_6uvloop_4loop_6Handle_14__setstate_cython__(((struct __pyx_obj_6uvloop_4loop_Handle *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
  53739. /* function exit code */
  53740. __Pyx_RefNannyFinishContext();
  53741. return __pyx_r;
  53742. }
  53743. static PyObject *__pyx_pf_6uvloop_4loop_6Handle_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  53744. PyObject *__pyx_r = NULL;
  53745. __Pyx_RefNannyDeclarations
  53746. PyObject *__pyx_t_1 = NULL;
  53747. __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  53748. /* "(tree fragment)":4
  53749. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  53750. * def __setstate_cython__(self, __pyx_state):
  53751. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  53752. */
  53753. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__92, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 4, __pyx_L1_error)
  53754. __Pyx_GOTREF(__pyx_t_1);
  53755. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  53756. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  53757. __PYX_ERR(9, 4, __pyx_L1_error)
  53758. /* "(tree fragment)":3
  53759. * def __reduce_cython__(self):
  53760. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  53761. * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
  53762. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  53763. */
  53764. /* function exit code */
  53765. __pyx_L1_error:;
  53766. __Pyx_XDECREF(__pyx_t_1);
  53767. __Pyx_AddTraceback("uvloop.loop.Handle.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  53768. __pyx_r = NULL;
  53769. __Pyx_XGIVEREF(__pyx_r);
  53770. __Pyx_RefNannyFinishContext();
  53771. return __pyx_r;
  53772. }
  53773. /* "uvloop/cbhandles.pyx":174
  53774. * @cython.freelist(DEFAULT_FREELIST_SIZE)
  53775. * cdef class TimerHandle:
  53776. * def __cinit__(self, Loop loop, object callback, object args, # <<<<<<<<<<<<<<
  53777. * uint64_t delay, object context):
  53778. *
  53779. */
  53780. /* Python wrapper */
  53781. static int __pyx_pw_6uvloop_4loop_11TimerHandle_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  53782. static int __pyx_pw_6uvloop_4loop_11TimerHandle_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  53783. struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop = 0;
  53784. PyObject *__pyx_v_callback = 0;
  53785. PyObject *__pyx_v_args = 0;
  53786. uint64_t __pyx_v_delay;
  53787. PyObject *__pyx_v_context = 0;
  53788. int __pyx_r;
  53789. __Pyx_RefNannyDeclarations
  53790. __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  53791. {
  53792. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_loop,&__pyx_n_s_callback,&__pyx_n_s_args,&__pyx_n_s_delay,&__pyx_n_s_context,0};
  53793. PyObject* values[5] = {0,0,0,0,0};
  53794. if (unlikely(__pyx_kwds)) {
  53795. Py_ssize_t kw_args;
  53796. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  53797. switch (pos_args) {
  53798. case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
  53799. CYTHON_FALLTHROUGH;
  53800. case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
  53801. CYTHON_FALLTHROUGH;
  53802. case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
  53803. CYTHON_FALLTHROUGH;
  53804. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  53805. CYTHON_FALLTHROUGH;
  53806. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  53807. CYTHON_FALLTHROUGH;
  53808. case 0: break;
  53809. default: goto __pyx_L5_argtuple_error;
  53810. }
  53811. kw_args = PyDict_Size(__pyx_kwds);
  53812. switch (pos_args) {
  53813. case 0:
  53814. if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_loop)) != 0)) kw_args--;
  53815. else goto __pyx_L5_argtuple_error;
  53816. CYTHON_FALLTHROUGH;
  53817. case 1:
  53818. if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_callback)) != 0)) kw_args--;
  53819. else {
  53820. __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 5, 5, 1); __PYX_ERR(3, 174, __pyx_L3_error)
  53821. }
  53822. CYTHON_FALLTHROUGH;
  53823. case 2:
  53824. if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_args)) != 0)) kw_args--;
  53825. else {
  53826. __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 5, 5, 2); __PYX_ERR(3, 174, __pyx_L3_error)
  53827. }
  53828. CYTHON_FALLTHROUGH;
  53829. case 3:
  53830. if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_delay)) != 0)) kw_args--;
  53831. else {
  53832. __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 5, 5, 3); __PYX_ERR(3, 174, __pyx_L3_error)
  53833. }
  53834. CYTHON_FALLTHROUGH;
  53835. case 4:
  53836. if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_context)) != 0)) kw_args--;
  53837. else {
  53838. __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 5, 5, 4); __PYX_ERR(3, 174, __pyx_L3_error)
  53839. }
  53840. }
  53841. if (unlikely(kw_args > 0)) {
  53842. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(3, 174, __pyx_L3_error)
  53843. }
  53844. } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
  53845. goto __pyx_L5_argtuple_error;
  53846. } else {
  53847. values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  53848. values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  53849. values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
  53850. values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
  53851. values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
  53852. }
  53853. __pyx_v_loop = ((struct __pyx_obj_6uvloop_4loop_Loop *)values[0]);
  53854. __pyx_v_callback = values[1];
  53855. __pyx_v_args = values[2];
  53856. __pyx_v_delay = __Pyx_PyInt_As_uint64_t(values[3]); if (unlikely((__pyx_v_delay == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(3, 175, __pyx_L3_error)
  53857. __pyx_v_context = values[4];
  53858. }
  53859. goto __pyx_L4_argument_unpacking_done;
  53860. __pyx_L5_argtuple_error:;
  53861. __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 174, __pyx_L3_error)
  53862. __pyx_L3_error:;
  53863. __Pyx_AddTraceback("uvloop.loop.TimerHandle.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  53864. __Pyx_RefNannyFinishContext();
  53865. return -1;
  53866. __pyx_L4_argument_unpacking_done:;
  53867. if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_loop), __pyx_ptype_6uvloop_4loop_Loop, 1, "loop", 0))) __PYX_ERR(3, 174, __pyx_L1_error)
  53868. __pyx_r = __pyx_pf_6uvloop_4loop_11TimerHandle___cinit__(((struct __pyx_obj_6uvloop_4loop_TimerHandle *)__pyx_v_self), __pyx_v_loop, __pyx_v_callback, __pyx_v_args, __pyx_v_delay, __pyx_v_context);
  53869. /* function exit code */
  53870. goto __pyx_L0;
  53871. __pyx_L1_error:;
  53872. __pyx_r = -1;
  53873. __pyx_L0:;
  53874. __Pyx_RefNannyFinishContext();
  53875. return __pyx_r;
  53876. }
  53877. static int __pyx_pf_6uvloop_4loop_11TimerHandle___cinit__(struct __pyx_obj_6uvloop_4loop_TimerHandle *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, PyObject *__pyx_v_callback, PyObject *__pyx_v_args, uint64_t __pyx_v_delay, PyObject *__pyx_v_context) {
  53878. int __pyx_r;
  53879. __Pyx_RefNannyDeclarations
  53880. PyObject *__pyx_t_1 = NULL;
  53881. int __pyx_t_2;
  53882. struct __pyx_obj_6uvloop_4loop_Loop *__pyx_t_3 = NULL;
  53883. int __pyx_t_4;
  53884. PyObject *__pyx_t_5 = NULL;
  53885. PyObject *__pyx_t_6 = NULL;
  53886. int __pyx_t_7;
  53887. __Pyx_RefNannySetupContext("__cinit__", 0);
  53888. __Pyx_INCREF(__pyx_v_context);
  53889. /* "uvloop/cbhandles.pyx":177
  53890. * uint64_t delay, object context):
  53891. *
  53892. * self.loop = loop # <<<<<<<<<<<<<<
  53893. * self.callback = callback
  53894. * self.args = args
  53895. */
  53896. __Pyx_INCREF(((PyObject *)__pyx_v_loop));
  53897. __Pyx_GIVEREF(((PyObject *)__pyx_v_loop));
  53898. __Pyx_GOTREF(__pyx_v_self->loop);
  53899. __Pyx_DECREF(((PyObject *)__pyx_v_self->loop));
  53900. __pyx_v_self->loop = __pyx_v_loop;
  53901. /* "uvloop/cbhandles.pyx":178
  53902. *
  53903. * self.loop = loop
  53904. * self.callback = callback # <<<<<<<<<<<<<<
  53905. * self.args = args
  53906. * self._cancelled = 0
  53907. */
  53908. __Pyx_INCREF(__pyx_v_callback);
  53909. __Pyx_GIVEREF(__pyx_v_callback);
  53910. __Pyx_GOTREF(__pyx_v_self->callback);
  53911. __Pyx_DECREF(__pyx_v_self->callback);
  53912. __pyx_v_self->callback = __pyx_v_callback;
  53913. /* "uvloop/cbhandles.pyx":179
  53914. * self.loop = loop
  53915. * self.callback = callback
  53916. * self.args = args # <<<<<<<<<<<<<<
  53917. * self._cancelled = 0
  53918. *
  53919. */
  53920. if (!(likely(PyTuple_CheckExact(__pyx_v_args))||((__pyx_v_args) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v_args)->tp_name), 0))) __PYX_ERR(3, 179, __pyx_L1_error)
  53921. __pyx_t_1 = __pyx_v_args;
  53922. __Pyx_INCREF(__pyx_t_1);
  53923. __Pyx_GIVEREF(__pyx_t_1);
  53924. __Pyx_GOTREF(__pyx_v_self->args);
  53925. __Pyx_DECREF(__pyx_v_self->args);
  53926. __pyx_v_self->args = ((PyObject*)__pyx_t_1);
  53927. __pyx_t_1 = 0;
  53928. /* "uvloop/cbhandles.pyx":180
  53929. * self.callback = callback
  53930. * self.args = args
  53931. * self._cancelled = 0 # <<<<<<<<<<<<<<
  53932. *
  53933. * if UVLOOP_DEBUG:
  53934. */
  53935. __pyx_v_self->_cancelled = 0;
  53936. /* "uvloop/cbhandles.pyx":182
  53937. * self._cancelled = 0
  53938. *
  53939. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  53940. * self.loop._debug_cb_timer_handles_total += 1
  53941. * self.loop._debug_cb_timer_handles_count += 1
  53942. */
  53943. __pyx_t_2 = (UVLOOP_DEBUG != 0);
  53944. if (__pyx_t_2) {
  53945. /* "uvloop/cbhandles.pyx":183
  53946. *
  53947. * if UVLOOP_DEBUG:
  53948. * self.loop._debug_cb_timer_handles_total += 1 # <<<<<<<<<<<<<<
  53949. * self.loop._debug_cb_timer_handles_count += 1
  53950. *
  53951. */
  53952. __Pyx_INCREF(((PyObject *)__pyx_v_self->loop));
  53953. __pyx_t_3 = __pyx_v_self->loop;
  53954. __pyx_t_3->_debug_cb_timer_handles_total = (__pyx_t_3->_debug_cb_timer_handles_total + 1);
  53955. __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  53956. /* "uvloop/cbhandles.pyx":184
  53957. * if UVLOOP_DEBUG:
  53958. * self.loop._debug_cb_timer_handles_total += 1
  53959. * self.loop._debug_cb_timer_handles_count += 1 # <<<<<<<<<<<<<<
  53960. *
  53961. * if PY37:
  53962. */
  53963. __Pyx_INCREF(((PyObject *)__pyx_v_self->loop));
  53964. __pyx_t_3 = __pyx_v_self->loop;
  53965. __pyx_t_3->_debug_cb_timer_handles_count = (__pyx_t_3->_debug_cb_timer_handles_count + 1);
  53966. __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  53967. /* "uvloop/cbhandles.pyx":182
  53968. * self._cancelled = 0
  53969. *
  53970. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  53971. * self.loop._debug_cb_timer_handles_total += 1
  53972. * self.loop._debug_cb_timer_handles_count += 1
  53973. */
  53974. }
  53975. /* "uvloop/cbhandles.pyx":186
  53976. * self.loop._debug_cb_timer_handles_count += 1
  53977. *
  53978. * if PY37: # <<<<<<<<<<<<<<
  53979. * if context is None:
  53980. * context = Context_CopyCurrent()
  53981. */
  53982. __pyx_t_2 = (__pyx_v_6uvloop_4loop_PY37 != 0);
  53983. if (__pyx_t_2) {
  53984. /* "uvloop/cbhandles.pyx":187
  53985. *
  53986. * if PY37:
  53987. * if context is None: # <<<<<<<<<<<<<<
  53988. * context = Context_CopyCurrent()
  53989. * self.context = context
  53990. */
  53991. __pyx_t_2 = (__pyx_v_context == Py_None);
  53992. __pyx_t_4 = (__pyx_t_2 != 0);
  53993. if (__pyx_t_4) {
  53994. /* "uvloop/cbhandles.pyx":188
  53995. * if PY37:
  53996. * if context is None:
  53997. * context = Context_CopyCurrent() # <<<<<<<<<<<<<<
  53998. * self.context = context
  53999. * else:
  54000. */
  54001. __pyx_t_1 = Context_CopyCurrent(); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 188, __pyx_L1_error)
  54002. __Pyx_GOTREF(__pyx_t_1);
  54003. __Pyx_DECREF_SET(__pyx_v_context, __pyx_t_1);
  54004. __pyx_t_1 = 0;
  54005. /* "uvloop/cbhandles.pyx":187
  54006. *
  54007. * if PY37:
  54008. * if context is None: # <<<<<<<<<<<<<<
  54009. * context = Context_CopyCurrent()
  54010. * self.context = context
  54011. */
  54012. }
  54013. /* "uvloop/cbhandles.pyx":189
  54014. * if context is None:
  54015. * context = Context_CopyCurrent()
  54016. * self.context = context # <<<<<<<<<<<<<<
  54017. * else:
  54018. * if context is not None:
  54019. */
  54020. __Pyx_INCREF(__pyx_v_context);
  54021. __Pyx_GIVEREF(__pyx_v_context);
  54022. __Pyx_GOTREF(__pyx_v_self->context);
  54023. __Pyx_DECREF(__pyx_v_self->context);
  54024. __pyx_v_self->context = __pyx_v_context;
  54025. /* "uvloop/cbhandles.pyx":186
  54026. * self.loop._debug_cb_timer_handles_count += 1
  54027. *
  54028. * if PY37: # <<<<<<<<<<<<<<
  54029. * if context is None:
  54030. * context = Context_CopyCurrent()
  54031. */
  54032. goto __pyx_L4;
  54033. }
  54034. /* "uvloop/cbhandles.pyx":191
  54035. * self.context = context
  54036. * else:
  54037. * if context is not None: # <<<<<<<<<<<<<<
  54038. * raise NotImplementedError(
  54039. * '"context" argument requires Python 3.7')
  54040. */
  54041. /*else*/ {
  54042. __pyx_t_4 = (__pyx_v_context != Py_None);
  54043. __pyx_t_2 = (__pyx_t_4 != 0);
  54044. if (unlikely(__pyx_t_2)) {
  54045. /* "uvloop/cbhandles.pyx":192
  54046. * else:
  54047. * if context is not None:
  54048. * raise NotImplementedError( # <<<<<<<<<<<<<<
  54049. * '"context" argument requires Python 3.7')
  54050. * self.context = None
  54051. */
  54052. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_NotImplementedError, __pyx_tuple__85, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 192, __pyx_L1_error)
  54053. __Pyx_GOTREF(__pyx_t_1);
  54054. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  54055. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  54056. __PYX_ERR(3, 192, __pyx_L1_error)
  54057. /* "uvloop/cbhandles.pyx":191
  54058. * self.context = context
  54059. * else:
  54060. * if context is not None: # <<<<<<<<<<<<<<
  54061. * raise NotImplementedError(
  54062. * '"context" argument requires Python 3.7')
  54063. */
  54064. }
  54065. /* "uvloop/cbhandles.pyx":194
  54066. * raise NotImplementedError(
  54067. * '"context" argument requires Python 3.7')
  54068. * self.context = None # <<<<<<<<<<<<<<
  54069. *
  54070. * if loop._debug:
  54071. */
  54072. __Pyx_INCREF(Py_None);
  54073. __Pyx_GIVEREF(Py_None);
  54074. __Pyx_GOTREF(__pyx_v_self->context);
  54075. __Pyx_DECREF(__pyx_v_self->context);
  54076. __pyx_v_self->context = Py_None;
  54077. }
  54078. __pyx_L4:;
  54079. /* "uvloop/cbhandles.pyx":196
  54080. * self.context = None
  54081. *
  54082. * if loop._debug: # <<<<<<<<<<<<<<
  54083. * self._debug_info = (
  54084. * format_callback_name(callback),
  54085. */
  54086. __pyx_t_2 = (__pyx_v_loop->_debug != 0);
  54087. if (__pyx_t_2) {
  54088. /* "uvloop/cbhandles.pyx":198
  54089. * if loop._debug:
  54090. * self._debug_info = (
  54091. * format_callback_name(callback), # <<<<<<<<<<<<<<
  54092. * extract_stack()
  54093. * )
  54094. */
  54095. __pyx_t_1 = __pyx_f_6uvloop_4loop_format_callback_name(__pyx_v_callback); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 198, __pyx_L1_error)
  54096. __Pyx_GOTREF(__pyx_t_1);
  54097. /* "uvloop/cbhandles.pyx":199
  54098. * self._debug_info = (
  54099. * format_callback_name(callback),
  54100. * extract_stack() # <<<<<<<<<<<<<<
  54101. * )
  54102. * else:
  54103. */
  54104. __pyx_t_5 = __pyx_f_6uvloop_4loop_extract_stack(); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 199, __pyx_L1_error)
  54105. __Pyx_GOTREF(__pyx_t_5);
  54106. /* "uvloop/cbhandles.pyx":198
  54107. * if loop._debug:
  54108. * self._debug_info = (
  54109. * format_callback_name(callback), # <<<<<<<<<<<<<<
  54110. * extract_stack()
  54111. * )
  54112. */
  54113. __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 198, __pyx_L1_error)
  54114. __Pyx_GOTREF(__pyx_t_6);
  54115. __Pyx_GIVEREF(__pyx_t_1);
  54116. PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
  54117. __Pyx_GIVEREF(__pyx_t_5);
  54118. PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5);
  54119. __pyx_t_1 = 0;
  54120. __pyx_t_5 = 0;
  54121. /* "uvloop/cbhandles.pyx":197
  54122. *
  54123. * if loop._debug:
  54124. * self._debug_info = ( # <<<<<<<<<<<<<<
  54125. * format_callback_name(callback),
  54126. * extract_stack()
  54127. */
  54128. __Pyx_GIVEREF(__pyx_t_6);
  54129. __Pyx_GOTREF(__pyx_v_self->_debug_info);
  54130. __Pyx_DECREF(__pyx_v_self->_debug_info);
  54131. __pyx_v_self->_debug_info = ((PyObject*)__pyx_t_6);
  54132. __pyx_t_6 = 0;
  54133. /* "uvloop/cbhandles.pyx":196
  54134. * self.context = None
  54135. *
  54136. * if loop._debug: # <<<<<<<<<<<<<<
  54137. * self._debug_info = (
  54138. * format_callback_name(callback),
  54139. */
  54140. goto __pyx_L7;
  54141. }
  54142. /* "uvloop/cbhandles.pyx":202
  54143. * )
  54144. * else:
  54145. * self._debug_info = None # <<<<<<<<<<<<<<
  54146. *
  54147. * self.timer = UVTimer.new(
  54148. */
  54149. /*else*/ {
  54150. __Pyx_INCREF(Py_None);
  54151. __Pyx_GIVEREF(Py_None);
  54152. __Pyx_GOTREF(__pyx_v_self->_debug_info);
  54153. __Pyx_DECREF(__pyx_v_self->_debug_info);
  54154. __pyx_v_self->_debug_info = ((PyObject*)Py_None);
  54155. }
  54156. __pyx_L7:;
  54157. /* "uvloop/cbhandles.pyx":204
  54158. * self._debug_info = None
  54159. *
  54160. * self.timer = UVTimer.new( # <<<<<<<<<<<<<<
  54161. * loop, <method_t>self._run, self, delay)
  54162. *
  54163. */
  54164. __pyx_t_6 = ((PyObject *)__pyx_f_6uvloop_4loop_7UVTimer_new(__pyx_v_loop, ((__pyx_t_6uvloop_4loop_method_t)((struct __pyx_vtabstruct_6uvloop_4loop_TimerHandle *)__pyx_v_self->__pyx_vtab)->_run), ((PyObject *)__pyx_v_self), __pyx_v_delay)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 204, __pyx_L1_error)
  54165. __Pyx_GOTREF(__pyx_t_6);
  54166. __Pyx_GIVEREF(__pyx_t_6);
  54167. __Pyx_GOTREF(__pyx_v_self->timer);
  54168. __Pyx_DECREF(((PyObject *)__pyx_v_self->timer));
  54169. __pyx_v_self->timer = ((struct __pyx_obj_6uvloop_4loop_UVTimer *)__pyx_t_6);
  54170. __pyx_t_6 = 0;
  54171. /* "uvloop/cbhandles.pyx":207
  54172. * loop, <method_t>self._run, self, delay)
  54173. *
  54174. * self.timer.start() # <<<<<<<<<<<<<<
  54175. *
  54176. * # Only add to loop._timers when `self.timer` is successfully created
  54177. */
  54178. __pyx_t_6 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVTimer *)__pyx_v_self->timer->__pyx_base.__pyx_vtab)->start(__pyx_v_self->timer); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 207, __pyx_L1_error)
  54179. __Pyx_GOTREF(__pyx_t_6);
  54180. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  54181. /* "uvloop/cbhandles.pyx":210
  54182. *
  54183. * # Only add to loop._timers when `self.timer` is successfully created
  54184. * loop._timers.add(self) # <<<<<<<<<<<<<<
  54185. *
  54186. * property _source_traceback:
  54187. */
  54188. if (unlikely(__pyx_v_loop->_timers == Py_None)) {
  54189. PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "add");
  54190. __PYX_ERR(3, 210, __pyx_L1_error)
  54191. }
  54192. __pyx_t_7 = PySet_Add(__pyx_v_loop->_timers, ((PyObject *)__pyx_v_self)); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(3, 210, __pyx_L1_error)
  54193. /* "uvloop/cbhandles.pyx":174
  54194. * @cython.freelist(DEFAULT_FREELIST_SIZE)
  54195. * cdef class TimerHandle:
  54196. * def __cinit__(self, Loop loop, object callback, object args, # <<<<<<<<<<<<<<
  54197. * uint64_t delay, object context):
  54198. *
  54199. */
  54200. /* function exit code */
  54201. __pyx_r = 0;
  54202. goto __pyx_L0;
  54203. __pyx_L1_error:;
  54204. __Pyx_XDECREF(__pyx_t_1);
  54205. __Pyx_XDECREF(((PyObject *)__pyx_t_3));
  54206. __Pyx_XDECREF(__pyx_t_5);
  54207. __Pyx_XDECREF(__pyx_t_6);
  54208. __Pyx_AddTraceback("uvloop.loop.TimerHandle.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  54209. __pyx_r = -1;
  54210. __pyx_L0:;
  54211. __Pyx_XDECREF(__pyx_v_context);
  54212. __Pyx_RefNannyFinishContext();
  54213. return __pyx_r;
  54214. }
  54215. /* "uvloop/cbhandles.pyx":213
  54216. *
  54217. * property _source_traceback:
  54218. * def __get__(self): # <<<<<<<<<<<<<<
  54219. * if self._debug_info is not None:
  54220. * return self._debug_info[1]
  54221. */
  54222. /* Python wrapper */
  54223. static PyObject *__pyx_pw_6uvloop_4loop_11TimerHandle_17_source_traceback_1__get__(PyObject *__pyx_v_self); /*proto*/
  54224. static PyObject *__pyx_pw_6uvloop_4loop_11TimerHandle_17_source_traceback_1__get__(PyObject *__pyx_v_self) {
  54225. PyObject *__pyx_r = 0;
  54226. __Pyx_RefNannyDeclarations
  54227. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  54228. __pyx_r = __pyx_pf_6uvloop_4loop_11TimerHandle_17_source_traceback___get__(((struct __pyx_obj_6uvloop_4loop_TimerHandle *)__pyx_v_self));
  54229. /* function exit code */
  54230. __Pyx_RefNannyFinishContext();
  54231. return __pyx_r;
  54232. }
  54233. static PyObject *__pyx_pf_6uvloop_4loop_11TimerHandle_17_source_traceback___get__(struct __pyx_obj_6uvloop_4loop_TimerHandle *__pyx_v_self) {
  54234. PyObject *__pyx_r = NULL;
  54235. __Pyx_RefNannyDeclarations
  54236. int __pyx_t_1;
  54237. int __pyx_t_2;
  54238. PyObject *__pyx_t_3 = NULL;
  54239. __Pyx_RefNannySetupContext("__get__", 0);
  54240. /* "uvloop/cbhandles.pyx":214
  54241. * property _source_traceback:
  54242. * def __get__(self):
  54243. * if self._debug_info is not None: # <<<<<<<<<<<<<<
  54244. * return self._debug_info[1]
  54245. *
  54246. */
  54247. __pyx_t_1 = (__pyx_v_self->_debug_info != ((PyObject*)Py_None));
  54248. __pyx_t_2 = (__pyx_t_1 != 0);
  54249. if (__pyx_t_2) {
  54250. /* "uvloop/cbhandles.pyx":215
  54251. * def __get__(self):
  54252. * if self._debug_info is not None:
  54253. * return self._debug_info[1] # <<<<<<<<<<<<<<
  54254. *
  54255. * def __dealloc__(self):
  54256. */
  54257. __Pyx_XDECREF(__pyx_r);
  54258. if (unlikely(__pyx_v_self->_debug_info == Py_None)) {
  54259. PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
  54260. __PYX_ERR(3, 215, __pyx_L1_error)
  54261. }
  54262. __pyx_t_3 = __Pyx_GetItemInt_Tuple(__pyx_v_self->_debug_info, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 215, __pyx_L1_error)
  54263. __Pyx_GOTREF(__pyx_t_3);
  54264. __pyx_r = __pyx_t_3;
  54265. __pyx_t_3 = 0;
  54266. goto __pyx_L0;
  54267. /* "uvloop/cbhandles.pyx":214
  54268. * property _source_traceback:
  54269. * def __get__(self):
  54270. * if self._debug_info is not None: # <<<<<<<<<<<<<<
  54271. * return self._debug_info[1]
  54272. *
  54273. */
  54274. }
  54275. /* "uvloop/cbhandles.pyx":213
  54276. *
  54277. * property _source_traceback:
  54278. * def __get__(self): # <<<<<<<<<<<<<<
  54279. * if self._debug_info is not None:
  54280. * return self._debug_info[1]
  54281. */
  54282. /* function exit code */
  54283. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  54284. goto __pyx_L0;
  54285. __pyx_L1_error:;
  54286. __Pyx_XDECREF(__pyx_t_3);
  54287. __Pyx_AddTraceback("uvloop.loop.TimerHandle._source_traceback.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  54288. __pyx_r = NULL;
  54289. __pyx_L0:;
  54290. __Pyx_XGIVEREF(__pyx_r);
  54291. __Pyx_RefNannyFinishContext();
  54292. return __pyx_r;
  54293. }
  54294. /* "uvloop/cbhandles.pyx":217
  54295. * return self._debug_info[1]
  54296. *
  54297. * def __dealloc__(self): # <<<<<<<<<<<<<<
  54298. * if UVLOOP_DEBUG:
  54299. * self.loop._debug_cb_timer_handles_count -= 1
  54300. */
  54301. /* Python wrapper */
  54302. static void __pyx_pw_6uvloop_4loop_11TimerHandle_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
  54303. static void __pyx_pw_6uvloop_4loop_11TimerHandle_3__dealloc__(PyObject *__pyx_v_self) {
  54304. __Pyx_RefNannyDeclarations
  54305. __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  54306. __pyx_pf_6uvloop_4loop_11TimerHandle_2__dealloc__(((struct __pyx_obj_6uvloop_4loop_TimerHandle *)__pyx_v_self));
  54307. /* function exit code */
  54308. __Pyx_RefNannyFinishContext();
  54309. }
  54310. static void __pyx_pf_6uvloop_4loop_11TimerHandle_2__dealloc__(struct __pyx_obj_6uvloop_4loop_TimerHandle *__pyx_v_self) {
  54311. __Pyx_RefNannyDeclarations
  54312. int __pyx_t_1;
  54313. struct __pyx_obj_6uvloop_4loop_Loop *__pyx_t_2 = NULL;
  54314. int __pyx_t_3;
  54315. PyObject *__pyx_t_4 = NULL;
  54316. __Pyx_RefNannySetupContext("__dealloc__", 0);
  54317. /* "uvloop/cbhandles.pyx":218
  54318. *
  54319. * def __dealloc__(self):
  54320. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  54321. * self.loop._debug_cb_timer_handles_count -= 1
  54322. * if self.timer is not None:
  54323. */
  54324. __pyx_t_1 = (UVLOOP_DEBUG != 0);
  54325. if (__pyx_t_1) {
  54326. /* "uvloop/cbhandles.pyx":219
  54327. * def __dealloc__(self):
  54328. * if UVLOOP_DEBUG:
  54329. * self.loop._debug_cb_timer_handles_count -= 1 # <<<<<<<<<<<<<<
  54330. * if self.timer is not None:
  54331. * raise RuntimeError('active TimerHandle is deallacating')
  54332. */
  54333. __Pyx_INCREF(((PyObject *)__pyx_v_self->loop));
  54334. __pyx_t_2 = __pyx_v_self->loop;
  54335. __pyx_t_2->_debug_cb_timer_handles_count = (__pyx_t_2->_debug_cb_timer_handles_count - 1);
  54336. __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  54337. /* "uvloop/cbhandles.pyx":218
  54338. *
  54339. * def __dealloc__(self):
  54340. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  54341. * self.loop._debug_cb_timer_handles_count -= 1
  54342. * if self.timer is not None:
  54343. */
  54344. }
  54345. /* "uvloop/cbhandles.pyx":220
  54346. * if UVLOOP_DEBUG:
  54347. * self.loop._debug_cb_timer_handles_count -= 1
  54348. * if self.timer is not None: # <<<<<<<<<<<<<<
  54349. * raise RuntimeError('active TimerHandle is deallacating')
  54350. *
  54351. */
  54352. __pyx_t_1 = (((PyObject *)__pyx_v_self->timer) != Py_None);
  54353. __pyx_t_3 = (__pyx_t_1 != 0);
  54354. if (unlikely(__pyx_t_3)) {
  54355. /* "uvloop/cbhandles.pyx":221
  54356. * self.loop._debug_cb_timer_handles_count -= 1
  54357. * if self.timer is not None:
  54358. * raise RuntimeError('active TimerHandle is deallacating') # <<<<<<<<<<<<<<
  54359. *
  54360. * cdef _cancel(self):
  54361. */
  54362. __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__93, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 221, __pyx_L1_error)
  54363. __Pyx_GOTREF(__pyx_t_4);
  54364. __Pyx_Raise(__pyx_t_4, 0, 0, 0);
  54365. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  54366. __PYX_ERR(3, 221, __pyx_L1_error)
  54367. /* "uvloop/cbhandles.pyx":220
  54368. * if UVLOOP_DEBUG:
  54369. * self.loop._debug_cb_timer_handles_count -= 1
  54370. * if self.timer is not None: # <<<<<<<<<<<<<<
  54371. * raise RuntimeError('active TimerHandle is deallacating')
  54372. *
  54373. */
  54374. }
  54375. /* "uvloop/cbhandles.pyx":217
  54376. * return self._debug_info[1]
  54377. *
  54378. * def __dealloc__(self): # <<<<<<<<<<<<<<
  54379. * if UVLOOP_DEBUG:
  54380. * self.loop._debug_cb_timer_handles_count -= 1
  54381. */
  54382. /* function exit code */
  54383. goto __pyx_L0;
  54384. __pyx_L1_error:;
  54385. __Pyx_XDECREF(((PyObject *)__pyx_t_2));
  54386. __Pyx_XDECREF(__pyx_t_4);
  54387. __Pyx_WriteUnraisable("uvloop.loop.TimerHandle.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  54388. __pyx_L0:;
  54389. __Pyx_RefNannyFinishContext();
  54390. }
  54391. /* "uvloop/cbhandles.pyx":223
  54392. * raise RuntimeError('active TimerHandle is deallacating')
  54393. *
  54394. * cdef _cancel(self): # <<<<<<<<<<<<<<
  54395. * if self._cancelled == 1:
  54396. * return
  54397. */
  54398. static PyObject *__pyx_f_6uvloop_4loop_11TimerHandle__cancel(struct __pyx_obj_6uvloop_4loop_TimerHandle *__pyx_v_self) {
  54399. PyObject *__pyx_r = NULL;
  54400. __Pyx_RefNannyDeclarations
  54401. int __pyx_t_1;
  54402. PyObject *__pyx_t_2 = NULL;
  54403. __Pyx_RefNannySetupContext("_cancel", 0);
  54404. /* "uvloop/cbhandles.pyx":224
  54405. *
  54406. * cdef _cancel(self):
  54407. * if self._cancelled == 1: # <<<<<<<<<<<<<<
  54408. * return
  54409. * self._cancelled = 1
  54410. */
  54411. __pyx_t_1 = ((__pyx_v_self->_cancelled == 1) != 0);
  54412. if (__pyx_t_1) {
  54413. /* "uvloop/cbhandles.pyx":225
  54414. * cdef _cancel(self):
  54415. * if self._cancelled == 1:
  54416. * return # <<<<<<<<<<<<<<
  54417. * self._cancelled = 1
  54418. * self._clear()
  54419. */
  54420. __Pyx_XDECREF(__pyx_r);
  54421. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  54422. goto __pyx_L0;
  54423. /* "uvloop/cbhandles.pyx":224
  54424. *
  54425. * cdef _cancel(self):
  54426. * if self._cancelled == 1: # <<<<<<<<<<<<<<
  54427. * return
  54428. * self._cancelled = 1
  54429. */
  54430. }
  54431. /* "uvloop/cbhandles.pyx":226
  54432. * if self._cancelled == 1:
  54433. * return
  54434. * self._cancelled = 1 # <<<<<<<<<<<<<<
  54435. * self._clear()
  54436. *
  54437. */
  54438. __pyx_v_self->_cancelled = 1;
  54439. /* "uvloop/cbhandles.pyx":227
  54440. * return
  54441. * self._cancelled = 1
  54442. * self._clear() # <<<<<<<<<<<<<<
  54443. *
  54444. * cdef inline _clear(self):
  54445. */
  54446. __pyx_t_2 = __pyx_f_6uvloop_4loop_11TimerHandle__clear(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 227, __pyx_L1_error)
  54447. __Pyx_GOTREF(__pyx_t_2);
  54448. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  54449. /* "uvloop/cbhandles.pyx":223
  54450. * raise RuntimeError('active TimerHandle is deallacating')
  54451. *
  54452. * cdef _cancel(self): # <<<<<<<<<<<<<<
  54453. * if self._cancelled == 1:
  54454. * return
  54455. */
  54456. /* function exit code */
  54457. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  54458. goto __pyx_L0;
  54459. __pyx_L1_error:;
  54460. __Pyx_XDECREF(__pyx_t_2);
  54461. __Pyx_AddTraceback("uvloop.loop.TimerHandle._cancel", __pyx_clineno, __pyx_lineno, __pyx_filename);
  54462. __pyx_r = 0;
  54463. __pyx_L0:;
  54464. __Pyx_XGIVEREF(__pyx_r);
  54465. __Pyx_RefNannyFinishContext();
  54466. return __pyx_r;
  54467. }
  54468. /* "uvloop/cbhandles.pyx":229
  54469. * self._clear()
  54470. *
  54471. * cdef inline _clear(self): # <<<<<<<<<<<<<<
  54472. * if self.timer is None:
  54473. * return
  54474. */
  54475. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_11TimerHandle__clear(struct __pyx_obj_6uvloop_4loop_TimerHandle *__pyx_v_self) {
  54476. PyObject *__pyx_r = NULL;
  54477. __Pyx_RefNannyDeclarations
  54478. int __pyx_t_1;
  54479. int __pyx_t_2;
  54480. int __pyx_t_3;
  54481. PyObject *__pyx_t_4 = NULL;
  54482. int __pyx_t_5;
  54483. int __pyx_t_6;
  54484. char const *__pyx_t_7;
  54485. PyObject *__pyx_t_8 = NULL;
  54486. PyObject *__pyx_t_9 = NULL;
  54487. PyObject *__pyx_t_10 = NULL;
  54488. PyObject *__pyx_t_11 = NULL;
  54489. PyObject *__pyx_t_12 = NULL;
  54490. PyObject *__pyx_t_13 = NULL;
  54491. __Pyx_RefNannySetupContext("_clear", 0);
  54492. /* "uvloop/cbhandles.pyx":230
  54493. *
  54494. * cdef inline _clear(self):
  54495. * if self.timer is None: # <<<<<<<<<<<<<<
  54496. * return
  54497. *
  54498. */
  54499. __pyx_t_1 = (((PyObject *)__pyx_v_self->timer) == Py_None);
  54500. __pyx_t_2 = (__pyx_t_1 != 0);
  54501. if (__pyx_t_2) {
  54502. /* "uvloop/cbhandles.pyx":231
  54503. * cdef inline _clear(self):
  54504. * if self.timer is None:
  54505. * return # <<<<<<<<<<<<<<
  54506. *
  54507. * self.callback = None
  54508. */
  54509. __Pyx_XDECREF(__pyx_r);
  54510. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  54511. goto __pyx_L0;
  54512. /* "uvloop/cbhandles.pyx":230
  54513. *
  54514. * cdef inline _clear(self):
  54515. * if self.timer is None: # <<<<<<<<<<<<<<
  54516. * return
  54517. *
  54518. */
  54519. }
  54520. /* "uvloop/cbhandles.pyx":233
  54521. * return
  54522. *
  54523. * self.callback = None # <<<<<<<<<<<<<<
  54524. * self.args = None
  54525. *
  54526. */
  54527. __Pyx_INCREF(Py_None);
  54528. __Pyx_GIVEREF(Py_None);
  54529. __Pyx_GOTREF(__pyx_v_self->callback);
  54530. __Pyx_DECREF(__pyx_v_self->callback);
  54531. __pyx_v_self->callback = Py_None;
  54532. /* "uvloop/cbhandles.pyx":234
  54533. *
  54534. * self.callback = None
  54535. * self.args = None # <<<<<<<<<<<<<<
  54536. *
  54537. * try:
  54538. */
  54539. __Pyx_INCREF(Py_None);
  54540. __Pyx_GIVEREF(Py_None);
  54541. __Pyx_GOTREF(__pyx_v_self->args);
  54542. __Pyx_DECREF(__pyx_v_self->args);
  54543. __pyx_v_self->args = ((PyObject*)Py_None);
  54544. /* "uvloop/cbhandles.pyx":236
  54545. * self.args = None
  54546. *
  54547. * try: # <<<<<<<<<<<<<<
  54548. * self.loop._timers.remove(self)
  54549. * finally:
  54550. */
  54551. /*try:*/ {
  54552. /* "uvloop/cbhandles.pyx":237
  54553. *
  54554. * try:
  54555. * self.loop._timers.remove(self) # <<<<<<<<<<<<<<
  54556. * finally:
  54557. * self.timer._close()
  54558. */
  54559. if (unlikely(__pyx_v_self->loop->_timers == Py_None)) {
  54560. PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "remove");
  54561. __PYX_ERR(3, 237, __pyx_L5_error)
  54562. }
  54563. __pyx_t_3 = __Pyx_PySet_Remove(__pyx_v_self->loop->_timers, ((PyObject *)__pyx_v_self)); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(3, 237, __pyx_L5_error)
  54564. }
  54565. /* "uvloop/cbhandles.pyx":239
  54566. * self.loop._timers.remove(self)
  54567. * finally:
  54568. * self.timer._close() # <<<<<<<<<<<<<<
  54569. * self.timer = None # let the UVTimer handle GC
  54570. *
  54571. */
  54572. /*finally:*/ {
  54573. /*normal exit:*/{
  54574. __pyx_t_4 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVTimer *)__pyx_v_self->timer->__pyx_base.__pyx_vtab)->__pyx_base._close(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self->timer)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 239, __pyx_L1_error)
  54575. __Pyx_GOTREF(__pyx_t_4);
  54576. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  54577. /* "uvloop/cbhandles.pyx":240
  54578. * finally:
  54579. * self.timer._close()
  54580. * self.timer = None # let the UVTimer handle GC # <<<<<<<<<<<<<<
  54581. *
  54582. * cdef _run(self):
  54583. */
  54584. __Pyx_INCREF(Py_None);
  54585. __Pyx_GIVEREF(Py_None);
  54586. __Pyx_GOTREF(__pyx_v_self->timer);
  54587. __Pyx_DECREF(((PyObject *)__pyx_v_self->timer));
  54588. __pyx_v_self->timer = ((struct __pyx_obj_6uvloop_4loop_UVTimer *)Py_None);
  54589. goto __pyx_L6;
  54590. }
  54591. __pyx_L5_error:;
  54592. /*exception exit:*/{
  54593. __Pyx_PyThreadState_declare
  54594. __Pyx_PyThreadState_assign
  54595. __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0;
  54596. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
  54597. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10) < 0)) __Pyx_ErrFetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
  54598. __Pyx_XGOTREF(__pyx_t_8);
  54599. __Pyx_XGOTREF(__pyx_t_9);
  54600. __Pyx_XGOTREF(__pyx_t_10);
  54601. __Pyx_XGOTREF(__pyx_t_11);
  54602. __Pyx_XGOTREF(__pyx_t_12);
  54603. __Pyx_XGOTREF(__pyx_t_13);
  54604. __pyx_t_5 = __pyx_lineno; __pyx_t_6 = __pyx_clineno; __pyx_t_7 = __pyx_filename;
  54605. {
  54606. /* "uvloop/cbhandles.pyx":239
  54607. * self.loop._timers.remove(self)
  54608. * finally:
  54609. * self.timer._close() # <<<<<<<<<<<<<<
  54610. * self.timer = None # let the UVTimer handle GC
  54611. *
  54612. */
  54613. __pyx_t_4 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVTimer *)__pyx_v_self->timer->__pyx_base.__pyx_vtab)->__pyx_base._close(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self->timer)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 239, __pyx_L8_error)
  54614. __Pyx_GOTREF(__pyx_t_4);
  54615. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  54616. /* "uvloop/cbhandles.pyx":240
  54617. * finally:
  54618. * self.timer._close()
  54619. * self.timer = None # let the UVTimer handle GC # <<<<<<<<<<<<<<
  54620. *
  54621. * cdef _run(self):
  54622. */
  54623. __Pyx_INCREF(Py_None);
  54624. __Pyx_GIVEREF(Py_None);
  54625. __Pyx_GOTREF(__pyx_v_self->timer);
  54626. __Pyx_DECREF(((PyObject *)__pyx_v_self->timer));
  54627. __pyx_v_self->timer = ((struct __pyx_obj_6uvloop_4loop_UVTimer *)Py_None);
  54628. }
  54629. if (PY_MAJOR_VERSION >= 3) {
  54630. __Pyx_XGIVEREF(__pyx_t_11);
  54631. __Pyx_XGIVEREF(__pyx_t_12);
  54632. __Pyx_XGIVEREF(__pyx_t_13);
  54633. __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13);
  54634. }
  54635. __Pyx_XGIVEREF(__pyx_t_8);
  54636. __Pyx_XGIVEREF(__pyx_t_9);
  54637. __Pyx_XGIVEREF(__pyx_t_10);
  54638. __Pyx_ErrRestore(__pyx_t_8, __pyx_t_9, __pyx_t_10);
  54639. __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0;
  54640. __pyx_lineno = __pyx_t_5; __pyx_clineno = __pyx_t_6; __pyx_filename = __pyx_t_7;
  54641. goto __pyx_L1_error;
  54642. __pyx_L8_error:;
  54643. if (PY_MAJOR_VERSION >= 3) {
  54644. __Pyx_XGIVEREF(__pyx_t_11);
  54645. __Pyx_XGIVEREF(__pyx_t_12);
  54646. __Pyx_XGIVEREF(__pyx_t_13);
  54647. __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13);
  54648. }
  54649. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  54650. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  54651. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  54652. __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0;
  54653. goto __pyx_L1_error;
  54654. }
  54655. __pyx_L6:;
  54656. }
  54657. /* "uvloop/cbhandles.pyx":229
  54658. * self._clear()
  54659. *
  54660. * cdef inline _clear(self): # <<<<<<<<<<<<<<
  54661. * if self.timer is None:
  54662. * return
  54663. */
  54664. /* function exit code */
  54665. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  54666. goto __pyx_L0;
  54667. __pyx_L1_error:;
  54668. __Pyx_XDECREF(__pyx_t_4);
  54669. __Pyx_AddTraceback("uvloop.loop.TimerHandle._clear", __pyx_clineno, __pyx_lineno, __pyx_filename);
  54670. __pyx_r = 0;
  54671. __pyx_L0:;
  54672. __Pyx_XGIVEREF(__pyx_r);
  54673. __Pyx_RefNannyFinishContext();
  54674. return __pyx_r;
  54675. }
  54676. /* "uvloop/cbhandles.pyx":242
  54677. * self.timer = None # let the UVTimer handle GC
  54678. *
  54679. * cdef _run(self): # <<<<<<<<<<<<<<
  54680. * if self._cancelled == 1:
  54681. * return
  54682. */
  54683. static PyObject *__pyx_f_6uvloop_4loop_11TimerHandle__run(struct __pyx_obj_6uvloop_4loop_TimerHandle *__pyx_v_self) {
  54684. PyObject *__pyx_v_callback = NULL;
  54685. PyObject *__pyx_v_args = NULL;
  54686. PyObject *__pyx_v_started = NULL;
  54687. PyObject *__pyx_v_ex = NULL;
  54688. PyObject *__pyx_v_context = NULL;
  54689. PyObject *__pyx_v_delta = NULL;
  54690. PyObject *__pyx_r = NULL;
  54691. __Pyx_RefNannyDeclarations
  54692. int __pyx_t_1;
  54693. int __pyx_t_2;
  54694. PyObject *__pyx_t_3 = NULL;
  54695. PyObject *__pyx_t_4 = NULL;
  54696. PyObject *__pyx_t_5 = NULL;
  54697. PyObject *__pyx_t_6 = NULL;
  54698. PyObject *__pyx_t_7 = NULL;
  54699. PyObject *__pyx_t_8 = NULL;
  54700. int __pyx_t_9;
  54701. PyObject *__pyx_t_10 = NULL;
  54702. PyObject *__pyx_t_11 = NULL;
  54703. PyObject *__pyx_t_12 = NULL;
  54704. PyObject *__pyx_t_13 = NULL;
  54705. int __pyx_t_14;
  54706. char const *__pyx_t_15;
  54707. PyObject *__pyx_t_16 = NULL;
  54708. PyObject *__pyx_t_17 = NULL;
  54709. PyObject *__pyx_t_18 = NULL;
  54710. PyObject *__pyx_t_19 = NULL;
  54711. PyObject *__pyx_t_20 = NULL;
  54712. PyObject *__pyx_t_21 = NULL;
  54713. char const *__pyx_t_22;
  54714. int __pyx_t_23;
  54715. __Pyx_RefNannySetupContext("_run", 0);
  54716. /* "uvloop/cbhandles.pyx":243
  54717. *
  54718. * cdef _run(self):
  54719. * if self._cancelled == 1: # <<<<<<<<<<<<<<
  54720. * return
  54721. * if self.callback is None:
  54722. */
  54723. __pyx_t_1 = ((__pyx_v_self->_cancelled == 1) != 0);
  54724. if (__pyx_t_1) {
  54725. /* "uvloop/cbhandles.pyx":244
  54726. * cdef _run(self):
  54727. * if self._cancelled == 1:
  54728. * return # <<<<<<<<<<<<<<
  54729. * if self.callback is None:
  54730. * raise RuntimeError('cannot run TimerHandle; callback is not set')
  54731. */
  54732. __Pyx_XDECREF(__pyx_r);
  54733. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  54734. goto __pyx_L0;
  54735. /* "uvloop/cbhandles.pyx":243
  54736. *
  54737. * cdef _run(self):
  54738. * if self._cancelled == 1: # <<<<<<<<<<<<<<
  54739. * return
  54740. * if self.callback is None:
  54741. */
  54742. }
  54743. /* "uvloop/cbhandles.pyx":245
  54744. * if self._cancelled == 1:
  54745. * return
  54746. * if self.callback is None: # <<<<<<<<<<<<<<
  54747. * raise RuntimeError('cannot run TimerHandle; callback is not set')
  54748. *
  54749. */
  54750. __pyx_t_1 = (__pyx_v_self->callback == Py_None);
  54751. __pyx_t_2 = (__pyx_t_1 != 0);
  54752. if (unlikely(__pyx_t_2)) {
  54753. /* "uvloop/cbhandles.pyx":246
  54754. * return
  54755. * if self.callback is None:
  54756. * raise RuntimeError('cannot run TimerHandle; callback is not set') # <<<<<<<<<<<<<<
  54757. *
  54758. * callback = self.callback
  54759. */
  54760. __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__94, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 246, __pyx_L1_error)
  54761. __Pyx_GOTREF(__pyx_t_3);
  54762. __Pyx_Raise(__pyx_t_3, 0, 0, 0);
  54763. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  54764. __PYX_ERR(3, 246, __pyx_L1_error)
  54765. /* "uvloop/cbhandles.pyx":245
  54766. * if self._cancelled == 1:
  54767. * return
  54768. * if self.callback is None: # <<<<<<<<<<<<<<
  54769. * raise RuntimeError('cannot run TimerHandle; callback is not set')
  54770. *
  54771. */
  54772. }
  54773. /* "uvloop/cbhandles.pyx":248
  54774. * raise RuntimeError('cannot run TimerHandle; callback is not set')
  54775. *
  54776. * callback = self.callback # <<<<<<<<<<<<<<
  54777. * args = self.args
  54778. *
  54779. */
  54780. __pyx_t_3 = __pyx_v_self->callback;
  54781. __Pyx_INCREF(__pyx_t_3);
  54782. __pyx_v_callback = __pyx_t_3;
  54783. __pyx_t_3 = 0;
  54784. /* "uvloop/cbhandles.pyx":249
  54785. *
  54786. * callback = self.callback
  54787. * args = self.args # <<<<<<<<<<<<<<
  54788. *
  54789. * # Since _run is a cdef and there's no BoundMethod,
  54790. */
  54791. __pyx_t_3 = __pyx_v_self->args;
  54792. __Pyx_INCREF(__pyx_t_3);
  54793. __pyx_v_args = ((PyObject*)__pyx_t_3);
  54794. __pyx_t_3 = 0;
  54795. /* "uvloop/cbhandles.pyx":253
  54796. * # Since _run is a cdef and there's no BoundMethod,
  54797. * # we guard 'self' manually.
  54798. * Py_INCREF(self) # <<<<<<<<<<<<<<
  54799. *
  54800. * if self.loop._debug:
  54801. */
  54802. Py_INCREF(((PyObject *)__pyx_v_self));
  54803. /* "uvloop/cbhandles.pyx":255
  54804. * Py_INCREF(self)
  54805. *
  54806. * if self.loop._debug: # <<<<<<<<<<<<<<
  54807. * started = time_monotonic()
  54808. * try:
  54809. */
  54810. __pyx_t_2 = (__pyx_v_self->loop->_debug != 0);
  54811. if (__pyx_t_2) {
  54812. /* "uvloop/cbhandles.pyx":256
  54813. *
  54814. * if self.loop._debug:
  54815. * started = time_monotonic() # <<<<<<<<<<<<<<
  54816. * try:
  54817. * if PY37:
  54818. */
  54819. __Pyx_INCREF(__pyx_v_6uvloop_4loop_time_monotonic);
  54820. __pyx_t_4 = __pyx_v_6uvloop_4loop_time_monotonic; __pyx_t_5 = NULL;
  54821. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
  54822. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
  54823. if (likely(__pyx_t_5)) {
  54824. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  54825. __Pyx_INCREF(__pyx_t_5);
  54826. __Pyx_INCREF(function);
  54827. __Pyx_DECREF_SET(__pyx_t_4, function);
  54828. }
  54829. }
  54830. __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
  54831. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  54832. if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 256, __pyx_L1_error)
  54833. __Pyx_GOTREF(__pyx_t_3);
  54834. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  54835. __pyx_v_started = __pyx_t_3;
  54836. __pyx_t_3 = 0;
  54837. /* "uvloop/cbhandles.pyx":255
  54838. * Py_INCREF(self)
  54839. *
  54840. * if self.loop._debug: # <<<<<<<<<<<<<<
  54841. * started = time_monotonic()
  54842. * try:
  54843. */
  54844. }
  54845. /* "uvloop/cbhandles.pyx":257
  54846. * if self.loop._debug:
  54847. * started = time_monotonic()
  54848. * try: # <<<<<<<<<<<<<<
  54849. * if PY37:
  54850. * assert self.context is not None
  54851. */
  54852. /*try:*/ {
  54853. {
  54854. __Pyx_PyThreadState_declare
  54855. __Pyx_PyThreadState_assign
  54856. __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
  54857. __Pyx_XGOTREF(__pyx_t_6);
  54858. __Pyx_XGOTREF(__pyx_t_7);
  54859. __Pyx_XGOTREF(__pyx_t_8);
  54860. /*try:*/ {
  54861. /* "uvloop/cbhandles.pyx":258
  54862. * started = time_monotonic()
  54863. * try:
  54864. * if PY37: # <<<<<<<<<<<<<<
  54865. * assert self.context is not None
  54866. * Context_Enter(self.context)
  54867. */
  54868. __pyx_t_2 = (__pyx_v_6uvloop_4loop_PY37 != 0);
  54869. if (__pyx_t_2) {
  54870. /* "uvloop/cbhandles.pyx":259
  54871. * try:
  54872. * if PY37:
  54873. * assert self.context is not None # <<<<<<<<<<<<<<
  54874. * Context_Enter(self.context)
  54875. *
  54876. */
  54877. #ifndef CYTHON_WITHOUT_ASSERTIONS
  54878. if (unlikely(!Py_OptimizeFlag)) {
  54879. __pyx_t_2 = (__pyx_v_self->context != Py_None);
  54880. if (unlikely(!(__pyx_t_2 != 0))) {
  54881. PyErr_SetNone(PyExc_AssertionError);
  54882. __PYX_ERR(3, 259, __pyx_L9_error)
  54883. }
  54884. }
  54885. #endif
  54886. /* "uvloop/cbhandles.pyx":260
  54887. * if PY37:
  54888. * assert self.context is not None
  54889. * Context_Enter(self.context) # <<<<<<<<<<<<<<
  54890. *
  54891. * if args is not None:
  54892. */
  54893. __pyx_t_3 = __pyx_v_self->context;
  54894. __Pyx_INCREF(__pyx_t_3);
  54895. __pyx_t_9 = Context_Enter(__pyx_t_3); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(3, 260, __pyx_L9_error)
  54896. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  54897. /* "uvloop/cbhandles.pyx":258
  54898. * started = time_monotonic()
  54899. * try:
  54900. * if PY37: # <<<<<<<<<<<<<<
  54901. * assert self.context is not None
  54902. * Context_Enter(self.context)
  54903. */
  54904. }
  54905. /* "uvloop/cbhandles.pyx":262
  54906. * Context_Enter(self.context)
  54907. *
  54908. * if args is not None: # <<<<<<<<<<<<<<
  54909. * callback(*args)
  54910. * else:
  54911. */
  54912. __pyx_t_2 = (__pyx_v_args != ((PyObject*)Py_None));
  54913. __pyx_t_1 = (__pyx_t_2 != 0);
  54914. if (__pyx_t_1) {
  54915. /* "uvloop/cbhandles.pyx":263
  54916. *
  54917. * if args is not None:
  54918. * callback(*args) # <<<<<<<<<<<<<<
  54919. * else:
  54920. * callback()
  54921. */
  54922. if (unlikely(__pyx_v_args == Py_None)) {
  54923. PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
  54924. __PYX_ERR(3, 263, __pyx_L9_error)
  54925. }
  54926. __pyx_t_3 = __Pyx_PyObject_Call(__pyx_v_callback, __pyx_v_args, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 263, __pyx_L9_error)
  54927. __Pyx_GOTREF(__pyx_t_3);
  54928. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  54929. /* "uvloop/cbhandles.pyx":262
  54930. * Context_Enter(self.context)
  54931. *
  54932. * if args is not None: # <<<<<<<<<<<<<<
  54933. * callback(*args)
  54934. * else:
  54935. */
  54936. goto __pyx_L16;
  54937. }
  54938. /* "uvloop/cbhandles.pyx":265
  54939. * callback(*args)
  54940. * else:
  54941. * callback() # <<<<<<<<<<<<<<
  54942. * except Exception as ex:
  54943. * context = {
  54944. */
  54945. /*else*/ {
  54946. __Pyx_INCREF(__pyx_v_callback);
  54947. __pyx_t_4 = __pyx_v_callback; __pyx_t_5 = NULL;
  54948. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
  54949. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
  54950. if (likely(__pyx_t_5)) {
  54951. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  54952. __Pyx_INCREF(__pyx_t_5);
  54953. __Pyx_INCREF(function);
  54954. __Pyx_DECREF_SET(__pyx_t_4, function);
  54955. }
  54956. }
  54957. __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
  54958. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  54959. if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 265, __pyx_L9_error)
  54960. __Pyx_GOTREF(__pyx_t_3);
  54961. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  54962. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  54963. }
  54964. __pyx_L16:;
  54965. /* "uvloop/cbhandles.pyx":257
  54966. * if self.loop._debug:
  54967. * started = time_monotonic()
  54968. * try: # <<<<<<<<<<<<<<
  54969. * if PY37:
  54970. * assert self.context is not None
  54971. */
  54972. }
  54973. /* "uvloop/cbhandles.pyx":278
  54974. * self.loop.call_exception_handler(context)
  54975. * else:
  54976. * if self.loop._debug: # <<<<<<<<<<<<<<
  54977. * delta = time_monotonic() - started
  54978. * if delta > self.loop.slow_callback_duration:
  54979. */
  54980. /*else:*/ {
  54981. __pyx_t_1 = (__pyx_v_self->loop->_debug != 0);
  54982. if (__pyx_t_1) {
  54983. /* "uvloop/cbhandles.pyx":279
  54984. * else:
  54985. * if self.loop._debug:
  54986. * delta = time_monotonic() - started # <<<<<<<<<<<<<<
  54987. * if delta > self.loop.slow_callback_duration:
  54988. * aio_logger.warning(
  54989. */
  54990. __Pyx_INCREF(__pyx_v_6uvloop_4loop_time_monotonic);
  54991. __pyx_t_4 = __pyx_v_6uvloop_4loop_time_monotonic; __pyx_t_5 = NULL;
  54992. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
  54993. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
  54994. if (likely(__pyx_t_5)) {
  54995. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  54996. __Pyx_INCREF(__pyx_t_5);
  54997. __Pyx_INCREF(function);
  54998. __Pyx_DECREF_SET(__pyx_t_4, function);
  54999. }
  55000. }
  55001. __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
  55002. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  55003. if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 279, __pyx_L11_except_error)
  55004. __Pyx_GOTREF(__pyx_t_3);
  55005. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  55006. if (unlikely(!__pyx_v_started)) { __Pyx_RaiseUnboundLocalError("started"); __PYX_ERR(3, 279, __pyx_L11_except_error) }
  55007. __pyx_t_4 = PyNumber_Subtract(__pyx_t_3, __pyx_v_started); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 279, __pyx_L11_except_error)
  55008. __Pyx_GOTREF(__pyx_t_4);
  55009. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  55010. __pyx_v_delta = __pyx_t_4;
  55011. __pyx_t_4 = 0;
  55012. /* "uvloop/cbhandles.pyx":280
  55013. * if self.loop._debug:
  55014. * delta = time_monotonic() - started
  55015. * if delta > self.loop.slow_callback_duration: # <<<<<<<<<<<<<<
  55016. * aio_logger.warning(
  55017. * 'Executing %r took %.3f seconds',
  55018. */
  55019. __pyx_t_4 = PyObject_RichCompare(__pyx_v_delta, __pyx_v_self->loop->slow_callback_duration, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 280, __pyx_L11_except_error)
  55020. __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(3, 280, __pyx_L11_except_error)
  55021. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  55022. if (__pyx_t_1) {
  55023. /* "uvloop/cbhandles.pyx":281
  55024. * delta = time_monotonic() - started
  55025. * if delta > self.loop.slow_callback_duration:
  55026. * aio_logger.warning( # <<<<<<<<<<<<<<
  55027. * 'Executing %r took %.3f seconds',
  55028. * self, delta)
  55029. */
  55030. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_6uvloop_4loop_aio_logger, __pyx_n_s_warning); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 281, __pyx_L11_except_error)
  55031. __Pyx_GOTREF(__pyx_t_3);
  55032. /* "uvloop/cbhandles.pyx":283
  55033. * aio_logger.warning(
  55034. * 'Executing %r took %.3f seconds',
  55035. * self, delta) # <<<<<<<<<<<<<<
  55036. * finally:
  55037. * context = self.context
  55038. */
  55039. __pyx_t_5 = NULL;
  55040. __pyx_t_9 = 0;
  55041. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
  55042. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
  55043. if (likely(__pyx_t_5)) {
  55044. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  55045. __Pyx_INCREF(__pyx_t_5);
  55046. __Pyx_INCREF(function);
  55047. __Pyx_DECREF_SET(__pyx_t_3, function);
  55048. __pyx_t_9 = 1;
  55049. }
  55050. }
  55051. #if CYTHON_FAST_PYCALL
  55052. if (PyFunction_Check(__pyx_t_3)) {
  55053. PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_kp_u_Executing_r_took_3f_seconds, ((PyObject *)__pyx_v_self), __pyx_v_delta};
  55054. __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_9, 3+__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 281, __pyx_L11_except_error)
  55055. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  55056. __Pyx_GOTREF(__pyx_t_4);
  55057. } else
  55058. #endif
  55059. #if CYTHON_FAST_PYCCALL
  55060. if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
  55061. PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_kp_u_Executing_r_took_3f_seconds, ((PyObject *)__pyx_v_self), __pyx_v_delta};
  55062. __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_9, 3+__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 281, __pyx_L11_except_error)
  55063. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  55064. __Pyx_GOTREF(__pyx_t_4);
  55065. } else
  55066. #endif
  55067. {
  55068. __pyx_t_10 = PyTuple_New(3+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 281, __pyx_L11_except_error)
  55069. __Pyx_GOTREF(__pyx_t_10);
  55070. if (__pyx_t_5) {
  55071. __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_5); __pyx_t_5 = NULL;
  55072. }
  55073. __Pyx_INCREF(__pyx_kp_u_Executing_r_took_3f_seconds);
  55074. __Pyx_GIVEREF(__pyx_kp_u_Executing_r_took_3f_seconds);
  55075. PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_kp_u_Executing_r_took_3f_seconds);
  55076. __Pyx_INCREF(((PyObject *)__pyx_v_self));
  55077. __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  55078. PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, ((PyObject *)__pyx_v_self));
  55079. __Pyx_INCREF(__pyx_v_delta);
  55080. __Pyx_GIVEREF(__pyx_v_delta);
  55081. PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_9, __pyx_v_delta);
  55082. __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 281, __pyx_L11_except_error)
  55083. __Pyx_GOTREF(__pyx_t_4);
  55084. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  55085. }
  55086. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  55087. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  55088. /* "uvloop/cbhandles.pyx":280
  55089. * if self.loop._debug:
  55090. * delta = time_monotonic() - started
  55091. * if delta > self.loop.slow_callback_duration: # <<<<<<<<<<<<<<
  55092. * aio_logger.warning(
  55093. * 'Executing %r took %.3f seconds',
  55094. */
  55095. }
  55096. /* "uvloop/cbhandles.pyx":278
  55097. * self.loop.call_exception_handler(context)
  55098. * else:
  55099. * if self.loop._debug: # <<<<<<<<<<<<<<
  55100. * delta = time_monotonic() - started
  55101. * if delta > self.loop.slow_callback_duration:
  55102. */
  55103. }
  55104. }
  55105. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  55106. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  55107. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  55108. goto __pyx_L14_try_end;
  55109. __pyx_L9_error:;
  55110. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  55111. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  55112. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  55113. /* "uvloop/cbhandles.pyx":266
  55114. * else:
  55115. * callback()
  55116. * except Exception as ex: # <<<<<<<<<<<<<<
  55117. * context = {
  55118. * 'message': 'Exception in callback {}'.format(callback),
  55119. */
  55120. __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
  55121. if (__pyx_t_9) {
  55122. __Pyx_AddTraceback("uvloop.loop.TimerHandle._run", __pyx_clineno, __pyx_lineno, __pyx_filename);
  55123. if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_3, &__pyx_t_10) < 0) __PYX_ERR(3, 266, __pyx_L11_except_error)
  55124. __Pyx_GOTREF(__pyx_t_4);
  55125. __Pyx_GOTREF(__pyx_t_3);
  55126. __Pyx_GOTREF(__pyx_t_10);
  55127. __Pyx_INCREF(__pyx_t_3);
  55128. __pyx_v_ex = __pyx_t_3;
  55129. /*try:*/ {
  55130. /* "uvloop/cbhandles.pyx":268
  55131. * except Exception as ex:
  55132. * context = {
  55133. * 'message': 'Exception in callback {}'.format(callback), # <<<<<<<<<<<<<<
  55134. * 'exception': ex,
  55135. * 'handle': self,
  55136. */
  55137. __pyx_t_5 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 268, __pyx_L24_error)
  55138. __Pyx_GOTREF(__pyx_t_5);
  55139. __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Exception_in_callback, __pyx_n_s_format); if (unlikely(!__pyx_t_12)) __PYX_ERR(3, 268, __pyx_L24_error)
  55140. __Pyx_GOTREF(__pyx_t_12);
  55141. __pyx_t_13 = NULL;
  55142. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_12))) {
  55143. __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_12);
  55144. if (likely(__pyx_t_13)) {
  55145. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
  55146. __Pyx_INCREF(__pyx_t_13);
  55147. __Pyx_INCREF(function);
  55148. __Pyx_DECREF_SET(__pyx_t_12, function);
  55149. }
  55150. }
  55151. __pyx_t_11 = (__pyx_t_13) ? __Pyx_PyObject_Call2Args(__pyx_t_12, __pyx_t_13, __pyx_v_callback) : __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_v_callback);
  55152. __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
  55153. if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 268, __pyx_L24_error)
  55154. __Pyx_GOTREF(__pyx_t_11);
  55155. __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  55156. if (PyDict_SetItem(__pyx_t_5, __pyx_n_u_message, __pyx_t_11) < 0) __PYX_ERR(3, 268, __pyx_L24_error)
  55157. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  55158. /* "uvloop/cbhandles.pyx":269
  55159. * context = {
  55160. * 'message': 'Exception in callback {}'.format(callback),
  55161. * 'exception': ex, # <<<<<<<<<<<<<<
  55162. * 'handle': self,
  55163. * }
  55164. */
  55165. if (PyDict_SetItem(__pyx_t_5, __pyx_n_u_exception, __pyx_v_ex) < 0) __PYX_ERR(3, 268, __pyx_L24_error)
  55166. /* "uvloop/cbhandles.pyx":270
  55167. * 'message': 'Exception in callback {}'.format(callback),
  55168. * 'exception': ex,
  55169. * 'handle': self, # <<<<<<<<<<<<<<
  55170. * }
  55171. *
  55172. */
  55173. if (PyDict_SetItem(__pyx_t_5, __pyx_n_u_handle, ((PyObject *)__pyx_v_self)) < 0) __PYX_ERR(3, 268, __pyx_L24_error)
  55174. __pyx_v_context = __pyx_t_5;
  55175. __pyx_t_5 = 0;
  55176. /* "uvloop/cbhandles.pyx":273
  55177. * }
  55178. *
  55179. * if self._debug_info is not None: # <<<<<<<<<<<<<<
  55180. * context['source_traceback'] = self._debug_info[1]
  55181. *
  55182. */
  55183. __pyx_t_1 = (__pyx_v_self->_debug_info != ((PyObject*)Py_None));
  55184. __pyx_t_2 = (__pyx_t_1 != 0);
  55185. if (__pyx_t_2) {
  55186. /* "uvloop/cbhandles.pyx":274
  55187. *
  55188. * if self._debug_info is not None:
  55189. * context['source_traceback'] = self._debug_info[1] # <<<<<<<<<<<<<<
  55190. *
  55191. * self.loop.call_exception_handler(context)
  55192. */
  55193. if (unlikely(__pyx_v_self->_debug_info == Py_None)) {
  55194. PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
  55195. __PYX_ERR(3, 274, __pyx_L24_error)
  55196. }
  55197. __pyx_t_5 = __Pyx_GetItemInt_Tuple(__pyx_v_self->_debug_info, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 274, __pyx_L24_error)
  55198. __Pyx_GOTREF(__pyx_t_5);
  55199. if (unlikely(PyObject_SetItem(__pyx_v_context, __pyx_n_u_source_traceback, __pyx_t_5) < 0)) __PYX_ERR(3, 274, __pyx_L24_error)
  55200. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  55201. /* "uvloop/cbhandles.pyx":273
  55202. * }
  55203. *
  55204. * if self._debug_info is not None: # <<<<<<<<<<<<<<
  55205. * context['source_traceback'] = self._debug_info[1]
  55206. *
  55207. */
  55208. }
  55209. /* "uvloop/cbhandles.pyx":276
  55210. * context['source_traceback'] = self._debug_info[1]
  55211. *
  55212. * self.loop.call_exception_handler(context) # <<<<<<<<<<<<<<
  55213. * else:
  55214. * if self.loop._debug:
  55215. */
  55216. __pyx_t_11 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->loop), __pyx_n_s_call_exception_handler); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 276, __pyx_L24_error)
  55217. __Pyx_GOTREF(__pyx_t_11);
  55218. __pyx_t_12 = NULL;
  55219. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) {
  55220. __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_11);
  55221. if (likely(__pyx_t_12)) {
  55222. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
  55223. __Pyx_INCREF(__pyx_t_12);
  55224. __Pyx_INCREF(function);
  55225. __Pyx_DECREF_SET(__pyx_t_11, function);
  55226. }
  55227. }
  55228. __pyx_t_5 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_11, __pyx_t_12, __pyx_v_context) : __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_v_context);
  55229. __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
  55230. if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 276, __pyx_L24_error)
  55231. __Pyx_GOTREF(__pyx_t_5);
  55232. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  55233. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  55234. }
  55235. /* "uvloop/cbhandles.pyx":266
  55236. * else:
  55237. * callback()
  55238. * except Exception as ex: # <<<<<<<<<<<<<<
  55239. * context = {
  55240. * 'message': 'Exception in callback {}'.format(callback),
  55241. */
  55242. /*finally:*/ {
  55243. /*normal exit:*/{
  55244. __Pyx_DECREF(__pyx_v_ex);
  55245. __pyx_v_ex = NULL;
  55246. goto __pyx_L25;
  55247. }
  55248. __pyx_L24_error:;
  55249. /*exception exit:*/{
  55250. __Pyx_PyThreadState_declare
  55251. __Pyx_PyThreadState_assign
  55252. __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0;
  55253. __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
  55254. __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
  55255. __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
  55256. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  55257. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21);
  55258. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18) < 0)) __Pyx_ErrFetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18);
  55259. __Pyx_XGOTREF(__pyx_t_16);
  55260. __Pyx_XGOTREF(__pyx_t_17);
  55261. __Pyx_XGOTREF(__pyx_t_18);
  55262. __Pyx_XGOTREF(__pyx_t_19);
  55263. __Pyx_XGOTREF(__pyx_t_20);
  55264. __Pyx_XGOTREF(__pyx_t_21);
  55265. __pyx_t_9 = __pyx_lineno; __pyx_t_14 = __pyx_clineno; __pyx_t_15 = __pyx_filename;
  55266. {
  55267. __Pyx_DECREF(__pyx_v_ex);
  55268. __pyx_v_ex = NULL;
  55269. }
  55270. if (PY_MAJOR_VERSION >= 3) {
  55271. __Pyx_XGIVEREF(__pyx_t_19);
  55272. __Pyx_XGIVEREF(__pyx_t_20);
  55273. __Pyx_XGIVEREF(__pyx_t_21);
  55274. __Pyx_ExceptionReset(__pyx_t_19, __pyx_t_20, __pyx_t_21);
  55275. }
  55276. __Pyx_XGIVEREF(__pyx_t_16);
  55277. __Pyx_XGIVEREF(__pyx_t_17);
  55278. __Pyx_XGIVEREF(__pyx_t_18);
  55279. __Pyx_ErrRestore(__pyx_t_16, __pyx_t_17, __pyx_t_18);
  55280. __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0;
  55281. __pyx_lineno = __pyx_t_9; __pyx_clineno = __pyx_t_14; __pyx_filename = __pyx_t_15;
  55282. goto __pyx_L11_except_error;
  55283. }
  55284. __pyx_L25:;
  55285. }
  55286. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  55287. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  55288. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  55289. goto __pyx_L10_exception_handled;
  55290. }
  55291. goto __pyx_L11_except_error;
  55292. __pyx_L11_except_error:;
  55293. /* "uvloop/cbhandles.pyx":257
  55294. * if self.loop._debug:
  55295. * started = time_monotonic()
  55296. * try: # <<<<<<<<<<<<<<
  55297. * if PY37:
  55298. * assert self.context is not None
  55299. */
  55300. __Pyx_XGIVEREF(__pyx_t_6);
  55301. __Pyx_XGIVEREF(__pyx_t_7);
  55302. __Pyx_XGIVEREF(__pyx_t_8);
  55303. __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
  55304. goto __pyx_L7_error;
  55305. __pyx_L10_exception_handled:;
  55306. __Pyx_XGIVEREF(__pyx_t_6);
  55307. __Pyx_XGIVEREF(__pyx_t_7);
  55308. __Pyx_XGIVEREF(__pyx_t_8);
  55309. __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
  55310. __pyx_L14_try_end:;
  55311. }
  55312. }
  55313. /* "uvloop/cbhandles.pyx":285
  55314. * self, delta)
  55315. * finally:
  55316. * context = self.context # <<<<<<<<<<<<<<
  55317. * Py_DECREF(self)
  55318. * if PY37:
  55319. */
  55320. /*finally:*/ {
  55321. /*normal exit:*/{
  55322. __pyx_t_10 = __pyx_v_self->context;
  55323. __Pyx_INCREF(__pyx_t_10);
  55324. __Pyx_XDECREF_SET(__pyx_v_context, __pyx_t_10);
  55325. __pyx_t_10 = 0;
  55326. /* "uvloop/cbhandles.pyx":286
  55327. * finally:
  55328. * context = self.context
  55329. * Py_DECREF(self) # <<<<<<<<<<<<<<
  55330. * if PY37:
  55331. * Context_Exit(context)
  55332. */
  55333. Py_DECREF(((PyObject *)__pyx_v_self));
  55334. /* "uvloop/cbhandles.pyx":287
  55335. * context = self.context
  55336. * Py_DECREF(self)
  55337. * if PY37: # <<<<<<<<<<<<<<
  55338. * Context_Exit(context)
  55339. * self._clear()
  55340. */
  55341. __pyx_t_2 = (__pyx_v_6uvloop_4loop_PY37 != 0);
  55342. if (__pyx_t_2) {
  55343. /* "uvloop/cbhandles.pyx":288
  55344. * Py_DECREF(self)
  55345. * if PY37:
  55346. * Context_Exit(context) # <<<<<<<<<<<<<<
  55347. * self._clear()
  55348. *
  55349. */
  55350. __pyx_t_14 = Context_Exit(__pyx_v_context); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(3, 288, __pyx_L1_error)
  55351. /* "uvloop/cbhandles.pyx":287
  55352. * context = self.context
  55353. * Py_DECREF(self)
  55354. * if PY37: # <<<<<<<<<<<<<<
  55355. * Context_Exit(context)
  55356. * self._clear()
  55357. */
  55358. }
  55359. /* "uvloop/cbhandles.pyx":289
  55360. * if PY37:
  55361. * Context_Exit(context)
  55362. * self._clear() # <<<<<<<<<<<<<<
  55363. *
  55364. * # Public API
  55365. */
  55366. __pyx_t_10 = __pyx_f_6uvloop_4loop_11TimerHandle__clear(__pyx_v_self); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 289, __pyx_L1_error)
  55367. __Pyx_GOTREF(__pyx_t_10);
  55368. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  55369. goto __pyx_L8;
  55370. }
  55371. __pyx_L7_error:;
  55372. /*exception exit:*/{
  55373. __Pyx_PyThreadState_declare
  55374. __Pyx_PyThreadState_assign
  55375. __pyx_t_8 = 0; __pyx_t_7 = 0; __pyx_t_6 = 0; __pyx_t_21 = 0; __pyx_t_20 = 0; __pyx_t_19 = 0;
  55376. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  55377. __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
  55378. __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
  55379. __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
  55380. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  55381. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  55382. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  55383. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_21, &__pyx_t_20, &__pyx_t_19);
  55384. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_6) < 0)) __Pyx_ErrFetch(&__pyx_t_8, &__pyx_t_7, &__pyx_t_6);
  55385. __Pyx_XGOTREF(__pyx_t_8);
  55386. __Pyx_XGOTREF(__pyx_t_7);
  55387. __Pyx_XGOTREF(__pyx_t_6);
  55388. __Pyx_XGOTREF(__pyx_t_21);
  55389. __Pyx_XGOTREF(__pyx_t_20);
  55390. __Pyx_XGOTREF(__pyx_t_19);
  55391. __pyx_t_14 = __pyx_lineno; __pyx_t_9 = __pyx_clineno; __pyx_t_22 = __pyx_filename;
  55392. {
  55393. /* "uvloop/cbhandles.pyx":285
  55394. * self, delta)
  55395. * finally:
  55396. * context = self.context # <<<<<<<<<<<<<<
  55397. * Py_DECREF(self)
  55398. * if PY37:
  55399. */
  55400. __pyx_t_10 = __pyx_v_self->context;
  55401. __Pyx_INCREF(__pyx_t_10);
  55402. __Pyx_XDECREF_SET(__pyx_v_context, __pyx_t_10);
  55403. __pyx_t_10 = 0;
  55404. /* "uvloop/cbhandles.pyx":286
  55405. * finally:
  55406. * context = self.context
  55407. * Py_DECREF(self) # <<<<<<<<<<<<<<
  55408. * if PY37:
  55409. * Context_Exit(context)
  55410. */
  55411. Py_DECREF(((PyObject *)__pyx_v_self));
  55412. /* "uvloop/cbhandles.pyx":287
  55413. * context = self.context
  55414. * Py_DECREF(self)
  55415. * if PY37: # <<<<<<<<<<<<<<
  55416. * Context_Exit(context)
  55417. * self._clear()
  55418. */
  55419. __pyx_t_2 = (__pyx_v_6uvloop_4loop_PY37 != 0);
  55420. if (__pyx_t_2) {
  55421. /* "uvloop/cbhandles.pyx":288
  55422. * Py_DECREF(self)
  55423. * if PY37:
  55424. * Context_Exit(context) # <<<<<<<<<<<<<<
  55425. * self._clear()
  55426. *
  55427. */
  55428. __pyx_t_23 = Context_Exit(__pyx_v_context); if (unlikely(__pyx_t_23 == ((int)-1))) __PYX_ERR(3, 288, __pyx_L33_error)
  55429. /* "uvloop/cbhandles.pyx":287
  55430. * context = self.context
  55431. * Py_DECREF(self)
  55432. * if PY37: # <<<<<<<<<<<<<<
  55433. * Context_Exit(context)
  55434. * self._clear()
  55435. */
  55436. }
  55437. /* "uvloop/cbhandles.pyx":289
  55438. * if PY37:
  55439. * Context_Exit(context)
  55440. * self._clear() # <<<<<<<<<<<<<<
  55441. *
  55442. * # Public API
  55443. */
  55444. __pyx_t_10 = __pyx_f_6uvloop_4loop_11TimerHandle__clear(__pyx_v_self); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 289, __pyx_L33_error)
  55445. __Pyx_GOTREF(__pyx_t_10);
  55446. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  55447. }
  55448. if (PY_MAJOR_VERSION >= 3) {
  55449. __Pyx_XGIVEREF(__pyx_t_21);
  55450. __Pyx_XGIVEREF(__pyx_t_20);
  55451. __Pyx_XGIVEREF(__pyx_t_19);
  55452. __Pyx_ExceptionReset(__pyx_t_21, __pyx_t_20, __pyx_t_19);
  55453. }
  55454. __Pyx_XGIVEREF(__pyx_t_8);
  55455. __Pyx_XGIVEREF(__pyx_t_7);
  55456. __Pyx_XGIVEREF(__pyx_t_6);
  55457. __Pyx_ErrRestore(__pyx_t_8, __pyx_t_7, __pyx_t_6);
  55458. __pyx_t_8 = 0; __pyx_t_7 = 0; __pyx_t_6 = 0; __pyx_t_21 = 0; __pyx_t_20 = 0; __pyx_t_19 = 0;
  55459. __pyx_lineno = __pyx_t_14; __pyx_clineno = __pyx_t_9; __pyx_filename = __pyx_t_22;
  55460. goto __pyx_L1_error;
  55461. __pyx_L33_error:;
  55462. if (PY_MAJOR_VERSION >= 3) {
  55463. __Pyx_XGIVEREF(__pyx_t_21);
  55464. __Pyx_XGIVEREF(__pyx_t_20);
  55465. __Pyx_XGIVEREF(__pyx_t_19);
  55466. __Pyx_ExceptionReset(__pyx_t_21, __pyx_t_20, __pyx_t_19);
  55467. }
  55468. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  55469. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  55470. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  55471. __pyx_t_21 = 0; __pyx_t_20 = 0; __pyx_t_19 = 0;
  55472. goto __pyx_L1_error;
  55473. }
  55474. __pyx_L8:;
  55475. }
  55476. /* "uvloop/cbhandles.pyx":242
  55477. * self.timer = None # let the UVTimer handle GC
  55478. *
  55479. * cdef _run(self): # <<<<<<<<<<<<<<
  55480. * if self._cancelled == 1:
  55481. * return
  55482. */
  55483. /* function exit code */
  55484. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  55485. goto __pyx_L0;
  55486. __pyx_L1_error:;
  55487. __Pyx_XDECREF(__pyx_t_3);
  55488. __Pyx_XDECREF(__pyx_t_4);
  55489. __Pyx_XDECREF(__pyx_t_5);
  55490. __Pyx_XDECREF(__pyx_t_10);
  55491. __Pyx_XDECREF(__pyx_t_11);
  55492. __Pyx_XDECREF(__pyx_t_12);
  55493. __Pyx_XDECREF(__pyx_t_13);
  55494. __Pyx_AddTraceback("uvloop.loop.TimerHandle._run", __pyx_clineno, __pyx_lineno, __pyx_filename);
  55495. __pyx_r = 0;
  55496. __pyx_L0:;
  55497. __Pyx_XDECREF(__pyx_v_callback);
  55498. __Pyx_XDECREF(__pyx_v_args);
  55499. __Pyx_XDECREF(__pyx_v_started);
  55500. __Pyx_XDECREF(__pyx_v_ex);
  55501. __Pyx_XDECREF(__pyx_v_context);
  55502. __Pyx_XDECREF(__pyx_v_delta);
  55503. __Pyx_XGIVEREF(__pyx_r);
  55504. __Pyx_RefNannyFinishContext();
  55505. return __pyx_r;
  55506. }
  55507. /* "uvloop/cbhandles.pyx":293
  55508. * # Public API
  55509. *
  55510. * def __repr__(self): # <<<<<<<<<<<<<<
  55511. * info = [self.__class__.__name__]
  55512. *
  55513. */
  55514. /* Python wrapper */
  55515. static PyObject *__pyx_pw_6uvloop_4loop_11TimerHandle_5__repr__(PyObject *__pyx_v_self); /*proto*/
  55516. static PyObject *__pyx_pw_6uvloop_4loop_11TimerHandle_5__repr__(PyObject *__pyx_v_self) {
  55517. PyObject *__pyx_r = 0;
  55518. __Pyx_RefNannyDeclarations
  55519. __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  55520. __pyx_r = __pyx_pf_6uvloop_4loop_11TimerHandle_4__repr__(((struct __pyx_obj_6uvloop_4loop_TimerHandle *)__pyx_v_self));
  55521. /* function exit code */
  55522. __Pyx_RefNannyFinishContext();
  55523. return __pyx_r;
  55524. }
  55525. static PyObject *__pyx_pf_6uvloop_4loop_11TimerHandle_4__repr__(struct __pyx_obj_6uvloop_4loop_TimerHandle *__pyx_v_self) {
  55526. PyObject *__pyx_v_info = NULL;
  55527. PyObject *__pyx_v_callback_name = NULL;
  55528. PyObject *__pyx_v_source_traceback = NULL;
  55529. PyObject *__pyx_v_frame = NULL;
  55530. PyObject *__pyx_r = NULL;
  55531. __Pyx_RefNannyDeclarations
  55532. PyObject *__pyx_t_1 = NULL;
  55533. PyObject *__pyx_t_2 = NULL;
  55534. int __pyx_t_3;
  55535. int __pyx_t_4;
  55536. int __pyx_t_5;
  55537. PyObject *__pyx_t_6 = NULL;
  55538. PyObject *__pyx_t_7 = NULL;
  55539. PyObject *__pyx_t_8 = NULL;
  55540. int __pyx_t_9;
  55541. PyObject *__pyx_t_10 = NULL;
  55542. __Pyx_RefNannySetupContext("__repr__", 0);
  55543. /* "uvloop/cbhandles.pyx":294
  55544. *
  55545. * def __repr__(self):
  55546. * info = [self.__class__.__name__] # <<<<<<<<<<<<<<
  55547. *
  55548. * if self._cancelled:
  55549. */
  55550. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 294, __pyx_L1_error)
  55551. __Pyx_GOTREF(__pyx_t_1);
  55552. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 294, __pyx_L1_error)
  55553. __Pyx_GOTREF(__pyx_t_2);
  55554. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  55555. __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 294, __pyx_L1_error)
  55556. __Pyx_GOTREF(__pyx_t_1);
  55557. __Pyx_GIVEREF(__pyx_t_2);
  55558. PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  55559. __pyx_t_2 = 0;
  55560. __pyx_v_info = ((PyObject*)__pyx_t_1);
  55561. __pyx_t_1 = 0;
  55562. /* "uvloop/cbhandles.pyx":296
  55563. * info = [self.__class__.__name__]
  55564. *
  55565. * if self._cancelled: # <<<<<<<<<<<<<<
  55566. * info.append('cancelled')
  55567. *
  55568. */
  55569. __pyx_t_3 = (__pyx_v_self->_cancelled != 0);
  55570. if (__pyx_t_3) {
  55571. /* "uvloop/cbhandles.pyx":297
  55572. *
  55573. * if self._cancelled:
  55574. * info.append('cancelled') # <<<<<<<<<<<<<<
  55575. *
  55576. * if self._debug_info is not None:
  55577. */
  55578. __pyx_t_4 = __Pyx_PyList_Append(__pyx_v_info, __pyx_n_u_cancelled); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(3, 297, __pyx_L1_error)
  55579. /* "uvloop/cbhandles.pyx":296
  55580. * info = [self.__class__.__name__]
  55581. *
  55582. * if self._cancelled: # <<<<<<<<<<<<<<
  55583. * info.append('cancelled')
  55584. *
  55585. */
  55586. }
  55587. /* "uvloop/cbhandles.pyx":299
  55588. * info.append('cancelled')
  55589. *
  55590. * if self._debug_info is not None: # <<<<<<<<<<<<<<
  55591. * callback_name = self._debug_info[0]
  55592. * source_traceback = self._debug_info[1]
  55593. */
  55594. __pyx_t_3 = (__pyx_v_self->_debug_info != ((PyObject*)Py_None));
  55595. __pyx_t_5 = (__pyx_t_3 != 0);
  55596. if (__pyx_t_5) {
  55597. /* "uvloop/cbhandles.pyx":300
  55598. *
  55599. * if self._debug_info is not None:
  55600. * callback_name = self._debug_info[0] # <<<<<<<<<<<<<<
  55601. * source_traceback = self._debug_info[1]
  55602. * else:
  55603. */
  55604. if (unlikely(__pyx_v_self->_debug_info == Py_None)) {
  55605. PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
  55606. __PYX_ERR(3, 300, __pyx_L1_error)
  55607. }
  55608. __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_self->_debug_info, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 300, __pyx_L1_error)
  55609. __Pyx_GOTREF(__pyx_t_1);
  55610. __pyx_v_callback_name = __pyx_t_1;
  55611. __pyx_t_1 = 0;
  55612. /* "uvloop/cbhandles.pyx":301
  55613. * if self._debug_info is not None:
  55614. * callback_name = self._debug_info[0]
  55615. * source_traceback = self._debug_info[1] # <<<<<<<<<<<<<<
  55616. * else:
  55617. * callback_name = None
  55618. */
  55619. if (unlikely(__pyx_v_self->_debug_info == Py_None)) {
  55620. PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
  55621. __PYX_ERR(3, 301, __pyx_L1_error)
  55622. }
  55623. __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_self->_debug_info, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 301, __pyx_L1_error)
  55624. __Pyx_GOTREF(__pyx_t_1);
  55625. __pyx_v_source_traceback = __pyx_t_1;
  55626. __pyx_t_1 = 0;
  55627. /* "uvloop/cbhandles.pyx":299
  55628. * info.append('cancelled')
  55629. *
  55630. * if self._debug_info is not None: # <<<<<<<<<<<<<<
  55631. * callback_name = self._debug_info[0]
  55632. * source_traceback = self._debug_info[1]
  55633. */
  55634. goto __pyx_L4;
  55635. }
  55636. /* "uvloop/cbhandles.pyx":303
  55637. * source_traceback = self._debug_info[1]
  55638. * else:
  55639. * callback_name = None # <<<<<<<<<<<<<<
  55640. * source_traceback = None
  55641. *
  55642. */
  55643. /*else*/ {
  55644. __Pyx_INCREF(Py_None);
  55645. __pyx_v_callback_name = Py_None;
  55646. /* "uvloop/cbhandles.pyx":304
  55647. * else:
  55648. * callback_name = None
  55649. * source_traceback = None # <<<<<<<<<<<<<<
  55650. *
  55651. * if callback_name is not None:
  55652. */
  55653. __Pyx_INCREF(Py_None);
  55654. __pyx_v_source_traceback = Py_None;
  55655. }
  55656. __pyx_L4:;
  55657. /* "uvloop/cbhandles.pyx":306
  55658. * source_traceback = None
  55659. *
  55660. * if callback_name is not None: # <<<<<<<<<<<<<<
  55661. * info.append(callback_name)
  55662. * elif self.callback is not None:
  55663. */
  55664. __pyx_t_5 = (__pyx_v_callback_name != Py_None);
  55665. __pyx_t_3 = (__pyx_t_5 != 0);
  55666. if (__pyx_t_3) {
  55667. /* "uvloop/cbhandles.pyx":307
  55668. *
  55669. * if callback_name is not None:
  55670. * info.append(callback_name) # <<<<<<<<<<<<<<
  55671. * elif self.callback is not None:
  55672. * info.append(format_callback_name(self.callback))
  55673. */
  55674. __pyx_t_4 = __Pyx_PyList_Append(__pyx_v_info, __pyx_v_callback_name); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(3, 307, __pyx_L1_error)
  55675. /* "uvloop/cbhandles.pyx":306
  55676. * source_traceback = None
  55677. *
  55678. * if callback_name is not None: # <<<<<<<<<<<<<<
  55679. * info.append(callback_name)
  55680. * elif self.callback is not None:
  55681. */
  55682. goto __pyx_L5;
  55683. }
  55684. /* "uvloop/cbhandles.pyx":308
  55685. * if callback_name is not None:
  55686. * info.append(callback_name)
  55687. * elif self.callback is not None: # <<<<<<<<<<<<<<
  55688. * info.append(format_callback_name(self.callback))
  55689. *
  55690. */
  55691. __pyx_t_3 = (__pyx_v_self->callback != Py_None);
  55692. __pyx_t_5 = (__pyx_t_3 != 0);
  55693. if (__pyx_t_5) {
  55694. /* "uvloop/cbhandles.pyx":309
  55695. * info.append(callback_name)
  55696. * elif self.callback is not None:
  55697. * info.append(format_callback_name(self.callback)) # <<<<<<<<<<<<<<
  55698. *
  55699. * if source_traceback is not None:
  55700. */
  55701. __pyx_t_1 = __pyx_v_self->callback;
  55702. __Pyx_INCREF(__pyx_t_1);
  55703. __pyx_t_2 = __pyx_f_6uvloop_4loop_format_callback_name(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 309, __pyx_L1_error)
  55704. __Pyx_GOTREF(__pyx_t_2);
  55705. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  55706. __pyx_t_4 = __Pyx_PyList_Append(__pyx_v_info, __pyx_t_2); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(3, 309, __pyx_L1_error)
  55707. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  55708. /* "uvloop/cbhandles.pyx":308
  55709. * if callback_name is not None:
  55710. * info.append(callback_name)
  55711. * elif self.callback is not None: # <<<<<<<<<<<<<<
  55712. * info.append(format_callback_name(self.callback))
  55713. *
  55714. */
  55715. }
  55716. __pyx_L5:;
  55717. /* "uvloop/cbhandles.pyx":311
  55718. * info.append(format_callback_name(self.callback))
  55719. *
  55720. * if source_traceback is not None: # <<<<<<<<<<<<<<
  55721. * frame = source_traceback[-1]
  55722. * info.append('created at {}:{}'.format(frame[0], frame[1]))
  55723. */
  55724. __pyx_t_5 = (__pyx_v_source_traceback != Py_None);
  55725. __pyx_t_3 = (__pyx_t_5 != 0);
  55726. if (__pyx_t_3) {
  55727. /* "uvloop/cbhandles.pyx":312
  55728. *
  55729. * if source_traceback is not None:
  55730. * frame = source_traceback[-1] # <<<<<<<<<<<<<<
  55731. * info.append('created at {}:{}'.format(frame[0], frame[1]))
  55732. *
  55733. */
  55734. __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_source_traceback, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 312, __pyx_L1_error)
  55735. __Pyx_GOTREF(__pyx_t_2);
  55736. __pyx_v_frame = __pyx_t_2;
  55737. __pyx_t_2 = 0;
  55738. /* "uvloop/cbhandles.pyx":313
  55739. * if source_traceback is not None:
  55740. * frame = source_traceback[-1]
  55741. * info.append('created at {}:{}'.format(frame[0], frame[1])) # <<<<<<<<<<<<<<
  55742. *
  55743. * return '<' + ' '.join(info) + '>'
  55744. */
  55745. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_created_at, __pyx_n_s_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 313, __pyx_L1_error)
  55746. __Pyx_GOTREF(__pyx_t_1);
  55747. __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_frame, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 313, __pyx_L1_error)
  55748. __Pyx_GOTREF(__pyx_t_6);
  55749. __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_frame, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 313, __pyx_L1_error)
  55750. __Pyx_GOTREF(__pyx_t_7);
  55751. __pyx_t_8 = NULL;
  55752. __pyx_t_9 = 0;
  55753. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
  55754. __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_1);
  55755. if (likely(__pyx_t_8)) {
  55756. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
  55757. __Pyx_INCREF(__pyx_t_8);
  55758. __Pyx_INCREF(function);
  55759. __Pyx_DECREF_SET(__pyx_t_1, function);
  55760. __pyx_t_9 = 1;
  55761. }
  55762. }
  55763. #if CYTHON_FAST_PYCALL
  55764. if (PyFunction_Check(__pyx_t_1)) {
  55765. PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_6, __pyx_t_7};
  55766. __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 313, __pyx_L1_error)
  55767. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  55768. __Pyx_GOTREF(__pyx_t_2);
  55769. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  55770. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  55771. } else
  55772. #endif
  55773. #if CYTHON_FAST_PYCCALL
  55774. if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
  55775. PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_6, __pyx_t_7};
  55776. __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 313, __pyx_L1_error)
  55777. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  55778. __Pyx_GOTREF(__pyx_t_2);
  55779. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  55780. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  55781. } else
  55782. #endif
  55783. {
  55784. __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 313, __pyx_L1_error)
  55785. __Pyx_GOTREF(__pyx_t_10);
  55786. if (__pyx_t_8) {
  55787. __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL;
  55788. }
  55789. __Pyx_GIVEREF(__pyx_t_6);
  55790. PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_t_6);
  55791. __Pyx_GIVEREF(__pyx_t_7);
  55792. PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_t_7);
  55793. __pyx_t_6 = 0;
  55794. __pyx_t_7 = 0;
  55795. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_10, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 313, __pyx_L1_error)
  55796. __Pyx_GOTREF(__pyx_t_2);
  55797. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  55798. }
  55799. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  55800. __pyx_t_4 = __Pyx_PyList_Append(__pyx_v_info, __pyx_t_2); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(3, 313, __pyx_L1_error)
  55801. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  55802. /* "uvloop/cbhandles.pyx":311
  55803. * info.append(format_callback_name(self.callback))
  55804. *
  55805. * if source_traceback is not None: # <<<<<<<<<<<<<<
  55806. * frame = source_traceback[-1]
  55807. * info.append('created at {}:{}'.format(frame[0], frame[1]))
  55808. */
  55809. }
  55810. /* "uvloop/cbhandles.pyx":315
  55811. * info.append('created at {}:{}'.format(frame[0], frame[1]))
  55812. *
  55813. * return '<' + ' '.join(info) + '>' # <<<<<<<<<<<<<<
  55814. *
  55815. * def cancelled(self):
  55816. */
  55817. __Pyx_XDECREF(__pyx_r);
  55818. __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__89, __pyx_v_info); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 315, __pyx_L1_error)
  55819. __Pyx_GOTREF(__pyx_t_2);
  55820. __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_kp_u__88, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 315, __pyx_L1_error)
  55821. __Pyx_GOTREF(__pyx_t_1);
  55822. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  55823. __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_t_1, __pyx_kp_u__90); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 315, __pyx_L1_error)
  55824. __Pyx_GOTREF(__pyx_t_2);
  55825. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  55826. __pyx_r = __pyx_t_2;
  55827. __pyx_t_2 = 0;
  55828. goto __pyx_L0;
  55829. /* "uvloop/cbhandles.pyx":293
  55830. * # Public API
  55831. *
  55832. * def __repr__(self): # <<<<<<<<<<<<<<
  55833. * info = [self.__class__.__name__]
  55834. *
  55835. */
  55836. /* function exit code */
  55837. __pyx_L1_error:;
  55838. __Pyx_XDECREF(__pyx_t_1);
  55839. __Pyx_XDECREF(__pyx_t_2);
  55840. __Pyx_XDECREF(__pyx_t_6);
  55841. __Pyx_XDECREF(__pyx_t_7);
  55842. __Pyx_XDECREF(__pyx_t_8);
  55843. __Pyx_XDECREF(__pyx_t_10);
  55844. __Pyx_AddTraceback("uvloop.loop.TimerHandle.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  55845. __pyx_r = NULL;
  55846. __pyx_L0:;
  55847. __Pyx_XDECREF(__pyx_v_info);
  55848. __Pyx_XDECREF(__pyx_v_callback_name);
  55849. __Pyx_XDECREF(__pyx_v_source_traceback);
  55850. __Pyx_XDECREF(__pyx_v_frame);
  55851. __Pyx_XGIVEREF(__pyx_r);
  55852. __Pyx_RefNannyFinishContext();
  55853. return __pyx_r;
  55854. }
  55855. /* "uvloop/cbhandles.pyx":317
  55856. * return '<' + ' '.join(info) + '>'
  55857. *
  55858. * def cancelled(self): # <<<<<<<<<<<<<<
  55859. * return self._cancelled
  55860. *
  55861. */
  55862. /* Python wrapper */
  55863. static PyObject *__pyx_pw_6uvloop_4loop_11TimerHandle_7cancelled(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  55864. static char __pyx_doc_6uvloop_4loop_11TimerHandle_6cancelled[] = "TimerHandle.cancelled(self)";
  55865. static PyObject *__pyx_pw_6uvloop_4loop_11TimerHandle_7cancelled(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  55866. PyObject *__pyx_r = 0;
  55867. __Pyx_RefNannyDeclarations
  55868. __Pyx_RefNannySetupContext("cancelled (wrapper)", 0);
  55869. __pyx_r = __pyx_pf_6uvloop_4loop_11TimerHandle_6cancelled(((struct __pyx_obj_6uvloop_4loop_TimerHandle *)__pyx_v_self));
  55870. /* function exit code */
  55871. __Pyx_RefNannyFinishContext();
  55872. return __pyx_r;
  55873. }
  55874. static PyObject *__pyx_pf_6uvloop_4loop_11TimerHandle_6cancelled(struct __pyx_obj_6uvloop_4loop_TimerHandle *__pyx_v_self) {
  55875. PyObject *__pyx_r = NULL;
  55876. __Pyx_RefNannyDeclarations
  55877. PyObject *__pyx_t_1 = NULL;
  55878. __Pyx_RefNannySetupContext("cancelled", 0);
  55879. /* "uvloop/cbhandles.pyx":318
  55880. *
  55881. * def cancelled(self):
  55882. * return self._cancelled # <<<<<<<<<<<<<<
  55883. *
  55884. * def cancel(self):
  55885. */
  55886. __Pyx_XDECREF(__pyx_r);
  55887. __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->_cancelled); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 318, __pyx_L1_error)
  55888. __Pyx_GOTREF(__pyx_t_1);
  55889. __pyx_r = __pyx_t_1;
  55890. __pyx_t_1 = 0;
  55891. goto __pyx_L0;
  55892. /* "uvloop/cbhandles.pyx":317
  55893. * return '<' + ' '.join(info) + '>'
  55894. *
  55895. * def cancelled(self): # <<<<<<<<<<<<<<
  55896. * return self._cancelled
  55897. *
  55898. */
  55899. /* function exit code */
  55900. __pyx_L1_error:;
  55901. __Pyx_XDECREF(__pyx_t_1);
  55902. __Pyx_AddTraceback("uvloop.loop.TimerHandle.cancelled", __pyx_clineno, __pyx_lineno, __pyx_filename);
  55903. __pyx_r = NULL;
  55904. __pyx_L0:;
  55905. __Pyx_XGIVEREF(__pyx_r);
  55906. __Pyx_RefNannyFinishContext();
  55907. return __pyx_r;
  55908. }
  55909. /* "uvloop/cbhandles.pyx":320
  55910. * return self._cancelled
  55911. *
  55912. * def cancel(self): # <<<<<<<<<<<<<<
  55913. * self._cancel()
  55914. *
  55915. */
  55916. /* Python wrapper */
  55917. static PyObject *__pyx_pw_6uvloop_4loop_11TimerHandle_9cancel(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  55918. static char __pyx_doc_6uvloop_4loop_11TimerHandle_8cancel[] = "TimerHandle.cancel(self)";
  55919. static PyObject *__pyx_pw_6uvloop_4loop_11TimerHandle_9cancel(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  55920. PyObject *__pyx_r = 0;
  55921. __Pyx_RefNannyDeclarations
  55922. __Pyx_RefNannySetupContext("cancel (wrapper)", 0);
  55923. __pyx_r = __pyx_pf_6uvloop_4loop_11TimerHandle_8cancel(((struct __pyx_obj_6uvloop_4loop_TimerHandle *)__pyx_v_self));
  55924. /* function exit code */
  55925. __Pyx_RefNannyFinishContext();
  55926. return __pyx_r;
  55927. }
  55928. static PyObject *__pyx_pf_6uvloop_4loop_11TimerHandle_8cancel(struct __pyx_obj_6uvloop_4loop_TimerHandle *__pyx_v_self) {
  55929. PyObject *__pyx_r = NULL;
  55930. __Pyx_RefNannyDeclarations
  55931. PyObject *__pyx_t_1 = NULL;
  55932. __Pyx_RefNannySetupContext("cancel", 0);
  55933. /* "uvloop/cbhandles.pyx":321
  55934. *
  55935. * def cancel(self):
  55936. * self._cancel() # <<<<<<<<<<<<<<
  55937. *
  55938. *
  55939. */
  55940. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_TimerHandle *)__pyx_v_self->__pyx_vtab)->_cancel(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 321, __pyx_L1_error)
  55941. __Pyx_GOTREF(__pyx_t_1);
  55942. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  55943. /* "uvloop/cbhandles.pyx":320
  55944. * return self._cancelled
  55945. *
  55946. * def cancel(self): # <<<<<<<<<<<<<<
  55947. * self._cancel()
  55948. *
  55949. */
  55950. /* function exit code */
  55951. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  55952. goto __pyx_L0;
  55953. __pyx_L1_error:;
  55954. __Pyx_XDECREF(__pyx_t_1);
  55955. __Pyx_AddTraceback("uvloop.loop.TimerHandle.cancel", __pyx_clineno, __pyx_lineno, __pyx_filename);
  55956. __pyx_r = NULL;
  55957. __pyx_L0:;
  55958. __Pyx_XGIVEREF(__pyx_r);
  55959. __Pyx_RefNannyFinishContext();
  55960. return __pyx_r;
  55961. }
  55962. /* "(tree fragment)":1
  55963. * def __reduce_cython__(self): # <<<<<<<<<<<<<<
  55964. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  55965. * def __setstate_cython__(self, __pyx_state):
  55966. */
  55967. /* Python wrapper */
  55968. static PyObject *__pyx_pw_6uvloop_4loop_11TimerHandle_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  55969. static char __pyx_doc_6uvloop_4loop_11TimerHandle_10__reduce_cython__[] = "TimerHandle.__reduce_cython__(self)";
  55970. static PyObject *__pyx_pw_6uvloop_4loop_11TimerHandle_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  55971. PyObject *__pyx_r = 0;
  55972. __Pyx_RefNannyDeclarations
  55973. __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  55974. __pyx_r = __pyx_pf_6uvloop_4loop_11TimerHandle_10__reduce_cython__(((struct __pyx_obj_6uvloop_4loop_TimerHandle *)__pyx_v_self));
  55975. /* function exit code */
  55976. __Pyx_RefNannyFinishContext();
  55977. return __pyx_r;
  55978. }
  55979. static PyObject *__pyx_pf_6uvloop_4loop_11TimerHandle_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_TimerHandle *__pyx_v_self) {
  55980. PyObject *__pyx_r = NULL;
  55981. __Pyx_RefNannyDeclarations
  55982. PyObject *__pyx_t_1 = NULL;
  55983. __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  55984. /* "(tree fragment)":2
  55985. * def __reduce_cython__(self):
  55986. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  55987. * def __setstate_cython__(self, __pyx_state):
  55988. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  55989. */
  55990. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__95, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 2, __pyx_L1_error)
  55991. __Pyx_GOTREF(__pyx_t_1);
  55992. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  55993. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  55994. __PYX_ERR(9, 2, __pyx_L1_error)
  55995. /* "(tree fragment)":1
  55996. * def __reduce_cython__(self): # <<<<<<<<<<<<<<
  55997. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  55998. * def __setstate_cython__(self, __pyx_state):
  55999. */
  56000. /* function exit code */
  56001. __pyx_L1_error:;
  56002. __Pyx_XDECREF(__pyx_t_1);
  56003. __Pyx_AddTraceback("uvloop.loop.TimerHandle.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  56004. __pyx_r = NULL;
  56005. __Pyx_XGIVEREF(__pyx_r);
  56006. __Pyx_RefNannyFinishContext();
  56007. return __pyx_r;
  56008. }
  56009. /* "(tree fragment)":3
  56010. * def __reduce_cython__(self):
  56011. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  56012. * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
  56013. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  56014. */
  56015. /* Python wrapper */
  56016. static PyObject *__pyx_pw_6uvloop_4loop_11TimerHandle_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
  56017. static char __pyx_doc_6uvloop_4loop_11TimerHandle_12__setstate_cython__[] = "TimerHandle.__setstate_cython__(self, __pyx_state)";
  56018. static PyObject *__pyx_pw_6uvloop_4loop_11TimerHandle_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  56019. PyObject *__pyx_r = 0;
  56020. __Pyx_RefNannyDeclarations
  56021. __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  56022. __pyx_r = __pyx_pf_6uvloop_4loop_11TimerHandle_12__setstate_cython__(((struct __pyx_obj_6uvloop_4loop_TimerHandle *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
  56023. /* function exit code */
  56024. __Pyx_RefNannyFinishContext();
  56025. return __pyx_r;
  56026. }
  56027. static PyObject *__pyx_pf_6uvloop_4loop_11TimerHandle_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_TimerHandle *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  56028. PyObject *__pyx_r = NULL;
  56029. __Pyx_RefNannyDeclarations
  56030. PyObject *__pyx_t_1 = NULL;
  56031. __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  56032. /* "(tree fragment)":4
  56033. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  56034. * def __setstate_cython__(self, __pyx_state):
  56035. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  56036. */
  56037. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__96, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 4, __pyx_L1_error)
  56038. __Pyx_GOTREF(__pyx_t_1);
  56039. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  56040. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  56041. __PYX_ERR(9, 4, __pyx_L1_error)
  56042. /* "(tree fragment)":3
  56043. * def __reduce_cython__(self):
  56044. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  56045. * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
  56046. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  56047. */
  56048. /* function exit code */
  56049. __pyx_L1_error:;
  56050. __Pyx_XDECREF(__pyx_t_1);
  56051. __Pyx_AddTraceback("uvloop.loop.TimerHandle.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  56052. __pyx_r = NULL;
  56053. __Pyx_XGIVEREF(__pyx_r);
  56054. __Pyx_RefNannyFinishContext();
  56055. return __pyx_r;
  56056. }
  56057. /* "uvloop/cbhandles.pyx":324
  56058. *
  56059. *
  56060. * cdef format_callback_name(func): # <<<<<<<<<<<<<<
  56061. * if hasattr(func, '__qualname__'):
  56062. * cb_name = getattr(func, '__qualname__')
  56063. */
  56064. static PyObject *__pyx_f_6uvloop_4loop_format_callback_name(PyObject *__pyx_v_func) {
  56065. PyObject *__pyx_v_cb_name = NULL;
  56066. PyObject *__pyx_r = NULL;
  56067. __Pyx_RefNannyDeclarations
  56068. int __pyx_t_1;
  56069. int __pyx_t_2;
  56070. PyObject *__pyx_t_3 = NULL;
  56071. __Pyx_RefNannySetupContext("format_callback_name", 0);
  56072. /* "uvloop/cbhandles.pyx":325
  56073. *
  56074. * cdef format_callback_name(func):
  56075. * if hasattr(func, '__qualname__'): # <<<<<<<<<<<<<<
  56076. * cb_name = getattr(func, '__qualname__')
  56077. * elif hasattr(func, '__name__'):
  56078. */
  56079. __pyx_t_1 = __Pyx_HasAttr(__pyx_v_func, __pyx_n_u_qualname); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(3, 325, __pyx_L1_error)
  56080. __pyx_t_2 = (__pyx_t_1 != 0);
  56081. if (__pyx_t_2) {
  56082. /* "uvloop/cbhandles.pyx":326
  56083. * cdef format_callback_name(func):
  56084. * if hasattr(func, '__qualname__'):
  56085. * cb_name = getattr(func, '__qualname__') # <<<<<<<<<<<<<<
  56086. * elif hasattr(func, '__name__'):
  56087. * cb_name = getattr(func, '__name__')
  56088. */
  56089. __pyx_t_3 = __Pyx_GetAttr(__pyx_v_func, __pyx_n_u_qualname); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 326, __pyx_L1_error)
  56090. __Pyx_GOTREF(__pyx_t_3);
  56091. __pyx_v_cb_name = __pyx_t_3;
  56092. __pyx_t_3 = 0;
  56093. /* "uvloop/cbhandles.pyx":325
  56094. *
  56095. * cdef format_callback_name(func):
  56096. * if hasattr(func, '__qualname__'): # <<<<<<<<<<<<<<
  56097. * cb_name = getattr(func, '__qualname__')
  56098. * elif hasattr(func, '__name__'):
  56099. */
  56100. goto __pyx_L3;
  56101. }
  56102. /* "uvloop/cbhandles.pyx":327
  56103. * if hasattr(func, '__qualname__'):
  56104. * cb_name = getattr(func, '__qualname__')
  56105. * elif hasattr(func, '__name__'): # <<<<<<<<<<<<<<
  56106. * cb_name = getattr(func, '__name__')
  56107. * else:
  56108. */
  56109. __pyx_t_2 = __Pyx_HasAttr(__pyx_v_func, __pyx_n_u_name); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(3, 327, __pyx_L1_error)
  56110. __pyx_t_1 = (__pyx_t_2 != 0);
  56111. if (__pyx_t_1) {
  56112. /* "uvloop/cbhandles.pyx":328
  56113. * cb_name = getattr(func, '__qualname__')
  56114. * elif hasattr(func, '__name__'):
  56115. * cb_name = getattr(func, '__name__') # <<<<<<<<<<<<<<
  56116. * else:
  56117. * cb_name = repr(func)
  56118. */
  56119. __pyx_t_3 = __Pyx_GetAttr(__pyx_v_func, __pyx_n_u_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 328, __pyx_L1_error)
  56120. __Pyx_GOTREF(__pyx_t_3);
  56121. __pyx_v_cb_name = __pyx_t_3;
  56122. __pyx_t_3 = 0;
  56123. /* "uvloop/cbhandles.pyx":327
  56124. * if hasattr(func, '__qualname__'):
  56125. * cb_name = getattr(func, '__qualname__')
  56126. * elif hasattr(func, '__name__'): # <<<<<<<<<<<<<<
  56127. * cb_name = getattr(func, '__name__')
  56128. * else:
  56129. */
  56130. goto __pyx_L3;
  56131. }
  56132. /* "uvloop/cbhandles.pyx":330
  56133. * cb_name = getattr(func, '__name__')
  56134. * else:
  56135. * cb_name = repr(func) # <<<<<<<<<<<<<<
  56136. * return cb_name
  56137. *
  56138. */
  56139. /*else*/ {
  56140. __pyx_t_3 = PyObject_Repr(__pyx_v_func); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 330, __pyx_L1_error)
  56141. __Pyx_GOTREF(__pyx_t_3);
  56142. __pyx_v_cb_name = __pyx_t_3;
  56143. __pyx_t_3 = 0;
  56144. }
  56145. __pyx_L3:;
  56146. /* "uvloop/cbhandles.pyx":331
  56147. * else:
  56148. * cb_name = repr(func)
  56149. * return cb_name # <<<<<<<<<<<<<<
  56150. *
  56151. *
  56152. */
  56153. __Pyx_XDECREF(__pyx_r);
  56154. __Pyx_INCREF(__pyx_v_cb_name);
  56155. __pyx_r = __pyx_v_cb_name;
  56156. goto __pyx_L0;
  56157. /* "uvloop/cbhandles.pyx":324
  56158. *
  56159. *
  56160. * cdef format_callback_name(func): # <<<<<<<<<<<<<<
  56161. * if hasattr(func, '__qualname__'):
  56162. * cb_name = getattr(func, '__qualname__')
  56163. */
  56164. /* function exit code */
  56165. __pyx_L1_error:;
  56166. __Pyx_XDECREF(__pyx_t_3);
  56167. __Pyx_AddTraceback("uvloop.loop.format_callback_name", __pyx_clineno, __pyx_lineno, __pyx_filename);
  56168. __pyx_r = 0;
  56169. __pyx_L0:;
  56170. __Pyx_XDECREF(__pyx_v_cb_name);
  56171. __Pyx_XGIVEREF(__pyx_r);
  56172. __Pyx_RefNannyFinishContext();
  56173. return __pyx_r;
  56174. }
  56175. /* "uvloop/cbhandles.pyx":334
  56176. *
  56177. *
  56178. * cdef new_Handle(Loop loop, object callback, object args, object context): # <<<<<<<<<<<<<<
  56179. * cdef Handle handle
  56180. * handle = Handle.__new__(Handle)
  56181. */
  56182. static PyObject *__pyx_f_6uvloop_4loop_new_Handle(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, PyObject *__pyx_v_callback, PyObject *__pyx_v_args, PyObject *__pyx_v_context) {
  56183. struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_handle = 0;
  56184. PyObject *__pyx_r = NULL;
  56185. __Pyx_RefNannyDeclarations
  56186. PyObject *__pyx_t_1 = NULL;
  56187. __Pyx_RefNannySetupContext("new_Handle", 0);
  56188. /* "uvloop/cbhandles.pyx":336
  56189. * cdef new_Handle(Loop loop, object callback, object args, object context):
  56190. * cdef Handle handle
  56191. * handle = Handle.__new__(Handle) # <<<<<<<<<<<<<<
  56192. * handle._set_loop(loop)
  56193. * handle._set_context(context)
  56194. */
  56195. __pyx_t_1 = ((PyObject *)__pyx_tp_new_6uvloop_4loop_Handle(((PyTypeObject *)__pyx_ptype_6uvloop_4loop_Handle), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 336, __pyx_L1_error)
  56196. __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  56197. __pyx_v_handle = ((struct __pyx_obj_6uvloop_4loop_Handle *)__pyx_t_1);
  56198. __pyx_t_1 = 0;
  56199. /* "uvloop/cbhandles.pyx":337
  56200. * cdef Handle handle
  56201. * handle = Handle.__new__(Handle)
  56202. * handle._set_loop(loop) # <<<<<<<<<<<<<<
  56203. * handle._set_context(context)
  56204. *
  56205. */
  56206. __pyx_t_1 = __pyx_f_6uvloop_4loop_6Handle__set_loop(__pyx_v_handle, __pyx_v_loop); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 337, __pyx_L1_error)
  56207. __Pyx_GOTREF(__pyx_t_1);
  56208. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  56209. /* "uvloop/cbhandles.pyx":338
  56210. * handle = Handle.__new__(Handle)
  56211. * handle._set_loop(loop)
  56212. * handle._set_context(context) # <<<<<<<<<<<<<<
  56213. *
  56214. * handle.cb_type = 1
  56215. */
  56216. __pyx_t_1 = __pyx_f_6uvloop_4loop_6Handle__set_context(__pyx_v_handle, __pyx_v_context); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 338, __pyx_L1_error)
  56217. __Pyx_GOTREF(__pyx_t_1);
  56218. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  56219. /* "uvloop/cbhandles.pyx":340
  56220. * handle._set_context(context)
  56221. *
  56222. * handle.cb_type = 1 # <<<<<<<<<<<<<<
  56223. *
  56224. * handle.arg1 = callback
  56225. */
  56226. __pyx_v_handle->cb_type = 1;
  56227. /* "uvloop/cbhandles.pyx":342
  56228. * handle.cb_type = 1
  56229. *
  56230. * handle.arg1 = callback # <<<<<<<<<<<<<<
  56231. * handle.arg2 = args
  56232. *
  56233. */
  56234. __Pyx_INCREF(__pyx_v_callback);
  56235. __Pyx_GIVEREF(__pyx_v_callback);
  56236. __Pyx_GOTREF(__pyx_v_handle->arg1);
  56237. __Pyx_DECREF(__pyx_v_handle->arg1);
  56238. __pyx_v_handle->arg1 = __pyx_v_callback;
  56239. /* "uvloop/cbhandles.pyx":343
  56240. *
  56241. * handle.arg1 = callback
  56242. * handle.arg2 = args # <<<<<<<<<<<<<<
  56243. *
  56244. * return handle
  56245. */
  56246. __Pyx_INCREF(__pyx_v_args);
  56247. __Pyx_GIVEREF(__pyx_v_args);
  56248. __Pyx_GOTREF(__pyx_v_handle->arg2);
  56249. __Pyx_DECREF(__pyx_v_handle->arg2);
  56250. __pyx_v_handle->arg2 = __pyx_v_args;
  56251. /* "uvloop/cbhandles.pyx":345
  56252. * handle.arg2 = args
  56253. *
  56254. * return handle # <<<<<<<<<<<<<<
  56255. *
  56256. *
  56257. */
  56258. __Pyx_XDECREF(__pyx_r);
  56259. __Pyx_INCREF(((PyObject *)__pyx_v_handle));
  56260. __pyx_r = ((PyObject *)__pyx_v_handle);
  56261. goto __pyx_L0;
  56262. /* "uvloop/cbhandles.pyx":334
  56263. *
  56264. *
  56265. * cdef new_Handle(Loop loop, object callback, object args, object context): # <<<<<<<<<<<<<<
  56266. * cdef Handle handle
  56267. * handle = Handle.__new__(Handle)
  56268. */
  56269. /* function exit code */
  56270. __pyx_L1_error:;
  56271. __Pyx_XDECREF(__pyx_t_1);
  56272. __Pyx_AddTraceback("uvloop.loop.new_Handle", __pyx_clineno, __pyx_lineno, __pyx_filename);
  56273. __pyx_r = 0;
  56274. __pyx_L0:;
  56275. __Pyx_XDECREF((PyObject *)__pyx_v_handle);
  56276. __Pyx_XGIVEREF(__pyx_r);
  56277. __Pyx_RefNannyFinishContext();
  56278. return __pyx_r;
  56279. }
  56280. /* "uvloop/cbhandles.pyx":348
  56281. *
  56282. *
  56283. * cdef new_MethodHandle(Loop loop, str name, method_t callback, object ctx): # <<<<<<<<<<<<<<
  56284. * cdef Handle handle
  56285. * handle = Handle.__new__(Handle)
  56286. */
  56287. static PyObject *__pyx_f_6uvloop_4loop_new_MethodHandle(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, PyObject *__pyx_v_name, __pyx_t_6uvloop_4loop_method_t __pyx_v_callback, PyObject *__pyx_v_ctx) {
  56288. struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_handle = 0;
  56289. PyObject *__pyx_r = NULL;
  56290. __Pyx_RefNannyDeclarations
  56291. PyObject *__pyx_t_1 = NULL;
  56292. __Pyx_RefNannySetupContext("new_MethodHandle", 0);
  56293. /* "uvloop/cbhandles.pyx":350
  56294. * cdef new_MethodHandle(Loop loop, str name, method_t callback, object ctx):
  56295. * cdef Handle handle
  56296. * handle = Handle.__new__(Handle) # <<<<<<<<<<<<<<
  56297. * handle._set_loop(loop)
  56298. * handle._set_context(None)
  56299. */
  56300. __pyx_t_1 = ((PyObject *)__pyx_tp_new_6uvloop_4loop_Handle(((PyTypeObject *)__pyx_ptype_6uvloop_4loop_Handle), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 350, __pyx_L1_error)
  56301. __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  56302. __pyx_v_handle = ((struct __pyx_obj_6uvloop_4loop_Handle *)__pyx_t_1);
  56303. __pyx_t_1 = 0;
  56304. /* "uvloop/cbhandles.pyx":351
  56305. * cdef Handle handle
  56306. * handle = Handle.__new__(Handle)
  56307. * handle._set_loop(loop) # <<<<<<<<<<<<<<
  56308. * handle._set_context(None)
  56309. *
  56310. */
  56311. __pyx_t_1 = __pyx_f_6uvloop_4loop_6Handle__set_loop(__pyx_v_handle, __pyx_v_loop); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 351, __pyx_L1_error)
  56312. __Pyx_GOTREF(__pyx_t_1);
  56313. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  56314. /* "uvloop/cbhandles.pyx":352
  56315. * handle = Handle.__new__(Handle)
  56316. * handle._set_loop(loop)
  56317. * handle._set_context(None) # <<<<<<<<<<<<<<
  56318. *
  56319. * handle.cb_type = 2
  56320. */
  56321. __pyx_t_1 = __pyx_f_6uvloop_4loop_6Handle__set_context(__pyx_v_handle, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 352, __pyx_L1_error)
  56322. __Pyx_GOTREF(__pyx_t_1);
  56323. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  56324. /* "uvloop/cbhandles.pyx":354
  56325. * handle._set_context(None)
  56326. *
  56327. * handle.cb_type = 2 # <<<<<<<<<<<<<<
  56328. * handle.meth_name = name
  56329. *
  56330. */
  56331. __pyx_v_handle->cb_type = 2;
  56332. /* "uvloop/cbhandles.pyx":355
  56333. *
  56334. * handle.cb_type = 2
  56335. * handle.meth_name = name # <<<<<<<<<<<<<<
  56336. *
  56337. * handle.callback = <void*> callback
  56338. */
  56339. __Pyx_INCREF(__pyx_v_name);
  56340. __Pyx_GIVEREF(__pyx_v_name);
  56341. __Pyx_GOTREF(__pyx_v_handle->meth_name);
  56342. __Pyx_DECREF(__pyx_v_handle->meth_name);
  56343. __pyx_v_handle->meth_name = __pyx_v_name;
  56344. /* "uvloop/cbhandles.pyx":357
  56345. * handle.meth_name = name
  56346. *
  56347. * handle.callback = <void*> callback # <<<<<<<<<<<<<<
  56348. * handle.arg1 = ctx
  56349. *
  56350. */
  56351. __pyx_v_handle->callback = ((void *)__pyx_v_callback);
  56352. /* "uvloop/cbhandles.pyx":358
  56353. *
  56354. * handle.callback = <void*> callback
  56355. * handle.arg1 = ctx # <<<<<<<<<<<<<<
  56356. *
  56357. * return handle
  56358. */
  56359. __Pyx_INCREF(__pyx_v_ctx);
  56360. __Pyx_GIVEREF(__pyx_v_ctx);
  56361. __Pyx_GOTREF(__pyx_v_handle->arg1);
  56362. __Pyx_DECREF(__pyx_v_handle->arg1);
  56363. __pyx_v_handle->arg1 = __pyx_v_ctx;
  56364. /* "uvloop/cbhandles.pyx":360
  56365. * handle.arg1 = ctx
  56366. *
  56367. * return handle # <<<<<<<<<<<<<<
  56368. *
  56369. *
  56370. */
  56371. __Pyx_XDECREF(__pyx_r);
  56372. __Pyx_INCREF(((PyObject *)__pyx_v_handle));
  56373. __pyx_r = ((PyObject *)__pyx_v_handle);
  56374. goto __pyx_L0;
  56375. /* "uvloop/cbhandles.pyx":348
  56376. *
  56377. *
  56378. * cdef new_MethodHandle(Loop loop, str name, method_t callback, object ctx): # <<<<<<<<<<<<<<
  56379. * cdef Handle handle
  56380. * handle = Handle.__new__(Handle)
  56381. */
  56382. /* function exit code */
  56383. __pyx_L1_error:;
  56384. __Pyx_XDECREF(__pyx_t_1);
  56385. __Pyx_AddTraceback("uvloop.loop.new_MethodHandle", __pyx_clineno, __pyx_lineno, __pyx_filename);
  56386. __pyx_r = 0;
  56387. __pyx_L0:;
  56388. __Pyx_XDECREF((PyObject *)__pyx_v_handle);
  56389. __Pyx_XGIVEREF(__pyx_r);
  56390. __Pyx_RefNannyFinishContext();
  56391. return __pyx_r;
  56392. }
  56393. /* "uvloop/cbhandles.pyx":363
  56394. *
  56395. *
  56396. * cdef new_MethodHandle1(Loop loop, str name, method1_t callback, # <<<<<<<<<<<<<<
  56397. * object ctx, object arg):
  56398. *
  56399. */
  56400. static PyObject *__pyx_f_6uvloop_4loop_new_MethodHandle1(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, PyObject *__pyx_v_name, __pyx_t_6uvloop_4loop_method1_t __pyx_v_callback, PyObject *__pyx_v_ctx, PyObject *__pyx_v_arg) {
  56401. struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_handle = 0;
  56402. PyObject *__pyx_r = NULL;
  56403. __Pyx_RefNannyDeclarations
  56404. PyObject *__pyx_t_1 = NULL;
  56405. __Pyx_RefNannySetupContext("new_MethodHandle1", 0);
  56406. /* "uvloop/cbhandles.pyx":367
  56407. *
  56408. * cdef Handle handle
  56409. * handle = Handle.__new__(Handle) # <<<<<<<<<<<<<<
  56410. * handle._set_loop(loop)
  56411. * handle._set_context(None)
  56412. */
  56413. __pyx_t_1 = ((PyObject *)__pyx_tp_new_6uvloop_4loop_Handle(((PyTypeObject *)__pyx_ptype_6uvloop_4loop_Handle), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 367, __pyx_L1_error)
  56414. __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  56415. __pyx_v_handle = ((struct __pyx_obj_6uvloop_4loop_Handle *)__pyx_t_1);
  56416. __pyx_t_1 = 0;
  56417. /* "uvloop/cbhandles.pyx":368
  56418. * cdef Handle handle
  56419. * handle = Handle.__new__(Handle)
  56420. * handle._set_loop(loop) # <<<<<<<<<<<<<<
  56421. * handle._set_context(None)
  56422. *
  56423. */
  56424. __pyx_t_1 = __pyx_f_6uvloop_4loop_6Handle__set_loop(__pyx_v_handle, __pyx_v_loop); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 368, __pyx_L1_error)
  56425. __Pyx_GOTREF(__pyx_t_1);
  56426. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  56427. /* "uvloop/cbhandles.pyx":369
  56428. * handle = Handle.__new__(Handle)
  56429. * handle._set_loop(loop)
  56430. * handle._set_context(None) # <<<<<<<<<<<<<<
  56431. *
  56432. * handle.cb_type = 3
  56433. */
  56434. __pyx_t_1 = __pyx_f_6uvloop_4loop_6Handle__set_context(__pyx_v_handle, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 369, __pyx_L1_error)
  56435. __Pyx_GOTREF(__pyx_t_1);
  56436. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  56437. /* "uvloop/cbhandles.pyx":371
  56438. * handle._set_context(None)
  56439. *
  56440. * handle.cb_type = 3 # <<<<<<<<<<<<<<
  56441. * handle.meth_name = name
  56442. *
  56443. */
  56444. __pyx_v_handle->cb_type = 3;
  56445. /* "uvloop/cbhandles.pyx":372
  56446. *
  56447. * handle.cb_type = 3
  56448. * handle.meth_name = name # <<<<<<<<<<<<<<
  56449. *
  56450. * handle.callback = <void*> callback
  56451. */
  56452. __Pyx_INCREF(__pyx_v_name);
  56453. __Pyx_GIVEREF(__pyx_v_name);
  56454. __Pyx_GOTREF(__pyx_v_handle->meth_name);
  56455. __Pyx_DECREF(__pyx_v_handle->meth_name);
  56456. __pyx_v_handle->meth_name = __pyx_v_name;
  56457. /* "uvloop/cbhandles.pyx":374
  56458. * handle.meth_name = name
  56459. *
  56460. * handle.callback = <void*> callback # <<<<<<<<<<<<<<
  56461. * handle.arg1 = ctx
  56462. * handle.arg2 = arg
  56463. */
  56464. __pyx_v_handle->callback = ((void *)__pyx_v_callback);
  56465. /* "uvloop/cbhandles.pyx":375
  56466. *
  56467. * handle.callback = <void*> callback
  56468. * handle.arg1 = ctx # <<<<<<<<<<<<<<
  56469. * handle.arg2 = arg
  56470. *
  56471. */
  56472. __Pyx_INCREF(__pyx_v_ctx);
  56473. __Pyx_GIVEREF(__pyx_v_ctx);
  56474. __Pyx_GOTREF(__pyx_v_handle->arg1);
  56475. __Pyx_DECREF(__pyx_v_handle->arg1);
  56476. __pyx_v_handle->arg1 = __pyx_v_ctx;
  56477. /* "uvloop/cbhandles.pyx":376
  56478. * handle.callback = <void*> callback
  56479. * handle.arg1 = ctx
  56480. * handle.arg2 = arg # <<<<<<<<<<<<<<
  56481. *
  56482. * return handle
  56483. */
  56484. __Pyx_INCREF(__pyx_v_arg);
  56485. __Pyx_GIVEREF(__pyx_v_arg);
  56486. __Pyx_GOTREF(__pyx_v_handle->arg2);
  56487. __Pyx_DECREF(__pyx_v_handle->arg2);
  56488. __pyx_v_handle->arg2 = __pyx_v_arg;
  56489. /* "uvloop/cbhandles.pyx":378
  56490. * handle.arg2 = arg
  56491. *
  56492. * return handle # <<<<<<<<<<<<<<
  56493. *
  56494. *
  56495. */
  56496. __Pyx_XDECREF(__pyx_r);
  56497. __Pyx_INCREF(((PyObject *)__pyx_v_handle));
  56498. __pyx_r = ((PyObject *)__pyx_v_handle);
  56499. goto __pyx_L0;
  56500. /* "uvloop/cbhandles.pyx":363
  56501. *
  56502. *
  56503. * cdef new_MethodHandle1(Loop loop, str name, method1_t callback, # <<<<<<<<<<<<<<
  56504. * object ctx, object arg):
  56505. *
  56506. */
  56507. /* function exit code */
  56508. __pyx_L1_error:;
  56509. __Pyx_XDECREF(__pyx_t_1);
  56510. __Pyx_AddTraceback("uvloop.loop.new_MethodHandle1", __pyx_clineno, __pyx_lineno, __pyx_filename);
  56511. __pyx_r = 0;
  56512. __pyx_L0:;
  56513. __Pyx_XDECREF((PyObject *)__pyx_v_handle);
  56514. __Pyx_XGIVEREF(__pyx_r);
  56515. __Pyx_RefNannyFinishContext();
  56516. return __pyx_r;
  56517. }
  56518. /* "uvloop/cbhandles.pyx":381
  56519. *
  56520. *
  56521. * cdef new_MethodHandle2(Loop loop, str name, method2_t callback, object ctx, # <<<<<<<<<<<<<<
  56522. * object arg1, object arg2):
  56523. *
  56524. */
  56525. static PyObject *__pyx_f_6uvloop_4loop_new_MethodHandle2(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, PyObject *__pyx_v_name, __pyx_t_6uvloop_4loop_method2_t __pyx_v_callback, PyObject *__pyx_v_ctx, PyObject *__pyx_v_arg1, PyObject *__pyx_v_arg2) {
  56526. struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_handle = 0;
  56527. PyObject *__pyx_r = NULL;
  56528. __Pyx_RefNannyDeclarations
  56529. PyObject *__pyx_t_1 = NULL;
  56530. __Pyx_RefNannySetupContext("new_MethodHandle2", 0);
  56531. /* "uvloop/cbhandles.pyx":385
  56532. *
  56533. * cdef Handle handle
  56534. * handle = Handle.__new__(Handle) # <<<<<<<<<<<<<<
  56535. * handle._set_loop(loop)
  56536. * handle._set_context(None)
  56537. */
  56538. __pyx_t_1 = ((PyObject *)__pyx_tp_new_6uvloop_4loop_Handle(((PyTypeObject *)__pyx_ptype_6uvloop_4loop_Handle), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 385, __pyx_L1_error)
  56539. __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  56540. __pyx_v_handle = ((struct __pyx_obj_6uvloop_4loop_Handle *)__pyx_t_1);
  56541. __pyx_t_1 = 0;
  56542. /* "uvloop/cbhandles.pyx":386
  56543. * cdef Handle handle
  56544. * handle = Handle.__new__(Handle)
  56545. * handle._set_loop(loop) # <<<<<<<<<<<<<<
  56546. * handle._set_context(None)
  56547. *
  56548. */
  56549. __pyx_t_1 = __pyx_f_6uvloop_4loop_6Handle__set_loop(__pyx_v_handle, __pyx_v_loop); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 386, __pyx_L1_error)
  56550. __Pyx_GOTREF(__pyx_t_1);
  56551. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  56552. /* "uvloop/cbhandles.pyx":387
  56553. * handle = Handle.__new__(Handle)
  56554. * handle._set_loop(loop)
  56555. * handle._set_context(None) # <<<<<<<<<<<<<<
  56556. *
  56557. * handle.cb_type = 4
  56558. */
  56559. __pyx_t_1 = __pyx_f_6uvloop_4loop_6Handle__set_context(__pyx_v_handle, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 387, __pyx_L1_error)
  56560. __Pyx_GOTREF(__pyx_t_1);
  56561. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  56562. /* "uvloop/cbhandles.pyx":389
  56563. * handle._set_context(None)
  56564. *
  56565. * handle.cb_type = 4 # <<<<<<<<<<<<<<
  56566. * handle.meth_name = name
  56567. *
  56568. */
  56569. __pyx_v_handle->cb_type = 4;
  56570. /* "uvloop/cbhandles.pyx":390
  56571. *
  56572. * handle.cb_type = 4
  56573. * handle.meth_name = name # <<<<<<<<<<<<<<
  56574. *
  56575. * handle.callback = <void*> callback
  56576. */
  56577. __Pyx_INCREF(__pyx_v_name);
  56578. __Pyx_GIVEREF(__pyx_v_name);
  56579. __Pyx_GOTREF(__pyx_v_handle->meth_name);
  56580. __Pyx_DECREF(__pyx_v_handle->meth_name);
  56581. __pyx_v_handle->meth_name = __pyx_v_name;
  56582. /* "uvloop/cbhandles.pyx":392
  56583. * handle.meth_name = name
  56584. *
  56585. * handle.callback = <void*> callback # <<<<<<<<<<<<<<
  56586. * handle.arg1 = ctx
  56587. * handle.arg2 = arg1
  56588. */
  56589. __pyx_v_handle->callback = ((void *)__pyx_v_callback);
  56590. /* "uvloop/cbhandles.pyx":393
  56591. *
  56592. * handle.callback = <void*> callback
  56593. * handle.arg1 = ctx # <<<<<<<<<<<<<<
  56594. * handle.arg2 = arg1
  56595. * handle.arg3 = arg2
  56596. */
  56597. __Pyx_INCREF(__pyx_v_ctx);
  56598. __Pyx_GIVEREF(__pyx_v_ctx);
  56599. __Pyx_GOTREF(__pyx_v_handle->arg1);
  56600. __Pyx_DECREF(__pyx_v_handle->arg1);
  56601. __pyx_v_handle->arg1 = __pyx_v_ctx;
  56602. /* "uvloop/cbhandles.pyx":394
  56603. * handle.callback = <void*> callback
  56604. * handle.arg1 = ctx
  56605. * handle.arg2 = arg1 # <<<<<<<<<<<<<<
  56606. * handle.arg3 = arg2
  56607. *
  56608. */
  56609. __Pyx_INCREF(__pyx_v_arg1);
  56610. __Pyx_GIVEREF(__pyx_v_arg1);
  56611. __Pyx_GOTREF(__pyx_v_handle->arg2);
  56612. __Pyx_DECREF(__pyx_v_handle->arg2);
  56613. __pyx_v_handle->arg2 = __pyx_v_arg1;
  56614. /* "uvloop/cbhandles.pyx":395
  56615. * handle.arg1 = ctx
  56616. * handle.arg2 = arg1
  56617. * handle.arg3 = arg2 # <<<<<<<<<<<<<<
  56618. *
  56619. * return handle
  56620. */
  56621. __Pyx_INCREF(__pyx_v_arg2);
  56622. __Pyx_GIVEREF(__pyx_v_arg2);
  56623. __Pyx_GOTREF(__pyx_v_handle->arg3);
  56624. __Pyx_DECREF(__pyx_v_handle->arg3);
  56625. __pyx_v_handle->arg3 = __pyx_v_arg2;
  56626. /* "uvloop/cbhandles.pyx":397
  56627. * handle.arg3 = arg2
  56628. *
  56629. * return handle # <<<<<<<<<<<<<<
  56630. *
  56631. *
  56632. */
  56633. __Pyx_XDECREF(__pyx_r);
  56634. __Pyx_INCREF(((PyObject *)__pyx_v_handle));
  56635. __pyx_r = ((PyObject *)__pyx_v_handle);
  56636. goto __pyx_L0;
  56637. /* "uvloop/cbhandles.pyx":381
  56638. *
  56639. *
  56640. * cdef new_MethodHandle2(Loop loop, str name, method2_t callback, object ctx, # <<<<<<<<<<<<<<
  56641. * object arg1, object arg2):
  56642. *
  56643. */
  56644. /* function exit code */
  56645. __pyx_L1_error:;
  56646. __Pyx_XDECREF(__pyx_t_1);
  56647. __Pyx_AddTraceback("uvloop.loop.new_MethodHandle2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  56648. __pyx_r = 0;
  56649. __pyx_L0:;
  56650. __Pyx_XDECREF((PyObject *)__pyx_v_handle);
  56651. __Pyx_XGIVEREF(__pyx_r);
  56652. __Pyx_RefNannyFinishContext();
  56653. return __pyx_r;
  56654. }
  56655. /* "uvloop/cbhandles.pyx":400
  56656. *
  56657. *
  56658. * cdef new_MethodHandle3(Loop loop, str name, method3_t callback, object ctx, # <<<<<<<<<<<<<<
  56659. * object arg1, object arg2, object arg3):
  56660. *
  56661. */
  56662. static PyObject *__pyx_f_6uvloop_4loop_new_MethodHandle3(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, PyObject *__pyx_v_name, __pyx_t_6uvloop_4loop_method3_t __pyx_v_callback, PyObject *__pyx_v_ctx, PyObject *__pyx_v_arg1, PyObject *__pyx_v_arg2, PyObject *__pyx_v_arg3) {
  56663. struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_handle = 0;
  56664. PyObject *__pyx_r = NULL;
  56665. __Pyx_RefNannyDeclarations
  56666. PyObject *__pyx_t_1 = NULL;
  56667. __Pyx_RefNannySetupContext("new_MethodHandle3", 0);
  56668. /* "uvloop/cbhandles.pyx":404
  56669. *
  56670. * cdef Handle handle
  56671. * handle = Handle.__new__(Handle) # <<<<<<<<<<<<<<
  56672. * handle._set_loop(loop)
  56673. * handle._set_context(None)
  56674. */
  56675. __pyx_t_1 = ((PyObject *)__pyx_tp_new_6uvloop_4loop_Handle(((PyTypeObject *)__pyx_ptype_6uvloop_4loop_Handle), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 404, __pyx_L1_error)
  56676. __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  56677. __pyx_v_handle = ((struct __pyx_obj_6uvloop_4loop_Handle *)__pyx_t_1);
  56678. __pyx_t_1 = 0;
  56679. /* "uvloop/cbhandles.pyx":405
  56680. * cdef Handle handle
  56681. * handle = Handle.__new__(Handle)
  56682. * handle._set_loop(loop) # <<<<<<<<<<<<<<
  56683. * handle._set_context(None)
  56684. *
  56685. */
  56686. __pyx_t_1 = __pyx_f_6uvloop_4loop_6Handle__set_loop(__pyx_v_handle, __pyx_v_loop); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 405, __pyx_L1_error)
  56687. __Pyx_GOTREF(__pyx_t_1);
  56688. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  56689. /* "uvloop/cbhandles.pyx":406
  56690. * handle = Handle.__new__(Handle)
  56691. * handle._set_loop(loop)
  56692. * handle._set_context(None) # <<<<<<<<<<<<<<
  56693. *
  56694. * handle.cb_type = 5
  56695. */
  56696. __pyx_t_1 = __pyx_f_6uvloop_4loop_6Handle__set_context(__pyx_v_handle, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 406, __pyx_L1_error)
  56697. __Pyx_GOTREF(__pyx_t_1);
  56698. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  56699. /* "uvloop/cbhandles.pyx":408
  56700. * handle._set_context(None)
  56701. *
  56702. * handle.cb_type = 5 # <<<<<<<<<<<<<<
  56703. * handle.meth_name = name
  56704. *
  56705. */
  56706. __pyx_v_handle->cb_type = 5;
  56707. /* "uvloop/cbhandles.pyx":409
  56708. *
  56709. * handle.cb_type = 5
  56710. * handle.meth_name = name # <<<<<<<<<<<<<<
  56711. *
  56712. * handle.callback = <void*> callback
  56713. */
  56714. __Pyx_INCREF(__pyx_v_name);
  56715. __Pyx_GIVEREF(__pyx_v_name);
  56716. __Pyx_GOTREF(__pyx_v_handle->meth_name);
  56717. __Pyx_DECREF(__pyx_v_handle->meth_name);
  56718. __pyx_v_handle->meth_name = __pyx_v_name;
  56719. /* "uvloop/cbhandles.pyx":411
  56720. * handle.meth_name = name
  56721. *
  56722. * handle.callback = <void*> callback # <<<<<<<<<<<<<<
  56723. * handle.arg1 = ctx
  56724. * handle.arg2 = arg1
  56725. */
  56726. __pyx_v_handle->callback = ((void *)__pyx_v_callback);
  56727. /* "uvloop/cbhandles.pyx":412
  56728. *
  56729. * handle.callback = <void*> callback
  56730. * handle.arg1 = ctx # <<<<<<<<<<<<<<
  56731. * handle.arg2 = arg1
  56732. * handle.arg3 = arg2
  56733. */
  56734. __Pyx_INCREF(__pyx_v_ctx);
  56735. __Pyx_GIVEREF(__pyx_v_ctx);
  56736. __Pyx_GOTREF(__pyx_v_handle->arg1);
  56737. __Pyx_DECREF(__pyx_v_handle->arg1);
  56738. __pyx_v_handle->arg1 = __pyx_v_ctx;
  56739. /* "uvloop/cbhandles.pyx":413
  56740. * handle.callback = <void*> callback
  56741. * handle.arg1 = ctx
  56742. * handle.arg2 = arg1 # <<<<<<<<<<<<<<
  56743. * handle.arg3 = arg2
  56744. * handle.arg4 = arg3
  56745. */
  56746. __Pyx_INCREF(__pyx_v_arg1);
  56747. __Pyx_GIVEREF(__pyx_v_arg1);
  56748. __Pyx_GOTREF(__pyx_v_handle->arg2);
  56749. __Pyx_DECREF(__pyx_v_handle->arg2);
  56750. __pyx_v_handle->arg2 = __pyx_v_arg1;
  56751. /* "uvloop/cbhandles.pyx":414
  56752. * handle.arg1 = ctx
  56753. * handle.arg2 = arg1
  56754. * handle.arg3 = arg2 # <<<<<<<<<<<<<<
  56755. * handle.arg4 = arg3
  56756. *
  56757. */
  56758. __Pyx_INCREF(__pyx_v_arg2);
  56759. __Pyx_GIVEREF(__pyx_v_arg2);
  56760. __Pyx_GOTREF(__pyx_v_handle->arg3);
  56761. __Pyx_DECREF(__pyx_v_handle->arg3);
  56762. __pyx_v_handle->arg3 = __pyx_v_arg2;
  56763. /* "uvloop/cbhandles.pyx":415
  56764. * handle.arg2 = arg1
  56765. * handle.arg3 = arg2
  56766. * handle.arg4 = arg3 # <<<<<<<<<<<<<<
  56767. *
  56768. * return handle
  56769. */
  56770. __Pyx_INCREF(__pyx_v_arg3);
  56771. __Pyx_GIVEREF(__pyx_v_arg3);
  56772. __Pyx_GOTREF(__pyx_v_handle->arg4);
  56773. __Pyx_DECREF(__pyx_v_handle->arg4);
  56774. __pyx_v_handle->arg4 = __pyx_v_arg3;
  56775. /* "uvloop/cbhandles.pyx":417
  56776. * handle.arg4 = arg3
  56777. *
  56778. * return handle # <<<<<<<<<<<<<<
  56779. *
  56780. *
  56781. */
  56782. __Pyx_XDECREF(__pyx_r);
  56783. __Pyx_INCREF(((PyObject *)__pyx_v_handle));
  56784. __pyx_r = ((PyObject *)__pyx_v_handle);
  56785. goto __pyx_L0;
  56786. /* "uvloop/cbhandles.pyx":400
  56787. *
  56788. *
  56789. * cdef new_MethodHandle3(Loop loop, str name, method3_t callback, object ctx, # <<<<<<<<<<<<<<
  56790. * object arg1, object arg2, object arg3):
  56791. *
  56792. */
  56793. /* function exit code */
  56794. __pyx_L1_error:;
  56795. __Pyx_XDECREF(__pyx_t_1);
  56796. __Pyx_AddTraceback("uvloop.loop.new_MethodHandle3", __pyx_clineno, __pyx_lineno, __pyx_filename);
  56797. __pyx_r = 0;
  56798. __pyx_L0:;
  56799. __Pyx_XDECREF((PyObject *)__pyx_v_handle);
  56800. __Pyx_XGIVEREF(__pyx_r);
  56801. __Pyx_RefNannyFinishContext();
  56802. return __pyx_r;
  56803. }
  56804. /* "uvloop/cbhandles.pyx":420
  56805. *
  56806. *
  56807. * cdef extract_stack(): # <<<<<<<<<<<<<<
  56808. * """Replacement for traceback.extract_stack() that only does the
  56809. * necessary work for asyncio debug mode.
  56810. */
  56811. static PyObject *__pyx_f_6uvloop_4loop_extract_stack(void) {
  56812. PyObject *__pyx_v_f = NULL;
  56813. PyObject *__pyx_v_stack = NULL;
  56814. PyObject *__pyx_r = NULL;
  56815. __Pyx_RefNannyDeclarations
  56816. PyObject *__pyx_t_1 = NULL;
  56817. PyObject *__pyx_t_2 = NULL;
  56818. PyObject *__pyx_t_3 = NULL;
  56819. int __pyx_t_4;
  56820. int __pyx_t_5;
  56821. PyObject *__pyx_t_6 = NULL;
  56822. int __pyx_t_7;
  56823. int __pyx_t_8;
  56824. char const *__pyx_t_9;
  56825. PyObject *__pyx_t_10 = NULL;
  56826. PyObject *__pyx_t_11 = NULL;
  56827. PyObject *__pyx_t_12 = NULL;
  56828. PyObject *__pyx_t_13 = NULL;
  56829. PyObject *__pyx_t_14 = NULL;
  56830. PyObject *__pyx_t_15 = NULL;
  56831. __Pyx_RefNannySetupContext("extract_stack", 0);
  56832. /* "uvloop/cbhandles.pyx":424
  56833. * necessary work for asyncio debug mode.
  56834. * """
  56835. * f = sys_getframe() # <<<<<<<<<<<<<<
  56836. * if f is None:
  56837. * return
  56838. */
  56839. __Pyx_INCREF(__pyx_v_6uvloop_4loop_sys_getframe);
  56840. __pyx_t_2 = __pyx_v_6uvloop_4loop_sys_getframe; __pyx_t_3 = NULL;
  56841. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
  56842. __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
  56843. if (likely(__pyx_t_3)) {
  56844. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  56845. __Pyx_INCREF(__pyx_t_3);
  56846. __Pyx_INCREF(function);
  56847. __Pyx_DECREF_SET(__pyx_t_2, function);
  56848. }
  56849. }
  56850. __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  56851. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  56852. if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 424, __pyx_L1_error)
  56853. __Pyx_GOTREF(__pyx_t_1);
  56854. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  56855. __pyx_v_f = __pyx_t_1;
  56856. __pyx_t_1 = 0;
  56857. /* "uvloop/cbhandles.pyx":425
  56858. * """
  56859. * f = sys_getframe()
  56860. * if f is None: # <<<<<<<<<<<<<<
  56861. * return
  56862. *
  56863. */
  56864. __pyx_t_4 = (__pyx_v_f == Py_None);
  56865. __pyx_t_5 = (__pyx_t_4 != 0);
  56866. if (__pyx_t_5) {
  56867. /* "uvloop/cbhandles.pyx":426
  56868. * f = sys_getframe()
  56869. * if f is None:
  56870. * return # <<<<<<<<<<<<<<
  56871. *
  56872. * try:
  56873. */
  56874. __Pyx_XDECREF(__pyx_r);
  56875. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  56876. goto __pyx_L0;
  56877. /* "uvloop/cbhandles.pyx":425
  56878. * """
  56879. * f = sys_getframe()
  56880. * if f is None: # <<<<<<<<<<<<<<
  56881. * return
  56882. *
  56883. */
  56884. }
  56885. /* "uvloop/cbhandles.pyx":428
  56886. * return
  56887. *
  56888. * try: # <<<<<<<<<<<<<<
  56889. * stack = tb_StackSummary.extract(tb_walk_stack(f),
  56890. * limit=DEBUG_STACK_DEPTH,
  56891. */
  56892. /*try:*/ {
  56893. /* "uvloop/cbhandles.pyx":429
  56894. *
  56895. * try:
  56896. * stack = tb_StackSummary.extract(tb_walk_stack(f), # <<<<<<<<<<<<<<
  56897. * limit=DEBUG_STACK_DEPTH,
  56898. * lookup_lines=False)
  56899. */
  56900. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_6uvloop_4loop_tb_StackSummary, __pyx_n_s_extract); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 429, __pyx_L5_error)
  56901. __Pyx_GOTREF(__pyx_t_1);
  56902. __Pyx_INCREF(__pyx_v_6uvloop_4loop_tb_walk_stack);
  56903. __pyx_t_3 = __pyx_v_6uvloop_4loop_tb_walk_stack; __pyx_t_6 = NULL;
  56904. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
  56905. __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
  56906. if (likely(__pyx_t_6)) {
  56907. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  56908. __Pyx_INCREF(__pyx_t_6);
  56909. __Pyx_INCREF(function);
  56910. __Pyx_DECREF_SET(__pyx_t_3, function);
  56911. }
  56912. }
  56913. __pyx_t_2 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_6, __pyx_v_f) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_f);
  56914. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  56915. if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 429, __pyx_L5_error)
  56916. __Pyx_GOTREF(__pyx_t_2);
  56917. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  56918. __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 429, __pyx_L5_error)
  56919. __Pyx_GOTREF(__pyx_t_3);
  56920. __Pyx_GIVEREF(__pyx_t_2);
  56921. PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  56922. __pyx_t_2 = 0;
  56923. /* "uvloop/cbhandles.pyx":430
  56924. * try:
  56925. * stack = tb_StackSummary.extract(tb_walk_stack(f),
  56926. * limit=DEBUG_STACK_DEPTH, # <<<<<<<<<<<<<<
  56927. * lookup_lines=False)
  56928. * finally:
  56929. */
  56930. __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 430, __pyx_L5_error)
  56931. __Pyx_GOTREF(__pyx_t_2);
  56932. if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_limit, __pyx_int_10) < 0) __PYX_ERR(3, 430, __pyx_L5_error)
  56933. /* "uvloop/cbhandles.pyx":431
  56934. * stack = tb_StackSummary.extract(tb_walk_stack(f),
  56935. * limit=DEBUG_STACK_DEPTH,
  56936. * lookup_lines=False) # <<<<<<<<<<<<<<
  56937. * finally:
  56938. * f = None
  56939. */
  56940. if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_lookup_lines, Py_False) < 0) __PYX_ERR(3, 430, __pyx_L5_error)
  56941. /* "uvloop/cbhandles.pyx":429
  56942. *
  56943. * try:
  56944. * stack = tb_StackSummary.extract(tb_walk_stack(f), # <<<<<<<<<<<<<<
  56945. * limit=DEBUG_STACK_DEPTH,
  56946. * lookup_lines=False)
  56947. */
  56948. __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 429, __pyx_L5_error)
  56949. __Pyx_GOTREF(__pyx_t_6);
  56950. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  56951. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  56952. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  56953. __pyx_v_stack = __pyx_t_6;
  56954. __pyx_t_6 = 0;
  56955. }
  56956. /* "uvloop/cbhandles.pyx":433
  56957. * lookup_lines=False)
  56958. * finally:
  56959. * f = None # <<<<<<<<<<<<<<
  56960. *
  56961. * stack.reverse()
  56962. */
  56963. /*finally:*/ {
  56964. /*normal exit:*/{
  56965. __Pyx_INCREF(Py_None);
  56966. __Pyx_DECREF_SET(__pyx_v_f, Py_None);
  56967. goto __pyx_L6;
  56968. }
  56969. __pyx_L5_error:;
  56970. /*exception exit:*/{
  56971. __Pyx_PyThreadState_declare
  56972. __Pyx_PyThreadState_assign
  56973. __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0;
  56974. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  56975. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  56976. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  56977. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  56978. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
  56979. 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);
  56980. __Pyx_XGOTREF(__pyx_t_10);
  56981. __Pyx_XGOTREF(__pyx_t_11);
  56982. __Pyx_XGOTREF(__pyx_t_12);
  56983. __Pyx_XGOTREF(__pyx_t_13);
  56984. __Pyx_XGOTREF(__pyx_t_14);
  56985. __Pyx_XGOTREF(__pyx_t_15);
  56986. __pyx_t_7 = __pyx_lineno; __pyx_t_8 = __pyx_clineno; __pyx_t_9 = __pyx_filename;
  56987. {
  56988. __Pyx_INCREF(Py_None);
  56989. __Pyx_DECREF_SET(__pyx_v_f, Py_None);
  56990. }
  56991. if (PY_MAJOR_VERSION >= 3) {
  56992. __Pyx_XGIVEREF(__pyx_t_13);
  56993. __Pyx_XGIVEREF(__pyx_t_14);
  56994. __Pyx_XGIVEREF(__pyx_t_15);
  56995. __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
  56996. }
  56997. __Pyx_XGIVEREF(__pyx_t_10);
  56998. __Pyx_XGIVEREF(__pyx_t_11);
  56999. __Pyx_XGIVEREF(__pyx_t_12);
  57000. __Pyx_ErrRestore(__pyx_t_10, __pyx_t_11, __pyx_t_12);
  57001. __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0;
  57002. __pyx_lineno = __pyx_t_7; __pyx_clineno = __pyx_t_8; __pyx_filename = __pyx_t_9;
  57003. goto __pyx_L1_error;
  57004. }
  57005. __pyx_L6:;
  57006. }
  57007. /* "uvloop/cbhandles.pyx":435
  57008. * f = None
  57009. *
  57010. * stack.reverse() # <<<<<<<<<<<<<<
  57011. * return stack
  57012. */
  57013. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_stack, __pyx_n_s_reverse); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 435, __pyx_L1_error)
  57014. __Pyx_GOTREF(__pyx_t_2);
  57015. __pyx_t_3 = NULL;
  57016. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
  57017. __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
  57018. if (likely(__pyx_t_3)) {
  57019. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  57020. __Pyx_INCREF(__pyx_t_3);
  57021. __Pyx_INCREF(function);
  57022. __Pyx_DECREF_SET(__pyx_t_2, function);
  57023. }
  57024. }
  57025. __pyx_t_6 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  57026. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  57027. if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 435, __pyx_L1_error)
  57028. __Pyx_GOTREF(__pyx_t_6);
  57029. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  57030. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  57031. /* "uvloop/cbhandles.pyx":436
  57032. *
  57033. * stack.reverse()
  57034. * return stack # <<<<<<<<<<<<<<
  57035. */
  57036. __Pyx_XDECREF(__pyx_r);
  57037. __Pyx_INCREF(__pyx_v_stack);
  57038. __pyx_r = __pyx_v_stack;
  57039. goto __pyx_L0;
  57040. /* "uvloop/cbhandles.pyx":420
  57041. *
  57042. *
  57043. * cdef extract_stack(): # <<<<<<<<<<<<<<
  57044. * """Replacement for traceback.extract_stack() that only does the
  57045. * necessary work for asyncio debug mode.
  57046. */
  57047. /* function exit code */
  57048. __pyx_L1_error:;
  57049. __Pyx_XDECREF(__pyx_t_1);
  57050. __Pyx_XDECREF(__pyx_t_2);
  57051. __Pyx_XDECREF(__pyx_t_3);
  57052. __Pyx_XDECREF(__pyx_t_6);
  57053. __Pyx_AddTraceback("uvloop.loop.extract_stack", __pyx_clineno, __pyx_lineno, __pyx_filename);
  57054. __pyx_r = 0;
  57055. __pyx_L0:;
  57056. __Pyx_XDECREF(__pyx_v_f);
  57057. __Pyx_XDECREF(__pyx_v_stack);
  57058. __Pyx_XGIVEREF(__pyx_r);
  57059. __Pyx_RefNannyFinishContext();
  57060. return __pyx_r;
  57061. }
  57062. /* "uvloop/pseudosock.pyx":10
  57063. * object _sockname
  57064. *
  57065. * def __init__(self, int family, int type, int proto, int fd): # <<<<<<<<<<<<<<
  57066. * self._family = family
  57067. * self._type = type
  57068. */
  57069. /* Python wrapper */
  57070. static int __pyx_pw_6uvloop_4loop_12PseudoSocket_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  57071. static int __pyx_pw_6uvloop_4loop_12PseudoSocket_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  57072. int __pyx_v_family;
  57073. int __pyx_v_type;
  57074. int __pyx_v_proto;
  57075. int __pyx_v_fd;
  57076. int __pyx_r;
  57077. __Pyx_RefNannyDeclarations
  57078. __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  57079. {
  57080. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_family,&__pyx_n_s_type,&__pyx_n_s_proto,&__pyx_n_s_fd,0};
  57081. PyObject* values[4] = {0,0,0,0};
  57082. if (unlikely(__pyx_kwds)) {
  57083. Py_ssize_t kw_args;
  57084. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  57085. switch (pos_args) {
  57086. case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
  57087. CYTHON_FALLTHROUGH;
  57088. case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
  57089. CYTHON_FALLTHROUGH;
  57090. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  57091. CYTHON_FALLTHROUGH;
  57092. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  57093. CYTHON_FALLTHROUGH;
  57094. case 0: break;
  57095. default: goto __pyx_L5_argtuple_error;
  57096. }
  57097. kw_args = PyDict_Size(__pyx_kwds);
  57098. switch (pos_args) {
  57099. case 0:
  57100. if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_family)) != 0)) kw_args--;
  57101. else goto __pyx_L5_argtuple_error;
  57102. CYTHON_FALLTHROUGH;
  57103. case 1:
  57104. if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_type)) != 0)) kw_args--;
  57105. else {
  57106. __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 1); __PYX_ERR(10, 10, __pyx_L3_error)
  57107. }
  57108. CYTHON_FALLTHROUGH;
  57109. case 2:
  57110. if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_proto)) != 0)) kw_args--;
  57111. else {
  57112. __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 2); __PYX_ERR(10, 10, __pyx_L3_error)
  57113. }
  57114. CYTHON_FALLTHROUGH;
  57115. case 3:
  57116. if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_fd)) != 0)) kw_args--;
  57117. else {
  57118. __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 3); __PYX_ERR(10, 10, __pyx_L3_error)
  57119. }
  57120. }
  57121. if (unlikely(kw_args > 0)) {
  57122. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(10, 10, __pyx_L3_error)
  57123. }
  57124. } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
  57125. goto __pyx_L5_argtuple_error;
  57126. } else {
  57127. values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  57128. values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  57129. values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
  57130. values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
  57131. }
  57132. __pyx_v_family = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_family == (int)-1) && PyErr_Occurred())) __PYX_ERR(10, 10, __pyx_L3_error)
  57133. __pyx_v_type = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_type == (int)-1) && PyErr_Occurred())) __PYX_ERR(10, 10, __pyx_L3_error)
  57134. __pyx_v_proto = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_proto == (int)-1) && PyErr_Occurred())) __PYX_ERR(10, 10, __pyx_L3_error)
  57135. __pyx_v_fd = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_fd == (int)-1) && PyErr_Occurred())) __PYX_ERR(10, 10, __pyx_L3_error)
  57136. }
  57137. goto __pyx_L4_argument_unpacking_done;
  57138. __pyx_L5_argtuple_error:;
  57139. __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(10, 10, __pyx_L3_error)
  57140. __pyx_L3_error:;
  57141. __Pyx_AddTraceback("uvloop.loop.PseudoSocket.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  57142. __Pyx_RefNannyFinishContext();
  57143. return -1;
  57144. __pyx_L4_argument_unpacking_done:;
  57145. __pyx_r = __pyx_pf_6uvloop_4loop_12PseudoSocket___init__(((struct __pyx_obj_6uvloop_4loop_PseudoSocket *)__pyx_v_self), __pyx_v_family, __pyx_v_type, __pyx_v_proto, __pyx_v_fd);
  57146. /* function exit code */
  57147. __Pyx_RefNannyFinishContext();
  57148. return __pyx_r;
  57149. }
  57150. static int __pyx_pf_6uvloop_4loop_12PseudoSocket___init__(struct __pyx_obj_6uvloop_4loop_PseudoSocket *__pyx_v_self, int __pyx_v_family, int __pyx_v_type, int __pyx_v_proto, int __pyx_v_fd) {
  57151. int __pyx_r;
  57152. __Pyx_RefNannyDeclarations
  57153. __Pyx_RefNannySetupContext("__init__", 0);
  57154. /* "uvloop/pseudosock.pyx":11
  57155. *
  57156. * def __init__(self, int family, int type, int proto, int fd):
  57157. * self._family = family # <<<<<<<<<<<<<<
  57158. * self._type = type
  57159. * self._proto = proto
  57160. */
  57161. __pyx_v_self->_family = __pyx_v_family;
  57162. /* "uvloop/pseudosock.pyx":12
  57163. * def __init__(self, int family, int type, int proto, int fd):
  57164. * self._family = family
  57165. * self._type = type # <<<<<<<<<<<<<<
  57166. * self._proto = proto
  57167. * self._fd = fd
  57168. */
  57169. __pyx_v_self->_type = __pyx_v_type;
  57170. /* "uvloop/pseudosock.pyx":13
  57171. * self._family = family
  57172. * self._type = type
  57173. * self._proto = proto # <<<<<<<<<<<<<<
  57174. * self._fd = fd
  57175. * self._peername = None
  57176. */
  57177. __pyx_v_self->_proto = __pyx_v_proto;
  57178. /* "uvloop/pseudosock.pyx":14
  57179. * self._type = type
  57180. * self._proto = proto
  57181. * self._fd = fd # <<<<<<<<<<<<<<
  57182. * self._peername = None
  57183. * self._sockname = None
  57184. */
  57185. __pyx_v_self->_fd = __pyx_v_fd;
  57186. /* "uvloop/pseudosock.pyx":15
  57187. * self._proto = proto
  57188. * self._fd = fd
  57189. * self._peername = None # <<<<<<<<<<<<<<
  57190. * self._sockname = None
  57191. *
  57192. */
  57193. __Pyx_INCREF(Py_None);
  57194. __Pyx_GIVEREF(Py_None);
  57195. __Pyx_GOTREF(__pyx_v_self->_peername);
  57196. __Pyx_DECREF(__pyx_v_self->_peername);
  57197. __pyx_v_self->_peername = Py_None;
  57198. /* "uvloop/pseudosock.pyx":16
  57199. * self._fd = fd
  57200. * self._peername = None
  57201. * self._sockname = None # <<<<<<<<<<<<<<
  57202. *
  57203. * cdef _na(self, what):
  57204. */
  57205. __Pyx_INCREF(Py_None);
  57206. __Pyx_GIVEREF(Py_None);
  57207. __Pyx_GOTREF(__pyx_v_self->_sockname);
  57208. __Pyx_DECREF(__pyx_v_self->_sockname);
  57209. __pyx_v_self->_sockname = Py_None;
  57210. /* "uvloop/pseudosock.pyx":10
  57211. * object _sockname
  57212. *
  57213. * def __init__(self, int family, int type, int proto, int fd): # <<<<<<<<<<<<<<
  57214. * self._family = family
  57215. * self._type = type
  57216. */
  57217. /* function exit code */
  57218. __pyx_r = 0;
  57219. __Pyx_RefNannyFinishContext();
  57220. return __pyx_r;
  57221. }
  57222. /* "uvloop/pseudosock.pyx":18
  57223. * self._sockname = None
  57224. *
  57225. * cdef _na(self, what): # <<<<<<<<<<<<<<
  57226. * raise TypeError('transport sockets do not support {}'.format(what))
  57227. *
  57228. */
  57229. static PyObject *__pyx_f_6uvloop_4loop_12PseudoSocket__na(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_PseudoSocket *__pyx_v_self, PyObject *__pyx_v_what) {
  57230. PyObject *__pyx_r = NULL;
  57231. __Pyx_RefNannyDeclarations
  57232. PyObject *__pyx_t_1 = NULL;
  57233. PyObject *__pyx_t_2 = NULL;
  57234. PyObject *__pyx_t_3 = NULL;
  57235. __Pyx_RefNannySetupContext("_na", 0);
  57236. /* "uvloop/pseudosock.pyx":19
  57237. *
  57238. * cdef _na(self, what):
  57239. * raise TypeError('transport sockets do not support {}'.format(what)) # <<<<<<<<<<<<<<
  57240. *
  57241. * cdef _make_sock(self):
  57242. */
  57243. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_transport_sockets_do_not_support, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 19, __pyx_L1_error)
  57244. __Pyx_GOTREF(__pyx_t_2);
  57245. __pyx_t_3 = NULL;
  57246. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
  57247. __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
  57248. if (likely(__pyx_t_3)) {
  57249. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  57250. __Pyx_INCREF(__pyx_t_3);
  57251. __Pyx_INCREF(function);
  57252. __Pyx_DECREF_SET(__pyx_t_2, function);
  57253. }
  57254. }
  57255. __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_what) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_what);
  57256. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  57257. if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 19, __pyx_L1_error)
  57258. __Pyx_GOTREF(__pyx_t_1);
  57259. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  57260. __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 19, __pyx_L1_error)
  57261. __Pyx_GOTREF(__pyx_t_2);
  57262. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  57263. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  57264. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  57265. __PYX_ERR(10, 19, __pyx_L1_error)
  57266. /* "uvloop/pseudosock.pyx":18
  57267. * self._sockname = None
  57268. *
  57269. * cdef _na(self, what): # <<<<<<<<<<<<<<
  57270. * raise TypeError('transport sockets do not support {}'.format(what))
  57271. *
  57272. */
  57273. /* function exit code */
  57274. __pyx_L1_error:;
  57275. __Pyx_XDECREF(__pyx_t_1);
  57276. __Pyx_XDECREF(__pyx_t_2);
  57277. __Pyx_XDECREF(__pyx_t_3);
  57278. __Pyx_AddTraceback("uvloop.loop.PseudoSocket._na", __pyx_clineno, __pyx_lineno, __pyx_filename);
  57279. __pyx_r = 0;
  57280. __Pyx_XGIVEREF(__pyx_r);
  57281. __Pyx_RefNannyFinishContext();
  57282. return __pyx_r;
  57283. }
  57284. /* "uvloop/pseudosock.pyx":21
  57285. * raise TypeError('transport sockets do not support {}'.format(what))
  57286. *
  57287. * cdef _make_sock(self): # <<<<<<<<<<<<<<
  57288. * return socket_socket(self._family, self._type, self._proto, self._fd)
  57289. *
  57290. */
  57291. static PyObject *__pyx_f_6uvloop_4loop_12PseudoSocket__make_sock(struct __pyx_obj_6uvloop_4loop_PseudoSocket *__pyx_v_self) {
  57292. PyObject *__pyx_r = NULL;
  57293. __Pyx_RefNannyDeclarations
  57294. PyObject *__pyx_t_1 = NULL;
  57295. PyObject *__pyx_t_2 = NULL;
  57296. PyObject *__pyx_t_3 = NULL;
  57297. PyObject *__pyx_t_4 = NULL;
  57298. PyObject *__pyx_t_5 = NULL;
  57299. PyObject *__pyx_t_6 = NULL;
  57300. PyObject *__pyx_t_7 = NULL;
  57301. int __pyx_t_8;
  57302. PyObject *__pyx_t_9 = NULL;
  57303. __Pyx_RefNannySetupContext("_make_sock", 0);
  57304. /* "uvloop/pseudosock.pyx":22
  57305. *
  57306. * cdef _make_sock(self):
  57307. * return socket_socket(self._family, self._type, self._proto, self._fd) # <<<<<<<<<<<<<<
  57308. *
  57309. * property family:
  57310. */
  57311. __Pyx_XDECREF(__pyx_r);
  57312. __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->_family); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 22, __pyx_L1_error)
  57313. __Pyx_GOTREF(__pyx_t_2);
  57314. __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 22, __pyx_L1_error)
  57315. __Pyx_GOTREF(__pyx_t_3);
  57316. __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_self->_proto); if (unlikely(!__pyx_t_4)) __PYX_ERR(10, 22, __pyx_L1_error)
  57317. __Pyx_GOTREF(__pyx_t_4);
  57318. __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_self->_fd); if (unlikely(!__pyx_t_5)) __PYX_ERR(10, 22, __pyx_L1_error)
  57319. __Pyx_GOTREF(__pyx_t_5);
  57320. __Pyx_INCREF(__pyx_v_6uvloop_4loop_socket_socket);
  57321. __pyx_t_6 = __pyx_v_6uvloop_4loop_socket_socket; __pyx_t_7 = NULL;
  57322. __pyx_t_8 = 0;
  57323. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
  57324. __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
  57325. if (likely(__pyx_t_7)) {
  57326. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
  57327. __Pyx_INCREF(__pyx_t_7);
  57328. __Pyx_INCREF(function);
  57329. __Pyx_DECREF_SET(__pyx_t_6, function);
  57330. __pyx_t_8 = 1;
  57331. }
  57332. }
  57333. #if CYTHON_FAST_PYCALL
  57334. if (PyFunction_Check(__pyx_t_6)) {
  57335. PyObject *__pyx_temp[5] = {__pyx_t_7, __pyx_t_2, __pyx_t_3, __pyx_t_4, __pyx_t_5};
  57336. __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 4+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 22, __pyx_L1_error)
  57337. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  57338. __Pyx_GOTREF(__pyx_t_1);
  57339. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  57340. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  57341. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  57342. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  57343. } else
  57344. #endif
  57345. #if CYTHON_FAST_PYCCALL
  57346. if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
  57347. PyObject *__pyx_temp[5] = {__pyx_t_7, __pyx_t_2, __pyx_t_3, __pyx_t_4, __pyx_t_5};
  57348. __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 4+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 22, __pyx_L1_error)
  57349. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  57350. __Pyx_GOTREF(__pyx_t_1);
  57351. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  57352. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  57353. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  57354. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  57355. } else
  57356. #endif
  57357. {
  57358. __pyx_t_9 = PyTuple_New(4+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(10, 22, __pyx_L1_error)
  57359. __Pyx_GOTREF(__pyx_t_9);
  57360. if (__pyx_t_7) {
  57361. __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
  57362. }
  57363. __Pyx_GIVEREF(__pyx_t_2);
  57364. PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_2);
  57365. __Pyx_GIVEREF(__pyx_t_3);
  57366. PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_3);
  57367. __Pyx_GIVEREF(__pyx_t_4);
  57368. PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_t_4);
  57369. __Pyx_GIVEREF(__pyx_t_5);
  57370. PyTuple_SET_ITEM(__pyx_t_9, 3+__pyx_t_8, __pyx_t_5);
  57371. __pyx_t_2 = 0;
  57372. __pyx_t_3 = 0;
  57373. __pyx_t_4 = 0;
  57374. __pyx_t_5 = 0;
  57375. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 22, __pyx_L1_error)
  57376. __Pyx_GOTREF(__pyx_t_1);
  57377. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  57378. }
  57379. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  57380. __pyx_r = __pyx_t_1;
  57381. __pyx_t_1 = 0;
  57382. goto __pyx_L0;
  57383. /* "uvloop/pseudosock.pyx":21
  57384. * raise TypeError('transport sockets do not support {}'.format(what))
  57385. *
  57386. * cdef _make_sock(self): # <<<<<<<<<<<<<<
  57387. * return socket_socket(self._family, self._type, self._proto, self._fd)
  57388. *
  57389. */
  57390. /* function exit code */
  57391. __pyx_L1_error:;
  57392. __Pyx_XDECREF(__pyx_t_1);
  57393. __Pyx_XDECREF(__pyx_t_2);
  57394. __Pyx_XDECREF(__pyx_t_3);
  57395. __Pyx_XDECREF(__pyx_t_4);
  57396. __Pyx_XDECREF(__pyx_t_5);
  57397. __Pyx_XDECREF(__pyx_t_6);
  57398. __Pyx_XDECREF(__pyx_t_7);
  57399. __Pyx_XDECREF(__pyx_t_9);
  57400. __Pyx_AddTraceback("uvloop.loop.PseudoSocket._make_sock", __pyx_clineno, __pyx_lineno, __pyx_filename);
  57401. __pyx_r = 0;
  57402. __pyx_L0:;
  57403. __Pyx_XGIVEREF(__pyx_r);
  57404. __Pyx_RefNannyFinishContext();
  57405. return __pyx_r;
  57406. }
  57407. /* "uvloop/pseudosock.pyx":25
  57408. *
  57409. * property family:
  57410. * def __get__(self): # <<<<<<<<<<<<<<
  57411. * try:
  57412. * return socket_AddressFamily(self._family)
  57413. */
  57414. /* Python wrapper */
  57415. static PyObject *__pyx_pw_6uvloop_4loop_12PseudoSocket_6family_1__get__(PyObject *__pyx_v_self); /*proto*/
  57416. static PyObject *__pyx_pw_6uvloop_4loop_12PseudoSocket_6family_1__get__(PyObject *__pyx_v_self) {
  57417. PyObject *__pyx_r = 0;
  57418. __Pyx_RefNannyDeclarations
  57419. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  57420. __pyx_r = __pyx_pf_6uvloop_4loop_12PseudoSocket_6family___get__(((struct __pyx_obj_6uvloop_4loop_PseudoSocket *)__pyx_v_self));
  57421. /* function exit code */
  57422. __Pyx_RefNannyFinishContext();
  57423. return __pyx_r;
  57424. }
  57425. static PyObject *__pyx_pf_6uvloop_4loop_12PseudoSocket_6family___get__(struct __pyx_obj_6uvloop_4loop_PseudoSocket *__pyx_v_self) {
  57426. PyObject *__pyx_r = NULL;
  57427. __Pyx_RefNannyDeclarations
  57428. PyObject *__pyx_t_1 = NULL;
  57429. PyObject *__pyx_t_2 = NULL;
  57430. PyObject *__pyx_t_3 = NULL;
  57431. PyObject *__pyx_t_4 = NULL;
  57432. PyObject *__pyx_t_5 = NULL;
  57433. PyObject *__pyx_t_6 = NULL;
  57434. PyObject *__pyx_t_7 = NULL;
  57435. int __pyx_t_8;
  57436. __Pyx_RefNannySetupContext("__get__", 0);
  57437. /* "uvloop/pseudosock.pyx":26
  57438. * property family:
  57439. * def __get__(self):
  57440. * try: # <<<<<<<<<<<<<<
  57441. * return socket_AddressFamily(self._family)
  57442. * except ValueError:
  57443. */
  57444. {
  57445. __Pyx_PyThreadState_declare
  57446. __Pyx_PyThreadState_assign
  57447. __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
  57448. __Pyx_XGOTREF(__pyx_t_1);
  57449. __Pyx_XGOTREF(__pyx_t_2);
  57450. __Pyx_XGOTREF(__pyx_t_3);
  57451. /*try:*/ {
  57452. /* "uvloop/pseudosock.pyx":27
  57453. * def __get__(self):
  57454. * try:
  57455. * return socket_AddressFamily(self._family) # <<<<<<<<<<<<<<
  57456. * except ValueError:
  57457. * return self._family
  57458. */
  57459. __Pyx_XDECREF(__pyx_r);
  57460. __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_self->_family); if (unlikely(!__pyx_t_5)) __PYX_ERR(10, 27, __pyx_L3_error)
  57461. __Pyx_GOTREF(__pyx_t_5);
  57462. __Pyx_INCREF(__pyx_v_6uvloop_4loop_socket_AddressFamily);
  57463. __pyx_t_6 = __pyx_v_6uvloop_4loop_socket_AddressFamily; __pyx_t_7 = NULL;
  57464. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
  57465. __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
  57466. if (likely(__pyx_t_7)) {
  57467. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
  57468. __Pyx_INCREF(__pyx_t_7);
  57469. __Pyx_INCREF(function);
  57470. __Pyx_DECREF_SET(__pyx_t_6, function);
  57471. }
  57472. }
  57473. __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5);
  57474. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  57475. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  57476. if (unlikely(!__pyx_t_4)) __PYX_ERR(10, 27, __pyx_L3_error)
  57477. __Pyx_GOTREF(__pyx_t_4);
  57478. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  57479. __pyx_r = __pyx_t_4;
  57480. __pyx_t_4 = 0;
  57481. goto __pyx_L7_try_return;
  57482. /* "uvloop/pseudosock.pyx":26
  57483. * property family:
  57484. * def __get__(self):
  57485. * try: # <<<<<<<<<<<<<<
  57486. * return socket_AddressFamily(self._family)
  57487. * except ValueError:
  57488. */
  57489. }
  57490. __pyx_L3_error:;
  57491. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  57492. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  57493. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  57494. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  57495. /* "uvloop/pseudosock.pyx":28
  57496. * try:
  57497. * return socket_AddressFamily(self._family)
  57498. * except ValueError: # <<<<<<<<<<<<<<
  57499. * return self._family
  57500. *
  57501. */
  57502. __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError);
  57503. if (__pyx_t_8) {
  57504. __Pyx_AddTraceback("uvloop.loop.PseudoSocket.family.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  57505. if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_5) < 0) __PYX_ERR(10, 28, __pyx_L5_except_error)
  57506. __Pyx_GOTREF(__pyx_t_4);
  57507. __Pyx_GOTREF(__pyx_t_6);
  57508. __Pyx_GOTREF(__pyx_t_5);
  57509. /* "uvloop/pseudosock.pyx":29
  57510. * return socket_AddressFamily(self._family)
  57511. * except ValueError:
  57512. * return self._family # <<<<<<<<<<<<<<
  57513. *
  57514. * property type:
  57515. */
  57516. __Pyx_XDECREF(__pyx_r);
  57517. __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_self->_family); if (unlikely(!__pyx_t_7)) __PYX_ERR(10, 29, __pyx_L5_except_error)
  57518. __Pyx_GOTREF(__pyx_t_7);
  57519. __pyx_r = __pyx_t_7;
  57520. __pyx_t_7 = 0;
  57521. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  57522. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  57523. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  57524. goto __pyx_L6_except_return;
  57525. }
  57526. goto __pyx_L5_except_error;
  57527. __pyx_L5_except_error:;
  57528. /* "uvloop/pseudosock.pyx":26
  57529. * property family:
  57530. * def __get__(self):
  57531. * try: # <<<<<<<<<<<<<<
  57532. * return socket_AddressFamily(self._family)
  57533. * except ValueError:
  57534. */
  57535. __Pyx_XGIVEREF(__pyx_t_1);
  57536. __Pyx_XGIVEREF(__pyx_t_2);
  57537. __Pyx_XGIVEREF(__pyx_t_3);
  57538. __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
  57539. goto __pyx_L1_error;
  57540. __pyx_L7_try_return:;
  57541. __Pyx_XGIVEREF(__pyx_t_1);
  57542. __Pyx_XGIVEREF(__pyx_t_2);
  57543. __Pyx_XGIVEREF(__pyx_t_3);
  57544. __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
  57545. goto __pyx_L0;
  57546. __pyx_L6_except_return:;
  57547. __Pyx_XGIVEREF(__pyx_t_1);
  57548. __Pyx_XGIVEREF(__pyx_t_2);
  57549. __Pyx_XGIVEREF(__pyx_t_3);
  57550. __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
  57551. goto __pyx_L0;
  57552. }
  57553. /* "uvloop/pseudosock.pyx":25
  57554. *
  57555. * property family:
  57556. * def __get__(self): # <<<<<<<<<<<<<<
  57557. * try:
  57558. * return socket_AddressFamily(self._family)
  57559. */
  57560. /* function exit code */
  57561. __pyx_L1_error:;
  57562. __Pyx_XDECREF(__pyx_t_4);
  57563. __Pyx_XDECREF(__pyx_t_5);
  57564. __Pyx_XDECREF(__pyx_t_6);
  57565. __Pyx_XDECREF(__pyx_t_7);
  57566. __Pyx_AddTraceback("uvloop.loop.PseudoSocket.family.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  57567. __pyx_r = NULL;
  57568. __pyx_L0:;
  57569. __Pyx_XGIVEREF(__pyx_r);
  57570. __Pyx_RefNannyFinishContext();
  57571. return __pyx_r;
  57572. }
  57573. /* "uvloop/pseudosock.pyx":32
  57574. *
  57575. * property type:
  57576. * def __get__(self): # <<<<<<<<<<<<<<
  57577. * try:
  57578. * return socket_SocketKind(self._type)
  57579. */
  57580. /* Python wrapper */
  57581. static PyObject *__pyx_pw_6uvloop_4loop_12PseudoSocket_4type_1__get__(PyObject *__pyx_v_self); /*proto*/
  57582. static PyObject *__pyx_pw_6uvloop_4loop_12PseudoSocket_4type_1__get__(PyObject *__pyx_v_self) {
  57583. PyObject *__pyx_r = 0;
  57584. __Pyx_RefNannyDeclarations
  57585. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  57586. __pyx_r = __pyx_pf_6uvloop_4loop_12PseudoSocket_4type___get__(((struct __pyx_obj_6uvloop_4loop_PseudoSocket *)__pyx_v_self));
  57587. /* function exit code */
  57588. __Pyx_RefNannyFinishContext();
  57589. return __pyx_r;
  57590. }
  57591. static PyObject *__pyx_pf_6uvloop_4loop_12PseudoSocket_4type___get__(struct __pyx_obj_6uvloop_4loop_PseudoSocket *__pyx_v_self) {
  57592. PyObject *__pyx_r = NULL;
  57593. __Pyx_RefNannyDeclarations
  57594. PyObject *__pyx_t_1 = NULL;
  57595. PyObject *__pyx_t_2 = NULL;
  57596. PyObject *__pyx_t_3 = NULL;
  57597. PyObject *__pyx_t_4 = NULL;
  57598. PyObject *__pyx_t_5 = NULL;
  57599. PyObject *__pyx_t_6 = NULL;
  57600. PyObject *__pyx_t_7 = NULL;
  57601. int __pyx_t_8;
  57602. __Pyx_RefNannySetupContext("__get__", 0);
  57603. /* "uvloop/pseudosock.pyx":33
  57604. * property type:
  57605. * def __get__(self):
  57606. * try: # <<<<<<<<<<<<<<
  57607. * return socket_SocketKind(self._type)
  57608. * except ValueError:
  57609. */
  57610. {
  57611. __Pyx_PyThreadState_declare
  57612. __Pyx_PyThreadState_assign
  57613. __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
  57614. __Pyx_XGOTREF(__pyx_t_1);
  57615. __Pyx_XGOTREF(__pyx_t_2);
  57616. __Pyx_XGOTREF(__pyx_t_3);
  57617. /*try:*/ {
  57618. /* "uvloop/pseudosock.pyx":34
  57619. * def __get__(self):
  57620. * try:
  57621. * return socket_SocketKind(self._type) # <<<<<<<<<<<<<<
  57622. * except ValueError:
  57623. * return self._type
  57624. */
  57625. __Pyx_XDECREF(__pyx_r);
  57626. __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_self->_type); if (unlikely(!__pyx_t_5)) __PYX_ERR(10, 34, __pyx_L3_error)
  57627. __Pyx_GOTREF(__pyx_t_5);
  57628. __Pyx_INCREF(__pyx_v_6uvloop_4loop_socket_SocketKind);
  57629. __pyx_t_6 = __pyx_v_6uvloop_4loop_socket_SocketKind; __pyx_t_7 = NULL;
  57630. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
  57631. __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
  57632. if (likely(__pyx_t_7)) {
  57633. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
  57634. __Pyx_INCREF(__pyx_t_7);
  57635. __Pyx_INCREF(function);
  57636. __Pyx_DECREF_SET(__pyx_t_6, function);
  57637. }
  57638. }
  57639. __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5);
  57640. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  57641. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  57642. if (unlikely(!__pyx_t_4)) __PYX_ERR(10, 34, __pyx_L3_error)
  57643. __Pyx_GOTREF(__pyx_t_4);
  57644. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  57645. __pyx_r = __pyx_t_4;
  57646. __pyx_t_4 = 0;
  57647. goto __pyx_L7_try_return;
  57648. /* "uvloop/pseudosock.pyx":33
  57649. * property type:
  57650. * def __get__(self):
  57651. * try: # <<<<<<<<<<<<<<
  57652. * return socket_SocketKind(self._type)
  57653. * except ValueError:
  57654. */
  57655. }
  57656. __pyx_L3_error:;
  57657. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  57658. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  57659. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  57660. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  57661. /* "uvloop/pseudosock.pyx":35
  57662. * try:
  57663. * return socket_SocketKind(self._type)
  57664. * except ValueError: # <<<<<<<<<<<<<<
  57665. * return self._type
  57666. *
  57667. */
  57668. __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError);
  57669. if (__pyx_t_8) {
  57670. __Pyx_AddTraceback("uvloop.loop.PseudoSocket.type.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  57671. if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_5) < 0) __PYX_ERR(10, 35, __pyx_L5_except_error)
  57672. __Pyx_GOTREF(__pyx_t_4);
  57673. __Pyx_GOTREF(__pyx_t_6);
  57674. __Pyx_GOTREF(__pyx_t_5);
  57675. /* "uvloop/pseudosock.pyx":36
  57676. * return socket_SocketKind(self._type)
  57677. * except ValueError:
  57678. * return self._type # <<<<<<<<<<<<<<
  57679. *
  57680. * property proto:
  57681. */
  57682. __Pyx_XDECREF(__pyx_r);
  57683. __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_self->_type); if (unlikely(!__pyx_t_7)) __PYX_ERR(10, 36, __pyx_L5_except_error)
  57684. __Pyx_GOTREF(__pyx_t_7);
  57685. __pyx_r = __pyx_t_7;
  57686. __pyx_t_7 = 0;
  57687. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  57688. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  57689. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  57690. goto __pyx_L6_except_return;
  57691. }
  57692. goto __pyx_L5_except_error;
  57693. __pyx_L5_except_error:;
  57694. /* "uvloop/pseudosock.pyx":33
  57695. * property type:
  57696. * def __get__(self):
  57697. * try: # <<<<<<<<<<<<<<
  57698. * return socket_SocketKind(self._type)
  57699. * except ValueError:
  57700. */
  57701. __Pyx_XGIVEREF(__pyx_t_1);
  57702. __Pyx_XGIVEREF(__pyx_t_2);
  57703. __Pyx_XGIVEREF(__pyx_t_3);
  57704. __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
  57705. goto __pyx_L1_error;
  57706. __pyx_L7_try_return:;
  57707. __Pyx_XGIVEREF(__pyx_t_1);
  57708. __Pyx_XGIVEREF(__pyx_t_2);
  57709. __Pyx_XGIVEREF(__pyx_t_3);
  57710. __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
  57711. goto __pyx_L0;
  57712. __pyx_L6_except_return:;
  57713. __Pyx_XGIVEREF(__pyx_t_1);
  57714. __Pyx_XGIVEREF(__pyx_t_2);
  57715. __Pyx_XGIVEREF(__pyx_t_3);
  57716. __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
  57717. goto __pyx_L0;
  57718. }
  57719. /* "uvloop/pseudosock.pyx":32
  57720. *
  57721. * property type:
  57722. * def __get__(self): # <<<<<<<<<<<<<<
  57723. * try:
  57724. * return socket_SocketKind(self._type)
  57725. */
  57726. /* function exit code */
  57727. __pyx_L1_error:;
  57728. __Pyx_XDECREF(__pyx_t_4);
  57729. __Pyx_XDECREF(__pyx_t_5);
  57730. __Pyx_XDECREF(__pyx_t_6);
  57731. __Pyx_XDECREF(__pyx_t_7);
  57732. __Pyx_AddTraceback("uvloop.loop.PseudoSocket.type.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  57733. __pyx_r = NULL;
  57734. __pyx_L0:;
  57735. __Pyx_XGIVEREF(__pyx_r);
  57736. __Pyx_RefNannyFinishContext();
  57737. return __pyx_r;
  57738. }
  57739. /* "uvloop/pseudosock.pyx":39
  57740. *
  57741. * property proto:
  57742. * def __get__(self): # <<<<<<<<<<<<<<
  57743. * return self._proto
  57744. *
  57745. */
  57746. /* Python wrapper */
  57747. static PyObject *__pyx_pw_6uvloop_4loop_12PseudoSocket_5proto_1__get__(PyObject *__pyx_v_self); /*proto*/
  57748. static PyObject *__pyx_pw_6uvloop_4loop_12PseudoSocket_5proto_1__get__(PyObject *__pyx_v_self) {
  57749. PyObject *__pyx_r = 0;
  57750. __Pyx_RefNannyDeclarations
  57751. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  57752. __pyx_r = __pyx_pf_6uvloop_4loop_12PseudoSocket_5proto___get__(((struct __pyx_obj_6uvloop_4loop_PseudoSocket *)__pyx_v_self));
  57753. /* function exit code */
  57754. __Pyx_RefNannyFinishContext();
  57755. return __pyx_r;
  57756. }
  57757. static PyObject *__pyx_pf_6uvloop_4loop_12PseudoSocket_5proto___get__(struct __pyx_obj_6uvloop_4loop_PseudoSocket *__pyx_v_self) {
  57758. PyObject *__pyx_r = NULL;
  57759. __Pyx_RefNannyDeclarations
  57760. PyObject *__pyx_t_1 = NULL;
  57761. __Pyx_RefNannySetupContext("__get__", 0);
  57762. /* "uvloop/pseudosock.pyx":40
  57763. * property proto:
  57764. * def __get__(self):
  57765. * return self._proto # <<<<<<<<<<<<<<
  57766. *
  57767. * def __repr__(self):
  57768. */
  57769. __Pyx_XDECREF(__pyx_r);
  57770. __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_proto); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 40, __pyx_L1_error)
  57771. __Pyx_GOTREF(__pyx_t_1);
  57772. __pyx_r = __pyx_t_1;
  57773. __pyx_t_1 = 0;
  57774. goto __pyx_L0;
  57775. /* "uvloop/pseudosock.pyx":39
  57776. *
  57777. * property proto:
  57778. * def __get__(self): # <<<<<<<<<<<<<<
  57779. * return self._proto
  57780. *
  57781. */
  57782. /* function exit code */
  57783. __pyx_L1_error:;
  57784. __Pyx_XDECREF(__pyx_t_1);
  57785. __Pyx_AddTraceback("uvloop.loop.PseudoSocket.proto.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  57786. __pyx_r = NULL;
  57787. __pyx_L0:;
  57788. __Pyx_XGIVEREF(__pyx_r);
  57789. __Pyx_RefNannyFinishContext();
  57790. return __pyx_r;
  57791. }
  57792. /* "uvloop/pseudosock.pyx":42
  57793. * return self._proto
  57794. *
  57795. * def __repr__(self): # <<<<<<<<<<<<<<
  57796. * s = ("<uvloop.PseudoSocket fd={}, family={!s}, "
  57797. * "type={!s}, proto={}").format(self.fileno(), self.family,
  57798. */
  57799. /* Python wrapper */
  57800. static PyObject *__pyx_pw_6uvloop_4loop_12PseudoSocket_3__repr__(PyObject *__pyx_v_self); /*proto*/
  57801. static PyObject *__pyx_pw_6uvloop_4loop_12PseudoSocket_3__repr__(PyObject *__pyx_v_self) {
  57802. PyObject *__pyx_r = 0;
  57803. __Pyx_RefNannyDeclarations
  57804. __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  57805. __pyx_r = __pyx_pf_6uvloop_4loop_12PseudoSocket_2__repr__(((struct __pyx_obj_6uvloop_4loop_PseudoSocket *)__pyx_v_self));
  57806. /* function exit code */
  57807. __Pyx_RefNannyFinishContext();
  57808. return __pyx_r;
  57809. }
  57810. static PyObject *__pyx_pf_6uvloop_4loop_12PseudoSocket_2__repr__(struct __pyx_obj_6uvloop_4loop_PseudoSocket *__pyx_v_self) {
  57811. PyObject *__pyx_v_s = NULL;
  57812. PyObject *__pyx_v_laddr = NULL;
  57813. PyObject *__pyx_v_raddr = NULL;
  57814. PyObject *__pyx_r = NULL;
  57815. __Pyx_RefNannyDeclarations
  57816. PyObject *__pyx_t_1 = NULL;
  57817. PyObject *__pyx_t_2 = NULL;
  57818. PyObject *__pyx_t_3 = NULL;
  57819. PyObject *__pyx_t_4 = NULL;
  57820. PyObject *__pyx_t_5 = NULL;
  57821. PyObject *__pyx_t_6 = NULL;
  57822. PyObject *__pyx_t_7 = NULL;
  57823. int __pyx_t_8;
  57824. PyObject *__pyx_t_9 = NULL;
  57825. int __pyx_t_10;
  57826. PyObject *__pyx_t_11 = NULL;
  57827. PyObject *__pyx_t_12 = NULL;
  57828. PyObject *__pyx_t_13 = NULL;
  57829. __Pyx_RefNannySetupContext("__repr__", 0);
  57830. /* "uvloop/pseudosock.pyx":44
  57831. * def __repr__(self):
  57832. * s = ("<uvloop.PseudoSocket fd={}, family={!s}, "
  57833. * "type={!s}, proto={}").format(self.fileno(), self.family, # <<<<<<<<<<<<<<
  57834. * self.type, self.proto)
  57835. *
  57836. */
  57837. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_uvloop_PseudoSocket_fd_family_s, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 44, __pyx_L1_error)
  57838. __Pyx_GOTREF(__pyx_t_2);
  57839. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_fileno); if (unlikely(!__pyx_t_4)) __PYX_ERR(10, 44, __pyx_L1_error)
  57840. __Pyx_GOTREF(__pyx_t_4);
  57841. __pyx_t_5 = NULL;
  57842. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
  57843. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
  57844. if (likely(__pyx_t_5)) {
  57845. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  57846. __Pyx_INCREF(__pyx_t_5);
  57847. __Pyx_INCREF(function);
  57848. __Pyx_DECREF_SET(__pyx_t_4, function);
  57849. }
  57850. }
  57851. __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
  57852. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  57853. if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 44, __pyx_L1_error)
  57854. __Pyx_GOTREF(__pyx_t_3);
  57855. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  57856. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_family); if (unlikely(!__pyx_t_4)) __PYX_ERR(10, 44, __pyx_L1_error)
  57857. __Pyx_GOTREF(__pyx_t_4);
  57858. /* "uvloop/pseudosock.pyx":45
  57859. * s = ("<uvloop.PseudoSocket fd={}, family={!s}, "
  57860. * "type={!s}, proto={}").format(self.fileno(), self.family,
  57861. * self.type, self.proto) # <<<<<<<<<<<<<<
  57862. *
  57863. * if self._fd != -1:
  57864. */
  57865. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_type); if (unlikely(!__pyx_t_5)) __PYX_ERR(10, 45, __pyx_L1_error)
  57866. __Pyx_GOTREF(__pyx_t_5);
  57867. __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_proto); if (unlikely(!__pyx_t_6)) __PYX_ERR(10, 45, __pyx_L1_error)
  57868. __Pyx_GOTREF(__pyx_t_6);
  57869. __pyx_t_7 = NULL;
  57870. __pyx_t_8 = 0;
  57871. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
  57872. __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
  57873. if (likely(__pyx_t_7)) {
  57874. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  57875. __Pyx_INCREF(__pyx_t_7);
  57876. __Pyx_INCREF(function);
  57877. __Pyx_DECREF_SET(__pyx_t_2, function);
  57878. __pyx_t_8 = 1;
  57879. }
  57880. }
  57881. #if CYTHON_FAST_PYCALL
  57882. if (PyFunction_Check(__pyx_t_2)) {
  57883. PyObject *__pyx_temp[5] = {__pyx_t_7, __pyx_t_3, __pyx_t_4, __pyx_t_5, __pyx_t_6};
  57884. __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 4+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 44, __pyx_L1_error)
  57885. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  57886. __Pyx_GOTREF(__pyx_t_1);
  57887. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  57888. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  57889. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  57890. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  57891. } else
  57892. #endif
  57893. #if CYTHON_FAST_PYCCALL
  57894. if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
  57895. PyObject *__pyx_temp[5] = {__pyx_t_7, __pyx_t_3, __pyx_t_4, __pyx_t_5, __pyx_t_6};
  57896. __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 4+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 44, __pyx_L1_error)
  57897. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  57898. __Pyx_GOTREF(__pyx_t_1);
  57899. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  57900. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  57901. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  57902. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  57903. } else
  57904. #endif
  57905. {
  57906. __pyx_t_9 = PyTuple_New(4+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(10, 44, __pyx_L1_error)
  57907. __Pyx_GOTREF(__pyx_t_9);
  57908. if (__pyx_t_7) {
  57909. __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
  57910. }
  57911. __Pyx_GIVEREF(__pyx_t_3);
  57912. PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_3);
  57913. __Pyx_GIVEREF(__pyx_t_4);
  57914. PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_4);
  57915. __Pyx_GIVEREF(__pyx_t_5);
  57916. PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_t_5);
  57917. __Pyx_GIVEREF(__pyx_t_6);
  57918. PyTuple_SET_ITEM(__pyx_t_9, 3+__pyx_t_8, __pyx_t_6);
  57919. __pyx_t_3 = 0;
  57920. __pyx_t_4 = 0;
  57921. __pyx_t_5 = 0;
  57922. __pyx_t_6 = 0;
  57923. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 44, __pyx_L1_error)
  57924. __Pyx_GOTREF(__pyx_t_1);
  57925. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  57926. }
  57927. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  57928. __pyx_v_s = __pyx_t_1;
  57929. __pyx_t_1 = 0;
  57930. /* "uvloop/pseudosock.pyx":47
  57931. * self.type, self.proto)
  57932. *
  57933. * if self._fd != -1: # <<<<<<<<<<<<<<
  57934. * try:
  57935. * laddr = self.getsockname()
  57936. */
  57937. __pyx_t_10 = ((__pyx_v_self->_fd != -1L) != 0);
  57938. if (__pyx_t_10) {
  57939. /* "uvloop/pseudosock.pyx":48
  57940. *
  57941. * if self._fd != -1:
  57942. * try: # <<<<<<<<<<<<<<
  57943. * laddr = self.getsockname()
  57944. * if laddr:
  57945. */
  57946. {
  57947. __Pyx_PyThreadState_declare
  57948. __Pyx_PyThreadState_assign
  57949. __Pyx_ExceptionSave(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
  57950. __Pyx_XGOTREF(__pyx_t_11);
  57951. __Pyx_XGOTREF(__pyx_t_12);
  57952. __Pyx_XGOTREF(__pyx_t_13);
  57953. /*try:*/ {
  57954. /* "uvloop/pseudosock.pyx":49
  57955. * if self._fd != -1:
  57956. * try:
  57957. * laddr = self.getsockname() # <<<<<<<<<<<<<<
  57958. * if laddr:
  57959. * s += ", laddr=%s" % str(laddr)
  57960. */
  57961. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getsockname); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 49, __pyx_L4_error)
  57962. __Pyx_GOTREF(__pyx_t_2);
  57963. __pyx_t_9 = NULL;
  57964. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
  57965. __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
  57966. if (likely(__pyx_t_9)) {
  57967. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  57968. __Pyx_INCREF(__pyx_t_9);
  57969. __Pyx_INCREF(function);
  57970. __Pyx_DECREF_SET(__pyx_t_2, function);
  57971. }
  57972. }
  57973. __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_9) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  57974. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  57975. if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 49, __pyx_L4_error)
  57976. __Pyx_GOTREF(__pyx_t_1);
  57977. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  57978. __pyx_v_laddr = __pyx_t_1;
  57979. __pyx_t_1 = 0;
  57980. /* "uvloop/pseudosock.pyx":50
  57981. * try:
  57982. * laddr = self.getsockname()
  57983. * if laddr: # <<<<<<<<<<<<<<
  57984. * s += ", laddr=%s" % str(laddr)
  57985. * except socket_error:
  57986. */
  57987. __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_laddr); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(10, 50, __pyx_L4_error)
  57988. if (__pyx_t_10) {
  57989. /* "uvloop/pseudosock.pyx":51
  57990. * laddr = self.getsockname()
  57991. * if laddr:
  57992. * s += ", laddr=%s" % str(laddr) # <<<<<<<<<<<<<<
  57993. * except socket_error:
  57994. * pass
  57995. */
  57996. __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_v_laddr); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 51, __pyx_L4_error)
  57997. __Pyx_GOTREF(__pyx_t_1);
  57998. __pyx_t_2 = PyUnicode_Format(__pyx_kp_u_laddr_s, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 51, __pyx_L4_error)
  57999. __Pyx_GOTREF(__pyx_t_2);
  58000. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  58001. __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_s, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 51, __pyx_L4_error)
  58002. __Pyx_GOTREF(__pyx_t_1);
  58003. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  58004. __Pyx_DECREF_SET(__pyx_v_s, __pyx_t_1);
  58005. __pyx_t_1 = 0;
  58006. /* "uvloop/pseudosock.pyx":50
  58007. * try:
  58008. * laddr = self.getsockname()
  58009. * if laddr: # <<<<<<<<<<<<<<
  58010. * s += ", laddr=%s" % str(laddr)
  58011. * except socket_error:
  58012. */
  58013. }
  58014. /* "uvloop/pseudosock.pyx":48
  58015. *
  58016. * if self._fd != -1:
  58017. * try: # <<<<<<<<<<<<<<
  58018. * laddr = self.getsockname()
  58019. * if laddr:
  58020. */
  58021. }
  58022. __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
  58023. __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
  58024. __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
  58025. goto __pyx_L9_try_end;
  58026. __pyx_L4_error:;
  58027. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  58028. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  58029. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  58030. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  58031. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  58032. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  58033. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  58034. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  58035. /* "uvloop/pseudosock.pyx":52
  58036. * if laddr:
  58037. * s += ", laddr=%s" % str(laddr)
  58038. * except socket_error: # <<<<<<<<<<<<<<
  58039. * pass
  58040. * try:
  58041. */
  58042. __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_v_6uvloop_4loop_socket_error);
  58043. if (__pyx_t_8) {
  58044. __Pyx_ErrRestore(0,0,0);
  58045. goto __pyx_L5_exception_handled;
  58046. }
  58047. goto __pyx_L6_except_error;
  58048. __pyx_L6_except_error:;
  58049. /* "uvloop/pseudosock.pyx":48
  58050. *
  58051. * if self._fd != -1:
  58052. * try: # <<<<<<<<<<<<<<
  58053. * laddr = self.getsockname()
  58054. * if laddr:
  58055. */
  58056. __Pyx_XGIVEREF(__pyx_t_11);
  58057. __Pyx_XGIVEREF(__pyx_t_12);
  58058. __Pyx_XGIVEREF(__pyx_t_13);
  58059. __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13);
  58060. goto __pyx_L1_error;
  58061. __pyx_L5_exception_handled:;
  58062. __Pyx_XGIVEREF(__pyx_t_11);
  58063. __Pyx_XGIVEREF(__pyx_t_12);
  58064. __Pyx_XGIVEREF(__pyx_t_13);
  58065. __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13);
  58066. __pyx_L9_try_end:;
  58067. }
  58068. /* "uvloop/pseudosock.pyx":54
  58069. * except socket_error:
  58070. * pass
  58071. * try: # <<<<<<<<<<<<<<
  58072. * raddr = self.getpeername()
  58073. * if raddr:
  58074. */
  58075. {
  58076. __Pyx_PyThreadState_declare
  58077. __Pyx_PyThreadState_assign
  58078. __Pyx_ExceptionSave(&__pyx_t_13, &__pyx_t_12, &__pyx_t_11);
  58079. __Pyx_XGOTREF(__pyx_t_13);
  58080. __Pyx_XGOTREF(__pyx_t_12);
  58081. __Pyx_XGOTREF(__pyx_t_11);
  58082. /*try:*/ {
  58083. /* "uvloop/pseudosock.pyx":55
  58084. * pass
  58085. * try:
  58086. * raddr = self.getpeername() # <<<<<<<<<<<<<<
  58087. * if raddr:
  58088. * s += ", raddr=%s" % str(raddr)
  58089. */
  58090. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getpeername); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 55, __pyx_L11_error)
  58091. __Pyx_GOTREF(__pyx_t_2);
  58092. __pyx_t_9 = NULL;
  58093. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
  58094. __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
  58095. if (likely(__pyx_t_9)) {
  58096. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  58097. __Pyx_INCREF(__pyx_t_9);
  58098. __Pyx_INCREF(function);
  58099. __Pyx_DECREF_SET(__pyx_t_2, function);
  58100. }
  58101. }
  58102. __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_9) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  58103. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  58104. if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 55, __pyx_L11_error)
  58105. __Pyx_GOTREF(__pyx_t_1);
  58106. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  58107. __pyx_v_raddr = __pyx_t_1;
  58108. __pyx_t_1 = 0;
  58109. /* "uvloop/pseudosock.pyx":56
  58110. * try:
  58111. * raddr = self.getpeername()
  58112. * if raddr: # <<<<<<<<<<<<<<
  58113. * s += ", raddr=%s" % str(raddr)
  58114. * except socket_error:
  58115. */
  58116. __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_raddr); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(10, 56, __pyx_L11_error)
  58117. if (__pyx_t_10) {
  58118. /* "uvloop/pseudosock.pyx":57
  58119. * raddr = self.getpeername()
  58120. * if raddr:
  58121. * s += ", raddr=%s" % str(raddr) # <<<<<<<<<<<<<<
  58122. * except socket_error:
  58123. * pass
  58124. */
  58125. __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_v_raddr); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 57, __pyx_L11_error)
  58126. __Pyx_GOTREF(__pyx_t_1);
  58127. __pyx_t_2 = PyUnicode_Format(__pyx_kp_u_raddr_s, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 57, __pyx_L11_error)
  58128. __Pyx_GOTREF(__pyx_t_2);
  58129. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  58130. __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_s, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 57, __pyx_L11_error)
  58131. __Pyx_GOTREF(__pyx_t_1);
  58132. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  58133. __Pyx_DECREF_SET(__pyx_v_s, __pyx_t_1);
  58134. __pyx_t_1 = 0;
  58135. /* "uvloop/pseudosock.pyx":56
  58136. * try:
  58137. * raddr = self.getpeername()
  58138. * if raddr: # <<<<<<<<<<<<<<
  58139. * s += ", raddr=%s" % str(raddr)
  58140. * except socket_error:
  58141. */
  58142. }
  58143. /* "uvloop/pseudosock.pyx":54
  58144. * except socket_error:
  58145. * pass
  58146. * try: # <<<<<<<<<<<<<<
  58147. * raddr = self.getpeername()
  58148. * if raddr:
  58149. */
  58150. }
  58151. __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
  58152. __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
  58153. __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
  58154. goto __pyx_L16_try_end;
  58155. __pyx_L11_error:;
  58156. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  58157. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  58158. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  58159. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  58160. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  58161. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  58162. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  58163. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  58164. /* "uvloop/pseudosock.pyx":58
  58165. * if raddr:
  58166. * s += ", raddr=%s" % str(raddr)
  58167. * except socket_error: # <<<<<<<<<<<<<<
  58168. * pass
  58169. * s += '>'
  58170. */
  58171. __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_v_6uvloop_4loop_socket_error);
  58172. if (__pyx_t_8) {
  58173. __Pyx_ErrRestore(0,0,0);
  58174. goto __pyx_L12_exception_handled;
  58175. }
  58176. goto __pyx_L13_except_error;
  58177. __pyx_L13_except_error:;
  58178. /* "uvloop/pseudosock.pyx":54
  58179. * except socket_error:
  58180. * pass
  58181. * try: # <<<<<<<<<<<<<<
  58182. * raddr = self.getpeername()
  58183. * if raddr:
  58184. */
  58185. __Pyx_XGIVEREF(__pyx_t_13);
  58186. __Pyx_XGIVEREF(__pyx_t_12);
  58187. __Pyx_XGIVEREF(__pyx_t_11);
  58188. __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_12, __pyx_t_11);
  58189. goto __pyx_L1_error;
  58190. __pyx_L12_exception_handled:;
  58191. __Pyx_XGIVEREF(__pyx_t_13);
  58192. __Pyx_XGIVEREF(__pyx_t_12);
  58193. __Pyx_XGIVEREF(__pyx_t_11);
  58194. __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_12, __pyx_t_11);
  58195. __pyx_L16_try_end:;
  58196. }
  58197. /* "uvloop/pseudosock.pyx":47
  58198. * self.type, self.proto)
  58199. *
  58200. * if self._fd != -1: # <<<<<<<<<<<<<<
  58201. * try:
  58202. * laddr = self.getsockname()
  58203. */
  58204. }
  58205. /* "uvloop/pseudosock.pyx":60
  58206. * except socket_error:
  58207. * pass
  58208. * s += '>' # <<<<<<<<<<<<<<
  58209. * return s
  58210. *
  58211. */
  58212. __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_s, __pyx_kp_u__90); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 60, __pyx_L1_error)
  58213. __Pyx_GOTREF(__pyx_t_1);
  58214. __Pyx_DECREF_SET(__pyx_v_s, __pyx_t_1);
  58215. __pyx_t_1 = 0;
  58216. /* "uvloop/pseudosock.pyx":61
  58217. * pass
  58218. * s += '>'
  58219. * return s # <<<<<<<<<<<<<<
  58220. *
  58221. * def __getstate__(self):
  58222. */
  58223. __Pyx_XDECREF(__pyx_r);
  58224. __Pyx_INCREF(__pyx_v_s);
  58225. __pyx_r = __pyx_v_s;
  58226. goto __pyx_L0;
  58227. /* "uvloop/pseudosock.pyx":42
  58228. * return self._proto
  58229. *
  58230. * def __repr__(self): # <<<<<<<<<<<<<<
  58231. * s = ("<uvloop.PseudoSocket fd={}, family={!s}, "
  58232. * "type={!s}, proto={}").format(self.fileno(), self.family,
  58233. */
  58234. /* function exit code */
  58235. __pyx_L1_error:;
  58236. __Pyx_XDECREF(__pyx_t_1);
  58237. __Pyx_XDECREF(__pyx_t_2);
  58238. __Pyx_XDECREF(__pyx_t_3);
  58239. __Pyx_XDECREF(__pyx_t_4);
  58240. __Pyx_XDECREF(__pyx_t_5);
  58241. __Pyx_XDECREF(__pyx_t_6);
  58242. __Pyx_XDECREF(__pyx_t_7);
  58243. __Pyx_XDECREF(__pyx_t_9);
  58244. __Pyx_AddTraceback("uvloop.loop.PseudoSocket.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  58245. __pyx_r = NULL;
  58246. __pyx_L0:;
  58247. __Pyx_XDECREF(__pyx_v_s);
  58248. __Pyx_XDECREF(__pyx_v_laddr);
  58249. __Pyx_XDECREF(__pyx_v_raddr);
  58250. __Pyx_XGIVEREF(__pyx_r);
  58251. __Pyx_RefNannyFinishContext();
  58252. return __pyx_r;
  58253. }
  58254. /* "uvloop/pseudosock.pyx":63
  58255. * return s
  58256. *
  58257. * def __getstate__(self): # <<<<<<<<<<<<<<
  58258. * raise TypeError("Cannot serialize socket object")
  58259. *
  58260. */
  58261. /* Python wrapper */
  58262. static PyObject *__pyx_pw_6uvloop_4loop_12PseudoSocket_5__getstate__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  58263. static char __pyx_doc_6uvloop_4loop_12PseudoSocket_4__getstate__[] = "PseudoSocket.__getstate__(self)";
  58264. static PyObject *__pyx_pw_6uvloop_4loop_12PseudoSocket_5__getstate__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  58265. PyObject *__pyx_r = 0;
  58266. __Pyx_RefNannyDeclarations
  58267. __Pyx_RefNannySetupContext("__getstate__ (wrapper)", 0);
  58268. __pyx_r = __pyx_pf_6uvloop_4loop_12PseudoSocket_4__getstate__(((struct __pyx_obj_6uvloop_4loop_PseudoSocket *)__pyx_v_self));
  58269. /* function exit code */
  58270. __Pyx_RefNannyFinishContext();
  58271. return __pyx_r;
  58272. }
  58273. static PyObject *__pyx_pf_6uvloop_4loop_12PseudoSocket_4__getstate__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_PseudoSocket *__pyx_v_self) {
  58274. PyObject *__pyx_r = NULL;
  58275. __Pyx_RefNannyDeclarations
  58276. PyObject *__pyx_t_1 = NULL;
  58277. __Pyx_RefNannySetupContext("__getstate__", 0);
  58278. /* "uvloop/pseudosock.pyx":64
  58279. *
  58280. * def __getstate__(self):
  58281. * raise TypeError("Cannot serialize socket object") # <<<<<<<<<<<<<<
  58282. *
  58283. * def fileno(self):
  58284. */
  58285. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__97, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 64, __pyx_L1_error)
  58286. __Pyx_GOTREF(__pyx_t_1);
  58287. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  58288. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  58289. __PYX_ERR(10, 64, __pyx_L1_error)
  58290. /* "uvloop/pseudosock.pyx":63
  58291. * return s
  58292. *
  58293. * def __getstate__(self): # <<<<<<<<<<<<<<
  58294. * raise TypeError("Cannot serialize socket object")
  58295. *
  58296. */
  58297. /* function exit code */
  58298. __pyx_L1_error:;
  58299. __Pyx_XDECREF(__pyx_t_1);
  58300. __Pyx_AddTraceback("uvloop.loop.PseudoSocket.__getstate__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  58301. __pyx_r = NULL;
  58302. __Pyx_XGIVEREF(__pyx_r);
  58303. __Pyx_RefNannyFinishContext();
  58304. return __pyx_r;
  58305. }
  58306. /* "uvloop/pseudosock.pyx":66
  58307. * raise TypeError("Cannot serialize socket object")
  58308. *
  58309. * def fileno(self): # <<<<<<<<<<<<<<
  58310. * return self._fd
  58311. *
  58312. */
  58313. /* Python wrapper */
  58314. static PyObject *__pyx_pw_6uvloop_4loop_12PseudoSocket_7fileno(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  58315. static char __pyx_doc_6uvloop_4loop_12PseudoSocket_6fileno[] = "PseudoSocket.fileno(self)";
  58316. static PyObject *__pyx_pw_6uvloop_4loop_12PseudoSocket_7fileno(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  58317. PyObject *__pyx_r = 0;
  58318. __Pyx_RefNannyDeclarations
  58319. __Pyx_RefNannySetupContext("fileno (wrapper)", 0);
  58320. __pyx_r = __pyx_pf_6uvloop_4loop_12PseudoSocket_6fileno(((struct __pyx_obj_6uvloop_4loop_PseudoSocket *)__pyx_v_self));
  58321. /* function exit code */
  58322. __Pyx_RefNannyFinishContext();
  58323. return __pyx_r;
  58324. }
  58325. static PyObject *__pyx_pf_6uvloop_4loop_12PseudoSocket_6fileno(struct __pyx_obj_6uvloop_4loop_PseudoSocket *__pyx_v_self) {
  58326. PyObject *__pyx_r = NULL;
  58327. __Pyx_RefNannyDeclarations
  58328. PyObject *__pyx_t_1 = NULL;
  58329. __Pyx_RefNannySetupContext("fileno", 0);
  58330. /* "uvloop/pseudosock.pyx":67
  58331. *
  58332. * def fileno(self):
  58333. * return self._fd # <<<<<<<<<<<<<<
  58334. *
  58335. * def dup(self):
  58336. */
  58337. __Pyx_XDECREF(__pyx_r);
  58338. __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_fd); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 67, __pyx_L1_error)
  58339. __Pyx_GOTREF(__pyx_t_1);
  58340. __pyx_r = __pyx_t_1;
  58341. __pyx_t_1 = 0;
  58342. goto __pyx_L0;
  58343. /* "uvloop/pseudosock.pyx":66
  58344. * raise TypeError("Cannot serialize socket object")
  58345. *
  58346. * def fileno(self): # <<<<<<<<<<<<<<
  58347. * return self._fd
  58348. *
  58349. */
  58350. /* function exit code */
  58351. __pyx_L1_error:;
  58352. __Pyx_XDECREF(__pyx_t_1);
  58353. __Pyx_AddTraceback("uvloop.loop.PseudoSocket.fileno", __pyx_clineno, __pyx_lineno, __pyx_filename);
  58354. __pyx_r = NULL;
  58355. __pyx_L0:;
  58356. __Pyx_XGIVEREF(__pyx_r);
  58357. __Pyx_RefNannyFinishContext();
  58358. return __pyx_r;
  58359. }
  58360. /* "uvloop/pseudosock.pyx":69
  58361. * return self._fd
  58362. *
  58363. * def dup(self): # <<<<<<<<<<<<<<
  58364. * fd = os_dup(self._fd)
  58365. * sock = socket_socket(self._family, self._type, self._proto, fileno=fd)
  58366. */
  58367. /* Python wrapper */
  58368. static PyObject *__pyx_pw_6uvloop_4loop_12PseudoSocket_9dup(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  58369. static char __pyx_doc_6uvloop_4loop_12PseudoSocket_8dup[] = "PseudoSocket.dup(self)";
  58370. static PyObject *__pyx_pw_6uvloop_4loop_12PseudoSocket_9dup(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  58371. PyObject *__pyx_r = 0;
  58372. __Pyx_RefNannyDeclarations
  58373. __Pyx_RefNannySetupContext("dup (wrapper)", 0);
  58374. __pyx_r = __pyx_pf_6uvloop_4loop_12PseudoSocket_8dup(((struct __pyx_obj_6uvloop_4loop_PseudoSocket *)__pyx_v_self));
  58375. /* function exit code */
  58376. __Pyx_RefNannyFinishContext();
  58377. return __pyx_r;
  58378. }
  58379. static PyObject *__pyx_pf_6uvloop_4loop_12PseudoSocket_8dup(struct __pyx_obj_6uvloop_4loop_PseudoSocket *__pyx_v_self) {
  58380. PyObject *__pyx_v_fd = NULL;
  58381. PyObject *__pyx_v_sock = NULL;
  58382. PyObject *__pyx_r = NULL;
  58383. __Pyx_RefNannyDeclarations
  58384. PyObject *__pyx_t_1 = NULL;
  58385. PyObject *__pyx_t_2 = NULL;
  58386. PyObject *__pyx_t_3 = NULL;
  58387. PyObject *__pyx_t_4 = NULL;
  58388. __Pyx_RefNannySetupContext("dup", 0);
  58389. /* "uvloop/pseudosock.pyx":70
  58390. *
  58391. * def dup(self):
  58392. * fd = os_dup(self._fd) # <<<<<<<<<<<<<<
  58393. * sock = socket_socket(self._family, self._type, self._proto, fileno=fd)
  58394. * sock.settimeout(0)
  58395. */
  58396. __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->_fd); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 70, __pyx_L1_error)
  58397. __Pyx_GOTREF(__pyx_t_2);
  58398. __Pyx_INCREF(__pyx_v_6uvloop_4loop_os_dup);
  58399. __pyx_t_3 = __pyx_v_6uvloop_4loop_os_dup; __pyx_t_4 = NULL;
  58400. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
  58401. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
  58402. if (likely(__pyx_t_4)) {
  58403. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  58404. __Pyx_INCREF(__pyx_t_4);
  58405. __Pyx_INCREF(function);
  58406. __Pyx_DECREF_SET(__pyx_t_3, function);
  58407. }
  58408. }
  58409. __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2);
  58410. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  58411. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  58412. if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 70, __pyx_L1_error)
  58413. __Pyx_GOTREF(__pyx_t_1);
  58414. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  58415. __pyx_v_fd = __pyx_t_1;
  58416. __pyx_t_1 = 0;
  58417. /* "uvloop/pseudosock.pyx":71
  58418. * def dup(self):
  58419. * fd = os_dup(self._fd)
  58420. * sock = socket_socket(self._family, self._type, self._proto, fileno=fd) # <<<<<<<<<<<<<<
  58421. * sock.settimeout(0)
  58422. * return sock
  58423. */
  58424. __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_family); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 71, __pyx_L1_error)
  58425. __Pyx_GOTREF(__pyx_t_1);
  58426. __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 71, __pyx_L1_error)
  58427. __Pyx_GOTREF(__pyx_t_3);
  58428. __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->_proto); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 71, __pyx_L1_error)
  58429. __Pyx_GOTREF(__pyx_t_2);
  58430. __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(10, 71, __pyx_L1_error)
  58431. __Pyx_GOTREF(__pyx_t_4);
  58432. __Pyx_GIVEREF(__pyx_t_1);
  58433. PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
  58434. __Pyx_GIVEREF(__pyx_t_3);
  58435. PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
  58436. __Pyx_GIVEREF(__pyx_t_2);
  58437. PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_2);
  58438. __pyx_t_1 = 0;
  58439. __pyx_t_3 = 0;
  58440. __pyx_t_2 = 0;
  58441. __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 71, __pyx_L1_error)
  58442. __Pyx_GOTREF(__pyx_t_2);
  58443. if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_fileno, __pyx_v_fd) < 0) __PYX_ERR(10, 71, __pyx_L1_error)
  58444. __pyx_t_3 = __Pyx_PyObject_Call(__pyx_v_6uvloop_4loop_socket_socket, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 71, __pyx_L1_error)
  58445. __Pyx_GOTREF(__pyx_t_3);
  58446. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  58447. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  58448. __pyx_v_sock = __pyx_t_3;
  58449. __pyx_t_3 = 0;
  58450. /* "uvloop/pseudosock.pyx":72
  58451. * fd = os_dup(self._fd)
  58452. * sock = socket_socket(self._family, self._type, self._proto, fileno=fd)
  58453. * sock.settimeout(0) # <<<<<<<<<<<<<<
  58454. * return sock
  58455. *
  58456. */
  58457. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_sock, __pyx_n_s_settimeout); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 72, __pyx_L1_error)
  58458. __Pyx_GOTREF(__pyx_t_2);
  58459. __pyx_t_4 = NULL;
  58460. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
  58461. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
  58462. if (likely(__pyx_t_4)) {
  58463. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  58464. __Pyx_INCREF(__pyx_t_4);
  58465. __Pyx_INCREF(function);
  58466. __Pyx_DECREF_SET(__pyx_t_2, function);
  58467. }
  58468. }
  58469. __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_int_0) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_int_0);
  58470. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  58471. if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 72, __pyx_L1_error)
  58472. __Pyx_GOTREF(__pyx_t_3);
  58473. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  58474. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  58475. /* "uvloop/pseudosock.pyx":73
  58476. * sock = socket_socket(self._family, self._type, self._proto, fileno=fd)
  58477. * sock.settimeout(0)
  58478. * return sock # <<<<<<<<<<<<<<
  58479. *
  58480. * def get_inheritable(self):
  58481. */
  58482. __Pyx_XDECREF(__pyx_r);
  58483. __Pyx_INCREF(__pyx_v_sock);
  58484. __pyx_r = __pyx_v_sock;
  58485. goto __pyx_L0;
  58486. /* "uvloop/pseudosock.pyx":69
  58487. * return self._fd
  58488. *
  58489. * def dup(self): # <<<<<<<<<<<<<<
  58490. * fd = os_dup(self._fd)
  58491. * sock = socket_socket(self._family, self._type, self._proto, fileno=fd)
  58492. */
  58493. /* function exit code */
  58494. __pyx_L1_error:;
  58495. __Pyx_XDECREF(__pyx_t_1);
  58496. __Pyx_XDECREF(__pyx_t_2);
  58497. __Pyx_XDECREF(__pyx_t_3);
  58498. __Pyx_XDECREF(__pyx_t_4);
  58499. __Pyx_AddTraceback("uvloop.loop.PseudoSocket.dup", __pyx_clineno, __pyx_lineno, __pyx_filename);
  58500. __pyx_r = NULL;
  58501. __pyx_L0:;
  58502. __Pyx_XDECREF(__pyx_v_fd);
  58503. __Pyx_XDECREF(__pyx_v_sock);
  58504. __Pyx_XGIVEREF(__pyx_r);
  58505. __Pyx_RefNannyFinishContext();
  58506. return __pyx_r;
  58507. }
  58508. /* "uvloop/pseudosock.pyx":75
  58509. * return sock
  58510. *
  58511. * def get_inheritable(self): # <<<<<<<<<<<<<<
  58512. * return os_get_inheritable(self._fd)
  58513. *
  58514. */
  58515. /* Python wrapper */
  58516. static PyObject *__pyx_pw_6uvloop_4loop_12PseudoSocket_11get_inheritable(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  58517. static char __pyx_doc_6uvloop_4loop_12PseudoSocket_10get_inheritable[] = "PseudoSocket.get_inheritable(self)";
  58518. static PyObject *__pyx_pw_6uvloop_4loop_12PseudoSocket_11get_inheritable(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  58519. PyObject *__pyx_r = 0;
  58520. __Pyx_RefNannyDeclarations
  58521. __Pyx_RefNannySetupContext("get_inheritable (wrapper)", 0);
  58522. __pyx_r = __pyx_pf_6uvloop_4loop_12PseudoSocket_10get_inheritable(((struct __pyx_obj_6uvloop_4loop_PseudoSocket *)__pyx_v_self));
  58523. /* function exit code */
  58524. __Pyx_RefNannyFinishContext();
  58525. return __pyx_r;
  58526. }
  58527. static PyObject *__pyx_pf_6uvloop_4loop_12PseudoSocket_10get_inheritable(struct __pyx_obj_6uvloop_4loop_PseudoSocket *__pyx_v_self) {
  58528. PyObject *__pyx_r = NULL;
  58529. __Pyx_RefNannyDeclarations
  58530. PyObject *__pyx_t_1 = NULL;
  58531. PyObject *__pyx_t_2 = NULL;
  58532. PyObject *__pyx_t_3 = NULL;
  58533. PyObject *__pyx_t_4 = NULL;
  58534. __Pyx_RefNannySetupContext("get_inheritable", 0);
  58535. /* "uvloop/pseudosock.pyx":76
  58536. *
  58537. * def get_inheritable(self):
  58538. * return os_get_inheritable(self._fd) # <<<<<<<<<<<<<<
  58539. *
  58540. * def set_inheritable(self):
  58541. */
  58542. __Pyx_XDECREF(__pyx_r);
  58543. __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->_fd); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 76, __pyx_L1_error)
  58544. __Pyx_GOTREF(__pyx_t_2);
  58545. __Pyx_INCREF(__pyx_v_6uvloop_4loop_os_get_inheritable);
  58546. __pyx_t_3 = __pyx_v_6uvloop_4loop_os_get_inheritable; __pyx_t_4 = NULL;
  58547. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
  58548. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
  58549. if (likely(__pyx_t_4)) {
  58550. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  58551. __Pyx_INCREF(__pyx_t_4);
  58552. __Pyx_INCREF(function);
  58553. __Pyx_DECREF_SET(__pyx_t_3, function);
  58554. }
  58555. }
  58556. __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2);
  58557. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  58558. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  58559. if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 76, __pyx_L1_error)
  58560. __Pyx_GOTREF(__pyx_t_1);
  58561. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  58562. __pyx_r = __pyx_t_1;
  58563. __pyx_t_1 = 0;
  58564. goto __pyx_L0;
  58565. /* "uvloop/pseudosock.pyx":75
  58566. * return sock
  58567. *
  58568. * def get_inheritable(self): # <<<<<<<<<<<<<<
  58569. * return os_get_inheritable(self._fd)
  58570. *
  58571. */
  58572. /* function exit code */
  58573. __pyx_L1_error:;
  58574. __Pyx_XDECREF(__pyx_t_1);
  58575. __Pyx_XDECREF(__pyx_t_2);
  58576. __Pyx_XDECREF(__pyx_t_3);
  58577. __Pyx_XDECREF(__pyx_t_4);
  58578. __Pyx_AddTraceback("uvloop.loop.PseudoSocket.get_inheritable", __pyx_clineno, __pyx_lineno, __pyx_filename);
  58579. __pyx_r = NULL;
  58580. __pyx_L0:;
  58581. __Pyx_XGIVEREF(__pyx_r);
  58582. __Pyx_RefNannyFinishContext();
  58583. return __pyx_r;
  58584. }
  58585. /* "uvloop/pseudosock.pyx":78
  58586. * return os_get_inheritable(self._fd)
  58587. *
  58588. * def set_inheritable(self): # <<<<<<<<<<<<<<
  58589. * os_set_inheritable(self._fd)
  58590. *
  58591. */
  58592. /* Python wrapper */
  58593. static PyObject *__pyx_pw_6uvloop_4loop_12PseudoSocket_13set_inheritable(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  58594. static char __pyx_doc_6uvloop_4loop_12PseudoSocket_12set_inheritable[] = "PseudoSocket.set_inheritable(self)";
  58595. static PyObject *__pyx_pw_6uvloop_4loop_12PseudoSocket_13set_inheritable(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  58596. PyObject *__pyx_r = 0;
  58597. __Pyx_RefNannyDeclarations
  58598. __Pyx_RefNannySetupContext("set_inheritable (wrapper)", 0);
  58599. __pyx_r = __pyx_pf_6uvloop_4loop_12PseudoSocket_12set_inheritable(((struct __pyx_obj_6uvloop_4loop_PseudoSocket *)__pyx_v_self));
  58600. /* function exit code */
  58601. __Pyx_RefNannyFinishContext();
  58602. return __pyx_r;
  58603. }
  58604. static PyObject *__pyx_pf_6uvloop_4loop_12PseudoSocket_12set_inheritable(struct __pyx_obj_6uvloop_4loop_PseudoSocket *__pyx_v_self) {
  58605. PyObject *__pyx_r = NULL;
  58606. __Pyx_RefNannyDeclarations
  58607. PyObject *__pyx_t_1 = NULL;
  58608. PyObject *__pyx_t_2 = NULL;
  58609. PyObject *__pyx_t_3 = NULL;
  58610. PyObject *__pyx_t_4 = NULL;
  58611. __Pyx_RefNannySetupContext("set_inheritable", 0);
  58612. /* "uvloop/pseudosock.pyx":79
  58613. *
  58614. * def set_inheritable(self):
  58615. * os_set_inheritable(self._fd) # <<<<<<<<<<<<<<
  58616. *
  58617. * def ioctl(self, *args, **kwargs):
  58618. */
  58619. __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->_fd); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 79, __pyx_L1_error)
  58620. __Pyx_GOTREF(__pyx_t_2);
  58621. __Pyx_INCREF(__pyx_v_6uvloop_4loop_os_set_inheritable);
  58622. __pyx_t_3 = __pyx_v_6uvloop_4loop_os_set_inheritable; __pyx_t_4 = NULL;
  58623. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
  58624. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
  58625. if (likely(__pyx_t_4)) {
  58626. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  58627. __Pyx_INCREF(__pyx_t_4);
  58628. __Pyx_INCREF(function);
  58629. __Pyx_DECREF_SET(__pyx_t_3, function);
  58630. }
  58631. }
  58632. __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2);
  58633. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  58634. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  58635. if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 79, __pyx_L1_error)
  58636. __Pyx_GOTREF(__pyx_t_1);
  58637. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  58638. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  58639. /* "uvloop/pseudosock.pyx":78
  58640. * return os_get_inheritable(self._fd)
  58641. *
  58642. * def set_inheritable(self): # <<<<<<<<<<<<<<
  58643. * os_set_inheritable(self._fd)
  58644. *
  58645. */
  58646. /* function exit code */
  58647. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  58648. goto __pyx_L0;
  58649. __pyx_L1_error:;
  58650. __Pyx_XDECREF(__pyx_t_1);
  58651. __Pyx_XDECREF(__pyx_t_2);
  58652. __Pyx_XDECREF(__pyx_t_3);
  58653. __Pyx_XDECREF(__pyx_t_4);
  58654. __Pyx_AddTraceback("uvloop.loop.PseudoSocket.set_inheritable", __pyx_clineno, __pyx_lineno, __pyx_filename);
  58655. __pyx_r = NULL;
  58656. __pyx_L0:;
  58657. __Pyx_XGIVEREF(__pyx_r);
  58658. __Pyx_RefNannyFinishContext();
  58659. return __pyx_r;
  58660. }
  58661. /* "uvloop/pseudosock.pyx":81
  58662. * os_set_inheritable(self._fd)
  58663. *
  58664. * def ioctl(self, *args, **kwargs): # <<<<<<<<<<<<<<
  58665. * pass
  58666. *
  58667. */
  58668. /* Python wrapper */
  58669. static PyObject *__pyx_pw_6uvloop_4loop_12PseudoSocket_15ioctl(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  58670. static char __pyx_doc_6uvloop_4loop_12PseudoSocket_14ioctl[] = "PseudoSocket.ioctl(self, *args, **kwargs)";
  58671. static PyObject *__pyx_pw_6uvloop_4loop_12PseudoSocket_15ioctl(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  58672. CYTHON_UNUSED PyObject *__pyx_v_args = 0;
  58673. CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
  58674. PyObject *__pyx_r = 0;
  58675. __Pyx_RefNannyDeclarations
  58676. __Pyx_RefNannySetupContext("ioctl (wrapper)", 0);
  58677. if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "ioctl", 1))) return NULL;
  58678. __Pyx_INCREF(__pyx_args);
  58679. __pyx_v_args = __pyx_args;
  58680. __pyx_r = __pyx_pf_6uvloop_4loop_12PseudoSocket_14ioctl(((struct __pyx_obj_6uvloop_4loop_PseudoSocket *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);
  58681. /* function exit code */
  58682. __Pyx_XDECREF(__pyx_v_args);
  58683. __Pyx_XDECREF(__pyx_v_kwargs);
  58684. __Pyx_RefNannyFinishContext();
  58685. return __pyx_r;
  58686. }
  58687. static PyObject *__pyx_pf_6uvloop_4loop_12PseudoSocket_14ioctl(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_PseudoSocket *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
  58688. PyObject *__pyx_r = NULL;
  58689. __Pyx_RefNannyDeclarations
  58690. __Pyx_RefNannySetupContext("ioctl", 0);
  58691. /* function exit code */
  58692. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  58693. __Pyx_XGIVEREF(__pyx_r);
  58694. __Pyx_RefNannyFinishContext();
  58695. return __pyx_r;
  58696. }
  58697. /* "uvloop/pseudosock.pyx":84
  58698. * pass
  58699. *
  58700. * def getsockopt(self, *args, **kwargs): # <<<<<<<<<<<<<<
  58701. * sock = self._make_sock()
  58702. * try:
  58703. */
  58704. /* Python wrapper */
  58705. static PyObject *__pyx_pw_6uvloop_4loop_12PseudoSocket_17getsockopt(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  58706. static char __pyx_doc_6uvloop_4loop_12PseudoSocket_16getsockopt[] = "PseudoSocket.getsockopt(self, *args, **kwargs)";
  58707. static PyObject *__pyx_pw_6uvloop_4loop_12PseudoSocket_17getsockopt(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  58708. PyObject *__pyx_v_args = 0;
  58709. PyObject *__pyx_v_kwargs = 0;
  58710. PyObject *__pyx_r = 0;
  58711. __Pyx_RefNannyDeclarations
  58712. __Pyx_RefNannySetupContext("getsockopt (wrapper)", 0);
  58713. if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getsockopt", 1))) return NULL;
  58714. if (unlikely(__pyx_kwds)) {
  58715. __pyx_v_kwargs = PyDict_Copy(__pyx_kwds); if (unlikely(!__pyx_v_kwargs)) return NULL;
  58716. __Pyx_GOTREF(__pyx_v_kwargs);
  58717. } else {
  58718. __pyx_v_kwargs = NULL;
  58719. }
  58720. __Pyx_INCREF(__pyx_args);
  58721. __pyx_v_args = __pyx_args;
  58722. __pyx_r = __pyx_pf_6uvloop_4loop_12PseudoSocket_16getsockopt(((struct __pyx_obj_6uvloop_4loop_PseudoSocket *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);
  58723. /* function exit code */
  58724. __Pyx_XDECREF(__pyx_v_args);
  58725. __Pyx_XDECREF(__pyx_v_kwargs);
  58726. __Pyx_RefNannyFinishContext();
  58727. return __pyx_r;
  58728. }
  58729. static PyObject *__pyx_pf_6uvloop_4loop_12PseudoSocket_16getsockopt(struct __pyx_obj_6uvloop_4loop_PseudoSocket *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
  58730. PyObject *__pyx_v_sock = NULL;
  58731. PyObject *__pyx_r = NULL;
  58732. __Pyx_RefNannyDeclarations
  58733. PyObject *__pyx_t_1 = NULL;
  58734. PyObject *__pyx_t_2 = NULL;
  58735. int __pyx_t_3;
  58736. int __pyx_t_4;
  58737. char const *__pyx_t_5;
  58738. PyObject *__pyx_t_6 = NULL;
  58739. PyObject *__pyx_t_7 = NULL;
  58740. PyObject *__pyx_t_8 = NULL;
  58741. PyObject *__pyx_t_9 = NULL;
  58742. PyObject *__pyx_t_10 = NULL;
  58743. PyObject *__pyx_t_11 = NULL;
  58744. PyObject *__pyx_t_12 = NULL;
  58745. __Pyx_RefNannySetupContext("getsockopt", 0);
  58746. /* "uvloop/pseudosock.pyx":85
  58747. *
  58748. * def getsockopt(self, *args, **kwargs):
  58749. * sock = self._make_sock() # <<<<<<<<<<<<<<
  58750. * try:
  58751. * return sock.getsockopt(*args, **kwargs)
  58752. */
  58753. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_PseudoSocket *)__pyx_v_self->__pyx_vtab)->_make_sock(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 85, __pyx_L1_error)
  58754. __Pyx_GOTREF(__pyx_t_1);
  58755. __pyx_v_sock = __pyx_t_1;
  58756. __pyx_t_1 = 0;
  58757. /* "uvloop/pseudosock.pyx":86
  58758. * def getsockopt(self, *args, **kwargs):
  58759. * sock = self._make_sock()
  58760. * try: # <<<<<<<<<<<<<<
  58761. * return sock.getsockopt(*args, **kwargs)
  58762. * finally:
  58763. */
  58764. /*try:*/ {
  58765. /* "uvloop/pseudosock.pyx":87
  58766. * sock = self._make_sock()
  58767. * try:
  58768. * return sock.getsockopt(*args, **kwargs) # <<<<<<<<<<<<<<
  58769. * finally:
  58770. * sock.detach()
  58771. */
  58772. __Pyx_XDECREF(__pyx_r);
  58773. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sock, __pyx_n_s_getsockopt); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 87, __pyx_L4_error)
  58774. __Pyx_GOTREF(__pyx_t_1);
  58775. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 87, __pyx_L4_error)
  58776. __Pyx_GOTREF(__pyx_t_2);
  58777. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  58778. __pyx_r = __pyx_t_2;
  58779. __pyx_t_2 = 0;
  58780. goto __pyx_L3_return;
  58781. }
  58782. /* "uvloop/pseudosock.pyx":89
  58783. * return sock.getsockopt(*args, **kwargs)
  58784. * finally:
  58785. * sock.detach() # <<<<<<<<<<<<<<
  58786. *
  58787. * def setsockopt(self, *args, **kwargs):
  58788. */
  58789. /*finally:*/ {
  58790. __pyx_L4_error:;
  58791. /*exception exit:*/{
  58792. __Pyx_PyThreadState_declare
  58793. __Pyx_PyThreadState_assign
  58794. __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0;
  58795. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  58796. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  58797. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
  58798. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8) < 0)) __Pyx_ErrFetch(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
  58799. __Pyx_XGOTREF(__pyx_t_6);
  58800. __Pyx_XGOTREF(__pyx_t_7);
  58801. __Pyx_XGOTREF(__pyx_t_8);
  58802. __Pyx_XGOTREF(__pyx_t_9);
  58803. __Pyx_XGOTREF(__pyx_t_10);
  58804. __Pyx_XGOTREF(__pyx_t_11);
  58805. __pyx_t_3 = __pyx_lineno; __pyx_t_4 = __pyx_clineno; __pyx_t_5 = __pyx_filename;
  58806. {
  58807. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sock, __pyx_n_s_detach); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 89, __pyx_L7_error)
  58808. __Pyx_GOTREF(__pyx_t_1);
  58809. __pyx_t_12 = NULL;
  58810. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
  58811. __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_1);
  58812. if (likely(__pyx_t_12)) {
  58813. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
  58814. __Pyx_INCREF(__pyx_t_12);
  58815. __Pyx_INCREF(function);
  58816. __Pyx_DECREF_SET(__pyx_t_1, function);
  58817. }
  58818. }
  58819. __pyx_t_2 = (__pyx_t_12) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_12) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
  58820. __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
  58821. if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 89, __pyx_L7_error)
  58822. __Pyx_GOTREF(__pyx_t_2);
  58823. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  58824. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  58825. }
  58826. if (PY_MAJOR_VERSION >= 3) {
  58827. __Pyx_XGIVEREF(__pyx_t_9);
  58828. __Pyx_XGIVEREF(__pyx_t_10);
  58829. __Pyx_XGIVEREF(__pyx_t_11);
  58830. __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11);
  58831. }
  58832. __Pyx_XGIVEREF(__pyx_t_6);
  58833. __Pyx_XGIVEREF(__pyx_t_7);
  58834. __Pyx_XGIVEREF(__pyx_t_8);
  58835. __Pyx_ErrRestore(__pyx_t_6, __pyx_t_7, __pyx_t_8);
  58836. __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0;
  58837. __pyx_lineno = __pyx_t_3; __pyx_clineno = __pyx_t_4; __pyx_filename = __pyx_t_5;
  58838. goto __pyx_L1_error;
  58839. __pyx_L7_error:;
  58840. if (PY_MAJOR_VERSION >= 3) {
  58841. __Pyx_XGIVEREF(__pyx_t_9);
  58842. __Pyx_XGIVEREF(__pyx_t_10);
  58843. __Pyx_XGIVEREF(__pyx_t_11);
  58844. __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11);
  58845. }
  58846. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  58847. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  58848. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  58849. __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0;
  58850. goto __pyx_L1_error;
  58851. }
  58852. __pyx_L3_return: {
  58853. __pyx_t_11 = __pyx_r;
  58854. __pyx_r = 0;
  58855. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sock, __pyx_n_s_detach); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 89, __pyx_L1_error)
  58856. __Pyx_GOTREF(__pyx_t_1);
  58857. __pyx_t_12 = NULL;
  58858. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
  58859. __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_1);
  58860. if (likely(__pyx_t_12)) {
  58861. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
  58862. __Pyx_INCREF(__pyx_t_12);
  58863. __Pyx_INCREF(function);
  58864. __Pyx_DECREF_SET(__pyx_t_1, function);
  58865. }
  58866. }
  58867. __pyx_t_2 = (__pyx_t_12) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_12) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
  58868. __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
  58869. if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 89, __pyx_L1_error)
  58870. __Pyx_GOTREF(__pyx_t_2);
  58871. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  58872. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  58873. __pyx_r = __pyx_t_11;
  58874. __pyx_t_11 = 0;
  58875. goto __pyx_L0;
  58876. }
  58877. }
  58878. /* "uvloop/pseudosock.pyx":84
  58879. * pass
  58880. *
  58881. * def getsockopt(self, *args, **kwargs): # <<<<<<<<<<<<<<
  58882. * sock = self._make_sock()
  58883. * try:
  58884. */
  58885. /* function exit code */
  58886. __pyx_L1_error:;
  58887. __Pyx_XDECREF(__pyx_t_1);
  58888. __Pyx_XDECREF(__pyx_t_2);
  58889. __Pyx_XDECREF(__pyx_t_12);
  58890. __Pyx_AddTraceback("uvloop.loop.PseudoSocket.getsockopt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  58891. __pyx_r = NULL;
  58892. __pyx_L0:;
  58893. __Pyx_XDECREF(__pyx_v_sock);
  58894. __Pyx_XGIVEREF(__pyx_r);
  58895. __Pyx_RefNannyFinishContext();
  58896. return __pyx_r;
  58897. }
  58898. /* "uvloop/pseudosock.pyx":91
  58899. * sock.detach()
  58900. *
  58901. * def setsockopt(self, *args, **kwargs): # <<<<<<<<<<<<<<
  58902. * sock = self._make_sock()
  58903. * try:
  58904. */
  58905. /* Python wrapper */
  58906. static PyObject *__pyx_pw_6uvloop_4loop_12PseudoSocket_19setsockopt(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  58907. static char __pyx_doc_6uvloop_4loop_12PseudoSocket_18setsockopt[] = "PseudoSocket.setsockopt(self, *args, **kwargs)";
  58908. static PyObject *__pyx_pw_6uvloop_4loop_12PseudoSocket_19setsockopt(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  58909. PyObject *__pyx_v_args = 0;
  58910. PyObject *__pyx_v_kwargs = 0;
  58911. PyObject *__pyx_r = 0;
  58912. __Pyx_RefNannyDeclarations
  58913. __Pyx_RefNannySetupContext("setsockopt (wrapper)", 0);
  58914. if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "setsockopt", 1))) return NULL;
  58915. if (unlikely(__pyx_kwds)) {
  58916. __pyx_v_kwargs = PyDict_Copy(__pyx_kwds); if (unlikely(!__pyx_v_kwargs)) return NULL;
  58917. __Pyx_GOTREF(__pyx_v_kwargs);
  58918. } else {
  58919. __pyx_v_kwargs = NULL;
  58920. }
  58921. __Pyx_INCREF(__pyx_args);
  58922. __pyx_v_args = __pyx_args;
  58923. __pyx_r = __pyx_pf_6uvloop_4loop_12PseudoSocket_18setsockopt(((struct __pyx_obj_6uvloop_4loop_PseudoSocket *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);
  58924. /* function exit code */
  58925. __Pyx_XDECREF(__pyx_v_args);
  58926. __Pyx_XDECREF(__pyx_v_kwargs);
  58927. __Pyx_RefNannyFinishContext();
  58928. return __pyx_r;
  58929. }
  58930. static PyObject *__pyx_pf_6uvloop_4loop_12PseudoSocket_18setsockopt(struct __pyx_obj_6uvloop_4loop_PseudoSocket *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
  58931. PyObject *__pyx_v_sock = NULL;
  58932. PyObject *__pyx_r = NULL;
  58933. __Pyx_RefNannyDeclarations
  58934. PyObject *__pyx_t_1 = NULL;
  58935. PyObject *__pyx_t_2 = NULL;
  58936. int __pyx_t_3;
  58937. int __pyx_t_4;
  58938. char const *__pyx_t_5;
  58939. PyObject *__pyx_t_6 = NULL;
  58940. PyObject *__pyx_t_7 = NULL;
  58941. PyObject *__pyx_t_8 = NULL;
  58942. PyObject *__pyx_t_9 = NULL;
  58943. PyObject *__pyx_t_10 = NULL;
  58944. PyObject *__pyx_t_11 = NULL;
  58945. PyObject *__pyx_t_12 = NULL;
  58946. __Pyx_RefNannySetupContext("setsockopt", 0);
  58947. /* "uvloop/pseudosock.pyx":92
  58948. *
  58949. * def setsockopt(self, *args, **kwargs):
  58950. * sock = self._make_sock() # <<<<<<<<<<<<<<
  58951. * try:
  58952. * return sock.setsockopt(*args, **kwargs)
  58953. */
  58954. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_PseudoSocket *)__pyx_v_self->__pyx_vtab)->_make_sock(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 92, __pyx_L1_error)
  58955. __Pyx_GOTREF(__pyx_t_1);
  58956. __pyx_v_sock = __pyx_t_1;
  58957. __pyx_t_1 = 0;
  58958. /* "uvloop/pseudosock.pyx":93
  58959. * def setsockopt(self, *args, **kwargs):
  58960. * sock = self._make_sock()
  58961. * try: # <<<<<<<<<<<<<<
  58962. * return sock.setsockopt(*args, **kwargs)
  58963. * finally:
  58964. */
  58965. /*try:*/ {
  58966. /* "uvloop/pseudosock.pyx":94
  58967. * sock = self._make_sock()
  58968. * try:
  58969. * return sock.setsockopt(*args, **kwargs) # <<<<<<<<<<<<<<
  58970. * finally:
  58971. * sock.detach()
  58972. */
  58973. __Pyx_XDECREF(__pyx_r);
  58974. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sock, __pyx_n_s_setsockopt); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 94, __pyx_L4_error)
  58975. __Pyx_GOTREF(__pyx_t_1);
  58976. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 94, __pyx_L4_error)
  58977. __Pyx_GOTREF(__pyx_t_2);
  58978. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  58979. __pyx_r = __pyx_t_2;
  58980. __pyx_t_2 = 0;
  58981. goto __pyx_L3_return;
  58982. }
  58983. /* "uvloop/pseudosock.pyx":96
  58984. * return sock.setsockopt(*args, **kwargs)
  58985. * finally:
  58986. * sock.detach() # <<<<<<<<<<<<<<
  58987. *
  58988. * def getpeername(self):
  58989. */
  58990. /*finally:*/ {
  58991. __pyx_L4_error:;
  58992. /*exception exit:*/{
  58993. __Pyx_PyThreadState_declare
  58994. __Pyx_PyThreadState_assign
  58995. __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0;
  58996. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  58997. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  58998. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
  58999. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8) < 0)) __Pyx_ErrFetch(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
  59000. __Pyx_XGOTREF(__pyx_t_6);
  59001. __Pyx_XGOTREF(__pyx_t_7);
  59002. __Pyx_XGOTREF(__pyx_t_8);
  59003. __Pyx_XGOTREF(__pyx_t_9);
  59004. __Pyx_XGOTREF(__pyx_t_10);
  59005. __Pyx_XGOTREF(__pyx_t_11);
  59006. __pyx_t_3 = __pyx_lineno; __pyx_t_4 = __pyx_clineno; __pyx_t_5 = __pyx_filename;
  59007. {
  59008. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sock, __pyx_n_s_detach); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 96, __pyx_L7_error)
  59009. __Pyx_GOTREF(__pyx_t_1);
  59010. __pyx_t_12 = NULL;
  59011. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
  59012. __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_1);
  59013. if (likely(__pyx_t_12)) {
  59014. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
  59015. __Pyx_INCREF(__pyx_t_12);
  59016. __Pyx_INCREF(function);
  59017. __Pyx_DECREF_SET(__pyx_t_1, function);
  59018. }
  59019. }
  59020. __pyx_t_2 = (__pyx_t_12) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_12) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
  59021. __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
  59022. if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 96, __pyx_L7_error)
  59023. __Pyx_GOTREF(__pyx_t_2);
  59024. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  59025. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  59026. }
  59027. if (PY_MAJOR_VERSION >= 3) {
  59028. __Pyx_XGIVEREF(__pyx_t_9);
  59029. __Pyx_XGIVEREF(__pyx_t_10);
  59030. __Pyx_XGIVEREF(__pyx_t_11);
  59031. __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11);
  59032. }
  59033. __Pyx_XGIVEREF(__pyx_t_6);
  59034. __Pyx_XGIVEREF(__pyx_t_7);
  59035. __Pyx_XGIVEREF(__pyx_t_8);
  59036. __Pyx_ErrRestore(__pyx_t_6, __pyx_t_7, __pyx_t_8);
  59037. __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0;
  59038. __pyx_lineno = __pyx_t_3; __pyx_clineno = __pyx_t_4; __pyx_filename = __pyx_t_5;
  59039. goto __pyx_L1_error;
  59040. __pyx_L7_error:;
  59041. if (PY_MAJOR_VERSION >= 3) {
  59042. __Pyx_XGIVEREF(__pyx_t_9);
  59043. __Pyx_XGIVEREF(__pyx_t_10);
  59044. __Pyx_XGIVEREF(__pyx_t_11);
  59045. __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11);
  59046. }
  59047. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  59048. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  59049. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  59050. __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0;
  59051. goto __pyx_L1_error;
  59052. }
  59053. __pyx_L3_return: {
  59054. __pyx_t_11 = __pyx_r;
  59055. __pyx_r = 0;
  59056. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sock, __pyx_n_s_detach); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 96, __pyx_L1_error)
  59057. __Pyx_GOTREF(__pyx_t_1);
  59058. __pyx_t_12 = NULL;
  59059. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
  59060. __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_1);
  59061. if (likely(__pyx_t_12)) {
  59062. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
  59063. __Pyx_INCREF(__pyx_t_12);
  59064. __Pyx_INCREF(function);
  59065. __Pyx_DECREF_SET(__pyx_t_1, function);
  59066. }
  59067. }
  59068. __pyx_t_2 = (__pyx_t_12) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_12) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
  59069. __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
  59070. if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 96, __pyx_L1_error)
  59071. __Pyx_GOTREF(__pyx_t_2);
  59072. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  59073. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  59074. __pyx_r = __pyx_t_11;
  59075. __pyx_t_11 = 0;
  59076. goto __pyx_L0;
  59077. }
  59078. }
  59079. /* "uvloop/pseudosock.pyx":91
  59080. * sock.detach()
  59081. *
  59082. * def setsockopt(self, *args, **kwargs): # <<<<<<<<<<<<<<
  59083. * sock = self._make_sock()
  59084. * try:
  59085. */
  59086. /* function exit code */
  59087. __pyx_L1_error:;
  59088. __Pyx_XDECREF(__pyx_t_1);
  59089. __Pyx_XDECREF(__pyx_t_2);
  59090. __Pyx_XDECREF(__pyx_t_12);
  59091. __Pyx_AddTraceback("uvloop.loop.PseudoSocket.setsockopt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  59092. __pyx_r = NULL;
  59093. __pyx_L0:;
  59094. __Pyx_XDECREF(__pyx_v_sock);
  59095. __Pyx_XGIVEREF(__pyx_r);
  59096. __Pyx_RefNannyFinishContext();
  59097. return __pyx_r;
  59098. }
  59099. /* "uvloop/pseudosock.pyx":98
  59100. * sock.detach()
  59101. *
  59102. * def getpeername(self): # <<<<<<<<<<<<<<
  59103. * if self._peername is not None:
  59104. * return self._peername
  59105. */
  59106. /* Python wrapper */
  59107. static PyObject *__pyx_pw_6uvloop_4loop_12PseudoSocket_21getpeername(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  59108. static char __pyx_doc_6uvloop_4loop_12PseudoSocket_20getpeername[] = "PseudoSocket.getpeername(self)";
  59109. static PyObject *__pyx_pw_6uvloop_4loop_12PseudoSocket_21getpeername(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  59110. PyObject *__pyx_r = 0;
  59111. __Pyx_RefNannyDeclarations
  59112. __Pyx_RefNannySetupContext("getpeername (wrapper)", 0);
  59113. __pyx_r = __pyx_pf_6uvloop_4loop_12PseudoSocket_20getpeername(((struct __pyx_obj_6uvloop_4loop_PseudoSocket *)__pyx_v_self));
  59114. /* function exit code */
  59115. __Pyx_RefNannyFinishContext();
  59116. return __pyx_r;
  59117. }
  59118. static PyObject *__pyx_pf_6uvloop_4loop_12PseudoSocket_20getpeername(struct __pyx_obj_6uvloop_4loop_PseudoSocket *__pyx_v_self) {
  59119. PyObject *__pyx_v_sock = NULL;
  59120. PyObject *__pyx_r = NULL;
  59121. __Pyx_RefNannyDeclarations
  59122. int __pyx_t_1;
  59123. int __pyx_t_2;
  59124. PyObject *__pyx_t_3 = NULL;
  59125. PyObject *__pyx_t_4 = NULL;
  59126. PyObject *__pyx_t_5 = NULL;
  59127. int __pyx_t_6;
  59128. int __pyx_t_7;
  59129. char const *__pyx_t_8;
  59130. PyObject *__pyx_t_9 = NULL;
  59131. PyObject *__pyx_t_10 = NULL;
  59132. PyObject *__pyx_t_11 = NULL;
  59133. PyObject *__pyx_t_12 = NULL;
  59134. PyObject *__pyx_t_13 = NULL;
  59135. PyObject *__pyx_t_14 = NULL;
  59136. __Pyx_RefNannySetupContext("getpeername", 0);
  59137. /* "uvloop/pseudosock.pyx":99
  59138. *
  59139. * def getpeername(self):
  59140. * if self._peername is not None: # <<<<<<<<<<<<<<
  59141. * return self._peername
  59142. *
  59143. */
  59144. __pyx_t_1 = (__pyx_v_self->_peername != Py_None);
  59145. __pyx_t_2 = (__pyx_t_1 != 0);
  59146. if (__pyx_t_2) {
  59147. /* "uvloop/pseudosock.pyx":100
  59148. * def getpeername(self):
  59149. * if self._peername is not None:
  59150. * return self._peername # <<<<<<<<<<<<<<
  59151. *
  59152. * sock = self._make_sock()
  59153. */
  59154. __Pyx_XDECREF(__pyx_r);
  59155. __Pyx_INCREF(__pyx_v_self->_peername);
  59156. __pyx_r = __pyx_v_self->_peername;
  59157. goto __pyx_L0;
  59158. /* "uvloop/pseudosock.pyx":99
  59159. *
  59160. * def getpeername(self):
  59161. * if self._peername is not None: # <<<<<<<<<<<<<<
  59162. * return self._peername
  59163. *
  59164. */
  59165. }
  59166. /* "uvloop/pseudosock.pyx":102
  59167. * return self._peername
  59168. *
  59169. * sock = self._make_sock() # <<<<<<<<<<<<<<
  59170. * try:
  59171. * self._peername = sock.getpeername()
  59172. */
  59173. __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_PseudoSocket *)__pyx_v_self->__pyx_vtab)->_make_sock(__pyx_v_self); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 102, __pyx_L1_error)
  59174. __Pyx_GOTREF(__pyx_t_3);
  59175. __pyx_v_sock = __pyx_t_3;
  59176. __pyx_t_3 = 0;
  59177. /* "uvloop/pseudosock.pyx":103
  59178. *
  59179. * sock = self._make_sock()
  59180. * try: # <<<<<<<<<<<<<<
  59181. * self._peername = sock.getpeername()
  59182. * return self._peername
  59183. */
  59184. /*try:*/ {
  59185. /* "uvloop/pseudosock.pyx":104
  59186. * sock = self._make_sock()
  59187. * try:
  59188. * self._peername = sock.getpeername() # <<<<<<<<<<<<<<
  59189. * return self._peername
  59190. * finally:
  59191. */
  59192. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_sock, __pyx_n_s_getpeername); if (unlikely(!__pyx_t_4)) __PYX_ERR(10, 104, __pyx_L5_error)
  59193. __Pyx_GOTREF(__pyx_t_4);
  59194. __pyx_t_5 = NULL;
  59195. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
  59196. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
  59197. if (likely(__pyx_t_5)) {
  59198. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  59199. __Pyx_INCREF(__pyx_t_5);
  59200. __Pyx_INCREF(function);
  59201. __Pyx_DECREF_SET(__pyx_t_4, function);
  59202. }
  59203. }
  59204. __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
  59205. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  59206. if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 104, __pyx_L5_error)
  59207. __Pyx_GOTREF(__pyx_t_3);
  59208. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  59209. __Pyx_GIVEREF(__pyx_t_3);
  59210. __Pyx_GOTREF(__pyx_v_self->_peername);
  59211. __Pyx_DECREF(__pyx_v_self->_peername);
  59212. __pyx_v_self->_peername = __pyx_t_3;
  59213. __pyx_t_3 = 0;
  59214. /* "uvloop/pseudosock.pyx":105
  59215. * try:
  59216. * self._peername = sock.getpeername()
  59217. * return self._peername # <<<<<<<<<<<<<<
  59218. * finally:
  59219. * sock.detach()
  59220. */
  59221. __Pyx_XDECREF(__pyx_r);
  59222. __Pyx_INCREF(__pyx_v_self->_peername);
  59223. __pyx_r = __pyx_v_self->_peername;
  59224. goto __pyx_L4_return;
  59225. }
  59226. /* "uvloop/pseudosock.pyx":107
  59227. * return self._peername
  59228. * finally:
  59229. * sock.detach() # <<<<<<<<<<<<<<
  59230. *
  59231. * def getsockname(self):
  59232. */
  59233. /*finally:*/ {
  59234. __pyx_L5_error:;
  59235. /*exception exit:*/{
  59236. __Pyx_PyThreadState_declare
  59237. __Pyx_PyThreadState_assign
  59238. __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0;
  59239. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  59240. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  59241. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  59242. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
  59243. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11) < 0)) __Pyx_ErrFetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
  59244. __Pyx_XGOTREF(__pyx_t_9);
  59245. __Pyx_XGOTREF(__pyx_t_10);
  59246. __Pyx_XGOTREF(__pyx_t_11);
  59247. __Pyx_XGOTREF(__pyx_t_12);
  59248. __Pyx_XGOTREF(__pyx_t_13);
  59249. __Pyx_XGOTREF(__pyx_t_14);
  59250. __pyx_t_6 = __pyx_lineno; __pyx_t_7 = __pyx_clineno; __pyx_t_8 = __pyx_filename;
  59251. {
  59252. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_sock, __pyx_n_s_detach); if (unlikely(!__pyx_t_4)) __PYX_ERR(10, 107, __pyx_L8_error)
  59253. __Pyx_GOTREF(__pyx_t_4);
  59254. __pyx_t_5 = NULL;
  59255. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
  59256. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
  59257. if (likely(__pyx_t_5)) {
  59258. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  59259. __Pyx_INCREF(__pyx_t_5);
  59260. __Pyx_INCREF(function);
  59261. __Pyx_DECREF_SET(__pyx_t_4, function);
  59262. }
  59263. }
  59264. __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
  59265. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  59266. if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 107, __pyx_L8_error)
  59267. __Pyx_GOTREF(__pyx_t_3);
  59268. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  59269. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  59270. }
  59271. if (PY_MAJOR_VERSION >= 3) {
  59272. __Pyx_XGIVEREF(__pyx_t_12);
  59273. __Pyx_XGIVEREF(__pyx_t_13);
  59274. __Pyx_XGIVEREF(__pyx_t_14);
  59275. __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
  59276. }
  59277. __Pyx_XGIVEREF(__pyx_t_9);
  59278. __Pyx_XGIVEREF(__pyx_t_10);
  59279. __Pyx_XGIVEREF(__pyx_t_11);
  59280. __Pyx_ErrRestore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
  59281. __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0;
  59282. __pyx_lineno = __pyx_t_6; __pyx_clineno = __pyx_t_7; __pyx_filename = __pyx_t_8;
  59283. goto __pyx_L1_error;
  59284. __pyx_L8_error:;
  59285. if (PY_MAJOR_VERSION >= 3) {
  59286. __Pyx_XGIVEREF(__pyx_t_12);
  59287. __Pyx_XGIVEREF(__pyx_t_13);
  59288. __Pyx_XGIVEREF(__pyx_t_14);
  59289. __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
  59290. }
  59291. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  59292. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  59293. __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
  59294. __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0;
  59295. goto __pyx_L1_error;
  59296. }
  59297. __pyx_L4_return: {
  59298. __pyx_t_14 = __pyx_r;
  59299. __pyx_r = 0;
  59300. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_sock, __pyx_n_s_detach); if (unlikely(!__pyx_t_4)) __PYX_ERR(10, 107, __pyx_L1_error)
  59301. __Pyx_GOTREF(__pyx_t_4);
  59302. __pyx_t_5 = NULL;
  59303. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
  59304. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
  59305. if (likely(__pyx_t_5)) {
  59306. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  59307. __Pyx_INCREF(__pyx_t_5);
  59308. __Pyx_INCREF(function);
  59309. __Pyx_DECREF_SET(__pyx_t_4, function);
  59310. }
  59311. }
  59312. __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
  59313. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  59314. if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 107, __pyx_L1_error)
  59315. __Pyx_GOTREF(__pyx_t_3);
  59316. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  59317. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  59318. __pyx_r = __pyx_t_14;
  59319. __pyx_t_14 = 0;
  59320. goto __pyx_L0;
  59321. }
  59322. }
  59323. /* "uvloop/pseudosock.pyx":98
  59324. * sock.detach()
  59325. *
  59326. * def getpeername(self): # <<<<<<<<<<<<<<
  59327. * if self._peername is not None:
  59328. * return self._peername
  59329. */
  59330. /* function exit code */
  59331. __pyx_L1_error:;
  59332. __Pyx_XDECREF(__pyx_t_3);
  59333. __Pyx_XDECREF(__pyx_t_4);
  59334. __Pyx_XDECREF(__pyx_t_5);
  59335. __Pyx_AddTraceback("uvloop.loop.PseudoSocket.getpeername", __pyx_clineno, __pyx_lineno, __pyx_filename);
  59336. __pyx_r = NULL;
  59337. __pyx_L0:;
  59338. __Pyx_XDECREF(__pyx_v_sock);
  59339. __Pyx_XGIVEREF(__pyx_r);
  59340. __Pyx_RefNannyFinishContext();
  59341. return __pyx_r;
  59342. }
  59343. /* "uvloop/pseudosock.pyx":109
  59344. * sock.detach()
  59345. *
  59346. * def getsockname(self): # <<<<<<<<<<<<<<
  59347. * if self._sockname is not None:
  59348. * return self._sockname
  59349. */
  59350. /* Python wrapper */
  59351. static PyObject *__pyx_pw_6uvloop_4loop_12PseudoSocket_23getsockname(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  59352. static char __pyx_doc_6uvloop_4loop_12PseudoSocket_22getsockname[] = "PseudoSocket.getsockname(self)";
  59353. static PyObject *__pyx_pw_6uvloop_4loop_12PseudoSocket_23getsockname(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  59354. PyObject *__pyx_r = 0;
  59355. __Pyx_RefNannyDeclarations
  59356. __Pyx_RefNannySetupContext("getsockname (wrapper)", 0);
  59357. __pyx_r = __pyx_pf_6uvloop_4loop_12PseudoSocket_22getsockname(((struct __pyx_obj_6uvloop_4loop_PseudoSocket *)__pyx_v_self));
  59358. /* function exit code */
  59359. __Pyx_RefNannyFinishContext();
  59360. return __pyx_r;
  59361. }
  59362. static PyObject *__pyx_pf_6uvloop_4loop_12PseudoSocket_22getsockname(struct __pyx_obj_6uvloop_4loop_PseudoSocket *__pyx_v_self) {
  59363. PyObject *__pyx_v_sock = NULL;
  59364. PyObject *__pyx_r = NULL;
  59365. __Pyx_RefNannyDeclarations
  59366. int __pyx_t_1;
  59367. int __pyx_t_2;
  59368. PyObject *__pyx_t_3 = NULL;
  59369. PyObject *__pyx_t_4 = NULL;
  59370. PyObject *__pyx_t_5 = NULL;
  59371. int __pyx_t_6;
  59372. int __pyx_t_7;
  59373. char const *__pyx_t_8;
  59374. PyObject *__pyx_t_9 = NULL;
  59375. PyObject *__pyx_t_10 = NULL;
  59376. PyObject *__pyx_t_11 = NULL;
  59377. PyObject *__pyx_t_12 = NULL;
  59378. PyObject *__pyx_t_13 = NULL;
  59379. PyObject *__pyx_t_14 = NULL;
  59380. __Pyx_RefNannySetupContext("getsockname", 0);
  59381. /* "uvloop/pseudosock.pyx":110
  59382. *
  59383. * def getsockname(self):
  59384. * if self._sockname is not None: # <<<<<<<<<<<<<<
  59385. * return self._sockname
  59386. *
  59387. */
  59388. __pyx_t_1 = (__pyx_v_self->_sockname != Py_None);
  59389. __pyx_t_2 = (__pyx_t_1 != 0);
  59390. if (__pyx_t_2) {
  59391. /* "uvloop/pseudosock.pyx":111
  59392. * def getsockname(self):
  59393. * if self._sockname is not None:
  59394. * return self._sockname # <<<<<<<<<<<<<<
  59395. *
  59396. * sock = self._make_sock()
  59397. */
  59398. __Pyx_XDECREF(__pyx_r);
  59399. __Pyx_INCREF(__pyx_v_self->_sockname);
  59400. __pyx_r = __pyx_v_self->_sockname;
  59401. goto __pyx_L0;
  59402. /* "uvloop/pseudosock.pyx":110
  59403. *
  59404. * def getsockname(self):
  59405. * if self._sockname is not None: # <<<<<<<<<<<<<<
  59406. * return self._sockname
  59407. *
  59408. */
  59409. }
  59410. /* "uvloop/pseudosock.pyx":113
  59411. * return self._sockname
  59412. *
  59413. * sock = self._make_sock() # <<<<<<<<<<<<<<
  59414. * try:
  59415. * self._sockname = sock.getsockname()
  59416. */
  59417. __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_PseudoSocket *)__pyx_v_self->__pyx_vtab)->_make_sock(__pyx_v_self); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 113, __pyx_L1_error)
  59418. __Pyx_GOTREF(__pyx_t_3);
  59419. __pyx_v_sock = __pyx_t_3;
  59420. __pyx_t_3 = 0;
  59421. /* "uvloop/pseudosock.pyx":114
  59422. *
  59423. * sock = self._make_sock()
  59424. * try: # <<<<<<<<<<<<<<
  59425. * self._sockname = sock.getsockname()
  59426. * return self._sockname
  59427. */
  59428. /*try:*/ {
  59429. /* "uvloop/pseudosock.pyx":115
  59430. * sock = self._make_sock()
  59431. * try:
  59432. * self._sockname = sock.getsockname() # <<<<<<<<<<<<<<
  59433. * return self._sockname
  59434. * finally:
  59435. */
  59436. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_sock, __pyx_n_s_getsockname); if (unlikely(!__pyx_t_4)) __PYX_ERR(10, 115, __pyx_L5_error)
  59437. __Pyx_GOTREF(__pyx_t_4);
  59438. __pyx_t_5 = NULL;
  59439. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
  59440. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
  59441. if (likely(__pyx_t_5)) {
  59442. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  59443. __Pyx_INCREF(__pyx_t_5);
  59444. __Pyx_INCREF(function);
  59445. __Pyx_DECREF_SET(__pyx_t_4, function);
  59446. }
  59447. }
  59448. __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
  59449. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  59450. if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 115, __pyx_L5_error)
  59451. __Pyx_GOTREF(__pyx_t_3);
  59452. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  59453. __Pyx_GIVEREF(__pyx_t_3);
  59454. __Pyx_GOTREF(__pyx_v_self->_sockname);
  59455. __Pyx_DECREF(__pyx_v_self->_sockname);
  59456. __pyx_v_self->_sockname = __pyx_t_3;
  59457. __pyx_t_3 = 0;
  59458. /* "uvloop/pseudosock.pyx":116
  59459. * try:
  59460. * self._sockname = sock.getsockname()
  59461. * return self._sockname # <<<<<<<<<<<<<<
  59462. * finally:
  59463. * sock.detach()
  59464. */
  59465. __Pyx_XDECREF(__pyx_r);
  59466. __Pyx_INCREF(__pyx_v_self->_sockname);
  59467. __pyx_r = __pyx_v_self->_sockname;
  59468. goto __pyx_L4_return;
  59469. }
  59470. /* "uvloop/pseudosock.pyx":118
  59471. * return self._sockname
  59472. * finally:
  59473. * sock.detach() # <<<<<<<<<<<<<<
  59474. *
  59475. * def share(self, process_id):
  59476. */
  59477. /*finally:*/ {
  59478. __pyx_L5_error:;
  59479. /*exception exit:*/{
  59480. __Pyx_PyThreadState_declare
  59481. __Pyx_PyThreadState_assign
  59482. __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0;
  59483. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  59484. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  59485. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  59486. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
  59487. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11) < 0)) __Pyx_ErrFetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
  59488. __Pyx_XGOTREF(__pyx_t_9);
  59489. __Pyx_XGOTREF(__pyx_t_10);
  59490. __Pyx_XGOTREF(__pyx_t_11);
  59491. __Pyx_XGOTREF(__pyx_t_12);
  59492. __Pyx_XGOTREF(__pyx_t_13);
  59493. __Pyx_XGOTREF(__pyx_t_14);
  59494. __pyx_t_6 = __pyx_lineno; __pyx_t_7 = __pyx_clineno; __pyx_t_8 = __pyx_filename;
  59495. {
  59496. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_sock, __pyx_n_s_detach); if (unlikely(!__pyx_t_4)) __PYX_ERR(10, 118, __pyx_L8_error)
  59497. __Pyx_GOTREF(__pyx_t_4);
  59498. __pyx_t_5 = NULL;
  59499. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
  59500. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
  59501. if (likely(__pyx_t_5)) {
  59502. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  59503. __Pyx_INCREF(__pyx_t_5);
  59504. __Pyx_INCREF(function);
  59505. __Pyx_DECREF_SET(__pyx_t_4, function);
  59506. }
  59507. }
  59508. __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
  59509. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  59510. if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 118, __pyx_L8_error)
  59511. __Pyx_GOTREF(__pyx_t_3);
  59512. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  59513. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  59514. }
  59515. if (PY_MAJOR_VERSION >= 3) {
  59516. __Pyx_XGIVEREF(__pyx_t_12);
  59517. __Pyx_XGIVEREF(__pyx_t_13);
  59518. __Pyx_XGIVEREF(__pyx_t_14);
  59519. __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
  59520. }
  59521. __Pyx_XGIVEREF(__pyx_t_9);
  59522. __Pyx_XGIVEREF(__pyx_t_10);
  59523. __Pyx_XGIVEREF(__pyx_t_11);
  59524. __Pyx_ErrRestore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
  59525. __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0;
  59526. __pyx_lineno = __pyx_t_6; __pyx_clineno = __pyx_t_7; __pyx_filename = __pyx_t_8;
  59527. goto __pyx_L1_error;
  59528. __pyx_L8_error:;
  59529. if (PY_MAJOR_VERSION >= 3) {
  59530. __Pyx_XGIVEREF(__pyx_t_12);
  59531. __Pyx_XGIVEREF(__pyx_t_13);
  59532. __Pyx_XGIVEREF(__pyx_t_14);
  59533. __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
  59534. }
  59535. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  59536. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  59537. __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
  59538. __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0;
  59539. goto __pyx_L1_error;
  59540. }
  59541. __pyx_L4_return: {
  59542. __pyx_t_14 = __pyx_r;
  59543. __pyx_r = 0;
  59544. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_sock, __pyx_n_s_detach); if (unlikely(!__pyx_t_4)) __PYX_ERR(10, 118, __pyx_L1_error)
  59545. __Pyx_GOTREF(__pyx_t_4);
  59546. __pyx_t_5 = NULL;
  59547. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
  59548. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
  59549. if (likely(__pyx_t_5)) {
  59550. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  59551. __Pyx_INCREF(__pyx_t_5);
  59552. __Pyx_INCREF(function);
  59553. __Pyx_DECREF_SET(__pyx_t_4, function);
  59554. }
  59555. }
  59556. __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
  59557. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  59558. if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 118, __pyx_L1_error)
  59559. __Pyx_GOTREF(__pyx_t_3);
  59560. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  59561. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  59562. __pyx_r = __pyx_t_14;
  59563. __pyx_t_14 = 0;
  59564. goto __pyx_L0;
  59565. }
  59566. }
  59567. /* "uvloop/pseudosock.pyx":109
  59568. * sock.detach()
  59569. *
  59570. * def getsockname(self): # <<<<<<<<<<<<<<
  59571. * if self._sockname is not None:
  59572. * return self._sockname
  59573. */
  59574. /* function exit code */
  59575. __pyx_L1_error:;
  59576. __Pyx_XDECREF(__pyx_t_3);
  59577. __Pyx_XDECREF(__pyx_t_4);
  59578. __Pyx_XDECREF(__pyx_t_5);
  59579. __Pyx_AddTraceback("uvloop.loop.PseudoSocket.getsockname", __pyx_clineno, __pyx_lineno, __pyx_filename);
  59580. __pyx_r = NULL;
  59581. __pyx_L0:;
  59582. __Pyx_XDECREF(__pyx_v_sock);
  59583. __Pyx_XGIVEREF(__pyx_r);
  59584. __Pyx_RefNannyFinishContext();
  59585. return __pyx_r;
  59586. }
  59587. /* "uvloop/pseudosock.pyx":120
  59588. * sock.detach()
  59589. *
  59590. * def share(self, process_id): # <<<<<<<<<<<<<<
  59591. * sock = self._make_sock()
  59592. * try:
  59593. */
  59594. /* Python wrapper */
  59595. static PyObject *__pyx_pw_6uvloop_4loop_12PseudoSocket_25share(PyObject *__pyx_v_self, PyObject *__pyx_v_process_id); /*proto*/
  59596. static char __pyx_doc_6uvloop_4loop_12PseudoSocket_24share[] = "PseudoSocket.share(self, process_id)";
  59597. static PyObject *__pyx_pw_6uvloop_4loop_12PseudoSocket_25share(PyObject *__pyx_v_self, PyObject *__pyx_v_process_id) {
  59598. PyObject *__pyx_r = 0;
  59599. __Pyx_RefNannyDeclarations
  59600. __Pyx_RefNannySetupContext("share (wrapper)", 0);
  59601. __pyx_r = __pyx_pf_6uvloop_4loop_12PseudoSocket_24share(((struct __pyx_obj_6uvloop_4loop_PseudoSocket *)__pyx_v_self), ((PyObject *)__pyx_v_process_id));
  59602. /* function exit code */
  59603. __Pyx_RefNannyFinishContext();
  59604. return __pyx_r;
  59605. }
  59606. static PyObject *__pyx_pf_6uvloop_4loop_12PseudoSocket_24share(struct __pyx_obj_6uvloop_4loop_PseudoSocket *__pyx_v_self, PyObject *__pyx_v_process_id) {
  59607. PyObject *__pyx_v_sock = NULL;
  59608. PyObject *__pyx_r = NULL;
  59609. __Pyx_RefNannyDeclarations
  59610. PyObject *__pyx_t_1 = NULL;
  59611. PyObject *__pyx_t_2 = NULL;
  59612. PyObject *__pyx_t_3 = NULL;
  59613. int __pyx_t_4;
  59614. int __pyx_t_5;
  59615. char const *__pyx_t_6;
  59616. PyObject *__pyx_t_7 = NULL;
  59617. PyObject *__pyx_t_8 = NULL;
  59618. PyObject *__pyx_t_9 = NULL;
  59619. PyObject *__pyx_t_10 = NULL;
  59620. PyObject *__pyx_t_11 = NULL;
  59621. PyObject *__pyx_t_12 = NULL;
  59622. __Pyx_RefNannySetupContext("share", 0);
  59623. /* "uvloop/pseudosock.pyx":121
  59624. *
  59625. * def share(self, process_id):
  59626. * sock = self._make_sock() # <<<<<<<<<<<<<<
  59627. * try:
  59628. * return sock.share(process_id)
  59629. */
  59630. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_PseudoSocket *)__pyx_v_self->__pyx_vtab)->_make_sock(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 121, __pyx_L1_error)
  59631. __Pyx_GOTREF(__pyx_t_1);
  59632. __pyx_v_sock = __pyx_t_1;
  59633. __pyx_t_1 = 0;
  59634. /* "uvloop/pseudosock.pyx":122
  59635. * def share(self, process_id):
  59636. * sock = self._make_sock()
  59637. * try: # <<<<<<<<<<<<<<
  59638. * return sock.share(process_id)
  59639. * finally:
  59640. */
  59641. /*try:*/ {
  59642. /* "uvloop/pseudosock.pyx":123
  59643. * sock = self._make_sock()
  59644. * try:
  59645. * return sock.share(process_id) # <<<<<<<<<<<<<<
  59646. * finally:
  59647. * sock.detach()
  59648. */
  59649. __Pyx_XDECREF(__pyx_r);
  59650. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_sock, __pyx_n_s_share); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 123, __pyx_L4_error)
  59651. __Pyx_GOTREF(__pyx_t_2);
  59652. __pyx_t_3 = NULL;
  59653. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
  59654. __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
  59655. if (likely(__pyx_t_3)) {
  59656. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  59657. __Pyx_INCREF(__pyx_t_3);
  59658. __Pyx_INCREF(function);
  59659. __Pyx_DECREF_SET(__pyx_t_2, function);
  59660. }
  59661. }
  59662. __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_process_id) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_process_id);
  59663. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  59664. if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 123, __pyx_L4_error)
  59665. __Pyx_GOTREF(__pyx_t_1);
  59666. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  59667. __pyx_r = __pyx_t_1;
  59668. __pyx_t_1 = 0;
  59669. goto __pyx_L3_return;
  59670. }
  59671. /* "uvloop/pseudosock.pyx":125
  59672. * return sock.share(process_id)
  59673. * finally:
  59674. * sock.detach() # <<<<<<<<<<<<<<
  59675. *
  59676. * def accept(self):
  59677. */
  59678. /*finally:*/ {
  59679. __pyx_L4_error:;
  59680. /*exception exit:*/{
  59681. __Pyx_PyThreadState_declare
  59682. __Pyx_PyThreadState_assign
  59683. __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0;
  59684. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  59685. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  59686. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  59687. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
  59688. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9) < 0)) __Pyx_ErrFetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
  59689. __Pyx_XGOTREF(__pyx_t_7);
  59690. __Pyx_XGOTREF(__pyx_t_8);
  59691. __Pyx_XGOTREF(__pyx_t_9);
  59692. __Pyx_XGOTREF(__pyx_t_10);
  59693. __Pyx_XGOTREF(__pyx_t_11);
  59694. __Pyx_XGOTREF(__pyx_t_12);
  59695. __pyx_t_4 = __pyx_lineno; __pyx_t_5 = __pyx_clineno; __pyx_t_6 = __pyx_filename;
  59696. {
  59697. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_sock, __pyx_n_s_detach); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 125, __pyx_L7_error)
  59698. __Pyx_GOTREF(__pyx_t_2);
  59699. __pyx_t_3 = NULL;
  59700. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
  59701. __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
  59702. if (likely(__pyx_t_3)) {
  59703. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  59704. __Pyx_INCREF(__pyx_t_3);
  59705. __Pyx_INCREF(function);
  59706. __Pyx_DECREF_SET(__pyx_t_2, function);
  59707. }
  59708. }
  59709. __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  59710. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  59711. if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 125, __pyx_L7_error)
  59712. __Pyx_GOTREF(__pyx_t_1);
  59713. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  59714. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  59715. }
  59716. if (PY_MAJOR_VERSION >= 3) {
  59717. __Pyx_XGIVEREF(__pyx_t_10);
  59718. __Pyx_XGIVEREF(__pyx_t_11);
  59719. __Pyx_XGIVEREF(__pyx_t_12);
  59720. __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
  59721. }
  59722. __Pyx_XGIVEREF(__pyx_t_7);
  59723. __Pyx_XGIVEREF(__pyx_t_8);
  59724. __Pyx_XGIVEREF(__pyx_t_9);
  59725. __Pyx_ErrRestore(__pyx_t_7, __pyx_t_8, __pyx_t_9);
  59726. __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0;
  59727. __pyx_lineno = __pyx_t_4; __pyx_clineno = __pyx_t_5; __pyx_filename = __pyx_t_6;
  59728. goto __pyx_L1_error;
  59729. __pyx_L7_error:;
  59730. if (PY_MAJOR_VERSION >= 3) {
  59731. __Pyx_XGIVEREF(__pyx_t_10);
  59732. __Pyx_XGIVEREF(__pyx_t_11);
  59733. __Pyx_XGIVEREF(__pyx_t_12);
  59734. __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
  59735. }
  59736. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  59737. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  59738. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  59739. __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0;
  59740. goto __pyx_L1_error;
  59741. }
  59742. __pyx_L3_return: {
  59743. __pyx_t_12 = __pyx_r;
  59744. __pyx_r = 0;
  59745. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_sock, __pyx_n_s_detach); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 125, __pyx_L1_error)
  59746. __Pyx_GOTREF(__pyx_t_2);
  59747. __pyx_t_3 = NULL;
  59748. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
  59749. __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
  59750. if (likely(__pyx_t_3)) {
  59751. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  59752. __Pyx_INCREF(__pyx_t_3);
  59753. __Pyx_INCREF(function);
  59754. __Pyx_DECREF_SET(__pyx_t_2, function);
  59755. }
  59756. }
  59757. __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  59758. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  59759. if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 125, __pyx_L1_error)
  59760. __Pyx_GOTREF(__pyx_t_1);
  59761. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  59762. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  59763. __pyx_r = __pyx_t_12;
  59764. __pyx_t_12 = 0;
  59765. goto __pyx_L0;
  59766. }
  59767. }
  59768. /* "uvloop/pseudosock.pyx":120
  59769. * sock.detach()
  59770. *
  59771. * def share(self, process_id): # <<<<<<<<<<<<<<
  59772. * sock = self._make_sock()
  59773. * try:
  59774. */
  59775. /* function exit code */
  59776. __pyx_L1_error:;
  59777. __Pyx_XDECREF(__pyx_t_1);
  59778. __Pyx_XDECREF(__pyx_t_2);
  59779. __Pyx_XDECREF(__pyx_t_3);
  59780. __Pyx_AddTraceback("uvloop.loop.PseudoSocket.share", __pyx_clineno, __pyx_lineno, __pyx_filename);
  59781. __pyx_r = NULL;
  59782. __pyx_L0:;
  59783. __Pyx_XDECREF(__pyx_v_sock);
  59784. __Pyx_XGIVEREF(__pyx_r);
  59785. __Pyx_RefNannyFinishContext();
  59786. return __pyx_r;
  59787. }
  59788. /* "uvloop/pseudosock.pyx":127
  59789. * sock.detach()
  59790. *
  59791. * def accept(self): # <<<<<<<<<<<<<<
  59792. * self._na('accept() method')
  59793. *
  59794. */
  59795. /* Python wrapper */
  59796. static PyObject *__pyx_pw_6uvloop_4loop_12PseudoSocket_27accept(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  59797. static char __pyx_doc_6uvloop_4loop_12PseudoSocket_26accept[] = "PseudoSocket.accept(self)";
  59798. static PyObject *__pyx_pw_6uvloop_4loop_12PseudoSocket_27accept(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  59799. PyObject *__pyx_r = 0;
  59800. __Pyx_RefNannyDeclarations
  59801. __Pyx_RefNannySetupContext("accept (wrapper)", 0);
  59802. __pyx_r = __pyx_pf_6uvloop_4loop_12PseudoSocket_26accept(((struct __pyx_obj_6uvloop_4loop_PseudoSocket *)__pyx_v_self));
  59803. /* function exit code */
  59804. __Pyx_RefNannyFinishContext();
  59805. return __pyx_r;
  59806. }
  59807. static PyObject *__pyx_pf_6uvloop_4loop_12PseudoSocket_26accept(struct __pyx_obj_6uvloop_4loop_PseudoSocket *__pyx_v_self) {
  59808. PyObject *__pyx_r = NULL;
  59809. __Pyx_RefNannyDeclarations
  59810. PyObject *__pyx_t_1 = NULL;
  59811. __Pyx_RefNannySetupContext("accept", 0);
  59812. /* "uvloop/pseudosock.pyx":128
  59813. *
  59814. * def accept(self):
  59815. * self._na('accept() method') # <<<<<<<<<<<<<<
  59816. *
  59817. * def connect(self, *args):
  59818. */
  59819. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_PseudoSocket *)__pyx_v_self->__pyx_vtab)->_na(__pyx_v_self, __pyx_kp_u_accept_method); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 128, __pyx_L1_error)
  59820. __Pyx_GOTREF(__pyx_t_1);
  59821. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  59822. /* "uvloop/pseudosock.pyx":127
  59823. * sock.detach()
  59824. *
  59825. * def accept(self): # <<<<<<<<<<<<<<
  59826. * self._na('accept() method')
  59827. *
  59828. */
  59829. /* function exit code */
  59830. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  59831. goto __pyx_L0;
  59832. __pyx_L1_error:;
  59833. __Pyx_XDECREF(__pyx_t_1);
  59834. __Pyx_AddTraceback("uvloop.loop.PseudoSocket.accept", __pyx_clineno, __pyx_lineno, __pyx_filename);
  59835. __pyx_r = NULL;
  59836. __pyx_L0:;
  59837. __Pyx_XGIVEREF(__pyx_r);
  59838. __Pyx_RefNannyFinishContext();
  59839. return __pyx_r;
  59840. }
  59841. /* "uvloop/pseudosock.pyx":130
  59842. * self._na('accept() method')
  59843. *
  59844. * def connect(self, *args): # <<<<<<<<<<<<<<
  59845. * self._na('connect() method')
  59846. *
  59847. */
  59848. /* Python wrapper */
  59849. static PyObject *__pyx_pw_6uvloop_4loop_12PseudoSocket_29connect(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  59850. static char __pyx_doc_6uvloop_4loop_12PseudoSocket_28connect[] = "PseudoSocket.connect(self, *args)";
  59851. static PyObject *__pyx_pw_6uvloop_4loop_12PseudoSocket_29connect(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  59852. CYTHON_UNUSED PyObject *__pyx_v_args = 0;
  59853. PyObject *__pyx_r = 0;
  59854. __Pyx_RefNannyDeclarations
  59855. __Pyx_RefNannySetupContext("connect (wrapper)", 0);
  59856. if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "connect", 0))) return NULL;
  59857. __Pyx_INCREF(__pyx_args);
  59858. __pyx_v_args = __pyx_args;
  59859. __pyx_r = __pyx_pf_6uvloop_4loop_12PseudoSocket_28connect(((struct __pyx_obj_6uvloop_4loop_PseudoSocket *)__pyx_v_self), __pyx_v_args);
  59860. /* function exit code */
  59861. __Pyx_XDECREF(__pyx_v_args);
  59862. __Pyx_RefNannyFinishContext();
  59863. return __pyx_r;
  59864. }
  59865. static PyObject *__pyx_pf_6uvloop_4loop_12PseudoSocket_28connect(struct __pyx_obj_6uvloop_4loop_PseudoSocket *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args) {
  59866. PyObject *__pyx_r = NULL;
  59867. __Pyx_RefNannyDeclarations
  59868. PyObject *__pyx_t_1 = NULL;
  59869. __Pyx_RefNannySetupContext("connect", 0);
  59870. /* "uvloop/pseudosock.pyx":131
  59871. *
  59872. * def connect(self, *args):
  59873. * self._na('connect() method') # <<<<<<<<<<<<<<
  59874. *
  59875. * def connect_ex(self, *args):
  59876. */
  59877. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_PseudoSocket *)__pyx_v_self->__pyx_vtab)->_na(__pyx_v_self, __pyx_kp_u_connect_method); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 131, __pyx_L1_error)
  59878. __Pyx_GOTREF(__pyx_t_1);
  59879. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  59880. /* "uvloop/pseudosock.pyx":130
  59881. * self._na('accept() method')
  59882. *
  59883. * def connect(self, *args): # <<<<<<<<<<<<<<
  59884. * self._na('connect() method')
  59885. *
  59886. */
  59887. /* function exit code */
  59888. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  59889. goto __pyx_L0;
  59890. __pyx_L1_error:;
  59891. __Pyx_XDECREF(__pyx_t_1);
  59892. __Pyx_AddTraceback("uvloop.loop.PseudoSocket.connect", __pyx_clineno, __pyx_lineno, __pyx_filename);
  59893. __pyx_r = NULL;
  59894. __pyx_L0:;
  59895. __Pyx_XGIVEREF(__pyx_r);
  59896. __Pyx_RefNannyFinishContext();
  59897. return __pyx_r;
  59898. }
  59899. /* "uvloop/pseudosock.pyx":133
  59900. * self._na('connect() method')
  59901. *
  59902. * def connect_ex(self, *args): # <<<<<<<<<<<<<<
  59903. * self._na('connect_ex() method')
  59904. *
  59905. */
  59906. /* Python wrapper */
  59907. static PyObject *__pyx_pw_6uvloop_4loop_12PseudoSocket_31connect_ex(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  59908. static char __pyx_doc_6uvloop_4loop_12PseudoSocket_30connect_ex[] = "PseudoSocket.connect_ex(self, *args)";
  59909. static PyObject *__pyx_pw_6uvloop_4loop_12PseudoSocket_31connect_ex(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  59910. CYTHON_UNUSED PyObject *__pyx_v_args = 0;
  59911. PyObject *__pyx_r = 0;
  59912. __Pyx_RefNannyDeclarations
  59913. __Pyx_RefNannySetupContext("connect_ex (wrapper)", 0);
  59914. if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "connect_ex", 0))) return NULL;
  59915. __Pyx_INCREF(__pyx_args);
  59916. __pyx_v_args = __pyx_args;
  59917. __pyx_r = __pyx_pf_6uvloop_4loop_12PseudoSocket_30connect_ex(((struct __pyx_obj_6uvloop_4loop_PseudoSocket *)__pyx_v_self), __pyx_v_args);
  59918. /* function exit code */
  59919. __Pyx_XDECREF(__pyx_v_args);
  59920. __Pyx_RefNannyFinishContext();
  59921. return __pyx_r;
  59922. }
  59923. static PyObject *__pyx_pf_6uvloop_4loop_12PseudoSocket_30connect_ex(struct __pyx_obj_6uvloop_4loop_PseudoSocket *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args) {
  59924. PyObject *__pyx_r = NULL;
  59925. __Pyx_RefNannyDeclarations
  59926. PyObject *__pyx_t_1 = NULL;
  59927. __Pyx_RefNannySetupContext("connect_ex", 0);
  59928. /* "uvloop/pseudosock.pyx":134
  59929. *
  59930. * def connect_ex(self, *args):
  59931. * self._na('connect_ex() method') # <<<<<<<<<<<<<<
  59932. *
  59933. * def bind(self, *args):
  59934. */
  59935. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_PseudoSocket *)__pyx_v_self->__pyx_vtab)->_na(__pyx_v_self, __pyx_kp_u_connect_ex_method); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 134, __pyx_L1_error)
  59936. __Pyx_GOTREF(__pyx_t_1);
  59937. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  59938. /* "uvloop/pseudosock.pyx":133
  59939. * self._na('connect() method')
  59940. *
  59941. * def connect_ex(self, *args): # <<<<<<<<<<<<<<
  59942. * self._na('connect_ex() method')
  59943. *
  59944. */
  59945. /* function exit code */
  59946. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  59947. goto __pyx_L0;
  59948. __pyx_L1_error:;
  59949. __Pyx_XDECREF(__pyx_t_1);
  59950. __Pyx_AddTraceback("uvloop.loop.PseudoSocket.connect_ex", __pyx_clineno, __pyx_lineno, __pyx_filename);
  59951. __pyx_r = NULL;
  59952. __pyx_L0:;
  59953. __Pyx_XGIVEREF(__pyx_r);
  59954. __Pyx_RefNannyFinishContext();
  59955. return __pyx_r;
  59956. }
  59957. /* "uvloop/pseudosock.pyx":136
  59958. * self._na('connect_ex() method')
  59959. *
  59960. * def bind(self, *args): # <<<<<<<<<<<<<<
  59961. * self._na('bind() method')
  59962. *
  59963. */
  59964. /* Python wrapper */
  59965. static PyObject *__pyx_pw_6uvloop_4loop_12PseudoSocket_33bind(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  59966. static char __pyx_doc_6uvloop_4loop_12PseudoSocket_32bind[] = "PseudoSocket.bind(self, *args)";
  59967. static PyObject *__pyx_pw_6uvloop_4loop_12PseudoSocket_33bind(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  59968. CYTHON_UNUSED PyObject *__pyx_v_args = 0;
  59969. PyObject *__pyx_r = 0;
  59970. __Pyx_RefNannyDeclarations
  59971. __Pyx_RefNannySetupContext("bind (wrapper)", 0);
  59972. if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "bind", 0))) return NULL;
  59973. __Pyx_INCREF(__pyx_args);
  59974. __pyx_v_args = __pyx_args;
  59975. __pyx_r = __pyx_pf_6uvloop_4loop_12PseudoSocket_32bind(((struct __pyx_obj_6uvloop_4loop_PseudoSocket *)__pyx_v_self), __pyx_v_args);
  59976. /* function exit code */
  59977. __Pyx_XDECREF(__pyx_v_args);
  59978. __Pyx_RefNannyFinishContext();
  59979. return __pyx_r;
  59980. }
  59981. static PyObject *__pyx_pf_6uvloop_4loop_12PseudoSocket_32bind(struct __pyx_obj_6uvloop_4loop_PseudoSocket *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args) {
  59982. PyObject *__pyx_r = NULL;
  59983. __Pyx_RefNannyDeclarations
  59984. PyObject *__pyx_t_1 = NULL;
  59985. __Pyx_RefNannySetupContext("bind", 0);
  59986. /* "uvloop/pseudosock.pyx":137
  59987. *
  59988. * def bind(self, *args):
  59989. * self._na('bind() method') # <<<<<<<<<<<<<<
  59990. *
  59991. * def listen(self, *args, **kwargs):
  59992. */
  59993. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_PseudoSocket *)__pyx_v_self->__pyx_vtab)->_na(__pyx_v_self, __pyx_kp_u_bind_method); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 137, __pyx_L1_error)
  59994. __Pyx_GOTREF(__pyx_t_1);
  59995. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  59996. /* "uvloop/pseudosock.pyx":136
  59997. * self._na('connect_ex() method')
  59998. *
  59999. * def bind(self, *args): # <<<<<<<<<<<<<<
  60000. * self._na('bind() method')
  60001. *
  60002. */
  60003. /* function exit code */
  60004. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  60005. goto __pyx_L0;
  60006. __pyx_L1_error:;
  60007. __Pyx_XDECREF(__pyx_t_1);
  60008. __Pyx_AddTraceback("uvloop.loop.PseudoSocket.bind", __pyx_clineno, __pyx_lineno, __pyx_filename);
  60009. __pyx_r = NULL;
  60010. __pyx_L0:;
  60011. __Pyx_XGIVEREF(__pyx_r);
  60012. __Pyx_RefNannyFinishContext();
  60013. return __pyx_r;
  60014. }
  60015. /* "uvloop/pseudosock.pyx":139
  60016. * self._na('bind() method')
  60017. *
  60018. * def listen(self, *args, **kwargs): # <<<<<<<<<<<<<<
  60019. * self._na('listen() method')
  60020. *
  60021. */
  60022. /* Python wrapper */
  60023. static PyObject *__pyx_pw_6uvloop_4loop_12PseudoSocket_35listen(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  60024. static char __pyx_doc_6uvloop_4loop_12PseudoSocket_34listen[] = "PseudoSocket.listen(self, *args, **kwargs)";
  60025. static PyObject *__pyx_pw_6uvloop_4loop_12PseudoSocket_35listen(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  60026. CYTHON_UNUSED PyObject *__pyx_v_args = 0;
  60027. CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
  60028. PyObject *__pyx_r = 0;
  60029. __Pyx_RefNannyDeclarations
  60030. __Pyx_RefNannySetupContext("listen (wrapper)", 0);
  60031. if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "listen", 1))) return NULL;
  60032. __Pyx_INCREF(__pyx_args);
  60033. __pyx_v_args = __pyx_args;
  60034. __pyx_r = __pyx_pf_6uvloop_4loop_12PseudoSocket_34listen(((struct __pyx_obj_6uvloop_4loop_PseudoSocket *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);
  60035. /* function exit code */
  60036. __Pyx_XDECREF(__pyx_v_args);
  60037. __Pyx_XDECREF(__pyx_v_kwargs);
  60038. __Pyx_RefNannyFinishContext();
  60039. return __pyx_r;
  60040. }
  60041. static PyObject *__pyx_pf_6uvloop_4loop_12PseudoSocket_34listen(struct __pyx_obj_6uvloop_4loop_PseudoSocket *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
  60042. PyObject *__pyx_r = NULL;
  60043. __Pyx_RefNannyDeclarations
  60044. PyObject *__pyx_t_1 = NULL;
  60045. __Pyx_RefNannySetupContext("listen", 0);
  60046. /* "uvloop/pseudosock.pyx":140
  60047. *
  60048. * def listen(self, *args, **kwargs):
  60049. * self._na('listen() method') # <<<<<<<<<<<<<<
  60050. *
  60051. * def makefile(self):
  60052. */
  60053. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_PseudoSocket *)__pyx_v_self->__pyx_vtab)->_na(__pyx_v_self, __pyx_kp_u_listen_method); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 140, __pyx_L1_error)
  60054. __Pyx_GOTREF(__pyx_t_1);
  60055. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  60056. /* "uvloop/pseudosock.pyx":139
  60057. * self._na('bind() method')
  60058. *
  60059. * def listen(self, *args, **kwargs): # <<<<<<<<<<<<<<
  60060. * self._na('listen() method')
  60061. *
  60062. */
  60063. /* function exit code */
  60064. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  60065. goto __pyx_L0;
  60066. __pyx_L1_error:;
  60067. __Pyx_XDECREF(__pyx_t_1);
  60068. __Pyx_AddTraceback("uvloop.loop.PseudoSocket.listen", __pyx_clineno, __pyx_lineno, __pyx_filename);
  60069. __pyx_r = NULL;
  60070. __pyx_L0:;
  60071. __Pyx_XGIVEREF(__pyx_r);
  60072. __Pyx_RefNannyFinishContext();
  60073. return __pyx_r;
  60074. }
  60075. /* "uvloop/pseudosock.pyx":142
  60076. * self._na('listen() method')
  60077. *
  60078. * def makefile(self): # <<<<<<<<<<<<<<
  60079. * self._na('makefile() method')
  60080. *
  60081. */
  60082. /* Python wrapper */
  60083. static PyObject *__pyx_pw_6uvloop_4loop_12PseudoSocket_37makefile(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  60084. static char __pyx_doc_6uvloop_4loop_12PseudoSocket_36makefile[] = "PseudoSocket.makefile(self)";
  60085. static PyObject *__pyx_pw_6uvloop_4loop_12PseudoSocket_37makefile(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  60086. PyObject *__pyx_r = 0;
  60087. __Pyx_RefNannyDeclarations
  60088. __Pyx_RefNannySetupContext("makefile (wrapper)", 0);
  60089. __pyx_r = __pyx_pf_6uvloop_4loop_12PseudoSocket_36makefile(((struct __pyx_obj_6uvloop_4loop_PseudoSocket *)__pyx_v_self));
  60090. /* function exit code */
  60091. __Pyx_RefNannyFinishContext();
  60092. return __pyx_r;
  60093. }
  60094. static PyObject *__pyx_pf_6uvloop_4loop_12PseudoSocket_36makefile(struct __pyx_obj_6uvloop_4loop_PseudoSocket *__pyx_v_self) {
  60095. PyObject *__pyx_r = NULL;
  60096. __Pyx_RefNannyDeclarations
  60097. PyObject *__pyx_t_1 = NULL;
  60098. __Pyx_RefNannySetupContext("makefile", 0);
  60099. /* "uvloop/pseudosock.pyx":143
  60100. *
  60101. * def makefile(self):
  60102. * self._na('makefile() method') # <<<<<<<<<<<<<<
  60103. *
  60104. * def sendfile(self, *args, **kwargs):
  60105. */
  60106. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_PseudoSocket *)__pyx_v_self->__pyx_vtab)->_na(__pyx_v_self, __pyx_kp_u_makefile_method); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 143, __pyx_L1_error)
  60107. __Pyx_GOTREF(__pyx_t_1);
  60108. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  60109. /* "uvloop/pseudosock.pyx":142
  60110. * self._na('listen() method')
  60111. *
  60112. * def makefile(self): # <<<<<<<<<<<<<<
  60113. * self._na('makefile() method')
  60114. *
  60115. */
  60116. /* function exit code */
  60117. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  60118. goto __pyx_L0;
  60119. __pyx_L1_error:;
  60120. __Pyx_XDECREF(__pyx_t_1);
  60121. __Pyx_AddTraceback("uvloop.loop.PseudoSocket.makefile", __pyx_clineno, __pyx_lineno, __pyx_filename);
  60122. __pyx_r = NULL;
  60123. __pyx_L0:;
  60124. __Pyx_XGIVEREF(__pyx_r);
  60125. __Pyx_RefNannyFinishContext();
  60126. return __pyx_r;
  60127. }
  60128. /* "uvloop/pseudosock.pyx":145
  60129. * self._na('makefile() method')
  60130. *
  60131. * def sendfile(self, *args, **kwargs): # <<<<<<<<<<<<<<
  60132. * self._na('sendfile() method')
  60133. *
  60134. */
  60135. /* Python wrapper */
  60136. static PyObject *__pyx_pw_6uvloop_4loop_12PseudoSocket_39sendfile(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  60137. static char __pyx_doc_6uvloop_4loop_12PseudoSocket_38sendfile[] = "PseudoSocket.sendfile(self, *args, **kwargs)";
  60138. static PyObject *__pyx_pw_6uvloop_4loop_12PseudoSocket_39sendfile(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  60139. CYTHON_UNUSED PyObject *__pyx_v_args = 0;
  60140. CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
  60141. PyObject *__pyx_r = 0;
  60142. __Pyx_RefNannyDeclarations
  60143. __Pyx_RefNannySetupContext("sendfile (wrapper)", 0);
  60144. if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "sendfile", 1))) return NULL;
  60145. __Pyx_INCREF(__pyx_args);
  60146. __pyx_v_args = __pyx_args;
  60147. __pyx_r = __pyx_pf_6uvloop_4loop_12PseudoSocket_38sendfile(((struct __pyx_obj_6uvloop_4loop_PseudoSocket *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);
  60148. /* function exit code */
  60149. __Pyx_XDECREF(__pyx_v_args);
  60150. __Pyx_XDECREF(__pyx_v_kwargs);
  60151. __Pyx_RefNannyFinishContext();
  60152. return __pyx_r;
  60153. }
  60154. static PyObject *__pyx_pf_6uvloop_4loop_12PseudoSocket_38sendfile(struct __pyx_obj_6uvloop_4loop_PseudoSocket *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
  60155. PyObject *__pyx_r = NULL;
  60156. __Pyx_RefNannyDeclarations
  60157. PyObject *__pyx_t_1 = NULL;
  60158. __Pyx_RefNannySetupContext("sendfile", 0);
  60159. /* "uvloop/pseudosock.pyx":146
  60160. *
  60161. * def sendfile(self, *args, **kwargs):
  60162. * self._na('sendfile() method') # <<<<<<<<<<<<<<
  60163. *
  60164. * def close(self):
  60165. */
  60166. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_PseudoSocket *)__pyx_v_self->__pyx_vtab)->_na(__pyx_v_self, __pyx_kp_u_sendfile_method); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 146, __pyx_L1_error)
  60167. __Pyx_GOTREF(__pyx_t_1);
  60168. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  60169. /* "uvloop/pseudosock.pyx":145
  60170. * self._na('makefile() method')
  60171. *
  60172. * def sendfile(self, *args, **kwargs): # <<<<<<<<<<<<<<
  60173. * self._na('sendfile() method')
  60174. *
  60175. */
  60176. /* function exit code */
  60177. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  60178. goto __pyx_L0;
  60179. __pyx_L1_error:;
  60180. __Pyx_XDECREF(__pyx_t_1);
  60181. __Pyx_AddTraceback("uvloop.loop.PseudoSocket.sendfile", __pyx_clineno, __pyx_lineno, __pyx_filename);
  60182. __pyx_r = NULL;
  60183. __pyx_L0:;
  60184. __Pyx_XGIVEREF(__pyx_r);
  60185. __Pyx_RefNannyFinishContext();
  60186. return __pyx_r;
  60187. }
  60188. /* "uvloop/pseudosock.pyx":148
  60189. * self._na('sendfile() method')
  60190. *
  60191. * def close(self): # <<<<<<<<<<<<<<
  60192. * self._na('close() method')
  60193. *
  60194. */
  60195. /* Python wrapper */
  60196. static PyObject *__pyx_pw_6uvloop_4loop_12PseudoSocket_41close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  60197. static char __pyx_doc_6uvloop_4loop_12PseudoSocket_40close[] = "PseudoSocket.close(self)";
  60198. static PyObject *__pyx_pw_6uvloop_4loop_12PseudoSocket_41close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  60199. PyObject *__pyx_r = 0;
  60200. __Pyx_RefNannyDeclarations
  60201. __Pyx_RefNannySetupContext("close (wrapper)", 0);
  60202. __pyx_r = __pyx_pf_6uvloop_4loop_12PseudoSocket_40close(((struct __pyx_obj_6uvloop_4loop_PseudoSocket *)__pyx_v_self));
  60203. /* function exit code */
  60204. __Pyx_RefNannyFinishContext();
  60205. return __pyx_r;
  60206. }
  60207. static PyObject *__pyx_pf_6uvloop_4loop_12PseudoSocket_40close(struct __pyx_obj_6uvloop_4loop_PseudoSocket *__pyx_v_self) {
  60208. PyObject *__pyx_r = NULL;
  60209. __Pyx_RefNannyDeclarations
  60210. PyObject *__pyx_t_1 = NULL;
  60211. __Pyx_RefNannySetupContext("close", 0);
  60212. /* "uvloop/pseudosock.pyx":149
  60213. *
  60214. * def close(self):
  60215. * self._na('close() method') # <<<<<<<<<<<<<<
  60216. *
  60217. * def detach(self):
  60218. */
  60219. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_PseudoSocket *)__pyx_v_self->__pyx_vtab)->_na(__pyx_v_self, __pyx_kp_u_close_method); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 149, __pyx_L1_error)
  60220. __Pyx_GOTREF(__pyx_t_1);
  60221. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  60222. /* "uvloop/pseudosock.pyx":148
  60223. * self._na('sendfile() method')
  60224. *
  60225. * def close(self): # <<<<<<<<<<<<<<
  60226. * self._na('close() method')
  60227. *
  60228. */
  60229. /* function exit code */
  60230. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  60231. goto __pyx_L0;
  60232. __pyx_L1_error:;
  60233. __Pyx_XDECREF(__pyx_t_1);
  60234. __Pyx_AddTraceback("uvloop.loop.PseudoSocket.close", __pyx_clineno, __pyx_lineno, __pyx_filename);
  60235. __pyx_r = NULL;
  60236. __pyx_L0:;
  60237. __Pyx_XGIVEREF(__pyx_r);
  60238. __Pyx_RefNannyFinishContext();
  60239. return __pyx_r;
  60240. }
  60241. /* "uvloop/pseudosock.pyx":151
  60242. * self._na('close() method')
  60243. *
  60244. * def detach(self): # <<<<<<<<<<<<<<
  60245. * self._na('detach() method')
  60246. *
  60247. */
  60248. /* Python wrapper */
  60249. static PyObject *__pyx_pw_6uvloop_4loop_12PseudoSocket_43detach(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  60250. static char __pyx_doc_6uvloop_4loop_12PseudoSocket_42detach[] = "PseudoSocket.detach(self)";
  60251. static PyObject *__pyx_pw_6uvloop_4loop_12PseudoSocket_43detach(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  60252. PyObject *__pyx_r = 0;
  60253. __Pyx_RefNannyDeclarations
  60254. __Pyx_RefNannySetupContext("detach (wrapper)", 0);
  60255. __pyx_r = __pyx_pf_6uvloop_4loop_12PseudoSocket_42detach(((struct __pyx_obj_6uvloop_4loop_PseudoSocket *)__pyx_v_self));
  60256. /* function exit code */
  60257. __Pyx_RefNannyFinishContext();
  60258. return __pyx_r;
  60259. }
  60260. static PyObject *__pyx_pf_6uvloop_4loop_12PseudoSocket_42detach(struct __pyx_obj_6uvloop_4loop_PseudoSocket *__pyx_v_self) {
  60261. PyObject *__pyx_r = NULL;
  60262. __Pyx_RefNannyDeclarations
  60263. PyObject *__pyx_t_1 = NULL;
  60264. __Pyx_RefNannySetupContext("detach", 0);
  60265. /* "uvloop/pseudosock.pyx":152
  60266. *
  60267. * def detach(self):
  60268. * self._na('detach() method') # <<<<<<<<<<<<<<
  60269. *
  60270. * def shutdown(self, *args):
  60271. */
  60272. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_PseudoSocket *)__pyx_v_self->__pyx_vtab)->_na(__pyx_v_self, __pyx_kp_u_detach_method); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 152, __pyx_L1_error)
  60273. __Pyx_GOTREF(__pyx_t_1);
  60274. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  60275. /* "uvloop/pseudosock.pyx":151
  60276. * self._na('close() method')
  60277. *
  60278. * def detach(self): # <<<<<<<<<<<<<<
  60279. * self._na('detach() method')
  60280. *
  60281. */
  60282. /* function exit code */
  60283. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  60284. goto __pyx_L0;
  60285. __pyx_L1_error:;
  60286. __Pyx_XDECREF(__pyx_t_1);
  60287. __Pyx_AddTraceback("uvloop.loop.PseudoSocket.detach", __pyx_clineno, __pyx_lineno, __pyx_filename);
  60288. __pyx_r = NULL;
  60289. __pyx_L0:;
  60290. __Pyx_XGIVEREF(__pyx_r);
  60291. __Pyx_RefNannyFinishContext();
  60292. return __pyx_r;
  60293. }
  60294. /* "uvloop/pseudosock.pyx":154
  60295. * self._na('detach() method')
  60296. *
  60297. * def shutdown(self, *args): # <<<<<<<<<<<<<<
  60298. * self._na('shutdown() method')
  60299. *
  60300. */
  60301. /* Python wrapper */
  60302. static PyObject *__pyx_pw_6uvloop_4loop_12PseudoSocket_45shutdown(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  60303. static char __pyx_doc_6uvloop_4loop_12PseudoSocket_44shutdown[] = "PseudoSocket.shutdown(self, *args)";
  60304. static PyObject *__pyx_pw_6uvloop_4loop_12PseudoSocket_45shutdown(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  60305. CYTHON_UNUSED PyObject *__pyx_v_args = 0;
  60306. PyObject *__pyx_r = 0;
  60307. __Pyx_RefNannyDeclarations
  60308. __Pyx_RefNannySetupContext("shutdown (wrapper)", 0);
  60309. if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "shutdown", 0))) return NULL;
  60310. __Pyx_INCREF(__pyx_args);
  60311. __pyx_v_args = __pyx_args;
  60312. __pyx_r = __pyx_pf_6uvloop_4loop_12PseudoSocket_44shutdown(((struct __pyx_obj_6uvloop_4loop_PseudoSocket *)__pyx_v_self), __pyx_v_args);
  60313. /* function exit code */
  60314. __Pyx_XDECREF(__pyx_v_args);
  60315. __Pyx_RefNannyFinishContext();
  60316. return __pyx_r;
  60317. }
  60318. static PyObject *__pyx_pf_6uvloop_4loop_12PseudoSocket_44shutdown(struct __pyx_obj_6uvloop_4loop_PseudoSocket *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args) {
  60319. PyObject *__pyx_r = NULL;
  60320. __Pyx_RefNannyDeclarations
  60321. PyObject *__pyx_t_1 = NULL;
  60322. __Pyx_RefNannySetupContext("shutdown", 0);
  60323. /* "uvloop/pseudosock.pyx":155
  60324. *
  60325. * def shutdown(self, *args):
  60326. * self._na('shutdown() method') # <<<<<<<<<<<<<<
  60327. *
  60328. * def sendmsg_afalg(self, *args, **kwargs):
  60329. */
  60330. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_PseudoSocket *)__pyx_v_self->__pyx_vtab)->_na(__pyx_v_self, __pyx_kp_u_shutdown_method); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 155, __pyx_L1_error)
  60331. __Pyx_GOTREF(__pyx_t_1);
  60332. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  60333. /* "uvloop/pseudosock.pyx":154
  60334. * self._na('detach() method')
  60335. *
  60336. * def shutdown(self, *args): # <<<<<<<<<<<<<<
  60337. * self._na('shutdown() method')
  60338. *
  60339. */
  60340. /* function exit code */
  60341. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  60342. goto __pyx_L0;
  60343. __pyx_L1_error:;
  60344. __Pyx_XDECREF(__pyx_t_1);
  60345. __Pyx_AddTraceback("uvloop.loop.PseudoSocket.shutdown", __pyx_clineno, __pyx_lineno, __pyx_filename);
  60346. __pyx_r = NULL;
  60347. __pyx_L0:;
  60348. __Pyx_XGIVEREF(__pyx_r);
  60349. __Pyx_RefNannyFinishContext();
  60350. return __pyx_r;
  60351. }
  60352. /* "uvloop/pseudosock.pyx":157
  60353. * self._na('shutdown() method')
  60354. *
  60355. * def sendmsg_afalg(self, *args, **kwargs): # <<<<<<<<<<<<<<
  60356. * self._na('sendmsg_afalg() method')
  60357. *
  60358. */
  60359. /* Python wrapper */
  60360. static PyObject *__pyx_pw_6uvloop_4loop_12PseudoSocket_47sendmsg_afalg(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  60361. static char __pyx_doc_6uvloop_4loop_12PseudoSocket_46sendmsg_afalg[] = "PseudoSocket.sendmsg_afalg(self, *args, **kwargs)";
  60362. static PyObject *__pyx_pw_6uvloop_4loop_12PseudoSocket_47sendmsg_afalg(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  60363. CYTHON_UNUSED PyObject *__pyx_v_args = 0;
  60364. CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
  60365. PyObject *__pyx_r = 0;
  60366. __Pyx_RefNannyDeclarations
  60367. __Pyx_RefNannySetupContext("sendmsg_afalg (wrapper)", 0);
  60368. if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "sendmsg_afalg", 1))) return NULL;
  60369. __Pyx_INCREF(__pyx_args);
  60370. __pyx_v_args = __pyx_args;
  60371. __pyx_r = __pyx_pf_6uvloop_4loop_12PseudoSocket_46sendmsg_afalg(((struct __pyx_obj_6uvloop_4loop_PseudoSocket *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);
  60372. /* function exit code */
  60373. __Pyx_XDECREF(__pyx_v_args);
  60374. __Pyx_XDECREF(__pyx_v_kwargs);
  60375. __Pyx_RefNannyFinishContext();
  60376. return __pyx_r;
  60377. }
  60378. static PyObject *__pyx_pf_6uvloop_4loop_12PseudoSocket_46sendmsg_afalg(struct __pyx_obj_6uvloop_4loop_PseudoSocket *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
  60379. PyObject *__pyx_r = NULL;
  60380. __Pyx_RefNannyDeclarations
  60381. PyObject *__pyx_t_1 = NULL;
  60382. __Pyx_RefNannySetupContext("sendmsg_afalg", 0);
  60383. /* "uvloop/pseudosock.pyx":158
  60384. *
  60385. * def sendmsg_afalg(self, *args, **kwargs):
  60386. * self._na('sendmsg_afalg() method') # <<<<<<<<<<<<<<
  60387. *
  60388. * def sendmsg(self):
  60389. */
  60390. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_PseudoSocket *)__pyx_v_self->__pyx_vtab)->_na(__pyx_v_self, __pyx_kp_u_sendmsg_afalg_method); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 158, __pyx_L1_error)
  60391. __Pyx_GOTREF(__pyx_t_1);
  60392. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  60393. /* "uvloop/pseudosock.pyx":157
  60394. * self._na('shutdown() method')
  60395. *
  60396. * def sendmsg_afalg(self, *args, **kwargs): # <<<<<<<<<<<<<<
  60397. * self._na('sendmsg_afalg() method')
  60398. *
  60399. */
  60400. /* function exit code */
  60401. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  60402. goto __pyx_L0;
  60403. __pyx_L1_error:;
  60404. __Pyx_XDECREF(__pyx_t_1);
  60405. __Pyx_AddTraceback("uvloop.loop.PseudoSocket.sendmsg_afalg", __pyx_clineno, __pyx_lineno, __pyx_filename);
  60406. __pyx_r = NULL;
  60407. __pyx_L0:;
  60408. __Pyx_XGIVEREF(__pyx_r);
  60409. __Pyx_RefNannyFinishContext();
  60410. return __pyx_r;
  60411. }
  60412. /* "uvloop/pseudosock.pyx":160
  60413. * self._na('sendmsg_afalg() method')
  60414. *
  60415. * def sendmsg(self): # <<<<<<<<<<<<<<
  60416. * self._na('sendmsg() method')
  60417. *
  60418. */
  60419. /* Python wrapper */
  60420. static PyObject *__pyx_pw_6uvloop_4loop_12PseudoSocket_49sendmsg(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  60421. static char __pyx_doc_6uvloop_4loop_12PseudoSocket_48sendmsg[] = "PseudoSocket.sendmsg(self)";
  60422. static PyObject *__pyx_pw_6uvloop_4loop_12PseudoSocket_49sendmsg(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  60423. PyObject *__pyx_r = 0;
  60424. __Pyx_RefNannyDeclarations
  60425. __Pyx_RefNannySetupContext("sendmsg (wrapper)", 0);
  60426. __pyx_r = __pyx_pf_6uvloop_4loop_12PseudoSocket_48sendmsg(((struct __pyx_obj_6uvloop_4loop_PseudoSocket *)__pyx_v_self));
  60427. /* function exit code */
  60428. __Pyx_RefNannyFinishContext();
  60429. return __pyx_r;
  60430. }
  60431. static PyObject *__pyx_pf_6uvloop_4loop_12PseudoSocket_48sendmsg(struct __pyx_obj_6uvloop_4loop_PseudoSocket *__pyx_v_self) {
  60432. PyObject *__pyx_r = NULL;
  60433. __Pyx_RefNannyDeclarations
  60434. PyObject *__pyx_t_1 = NULL;
  60435. __Pyx_RefNannySetupContext("sendmsg", 0);
  60436. /* "uvloop/pseudosock.pyx":161
  60437. *
  60438. * def sendmsg(self):
  60439. * self._na('sendmsg() method') # <<<<<<<<<<<<<<
  60440. *
  60441. * def sendto(self, *args, **kwargs):
  60442. */
  60443. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_PseudoSocket *)__pyx_v_self->__pyx_vtab)->_na(__pyx_v_self, __pyx_kp_u_sendmsg_method); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 161, __pyx_L1_error)
  60444. __Pyx_GOTREF(__pyx_t_1);
  60445. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  60446. /* "uvloop/pseudosock.pyx":160
  60447. * self._na('sendmsg_afalg() method')
  60448. *
  60449. * def sendmsg(self): # <<<<<<<<<<<<<<
  60450. * self._na('sendmsg() method')
  60451. *
  60452. */
  60453. /* function exit code */
  60454. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  60455. goto __pyx_L0;
  60456. __pyx_L1_error:;
  60457. __Pyx_XDECREF(__pyx_t_1);
  60458. __Pyx_AddTraceback("uvloop.loop.PseudoSocket.sendmsg", __pyx_clineno, __pyx_lineno, __pyx_filename);
  60459. __pyx_r = NULL;
  60460. __pyx_L0:;
  60461. __Pyx_XGIVEREF(__pyx_r);
  60462. __Pyx_RefNannyFinishContext();
  60463. return __pyx_r;
  60464. }
  60465. /* "uvloop/pseudosock.pyx":163
  60466. * self._na('sendmsg() method')
  60467. *
  60468. * def sendto(self, *args, **kwargs): # <<<<<<<<<<<<<<
  60469. * self._na('sendto() method')
  60470. *
  60471. */
  60472. /* Python wrapper */
  60473. static PyObject *__pyx_pw_6uvloop_4loop_12PseudoSocket_51sendto(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  60474. static char __pyx_doc_6uvloop_4loop_12PseudoSocket_50sendto[] = "PseudoSocket.sendto(self, *args, **kwargs)";
  60475. static PyObject *__pyx_pw_6uvloop_4loop_12PseudoSocket_51sendto(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  60476. CYTHON_UNUSED PyObject *__pyx_v_args = 0;
  60477. CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
  60478. PyObject *__pyx_r = 0;
  60479. __Pyx_RefNannyDeclarations
  60480. __Pyx_RefNannySetupContext("sendto (wrapper)", 0);
  60481. if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "sendto", 1))) return NULL;
  60482. __Pyx_INCREF(__pyx_args);
  60483. __pyx_v_args = __pyx_args;
  60484. __pyx_r = __pyx_pf_6uvloop_4loop_12PseudoSocket_50sendto(((struct __pyx_obj_6uvloop_4loop_PseudoSocket *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);
  60485. /* function exit code */
  60486. __Pyx_XDECREF(__pyx_v_args);
  60487. __Pyx_XDECREF(__pyx_v_kwargs);
  60488. __Pyx_RefNannyFinishContext();
  60489. return __pyx_r;
  60490. }
  60491. static PyObject *__pyx_pf_6uvloop_4loop_12PseudoSocket_50sendto(struct __pyx_obj_6uvloop_4loop_PseudoSocket *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
  60492. PyObject *__pyx_r = NULL;
  60493. __Pyx_RefNannyDeclarations
  60494. PyObject *__pyx_t_1 = NULL;
  60495. __Pyx_RefNannySetupContext("sendto", 0);
  60496. /* "uvloop/pseudosock.pyx":164
  60497. *
  60498. * def sendto(self, *args, **kwargs):
  60499. * self._na('sendto() method') # <<<<<<<<<<<<<<
  60500. *
  60501. * def send(self, *args, **kwargs):
  60502. */
  60503. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_PseudoSocket *)__pyx_v_self->__pyx_vtab)->_na(__pyx_v_self, __pyx_kp_u_sendto_method); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 164, __pyx_L1_error)
  60504. __Pyx_GOTREF(__pyx_t_1);
  60505. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  60506. /* "uvloop/pseudosock.pyx":163
  60507. * self._na('sendmsg() method')
  60508. *
  60509. * def sendto(self, *args, **kwargs): # <<<<<<<<<<<<<<
  60510. * self._na('sendto() method')
  60511. *
  60512. */
  60513. /* function exit code */
  60514. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  60515. goto __pyx_L0;
  60516. __pyx_L1_error:;
  60517. __Pyx_XDECREF(__pyx_t_1);
  60518. __Pyx_AddTraceback("uvloop.loop.PseudoSocket.sendto", __pyx_clineno, __pyx_lineno, __pyx_filename);
  60519. __pyx_r = NULL;
  60520. __pyx_L0:;
  60521. __Pyx_XGIVEREF(__pyx_r);
  60522. __Pyx_RefNannyFinishContext();
  60523. return __pyx_r;
  60524. }
  60525. /* "uvloop/pseudosock.pyx":166
  60526. * self._na('sendto() method')
  60527. *
  60528. * def send(self, *args, **kwargs): # <<<<<<<<<<<<<<
  60529. * self._na('send() method')
  60530. *
  60531. */
  60532. /* Python wrapper */
  60533. static PyObject *__pyx_pw_6uvloop_4loop_12PseudoSocket_53send(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  60534. static char __pyx_doc_6uvloop_4loop_12PseudoSocket_52send[] = "PseudoSocket.send(self, *args, **kwargs)";
  60535. static PyObject *__pyx_pw_6uvloop_4loop_12PseudoSocket_53send(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  60536. CYTHON_UNUSED PyObject *__pyx_v_args = 0;
  60537. CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
  60538. PyObject *__pyx_r = 0;
  60539. __Pyx_RefNannyDeclarations
  60540. __Pyx_RefNannySetupContext("send (wrapper)", 0);
  60541. if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "send", 1))) return NULL;
  60542. __Pyx_INCREF(__pyx_args);
  60543. __pyx_v_args = __pyx_args;
  60544. __pyx_r = __pyx_pf_6uvloop_4loop_12PseudoSocket_52send(((struct __pyx_obj_6uvloop_4loop_PseudoSocket *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);
  60545. /* function exit code */
  60546. __Pyx_XDECREF(__pyx_v_args);
  60547. __Pyx_XDECREF(__pyx_v_kwargs);
  60548. __Pyx_RefNannyFinishContext();
  60549. return __pyx_r;
  60550. }
  60551. static PyObject *__pyx_pf_6uvloop_4loop_12PseudoSocket_52send(struct __pyx_obj_6uvloop_4loop_PseudoSocket *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
  60552. PyObject *__pyx_r = NULL;
  60553. __Pyx_RefNannyDeclarations
  60554. PyObject *__pyx_t_1 = NULL;
  60555. __Pyx_RefNannySetupContext("send", 0);
  60556. /* "uvloop/pseudosock.pyx":167
  60557. *
  60558. * def send(self, *args, **kwargs):
  60559. * self._na('send() method') # <<<<<<<<<<<<<<
  60560. *
  60561. * def sendall(self, *args, **kwargs):
  60562. */
  60563. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_PseudoSocket *)__pyx_v_self->__pyx_vtab)->_na(__pyx_v_self, __pyx_kp_u_send_method); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 167, __pyx_L1_error)
  60564. __Pyx_GOTREF(__pyx_t_1);
  60565. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  60566. /* "uvloop/pseudosock.pyx":166
  60567. * self._na('sendto() method')
  60568. *
  60569. * def send(self, *args, **kwargs): # <<<<<<<<<<<<<<
  60570. * self._na('send() method')
  60571. *
  60572. */
  60573. /* function exit code */
  60574. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  60575. goto __pyx_L0;
  60576. __pyx_L1_error:;
  60577. __Pyx_XDECREF(__pyx_t_1);
  60578. __Pyx_AddTraceback("uvloop.loop.PseudoSocket.send", __pyx_clineno, __pyx_lineno, __pyx_filename);
  60579. __pyx_r = NULL;
  60580. __pyx_L0:;
  60581. __Pyx_XGIVEREF(__pyx_r);
  60582. __Pyx_RefNannyFinishContext();
  60583. return __pyx_r;
  60584. }
  60585. /* "uvloop/pseudosock.pyx":169
  60586. * self._na('send() method')
  60587. *
  60588. * def sendall(self, *args, **kwargs): # <<<<<<<<<<<<<<
  60589. * self._na('sendall() method')
  60590. *
  60591. */
  60592. /* Python wrapper */
  60593. static PyObject *__pyx_pw_6uvloop_4loop_12PseudoSocket_55sendall(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  60594. static char __pyx_doc_6uvloop_4loop_12PseudoSocket_54sendall[] = "PseudoSocket.sendall(self, *args, **kwargs)";
  60595. static PyObject *__pyx_pw_6uvloop_4loop_12PseudoSocket_55sendall(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  60596. CYTHON_UNUSED PyObject *__pyx_v_args = 0;
  60597. CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
  60598. PyObject *__pyx_r = 0;
  60599. __Pyx_RefNannyDeclarations
  60600. __Pyx_RefNannySetupContext("sendall (wrapper)", 0);
  60601. if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "sendall", 1))) return NULL;
  60602. __Pyx_INCREF(__pyx_args);
  60603. __pyx_v_args = __pyx_args;
  60604. __pyx_r = __pyx_pf_6uvloop_4loop_12PseudoSocket_54sendall(((struct __pyx_obj_6uvloop_4loop_PseudoSocket *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);
  60605. /* function exit code */
  60606. __Pyx_XDECREF(__pyx_v_args);
  60607. __Pyx_XDECREF(__pyx_v_kwargs);
  60608. __Pyx_RefNannyFinishContext();
  60609. return __pyx_r;
  60610. }
  60611. static PyObject *__pyx_pf_6uvloop_4loop_12PseudoSocket_54sendall(struct __pyx_obj_6uvloop_4loop_PseudoSocket *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
  60612. PyObject *__pyx_r = NULL;
  60613. __Pyx_RefNannyDeclarations
  60614. PyObject *__pyx_t_1 = NULL;
  60615. __Pyx_RefNannySetupContext("sendall", 0);
  60616. /* "uvloop/pseudosock.pyx":170
  60617. *
  60618. * def sendall(self, *args, **kwargs):
  60619. * self._na('sendall() method') # <<<<<<<<<<<<<<
  60620. *
  60621. * def recv_into(self, *args, **kwargs):
  60622. */
  60623. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_PseudoSocket *)__pyx_v_self->__pyx_vtab)->_na(__pyx_v_self, __pyx_kp_u_sendall_method); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 170, __pyx_L1_error)
  60624. __Pyx_GOTREF(__pyx_t_1);
  60625. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  60626. /* "uvloop/pseudosock.pyx":169
  60627. * self._na('send() method')
  60628. *
  60629. * def sendall(self, *args, **kwargs): # <<<<<<<<<<<<<<
  60630. * self._na('sendall() method')
  60631. *
  60632. */
  60633. /* function exit code */
  60634. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  60635. goto __pyx_L0;
  60636. __pyx_L1_error:;
  60637. __Pyx_XDECREF(__pyx_t_1);
  60638. __Pyx_AddTraceback("uvloop.loop.PseudoSocket.sendall", __pyx_clineno, __pyx_lineno, __pyx_filename);
  60639. __pyx_r = NULL;
  60640. __pyx_L0:;
  60641. __Pyx_XGIVEREF(__pyx_r);
  60642. __Pyx_RefNannyFinishContext();
  60643. return __pyx_r;
  60644. }
  60645. /* "uvloop/pseudosock.pyx":172
  60646. * self._na('sendall() method')
  60647. *
  60648. * def recv_into(self, *args, **kwargs): # <<<<<<<<<<<<<<
  60649. * self._na('recv_into() method')
  60650. *
  60651. */
  60652. /* Python wrapper */
  60653. static PyObject *__pyx_pw_6uvloop_4loop_12PseudoSocket_57recv_into(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  60654. static char __pyx_doc_6uvloop_4loop_12PseudoSocket_56recv_into[] = "PseudoSocket.recv_into(self, *args, **kwargs)";
  60655. static PyObject *__pyx_pw_6uvloop_4loop_12PseudoSocket_57recv_into(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  60656. CYTHON_UNUSED PyObject *__pyx_v_args = 0;
  60657. CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
  60658. PyObject *__pyx_r = 0;
  60659. __Pyx_RefNannyDeclarations
  60660. __Pyx_RefNannySetupContext("recv_into (wrapper)", 0);
  60661. if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "recv_into", 1))) return NULL;
  60662. __Pyx_INCREF(__pyx_args);
  60663. __pyx_v_args = __pyx_args;
  60664. __pyx_r = __pyx_pf_6uvloop_4loop_12PseudoSocket_56recv_into(((struct __pyx_obj_6uvloop_4loop_PseudoSocket *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);
  60665. /* function exit code */
  60666. __Pyx_XDECREF(__pyx_v_args);
  60667. __Pyx_XDECREF(__pyx_v_kwargs);
  60668. __Pyx_RefNannyFinishContext();
  60669. return __pyx_r;
  60670. }
  60671. static PyObject *__pyx_pf_6uvloop_4loop_12PseudoSocket_56recv_into(struct __pyx_obj_6uvloop_4loop_PseudoSocket *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
  60672. PyObject *__pyx_r = NULL;
  60673. __Pyx_RefNannyDeclarations
  60674. PyObject *__pyx_t_1 = NULL;
  60675. __Pyx_RefNannySetupContext("recv_into", 0);
  60676. /* "uvloop/pseudosock.pyx":173
  60677. *
  60678. * def recv_into(self, *args, **kwargs):
  60679. * self._na('recv_into() method') # <<<<<<<<<<<<<<
  60680. *
  60681. * def recvfrom_into(self, *args, **kwargs):
  60682. */
  60683. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_PseudoSocket *)__pyx_v_self->__pyx_vtab)->_na(__pyx_v_self, __pyx_kp_u_recv_into_method); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 173, __pyx_L1_error)
  60684. __Pyx_GOTREF(__pyx_t_1);
  60685. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  60686. /* "uvloop/pseudosock.pyx":172
  60687. * self._na('sendall() method')
  60688. *
  60689. * def recv_into(self, *args, **kwargs): # <<<<<<<<<<<<<<
  60690. * self._na('recv_into() method')
  60691. *
  60692. */
  60693. /* function exit code */
  60694. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  60695. goto __pyx_L0;
  60696. __pyx_L1_error:;
  60697. __Pyx_XDECREF(__pyx_t_1);
  60698. __Pyx_AddTraceback("uvloop.loop.PseudoSocket.recv_into", __pyx_clineno, __pyx_lineno, __pyx_filename);
  60699. __pyx_r = NULL;
  60700. __pyx_L0:;
  60701. __Pyx_XGIVEREF(__pyx_r);
  60702. __Pyx_RefNannyFinishContext();
  60703. return __pyx_r;
  60704. }
  60705. /* "uvloop/pseudosock.pyx":175
  60706. * self._na('recv_into() method')
  60707. *
  60708. * def recvfrom_into(self, *args, **kwargs): # <<<<<<<<<<<<<<
  60709. * self._na('recvfrom_into() method')
  60710. *
  60711. */
  60712. /* Python wrapper */
  60713. static PyObject *__pyx_pw_6uvloop_4loop_12PseudoSocket_59recvfrom_into(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  60714. static char __pyx_doc_6uvloop_4loop_12PseudoSocket_58recvfrom_into[] = "PseudoSocket.recvfrom_into(self, *args, **kwargs)";
  60715. static PyObject *__pyx_pw_6uvloop_4loop_12PseudoSocket_59recvfrom_into(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  60716. CYTHON_UNUSED PyObject *__pyx_v_args = 0;
  60717. CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
  60718. PyObject *__pyx_r = 0;
  60719. __Pyx_RefNannyDeclarations
  60720. __Pyx_RefNannySetupContext("recvfrom_into (wrapper)", 0);
  60721. if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "recvfrom_into", 1))) return NULL;
  60722. __Pyx_INCREF(__pyx_args);
  60723. __pyx_v_args = __pyx_args;
  60724. __pyx_r = __pyx_pf_6uvloop_4loop_12PseudoSocket_58recvfrom_into(((struct __pyx_obj_6uvloop_4loop_PseudoSocket *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);
  60725. /* function exit code */
  60726. __Pyx_XDECREF(__pyx_v_args);
  60727. __Pyx_XDECREF(__pyx_v_kwargs);
  60728. __Pyx_RefNannyFinishContext();
  60729. return __pyx_r;
  60730. }
  60731. static PyObject *__pyx_pf_6uvloop_4loop_12PseudoSocket_58recvfrom_into(struct __pyx_obj_6uvloop_4loop_PseudoSocket *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
  60732. PyObject *__pyx_r = NULL;
  60733. __Pyx_RefNannyDeclarations
  60734. PyObject *__pyx_t_1 = NULL;
  60735. __Pyx_RefNannySetupContext("recvfrom_into", 0);
  60736. /* "uvloop/pseudosock.pyx":176
  60737. *
  60738. * def recvfrom_into(self, *args, **kwargs):
  60739. * self._na('recvfrom_into() method') # <<<<<<<<<<<<<<
  60740. *
  60741. * def recvmsg_into(self, *args, **kwargs):
  60742. */
  60743. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_PseudoSocket *)__pyx_v_self->__pyx_vtab)->_na(__pyx_v_self, __pyx_kp_u_recvfrom_into_method); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 176, __pyx_L1_error)
  60744. __Pyx_GOTREF(__pyx_t_1);
  60745. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  60746. /* "uvloop/pseudosock.pyx":175
  60747. * self._na('recv_into() method')
  60748. *
  60749. * def recvfrom_into(self, *args, **kwargs): # <<<<<<<<<<<<<<
  60750. * self._na('recvfrom_into() method')
  60751. *
  60752. */
  60753. /* function exit code */
  60754. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  60755. goto __pyx_L0;
  60756. __pyx_L1_error:;
  60757. __Pyx_XDECREF(__pyx_t_1);
  60758. __Pyx_AddTraceback("uvloop.loop.PseudoSocket.recvfrom_into", __pyx_clineno, __pyx_lineno, __pyx_filename);
  60759. __pyx_r = NULL;
  60760. __pyx_L0:;
  60761. __Pyx_XGIVEREF(__pyx_r);
  60762. __Pyx_RefNannyFinishContext();
  60763. return __pyx_r;
  60764. }
  60765. /* "uvloop/pseudosock.pyx":178
  60766. * self._na('recvfrom_into() method')
  60767. *
  60768. * def recvmsg_into(self, *args, **kwargs): # <<<<<<<<<<<<<<
  60769. * self._na('recvmsg_into() method')
  60770. *
  60771. */
  60772. /* Python wrapper */
  60773. static PyObject *__pyx_pw_6uvloop_4loop_12PseudoSocket_61recvmsg_into(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  60774. static char __pyx_doc_6uvloop_4loop_12PseudoSocket_60recvmsg_into[] = "PseudoSocket.recvmsg_into(self, *args, **kwargs)";
  60775. static PyObject *__pyx_pw_6uvloop_4loop_12PseudoSocket_61recvmsg_into(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  60776. CYTHON_UNUSED PyObject *__pyx_v_args = 0;
  60777. CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
  60778. PyObject *__pyx_r = 0;
  60779. __Pyx_RefNannyDeclarations
  60780. __Pyx_RefNannySetupContext("recvmsg_into (wrapper)", 0);
  60781. if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "recvmsg_into", 1))) return NULL;
  60782. __Pyx_INCREF(__pyx_args);
  60783. __pyx_v_args = __pyx_args;
  60784. __pyx_r = __pyx_pf_6uvloop_4loop_12PseudoSocket_60recvmsg_into(((struct __pyx_obj_6uvloop_4loop_PseudoSocket *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);
  60785. /* function exit code */
  60786. __Pyx_XDECREF(__pyx_v_args);
  60787. __Pyx_XDECREF(__pyx_v_kwargs);
  60788. __Pyx_RefNannyFinishContext();
  60789. return __pyx_r;
  60790. }
  60791. static PyObject *__pyx_pf_6uvloop_4loop_12PseudoSocket_60recvmsg_into(struct __pyx_obj_6uvloop_4loop_PseudoSocket *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
  60792. PyObject *__pyx_r = NULL;
  60793. __Pyx_RefNannyDeclarations
  60794. PyObject *__pyx_t_1 = NULL;
  60795. __Pyx_RefNannySetupContext("recvmsg_into", 0);
  60796. /* "uvloop/pseudosock.pyx":179
  60797. *
  60798. * def recvmsg_into(self, *args, **kwargs):
  60799. * self._na('recvmsg_into() method') # <<<<<<<<<<<<<<
  60800. *
  60801. * def recvmsg(self, *args, **kwargs):
  60802. */
  60803. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_PseudoSocket *)__pyx_v_self->__pyx_vtab)->_na(__pyx_v_self, __pyx_kp_u_recvmsg_into_method); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 179, __pyx_L1_error)
  60804. __Pyx_GOTREF(__pyx_t_1);
  60805. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  60806. /* "uvloop/pseudosock.pyx":178
  60807. * self._na('recvfrom_into() method')
  60808. *
  60809. * def recvmsg_into(self, *args, **kwargs): # <<<<<<<<<<<<<<
  60810. * self._na('recvmsg_into() method')
  60811. *
  60812. */
  60813. /* function exit code */
  60814. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  60815. goto __pyx_L0;
  60816. __pyx_L1_error:;
  60817. __Pyx_XDECREF(__pyx_t_1);
  60818. __Pyx_AddTraceback("uvloop.loop.PseudoSocket.recvmsg_into", __pyx_clineno, __pyx_lineno, __pyx_filename);
  60819. __pyx_r = NULL;
  60820. __pyx_L0:;
  60821. __Pyx_XGIVEREF(__pyx_r);
  60822. __Pyx_RefNannyFinishContext();
  60823. return __pyx_r;
  60824. }
  60825. /* "uvloop/pseudosock.pyx":181
  60826. * self._na('recvmsg_into() method')
  60827. *
  60828. * def recvmsg(self, *args, **kwargs): # <<<<<<<<<<<<<<
  60829. * self._na('recvmsg() method')
  60830. *
  60831. */
  60832. /* Python wrapper */
  60833. static PyObject *__pyx_pw_6uvloop_4loop_12PseudoSocket_63recvmsg(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  60834. static char __pyx_doc_6uvloop_4loop_12PseudoSocket_62recvmsg[] = "PseudoSocket.recvmsg(self, *args, **kwargs)";
  60835. static PyObject *__pyx_pw_6uvloop_4loop_12PseudoSocket_63recvmsg(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  60836. CYTHON_UNUSED PyObject *__pyx_v_args = 0;
  60837. CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
  60838. PyObject *__pyx_r = 0;
  60839. __Pyx_RefNannyDeclarations
  60840. __Pyx_RefNannySetupContext("recvmsg (wrapper)", 0);
  60841. if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "recvmsg", 1))) return NULL;
  60842. __Pyx_INCREF(__pyx_args);
  60843. __pyx_v_args = __pyx_args;
  60844. __pyx_r = __pyx_pf_6uvloop_4loop_12PseudoSocket_62recvmsg(((struct __pyx_obj_6uvloop_4loop_PseudoSocket *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);
  60845. /* function exit code */
  60846. __Pyx_XDECREF(__pyx_v_args);
  60847. __Pyx_XDECREF(__pyx_v_kwargs);
  60848. __Pyx_RefNannyFinishContext();
  60849. return __pyx_r;
  60850. }
  60851. static PyObject *__pyx_pf_6uvloop_4loop_12PseudoSocket_62recvmsg(struct __pyx_obj_6uvloop_4loop_PseudoSocket *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
  60852. PyObject *__pyx_r = NULL;
  60853. __Pyx_RefNannyDeclarations
  60854. PyObject *__pyx_t_1 = NULL;
  60855. __Pyx_RefNannySetupContext("recvmsg", 0);
  60856. /* "uvloop/pseudosock.pyx":182
  60857. *
  60858. * def recvmsg(self, *args, **kwargs):
  60859. * self._na('recvmsg() method') # <<<<<<<<<<<<<<
  60860. *
  60861. * def recvfrom(self, *args, **kwargs):
  60862. */
  60863. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_PseudoSocket *)__pyx_v_self->__pyx_vtab)->_na(__pyx_v_self, __pyx_kp_u_recvmsg_method); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 182, __pyx_L1_error)
  60864. __Pyx_GOTREF(__pyx_t_1);
  60865. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  60866. /* "uvloop/pseudosock.pyx":181
  60867. * self._na('recvmsg_into() method')
  60868. *
  60869. * def recvmsg(self, *args, **kwargs): # <<<<<<<<<<<<<<
  60870. * self._na('recvmsg() method')
  60871. *
  60872. */
  60873. /* function exit code */
  60874. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  60875. goto __pyx_L0;
  60876. __pyx_L1_error:;
  60877. __Pyx_XDECREF(__pyx_t_1);
  60878. __Pyx_AddTraceback("uvloop.loop.PseudoSocket.recvmsg", __pyx_clineno, __pyx_lineno, __pyx_filename);
  60879. __pyx_r = NULL;
  60880. __pyx_L0:;
  60881. __Pyx_XGIVEREF(__pyx_r);
  60882. __Pyx_RefNannyFinishContext();
  60883. return __pyx_r;
  60884. }
  60885. /* "uvloop/pseudosock.pyx":184
  60886. * self._na('recvmsg() method')
  60887. *
  60888. * def recvfrom(self, *args, **kwargs): # <<<<<<<<<<<<<<
  60889. * self._na('recvfrom() method')
  60890. *
  60891. */
  60892. /* Python wrapper */
  60893. static PyObject *__pyx_pw_6uvloop_4loop_12PseudoSocket_65recvfrom(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  60894. static char __pyx_doc_6uvloop_4loop_12PseudoSocket_64recvfrom[] = "PseudoSocket.recvfrom(self, *args, **kwargs)";
  60895. static PyObject *__pyx_pw_6uvloop_4loop_12PseudoSocket_65recvfrom(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  60896. CYTHON_UNUSED PyObject *__pyx_v_args = 0;
  60897. CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
  60898. PyObject *__pyx_r = 0;
  60899. __Pyx_RefNannyDeclarations
  60900. __Pyx_RefNannySetupContext("recvfrom (wrapper)", 0);
  60901. if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "recvfrom", 1))) return NULL;
  60902. __Pyx_INCREF(__pyx_args);
  60903. __pyx_v_args = __pyx_args;
  60904. __pyx_r = __pyx_pf_6uvloop_4loop_12PseudoSocket_64recvfrom(((struct __pyx_obj_6uvloop_4loop_PseudoSocket *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);
  60905. /* function exit code */
  60906. __Pyx_XDECREF(__pyx_v_args);
  60907. __Pyx_XDECREF(__pyx_v_kwargs);
  60908. __Pyx_RefNannyFinishContext();
  60909. return __pyx_r;
  60910. }
  60911. static PyObject *__pyx_pf_6uvloop_4loop_12PseudoSocket_64recvfrom(struct __pyx_obj_6uvloop_4loop_PseudoSocket *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
  60912. PyObject *__pyx_r = NULL;
  60913. __Pyx_RefNannyDeclarations
  60914. PyObject *__pyx_t_1 = NULL;
  60915. __Pyx_RefNannySetupContext("recvfrom", 0);
  60916. /* "uvloop/pseudosock.pyx":185
  60917. *
  60918. * def recvfrom(self, *args, **kwargs):
  60919. * self._na('recvfrom() method') # <<<<<<<<<<<<<<
  60920. *
  60921. * def recv(self, *args, **kwargs):
  60922. */
  60923. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_PseudoSocket *)__pyx_v_self->__pyx_vtab)->_na(__pyx_v_self, __pyx_kp_u_recvfrom_method); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 185, __pyx_L1_error)
  60924. __Pyx_GOTREF(__pyx_t_1);
  60925. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  60926. /* "uvloop/pseudosock.pyx":184
  60927. * self._na('recvmsg() method')
  60928. *
  60929. * def recvfrom(self, *args, **kwargs): # <<<<<<<<<<<<<<
  60930. * self._na('recvfrom() method')
  60931. *
  60932. */
  60933. /* function exit code */
  60934. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  60935. goto __pyx_L0;
  60936. __pyx_L1_error:;
  60937. __Pyx_XDECREF(__pyx_t_1);
  60938. __Pyx_AddTraceback("uvloop.loop.PseudoSocket.recvfrom", __pyx_clineno, __pyx_lineno, __pyx_filename);
  60939. __pyx_r = NULL;
  60940. __pyx_L0:;
  60941. __Pyx_XGIVEREF(__pyx_r);
  60942. __Pyx_RefNannyFinishContext();
  60943. return __pyx_r;
  60944. }
  60945. /* "uvloop/pseudosock.pyx":187
  60946. * self._na('recvfrom() method')
  60947. *
  60948. * def recv(self, *args, **kwargs): # <<<<<<<<<<<<<<
  60949. * self._na('recv() method')
  60950. *
  60951. */
  60952. /* Python wrapper */
  60953. static PyObject *__pyx_pw_6uvloop_4loop_12PseudoSocket_67recv(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  60954. static char __pyx_doc_6uvloop_4loop_12PseudoSocket_66recv[] = "PseudoSocket.recv(self, *args, **kwargs)";
  60955. static PyObject *__pyx_pw_6uvloop_4loop_12PseudoSocket_67recv(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  60956. CYTHON_UNUSED PyObject *__pyx_v_args = 0;
  60957. CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
  60958. PyObject *__pyx_r = 0;
  60959. __Pyx_RefNannyDeclarations
  60960. __Pyx_RefNannySetupContext("recv (wrapper)", 0);
  60961. if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "recv", 1))) return NULL;
  60962. __Pyx_INCREF(__pyx_args);
  60963. __pyx_v_args = __pyx_args;
  60964. __pyx_r = __pyx_pf_6uvloop_4loop_12PseudoSocket_66recv(((struct __pyx_obj_6uvloop_4loop_PseudoSocket *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);
  60965. /* function exit code */
  60966. __Pyx_XDECREF(__pyx_v_args);
  60967. __Pyx_XDECREF(__pyx_v_kwargs);
  60968. __Pyx_RefNannyFinishContext();
  60969. return __pyx_r;
  60970. }
  60971. static PyObject *__pyx_pf_6uvloop_4loop_12PseudoSocket_66recv(struct __pyx_obj_6uvloop_4loop_PseudoSocket *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
  60972. PyObject *__pyx_r = NULL;
  60973. __Pyx_RefNannyDeclarations
  60974. PyObject *__pyx_t_1 = NULL;
  60975. __Pyx_RefNannySetupContext("recv", 0);
  60976. /* "uvloop/pseudosock.pyx":188
  60977. *
  60978. * def recv(self, *args, **kwargs):
  60979. * self._na('recv() method') # <<<<<<<<<<<<<<
  60980. *
  60981. * def settimeout(self, value):
  60982. */
  60983. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_PseudoSocket *)__pyx_v_self->__pyx_vtab)->_na(__pyx_v_self, __pyx_kp_u_recv_method); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 188, __pyx_L1_error)
  60984. __Pyx_GOTREF(__pyx_t_1);
  60985. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  60986. /* "uvloop/pseudosock.pyx":187
  60987. * self._na('recvfrom() method')
  60988. *
  60989. * def recv(self, *args, **kwargs): # <<<<<<<<<<<<<<
  60990. * self._na('recv() method')
  60991. *
  60992. */
  60993. /* function exit code */
  60994. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  60995. goto __pyx_L0;
  60996. __pyx_L1_error:;
  60997. __Pyx_XDECREF(__pyx_t_1);
  60998. __Pyx_AddTraceback("uvloop.loop.PseudoSocket.recv", __pyx_clineno, __pyx_lineno, __pyx_filename);
  60999. __pyx_r = NULL;
  61000. __pyx_L0:;
  61001. __Pyx_XGIVEREF(__pyx_r);
  61002. __Pyx_RefNannyFinishContext();
  61003. return __pyx_r;
  61004. }
  61005. /* "uvloop/pseudosock.pyx":190
  61006. * self._na('recv() method')
  61007. *
  61008. * def settimeout(self, value): # <<<<<<<<<<<<<<
  61009. * if value == 0:
  61010. * return
  61011. */
  61012. /* Python wrapper */
  61013. static PyObject *__pyx_pw_6uvloop_4loop_12PseudoSocket_69settimeout(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
  61014. static char __pyx_doc_6uvloop_4loop_12PseudoSocket_68settimeout[] = "PseudoSocket.settimeout(self, value)";
  61015. static PyObject *__pyx_pw_6uvloop_4loop_12PseudoSocket_69settimeout(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  61016. PyObject *__pyx_r = 0;
  61017. __Pyx_RefNannyDeclarations
  61018. __Pyx_RefNannySetupContext("settimeout (wrapper)", 0);
  61019. __pyx_r = __pyx_pf_6uvloop_4loop_12PseudoSocket_68settimeout(((struct __pyx_obj_6uvloop_4loop_PseudoSocket *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  61020. /* function exit code */
  61021. __Pyx_RefNannyFinishContext();
  61022. return __pyx_r;
  61023. }
  61024. static PyObject *__pyx_pf_6uvloop_4loop_12PseudoSocket_68settimeout(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_PseudoSocket *__pyx_v_self, PyObject *__pyx_v_value) {
  61025. PyObject *__pyx_r = NULL;
  61026. __Pyx_RefNannyDeclarations
  61027. PyObject *__pyx_t_1 = NULL;
  61028. int __pyx_t_2;
  61029. __Pyx_RefNannySetupContext("settimeout", 0);
  61030. /* "uvloop/pseudosock.pyx":191
  61031. *
  61032. * def settimeout(self, value):
  61033. * if value == 0: # <<<<<<<<<<<<<<
  61034. * return
  61035. * raise ValueError(
  61036. */
  61037. __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_value, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 191, __pyx_L1_error)
  61038. __Pyx_GOTREF(__pyx_t_1);
  61039. __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(10, 191, __pyx_L1_error)
  61040. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  61041. if (__pyx_t_2) {
  61042. /* "uvloop/pseudosock.pyx":192
  61043. * def settimeout(self, value):
  61044. * if value == 0:
  61045. * return # <<<<<<<<<<<<<<
  61046. * raise ValueError(
  61047. * 'settimeout(): only 0 timeout is allowed on transport sockets')
  61048. */
  61049. __Pyx_XDECREF(__pyx_r);
  61050. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  61051. goto __pyx_L0;
  61052. /* "uvloop/pseudosock.pyx":191
  61053. *
  61054. * def settimeout(self, value):
  61055. * if value == 0: # <<<<<<<<<<<<<<
  61056. * return
  61057. * raise ValueError(
  61058. */
  61059. }
  61060. /* "uvloop/pseudosock.pyx":193
  61061. * if value == 0:
  61062. * return
  61063. * raise ValueError( # <<<<<<<<<<<<<<
  61064. * 'settimeout(): only 0 timeout is allowed on transport sockets')
  61065. *
  61066. */
  61067. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__98, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 193, __pyx_L1_error)
  61068. __Pyx_GOTREF(__pyx_t_1);
  61069. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  61070. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  61071. __PYX_ERR(10, 193, __pyx_L1_error)
  61072. /* "uvloop/pseudosock.pyx":190
  61073. * self._na('recv() method')
  61074. *
  61075. * def settimeout(self, value): # <<<<<<<<<<<<<<
  61076. * if value == 0:
  61077. * return
  61078. */
  61079. /* function exit code */
  61080. __pyx_L1_error:;
  61081. __Pyx_XDECREF(__pyx_t_1);
  61082. __Pyx_AddTraceback("uvloop.loop.PseudoSocket.settimeout", __pyx_clineno, __pyx_lineno, __pyx_filename);
  61083. __pyx_r = NULL;
  61084. __pyx_L0:;
  61085. __Pyx_XGIVEREF(__pyx_r);
  61086. __Pyx_RefNannyFinishContext();
  61087. return __pyx_r;
  61088. }
  61089. /* "uvloop/pseudosock.pyx":196
  61090. * 'settimeout(): only 0 timeout is allowed on transport sockets')
  61091. *
  61092. * def gettimeout(self): # <<<<<<<<<<<<<<
  61093. * return 0
  61094. *
  61095. */
  61096. /* Python wrapper */
  61097. static PyObject *__pyx_pw_6uvloop_4loop_12PseudoSocket_71gettimeout(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  61098. static char __pyx_doc_6uvloop_4loop_12PseudoSocket_70gettimeout[] = "PseudoSocket.gettimeout(self)";
  61099. static PyObject *__pyx_pw_6uvloop_4loop_12PseudoSocket_71gettimeout(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  61100. PyObject *__pyx_r = 0;
  61101. __Pyx_RefNannyDeclarations
  61102. __Pyx_RefNannySetupContext("gettimeout (wrapper)", 0);
  61103. __pyx_r = __pyx_pf_6uvloop_4loop_12PseudoSocket_70gettimeout(((struct __pyx_obj_6uvloop_4loop_PseudoSocket *)__pyx_v_self));
  61104. /* function exit code */
  61105. __Pyx_RefNannyFinishContext();
  61106. return __pyx_r;
  61107. }
  61108. static PyObject *__pyx_pf_6uvloop_4loop_12PseudoSocket_70gettimeout(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_PseudoSocket *__pyx_v_self) {
  61109. PyObject *__pyx_r = NULL;
  61110. __Pyx_RefNannyDeclarations
  61111. __Pyx_RefNannySetupContext("gettimeout", 0);
  61112. /* "uvloop/pseudosock.pyx":197
  61113. *
  61114. * def gettimeout(self):
  61115. * return 0 # <<<<<<<<<<<<<<
  61116. *
  61117. * def setblocking(self, flag):
  61118. */
  61119. __Pyx_XDECREF(__pyx_r);
  61120. __Pyx_INCREF(__pyx_int_0);
  61121. __pyx_r = __pyx_int_0;
  61122. goto __pyx_L0;
  61123. /* "uvloop/pseudosock.pyx":196
  61124. * 'settimeout(): only 0 timeout is allowed on transport sockets')
  61125. *
  61126. * def gettimeout(self): # <<<<<<<<<<<<<<
  61127. * return 0
  61128. *
  61129. */
  61130. /* function exit code */
  61131. __pyx_L0:;
  61132. __Pyx_XGIVEREF(__pyx_r);
  61133. __Pyx_RefNannyFinishContext();
  61134. return __pyx_r;
  61135. }
  61136. /* "uvloop/pseudosock.pyx":199
  61137. * return 0
  61138. *
  61139. * def setblocking(self, flag): # <<<<<<<<<<<<<<
  61140. * if not flag:
  61141. * return
  61142. */
  61143. /* Python wrapper */
  61144. static PyObject *__pyx_pw_6uvloop_4loop_12PseudoSocket_73setblocking(PyObject *__pyx_v_self, PyObject *__pyx_v_flag); /*proto*/
  61145. static char __pyx_doc_6uvloop_4loop_12PseudoSocket_72setblocking[] = "PseudoSocket.setblocking(self, flag)";
  61146. static PyObject *__pyx_pw_6uvloop_4loop_12PseudoSocket_73setblocking(PyObject *__pyx_v_self, PyObject *__pyx_v_flag) {
  61147. PyObject *__pyx_r = 0;
  61148. __Pyx_RefNannyDeclarations
  61149. __Pyx_RefNannySetupContext("setblocking (wrapper)", 0);
  61150. __pyx_r = __pyx_pf_6uvloop_4loop_12PseudoSocket_72setblocking(((struct __pyx_obj_6uvloop_4loop_PseudoSocket *)__pyx_v_self), ((PyObject *)__pyx_v_flag));
  61151. /* function exit code */
  61152. __Pyx_RefNannyFinishContext();
  61153. return __pyx_r;
  61154. }
  61155. static PyObject *__pyx_pf_6uvloop_4loop_12PseudoSocket_72setblocking(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_PseudoSocket *__pyx_v_self, PyObject *__pyx_v_flag) {
  61156. PyObject *__pyx_r = NULL;
  61157. __Pyx_RefNannyDeclarations
  61158. int __pyx_t_1;
  61159. int __pyx_t_2;
  61160. PyObject *__pyx_t_3 = NULL;
  61161. __Pyx_RefNannySetupContext("setblocking", 0);
  61162. /* "uvloop/pseudosock.pyx":200
  61163. *
  61164. * def setblocking(self, flag):
  61165. * if not flag: # <<<<<<<<<<<<<<
  61166. * return
  61167. * raise ValueError(
  61168. */
  61169. __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_flag); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(10, 200, __pyx_L1_error)
  61170. __pyx_t_2 = ((!__pyx_t_1) != 0);
  61171. if (__pyx_t_2) {
  61172. /* "uvloop/pseudosock.pyx":201
  61173. * def setblocking(self, flag):
  61174. * if not flag:
  61175. * return # <<<<<<<<<<<<<<
  61176. * raise ValueError(
  61177. * 'setblocking(): transport sockets cannot be blocking')
  61178. */
  61179. __Pyx_XDECREF(__pyx_r);
  61180. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  61181. goto __pyx_L0;
  61182. /* "uvloop/pseudosock.pyx":200
  61183. *
  61184. * def setblocking(self, flag):
  61185. * if not flag: # <<<<<<<<<<<<<<
  61186. * return
  61187. * raise ValueError(
  61188. */
  61189. }
  61190. /* "uvloop/pseudosock.pyx":202
  61191. * if not flag:
  61192. * return
  61193. * raise ValueError( # <<<<<<<<<<<<<<
  61194. * 'setblocking(): transport sockets cannot be blocking')
  61195. *
  61196. */
  61197. __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__99, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 202, __pyx_L1_error)
  61198. __Pyx_GOTREF(__pyx_t_3);
  61199. __Pyx_Raise(__pyx_t_3, 0, 0, 0);
  61200. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  61201. __PYX_ERR(10, 202, __pyx_L1_error)
  61202. /* "uvloop/pseudosock.pyx":199
  61203. * return 0
  61204. *
  61205. * def setblocking(self, flag): # <<<<<<<<<<<<<<
  61206. * if not flag:
  61207. * return
  61208. */
  61209. /* function exit code */
  61210. __pyx_L1_error:;
  61211. __Pyx_XDECREF(__pyx_t_3);
  61212. __Pyx_AddTraceback("uvloop.loop.PseudoSocket.setblocking", __pyx_clineno, __pyx_lineno, __pyx_filename);
  61213. __pyx_r = NULL;
  61214. __pyx_L0:;
  61215. __Pyx_XGIVEREF(__pyx_r);
  61216. __Pyx_RefNannyFinishContext();
  61217. return __pyx_r;
  61218. }
  61219. /* "uvloop/pseudosock.pyx":205
  61220. * 'setblocking(): transport sockets cannot be blocking')
  61221. *
  61222. * def __enter__(self): # <<<<<<<<<<<<<<
  61223. * self._na('context manager protocol')
  61224. *
  61225. */
  61226. /* Python wrapper */
  61227. static PyObject *__pyx_pw_6uvloop_4loop_12PseudoSocket_75__enter__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  61228. static char __pyx_doc_6uvloop_4loop_12PseudoSocket_74__enter__[] = "PseudoSocket.__enter__(self)";
  61229. static PyObject *__pyx_pw_6uvloop_4loop_12PseudoSocket_75__enter__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  61230. PyObject *__pyx_r = 0;
  61231. __Pyx_RefNannyDeclarations
  61232. __Pyx_RefNannySetupContext("__enter__ (wrapper)", 0);
  61233. __pyx_r = __pyx_pf_6uvloop_4loop_12PseudoSocket_74__enter__(((struct __pyx_obj_6uvloop_4loop_PseudoSocket *)__pyx_v_self));
  61234. /* function exit code */
  61235. __Pyx_RefNannyFinishContext();
  61236. return __pyx_r;
  61237. }
  61238. static PyObject *__pyx_pf_6uvloop_4loop_12PseudoSocket_74__enter__(struct __pyx_obj_6uvloop_4loop_PseudoSocket *__pyx_v_self) {
  61239. PyObject *__pyx_r = NULL;
  61240. __Pyx_RefNannyDeclarations
  61241. PyObject *__pyx_t_1 = NULL;
  61242. __Pyx_RefNannySetupContext("__enter__", 0);
  61243. /* "uvloop/pseudosock.pyx":206
  61244. *
  61245. * def __enter__(self):
  61246. * self._na('context manager protocol') # <<<<<<<<<<<<<<
  61247. *
  61248. * def __exit__(self, *err):
  61249. */
  61250. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_PseudoSocket *)__pyx_v_self->__pyx_vtab)->_na(__pyx_v_self, __pyx_kp_u_context_manager_protocol); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 206, __pyx_L1_error)
  61251. __Pyx_GOTREF(__pyx_t_1);
  61252. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  61253. /* "uvloop/pseudosock.pyx":205
  61254. * 'setblocking(): transport sockets cannot be blocking')
  61255. *
  61256. * def __enter__(self): # <<<<<<<<<<<<<<
  61257. * self._na('context manager protocol')
  61258. *
  61259. */
  61260. /* function exit code */
  61261. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  61262. goto __pyx_L0;
  61263. __pyx_L1_error:;
  61264. __Pyx_XDECREF(__pyx_t_1);
  61265. __Pyx_AddTraceback("uvloop.loop.PseudoSocket.__enter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  61266. __pyx_r = NULL;
  61267. __pyx_L0:;
  61268. __Pyx_XGIVEREF(__pyx_r);
  61269. __Pyx_RefNannyFinishContext();
  61270. return __pyx_r;
  61271. }
  61272. /* "uvloop/pseudosock.pyx":208
  61273. * self._na('context manager protocol')
  61274. *
  61275. * def __exit__(self, *err): # <<<<<<<<<<<<<<
  61276. * self._na('context manager protocol')
  61277. */
  61278. /* Python wrapper */
  61279. static PyObject *__pyx_pw_6uvloop_4loop_12PseudoSocket_77__exit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  61280. static char __pyx_doc_6uvloop_4loop_12PseudoSocket_76__exit__[] = "PseudoSocket.__exit__(self, *err)";
  61281. static PyObject *__pyx_pw_6uvloop_4loop_12PseudoSocket_77__exit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  61282. CYTHON_UNUSED PyObject *__pyx_v_err = 0;
  61283. PyObject *__pyx_r = 0;
  61284. __Pyx_RefNannyDeclarations
  61285. __Pyx_RefNannySetupContext("__exit__ (wrapper)", 0);
  61286. if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__exit__", 0))) return NULL;
  61287. __Pyx_INCREF(__pyx_args);
  61288. __pyx_v_err = __pyx_args;
  61289. __pyx_r = __pyx_pf_6uvloop_4loop_12PseudoSocket_76__exit__(((struct __pyx_obj_6uvloop_4loop_PseudoSocket *)__pyx_v_self), __pyx_v_err);
  61290. /* function exit code */
  61291. __Pyx_XDECREF(__pyx_v_err);
  61292. __Pyx_RefNannyFinishContext();
  61293. return __pyx_r;
  61294. }
  61295. static PyObject *__pyx_pf_6uvloop_4loop_12PseudoSocket_76__exit__(struct __pyx_obj_6uvloop_4loop_PseudoSocket *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_err) {
  61296. PyObject *__pyx_r = NULL;
  61297. __Pyx_RefNannyDeclarations
  61298. PyObject *__pyx_t_1 = NULL;
  61299. __Pyx_RefNannySetupContext("__exit__", 0);
  61300. /* "uvloop/pseudosock.pyx":209
  61301. *
  61302. * def __exit__(self, *err):
  61303. * self._na('context manager protocol') # <<<<<<<<<<<<<<
  61304. */
  61305. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_PseudoSocket *)__pyx_v_self->__pyx_vtab)->_na(__pyx_v_self, __pyx_kp_u_context_manager_protocol); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 209, __pyx_L1_error)
  61306. __Pyx_GOTREF(__pyx_t_1);
  61307. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  61308. /* "uvloop/pseudosock.pyx":208
  61309. * self._na('context manager protocol')
  61310. *
  61311. * def __exit__(self, *err): # <<<<<<<<<<<<<<
  61312. * self._na('context manager protocol')
  61313. */
  61314. /* function exit code */
  61315. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  61316. goto __pyx_L0;
  61317. __pyx_L1_error:;
  61318. __Pyx_XDECREF(__pyx_t_1);
  61319. __Pyx_AddTraceback("uvloop.loop.PseudoSocket.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  61320. __pyx_r = NULL;
  61321. __pyx_L0:;
  61322. __Pyx_XGIVEREF(__pyx_r);
  61323. __Pyx_RefNannyFinishContext();
  61324. return __pyx_r;
  61325. }
  61326. /* "(tree fragment)":1
  61327. * def __reduce_cython__(self): # <<<<<<<<<<<<<<
  61328. * cdef tuple state
  61329. * cdef object _dict
  61330. */
  61331. /* Python wrapper */
  61332. static PyObject *__pyx_pw_6uvloop_4loop_12PseudoSocket_79__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  61333. static char __pyx_doc_6uvloop_4loop_12PseudoSocket_78__reduce_cython__[] = "PseudoSocket.__reduce_cython__(self)";
  61334. static PyObject *__pyx_pw_6uvloop_4loop_12PseudoSocket_79__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  61335. PyObject *__pyx_r = 0;
  61336. __Pyx_RefNannyDeclarations
  61337. __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  61338. __pyx_r = __pyx_pf_6uvloop_4loop_12PseudoSocket_78__reduce_cython__(((struct __pyx_obj_6uvloop_4loop_PseudoSocket *)__pyx_v_self));
  61339. /* function exit code */
  61340. __Pyx_RefNannyFinishContext();
  61341. return __pyx_r;
  61342. }
  61343. static PyObject *__pyx_pf_6uvloop_4loop_12PseudoSocket_78__reduce_cython__(struct __pyx_obj_6uvloop_4loop_PseudoSocket *__pyx_v_self) {
  61344. PyObject *__pyx_v_state = 0;
  61345. PyObject *__pyx_v__dict = 0;
  61346. int __pyx_v_use_setstate;
  61347. PyObject *__pyx_r = NULL;
  61348. __Pyx_RefNannyDeclarations
  61349. PyObject *__pyx_t_1 = NULL;
  61350. PyObject *__pyx_t_2 = NULL;
  61351. PyObject *__pyx_t_3 = NULL;
  61352. PyObject *__pyx_t_4 = NULL;
  61353. PyObject *__pyx_t_5 = NULL;
  61354. int __pyx_t_6;
  61355. int __pyx_t_7;
  61356. int __pyx_t_8;
  61357. __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  61358. /* "(tree fragment)":5
  61359. * cdef object _dict
  61360. * cdef bint use_setstate
  61361. * state = (self._family, self._fd, self._peername, self._proto, self._sockname, self._type) # <<<<<<<<<<<<<<
  61362. * _dict = getattr(self, '__dict__', None)
  61363. * if _dict is not None:
  61364. */
  61365. __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_family); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 5, __pyx_L1_error)
  61366. __Pyx_GOTREF(__pyx_t_1);
  61367. __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->_fd); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 5, __pyx_L1_error)
  61368. __Pyx_GOTREF(__pyx_t_2);
  61369. __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->_proto); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 5, __pyx_L1_error)
  61370. __Pyx_GOTREF(__pyx_t_3);
  61371. __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_self->_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(9, 5, __pyx_L1_error)
  61372. __Pyx_GOTREF(__pyx_t_4);
  61373. __pyx_t_5 = PyTuple_New(6); if (unlikely(!__pyx_t_5)) __PYX_ERR(9, 5, __pyx_L1_error)
  61374. __Pyx_GOTREF(__pyx_t_5);
  61375. __Pyx_GIVEREF(__pyx_t_1);
  61376. PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
  61377. __Pyx_GIVEREF(__pyx_t_2);
  61378. PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
  61379. __Pyx_INCREF(__pyx_v_self->_peername);
  61380. __Pyx_GIVEREF(__pyx_v_self->_peername);
  61381. PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_self->_peername);
  61382. __Pyx_GIVEREF(__pyx_t_3);
  61383. PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_3);
  61384. __Pyx_INCREF(__pyx_v_self->_sockname);
  61385. __Pyx_GIVEREF(__pyx_v_self->_sockname);
  61386. PyTuple_SET_ITEM(__pyx_t_5, 4, __pyx_v_self->_sockname);
  61387. __Pyx_GIVEREF(__pyx_t_4);
  61388. PyTuple_SET_ITEM(__pyx_t_5, 5, __pyx_t_4);
  61389. __pyx_t_1 = 0;
  61390. __pyx_t_2 = 0;
  61391. __pyx_t_3 = 0;
  61392. __pyx_t_4 = 0;
  61393. __pyx_v_state = ((PyObject*)__pyx_t_5);
  61394. __pyx_t_5 = 0;
  61395. /* "(tree fragment)":6
  61396. * cdef bint use_setstate
  61397. * state = (self._family, self._fd, self._peername, self._proto, self._sockname, self._type)
  61398. * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
  61399. * if _dict is not None:
  61400. * state += (_dict,)
  61401. */
  61402. __pyx_t_5 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_5)) __PYX_ERR(9, 6, __pyx_L1_error)
  61403. __Pyx_GOTREF(__pyx_t_5);
  61404. __pyx_v__dict = __pyx_t_5;
  61405. __pyx_t_5 = 0;
  61406. /* "(tree fragment)":7
  61407. * state = (self._family, self._fd, self._peername, self._proto, self._sockname, self._type)
  61408. * _dict = getattr(self, '__dict__', None)
  61409. * if _dict is not None: # <<<<<<<<<<<<<<
  61410. * state += (_dict,)
  61411. * use_setstate = True
  61412. */
  61413. __pyx_t_6 = (__pyx_v__dict != Py_None);
  61414. __pyx_t_7 = (__pyx_t_6 != 0);
  61415. if (__pyx_t_7) {
  61416. /* "(tree fragment)":8
  61417. * _dict = getattr(self, '__dict__', None)
  61418. * if _dict is not None:
  61419. * state += (_dict,) # <<<<<<<<<<<<<<
  61420. * use_setstate = True
  61421. * else:
  61422. */
  61423. __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(9, 8, __pyx_L1_error)
  61424. __Pyx_GOTREF(__pyx_t_5);
  61425. __Pyx_INCREF(__pyx_v__dict);
  61426. __Pyx_GIVEREF(__pyx_v__dict);
  61427. PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v__dict);
  61428. __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(9, 8, __pyx_L1_error)
  61429. __Pyx_GOTREF(__pyx_t_4);
  61430. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  61431. __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
  61432. __pyx_t_4 = 0;
  61433. /* "(tree fragment)":9
  61434. * if _dict is not None:
  61435. * state += (_dict,)
  61436. * use_setstate = True # <<<<<<<<<<<<<<
  61437. * else:
  61438. * use_setstate = self._peername is not None or self._sockname is not None
  61439. */
  61440. __pyx_v_use_setstate = 1;
  61441. /* "(tree fragment)":7
  61442. * state = (self._family, self._fd, self._peername, self._proto, self._sockname, self._type)
  61443. * _dict = getattr(self, '__dict__', None)
  61444. * if _dict is not None: # <<<<<<<<<<<<<<
  61445. * state += (_dict,)
  61446. * use_setstate = True
  61447. */
  61448. goto __pyx_L3;
  61449. }
  61450. /* "(tree fragment)":11
  61451. * use_setstate = True
  61452. * else:
  61453. * use_setstate = self._peername is not None or self._sockname is not None # <<<<<<<<<<<<<<
  61454. * if use_setstate:
  61455. * return __pyx_unpickle_PseudoSocket, (type(self), 0x88c0b03, None), state
  61456. */
  61457. /*else*/ {
  61458. __pyx_t_6 = (__pyx_v_self->_peername != Py_None);
  61459. __pyx_t_8 = (__pyx_t_6 != 0);
  61460. if (!__pyx_t_8) {
  61461. } else {
  61462. __pyx_t_7 = __pyx_t_8;
  61463. goto __pyx_L4_bool_binop_done;
  61464. }
  61465. __pyx_t_8 = (__pyx_v_self->_sockname != Py_None);
  61466. __pyx_t_6 = (__pyx_t_8 != 0);
  61467. __pyx_t_7 = __pyx_t_6;
  61468. __pyx_L4_bool_binop_done:;
  61469. __pyx_v_use_setstate = __pyx_t_7;
  61470. }
  61471. __pyx_L3:;
  61472. /* "(tree fragment)":12
  61473. * else:
  61474. * use_setstate = self._peername is not None or self._sockname is not None
  61475. * if use_setstate: # <<<<<<<<<<<<<<
  61476. * return __pyx_unpickle_PseudoSocket, (type(self), 0x88c0b03, None), state
  61477. * else:
  61478. */
  61479. __pyx_t_7 = (__pyx_v_use_setstate != 0);
  61480. if (__pyx_t_7) {
  61481. /* "(tree fragment)":13
  61482. * use_setstate = self._peername is not None or self._sockname is not None
  61483. * if use_setstate:
  61484. * return __pyx_unpickle_PseudoSocket, (type(self), 0x88c0b03, None), state # <<<<<<<<<<<<<<
  61485. * else:
  61486. * return __pyx_unpickle_PseudoSocket, (type(self), 0x88c0b03, state)
  61487. */
  61488. __Pyx_XDECREF(__pyx_r);
  61489. __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_PseudoSocket); if (unlikely(!__pyx_t_4)) __PYX_ERR(9, 13, __pyx_L1_error)
  61490. __Pyx_GOTREF(__pyx_t_4);
  61491. __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(9, 13, __pyx_L1_error)
  61492. __Pyx_GOTREF(__pyx_t_5);
  61493. __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
  61494. __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
  61495. PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
  61496. __Pyx_INCREF(__pyx_int_143395587);
  61497. __Pyx_GIVEREF(__pyx_int_143395587);
  61498. PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_int_143395587);
  61499. __Pyx_INCREF(Py_None);
  61500. __Pyx_GIVEREF(Py_None);
  61501. PyTuple_SET_ITEM(__pyx_t_5, 2, Py_None);
  61502. __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 13, __pyx_L1_error)
  61503. __Pyx_GOTREF(__pyx_t_3);
  61504. __Pyx_GIVEREF(__pyx_t_4);
  61505. PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
  61506. __Pyx_GIVEREF(__pyx_t_5);
  61507. PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5);
  61508. __Pyx_INCREF(__pyx_v_state);
  61509. __Pyx_GIVEREF(__pyx_v_state);
  61510. PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_state);
  61511. __pyx_t_4 = 0;
  61512. __pyx_t_5 = 0;
  61513. __pyx_r = __pyx_t_3;
  61514. __pyx_t_3 = 0;
  61515. goto __pyx_L0;
  61516. /* "(tree fragment)":12
  61517. * else:
  61518. * use_setstate = self._peername is not None or self._sockname is not None
  61519. * if use_setstate: # <<<<<<<<<<<<<<
  61520. * return __pyx_unpickle_PseudoSocket, (type(self), 0x88c0b03, None), state
  61521. * else:
  61522. */
  61523. }
  61524. /* "(tree fragment)":15
  61525. * return __pyx_unpickle_PseudoSocket, (type(self), 0x88c0b03, None), state
  61526. * else:
  61527. * return __pyx_unpickle_PseudoSocket, (type(self), 0x88c0b03, state) # <<<<<<<<<<<<<<
  61528. * def __setstate_cython__(self, __pyx_state):
  61529. * __pyx_unpickle_PseudoSocket__set_state(self, __pyx_state)
  61530. */
  61531. /*else*/ {
  61532. __Pyx_XDECREF(__pyx_r);
  61533. __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_pyx_unpickle_PseudoSocket); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 15, __pyx_L1_error)
  61534. __Pyx_GOTREF(__pyx_t_3);
  61535. __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(9, 15, __pyx_L1_error)
  61536. __Pyx_GOTREF(__pyx_t_5);
  61537. __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
  61538. __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
  61539. PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
  61540. __Pyx_INCREF(__pyx_int_143395587);
  61541. __Pyx_GIVEREF(__pyx_int_143395587);
  61542. PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_int_143395587);
  61543. __Pyx_INCREF(__pyx_v_state);
  61544. __Pyx_GIVEREF(__pyx_v_state);
  61545. PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
  61546. __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(9, 15, __pyx_L1_error)
  61547. __Pyx_GOTREF(__pyx_t_4);
  61548. __Pyx_GIVEREF(__pyx_t_3);
  61549. PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
  61550. __Pyx_GIVEREF(__pyx_t_5);
  61551. PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_5);
  61552. __pyx_t_3 = 0;
  61553. __pyx_t_5 = 0;
  61554. __pyx_r = __pyx_t_4;
  61555. __pyx_t_4 = 0;
  61556. goto __pyx_L0;
  61557. }
  61558. /* "(tree fragment)":1
  61559. * def __reduce_cython__(self): # <<<<<<<<<<<<<<
  61560. * cdef tuple state
  61561. * cdef object _dict
  61562. */
  61563. /* function exit code */
  61564. __pyx_L1_error:;
  61565. __Pyx_XDECREF(__pyx_t_1);
  61566. __Pyx_XDECREF(__pyx_t_2);
  61567. __Pyx_XDECREF(__pyx_t_3);
  61568. __Pyx_XDECREF(__pyx_t_4);
  61569. __Pyx_XDECREF(__pyx_t_5);
  61570. __Pyx_AddTraceback("uvloop.loop.PseudoSocket.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  61571. __pyx_r = NULL;
  61572. __pyx_L0:;
  61573. __Pyx_XDECREF(__pyx_v_state);
  61574. __Pyx_XDECREF(__pyx_v__dict);
  61575. __Pyx_XGIVEREF(__pyx_r);
  61576. __Pyx_RefNannyFinishContext();
  61577. return __pyx_r;
  61578. }
  61579. /* "(tree fragment)":16
  61580. * else:
  61581. * return __pyx_unpickle_PseudoSocket, (type(self), 0x88c0b03, state)
  61582. * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
  61583. * __pyx_unpickle_PseudoSocket__set_state(self, __pyx_state)
  61584. */
  61585. /* Python wrapper */
  61586. static PyObject *__pyx_pw_6uvloop_4loop_12PseudoSocket_81__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
  61587. static char __pyx_doc_6uvloop_4loop_12PseudoSocket_80__setstate_cython__[] = "PseudoSocket.__setstate_cython__(self, __pyx_state)";
  61588. static PyObject *__pyx_pw_6uvloop_4loop_12PseudoSocket_81__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  61589. PyObject *__pyx_r = 0;
  61590. __Pyx_RefNannyDeclarations
  61591. __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  61592. __pyx_r = __pyx_pf_6uvloop_4loop_12PseudoSocket_80__setstate_cython__(((struct __pyx_obj_6uvloop_4loop_PseudoSocket *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
  61593. /* function exit code */
  61594. __Pyx_RefNannyFinishContext();
  61595. return __pyx_r;
  61596. }
  61597. static PyObject *__pyx_pf_6uvloop_4loop_12PseudoSocket_80__setstate_cython__(struct __pyx_obj_6uvloop_4loop_PseudoSocket *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  61598. PyObject *__pyx_r = NULL;
  61599. __Pyx_RefNannyDeclarations
  61600. PyObject *__pyx_t_1 = NULL;
  61601. __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  61602. /* "(tree fragment)":17
  61603. * return __pyx_unpickle_PseudoSocket, (type(self), 0x88c0b03, state)
  61604. * def __setstate_cython__(self, __pyx_state):
  61605. * __pyx_unpickle_PseudoSocket__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
  61606. */
  61607. if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(9, 17, __pyx_L1_error)
  61608. __pyx_t_1 = __pyx_f_6uvloop_4loop___pyx_unpickle_PseudoSocket__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 17, __pyx_L1_error)
  61609. __Pyx_GOTREF(__pyx_t_1);
  61610. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  61611. /* "(tree fragment)":16
  61612. * else:
  61613. * return __pyx_unpickle_PseudoSocket, (type(self), 0x88c0b03, state)
  61614. * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
  61615. * __pyx_unpickle_PseudoSocket__set_state(self, __pyx_state)
  61616. */
  61617. /* function exit code */
  61618. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  61619. goto __pyx_L0;
  61620. __pyx_L1_error:;
  61621. __Pyx_XDECREF(__pyx_t_1);
  61622. __Pyx_AddTraceback("uvloop.loop.PseudoSocket.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  61623. __pyx_r = NULL;
  61624. __pyx_L0:;
  61625. __Pyx_XGIVEREF(__pyx_r);
  61626. __Pyx_RefNannyFinishContext();
  61627. return __pyx_r;
  61628. }
  61629. /* "uvloop/lru.pyx":31
  61630. * # beginning of it.
  61631. *
  61632. * def __init__(self, *, maxsize): # <<<<<<<<<<<<<<
  61633. * if maxsize <= 0:
  61634. * raise ValueError(
  61635. */
  61636. /* Python wrapper */
  61637. static int __pyx_pw_6uvloop_4loop_8LruCache_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  61638. static int __pyx_pw_6uvloop_4loop_8LruCache_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  61639. PyObject *__pyx_v_maxsize = 0;
  61640. int __pyx_r;
  61641. __Pyx_RefNannyDeclarations
  61642. __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  61643. {
  61644. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_maxsize,0};
  61645. PyObject* values[1] = {0};
  61646. if (likely(__pyx_kwds)) {
  61647. Py_ssize_t kw_args;
  61648. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  61649. switch (pos_args) {
  61650. case 0: break;
  61651. default: goto __pyx_L5_argtuple_error;
  61652. }
  61653. kw_args = PyDict_Size(__pyx_kwds);
  61654. if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_maxsize)) != 0)) kw_args--;
  61655. else {
  61656. __Pyx_RaiseKeywordRequired("__init__", __pyx_n_s_maxsize); __PYX_ERR(0, 31, __pyx_L3_error)
  61657. }
  61658. if (unlikely(kw_args > 0)) {
  61659. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, 0, "__init__") < 0)) __PYX_ERR(0, 31, __pyx_L3_error)
  61660. }
  61661. } else if (PyTuple_GET_SIZE(__pyx_args) != 0) {
  61662. goto __pyx_L5_argtuple_error;
  61663. } else {
  61664. __Pyx_RaiseKeywordRequired("__init__", __pyx_n_s_maxsize); __PYX_ERR(0, 31, __pyx_L3_error)
  61665. }
  61666. __pyx_v_maxsize = values[0];
  61667. }
  61668. goto __pyx_L4_argument_unpacking_done;
  61669. __pyx_L5_argtuple_error:;
  61670. __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 31, __pyx_L3_error)
  61671. __pyx_L3_error:;
  61672. __Pyx_AddTraceback("uvloop.loop.LruCache.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  61673. __Pyx_RefNannyFinishContext();
  61674. return -1;
  61675. __pyx_L4_argument_unpacking_done:;
  61676. __pyx_r = __pyx_pf_6uvloop_4loop_8LruCache___init__(((struct __pyx_obj_6uvloop_4loop_LruCache *)__pyx_v_self), __pyx_v_maxsize);
  61677. /* function exit code */
  61678. __Pyx_RefNannyFinishContext();
  61679. return __pyx_r;
  61680. }
  61681. static int __pyx_pf_6uvloop_4loop_8LruCache___init__(struct __pyx_obj_6uvloop_4loop_LruCache *__pyx_v_self, PyObject *__pyx_v_maxsize) {
  61682. int __pyx_r;
  61683. __Pyx_RefNannyDeclarations
  61684. PyObject *__pyx_t_1 = NULL;
  61685. int __pyx_t_2;
  61686. PyObject *__pyx_t_3 = NULL;
  61687. PyObject *__pyx_t_4 = NULL;
  61688. int __pyx_t_5;
  61689. __Pyx_RefNannySetupContext("__init__", 0);
  61690. /* "uvloop/lru.pyx":32
  61691. *
  61692. * def __init__(self, *, maxsize):
  61693. * if maxsize <= 0: # <<<<<<<<<<<<<<
  61694. * raise ValueError(
  61695. * f'maxsize is expected to be greater than 0, got {maxsize}')
  61696. */
  61697. __pyx_t_1 = PyObject_RichCompare(__pyx_v_maxsize, __pyx_int_0, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 32, __pyx_L1_error)
  61698. __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 32, __pyx_L1_error)
  61699. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  61700. if (unlikely(__pyx_t_2)) {
  61701. /* "uvloop/lru.pyx":34
  61702. * if maxsize <= 0:
  61703. * raise ValueError(
  61704. * f'maxsize is expected to be greater than 0, got {maxsize}') # <<<<<<<<<<<<<<
  61705. *
  61706. * self._dict = col_OrderedDict()
  61707. */
  61708. __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_v_maxsize, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 34, __pyx_L1_error)
  61709. __Pyx_GOTREF(__pyx_t_1);
  61710. __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_kp_u_maxsize_is_expected_to_be_greate, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 34, __pyx_L1_error)
  61711. __Pyx_GOTREF(__pyx_t_3);
  61712. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  61713. /* "uvloop/lru.pyx":33
  61714. * def __init__(self, *, maxsize):
  61715. * if maxsize <= 0:
  61716. * raise ValueError( # <<<<<<<<<<<<<<
  61717. * f'maxsize is expected to be greater than 0, got {maxsize}')
  61718. *
  61719. */
  61720. __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33, __pyx_L1_error)
  61721. __Pyx_GOTREF(__pyx_t_1);
  61722. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  61723. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  61724. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  61725. __PYX_ERR(0, 33, __pyx_L1_error)
  61726. /* "uvloop/lru.pyx":32
  61727. *
  61728. * def __init__(self, *, maxsize):
  61729. * if maxsize <= 0: # <<<<<<<<<<<<<<
  61730. * raise ValueError(
  61731. * f'maxsize is expected to be greater than 0, got {maxsize}')
  61732. */
  61733. }
  61734. /* "uvloop/lru.pyx":36
  61735. * f'maxsize is expected to be greater than 0, got {maxsize}')
  61736. *
  61737. * self._dict = col_OrderedDict() # <<<<<<<<<<<<<<
  61738. * self._dict_move_to_end = self._dict.move_to_end
  61739. * self._dict_get = self._dict.get
  61740. */
  61741. __Pyx_INCREF(__pyx_v_6uvloop_4loop_col_OrderedDict);
  61742. __pyx_t_3 = __pyx_v_6uvloop_4loop_col_OrderedDict; __pyx_t_4 = NULL;
  61743. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
  61744. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
  61745. if (likely(__pyx_t_4)) {
  61746. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  61747. __Pyx_INCREF(__pyx_t_4);
  61748. __Pyx_INCREF(function);
  61749. __Pyx_DECREF_SET(__pyx_t_3, function);
  61750. }
  61751. }
  61752. __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
  61753. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  61754. if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 36, __pyx_L1_error)
  61755. __Pyx_GOTREF(__pyx_t_1);
  61756. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  61757. __Pyx_GIVEREF(__pyx_t_1);
  61758. __Pyx_GOTREF(__pyx_v_self->_dict);
  61759. __Pyx_DECREF(__pyx_v_self->_dict);
  61760. __pyx_v_self->_dict = __pyx_t_1;
  61761. __pyx_t_1 = 0;
  61762. /* "uvloop/lru.pyx":37
  61763. *
  61764. * self._dict = col_OrderedDict()
  61765. * self._dict_move_to_end = self._dict.move_to_end # <<<<<<<<<<<<<<
  61766. * self._dict_get = self._dict.get
  61767. * self._maxsize = maxsize
  61768. */
  61769. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_dict, __pyx_n_s_move_to_end); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 37, __pyx_L1_error)
  61770. __Pyx_GOTREF(__pyx_t_1);
  61771. __Pyx_GIVEREF(__pyx_t_1);
  61772. __Pyx_GOTREF(__pyx_v_self->_dict_move_to_end);
  61773. __Pyx_DECREF(__pyx_v_self->_dict_move_to_end);
  61774. __pyx_v_self->_dict_move_to_end = __pyx_t_1;
  61775. __pyx_t_1 = 0;
  61776. /* "uvloop/lru.pyx":38
  61777. * self._dict = col_OrderedDict()
  61778. * self._dict_move_to_end = self._dict.move_to_end
  61779. * self._dict_get = self._dict.get # <<<<<<<<<<<<<<
  61780. * self._maxsize = maxsize
  61781. *
  61782. */
  61783. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_dict, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 38, __pyx_L1_error)
  61784. __Pyx_GOTREF(__pyx_t_1);
  61785. __Pyx_GIVEREF(__pyx_t_1);
  61786. __Pyx_GOTREF(__pyx_v_self->_dict_get);
  61787. __Pyx_DECREF(__pyx_v_self->_dict_get);
  61788. __pyx_v_self->_dict_get = __pyx_t_1;
  61789. __pyx_t_1 = 0;
  61790. /* "uvloop/lru.pyx":39
  61791. * self._dict_move_to_end = self._dict.move_to_end
  61792. * self._dict_get = self._dict.get
  61793. * self._maxsize = maxsize # <<<<<<<<<<<<<<
  61794. *
  61795. * cdef get(self, key, default):
  61796. */
  61797. __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_maxsize); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 39, __pyx_L1_error)
  61798. __pyx_v_self->_maxsize = __pyx_t_5;
  61799. /* "uvloop/lru.pyx":31
  61800. * # beginning of it.
  61801. *
  61802. * def __init__(self, *, maxsize): # <<<<<<<<<<<<<<
  61803. * if maxsize <= 0:
  61804. * raise ValueError(
  61805. */
  61806. /* function exit code */
  61807. __pyx_r = 0;
  61808. goto __pyx_L0;
  61809. __pyx_L1_error:;
  61810. __Pyx_XDECREF(__pyx_t_1);
  61811. __Pyx_XDECREF(__pyx_t_3);
  61812. __Pyx_XDECREF(__pyx_t_4);
  61813. __Pyx_AddTraceback("uvloop.loop.LruCache.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  61814. __pyx_r = -1;
  61815. __pyx_L0:;
  61816. __Pyx_RefNannyFinishContext();
  61817. return __pyx_r;
  61818. }
  61819. /* "uvloop/lru.pyx":41
  61820. * self._maxsize = maxsize
  61821. *
  61822. * cdef get(self, key, default): # <<<<<<<<<<<<<<
  61823. * o = self._dict_get(key, _LRU_MARKER)
  61824. * if o is _LRU_MARKER:
  61825. */
  61826. static PyObject *__pyx_f_6uvloop_4loop_8LruCache_get(struct __pyx_obj_6uvloop_4loop_LruCache *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_default) {
  61827. PyObject *__pyx_v_o = NULL;
  61828. PyObject *__pyx_r = NULL;
  61829. __Pyx_RefNannyDeclarations
  61830. PyObject *__pyx_t_1 = NULL;
  61831. PyObject *__pyx_t_2 = NULL;
  61832. PyObject *__pyx_t_3 = NULL;
  61833. int __pyx_t_4;
  61834. PyObject *__pyx_t_5 = NULL;
  61835. int __pyx_t_6;
  61836. int __pyx_t_7;
  61837. __Pyx_RefNannySetupContext("get", 0);
  61838. /* "uvloop/lru.pyx":42
  61839. *
  61840. * cdef get(self, key, default):
  61841. * o = self._dict_get(key, _LRU_MARKER) # <<<<<<<<<<<<<<
  61842. * if o is _LRU_MARKER:
  61843. * return default
  61844. */
  61845. __Pyx_INCREF(__pyx_v_self->_dict_get);
  61846. __pyx_t_2 = __pyx_v_self->_dict_get; __pyx_t_3 = NULL;
  61847. __pyx_t_4 = 0;
  61848. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
  61849. __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
  61850. if (likely(__pyx_t_3)) {
  61851. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  61852. __Pyx_INCREF(__pyx_t_3);
  61853. __Pyx_INCREF(function);
  61854. __Pyx_DECREF_SET(__pyx_t_2, function);
  61855. __pyx_t_4 = 1;
  61856. }
  61857. }
  61858. #if CYTHON_FAST_PYCALL
  61859. if (PyFunction_Check(__pyx_t_2)) {
  61860. PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_key, __pyx_v_6uvloop_4loop__LRU_MARKER};
  61861. __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 42, __pyx_L1_error)
  61862. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  61863. __Pyx_GOTREF(__pyx_t_1);
  61864. } else
  61865. #endif
  61866. #if CYTHON_FAST_PYCCALL
  61867. if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
  61868. PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_key, __pyx_v_6uvloop_4loop__LRU_MARKER};
  61869. __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 42, __pyx_L1_error)
  61870. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  61871. __Pyx_GOTREF(__pyx_t_1);
  61872. } else
  61873. #endif
  61874. {
  61875. __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 42, __pyx_L1_error)
  61876. __Pyx_GOTREF(__pyx_t_5);
  61877. if (__pyx_t_3) {
  61878. __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
  61879. }
  61880. __Pyx_INCREF(__pyx_v_key);
  61881. __Pyx_GIVEREF(__pyx_v_key);
  61882. PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_key);
  61883. __Pyx_INCREF(__pyx_v_6uvloop_4loop__LRU_MARKER);
  61884. __Pyx_GIVEREF(__pyx_v_6uvloop_4loop__LRU_MARKER);
  61885. PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_6uvloop_4loop__LRU_MARKER);
  61886. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 42, __pyx_L1_error)
  61887. __Pyx_GOTREF(__pyx_t_1);
  61888. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  61889. }
  61890. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  61891. __pyx_v_o = __pyx_t_1;
  61892. __pyx_t_1 = 0;
  61893. /* "uvloop/lru.pyx":43
  61894. * cdef get(self, key, default):
  61895. * o = self._dict_get(key, _LRU_MARKER)
  61896. * if o is _LRU_MARKER: # <<<<<<<<<<<<<<
  61897. * return default
  61898. * self._dict_move_to_end(key) # last=True
  61899. */
  61900. __pyx_t_6 = (__pyx_v_o == __pyx_v_6uvloop_4loop__LRU_MARKER);
  61901. __pyx_t_7 = (__pyx_t_6 != 0);
  61902. if (__pyx_t_7) {
  61903. /* "uvloop/lru.pyx":44
  61904. * o = self._dict_get(key, _LRU_MARKER)
  61905. * if o is _LRU_MARKER:
  61906. * return default # <<<<<<<<<<<<<<
  61907. * self._dict_move_to_end(key) # last=True
  61908. * return o
  61909. */
  61910. __Pyx_XDECREF(__pyx_r);
  61911. __Pyx_INCREF(__pyx_v_default);
  61912. __pyx_r = __pyx_v_default;
  61913. goto __pyx_L0;
  61914. /* "uvloop/lru.pyx":43
  61915. * cdef get(self, key, default):
  61916. * o = self._dict_get(key, _LRU_MARKER)
  61917. * if o is _LRU_MARKER: # <<<<<<<<<<<<<<
  61918. * return default
  61919. * self._dict_move_to_end(key) # last=True
  61920. */
  61921. }
  61922. /* "uvloop/lru.pyx":45
  61923. * if o is _LRU_MARKER:
  61924. * return default
  61925. * self._dict_move_to_end(key) # last=True # <<<<<<<<<<<<<<
  61926. * return o
  61927. *
  61928. */
  61929. __Pyx_INCREF(__pyx_v_self->_dict_move_to_end);
  61930. __pyx_t_2 = __pyx_v_self->_dict_move_to_end; __pyx_t_5 = NULL;
  61931. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
  61932. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
  61933. if (likely(__pyx_t_5)) {
  61934. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  61935. __Pyx_INCREF(__pyx_t_5);
  61936. __Pyx_INCREF(function);
  61937. __Pyx_DECREF_SET(__pyx_t_2, function);
  61938. }
  61939. }
  61940. __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_v_key) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_key);
  61941. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  61942. if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 45, __pyx_L1_error)
  61943. __Pyx_GOTREF(__pyx_t_1);
  61944. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  61945. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  61946. /* "uvloop/lru.pyx":46
  61947. * return default
  61948. * self._dict_move_to_end(key) # last=True
  61949. * return o # <<<<<<<<<<<<<<
  61950. *
  61951. * cdef inline needs_cleanup(self):
  61952. */
  61953. __Pyx_XDECREF(__pyx_r);
  61954. __Pyx_INCREF(__pyx_v_o);
  61955. __pyx_r = __pyx_v_o;
  61956. goto __pyx_L0;
  61957. /* "uvloop/lru.pyx":41
  61958. * self._maxsize = maxsize
  61959. *
  61960. * cdef get(self, key, default): # <<<<<<<<<<<<<<
  61961. * o = self._dict_get(key, _LRU_MARKER)
  61962. * if o is _LRU_MARKER:
  61963. */
  61964. /* function exit code */
  61965. __pyx_L1_error:;
  61966. __Pyx_XDECREF(__pyx_t_1);
  61967. __Pyx_XDECREF(__pyx_t_2);
  61968. __Pyx_XDECREF(__pyx_t_3);
  61969. __Pyx_XDECREF(__pyx_t_5);
  61970. __Pyx_AddTraceback("uvloop.loop.LruCache.get", __pyx_clineno, __pyx_lineno, __pyx_filename);
  61971. __pyx_r = 0;
  61972. __pyx_L0:;
  61973. __Pyx_XDECREF(__pyx_v_o);
  61974. __Pyx_XGIVEREF(__pyx_r);
  61975. __Pyx_RefNannyFinishContext();
  61976. return __pyx_r;
  61977. }
  61978. /* "uvloop/lru.pyx":48
  61979. * return o
  61980. *
  61981. * cdef inline needs_cleanup(self): # <<<<<<<<<<<<<<
  61982. * return len(self._dict) > self._maxsize
  61983. *
  61984. */
  61985. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8LruCache_needs_cleanup(struct __pyx_obj_6uvloop_4loop_LruCache *__pyx_v_self) {
  61986. PyObject *__pyx_r = NULL;
  61987. __Pyx_RefNannyDeclarations
  61988. PyObject *__pyx_t_1 = NULL;
  61989. Py_ssize_t __pyx_t_2;
  61990. __Pyx_RefNannySetupContext("needs_cleanup", 0);
  61991. /* "uvloop/lru.pyx":49
  61992. *
  61993. * cdef inline needs_cleanup(self):
  61994. * return len(self._dict) > self._maxsize # <<<<<<<<<<<<<<
  61995. *
  61996. * cdef inline cleanup_one(self):
  61997. */
  61998. __Pyx_XDECREF(__pyx_r);
  61999. __pyx_t_1 = __pyx_v_self->_dict;
  62000. __Pyx_INCREF(__pyx_t_1);
  62001. __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 49, __pyx_L1_error)
  62002. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  62003. __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_t_2 > __pyx_v_self->_maxsize)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 49, __pyx_L1_error)
  62004. __Pyx_GOTREF(__pyx_t_1);
  62005. __pyx_r = __pyx_t_1;
  62006. __pyx_t_1 = 0;
  62007. goto __pyx_L0;
  62008. /* "uvloop/lru.pyx":48
  62009. * return o
  62010. *
  62011. * cdef inline needs_cleanup(self): # <<<<<<<<<<<<<<
  62012. * return len(self._dict) > self._maxsize
  62013. *
  62014. */
  62015. /* function exit code */
  62016. __pyx_L1_error:;
  62017. __Pyx_XDECREF(__pyx_t_1);
  62018. __Pyx_AddTraceback("uvloop.loop.LruCache.needs_cleanup", __pyx_clineno, __pyx_lineno, __pyx_filename);
  62019. __pyx_r = 0;
  62020. __pyx_L0:;
  62021. __Pyx_XGIVEREF(__pyx_r);
  62022. __Pyx_RefNannyFinishContext();
  62023. return __pyx_r;
  62024. }
  62025. /* "uvloop/lru.pyx":51
  62026. * return len(self._dict) > self._maxsize
  62027. *
  62028. * cdef inline cleanup_one(self): # <<<<<<<<<<<<<<
  62029. * k, _ = self._dict.popitem(last=False)
  62030. * return k
  62031. */
  62032. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8LruCache_cleanup_one(struct __pyx_obj_6uvloop_4loop_LruCache *__pyx_v_self) {
  62033. PyObject *__pyx_v_k = NULL;
  62034. CYTHON_UNUSED PyObject *__pyx_v__ = NULL;
  62035. PyObject *__pyx_r = NULL;
  62036. __Pyx_RefNannyDeclarations
  62037. PyObject *__pyx_t_1 = NULL;
  62038. PyObject *__pyx_t_2 = NULL;
  62039. PyObject *__pyx_t_3 = NULL;
  62040. PyObject *__pyx_t_4 = NULL;
  62041. PyObject *(*__pyx_t_5)(PyObject *);
  62042. __Pyx_RefNannySetupContext("cleanup_one", 0);
  62043. /* "uvloop/lru.pyx":52
  62044. *
  62045. * cdef inline cleanup_one(self):
  62046. * k, _ = self._dict.popitem(last=False) # <<<<<<<<<<<<<<
  62047. * return k
  62048. *
  62049. */
  62050. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_dict, __pyx_n_s_popitem); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 52, __pyx_L1_error)
  62051. __Pyx_GOTREF(__pyx_t_1);
  62052. __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 52, __pyx_L1_error)
  62053. __Pyx_GOTREF(__pyx_t_2);
  62054. if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_last, Py_False) < 0) __PYX_ERR(0, 52, __pyx_L1_error)
  62055. __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 52, __pyx_L1_error)
  62056. __Pyx_GOTREF(__pyx_t_3);
  62057. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  62058. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  62059. if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) {
  62060. PyObject* sequence = __pyx_t_3;
  62061. Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
  62062. if (unlikely(size != 2)) {
  62063. if (size > 2) __Pyx_RaiseTooManyValuesError(2);
  62064. else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
  62065. __PYX_ERR(0, 52, __pyx_L1_error)
  62066. }
  62067. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  62068. if (likely(PyTuple_CheckExact(sequence))) {
  62069. __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0);
  62070. __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1);
  62071. } else {
  62072. __pyx_t_2 = PyList_GET_ITEM(sequence, 0);
  62073. __pyx_t_1 = PyList_GET_ITEM(sequence, 1);
  62074. }
  62075. __Pyx_INCREF(__pyx_t_2);
  62076. __Pyx_INCREF(__pyx_t_1);
  62077. #else
  62078. __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 52, __pyx_L1_error)
  62079. __Pyx_GOTREF(__pyx_t_2);
  62080. __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 52, __pyx_L1_error)
  62081. __Pyx_GOTREF(__pyx_t_1);
  62082. #endif
  62083. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  62084. } else {
  62085. Py_ssize_t index = -1;
  62086. __pyx_t_4 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 52, __pyx_L1_error)
  62087. __Pyx_GOTREF(__pyx_t_4);
  62088. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  62089. __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext;
  62090. index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
  62091. __Pyx_GOTREF(__pyx_t_2);
  62092. index = 1; __pyx_t_1 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_1)) goto __pyx_L3_unpacking_failed;
  62093. __Pyx_GOTREF(__pyx_t_1);
  62094. if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) __PYX_ERR(0, 52, __pyx_L1_error)
  62095. __pyx_t_5 = NULL;
  62096. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  62097. goto __pyx_L4_unpacking_done;
  62098. __pyx_L3_unpacking_failed:;
  62099. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  62100. __pyx_t_5 = NULL;
  62101. if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
  62102. __PYX_ERR(0, 52, __pyx_L1_error)
  62103. __pyx_L4_unpacking_done:;
  62104. }
  62105. __pyx_v_k = __pyx_t_2;
  62106. __pyx_t_2 = 0;
  62107. __pyx_v__ = __pyx_t_1;
  62108. __pyx_t_1 = 0;
  62109. /* "uvloop/lru.pyx":53
  62110. * cdef inline cleanup_one(self):
  62111. * k, _ = self._dict.popitem(last=False)
  62112. * return k # <<<<<<<<<<<<<<
  62113. *
  62114. * def __getitem__(self, key):
  62115. */
  62116. __Pyx_XDECREF(__pyx_r);
  62117. __Pyx_INCREF(__pyx_v_k);
  62118. __pyx_r = __pyx_v_k;
  62119. goto __pyx_L0;
  62120. /* "uvloop/lru.pyx":51
  62121. * return len(self._dict) > self._maxsize
  62122. *
  62123. * cdef inline cleanup_one(self): # <<<<<<<<<<<<<<
  62124. * k, _ = self._dict.popitem(last=False)
  62125. * return k
  62126. */
  62127. /* function exit code */
  62128. __pyx_L1_error:;
  62129. __Pyx_XDECREF(__pyx_t_1);
  62130. __Pyx_XDECREF(__pyx_t_2);
  62131. __Pyx_XDECREF(__pyx_t_3);
  62132. __Pyx_XDECREF(__pyx_t_4);
  62133. __Pyx_AddTraceback("uvloop.loop.LruCache.cleanup_one", __pyx_clineno, __pyx_lineno, __pyx_filename);
  62134. __pyx_r = 0;
  62135. __pyx_L0:;
  62136. __Pyx_XDECREF(__pyx_v_k);
  62137. __Pyx_XDECREF(__pyx_v__);
  62138. __Pyx_XGIVEREF(__pyx_r);
  62139. __Pyx_RefNannyFinishContext();
  62140. return __pyx_r;
  62141. }
  62142. /* "uvloop/lru.pyx":55
  62143. * return k
  62144. *
  62145. * def __getitem__(self, key): # <<<<<<<<<<<<<<
  62146. * o = self._dict[key]
  62147. * self._dict_move_to_end(key) # last=True
  62148. */
  62149. /* Python wrapper */
  62150. static PyObject *__pyx_pw_6uvloop_4loop_8LruCache_3__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
  62151. static PyObject *__pyx_pw_6uvloop_4loop_8LruCache_3__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
  62152. PyObject *__pyx_r = 0;
  62153. __Pyx_RefNannyDeclarations
  62154. __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
  62155. __pyx_r = __pyx_pf_6uvloop_4loop_8LruCache_2__getitem__(((struct __pyx_obj_6uvloop_4loop_LruCache *)__pyx_v_self), ((PyObject *)__pyx_v_key));
  62156. /* function exit code */
  62157. __Pyx_RefNannyFinishContext();
  62158. return __pyx_r;
  62159. }
  62160. static PyObject *__pyx_pf_6uvloop_4loop_8LruCache_2__getitem__(struct __pyx_obj_6uvloop_4loop_LruCache *__pyx_v_self, PyObject *__pyx_v_key) {
  62161. PyObject *__pyx_v_o = NULL;
  62162. PyObject *__pyx_r = NULL;
  62163. __Pyx_RefNannyDeclarations
  62164. PyObject *__pyx_t_1 = NULL;
  62165. PyObject *__pyx_t_2 = NULL;
  62166. PyObject *__pyx_t_3 = NULL;
  62167. __Pyx_RefNannySetupContext("__getitem__", 0);
  62168. /* "uvloop/lru.pyx":56
  62169. *
  62170. * def __getitem__(self, key):
  62171. * o = self._dict[key] # <<<<<<<<<<<<<<
  62172. * self._dict_move_to_end(key) # last=True
  62173. * return o
  62174. */
  62175. __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_self->_dict, __pyx_v_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 56, __pyx_L1_error)
  62176. __Pyx_GOTREF(__pyx_t_1);
  62177. __pyx_v_o = __pyx_t_1;
  62178. __pyx_t_1 = 0;
  62179. /* "uvloop/lru.pyx":57
  62180. * def __getitem__(self, key):
  62181. * o = self._dict[key]
  62182. * self._dict_move_to_end(key) # last=True # <<<<<<<<<<<<<<
  62183. * return o
  62184. *
  62185. */
  62186. __Pyx_INCREF(__pyx_v_self->_dict_move_to_end);
  62187. __pyx_t_2 = __pyx_v_self->_dict_move_to_end; __pyx_t_3 = NULL;
  62188. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
  62189. __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
  62190. if (likely(__pyx_t_3)) {
  62191. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  62192. __Pyx_INCREF(__pyx_t_3);
  62193. __Pyx_INCREF(function);
  62194. __Pyx_DECREF_SET(__pyx_t_2, function);
  62195. }
  62196. }
  62197. __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_key) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_key);
  62198. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  62199. if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 57, __pyx_L1_error)
  62200. __Pyx_GOTREF(__pyx_t_1);
  62201. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  62202. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  62203. /* "uvloop/lru.pyx":58
  62204. * o = self._dict[key]
  62205. * self._dict_move_to_end(key) # last=True
  62206. * return o # <<<<<<<<<<<<<<
  62207. *
  62208. * def __setitem__(self, key, o):
  62209. */
  62210. __Pyx_XDECREF(__pyx_r);
  62211. __Pyx_INCREF(__pyx_v_o);
  62212. __pyx_r = __pyx_v_o;
  62213. goto __pyx_L0;
  62214. /* "uvloop/lru.pyx":55
  62215. * return k
  62216. *
  62217. * def __getitem__(self, key): # <<<<<<<<<<<<<<
  62218. * o = self._dict[key]
  62219. * self._dict_move_to_end(key) # last=True
  62220. */
  62221. /* function exit code */
  62222. __pyx_L1_error:;
  62223. __Pyx_XDECREF(__pyx_t_1);
  62224. __Pyx_XDECREF(__pyx_t_2);
  62225. __Pyx_XDECREF(__pyx_t_3);
  62226. __Pyx_AddTraceback("uvloop.loop.LruCache.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  62227. __pyx_r = NULL;
  62228. __pyx_L0:;
  62229. __Pyx_XDECREF(__pyx_v_o);
  62230. __Pyx_XGIVEREF(__pyx_r);
  62231. __Pyx_RefNannyFinishContext();
  62232. return __pyx_r;
  62233. }
  62234. /* "uvloop/lru.pyx":60
  62235. * return o
  62236. *
  62237. * def __setitem__(self, key, o): # <<<<<<<<<<<<<<
  62238. * if key in self._dict:
  62239. * self._dict[key] = o
  62240. */
  62241. /* Python wrapper */
  62242. static int __pyx_pw_6uvloop_4loop_8LruCache_5__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_o); /*proto*/
  62243. static int __pyx_pw_6uvloop_4loop_8LruCache_5__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_o) {
  62244. int __pyx_r;
  62245. __Pyx_RefNannyDeclarations
  62246. __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
  62247. __pyx_r = __pyx_pf_6uvloop_4loop_8LruCache_4__setitem__(((struct __pyx_obj_6uvloop_4loop_LruCache *)__pyx_v_self), ((PyObject *)__pyx_v_key), ((PyObject *)__pyx_v_o));
  62248. /* function exit code */
  62249. __Pyx_RefNannyFinishContext();
  62250. return __pyx_r;
  62251. }
  62252. static int __pyx_pf_6uvloop_4loop_8LruCache_4__setitem__(struct __pyx_obj_6uvloop_4loop_LruCache *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_o) {
  62253. int __pyx_r;
  62254. __Pyx_RefNannyDeclarations
  62255. int __pyx_t_1;
  62256. int __pyx_t_2;
  62257. PyObject *__pyx_t_3 = NULL;
  62258. PyObject *__pyx_t_4 = NULL;
  62259. PyObject *__pyx_t_5 = NULL;
  62260. __Pyx_RefNannySetupContext("__setitem__", 0);
  62261. /* "uvloop/lru.pyx":61
  62262. *
  62263. * def __setitem__(self, key, o):
  62264. * if key in self._dict: # <<<<<<<<<<<<<<
  62265. * self._dict[key] = o
  62266. * self._dict_move_to_end(key) # last=True
  62267. */
  62268. __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_v_key, __pyx_v_self->_dict, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 61, __pyx_L1_error)
  62269. __pyx_t_2 = (__pyx_t_1 != 0);
  62270. if (__pyx_t_2) {
  62271. /* "uvloop/lru.pyx":62
  62272. * def __setitem__(self, key, o):
  62273. * if key in self._dict:
  62274. * self._dict[key] = o # <<<<<<<<<<<<<<
  62275. * self._dict_move_to_end(key) # last=True
  62276. * else:
  62277. */
  62278. if (unlikely(PyObject_SetItem(__pyx_v_self->_dict, __pyx_v_key, __pyx_v_o) < 0)) __PYX_ERR(0, 62, __pyx_L1_error)
  62279. /* "uvloop/lru.pyx":63
  62280. * if key in self._dict:
  62281. * self._dict[key] = o
  62282. * self._dict_move_to_end(key) # last=True # <<<<<<<<<<<<<<
  62283. * else:
  62284. * self._dict[key] = o
  62285. */
  62286. __Pyx_INCREF(__pyx_v_self->_dict_move_to_end);
  62287. __pyx_t_4 = __pyx_v_self->_dict_move_to_end; __pyx_t_5 = NULL;
  62288. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
  62289. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
  62290. if (likely(__pyx_t_5)) {
  62291. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  62292. __Pyx_INCREF(__pyx_t_5);
  62293. __Pyx_INCREF(function);
  62294. __Pyx_DECREF_SET(__pyx_t_4, function);
  62295. }
  62296. }
  62297. __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_key) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_key);
  62298. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  62299. if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 63, __pyx_L1_error)
  62300. __Pyx_GOTREF(__pyx_t_3);
  62301. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  62302. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  62303. /* "uvloop/lru.pyx":61
  62304. *
  62305. * def __setitem__(self, key, o):
  62306. * if key in self._dict: # <<<<<<<<<<<<<<
  62307. * self._dict[key] = o
  62308. * self._dict_move_to_end(key) # last=True
  62309. */
  62310. goto __pyx_L3;
  62311. }
  62312. /* "uvloop/lru.pyx":65
  62313. * self._dict_move_to_end(key) # last=True
  62314. * else:
  62315. * self._dict[key] = o # <<<<<<<<<<<<<<
  62316. * while self.needs_cleanup():
  62317. * self.cleanup_one()
  62318. */
  62319. /*else*/ {
  62320. if (unlikely(PyObject_SetItem(__pyx_v_self->_dict, __pyx_v_key, __pyx_v_o) < 0)) __PYX_ERR(0, 65, __pyx_L1_error)
  62321. }
  62322. __pyx_L3:;
  62323. /* "uvloop/lru.pyx":66
  62324. * else:
  62325. * self._dict[key] = o
  62326. * while self.needs_cleanup(): # <<<<<<<<<<<<<<
  62327. * self.cleanup_one()
  62328. *
  62329. */
  62330. while (1) {
  62331. __pyx_t_3 = __pyx_f_6uvloop_4loop_8LruCache_needs_cleanup(__pyx_v_self); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 66, __pyx_L1_error)
  62332. __Pyx_GOTREF(__pyx_t_3);
  62333. __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 66, __pyx_L1_error)
  62334. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  62335. if (!__pyx_t_2) break;
  62336. /* "uvloop/lru.pyx":67
  62337. * self._dict[key] = o
  62338. * while self.needs_cleanup():
  62339. * self.cleanup_one() # <<<<<<<<<<<<<<
  62340. *
  62341. * def __delitem__(self, key):
  62342. */
  62343. __pyx_t_3 = __pyx_f_6uvloop_4loop_8LruCache_cleanup_one(__pyx_v_self); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 67, __pyx_L1_error)
  62344. __Pyx_GOTREF(__pyx_t_3);
  62345. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  62346. }
  62347. /* "uvloop/lru.pyx":60
  62348. * return o
  62349. *
  62350. * def __setitem__(self, key, o): # <<<<<<<<<<<<<<
  62351. * if key in self._dict:
  62352. * self._dict[key] = o
  62353. */
  62354. /* function exit code */
  62355. __pyx_r = 0;
  62356. goto __pyx_L0;
  62357. __pyx_L1_error:;
  62358. __Pyx_XDECREF(__pyx_t_3);
  62359. __Pyx_XDECREF(__pyx_t_4);
  62360. __Pyx_XDECREF(__pyx_t_5);
  62361. __Pyx_AddTraceback("uvloop.loop.LruCache.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  62362. __pyx_r = -1;
  62363. __pyx_L0:;
  62364. __Pyx_RefNannyFinishContext();
  62365. return __pyx_r;
  62366. }
  62367. /* "uvloop/lru.pyx":69
  62368. * self.cleanup_one()
  62369. *
  62370. * def __delitem__(self, key): # <<<<<<<<<<<<<<
  62371. * del self._dict[key]
  62372. *
  62373. */
  62374. /* Python wrapper */
  62375. static int __pyx_pw_6uvloop_4loop_8LruCache_7__delitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
  62376. static int __pyx_pw_6uvloop_4loop_8LruCache_7__delitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
  62377. int __pyx_r;
  62378. __Pyx_RefNannyDeclarations
  62379. __Pyx_RefNannySetupContext("__delitem__ (wrapper)", 0);
  62380. __pyx_r = __pyx_pf_6uvloop_4loop_8LruCache_6__delitem__(((struct __pyx_obj_6uvloop_4loop_LruCache *)__pyx_v_self), ((PyObject *)__pyx_v_key));
  62381. /* function exit code */
  62382. __Pyx_RefNannyFinishContext();
  62383. return __pyx_r;
  62384. }
  62385. static int __pyx_pf_6uvloop_4loop_8LruCache_6__delitem__(struct __pyx_obj_6uvloop_4loop_LruCache *__pyx_v_self, PyObject *__pyx_v_key) {
  62386. int __pyx_r;
  62387. __Pyx_RefNannyDeclarations
  62388. __Pyx_RefNannySetupContext("__delitem__", 0);
  62389. /* "uvloop/lru.pyx":70
  62390. *
  62391. * def __delitem__(self, key):
  62392. * del self._dict[key] # <<<<<<<<<<<<<<
  62393. *
  62394. * def __contains__(self, key):
  62395. */
  62396. if (unlikely(PyObject_DelItem(__pyx_v_self->_dict, __pyx_v_key) < 0)) __PYX_ERR(0, 70, __pyx_L1_error)
  62397. /* "uvloop/lru.pyx":69
  62398. * self.cleanup_one()
  62399. *
  62400. * def __delitem__(self, key): # <<<<<<<<<<<<<<
  62401. * del self._dict[key]
  62402. *
  62403. */
  62404. /* function exit code */
  62405. __pyx_r = 0;
  62406. goto __pyx_L0;
  62407. __pyx_L1_error:;
  62408. __Pyx_AddTraceback("uvloop.loop.LruCache.__delitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  62409. __pyx_r = -1;
  62410. __pyx_L0:;
  62411. __Pyx_RefNannyFinishContext();
  62412. return __pyx_r;
  62413. }
  62414. /* "uvloop/lru.pyx":72
  62415. * del self._dict[key]
  62416. *
  62417. * def __contains__(self, key): # <<<<<<<<<<<<<<
  62418. * return key in self._dict
  62419. *
  62420. */
  62421. /* Python wrapper */
  62422. static int __pyx_pw_6uvloop_4loop_8LruCache_9__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
  62423. static int __pyx_pw_6uvloop_4loop_8LruCache_9__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
  62424. int __pyx_r;
  62425. __Pyx_RefNannyDeclarations
  62426. __Pyx_RefNannySetupContext("__contains__ (wrapper)", 0);
  62427. __pyx_r = __pyx_pf_6uvloop_4loop_8LruCache_8__contains__(((struct __pyx_obj_6uvloop_4loop_LruCache *)__pyx_v_self), ((PyObject *)__pyx_v_key));
  62428. /* function exit code */
  62429. __Pyx_RefNannyFinishContext();
  62430. return __pyx_r;
  62431. }
  62432. static int __pyx_pf_6uvloop_4loop_8LruCache_8__contains__(struct __pyx_obj_6uvloop_4loop_LruCache *__pyx_v_self, PyObject *__pyx_v_key) {
  62433. int __pyx_r;
  62434. __Pyx_RefNannyDeclarations
  62435. int __pyx_t_1;
  62436. __Pyx_RefNannySetupContext("__contains__", 0);
  62437. /* "uvloop/lru.pyx":73
  62438. *
  62439. * def __contains__(self, key):
  62440. * return key in self._dict # <<<<<<<<<<<<<<
  62441. *
  62442. * def __len__(self):
  62443. */
  62444. __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_v_key, __pyx_v_self->_dict, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 73, __pyx_L1_error)
  62445. __pyx_r = __pyx_t_1;
  62446. goto __pyx_L0;
  62447. /* "uvloop/lru.pyx":72
  62448. * del self._dict[key]
  62449. *
  62450. * def __contains__(self, key): # <<<<<<<<<<<<<<
  62451. * return key in self._dict
  62452. *
  62453. */
  62454. /* function exit code */
  62455. __pyx_L1_error:;
  62456. __Pyx_AddTraceback("uvloop.loop.LruCache.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  62457. __pyx_r = -1;
  62458. __pyx_L0:;
  62459. __Pyx_RefNannyFinishContext();
  62460. return __pyx_r;
  62461. }
  62462. /* "uvloop/lru.pyx":75
  62463. * return key in self._dict
  62464. *
  62465. * def __len__(self): # <<<<<<<<<<<<<<
  62466. * return len(self._dict)
  62467. *
  62468. */
  62469. /* Python wrapper */
  62470. static Py_ssize_t __pyx_pw_6uvloop_4loop_8LruCache_11__len__(PyObject *__pyx_v_self); /*proto*/
  62471. static Py_ssize_t __pyx_pw_6uvloop_4loop_8LruCache_11__len__(PyObject *__pyx_v_self) {
  62472. Py_ssize_t __pyx_r;
  62473. __Pyx_RefNannyDeclarations
  62474. __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
  62475. __pyx_r = __pyx_pf_6uvloop_4loop_8LruCache_10__len__(((struct __pyx_obj_6uvloop_4loop_LruCache *)__pyx_v_self));
  62476. /* function exit code */
  62477. __Pyx_RefNannyFinishContext();
  62478. return __pyx_r;
  62479. }
  62480. static Py_ssize_t __pyx_pf_6uvloop_4loop_8LruCache_10__len__(struct __pyx_obj_6uvloop_4loop_LruCache *__pyx_v_self) {
  62481. Py_ssize_t __pyx_r;
  62482. __Pyx_RefNannyDeclarations
  62483. PyObject *__pyx_t_1 = NULL;
  62484. Py_ssize_t __pyx_t_2;
  62485. __Pyx_RefNannySetupContext("__len__", 0);
  62486. /* "uvloop/lru.pyx":76
  62487. *
  62488. * def __len__(self):
  62489. * return len(self._dict) # <<<<<<<<<<<<<<
  62490. *
  62491. * def __iter__(self):
  62492. */
  62493. __pyx_t_1 = __pyx_v_self->_dict;
  62494. __Pyx_INCREF(__pyx_t_1);
  62495. __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 76, __pyx_L1_error)
  62496. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  62497. __pyx_r = __pyx_t_2;
  62498. goto __pyx_L0;
  62499. /* "uvloop/lru.pyx":75
  62500. * return key in self._dict
  62501. *
  62502. * def __len__(self): # <<<<<<<<<<<<<<
  62503. * return len(self._dict)
  62504. *
  62505. */
  62506. /* function exit code */
  62507. __pyx_L1_error:;
  62508. __Pyx_XDECREF(__pyx_t_1);
  62509. __Pyx_AddTraceback("uvloop.loop.LruCache.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  62510. __pyx_r = -1;
  62511. __pyx_L0:;
  62512. __Pyx_RefNannyFinishContext();
  62513. return __pyx_r;
  62514. }
  62515. /* "uvloop/lru.pyx":78
  62516. * return len(self._dict)
  62517. *
  62518. * def __iter__(self): # <<<<<<<<<<<<<<
  62519. * return iter(self._dict)
  62520. */
  62521. /* Python wrapper */
  62522. static PyObject *__pyx_pw_6uvloop_4loop_8LruCache_13__iter__(PyObject *__pyx_v_self); /*proto*/
  62523. static PyObject *__pyx_pw_6uvloop_4loop_8LruCache_13__iter__(PyObject *__pyx_v_self) {
  62524. PyObject *__pyx_r = 0;
  62525. __Pyx_RefNannyDeclarations
  62526. __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
  62527. __pyx_r = __pyx_pf_6uvloop_4loop_8LruCache_12__iter__(((struct __pyx_obj_6uvloop_4loop_LruCache *)__pyx_v_self));
  62528. /* function exit code */
  62529. __Pyx_RefNannyFinishContext();
  62530. return __pyx_r;
  62531. }
  62532. static PyObject *__pyx_pf_6uvloop_4loop_8LruCache_12__iter__(struct __pyx_obj_6uvloop_4loop_LruCache *__pyx_v_self) {
  62533. PyObject *__pyx_r = NULL;
  62534. __Pyx_RefNannyDeclarations
  62535. PyObject *__pyx_t_1 = NULL;
  62536. PyObject *__pyx_t_2 = NULL;
  62537. __Pyx_RefNannySetupContext("__iter__", 0);
  62538. /* "uvloop/lru.pyx":79
  62539. *
  62540. * def __iter__(self):
  62541. * return iter(self._dict) # <<<<<<<<<<<<<<
  62542. */
  62543. __Pyx_XDECREF(__pyx_r);
  62544. __pyx_t_1 = __pyx_v_self->_dict;
  62545. __Pyx_INCREF(__pyx_t_1);
  62546. __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 79, __pyx_L1_error)
  62547. __Pyx_GOTREF(__pyx_t_2);
  62548. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  62549. __pyx_r = __pyx_t_2;
  62550. __pyx_t_2 = 0;
  62551. goto __pyx_L0;
  62552. /* "uvloop/lru.pyx":78
  62553. * return len(self._dict)
  62554. *
  62555. * def __iter__(self): # <<<<<<<<<<<<<<
  62556. * return iter(self._dict)
  62557. */
  62558. /* function exit code */
  62559. __pyx_L1_error:;
  62560. __Pyx_XDECREF(__pyx_t_1);
  62561. __Pyx_XDECREF(__pyx_t_2);
  62562. __Pyx_AddTraceback("uvloop.loop.LruCache.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  62563. __pyx_r = NULL;
  62564. __pyx_L0:;
  62565. __Pyx_XGIVEREF(__pyx_r);
  62566. __Pyx_RefNannyFinishContext();
  62567. return __pyx_r;
  62568. }
  62569. /* "(tree fragment)":1
  62570. * def __reduce_cython__(self): # <<<<<<<<<<<<<<
  62571. * cdef tuple state
  62572. * cdef object _dict
  62573. */
  62574. /* Python wrapper */
  62575. static PyObject *__pyx_pw_6uvloop_4loop_8LruCache_15__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  62576. static char __pyx_doc_6uvloop_4loop_8LruCache_14__reduce_cython__[] = "LruCache.__reduce_cython__(self)";
  62577. static PyObject *__pyx_pw_6uvloop_4loop_8LruCache_15__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  62578. PyObject *__pyx_r = 0;
  62579. __Pyx_RefNannyDeclarations
  62580. __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  62581. __pyx_r = __pyx_pf_6uvloop_4loop_8LruCache_14__reduce_cython__(((struct __pyx_obj_6uvloop_4loop_LruCache *)__pyx_v_self));
  62582. /* function exit code */
  62583. __Pyx_RefNannyFinishContext();
  62584. return __pyx_r;
  62585. }
  62586. static PyObject *__pyx_pf_6uvloop_4loop_8LruCache_14__reduce_cython__(struct __pyx_obj_6uvloop_4loop_LruCache *__pyx_v_self) {
  62587. PyObject *__pyx_v_state = 0;
  62588. PyObject *__pyx_v__dict = 0;
  62589. int __pyx_v_use_setstate;
  62590. PyObject *__pyx_r = NULL;
  62591. __Pyx_RefNannyDeclarations
  62592. PyObject *__pyx_t_1 = NULL;
  62593. PyObject *__pyx_t_2 = NULL;
  62594. int __pyx_t_3;
  62595. int __pyx_t_4;
  62596. int __pyx_t_5;
  62597. PyObject *__pyx_t_6 = NULL;
  62598. __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  62599. /* "(tree fragment)":5
  62600. * cdef object _dict
  62601. * cdef bint use_setstate
  62602. * state = (self._dict, self._dict_get, self._dict_move_to_end, self._maxsize) # <<<<<<<<<<<<<<
  62603. * _dict = getattr(self, '__dict__', None)
  62604. * if _dict is not None:
  62605. */
  62606. __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_maxsize); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 5, __pyx_L1_error)
  62607. __Pyx_GOTREF(__pyx_t_1);
  62608. __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 5, __pyx_L1_error)
  62609. __Pyx_GOTREF(__pyx_t_2);
  62610. __Pyx_INCREF(__pyx_v_self->_dict);
  62611. __Pyx_GIVEREF(__pyx_v_self->_dict);
  62612. PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self->_dict);
  62613. __Pyx_INCREF(__pyx_v_self->_dict_get);
  62614. __Pyx_GIVEREF(__pyx_v_self->_dict_get);
  62615. PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_self->_dict_get);
  62616. __Pyx_INCREF(__pyx_v_self->_dict_move_to_end);
  62617. __Pyx_GIVEREF(__pyx_v_self->_dict_move_to_end);
  62618. PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_self->_dict_move_to_end);
  62619. __Pyx_GIVEREF(__pyx_t_1);
  62620. PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_1);
  62621. __pyx_t_1 = 0;
  62622. __pyx_v_state = ((PyObject*)__pyx_t_2);
  62623. __pyx_t_2 = 0;
  62624. /* "(tree fragment)":6
  62625. * cdef bint use_setstate
  62626. * state = (self._dict, self._dict_get, self._dict_move_to_end, self._maxsize)
  62627. * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
  62628. * if _dict is not None:
  62629. * state += (_dict,)
  62630. */
  62631. __pyx_t_2 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 6, __pyx_L1_error)
  62632. __Pyx_GOTREF(__pyx_t_2);
  62633. __pyx_v__dict = __pyx_t_2;
  62634. __pyx_t_2 = 0;
  62635. /* "(tree fragment)":7
  62636. * state = (self._dict, self._dict_get, self._dict_move_to_end, self._maxsize)
  62637. * _dict = getattr(self, '__dict__', None)
  62638. * if _dict is not None: # <<<<<<<<<<<<<<
  62639. * state += (_dict,)
  62640. * use_setstate = True
  62641. */
  62642. __pyx_t_3 = (__pyx_v__dict != Py_None);
  62643. __pyx_t_4 = (__pyx_t_3 != 0);
  62644. if (__pyx_t_4) {
  62645. /* "(tree fragment)":8
  62646. * _dict = getattr(self, '__dict__', None)
  62647. * if _dict is not None:
  62648. * state += (_dict,) # <<<<<<<<<<<<<<
  62649. * use_setstate = True
  62650. * else:
  62651. */
  62652. __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 8, __pyx_L1_error)
  62653. __Pyx_GOTREF(__pyx_t_2);
  62654. __Pyx_INCREF(__pyx_v__dict);
  62655. __Pyx_GIVEREF(__pyx_v__dict);
  62656. PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v__dict);
  62657. __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 8, __pyx_L1_error)
  62658. __Pyx_GOTREF(__pyx_t_1);
  62659. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  62660. __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_1));
  62661. __pyx_t_1 = 0;
  62662. /* "(tree fragment)":9
  62663. * if _dict is not None:
  62664. * state += (_dict,)
  62665. * use_setstate = True # <<<<<<<<<<<<<<
  62666. * else:
  62667. * use_setstate = self._dict is not None or self._dict_get is not None or self._dict_move_to_end is not None
  62668. */
  62669. __pyx_v_use_setstate = 1;
  62670. /* "(tree fragment)":7
  62671. * state = (self._dict, self._dict_get, self._dict_move_to_end, self._maxsize)
  62672. * _dict = getattr(self, '__dict__', None)
  62673. * if _dict is not None: # <<<<<<<<<<<<<<
  62674. * state += (_dict,)
  62675. * use_setstate = True
  62676. */
  62677. goto __pyx_L3;
  62678. }
  62679. /* "(tree fragment)":11
  62680. * use_setstate = True
  62681. * else:
  62682. * use_setstate = self._dict is not None or self._dict_get is not None or self._dict_move_to_end is not None # <<<<<<<<<<<<<<
  62683. * if use_setstate:
  62684. * return __pyx_unpickle_LruCache, (type(self), 0x53368d7, None), state
  62685. */
  62686. /*else*/ {
  62687. __pyx_t_3 = (__pyx_v_self->_dict != Py_None);
  62688. __pyx_t_5 = (__pyx_t_3 != 0);
  62689. if (!__pyx_t_5) {
  62690. } else {
  62691. __pyx_t_4 = __pyx_t_5;
  62692. goto __pyx_L4_bool_binop_done;
  62693. }
  62694. __pyx_t_5 = (__pyx_v_self->_dict_get != Py_None);
  62695. __pyx_t_3 = (__pyx_t_5 != 0);
  62696. if (!__pyx_t_3) {
  62697. } else {
  62698. __pyx_t_4 = __pyx_t_3;
  62699. goto __pyx_L4_bool_binop_done;
  62700. }
  62701. __pyx_t_3 = (__pyx_v_self->_dict_move_to_end != Py_None);
  62702. __pyx_t_5 = (__pyx_t_3 != 0);
  62703. __pyx_t_4 = __pyx_t_5;
  62704. __pyx_L4_bool_binop_done:;
  62705. __pyx_v_use_setstate = __pyx_t_4;
  62706. }
  62707. __pyx_L3:;
  62708. /* "(tree fragment)":12
  62709. * else:
  62710. * use_setstate = self._dict is not None or self._dict_get is not None or self._dict_move_to_end is not None
  62711. * if use_setstate: # <<<<<<<<<<<<<<
  62712. * return __pyx_unpickle_LruCache, (type(self), 0x53368d7, None), state
  62713. * else:
  62714. */
  62715. __pyx_t_4 = (__pyx_v_use_setstate != 0);
  62716. if (__pyx_t_4) {
  62717. /* "(tree fragment)":13
  62718. * use_setstate = self._dict is not None or self._dict_get is not None or self._dict_move_to_end is not None
  62719. * if use_setstate:
  62720. * return __pyx_unpickle_LruCache, (type(self), 0x53368d7, None), state # <<<<<<<<<<<<<<
  62721. * else:
  62722. * return __pyx_unpickle_LruCache, (type(self), 0x53368d7, state)
  62723. */
  62724. __Pyx_XDECREF(__pyx_r);
  62725. __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_LruCache); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 13, __pyx_L1_error)
  62726. __Pyx_GOTREF(__pyx_t_1);
  62727. __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 13, __pyx_L1_error)
  62728. __Pyx_GOTREF(__pyx_t_2);
  62729. __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
  62730. __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
  62731. PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
  62732. __Pyx_INCREF(__pyx_int_87255255);
  62733. __Pyx_GIVEREF(__pyx_int_87255255);
  62734. PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_87255255);
  62735. __Pyx_INCREF(Py_None);
  62736. __Pyx_GIVEREF(Py_None);
  62737. PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None);
  62738. __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(9, 13, __pyx_L1_error)
  62739. __Pyx_GOTREF(__pyx_t_6);
  62740. __Pyx_GIVEREF(__pyx_t_1);
  62741. PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
  62742. __Pyx_GIVEREF(__pyx_t_2);
  62743. PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_2);
  62744. __Pyx_INCREF(__pyx_v_state);
  62745. __Pyx_GIVEREF(__pyx_v_state);
  62746. PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
  62747. __pyx_t_1 = 0;
  62748. __pyx_t_2 = 0;
  62749. __pyx_r = __pyx_t_6;
  62750. __pyx_t_6 = 0;
  62751. goto __pyx_L0;
  62752. /* "(tree fragment)":12
  62753. * else:
  62754. * use_setstate = self._dict is not None or self._dict_get is not None or self._dict_move_to_end is not None
  62755. * if use_setstate: # <<<<<<<<<<<<<<
  62756. * return __pyx_unpickle_LruCache, (type(self), 0x53368d7, None), state
  62757. * else:
  62758. */
  62759. }
  62760. /* "(tree fragment)":15
  62761. * return __pyx_unpickle_LruCache, (type(self), 0x53368d7, None), state
  62762. * else:
  62763. * return __pyx_unpickle_LruCache, (type(self), 0x53368d7, state) # <<<<<<<<<<<<<<
  62764. * def __setstate_cython__(self, __pyx_state):
  62765. * __pyx_unpickle_LruCache__set_state(self, __pyx_state)
  62766. */
  62767. /*else*/ {
  62768. __Pyx_XDECREF(__pyx_r);
  62769. __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_LruCache); if (unlikely(!__pyx_t_6)) __PYX_ERR(9, 15, __pyx_L1_error)
  62770. __Pyx_GOTREF(__pyx_t_6);
  62771. __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 15, __pyx_L1_error)
  62772. __Pyx_GOTREF(__pyx_t_2);
  62773. __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
  62774. __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
  62775. PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
  62776. __Pyx_INCREF(__pyx_int_87255255);
  62777. __Pyx_GIVEREF(__pyx_int_87255255);
  62778. PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_87255255);
  62779. __Pyx_INCREF(__pyx_v_state);
  62780. __Pyx_GIVEREF(__pyx_v_state);
  62781. PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state);
  62782. __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 15, __pyx_L1_error)
  62783. __Pyx_GOTREF(__pyx_t_1);
  62784. __Pyx_GIVEREF(__pyx_t_6);
  62785. PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6);
  62786. __Pyx_GIVEREF(__pyx_t_2);
  62787. PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
  62788. __pyx_t_6 = 0;
  62789. __pyx_t_2 = 0;
  62790. __pyx_r = __pyx_t_1;
  62791. __pyx_t_1 = 0;
  62792. goto __pyx_L0;
  62793. }
  62794. /* "(tree fragment)":1
  62795. * def __reduce_cython__(self): # <<<<<<<<<<<<<<
  62796. * cdef tuple state
  62797. * cdef object _dict
  62798. */
  62799. /* function exit code */
  62800. __pyx_L1_error:;
  62801. __Pyx_XDECREF(__pyx_t_1);
  62802. __Pyx_XDECREF(__pyx_t_2);
  62803. __Pyx_XDECREF(__pyx_t_6);
  62804. __Pyx_AddTraceback("uvloop.loop.LruCache.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  62805. __pyx_r = NULL;
  62806. __pyx_L0:;
  62807. __Pyx_XDECREF(__pyx_v_state);
  62808. __Pyx_XDECREF(__pyx_v__dict);
  62809. __Pyx_XGIVEREF(__pyx_r);
  62810. __Pyx_RefNannyFinishContext();
  62811. return __pyx_r;
  62812. }
  62813. /* "(tree fragment)":16
  62814. * else:
  62815. * return __pyx_unpickle_LruCache, (type(self), 0x53368d7, state)
  62816. * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
  62817. * __pyx_unpickle_LruCache__set_state(self, __pyx_state)
  62818. */
  62819. /* Python wrapper */
  62820. static PyObject *__pyx_pw_6uvloop_4loop_8LruCache_17__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
  62821. static char __pyx_doc_6uvloop_4loop_8LruCache_16__setstate_cython__[] = "LruCache.__setstate_cython__(self, __pyx_state)";
  62822. static PyObject *__pyx_pw_6uvloop_4loop_8LruCache_17__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  62823. PyObject *__pyx_r = 0;
  62824. __Pyx_RefNannyDeclarations
  62825. __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  62826. __pyx_r = __pyx_pf_6uvloop_4loop_8LruCache_16__setstate_cython__(((struct __pyx_obj_6uvloop_4loop_LruCache *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
  62827. /* function exit code */
  62828. __Pyx_RefNannyFinishContext();
  62829. return __pyx_r;
  62830. }
  62831. static PyObject *__pyx_pf_6uvloop_4loop_8LruCache_16__setstate_cython__(struct __pyx_obj_6uvloop_4loop_LruCache *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  62832. PyObject *__pyx_r = NULL;
  62833. __Pyx_RefNannyDeclarations
  62834. PyObject *__pyx_t_1 = NULL;
  62835. __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  62836. /* "(tree fragment)":17
  62837. * return __pyx_unpickle_LruCache, (type(self), 0x53368d7, state)
  62838. * def __setstate_cython__(self, __pyx_state):
  62839. * __pyx_unpickle_LruCache__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
  62840. */
  62841. if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(9, 17, __pyx_L1_error)
  62842. __pyx_t_1 = __pyx_f_6uvloop_4loop___pyx_unpickle_LruCache__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 17, __pyx_L1_error)
  62843. __Pyx_GOTREF(__pyx_t_1);
  62844. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  62845. /* "(tree fragment)":16
  62846. * else:
  62847. * return __pyx_unpickle_LruCache, (type(self), 0x53368d7, state)
  62848. * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
  62849. * __pyx_unpickle_LruCache__set_state(self, __pyx_state)
  62850. */
  62851. /* function exit code */
  62852. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  62853. goto __pyx_L0;
  62854. __pyx_L1_error:;
  62855. __Pyx_XDECREF(__pyx_t_1);
  62856. __Pyx_AddTraceback("uvloop.loop.LruCache.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  62857. __pyx_r = NULL;
  62858. __pyx_L0:;
  62859. __Pyx_XGIVEREF(__pyx_r);
  62860. __Pyx_RefNannyFinishContext();
  62861. return __pyx_r;
  62862. }
  62863. /* "uvloop/handles/handle.pyx":14
  62864. * """
  62865. *
  62866. * def __cinit__(self): # <<<<<<<<<<<<<<
  62867. * self._closed = 0
  62868. * self._inited = 0
  62869. */
  62870. /* Python wrapper */
  62871. static int __pyx_pw_6uvloop_4loop_8UVHandle_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  62872. static int __pyx_pw_6uvloop_4loop_8UVHandle_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  62873. int __pyx_r;
  62874. __Pyx_RefNannyDeclarations
  62875. __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  62876. if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
  62877. __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  62878. if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
  62879. __pyx_r = __pyx_pf_6uvloop_4loop_8UVHandle___cinit__(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self));
  62880. /* function exit code */
  62881. __Pyx_RefNannyFinishContext();
  62882. return __pyx_r;
  62883. }
  62884. static int __pyx_pf_6uvloop_4loop_8UVHandle___cinit__(struct __pyx_obj_6uvloop_4loop_UVHandle *__pyx_v_self) {
  62885. int __pyx_r;
  62886. __Pyx_RefNannyDeclarations
  62887. __Pyx_RefNannySetupContext("__cinit__", 0);
  62888. /* "uvloop/handles/handle.pyx":15
  62889. *
  62890. * def __cinit__(self):
  62891. * self._closed = 0 # <<<<<<<<<<<<<<
  62892. * self._inited = 0
  62893. * self._has_handle = 1
  62894. */
  62895. __pyx_v_self->_closed = 0;
  62896. /* "uvloop/handles/handle.pyx":16
  62897. * def __cinit__(self):
  62898. * self._closed = 0
  62899. * self._inited = 0 # <<<<<<<<<<<<<<
  62900. * self._has_handle = 1
  62901. * self._handle = NULL
  62902. */
  62903. __pyx_v_self->_inited = 0;
  62904. /* "uvloop/handles/handle.pyx":17
  62905. * self._closed = 0
  62906. * self._inited = 0
  62907. * self._has_handle = 1 # <<<<<<<<<<<<<<
  62908. * self._handle = NULL
  62909. * self._loop = None
  62910. */
  62911. __pyx_v_self->_has_handle = 1;
  62912. /* "uvloop/handles/handle.pyx":18
  62913. * self._inited = 0
  62914. * self._has_handle = 1
  62915. * self._handle = NULL # <<<<<<<<<<<<<<
  62916. * self._loop = None
  62917. * self._source_traceback = None
  62918. */
  62919. __pyx_v_self->_handle = NULL;
  62920. /* "uvloop/handles/handle.pyx":19
  62921. * self._has_handle = 1
  62922. * self._handle = NULL
  62923. * self._loop = None # <<<<<<<<<<<<<<
  62924. * self._source_traceback = None
  62925. *
  62926. */
  62927. __Pyx_INCREF(Py_None);
  62928. __Pyx_GIVEREF(Py_None);
  62929. __Pyx_GOTREF(__pyx_v_self->_loop);
  62930. __Pyx_DECREF(((PyObject *)__pyx_v_self->_loop));
  62931. __pyx_v_self->_loop = ((struct __pyx_obj_6uvloop_4loop_Loop *)Py_None);
  62932. /* "uvloop/handles/handle.pyx":20
  62933. * self._handle = NULL
  62934. * self._loop = None
  62935. * self._source_traceback = None # <<<<<<<<<<<<<<
  62936. *
  62937. * def __init__(self):
  62938. */
  62939. __Pyx_INCREF(Py_None);
  62940. __Pyx_GIVEREF(Py_None);
  62941. __Pyx_GOTREF(__pyx_v_self->_source_traceback);
  62942. __Pyx_DECREF(__pyx_v_self->_source_traceback);
  62943. __pyx_v_self->_source_traceback = Py_None;
  62944. /* "uvloop/handles/handle.pyx":14
  62945. * """
  62946. *
  62947. * def __cinit__(self): # <<<<<<<<<<<<<<
  62948. * self._closed = 0
  62949. * self._inited = 0
  62950. */
  62951. /* function exit code */
  62952. __pyx_r = 0;
  62953. __Pyx_RefNannyFinishContext();
  62954. return __pyx_r;
  62955. }
  62956. /* "uvloop/handles/handle.pyx":22
  62957. * self._source_traceback = None
  62958. *
  62959. * def __init__(self): # <<<<<<<<<<<<<<
  62960. * raise TypeError(
  62961. * '{} is not supposed to be instantiated from Python'.format(
  62962. */
  62963. /* Python wrapper */
  62964. static int __pyx_pw_6uvloop_4loop_8UVHandle_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  62965. static int __pyx_pw_6uvloop_4loop_8UVHandle_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  62966. int __pyx_r;
  62967. __Pyx_RefNannyDeclarations
  62968. __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  62969. if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
  62970. __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  62971. if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1;
  62972. __pyx_r = __pyx_pf_6uvloop_4loop_8UVHandle_2__init__(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self));
  62973. /* function exit code */
  62974. __Pyx_RefNannyFinishContext();
  62975. return __pyx_r;
  62976. }
  62977. static int __pyx_pf_6uvloop_4loop_8UVHandle_2__init__(struct __pyx_obj_6uvloop_4loop_UVHandle *__pyx_v_self) {
  62978. int __pyx_r;
  62979. __Pyx_RefNannyDeclarations
  62980. PyObject *__pyx_t_1 = NULL;
  62981. PyObject *__pyx_t_2 = NULL;
  62982. PyObject *__pyx_t_3 = NULL;
  62983. PyObject *__pyx_t_4 = NULL;
  62984. __Pyx_RefNannySetupContext("__init__", 0);
  62985. /* "uvloop/handles/handle.pyx":24
  62986. * def __init__(self):
  62987. * raise TypeError(
  62988. * '{} is not supposed to be instantiated from Python'.format( # <<<<<<<<<<<<<<
  62989. * self.__class__.__name__))
  62990. *
  62991. */
  62992. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_is_not_supposed_to_be_instantia, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 24, __pyx_L1_error)
  62993. __Pyx_GOTREF(__pyx_t_2);
  62994. /* "uvloop/handles/handle.pyx":25
  62995. * raise TypeError(
  62996. * '{} is not supposed to be instantiated from Python'.format(
  62997. * self.__class__.__name__)) # <<<<<<<<<<<<<<
  62998. *
  62999. * def __dealloc__(self):
  63000. */
  63001. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 25, __pyx_L1_error)
  63002. __Pyx_GOTREF(__pyx_t_3);
  63003. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 25, __pyx_L1_error)
  63004. __Pyx_GOTREF(__pyx_t_4);
  63005. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  63006. __pyx_t_3 = NULL;
  63007. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
  63008. __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
  63009. if (likely(__pyx_t_3)) {
  63010. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  63011. __Pyx_INCREF(__pyx_t_3);
  63012. __Pyx_INCREF(function);
  63013. __Pyx_DECREF_SET(__pyx_t_2, function);
  63014. }
  63015. }
  63016. __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
  63017. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  63018. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  63019. if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 24, __pyx_L1_error)
  63020. __Pyx_GOTREF(__pyx_t_1);
  63021. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  63022. /* "uvloop/handles/handle.pyx":23
  63023. *
  63024. * def __init__(self):
  63025. * raise TypeError( # <<<<<<<<<<<<<<
  63026. * '{} is not supposed to be instantiated from Python'.format(
  63027. * self.__class__.__name__))
  63028. */
  63029. __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 23, __pyx_L1_error)
  63030. __Pyx_GOTREF(__pyx_t_2);
  63031. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  63032. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  63033. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  63034. __PYX_ERR(4, 23, __pyx_L1_error)
  63035. /* "uvloop/handles/handle.pyx":22
  63036. * self._source_traceback = None
  63037. *
  63038. * def __init__(self): # <<<<<<<<<<<<<<
  63039. * raise TypeError(
  63040. * '{} is not supposed to be instantiated from Python'.format(
  63041. */
  63042. /* function exit code */
  63043. __pyx_L1_error:;
  63044. __Pyx_XDECREF(__pyx_t_1);
  63045. __Pyx_XDECREF(__pyx_t_2);
  63046. __Pyx_XDECREF(__pyx_t_3);
  63047. __Pyx_XDECREF(__pyx_t_4);
  63048. __Pyx_AddTraceback("uvloop.loop.UVHandle.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  63049. __pyx_r = -1;
  63050. __Pyx_RefNannyFinishContext();
  63051. return __pyx_r;
  63052. }
  63053. /* "uvloop/handles/handle.pyx":27
  63054. * self.__class__.__name__))
  63055. *
  63056. * def __dealloc__(self): # <<<<<<<<<<<<<<
  63057. * if UVLOOP_DEBUG:
  63058. * if self._loop is not None:
  63059. */
  63060. /* Python wrapper */
  63061. static void __pyx_pw_6uvloop_4loop_8UVHandle_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
  63062. static void __pyx_pw_6uvloop_4loop_8UVHandle_5__dealloc__(PyObject *__pyx_v_self) {
  63063. __Pyx_RefNannyDeclarations
  63064. __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  63065. __pyx_pf_6uvloop_4loop_8UVHandle_4__dealloc__(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self));
  63066. /* function exit code */
  63067. __Pyx_RefNannyFinishContext();
  63068. }
  63069. static void __pyx_pf_6uvloop_4loop_8UVHandle_4__dealloc__(struct __pyx_obj_6uvloop_4loop_UVHandle *__pyx_v_self) {
  63070. __Pyx_RefNannyDeclarations
  63071. int __pyx_t_1;
  63072. int __pyx_t_2;
  63073. PyObject *__pyx_t_3 = NULL;
  63074. PyObject *__pyx_t_4 = NULL;
  63075. PyObject *__pyx_t_5 = NULL;
  63076. PyObject *__pyx_t_6 = NULL;
  63077. __Pyx_RefNannySetupContext("__dealloc__", 0);
  63078. /* "uvloop/handles/handle.pyx":28
  63079. *
  63080. * def __dealloc__(self):
  63081. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  63082. * if self._loop is not None:
  63083. * if self._inited:
  63084. */
  63085. __pyx_t_1 = (UVLOOP_DEBUG != 0);
  63086. if (__pyx_t_1) {
  63087. /* "uvloop/handles/handle.pyx":29
  63088. * def __dealloc__(self):
  63089. * if UVLOOP_DEBUG:
  63090. * if self._loop is not None: # <<<<<<<<<<<<<<
  63091. * if self._inited:
  63092. * self._loop._debug_handles_current.subtract([
  63093. */
  63094. __pyx_t_1 = (((PyObject *)__pyx_v_self->_loop) != Py_None);
  63095. __pyx_t_2 = (__pyx_t_1 != 0);
  63096. if (likely(__pyx_t_2)) {
  63097. /* "uvloop/handles/handle.pyx":30
  63098. * if UVLOOP_DEBUG:
  63099. * if self._loop is not None:
  63100. * if self._inited: # <<<<<<<<<<<<<<
  63101. * self._loop._debug_handles_current.subtract([
  63102. * self.__class__.__name__])
  63103. */
  63104. __pyx_t_2 = (__pyx_v_self->_inited != 0);
  63105. if (__pyx_t_2) {
  63106. /* "uvloop/handles/handle.pyx":31
  63107. * if self._loop is not None:
  63108. * if self._inited:
  63109. * self._loop._debug_handles_current.subtract([ # <<<<<<<<<<<<<<
  63110. * self.__class__.__name__])
  63111. * else:
  63112. */
  63113. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_loop->_debug_handles_current, __pyx_n_s_subtract); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 31, __pyx_L1_error)
  63114. __Pyx_GOTREF(__pyx_t_4);
  63115. /* "uvloop/handles/handle.pyx":32
  63116. * if self._inited:
  63117. * self._loop._debug_handles_current.subtract([
  63118. * self.__class__.__name__]) # <<<<<<<<<<<<<<
  63119. * else:
  63120. * # No "@cython.no_gc_clear" decorator on this UVHandle
  63121. */
  63122. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 32, __pyx_L1_error)
  63123. __Pyx_GOTREF(__pyx_t_5);
  63124. __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 32, __pyx_L1_error)
  63125. __Pyx_GOTREF(__pyx_t_6);
  63126. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  63127. /* "uvloop/handles/handle.pyx":31
  63128. * if self._loop is not None:
  63129. * if self._inited:
  63130. * self._loop._debug_handles_current.subtract([ # <<<<<<<<<<<<<<
  63131. * self.__class__.__name__])
  63132. * else:
  63133. */
  63134. __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 31, __pyx_L1_error)
  63135. __Pyx_GOTREF(__pyx_t_5);
  63136. __Pyx_GIVEREF(__pyx_t_6);
  63137. PyList_SET_ITEM(__pyx_t_5, 0, __pyx_t_6);
  63138. __pyx_t_6 = 0;
  63139. __pyx_t_6 = NULL;
  63140. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
  63141. __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
  63142. if (likely(__pyx_t_6)) {
  63143. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  63144. __Pyx_INCREF(__pyx_t_6);
  63145. __Pyx_INCREF(function);
  63146. __Pyx_DECREF_SET(__pyx_t_4, function);
  63147. }
  63148. }
  63149. __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5);
  63150. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  63151. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  63152. if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 31, __pyx_L1_error)
  63153. __Pyx_GOTREF(__pyx_t_3);
  63154. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  63155. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  63156. /* "uvloop/handles/handle.pyx":30
  63157. * if UVLOOP_DEBUG:
  63158. * if self._loop is not None:
  63159. * if self._inited: # <<<<<<<<<<<<<<
  63160. * self._loop._debug_handles_current.subtract([
  63161. * self.__class__.__name__])
  63162. */
  63163. }
  63164. /* "uvloop/handles/handle.pyx":29
  63165. * def __dealloc__(self):
  63166. * if UVLOOP_DEBUG:
  63167. * if self._loop is not None: # <<<<<<<<<<<<<<
  63168. * if self._inited:
  63169. * self._loop._debug_handles_current.subtract([
  63170. */
  63171. goto __pyx_L4;
  63172. }
  63173. /* "uvloop/handles/handle.pyx":35
  63174. * else:
  63175. * # No "@cython.no_gc_clear" decorator on this UVHandle
  63176. * raise RuntimeError( # <<<<<<<<<<<<<<
  63177. * '{} without @no_gc_clear; loop was set to None by GC'
  63178. * .format(self.__class__.__name__))
  63179. */
  63180. /*else*/ {
  63181. /* "uvloop/handles/handle.pyx":37
  63182. * raise RuntimeError(
  63183. * '{} without @no_gc_clear; loop was set to None by GC'
  63184. * .format(self.__class__.__name__)) # <<<<<<<<<<<<<<
  63185. *
  63186. * if self._handle is NULL:
  63187. */
  63188. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_without_no_gc_clear_loop_was_se, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 37, __pyx_L1_error)
  63189. __Pyx_GOTREF(__pyx_t_4);
  63190. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 37, __pyx_L1_error)
  63191. __Pyx_GOTREF(__pyx_t_5);
  63192. __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 37, __pyx_L1_error)
  63193. __Pyx_GOTREF(__pyx_t_6);
  63194. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  63195. __pyx_t_5 = NULL;
  63196. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
  63197. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
  63198. if (likely(__pyx_t_5)) {
  63199. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  63200. __Pyx_INCREF(__pyx_t_5);
  63201. __Pyx_INCREF(function);
  63202. __Pyx_DECREF_SET(__pyx_t_4, function);
  63203. }
  63204. }
  63205. __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6);
  63206. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  63207. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  63208. if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 37, __pyx_L1_error)
  63209. __Pyx_GOTREF(__pyx_t_3);
  63210. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  63211. /* "uvloop/handles/handle.pyx":35
  63212. * else:
  63213. * # No "@cython.no_gc_clear" decorator on this UVHandle
  63214. * raise RuntimeError( # <<<<<<<<<<<<<<
  63215. * '{} without @no_gc_clear; loop was set to None by GC'
  63216. * .format(self.__class__.__name__))
  63217. */
  63218. __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 35, __pyx_L1_error)
  63219. __Pyx_GOTREF(__pyx_t_4);
  63220. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  63221. __Pyx_Raise(__pyx_t_4, 0, 0, 0);
  63222. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  63223. __PYX_ERR(4, 35, __pyx_L1_error)
  63224. }
  63225. __pyx_L4:;
  63226. /* "uvloop/handles/handle.pyx":28
  63227. *
  63228. * def __dealloc__(self):
  63229. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  63230. * if self._loop is not None:
  63231. * if self._inited:
  63232. */
  63233. }
  63234. /* "uvloop/handles/handle.pyx":39
  63235. * .format(self.__class__.__name__))
  63236. *
  63237. * if self._handle is NULL: # <<<<<<<<<<<<<<
  63238. * return
  63239. *
  63240. */
  63241. __pyx_t_2 = ((__pyx_v_self->_handle == NULL) != 0);
  63242. if (__pyx_t_2) {
  63243. /* "uvloop/handles/handle.pyx":40
  63244. *
  63245. * if self._handle is NULL:
  63246. * return # <<<<<<<<<<<<<<
  63247. *
  63248. * # -> When we're at this point, something is wrong <-
  63249. */
  63250. goto __pyx_L0;
  63251. /* "uvloop/handles/handle.pyx":39
  63252. * .format(self.__class__.__name__))
  63253. *
  63254. * if self._handle is NULL: # <<<<<<<<<<<<<<
  63255. * return
  63256. *
  63257. */
  63258. }
  63259. /* "uvloop/handles/handle.pyx":44
  63260. * # -> When we're at this point, something is wrong <-
  63261. *
  63262. * if self._handle.loop is NULL: # <<<<<<<<<<<<<<
  63263. * # The handle wasn't initialized with "uv_{handle}_init"
  63264. * self._closed = 1
  63265. */
  63266. __pyx_t_2 = ((__pyx_v_self->_handle->loop == NULL) != 0);
  63267. if (unlikely(__pyx_t_2)) {
  63268. /* "uvloop/handles/handle.pyx":46
  63269. * if self._handle.loop is NULL:
  63270. * # The handle wasn't initialized with "uv_{handle}_init"
  63271. * self._closed = 1 # <<<<<<<<<<<<<<
  63272. * self._free()
  63273. * raise RuntimeError(
  63274. */
  63275. __pyx_v_self->_closed = 1;
  63276. /* "uvloop/handles/handle.pyx":47
  63277. * # The handle wasn't initialized with "uv_{handle}_init"
  63278. * self._closed = 1
  63279. * self._free() # <<<<<<<<<<<<<<
  63280. * raise RuntimeError(
  63281. * '{} is open in __dealloc__ with loop set to NULL'
  63282. */
  63283. __pyx_t_4 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVHandle *)__pyx_v_self->__pyx_vtab)->_free(__pyx_v_self); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 47, __pyx_L1_error)
  63284. __Pyx_GOTREF(__pyx_t_4);
  63285. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  63286. /* "uvloop/handles/handle.pyx":50
  63287. * raise RuntimeError(
  63288. * '{} is open in __dealloc__ with loop set to NULL'
  63289. * .format(self.__class__.__name__)) # <<<<<<<<<<<<<<
  63290. *
  63291. * if self._closed:
  63292. */
  63293. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_is_open_in___dealloc___with_loo, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 50, __pyx_L1_error)
  63294. __Pyx_GOTREF(__pyx_t_3);
  63295. __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 50, __pyx_L1_error)
  63296. __Pyx_GOTREF(__pyx_t_6);
  63297. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 50, __pyx_L1_error)
  63298. __Pyx_GOTREF(__pyx_t_5);
  63299. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  63300. __pyx_t_6 = NULL;
  63301. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
  63302. __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
  63303. if (likely(__pyx_t_6)) {
  63304. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  63305. __Pyx_INCREF(__pyx_t_6);
  63306. __Pyx_INCREF(function);
  63307. __Pyx_DECREF_SET(__pyx_t_3, function);
  63308. }
  63309. }
  63310. __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5);
  63311. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  63312. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  63313. if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 50, __pyx_L1_error)
  63314. __Pyx_GOTREF(__pyx_t_4);
  63315. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  63316. /* "uvloop/handles/handle.pyx":48
  63317. * self._closed = 1
  63318. * self._free()
  63319. * raise RuntimeError( # <<<<<<<<<<<<<<
  63320. * '{} is open in __dealloc__ with loop set to NULL'
  63321. * .format(self.__class__.__name__))
  63322. */
  63323. __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 48, __pyx_L1_error)
  63324. __Pyx_GOTREF(__pyx_t_3);
  63325. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  63326. __Pyx_Raise(__pyx_t_3, 0, 0, 0);
  63327. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  63328. __PYX_ERR(4, 48, __pyx_L1_error)
  63329. /* "uvloop/handles/handle.pyx":44
  63330. * # -> When we're at this point, something is wrong <-
  63331. *
  63332. * if self._handle.loop is NULL: # <<<<<<<<<<<<<<
  63333. * # The handle wasn't initialized with "uv_{handle}_init"
  63334. * self._closed = 1
  63335. */
  63336. }
  63337. /* "uvloop/handles/handle.pyx":52
  63338. * .format(self.__class__.__name__))
  63339. *
  63340. * if self._closed: # <<<<<<<<<<<<<<
  63341. * # So _handle is not NULL and self._closed == 1?
  63342. * raise RuntimeError(
  63343. */
  63344. __pyx_t_2 = (__pyx_v_self->_closed != 0);
  63345. if (unlikely(__pyx_t_2)) {
  63346. /* "uvloop/handles/handle.pyx":55
  63347. * # So _handle is not NULL and self._closed == 1?
  63348. * raise RuntimeError(
  63349. * '{}.__dealloc__: _handle is NULL, _closed == 1'.format( # <<<<<<<<<<<<<<
  63350. * self.__class__.__name__))
  63351. *
  63352. */
  63353. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_dealloc____handle_is_NULL__cl, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 55, __pyx_L1_error)
  63354. __Pyx_GOTREF(__pyx_t_4);
  63355. /* "uvloop/handles/handle.pyx":56
  63356. * raise RuntimeError(
  63357. * '{}.__dealloc__: _handle is NULL, _closed == 1'.format(
  63358. * self.__class__.__name__)) # <<<<<<<<<<<<<<
  63359. *
  63360. * # The handle is dealloced while open. Let's try to close it.
  63361. */
  63362. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 56, __pyx_L1_error)
  63363. __Pyx_GOTREF(__pyx_t_5);
  63364. __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 56, __pyx_L1_error)
  63365. __Pyx_GOTREF(__pyx_t_6);
  63366. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  63367. __pyx_t_5 = NULL;
  63368. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
  63369. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
  63370. if (likely(__pyx_t_5)) {
  63371. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  63372. __Pyx_INCREF(__pyx_t_5);
  63373. __Pyx_INCREF(function);
  63374. __Pyx_DECREF_SET(__pyx_t_4, function);
  63375. }
  63376. }
  63377. __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6);
  63378. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  63379. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  63380. if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 55, __pyx_L1_error)
  63381. __Pyx_GOTREF(__pyx_t_3);
  63382. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  63383. /* "uvloop/handles/handle.pyx":54
  63384. * if self._closed:
  63385. * # So _handle is not NULL and self._closed == 1?
  63386. * raise RuntimeError( # <<<<<<<<<<<<<<
  63387. * '{}.__dealloc__: _handle is NULL, _closed == 1'.format(
  63388. * self.__class__.__name__))
  63389. */
  63390. __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 54, __pyx_L1_error)
  63391. __Pyx_GOTREF(__pyx_t_4);
  63392. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  63393. __Pyx_Raise(__pyx_t_4, 0, 0, 0);
  63394. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  63395. __PYX_ERR(4, 54, __pyx_L1_error)
  63396. /* "uvloop/handles/handle.pyx":52
  63397. * .format(self.__class__.__name__))
  63398. *
  63399. * if self._closed: # <<<<<<<<<<<<<<
  63400. * # So _handle is not NULL and self._closed == 1?
  63401. * raise RuntimeError(
  63402. */
  63403. }
  63404. /* "uvloop/handles/handle.pyx":61
  63405. * # Situations when this is possible include unhandled exceptions,
  63406. * # errors during Handle.__cinit__/__init__ etc.
  63407. * if self._inited: # <<<<<<<<<<<<<<
  63408. * self._handle.data = NULL
  63409. * uv.uv_close(self._handle, __uv_close_handle_cb) # void; no errors
  63410. */
  63411. __pyx_t_2 = (__pyx_v_self->_inited != 0);
  63412. if (__pyx_t_2) {
  63413. /* "uvloop/handles/handle.pyx":62
  63414. * # errors during Handle.__cinit__/__init__ etc.
  63415. * if self._inited:
  63416. * self._handle.data = NULL # <<<<<<<<<<<<<<
  63417. * uv.uv_close(self._handle, __uv_close_handle_cb) # void; no errors
  63418. * self._handle = NULL
  63419. */
  63420. __pyx_v_self->_handle->data = NULL;
  63421. /* "uvloop/handles/handle.pyx":63
  63422. * if self._inited:
  63423. * self._handle.data = NULL
  63424. * uv.uv_close(self._handle, __uv_close_handle_cb) # void; no errors # <<<<<<<<<<<<<<
  63425. * self._handle = NULL
  63426. * self._warn_unclosed()
  63427. */
  63428. uv_close(__pyx_v_self->_handle, __pyx_f_6uvloop_4loop___uv_close_handle_cb);
  63429. /* "uvloop/handles/handle.pyx":64
  63430. * self._handle.data = NULL
  63431. * uv.uv_close(self._handle, __uv_close_handle_cb) # void; no errors
  63432. * self._handle = NULL # <<<<<<<<<<<<<<
  63433. * self._warn_unclosed()
  63434. * else:
  63435. */
  63436. __pyx_v_self->_handle = NULL;
  63437. /* "uvloop/handles/handle.pyx":65
  63438. * uv.uv_close(self._handle, __uv_close_handle_cb) # void; no errors
  63439. * self._handle = NULL
  63440. * self._warn_unclosed() # <<<<<<<<<<<<<<
  63441. * else:
  63442. * # The handle was allocated, but not initialized
  63443. */
  63444. __pyx_t_4 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVHandle *)__pyx_v_self->__pyx_vtab)->_warn_unclosed(__pyx_v_self); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 65, __pyx_L1_error)
  63445. __Pyx_GOTREF(__pyx_t_4);
  63446. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  63447. /* "uvloop/handles/handle.pyx":61
  63448. * # Situations when this is possible include unhandled exceptions,
  63449. * # errors during Handle.__cinit__/__init__ etc.
  63450. * if self._inited: # <<<<<<<<<<<<<<
  63451. * self._handle.data = NULL
  63452. * uv.uv_close(self._handle, __uv_close_handle_cb) # void; no errors
  63453. */
  63454. goto __pyx_L9;
  63455. }
  63456. /* "uvloop/handles/handle.pyx":68
  63457. * else:
  63458. * # The handle was allocated, but not initialized
  63459. * self._closed = 1 # <<<<<<<<<<<<<<
  63460. * self._free()
  63461. *
  63462. */
  63463. /*else*/ {
  63464. __pyx_v_self->_closed = 1;
  63465. /* "uvloop/handles/handle.pyx":69
  63466. * # The handle was allocated, but not initialized
  63467. * self._closed = 1
  63468. * self._free() # <<<<<<<<<<<<<<
  63469. *
  63470. * cdef _free(self):
  63471. */
  63472. __pyx_t_4 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVHandle *)__pyx_v_self->__pyx_vtab)->_free(__pyx_v_self); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 69, __pyx_L1_error)
  63473. __Pyx_GOTREF(__pyx_t_4);
  63474. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  63475. }
  63476. __pyx_L9:;
  63477. /* "uvloop/handles/handle.pyx":27
  63478. * self.__class__.__name__))
  63479. *
  63480. * def __dealloc__(self): # <<<<<<<<<<<<<<
  63481. * if UVLOOP_DEBUG:
  63482. * if self._loop is not None:
  63483. */
  63484. /* function exit code */
  63485. goto __pyx_L0;
  63486. __pyx_L1_error:;
  63487. __Pyx_XDECREF(__pyx_t_3);
  63488. __Pyx_XDECREF(__pyx_t_4);
  63489. __Pyx_XDECREF(__pyx_t_5);
  63490. __Pyx_XDECREF(__pyx_t_6);
  63491. __Pyx_WriteUnraisable("uvloop.loop.UVHandle.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  63492. __pyx_L0:;
  63493. __Pyx_RefNannyFinishContext();
  63494. }
  63495. /* "uvloop/handles/handle.pyx":71
  63496. * self._free()
  63497. *
  63498. * cdef _free(self): # <<<<<<<<<<<<<<
  63499. * if self._handle == NULL:
  63500. * return
  63501. */
  63502. static PyObject *__pyx_f_6uvloop_4loop_8UVHandle__free(struct __pyx_obj_6uvloop_4loop_UVHandle *__pyx_v_self) {
  63503. PyObject *__pyx_r = NULL;
  63504. __Pyx_RefNannyDeclarations
  63505. int __pyx_t_1;
  63506. int __pyx_t_2;
  63507. struct __pyx_obj_6uvloop_4loop_Loop *__pyx_t_3 = NULL;
  63508. __Pyx_RefNannySetupContext("_free", 0);
  63509. /* "uvloop/handles/handle.pyx":72
  63510. *
  63511. * cdef _free(self):
  63512. * if self._handle == NULL: # <<<<<<<<<<<<<<
  63513. * return
  63514. *
  63515. */
  63516. __pyx_t_1 = ((__pyx_v_self->_handle == NULL) != 0);
  63517. if (__pyx_t_1) {
  63518. /* "uvloop/handles/handle.pyx":73
  63519. * cdef _free(self):
  63520. * if self._handle == NULL:
  63521. * return # <<<<<<<<<<<<<<
  63522. *
  63523. * if UVLOOP_DEBUG and self._inited:
  63524. */
  63525. __Pyx_XDECREF(__pyx_r);
  63526. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  63527. goto __pyx_L0;
  63528. /* "uvloop/handles/handle.pyx":72
  63529. *
  63530. * cdef _free(self):
  63531. * if self._handle == NULL: # <<<<<<<<<<<<<<
  63532. * return
  63533. *
  63534. */
  63535. }
  63536. /* "uvloop/handles/handle.pyx":75
  63537. * return
  63538. *
  63539. * if UVLOOP_DEBUG and self._inited: # <<<<<<<<<<<<<<
  63540. * self._loop._debug_uv_handles_freed += 1
  63541. *
  63542. */
  63543. __pyx_t_2 = (UVLOOP_DEBUG != 0);
  63544. if (__pyx_t_2) {
  63545. } else {
  63546. __pyx_t_1 = __pyx_t_2;
  63547. goto __pyx_L5_bool_binop_done;
  63548. }
  63549. __pyx_t_2 = (__pyx_v_self->_inited != 0);
  63550. __pyx_t_1 = __pyx_t_2;
  63551. __pyx_L5_bool_binop_done:;
  63552. if (__pyx_t_1) {
  63553. /* "uvloop/handles/handle.pyx":76
  63554. *
  63555. * if UVLOOP_DEBUG and self._inited:
  63556. * self._loop._debug_uv_handles_freed += 1 # <<<<<<<<<<<<<<
  63557. *
  63558. * PyMem_RawFree(self._handle)
  63559. */
  63560. __Pyx_INCREF(((PyObject *)__pyx_v_self->_loop));
  63561. __pyx_t_3 = __pyx_v_self->_loop;
  63562. __pyx_t_3->_debug_uv_handles_freed = (__pyx_t_3->_debug_uv_handles_freed + 1);
  63563. __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  63564. /* "uvloop/handles/handle.pyx":75
  63565. * return
  63566. *
  63567. * if UVLOOP_DEBUG and self._inited: # <<<<<<<<<<<<<<
  63568. * self._loop._debug_uv_handles_freed += 1
  63569. *
  63570. */
  63571. }
  63572. /* "uvloop/handles/handle.pyx":78
  63573. * self._loop._debug_uv_handles_freed += 1
  63574. *
  63575. * PyMem_RawFree(self._handle) # <<<<<<<<<<<<<<
  63576. * self._handle = NULL
  63577. *
  63578. */
  63579. PyMem_RawFree(__pyx_v_self->_handle);
  63580. /* "uvloop/handles/handle.pyx":79
  63581. *
  63582. * PyMem_RawFree(self._handle)
  63583. * self._handle = NULL # <<<<<<<<<<<<<<
  63584. *
  63585. * cdef _warn_unclosed(self):
  63586. */
  63587. __pyx_v_self->_handle = NULL;
  63588. /* "uvloop/handles/handle.pyx":71
  63589. * self._free()
  63590. *
  63591. * cdef _free(self): # <<<<<<<<<<<<<<
  63592. * if self._handle == NULL:
  63593. * return
  63594. */
  63595. /* function exit code */
  63596. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  63597. __pyx_L0:;
  63598. __Pyx_XGIVEREF(__pyx_r);
  63599. __Pyx_RefNannyFinishContext();
  63600. return __pyx_r;
  63601. }
  63602. /* "uvloop/handles/handle.pyx":81
  63603. * self._handle = NULL
  63604. *
  63605. * cdef _warn_unclosed(self): # <<<<<<<<<<<<<<
  63606. * if self._source_traceback is not None:
  63607. * try:
  63608. */
  63609. static PyObject *__pyx_f_6uvloop_4loop_8UVHandle__warn_unclosed(struct __pyx_obj_6uvloop_4loop_UVHandle *__pyx_v_self) {
  63610. PyObject *__pyx_v_tb = NULL;
  63611. PyObject *__pyx_v_ex = NULL;
  63612. PyObject *__pyx_v_msg = NULL;
  63613. PyObject *__pyx_r = NULL;
  63614. __Pyx_RefNannyDeclarations
  63615. int __pyx_t_1;
  63616. int __pyx_t_2;
  63617. PyObject *__pyx_t_3 = NULL;
  63618. PyObject *__pyx_t_4 = NULL;
  63619. PyObject *__pyx_t_5 = NULL;
  63620. PyObject *__pyx_t_6 = NULL;
  63621. PyObject *__pyx_t_7 = NULL;
  63622. PyObject *__pyx_t_8 = NULL;
  63623. PyObject *__pyx_t_9 = NULL;
  63624. PyObject *__pyx_t_10 = NULL;
  63625. int __pyx_t_11;
  63626. PyObject *__pyx_t_12 = NULL;
  63627. PyObject *__pyx_t_13 = NULL;
  63628. PyObject *__pyx_t_14 = NULL;
  63629. int __pyx_t_15;
  63630. char const *__pyx_t_16;
  63631. PyObject *__pyx_t_17 = NULL;
  63632. PyObject *__pyx_t_18 = NULL;
  63633. PyObject *__pyx_t_19 = NULL;
  63634. PyObject *__pyx_t_20 = NULL;
  63635. PyObject *__pyx_t_21 = NULL;
  63636. PyObject *__pyx_t_22 = NULL;
  63637. __Pyx_RefNannySetupContext("_warn_unclosed", 0);
  63638. /* "uvloop/handles/handle.pyx":82
  63639. *
  63640. * cdef _warn_unclosed(self):
  63641. * if self._source_traceback is not None: # <<<<<<<<<<<<<<
  63642. * try:
  63643. * tb = ''.join(tb_format_list(self._source_traceback))
  63644. */
  63645. __pyx_t_1 = (__pyx_v_self->_source_traceback != Py_None);
  63646. __pyx_t_2 = (__pyx_t_1 != 0);
  63647. if (__pyx_t_2) {
  63648. /* "uvloop/handles/handle.pyx":83
  63649. * cdef _warn_unclosed(self):
  63650. * if self._source_traceback is not None:
  63651. * try: # <<<<<<<<<<<<<<
  63652. * tb = ''.join(tb_format_list(self._source_traceback))
  63653. * tb = 'object created at (most recent call last):\n{}'.format(
  63654. */
  63655. {
  63656. __Pyx_PyThreadState_declare
  63657. __Pyx_PyThreadState_assign
  63658. __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
  63659. __Pyx_XGOTREF(__pyx_t_3);
  63660. __Pyx_XGOTREF(__pyx_t_4);
  63661. __Pyx_XGOTREF(__pyx_t_5);
  63662. /*try:*/ {
  63663. /* "uvloop/handles/handle.pyx":84
  63664. * if self._source_traceback is not None:
  63665. * try:
  63666. * tb = ''.join(tb_format_list(self._source_traceback)) # <<<<<<<<<<<<<<
  63667. * tb = 'object created at (most recent call last):\n{}'.format(
  63668. * tb.rstrip())
  63669. */
  63670. __Pyx_INCREF(__pyx_v_6uvloop_4loop_tb_format_list);
  63671. __pyx_t_7 = __pyx_v_6uvloop_4loop_tb_format_list; __pyx_t_8 = NULL;
  63672. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
  63673. __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
  63674. if (likely(__pyx_t_8)) {
  63675. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
  63676. __Pyx_INCREF(__pyx_t_8);
  63677. __Pyx_INCREF(function);
  63678. __Pyx_DECREF_SET(__pyx_t_7, function);
  63679. }
  63680. }
  63681. __pyx_t_6 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_v_self->_source_traceback) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_self->_source_traceback);
  63682. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  63683. if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 84, __pyx_L4_error)
  63684. __Pyx_GOTREF(__pyx_t_6);
  63685. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  63686. __pyx_t_7 = PyUnicode_Join(__pyx_kp_u__2, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 84, __pyx_L4_error)
  63687. __Pyx_GOTREF(__pyx_t_7);
  63688. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  63689. __pyx_v_tb = __pyx_t_7;
  63690. __pyx_t_7 = 0;
  63691. /* "uvloop/handles/handle.pyx":85
  63692. * try:
  63693. * tb = ''.join(tb_format_list(self._source_traceback))
  63694. * tb = 'object created at (most recent call last):\n{}'.format( # <<<<<<<<<<<<<<
  63695. * tb.rstrip())
  63696. * except Exception as ex:
  63697. */
  63698. __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_object_created_at_most_recent_ca, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 85, __pyx_L4_error)
  63699. __Pyx_GOTREF(__pyx_t_6);
  63700. /* "uvloop/handles/handle.pyx":86
  63701. * tb = ''.join(tb_format_list(self._source_traceback))
  63702. * tb = 'object created at (most recent call last):\n{}'.format(
  63703. * tb.rstrip()) # <<<<<<<<<<<<<<
  63704. * except Exception as ex:
  63705. * msg = (
  63706. */
  63707. __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_tb, __pyx_n_s_rstrip); if (unlikely(!__pyx_t_9)) __PYX_ERR(4, 86, __pyx_L4_error)
  63708. __Pyx_GOTREF(__pyx_t_9);
  63709. __pyx_t_10 = NULL;
  63710. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
  63711. __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
  63712. if (likely(__pyx_t_10)) {
  63713. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
  63714. __Pyx_INCREF(__pyx_t_10);
  63715. __Pyx_INCREF(function);
  63716. __Pyx_DECREF_SET(__pyx_t_9, function);
  63717. }
  63718. }
  63719. __pyx_t_8 = (__pyx_t_10) ? __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_10) : __Pyx_PyObject_CallNoArg(__pyx_t_9);
  63720. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  63721. if (unlikely(!__pyx_t_8)) __PYX_ERR(4, 86, __pyx_L4_error)
  63722. __Pyx_GOTREF(__pyx_t_8);
  63723. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  63724. __pyx_t_9 = NULL;
  63725. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
  63726. __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_6);
  63727. if (likely(__pyx_t_9)) {
  63728. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
  63729. __Pyx_INCREF(__pyx_t_9);
  63730. __Pyx_INCREF(function);
  63731. __Pyx_DECREF_SET(__pyx_t_6, function);
  63732. }
  63733. }
  63734. __pyx_t_7 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_8);
  63735. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  63736. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  63737. if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 85, __pyx_L4_error)
  63738. __Pyx_GOTREF(__pyx_t_7);
  63739. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  63740. __Pyx_DECREF_SET(__pyx_v_tb, __pyx_t_7);
  63741. __pyx_t_7 = 0;
  63742. /* "uvloop/handles/handle.pyx":83
  63743. * cdef _warn_unclosed(self):
  63744. * if self._source_traceback is not None:
  63745. * try: # <<<<<<<<<<<<<<
  63746. * tb = ''.join(tb_format_list(self._source_traceback))
  63747. * tb = 'object created at (most recent call last):\n{}'.format(
  63748. */
  63749. }
  63750. /* "uvloop/handles/handle.pyx":93
  63751. * ).format(self, type(ex).__name__, ex)
  63752. * else:
  63753. * msg = 'unclosed resource {!r}; {}'.format(self, tb) # <<<<<<<<<<<<<<
  63754. * else:
  63755. * msg = 'unclosed resource {!r}'.format(self)
  63756. */
  63757. /*else:*/ {
  63758. __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_unclosed_resource_r, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 93, __pyx_L6_except_error)
  63759. __Pyx_GOTREF(__pyx_t_6);
  63760. __pyx_t_8 = NULL;
  63761. __pyx_t_11 = 0;
  63762. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
  63763. __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
  63764. if (likely(__pyx_t_8)) {
  63765. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
  63766. __Pyx_INCREF(__pyx_t_8);
  63767. __Pyx_INCREF(function);
  63768. __Pyx_DECREF_SET(__pyx_t_6, function);
  63769. __pyx_t_11 = 1;
  63770. }
  63771. }
  63772. #if CYTHON_FAST_PYCALL
  63773. if (PyFunction_Check(__pyx_t_6)) {
  63774. PyObject *__pyx_temp[3] = {__pyx_t_8, ((PyObject *)__pyx_v_self), __pyx_v_tb};
  63775. __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 93, __pyx_L6_except_error)
  63776. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  63777. __Pyx_GOTREF(__pyx_t_7);
  63778. } else
  63779. #endif
  63780. #if CYTHON_FAST_PYCCALL
  63781. if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
  63782. PyObject *__pyx_temp[3] = {__pyx_t_8, ((PyObject *)__pyx_v_self), __pyx_v_tb};
  63783. __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 93, __pyx_L6_except_error)
  63784. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  63785. __Pyx_GOTREF(__pyx_t_7);
  63786. } else
  63787. #endif
  63788. {
  63789. __pyx_t_9 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_9)) __PYX_ERR(4, 93, __pyx_L6_except_error)
  63790. __Pyx_GOTREF(__pyx_t_9);
  63791. if (__pyx_t_8) {
  63792. __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL;
  63793. }
  63794. __Pyx_INCREF(((PyObject *)__pyx_v_self));
  63795. __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  63796. PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_11, ((PyObject *)__pyx_v_self));
  63797. __Pyx_INCREF(__pyx_v_tb);
  63798. __Pyx_GIVEREF(__pyx_v_tb);
  63799. PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_11, __pyx_v_tb);
  63800. __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 93, __pyx_L6_except_error)
  63801. __Pyx_GOTREF(__pyx_t_7);
  63802. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  63803. }
  63804. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  63805. __pyx_v_msg = __pyx_t_7;
  63806. __pyx_t_7 = 0;
  63807. }
  63808. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  63809. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  63810. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  63811. goto __pyx_L9_try_end;
  63812. __pyx_L4_error:;
  63813. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  63814. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  63815. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  63816. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  63817. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  63818. /* "uvloop/handles/handle.pyx":87
  63819. * tb = 'object created at (most recent call last):\n{}'.format(
  63820. * tb.rstrip())
  63821. * except Exception as ex: # <<<<<<<<<<<<<<
  63822. * msg = (
  63823. * 'unclosed resource {!r}; could not serialize '
  63824. */
  63825. __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
  63826. if (__pyx_t_11) {
  63827. __Pyx_AddTraceback("uvloop.loop.UVHandle._warn_unclosed", __pyx_clineno, __pyx_lineno, __pyx_filename);
  63828. if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_6, &__pyx_t_9) < 0) __PYX_ERR(4, 87, __pyx_L6_except_error)
  63829. __Pyx_GOTREF(__pyx_t_7);
  63830. __Pyx_GOTREF(__pyx_t_6);
  63831. __Pyx_GOTREF(__pyx_t_9);
  63832. __Pyx_INCREF(__pyx_t_6);
  63833. __pyx_v_ex = __pyx_t_6;
  63834. /*try:*/ {
  63835. /* "uvloop/handles/handle.pyx":91
  63836. * 'unclosed resource {!r}; could not serialize '
  63837. * 'debug traceback: {}: {}'
  63838. * ).format(self, type(ex).__name__, ex) # <<<<<<<<<<<<<<
  63839. * else:
  63840. * msg = 'unclosed resource {!r}; {}'.format(self, tb)
  63841. */
  63842. __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_unclosed_resource_r_could_not_se, __pyx_n_s_format); if (unlikely(!__pyx_t_10)) __PYX_ERR(4, 91, __pyx_L15_error)
  63843. __Pyx_GOTREF(__pyx_t_10);
  63844. __pyx_t_12 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(__pyx_v_ex)), __pyx_n_s_name); if (unlikely(!__pyx_t_12)) __PYX_ERR(4, 91, __pyx_L15_error)
  63845. __Pyx_GOTREF(__pyx_t_12);
  63846. __pyx_t_13 = NULL;
  63847. __pyx_t_11 = 0;
  63848. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) {
  63849. __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_10);
  63850. if (likely(__pyx_t_13)) {
  63851. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
  63852. __Pyx_INCREF(__pyx_t_13);
  63853. __Pyx_INCREF(function);
  63854. __Pyx_DECREF_SET(__pyx_t_10, function);
  63855. __pyx_t_11 = 1;
  63856. }
  63857. }
  63858. #if CYTHON_FAST_PYCALL
  63859. if (PyFunction_Check(__pyx_t_10)) {
  63860. PyObject *__pyx_temp[4] = {__pyx_t_13, ((PyObject *)__pyx_v_self), __pyx_t_12, __pyx_v_ex};
  63861. __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_11, 3+__pyx_t_11); if (unlikely(!__pyx_t_8)) __PYX_ERR(4, 91, __pyx_L15_error)
  63862. __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
  63863. __Pyx_GOTREF(__pyx_t_8);
  63864. __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  63865. } else
  63866. #endif
  63867. #if CYTHON_FAST_PYCCALL
  63868. if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
  63869. PyObject *__pyx_temp[4] = {__pyx_t_13, ((PyObject *)__pyx_v_self), __pyx_t_12, __pyx_v_ex};
  63870. __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_11, 3+__pyx_t_11); if (unlikely(!__pyx_t_8)) __PYX_ERR(4, 91, __pyx_L15_error)
  63871. __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
  63872. __Pyx_GOTREF(__pyx_t_8);
  63873. __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  63874. } else
  63875. #endif
  63876. {
  63877. __pyx_t_14 = PyTuple_New(3+__pyx_t_11); if (unlikely(!__pyx_t_14)) __PYX_ERR(4, 91, __pyx_L15_error)
  63878. __Pyx_GOTREF(__pyx_t_14);
  63879. if (__pyx_t_13) {
  63880. __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_13); __pyx_t_13 = NULL;
  63881. }
  63882. __Pyx_INCREF(((PyObject *)__pyx_v_self));
  63883. __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  63884. PyTuple_SET_ITEM(__pyx_t_14, 0+__pyx_t_11, ((PyObject *)__pyx_v_self));
  63885. __Pyx_GIVEREF(__pyx_t_12);
  63886. PyTuple_SET_ITEM(__pyx_t_14, 1+__pyx_t_11, __pyx_t_12);
  63887. __Pyx_INCREF(__pyx_v_ex);
  63888. __Pyx_GIVEREF(__pyx_v_ex);
  63889. PyTuple_SET_ITEM(__pyx_t_14, 2+__pyx_t_11, __pyx_v_ex);
  63890. __pyx_t_12 = 0;
  63891. __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_14, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(4, 91, __pyx_L15_error)
  63892. __Pyx_GOTREF(__pyx_t_8);
  63893. __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  63894. }
  63895. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  63896. __pyx_v_msg = __pyx_t_8;
  63897. __pyx_t_8 = 0;
  63898. }
  63899. /* "uvloop/handles/handle.pyx":87
  63900. * tb = 'object created at (most recent call last):\n{}'.format(
  63901. * tb.rstrip())
  63902. * except Exception as ex: # <<<<<<<<<<<<<<
  63903. * msg = (
  63904. * 'unclosed resource {!r}; could not serialize '
  63905. */
  63906. /*finally:*/ {
  63907. /*normal exit:*/{
  63908. __Pyx_DECREF(__pyx_v_ex);
  63909. __pyx_v_ex = NULL;
  63910. goto __pyx_L16;
  63911. }
  63912. __pyx_L15_error:;
  63913. /*exception exit:*/{
  63914. __Pyx_PyThreadState_declare
  63915. __Pyx_PyThreadState_assign
  63916. __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
  63917. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  63918. __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
  63919. __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
  63920. __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
  63921. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  63922. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22);
  63923. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19) < 0)) __Pyx_ErrFetch(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19);
  63924. __Pyx_XGOTREF(__pyx_t_17);
  63925. __Pyx_XGOTREF(__pyx_t_18);
  63926. __Pyx_XGOTREF(__pyx_t_19);
  63927. __Pyx_XGOTREF(__pyx_t_20);
  63928. __Pyx_XGOTREF(__pyx_t_21);
  63929. __Pyx_XGOTREF(__pyx_t_22);
  63930. __pyx_t_11 = __pyx_lineno; __pyx_t_15 = __pyx_clineno; __pyx_t_16 = __pyx_filename;
  63931. {
  63932. __Pyx_DECREF(__pyx_v_ex);
  63933. __pyx_v_ex = NULL;
  63934. }
  63935. if (PY_MAJOR_VERSION >= 3) {
  63936. __Pyx_XGIVEREF(__pyx_t_20);
  63937. __Pyx_XGIVEREF(__pyx_t_21);
  63938. __Pyx_XGIVEREF(__pyx_t_22);
  63939. __Pyx_ExceptionReset(__pyx_t_20, __pyx_t_21, __pyx_t_22);
  63940. }
  63941. __Pyx_XGIVEREF(__pyx_t_17);
  63942. __Pyx_XGIVEREF(__pyx_t_18);
  63943. __Pyx_XGIVEREF(__pyx_t_19);
  63944. __Pyx_ErrRestore(__pyx_t_17, __pyx_t_18, __pyx_t_19);
  63945. __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
  63946. __pyx_lineno = __pyx_t_11; __pyx_clineno = __pyx_t_15; __pyx_filename = __pyx_t_16;
  63947. goto __pyx_L6_except_error;
  63948. }
  63949. __pyx_L16:;
  63950. }
  63951. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  63952. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  63953. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  63954. goto __pyx_L5_exception_handled;
  63955. }
  63956. goto __pyx_L6_except_error;
  63957. __pyx_L6_except_error:;
  63958. /* "uvloop/handles/handle.pyx":83
  63959. * cdef _warn_unclosed(self):
  63960. * if self._source_traceback is not None:
  63961. * try: # <<<<<<<<<<<<<<
  63962. * tb = ''.join(tb_format_list(self._source_traceback))
  63963. * tb = 'object created at (most recent call last):\n{}'.format(
  63964. */
  63965. __Pyx_XGIVEREF(__pyx_t_3);
  63966. __Pyx_XGIVEREF(__pyx_t_4);
  63967. __Pyx_XGIVEREF(__pyx_t_5);
  63968. __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
  63969. goto __pyx_L1_error;
  63970. __pyx_L5_exception_handled:;
  63971. __Pyx_XGIVEREF(__pyx_t_3);
  63972. __Pyx_XGIVEREF(__pyx_t_4);
  63973. __Pyx_XGIVEREF(__pyx_t_5);
  63974. __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
  63975. __pyx_L9_try_end:;
  63976. }
  63977. /* "uvloop/handles/handle.pyx":82
  63978. *
  63979. * cdef _warn_unclosed(self):
  63980. * if self._source_traceback is not None: # <<<<<<<<<<<<<<
  63981. * try:
  63982. * tb = ''.join(tb_format_list(self._source_traceback))
  63983. */
  63984. goto __pyx_L3;
  63985. }
  63986. /* "uvloop/handles/handle.pyx":95
  63987. * msg = 'unclosed resource {!r}; {}'.format(self, tb)
  63988. * else:
  63989. * msg = 'unclosed resource {!r}'.format(self) # <<<<<<<<<<<<<<
  63990. * warnings_warn(msg, ResourceWarning)
  63991. *
  63992. */
  63993. /*else*/ {
  63994. __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_unclosed_resource_r_2, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 95, __pyx_L1_error)
  63995. __Pyx_GOTREF(__pyx_t_6);
  63996. __pyx_t_7 = NULL;
  63997. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
  63998. __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
  63999. if (likely(__pyx_t_7)) {
  64000. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
  64001. __Pyx_INCREF(__pyx_t_7);
  64002. __Pyx_INCREF(function);
  64003. __Pyx_DECREF_SET(__pyx_t_6, function);
  64004. }
  64005. }
  64006. __pyx_t_9 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, ((PyObject *)__pyx_v_self)) : __Pyx_PyObject_CallOneArg(__pyx_t_6, ((PyObject *)__pyx_v_self));
  64007. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  64008. if (unlikely(!__pyx_t_9)) __PYX_ERR(4, 95, __pyx_L1_error)
  64009. __Pyx_GOTREF(__pyx_t_9);
  64010. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  64011. __pyx_v_msg = __pyx_t_9;
  64012. __pyx_t_9 = 0;
  64013. }
  64014. __pyx_L3:;
  64015. /* "uvloop/handles/handle.pyx":96
  64016. * else:
  64017. * msg = 'unclosed resource {!r}'.format(self)
  64018. * warnings_warn(msg, ResourceWarning) # <<<<<<<<<<<<<<
  64019. *
  64020. * cdef inline _abort_init(self):
  64021. */
  64022. __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_ResourceWarning); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 96, __pyx_L1_error)
  64023. __Pyx_GOTREF(__pyx_t_6);
  64024. __Pyx_INCREF(__pyx_v_6uvloop_4loop_warnings_warn);
  64025. __pyx_t_7 = __pyx_v_6uvloop_4loop_warnings_warn; __pyx_t_8 = NULL;
  64026. __pyx_t_15 = 0;
  64027. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
  64028. __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
  64029. if (likely(__pyx_t_8)) {
  64030. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
  64031. __Pyx_INCREF(__pyx_t_8);
  64032. __Pyx_INCREF(function);
  64033. __Pyx_DECREF_SET(__pyx_t_7, function);
  64034. __pyx_t_15 = 1;
  64035. }
  64036. }
  64037. #if CYTHON_FAST_PYCALL
  64038. if (PyFunction_Check(__pyx_t_7)) {
  64039. PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_msg, __pyx_t_6};
  64040. __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_15, 2+__pyx_t_15); if (unlikely(!__pyx_t_9)) __PYX_ERR(4, 96, __pyx_L1_error)
  64041. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  64042. __Pyx_GOTREF(__pyx_t_9);
  64043. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  64044. } else
  64045. #endif
  64046. #if CYTHON_FAST_PYCCALL
  64047. if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
  64048. PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_msg, __pyx_t_6};
  64049. __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_15, 2+__pyx_t_15); if (unlikely(!__pyx_t_9)) __PYX_ERR(4, 96, __pyx_L1_error)
  64050. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  64051. __Pyx_GOTREF(__pyx_t_9);
  64052. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  64053. } else
  64054. #endif
  64055. {
  64056. __pyx_t_10 = PyTuple_New(2+__pyx_t_15); if (unlikely(!__pyx_t_10)) __PYX_ERR(4, 96, __pyx_L1_error)
  64057. __Pyx_GOTREF(__pyx_t_10);
  64058. if (__pyx_t_8) {
  64059. __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL;
  64060. }
  64061. __Pyx_INCREF(__pyx_v_msg);
  64062. __Pyx_GIVEREF(__pyx_v_msg);
  64063. PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_15, __pyx_v_msg);
  64064. __Pyx_GIVEREF(__pyx_t_6);
  64065. PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_15, __pyx_t_6);
  64066. __pyx_t_6 = 0;
  64067. __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_10, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(4, 96, __pyx_L1_error)
  64068. __Pyx_GOTREF(__pyx_t_9);
  64069. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  64070. }
  64071. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  64072. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  64073. /* "uvloop/handles/handle.pyx":81
  64074. * self._handle = NULL
  64075. *
  64076. * cdef _warn_unclosed(self): # <<<<<<<<<<<<<<
  64077. * if self._source_traceback is not None:
  64078. * try:
  64079. */
  64080. /* function exit code */
  64081. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  64082. goto __pyx_L0;
  64083. __pyx_L1_error:;
  64084. __Pyx_XDECREF(__pyx_t_6);
  64085. __Pyx_XDECREF(__pyx_t_7);
  64086. __Pyx_XDECREF(__pyx_t_8);
  64087. __Pyx_XDECREF(__pyx_t_9);
  64088. __Pyx_XDECREF(__pyx_t_10);
  64089. __Pyx_XDECREF(__pyx_t_12);
  64090. __Pyx_XDECREF(__pyx_t_13);
  64091. __Pyx_XDECREF(__pyx_t_14);
  64092. __Pyx_AddTraceback("uvloop.loop.UVHandle._warn_unclosed", __pyx_clineno, __pyx_lineno, __pyx_filename);
  64093. __pyx_r = 0;
  64094. __pyx_L0:;
  64095. __Pyx_XDECREF(__pyx_v_tb);
  64096. __Pyx_XDECREF(__pyx_v_ex);
  64097. __Pyx_XDECREF(__pyx_v_msg);
  64098. __Pyx_XGIVEREF(__pyx_r);
  64099. __Pyx_RefNannyFinishContext();
  64100. return __pyx_r;
  64101. }
  64102. /* "uvloop/handles/handle.pyx":98
  64103. * warnings_warn(msg, ResourceWarning)
  64104. *
  64105. * cdef inline _abort_init(self): # <<<<<<<<<<<<<<
  64106. * if self._handle is not NULL:
  64107. * self._free()
  64108. */
  64109. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVHandle__abort_init(struct __pyx_obj_6uvloop_4loop_UVHandle *__pyx_v_self) {
  64110. PyObject *__pyx_v_name = NULL;
  64111. PyObject *__pyx_r = NULL;
  64112. __Pyx_RefNannyDeclarations
  64113. int __pyx_t_1;
  64114. PyObject *__pyx_t_2 = NULL;
  64115. PyObject *__pyx_t_3 = NULL;
  64116. PyObject *__pyx_t_4 = NULL;
  64117. int __pyx_t_5;
  64118. int __pyx_t_6;
  64119. char const *__pyx_t_7;
  64120. PyObject *__pyx_t_8 = NULL;
  64121. PyObject *__pyx_t_9 = NULL;
  64122. PyObject *__pyx_t_10 = NULL;
  64123. PyObject *__pyx_t_11 = NULL;
  64124. PyObject *__pyx_t_12 = NULL;
  64125. PyObject *__pyx_t_13 = NULL;
  64126. __Pyx_RefNannySetupContext("_abort_init", 0);
  64127. /* "uvloop/handles/handle.pyx":99
  64128. *
  64129. * cdef inline _abort_init(self):
  64130. * if self._handle is not NULL: # <<<<<<<<<<<<<<
  64131. * self._free()
  64132. *
  64133. */
  64134. __pyx_t_1 = ((__pyx_v_self->_handle != NULL) != 0);
  64135. if (__pyx_t_1) {
  64136. /* "uvloop/handles/handle.pyx":100
  64137. * cdef inline _abort_init(self):
  64138. * if self._handle is not NULL:
  64139. * self._free() # <<<<<<<<<<<<<<
  64140. *
  64141. * try:
  64142. */
  64143. __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVHandle *)__pyx_v_self->__pyx_vtab)->_free(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 100, __pyx_L1_error)
  64144. __Pyx_GOTREF(__pyx_t_2);
  64145. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  64146. /* "uvloop/handles/handle.pyx":99
  64147. *
  64148. * cdef inline _abort_init(self):
  64149. * if self._handle is not NULL: # <<<<<<<<<<<<<<
  64150. * self._free()
  64151. *
  64152. */
  64153. }
  64154. /* "uvloop/handles/handle.pyx":102
  64155. * self._free()
  64156. *
  64157. * try: # <<<<<<<<<<<<<<
  64158. * if UVLOOP_DEBUG:
  64159. * name = self.__class__.__name__
  64160. */
  64161. /*try:*/ {
  64162. /* "uvloop/handles/handle.pyx":103
  64163. *
  64164. * try:
  64165. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  64166. * name = self.__class__.__name__
  64167. * if self._inited:
  64168. */
  64169. __pyx_t_1 = (UVLOOP_DEBUG != 0);
  64170. if (__pyx_t_1) {
  64171. /* "uvloop/handles/handle.pyx":104
  64172. * try:
  64173. * if UVLOOP_DEBUG:
  64174. * name = self.__class__.__name__ # <<<<<<<<<<<<<<
  64175. * if self._inited:
  64176. * raise RuntimeError(
  64177. */
  64178. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 104, __pyx_L5_error)
  64179. __Pyx_GOTREF(__pyx_t_2);
  64180. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 104, __pyx_L5_error)
  64181. __Pyx_GOTREF(__pyx_t_3);
  64182. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  64183. __pyx_v_name = __pyx_t_3;
  64184. __pyx_t_3 = 0;
  64185. /* "uvloop/handles/handle.pyx":105
  64186. * if UVLOOP_DEBUG:
  64187. * name = self.__class__.__name__
  64188. * if self._inited: # <<<<<<<<<<<<<<
  64189. * raise RuntimeError(
  64190. * '_abort_init: {}._inited is set'.format(name))
  64191. */
  64192. __pyx_t_1 = (__pyx_v_self->_inited != 0);
  64193. if (unlikely(__pyx_t_1)) {
  64194. /* "uvloop/handles/handle.pyx":107
  64195. * if self._inited:
  64196. * raise RuntimeError(
  64197. * '_abort_init: {}._inited is set'.format(name)) # <<<<<<<<<<<<<<
  64198. * if self._closed:
  64199. * raise RuntimeError(
  64200. */
  64201. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_abort_init__inited_is_set, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 107, __pyx_L5_error)
  64202. __Pyx_GOTREF(__pyx_t_2);
  64203. __pyx_t_4 = NULL;
  64204. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
  64205. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
  64206. if (likely(__pyx_t_4)) {
  64207. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  64208. __Pyx_INCREF(__pyx_t_4);
  64209. __Pyx_INCREF(function);
  64210. __Pyx_DECREF_SET(__pyx_t_2, function);
  64211. }
  64212. }
  64213. __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_name);
  64214. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  64215. if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 107, __pyx_L5_error)
  64216. __Pyx_GOTREF(__pyx_t_3);
  64217. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  64218. /* "uvloop/handles/handle.pyx":106
  64219. * name = self.__class__.__name__
  64220. * if self._inited:
  64221. * raise RuntimeError( # <<<<<<<<<<<<<<
  64222. * '_abort_init: {}._inited is set'.format(name))
  64223. * if self._closed:
  64224. */
  64225. __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 106, __pyx_L5_error)
  64226. __Pyx_GOTREF(__pyx_t_2);
  64227. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  64228. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  64229. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  64230. __PYX_ERR(4, 106, __pyx_L5_error)
  64231. /* "uvloop/handles/handle.pyx":105
  64232. * if UVLOOP_DEBUG:
  64233. * name = self.__class__.__name__
  64234. * if self._inited: # <<<<<<<<<<<<<<
  64235. * raise RuntimeError(
  64236. * '_abort_init: {}._inited is set'.format(name))
  64237. */
  64238. }
  64239. /* "uvloop/handles/handle.pyx":108
  64240. * raise RuntimeError(
  64241. * '_abort_init: {}._inited is set'.format(name))
  64242. * if self._closed: # <<<<<<<<<<<<<<
  64243. * raise RuntimeError(
  64244. * '_abort_init: {}._closed is set'.format(name))
  64245. */
  64246. __pyx_t_1 = (__pyx_v_self->_closed != 0);
  64247. if (unlikely(__pyx_t_1)) {
  64248. /* "uvloop/handles/handle.pyx":110
  64249. * if self._closed:
  64250. * raise RuntimeError(
  64251. * '_abort_init: {}._closed is set'.format(name)) # <<<<<<<<<<<<<<
  64252. * finally:
  64253. * self._closed = 1
  64254. */
  64255. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_abort_init__closed_is_set, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 110, __pyx_L5_error)
  64256. __Pyx_GOTREF(__pyx_t_3);
  64257. __pyx_t_4 = NULL;
  64258. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
  64259. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
  64260. if (likely(__pyx_t_4)) {
  64261. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  64262. __Pyx_INCREF(__pyx_t_4);
  64263. __Pyx_INCREF(function);
  64264. __Pyx_DECREF_SET(__pyx_t_3, function);
  64265. }
  64266. }
  64267. __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_name);
  64268. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  64269. if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 110, __pyx_L5_error)
  64270. __Pyx_GOTREF(__pyx_t_2);
  64271. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  64272. /* "uvloop/handles/handle.pyx":109
  64273. * '_abort_init: {}._inited is set'.format(name))
  64274. * if self._closed:
  64275. * raise RuntimeError( # <<<<<<<<<<<<<<
  64276. * '_abort_init: {}._closed is set'.format(name))
  64277. * finally:
  64278. */
  64279. __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 109, __pyx_L5_error)
  64280. __Pyx_GOTREF(__pyx_t_3);
  64281. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  64282. __Pyx_Raise(__pyx_t_3, 0, 0, 0);
  64283. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  64284. __PYX_ERR(4, 109, __pyx_L5_error)
  64285. /* "uvloop/handles/handle.pyx":108
  64286. * raise RuntimeError(
  64287. * '_abort_init: {}._inited is set'.format(name))
  64288. * if self._closed: # <<<<<<<<<<<<<<
  64289. * raise RuntimeError(
  64290. * '_abort_init: {}._closed is set'.format(name))
  64291. */
  64292. }
  64293. /* "uvloop/handles/handle.pyx":103
  64294. *
  64295. * try:
  64296. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  64297. * name = self.__class__.__name__
  64298. * if self._inited:
  64299. */
  64300. }
  64301. }
  64302. /* "uvloop/handles/handle.pyx":112
  64303. * '_abort_init: {}._closed is set'.format(name))
  64304. * finally:
  64305. * self._closed = 1 # <<<<<<<<<<<<<<
  64306. *
  64307. * cdef inline _finish_init(self):
  64308. */
  64309. /*finally:*/ {
  64310. /*normal exit:*/{
  64311. __pyx_v_self->_closed = 1;
  64312. goto __pyx_L6;
  64313. }
  64314. __pyx_L5_error:;
  64315. /*exception exit:*/{
  64316. __Pyx_PyThreadState_declare
  64317. __Pyx_PyThreadState_assign
  64318. __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0;
  64319. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  64320. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  64321. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  64322. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
  64323. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10) < 0)) __Pyx_ErrFetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
  64324. __Pyx_XGOTREF(__pyx_t_8);
  64325. __Pyx_XGOTREF(__pyx_t_9);
  64326. __Pyx_XGOTREF(__pyx_t_10);
  64327. __Pyx_XGOTREF(__pyx_t_11);
  64328. __Pyx_XGOTREF(__pyx_t_12);
  64329. __Pyx_XGOTREF(__pyx_t_13);
  64330. __pyx_t_5 = __pyx_lineno; __pyx_t_6 = __pyx_clineno; __pyx_t_7 = __pyx_filename;
  64331. {
  64332. __pyx_v_self->_closed = 1;
  64333. }
  64334. if (PY_MAJOR_VERSION >= 3) {
  64335. __Pyx_XGIVEREF(__pyx_t_11);
  64336. __Pyx_XGIVEREF(__pyx_t_12);
  64337. __Pyx_XGIVEREF(__pyx_t_13);
  64338. __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13);
  64339. }
  64340. __Pyx_XGIVEREF(__pyx_t_8);
  64341. __Pyx_XGIVEREF(__pyx_t_9);
  64342. __Pyx_XGIVEREF(__pyx_t_10);
  64343. __Pyx_ErrRestore(__pyx_t_8, __pyx_t_9, __pyx_t_10);
  64344. __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0;
  64345. __pyx_lineno = __pyx_t_5; __pyx_clineno = __pyx_t_6; __pyx_filename = __pyx_t_7;
  64346. goto __pyx_L1_error;
  64347. }
  64348. __pyx_L6:;
  64349. }
  64350. /* "uvloop/handles/handle.pyx":98
  64351. * warnings_warn(msg, ResourceWarning)
  64352. *
  64353. * cdef inline _abort_init(self): # <<<<<<<<<<<<<<
  64354. * if self._handle is not NULL:
  64355. * self._free()
  64356. */
  64357. /* function exit code */
  64358. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  64359. goto __pyx_L0;
  64360. __pyx_L1_error:;
  64361. __Pyx_XDECREF(__pyx_t_2);
  64362. __Pyx_XDECREF(__pyx_t_3);
  64363. __Pyx_XDECREF(__pyx_t_4);
  64364. __Pyx_AddTraceback("uvloop.loop.UVHandle._abort_init", __pyx_clineno, __pyx_lineno, __pyx_filename);
  64365. __pyx_r = 0;
  64366. __pyx_L0:;
  64367. __Pyx_XDECREF(__pyx_v_name);
  64368. __Pyx_XGIVEREF(__pyx_r);
  64369. __Pyx_RefNannyFinishContext();
  64370. return __pyx_r;
  64371. }
  64372. /* "uvloop/handles/handle.pyx":114
  64373. * self._closed = 1
  64374. *
  64375. * cdef inline _finish_init(self): # <<<<<<<<<<<<<<
  64376. * self._inited = 1
  64377. * if self._has_handle == 1:
  64378. */
  64379. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVHandle__finish_init(struct __pyx_obj_6uvloop_4loop_UVHandle *__pyx_v_self) {
  64380. PyObject *__pyx_v_cls_name = NULL;
  64381. PyObject *__pyx_r = NULL;
  64382. __Pyx_RefNannyDeclarations
  64383. int __pyx_t_1;
  64384. PyObject *__pyx_t_2 = NULL;
  64385. PyObject *__pyx_t_3 = NULL;
  64386. struct __pyx_obj_6uvloop_4loop_Loop *__pyx_t_4 = NULL;
  64387. PyObject *__pyx_t_5 = NULL;
  64388. PyObject *__pyx_t_6 = NULL;
  64389. __Pyx_RefNannySetupContext("_finish_init", 0);
  64390. /* "uvloop/handles/handle.pyx":115
  64391. *
  64392. * cdef inline _finish_init(self):
  64393. * self._inited = 1 # <<<<<<<<<<<<<<
  64394. * if self._has_handle == 1:
  64395. * self._handle.data = <void*>self
  64396. */
  64397. __pyx_v_self->_inited = 1;
  64398. /* "uvloop/handles/handle.pyx":116
  64399. * cdef inline _finish_init(self):
  64400. * self._inited = 1
  64401. * if self._has_handle == 1: # <<<<<<<<<<<<<<
  64402. * self._handle.data = <void*>self
  64403. * if self._loop._debug:
  64404. */
  64405. __pyx_t_1 = ((__pyx_v_self->_has_handle == 1) != 0);
  64406. if (__pyx_t_1) {
  64407. /* "uvloop/handles/handle.pyx":117
  64408. * self._inited = 1
  64409. * if self._has_handle == 1:
  64410. * self._handle.data = <void*>self # <<<<<<<<<<<<<<
  64411. * if self._loop._debug:
  64412. * self._source_traceback = extract_stack()
  64413. */
  64414. __pyx_v_self->_handle->data = ((void *)__pyx_v_self);
  64415. /* "uvloop/handles/handle.pyx":116
  64416. * cdef inline _finish_init(self):
  64417. * self._inited = 1
  64418. * if self._has_handle == 1: # <<<<<<<<<<<<<<
  64419. * self._handle.data = <void*>self
  64420. * if self._loop._debug:
  64421. */
  64422. }
  64423. /* "uvloop/handles/handle.pyx":118
  64424. * if self._has_handle == 1:
  64425. * self._handle.data = <void*>self
  64426. * if self._loop._debug: # <<<<<<<<<<<<<<
  64427. * self._source_traceback = extract_stack()
  64428. * if UVLOOP_DEBUG:
  64429. */
  64430. __pyx_t_1 = (__pyx_v_self->_loop->_debug != 0);
  64431. if (__pyx_t_1) {
  64432. /* "uvloop/handles/handle.pyx":119
  64433. * self._handle.data = <void*>self
  64434. * if self._loop._debug:
  64435. * self._source_traceback = extract_stack() # <<<<<<<<<<<<<<
  64436. * if UVLOOP_DEBUG:
  64437. * cls_name = self.__class__.__name__
  64438. */
  64439. __pyx_t_2 = __pyx_f_6uvloop_4loop_extract_stack(); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 119, __pyx_L1_error)
  64440. __Pyx_GOTREF(__pyx_t_2);
  64441. __Pyx_GIVEREF(__pyx_t_2);
  64442. __Pyx_GOTREF(__pyx_v_self->_source_traceback);
  64443. __Pyx_DECREF(__pyx_v_self->_source_traceback);
  64444. __pyx_v_self->_source_traceback = __pyx_t_2;
  64445. __pyx_t_2 = 0;
  64446. /* "uvloop/handles/handle.pyx":118
  64447. * if self._has_handle == 1:
  64448. * self._handle.data = <void*>self
  64449. * if self._loop._debug: # <<<<<<<<<<<<<<
  64450. * self._source_traceback = extract_stack()
  64451. * if UVLOOP_DEBUG:
  64452. */
  64453. }
  64454. /* "uvloop/handles/handle.pyx":120
  64455. * if self._loop._debug:
  64456. * self._source_traceback = extract_stack()
  64457. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  64458. * cls_name = self.__class__.__name__
  64459. * self._loop._debug_uv_handles_total += 1
  64460. */
  64461. __pyx_t_1 = (UVLOOP_DEBUG != 0);
  64462. if (__pyx_t_1) {
  64463. /* "uvloop/handles/handle.pyx":121
  64464. * self._source_traceback = extract_stack()
  64465. * if UVLOOP_DEBUG:
  64466. * cls_name = self.__class__.__name__ # <<<<<<<<<<<<<<
  64467. * self._loop._debug_uv_handles_total += 1
  64468. * self._loop._debug_handles_total.update([cls_name])
  64469. */
  64470. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 121, __pyx_L1_error)
  64471. __Pyx_GOTREF(__pyx_t_2);
  64472. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 121, __pyx_L1_error)
  64473. __Pyx_GOTREF(__pyx_t_3);
  64474. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  64475. __pyx_v_cls_name = __pyx_t_3;
  64476. __pyx_t_3 = 0;
  64477. /* "uvloop/handles/handle.pyx":122
  64478. * if UVLOOP_DEBUG:
  64479. * cls_name = self.__class__.__name__
  64480. * self._loop._debug_uv_handles_total += 1 # <<<<<<<<<<<<<<
  64481. * self._loop._debug_handles_total.update([cls_name])
  64482. * self._loop._debug_handles_current.update([cls_name])
  64483. */
  64484. __Pyx_INCREF(((PyObject *)__pyx_v_self->_loop));
  64485. __pyx_t_4 = __pyx_v_self->_loop;
  64486. __pyx_t_4->_debug_uv_handles_total = (__pyx_t_4->_debug_uv_handles_total + 1);
  64487. __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  64488. /* "uvloop/handles/handle.pyx":123
  64489. * cls_name = self.__class__.__name__
  64490. * self._loop._debug_uv_handles_total += 1
  64491. * self._loop._debug_handles_total.update([cls_name]) # <<<<<<<<<<<<<<
  64492. * self._loop._debug_handles_current.update([cls_name])
  64493. *
  64494. */
  64495. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_loop->_debug_handles_total, __pyx_n_s_update); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 123, __pyx_L1_error)
  64496. __Pyx_GOTREF(__pyx_t_2);
  64497. __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 123, __pyx_L1_error)
  64498. __Pyx_GOTREF(__pyx_t_5);
  64499. __Pyx_INCREF(__pyx_v_cls_name);
  64500. __Pyx_GIVEREF(__pyx_v_cls_name);
  64501. PyList_SET_ITEM(__pyx_t_5, 0, __pyx_v_cls_name);
  64502. __pyx_t_6 = NULL;
  64503. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
  64504. __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
  64505. if (likely(__pyx_t_6)) {
  64506. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  64507. __Pyx_INCREF(__pyx_t_6);
  64508. __Pyx_INCREF(function);
  64509. __Pyx_DECREF_SET(__pyx_t_2, function);
  64510. }
  64511. }
  64512. __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5);
  64513. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  64514. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  64515. if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 123, __pyx_L1_error)
  64516. __Pyx_GOTREF(__pyx_t_3);
  64517. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  64518. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  64519. /* "uvloop/handles/handle.pyx":124
  64520. * self._loop._debug_uv_handles_total += 1
  64521. * self._loop._debug_handles_total.update([cls_name])
  64522. * self._loop._debug_handles_current.update([cls_name]) # <<<<<<<<<<<<<<
  64523. *
  64524. * cdef inline _start_init(self, Loop loop):
  64525. */
  64526. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_loop->_debug_handles_current, __pyx_n_s_update); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 124, __pyx_L1_error)
  64527. __Pyx_GOTREF(__pyx_t_2);
  64528. __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 124, __pyx_L1_error)
  64529. __Pyx_GOTREF(__pyx_t_5);
  64530. __Pyx_INCREF(__pyx_v_cls_name);
  64531. __Pyx_GIVEREF(__pyx_v_cls_name);
  64532. PyList_SET_ITEM(__pyx_t_5, 0, __pyx_v_cls_name);
  64533. __pyx_t_6 = NULL;
  64534. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
  64535. __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
  64536. if (likely(__pyx_t_6)) {
  64537. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  64538. __Pyx_INCREF(__pyx_t_6);
  64539. __Pyx_INCREF(function);
  64540. __Pyx_DECREF_SET(__pyx_t_2, function);
  64541. }
  64542. }
  64543. __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5);
  64544. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  64545. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  64546. if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 124, __pyx_L1_error)
  64547. __Pyx_GOTREF(__pyx_t_3);
  64548. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  64549. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  64550. /* "uvloop/handles/handle.pyx":120
  64551. * if self._loop._debug:
  64552. * self._source_traceback = extract_stack()
  64553. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  64554. * cls_name = self.__class__.__name__
  64555. * self._loop._debug_uv_handles_total += 1
  64556. */
  64557. }
  64558. /* "uvloop/handles/handle.pyx":114
  64559. * self._closed = 1
  64560. *
  64561. * cdef inline _finish_init(self): # <<<<<<<<<<<<<<
  64562. * self._inited = 1
  64563. * if self._has_handle == 1:
  64564. */
  64565. /* function exit code */
  64566. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  64567. goto __pyx_L0;
  64568. __pyx_L1_error:;
  64569. __Pyx_XDECREF(__pyx_t_2);
  64570. __Pyx_XDECREF(__pyx_t_3);
  64571. __Pyx_XDECREF(((PyObject *)__pyx_t_4));
  64572. __Pyx_XDECREF(__pyx_t_5);
  64573. __Pyx_XDECREF(__pyx_t_6);
  64574. __Pyx_AddTraceback("uvloop.loop.UVHandle._finish_init", __pyx_clineno, __pyx_lineno, __pyx_filename);
  64575. __pyx_r = 0;
  64576. __pyx_L0:;
  64577. __Pyx_XDECREF(__pyx_v_cls_name);
  64578. __Pyx_XGIVEREF(__pyx_r);
  64579. __Pyx_RefNannyFinishContext();
  64580. return __pyx_r;
  64581. }
  64582. /* "uvloop/handles/handle.pyx":126
  64583. * self._loop._debug_handles_current.update([cls_name])
  64584. *
  64585. * cdef inline _start_init(self, Loop loop): # <<<<<<<<<<<<<<
  64586. * if UVLOOP_DEBUG:
  64587. * if self._loop is not None:
  64588. */
  64589. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVHandle__start_init(struct __pyx_obj_6uvloop_4loop_UVHandle *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop) {
  64590. PyObject *__pyx_r = NULL;
  64591. __Pyx_RefNannyDeclarations
  64592. int __pyx_t_1;
  64593. int __pyx_t_2;
  64594. PyObject *__pyx_t_3 = NULL;
  64595. PyObject *__pyx_t_4 = NULL;
  64596. PyObject *__pyx_t_5 = NULL;
  64597. PyObject *__pyx_t_6 = NULL;
  64598. __Pyx_RefNannySetupContext("_start_init", 0);
  64599. /* "uvloop/handles/handle.pyx":127
  64600. *
  64601. * cdef inline _start_init(self, Loop loop):
  64602. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  64603. * if self._loop is not None:
  64604. * raise RuntimeError(
  64605. */
  64606. __pyx_t_1 = (UVLOOP_DEBUG != 0);
  64607. if (__pyx_t_1) {
  64608. /* "uvloop/handles/handle.pyx":128
  64609. * cdef inline _start_init(self, Loop loop):
  64610. * if UVLOOP_DEBUG:
  64611. * if self._loop is not None: # <<<<<<<<<<<<<<
  64612. * raise RuntimeError(
  64613. * '{}._start_init can only be called once'.format(
  64614. */
  64615. __pyx_t_1 = (((PyObject *)__pyx_v_self->_loop) != Py_None);
  64616. __pyx_t_2 = (__pyx_t_1 != 0);
  64617. if (unlikely(__pyx_t_2)) {
  64618. /* "uvloop/handles/handle.pyx":130
  64619. * if self._loop is not None:
  64620. * raise RuntimeError(
  64621. * '{}._start_init can only be called once'.format( # <<<<<<<<<<<<<<
  64622. * self.__class__.__name__))
  64623. *
  64624. */
  64625. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_start_init_can_only_be_called, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 130, __pyx_L1_error)
  64626. __Pyx_GOTREF(__pyx_t_4);
  64627. /* "uvloop/handles/handle.pyx":131
  64628. * raise RuntimeError(
  64629. * '{}._start_init can only be called once'.format(
  64630. * self.__class__.__name__)) # <<<<<<<<<<<<<<
  64631. *
  64632. * self._loop = loop
  64633. */
  64634. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 131, __pyx_L1_error)
  64635. __Pyx_GOTREF(__pyx_t_5);
  64636. __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 131, __pyx_L1_error)
  64637. __Pyx_GOTREF(__pyx_t_6);
  64638. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  64639. __pyx_t_5 = NULL;
  64640. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
  64641. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
  64642. if (likely(__pyx_t_5)) {
  64643. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  64644. __Pyx_INCREF(__pyx_t_5);
  64645. __Pyx_INCREF(function);
  64646. __Pyx_DECREF_SET(__pyx_t_4, function);
  64647. }
  64648. }
  64649. __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6);
  64650. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  64651. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  64652. if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 130, __pyx_L1_error)
  64653. __Pyx_GOTREF(__pyx_t_3);
  64654. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  64655. /* "uvloop/handles/handle.pyx":129
  64656. * if UVLOOP_DEBUG:
  64657. * if self._loop is not None:
  64658. * raise RuntimeError( # <<<<<<<<<<<<<<
  64659. * '{}._start_init can only be called once'.format(
  64660. * self.__class__.__name__))
  64661. */
  64662. __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 129, __pyx_L1_error)
  64663. __Pyx_GOTREF(__pyx_t_4);
  64664. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  64665. __Pyx_Raise(__pyx_t_4, 0, 0, 0);
  64666. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  64667. __PYX_ERR(4, 129, __pyx_L1_error)
  64668. /* "uvloop/handles/handle.pyx":128
  64669. * cdef inline _start_init(self, Loop loop):
  64670. * if UVLOOP_DEBUG:
  64671. * if self._loop is not None: # <<<<<<<<<<<<<<
  64672. * raise RuntimeError(
  64673. * '{}._start_init can only be called once'.format(
  64674. */
  64675. }
  64676. /* "uvloop/handles/handle.pyx":127
  64677. *
  64678. * cdef inline _start_init(self, Loop loop):
  64679. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  64680. * if self._loop is not None:
  64681. * raise RuntimeError(
  64682. */
  64683. }
  64684. /* "uvloop/handles/handle.pyx":133
  64685. * self.__class__.__name__))
  64686. *
  64687. * self._loop = loop # <<<<<<<<<<<<<<
  64688. *
  64689. * cdef inline bint _is_alive(self):
  64690. */
  64691. __Pyx_INCREF(((PyObject *)__pyx_v_loop));
  64692. __Pyx_GIVEREF(((PyObject *)__pyx_v_loop));
  64693. __Pyx_GOTREF(__pyx_v_self->_loop);
  64694. __Pyx_DECREF(((PyObject *)__pyx_v_self->_loop));
  64695. __pyx_v_self->_loop = __pyx_v_loop;
  64696. /* "uvloop/handles/handle.pyx":126
  64697. * self._loop._debug_handles_current.update([cls_name])
  64698. *
  64699. * cdef inline _start_init(self, Loop loop): # <<<<<<<<<<<<<<
  64700. * if UVLOOP_DEBUG:
  64701. * if self._loop is not None:
  64702. */
  64703. /* function exit code */
  64704. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  64705. goto __pyx_L0;
  64706. __pyx_L1_error:;
  64707. __Pyx_XDECREF(__pyx_t_3);
  64708. __Pyx_XDECREF(__pyx_t_4);
  64709. __Pyx_XDECREF(__pyx_t_5);
  64710. __Pyx_XDECREF(__pyx_t_6);
  64711. __Pyx_AddTraceback("uvloop.loop.UVHandle._start_init", __pyx_clineno, __pyx_lineno, __pyx_filename);
  64712. __pyx_r = 0;
  64713. __pyx_L0:;
  64714. __Pyx_XGIVEREF(__pyx_r);
  64715. __Pyx_RefNannyFinishContext();
  64716. return __pyx_r;
  64717. }
  64718. /* "uvloop/handles/handle.pyx":135
  64719. * self._loop = loop
  64720. *
  64721. * cdef inline bint _is_alive(self): # <<<<<<<<<<<<<<
  64722. * cdef bint res
  64723. * res = self._closed != 1 and self._inited == 1
  64724. */
  64725. static CYTHON_INLINE int __pyx_f_6uvloop_4loop_8UVHandle__is_alive(struct __pyx_obj_6uvloop_4loop_UVHandle *__pyx_v_self) {
  64726. int __pyx_v_res;
  64727. PyObject *__pyx_v_name = NULL;
  64728. int __pyx_r;
  64729. __Pyx_RefNannyDeclarations
  64730. int __pyx_t_1;
  64731. int __pyx_t_2;
  64732. PyObject *__pyx_t_3 = NULL;
  64733. PyObject *__pyx_t_4 = NULL;
  64734. PyObject *__pyx_t_5 = NULL;
  64735. __Pyx_RefNannySetupContext("_is_alive", 0);
  64736. /* "uvloop/handles/handle.pyx":137
  64737. * cdef inline bint _is_alive(self):
  64738. * cdef bint res
  64739. * res = self._closed != 1 and self._inited == 1 # <<<<<<<<<<<<<<
  64740. * if UVLOOP_DEBUG:
  64741. * if res and self._has_handle == 1:
  64742. */
  64743. __pyx_t_2 = ((__pyx_v_self->_closed != 1) != 0);
  64744. if (__pyx_t_2) {
  64745. } else {
  64746. __pyx_t_1 = __pyx_t_2;
  64747. goto __pyx_L3_bool_binop_done;
  64748. }
  64749. __pyx_t_2 = ((__pyx_v_self->_inited == 1) != 0);
  64750. __pyx_t_1 = __pyx_t_2;
  64751. __pyx_L3_bool_binop_done:;
  64752. __pyx_v_res = __pyx_t_1;
  64753. /* "uvloop/handles/handle.pyx":138
  64754. * cdef bint res
  64755. * res = self._closed != 1 and self._inited == 1
  64756. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  64757. * if res and self._has_handle == 1:
  64758. * name = self.__class__.__name__
  64759. */
  64760. __pyx_t_1 = (UVLOOP_DEBUG != 0);
  64761. if (__pyx_t_1) {
  64762. /* "uvloop/handles/handle.pyx":139
  64763. * res = self._closed != 1 and self._inited == 1
  64764. * if UVLOOP_DEBUG:
  64765. * if res and self._has_handle == 1: # <<<<<<<<<<<<<<
  64766. * name = self.__class__.__name__
  64767. * if self._handle is NULL:
  64768. */
  64769. __pyx_t_2 = (__pyx_v_res != 0);
  64770. if (__pyx_t_2) {
  64771. } else {
  64772. __pyx_t_1 = __pyx_t_2;
  64773. goto __pyx_L7_bool_binop_done;
  64774. }
  64775. __pyx_t_2 = ((__pyx_v_self->_has_handle == 1) != 0);
  64776. __pyx_t_1 = __pyx_t_2;
  64777. __pyx_L7_bool_binop_done:;
  64778. if (__pyx_t_1) {
  64779. /* "uvloop/handles/handle.pyx":140
  64780. * if UVLOOP_DEBUG:
  64781. * if res and self._has_handle == 1:
  64782. * name = self.__class__.__name__ # <<<<<<<<<<<<<<
  64783. * if self._handle is NULL:
  64784. * raise RuntimeError(
  64785. */
  64786. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 140, __pyx_L1_error)
  64787. __Pyx_GOTREF(__pyx_t_3);
  64788. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 140, __pyx_L1_error)
  64789. __Pyx_GOTREF(__pyx_t_4);
  64790. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  64791. __pyx_v_name = __pyx_t_4;
  64792. __pyx_t_4 = 0;
  64793. /* "uvloop/handles/handle.pyx":141
  64794. * if res and self._has_handle == 1:
  64795. * name = self.__class__.__name__
  64796. * if self._handle is NULL: # <<<<<<<<<<<<<<
  64797. * raise RuntimeError(
  64798. * '{} is alive, but _handle is NULL'.format(name))
  64799. */
  64800. __pyx_t_1 = ((__pyx_v_self->_handle == NULL) != 0);
  64801. if (unlikely(__pyx_t_1)) {
  64802. /* "uvloop/handles/handle.pyx":143
  64803. * if self._handle is NULL:
  64804. * raise RuntimeError(
  64805. * '{} is alive, but _handle is NULL'.format(name)) # <<<<<<<<<<<<<<
  64806. * if self._loop is None:
  64807. * raise RuntimeError(
  64808. */
  64809. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_is_alive_but__handle_is_NULL, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 143, __pyx_L1_error)
  64810. __Pyx_GOTREF(__pyx_t_3);
  64811. __pyx_t_5 = NULL;
  64812. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
  64813. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
  64814. if (likely(__pyx_t_5)) {
  64815. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  64816. __Pyx_INCREF(__pyx_t_5);
  64817. __Pyx_INCREF(function);
  64818. __Pyx_DECREF_SET(__pyx_t_3, function);
  64819. }
  64820. }
  64821. __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_name);
  64822. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  64823. if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 143, __pyx_L1_error)
  64824. __Pyx_GOTREF(__pyx_t_4);
  64825. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  64826. /* "uvloop/handles/handle.pyx":142
  64827. * name = self.__class__.__name__
  64828. * if self._handle is NULL:
  64829. * raise RuntimeError( # <<<<<<<<<<<<<<
  64830. * '{} is alive, but _handle is NULL'.format(name))
  64831. * if self._loop is None:
  64832. */
  64833. __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 142, __pyx_L1_error)
  64834. __Pyx_GOTREF(__pyx_t_3);
  64835. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  64836. __Pyx_Raise(__pyx_t_3, 0, 0, 0);
  64837. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  64838. __PYX_ERR(4, 142, __pyx_L1_error)
  64839. /* "uvloop/handles/handle.pyx":141
  64840. * if res and self._has_handle == 1:
  64841. * name = self.__class__.__name__
  64842. * if self._handle is NULL: # <<<<<<<<<<<<<<
  64843. * raise RuntimeError(
  64844. * '{} is alive, but _handle is NULL'.format(name))
  64845. */
  64846. }
  64847. /* "uvloop/handles/handle.pyx":144
  64848. * raise RuntimeError(
  64849. * '{} is alive, but _handle is NULL'.format(name))
  64850. * if self._loop is None: # <<<<<<<<<<<<<<
  64851. * raise RuntimeError(
  64852. * '{} is alive, but _loop is None'.format(name))
  64853. */
  64854. __pyx_t_1 = (((PyObject *)__pyx_v_self->_loop) == Py_None);
  64855. __pyx_t_2 = (__pyx_t_1 != 0);
  64856. if (unlikely(__pyx_t_2)) {
  64857. /* "uvloop/handles/handle.pyx":146
  64858. * if self._loop is None:
  64859. * raise RuntimeError(
  64860. * '{} is alive, but _loop is None'.format(name)) # <<<<<<<<<<<<<<
  64861. * if self._handle.loop is not self._loop.uvloop:
  64862. * raise RuntimeError(
  64863. */
  64864. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_is_alive_but__loop_is_None, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 146, __pyx_L1_error)
  64865. __Pyx_GOTREF(__pyx_t_4);
  64866. __pyx_t_5 = NULL;
  64867. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
  64868. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
  64869. if (likely(__pyx_t_5)) {
  64870. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  64871. __Pyx_INCREF(__pyx_t_5);
  64872. __Pyx_INCREF(function);
  64873. __Pyx_DECREF_SET(__pyx_t_4, function);
  64874. }
  64875. }
  64876. __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_name);
  64877. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  64878. if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 146, __pyx_L1_error)
  64879. __Pyx_GOTREF(__pyx_t_3);
  64880. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  64881. /* "uvloop/handles/handle.pyx":145
  64882. * '{} is alive, but _handle is NULL'.format(name))
  64883. * if self._loop is None:
  64884. * raise RuntimeError( # <<<<<<<<<<<<<<
  64885. * '{} is alive, but _loop is None'.format(name))
  64886. * if self._handle.loop is not self._loop.uvloop:
  64887. */
  64888. __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 145, __pyx_L1_error)
  64889. __Pyx_GOTREF(__pyx_t_4);
  64890. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  64891. __Pyx_Raise(__pyx_t_4, 0, 0, 0);
  64892. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  64893. __PYX_ERR(4, 145, __pyx_L1_error)
  64894. /* "uvloop/handles/handle.pyx":144
  64895. * raise RuntimeError(
  64896. * '{} is alive, but _handle is NULL'.format(name))
  64897. * if self._loop is None: # <<<<<<<<<<<<<<
  64898. * raise RuntimeError(
  64899. * '{} is alive, but _loop is None'.format(name))
  64900. */
  64901. }
  64902. /* "uvloop/handles/handle.pyx":147
  64903. * raise RuntimeError(
  64904. * '{} is alive, but _loop is None'.format(name))
  64905. * if self._handle.loop is not self._loop.uvloop: # <<<<<<<<<<<<<<
  64906. * raise RuntimeError(
  64907. * '{} is alive, but _handle.loop is not '
  64908. */
  64909. __pyx_t_2 = ((__pyx_v_self->_handle->loop != __pyx_v_self->_loop->uvloop) != 0);
  64910. if (unlikely(__pyx_t_2)) {
  64911. /* "uvloop/handles/handle.pyx":150
  64912. * raise RuntimeError(
  64913. * '{} is alive, but _handle.loop is not '
  64914. * 'initialized'.format(name)) # <<<<<<<<<<<<<<
  64915. * if self._handle.data is not <void*>self:
  64916. * raise RuntimeError(
  64917. */
  64918. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_is_alive_but__handle_loop_is_no, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 150, __pyx_L1_error)
  64919. __Pyx_GOTREF(__pyx_t_3);
  64920. __pyx_t_5 = NULL;
  64921. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
  64922. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
  64923. if (likely(__pyx_t_5)) {
  64924. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  64925. __Pyx_INCREF(__pyx_t_5);
  64926. __Pyx_INCREF(function);
  64927. __Pyx_DECREF_SET(__pyx_t_3, function);
  64928. }
  64929. }
  64930. __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_name);
  64931. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  64932. if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 150, __pyx_L1_error)
  64933. __Pyx_GOTREF(__pyx_t_4);
  64934. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  64935. /* "uvloop/handles/handle.pyx":148
  64936. * '{} is alive, but _loop is None'.format(name))
  64937. * if self._handle.loop is not self._loop.uvloop:
  64938. * raise RuntimeError( # <<<<<<<<<<<<<<
  64939. * '{} is alive, but _handle.loop is not '
  64940. * 'initialized'.format(name))
  64941. */
  64942. __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 148, __pyx_L1_error)
  64943. __Pyx_GOTREF(__pyx_t_3);
  64944. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  64945. __Pyx_Raise(__pyx_t_3, 0, 0, 0);
  64946. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  64947. __PYX_ERR(4, 148, __pyx_L1_error)
  64948. /* "uvloop/handles/handle.pyx":147
  64949. * raise RuntimeError(
  64950. * '{} is alive, but _loop is None'.format(name))
  64951. * if self._handle.loop is not self._loop.uvloop: # <<<<<<<<<<<<<<
  64952. * raise RuntimeError(
  64953. * '{} is alive, but _handle.loop is not '
  64954. */
  64955. }
  64956. /* "uvloop/handles/handle.pyx":151
  64957. * '{} is alive, but _handle.loop is not '
  64958. * 'initialized'.format(name))
  64959. * if self._handle.data is not <void*>self: # <<<<<<<<<<<<<<
  64960. * raise RuntimeError(
  64961. * '{} is alive, but _handle.data is not '
  64962. */
  64963. __pyx_t_2 = ((__pyx_v_self->_handle->data != ((void *)__pyx_v_self)) != 0);
  64964. if (unlikely(__pyx_t_2)) {
  64965. /* "uvloop/handles/handle.pyx":154
  64966. * raise RuntimeError(
  64967. * '{} is alive, but _handle.data is not '
  64968. * 'initialized'.format(name)) # <<<<<<<<<<<<<<
  64969. * return res
  64970. *
  64971. */
  64972. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_is_alive_but__handle_data_is_no, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 154, __pyx_L1_error)
  64973. __Pyx_GOTREF(__pyx_t_4);
  64974. __pyx_t_5 = NULL;
  64975. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
  64976. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
  64977. if (likely(__pyx_t_5)) {
  64978. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  64979. __Pyx_INCREF(__pyx_t_5);
  64980. __Pyx_INCREF(function);
  64981. __Pyx_DECREF_SET(__pyx_t_4, function);
  64982. }
  64983. }
  64984. __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_name);
  64985. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  64986. if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 154, __pyx_L1_error)
  64987. __Pyx_GOTREF(__pyx_t_3);
  64988. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  64989. /* "uvloop/handles/handle.pyx":152
  64990. * 'initialized'.format(name))
  64991. * if self._handle.data is not <void*>self:
  64992. * raise RuntimeError( # <<<<<<<<<<<<<<
  64993. * '{} is alive, but _handle.data is not '
  64994. * 'initialized'.format(name))
  64995. */
  64996. __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 152, __pyx_L1_error)
  64997. __Pyx_GOTREF(__pyx_t_4);
  64998. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  64999. __Pyx_Raise(__pyx_t_4, 0, 0, 0);
  65000. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  65001. __PYX_ERR(4, 152, __pyx_L1_error)
  65002. /* "uvloop/handles/handle.pyx":151
  65003. * '{} is alive, but _handle.loop is not '
  65004. * 'initialized'.format(name))
  65005. * if self._handle.data is not <void*>self: # <<<<<<<<<<<<<<
  65006. * raise RuntimeError(
  65007. * '{} is alive, but _handle.data is not '
  65008. */
  65009. }
  65010. /* "uvloop/handles/handle.pyx":139
  65011. * res = self._closed != 1 and self._inited == 1
  65012. * if UVLOOP_DEBUG:
  65013. * if res and self._has_handle == 1: # <<<<<<<<<<<<<<
  65014. * name = self.__class__.__name__
  65015. * if self._handle is NULL:
  65016. */
  65017. }
  65018. /* "uvloop/handles/handle.pyx":138
  65019. * cdef bint res
  65020. * res = self._closed != 1 and self._inited == 1
  65021. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  65022. * if res and self._has_handle == 1:
  65023. * name = self.__class__.__name__
  65024. */
  65025. }
  65026. /* "uvloop/handles/handle.pyx":155
  65027. * '{} is alive, but _handle.data is not '
  65028. * 'initialized'.format(name))
  65029. * return res # <<<<<<<<<<<<<<
  65030. *
  65031. * cdef inline _ensure_alive(self):
  65032. */
  65033. __pyx_r = __pyx_v_res;
  65034. goto __pyx_L0;
  65035. /* "uvloop/handles/handle.pyx":135
  65036. * self._loop = loop
  65037. *
  65038. * cdef inline bint _is_alive(self): # <<<<<<<<<<<<<<
  65039. * cdef bint res
  65040. * res = self._closed != 1 and self._inited == 1
  65041. */
  65042. /* function exit code */
  65043. __pyx_L1_error:;
  65044. __Pyx_XDECREF(__pyx_t_3);
  65045. __Pyx_XDECREF(__pyx_t_4);
  65046. __Pyx_XDECREF(__pyx_t_5);
  65047. __Pyx_WriteUnraisable("uvloop.loop.UVHandle._is_alive", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  65048. __pyx_r = 0;
  65049. __pyx_L0:;
  65050. __Pyx_XDECREF(__pyx_v_name);
  65051. __Pyx_RefNannyFinishContext();
  65052. return __pyx_r;
  65053. }
  65054. /* "uvloop/handles/handle.pyx":157
  65055. * return res
  65056. *
  65057. * cdef inline _ensure_alive(self): # <<<<<<<<<<<<<<
  65058. * if not self._is_alive():
  65059. * raise RuntimeError(
  65060. */
  65061. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVHandle__ensure_alive(struct __pyx_obj_6uvloop_4loop_UVHandle *__pyx_v_self) {
  65062. PyObject *__pyx_r = NULL;
  65063. __Pyx_RefNannyDeclarations
  65064. int __pyx_t_1;
  65065. PyObject *__pyx_t_2 = NULL;
  65066. PyObject *__pyx_t_3 = NULL;
  65067. PyObject *__pyx_t_4 = NULL;
  65068. __Pyx_RefNannySetupContext("_ensure_alive", 0);
  65069. /* "uvloop/handles/handle.pyx":158
  65070. *
  65071. * cdef inline _ensure_alive(self):
  65072. * if not self._is_alive(): # <<<<<<<<<<<<<<
  65073. * raise RuntimeError(
  65074. * 'unable to perform operation on {!r}; '
  65075. */
  65076. __pyx_t_1 = ((!(__pyx_f_6uvloop_4loop_8UVHandle__is_alive(__pyx_v_self) != 0)) != 0);
  65077. if (unlikely(__pyx_t_1)) {
  65078. /* "uvloop/handles/handle.pyx":161
  65079. * raise RuntimeError(
  65080. * 'unable to perform operation on {!r}; '
  65081. * 'the handler is closed'.format(self)) # <<<<<<<<<<<<<<
  65082. *
  65083. * cdef _fatal_error(self, exc, throw, reason=None):
  65084. */
  65085. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_unable_to_perform_operation_on_r, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 161, __pyx_L1_error)
  65086. __Pyx_GOTREF(__pyx_t_3);
  65087. __pyx_t_4 = NULL;
  65088. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
  65089. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
  65090. if (likely(__pyx_t_4)) {
  65091. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  65092. __Pyx_INCREF(__pyx_t_4);
  65093. __Pyx_INCREF(function);
  65094. __Pyx_DECREF_SET(__pyx_t_3, function);
  65095. }
  65096. }
  65097. __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_self)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_self));
  65098. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  65099. if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 161, __pyx_L1_error)
  65100. __Pyx_GOTREF(__pyx_t_2);
  65101. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  65102. /* "uvloop/handles/handle.pyx":159
  65103. * cdef inline _ensure_alive(self):
  65104. * if not self._is_alive():
  65105. * raise RuntimeError( # <<<<<<<<<<<<<<
  65106. * 'unable to perform operation on {!r}; '
  65107. * 'the handler is closed'.format(self))
  65108. */
  65109. __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 159, __pyx_L1_error)
  65110. __Pyx_GOTREF(__pyx_t_3);
  65111. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  65112. __Pyx_Raise(__pyx_t_3, 0, 0, 0);
  65113. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  65114. __PYX_ERR(4, 159, __pyx_L1_error)
  65115. /* "uvloop/handles/handle.pyx":158
  65116. *
  65117. * cdef inline _ensure_alive(self):
  65118. * if not self._is_alive(): # <<<<<<<<<<<<<<
  65119. * raise RuntimeError(
  65120. * 'unable to perform operation on {!r}; '
  65121. */
  65122. }
  65123. /* "uvloop/handles/handle.pyx":157
  65124. * return res
  65125. *
  65126. * cdef inline _ensure_alive(self): # <<<<<<<<<<<<<<
  65127. * if not self._is_alive():
  65128. * raise RuntimeError(
  65129. */
  65130. /* function exit code */
  65131. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  65132. goto __pyx_L0;
  65133. __pyx_L1_error:;
  65134. __Pyx_XDECREF(__pyx_t_2);
  65135. __Pyx_XDECREF(__pyx_t_3);
  65136. __Pyx_XDECREF(__pyx_t_4);
  65137. __Pyx_AddTraceback("uvloop.loop.UVHandle._ensure_alive", __pyx_clineno, __pyx_lineno, __pyx_filename);
  65138. __pyx_r = 0;
  65139. __pyx_L0:;
  65140. __Pyx_XGIVEREF(__pyx_r);
  65141. __Pyx_RefNannyFinishContext();
  65142. return __pyx_r;
  65143. }
  65144. /* "uvloop/handles/handle.pyx":163
  65145. * 'the handler is closed'.format(self))
  65146. *
  65147. * cdef _fatal_error(self, exc, throw, reason=None): # <<<<<<<<<<<<<<
  65148. * # Fatal error means an error that was returned by the
  65149. * # underlying libuv handle function. We usually can't
  65150. */
  65151. static PyObject *__pyx_f_6uvloop_4loop_8UVHandle__fatal_error(struct __pyx_obj_6uvloop_4loop_UVHandle *__pyx_v_self, PyObject *__pyx_v_exc, PyObject *__pyx_v_throw, struct __pyx_opt_args_6uvloop_4loop_8UVHandle__fatal_error *__pyx_optional_args) {
  65152. PyObject *__pyx_r = NULL;
  65153. __Pyx_RefNannyDeclarations
  65154. PyObject *__pyx_t_1 = NULL;
  65155. int __pyx_t_2;
  65156. int __pyx_t_3;
  65157. int __pyx_t_4;
  65158. __Pyx_RefNannySetupContext("_fatal_error", 0);
  65159. if (__pyx_optional_args) {
  65160. }
  65161. /* "uvloop/handles/handle.pyx":167
  65162. * # underlying libuv handle function. We usually can't
  65163. * # recover from that, hence we just close the handle.
  65164. * self._close() # <<<<<<<<<<<<<<
  65165. *
  65166. * if throw or self._loop is None:
  65167. */
  65168. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVHandle *)__pyx_v_self->__pyx_vtab)->_close(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 167, __pyx_L1_error)
  65169. __Pyx_GOTREF(__pyx_t_1);
  65170. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  65171. /* "uvloop/handles/handle.pyx":169
  65172. * self._close()
  65173. *
  65174. * if throw or self._loop is None: # <<<<<<<<<<<<<<
  65175. * raise exc
  65176. * else:
  65177. */
  65178. __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_throw); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(4, 169, __pyx_L1_error)
  65179. if (!__pyx_t_3) {
  65180. } else {
  65181. __pyx_t_2 = __pyx_t_3;
  65182. goto __pyx_L4_bool_binop_done;
  65183. }
  65184. __pyx_t_3 = (((PyObject *)__pyx_v_self->_loop) == Py_None);
  65185. __pyx_t_4 = (__pyx_t_3 != 0);
  65186. __pyx_t_2 = __pyx_t_4;
  65187. __pyx_L4_bool_binop_done:;
  65188. if (unlikely(__pyx_t_2)) {
  65189. /* "uvloop/handles/handle.pyx":170
  65190. *
  65191. * if throw or self._loop is None:
  65192. * raise exc # <<<<<<<<<<<<<<
  65193. * else:
  65194. * self._loop._handle_exception(exc)
  65195. */
  65196. __Pyx_Raise(__pyx_v_exc, 0, 0, 0);
  65197. __PYX_ERR(4, 170, __pyx_L1_error)
  65198. /* "uvloop/handles/handle.pyx":169
  65199. * self._close()
  65200. *
  65201. * if throw or self._loop is None: # <<<<<<<<<<<<<<
  65202. * raise exc
  65203. * else:
  65204. */
  65205. }
  65206. /* "uvloop/handles/handle.pyx":172
  65207. * raise exc
  65208. * else:
  65209. * self._loop._handle_exception(exc) # <<<<<<<<<<<<<<
  65210. *
  65211. * cdef _error(self, exc, throw):
  65212. */
  65213. /*else*/ {
  65214. ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->_loop->__pyx_vtab)->_handle_exception(__pyx_v_self->_loop, __pyx_v_exc);
  65215. }
  65216. /* "uvloop/handles/handle.pyx":163
  65217. * 'the handler is closed'.format(self))
  65218. *
  65219. * cdef _fatal_error(self, exc, throw, reason=None): # <<<<<<<<<<<<<<
  65220. * # Fatal error means an error that was returned by the
  65221. * # underlying libuv handle function. We usually can't
  65222. */
  65223. /* function exit code */
  65224. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  65225. goto __pyx_L0;
  65226. __pyx_L1_error:;
  65227. __Pyx_XDECREF(__pyx_t_1);
  65228. __Pyx_AddTraceback("uvloop.loop.UVHandle._fatal_error", __pyx_clineno, __pyx_lineno, __pyx_filename);
  65229. __pyx_r = 0;
  65230. __pyx_L0:;
  65231. __Pyx_XGIVEREF(__pyx_r);
  65232. __Pyx_RefNannyFinishContext();
  65233. return __pyx_r;
  65234. }
  65235. /* "uvloop/handles/handle.pyx":174
  65236. * self._loop._handle_exception(exc)
  65237. *
  65238. * cdef _error(self, exc, throw): # <<<<<<<<<<<<<<
  65239. * # A non-fatal error is usually an error that was caught
  65240. * # by the handler, but was originated in the client code
  65241. */
  65242. static PyObject *__pyx_f_6uvloop_4loop_8UVHandle__error(struct __pyx_obj_6uvloop_4loop_UVHandle *__pyx_v_self, PyObject *__pyx_v_exc, PyObject *__pyx_v_throw) {
  65243. PyObject *__pyx_r = NULL;
  65244. __Pyx_RefNannyDeclarations
  65245. int __pyx_t_1;
  65246. int __pyx_t_2;
  65247. int __pyx_t_3;
  65248. __Pyx_RefNannySetupContext("_error", 0);
  65249. /* "uvloop/handles/handle.pyx":179
  65250. * # (not in libuv). In this case we either want to simply
  65251. * # raise or log it.
  65252. * if throw or self._loop is None: # <<<<<<<<<<<<<<
  65253. * raise exc
  65254. * else:
  65255. */
  65256. __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_throw); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(4, 179, __pyx_L1_error)
  65257. if (!__pyx_t_2) {
  65258. } else {
  65259. __pyx_t_1 = __pyx_t_2;
  65260. goto __pyx_L4_bool_binop_done;
  65261. }
  65262. __pyx_t_2 = (((PyObject *)__pyx_v_self->_loop) == Py_None);
  65263. __pyx_t_3 = (__pyx_t_2 != 0);
  65264. __pyx_t_1 = __pyx_t_3;
  65265. __pyx_L4_bool_binop_done:;
  65266. if (unlikely(__pyx_t_1)) {
  65267. /* "uvloop/handles/handle.pyx":180
  65268. * # raise or log it.
  65269. * if throw or self._loop is None:
  65270. * raise exc # <<<<<<<<<<<<<<
  65271. * else:
  65272. * self._loop._handle_exception(exc)
  65273. */
  65274. __Pyx_Raise(__pyx_v_exc, 0, 0, 0);
  65275. __PYX_ERR(4, 180, __pyx_L1_error)
  65276. /* "uvloop/handles/handle.pyx":179
  65277. * # (not in libuv). In this case we either want to simply
  65278. * # raise or log it.
  65279. * if throw or self._loop is None: # <<<<<<<<<<<<<<
  65280. * raise exc
  65281. * else:
  65282. */
  65283. }
  65284. /* "uvloop/handles/handle.pyx":182
  65285. * raise exc
  65286. * else:
  65287. * self._loop._handle_exception(exc) # <<<<<<<<<<<<<<
  65288. *
  65289. * cdef _close(self):
  65290. */
  65291. /*else*/ {
  65292. ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->_loop->__pyx_vtab)->_handle_exception(__pyx_v_self->_loop, __pyx_v_exc);
  65293. }
  65294. /* "uvloop/handles/handle.pyx":174
  65295. * self._loop._handle_exception(exc)
  65296. *
  65297. * cdef _error(self, exc, throw): # <<<<<<<<<<<<<<
  65298. * # A non-fatal error is usually an error that was caught
  65299. * # by the handler, but was originated in the client code
  65300. */
  65301. /* function exit code */
  65302. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  65303. goto __pyx_L0;
  65304. __pyx_L1_error:;
  65305. __Pyx_AddTraceback("uvloop.loop.UVHandle._error", __pyx_clineno, __pyx_lineno, __pyx_filename);
  65306. __pyx_r = 0;
  65307. __pyx_L0:;
  65308. __Pyx_XGIVEREF(__pyx_r);
  65309. __Pyx_RefNannyFinishContext();
  65310. return __pyx_r;
  65311. }
  65312. /* "uvloop/handles/handle.pyx":184
  65313. * self._loop._handle_exception(exc)
  65314. *
  65315. * cdef _close(self): # <<<<<<<<<<<<<<
  65316. * if self._closed == 1:
  65317. * return
  65318. */
  65319. static PyObject *__pyx_f_6uvloop_4loop_8UVHandle__close(struct __pyx_obj_6uvloop_4loop_UVHandle *__pyx_v_self) {
  65320. PyObject *__pyx_r = NULL;
  65321. __Pyx_RefNannyDeclarations
  65322. int __pyx_t_1;
  65323. PyObject *__pyx_t_2 = NULL;
  65324. PyObject *__pyx_t_3 = NULL;
  65325. PyObject *__pyx_t_4 = NULL;
  65326. PyObject *__pyx_t_5 = NULL;
  65327. int __pyx_t_6;
  65328. __Pyx_RefNannySetupContext("_close", 0);
  65329. /* "uvloop/handles/handle.pyx":185
  65330. *
  65331. * cdef _close(self):
  65332. * if self._closed == 1: # <<<<<<<<<<<<<<
  65333. * return
  65334. *
  65335. */
  65336. __pyx_t_1 = ((__pyx_v_self->_closed == 1) != 0);
  65337. if (__pyx_t_1) {
  65338. /* "uvloop/handles/handle.pyx":186
  65339. * cdef _close(self):
  65340. * if self._closed == 1:
  65341. * return # <<<<<<<<<<<<<<
  65342. *
  65343. * self._closed = 1
  65344. */
  65345. __Pyx_XDECREF(__pyx_r);
  65346. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  65347. goto __pyx_L0;
  65348. /* "uvloop/handles/handle.pyx":185
  65349. *
  65350. * cdef _close(self):
  65351. * if self._closed == 1: # <<<<<<<<<<<<<<
  65352. * return
  65353. *
  65354. */
  65355. }
  65356. /* "uvloop/handles/handle.pyx":188
  65357. * return
  65358. *
  65359. * self._closed = 1 # <<<<<<<<<<<<<<
  65360. *
  65361. * if self._handle is NULL:
  65362. */
  65363. __pyx_v_self->_closed = 1;
  65364. /* "uvloop/handles/handle.pyx":190
  65365. * self._closed = 1
  65366. *
  65367. * if self._handle is NULL: # <<<<<<<<<<<<<<
  65368. * return
  65369. *
  65370. */
  65371. __pyx_t_1 = ((__pyx_v_self->_handle == NULL) != 0);
  65372. if (__pyx_t_1) {
  65373. /* "uvloop/handles/handle.pyx":191
  65374. *
  65375. * if self._handle is NULL:
  65376. * return # <<<<<<<<<<<<<<
  65377. *
  65378. * if UVLOOP_DEBUG:
  65379. */
  65380. __Pyx_XDECREF(__pyx_r);
  65381. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  65382. goto __pyx_L0;
  65383. /* "uvloop/handles/handle.pyx":190
  65384. * self._closed = 1
  65385. *
  65386. * if self._handle is NULL: # <<<<<<<<<<<<<<
  65387. * return
  65388. *
  65389. */
  65390. }
  65391. /* "uvloop/handles/handle.pyx":193
  65392. * return
  65393. *
  65394. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  65395. * if self._handle.data is NULL:
  65396. * raise RuntimeError(
  65397. */
  65398. __pyx_t_1 = (UVLOOP_DEBUG != 0);
  65399. if (__pyx_t_1) {
  65400. /* "uvloop/handles/handle.pyx":194
  65401. *
  65402. * if UVLOOP_DEBUG:
  65403. * if self._handle.data is NULL: # <<<<<<<<<<<<<<
  65404. * raise RuntimeError(
  65405. * '{}._close: _handle.data is NULL'.format(
  65406. */
  65407. __pyx_t_1 = ((__pyx_v_self->_handle->data == NULL) != 0);
  65408. if (unlikely(__pyx_t_1)) {
  65409. /* "uvloop/handles/handle.pyx":196
  65410. * if self._handle.data is NULL:
  65411. * raise RuntimeError(
  65412. * '{}._close: _handle.data is NULL'.format( # <<<<<<<<<<<<<<
  65413. * self.__class__.__name__))
  65414. *
  65415. */
  65416. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_close__handle_data_is_NULL, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 196, __pyx_L1_error)
  65417. __Pyx_GOTREF(__pyx_t_3);
  65418. /* "uvloop/handles/handle.pyx":197
  65419. * raise RuntimeError(
  65420. * '{}._close: _handle.data is NULL'.format(
  65421. * self.__class__.__name__)) # <<<<<<<<<<<<<<
  65422. *
  65423. * if <object>self._handle.data is not self:
  65424. */
  65425. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 197, __pyx_L1_error)
  65426. __Pyx_GOTREF(__pyx_t_4);
  65427. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 197, __pyx_L1_error)
  65428. __Pyx_GOTREF(__pyx_t_5);
  65429. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  65430. __pyx_t_4 = NULL;
  65431. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
  65432. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
  65433. if (likely(__pyx_t_4)) {
  65434. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  65435. __Pyx_INCREF(__pyx_t_4);
  65436. __Pyx_INCREF(function);
  65437. __Pyx_DECREF_SET(__pyx_t_3, function);
  65438. }
  65439. }
  65440. __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5);
  65441. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  65442. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  65443. if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 196, __pyx_L1_error)
  65444. __Pyx_GOTREF(__pyx_t_2);
  65445. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  65446. /* "uvloop/handles/handle.pyx":195
  65447. * if UVLOOP_DEBUG:
  65448. * if self._handle.data is NULL:
  65449. * raise RuntimeError( # <<<<<<<<<<<<<<
  65450. * '{}._close: _handle.data is NULL'.format(
  65451. * self.__class__.__name__))
  65452. */
  65453. __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 195, __pyx_L1_error)
  65454. __Pyx_GOTREF(__pyx_t_3);
  65455. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  65456. __Pyx_Raise(__pyx_t_3, 0, 0, 0);
  65457. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  65458. __PYX_ERR(4, 195, __pyx_L1_error)
  65459. /* "uvloop/handles/handle.pyx":194
  65460. *
  65461. * if UVLOOP_DEBUG:
  65462. * if self._handle.data is NULL: # <<<<<<<<<<<<<<
  65463. * raise RuntimeError(
  65464. * '{}._close: _handle.data is NULL'.format(
  65465. */
  65466. }
  65467. /* "uvloop/handles/handle.pyx":199
  65468. * self.__class__.__name__))
  65469. *
  65470. * if <object>self._handle.data is not self: # <<<<<<<<<<<<<<
  65471. * raise RuntimeError(
  65472. * '{}._close: _handle.data is not UVHandle/self'.format(
  65473. */
  65474. __pyx_t_1 = (((PyObject *)__pyx_v_self->_handle->data) != ((PyObject *)__pyx_v_self));
  65475. __pyx_t_6 = (__pyx_t_1 != 0);
  65476. if (unlikely(__pyx_t_6)) {
  65477. /* "uvloop/handles/handle.pyx":201
  65478. * if <object>self._handle.data is not self:
  65479. * raise RuntimeError(
  65480. * '{}._close: _handle.data is not UVHandle/self'.format( # <<<<<<<<<<<<<<
  65481. * self.__class__.__name__))
  65482. *
  65483. */
  65484. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_close__handle_data_is_not_UVHa, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 201, __pyx_L1_error)
  65485. __Pyx_GOTREF(__pyx_t_2);
  65486. /* "uvloop/handles/handle.pyx":202
  65487. * raise RuntimeError(
  65488. * '{}._close: _handle.data is not UVHandle/self'.format(
  65489. * self.__class__.__name__)) # <<<<<<<<<<<<<<
  65490. *
  65491. * if uv.uv_is_closing(self._handle):
  65492. */
  65493. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 202, __pyx_L1_error)
  65494. __Pyx_GOTREF(__pyx_t_5);
  65495. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 202, __pyx_L1_error)
  65496. __Pyx_GOTREF(__pyx_t_4);
  65497. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  65498. __pyx_t_5 = NULL;
  65499. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
  65500. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
  65501. if (likely(__pyx_t_5)) {
  65502. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  65503. __Pyx_INCREF(__pyx_t_5);
  65504. __Pyx_INCREF(function);
  65505. __Pyx_DECREF_SET(__pyx_t_2, function);
  65506. }
  65507. }
  65508. __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
  65509. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  65510. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  65511. if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 201, __pyx_L1_error)
  65512. __Pyx_GOTREF(__pyx_t_3);
  65513. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  65514. /* "uvloop/handles/handle.pyx":200
  65515. *
  65516. * if <object>self._handle.data is not self:
  65517. * raise RuntimeError( # <<<<<<<<<<<<<<
  65518. * '{}._close: _handle.data is not UVHandle/self'.format(
  65519. * self.__class__.__name__))
  65520. */
  65521. __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 200, __pyx_L1_error)
  65522. __Pyx_GOTREF(__pyx_t_2);
  65523. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  65524. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  65525. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  65526. __PYX_ERR(4, 200, __pyx_L1_error)
  65527. /* "uvloop/handles/handle.pyx":199
  65528. * self.__class__.__name__))
  65529. *
  65530. * if <object>self._handle.data is not self: # <<<<<<<<<<<<<<
  65531. * raise RuntimeError(
  65532. * '{}._close: _handle.data is not UVHandle/self'.format(
  65533. */
  65534. }
  65535. /* "uvloop/handles/handle.pyx":204
  65536. * self.__class__.__name__))
  65537. *
  65538. * if uv.uv_is_closing(self._handle): # <<<<<<<<<<<<<<
  65539. * raise RuntimeError(
  65540. * '{}._close: uv_is_closing() is true'.format(
  65541. */
  65542. __pyx_t_6 = (uv_is_closing(__pyx_v_self->_handle) != 0);
  65543. if (unlikely(__pyx_t_6)) {
  65544. /* "uvloop/handles/handle.pyx":206
  65545. * if uv.uv_is_closing(self._handle):
  65546. * raise RuntimeError(
  65547. * '{}._close: uv_is_closing() is true'.format( # <<<<<<<<<<<<<<
  65548. * self.__class__.__name__))
  65549. *
  65550. */
  65551. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_close_uv_is_closing_is_true, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 206, __pyx_L1_error)
  65552. __Pyx_GOTREF(__pyx_t_3);
  65553. /* "uvloop/handles/handle.pyx":207
  65554. * raise RuntimeError(
  65555. * '{}._close: uv_is_closing() is true'.format(
  65556. * self.__class__.__name__)) # <<<<<<<<<<<<<<
  65557. *
  65558. * # We want the handle wrapper (UVHandle) to stay alive until
  65559. */
  65560. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 207, __pyx_L1_error)
  65561. __Pyx_GOTREF(__pyx_t_4);
  65562. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 207, __pyx_L1_error)
  65563. __Pyx_GOTREF(__pyx_t_5);
  65564. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  65565. __pyx_t_4 = NULL;
  65566. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
  65567. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
  65568. if (likely(__pyx_t_4)) {
  65569. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  65570. __Pyx_INCREF(__pyx_t_4);
  65571. __Pyx_INCREF(function);
  65572. __Pyx_DECREF_SET(__pyx_t_3, function);
  65573. }
  65574. }
  65575. __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5);
  65576. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  65577. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  65578. if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 206, __pyx_L1_error)
  65579. __Pyx_GOTREF(__pyx_t_2);
  65580. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  65581. /* "uvloop/handles/handle.pyx":205
  65582. *
  65583. * if uv.uv_is_closing(self._handle):
  65584. * raise RuntimeError( # <<<<<<<<<<<<<<
  65585. * '{}._close: uv_is_closing() is true'.format(
  65586. * self.__class__.__name__))
  65587. */
  65588. __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 205, __pyx_L1_error)
  65589. __Pyx_GOTREF(__pyx_t_3);
  65590. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  65591. __Pyx_Raise(__pyx_t_3, 0, 0, 0);
  65592. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  65593. __PYX_ERR(4, 205, __pyx_L1_error)
  65594. /* "uvloop/handles/handle.pyx":204
  65595. * self.__class__.__name__))
  65596. *
  65597. * if uv.uv_is_closing(self._handle): # <<<<<<<<<<<<<<
  65598. * raise RuntimeError(
  65599. * '{}._close: uv_is_closing() is true'.format(
  65600. */
  65601. }
  65602. /* "uvloop/handles/handle.pyx":193
  65603. * return
  65604. *
  65605. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  65606. * if self._handle.data is NULL:
  65607. * raise RuntimeError(
  65608. */
  65609. }
  65610. /* "uvloop/handles/handle.pyx":211
  65611. * # We want the handle wrapper (UVHandle) to stay alive until
  65612. * # the closing callback fires.
  65613. * Py_INCREF(self) # <<<<<<<<<<<<<<
  65614. * uv.uv_close(self._handle, __uv_close_handle_cb) # void; no errors
  65615. *
  65616. */
  65617. Py_INCREF(((PyObject *)__pyx_v_self));
  65618. /* "uvloop/handles/handle.pyx":212
  65619. * # the closing callback fires.
  65620. * Py_INCREF(self)
  65621. * uv.uv_close(self._handle, __uv_close_handle_cb) # void; no errors # <<<<<<<<<<<<<<
  65622. *
  65623. * def __repr__(self):
  65624. */
  65625. uv_close(__pyx_v_self->_handle, __pyx_f_6uvloop_4loop___uv_close_handle_cb);
  65626. /* "uvloop/handles/handle.pyx":184
  65627. * self._loop._handle_exception(exc)
  65628. *
  65629. * cdef _close(self): # <<<<<<<<<<<<<<
  65630. * if self._closed == 1:
  65631. * return
  65632. */
  65633. /* function exit code */
  65634. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  65635. goto __pyx_L0;
  65636. __pyx_L1_error:;
  65637. __Pyx_XDECREF(__pyx_t_2);
  65638. __Pyx_XDECREF(__pyx_t_3);
  65639. __Pyx_XDECREF(__pyx_t_4);
  65640. __Pyx_XDECREF(__pyx_t_5);
  65641. __Pyx_AddTraceback("uvloop.loop.UVHandle._close", __pyx_clineno, __pyx_lineno, __pyx_filename);
  65642. __pyx_r = 0;
  65643. __pyx_L0:;
  65644. __Pyx_XGIVEREF(__pyx_r);
  65645. __Pyx_RefNannyFinishContext();
  65646. return __pyx_r;
  65647. }
  65648. /* "uvloop/handles/handle.pyx":214
  65649. * uv.uv_close(self._handle, __uv_close_handle_cb) # void; no errors
  65650. *
  65651. * def __repr__(self): # <<<<<<<<<<<<<<
  65652. * return '<{} closed={} {:#x}>'.format(
  65653. * self.__class__.__name__,
  65654. */
  65655. /* Python wrapper */
  65656. static PyObject *__pyx_pw_6uvloop_4loop_8UVHandle_7__repr__(PyObject *__pyx_v_self); /*proto*/
  65657. static PyObject *__pyx_pw_6uvloop_4loop_8UVHandle_7__repr__(PyObject *__pyx_v_self) {
  65658. PyObject *__pyx_r = 0;
  65659. __Pyx_RefNannyDeclarations
  65660. __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  65661. __pyx_r = __pyx_pf_6uvloop_4loop_8UVHandle_6__repr__(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self));
  65662. /* function exit code */
  65663. __Pyx_RefNannyFinishContext();
  65664. return __pyx_r;
  65665. }
  65666. static PyObject *__pyx_pf_6uvloop_4loop_8UVHandle_6__repr__(struct __pyx_obj_6uvloop_4loop_UVHandle *__pyx_v_self) {
  65667. PyObject *__pyx_r = NULL;
  65668. __Pyx_RefNannyDeclarations
  65669. PyObject *__pyx_t_1 = NULL;
  65670. PyObject *__pyx_t_2 = NULL;
  65671. PyObject *__pyx_t_3 = NULL;
  65672. PyObject *__pyx_t_4 = NULL;
  65673. PyObject *__pyx_t_5 = NULL;
  65674. PyObject *__pyx_t_6 = NULL;
  65675. int __pyx_t_7;
  65676. PyObject *__pyx_t_8 = NULL;
  65677. __Pyx_RefNannySetupContext("__repr__", 0);
  65678. /* "uvloop/handles/handle.pyx":215
  65679. *
  65680. * def __repr__(self):
  65681. * return '<{} closed={} {:#x}>'.format( # <<<<<<<<<<<<<<
  65682. * self.__class__.__name__,
  65683. * self._closed,
  65684. */
  65685. __Pyx_XDECREF(__pyx_r);
  65686. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_closed_x, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 215, __pyx_L1_error)
  65687. __Pyx_GOTREF(__pyx_t_2);
  65688. /* "uvloop/handles/handle.pyx":216
  65689. * def __repr__(self):
  65690. * return '<{} closed={} {:#x}>'.format(
  65691. * self.__class__.__name__, # <<<<<<<<<<<<<<
  65692. * self._closed,
  65693. * id(self))
  65694. */
  65695. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 216, __pyx_L1_error)
  65696. __Pyx_GOTREF(__pyx_t_3);
  65697. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 216, __pyx_L1_error)
  65698. __Pyx_GOTREF(__pyx_t_4);
  65699. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  65700. /* "uvloop/handles/handle.pyx":217
  65701. * return '<{} closed={} {:#x}>'.format(
  65702. * self.__class__.__name__,
  65703. * self._closed, # <<<<<<<<<<<<<<
  65704. * id(self))
  65705. *
  65706. */
  65707. __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_self->_closed); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 217, __pyx_L1_error)
  65708. __Pyx_GOTREF(__pyx_t_3);
  65709. /* "uvloop/handles/handle.pyx":218
  65710. * self.__class__.__name__,
  65711. * self._closed,
  65712. * id(self)) # <<<<<<<<<<<<<<
  65713. *
  65714. *
  65715. */
  65716. __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 218, __pyx_L1_error)
  65717. __Pyx_GOTREF(__pyx_t_5);
  65718. __pyx_t_6 = NULL;
  65719. __pyx_t_7 = 0;
  65720. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
  65721. __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
  65722. if (likely(__pyx_t_6)) {
  65723. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  65724. __Pyx_INCREF(__pyx_t_6);
  65725. __Pyx_INCREF(function);
  65726. __Pyx_DECREF_SET(__pyx_t_2, function);
  65727. __pyx_t_7 = 1;
  65728. }
  65729. }
  65730. #if CYTHON_FAST_PYCALL
  65731. if (PyFunction_Check(__pyx_t_2)) {
  65732. PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_t_4, __pyx_t_3, __pyx_t_5};
  65733. __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 215, __pyx_L1_error)
  65734. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  65735. __Pyx_GOTREF(__pyx_t_1);
  65736. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  65737. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  65738. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  65739. } else
  65740. #endif
  65741. #if CYTHON_FAST_PYCCALL
  65742. if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
  65743. PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_t_4, __pyx_t_3, __pyx_t_5};
  65744. __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 215, __pyx_L1_error)
  65745. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  65746. __Pyx_GOTREF(__pyx_t_1);
  65747. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  65748. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  65749. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  65750. } else
  65751. #endif
  65752. {
  65753. __pyx_t_8 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(4, 215, __pyx_L1_error)
  65754. __Pyx_GOTREF(__pyx_t_8);
  65755. if (__pyx_t_6) {
  65756. __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
  65757. }
  65758. __Pyx_GIVEREF(__pyx_t_4);
  65759. PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_4);
  65760. __Pyx_GIVEREF(__pyx_t_3);
  65761. PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_3);
  65762. __Pyx_GIVEREF(__pyx_t_5);
  65763. PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_t_5);
  65764. __pyx_t_4 = 0;
  65765. __pyx_t_3 = 0;
  65766. __pyx_t_5 = 0;
  65767. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 215, __pyx_L1_error)
  65768. __Pyx_GOTREF(__pyx_t_1);
  65769. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  65770. }
  65771. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  65772. __pyx_r = __pyx_t_1;
  65773. __pyx_t_1 = 0;
  65774. goto __pyx_L0;
  65775. /* "uvloop/handles/handle.pyx":214
  65776. * uv.uv_close(self._handle, __uv_close_handle_cb) # void; no errors
  65777. *
  65778. * def __repr__(self): # <<<<<<<<<<<<<<
  65779. * return '<{} closed={} {:#x}>'.format(
  65780. * self.__class__.__name__,
  65781. */
  65782. /* function exit code */
  65783. __pyx_L1_error:;
  65784. __Pyx_XDECREF(__pyx_t_1);
  65785. __Pyx_XDECREF(__pyx_t_2);
  65786. __Pyx_XDECREF(__pyx_t_3);
  65787. __Pyx_XDECREF(__pyx_t_4);
  65788. __Pyx_XDECREF(__pyx_t_5);
  65789. __Pyx_XDECREF(__pyx_t_6);
  65790. __Pyx_XDECREF(__pyx_t_8);
  65791. __Pyx_AddTraceback("uvloop.loop.UVHandle.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  65792. __pyx_r = NULL;
  65793. __pyx_L0:;
  65794. __Pyx_XGIVEREF(__pyx_r);
  65795. __Pyx_RefNannyFinishContext();
  65796. return __pyx_r;
  65797. }
  65798. /* "uvloop/handles/handle.pxd":5
  65799. * uv.uv_handle_t *_handle
  65800. * Loop _loop
  65801. * readonly _source_traceback # <<<<<<<<<<<<<<
  65802. * bint _closed
  65803. * bint _inited
  65804. */
  65805. /* Python wrapper */
  65806. static PyObject *__pyx_pw_6uvloop_4loop_8UVHandle_17_source_traceback_1__get__(PyObject *__pyx_v_self); /*proto*/
  65807. static PyObject *__pyx_pw_6uvloop_4loop_8UVHandle_17_source_traceback_1__get__(PyObject *__pyx_v_self) {
  65808. PyObject *__pyx_r = 0;
  65809. __Pyx_RefNannyDeclarations
  65810. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  65811. __pyx_r = __pyx_pf_6uvloop_4loop_8UVHandle_17_source_traceback___get__(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self));
  65812. /* function exit code */
  65813. __Pyx_RefNannyFinishContext();
  65814. return __pyx_r;
  65815. }
  65816. static PyObject *__pyx_pf_6uvloop_4loop_8UVHandle_17_source_traceback___get__(struct __pyx_obj_6uvloop_4loop_UVHandle *__pyx_v_self) {
  65817. PyObject *__pyx_r = NULL;
  65818. __Pyx_RefNannyDeclarations
  65819. __Pyx_RefNannySetupContext("__get__", 0);
  65820. __Pyx_XDECREF(__pyx_r);
  65821. __Pyx_INCREF(__pyx_v_self->_source_traceback);
  65822. __pyx_r = __pyx_v_self->_source_traceback;
  65823. goto __pyx_L0;
  65824. /* function exit code */
  65825. __pyx_L0:;
  65826. __Pyx_XGIVEREF(__pyx_r);
  65827. __Pyx_RefNannyFinishContext();
  65828. return __pyx_r;
  65829. }
  65830. /* "(tree fragment)":1
  65831. * def __reduce_cython__(self): # <<<<<<<<<<<<<<
  65832. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  65833. * def __setstate_cython__(self, __pyx_state):
  65834. */
  65835. /* Python wrapper */
  65836. static PyObject *__pyx_pw_6uvloop_4loop_8UVHandle_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  65837. static char __pyx_doc_6uvloop_4loop_8UVHandle_8__reduce_cython__[] = "UVHandle.__reduce_cython__(self)";
  65838. static PyObject *__pyx_pw_6uvloop_4loop_8UVHandle_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  65839. PyObject *__pyx_r = 0;
  65840. __Pyx_RefNannyDeclarations
  65841. __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  65842. __pyx_r = __pyx_pf_6uvloop_4loop_8UVHandle_8__reduce_cython__(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self));
  65843. /* function exit code */
  65844. __Pyx_RefNannyFinishContext();
  65845. return __pyx_r;
  65846. }
  65847. static PyObject *__pyx_pf_6uvloop_4loop_8UVHandle_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVHandle *__pyx_v_self) {
  65848. PyObject *__pyx_r = NULL;
  65849. __Pyx_RefNannyDeclarations
  65850. PyObject *__pyx_t_1 = NULL;
  65851. __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  65852. /* "(tree fragment)":2
  65853. * def __reduce_cython__(self):
  65854. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  65855. * def __setstate_cython__(self, __pyx_state):
  65856. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  65857. */
  65858. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__100, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 2, __pyx_L1_error)
  65859. __Pyx_GOTREF(__pyx_t_1);
  65860. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  65861. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  65862. __PYX_ERR(9, 2, __pyx_L1_error)
  65863. /* "(tree fragment)":1
  65864. * def __reduce_cython__(self): # <<<<<<<<<<<<<<
  65865. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  65866. * def __setstate_cython__(self, __pyx_state):
  65867. */
  65868. /* function exit code */
  65869. __pyx_L1_error:;
  65870. __Pyx_XDECREF(__pyx_t_1);
  65871. __Pyx_AddTraceback("uvloop.loop.UVHandle.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  65872. __pyx_r = NULL;
  65873. __Pyx_XGIVEREF(__pyx_r);
  65874. __Pyx_RefNannyFinishContext();
  65875. return __pyx_r;
  65876. }
  65877. /* "(tree fragment)":3
  65878. * def __reduce_cython__(self):
  65879. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  65880. * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
  65881. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  65882. */
  65883. /* Python wrapper */
  65884. static PyObject *__pyx_pw_6uvloop_4loop_8UVHandle_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
  65885. static char __pyx_doc_6uvloop_4loop_8UVHandle_10__setstate_cython__[] = "UVHandle.__setstate_cython__(self, __pyx_state)";
  65886. static PyObject *__pyx_pw_6uvloop_4loop_8UVHandle_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  65887. PyObject *__pyx_r = 0;
  65888. __Pyx_RefNannyDeclarations
  65889. __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  65890. __pyx_r = __pyx_pf_6uvloop_4loop_8UVHandle_10__setstate_cython__(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
  65891. /* function exit code */
  65892. __Pyx_RefNannyFinishContext();
  65893. return __pyx_r;
  65894. }
  65895. static PyObject *__pyx_pf_6uvloop_4loop_8UVHandle_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVHandle *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  65896. PyObject *__pyx_r = NULL;
  65897. __Pyx_RefNannyDeclarations
  65898. PyObject *__pyx_t_1 = NULL;
  65899. __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  65900. /* "(tree fragment)":4
  65901. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  65902. * def __setstate_cython__(self, __pyx_state):
  65903. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  65904. */
  65905. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__101, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 4, __pyx_L1_error)
  65906. __Pyx_GOTREF(__pyx_t_1);
  65907. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  65908. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  65909. __PYX_ERR(9, 4, __pyx_L1_error)
  65910. /* "(tree fragment)":3
  65911. * def __reduce_cython__(self):
  65912. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  65913. * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
  65914. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  65915. */
  65916. /* function exit code */
  65917. __pyx_L1_error:;
  65918. __Pyx_XDECREF(__pyx_t_1);
  65919. __Pyx_AddTraceback("uvloop.loop.UVHandle.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  65920. __pyx_r = NULL;
  65921. __Pyx_XGIVEREF(__pyx_r);
  65922. __Pyx_RefNannyFinishContext();
  65923. return __pyx_r;
  65924. }
  65925. /* "uvloop/handles/handle.pyx":223
  65926. * cdef class UVSocketHandle(UVHandle):
  65927. *
  65928. * def __cinit__(self): # <<<<<<<<<<<<<<
  65929. * self._fileobj = None
  65930. * self.__cached_socket = None
  65931. */
  65932. /* Python wrapper */
  65933. static int __pyx_pw_6uvloop_4loop_14UVSocketHandle_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  65934. static int __pyx_pw_6uvloop_4loop_14UVSocketHandle_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  65935. int __pyx_r;
  65936. __Pyx_RefNannyDeclarations
  65937. __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  65938. if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
  65939. __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  65940. if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
  65941. __pyx_r = __pyx_pf_6uvloop_4loop_14UVSocketHandle___cinit__(((struct __pyx_obj_6uvloop_4loop_UVSocketHandle *)__pyx_v_self));
  65942. /* function exit code */
  65943. __Pyx_RefNannyFinishContext();
  65944. return __pyx_r;
  65945. }
  65946. static int __pyx_pf_6uvloop_4loop_14UVSocketHandle___cinit__(struct __pyx_obj_6uvloop_4loop_UVSocketHandle *__pyx_v_self) {
  65947. int __pyx_r;
  65948. __Pyx_RefNannyDeclarations
  65949. __Pyx_RefNannySetupContext("__cinit__", 0);
  65950. /* "uvloop/handles/handle.pyx":224
  65951. *
  65952. * def __cinit__(self):
  65953. * self._fileobj = None # <<<<<<<<<<<<<<
  65954. * self.__cached_socket = None
  65955. *
  65956. */
  65957. __Pyx_INCREF(Py_None);
  65958. __Pyx_GIVEREF(Py_None);
  65959. __Pyx_GOTREF(__pyx_v_self->_fileobj);
  65960. __Pyx_DECREF(__pyx_v_self->_fileobj);
  65961. __pyx_v_self->_fileobj = Py_None;
  65962. /* "uvloop/handles/handle.pyx":225
  65963. * def __cinit__(self):
  65964. * self._fileobj = None
  65965. * self.__cached_socket = None # <<<<<<<<<<<<<<
  65966. *
  65967. * cdef _fileno(self):
  65968. */
  65969. __Pyx_INCREF(Py_None);
  65970. __Pyx_GIVEREF(Py_None);
  65971. __Pyx_GOTREF(__pyx_v_self->__pyx___cached_socket);
  65972. __Pyx_DECREF(__pyx_v_self->__pyx___cached_socket);
  65973. __pyx_v_self->__pyx___cached_socket = Py_None;
  65974. /* "uvloop/handles/handle.pyx":223
  65975. * cdef class UVSocketHandle(UVHandle):
  65976. *
  65977. * def __cinit__(self): # <<<<<<<<<<<<<<
  65978. * self._fileobj = None
  65979. * self.__cached_socket = None
  65980. */
  65981. /* function exit code */
  65982. __pyx_r = 0;
  65983. __Pyx_RefNannyFinishContext();
  65984. return __pyx_r;
  65985. }
  65986. /* "uvloop/handles/handle.pyx":227
  65987. * self.__cached_socket = None
  65988. *
  65989. * cdef _fileno(self): # <<<<<<<<<<<<<<
  65990. * cdef:
  65991. * int fd
  65992. */
  65993. static PyObject *__pyx_f_6uvloop_4loop_14UVSocketHandle__fileno(struct __pyx_obj_6uvloop_4loop_UVSocketHandle *__pyx_v_self) {
  65994. int __pyx_v_fd;
  65995. int __pyx_v_err;
  65996. PyObject *__pyx_r = NULL;
  65997. __Pyx_RefNannyDeclarations
  65998. PyObject *__pyx_t_1 = NULL;
  65999. int __pyx_t_2;
  66000. __Pyx_RefNannySetupContext("_fileno", 0);
  66001. /* "uvloop/handles/handle.pyx":232
  66002. * int err
  66003. *
  66004. * self._ensure_alive() # <<<<<<<<<<<<<<
  66005. * err = uv.uv_fileno(self._handle, <uv.uv_os_fd_t*>&fd)
  66006. * if err < 0:
  66007. */
  66008. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVSocketHandle *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._ensure_alive(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 232, __pyx_L1_error)
  66009. __Pyx_GOTREF(__pyx_t_1);
  66010. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  66011. /* "uvloop/handles/handle.pyx":233
  66012. *
  66013. * self._ensure_alive()
  66014. * err = uv.uv_fileno(self._handle, <uv.uv_os_fd_t*>&fd) # <<<<<<<<<<<<<<
  66015. * if err < 0:
  66016. * raise convert_error(err)
  66017. */
  66018. __pyx_v_err = uv_fileno(__pyx_v_self->__pyx_base._handle, ((uv_os_fd_t *)(&__pyx_v_fd)));
  66019. /* "uvloop/handles/handle.pyx":234
  66020. * self._ensure_alive()
  66021. * err = uv.uv_fileno(self._handle, <uv.uv_os_fd_t*>&fd)
  66022. * if err < 0: # <<<<<<<<<<<<<<
  66023. * raise convert_error(err)
  66024. *
  66025. */
  66026. __pyx_t_2 = ((__pyx_v_err < 0) != 0);
  66027. if (unlikely(__pyx_t_2)) {
  66028. /* "uvloop/handles/handle.pyx":235
  66029. * err = uv.uv_fileno(self._handle, <uv.uv_os_fd_t*>&fd)
  66030. * if err < 0:
  66031. * raise convert_error(err) # <<<<<<<<<<<<<<
  66032. *
  66033. * return fd
  66034. */
  66035. __pyx_t_1 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 235, __pyx_L1_error)
  66036. __Pyx_GOTREF(__pyx_t_1);
  66037. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  66038. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  66039. __PYX_ERR(4, 235, __pyx_L1_error)
  66040. /* "uvloop/handles/handle.pyx":234
  66041. * self._ensure_alive()
  66042. * err = uv.uv_fileno(self._handle, <uv.uv_os_fd_t*>&fd)
  66043. * if err < 0: # <<<<<<<<<<<<<<
  66044. * raise convert_error(err)
  66045. *
  66046. */
  66047. }
  66048. /* "uvloop/handles/handle.pyx":237
  66049. * raise convert_error(err)
  66050. *
  66051. * return fd # <<<<<<<<<<<<<<
  66052. *
  66053. * cdef _new_socket(self):
  66054. */
  66055. __Pyx_XDECREF(__pyx_r);
  66056. __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_fd); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 237, __pyx_L1_error)
  66057. __Pyx_GOTREF(__pyx_t_1);
  66058. __pyx_r = __pyx_t_1;
  66059. __pyx_t_1 = 0;
  66060. goto __pyx_L0;
  66061. /* "uvloop/handles/handle.pyx":227
  66062. * self.__cached_socket = None
  66063. *
  66064. * cdef _fileno(self): # <<<<<<<<<<<<<<
  66065. * cdef:
  66066. * int fd
  66067. */
  66068. /* function exit code */
  66069. __pyx_L1_error:;
  66070. __Pyx_XDECREF(__pyx_t_1);
  66071. __Pyx_AddTraceback("uvloop.loop.UVSocketHandle._fileno", __pyx_clineno, __pyx_lineno, __pyx_filename);
  66072. __pyx_r = 0;
  66073. __pyx_L0:;
  66074. __Pyx_XGIVEREF(__pyx_r);
  66075. __Pyx_RefNannyFinishContext();
  66076. return __pyx_r;
  66077. }
  66078. /* "uvloop/handles/handle.pyx":239
  66079. * return fd
  66080. *
  66081. * cdef _new_socket(self): # <<<<<<<<<<<<<<
  66082. * raise NotImplementedError
  66083. *
  66084. */
  66085. static PyObject *__pyx_f_6uvloop_4loop_14UVSocketHandle__new_socket(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVSocketHandle *__pyx_v_self) {
  66086. PyObject *__pyx_r = NULL;
  66087. __Pyx_RefNannyDeclarations
  66088. __Pyx_RefNannySetupContext("_new_socket", 0);
  66089. /* "uvloop/handles/handle.pyx":240
  66090. *
  66091. * cdef _new_socket(self):
  66092. * raise NotImplementedError # <<<<<<<<<<<<<<
  66093. *
  66094. * cdef inline _get_socket(self):
  66095. */
  66096. __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0);
  66097. __PYX_ERR(4, 240, __pyx_L1_error)
  66098. /* "uvloop/handles/handle.pyx":239
  66099. * return fd
  66100. *
  66101. * cdef _new_socket(self): # <<<<<<<<<<<<<<
  66102. * raise NotImplementedError
  66103. *
  66104. */
  66105. /* function exit code */
  66106. __pyx_L1_error:;
  66107. __Pyx_AddTraceback("uvloop.loop.UVSocketHandle._new_socket", __pyx_clineno, __pyx_lineno, __pyx_filename);
  66108. __pyx_r = 0;
  66109. __Pyx_XGIVEREF(__pyx_r);
  66110. __Pyx_RefNannyFinishContext();
  66111. return __pyx_r;
  66112. }
  66113. /* "uvloop/handles/handle.pyx":242
  66114. * raise NotImplementedError
  66115. *
  66116. * cdef inline _get_socket(self): # <<<<<<<<<<<<<<
  66117. * if self.__cached_socket is not None:
  66118. * return self.__cached_socket
  66119. */
  66120. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_14UVSocketHandle__get_socket(struct __pyx_obj_6uvloop_4loop_UVSocketHandle *__pyx_v_self) {
  66121. PyObject *__pyx_r = NULL;
  66122. __Pyx_RefNannyDeclarations
  66123. int __pyx_t_1;
  66124. int __pyx_t_2;
  66125. PyObject *__pyx_t_3 = NULL;
  66126. PyObject *__pyx_t_4 = NULL;
  66127. PyObject *__pyx_t_5 = NULL;
  66128. __Pyx_RefNannySetupContext("_get_socket", 0);
  66129. /* "uvloop/handles/handle.pyx":243
  66130. *
  66131. * cdef inline _get_socket(self):
  66132. * if self.__cached_socket is not None: # <<<<<<<<<<<<<<
  66133. * return self.__cached_socket
  66134. *
  66135. */
  66136. __pyx_t_1 = (__pyx_v_self->__pyx___cached_socket != Py_None);
  66137. __pyx_t_2 = (__pyx_t_1 != 0);
  66138. if (__pyx_t_2) {
  66139. /* "uvloop/handles/handle.pyx":244
  66140. * cdef inline _get_socket(self):
  66141. * if self.__cached_socket is not None:
  66142. * return self.__cached_socket # <<<<<<<<<<<<<<
  66143. *
  66144. * if not self._is_alive():
  66145. */
  66146. __Pyx_XDECREF(__pyx_r);
  66147. __Pyx_INCREF(__pyx_v_self->__pyx___cached_socket);
  66148. __pyx_r = __pyx_v_self->__pyx___cached_socket;
  66149. goto __pyx_L0;
  66150. /* "uvloop/handles/handle.pyx":243
  66151. *
  66152. * cdef inline _get_socket(self):
  66153. * if self.__cached_socket is not None: # <<<<<<<<<<<<<<
  66154. * return self.__cached_socket
  66155. *
  66156. */
  66157. }
  66158. /* "uvloop/handles/handle.pyx":246
  66159. * return self.__cached_socket
  66160. *
  66161. * if not self._is_alive(): # <<<<<<<<<<<<<<
  66162. * return None
  66163. *
  66164. */
  66165. __pyx_t_2 = ((!(((struct __pyx_vtabstruct_6uvloop_4loop_UVSocketHandle *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._is_alive(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)) != 0)) != 0);
  66166. if (__pyx_t_2) {
  66167. /* "uvloop/handles/handle.pyx":247
  66168. *
  66169. * if not self._is_alive():
  66170. * return None # <<<<<<<<<<<<<<
  66171. *
  66172. * self.__cached_socket = self._new_socket()
  66173. */
  66174. __Pyx_XDECREF(__pyx_r);
  66175. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  66176. goto __pyx_L0;
  66177. /* "uvloop/handles/handle.pyx":246
  66178. * return self.__cached_socket
  66179. *
  66180. * if not self._is_alive(): # <<<<<<<<<<<<<<
  66181. * return None
  66182. *
  66183. */
  66184. }
  66185. /* "uvloop/handles/handle.pyx":249
  66186. * return None
  66187. *
  66188. * self.__cached_socket = self._new_socket() # <<<<<<<<<<<<<<
  66189. * if UVLOOP_DEBUG:
  66190. * # We don't "dup" for the "__cached_socket".
  66191. */
  66192. __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVSocketHandle *)__pyx_v_self->__pyx_base.__pyx_vtab)->_new_socket(__pyx_v_self); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 249, __pyx_L1_error)
  66193. __Pyx_GOTREF(__pyx_t_3);
  66194. __Pyx_GIVEREF(__pyx_t_3);
  66195. __Pyx_GOTREF(__pyx_v_self->__pyx___cached_socket);
  66196. __Pyx_DECREF(__pyx_v_self->__pyx___cached_socket);
  66197. __pyx_v_self->__pyx___cached_socket = __pyx_t_3;
  66198. __pyx_t_3 = 0;
  66199. /* "uvloop/handles/handle.pyx":250
  66200. *
  66201. * self.__cached_socket = self._new_socket()
  66202. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  66203. * # We don't "dup" for the "__cached_socket".
  66204. * assert self.__cached_socket.fileno() == self._fileno()
  66205. */
  66206. __pyx_t_2 = (UVLOOP_DEBUG != 0);
  66207. if (__pyx_t_2) {
  66208. /* "uvloop/handles/handle.pyx":252
  66209. * if UVLOOP_DEBUG:
  66210. * # We don't "dup" for the "__cached_socket".
  66211. * assert self.__cached_socket.fileno() == self._fileno() # <<<<<<<<<<<<<<
  66212. * return self.__cached_socket
  66213. *
  66214. */
  66215. #ifndef CYTHON_WITHOUT_ASSERTIONS
  66216. if (unlikely(!Py_OptimizeFlag)) {
  66217. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx___cached_socket, __pyx_n_s_fileno); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 252, __pyx_L1_error)
  66218. __Pyx_GOTREF(__pyx_t_4);
  66219. __pyx_t_5 = NULL;
  66220. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
  66221. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
  66222. if (likely(__pyx_t_5)) {
  66223. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  66224. __Pyx_INCREF(__pyx_t_5);
  66225. __Pyx_INCREF(function);
  66226. __Pyx_DECREF_SET(__pyx_t_4, function);
  66227. }
  66228. }
  66229. __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
  66230. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  66231. if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 252, __pyx_L1_error)
  66232. __Pyx_GOTREF(__pyx_t_3);
  66233. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  66234. __pyx_t_4 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVSocketHandle *)__pyx_v_self->__pyx_base.__pyx_vtab)->_fileno(__pyx_v_self); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 252, __pyx_L1_error)
  66235. __Pyx_GOTREF(__pyx_t_4);
  66236. __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 252, __pyx_L1_error)
  66237. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  66238. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  66239. __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(4, 252, __pyx_L1_error)
  66240. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  66241. if (unlikely(!__pyx_t_2)) {
  66242. PyErr_SetNone(PyExc_AssertionError);
  66243. __PYX_ERR(4, 252, __pyx_L1_error)
  66244. }
  66245. }
  66246. #endif
  66247. /* "uvloop/handles/handle.pyx":250
  66248. *
  66249. * self.__cached_socket = self._new_socket()
  66250. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  66251. * # We don't "dup" for the "__cached_socket".
  66252. * assert self.__cached_socket.fileno() == self._fileno()
  66253. */
  66254. }
  66255. /* "uvloop/handles/handle.pyx":253
  66256. * # We don't "dup" for the "__cached_socket".
  66257. * assert self.__cached_socket.fileno() == self._fileno()
  66258. * return self.__cached_socket # <<<<<<<<<<<<<<
  66259. *
  66260. * cdef inline _attach_fileobj(self, object file):
  66261. */
  66262. __Pyx_XDECREF(__pyx_r);
  66263. __Pyx_INCREF(__pyx_v_self->__pyx___cached_socket);
  66264. __pyx_r = __pyx_v_self->__pyx___cached_socket;
  66265. goto __pyx_L0;
  66266. /* "uvloop/handles/handle.pyx":242
  66267. * raise NotImplementedError
  66268. *
  66269. * cdef inline _get_socket(self): # <<<<<<<<<<<<<<
  66270. * if self.__cached_socket is not None:
  66271. * return self.__cached_socket
  66272. */
  66273. /* function exit code */
  66274. __pyx_L1_error:;
  66275. __Pyx_XDECREF(__pyx_t_3);
  66276. __Pyx_XDECREF(__pyx_t_4);
  66277. __Pyx_XDECREF(__pyx_t_5);
  66278. __Pyx_AddTraceback("uvloop.loop.UVSocketHandle._get_socket", __pyx_clineno, __pyx_lineno, __pyx_filename);
  66279. __pyx_r = 0;
  66280. __pyx_L0:;
  66281. __Pyx_XGIVEREF(__pyx_r);
  66282. __Pyx_RefNannyFinishContext();
  66283. return __pyx_r;
  66284. }
  66285. /* "uvloop/handles/handle.pyx":255
  66286. * return self.__cached_socket
  66287. *
  66288. * cdef inline _attach_fileobj(self, object file): # <<<<<<<<<<<<<<
  66289. * # When we create a TCP/PIPE/etc connection/server based on
  66290. * # a Python file object, we need to close the file object when
  66291. */
  66292. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_14UVSocketHandle__attach_fileobj(struct __pyx_obj_6uvloop_4loop_UVSocketHandle *__pyx_v_self, PyObject *__pyx_v_file) {
  66293. PyObject *__pyx_r = NULL;
  66294. __Pyx_RefNannyDeclarations
  66295. PyObject *__pyx_t_1 = NULL;
  66296. __Pyx_RefNannySetupContext("_attach_fileobj", 0);
  66297. /* "uvloop/handles/handle.pyx":259
  66298. * # a Python file object, we need to close the file object when
  66299. * # the uv handle is closed.
  66300. * socket_inc_io_ref(file) # <<<<<<<<<<<<<<
  66301. * self._fileobj = file
  66302. *
  66303. */
  66304. __pyx_t_1 = __pyx_f_6uvloop_4loop_socket_inc_io_ref(__pyx_v_file); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 259, __pyx_L1_error)
  66305. __Pyx_GOTREF(__pyx_t_1);
  66306. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  66307. /* "uvloop/handles/handle.pyx":260
  66308. * # the uv handle is closed.
  66309. * socket_inc_io_ref(file)
  66310. * self._fileobj = file # <<<<<<<<<<<<<<
  66311. *
  66312. * cdef _close(self):
  66313. */
  66314. __Pyx_INCREF(__pyx_v_file);
  66315. __Pyx_GIVEREF(__pyx_v_file);
  66316. __Pyx_GOTREF(__pyx_v_self->_fileobj);
  66317. __Pyx_DECREF(__pyx_v_self->_fileobj);
  66318. __pyx_v_self->_fileobj = __pyx_v_file;
  66319. /* "uvloop/handles/handle.pyx":255
  66320. * return self.__cached_socket
  66321. *
  66322. * cdef inline _attach_fileobj(self, object file): # <<<<<<<<<<<<<<
  66323. * # When we create a TCP/PIPE/etc connection/server based on
  66324. * # a Python file object, we need to close the file object when
  66325. */
  66326. /* function exit code */
  66327. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  66328. goto __pyx_L0;
  66329. __pyx_L1_error:;
  66330. __Pyx_XDECREF(__pyx_t_1);
  66331. __Pyx_AddTraceback("uvloop.loop.UVSocketHandle._attach_fileobj", __pyx_clineno, __pyx_lineno, __pyx_filename);
  66332. __pyx_r = 0;
  66333. __pyx_L0:;
  66334. __Pyx_XGIVEREF(__pyx_r);
  66335. __Pyx_RefNannyFinishContext();
  66336. return __pyx_r;
  66337. }
  66338. /* "uvloop/handles/handle.pyx":262
  66339. * self._fileobj = file
  66340. *
  66341. * cdef _close(self): # <<<<<<<<<<<<<<
  66342. * if self.__cached_socket is not None:
  66343. * (<PseudoSocket>self.__cached_socket)._fd = -1
  66344. */
  66345. static PyObject *__pyx_f_6uvloop_4loop_14UVSocketHandle__close(struct __pyx_obj_6uvloop_4loop_UVSocketHandle *__pyx_v_self) {
  66346. PyObject *__pyx_v_ex = NULL;
  66347. PyObject *__pyx_r = NULL;
  66348. __Pyx_RefNannyDeclarations
  66349. int __pyx_t_1;
  66350. int __pyx_t_2;
  66351. PyObject *__pyx_t_3 = NULL;
  66352. PyObject *__pyx_t_4 = NULL;
  66353. PyObject *__pyx_t_5 = NULL;
  66354. PyObject *__pyx_t_6 = NULL;
  66355. PyObject *__pyx_t_7 = NULL;
  66356. PyObject *__pyx_t_8 = NULL;
  66357. PyObject *__pyx_t_9 = NULL;
  66358. PyObject *__pyx_t_10 = NULL;
  66359. PyObject *__pyx_t_11 = NULL;
  66360. int __pyx_t_12;
  66361. PyObject *__pyx_t_13 = NULL;
  66362. PyObject *__pyx_t_14 = NULL;
  66363. int __pyx_t_15;
  66364. char const *__pyx_t_16;
  66365. PyObject *__pyx_t_17 = NULL;
  66366. PyObject *__pyx_t_18 = NULL;
  66367. PyObject *__pyx_t_19 = NULL;
  66368. PyObject *__pyx_t_20 = NULL;
  66369. PyObject *__pyx_t_21 = NULL;
  66370. PyObject *__pyx_t_22 = NULL;
  66371. PyObject *__pyx_t_23 = NULL;
  66372. PyObject *__pyx_t_24 = NULL;
  66373. PyObject *__pyx_t_25 = NULL;
  66374. char const *__pyx_t_26;
  66375. char const *__pyx_t_27;
  66376. __Pyx_RefNannySetupContext("_close", 0);
  66377. /* "uvloop/handles/handle.pyx":263
  66378. *
  66379. * cdef _close(self):
  66380. * if self.__cached_socket is not None: # <<<<<<<<<<<<<<
  66381. * (<PseudoSocket>self.__cached_socket)._fd = -1
  66382. *
  66383. */
  66384. __pyx_t_1 = (__pyx_v_self->__pyx___cached_socket != Py_None);
  66385. __pyx_t_2 = (__pyx_t_1 != 0);
  66386. if (__pyx_t_2) {
  66387. /* "uvloop/handles/handle.pyx":264
  66388. * cdef _close(self):
  66389. * if self.__cached_socket is not None:
  66390. * (<PseudoSocket>self.__cached_socket)._fd = -1 # <<<<<<<<<<<<<<
  66391. *
  66392. * UVHandle._close(self)
  66393. */
  66394. ((struct __pyx_obj_6uvloop_4loop_PseudoSocket *)__pyx_v_self->__pyx___cached_socket)->_fd = -1;
  66395. /* "uvloop/handles/handle.pyx":263
  66396. *
  66397. * cdef _close(self):
  66398. * if self.__cached_socket is not None: # <<<<<<<<<<<<<<
  66399. * (<PseudoSocket>self.__cached_socket)._fd = -1
  66400. *
  66401. */
  66402. }
  66403. /* "uvloop/handles/handle.pyx":266
  66404. * (<PseudoSocket>self.__cached_socket)._fd = -1
  66405. *
  66406. * UVHandle._close(self) # <<<<<<<<<<<<<<
  66407. *
  66408. * try:
  66409. */
  66410. __pyx_t_3 = __pyx_f_6uvloop_4loop_8UVHandle__close(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 266, __pyx_L1_error)
  66411. __Pyx_GOTREF(__pyx_t_3);
  66412. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  66413. /* "uvloop/handles/handle.pyx":268
  66414. * UVHandle._close(self)
  66415. *
  66416. * try: # <<<<<<<<<<<<<<
  66417. * # This code will only run for transports created from
  66418. * # Python sockets, i.e. with `loop.create_server(sock=sock)` etc.
  66419. */
  66420. /*try:*/ {
  66421. {
  66422. __Pyx_PyThreadState_declare
  66423. __Pyx_PyThreadState_assign
  66424. __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
  66425. __Pyx_XGOTREF(__pyx_t_4);
  66426. __Pyx_XGOTREF(__pyx_t_5);
  66427. __Pyx_XGOTREF(__pyx_t_6);
  66428. /*try:*/ {
  66429. /* "uvloop/handles/handle.pyx":271
  66430. * # This code will only run for transports created from
  66431. * # Python sockets, i.e. with `loop.create_server(sock=sock)` etc.
  66432. * if self._fileobj is not None: # <<<<<<<<<<<<<<
  66433. * if isinstance(self._fileobj, socket_socket):
  66434. * # Detaching the socket object is the ideal solution:
  66435. */
  66436. __pyx_t_2 = (__pyx_v_self->_fileobj != Py_None);
  66437. __pyx_t_1 = (__pyx_t_2 != 0);
  66438. if (__pyx_t_1) {
  66439. /* "uvloop/handles/handle.pyx":272
  66440. * # Python sockets, i.e. with `loop.create_server(sock=sock)` etc.
  66441. * if self._fileobj is not None:
  66442. * if isinstance(self._fileobj, socket_socket): # <<<<<<<<<<<<<<
  66443. * # Detaching the socket object is the ideal solution:
  66444. * # * libuv will actually close the FD;
  66445. */
  66446. __pyx_t_3 = __pyx_v_self->_fileobj;
  66447. __Pyx_INCREF(__pyx_t_3);
  66448. __pyx_t_7 = __pyx_v_6uvloop_4loop_socket_socket;
  66449. __Pyx_INCREF(__pyx_t_7);
  66450. __pyx_t_1 = PyObject_IsInstance(__pyx_t_3, __pyx_t_7); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(4, 272, __pyx_L7_error)
  66451. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  66452. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  66453. __pyx_t_2 = (__pyx_t_1 != 0);
  66454. if (__pyx_t_2) {
  66455. /* "uvloop/handles/handle.pyx":281
  66456. * # No need to call `socket_dec_io_ref()`, as
  66457. * # `socket.detach()` ignores `socket._io_refs`.
  66458. * self._fileobj.detach() # <<<<<<<<<<<<<<
  66459. * else:
  66460. * try:
  66461. */
  66462. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_fileobj, __pyx_n_s_detach); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 281, __pyx_L7_error)
  66463. __Pyx_GOTREF(__pyx_t_3);
  66464. __pyx_t_8 = NULL;
  66465. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
  66466. __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
  66467. if (likely(__pyx_t_8)) {
  66468. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  66469. __Pyx_INCREF(__pyx_t_8);
  66470. __Pyx_INCREF(function);
  66471. __Pyx_DECREF_SET(__pyx_t_3, function);
  66472. }
  66473. }
  66474. __pyx_t_7 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
  66475. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  66476. if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 281, __pyx_L7_error)
  66477. __Pyx_GOTREF(__pyx_t_7);
  66478. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  66479. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  66480. /* "uvloop/handles/handle.pyx":272
  66481. * # Python sockets, i.e. with `loop.create_server(sock=sock)` etc.
  66482. * if self._fileobj is not None:
  66483. * if isinstance(self._fileobj, socket_socket): # <<<<<<<<<<<<<<
  66484. * # Detaching the socket object is the ideal solution:
  66485. * # * libuv will actually close the FD;
  66486. */
  66487. goto __pyx_L14;
  66488. }
  66489. /* "uvloop/handles/handle.pyx":283
  66490. * self._fileobj.detach()
  66491. * else:
  66492. * try: # <<<<<<<<<<<<<<
  66493. * # `socket.close()` will raise an EBADF because libuv
  66494. * # has already closed the underlying FD.
  66495. */
  66496. /*else*/ {
  66497. {
  66498. __Pyx_PyThreadState_declare
  66499. __Pyx_PyThreadState_assign
  66500. __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
  66501. __Pyx_XGOTREF(__pyx_t_9);
  66502. __Pyx_XGOTREF(__pyx_t_10);
  66503. __Pyx_XGOTREF(__pyx_t_11);
  66504. /*try:*/ {
  66505. /* "uvloop/handles/handle.pyx":286
  66506. * # `socket.close()` will raise an EBADF because libuv
  66507. * # has already closed the underlying FD.
  66508. * self._fileobj.close() # <<<<<<<<<<<<<<
  66509. * except OSError as ex:
  66510. * if ex.errno != errno_EBADF:
  66511. */
  66512. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_fileobj, __pyx_n_s_close); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 286, __pyx_L15_error)
  66513. __Pyx_GOTREF(__pyx_t_3);
  66514. __pyx_t_8 = NULL;
  66515. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
  66516. __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
  66517. if (likely(__pyx_t_8)) {
  66518. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  66519. __Pyx_INCREF(__pyx_t_8);
  66520. __Pyx_INCREF(function);
  66521. __Pyx_DECREF_SET(__pyx_t_3, function);
  66522. }
  66523. }
  66524. __pyx_t_7 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
  66525. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  66526. if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 286, __pyx_L15_error)
  66527. __Pyx_GOTREF(__pyx_t_7);
  66528. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  66529. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  66530. /* "uvloop/handles/handle.pyx":283
  66531. * self._fileobj.detach()
  66532. * else:
  66533. * try: # <<<<<<<<<<<<<<
  66534. * # `socket.close()` will raise an EBADF because libuv
  66535. * # has already closed the underlying FD.
  66536. */
  66537. }
  66538. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  66539. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  66540. __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
  66541. goto __pyx_L20_try_end;
  66542. __pyx_L15_error:;
  66543. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  66544. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  66545. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  66546. /* "uvloop/handles/handle.pyx":287
  66547. * # has already closed the underlying FD.
  66548. * self._fileobj.close()
  66549. * except OSError as ex: # <<<<<<<<<<<<<<
  66550. * if ex.errno != errno_EBADF:
  66551. * raise
  66552. */
  66553. __pyx_t_12 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_OSError);
  66554. if (__pyx_t_12) {
  66555. __Pyx_AddTraceback("uvloop.loop.UVSocketHandle._close", __pyx_clineno, __pyx_lineno, __pyx_filename);
  66556. if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_3, &__pyx_t_8) < 0) __PYX_ERR(4, 287, __pyx_L17_except_error)
  66557. __Pyx_GOTREF(__pyx_t_7);
  66558. __Pyx_GOTREF(__pyx_t_3);
  66559. __Pyx_GOTREF(__pyx_t_8);
  66560. __Pyx_INCREF(__pyx_t_3);
  66561. __pyx_v_ex = __pyx_t_3;
  66562. /*try:*/ {
  66563. /* "uvloop/handles/handle.pyx":288
  66564. * self._fileobj.close()
  66565. * except OSError as ex:
  66566. * if ex.errno != errno_EBADF: # <<<<<<<<<<<<<<
  66567. * raise
  66568. * except Exception as ex:
  66569. */
  66570. __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_ex, __pyx_n_s_errno); if (unlikely(!__pyx_t_13)) __PYX_ERR(4, 288, __pyx_L26_error)
  66571. __Pyx_GOTREF(__pyx_t_13);
  66572. __pyx_t_14 = PyObject_RichCompare(__pyx_t_13, __pyx_v_6uvloop_4loop_errno_EBADF, Py_NE); __Pyx_XGOTREF(__pyx_t_14); if (unlikely(!__pyx_t_14)) __PYX_ERR(4, 288, __pyx_L26_error)
  66573. __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  66574. __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_14); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(4, 288, __pyx_L26_error)
  66575. __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  66576. if (unlikely(__pyx_t_2)) {
  66577. /* "uvloop/handles/handle.pyx":289
  66578. * except OSError as ex:
  66579. * if ex.errno != errno_EBADF:
  66580. * raise # <<<<<<<<<<<<<<
  66581. * except Exception as ex:
  66582. * self._loop.call_exception_handler({
  66583. */
  66584. __Pyx_GIVEREF(__pyx_t_7);
  66585. __Pyx_GIVEREF(__pyx_t_3);
  66586. __Pyx_XGIVEREF(__pyx_t_8);
  66587. __Pyx_ErrRestoreWithState(__pyx_t_7, __pyx_t_3, __pyx_t_8);
  66588. __pyx_t_7 = 0; __pyx_t_3 = 0; __pyx_t_8 = 0;
  66589. __PYX_ERR(4, 289, __pyx_L26_error)
  66590. /* "uvloop/handles/handle.pyx":288
  66591. * self._fileobj.close()
  66592. * except OSError as ex:
  66593. * if ex.errno != errno_EBADF: # <<<<<<<<<<<<<<
  66594. * raise
  66595. * except Exception as ex:
  66596. */
  66597. }
  66598. }
  66599. /* "uvloop/handles/handle.pyx":287
  66600. * # has already closed the underlying FD.
  66601. * self._fileobj.close()
  66602. * except OSError as ex: # <<<<<<<<<<<<<<
  66603. * if ex.errno != errno_EBADF:
  66604. * raise
  66605. */
  66606. /*finally:*/ {
  66607. /*normal exit:*/{
  66608. __Pyx_DECREF(__pyx_v_ex);
  66609. __pyx_v_ex = NULL;
  66610. goto __pyx_L27;
  66611. }
  66612. __pyx_L26_error:;
  66613. /*exception exit:*/{
  66614. __Pyx_PyThreadState_declare
  66615. __Pyx_PyThreadState_assign
  66616. __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
  66617. __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
  66618. __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
  66619. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22);
  66620. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19) < 0)) __Pyx_ErrFetch(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19);
  66621. __Pyx_XGOTREF(__pyx_t_17);
  66622. __Pyx_XGOTREF(__pyx_t_18);
  66623. __Pyx_XGOTREF(__pyx_t_19);
  66624. __Pyx_XGOTREF(__pyx_t_20);
  66625. __Pyx_XGOTREF(__pyx_t_21);
  66626. __Pyx_XGOTREF(__pyx_t_22);
  66627. __pyx_t_12 = __pyx_lineno; __pyx_t_15 = __pyx_clineno; __pyx_t_16 = __pyx_filename;
  66628. {
  66629. __Pyx_DECREF(__pyx_v_ex);
  66630. __pyx_v_ex = NULL;
  66631. }
  66632. if (PY_MAJOR_VERSION >= 3) {
  66633. __Pyx_XGIVEREF(__pyx_t_20);
  66634. __Pyx_XGIVEREF(__pyx_t_21);
  66635. __Pyx_XGIVEREF(__pyx_t_22);
  66636. __Pyx_ExceptionReset(__pyx_t_20, __pyx_t_21, __pyx_t_22);
  66637. }
  66638. __Pyx_XGIVEREF(__pyx_t_17);
  66639. __Pyx_XGIVEREF(__pyx_t_18);
  66640. __Pyx_XGIVEREF(__pyx_t_19);
  66641. __Pyx_ErrRestore(__pyx_t_17, __pyx_t_18, __pyx_t_19);
  66642. __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
  66643. __pyx_lineno = __pyx_t_12; __pyx_clineno = __pyx_t_15; __pyx_filename = __pyx_t_16;
  66644. goto __pyx_L17_except_error;
  66645. }
  66646. __pyx_L27:;
  66647. }
  66648. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  66649. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  66650. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  66651. goto __pyx_L16_exception_handled;
  66652. }
  66653. goto __pyx_L17_except_error;
  66654. __pyx_L17_except_error:;
  66655. /* "uvloop/handles/handle.pyx":283
  66656. * self._fileobj.detach()
  66657. * else:
  66658. * try: # <<<<<<<<<<<<<<
  66659. * # `socket.close()` will raise an EBADF because libuv
  66660. * # has already closed the underlying FD.
  66661. */
  66662. __Pyx_XGIVEREF(__pyx_t_9);
  66663. __Pyx_XGIVEREF(__pyx_t_10);
  66664. __Pyx_XGIVEREF(__pyx_t_11);
  66665. __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11);
  66666. goto __pyx_L7_error;
  66667. __pyx_L16_exception_handled:;
  66668. __Pyx_XGIVEREF(__pyx_t_9);
  66669. __Pyx_XGIVEREF(__pyx_t_10);
  66670. __Pyx_XGIVEREF(__pyx_t_11);
  66671. __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11);
  66672. __pyx_L20_try_end:;
  66673. }
  66674. }
  66675. __pyx_L14:;
  66676. /* "uvloop/handles/handle.pyx":271
  66677. * # This code will only run for transports created from
  66678. * # Python sockets, i.e. with `loop.create_server(sock=sock)` etc.
  66679. * if self._fileobj is not None: # <<<<<<<<<<<<<<
  66680. * if isinstance(self._fileobj, socket_socket):
  66681. * # Detaching the socket object is the ideal solution:
  66682. */
  66683. }
  66684. /* "uvloop/handles/handle.pyx":268
  66685. * UVHandle._close(self)
  66686. *
  66687. * try: # <<<<<<<<<<<<<<
  66688. * # This code will only run for transports created from
  66689. * # Python sockets, i.e. with `loop.create_server(sock=sock)` etc.
  66690. */
  66691. }
  66692. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  66693. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  66694. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  66695. goto __pyx_L12_try_end;
  66696. __pyx_L7_error:;
  66697. __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
  66698. __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
  66699. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  66700. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  66701. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  66702. /* "uvloop/handles/handle.pyx":290
  66703. * if ex.errno != errno_EBADF:
  66704. * raise
  66705. * except Exception as ex: # <<<<<<<<<<<<<<
  66706. * self._loop.call_exception_handler({
  66707. * 'exception': ex,
  66708. */
  66709. __pyx_t_15 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
  66710. if (__pyx_t_15) {
  66711. __Pyx_AddTraceback("uvloop.loop.UVSocketHandle._close", __pyx_clineno, __pyx_lineno, __pyx_filename);
  66712. if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_3, &__pyx_t_7) < 0) __PYX_ERR(4, 290, __pyx_L9_except_error)
  66713. __Pyx_GOTREF(__pyx_t_8);
  66714. __Pyx_GOTREF(__pyx_t_3);
  66715. __Pyx_GOTREF(__pyx_t_7);
  66716. __Pyx_INCREF(__pyx_t_3);
  66717. __Pyx_XDECREF_SET(__pyx_v_ex, __pyx_t_3);
  66718. /*try:*/ {
  66719. /* "uvloop/handles/handle.pyx":291
  66720. * raise
  66721. * except Exception as ex:
  66722. * self._loop.call_exception_handler({ # <<<<<<<<<<<<<<
  66723. * 'exception': ex,
  66724. * 'transport': self,
  66725. */
  66726. __pyx_t_13 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx_base._loop), __pyx_n_s_call_exception_handler); if (unlikely(!__pyx_t_13)) __PYX_ERR(4, 291, __pyx_L38_error)
  66727. __Pyx_GOTREF(__pyx_t_13);
  66728. /* "uvloop/handles/handle.pyx":292
  66729. * except Exception as ex:
  66730. * self._loop.call_exception_handler({
  66731. * 'exception': ex, # <<<<<<<<<<<<<<
  66732. * 'transport': self,
  66733. * 'message': f'could not close attached file object '
  66734. */
  66735. __pyx_t_23 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_23)) __PYX_ERR(4, 292, __pyx_L38_error)
  66736. __Pyx_GOTREF(__pyx_t_23);
  66737. if (PyDict_SetItem(__pyx_t_23, __pyx_n_u_exception, __pyx_v_ex) < 0) __PYX_ERR(4, 292, __pyx_L38_error)
  66738. /* "uvloop/handles/handle.pyx":293
  66739. * self._loop.call_exception_handler({
  66740. * 'exception': ex,
  66741. * 'transport': self, # <<<<<<<<<<<<<<
  66742. * 'message': f'could not close attached file object '
  66743. * f'{self._fileobj!r}',
  66744. */
  66745. if (PyDict_SetItem(__pyx_t_23, __pyx_n_u_transport, ((PyObject *)__pyx_v_self)) < 0) __PYX_ERR(4, 292, __pyx_L38_error)
  66746. /* "uvloop/handles/handle.pyx":295
  66747. * 'transport': self,
  66748. * 'message': f'could not close attached file object '
  66749. * f'{self._fileobj!r}', # <<<<<<<<<<<<<<
  66750. * })
  66751. * finally:
  66752. */
  66753. __pyx_t_24 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_self->_fileobj), __pyx_empty_unicode); if (unlikely(!__pyx_t_24)) __PYX_ERR(4, 295, __pyx_L38_error)
  66754. __Pyx_GOTREF(__pyx_t_24);
  66755. /* "uvloop/handles/handle.pyx":294
  66756. * 'exception': ex,
  66757. * 'transport': self,
  66758. * 'message': f'could not close attached file object ' # <<<<<<<<<<<<<<
  66759. * f'{self._fileobj!r}',
  66760. * })
  66761. */
  66762. __pyx_t_25 = __Pyx_PyUnicode_Concat(__pyx_kp_u_could_not_close_attached_file_ob, __pyx_t_24); if (unlikely(!__pyx_t_25)) __PYX_ERR(4, 294, __pyx_L38_error)
  66763. __Pyx_GOTREF(__pyx_t_25);
  66764. __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
  66765. if (PyDict_SetItem(__pyx_t_23, __pyx_n_u_message, __pyx_t_25) < 0) __PYX_ERR(4, 292, __pyx_L38_error)
  66766. __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
  66767. __pyx_t_25 = NULL;
  66768. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_13))) {
  66769. __pyx_t_25 = PyMethod_GET_SELF(__pyx_t_13);
  66770. if (likely(__pyx_t_25)) {
  66771. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
  66772. __Pyx_INCREF(__pyx_t_25);
  66773. __Pyx_INCREF(function);
  66774. __Pyx_DECREF_SET(__pyx_t_13, function);
  66775. }
  66776. }
  66777. __pyx_t_14 = (__pyx_t_25) ? __Pyx_PyObject_Call2Args(__pyx_t_13, __pyx_t_25, __pyx_t_23) : __Pyx_PyObject_CallOneArg(__pyx_t_13, __pyx_t_23);
  66778. __Pyx_XDECREF(__pyx_t_25); __pyx_t_25 = 0;
  66779. __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
  66780. if (unlikely(!__pyx_t_14)) __PYX_ERR(4, 291, __pyx_L38_error)
  66781. __Pyx_GOTREF(__pyx_t_14);
  66782. __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  66783. __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  66784. }
  66785. /* "uvloop/handles/handle.pyx":290
  66786. * if ex.errno != errno_EBADF:
  66787. * raise
  66788. * except Exception as ex: # <<<<<<<<<<<<<<
  66789. * self._loop.call_exception_handler({
  66790. * 'exception': ex,
  66791. */
  66792. /*finally:*/ {
  66793. /*normal exit:*/{
  66794. __Pyx_DECREF(__pyx_v_ex);
  66795. __pyx_v_ex = NULL;
  66796. goto __pyx_L39;
  66797. }
  66798. __pyx_L38_error:;
  66799. /*exception exit:*/{
  66800. __Pyx_PyThreadState_declare
  66801. __Pyx_PyThreadState_assign
  66802. __pyx_t_11 = 0; __pyx_t_10 = 0; __pyx_t_9 = 0; __pyx_t_22 = 0; __pyx_t_21 = 0; __pyx_t_20 = 0;
  66803. __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
  66804. __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
  66805. __Pyx_XDECREF(__pyx_t_23); __pyx_t_23 = 0;
  66806. __Pyx_XDECREF(__pyx_t_24); __pyx_t_24 = 0;
  66807. __Pyx_XDECREF(__pyx_t_25); __pyx_t_25 = 0;
  66808. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_22, &__pyx_t_21, &__pyx_t_20);
  66809. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9) < 0)) __Pyx_ErrFetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9);
  66810. __Pyx_XGOTREF(__pyx_t_11);
  66811. __Pyx_XGOTREF(__pyx_t_10);
  66812. __Pyx_XGOTREF(__pyx_t_9);
  66813. __Pyx_XGOTREF(__pyx_t_22);
  66814. __Pyx_XGOTREF(__pyx_t_21);
  66815. __Pyx_XGOTREF(__pyx_t_20);
  66816. __pyx_t_15 = __pyx_lineno; __pyx_t_12 = __pyx_clineno; __pyx_t_26 = __pyx_filename;
  66817. {
  66818. __Pyx_DECREF(__pyx_v_ex);
  66819. __pyx_v_ex = NULL;
  66820. }
  66821. if (PY_MAJOR_VERSION >= 3) {
  66822. __Pyx_XGIVEREF(__pyx_t_22);
  66823. __Pyx_XGIVEREF(__pyx_t_21);
  66824. __Pyx_XGIVEREF(__pyx_t_20);
  66825. __Pyx_ExceptionReset(__pyx_t_22, __pyx_t_21, __pyx_t_20);
  66826. }
  66827. __Pyx_XGIVEREF(__pyx_t_11);
  66828. __Pyx_XGIVEREF(__pyx_t_10);
  66829. __Pyx_XGIVEREF(__pyx_t_9);
  66830. __Pyx_ErrRestore(__pyx_t_11, __pyx_t_10, __pyx_t_9);
  66831. __pyx_t_11 = 0; __pyx_t_10 = 0; __pyx_t_9 = 0; __pyx_t_22 = 0; __pyx_t_21 = 0; __pyx_t_20 = 0;
  66832. __pyx_lineno = __pyx_t_15; __pyx_clineno = __pyx_t_12; __pyx_filename = __pyx_t_26;
  66833. goto __pyx_L9_except_error;
  66834. }
  66835. __pyx_L39:;
  66836. }
  66837. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  66838. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  66839. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  66840. goto __pyx_L8_exception_handled;
  66841. }
  66842. goto __pyx_L9_except_error;
  66843. __pyx_L9_except_error:;
  66844. /* "uvloop/handles/handle.pyx":268
  66845. * UVHandle._close(self)
  66846. *
  66847. * try: # <<<<<<<<<<<<<<
  66848. * # This code will only run for transports created from
  66849. * # Python sockets, i.e. with `loop.create_server(sock=sock)` etc.
  66850. */
  66851. __Pyx_XGIVEREF(__pyx_t_4);
  66852. __Pyx_XGIVEREF(__pyx_t_5);
  66853. __Pyx_XGIVEREF(__pyx_t_6);
  66854. __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
  66855. goto __pyx_L5_error;
  66856. __pyx_L8_exception_handled:;
  66857. __Pyx_XGIVEREF(__pyx_t_4);
  66858. __Pyx_XGIVEREF(__pyx_t_5);
  66859. __Pyx_XGIVEREF(__pyx_t_6);
  66860. __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
  66861. __pyx_L12_try_end:;
  66862. }
  66863. }
  66864. /* "uvloop/handles/handle.pyx":298
  66865. * })
  66866. * finally:
  66867. * self._fileobj = None # <<<<<<<<<<<<<<
  66868. *
  66869. * cdef _open(self, int sockfd):
  66870. */
  66871. /*finally:*/ {
  66872. /*normal exit:*/{
  66873. __Pyx_INCREF(Py_None);
  66874. __Pyx_GIVEREF(Py_None);
  66875. __Pyx_GOTREF(__pyx_v_self->_fileobj);
  66876. __Pyx_DECREF(__pyx_v_self->_fileobj);
  66877. __pyx_v_self->_fileobj = Py_None;
  66878. goto __pyx_L6;
  66879. }
  66880. __pyx_L5_error:;
  66881. /*exception exit:*/{
  66882. __Pyx_PyThreadState_declare
  66883. __Pyx_PyThreadState_assign
  66884. __pyx_t_6 = 0; __pyx_t_5 = 0; __pyx_t_4 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
  66885. __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
  66886. __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
  66887. __Pyx_XDECREF(__pyx_t_23); __pyx_t_23 = 0;
  66888. __Pyx_XDECREF(__pyx_t_24); __pyx_t_24 = 0;
  66889. __Pyx_XDECREF(__pyx_t_25); __pyx_t_25 = 0;
  66890. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  66891. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  66892. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  66893. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22);
  66894. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4) < 0)) __Pyx_ErrFetch(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4);
  66895. __Pyx_XGOTREF(__pyx_t_6);
  66896. __Pyx_XGOTREF(__pyx_t_5);
  66897. __Pyx_XGOTREF(__pyx_t_4);
  66898. __Pyx_XGOTREF(__pyx_t_20);
  66899. __Pyx_XGOTREF(__pyx_t_21);
  66900. __Pyx_XGOTREF(__pyx_t_22);
  66901. __pyx_t_12 = __pyx_lineno; __pyx_t_15 = __pyx_clineno; __pyx_t_27 = __pyx_filename;
  66902. {
  66903. __Pyx_INCREF(Py_None);
  66904. __Pyx_GIVEREF(Py_None);
  66905. __Pyx_GOTREF(__pyx_v_self->_fileobj);
  66906. __Pyx_DECREF(__pyx_v_self->_fileobj);
  66907. __pyx_v_self->_fileobj = Py_None;
  66908. }
  66909. if (PY_MAJOR_VERSION >= 3) {
  66910. __Pyx_XGIVEREF(__pyx_t_20);
  66911. __Pyx_XGIVEREF(__pyx_t_21);
  66912. __Pyx_XGIVEREF(__pyx_t_22);
  66913. __Pyx_ExceptionReset(__pyx_t_20, __pyx_t_21, __pyx_t_22);
  66914. }
  66915. __Pyx_XGIVEREF(__pyx_t_6);
  66916. __Pyx_XGIVEREF(__pyx_t_5);
  66917. __Pyx_XGIVEREF(__pyx_t_4);
  66918. __Pyx_ErrRestore(__pyx_t_6, __pyx_t_5, __pyx_t_4);
  66919. __pyx_t_6 = 0; __pyx_t_5 = 0; __pyx_t_4 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
  66920. __pyx_lineno = __pyx_t_12; __pyx_clineno = __pyx_t_15; __pyx_filename = __pyx_t_27;
  66921. goto __pyx_L1_error;
  66922. }
  66923. __pyx_L6:;
  66924. }
  66925. /* "uvloop/handles/handle.pyx":262
  66926. * self._fileobj = file
  66927. *
  66928. * cdef _close(self): # <<<<<<<<<<<<<<
  66929. * if self.__cached_socket is not None:
  66930. * (<PseudoSocket>self.__cached_socket)._fd = -1
  66931. */
  66932. /* function exit code */
  66933. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  66934. goto __pyx_L0;
  66935. __pyx_L1_error:;
  66936. __Pyx_XDECREF(__pyx_t_3);
  66937. __Pyx_XDECREF(__pyx_t_7);
  66938. __Pyx_XDECREF(__pyx_t_8);
  66939. __Pyx_XDECREF(__pyx_t_13);
  66940. __Pyx_XDECREF(__pyx_t_14);
  66941. __Pyx_XDECREF(__pyx_t_23);
  66942. __Pyx_XDECREF(__pyx_t_24);
  66943. __Pyx_XDECREF(__pyx_t_25);
  66944. __Pyx_AddTraceback("uvloop.loop.UVSocketHandle._close", __pyx_clineno, __pyx_lineno, __pyx_filename);
  66945. __pyx_r = 0;
  66946. __pyx_L0:;
  66947. __Pyx_XDECREF(__pyx_v_ex);
  66948. __Pyx_XGIVEREF(__pyx_r);
  66949. __Pyx_RefNannyFinishContext();
  66950. return __pyx_r;
  66951. }
  66952. /* "uvloop/handles/handle.pyx":300
  66953. * self._fileobj = None
  66954. *
  66955. * cdef _open(self, int sockfd): # <<<<<<<<<<<<<<
  66956. * raise NotImplementedError
  66957. *
  66958. */
  66959. static PyObject *__pyx_f_6uvloop_4loop_14UVSocketHandle__open(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVSocketHandle *__pyx_v_self, CYTHON_UNUSED int __pyx_v_sockfd) {
  66960. PyObject *__pyx_r = NULL;
  66961. __Pyx_RefNannyDeclarations
  66962. __Pyx_RefNannySetupContext("_open", 0);
  66963. /* "uvloop/handles/handle.pyx":301
  66964. *
  66965. * cdef _open(self, int sockfd):
  66966. * raise NotImplementedError # <<<<<<<<<<<<<<
  66967. *
  66968. *
  66969. */
  66970. __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0);
  66971. __PYX_ERR(4, 301, __pyx_L1_error)
  66972. /* "uvloop/handles/handle.pyx":300
  66973. * self._fileobj = None
  66974. *
  66975. * cdef _open(self, int sockfd): # <<<<<<<<<<<<<<
  66976. * raise NotImplementedError
  66977. *
  66978. */
  66979. /* function exit code */
  66980. __pyx_L1_error:;
  66981. __Pyx_AddTraceback("uvloop.loop.UVSocketHandle._open", __pyx_clineno, __pyx_lineno, __pyx_filename);
  66982. __pyx_r = 0;
  66983. __Pyx_XGIVEREF(__pyx_r);
  66984. __Pyx_RefNannyFinishContext();
  66985. return __pyx_r;
  66986. }
  66987. /* "(tree fragment)":1
  66988. * def __reduce_cython__(self): # <<<<<<<<<<<<<<
  66989. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  66990. * def __setstate_cython__(self, __pyx_state):
  66991. */
  66992. /* Python wrapper */
  66993. static PyObject *__pyx_pw_6uvloop_4loop_14UVSocketHandle_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  66994. static char __pyx_doc_6uvloop_4loop_14UVSocketHandle_2__reduce_cython__[] = "UVSocketHandle.__reduce_cython__(self)";
  66995. static PyObject *__pyx_pw_6uvloop_4loop_14UVSocketHandle_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  66996. PyObject *__pyx_r = 0;
  66997. __Pyx_RefNannyDeclarations
  66998. __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  66999. __pyx_r = __pyx_pf_6uvloop_4loop_14UVSocketHandle_2__reduce_cython__(((struct __pyx_obj_6uvloop_4loop_UVSocketHandle *)__pyx_v_self));
  67000. /* function exit code */
  67001. __Pyx_RefNannyFinishContext();
  67002. return __pyx_r;
  67003. }
  67004. static PyObject *__pyx_pf_6uvloop_4loop_14UVSocketHandle_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVSocketHandle *__pyx_v_self) {
  67005. PyObject *__pyx_r = NULL;
  67006. __Pyx_RefNannyDeclarations
  67007. PyObject *__pyx_t_1 = NULL;
  67008. __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  67009. /* "(tree fragment)":2
  67010. * def __reduce_cython__(self):
  67011. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  67012. * def __setstate_cython__(self, __pyx_state):
  67013. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  67014. */
  67015. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__102, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 2, __pyx_L1_error)
  67016. __Pyx_GOTREF(__pyx_t_1);
  67017. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  67018. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  67019. __PYX_ERR(9, 2, __pyx_L1_error)
  67020. /* "(tree fragment)":1
  67021. * def __reduce_cython__(self): # <<<<<<<<<<<<<<
  67022. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  67023. * def __setstate_cython__(self, __pyx_state):
  67024. */
  67025. /* function exit code */
  67026. __pyx_L1_error:;
  67027. __Pyx_XDECREF(__pyx_t_1);
  67028. __Pyx_AddTraceback("uvloop.loop.UVSocketHandle.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  67029. __pyx_r = NULL;
  67030. __Pyx_XGIVEREF(__pyx_r);
  67031. __Pyx_RefNannyFinishContext();
  67032. return __pyx_r;
  67033. }
  67034. /* "(tree fragment)":3
  67035. * def __reduce_cython__(self):
  67036. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  67037. * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
  67038. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  67039. */
  67040. /* Python wrapper */
  67041. static PyObject *__pyx_pw_6uvloop_4loop_14UVSocketHandle_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
  67042. static char __pyx_doc_6uvloop_4loop_14UVSocketHandle_4__setstate_cython__[] = "UVSocketHandle.__setstate_cython__(self, __pyx_state)";
  67043. static PyObject *__pyx_pw_6uvloop_4loop_14UVSocketHandle_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  67044. PyObject *__pyx_r = 0;
  67045. __Pyx_RefNannyDeclarations
  67046. __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  67047. __pyx_r = __pyx_pf_6uvloop_4loop_14UVSocketHandle_4__setstate_cython__(((struct __pyx_obj_6uvloop_4loop_UVSocketHandle *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
  67048. /* function exit code */
  67049. __Pyx_RefNannyFinishContext();
  67050. return __pyx_r;
  67051. }
  67052. static PyObject *__pyx_pf_6uvloop_4loop_14UVSocketHandle_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVSocketHandle *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  67053. PyObject *__pyx_r = NULL;
  67054. __Pyx_RefNannyDeclarations
  67055. PyObject *__pyx_t_1 = NULL;
  67056. __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  67057. /* "(tree fragment)":4
  67058. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  67059. * def __setstate_cython__(self, __pyx_state):
  67060. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  67061. */
  67062. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__103, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 4, __pyx_L1_error)
  67063. __Pyx_GOTREF(__pyx_t_1);
  67064. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  67065. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  67066. __PYX_ERR(9, 4, __pyx_L1_error)
  67067. /* "(tree fragment)":3
  67068. * def __reduce_cython__(self):
  67069. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  67070. * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
  67071. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  67072. */
  67073. /* function exit code */
  67074. __pyx_L1_error:;
  67075. __Pyx_XDECREF(__pyx_t_1);
  67076. __Pyx_AddTraceback("uvloop.loop.UVSocketHandle.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  67077. __pyx_r = NULL;
  67078. __Pyx_XGIVEREF(__pyx_r);
  67079. __Pyx_RefNannyFinishContext();
  67080. return __pyx_r;
  67081. }
  67082. /* "uvloop/handles/handle.pyx":304
  67083. *
  67084. *
  67085. * cdef inline bint __ensure_handle_data(uv.uv_handle_t* handle, # <<<<<<<<<<<<<<
  67086. * const char* handle_ctx):
  67087. *
  67088. */
  67089. static CYTHON_INLINE int __pyx_f_6uvloop_4loop___ensure_handle_data(uv_handle_t *__pyx_v_handle, char const *__pyx_v_handle_ctx) {
  67090. struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop = 0;
  67091. int __pyx_r;
  67092. __Pyx_RefNannyDeclarations
  67093. int __pyx_t_1;
  67094. PyObject *__pyx_t_2 = NULL;
  67095. PyObject *__pyx_t_3 = NULL;
  67096. PyObject *__pyx_t_4 = NULL;
  67097. PyObject *__pyx_t_5 = NULL;
  67098. PyObject *__pyx_t_6 = NULL;
  67099. PyObject *__pyx_t_7 = NULL;
  67100. PyObject *__pyx_t_8 = NULL;
  67101. __Pyx_RefNannySetupContext("__ensure_handle_data", 0);
  67102. /* "uvloop/handles/handle.pyx":309
  67103. * cdef Loop loop
  67104. *
  67105. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  67106. * if handle.loop is NULL:
  67107. * raise RuntimeError(
  67108. */
  67109. __pyx_t_1 = (UVLOOP_DEBUG != 0);
  67110. if (__pyx_t_1) {
  67111. /* "uvloop/handles/handle.pyx":310
  67112. *
  67113. * if UVLOOP_DEBUG:
  67114. * if handle.loop is NULL: # <<<<<<<<<<<<<<
  67115. * raise RuntimeError(
  67116. * 'handle.loop is NULL in __ensure_handle_data')
  67117. */
  67118. __pyx_t_1 = ((__pyx_v_handle->loop == NULL) != 0);
  67119. if (unlikely(__pyx_t_1)) {
  67120. /* "uvloop/handles/handle.pyx":311
  67121. * if UVLOOP_DEBUG:
  67122. * if handle.loop is NULL:
  67123. * raise RuntimeError( # <<<<<<<<<<<<<<
  67124. * 'handle.loop is NULL in __ensure_handle_data')
  67125. *
  67126. */
  67127. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__104, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 311, __pyx_L1_error)
  67128. __Pyx_GOTREF(__pyx_t_2);
  67129. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  67130. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  67131. __PYX_ERR(4, 311, __pyx_L1_error)
  67132. /* "uvloop/handles/handle.pyx":310
  67133. *
  67134. * if UVLOOP_DEBUG:
  67135. * if handle.loop is NULL: # <<<<<<<<<<<<<<
  67136. * raise RuntimeError(
  67137. * 'handle.loop is NULL in __ensure_handle_data')
  67138. */
  67139. }
  67140. /* "uvloop/handles/handle.pyx":314
  67141. * 'handle.loop is NULL in __ensure_handle_data')
  67142. *
  67143. * if handle.loop.data is NULL: # <<<<<<<<<<<<<<
  67144. * raise RuntimeError(
  67145. * 'handle.loop.data is NULL in __ensure_handle_data')
  67146. */
  67147. __pyx_t_1 = ((__pyx_v_handle->loop->data == NULL) != 0);
  67148. if (unlikely(__pyx_t_1)) {
  67149. /* "uvloop/handles/handle.pyx":315
  67150. *
  67151. * if handle.loop.data is NULL:
  67152. * raise RuntimeError( # <<<<<<<<<<<<<<
  67153. * 'handle.loop.data is NULL in __ensure_handle_data')
  67154. *
  67155. */
  67156. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__105, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 315, __pyx_L1_error)
  67157. __Pyx_GOTREF(__pyx_t_2);
  67158. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  67159. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  67160. __PYX_ERR(4, 315, __pyx_L1_error)
  67161. /* "uvloop/handles/handle.pyx":314
  67162. * 'handle.loop is NULL in __ensure_handle_data')
  67163. *
  67164. * if handle.loop.data is NULL: # <<<<<<<<<<<<<<
  67165. * raise RuntimeError(
  67166. * 'handle.loop.data is NULL in __ensure_handle_data')
  67167. */
  67168. }
  67169. /* "uvloop/handles/handle.pyx":309
  67170. * cdef Loop loop
  67171. *
  67172. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  67173. * if handle.loop is NULL:
  67174. * raise RuntimeError(
  67175. */
  67176. }
  67177. /* "uvloop/handles/handle.pyx":318
  67178. * 'handle.loop.data is NULL in __ensure_handle_data')
  67179. *
  67180. * if handle.data is NULL: # <<<<<<<<<<<<<<
  67181. * loop = <Loop>handle.loop.data
  67182. * loop.call_exception_handler({
  67183. */
  67184. __pyx_t_1 = ((__pyx_v_handle->data == NULL) != 0);
  67185. if (__pyx_t_1) {
  67186. /* "uvloop/handles/handle.pyx":319
  67187. *
  67188. * if handle.data is NULL:
  67189. * loop = <Loop>handle.loop.data # <<<<<<<<<<<<<<
  67190. * loop.call_exception_handler({
  67191. * 'message': '{} called with handle.data == NULL'.format(
  67192. */
  67193. __pyx_t_2 = ((PyObject *)__pyx_v_handle->loop->data);
  67194. __Pyx_INCREF(__pyx_t_2);
  67195. __pyx_v_loop = ((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_t_2);
  67196. __pyx_t_2 = 0;
  67197. /* "uvloop/handles/handle.pyx":320
  67198. * if handle.data is NULL:
  67199. * loop = <Loop>handle.loop.data
  67200. * loop.call_exception_handler({ # <<<<<<<<<<<<<<
  67201. * 'message': '{} called with handle.data == NULL'.format(
  67202. * handle_ctx.decode('latin-1'))
  67203. */
  67204. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_loop), __pyx_n_s_call_exception_handler); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 320, __pyx_L1_error)
  67205. __Pyx_GOTREF(__pyx_t_3);
  67206. /* "uvloop/handles/handle.pyx":321
  67207. * loop = <Loop>handle.loop.data
  67208. * loop.call_exception_handler({
  67209. * 'message': '{} called with handle.data == NULL'.format( # <<<<<<<<<<<<<<
  67210. * handle_ctx.decode('latin-1'))
  67211. * })
  67212. */
  67213. __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 321, __pyx_L1_error)
  67214. __Pyx_GOTREF(__pyx_t_4);
  67215. __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_called_with_handle_data_NULL, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 321, __pyx_L1_error)
  67216. __Pyx_GOTREF(__pyx_t_6);
  67217. /* "uvloop/handles/handle.pyx":322
  67218. * loop.call_exception_handler({
  67219. * 'message': '{} called with handle.data == NULL'.format(
  67220. * handle_ctx.decode('latin-1')) # <<<<<<<<<<<<<<
  67221. * })
  67222. * return 0
  67223. */
  67224. __pyx_t_7 = __Pyx_decode_c_string(__pyx_v_handle_ctx, 0, strlen(__pyx_v_handle_ctx), NULL, NULL, PyUnicode_DecodeLatin1); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 322, __pyx_L1_error)
  67225. __Pyx_GOTREF(__pyx_t_7);
  67226. __pyx_t_8 = NULL;
  67227. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
  67228. __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
  67229. if (likely(__pyx_t_8)) {
  67230. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
  67231. __Pyx_INCREF(__pyx_t_8);
  67232. __Pyx_INCREF(function);
  67233. __Pyx_DECREF_SET(__pyx_t_6, function);
  67234. }
  67235. }
  67236. __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7);
  67237. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  67238. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  67239. if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 321, __pyx_L1_error)
  67240. __Pyx_GOTREF(__pyx_t_5);
  67241. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  67242. if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_message, __pyx_t_5) < 0) __PYX_ERR(4, 321, __pyx_L1_error)
  67243. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  67244. __pyx_t_5 = NULL;
  67245. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
  67246. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
  67247. if (likely(__pyx_t_5)) {
  67248. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  67249. __Pyx_INCREF(__pyx_t_5);
  67250. __Pyx_INCREF(function);
  67251. __Pyx_DECREF_SET(__pyx_t_3, function);
  67252. }
  67253. }
  67254. __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
  67255. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  67256. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  67257. if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 320, __pyx_L1_error)
  67258. __Pyx_GOTREF(__pyx_t_2);
  67259. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  67260. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  67261. /* "uvloop/handles/handle.pyx":324
  67262. * handle_ctx.decode('latin-1'))
  67263. * })
  67264. * return 0 # <<<<<<<<<<<<<<
  67265. *
  67266. * if handle.data is NULL:
  67267. */
  67268. __pyx_r = 0;
  67269. goto __pyx_L0;
  67270. /* "uvloop/handles/handle.pyx":318
  67271. * 'handle.loop.data is NULL in __ensure_handle_data')
  67272. *
  67273. * if handle.data is NULL: # <<<<<<<<<<<<<<
  67274. * loop = <Loop>handle.loop.data
  67275. * loop.call_exception_handler({
  67276. */
  67277. }
  67278. /* "uvloop/handles/handle.pyx":326
  67279. * return 0
  67280. *
  67281. * if handle.data is NULL: # <<<<<<<<<<<<<<
  67282. * # The underlying UVHandle object was GCed with an open uv_handle_t.
  67283. * loop = <Loop>handle.loop.data
  67284. */
  67285. __pyx_t_1 = ((__pyx_v_handle->data == NULL) != 0);
  67286. if (__pyx_t_1) {
  67287. /* "uvloop/handles/handle.pyx":328
  67288. * if handle.data is NULL:
  67289. * # The underlying UVHandle object was GCed with an open uv_handle_t.
  67290. * loop = <Loop>handle.loop.data # <<<<<<<<<<<<<<
  67291. * loop.call_exception_handler({
  67292. * 'message': '{} called after destroying the UVHandle'.format(
  67293. */
  67294. __pyx_t_2 = ((PyObject *)__pyx_v_handle->loop->data);
  67295. __Pyx_INCREF(__pyx_t_2);
  67296. __pyx_v_loop = ((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_t_2);
  67297. __pyx_t_2 = 0;
  67298. /* "uvloop/handles/handle.pyx":329
  67299. * # The underlying UVHandle object was GCed with an open uv_handle_t.
  67300. * loop = <Loop>handle.loop.data
  67301. * loop.call_exception_handler({ # <<<<<<<<<<<<<<
  67302. * 'message': '{} called after destroying the UVHandle'.format(
  67303. * handle_ctx.decode('latin-1'))
  67304. */
  67305. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_loop), __pyx_n_s_call_exception_handler); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 329, __pyx_L1_error)
  67306. __Pyx_GOTREF(__pyx_t_3);
  67307. /* "uvloop/handles/handle.pyx":330
  67308. * loop = <Loop>handle.loop.data
  67309. * loop.call_exception_handler({
  67310. * 'message': '{} called after destroying the UVHandle'.format( # <<<<<<<<<<<<<<
  67311. * handle_ctx.decode('latin-1'))
  67312. * })
  67313. */
  67314. __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 330, __pyx_L1_error)
  67315. __Pyx_GOTREF(__pyx_t_4);
  67316. __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_called_after_destroying_the_UVH, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 330, __pyx_L1_error)
  67317. __Pyx_GOTREF(__pyx_t_6);
  67318. /* "uvloop/handles/handle.pyx":331
  67319. * loop.call_exception_handler({
  67320. * 'message': '{} called after destroying the UVHandle'.format(
  67321. * handle_ctx.decode('latin-1')) # <<<<<<<<<<<<<<
  67322. * })
  67323. * return 0
  67324. */
  67325. __pyx_t_7 = __Pyx_decode_c_string(__pyx_v_handle_ctx, 0, strlen(__pyx_v_handle_ctx), NULL, NULL, PyUnicode_DecodeLatin1); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 331, __pyx_L1_error)
  67326. __Pyx_GOTREF(__pyx_t_7);
  67327. __pyx_t_8 = NULL;
  67328. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
  67329. __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
  67330. if (likely(__pyx_t_8)) {
  67331. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
  67332. __Pyx_INCREF(__pyx_t_8);
  67333. __Pyx_INCREF(function);
  67334. __Pyx_DECREF_SET(__pyx_t_6, function);
  67335. }
  67336. }
  67337. __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7);
  67338. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  67339. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  67340. if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 330, __pyx_L1_error)
  67341. __Pyx_GOTREF(__pyx_t_5);
  67342. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  67343. if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_message, __pyx_t_5) < 0) __PYX_ERR(4, 330, __pyx_L1_error)
  67344. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  67345. __pyx_t_5 = NULL;
  67346. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
  67347. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
  67348. if (likely(__pyx_t_5)) {
  67349. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  67350. __Pyx_INCREF(__pyx_t_5);
  67351. __Pyx_INCREF(function);
  67352. __Pyx_DECREF_SET(__pyx_t_3, function);
  67353. }
  67354. }
  67355. __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
  67356. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  67357. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  67358. if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 329, __pyx_L1_error)
  67359. __Pyx_GOTREF(__pyx_t_2);
  67360. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  67361. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  67362. /* "uvloop/handles/handle.pyx":333
  67363. * handle_ctx.decode('latin-1'))
  67364. * })
  67365. * return 0 # <<<<<<<<<<<<<<
  67366. *
  67367. * return 1
  67368. */
  67369. __pyx_r = 0;
  67370. goto __pyx_L0;
  67371. /* "uvloop/handles/handle.pyx":326
  67372. * return 0
  67373. *
  67374. * if handle.data is NULL: # <<<<<<<<<<<<<<
  67375. * # The underlying UVHandle object was GCed with an open uv_handle_t.
  67376. * loop = <Loop>handle.loop.data
  67377. */
  67378. }
  67379. /* "uvloop/handles/handle.pyx":335
  67380. * return 0
  67381. *
  67382. * return 1 # <<<<<<<<<<<<<<
  67383. *
  67384. *
  67385. */
  67386. __pyx_r = 1;
  67387. goto __pyx_L0;
  67388. /* "uvloop/handles/handle.pyx":304
  67389. *
  67390. *
  67391. * cdef inline bint __ensure_handle_data(uv.uv_handle_t* handle, # <<<<<<<<<<<<<<
  67392. * const char* handle_ctx):
  67393. *
  67394. */
  67395. /* function exit code */
  67396. __pyx_L1_error:;
  67397. __Pyx_XDECREF(__pyx_t_2);
  67398. __Pyx_XDECREF(__pyx_t_3);
  67399. __Pyx_XDECREF(__pyx_t_4);
  67400. __Pyx_XDECREF(__pyx_t_5);
  67401. __Pyx_XDECREF(__pyx_t_6);
  67402. __Pyx_XDECREF(__pyx_t_7);
  67403. __Pyx_XDECREF(__pyx_t_8);
  67404. __Pyx_WriteUnraisable("uvloop.loop.__ensure_handle_data", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  67405. __pyx_r = 0;
  67406. __pyx_L0:;
  67407. __Pyx_XDECREF((PyObject *)__pyx_v_loop);
  67408. __Pyx_RefNannyFinishContext();
  67409. return __pyx_r;
  67410. }
  67411. /* "uvloop/handles/handle.pyx":338
  67412. *
  67413. *
  67414. * cdef void __uv_close_handle_cb(uv.uv_handle_t* handle) with gil: # <<<<<<<<<<<<<<
  67415. * cdef UVHandle h
  67416. *
  67417. */
  67418. static void __pyx_f_6uvloop_4loop___uv_close_handle_cb(uv_handle_t *__pyx_v_handle) {
  67419. struct __pyx_obj_6uvloop_4loop_UVHandle *__pyx_v_h = 0;
  67420. __Pyx_RefNannyDeclarations
  67421. int __pyx_t_1;
  67422. int __pyx_t_2;
  67423. PyObject *__pyx_t_3 = NULL;
  67424. struct __pyx_obj_6uvloop_4loop_Loop *__pyx_t_4 = NULL;
  67425. PyObject *__pyx_t_5 = NULL;
  67426. PyObject *__pyx_t_6 = NULL;
  67427. PyObject *__pyx_t_7 = NULL;
  67428. int __pyx_t_8;
  67429. int __pyx_t_9;
  67430. char const *__pyx_t_10;
  67431. PyObject *__pyx_t_11 = NULL;
  67432. PyObject *__pyx_t_12 = NULL;
  67433. PyObject *__pyx_t_13 = NULL;
  67434. PyObject *__pyx_t_14 = NULL;
  67435. PyObject *__pyx_t_15 = NULL;
  67436. PyObject *__pyx_t_16 = NULL;
  67437. #ifdef WITH_THREAD
  67438. PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  67439. #endif
  67440. __Pyx_RefNannySetupContext("__uv_close_handle_cb", 0);
  67441. /* "uvloop/handles/handle.pyx":341
  67442. * cdef UVHandle h
  67443. *
  67444. * if handle.data is NULL: # <<<<<<<<<<<<<<
  67445. * # The original UVHandle is long dead. Just free the mem of
  67446. * # the uv_handle_t* handler.
  67447. */
  67448. __pyx_t_1 = ((__pyx_v_handle->data == NULL) != 0);
  67449. if (__pyx_t_1) {
  67450. /* "uvloop/handles/handle.pyx":345
  67451. * # the uv_handle_t* handler.
  67452. *
  67453. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  67454. * if handle.loop == NULL or handle.loop.data == NULL:
  67455. * raise RuntimeError(
  67456. */
  67457. __pyx_t_1 = (UVLOOP_DEBUG != 0);
  67458. if (__pyx_t_1) {
  67459. /* "uvloop/handles/handle.pyx":346
  67460. *
  67461. * if UVLOOP_DEBUG:
  67462. * if handle.loop == NULL or handle.loop.data == NULL: # <<<<<<<<<<<<<<
  67463. * raise RuntimeError(
  67464. * '__uv_close_handle_cb: handle.loop is invalid')
  67465. */
  67466. __pyx_t_2 = ((__pyx_v_handle->loop == NULL) != 0);
  67467. if (!__pyx_t_2) {
  67468. } else {
  67469. __pyx_t_1 = __pyx_t_2;
  67470. goto __pyx_L6_bool_binop_done;
  67471. }
  67472. __pyx_t_2 = ((__pyx_v_handle->loop->data == NULL) != 0);
  67473. __pyx_t_1 = __pyx_t_2;
  67474. __pyx_L6_bool_binop_done:;
  67475. if (unlikely(__pyx_t_1)) {
  67476. /* "uvloop/handles/handle.pyx":347
  67477. * if UVLOOP_DEBUG:
  67478. * if handle.loop == NULL or handle.loop.data == NULL:
  67479. * raise RuntimeError( # <<<<<<<<<<<<<<
  67480. * '__uv_close_handle_cb: handle.loop is invalid')
  67481. * (<Loop>handle.loop.data)._debug_uv_handles_freed += 1
  67482. */
  67483. __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__106, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 347, __pyx_L1_error)
  67484. __Pyx_GOTREF(__pyx_t_3);
  67485. __Pyx_Raise(__pyx_t_3, 0, 0, 0);
  67486. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  67487. __PYX_ERR(4, 347, __pyx_L1_error)
  67488. /* "uvloop/handles/handle.pyx":346
  67489. *
  67490. * if UVLOOP_DEBUG:
  67491. * if handle.loop == NULL or handle.loop.data == NULL: # <<<<<<<<<<<<<<
  67492. * raise RuntimeError(
  67493. * '__uv_close_handle_cb: handle.loop is invalid')
  67494. */
  67495. }
  67496. /* "uvloop/handles/handle.pyx":349
  67497. * raise RuntimeError(
  67498. * '__uv_close_handle_cb: handle.loop is invalid')
  67499. * (<Loop>handle.loop.data)._debug_uv_handles_freed += 1 # <<<<<<<<<<<<<<
  67500. *
  67501. * PyMem_RawFree(handle)
  67502. */
  67503. __Pyx_INCREF(((PyObject *)((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_handle->loop->data)));
  67504. __pyx_t_4 = ((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_handle->loop->data);
  67505. __pyx_t_4->_debug_uv_handles_freed = (__pyx_t_4->_debug_uv_handles_freed + 1);
  67506. __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  67507. /* "uvloop/handles/handle.pyx":345
  67508. * # the uv_handle_t* handler.
  67509. *
  67510. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  67511. * if handle.loop == NULL or handle.loop.data == NULL:
  67512. * raise RuntimeError(
  67513. */
  67514. }
  67515. /* "uvloop/handles/handle.pyx":351
  67516. * (<Loop>handle.loop.data)._debug_uv_handles_freed += 1
  67517. *
  67518. * PyMem_RawFree(handle) # <<<<<<<<<<<<<<
  67519. * else:
  67520. * h = <UVHandle>handle.data
  67521. */
  67522. PyMem_RawFree(__pyx_v_handle);
  67523. /* "uvloop/handles/handle.pyx":341
  67524. * cdef UVHandle h
  67525. *
  67526. * if handle.data is NULL: # <<<<<<<<<<<<<<
  67527. * # The original UVHandle is long dead. Just free the mem of
  67528. * # the uv_handle_t* handler.
  67529. */
  67530. goto __pyx_L3;
  67531. }
  67532. /* "uvloop/handles/handle.pyx":353
  67533. * PyMem_RawFree(handle)
  67534. * else:
  67535. * h = <UVHandle>handle.data # <<<<<<<<<<<<<<
  67536. * try:
  67537. * if UVLOOP_DEBUG:
  67538. */
  67539. /*else*/ {
  67540. __pyx_t_3 = ((PyObject *)__pyx_v_handle->data);
  67541. __Pyx_INCREF(__pyx_t_3);
  67542. __pyx_v_h = ((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_t_3);
  67543. __pyx_t_3 = 0;
  67544. /* "uvloop/handles/handle.pyx":354
  67545. * else:
  67546. * h = <UVHandle>handle.data
  67547. * try: # <<<<<<<<<<<<<<
  67548. * if UVLOOP_DEBUG:
  67549. * if not h._has_handle:
  67550. */
  67551. /*try:*/ {
  67552. /* "uvloop/handles/handle.pyx":355
  67553. * h = <UVHandle>handle.data
  67554. * try:
  67555. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  67556. * if not h._has_handle:
  67557. * raise RuntimeError(
  67558. */
  67559. __pyx_t_1 = (UVLOOP_DEBUG != 0);
  67560. if (__pyx_t_1) {
  67561. /* "uvloop/handles/handle.pyx":356
  67562. * try:
  67563. * if UVLOOP_DEBUG:
  67564. * if not h._has_handle: # <<<<<<<<<<<<<<
  67565. * raise RuntimeError(
  67566. * 'has_handle=0 in __uv_close_handle_cb')
  67567. */
  67568. __pyx_t_1 = ((!(__pyx_v_h->_has_handle != 0)) != 0);
  67569. if (unlikely(__pyx_t_1)) {
  67570. /* "uvloop/handles/handle.pyx":357
  67571. * if UVLOOP_DEBUG:
  67572. * if not h._has_handle:
  67573. * raise RuntimeError( # <<<<<<<<<<<<<<
  67574. * 'has_handle=0 in __uv_close_handle_cb')
  67575. * h._loop._debug_handles_closed.update([
  67576. */
  67577. __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__107, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 357, __pyx_L9_error)
  67578. __Pyx_GOTREF(__pyx_t_3);
  67579. __Pyx_Raise(__pyx_t_3, 0, 0, 0);
  67580. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  67581. __PYX_ERR(4, 357, __pyx_L9_error)
  67582. /* "uvloop/handles/handle.pyx":356
  67583. * try:
  67584. * if UVLOOP_DEBUG:
  67585. * if not h._has_handle: # <<<<<<<<<<<<<<
  67586. * raise RuntimeError(
  67587. * 'has_handle=0 in __uv_close_handle_cb')
  67588. */
  67589. }
  67590. /* "uvloop/handles/handle.pyx":359
  67591. * raise RuntimeError(
  67592. * 'has_handle=0 in __uv_close_handle_cb')
  67593. * h._loop._debug_handles_closed.update([ # <<<<<<<<<<<<<<
  67594. * h.__class__.__name__])
  67595. * h._free()
  67596. */
  67597. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_h->_loop->_debug_handles_closed, __pyx_n_s_update); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 359, __pyx_L9_error)
  67598. __Pyx_GOTREF(__pyx_t_5);
  67599. /* "uvloop/handles/handle.pyx":360
  67600. * 'has_handle=0 in __uv_close_handle_cb')
  67601. * h._loop._debug_handles_closed.update([
  67602. * h.__class__.__name__]) # <<<<<<<<<<<<<<
  67603. * h._free()
  67604. * finally:
  67605. */
  67606. __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_h), __pyx_n_s_class); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 360, __pyx_L9_error)
  67607. __Pyx_GOTREF(__pyx_t_6);
  67608. __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_name); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 360, __pyx_L9_error)
  67609. __Pyx_GOTREF(__pyx_t_7);
  67610. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  67611. /* "uvloop/handles/handle.pyx":359
  67612. * raise RuntimeError(
  67613. * 'has_handle=0 in __uv_close_handle_cb')
  67614. * h._loop._debug_handles_closed.update([ # <<<<<<<<<<<<<<
  67615. * h.__class__.__name__])
  67616. * h._free()
  67617. */
  67618. __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 359, __pyx_L9_error)
  67619. __Pyx_GOTREF(__pyx_t_6);
  67620. __Pyx_GIVEREF(__pyx_t_7);
  67621. PyList_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
  67622. __pyx_t_7 = 0;
  67623. __pyx_t_7 = NULL;
  67624. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
  67625. __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
  67626. if (likely(__pyx_t_7)) {
  67627. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
  67628. __Pyx_INCREF(__pyx_t_7);
  67629. __Pyx_INCREF(function);
  67630. __Pyx_DECREF_SET(__pyx_t_5, function);
  67631. }
  67632. }
  67633. __pyx_t_3 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6);
  67634. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  67635. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  67636. if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 359, __pyx_L9_error)
  67637. __Pyx_GOTREF(__pyx_t_3);
  67638. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  67639. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  67640. /* "uvloop/handles/handle.pyx":355
  67641. * h = <UVHandle>handle.data
  67642. * try:
  67643. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  67644. * if not h._has_handle:
  67645. * raise RuntimeError(
  67646. */
  67647. }
  67648. /* "uvloop/handles/handle.pyx":361
  67649. * h._loop._debug_handles_closed.update([
  67650. * h.__class__.__name__])
  67651. * h._free() # <<<<<<<<<<<<<<
  67652. * finally:
  67653. * Py_DECREF(h) # Was INCREFed in UVHandle._close
  67654. */
  67655. __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVHandle *)__pyx_v_h->__pyx_vtab)->_free(__pyx_v_h); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 361, __pyx_L9_error)
  67656. __Pyx_GOTREF(__pyx_t_3);
  67657. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  67658. }
  67659. /* "uvloop/handles/handle.pyx":363
  67660. * h._free()
  67661. * finally:
  67662. * Py_DECREF(h) # Was INCREFed in UVHandle._close # <<<<<<<<<<<<<<
  67663. *
  67664. *
  67665. */
  67666. /*finally:*/ {
  67667. /*normal exit:*/{
  67668. Py_DECREF(((PyObject *)__pyx_v_h));
  67669. goto __pyx_L10;
  67670. }
  67671. __pyx_L9_error:;
  67672. /*exception exit:*/{
  67673. __Pyx_PyThreadState_declare
  67674. __Pyx_PyThreadState_assign
  67675. __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0;
  67676. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  67677. __Pyx_XDECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  67678. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  67679. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  67680. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  67681. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16);
  67682. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13) < 0)) __Pyx_ErrFetch(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
  67683. __Pyx_XGOTREF(__pyx_t_11);
  67684. __Pyx_XGOTREF(__pyx_t_12);
  67685. __Pyx_XGOTREF(__pyx_t_13);
  67686. __Pyx_XGOTREF(__pyx_t_14);
  67687. __Pyx_XGOTREF(__pyx_t_15);
  67688. __Pyx_XGOTREF(__pyx_t_16);
  67689. __pyx_t_8 = __pyx_lineno; __pyx_t_9 = __pyx_clineno; __pyx_t_10 = __pyx_filename;
  67690. {
  67691. Py_DECREF(((PyObject *)__pyx_v_h));
  67692. }
  67693. if (PY_MAJOR_VERSION >= 3) {
  67694. __Pyx_XGIVEREF(__pyx_t_14);
  67695. __Pyx_XGIVEREF(__pyx_t_15);
  67696. __Pyx_XGIVEREF(__pyx_t_16);
  67697. __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_15, __pyx_t_16);
  67698. }
  67699. __Pyx_XGIVEREF(__pyx_t_11);
  67700. __Pyx_XGIVEREF(__pyx_t_12);
  67701. __Pyx_XGIVEREF(__pyx_t_13);
  67702. __Pyx_ErrRestore(__pyx_t_11, __pyx_t_12, __pyx_t_13);
  67703. __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0;
  67704. __pyx_lineno = __pyx_t_8; __pyx_clineno = __pyx_t_9; __pyx_filename = __pyx_t_10;
  67705. goto __pyx_L1_error;
  67706. }
  67707. __pyx_L10:;
  67708. }
  67709. }
  67710. __pyx_L3:;
  67711. /* "uvloop/handles/handle.pyx":338
  67712. *
  67713. *
  67714. * cdef void __uv_close_handle_cb(uv.uv_handle_t* handle) with gil: # <<<<<<<<<<<<<<
  67715. * cdef UVHandle h
  67716. *
  67717. */
  67718. /* function exit code */
  67719. goto __pyx_L0;
  67720. __pyx_L1_error:;
  67721. __Pyx_XDECREF(__pyx_t_3);
  67722. __Pyx_XDECREF(((PyObject *)__pyx_t_4));
  67723. __Pyx_XDECREF(__pyx_t_5);
  67724. __Pyx_XDECREF(__pyx_t_6);
  67725. __Pyx_XDECREF(__pyx_t_7);
  67726. __Pyx_WriteUnraisable("uvloop.loop.__uv_close_handle_cb", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  67727. __pyx_L0:;
  67728. __Pyx_XDECREF((PyObject *)__pyx_v_h);
  67729. __Pyx_RefNannyFinishContext();
  67730. #ifdef WITH_THREAD
  67731. __Pyx_PyGILState_Release(__pyx_gilstate_save);
  67732. #endif
  67733. }
  67734. /* "uvloop/handles/handle.pyx":366
  67735. *
  67736. *
  67737. * cdef void __close_all_handles(Loop loop): # <<<<<<<<<<<<<<
  67738. * uv.uv_walk(loop.uvloop,
  67739. * __uv_walk_close_all_handles_cb,
  67740. */
  67741. static void __pyx_f_6uvloop_4loop___close_all_handles(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop) {
  67742. __Pyx_RefNannyDeclarations
  67743. __Pyx_RefNannySetupContext("__close_all_handles", 0);
  67744. /* "uvloop/handles/handle.pyx":367
  67745. *
  67746. * cdef void __close_all_handles(Loop loop):
  67747. * uv.uv_walk(loop.uvloop, # <<<<<<<<<<<<<<
  67748. * __uv_walk_close_all_handles_cb,
  67749. * <void*>loop) # void
  67750. */
  67751. uv_walk(__pyx_v_loop->uvloop, __pyx_f_6uvloop_4loop___uv_walk_close_all_handles_cb, ((void *)__pyx_v_loop));
  67752. /* "uvloop/handles/handle.pyx":366
  67753. *
  67754. *
  67755. * cdef void __close_all_handles(Loop loop): # <<<<<<<<<<<<<<
  67756. * uv.uv_walk(loop.uvloop,
  67757. * __uv_walk_close_all_handles_cb,
  67758. */
  67759. /* function exit code */
  67760. __Pyx_RefNannyFinishContext();
  67761. }
  67762. /* "uvloop/handles/handle.pyx":372
  67763. *
  67764. *
  67765. * cdef void __uv_walk_close_all_handles_cb( # <<<<<<<<<<<<<<
  67766. * uv.uv_handle_t* handle, void* arg) with gil:
  67767. *
  67768. */
  67769. static void __pyx_f_6uvloop_4loop___uv_walk_close_all_handles_cb(uv_handle_t *__pyx_v_handle, void *__pyx_v_arg) {
  67770. struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop = 0;
  67771. struct __pyx_obj_6uvloop_4loop_UVHandle *__pyx_v_h = 0;
  67772. __Pyx_RefNannyDeclarations
  67773. PyObject *__pyx_t_1 = NULL;
  67774. int __pyx_t_2;
  67775. PyObject *__pyx_t_3 = NULL;
  67776. PyObject *__pyx_t_4 = NULL;
  67777. PyObject *__pyx_t_5 = NULL;
  67778. #ifdef WITH_THREAD
  67779. PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  67780. #endif
  67781. __Pyx_RefNannySetupContext("__uv_walk_close_all_handles_cb", 0);
  67782. /* "uvloop/handles/handle.pyx":376
  67783. *
  67784. * cdef:
  67785. * Loop loop = <Loop>arg # <<<<<<<<<<<<<<
  67786. * UVHandle h
  67787. *
  67788. */
  67789. __pyx_t_1 = ((PyObject *)__pyx_v_arg);
  67790. __Pyx_INCREF(__pyx_t_1);
  67791. __pyx_v_loop = ((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_t_1);
  67792. __pyx_t_1 = 0;
  67793. /* "uvloop/handles/handle.pyx":379
  67794. * UVHandle h
  67795. *
  67796. * if uv.uv_is_closing(handle): # <<<<<<<<<<<<<<
  67797. * # The handle is closed or is closing.
  67798. * return
  67799. */
  67800. __pyx_t_2 = (uv_is_closing(__pyx_v_handle) != 0);
  67801. if (__pyx_t_2) {
  67802. /* "uvloop/handles/handle.pyx":381
  67803. * if uv.uv_is_closing(handle):
  67804. * # The handle is closed or is closing.
  67805. * return # <<<<<<<<<<<<<<
  67806. *
  67807. * if handle.data is NULL:
  67808. */
  67809. goto __pyx_L0;
  67810. /* "uvloop/handles/handle.pyx":379
  67811. * UVHandle h
  67812. *
  67813. * if uv.uv_is_closing(handle): # <<<<<<<<<<<<<<
  67814. * # The handle is closed or is closing.
  67815. * return
  67816. */
  67817. }
  67818. /* "uvloop/handles/handle.pyx":383
  67819. * return
  67820. *
  67821. * if handle.data is NULL: # <<<<<<<<<<<<<<
  67822. * # This shouldn't happen. Ever.
  67823. * loop.call_exception_handler({
  67824. */
  67825. __pyx_t_2 = ((__pyx_v_handle->data == NULL) != 0);
  67826. if (__pyx_t_2) {
  67827. /* "uvloop/handles/handle.pyx":385
  67828. * if handle.data is NULL:
  67829. * # This shouldn't happen. Ever.
  67830. * loop.call_exception_handler({ # <<<<<<<<<<<<<<
  67831. * 'message': 'handle.data is NULL in __close_all_handles_cb'
  67832. * })
  67833. */
  67834. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_loop), __pyx_n_s_call_exception_handler); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 385, __pyx_L1_error)
  67835. __Pyx_GOTREF(__pyx_t_3);
  67836. /* "uvloop/handles/handle.pyx":386
  67837. * # This shouldn't happen. Ever.
  67838. * loop.call_exception_handler({
  67839. * 'message': 'handle.data is NULL in __close_all_handles_cb' # <<<<<<<<<<<<<<
  67840. * })
  67841. * return
  67842. */
  67843. __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 386, __pyx_L1_error)
  67844. __Pyx_GOTREF(__pyx_t_4);
  67845. if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_message, __pyx_kp_u_handle_data_is_NULL_in___close_a) < 0) __PYX_ERR(4, 386, __pyx_L1_error)
  67846. __pyx_t_5 = NULL;
  67847. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
  67848. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
  67849. if (likely(__pyx_t_5)) {
  67850. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  67851. __Pyx_INCREF(__pyx_t_5);
  67852. __Pyx_INCREF(function);
  67853. __Pyx_DECREF_SET(__pyx_t_3, function);
  67854. }
  67855. }
  67856. __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
  67857. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  67858. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  67859. if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 385, __pyx_L1_error)
  67860. __Pyx_GOTREF(__pyx_t_1);
  67861. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  67862. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  67863. /* "uvloop/handles/handle.pyx":388
  67864. * 'message': 'handle.data is NULL in __close_all_handles_cb'
  67865. * })
  67866. * return # <<<<<<<<<<<<<<
  67867. *
  67868. * h = <UVHandle>handle.data
  67869. */
  67870. goto __pyx_L0;
  67871. /* "uvloop/handles/handle.pyx":383
  67872. * return
  67873. *
  67874. * if handle.data is NULL: # <<<<<<<<<<<<<<
  67875. * # This shouldn't happen. Ever.
  67876. * loop.call_exception_handler({
  67877. */
  67878. }
  67879. /* "uvloop/handles/handle.pyx":390
  67880. * return
  67881. *
  67882. * h = <UVHandle>handle.data # <<<<<<<<<<<<<<
  67883. * if not h._closed:
  67884. * h._warn_unclosed()
  67885. */
  67886. __pyx_t_1 = ((PyObject *)__pyx_v_handle->data);
  67887. __Pyx_INCREF(__pyx_t_1);
  67888. __pyx_v_h = ((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_t_1);
  67889. __pyx_t_1 = 0;
  67890. /* "uvloop/handles/handle.pyx":391
  67891. *
  67892. * h = <UVHandle>handle.data
  67893. * if not h._closed: # <<<<<<<<<<<<<<
  67894. * h._warn_unclosed()
  67895. * h._close()
  67896. */
  67897. __pyx_t_2 = ((!(__pyx_v_h->_closed != 0)) != 0);
  67898. if (__pyx_t_2) {
  67899. /* "uvloop/handles/handle.pyx":392
  67900. * h = <UVHandle>handle.data
  67901. * if not h._closed:
  67902. * h._warn_unclosed() # <<<<<<<<<<<<<<
  67903. * h._close()
  67904. */
  67905. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVHandle *)__pyx_v_h->__pyx_vtab)->_warn_unclosed(__pyx_v_h); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 392, __pyx_L1_error)
  67906. __Pyx_GOTREF(__pyx_t_1);
  67907. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  67908. /* "uvloop/handles/handle.pyx":393
  67909. * if not h._closed:
  67910. * h._warn_unclosed()
  67911. * h._close() # <<<<<<<<<<<<<<
  67912. */
  67913. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVHandle *)__pyx_v_h->__pyx_vtab)->_close(__pyx_v_h); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 393, __pyx_L1_error)
  67914. __Pyx_GOTREF(__pyx_t_1);
  67915. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  67916. /* "uvloop/handles/handle.pyx":391
  67917. *
  67918. * h = <UVHandle>handle.data
  67919. * if not h._closed: # <<<<<<<<<<<<<<
  67920. * h._warn_unclosed()
  67921. * h._close()
  67922. */
  67923. }
  67924. /* "uvloop/handles/handle.pyx":372
  67925. *
  67926. *
  67927. * cdef void __uv_walk_close_all_handles_cb( # <<<<<<<<<<<<<<
  67928. * uv.uv_handle_t* handle, void* arg) with gil:
  67929. *
  67930. */
  67931. /* function exit code */
  67932. goto __pyx_L0;
  67933. __pyx_L1_error:;
  67934. __Pyx_XDECREF(__pyx_t_1);
  67935. __Pyx_XDECREF(__pyx_t_3);
  67936. __Pyx_XDECREF(__pyx_t_4);
  67937. __Pyx_XDECREF(__pyx_t_5);
  67938. __Pyx_WriteUnraisable("uvloop.loop.__uv_walk_close_all_handles_cb", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  67939. __pyx_L0:;
  67940. __Pyx_XDECREF((PyObject *)__pyx_v_loop);
  67941. __Pyx_XDECREF((PyObject *)__pyx_v_h);
  67942. __Pyx_RefNannyFinishContext();
  67943. #ifdef WITH_THREAD
  67944. __Pyx_PyGILState_Release(__pyx_gilstate_save);
  67945. #endif
  67946. }
  67947. /* "uvloop/handles/async_.pyx":3
  67948. * @cython.no_gc_clear
  67949. * cdef class UVAsync(UVHandle):
  67950. * cdef _init(self, Loop loop, method_t callback, object ctx): # <<<<<<<<<<<<<<
  67951. * cdef int err
  67952. *
  67953. */
  67954. static PyObject *__pyx_f_6uvloop_4loop_7UVAsync__init(struct __pyx_obj_6uvloop_4loop_UVAsync *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, __pyx_t_6uvloop_4loop_method_t __pyx_v_callback, PyObject *__pyx_v_ctx) {
  67955. int __pyx_v_err;
  67956. PyObject *__pyx_r = NULL;
  67957. __Pyx_RefNannyDeclarations
  67958. PyObject *__pyx_t_1 = NULL;
  67959. int __pyx_t_2;
  67960. __Pyx_RefNannySetupContext("_init", 0);
  67961. /* "uvloop/handles/async_.pyx":6
  67962. * cdef int err
  67963. *
  67964. * self._start_init(loop) # <<<<<<<<<<<<<<
  67965. *
  67966. * self._handle = <uv.uv_handle_t*>PyMem_RawMalloc(sizeof(uv.uv_async_t))
  67967. */
  67968. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVAsync *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._start_init(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self), __pyx_v_loop); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 6, __pyx_L1_error)
  67969. __Pyx_GOTREF(__pyx_t_1);
  67970. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  67971. /* "uvloop/handles/async_.pyx":8
  67972. * self._start_init(loop)
  67973. *
  67974. * self._handle = <uv.uv_handle_t*>PyMem_RawMalloc(sizeof(uv.uv_async_t)) # <<<<<<<<<<<<<<
  67975. * if self._handle is NULL:
  67976. * self._abort_init()
  67977. */
  67978. __pyx_v_self->__pyx_base._handle = ((uv_handle_t *)PyMem_RawMalloc((sizeof(uv_async_t))));
  67979. /* "uvloop/handles/async_.pyx":9
  67980. *
  67981. * self._handle = <uv.uv_handle_t*>PyMem_RawMalloc(sizeof(uv.uv_async_t))
  67982. * if self._handle is NULL: # <<<<<<<<<<<<<<
  67983. * self._abort_init()
  67984. * raise MemoryError()
  67985. */
  67986. __pyx_t_2 = ((__pyx_v_self->__pyx_base._handle == NULL) != 0);
  67987. if (unlikely(__pyx_t_2)) {
  67988. /* "uvloop/handles/async_.pyx":10
  67989. * self._handle = <uv.uv_handle_t*>PyMem_RawMalloc(sizeof(uv.uv_async_t))
  67990. * if self._handle is NULL:
  67991. * self._abort_init() # <<<<<<<<<<<<<<
  67992. * raise MemoryError()
  67993. *
  67994. */
  67995. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVAsync *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._abort_init(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 10, __pyx_L1_error)
  67996. __Pyx_GOTREF(__pyx_t_1);
  67997. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  67998. /* "uvloop/handles/async_.pyx":11
  67999. * if self._handle is NULL:
  68000. * self._abort_init()
  68001. * raise MemoryError() # <<<<<<<<<<<<<<
  68002. *
  68003. * err = uv.uv_async_init(self._loop.uvloop,
  68004. */
  68005. PyErr_NoMemory(); __PYX_ERR(11, 11, __pyx_L1_error)
  68006. /* "uvloop/handles/async_.pyx":9
  68007. *
  68008. * self._handle = <uv.uv_handle_t*>PyMem_RawMalloc(sizeof(uv.uv_async_t))
  68009. * if self._handle is NULL: # <<<<<<<<<<<<<<
  68010. * self._abort_init()
  68011. * raise MemoryError()
  68012. */
  68013. }
  68014. /* "uvloop/handles/async_.pyx":13
  68015. * raise MemoryError()
  68016. *
  68017. * err = uv.uv_async_init(self._loop.uvloop, # <<<<<<<<<<<<<<
  68018. * <uv.uv_async_t*>self._handle,
  68019. * __uvasync_callback)
  68020. */
  68021. __pyx_v_err = uv_async_init(__pyx_v_self->__pyx_base._loop->uvloop, ((uv_async_t *)__pyx_v_self->__pyx_base._handle), __pyx_f_6uvloop_4loop___uvasync_callback);
  68022. /* "uvloop/handles/async_.pyx":16
  68023. * <uv.uv_async_t*>self._handle,
  68024. * __uvasync_callback)
  68025. * if err < 0: # <<<<<<<<<<<<<<
  68026. * self._abort_init()
  68027. * raise convert_error(err)
  68028. */
  68029. __pyx_t_2 = ((__pyx_v_err < 0) != 0);
  68030. if (unlikely(__pyx_t_2)) {
  68031. /* "uvloop/handles/async_.pyx":17
  68032. * __uvasync_callback)
  68033. * if err < 0:
  68034. * self._abort_init() # <<<<<<<<<<<<<<
  68035. * raise convert_error(err)
  68036. *
  68037. */
  68038. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVAsync *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._abort_init(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 17, __pyx_L1_error)
  68039. __Pyx_GOTREF(__pyx_t_1);
  68040. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  68041. /* "uvloop/handles/async_.pyx":18
  68042. * if err < 0:
  68043. * self._abort_init()
  68044. * raise convert_error(err) # <<<<<<<<<<<<<<
  68045. *
  68046. * self._finish_init()
  68047. */
  68048. __pyx_t_1 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 18, __pyx_L1_error)
  68049. __Pyx_GOTREF(__pyx_t_1);
  68050. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  68051. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  68052. __PYX_ERR(11, 18, __pyx_L1_error)
  68053. /* "uvloop/handles/async_.pyx":16
  68054. * <uv.uv_async_t*>self._handle,
  68055. * __uvasync_callback)
  68056. * if err < 0: # <<<<<<<<<<<<<<
  68057. * self._abort_init()
  68058. * raise convert_error(err)
  68059. */
  68060. }
  68061. /* "uvloop/handles/async_.pyx":20
  68062. * raise convert_error(err)
  68063. *
  68064. * self._finish_init() # <<<<<<<<<<<<<<
  68065. *
  68066. * self.callback = callback
  68067. */
  68068. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVAsync *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._finish_init(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 20, __pyx_L1_error)
  68069. __Pyx_GOTREF(__pyx_t_1);
  68070. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  68071. /* "uvloop/handles/async_.pyx":22
  68072. * self._finish_init()
  68073. *
  68074. * self.callback = callback # <<<<<<<<<<<<<<
  68075. * self.ctx = ctx
  68076. *
  68077. */
  68078. __pyx_v_self->callback = __pyx_v_callback;
  68079. /* "uvloop/handles/async_.pyx":23
  68080. *
  68081. * self.callback = callback
  68082. * self.ctx = ctx # <<<<<<<<<<<<<<
  68083. *
  68084. * cdef send(self):
  68085. */
  68086. __Pyx_INCREF(__pyx_v_ctx);
  68087. __Pyx_GIVEREF(__pyx_v_ctx);
  68088. __Pyx_GOTREF(__pyx_v_self->ctx);
  68089. __Pyx_DECREF(__pyx_v_self->ctx);
  68090. __pyx_v_self->ctx = __pyx_v_ctx;
  68091. /* "uvloop/handles/async_.pyx":3
  68092. * @cython.no_gc_clear
  68093. * cdef class UVAsync(UVHandle):
  68094. * cdef _init(self, Loop loop, method_t callback, object ctx): # <<<<<<<<<<<<<<
  68095. * cdef int err
  68096. *
  68097. */
  68098. /* function exit code */
  68099. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  68100. goto __pyx_L0;
  68101. __pyx_L1_error:;
  68102. __Pyx_XDECREF(__pyx_t_1);
  68103. __Pyx_AddTraceback("uvloop.loop.UVAsync._init", __pyx_clineno, __pyx_lineno, __pyx_filename);
  68104. __pyx_r = 0;
  68105. __pyx_L0:;
  68106. __Pyx_XGIVEREF(__pyx_r);
  68107. __Pyx_RefNannyFinishContext();
  68108. return __pyx_r;
  68109. }
  68110. /* "uvloop/handles/async_.pyx":25
  68111. * self.ctx = ctx
  68112. *
  68113. * cdef send(self): # <<<<<<<<<<<<<<
  68114. * cdef int err
  68115. *
  68116. */
  68117. static PyObject *__pyx_f_6uvloop_4loop_7UVAsync_send(struct __pyx_obj_6uvloop_4loop_UVAsync *__pyx_v_self) {
  68118. int __pyx_v_err;
  68119. PyObject *__pyx_v_exc = NULL;
  68120. PyObject *__pyx_r = NULL;
  68121. __Pyx_RefNannyDeclarations
  68122. PyObject *__pyx_t_1 = NULL;
  68123. int __pyx_t_2;
  68124. __Pyx_RefNannySetupContext("send", 0);
  68125. /* "uvloop/handles/async_.pyx":28
  68126. * cdef int err
  68127. *
  68128. * self._ensure_alive() # <<<<<<<<<<<<<<
  68129. *
  68130. * err = uv.uv_async_send(<uv.uv_async_t*>self._handle)
  68131. */
  68132. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVAsync *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._ensure_alive(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 28, __pyx_L1_error)
  68133. __Pyx_GOTREF(__pyx_t_1);
  68134. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  68135. /* "uvloop/handles/async_.pyx":30
  68136. * self._ensure_alive()
  68137. *
  68138. * err = uv.uv_async_send(<uv.uv_async_t*>self._handle) # <<<<<<<<<<<<<<
  68139. * if err < 0:
  68140. * exc = convert_error(err)
  68141. */
  68142. __pyx_v_err = uv_async_send(((uv_async_t *)__pyx_v_self->__pyx_base._handle));
  68143. /* "uvloop/handles/async_.pyx":31
  68144. *
  68145. * err = uv.uv_async_send(<uv.uv_async_t*>self._handle)
  68146. * if err < 0: # <<<<<<<<<<<<<<
  68147. * exc = convert_error(err)
  68148. * self._fatal_error(exc, True)
  68149. */
  68150. __pyx_t_2 = ((__pyx_v_err < 0) != 0);
  68151. if (__pyx_t_2) {
  68152. /* "uvloop/handles/async_.pyx":32
  68153. * err = uv.uv_async_send(<uv.uv_async_t*>self._handle)
  68154. * if err < 0:
  68155. * exc = convert_error(err) # <<<<<<<<<<<<<<
  68156. * self._fatal_error(exc, True)
  68157. * return
  68158. */
  68159. __pyx_t_1 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 32, __pyx_L1_error)
  68160. __Pyx_GOTREF(__pyx_t_1);
  68161. __pyx_v_exc = __pyx_t_1;
  68162. __pyx_t_1 = 0;
  68163. /* "uvloop/handles/async_.pyx":33
  68164. * if err < 0:
  68165. * exc = convert_error(err)
  68166. * self._fatal_error(exc, True) # <<<<<<<<<<<<<<
  68167. * return
  68168. *
  68169. */
  68170. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVAsync *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._fatal_error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self), __pyx_v_exc, Py_True, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 33, __pyx_L1_error)
  68171. __Pyx_GOTREF(__pyx_t_1);
  68172. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  68173. /* "uvloop/handles/async_.pyx":34
  68174. * exc = convert_error(err)
  68175. * self._fatal_error(exc, True)
  68176. * return # <<<<<<<<<<<<<<
  68177. *
  68178. * @staticmethod
  68179. */
  68180. __Pyx_XDECREF(__pyx_r);
  68181. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  68182. goto __pyx_L0;
  68183. /* "uvloop/handles/async_.pyx":31
  68184. *
  68185. * err = uv.uv_async_send(<uv.uv_async_t*>self._handle)
  68186. * if err < 0: # <<<<<<<<<<<<<<
  68187. * exc = convert_error(err)
  68188. * self._fatal_error(exc, True)
  68189. */
  68190. }
  68191. /* "uvloop/handles/async_.pyx":25
  68192. * self.ctx = ctx
  68193. *
  68194. * cdef send(self): # <<<<<<<<<<<<<<
  68195. * cdef int err
  68196. *
  68197. */
  68198. /* function exit code */
  68199. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  68200. goto __pyx_L0;
  68201. __pyx_L1_error:;
  68202. __Pyx_XDECREF(__pyx_t_1);
  68203. __Pyx_AddTraceback("uvloop.loop.UVAsync.send", __pyx_clineno, __pyx_lineno, __pyx_filename);
  68204. __pyx_r = 0;
  68205. __pyx_L0:;
  68206. __Pyx_XDECREF(__pyx_v_exc);
  68207. __Pyx_XGIVEREF(__pyx_r);
  68208. __Pyx_RefNannyFinishContext();
  68209. return __pyx_r;
  68210. }
  68211. /* "uvloop/handles/async_.pyx":37
  68212. *
  68213. * @staticmethod
  68214. * cdef UVAsync new(Loop loop, method_t callback, object ctx): # <<<<<<<<<<<<<<
  68215. * cdef UVAsync handle
  68216. * handle = UVAsync.__new__(UVAsync)
  68217. */
  68218. static struct __pyx_obj_6uvloop_4loop_UVAsync *__pyx_f_6uvloop_4loop_7UVAsync_new(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, __pyx_t_6uvloop_4loop_method_t __pyx_v_callback, PyObject *__pyx_v_ctx) {
  68219. struct __pyx_obj_6uvloop_4loop_UVAsync *__pyx_v_handle = 0;
  68220. struct __pyx_obj_6uvloop_4loop_UVAsync *__pyx_r = NULL;
  68221. __Pyx_RefNannyDeclarations
  68222. PyObject *__pyx_t_1 = NULL;
  68223. __Pyx_RefNannySetupContext("new", 0);
  68224. /* "uvloop/handles/async_.pyx":39
  68225. * cdef UVAsync new(Loop loop, method_t callback, object ctx):
  68226. * cdef UVAsync handle
  68227. * handle = UVAsync.__new__(UVAsync) # <<<<<<<<<<<<<<
  68228. * handle._init(loop, callback, ctx)
  68229. * return handle
  68230. */
  68231. __pyx_t_1 = ((PyObject *)__pyx_tp_new_6uvloop_4loop_UVAsync(((PyTypeObject *)__pyx_ptype_6uvloop_4loop_UVAsync), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 39, __pyx_L1_error)
  68232. __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  68233. __pyx_v_handle = ((struct __pyx_obj_6uvloop_4loop_UVAsync *)__pyx_t_1);
  68234. __pyx_t_1 = 0;
  68235. /* "uvloop/handles/async_.pyx":40
  68236. * cdef UVAsync handle
  68237. * handle = UVAsync.__new__(UVAsync)
  68238. * handle._init(loop, callback, ctx) # <<<<<<<<<<<<<<
  68239. * return handle
  68240. *
  68241. */
  68242. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVAsync *)__pyx_v_handle->__pyx_base.__pyx_vtab)->_init(__pyx_v_handle, __pyx_v_loop, __pyx_v_callback, __pyx_v_ctx); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 40, __pyx_L1_error)
  68243. __Pyx_GOTREF(__pyx_t_1);
  68244. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  68245. /* "uvloop/handles/async_.pyx":41
  68246. * handle = UVAsync.__new__(UVAsync)
  68247. * handle._init(loop, callback, ctx)
  68248. * return handle # <<<<<<<<<<<<<<
  68249. *
  68250. *
  68251. */
  68252. __Pyx_XDECREF(((PyObject *)__pyx_r));
  68253. __Pyx_INCREF(((PyObject *)__pyx_v_handle));
  68254. __pyx_r = __pyx_v_handle;
  68255. goto __pyx_L0;
  68256. /* "uvloop/handles/async_.pyx":37
  68257. *
  68258. * @staticmethod
  68259. * cdef UVAsync new(Loop loop, method_t callback, object ctx): # <<<<<<<<<<<<<<
  68260. * cdef UVAsync handle
  68261. * handle = UVAsync.__new__(UVAsync)
  68262. */
  68263. /* function exit code */
  68264. __pyx_L1_error:;
  68265. __Pyx_XDECREF(__pyx_t_1);
  68266. __Pyx_AddTraceback("uvloop.loop.UVAsync.new", __pyx_clineno, __pyx_lineno, __pyx_filename);
  68267. __pyx_r = 0;
  68268. __pyx_L0:;
  68269. __Pyx_XDECREF((PyObject *)__pyx_v_handle);
  68270. __Pyx_XGIVEREF((PyObject *)__pyx_r);
  68271. __Pyx_RefNannyFinishContext();
  68272. return __pyx_r;
  68273. }
  68274. /* "(tree fragment)":1
  68275. * def __reduce_cython__(self): # <<<<<<<<<<<<<<
  68276. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  68277. * def __setstate_cython__(self, __pyx_state):
  68278. */
  68279. /* Python wrapper */
  68280. static PyObject *__pyx_pw_6uvloop_4loop_7UVAsync_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  68281. static char __pyx_doc_6uvloop_4loop_7UVAsync___reduce_cython__[] = "UVAsync.__reduce_cython__(self)";
  68282. static PyObject *__pyx_pw_6uvloop_4loop_7UVAsync_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  68283. PyObject *__pyx_r = 0;
  68284. __Pyx_RefNannyDeclarations
  68285. __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  68286. __pyx_r = __pyx_pf_6uvloop_4loop_7UVAsync___reduce_cython__(((struct __pyx_obj_6uvloop_4loop_UVAsync *)__pyx_v_self));
  68287. /* function exit code */
  68288. __Pyx_RefNannyFinishContext();
  68289. return __pyx_r;
  68290. }
  68291. static PyObject *__pyx_pf_6uvloop_4loop_7UVAsync___reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVAsync *__pyx_v_self) {
  68292. PyObject *__pyx_r = NULL;
  68293. __Pyx_RefNannyDeclarations
  68294. PyObject *__pyx_t_1 = NULL;
  68295. __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  68296. /* "(tree fragment)":2
  68297. * def __reduce_cython__(self):
  68298. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  68299. * def __setstate_cython__(self, __pyx_state):
  68300. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  68301. */
  68302. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__108, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 2, __pyx_L1_error)
  68303. __Pyx_GOTREF(__pyx_t_1);
  68304. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  68305. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  68306. __PYX_ERR(9, 2, __pyx_L1_error)
  68307. /* "(tree fragment)":1
  68308. * def __reduce_cython__(self): # <<<<<<<<<<<<<<
  68309. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  68310. * def __setstate_cython__(self, __pyx_state):
  68311. */
  68312. /* function exit code */
  68313. __pyx_L1_error:;
  68314. __Pyx_XDECREF(__pyx_t_1);
  68315. __Pyx_AddTraceback("uvloop.loop.UVAsync.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  68316. __pyx_r = NULL;
  68317. __Pyx_XGIVEREF(__pyx_r);
  68318. __Pyx_RefNannyFinishContext();
  68319. return __pyx_r;
  68320. }
  68321. /* "(tree fragment)":3
  68322. * def __reduce_cython__(self):
  68323. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  68324. * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
  68325. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  68326. */
  68327. /* Python wrapper */
  68328. static PyObject *__pyx_pw_6uvloop_4loop_7UVAsync_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
  68329. static char __pyx_doc_6uvloop_4loop_7UVAsync_2__setstate_cython__[] = "UVAsync.__setstate_cython__(self, __pyx_state)";
  68330. static PyObject *__pyx_pw_6uvloop_4loop_7UVAsync_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  68331. PyObject *__pyx_r = 0;
  68332. __Pyx_RefNannyDeclarations
  68333. __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  68334. __pyx_r = __pyx_pf_6uvloop_4loop_7UVAsync_2__setstate_cython__(((struct __pyx_obj_6uvloop_4loop_UVAsync *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
  68335. /* function exit code */
  68336. __Pyx_RefNannyFinishContext();
  68337. return __pyx_r;
  68338. }
  68339. static PyObject *__pyx_pf_6uvloop_4loop_7UVAsync_2__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVAsync *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  68340. PyObject *__pyx_r = NULL;
  68341. __Pyx_RefNannyDeclarations
  68342. PyObject *__pyx_t_1 = NULL;
  68343. __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  68344. /* "(tree fragment)":4
  68345. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  68346. * def __setstate_cython__(self, __pyx_state):
  68347. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  68348. */
  68349. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__109, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 4, __pyx_L1_error)
  68350. __Pyx_GOTREF(__pyx_t_1);
  68351. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  68352. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  68353. __PYX_ERR(9, 4, __pyx_L1_error)
  68354. /* "(tree fragment)":3
  68355. * def __reduce_cython__(self):
  68356. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  68357. * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
  68358. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  68359. */
  68360. /* function exit code */
  68361. __pyx_L1_error:;
  68362. __Pyx_XDECREF(__pyx_t_1);
  68363. __Pyx_AddTraceback("uvloop.loop.UVAsync.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  68364. __pyx_r = NULL;
  68365. __Pyx_XGIVEREF(__pyx_r);
  68366. __Pyx_RefNannyFinishContext();
  68367. return __pyx_r;
  68368. }
  68369. /* "uvloop/handles/async_.pyx":44
  68370. *
  68371. *
  68372. * cdef void __uvasync_callback(uv.uv_async_t* handle) with gil: # <<<<<<<<<<<<<<
  68373. * if __ensure_handle_data(<uv.uv_handle_t*>handle, "UVAsync callback") == 0:
  68374. * return
  68375. */
  68376. static void __pyx_f_6uvloop_4loop___uvasync_callback(uv_async_t *__pyx_v_handle) {
  68377. struct __pyx_obj_6uvloop_4loop_UVAsync *__pyx_v_async_ = 0;
  68378. __pyx_t_6uvloop_4loop_method_t __pyx_v_cb;
  68379. PyObject *__pyx_v_ex = NULL;
  68380. __Pyx_RefNannyDeclarations
  68381. int __pyx_t_1;
  68382. PyObject *__pyx_t_2 = NULL;
  68383. __pyx_t_6uvloop_4loop_method_t __pyx_t_3;
  68384. PyObject *__pyx_t_4 = NULL;
  68385. PyObject *__pyx_t_5 = NULL;
  68386. PyObject *__pyx_t_6 = NULL;
  68387. PyObject *__pyx_t_7 = NULL;
  68388. int __pyx_t_8;
  68389. PyObject *__pyx_t_9 = NULL;
  68390. PyObject *__pyx_t_10 = NULL;
  68391. int __pyx_t_11;
  68392. char const *__pyx_t_12;
  68393. PyObject *__pyx_t_13 = NULL;
  68394. PyObject *__pyx_t_14 = NULL;
  68395. PyObject *__pyx_t_15 = NULL;
  68396. PyObject *__pyx_t_16 = NULL;
  68397. PyObject *__pyx_t_17 = NULL;
  68398. PyObject *__pyx_t_18 = NULL;
  68399. #ifdef WITH_THREAD
  68400. PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  68401. #endif
  68402. __Pyx_RefNannySetupContext("__uvasync_callback", 0);
  68403. /* "uvloop/handles/async_.pyx":45
  68404. *
  68405. * cdef void __uvasync_callback(uv.uv_async_t* handle) with gil:
  68406. * if __ensure_handle_data(<uv.uv_handle_t*>handle, "UVAsync callback") == 0: # <<<<<<<<<<<<<<
  68407. * return
  68408. *
  68409. */
  68410. __pyx_t_1 = ((__pyx_f_6uvloop_4loop___ensure_handle_data(((uv_handle_t *)__pyx_v_handle), ((char const *)"UVAsync callback")) == 0) != 0);
  68411. if (__pyx_t_1) {
  68412. /* "uvloop/handles/async_.pyx":46
  68413. * cdef void __uvasync_callback(uv.uv_async_t* handle) with gil:
  68414. * if __ensure_handle_data(<uv.uv_handle_t*>handle, "UVAsync callback") == 0:
  68415. * return # <<<<<<<<<<<<<<
  68416. *
  68417. * cdef:
  68418. */
  68419. goto __pyx_L0;
  68420. /* "uvloop/handles/async_.pyx":45
  68421. *
  68422. * cdef void __uvasync_callback(uv.uv_async_t* handle) with gil:
  68423. * if __ensure_handle_data(<uv.uv_handle_t*>handle, "UVAsync callback") == 0: # <<<<<<<<<<<<<<
  68424. * return
  68425. *
  68426. */
  68427. }
  68428. /* "uvloop/handles/async_.pyx":49
  68429. *
  68430. * cdef:
  68431. * UVAsync async_ = <UVAsync> handle.data # <<<<<<<<<<<<<<
  68432. * method_t cb = async_.callback
  68433. * try:
  68434. */
  68435. __pyx_t_2 = ((PyObject *)__pyx_v_handle->data);
  68436. __Pyx_INCREF(__pyx_t_2);
  68437. __pyx_v_async_ = ((struct __pyx_obj_6uvloop_4loop_UVAsync *)__pyx_t_2);
  68438. __pyx_t_2 = 0;
  68439. /* "uvloop/handles/async_.pyx":50
  68440. * cdef:
  68441. * UVAsync async_ = <UVAsync> handle.data
  68442. * method_t cb = async_.callback # <<<<<<<<<<<<<<
  68443. * try:
  68444. * cb(async_.ctx)
  68445. */
  68446. __pyx_t_3 = __pyx_v_async_->callback;
  68447. __pyx_v_cb = __pyx_t_3;
  68448. /* "uvloop/handles/async_.pyx":51
  68449. * UVAsync async_ = <UVAsync> handle.data
  68450. * method_t cb = async_.callback
  68451. * try: # <<<<<<<<<<<<<<
  68452. * cb(async_.ctx)
  68453. * except BaseException as ex:
  68454. */
  68455. {
  68456. __Pyx_PyThreadState_declare
  68457. __Pyx_PyThreadState_assign
  68458. __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
  68459. __Pyx_XGOTREF(__pyx_t_4);
  68460. __Pyx_XGOTREF(__pyx_t_5);
  68461. __Pyx_XGOTREF(__pyx_t_6);
  68462. /*try:*/ {
  68463. /* "uvloop/handles/async_.pyx":52
  68464. * method_t cb = async_.callback
  68465. * try:
  68466. * cb(async_.ctx) # <<<<<<<<<<<<<<
  68467. * except BaseException as ex:
  68468. * async_._error(ex, False)
  68469. */
  68470. __pyx_t_2 = __pyx_v_async_->ctx;
  68471. __Pyx_INCREF(__pyx_t_2);
  68472. __pyx_t_7 = __pyx_v_cb(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(11, 52, __pyx_L4_error)
  68473. __Pyx_GOTREF(__pyx_t_7);
  68474. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  68475. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  68476. /* "uvloop/handles/async_.pyx":51
  68477. * UVAsync async_ = <UVAsync> handle.data
  68478. * method_t cb = async_.callback
  68479. * try: # <<<<<<<<<<<<<<
  68480. * cb(async_.ctx)
  68481. * except BaseException as ex:
  68482. */
  68483. }
  68484. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  68485. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  68486. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  68487. goto __pyx_L9_try_end;
  68488. __pyx_L4_error:;
  68489. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  68490. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  68491. /* "uvloop/handles/async_.pyx":53
  68492. * try:
  68493. * cb(async_.ctx)
  68494. * except BaseException as ex: # <<<<<<<<<<<<<<
  68495. * async_._error(ex, False)
  68496. */
  68497. __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_BaseException);
  68498. if (__pyx_t_8) {
  68499. __Pyx_AddTraceback("uvloop.loop.__uvasync_callback", __pyx_clineno, __pyx_lineno, __pyx_filename);
  68500. if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_2, &__pyx_t_9) < 0) __PYX_ERR(11, 53, __pyx_L6_except_error)
  68501. __Pyx_GOTREF(__pyx_t_7);
  68502. __Pyx_GOTREF(__pyx_t_2);
  68503. __Pyx_GOTREF(__pyx_t_9);
  68504. __Pyx_INCREF(__pyx_t_2);
  68505. __pyx_v_ex = __pyx_t_2;
  68506. /*try:*/ {
  68507. /* "uvloop/handles/async_.pyx":54
  68508. * cb(async_.ctx)
  68509. * except BaseException as ex:
  68510. * async_._error(ex, False) # <<<<<<<<<<<<<<
  68511. */
  68512. __pyx_t_10 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVAsync *)__pyx_v_async_->__pyx_base.__pyx_vtab)->__pyx_base._error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_async_), __pyx_v_ex, Py_False); if (unlikely(!__pyx_t_10)) __PYX_ERR(11, 54, __pyx_L15_error)
  68513. __Pyx_GOTREF(__pyx_t_10);
  68514. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  68515. }
  68516. /* "uvloop/handles/async_.pyx":53
  68517. * try:
  68518. * cb(async_.ctx)
  68519. * except BaseException as ex: # <<<<<<<<<<<<<<
  68520. * async_._error(ex, False)
  68521. */
  68522. /*finally:*/ {
  68523. /*normal exit:*/{
  68524. __Pyx_DECREF(__pyx_v_ex);
  68525. __pyx_v_ex = NULL;
  68526. goto __pyx_L16;
  68527. }
  68528. __pyx_L15_error:;
  68529. /*exception exit:*/{
  68530. __Pyx_PyThreadState_declare
  68531. __Pyx_PyThreadState_assign
  68532. __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0;
  68533. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  68534. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18);
  68535. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15) < 0)) __Pyx_ErrFetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
  68536. __Pyx_XGOTREF(__pyx_t_13);
  68537. __Pyx_XGOTREF(__pyx_t_14);
  68538. __Pyx_XGOTREF(__pyx_t_15);
  68539. __Pyx_XGOTREF(__pyx_t_16);
  68540. __Pyx_XGOTREF(__pyx_t_17);
  68541. __Pyx_XGOTREF(__pyx_t_18);
  68542. __pyx_t_8 = __pyx_lineno; __pyx_t_11 = __pyx_clineno; __pyx_t_12 = __pyx_filename;
  68543. {
  68544. __Pyx_DECREF(__pyx_v_ex);
  68545. __pyx_v_ex = NULL;
  68546. }
  68547. if (PY_MAJOR_VERSION >= 3) {
  68548. __Pyx_XGIVEREF(__pyx_t_16);
  68549. __Pyx_XGIVEREF(__pyx_t_17);
  68550. __Pyx_XGIVEREF(__pyx_t_18);
  68551. __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18);
  68552. }
  68553. __Pyx_XGIVEREF(__pyx_t_13);
  68554. __Pyx_XGIVEREF(__pyx_t_14);
  68555. __Pyx_XGIVEREF(__pyx_t_15);
  68556. __Pyx_ErrRestore(__pyx_t_13, __pyx_t_14, __pyx_t_15);
  68557. __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0;
  68558. __pyx_lineno = __pyx_t_8; __pyx_clineno = __pyx_t_11; __pyx_filename = __pyx_t_12;
  68559. goto __pyx_L6_except_error;
  68560. }
  68561. __pyx_L16:;
  68562. }
  68563. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  68564. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  68565. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  68566. goto __pyx_L5_exception_handled;
  68567. }
  68568. goto __pyx_L6_except_error;
  68569. __pyx_L6_except_error:;
  68570. /* "uvloop/handles/async_.pyx":51
  68571. * UVAsync async_ = <UVAsync> handle.data
  68572. * method_t cb = async_.callback
  68573. * try: # <<<<<<<<<<<<<<
  68574. * cb(async_.ctx)
  68575. * except BaseException as ex:
  68576. */
  68577. __Pyx_XGIVEREF(__pyx_t_4);
  68578. __Pyx_XGIVEREF(__pyx_t_5);
  68579. __Pyx_XGIVEREF(__pyx_t_6);
  68580. __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
  68581. goto __pyx_L1_error;
  68582. __pyx_L5_exception_handled:;
  68583. __Pyx_XGIVEREF(__pyx_t_4);
  68584. __Pyx_XGIVEREF(__pyx_t_5);
  68585. __Pyx_XGIVEREF(__pyx_t_6);
  68586. __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
  68587. __pyx_L9_try_end:;
  68588. }
  68589. /* "uvloop/handles/async_.pyx":44
  68590. *
  68591. *
  68592. * cdef void __uvasync_callback(uv.uv_async_t* handle) with gil: # <<<<<<<<<<<<<<
  68593. * if __ensure_handle_data(<uv.uv_handle_t*>handle, "UVAsync callback") == 0:
  68594. * return
  68595. */
  68596. /* function exit code */
  68597. goto __pyx_L0;
  68598. __pyx_L1_error:;
  68599. __Pyx_XDECREF(__pyx_t_2);
  68600. __Pyx_XDECREF(__pyx_t_7);
  68601. __Pyx_XDECREF(__pyx_t_9);
  68602. __Pyx_XDECREF(__pyx_t_10);
  68603. __Pyx_WriteUnraisable("uvloop.loop.__uvasync_callback", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  68604. __pyx_L0:;
  68605. __Pyx_XDECREF((PyObject *)__pyx_v_async_);
  68606. __Pyx_XDECREF(__pyx_v_ex);
  68607. __Pyx_RefNannyFinishContext();
  68608. #ifdef WITH_THREAD
  68609. __Pyx_PyGILState_Release(__pyx_gilstate_save);
  68610. #endif
  68611. }
  68612. /* "uvloop/handles/idle.pyx":3
  68613. * @cython.no_gc_clear
  68614. * cdef class UVIdle(UVHandle):
  68615. * cdef _init(self, Loop loop, Handle h): # <<<<<<<<<<<<<<
  68616. * cdef int err
  68617. *
  68618. */
  68619. static PyObject *__pyx_f_6uvloop_4loop_6UVIdle__init(struct __pyx_obj_6uvloop_4loop_UVIdle *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_h) {
  68620. int __pyx_v_err;
  68621. PyObject *__pyx_r = NULL;
  68622. __Pyx_RefNannyDeclarations
  68623. PyObject *__pyx_t_1 = NULL;
  68624. int __pyx_t_2;
  68625. __Pyx_RefNannySetupContext("_init", 0);
  68626. /* "uvloop/handles/idle.pyx":6
  68627. * cdef int err
  68628. *
  68629. * self._start_init(loop) # <<<<<<<<<<<<<<
  68630. *
  68631. * self._handle = <uv.uv_handle_t*>PyMem_RawMalloc(sizeof(uv.uv_idle_t))
  68632. */
  68633. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVIdle *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._start_init(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self), __pyx_v_loop); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 6, __pyx_L1_error)
  68634. __Pyx_GOTREF(__pyx_t_1);
  68635. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  68636. /* "uvloop/handles/idle.pyx":8
  68637. * self._start_init(loop)
  68638. *
  68639. * self._handle = <uv.uv_handle_t*>PyMem_RawMalloc(sizeof(uv.uv_idle_t)) # <<<<<<<<<<<<<<
  68640. * if self._handle is NULL:
  68641. * self._abort_init()
  68642. */
  68643. __pyx_v_self->__pyx_base._handle = ((uv_handle_t *)PyMem_RawMalloc((sizeof(uv_idle_t))));
  68644. /* "uvloop/handles/idle.pyx":9
  68645. *
  68646. * self._handle = <uv.uv_handle_t*>PyMem_RawMalloc(sizeof(uv.uv_idle_t))
  68647. * if self._handle is NULL: # <<<<<<<<<<<<<<
  68648. * self._abort_init()
  68649. * raise MemoryError()
  68650. */
  68651. __pyx_t_2 = ((__pyx_v_self->__pyx_base._handle == NULL) != 0);
  68652. if (unlikely(__pyx_t_2)) {
  68653. /* "uvloop/handles/idle.pyx":10
  68654. * self._handle = <uv.uv_handle_t*>PyMem_RawMalloc(sizeof(uv.uv_idle_t))
  68655. * if self._handle is NULL:
  68656. * self._abort_init() # <<<<<<<<<<<<<<
  68657. * raise MemoryError()
  68658. *
  68659. */
  68660. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVIdle *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._abort_init(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 10, __pyx_L1_error)
  68661. __Pyx_GOTREF(__pyx_t_1);
  68662. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  68663. /* "uvloop/handles/idle.pyx":11
  68664. * if self._handle is NULL:
  68665. * self._abort_init()
  68666. * raise MemoryError() # <<<<<<<<<<<<<<
  68667. *
  68668. * err = uv.uv_idle_init(self._loop.uvloop, <uv.uv_idle_t*>self._handle)
  68669. */
  68670. PyErr_NoMemory(); __PYX_ERR(12, 11, __pyx_L1_error)
  68671. /* "uvloop/handles/idle.pyx":9
  68672. *
  68673. * self._handle = <uv.uv_handle_t*>PyMem_RawMalloc(sizeof(uv.uv_idle_t))
  68674. * if self._handle is NULL: # <<<<<<<<<<<<<<
  68675. * self._abort_init()
  68676. * raise MemoryError()
  68677. */
  68678. }
  68679. /* "uvloop/handles/idle.pyx":13
  68680. * raise MemoryError()
  68681. *
  68682. * err = uv.uv_idle_init(self._loop.uvloop, <uv.uv_idle_t*>self._handle) # <<<<<<<<<<<<<<
  68683. * if err < 0:
  68684. * self._abort_init()
  68685. */
  68686. __pyx_v_err = uv_idle_init(__pyx_v_self->__pyx_base._loop->uvloop, ((uv_idle_t *)__pyx_v_self->__pyx_base._handle));
  68687. /* "uvloop/handles/idle.pyx":14
  68688. *
  68689. * err = uv.uv_idle_init(self._loop.uvloop, <uv.uv_idle_t*>self._handle)
  68690. * if err < 0: # <<<<<<<<<<<<<<
  68691. * self._abort_init()
  68692. * raise convert_error(err)
  68693. */
  68694. __pyx_t_2 = ((__pyx_v_err < 0) != 0);
  68695. if (unlikely(__pyx_t_2)) {
  68696. /* "uvloop/handles/idle.pyx":15
  68697. * err = uv.uv_idle_init(self._loop.uvloop, <uv.uv_idle_t*>self._handle)
  68698. * if err < 0:
  68699. * self._abort_init() # <<<<<<<<<<<<<<
  68700. * raise convert_error(err)
  68701. *
  68702. */
  68703. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVIdle *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._abort_init(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 15, __pyx_L1_error)
  68704. __Pyx_GOTREF(__pyx_t_1);
  68705. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  68706. /* "uvloop/handles/idle.pyx":16
  68707. * if err < 0:
  68708. * self._abort_init()
  68709. * raise convert_error(err) # <<<<<<<<<<<<<<
  68710. *
  68711. * self._finish_init()
  68712. */
  68713. __pyx_t_1 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 16, __pyx_L1_error)
  68714. __Pyx_GOTREF(__pyx_t_1);
  68715. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  68716. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  68717. __PYX_ERR(12, 16, __pyx_L1_error)
  68718. /* "uvloop/handles/idle.pyx":14
  68719. *
  68720. * err = uv.uv_idle_init(self._loop.uvloop, <uv.uv_idle_t*>self._handle)
  68721. * if err < 0: # <<<<<<<<<<<<<<
  68722. * self._abort_init()
  68723. * raise convert_error(err)
  68724. */
  68725. }
  68726. /* "uvloop/handles/idle.pyx":18
  68727. * raise convert_error(err)
  68728. *
  68729. * self._finish_init() # <<<<<<<<<<<<<<
  68730. *
  68731. * self.h = h
  68732. */
  68733. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVIdle *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._finish_init(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 18, __pyx_L1_error)
  68734. __Pyx_GOTREF(__pyx_t_1);
  68735. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  68736. /* "uvloop/handles/idle.pyx":20
  68737. * self._finish_init()
  68738. *
  68739. * self.h = h # <<<<<<<<<<<<<<
  68740. * self.running = 0
  68741. *
  68742. */
  68743. __Pyx_INCREF(((PyObject *)__pyx_v_h));
  68744. __Pyx_GIVEREF(((PyObject *)__pyx_v_h));
  68745. __Pyx_GOTREF(__pyx_v_self->h);
  68746. __Pyx_DECREF(((PyObject *)__pyx_v_self->h));
  68747. __pyx_v_self->h = __pyx_v_h;
  68748. /* "uvloop/handles/idle.pyx":21
  68749. *
  68750. * self.h = h
  68751. * self.running = 0 # <<<<<<<<<<<<<<
  68752. *
  68753. * cdef inline stop(self):
  68754. */
  68755. __pyx_v_self->running = 0;
  68756. /* "uvloop/handles/idle.pyx":3
  68757. * @cython.no_gc_clear
  68758. * cdef class UVIdle(UVHandle):
  68759. * cdef _init(self, Loop loop, Handle h): # <<<<<<<<<<<<<<
  68760. * cdef int err
  68761. *
  68762. */
  68763. /* function exit code */
  68764. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  68765. goto __pyx_L0;
  68766. __pyx_L1_error:;
  68767. __Pyx_XDECREF(__pyx_t_1);
  68768. __Pyx_AddTraceback("uvloop.loop.UVIdle._init", __pyx_clineno, __pyx_lineno, __pyx_filename);
  68769. __pyx_r = 0;
  68770. __pyx_L0:;
  68771. __Pyx_XGIVEREF(__pyx_r);
  68772. __Pyx_RefNannyFinishContext();
  68773. return __pyx_r;
  68774. }
  68775. /* "uvloop/handles/idle.pyx":23
  68776. * self.running = 0
  68777. *
  68778. * cdef inline stop(self): # <<<<<<<<<<<<<<
  68779. * cdef int err
  68780. *
  68781. */
  68782. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_6UVIdle_stop(struct __pyx_obj_6uvloop_4loop_UVIdle *__pyx_v_self) {
  68783. int __pyx_v_err;
  68784. PyObject *__pyx_v_exc = NULL;
  68785. PyObject *__pyx_r = NULL;
  68786. __Pyx_RefNannyDeclarations
  68787. int __pyx_t_1;
  68788. PyObject *__pyx_t_2 = NULL;
  68789. __Pyx_RefNannySetupContext("stop", 0);
  68790. /* "uvloop/handles/idle.pyx":26
  68791. * cdef int err
  68792. *
  68793. * if not self._is_alive(): # <<<<<<<<<<<<<<
  68794. * self.running = 0
  68795. * return
  68796. */
  68797. __pyx_t_1 = ((!(((struct __pyx_vtabstruct_6uvloop_4loop_UVIdle *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._is_alive(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)) != 0)) != 0);
  68798. if (__pyx_t_1) {
  68799. /* "uvloop/handles/idle.pyx":27
  68800. *
  68801. * if not self._is_alive():
  68802. * self.running = 0 # <<<<<<<<<<<<<<
  68803. * return
  68804. *
  68805. */
  68806. __pyx_v_self->running = 0;
  68807. /* "uvloop/handles/idle.pyx":28
  68808. * if not self._is_alive():
  68809. * self.running = 0
  68810. * return # <<<<<<<<<<<<<<
  68811. *
  68812. * if self.running == 1:
  68813. */
  68814. __Pyx_XDECREF(__pyx_r);
  68815. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  68816. goto __pyx_L0;
  68817. /* "uvloop/handles/idle.pyx":26
  68818. * cdef int err
  68819. *
  68820. * if not self._is_alive(): # <<<<<<<<<<<<<<
  68821. * self.running = 0
  68822. * return
  68823. */
  68824. }
  68825. /* "uvloop/handles/idle.pyx":30
  68826. * return
  68827. *
  68828. * if self.running == 1: # <<<<<<<<<<<<<<
  68829. * err = uv.uv_idle_stop(<uv.uv_idle_t*>self._handle)
  68830. * self.running = 0
  68831. */
  68832. __pyx_t_1 = ((__pyx_v_self->running == 1) != 0);
  68833. if (__pyx_t_1) {
  68834. /* "uvloop/handles/idle.pyx":31
  68835. *
  68836. * if self.running == 1:
  68837. * err = uv.uv_idle_stop(<uv.uv_idle_t*>self._handle) # <<<<<<<<<<<<<<
  68838. * self.running = 0
  68839. * if err < 0:
  68840. */
  68841. __pyx_v_err = uv_idle_stop(((uv_idle_t *)__pyx_v_self->__pyx_base._handle));
  68842. /* "uvloop/handles/idle.pyx":32
  68843. * if self.running == 1:
  68844. * err = uv.uv_idle_stop(<uv.uv_idle_t*>self._handle)
  68845. * self.running = 0 # <<<<<<<<<<<<<<
  68846. * if err < 0:
  68847. * exc = convert_error(err)
  68848. */
  68849. __pyx_v_self->running = 0;
  68850. /* "uvloop/handles/idle.pyx":33
  68851. * err = uv.uv_idle_stop(<uv.uv_idle_t*>self._handle)
  68852. * self.running = 0
  68853. * if err < 0: # <<<<<<<<<<<<<<
  68854. * exc = convert_error(err)
  68855. * self._fatal_error(exc, True)
  68856. */
  68857. __pyx_t_1 = ((__pyx_v_err < 0) != 0);
  68858. if (__pyx_t_1) {
  68859. /* "uvloop/handles/idle.pyx":34
  68860. * self.running = 0
  68861. * if err < 0:
  68862. * exc = convert_error(err) # <<<<<<<<<<<<<<
  68863. * self._fatal_error(exc, True)
  68864. * return
  68865. */
  68866. __pyx_t_2 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(12, 34, __pyx_L1_error)
  68867. __Pyx_GOTREF(__pyx_t_2);
  68868. __pyx_v_exc = __pyx_t_2;
  68869. __pyx_t_2 = 0;
  68870. /* "uvloop/handles/idle.pyx":35
  68871. * if err < 0:
  68872. * exc = convert_error(err)
  68873. * self._fatal_error(exc, True) # <<<<<<<<<<<<<<
  68874. * return
  68875. *
  68876. */
  68877. __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVIdle *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._fatal_error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self), __pyx_v_exc, Py_True, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(12, 35, __pyx_L1_error)
  68878. __Pyx_GOTREF(__pyx_t_2);
  68879. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  68880. /* "uvloop/handles/idle.pyx":36
  68881. * exc = convert_error(err)
  68882. * self._fatal_error(exc, True)
  68883. * return # <<<<<<<<<<<<<<
  68884. *
  68885. * cdef inline start(self):
  68886. */
  68887. __Pyx_XDECREF(__pyx_r);
  68888. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  68889. goto __pyx_L0;
  68890. /* "uvloop/handles/idle.pyx":33
  68891. * err = uv.uv_idle_stop(<uv.uv_idle_t*>self._handle)
  68892. * self.running = 0
  68893. * if err < 0: # <<<<<<<<<<<<<<
  68894. * exc = convert_error(err)
  68895. * self._fatal_error(exc, True)
  68896. */
  68897. }
  68898. /* "uvloop/handles/idle.pyx":30
  68899. * return
  68900. *
  68901. * if self.running == 1: # <<<<<<<<<<<<<<
  68902. * err = uv.uv_idle_stop(<uv.uv_idle_t*>self._handle)
  68903. * self.running = 0
  68904. */
  68905. }
  68906. /* "uvloop/handles/idle.pyx":23
  68907. * self.running = 0
  68908. *
  68909. * cdef inline stop(self): # <<<<<<<<<<<<<<
  68910. * cdef int err
  68911. *
  68912. */
  68913. /* function exit code */
  68914. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  68915. goto __pyx_L0;
  68916. __pyx_L1_error:;
  68917. __Pyx_XDECREF(__pyx_t_2);
  68918. __Pyx_AddTraceback("uvloop.loop.UVIdle.stop", __pyx_clineno, __pyx_lineno, __pyx_filename);
  68919. __pyx_r = 0;
  68920. __pyx_L0:;
  68921. __Pyx_XDECREF(__pyx_v_exc);
  68922. __Pyx_XGIVEREF(__pyx_r);
  68923. __Pyx_RefNannyFinishContext();
  68924. return __pyx_r;
  68925. }
  68926. /* "uvloop/handles/idle.pyx":38
  68927. * return
  68928. *
  68929. * cdef inline start(self): # <<<<<<<<<<<<<<
  68930. * cdef int err
  68931. *
  68932. */
  68933. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_6UVIdle_start(struct __pyx_obj_6uvloop_4loop_UVIdle *__pyx_v_self) {
  68934. int __pyx_v_err;
  68935. PyObject *__pyx_v_exc = NULL;
  68936. PyObject *__pyx_r = NULL;
  68937. __Pyx_RefNannyDeclarations
  68938. PyObject *__pyx_t_1 = NULL;
  68939. int __pyx_t_2;
  68940. __Pyx_RefNannySetupContext("start", 0);
  68941. /* "uvloop/handles/idle.pyx":41
  68942. * cdef int err
  68943. *
  68944. * self._ensure_alive() # <<<<<<<<<<<<<<
  68945. *
  68946. * if self.running == 0:
  68947. */
  68948. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVIdle *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._ensure_alive(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 41, __pyx_L1_error)
  68949. __Pyx_GOTREF(__pyx_t_1);
  68950. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  68951. /* "uvloop/handles/idle.pyx":43
  68952. * self._ensure_alive()
  68953. *
  68954. * if self.running == 0: # <<<<<<<<<<<<<<
  68955. * err = uv.uv_idle_start(<uv.uv_idle_t*>self._handle,
  68956. * cb_idle_callback)
  68957. */
  68958. __pyx_t_2 = ((__pyx_v_self->running == 0) != 0);
  68959. if (__pyx_t_2) {
  68960. /* "uvloop/handles/idle.pyx":44
  68961. *
  68962. * if self.running == 0:
  68963. * err = uv.uv_idle_start(<uv.uv_idle_t*>self._handle, # <<<<<<<<<<<<<<
  68964. * cb_idle_callback)
  68965. * if err < 0:
  68966. */
  68967. __pyx_v_err = uv_idle_start(((uv_idle_t *)__pyx_v_self->__pyx_base._handle), __pyx_f_6uvloop_4loop_cb_idle_callback);
  68968. /* "uvloop/handles/idle.pyx":46
  68969. * err = uv.uv_idle_start(<uv.uv_idle_t*>self._handle,
  68970. * cb_idle_callback)
  68971. * if err < 0: # <<<<<<<<<<<<<<
  68972. * exc = convert_error(err)
  68973. * self._fatal_error(exc, True)
  68974. */
  68975. __pyx_t_2 = ((__pyx_v_err < 0) != 0);
  68976. if (__pyx_t_2) {
  68977. /* "uvloop/handles/idle.pyx":47
  68978. * cb_idle_callback)
  68979. * if err < 0:
  68980. * exc = convert_error(err) # <<<<<<<<<<<<<<
  68981. * self._fatal_error(exc, True)
  68982. * return
  68983. */
  68984. __pyx_t_1 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 47, __pyx_L1_error)
  68985. __Pyx_GOTREF(__pyx_t_1);
  68986. __pyx_v_exc = __pyx_t_1;
  68987. __pyx_t_1 = 0;
  68988. /* "uvloop/handles/idle.pyx":48
  68989. * if err < 0:
  68990. * exc = convert_error(err)
  68991. * self._fatal_error(exc, True) # <<<<<<<<<<<<<<
  68992. * return
  68993. * self.running = 1
  68994. */
  68995. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVIdle *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._fatal_error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self), __pyx_v_exc, Py_True, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 48, __pyx_L1_error)
  68996. __Pyx_GOTREF(__pyx_t_1);
  68997. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  68998. /* "uvloop/handles/idle.pyx":49
  68999. * exc = convert_error(err)
  69000. * self._fatal_error(exc, True)
  69001. * return # <<<<<<<<<<<<<<
  69002. * self.running = 1
  69003. *
  69004. */
  69005. __Pyx_XDECREF(__pyx_r);
  69006. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  69007. goto __pyx_L0;
  69008. /* "uvloop/handles/idle.pyx":46
  69009. * err = uv.uv_idle_start(<uv.uv_idle_t*>self._handle,
  69010. * cb_idle_callback)
  69011. * if err < 0: # <<<<<<<<<<<<<<
  69012. * exc = convert_error(err)
  69013. * self._fatal_error(exc, True)
  69014. */
  69015. }
  69016. /* "uvloop/handles/idle.pyx":50
  69017. * self._fatal_error(exc, True)
  69018. * return
  69019. * self.running = 1 # <<<<<<<<<<<<<<
  69020. *
  69021. * @staticmethod
  69022. */
  69023. __pyx_v_self->running = 1;
  69024. /* "uvloop/handles/idle.pyx":43
  69025. * self._ensure_alive()
  69026. *
  69027. * if self.running == 0: # <<<<<<<<<<<<<<
  69028. * err = uv.uv_idle_start(<uv.uv_idle_t*>self._handle,
  69029. * cb_idle_callback)
  69030. */
  69031. }
  69032. /* "uvloop/handles/idle.pyx":38
  69033. * return
  69034. *
  69035. * cdef inline start(self): # <<<<<<<<<<<<<<
  69036. * cdef int err
  69037. *
  69038. */
  69039. /* function exit code */
  69040. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  69041. goto __pyx_L0;
  69042. __pyx_L1_error:;
  69043. __Pyx_XDECREF(__pyx_t_1);
  69044. __Pyx_AddTraceback("uvloop.loop.UVIdle.start", __pyx_clineno, __pyx_lineno, __pyx_filename);
  69045. __pyx_r = 0;
  69046. __pyx_L0:;
  69047. __Pyx_XDECREF(__pyx_v_exc);
  69048. __Pyx_XGIVEREF(__pyx_r);
  69049. __Pyx_RefNannyFinishContext();
  69050. return __pyx_r;
  69051. }
  69052. /* "uvloop/handles/idle.pyx":53
  69053. *
  69054. * @staticmethod
  69055. * cdef UVIdle new(Loop loop, Handle h): # <<<<<<<<<<<<<<
  69056. * cdef UVIdle handle
  69057. * handle = UVIdle.__new__(UVIdle)
  69058. */
  69059. static struct __pyx_obj_6uvloop_4loop_UVIdle *__pyx_f_6uvloop_4loop_6UVIdle_new(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_h) {
  69060. struct __pyx_obj_6uvloop_4loop_UVIdle *__pyx_v_handle = 0;
  69061. struct __pyx_obj_6uvloop_4loop_UVIdle *__pyx_r = NULL;
  69062. __Pyx_RefNannyDeclarations
  69063. PyObject *__pyx_t_1 = NULL;
  69064. __Pyx_RefNannySetupContext("new", 0);
  69065. /* "uvloop/handles/idle.pyx":55
  69066. * cdef UVIdle new(Loop loop, Handle h):
  69067. * cdef UVIdle handle
  69068. * handle = UVIdle.__new__(UVIdle) # <<<<<<<<<<<<<<
  69069. * handle._init(loop, h)
  69070. * return handle
  69071. */
  69072. __pyx_t_1 = ((PyObject *)__pyx_tp_new_6uvloop_4loop_UVIdle(((PyTypeObject *)__pyx_ptype_6uvloop_4loop_UVIdle), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 55, __pyx_L1_error)
  69073. __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  69074. __pyx_v_handle = ((struct __pyx_obj_6uvloop_4loop_UVIdle *)__pyx_t_1);
  69075. __pyx_t_1 = 0;
  69076. /* "uvloop/handles/idle.pyx":56
  69077. * cdef UVIdle handle
  69078. * handle = UVIdle.__new__(UVIdle)
  69079. * handle._init(loop, h) # <<<<<<<<<<<<<<
  69080. * return handle
  69081. *
  69082. */
  69083. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVIdle *)__pyx_v_handle->__pyx_base.__pyx_vtab)->_init(__pyx_v_handle, __pyx_v_loop, __pyx_v_h); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 56, __pyx_L1_error)
  69084. __Pyx_GOTREF(__pyx_t_1);
  69085. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  69086. /* "uvloop/handles/idle.pyx":57
  69087. * handle = UVIdle.__new__(UVIdle)
  69088. * handle._init(loop, h)
  69089. * return handle # <<<<<<<<<<<<<<
  69090. *
  69091. *
  69092. */
  69093. __Pyx_XDECREF(((PyObject *)__pyx_r));
  69094. __Pyx_INCREF(((PyObject *)__pyx_v_handle));
  69095. __pyx_r = __pyx_v_handle;
  69096. goto __pyx_L0;
  69097. /* "uvloop/handles/idle.pyx":53
  69098. *
  69099. * @staticmethod
  69100. * cdef UVIdle new(Loop loop, Handle h): # <<<<<<<<<<<<<<
  69101. * cdef UVIdle handle
  69102. * handle = UVIdle.__new__(UVIdle)
  69103. */
  69104. /* function exit code */
  69105. __pyx_L1_error:;
  69106. __Pyx_XDECREF(__pyx_t_1);
  69107. __Pyx_AddTraceback("uvloop.loop.UVIdle.new", __pyx_clineno, __pyx_lineno, __pyx_filename);
  69108. __pyx_r = 0;
  69109. __pyx_L0:;
  69110. __Pyx_XDECREF((PyObject *)__pyx_v_handle);
  69111. __Pyx_XGIVEREF((PyObject *)__pyx_r);
  69112. __Pyx_RefNannyFinishContext();
  69113. return __pyx_r;
  69114. }
  69115. /* "(tree fragment)":1
  69116. * def __reduce_cython__(self): # <<<<<<<<<<<<<<
  69117. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  69118. * def __setstate_cython__(self, __pyx_state):
  69119. */
  69120. /* Python wrapper */
  69121. static PyObject *__pyx_pw_6uvloop_4loop_6UVIdle_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  69122. static char __pyx_doc_6uvloop_4loop_6UVIdle___reduce_cython__[] = "UVIdle.__reduce_cython__(self)";
  69123. static PyObject *__pyx_pw_6uvloop_4loop_6UVIdle_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  69124. PyObject *__pyx_r = 0;
  69125. __Pyx_RefNannyDeclarations
  69126. __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  69127. __pyx_r = __pyx_pf_6uvloop_4loop_6UVIdle___reduce_cython__(((struct __pyx_obj_6uvloop_4loop_UVIdle *)__pyx_v_self));
  69128. /* function exit code */
  69129. __Pyx_RefNannyFinishContext();
  69130. return __pyx_r;
  69131. }
  69132. static PyObject *__pyx_pf_6uvloop_4loop_6UVIdle___reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVIdle *__pyx_v_self) {
  69133. PyObject *__pyx_r = NULL;
  69134. __Pyx_RefNannyDeclarations
  69135. PyObject *__pyx_t_1 = NULL;
  69136. __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  69137. /* "(tree fragment)":2
  69138. * def __reduce_cython__(self):
  69139. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  69140. * def __setstate_cython__(self, __pyx_state):
  69141. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  69142. */
  69143. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__110, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 2, __pyx_L1_error)
  69144. __Pyx_GOTREF(__pyx_t_1);
  69145. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  69146. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  69147. __PYX_ERR(9, 2, __pyx_L1_error)
  69148. /* "(tree fragment)":1
  69149. * def __reduce_cython__(self): # <<<<<<<<<<<<<<
  69150. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  69151. * def __setstate_cython__(self, __pyx_state):
  69152. */
  69153. /* function exit code */
  69154. __pyx_L1_error:;
  69155. __Pyx_XDECREF(__pyx_t_1);
  69156. __Pyx_AddTraceback("uvloop.loop.UVIdle.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  69157. __pyx_r = NULL;
  69158. __Pyx_XGIVEREF(__pyx_r);
  69159. __Pyx_RefNannyFinishContext();
  69160. return __pyx_r;
  69161. }
  69162. /* "(tree fragment)":3
  69163. * def __reduce_cython__(self):
  69164. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  69165. * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
  69166. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  69167. */
  69168. /* Python wrapper */
  69169. static PyObject *__pyx_pw_6uvloop_4loop_6UVIdle_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
  69170. static char __pyx_doc_6uvloop_4loop_6UVIdle_2__setstate_cython__[] = "UVIdle.__setstate_cython__(self, __pyx_state)";
  69171. static PyObject *__pyx_pw_6uvloop_4loop_6UVIdle_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  69172. PyObject *__pyx_r = 0;
  69173. __Pyx_RefNannyDeclarations
  69174. __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  69175. __pyx_r = __pyx_pf_6uvloop_4loop_6UVIdle_2__setstate_cython__(((struct __pyx_obj_6uvloop_4loop_UVIdle *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
  69176. /* function exit code */
  69177. __Pyx_RefNannyFinishContext();
  69178. return __pyx_r;
  69179. }
  69180. static PyObject *__pyx_pf_6uvloop_4loop_6UVIdle_2__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVIdle *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  69181. PyObject *__pyx_r = NULL;
  69182. __Pyx_RefNannyDeclarations
  69183. PyObject *__pyx_t_1 = NULL;
  69184. __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  69185. /* "(tree fragment)":4
  69186. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  69187. * def __setstate_cython__(self, __pyx_state):
  69188. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  69189. */
  69190. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__111, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 4, __pyx_L1_error)
  69191. __Pyx_GOTREF(__pyx_t_1);
  69192. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  69193. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  69194. __PYX_ERR(9, 4, __pyx_L1_error)
  69195. /* "(tree fragment)":3
  69196. * def __reduce_cython__(self):
  69197. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  69198. * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
  69199. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  69200. */
  69201. /* function exit code */
  69202. __pyx_L1_error:;
  69203. __Pyx_XDECREF(__pyx_t_1);
  69204. __Pyx_AddTraceback("uvloop.loop.UVIdle.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  69205. __pyx_r = NULL;
  69206. __Pyx_XGIVEREF(__pyx_r);
  69207. __Pyx_RefNannyFinishContext();
  69208. return __pyx_r;
  69209. }
  69210. /* "uvloop/handles/idle.pyx":60
  69211. *
  69212. *
  69213. * cdef void cb_idle_callback(uv.uv_idle_t* handle) with gil: # <<<<<<<<<<<<<<
  69214. * if __ensure_handle_data(<uv.uv_handle_t*>handle, "UVIdle callback") == 0:
  69215. * return
  69216. */
  69217. static void __pyx_f_6uvloop_4loop_cb_idle_callback(uv_idle_t *__pyx_v_handle) {
  69218. struct __pyx_obj_6uvloop_4loop_UVIdle *__pyx_v_idle = 0;
  69219. struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_h = 0;
  69220. PyObject *__pyx_v_ex = NULL;
  69221. __Pyx_RefNannyDeclarations
  69222. int __pyx_t_1;
  69223. PyObject *__pyx_t_2 = NULL;
  69224. PyObject *__pyx_t_3 = NULL;
  69225. PyObject *__pyx_t_4 = NULL;
  69226. PyObject *__pyx_t_5 = NULL;
  69227. int __pyx_t_6;
  69228. PyObject *__pyx_t_7 = NULL;
  69229. PyObject *__pyx_t_8 = NULL;
  69230. PyObject *__pyx_t_9 = NULL;
  69231. int __pyx_t_10;
  69232. char const *__pyx_t_11;
  69233. PyObject *__pyx_t_12 = NULL;
  69234. PyObject *__pyx_t_13 = NULL;
  69235. PyObject *__pyx_t_14 = NULL;
  69236. PyObject *__pyx_t_15 = NULL;
  69237. PyObject *__pyx_t_16 = NULL;
  69238. PyObject *__pyx_t_17 = NULL;
  69239. #ifdef WITH_THREAD
  69240. PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  69241. #endif
  69242. __Pyx_RefNannySetupContext("cb_idle_callback", 0);
  69243. /* "uvloop/handles/idle.pyx":61
  69244. *
  69245. * cdef void cb_idle_callback(uv.uv_idle_t* handle) with gil:
  69246. * if __ensure_handle_data(<uv.uv_handle_t*>handle, "UVIdle callback") == 0: # <<<<<<<<<<<<<<
  69247. * return
  69248. *
  69249. */
  69250. __pyx_t_1 = ((__pyx_f_6uvloop_4loop___ensure_handle_data(((uv_handle_t *)__pyx_v_handle), ((char const *)"UVIdle callback")) == 0) != 0);
  69251. if (__pyx_t_1) {
  69252. /* "uvloop/handles/idle.pyx":62
  69253. * cdef void cb_idle_callback(uv.uv_idle_t* handle) with gil:
  69254. * if __ensure_handle_data(<uv.uv_handle_t*>handle, "UVIdle callback") == 0:
  69255. * return # <<<<<<<<<<<<<<
  69256. *
  69257. * cdef:
  69258. */
  69259. goto __pyx_L0;
  69260. /* "uvloop/handles/idle.pyx":61
  69261. *
  69262. * cdef void cb_idle_callback(uv.uv_idle_t* handle) with gil:
  69263. * if __ensure_handle_data(<uv.uv_handle_t*>handle, "UVIdle callback") == 0: # <<<<<<<<<<<<<<
  69264. * return
  69265. *
  69266. */
  69267. }
  69268. /* "uvloop/handles/idle.pyx":65
  69269. *
  69270. * cdef:
  69271. * UVIdle idle = <UVIdle> handle.data # <<<<<<<<<<<<<<
  69272. * Handle h = idle.h
  69273. * try:
  69274. */
  69275. __pyx_t_2 = ((PyObject *)__pyx_v_handle->data);
  69276. __Pyx_INCREF(__pyx_t_2);
  69277. __pyx_v_idle = ((struct __pyx_obj_6uvloop_4loop_UVIdle *)__pyx_t_2);
  69278. __pyx_t_2 = 0;
  69279. /* "uvloop/handles/idle.pyx":66
  69280. * cdef:
  69281. * UVIdle idle = <UVIdle> handle.data
  69282. * Handle h = idle.h # <<<<<<<<<<<<<<
  69283. * try:
  69284. * h._run()
  69285. */
  69286. __pyx_t_2 = ((PyObject *)__pyx_v_idle->h);
  69287. __Pyx_INCREF(__pyx_t_2);
  69288. __pyx_v_h = ((struct __pyx_obj_6uvloop_4loop_Handle *)__pyx_t_2);
  69289. __pyx_t_2 = 0;
  69290. /* "uvloop/handles/idle.pyx":67
  69291. * UVIdle idle = <UVIdle> handle.data
  69292. * Handle h = idle.h
  69293. * try: # <<<<<<<<<<<<<<
  69294. * h._run()
  69295. * except BaseException as ex:
  69296. */
  69297. {
  69298. __Pyx_PyThreadState_declare
  69299. __Pyx_PyThreadState_assign
  69300. __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
  69301. __Pyx_XGOTREF(__pyx_t_3);
  69302. __Pyx_XGOTREF(__pyx_t_4);
  69303. __Pyx_XGOTREF(__pyx_t_5);
  69304. /*try:*/ {
  69305. /* "uvloop/handles/idle.pyx":68
  69306. * Handle h = idle.h
  69307. * try:
  69308. * h._run() # <<<<<<<<<<<<<<
  69309. * except BaseException as ex:
  69310. * idle._error(ex, False)
  69311. */
  69312. __pyx_t_2 = __pyx_f_6uvloop_4loop_6Handle__run(__pyx_v_h); if (unlikely(!__pyx_t_2)) __PYX_ERR(12, 68, __pyx_L4_error)
  69313. __Pyx_GOTREF(__pyx_t_2);
  69314. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  69315. /* "uvloop/handles/idle.pyx":67
  69316. * UVIdle idle = <UVIdle> handle.data
  69317. * Handle h = idle.h
  69318. * try: # <<<<<<<<<<<<<<
  69319. * h._run()
  69320. * except BaseException as ex:
  69321. */
  69322. }
  69323. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  69324. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  69325. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  69326. goto __pyx_L9_try_end;
  69327. __pyx_L4_error:;
  69328. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  69329. /* "uvloop/handles/idle.pyx":69
  69330. * try:
  69331. * h._run()
  69332. * except BaseException as ex: # <<<<<<<<<<<<<<
  69333. * idle._error(ex, False)
  69334. */
  69335. __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_BaseException);
  69336. if (__pyx_t_6) {
  69337. __Pyx_AddTraceback("uvloop.loop.cb_idle_callback", __pyx_clineno, __pyx_lineno, __pyx_filename);
  69338. if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_7, &__pyx_t_8) < 0) __PYX_ERR(12, 69, __pyx_L6_except_error)
  69339. __Pyx_GOTREF(__pyx_t_2);
  69340. __Pyx_GOTREF(__pyx_t_7);
  69341. __Pyx_GOTREF(__pyx_t_8);
  69342. __Pyx_INCREF(__pyx_t_7);
  69343. __pyx_v_ex = __pyx_t_7;
  69344. /*try:*/ {
  69345. /* "uvloop/handles/idle.pyx":70
  69346. * h._run()
  69347. * except BaseException as ex:
  69348. * idle._error(ex, False) # <<<<<<<<<<<<<<
  69349. */
  69350. __pyx_t_9 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVIdle *)__pyx_v_idle->__pyx_base.__pyx_vtab)->__pyx_base._error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_idle), __pyx_v_ex, Py_False); if (unlikely(!__pyx_t_9)) __PYX_ERR(12, 70, __pyx_L15_error)
  69351. __Pyx_GOTREF(__pyx_t_9);
  69352. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  69353. }
  69354. /* "uvloop/handles/idle.pyx":69
  69355. * try:
  69356. * h._run()
  69357. * except BaseException as ex: # <<<<<<<<<<<<<<
  69358. * idle._error(ex, False)
  69359. */
  69360. /*finally:*/ {
  69361. /*normal exit:*/{
  69362. __Pyx_DECREF(__pyx_v_ex);
  69363. __pyx_v_ex = NULL;
  69364. goto __pyx_L16;
  69365. }
  69366. __pyx_L15_error:;
  69367. /*exception exit:*/{
  69368. __Pyx_PyThreadState_declare
  69369. __Pyx_PyThreadState_assign
  69370. __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0;
  69371. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  69372. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17);
  69373. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14) < 0)) __Pyx_ErrFetch(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
  69374. __Pyx_XGOTREF(__pyx_t_12);
  69375. __Pyx_XGOTREF(__pyx_t_13);
  69376. __Pyx_XGOTREF(__pyx_t_14);
  69377. __Pyx_XGOTREF(__pyx_t_15);
  69378. __Pyx_XGOTREF(__pyx_t_16);
  69379. __Pyx_XGOTREF(__pyx_t_17);
  69380. __pyx_t_6 = __pyx_lineno; __pyx_t_10 = __pyx_clineno; __pyx_t_11 = __pyx_filename;
  69381. {
  69382. __Pyx_DECREF(__pyx_v_ex);
  69383. __pyx_v_ex = NULL;
  69384. }
  69385. if (PY_MAJOR_VERSION >= 3) {
  69386. __Pyx_XGIVEREF(__pyx_t_15);
  69387. __Pyx_XGIVEREF(__pyx_t_16);
  69388. __Pyx_XGIVEREF(__pyx_t_17);
  69389. __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17);
  69390. }
  69391. __Pyx_XGIVEREF(__pyx_t_12);
  69392. __Pyx_XGIVEREF(__pyx_t_13);
  69393. __Pyx_XGIVEREF(__pyx_t_14);
  69394. __Pyx_ErrRestore(__pyx_t_12, __pyx_t_13, __pyx_t_14);
  69395. __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0;
  69396. __pyx_lineno = __pyx_t_6; __pyx_clineno = __pyx_t_10; __pyx_filename = __pyx_t_11;
  69397. goto __pyx_L6_except_error;
  69398. }
  69399. __pyx_L16:;
  69400. }
  69401. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  69402. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  69403. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  69404. goto __pyx_L5_exception_handled;
  69405. }
  69406. goto __pyx_L6_except_error;
  69407. __pyx_L6_except_error:;
  69408. /* "uvloop/handles/idle.pyx":67
  69409. * UVIdle idle = <UVIdle> handle.data
  69410. * Handle h = idle.h
  69411. * try: # <<<<<<<<<<<<<<
  69412. * h._run()
  69413. * except BaseException as ex:
  69414. */
  69415. __Pyx_XGIVEREF(__pyx_t_3);
  69416. __Pyx_XGIVEREF(__pyx_t_4);
  69417. __Pyx_XGIVEREF(__pyx_t_5);
  69418. __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
  69419. goto __pyx_L1_error;
  69420. __pyx_L5_exception_handled:;
  69421. __Pyx_XGIVEREF(__pyx_t_3);
  69422. __Pyx_XGIVEREF(__pyx_t_4);
  69423. __Pyx_XGIVEREF(__pyx_t_5);
  69424. __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
  69425. __pyx_L9_try_end:;
  69426. }
  69427. /* "uvloop/handles/idle.pyx":60
  69428. *
  69429. *
  69430. * cdef void cb_idle_callback(uv.uv_idle_t* handle) with gil: # <<<<<<<<<<<<<<
  69431. * if __ensure_handle_data(<uv.uv_handle_t*>handle, "UVIdle callback") == 0:
  69432. * return
  69433. */
  69434. /* function exit code */
  69435. goto __pyx_L0;
  69436. __pyx_L1_error:;
  69437. __Pyx_XDECREF(__pyx_t_2);
  69438. __Pyx_XDECREF(__pyx_t_7);
  69439. __Pyx_XDECREF(__pyx_t_8);
  69440. __Pyx_XDECREF(__pyx_t_9);
  69441. __Pyx_WriteUnraisable("uvloop.loop.cb_idle_callback", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  69442. __pyx_L0:;
  69443. __Pyx_XDECREF((PyObject *)__pyx_v_idle);
  69444. __Pyx_XDECREF((PyObject *)__pyx_v_h);
  69445. __Pyx_XDECREF(__pyx_v_ex);
  69446. __Pyx_RefNannyFinishContext();
  69447. #ifdef WITH_THREAD
  69448. __Pyx_PyGILState_Release(__pyx_gilstate_save);
  69449. #endif
  69450. }
  69451. /* "uvloop/handles/check.pyx":3
  69452. * @cython.no_gc_clear
  69453. * cdef class UVCheck(UVHandle):
  69454. * cdef _init(self, Loop loop, Handle h): # <<<<<<<<<<<<<<
  69455. * cdef int err
  69456. *
  69457. */
  69458. static PyObject *__pyx_f_6uvloop_4loop_7UVCheck__init(struct __pyx_obj_6uvloop_4loop_UVCheck *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_h) {
  69459. int __pyx_v_err;
  69460. PyObject *__pyx_r = NULL;
  69461. __Pyx_RefNannyDeclarations
  69462. PyObject *__pyx_t_1 = NULL;
  69463. int __pyx_t_2;
  69464. __Pyx_RefNannySetupContext("_init", 0);
  69465. /* "uvloop/handles/check.pyx":6
  69466. * cdef int err
  69467. *
  69468. * self._start_init(loop) # <<<<<<<<<<<<<<
  69469. *
  69470. * self._handle = <uv.uv_handle_t*>PyMem_RawMalloc(sizeof(uv.uv_check_t))
  69471. */
  69472. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVCheck *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._start_init(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self), __pyx_v_loop); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 6, __pyx_L1_error)
  69473. __Pyx_GOTREF(__pyx_t_1);
  69474. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  69475. /* "uvloop/handles/check.pyx":8
  69476. * self._start_init(loop)
  69477. *
  69478. * self._handle = <uv.uv_handle_t*>PyMem_RawMalloc(sizeof(uv.uv_check_t)) # <<<<<<<<<<<<<<
  69479. * if self._handle is NULL:
  69480. * self._abort_init()
  69481. */
  69482. __pyx_v_self->__pyx_base._handle = ((uv_handle_t *)PyMem_RawMalloc((sizeof(uv_check_t))));
  69483. /* "uvloop/handles/check.pyx":9
  69484. *
  69485. * self._handle = <uv.uv_handle_t*>PyMem_RawMalloc(sizeof(uv.uv_check_t))
  69486. * if self._handle is NULL: # <<<<<<<<<<<<<<
  69487. * self._abort_init()
  69488. * raise MemoryError()
  69489. */
  69490. __pyx_t_2 = ((__pyx_v_self->__pyx_base._handle == NULL) != 0);
  69491. if (unlikely(__pyx_t_2)) {
  69492. /* "uvloop/handles/check.pyx":10
  69493. * self._handle = <uv.uv_handle_t*>PyMem_RawMalloc(sizeof(uv.uv_check_t))
  69494. * if self._handle is NULL:
  69495. * self._abort_init() # <<<<<<<<<<<<<<
  69496. * raise MemoryError()
  69497. *
  69498. */
  69499. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVCheck *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._abort_init(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 10, __pyx_L1_error)
  69500. __Pyx_GOTREF(__pyx_t_1);
  69501. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  69502. /* "uvloop/handles/check.pyx":11
  69503. * if self._handle is NULL:
  69504. * self._abort_init()
  69505. * raise MemoryError() # <<<<<<<<<<<<<<
  69506. *
  69507. * err = uv.uv_check_init(self._loop.uvloop, <uv.uv_check_t*>self._handle)
  69508. */
  69509. PyErr_NoMemory(); __PYX_ERR(13, 11, __pyx_L1_error)
  69510. /* "uvloop/handles/check.pyx":9
  69511. *
  69512. * self._handle = <uv.uv_handle_t*>PyMem_RawMalloc(sizeof(uv.uv_check_t))
  69513. * if self._handle is NULL: # <<<<<<<<<<<<<<
  69514. * self._abort_init()
  69515. * raise MemoryError()
  69516. */
  69517. }
  69518. /* "uvloop/handles/check.pyx":13
  69519. * raise MemoryError()
  69520. *
  69521. * err = uv.uv_check_init(self._loop.uvloop, <uv.uv_check_t*>self._handle) # <<<<<<<<<<<<<<
  69522. * if err < 0:
  69523. * self._abort_init()
  69524. */
  69525. __pyx_v_err = uv_check_init(__pyx_v_self->__pyx_base._loop->uvloop, ((uv_check_t *)__pyx_v_self->__pyx_base._handle));
  69526. /* "uvloop/handles/check.pyx":14
  69527. *
  69528. * err = uv.uv_check_init(self._loop.uvloop, <uv.uv_check_t*>self._handle)
  69529. * if err < 0: # <<<<<<<<<<<<<<
  69530. * self._abort_init()
  69531. * raise convert_error(err)
  69532. */
  69533. __pyx_t_2 = ((__pyx_v_err < 0) != 0);
  69534. if (unlikely(__pyx_t_2)) {
  69535. /* "uvloop/handles/check.pyx":15
  69536. * err = uv.uv_check_init(self._loop.uvloop, <uv.uv_check_t*>self._handle)
  69537. * if err < 0:
  69538. * self._abort_init() # <<<<<<<<<<<<<<
  69539. * raise convert_error(err)
  69540. *
  69541. */
  69542. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVCheck *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._abort_init(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 15, __pyx_L1_error)
  69543. __Pyx_GOTREF(__pyx_t_1);
  69544. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  69545. /* "uvloop/handles/check.pyx":16
  69546. * if err < 0:
  69547. * self._abort_init()
  69548. * raise convert_error(err) # <<<<<<<<<<<<<<
  69549. *
  69550. * self._finish_init()
  69551. */
  69552. __pyx_t_1 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 16, __pyx_L1_error)
  69553. __Pyx_GOTREF(__pyx_t_1);
  69554. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  69555. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  69556. __PYX_ERR(13, 16, __pyx_L1_error)
  69557. /* "uvloop/handles/check.pyx":14
  69558. *
  69559. * err = uv.uv_check_init(self._loop.uvloop, <uv.uv_check_t*>self._handle)
  69560. * if err < 0: # <<<<<<<<<<<<<<
  69561. * self._abort_init()
  69562. * raise convert_error(err)
  69563. */
  69564. }
  69565. /* "uvloop/handles/check.pyx":18
  69566. * raise convert_error(err)
  69567. *
  69568. * self._finish_init() # <<<<<<<<<<<<<<
  69569. *
  69570. * self.h = h
  69571. */
  69572. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVCheck *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._finish_init(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 18, __pyx_L1_error)
  69573. __Pyx_GOTREF(__pyx_t_1);
  69574. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  69575. /* "uvloop/handles/check.pyx":20
  69576. * self._finish_init()
  69577. *
  69578. * self.h = h # <<<<<<<<<<<<<<
  69579. * self.running = 0
  69580. *
  69581. */
  69582. __Pyx_INCREF(((PyObject *)__pyx_v_h));
  69583. __Pyx_GIVEREF(((PyObject *)__pyx_v_h));
  69584. __Pyx_GOTREF(__pyx_v_self->h);
  69585. __Pyx_DECREF(((PyObject *)__pyx_v_self->h));
  69586. __pyx_v_self->h = __pyx_v_h;
  69587. /* "uvloop/handles/check.pyx":21
  69588. *
  69589. * self.h = h
  69590. * self.running = 0 # <<<<<<<<<<<<<<
  69591. *
  69592. * cdef inline stop(self):
  69593. */
  69594. __pyx_v_self->running = 0;
  69595. /* "uvloop/handles/check.pyx":3
  69596. * @cython.no_gc_clear
  69597. * cdef class UVCheck(UVHandle):
  69598. * cdef _init(self, Loop loop, Handle h): # <<<<<<<<<<<<<<
  69599. * cdef int err
  69600. *
  69601. */
  69602. /* function exit code */
  69603. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  69604. goto __pyx_L0;
  69605. __pyx_L1_error:;
  69606. __Pyx_XDECREF(__pyx_t_1);
  69607. __Pyx_AddTraceback("uvloop.loop.UVCheck._init", __pyx_clineno, __pyx_lineno, __pyx_filename);
  69608. __pyx_r = 0;
  69609. __pyx_L0:;
  69610. __Pyx_XGIVEREF(__pyx_r);
  69611. __Pyx_RefNannyFinishContext();
  69612. return __pyx_r;
  69613. }
  69614. /* "uvloop/handles/check.pyx":23
  69615. * self.running = 0
  69616. *
  69617. * cdef inline stop(self): # <<<<<<<<<<<<<<
  69618. * cdef int err
  69619. *
  69620. */
  69621. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_7UVCheck_stop(struct __pyx_obj_6uvloop_4loop_UVCheck *__pyx_v_self) {
  69622. int __pyx_v_err;
  69623. PyObject *__pyx_v_exc = NULL;
  69624. PyObject *__pyx_r = NULL;
  69625. __Pyx_RefNannyDeclarations
  69626. int __pyx_t_1;
  69627. PyObject *__pyx_t_2 = NULL;
  69628. __Pyx_RefNannySetupContext("stop", 0);
  69629. /* "uvloop/handles/check.pyx":26
  69630. * cdef int err
  69631. *
  69632. * if not self._is_alive(): # <<<<<<<<<<<<<<
  69633. * self.running = 0
  69634. * return
  69635. */
  69636. __pyx_t_1 = ((!(((struct __pyx_vtabstruct_6uvloop_4loop_UVCheck *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._is_alive(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)) != 0)) != 0);
  69637. if (__pyx_t_1) {
  69638. /* "uvloop/handles/check.pyx":27
  69639. *
  69640. * if not self._is_alive():
  69641. * self.running = 0 # <<<<<<<<<<<<<<
  69642. * return
  69643. *
  69644. */
  69645. __pyx_v_self->running = 0;
  69646. /* "uvloop/handles/check.pyx":28
  69647. * if not self._is_alive():
  69648. * self.running = 0
  69649. * return # <<<<<<<<<<<<<<
  69650. *
  69651. * if self.running == 1:
  69652. */
  69653. __Pyx_XDECREF(__pyx_r);
  69654. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  69655. goto __pyx_L0;
  69656. /* "uvloop/handles/check.pyx":26
  69657. * cdef int err
  69658. *
  69659. * if not self._is_alive(): # <<<<<<<<<<<<<<
  69660. * self.running = 0
  69661. * return
  69662. */
  69663. }
  69664. /* "uvloop/handles/check.pyx":30
  69665. * return
  69666. *
  69667. * if self.running == 1: # <<<<<<<<<<<<<<
  69668. * err = uv.uv_check_stop(<uv.uv_check_t*>self._handle)
  69669. * self.running = 0
  69670. */
  69671. __pyx_t_1 = ((__pyx_v_self->running == 1) != 0);
  69672. if (__pyx_t_1) {
  69673. /* "uvloop/handles/check.pyx":31
  69674. *
  69675. * if self.running == 1:
  69676. * err = uv.uv_check_stop(<uv.uv_check_t*>self._handle) # <<<<<<<<<<<<<<
  69677. * self.running = 0
  69678. * if err < 0:
  69679. */
  69680. __pyx_v_err = uv_check_stop(((uv_check_t *)__pyx_v_self->__pyx_base._handle));
  69681. /* "uvloop/handles/check.pyx":32
  69682. * if self.running == 1:
  69683. * err = uv.uv_check_stop(<uv.uv_check_t*>self._handle)
  69684. * self.running = 0 # <<<<<<<<<<<<<<
  69685. * if err < 0:
  69686. * exc = convert_error(err)
  69687. */
  69688. __pyx_v_self->running = 0;
  69689. /* "uvloop/handles/check.pyx":33
  69690. * err = uv.uv_check_stop(<uv.uv_check_t*>self._handle)
  69691. * self.running = 0
  69692. * if err < 0: # <<<<<<<<<<<<<<
  69693. * exc = convert_error(err)
  69694. * self._fatal_error(exc, True)
  69695. */
  69696. __pyx_t_1 = ((__pyx_v_err < 0) != 0);
  69697. if (__pyx_t_1) {
  69698. /* "uvloop/handles/check.pyx":34
  69699. * self.running = 0
  69700. * if err < 0:
  69701. * exc = convert_error(err) # <<<<<<<<<<<<<<
  69702. * self._fatal_error(exc, True)
  69703. * return
  69704. */
  69705. __pyx_t_2 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 34, __pyx_L1_error)
  69706. __Pyx_GOTREF(__pyx_t_2);
  69707. __pyx_v_exc = __pyx_t_2;
  69708. __pyx_t_2 = 0;
  69709. /* "uvloop/handles/check.pyx":35
  69710. * if err < 0:
  69711. * exc = convert_error(err)
  69712. * self._fatal_error(exc, True) # <<<<<<<<<<<<<<
  69713. * return
  69714. *
  69715. */
  69716. __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVCheck *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._fatal_error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self), __pyx_v_exc, Py_True, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 35, __pyx_L1_error)
  69717. __Pyx_GOTREF(__pyx_t_2);
  69718. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  69719. /* "uvloop/handles/check.pyx":36
  69720. * exc = convert_error(err)
  69721. * self._fatal_error(exc, True)
  69722. * return # <<<<<<<<<<<<<<
  69723. *
  69724. * cdef inline start(self):
  69725. */
  69726. __Pyx_XDECREF(__pyx_r);
  69727. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  69728. goto __pyx_L0;
  69729. /* "uvloop/handles/check.pyx":33
  69730. * err = uv.uv_check_stop(<uv.uv_check_t*>self._handle)
  69731. * self.running = 0
  69732. * if err < 0: # <<<<<<<<<<<<<<
  69733. * exc = convert_error(err)
  69734. * self._fatal_error(exc, True)
  69735. */
  69736. }
  69737. /* "uvloop/handles/check.pyx":30
  69738. * return
  69739. *
  69740. * if self.running == 1: # <<<<<<<<<<<<<<
  69741. * err = uv.uv_check_stop(<uv.uv_check_t*>self._handle)
  69742. * self.running = 0
  69743. */
  69744. }
  69745. /* "uvloop/handles/check.pyx":23
  69746. * self.running = 0
  69747. *
  69748. * cdef inline stop(self): # <<<<<<<<<<<<<<
  69749. * cdef int err
  69750. *
  69751. */
  69752. /* function exit code */
  69753. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  69754. goto __pyx_L0;
  69755. __pyx_L1_error:;
  69756. __Pyx_XDECREF(__pyx_t_2);
  69757. __Pyx_AddTraceback("uvloop.loop.UVCheck.stop", __pyx_clineno, __pyx_lineno, __pyx_filename);
  69758. __pyx_r = 0;
  69759. __pyx_L0:;
  69760. __Pyx_XDECREF(__pyx_v_exc);
  69761. __Pyx_XGIVEREF(__pyx_r);
  69762. __Pyx_RefNannyFinishContext();
  69763. return __pyx_r;
  69764. }
  69765. /* "uvloop/handles/check.pyx":38
  69766. * return
  69767. *
  69768. * cdef inline start(self): # <<<<<<<<<<<<<<
  69769. * cdef int err
  69770. *
  69771. */
  69772. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_7UVCheck_start(struct __pyx_obj_6uvloop_4loop_UVCheck *__pyx_v_self) {
  69773. int __pyx_v_err;
  69774. PyObject *__pyx_v_exc = NULL;
  69775. PyObject *__pyx_r = NULL;
  69776. __Pyx_RefNannyDeclarations
  69777. PyObject *__pyx_t_1 = NULL;
  69778. int __pyx_t_2;
  69779. __Pyx_RefNannySetupContext("start", 0);
  69780. /* "uvloop/handles/check.pyx":41
  69781. * cdef int err
  69782. *
  69783. * self._ensure_alive() # <<<<<<<<<<<<<<
  69784. *
  69785. * if self.running == 0:
  69786. */
  69787. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVCheck *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._ensure_alive(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 41, __pyx_L1_error)
  69788. __Pyx_GOTREF(__pyx_t_1);
  69789. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  69790. /* "uvloop/handles/check.pyx":43
  69791. * self._ensure_alive()
  69792. *
  69793. * if self.running == 0: # <<<<<<<<<<<<<<
  69794. * err = uv.uv_check_start(<uv.uv_check_t*>self._handle,
  69795. * cb_check_callback)
  69796. */
  69797. __pyx_t_2 = ((__pyx_v_self->running == 0) != 0);
  69798. if (__pyx_t_2) {
  69799. /* "uvloop/handles/check.pyx":44
  69800. *
  69801. * if self.running == 0:
  69802. * err = uv.uv_check_start(<uv.uv_check_t*>self._handle, # <<<<<<<<<<<<<<
  69803. * cb_check_callback)
  69804. * if err < 0:
  69805. */
  69806. __pyx_v_err = uv_check_start(((uv_check_t *)__pyx_v_self->__pyx_base._handle), __pyx_f_6uvloop_4loop_cb_check_callback);
  69807. /* "uvloop/handles/check.pyx":46
  69808. * err = uv.uv_check_start(<uv.uv_check_t*>self._handle,
  69809. * cb_check_callback)
  69810. * if err < 0: # <<<<<<<<<<<<<<
  69811. * exc = convert_error(err)
  69812. * self._fatal_error(exc, True)
  69813. */
  69814. __pyx_t_2 = ((__pyx_v_err < 0) != 0);
  69815. if (__pyx_t_2) {
  69816. /* "uvloop/handles/check.pyx":47
  69817. * cb_check_callback)
  69818. * if err < 0:
  69819. * exc = convert_error(err) # <<<<<<<<<<<<<<
  69820. * self._fatal_error(exc, True)
  69821. * return
  69822. */
  69823. __pyx_t_1 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 47, __pyx_L1_error)
  69824. __Pyx_GOTREF(__pyx_t_1);
  69825. __pyx_v_exc = __pyx_t_1;
  69826. __pyx_t_1 = 0;
  69827. /* "uvloop/handles/check.pyx":48
  69828. * if err < 0:
  69829. * exc = convert_error(err)
  69830. * self._fatal_error(exc, True) # <<<<<<<<<<<<<<
  69831. * return
  69832. * self.running = 1
  69833. */
  69834. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVCheck *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._fatal_error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self), __pyx_v_exc, Py_True, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 48, __pyx_L1_error)
  69835. __Pyx_GOTREF(__pyx_t_1);
  69836. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  69837. /* "uvloop/handles/check.pyx":49
  69838. * exc = convert_error(err)
  69839. * self._fatal_error(exc, True)
  69840. * return # <<<<<<<<<<<<<<
  69841. * self.running = 1
  69842. *
  69843. */
  69844. __Pyx_XDECREF(__pyx_r);
  69845. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  69846. goto __pyx_L0;
  69847. /* "uvloop/handles/check.pyx":46
  69848. * err = uv.uv_check_start(<uv.uv_check_t*>self._handle,
  69849. * cb_check_callback)
  69850. * if err < 0: # <<<<<<<<<<<<<<
  69851. * exc = convert_error(err)
  69852. * self._fatal_error(exc, True)
  69853. */
  69854. }
  69855. /* "uvloop/handles/check.pyx":50
  69856. * self._fatal_error(exc, True)
  69857. * return
  69858. * self.running = 1 # <<<<<<<<<<<<<<
  69859. *
  69860. * @staticmethod
  69861. */
  69862. __pyx_v_self->running = 1;
  69863. /* "uvloop/handles/check.pyx":43
  69864. * self._ensure_alive()
  69865. *
  69866. * if self.running == 0: # <<<<<<<<<<<<<<
  69867. * err = uv.uv_check_start(<uv.uv_check_t*>self._handle,
  69868. * cb_check_callback)
  69869. */
  69870. }
  69871. /* "uvloop/handles/check.pyx":38
  69872. * return
  69873. *
  69874. * cdef inline start(self): # <<<<<<<<<<<<<<
  69875. * cdef int err
  69876. *
  69877. */
  69878. /* function exit code */
  69879. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  69880. goto __pyx_L0;
  69881. __pyx_L1_error:;
  69882. __Pyx_XDECREF(__pyx_t_1);
  69883. __Pyx_AddTraceback("uvloop.loop.UVCheck.start", __pyx_clineno, __pyx_lineno, __pyx_filename);
  69884. __pyx_r = 0;
  69885. __pyx_L0:;
  69886. __Pyx_XDECREF(__pyx_v_exc);
  69887. __Pyx_XGIVEREF(__pyx_r);
  69888. __Pyx_RefNannyFinishContext();
  69889. return __pyx_r;
  69890. }
  69891. /* "uvloop/handles/check.pyx":53
  69892. *
  69893. * @staticmethod
  69894. * cdef UVCheck new(Loop loop, Handle h): # <<<<<<<<<<<<<<
  69895. * cdef UVCheck handle
  69896. * handle = UVCheck.__new__(UVCheck)
  69897. */
  69898. static struct __pyx_obj_6uvloop_4loop_UVCheck *__pyx_f_6uvloop_4loop_7UVCheck_new(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_h) {
  69899. struct __pyx_obj_6uvloop_4loop_UVCheck *__pyx_v_handle = 0;
  69900. struct __pyx_obj_6uvloop_4loop_UVCheck *__pyx_r = NULL;
  69901. __Pyx_RefNannyDeclarations
  69902. PyObject *__pyx_t_1 = NULL;
  69903. __Pyx_RefNannySetupContext("new", 0);
  69904. /* "uvloop/handles/check.pyx":55
  69905. * cdef UVCheck new(Loop loop, Handle h):
  69906. * cdef UVCheck handle
  69907. * handle = UVCheck.__new__(UVCheck) # <<<<<<<<<<<<<<
  69908. * handle._init(loop, h)
  69909. * return handle
  69910. */
  69911. __pyx_t_1 = ((PyObject *)__pyx_tp_new_6uvloop_4loop_UVCheck(((PyTypeObject *)__pyx_ptype_6uvloop_4loop_UVCheck), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 55, __pyx_L1_error)
  69912. __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  69913. __pyx_v_handle = ((struct __pyx_obj_6uvloop_4loop_UVCheck *)__pyx_t_1);
  69914. __pyx_t_1 = 0;
  69915. /* "uvloop/handles/check.pyx":56
  69916. * cdef UVCheck handle
  69917. * handle = UVCheck.__new__(UVCheck)
  69918. * handle._init(loop, h) # <<<<<<<<<<<<<<
  69919. * return handle
  69920. *
  69921. */
  69922. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVCheck *)__pyx_v_handle->__pyx_base.__pyx_vtab)->_init(__pyx_v_handle, __pyx_v_loop, __pyx_v_h); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 56, __pyx_L1_error)
  69923. __Pyx_GOTREF(__pyx_t_1);
  69924. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  69925. /* "uvloop/handles/check.pyx":57
  69926. * handle = UVCheck.__new__(UVCheck)
  69927. * handle._init(loop, h)
  69928. * return handle # <<<<<<<<<<<<<<
  69929. *
  69930. *
  69931. */
  69932. __Pyx_XDECREF(((PyObject *)__pyx_r));
  69933. __Pyx_INCREF(((PyObject *)__pyx_v_handle));
  69934. __pyx_r = __pyx_v_handle;
  69935. goto __pyx_L0;
  69936. /* "uvloop/handles/check.pyx":53
  69937. *
  69938. * @staticmethod
  69939. * cdef UVCheck new(Loop loop, Handle h): # <<<<<<<<<<<<<<
  69940. * cdef UVCheck handle
  69941. * handle = UVCheck.__new__(UVCheck)
  69942. */
  69943. /* function exit code */
  69944. __pyx_L1_error:;
  69945. __Pyx_XDECREF(__pyx_t_1);
  69946. __Pyx_AddTraceback("uvloop.loop.UVCheck.new", __pyx_clineno, __pyx_lineno, __pyx_filename);
  69947. __pyx_r = 0;
  69948. __pyx_L0:;
  69949. __Pyx_XDECREF((PyObject *)__pyx_v_handle);
  69950. __Pyx_XGIVEREF((PyObject *)__pyx_r);
  69951. __Pyx_RefNannyFinishContext();
  69952. return __pyx_r;
  69953. }
  69954. /* "(tree fragment)":1
  69955. * def __reduce_cython__(self): # <<<<<<<<<<<<<<
  69956. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  69957. * def __setstate_cython__(self, __pyx_state):
  69958. */
  69959. /* Python wrapper */
  69960. static PyObject *__pyx_pw_6uvloop_4loop_7UVCheck_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  69961. static char __pyx_doc_6uvloop_4loop_7UVCheck___reduce_cython__[] = "UVCheck.__reduce_cython__(self)";
  69962. static PyObject *__pyx_pw_6uvloop_4loop_7UVCheck_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  69963. PyObject *__pyx_r = 0;
  69964. __Pyx_RefNannyDeclarations
  69965. __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  69966. __pyx_r = __pyx_pf_6uvloop_4loop_7UVCheck___reduce_cython__(((struct __pyx_obj_6uvloop_4loop_UVCheck *)__pyx_v_self));
  69967. /* function exit code */
  69968. __Pyx_RefNannyFinishContext();
  69969. return __pyx_r;
  69970. }
  69971. static PyObject *__pyx_pf_6uvloop_4loop_7UVCheck___reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVCheck *__pyx_v_self) {
  69972. PyObject *__pyx_r = NULL;
  69973. __Pyx_RefNannyDeclarations
  69974. PyObject *__pyx_t_1 = NULL;
  69975. __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  69976. /* "(tree fragment)":2
  69977. * def __reduce_cython__(self):
  69978. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  69979. * def __setstate_cython__(self, __pyx_state):
  69980. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  69981. */
  69982. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__112, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 2, __pyx_L1_error)
  69983. __Pyx_GOTREF(__pyx_t_1);
  69984. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  69985. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  69986. __PYX_ERR(9, 2, __pyx_L1_error)
  69987. /* "(tree fragment)":1
  69988. * def __reduce_cython__(self): # <<<<<<<<<<<<<<
  69989. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  69990. * def __setstate_cython__(self, __pyx_state):
  69991. */
  69992. /* function exit code */
  69993. __pyx_L1_error:;
  69994. __Pyx_XDECREF(__pyx_t_1);
  69995. __Pyx_AddTraceback("uvloop.loop.UVCheck.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  69996. __pyx_r = NULL;
  69997. __Pyx_XGIVEREF(__pyx_r);
  69998. __Pyx_RefNannyFinishContext();
  69999. return __pyx_r;
  70000. }
  70001. /* "(tree fragment)":3
  70002. * def __reduce_cython__(self):
  70003. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  70004. * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
  70005. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  70006. */
  70007. /* Python wrapper */
  70008. static PyObject *__pyx_pw_6uvloop_4loop_7UVCheck_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
  70009. static char __pyx_doc_6uvloop_4loop_7UVCheck_2__setstate_cython__[] = "UVCheck.__setstate_cython__(self, __pyx_state)";
  70010. static PyObject *__pyx_pw_6uvloop_4loop_7UVCheck_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  70011. PyObject *__pyx_r = 0;
  70012. __Pyx_RefNannyDeclarations
  70013. __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  70014. __pyx_r = __pyx_pf_6uvloop_4loop_7UVCheck_2__setstate_cython__(((struct __pyx_obj_6uvloop_4loop_UVCheck *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
  70015. /* function exit code */
  70016. __Pyx_RefNannyFinishContext();
  70017. return __pyx_r;
  70018. }
  70019. static PyObject *__pyx_pf_6uvloop_4loop_7UVCheck_2__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVCheck *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  70020. PyObject *__pyx_r = NULL;
  70021. __Pyx_RefNannyDeclarations
  70022. PyObject *__pyx_t_1 = NULL;
  70023. __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  70024. /* "(tree fragment)":4
  70025. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  70026. * def __setstate_cython__(self, __pyx_state):
  70027. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  70028. */
  70029. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__113, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 4, __pyx_L1_error)
  70030. __Pyx_GOTREF(__pyx_t_1);
  70031. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  70032. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  70033. __PYX_ERR(9, 4, __pyx_L1_error)
  70034. /* "(tree fragment)":3
  70035. * def __reduce_cython__(self):
  70036. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  70037. * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
  70038. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  70039. */
  70040. /* function exit code */
  70041. __pyx_L1_error:;
  70042. __Pyx_XDECREF(__pyx_t_1);
  70043. __Pyx_AddTraceback("uvloop.loop.UVCheck.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  70044. __pyx_r = NULL;
  70045. __Pyx_XGIVEREF(__pyx_r);
  70046. __Pyx_RefNannyFinishContext();
  70047. return __pyx_r;
  70048. }
  70049. /* "uvloop/handles/check.pyx":60
  70050. *
  70051. *
  70052. * cdef void cb_check_callback(uv.uv_check_t* handle) with gil: # <<<<<<<<<<<<<<
  70053. * if __ensure_handle_data(<uv.uv_handle_t*>handle, "UVCheck callback") == 0:
  70054. * return
  70055. */
  70056. static void __pyx_f_6uvloop_4loop_cb_check_callback(uv_check_t *__pyx_v_handle) {
  70057. struct __pyx_obj_6uvloop_4loop_UVCheck *__pyx_v_check = 0;
  70058. struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_h = 0;
  70059. PyObject *__pyx_v_ex = NULL;
  70060. __Pyx_RefNannyDeclarations
  70061. int __pyx_t_1;
  70062. PyObject *__pyx_t_2 = NULL;
  70063. PyObject *__pyx_t_3 = NULL;
  70064. PyObject *__pyx_t_4 = NULL;
  70065. PyObject *__pyx_t_5 = NULL;
  70066. int __pyx_t_6;
  70067. PyObject *__pyx_t_7 = NULL;
  70068. PyObject *__pyx_t_8 = NULL;
  70069. PyObject *__pyx_t_9 = NULL;
  70070. int __pyx_t_10;
  70071. char const *__pyx_t_11;
  70072. PyObject *__pyx_t_12 = NULL;
  70073. PyObject *__pyx_t_13 = NULL;
  70074. PyObject *__pyx_t_14 = NULL;
  70075. PyObject *__pyx_t_15 = NULL;
  70076. PyObject *__pyx_t_16 = NULL;
  70077. PyObject *__pyx_t_17 = NULL;
  70078. #ifdef WITH_THREAD
  70079. PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  70080. #endif
  70081. __Pyx_RefNannySetupContext("cb_check_callback", 0);
  70082. /* "uvloop/handles/check.pyx":61
  70083. *
  70084. * cdef void cb_check_callback(uv.uv_check_t* handle) with gil:
  70085. * if __ensure_handle_data(<uv.uv_handle_t*>handle, "UVCheck callback") == 0: # <<<<<<<<<<<<<<
  70086. * return
  70087. *
  70088. */
  70089. __pyx_t_1 = ((__pyx_f_6uvloop_4loop___ensure_handle_data(((uv_handle_t *)__pyx_v_handle), ((char const *)"UVCheck callback")) == 0) != 0);
  70090. if (__pyx_t_1) {
  70091. /* "uvloop/handles/check.pyx":62
  70092. * cdef void cb_check_callback(uv.uv_check_t* handle) with gil:
  70093. * if __ensure_handle_data(<uv.uv_handle_t*>handle, "UVCheck callback") == 0:
  70094. * return # <<<<<<<<<<<<<<
  70095. *
  70096. * cdef:
  70097. */
  70098. goto __pyx_L0;
  70099. /* "uvloop/handles/check.pyx":61
  70100. *
  70101. * cdef void cb_check_callback(uv.uv_check_t* handle) with gil:
  70102. * if __ensure_handle_data(<uv.uv_handle_t*>handle, "UVCheck callback") == 0: # <<<<<<<<<<<<<<
  70103. * return
  70104. *
  70105. */
  70106. }
  70107. /* "uvloop/handles/check.pyx":65
  70108. *
  70109. * cdef:
  70110. * UVCheck check = <UVCheck> handle.data # <<<<<<<<<<<<<<
  70111. * Handle h = check.h
  70112. * try:
  70113. */
  70114. __pyx_t_2 = ((PyObject *)__pyx_v_handle->data);
  70115. __Pyx_INCREF(__pyx_t_2);
  70116. __pyx_v_check = ((struct __pyx_obj_6uvloop_4loop_UVCheck *)__pyx_t_2);
  70117. __pyx_t_2 = 0;
  70118. /* "uvloop/handles/check.pyx":66
  70119. * cdef:
  70120. * UVCheck check = <UVCheck> handle.data
  70121. * Handle h = check.h # <<<<<<<<<<<<<<
  70122. * try:
  70123. * h._run()
  70124. */
  70125. __pyx_t_2 = ((PyObject *)__pyx_v_check->h);
  70126. __Pyx_INCREF(__pyx_t_2);
  70127. __pyx_v_h = ((struct __pyx_obj_6uvloop_4loop_Handle *)__pyx_t_2);
  70128. __pyx_t_2 = 0;
  70129. /* "uvloop/handles/check.pyx":67
  70130. * UVCheck check = <UVCheck> handle.data
  70131. * Handle h = check.h
  70132. * try: # <<<<<<<<<<<<<<
  70133. * h._run()
  70134. * except BaseException as ex:
  70135. */
  70136. {
  70137. __Pyx_PyThreadState_declare
  70138. __Pyx_PyThreadState_assign
  70139. __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
  70140. __Pyx_XGOTREF(__pyx_t_3);
  70141. __Pyx_XGOTREF(__pyx_t_4);
  70142. __Pyx_XGOTREF(__pyx_t_5);
  70143. /*try:*/ {
  70144. /* "uvloop/handles/check.pyx":68
  70145. * Handle h = check.h
  70146. * try:
  70147. * h._run() # <<<<<<<<<<<<<<
  70148. * except BaseException as ex:
  70149. * check._error(ex, False)
  70150. */
  70151. __pyx_t_2 = __pyx_f_6uvloop_4loop_6Handle__run(__pyx_v_h); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 68, __pyx_L4_error)
  70152. __Pyx_GOTREF(__pyx_t_2);
  70153. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  70154. /* "uvloop/handles/check.pyx":67
  70155. * UVCheck check = <UVCheck> handle.data
  70156. * Handle h = check.h
  70157. * try: # <<<<<<<<<<<<<<
  70158. * h._run()
  70159. * except BaseException as ex:
  70160. */
  70161. }
  70162. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  70163. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  70164. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  70165. goto __pyx_L9_try_end;
  70166. __pyx_L4_error:;
  70167. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  70168. /* "uvloop/handles/check.pyx":69
  70169. * try:
  70170. * h._run()
  70171. * except BaseException as ex: # <<<<<<<<<<<<<<
  70172. * check._error(ex, False)
  70173. */
  70174. __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_BaseException);
  70175. if (__pyx_t_6) {
  70176. __Pyx_AddTraceback("uvloop.loop.cb_check_callback", __pyx_clineno, __pyx_lineno, __pyx_filename);
  70177. if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_7, &__pyx_t_8) < 0) __PYX_ERR(13, 69, __pyx_L6_except_error)
  70178. __Pyx_GOTREF(__pyx_t_2);
  70179. __Pyx_GOTREF(__pyx_t_7);
  70180. __Pyx_GOTREF(__pyx_t_8);
  70181. __Pyx_INCREF(__pyx_t_7);
  70182. __pyx_v_ex = __pyx_t_7;
  70183. /*try:*/ {
  70184. /* "uvloop/handles/check.pyx":70
  70185. * h._run()
  70186. * except BaseException as ex:
  70187. * check._error(ex, False) # <<<<<<<<<<<<<<
  70188. */
  70189. __pyx_t_9 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVCheck *)__pyx_v_check->__pyx_base.__pyx_vtab)->__pyx_base._error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_check), __pyx_v_ex, Py_False); if (unlikely(!__pyx_t_9)) __PYX_ERR(13, 70, __pyx_L15_error)
  70190. __Pyx_GOTREF(__pyx_t_9);
  70191. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  70192. }
  70193. /* "uvloop/handles/check.pyx":69
  70194. * try:
  70195. * h._run()
  70196. * except BaseException as ex: # <<<<<<<<<<<<<<
  70197. * check._error(ex, False)
  70198. */
  70199. /*finally:*/ {
  70200. /*normal exit:*/{
  70201. __Pyx_DECREF(__pyx_v_ex);
  70202. __pyx_v_ex = NULL;
  70203. goto __pyx_L16;
  70204. }
  70205. __pyx_L15_error:;
  70206. /*exception exit:*/{
  70207. __Pyx_PyThreadState_declare
  70208. __Pyx_PyThreadState_assign
  70209. __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0;
  70210. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  70211. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17);
  70212. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14) < 0)) __Pyx_ErrFetch(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
  70213. __Pyx_XGOTREF(__pyx_t_12);
  70214. __Pyx_XGOTREF(__pyx_t_13);
  70215. __Pyx_XGOTREF(__pyx_t_14);
  70216. __Pyx_XGOTREF(__pyx_t_15);
  70217. __Pyx_XGOTREF(__pyx_t_16);
  70218. __Pyx_XGOTREF(__pyx_t_17);
  70219. __pyx_t_6 = __pyx_lineno; __pyx_t_10 = __pyx_clineno; __pyx_t_11 = __pyx_filename;
  70220. {
  70221. __Pyx_DECREF(__pyx_v_ex);
  70222. __pyx_v_ex = NULL;
  70223. }
  70224. if (PY_MAJOR_VERSION >= 3) {
  70225. __Pyx_XGIVEREF(__pyx_t_15);
  70226. __Pyx_XGIVEREF(__pyx_t_16);
  70227. __Pyx_XGIVEREF(__pyx_t_17);
  70228. __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17);
  70229. }
  70230. __Pyx_XGIVEREF(__pyx_t_12);
  70231. __Pyx_XGIVEREF(__pyx_t_13);
  70232. __Pyx_XGIVEREF(__pyx_t_14);
  70233. __Pyx_ErrRestore(__pyx_t_12, __pyx_t_13, __pyx_t_14);
  70234. __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0;
  70235. __pyx_lineno = __pyx_t_6; __pyx_clineno = __pyx_t_10; __pyx_filename = __pyx_t_11;
  70236. goto __pyx_L6_except_error;
  70237. }
  70238. __pyx_L16:;
  70239. }
  70240. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  70241. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  70242. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  70243. goto __pyx_L5_exception_handled;
  70244. }
  70245. goto __pyx_L6_except_error;
  70246. __pyx_L6_except_error:;
  70247. /* "uvloop/handles/check.pyx":67
  70248. * UVCheck check = <UVCheck> handle.data
  70249. * Handle h = check.h
  70250. * try: # <<<<<<<<<<<<<<
  70251. * h._run()
  70252. * except BaseException as ex:
  70253. */
  70254. __Pyx_XGIVEREF(__pyx_t_3);
  70255. __Pyx_XGIVEREF(__pyx_t_4);
  70256. __Pyx_XGIVEREF(__pyx_t_5);
  70257. __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
  70258. goto __pyx_L1_error;
  70259. __pyx_L5_exception_handled:;
  70260. __Pyx_XGIVEREF(__pyx_t_3);
  70261. __Pyx_XGIVEREF(__pyx_t_4);
  70262. __Pyx_XGIVEREF(__pyx_t_5);
  70263. __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
  70264. __pyx_L9_try_end:;
  70265. }
  70266. /* "uvloop/handles/check.pyx":60
  70267. *
  70268. *
  70269. * cdef void cb_check_callback(uv.uv_check_t* handle) with gil: # <<<<<<<<<<<<<<
  70270. * if __ensure_handle_data(<uv.uv_handle_t*>handle, "UVCheck callback") == 0:
  70271. * return
  70272. */
  70273. /* function exit code */
  70274. goto __pyx_L0;
  70275. __pyx_L1_error:;
  70276. __Pyx_XDECREF(__pyx_t_2);
  70277. __Pyx_XDECREF(__pyx_t_7);
  70278. __Pyx_XDECREF(__pyx_t_8);
  70279. __Pyx_XDECREF(__pyx_t_9);
  70280. __Pyx_WriteUnraisable("uvloop.loop.cb_check_callback", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  70281. __pyx_L0:;
  70282. __Pyx_XDECREF((PyObject *)__pyx_v_check);
  70283. __Pyx_XDECREF((PyObject *)__pyx_v_h);
  70284. __Pyx_XDECREF(__pyx_v_ex);
  70285. __Pyx_RefNannyFinishContext();
  70286. #ifdef WITH_THREAD
  70287. __Pyx_PyGILState_Release(__pyx_gilstate_save);
  70288. #endif
  70289. }
  70290. /* "uvloop/handles/timer.pyx":3
  70291. * @cython.no_gc_clear
  70292. * cdef class UVTimer(UVHandle):
  70293. * cdef _init(self, Loop loop, method_t callback, object ctx, # <<<<<<<<<<<<<<
  70294. * uint64_t timeout):
  70295. *
  70296. */
  70297. static PyObject *__pyx_f_6uvloop_4loop_7UVTimer__init(struct __pyx_obj_6uvloop_4loop_UVTimer *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, __pyx_t_6uvloop_4loop_method_t __pyx_v_callback, PyObject *__pyx_v_ctx, uint64_t __pyx_v_timeout) {
  70298. int __pyx_v_err;
  70299. PyObject *__pyx_r = NULL;
  70300. __Pyx_RefNannyDeclarations
  70301. PyObject *__pyx_t_1 = NULL;
  70302. int __pyx_t_2;
  70303. __Pyx_RefNannySetupContext("_init", 0);
  70304. /* "uvloop/handles/timer.pyx":8
  70305. * cdef int err
  70306. *
  70307. * self._start_init(loop) # <<<<<<<<<<<<<<
  70308. *
  70309. * self._handle = <uv.uv_handle_t*> PyMem_RawMalloc(sizeof(uv.uv_timer_t))
  70310. */
  70311. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVTimer *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._start_init(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self), __pyx_v_loop); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 8, __pyx_L1_error)
  70312. __Pyx_GOTREF(__pyx_t_1);
  70313. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  70314. /* "uvloop/handles/timer.pyx":10
  70315. * self._start_init(loop)
  70316. *
  70317. * self._handle = <uv.uv_handle_t*> PyMem_RawMalloc(sizeof(uv.uv_timer_t)) # <<<<<<<<<<<<<<
  70318. * if self._handle is NULL:
  70319. * self._abort_init()
  70320. */
  70321. __pyx_v_self->__pyx_base._handle = ((uv_handle_t *)PyMem_RawMalloc((sizeof(uv_timer_t))));
  70322. /* "uvloop/handles/timer.pyx":11
  70323. *
  70324. * self._handle = <uv.uv_handle_t*> PyMem_RawMalloc(sizeof(uv.uv_timer_t))
  70325. * if self._handle is NULL: # <<<<<<<<<<<<<<
  70326. * self._abort_init()
  70327. * raise MemoryError()
  70328. */
  70329. __pyx_t_2 = ((__pyx_v_self->__pyx_base._handle == NULL) != 0);
  70330. if (unlikely(__pyx_t_2)) {
  70331. /* "uvloop/handles/timer.pyx":12
  70332. * self._handle = <uv.uv_handle_t*> PyMem_RawMalloc(sizeof(uv.uv_timer_t))
  70333. * if self._handle is NULL:
  70334. * self._abort_init() # <<<<<<<<<<<<<<
  70335. * raise MemoryError()
  70336. *
  70337. */
  70338. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVTimer *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._abort_init(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 12, __pyx_L1_error)
  70339. __Pyx_GOTREF(__pyx_t_1);
  70340. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  70341. /* "uvloop/handles/timer.pyx":13
  70342. * if self._handle is NULL:
  70343. * self._abort_init()
  70344. * raise MemoryError() # <<<<<<<<<<<<<<
  70345. *
  70346. * err = uv.uv_timer_init(self._loop.uvloop, <uv.uv_timer_t*>self._handle)
  70347. */
  70348. PyErr_NoMemory(); __PYX_ERR(14, 13, __pyx_L1_error)
  70349. /* "uvloop/handles/timer.pyx":11
  70350. *
  70351. * self._handle = <uv.uv_handle_t*> PyMem_RawMalloc(sizeof(uv.uv_timer_t))
  70352. * if self._handle is NULL: # <<<<<<<<<<<<<<
  70353. * self._abort_init()
  70354. * raise MemoryError()
  70355. */
  70356. }
  70357. /* "uvloop/handles/timer.pyx":15
  70358. * raise MemoryError()
  70359. *
  70360. * err = uv.uv_timer_init(self._loop.uvloop, <uv.uv_timer_t*>self._handle) # <<<<<<<<<<<<<<
  70361. * if err < 0:
  70362. * self._abort_init()
  70363. */
  70364. __pyx_v_err = uv_timer_init(__pyx_v_self->__pyx_base._loop->uvloop, ((uv_timer_t *)__pyx_v_self->__pyx_base._handle));
  70365. /* "uvloop/handles/timer.pyx":16
  70366. *
  70367. * err = uv.uv_timer_init(self._loop.uvloop, <uv.uv_timer_t*>self._handle)
  70368. * if err < 0: # <<<<<<<<<<<<<<
  70369. * self._abort_init()
  70370. * raise convert_error(err)
  70371. */
  70372. __pyx_t_2 = ((__pyx_v_err < 0) != 0);
  70373. if (unlikely(__pyx_t_2)) {
  70374. /* "uvloop/handles/timer.pyx":17
  70375. * err = uv.uv_timer_init(self._loop.uvloop, <uv.uv_timer_t*>self._handle)
  70376. * if err < 0:
  70377. * self._abort_init() # <<<<<<<<<<<<<<
  70378. * raise convert_error(err)
  70379. *
  70380. */
  70381. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVTimer *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._abort_init(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 17, __pyx_L1_error)
  70382. __Pyx_GOTREF(__pyx_t_1);
  70383. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  70384. /* "uvloop/handles/timer.pyx":18
  70385. * if err < 0:
  70386. * self._abort_init()
  70387. * raise convert_error(err) # <<<<<<<<<<<<<<
  70388. *
  70389. * self._finish_init()
  70390. */
  70391. __pyx_t_1 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 18, __pyx_L1_error)
  70392. __Pyx_GOTREF(__pyx_t_1);
  70393. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  70394. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  70395. __PYX_ERR(14, 18, __pyx_L1_error)
  70396. /* "uvloop/handles/timer.pyx":16
  70397. *
  70398. * err = uv.uv_timer_init(self._loop.uvloop, <uv.uv_timer_t*>self._handle)
  70399. * if err < 0: # <<<<<<<<<<<<<<
  70400. * self._abort_init()
  70401. * raise convert_error(err)
  70402. */
  70403. }
  70404. /* "uvloop/handles/timer.pyx":20
  70405. * raise convert_error(err)
  70406. *
  70407. * self._finish_init() # <<<<<<<<<<<<<<
  70408. *
  70409. * self.callback = callback
  70410. */
  70411. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVTimer *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._finish_init(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 20, __pyx_L1_error)
  70412. __Pyx_GOTREF(__pyx_t_1);
  70413. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  70414. /* "uvloop/handles/timer.pyx":22
  70415. * self._finish_init()
  70416. *
  70417. * self.callback = callback # <<<<<<<<<<<<<<
  70418. * self.ctx = ctx
  70419. * self.running = 0
  70420. */
  70421. __pyx_v_self->callback = __pyx_v_callback;
  70422. /* "uvloop/handles/timer.pyx":23
  70423. *
  70424. * self.callback = callback
  70425. * self.ctx = ctx # <<<<<<<<<<<<<<
  70426. * self.running = 0
  70427. * self.timeout = timeout
  70428. */
  70429. __Pyx_INCREF(__pyx_v_ctx);
  70430. __Pyx_GIVEREF(__pyx_v_ctx);
  70431. __Pyx_GOTREF(__pyx_v_self->ctx);
  70432. __Pyx_DECREF(__pyx_v_self->ctx);
  70433. __pyx_v_self->ctx = __pyx_v_ctx;
  70434. /* "uvloop/handles/timer.pyx":24
  70435. * self.callback = callback
  70436. * self.ctx = ctx
  70437. * self.running = 0 # <<<<<<<<<<<<<<
  70438. * self.timeout = timeout
  70439. *
  70440. */
  70441. __pyx_v_self->running = 0;
  70442. /* "uvloop/handles/timer.pyx":25
  70443. * self.ctx = ctx
  70444. * self.running = 0
  70445. * self.timeout = timeout # <<<<<<<<<<<<<<
  70446. *
  70447. * cdef stop(self):
  70448. */
  70449. __pyx_v_self->timeout = __pyx_v_timeout;
  70450. /* "uvloop/handles/timer.pyx":3
  70451. * @cython.no_gc_clear
  70452. * cdef class UVTimer(UVHandle):
  70453. * cdef _init(self, Loop loop, method_t callback, object ctx, # <<<<<<<<<<<<<<
  70454. * uint64_t timeout):
  70455. *
  70456. */
  70457. /* function exit code */
  70458. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  70459. goto __pyx_L0;
  70460. __pyx_L1_error:;
  70461. __Pyx_XDECREF(__pyx_t_1);
  70462. __Pyx_AddTraceback("uvloop.loop.UVTimer._init", __pyx_clineno, __pyx_lineno, __pyx_filename);
  70463. __pyx_r = 0;
  70464. __pyx_L0:;
  70465. __Pyx_XGIVEREF(__pyx_r);
  70466. __Pyx_RefNannyFinishContext();
  70467. return __pyx_r;
  70468. }
  70469. /* "uvloop/handles/timer.pyx":27
  70470. * self.timeout = timeout
  70471. *
  70472. * cdef stop(self): # <<<<<<<<<<<<<<
  70473. * cdef int err
  70474. *
  70475. */
  70476. static PyObject *__pyx_f_6uvloop_4loop_7UVTimer_stop(struct __pyx_obj_6uvloop_4loop_UVTimer *__pyx_v_self) {
  70477. int __pyx_v_err;
  70478. PyObject *__pyx_v_exc = NULL;
  70479. PyObject *__pyx_r = NULL;
  70480. __Pyx_RefNannyDeclarations
  70481. int __pyx_t_1;
  70482. PyObject *__pyx_t_2 = NULL;
  70483. __Pyx_RefNannySetupContext("stop", 0);
  70484. /* "uvloop/handles/timer.pyx":30
  70485. * cdef int err
  70486. *
  70487. * if not self._is_alive(): # <<<<<<<<<<<<<<
  70488. * self.running = 0
  70489. * return
  70490. */
  70491. __pyx_t_1 = ((!(((struct __pyx_vtabstruct_6uvloop_4loop_UVTimer *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._is_alive(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)) != 0)) != 0);
  70492. if (__pyx_t_1) {
  70493. /* "uvloop/handles/timer.pyx":31
  70494. *
  70495. * if not self._is_alive():
  70496. * self.running = 0 # <<<<<<<<<<<<<<
  70497. * return
  70498. *
  70499. */
  70500. __pyx_v_self->running = 0;
  70501. /* "uvloop/handles/timer.pyx":32
  70502. * if not self._is_alive():
  70503. * self.running = 0
  70504. * return # <<<<<<<<<<<<<<
  70505. *
  70506. * if self.running == 1:
  70507. */
  70508. __Pyx_XDECREF(__pyx_r);
  70509. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  70510. goto __pyx_L0;
  70511. /* "uvloop/handles/timer.pyx":30
  70512. * cdef int err
  70513. *
  70514. * if not self._is_alive(): # <<<<<<<<<<<<<<
  70515. * self.running = 0
  70516. * return
  70517. */
  70518. }
  70519. /* "uvloop/handles/timer.pyx":34
  70520. * return
  70521. *
  70522. * if self.running == 1: # <<<<<<<<<<<<<<
  70523. * err = uv.uv_timer_stop(<uv.uv_timer_t*>self._handle)
  70524. * self.running = 0
  70525. */
  70526. __pyx_t_1 = ((__pyx_v_self->running == 1) != 0);
  70527. if (__pyx_t_1) {
  70528. /* "uvloop/handles/timer.pyx":35
  70529. *
  70530. * if self.running == 1:
  70531. * err = uv.uv_timer_stop(<uv.uv_timer_t*>self._handle) # <<<<<<<<<<<<<<
  70532. * self.running = 0
  70533. * if err < 0:
  70534. */
  70535. __pyx_v_err = uv_timer_stop(((uv_timer_t *)__pyx_v_self->__pyx_base._handle));
  70536. /* "uvloop/handles/timer.pyx":36
  70537. * if self.running == 1:
  70538. * err = uv.uv_timer_stop(<uv.uv_timer_t*>self._handle)
  70539. * self.running = 0 # <<<<<<<<<<<<<<
  70540. * if err < 0:
  70541. * exc = convert_error(err)
  70542. */
  70543. __pyx_v_self->running = 0;
  70544. /* "uvloop/handles/timer.pyx":37
  70545. * err = uv.uv_timer_stop(<uv.uv_timer_t*>self._handle)
  70546. * self.running = 0
  70547. * if err < 0: # <<<<<<<<<<<<<<
  70548. * exc = convert_error(err)
  70549. * self._fatal_error(exc, True)
  70550. */
  70551. __pyx_t_1 = ((__pyx_v_err < 0) != 0);
  70552. if (__pyx_t_1) {
  70553. /* "uvloop/handles/timer.pyx":38
  70554. * self.running = 0
  70555. * if err < 0:
  70556. * exc = convert_error(err) # <<<<<<<<<<<<<<
  70557. * self._fatal_error(exc, True)
  70558. * return
  70559. */
  70560. __pyx_t_2 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 38, __pyx_L1_error)
  70561. __Pyx_GOTREF(__pyx_t_2);
  70562. __pyx_v_exc = __pyx_t_2;
  70563. __pyx_t_2 = 0;
  70564. /* "uvloop/handles/timer.pyx":39
  70565. * if err < 0:
  70566. * exc = convert_error(err)
  70567. * self._fatal_error(exc, True) # <<<<<<<<<<<<<<
  70568. * return
  70569. *
  70570. */
  70571. __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVTimer *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._fatal_error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self), __pyx_v_exc, Py_True, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 39, __pyx_L1_error)
  70572. __Pyx_GOTREF(__pyx_t_2);
  70573. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  70574. /* "uvloop/handles/timer.pyx":40
  70575. * exc = convert_error(err)
  70576. * self._fatal_error(exc, True)
  70577. * return # <<<<<<<<<<<<<<
  70578. *
  70579. * cdef start(self):
  70580. */
  70581. __Pyx_XDECREF(__pyx_r);
  70582. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  70583. goto __pyx_L0;
  70584. /* "uvloop/handles/timer.pyx":37
  70585. * err = uv.uv_timer_stop(<uv.uv_timer_t*>self._handle)
  70586. * self.running = 0
  70587. * if err < 0: # <<<<<<<<<<<<<<
  70588. * exc = convert_error(err)
  70589. * self._fatal_error(exc, True)
  70590. */
  70591. }
  70592. /* "uvloop/handles/timer.pyx":34
  70593. * return
  70594. *
  70595. * if self.running == 1: # <<<<<<<<<<<<<<
  70596. * err = uv.uv_timer_stop(<uv.uv_timer_t*>self._handle)
  70597. * self.running = 0
  70598. */
  70599. }
  70600. /* "uvloop/handles/timer.pyx":27
  70601. * self.timeout = timeout
  70602. *
  70603. * cdef stop(self): # <<<<<<<<<<<<<<
  70604. * cdef int err
  70605. *
  70606. */
  70607. /* function exit code */
  70608. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  70609. goto __pyx_L0;
  70610. __pyx_L1_error:;
  70611. __Pyx_XDECREF(__pyx_t_2);
  70612. __Pyx_AddTraceback("uvloop.loop.UVTimer.stop", __pyx_clineno, __pyx_lineno, __pyx_filename);
  70613. __pyx_r = 0;
  70614. __pyx_L0:;
  70615. __Pyx_XDECREF(__pyx_v_exc);
  70616. __Pyx_XGIVEREF(__pyx_r);
  70617. __Pyx_RefNannyFinishContext();
  70618. return __pyx_r;
  70619. }
  70620. /* "uvloop/handles/timer.pyx":42
  70621. * return
  70622. *
  70623. * cdef start(self): # <<<<<<<<<<<<<<
  70624. * cdef int err
  70625. *
  70626. */
  70627. static PyObject *__pyx_f_6uvloop_4loop_7UVTimer_start(struct __pyx_obj_6uvloop_4loop_UVTimer *__pyx_v_self) {
  70628. int __pyx_v_err;
  70629. PyObject *__pyx_v_exc = NULL;
  70630. PyObject *__pyx_r = NULL;
  70631. __Pyx_RefNannyDeclarations
  70632. PyObject *__pyx_t_1 = NULL;
  70633. int __pyx_t_2;
  70634. __Pyx_RefNannySetupContext("start", 0);
  70635. /* "uvloop/handles/timer.pyx":45
  70636. * cdef int err
  70637. *
  70638. * self._ensure_alive() # <<<<<<<<<<<<<<
  70639. *
  70640. * if self.running == 0:
  70641. */
  70642. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVTimer *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._ensure_alive(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 45, __pyx_L1_error)
  70643. __Pyx_GOTREF(__pyx_t_1);
  70644. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  70645. /* "uvloop/handles/timer.pyx":47
  70646. * self._ensure_alive()
  70647. *
  70648. * if self.running == 0: # <<<<<<<<<<<<<<
  70649. * # Update libuv internal time.
  70650. * uv.uv_update_time(self._loop.uvloop) # void
  70651. */
  70652. __pyx_t_2 = ((__pyx_v_self->running == 0) != 0);
  70653. if (__pyx_t_2) {
  70654. /* "uvloop/handles/timer.pyx":49
  70655. * if self.running == 0:
  70656. * # Update libuv internal time.
  70657. * uv.uv_update_time(self._loop.uvloop) # void # <<<<<<<<<<<<<<
  70658. *
  70659. * err = uv.uv_timer_start(<uv.uv_timer_t*>self._handle,
  70660. */
  70661. uv_update_time(__pyx_v_self->__pyx_base._loop->uvloop);
  70662. /* "uvloop/handles/timer.pyx":51
  70663. * uv.uv_update_time(self._loop.uvloop) # void
  70664. *
  70665. * err = uv.uv_timer_start(<uv.uv_timer_t*>self._handle, # <<<<<<<<<<<<<<
  70666. * __uvtimer_callback,
  70667. * self.timeout, 0)
  70668. */
  70669. __pyx_v_err = uv_timer_start(((uv_timer_t *)__pyx_v_self->__pyx_base._handle), __pyx_f_6uvloop_4loop___uvtimer_callback, __pyx_v_self->timeout, 0);
  70670. /* "uvloop/handles/timer.pyx":54
  70671. * __uvtimer_callback,
  70672. * self.timeout, 0)
  70673. * if err < 0: # <<<<<<<<<<<<<<
  70674. * exc = convert_error(err)
  70675. * self._fatal_error(exc, True)
  70676. */
  70677. __pyx_t_2 = ((__pyx_v_err < 0) != 0);
  70678. if (__pyx_t_2) {
  70679. /* "uvloop/handles/timer.pyx":55
  70680. * self.timeout, 0)
  70681. * if err < 0:
  70682. * exc = convert_error(err) # <<<<<<<<<<<<<<
  70683. * self._fatal_error(exc, True)
  70684. * return
  70685. */
  70686. __pyx_t_1 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 55, __pyx_L1_error)
  70687. __Pyx_GOTREF(__pyx_t_1);
  70688. __pyx_v_exc = __pyx_t_1;
  70689. __pyx_t_1 = 0;
  70690. /* "uvloop/handles/timer.pyx":56
  70691. * if err < 0:
  70692. * exc = convert_error(err)
  70693. * self._fatal_error(exc, True) # <<<<<<<<<<<<<<
  70694. * return
  70695. * self.running = 1
  70696. */
  70697. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVTimer *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._fatal_error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self), __pyx_v_exc, Py_True, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 56, __pyx_L1_error)
  70698. __Pyx_GOTREF(__pyx_t_1);
  70699. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  70700. /* "uvloop/handles/timer.pyx":57
  70701. * exc = convert_error(err)
  70702. * self._fatal_error(exc, True)
  70703. * return # <<<<<<<<<<<<<<
  70704. * self.running = 1
  70705. *
  70706. */
  70707. __Pyx_XDECREF(__pyx_r);
  70708. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  70709. goto __pyx_L0;
  70710. /* "uvloop/handles/timer.pyx":54
  70711. * __uvtimer_callback,
  70712. * self.timeout, 0)
  70713. * if err < 0: # <<<<<<<<<<<<<<
  70714. * exc = convert_error(err)
  70715. * self._fatal_error(exc, True)
  70716. */
  70717. }
  70718. /* "uvloop/handles/timer.pyx":58
  70719. * self._fatal_error(exc, True)
  70720. * return
  70721. * self.running = 1 # <<<<<<<<<<<<<<
  70722. *
  70723. * @staticmethod
  70724. */
  70725. __pyx_v_self->running = 1;
  70726. /* "uvloop/handles/timer.pyx":47
  70727. * self._ensure_alive()
  70728. *
  70729. * if self.running == 0: # <<<<<<<<<<<<<<
  70730. * # Update libuv internal time.
  70731. * uv.uv_update_time(self._loop.uvloop) # void
  70732. */
  70733. }
  70734. /* "uvloop/handles/timer.pyx":42
  70735. * return
  70736. *
  70737. * cdef start(self): # <<<<<<<<<<<<<<
  70738. * cdef int err
  70739. *
  70740. */
  70741. /* function exit code */
  70742. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  70743. goto __pyx_L0;
  70744. __pyx_L1_error:;
  70745. __Pyx_XDECREF(__pyx_t_1);
  70746. __Pyx_AddTraceback("uvloop.loop.UVTimer.start", __pyx_clineno, __pyx_lineno, __pyx_filename);
  70747. __pyx_r = 0;
  70748. __pyx_L0:;
  70749. __Pyx_XDECREF(__pyx_v_exc);
  70750. __Pyx_XGIVEREF(__pyx_r);
  70751. __Pyx_RefNannyFinishContext();
  70752. return __pyx_r;
  70753. }
  70754. /* "uvloop/handles/timer.pyx":61
  70755. *
  70756. * @staticmethod
  70757. * cdef UVTimer new(Loop loop, method_t callback, object ctx, # <<<<<<<<<<<<<<
  70758. * uint64_t timeout):
  70759. *
  70760. */
  70761. static struct __pyx_obj_6uvloop_4loop_UVTimer *__pyx_f_6uvloop_4loop_7UVTimer_new(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, __pyx_t_6uvloop_4loop_method_t __pyx_v_callback, PyObject *__pyx_v_ctx, uint64_t __pyx_v_timeout) {
  70762. struct __pyx_obj_6uvloop_4loop_UVTimer *__pyx_v_handle = 0;
  70763. struct __pyx_obj_6uvloop_4loop_UVTimer *__pyx_r = NULL;
  70764. __Pyx_RefNannyDeclarations
  70765. PyObject *__pyx_t_1 = NULL;
  70766. __Pyx_RefNannySetupContext("new", 0);
  70767. /* "uvloop/handles/timer.pyx":65
  70768. *
  70769. * cdef UVTimer handle
  70770. * handle = UVTimer.__new__(UVTimer) # <<<<<<<<<<<<<<
  70771. * handle._init(loop, callback, ctx, timeout)
  70772. * return handle
  70773. */
  70774. __pyx_t_1 = ((PyObject *)__pyx_tp_new_6uvloop_4loop_UVTimer(((PyTypeObject *)__pyx_ptype_6uvloop_4loop_UVTimer), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 65, __pyx_L1_error)
  70775. __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  70776. __pyx_v_handle = ((struct __pyx_obj_6uvloop_4loop_UVTimer *)__pyx_t_1);
  70777. __pyx_t_1 = 0;
  70778. /* "uvloop/handles/timer.pyx":66
  70779. * cdef UVTimer handle
  70780. * handle = UVTimer.__new__(UVTimer)
  70781. * handle._init(loop, callback, ctx, timeout) # <<<<<<<<<<<<<<
  70782. * return handle
  70783. *
  70784. */
  70785. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVTimer *)__pyx_v_handle->__pyx_base.__pyx_vtab)->_init(__pyx_v_handle, __pyx_v_loop, __pyx_v_callback, __pyx_v_ctx, __pyx_v_timeout); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 66, __pyx_L1_error)
  70786. __Pyx_GOTREF(__pyx_t_1);
  70787. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  70788. /* "uvloop/handles/timer.pyx":67
  70789. * handle = UVTimer.__new__(UVTimer)
  70790. * handle._init(loop, callback, ctx, timeout)
  70791. * return handle # <<<<<<<<<<<<<<
  70792. *
  70793. *
  70794. */
  70795. __Pyx_XDECREF(((PyObject *)__pyx_r));
  70796. __Pyx_INCREF(((PyObject *)__pyx_v_handle));
  70797. __pyx_r = __pyx_v_handle;
  70798. goto __pyx_L0;
  70799. /* "uvloop/handles/timer.pyx":61
  70800. *
  70801. * @staticmethod
  70802. * cdef UVTimer new(Loop loop, method_t callback, object ctx, # <<<<<<<<<<<<<<
  70803. * uint64_t timeout):
  70804. *
  70805. */
  70806. /* function exit code */
  70807. __pyx_L1_error:;
  70808. __Pyx_XDECREF(__pyx_t_1);
  70809. __Pyx_AddTraceback("uvloop.loop.UVTimer.new", __pyx_clineno, __pyx_lineno, __pyx_filename);
  70810. __pyx_r = 0;
  70811. __pyx_L0:;
  70812. __Pyx_XDECREF((PyObject *)__pyx_v_handle);
  70813. __Pyx_XGIVEREF((PyObject *)__pyx_r);
  70814. __Pyx_RefNannyFinishContext();
  70815. return __pyx_r;
  70816. }
  70817. /* "(tree fragment)":1
  70818. * def __reduce_cython__(self): # <<<<<<<<<<<<<<
  70819. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  70820. * def __setstate_cython__(self, __pyx_state):
  70821. */
  70822. /* Python wrapper */
  70823. static PyObject *__pyx_pw_6uvloop_4loop_7UVTimer_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  70824. static char __pyx_doc_6uvloop_4loop_7UVTimer___reduce_cython__[] = "UVTimer.__reduce_cython__(self)";
  70825. static PyObject *__pyx_pw_6uvloop_4loop_7UVTimer_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  70826. PyObject *__pyx_r = 0;
  70827. __Pyx_RefNannyDeclarations
  70828. __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  70829. __pyx_r = __pyx_pf_6uvloop_4loop_7UVTimer___reduce_cython__(((struct __pyx_obj_6uvloop_4loop_UVTimer *)__pyx_v_self));
  70830. /* function exit code */
  70831. __Pyx_RefNannyFinishContext();
  70832. return __pyx_r;
  70833. }
  70834. static PyObject *__pyx_pf_6uvloop_4loop_7UVTimer___reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVTimer *__pyx_v_self) {
  70835. PyObject *__pyx_r = NULL;
  70836. __Pyx_RefNannyDeclarations
  70837. PyObject *__pyx_t_1 = NULL;
  70838. __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  70839. /* "(tree fragment)":2
  70840. * def __reduce_cython__(self):
  70841. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  70842. * def __setstate_cython__(self, __pyx_state):
  70843. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  70844. */
  70845. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__114, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 2, __pyx_L1_error)
  70846. __Pyx_GOTREF(__pyx_t_1);
  70847. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  70848. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  70849. __PYX_ERR(9, 2, __pyx_L1_error)
  70850. /* "(tree fragment)":1
  70851. * def __reduce_cython__(self): # <<<<<<<<<<<<<<
  70852. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  70853. * def __setstate_cython__(self, __pyx_state):
  70854. */
  70855. /* function exit code */
  70856. __pyx_L1_error:;
  70857. __Pyx_XDECREF(__pyx_t_1);
  70858. __Pyx_AddTraceback("uvloop.loop.UVTimer.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  70859. __pyx_r = NULL;
  70860. __Pyx_XGIVEREF(__pyx_r);
  70861. __Pyx_RefNannyFinishContext();
  70862. return __pyx_r;
  70863. }
  70864. /* "(tree fragment)":3
  70865. * def __reduce_cython__(self):
  70866. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  70867. * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
  70868. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  70869. */
  70870. /* Python wrapper */
  70871. static PyObject *__pyx_pw_6uvloop_4loop_7UVTimer_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
  70872. static char __pyx_doc_6uvloop_4loop_7UVTimer_2__setstate_cython__[] = "UVTimer.__setstate_cython__(self, __pyx_state)";
  70873. static PyObject *__pyx_pw_6uvloop_4loop_7UVTimer_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  70874. PyObject *__pyx_r = 0;
  70875. __Pyx_RefNannyDeclarations
  70876. __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  70877. __pyx_r = __pyx_pf_6uvloop_4loop_7UVTimer_2__setstate_cython__(((struct __pyx_obj_6uvloop_4loop_UVTimer *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
  70878. /* function exit code */
  70879. __Pyx_RefNannyFinishContext();
  70880. return __pyx_r;
  70881. }
  70882. static PyObject *__pyx_pf_6uvloop_4loop_7UVTimer_2__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVTimer *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  70883. PyObject *__pyx_r = NULL;
  70884. __Pyx_RefNannyDeclarations
  70885. PyObject *__pyx_t_1 = NULL;
  70886. __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  70887. /* "(tree fragment)":4
  70888. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  70889. * def __setstate_cython__(self, __pyx_state):
  70890. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  70891. */
  70892. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__115, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 4, __pyx_L1_error)
  70893. __Pyx_GOTREF(__pyx_t_1);
  70894. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  70895. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  70896. __PYX_ERR(9, 4, __pyx_L1_error)
  70897. /* "(tree fragment)":3
  70898. * def __reduce_cython__(self):
  70899. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  70900. * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
  70901. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  70902. */
  70903. /* function exit code */
  70904. __pyx_L1_error:;
  70905. __Pyx_XDECREF(__pyx_t_1);
  70906. __Pyx_AddTraceback("uvloop.loop.UVTimer.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  70907. __pyx_r = NULL;
  70908. __Pyx_XGIVEREF(__pyx_r);
  70909. __Pyx_RefNannyFinishContext();
  70910. return __pyx_r;
  70911. }
  70912. /* "uvloop/handles/timer.pyx":70
  70913. *
  70914. *
  70915. * cdef void __uvtimer_callback(uv.uv_timer_t* handle) with gil: # <<<<<<<<<<<<<<
  70916. * if __ensure_handle_data(<uv.uv_handle_t*>handle, "UVTimer callback") == 0:
  70917. * return
  70918. */
  70919. static void __pyx_f_6uvloop_4loop___uvtimer_callback(uv_timer_t *__pyx_v_handle) {
  70920. struct __pyx_obj_6uvloop_4loop_UVTimer *__pyx_v_timer = 0;
  70921. __pyx_t_6uvloop_4loop_method_t __pyx_v_cb;
  70922. PyObject *__pyx_v_ex = NULL;
  70923. __Pyx_RefNannyDeclarations
  70924. int __pyx_t_1;
  70925. PyObject *__pyx_t_2 = NULL;
  70926. __pyx_t_6uvloop_4loop_method_t __pyx_t_3;
  70927. PyObject *__pyx_t_4 = NULL;
  70928. PyObject *__pyx_t_5 = NULL;
  70929. PyObject *__pyx_t_6 = NULL;
  70930. PyObject *__pyx_t_7 = NULL;
  70931. int __pyx_t_8;
  70932. PyObject *__pyx_t_9 = NULL;
  70933. PyObject *__pyx_t_10 = NULL;
  70934. int __pyx_t_11;
  70935. char const *__pyx_t_12;
  70936. PyObject *__pyx_t_13 = NULL;
  70937. PyObject *__pyx_t_14 = NULL;
  70938. PyObject *__pyx_t_15 = NULL;
  70939. PyObject *__pyx_t_16 = NULL;
  70940. PyObject *__pyx_t_17 = NULL;
  70941. PyObject *__pyx_t_18 = NULL;
  70942. #ifdef WITH_THREAD
  70943. PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  70944. #endif
  70945. __Pyx_RefNannySetupContext("__uvtimer_callback", 0);
  70946. /* "uvloop/handles/timer.pyx":71
  70947. *
  70948. * cdef void __uvtimer_callback(uv.uv_timer_t* handle) with gil:
  70949. * if __ensure_handle_data(<uv.uv_handle_t*>handle, "UVTimer callback") == 0: # <<<<<<<<<<<<<<
  70950. * return
  70951. *
  70952. */
  70953. __pyx_t_1 = ((__pyx_f_6uvloop_4loop___ensure_handle_data(((uv_handle_t *)__pyx_v_handle), ((char const *)"UVTimer callback")) == 0) != 0);
  70954. if (__pyx_t_1) {
  70955. /* "uvloop/handles/timer.pyx":72
  70956. * cdef void __uvtimer_callback(uv.uv_timer_t* handle) with gil:
  70957. * if __ensure_handle_data(<uv.uv_handle_t*>handle, "UVTimer callback") == 0:
  70958. * return # <<<<<<<<<<<<<<
  70959. *
  70960. * cdef:
  70961. */
  70962. goto __pyx_L0;
  70963. /* "uvloop/handles/timer.pyx":71
  70964. *
  70965. * cdef void __uvtimer_callback(uv.uv_timer_t* handle) with gil:
  70966. * if __ensure_handle_data(<uv.uv_handle_t*>handle, "UVTimer callback") == 0: # <<<<<<<<<<<<<<
  70967. * return
  70968. *
  70969. */
  70970. }
  70971. /* "uvloop/handles/timer.pyx":75
  70972. *
  70973. * cdef:
  70974. * UVTimer timer = <UVTimer> handle.data # <<<<<<<<<<<<<<
  70975. * method_t cb = timer.callback
  70976. *
  70977. */
  70978. __pyx_t_2 = ((PyObject *)__pyx_v_handle->data);
  70979. __Pyx_INCREF(__pyx_t_2);
  70980. __pyx_v_timer = ((struct __pyx_obj_6uvloop_4loop_UVTimer *)__pyx_t_2);
  70981. __pyx_t_2 = 0;
  70982. /* "uvloop/handles/timer.pyx":76
  70983. * cdef:
  70984. * UVTimer timer = <UVTimer> handle.data
  70985. * method_t cb = timer.callback # <<<<<<<<<<<<<<
  70986. *
  70987. * timer.running = 0
  70988. */
  70989. __pyx_t_3 = __pyx_v_timer->callback;
  70990. __pyx_v_cb = __pyx_t_3;
  70991. /* "uvloop/handles/timer.pyx":78
  70992. * method_t cb = timer.callback
  70993. *
  70994. * timer.running = 0 # <<<<<<<<<<<<<<
  70995. * try:
  70996. * cb(timer.ctx)
  70997. */
  70998. __pyx_v_timer->running = 0;
  70999. /* "uvloop/handles/timer.pyx":79
  71000. *
  71001. * timer.running = 0
  71002. * try: # <<<<<<<<<<<<<<
  71003. * cb(timer.ctx)
  71004. * except BaseException as ex:
  71005. */
  71006. {
  71007. __Pyx_PyThreadState_declare
  71008. __Pyx_PyThreadState_assign
  71009. __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
  71010. __Pyx_XGOTREF(__pyx_t_4);
  71011. __Pyx_XGOTREF(__pyx_t_5);
  71012. __Pyx_XGOTREF(__pyx_t_6);
  71013. /*try:*/ {
  71014. /* "uvloop/handles/timer.pyx":80
  71015. * timer.running = 0
  71016. * try:
  71017. * cb(timer.ctx) # <<<<<<<<<<<<<<
  71018. * except BaseException as ex:
  71019. * timer._error(ex, False)
  71020. */
  71021. __pyx_t_2 = __pyx_v_timer->ctx;
  71022. __Pyx_INCREF(__pyx_t_2);
  71023. __pyx_t_7 = __pyx_v_cb(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(14, 80, __pyx_L4_error)
  71024. __Pyx_GOTREF(__pyx_t_7);
  71025. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  71026. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  71027. /* "uvloop/handles/timer.pyx":79
  71028. *
  71029. * timer.running = 0
  71030. * try: # <<<<<<<<<<<<<<
  71031. * cb(timer.ctx)
  71032. * except BaseException as ex:
  71033. */
  71034. }
  71035. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  71036. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  71037. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  71038. goto __pyx_L9_try_end;
  71039. __pyx_L4_error:;
  71040. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  71041. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  71042. /* "uvloop/handles/timer.pyx":81
  71043. * try:
  71044. * cb(timer.ctx)
  71045. * except BaseException as ex: # <<<<<<<<<<<<<<
  71046. * timer._error(ex, False)
  71047. */
  71048. __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_BaseException);
  71049. if (__pyx_t_8) {
  71050. __Pyx_AddTraceback("uvloop.loop.__uvtimer_callback", __pyx_clineno, __pyx_lineno, __pyx_filename);
  71051. if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_2, &__pyx_t_9) < 0) __PYX_ERR(14, 81, __pyx_L6_except_error)
  71052. __Pyx_GOTREF(__pyx_t_7);
  71053. __Pyx_GOTREF(__pyx_t_2);
  71054. __Pyx_GOTREF(__pyx_t_9);
  71055. __Pyx_INCREF(__pyx_t_2);
  71056. __pyx_v_ex = __pyx_t_2;
  71057. /*try:*/ {
  71058. /* "uvloop/handles/timer.pyx":82
  71059. * cb(timer.ctx)
  71060. * except BaseException as ex:
  71061. * timer._error(ex, False) # <<<<<<<<<<<<<<
  71062. */
  71063. __pyx_t_10 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVTimer *)__pyx_v_timer->__pyx_base.__pyx_vtab)->__pyx_base._error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_timer), __pyx_v_ex, Py_False); if (unlikely(!__pyx_t_10)) __PYX_ERR(14, 82, __pyx_L15_error)
  71064. __Pyx_GOTREF(__pyx_t_10);
  71065. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  71066. }
  71067. /* "uvloop/handles/timer.pyx":81
  71068. * try:
  71069. * cb(timer.ctx)
  71070. * except BaseException as ex: # <<<<<<<<<<<<<<
  71071. * timer._error(ex, False)
  71072. */
  71073. /*finally:*/ {
  71074. /*normal exit:*/{
  71075. __Pyx_DECREF(__pyx_v_ex);
  71076. __pyx_v_ex = NULL;
  71077. goto __pyx_L16;
  71078. }
  71079. __pyx_L15_error:;
  71080. /*exception exit:*/{
  71081. __Pyx_PyThreadState_declare
  71082. __Pyx_PyThreadState_assign
  71083. __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0;
  71084. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  71085. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18);
  71086. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15) < 0)) __Pyx_ErrFetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
  71087. __Pyx_XGOTREF(__pyx_t_13);
  71088. __Pyx_XGOTREF(__pyx_t_14);
  71089. __Pyx_XGOTREF(__pyx_t_15);
  71090. __Pyx_XGOTREF(__pyx_t_16);
  71091. __Pyx_XGOTREF(__pyx_t_17);
  71092. __Pyx_XGOTREF(__pyx_t_18);
  71093. __pyx_t_8 = __pyx_lineno; __pyx_t_11 = __pyx_clineno; __pyx_t_12 = __pyx_filename;
  71094. {
  71095. __Pyx_DECREF(__pyx_v_ex);
  71096. __pyx_v_ex = NULL;
  71097. }
  71098. if (PY_MAJOR_VERSION >= 3) {
  71099. __Pyx_XGIVEREF(__pyx_t_16);
  71100. __Pyx_XGIVEREF(__pyx_t_17);
  71101. __Pyx_XGIVEREF(__pyx_t_18);
  71102. __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18);
  71103. }
  71104. __Pyx_XGIVEREF(__pyx_t_13);
  71105. __Pyx_XGIVEREF(__pyx_t_14);
  71106. __Pyx_XGIVEREF(__pyx_t_15);
  71107. __Pyx_ErrRestore(__pyx_t_13, __pyx_t_14, __pyx_t_15);
  71108. __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0;
  71109. __pyx_lineno = __pyx_t_8; __pyx_clineno = __pyx_t_11; __pyx_filename = __pyx_t_12;
  71110. goto __pyx_L6_except_error;
  71111. }
  71112. __pyx_L16:;
  71113. }
  71114. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  71115. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  71116. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  71117. goto __pyx_L5_exception_handled;
  71118. }
  71119. goto __pyx_L6_except_error;
  71120. __pyx_L6_except_error:;
  71121. /* "uvloop/handles/timer.pyx":79
  71122. *
  71123. * timer.running = 0
  71124. * try: # <<<<<<<<<<<<<<
  71125. * cb(timer.ctx)
  71126. * except BaseException as ex:
  71127. */
  71128. __Pyx_XGIVEREF(__pyx_t_4);
  71129. __Pyx_XGIVEREF(__pyx_t_5);
  71130. __Pyx_XGIVEREF(__pyx_t_6);
  71131. __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
  71132. goto __pyx_L1_error;
  71133. __pyx_L5_exception_handled:;
  71134. __Pyx_XGIVEREF(__pyx_t_4);
  71135. __Pyx_XGIVEREF(__pyx_t_5);
  71136. __Pyx_XGIVEREF(__pyx_t_6);
  71137. __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
  71138. __pyx_L9_try_end:;
  71139. }
  71140. /* "uvloop/handles/timer.pyx":70
  71141. *
  71142. *
  71143. * cdef void __uvtimer_callback(uv.uv_timer_t* handle) with gil: # <<<<<<<<<<<<<<
  71144. * if __ensure_handle_data(<uv.uv_handle_t*>handle, "UVTimer callback") == 0:
  71145. * return
  71146. */
  71147. /* function exit code */
  71148. goto __pyx_L0;
  71149. __pyx_L1_error:;
  71150. __Pyx_XDECREF(__pyx_t_2);
  71151. __Pyx_XDECREF(__pyx_t_7);
  71152. __Pyx_XDECREF(__pyx_t_9);
  71153. __Pyx_XDECREF(__pyx_t_10);
  71154. __Pyx_WriteUnraisable("uvloop.loop.__uvtimer_callback", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  71155. __pyx_L0:;
  71156. __Pyx_XDECREF((PyObject *)__pyx_v_timer);
  71157. __Pyx_XDECREF(__pyx_v_ex);
  71158. __Pyx_RefNannyFinishContext();
  71159. #ifdef WITH_THREAD
  71160. __Pyx_PyGILState_Release(__pyx_gilstate_save);
  71161. #endif
  71162. }
  71163. /* "uvloop/handles/poll.pyx":3
  71164. * @cython.no_gc_clear
  71165. * cdef class UVPoll(UVHandle):
  71166. * cdef _init(self, Loop loop, int fd): # <<<<<<<<<<<<<<
  71167. * cdef int err
  71168. *
  71169. */
  71170. static PyObject *__pyx_f_6uvloop_4loop_6UVPoll__init(struct __pyx_obj_6uvloop_4loop_UVPoll *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, int __pyx_v_fd) {
  71171. int __pyx_v_err;
  71172. PyObject *__pyx_r = NULL;
  71173. __Pyx_RefNannyDeclarations
  71174. PyObject *__pyx_t_1 = NULL;
  71175. int __pyx_t_2;
  71176. __Pyx_RefNannySetupContext("_init", 0);
  71177. /* "uvloop/handles/poll.pyx":6
  71178. * cdef int err
  71179. *
  71180. * self._start_init(loop) # <<<<<<<<<<<<<<
  71181. *
  71182. * self._handle = <uv.uv_handle_t*>PyMem_RawMalloc(sizeof(uv.uv_poll_t))
  71183. */
  71184. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVPoll *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._start_init(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self), __pyx_v_loop); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 6, __pyx_L1_error)
  71185. __Pyx_GOTREF(__pyx_t_1);
  71186. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  71187. /* "uvloop/handles/poll.pyx":8
  71188. * self._start_init(loop)
  71189. *
  71190. * self._handle = <uv.uv_handle_t*>PyMem_RawMalloc(sizeof(uv.uv_poll_t)) # <<<<<<<<<<<<<<
  71191. * if self._handle is NULL:
  71192. * self._abort_init()
  71193. */
  71194. __pyx_v_self->__pyx_base._handle = ((uv_handle_t *)PyMem_RawMalloc((sizeof(uv_poll_t))));
  71195. /* "uvloop/handles/poll.pyx":9
  71196. *
  71197. * self._handle = <uv.uv_handle_t*>PyMem_RawMalloc(sizeof(uv.uv_poll_t))
  71198. * if self._handle is NULL: # <<<<<<<<<<<<<<
  71199. * self._abort_init()
  71200. * raise MemoryError()
  71201. */
  71202. __pyx_t_2 = ((__pyx_v_self->__pyx_base._handle == NULL) != 0);
  71203. if (unlikely(__pyx_t_2)) {
  71204. /* "uvloop/handles/poll.pyx":10
  71205. * self._handle = <uv.uv_handle_t*>PyMem_RawMalloc(sizeof(uv.uv_poll_t))
  71206. * if self._handle is NULL:
  71207. * self._abort_init() # <<<<<<<<<<<<<<
  71208. * raise MemoryError()
  71209. *
  71210. */
  71211. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVPoll *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._abort_init(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 10, __pyx_L1_error)
  71212. __Pyx_GOTREF(__pyx_t_1);
  71213. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  71214. /* "uvloop/handles/poll.pyx":11
  71215. * if self._handle is NULL:
  71216. * self._abort_init()
  71217. * raise MemoryError() # <<<<<<<<<<<<<<
  71218. *
  71219. * err = uv.uv_poll_init(self._loop.uvloop,
  71220. */
  71221. PyErr_NoMemory(); __PYX_ERR(15, 11, __pyx_L1_error)
  71222. /* "uvloop/handles/poll.pyx":9
  71223. *
  71224. * self._handle = <uv.uv_handle_t*>PyMem_RawMalloc(sizeof(uv.uv_poll_t))
  71225. * if self._handle is NULL: # <<<<<<<<<<<<<<
  71226. * self._abort_init()
  71227. * raise MemoryError()
  71228. */
  71229. }
  71230. /* "uvloop/handles/poll.pyx":13
  71231. * raise MemoryError()
  71232. *
  71233. * err = uv.uv_poll_init(self._loop.uvloop, # <<<<<<<<<<<<<<
  71234. * <uv.uv_poll_t *>self._handle, fd)
  71235. * if err < 0:
  71236. */
  71237. __pyx_v_err = uv_poll_init(__pyx_v_self->__pyx_base._loop->uvloop, ((uv_poll_t *)__pyx_v_self->__pyx_base._handle), __pyx_v_fd);
  71238. /* "uvloop/handles/poll.pyx":15
  71239. * err = uv.uv_poll_init(self._loop.uvloop,
  71240. * <uv.uv_poll_t *>self._handle, fd)
  71241. * if err < 0: # <<<<<<<<<<<<<<
  71242. * self._abort_init()
  71243. * raise convert_error(err)
  71244. */
  71245. __pyx_t_2 = ((__pyx_v_err < 0) != 0);
  71246. if (unlikely(__pyx_t_2)) {
  71247. /* "uvloop/handles/poll.pyx":16
  71248. * <uv.uv_poll_t *>self._handle, fd)
  71249. * if err < 0:
  71250. * self._abort_init() # <<<<<<<<<<<<<<
  71251. * raise convert_error(err)
  71252. *
  71253. */
  71254. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVPoll *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._abort_init(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 16, __pyx_L1_error)
  71255. __Pyx_GOTREF(__pyx_t_1);
  71256. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  71257. /* "uvloop/handles/poll.pyx":17
  71258. * if err < 0:
  71259. * self._abort_init()
  71260. * raise convert_error(err) # <<<<<<<<<<<<<<
  71261. *
  71262. * self._finish_init()
  71263. */
  71264. __pyx_t_1 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 17, __pyx_L1_error)
  71265. __Pyx_GOTREF(__pyx_t_1);
  71266. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  71267. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  71268. __PYX_ERR(15, 17, __pyx_L1_error)
  71269. /* "uvloop/handles/poll.pyx":15
  71270. * err = uv.uv_poll_init(self._loop.uvloop,
  71271. * <uv.uv_poll_t *>self._handle, fd)
  71272. * if err < 0: # <<<<<<<<<<<<<<
  71273. * self._abort_init()
  71274. * raise convert_error(err)
  71275. */
  71276. }
  71277. /* "uvloop/handles/poll.pyx":19
  71278. * raise convert_error(err)
  71279. *
  71280. * self._finish_init() # <<<<<<<<<<<<<<
  71281. *
  71282. * self.fd = fd
  71283. */
  71284. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVPoll *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._finish_init(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 19, __pyx_L1_error)
  71285. __Pyx_GOTREF(__pyx_t_1);
  71286. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  71287. /* "uvloop/handles/poll.pyx":21
  71288. * self._finish_init()
  71289. *
  71290. * self.fd = fd # <<<<<<<<<<<<<<
  71291. * self.reading_handle = None
  71292. * self.writing_handle = None
  71293. */
  71294. __pyx_v_self->fd = __pyx_v_fd;
  71295. /* "uvloop/handles/poll.pyx":22
  71296. *
  71297. * self.fd = fd
  71298. * self.reading_handle = None # <<<<<<<<<<<<<<
  71299. * self.writing_handle = None
  71300. *
  71301. */
  71302. __Pyx_INCREF(Py_None);
  71303. __Pyx_GIVEREF(Py_None);
  71304. __Pyx_GOTREF(__pyx_v_self->reading_handle);
  71305. __Pyx_DECREF(((PyObject *)__pyx_v_self->reading_handle));
  71306. __pyx_v_self->reading_handle = ((struct __pyx_obj_6uvloop_4loop_Handle *)Py_None);
  71307. /* "uvloop/handles/poll.pyx":23
  71308. * self.fd = fd
  71309. * self.reading_handle = None
  71310. * self.writing_handle = None # <<<<<<<<<<<<<<
  71311. *
  71312. * @staticmethod
  71313. */
  71314. __Pyx_INCREF(Py_None);
  71315. __Pyx_GIVEREF(Py_None);
  71316. __Pyx_GOTREF(__pyx_v_self->writing_handle);
  71317. __Pyx_DECREF(((PyObject *)__pyx_v_self->writing_handle));
  71318. __pyx_v_self->writing_handle = ((struct __pyx_obj_6uvloop_4loop_Handle *)Py_None);
  71319. /* "uvloop/handles/poll.pyx":3
  71320. * @cython.no_gc_clear
  71321. * cdef class UVPoll(UVHandle):
  71322. * cdef _init(self, Loop loop, int fd): # <<<<<<<<<<<<<<
  71323. * cdef int err
  71324. *
  71325. */
  71326. /* function exit code */
  71327. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  71328. goto __pyx_L0;
  71329. __pyx_L1_error:;
  71330. __Pyx_XDECREF(__pyx_t_1);
  71331. __Pyx_AddTraceback("uvloop.loop.UVPoll._init", __pyx_clineno, __pyx_lineno, __pyx_filename);
  71332. __pyx_r = 0;
  71333. __pyx_L0:;
  71334. __Pyx_XGIVEREF(__pyx_r);
  71335. __Pyx_RefNannyFinishContext();
  71336. return __pyx_r;
  71337. }
  71338. /* "uvloop/handles/poll.pyx":26
  71339. *
  71340. * @staticmethod
  71341. * cdef UVPoll new(Loop loop, int fd): # <<<<<<<<<<<<<<
  71342. * cdef UVPoll handle
  71343. * handle = UVPoll.__new__(UVPoll)
  71344. */
  71345. static struct __pyx_obj_6uvloop_4loop_UVPoll *__pyx_f_6uvloop_4loop_6UVPoll_new(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, int __pyx_v_fd) {
  71346. struct __pyx_obj_6uvloop_4loop_UVPoll *__pyx_v_handle = 0;
  71347. struct __pyx_obj_6uvloop_4loop_UVPoll *__pyx_r = NULL;
  71348. __Pyx_RefNannyDeclarations
  71349. PyObject *__pyx_t_1 = NULL;
  71350. __Pyx_RefNannySetupContext("new", 0);
  71351. /* "uvloop/handles/poll.pyx":28
  71352. * cdef UVPoll new(Loop loop, int fd):
  71353. * cdef UVPoll handle
  71354. * handle = UVPoll.__new__(UVPoll) # <<<<<<<<<<<<<<
  71355. * handle._init(loop, fd)
  71356. * return handle
  71357. */
  71358. __pyx_t_1 = ((PyObject *)__pyx_tp_new_6uvloop_4loop_UVPoll(((PyTypeObject *)__pyx_ptype_6uvloop_4loop_UVPoll), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 28, __pyx_L1_error)
  71359. __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  71360. __pyx_v_handle = ((struct __pyx_obj_6uvloop_4loop_UVPoll *)__pyx_t_1);
  71361. __pyx_t_1 = 0;
  71362. /* "uvloop/handles/poll.pyx":29
  71363. * cdef UVPoll handle
  71364. * handle = UVPoll.__new__(UVPoll)
  71365. * handle._init(loop, fd) # <<<<<<<<<<<<<<
  71366. * return handle
  71367. *
  71368. */
  71369. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVPoll *)__pyx_v_handle->__pyx_base.__pyx_vtab)->_init(__pyx_v_handle, __pyx_v_loop, __pyx_v_fd); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 29, __pyx_L1_error)
  71370. __Pyx_GOTREF(__pyx_t_1);
  71371. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  71372. /* "uvloop/handles/poll.pyx":30
  71373. * handle = UVPoll.__new__(UVPoll)
  71374. * handle._init(loop, fd)
  71375. * return handle # <<<<<<<<<<<<<<
  71376. *
  71377. * cdef int is_active(self):
  71378. */
  71379. __Pyx_XDECREF(((PyObject *)__pyx_r));
  71380. __Pyx_INCREF(((PyObject *)__pyx_v_handle));
  71381. __pyx_r = __pyx_v_handle;
  71382. goto __pyx_L0;
  71383. /* "uvloop/handles/poll.pyx":26
  71384. *
  71385. * @staticmethod
  71386. * cdef UVPoll new(Loop loop, int fd): # <<<<<<<<<<<<<<
  71387. * cdef UVPoll handle
  71388. * handle = UVPoll.__new__(UVPoll)
  71389. */
  71390. /* function exit code */
  71391. __pyx_L1_error:;
  71392. __Pyx_XDECREF(__pyx_t_1);
  71393. __Pyx_AddTraceback("uvloop.loop.UVPoll.new", __pyx_clineno, __pyx_lineno, __pyx_filename);
  71394. __pyx_r = 0;
  71395. __pyx_L0:;
  71396. __Pyx_XDECREF((PyObject *)__pyx_v_handle);
  71397. __Pyx_XGIVEREF((PyObject *)__pyx_r);
  71398. __Pyx_RefNannyFinishContext();
  71399. return __pyx_r;
  71400. }
  71401. /* "uvloop/handles/poll.pyx":32
  71402. * return handle
  71403. *
  71404. * cdef int is_active(self): # <<<<<<<<<<<<<<
  71405. * return (self.reading_handle is not None or
  71406. * self.writing_handle is not None)
  71407. */
  71408. static int __pyx_f_6uvloop_4loop_6UVPoll_is_active(struct __pyx_obj_6uvloop_4loop_UVPoll *__pyx_v_self) {
  71409. int __pyx_r;
  71410. __Pyx_RefNannyDeclarations
  71411. int __pyx_t_1;
  71412. int __pyx_t_2;
  71413. __Pyx_RefNannySetupContext("is_active", 0);
  71414. /* "uvloop/handles/poll.pyx":33
  71415. *
  71416. * cdef int is_active(self):
  71417. * return (self.reading_handle is not None or # <<<<<<<<<<<<<<
  71418. * self.writing_handle is not None)
  71419. *
  71420. */
  71421. __pyx_t_2 = (((PyObject *)__pyx_v_self->reading_handle) != Py_None);
  71422. if (!__pyx_t_2) {
  71423. } else {
  71424. __pyx_t_1 = __pyx_t_2;
  71425. goto __pyx_L3_bool_binop_done;
  71426. }
  71427. /* "uvloop/handles/poll.pyx":34
  71428. * cdef int is_active(self):
  71429. * return (self.reading_handle is not None or
  71430. * self.writing_handle is not None) # <<<<<<<<<<<<<<
  71431. *
  71432. * cdef inline _poll_start(self, int flags):
  71433. */
  71434. __pyx_t_2 = (((PyObject *)__pyx_v_self->writing_handle) != Py_None);
  71435. __pyx_t_1 = __pyx_t_2;
  71436. __pyx_L3_bool_binop_done:;
  71437. __pyx_r = __pyx_t_1;
  71438. goto __pyx_L0;
  71439. /* "uvloop/handles/poll.pyx":32
  71440. * return handle
  71441. *
  71442. * cdef int is_active(self): # <<<<<<<<<<<<<<
  71443. * return (self.reading_handle is not None or
  71444. * self.writing_handle is not None)
  71445. */
  71446. /* function exit code */
  71447. __pyx_L0:;
  71448. __Pyx_RefNannyFinishContext();
  71449. return __pyx_r;
  71450. }
  71451. /* "uvloop/handles/poll.pyx":36
  71452. * self.writing_handle is not None)
  71453. *
  71454. * cdef inline _poll_start(self, int flags): # <<<<<<<<<<<<<<
  71455. * cdef int err
  71456. *
  71457. */
  71458. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_6UVPoll__poll_start(struct __pyx_obj_6uvloop_4loop_UVPoll *__pyx_v_self, int __pyx_v_flags) {
  71459. int __pyx_v_err;
  71460. PyObject *__pyx_v_exc = NULL;
  71461. PyObject *__pyx_r = NULL;
  71462. __Pyx_RefNannyDeclarations
  71463. PyObject *__pyx_t_1 = NULL;
  71464. int __pyx_t_2;
  71465. __Pyx_RefNannySetupContext("_poll_start", 0);
  71466. /* "uvloop/handles/poll.pyx":39
  71467. * cdef int err
  71468. *
  71469. * self._ensure_alive() # <<<<<<<<<<<<<<
  71470. *
  71471. * err = uv.uv_poll_start(
  71472. */
  71473. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVPoll *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._ensure_alive(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 39, __pyx_L1_error)
  71474. __Pyx_GOTREF(__pyx_t_1);
  71475. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  71476. /* "uvloop/handles/poll.pyx":41
  71477. * self._ensure_alive()
  71478. *
  71479. * err = uv.uv_poll_start( # <<<<<<<<<<<<<<
  71480. * <uv.uv_poll_t*>self._handle,
  71481. * flags,
  71482. */
  71483. __pyx_v_err = uv_poll_start(((uv_poll_t *)__pyx_v_self->__pyx_base._handle), __pyx_v_flags, __pyx_f_6uvloop_4loop___on_uvpoll_event);
  71484. /* "uvloop/handles/poll.pyx":46
  71485. * __on_uvpoll_event)
  71486. *
  71487. * if err < 0: # <<<<<<<<<<<<<<
  71488. * exc = convert_error(err)
  71489. * self._fatal_error(exc, True)
  71490. */
  71491. __pyx_t_2 = ((__pyx_v_err < 0) != 0);
  71492. if (__pyx_t_2) {
  71493. /* "uvloop/handles/poll.pyx":47
  71494. *
  71495. * if err < 0:
  71496. * exc = convert_error(err) # <<<<<<<<<<<<<<
  71497. * self._fatal_error(exc, True)
  71498. * return
  71499. */
  71500. __pyx_t_1 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 47, __pyx_L1_error)
  71501. __Pyx_GOTREF(__pyx_t_1);
  71502. __pyx_v_exc = __pyx_t_1;
  71503. __pyx_t_1 = 0;
  71504. /* "uvloop/handles/poll.pyx":48
  71505. * if err < 0:
  71506. * exc = convert_error(err)
  71507. * self._fatal_error(exc, True) # <<<<<<<<<<<<<<
  71508. * return
  71509. *
  71510. */
  71511. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVPoll *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._fatal_error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self), __pyx_v_exc, Py_True, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 48, __pyx_L1_error)
  71512. __Pyx_GOTREF(__pyx_t_1);
  71513. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  71514. /* "uvloop/handles/poll.pyx":49
  71515. * exc = convert_error(err)
  71516. * self._fatal_error(exc, True)
  71517. * return # <<<<<<<<<<<<<<
  71518. *
  71519. * cdef inline _poll_stop(self):
  71520. */
  71521. __Pyx_XDECREF(__pyx_r);
  71522. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  71523. goto __pyx_L0;
  71524. /* "uvloop/handles/poll.pyx":46
  71525. * __on_uvpoll_event)
  71526. *
  71527. * if err < 0: # <<<<<<<<<<<<<<
  71528. * exc = convert_error(err)
  71529. * self._fatal_error(exc, True)
  71530. */
  71531. }
  71532. /* "uvloop/handles/poll.pyx":36
  71533. * self.writing_handle is not None)
  71534. *
  71535. * cdef inline _poll_start(self, int flags): # <<<<<<<<<<<<<<
  71536. * cdef int err
  71537. *
  71538. */
  71539. /* function exit code */
  71540. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  71541. goto __pyx_L0;
  71542. __pyx_L1_error:;
  71543. __Pyx_XDECREF(__pyx_t_1);
  71544. __Pyx_AddTraceback("uvloop.loop.UVPoll._poll_start", __pyx_clineno, __pyx_lineno, __pyx_filename);
  71545. __pyx_r = 0;
  71546. __pyx_L0:;
  71547. __Pyx_XDECREF(__pyx_v_exc);
  71548. __Pyx_XGIVEREF(__pyx_r);
  71549. __Pyx_RefNannyFinishContext();
  71550. return __pyx_r;
  71551. }
  71552. /* "uvloop/handles/poll.pyx":51
  71553. * return
  71554. *
  71555. * cdef inline _poll_stop(self): # <<<<<<<<<<<<<<
  71556. * cdef int err
  71557. *
  71558. */
  71559. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_6UVPoll__poll_stop(struct __pyx_obj_6uvloop_4loop_UVPoll *__pyx_v_self) {
  71560. int __pyx_v_err;
  71561. PyObject *__pyx_v_exc = NULL;
  71562. int __pyx_v_backend_id;
  71563. struct epoll_event __pyx_v_dummy_event;
  71564. PyObject *__pyx_r = NULL;
  71565. __Pyx_RefNannyDeclarations
  71566. int __pyx_t_1;
  71567. PyObject *__pyx_t_2 = NULL;
  71568. __Pyx_RefNannySetupContext("_poll_stop", 0);
  71569. /* "uvloop/handles/poll.pyx":54
  71570. * cdef int err
  71571. *
  71572. * if not self._is_alive(): # <<<<<<<<<<<<<<
  71573. * return
  71574. *
  71575. */
  71576. __pyx_t_1 = ((!(((struct __pyx_vtabstruct_6uvloop_4loop_UVPoll *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._is_alive(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)) != 0)) != 0);
  71577. if (__pyx_t_1) {
  71578. /* "uvloop/handles/poll.pyx":55
  71579. *
  71580. * if not self._is_alive():
  71581. * return # <<<<<<<<<<<<<<
  71582. *
  71583. * err = uv.uv_poll_stop(<uv.uv_poll_t*>self._handle)
  71584. */
  71585. __Pyx_XDECREF(__pyx_r);
  71586. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  71587. goto __pyx_L0;
  71588. /* "uvloop/handles/poll.pyx":54
  71589. * cdef int err
  71590. *
  71591. * if not self._is_alive(): # <<<<<<<<<<<<<<
  71592. * return
  71593. *
  71594. */
  71595. }
  71596. /* "uvloop/handles/poll.pyx":57
  71597. * return
  71598. *
  71599. * err = uv.uv_poll_stop(<uv.uv_poll_t*>self._handle) # <<<<<<<<<<<<<<
  71600. * if err < 0:
  71601. * exc = convert_error(err)
  71602. */
  71603. __pyx_v_err = uv_poll_stop(((uv_poll_t *)__pyx_v_self->__pyx_base._handle));
  71604. /* "uvloop/handles/poll.pyx":58
  71605. *
  71606. * err = uv.uv_poll_stop(<uv.uv_poll_t*>self._handle)
  71607. * if err < 0: # <<<<<<<<<<<<<<
  71608. * exc = convert_error(err)
  71609. * self._fatal_error(exc, True)
  71610. */
  71611. __pyx_t_1 = ((__pyx_v_err < 0) != 0);
  71612. if (__pyx_t_1) {
  71613. /* "uvloop/handles/poll.pyx":59
  71614. * err = uv.uv_poll_stop(<uv.uv_poll_t*>self._handle)
  71615. * if err < 0:
  71616. * exc = convert_error(err) # <<<<<<<<<<<<<<
  71617. * self._fatal_error(exc, True)
  71618. * return
  71619. */
  71620. __pyx_t_2 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 59, __pyx_L1_error)
  71621. __Pyx_GOTREF(__pyx_t_2);
  71622. __pyx_v_exc = __pyx_t_2;
  71623. __pyx_t_2 = 0;
  71624. /* "uvloop/handles/poll.pyx":60
  71625. * if err < 0:
  71626. * exc = convert_error(err)
  71627. * self._fatal_error(exc, True) # <<<<<<<<<<<<<<
  71628. * return
  71629. *
  71630. */
  71631. __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVPoll *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._fatal_error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self), __pyx_v_exc, Py_True, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 60, __pyx_L1_error)
  71632. __Pyx_GOTREF(__pyx_t_2);
  71633. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  71634. /* "uvloop/handles/poll.pyx":61
  71635. * exc = convert_error(err)
  71636. * self._fatal_error(exc, True)
  71637. * return # <<<<<<<<<<<<<<
  71638. *
  71639. * cdef:
  71640. */
  71641. __Pyx_XDECREF(__pyx_r);
  71642. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  71643. goto __pyx_L0;
  71644. /* "uvloop/handles/poll.pyx":58
  71645. *
  71646. * err = uv.uv_poll_stop(<uv.uv_poll_t*>self._handle)
  71647. * if err < 0: # <<<<<<<<<<<<<<
  71648. * exc = convert_error(err)
  71649. * self._fatal_error(exc, True)
  71650. */
  71651. }
  71652. /* "uvloop/handles/poll.pyx":67
  71653. * system.epoll_event dummy_event
  71654. *
  71655. * if system.PLATFORM_IS_LINUX: # <<<<<<<<<<<<<<
  71656. * # libuv doesn't remove the FD from epoll immediately
  71657. * # after uv_poll_stop or uv_poll_close, causing hard
  71658. */
  71659. __pyx_t_1 = (PLATFORM_IS_LINUX != 0);
  71660. if (__pyx_t_1) {
  71661. /* "uvloop/handles/poll.pyx":77
  71662. * # after calling uv_poll_stop.
  71663. *
  71664. * backend_id = uv.uv_backend_fd(self._loop.uvloop) # <<<<<<<<<<<<<<
  71665. * if backend_id != -1:
  71666. * memset(&dummy_event, 0, sizeof(dummy_event))
  71667. */
  71668. __pyx_v_backend_id = uv_backend_fd(__pyx_v_self->__pyx_base._loop->uvloop);
  71669. /* "uvloop/handles/poll.pyx":78
  71670. *
  71671. * backend_id = uv.uv_backend_fd(self._loop.uvloop)
  71672. * if backend_id != -1: # <<<<<<<<<<<<<<
  71673. * memset(&dummy_event, 0, sizeof(dummy_event))
  71674. * system.epoll_ctl(
  71675. */
  71676. __pyx_t_1 = ((__pyx_v_backend_id != -1L) != 0);
  71677. if (__pyx_t_1) {
  71678. /* "uvloop/handles/poll.pyx":79
  71679. * backend_id = uv.uv_backend_fd(self._loop.uvloop)
  71680. * if backend_id != -1:
  71681. * memset(&dummy_event, 0, sizeof(dummy_event)) # <<<<<<<<<<<<<<
  71682. * system.epoll_ctl(
  71683. * backend_id,
  71684. */
  71685. (void)(memset((&__pyx_v_dummy_event), 0, (sizeof(__pyx_v_dummy_event))));
  71686. /* "uvloop/handles/poll.pyx":80
  71687. * if backend_id != -1:
  71688. * memset(&dummy_event, 0, sizeof(dummy_event))
  71689. * system.epoll_ctl( # <<<<<<<<<<<<<<
  71690. * backend_id,
  71691. * system.EPOLL_CTL_DEL,
  71692. */
  71693. (void)(epoll_ctl(__pyx_v_backend_id, EPOLL_CTL_DEL, __pyx_v_self->fd, (&__pyx_v_dummy_event)));
  71694. /* "uvloop/handles/poll.pyx":78
  71695. *
  71696. * backend_id = uv.uv_backend_fd(self._loop.uvloop)
  71697. * if backend_id != -1: # <<<<<<<<<<<<<<
  71698. * memset(&dummy_event, 0, sizeof(dummy_event))
  71699. * system.epoll_ctl(
  71700. */
  71701. }
  71702. /* "uvloop/handles/poll.pyx":67
  71703. * system.epoll_event dummy_event
  71704. *
  71705. * if system.PLATFORM_IS_LINUX: # <<<<<<<<<<<<<<
  71706. * # libuv doesn't remove the FD from epoll immediately
  71707. * # after uv_poll_stop or uv_poll_close, causing hard
  71708. */
  71709. }
  71710. /* "uvloop/handles/poll.pyx":51
  71711. * return
  71712. *
  71713. * cdef inline _poll_stop(self): # <<<<<<<<<<<<<<
  71714. * cdef int err
  71715. *
  71716. */
  71717. /* function exit code */
  71718. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  71719. goto __pyx_L0;
  71720. __pyx_L1_error:;
  71721. __Pyx_XDECREF(__pyx_t_2);
  71722. __Pyx_AddTraceback("uvloop.loop.UVPoll._poll_stop", __pyx_clineno, __pyx_lineno, __pyx_filename);
  71723. __pyx_r = 0;
  71724. __pyx_L0:;
  71725. __Pyx_XDECREF(__pyx_v_exc);
  71726. __Pyx_XGIVEREF(__pyx_r);
  71727. __Pyx_RefNannyFinishContext();
  71728. return __pyx_r;
  71729. }
  71730. /* "uvloop/handles/poll.pyx":86
  71731. * &dummy_event) # ignore errors
  71732. *
  71733. * cdef is_reading(self): # <<<<<<<<<<<<<<
  71734. * return self._is_alive() and self.reading_handle is not None
  71735. *
  71736. */
  71737. static PyObject *__pyx_f_6uvloop_4loop_6UVPoll_is_reading(struct __pyx_obj_6uvloop_4loop_UVPoll *__pyx_v_self) {
  71738. PyObject *__pyx_r = NULL;
  71739. __Pyx_RefNannyDeclarations
  71740. PyObject *__pyx_t_1 = NULL;
  71741. int __pyx_t_2;
  71742. PyObject *__pyx_t_3 = NULL;
  71743. __Pyx_RefNannySetupContext("is_reading", 0);
  71744. /* "uvloop/handles/poll.pyx":87
  71745. *
  71746. * cdef is_reading(self):
  71747. * return self._is_alive() and self.reading_handle is not None # <<<<<<<<<<<<<<
  71748. *
  71749. * cdef is_writing(self):
  71750. */
  71751. __Pyx_XDECREF(__pyx_r);
  71752. __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVPoll *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._is_alive(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self));
  71753. if (__pyx_t_2) {
  71754. } else {
  71755. __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 87, __pyx_L1_error)
  71756. __Pyx_GOTREF(__pyx_t_3);
  71757. __pyx_t_1 = __pyx_t_3;
  71758. __pyx_t_3 = 0;
  71759. goto __pyx_L3_bool_binop_done;
  71760. }
  71761. __pyx_t_2 = (((PyObject *)__pyx_v_self->reading_handle) != Py_None);
  71762. __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 87, __pyx_L1_error)
  71763. __Pyx_GOTREF(__pyx_t_3);
  71764. __pyx_t_1 = __pyx_t_3;
  71765. __pyx_t_3 = 0;
  71766. __pyx_L3_bool_binop_done:;
  71767. __pyx_r = __pyx_t_1;
  71768. __pyx_t_1 = 0;
  71769. goto __pyx_L0;
  71770. /* "uvloop/handles/poll.pyx":86
  71771. * &dummy_event) # ignore errors
  71772. *
  71773. * cdef is_reading(self): # <<<<<<<<<<<<<<
  71774. * return self._is_alive() and self.reading_handle is not None
  71775. *
  71776. */
  71777. /* function exit code */
  71778. __pyx_L1_error:;
  71779. __Pyx_XDECREF(__pyx_t_1);
  71780. __Pyx_XDECREF(__pyx_t_3);
  71781. __Pyx_AddTraceback("uvloop.loop.UVPoll.is_reading", __pyx_clineno, __pyx_lineno, __pyx_filename);
  71782. __pyx_r = 0;
  71783. __pyx_L0:;
  71784. __Pyx_XGIVEREF(__pyx_r);
  71785. __Pyx_RefNannyFinishContext();
  71786. return __pyx_r;
  71787. }
  71788. /* "uvloop/handles/poll.pyx":89
  71789. * return self._is_alive() and self.reading_handle is not None
  71790. *
  71791. * cdef is_writing(self): # <<<<<<<<<<<<<<
  71792. * return self._is_alive() and self.writing_handle is not None
  71793. *
  71794. */
  71795. static PyObject *__pyx_f_6uvloop_4loop_6UVPoll_is_writing(struct __pyx_obj_6uvloop_4loop_UVPoll *__pyx_v_self) {
  71796. PyObject *__pyx_r = NULL;
  71797. __Pyx_RefNannyDeclarations
  71798. PyObject *__pyx_t_1 = NULL;
  71799. int __pyx_t_2;
  71800. PyObject *__pyx_t_3 = NULL;
  71801. __Pyx_RefNannySetupContext("is_writing", 0);
  71802. /* "uvloop/handles/poll.pyx":90
  71803. *
  71804. * cdef is_writing(self):
  71805. * return self._is_alive() and self.writing_handle is not None # <<<<<<<<<<<<<<
  71806. *
  71807. * cdef start_reading(self, Handle callback):
  71808. */
  71809. __Pyx_XDECREF(__pyx_r);
  71810. __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVPoll *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._is_alive(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self));
  71811. if (__pyx_t_2) {
  71812. } else {
  71813. __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 90, __pyx_L1_error)
  71814. __Pyx_GOTREF(__pyx_t_3);
  71815. __pyx_t_1 = __pyx_t_3;
  71816. __pyx_t_3 = 0;
  71817. goto __pyx_L3_bool_binop_done;
  71818. }
  71819. __pyx_t_2 = (((PyObject *)__pyx_v_self->writing_handle) != Py_None);
  71820. __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 90, __pyx_L1_error)
  71821. __Pyx_GOTREF(__pyx_t_3);
  71822. __pyx_t_1 = __pyx_t_3;
  71823. __pyx_t_3 = 0;
  71824. __pyx_L3_bool_binop_done:;
  71825. __pyx_r = __pyx_t_1;
  71826. __pyx_t_1 = 0;
  71827. goto __pyx_L0;
  71828. /* "uvloop/handles/poll.pyx":89
  71829. * return self._is_alive() and self.reading_handle is not None
  71830. *
  71831. * cdef is_writing(self): # <<<<<<<<<<<<<<
  71832. * return self._is_alive() and self.writing_handle is not None
  71833. *
  71834. */
  71835. /* function exit code */
  71836. __pyx_L1_error:;
  71837. __Pyx_XDECREF(__pyx_t_1);
  71838. __Pyx_XDECREF(__pyx_t_3);
  71839. __Pyx_AddTraceback("uvloop.loop.UVPoll.is_writing", __pyx_clineno, __pyx_lineno, __pyx_filename);
  71840. __pyx_r = 0;
  71841. __pyx_L0:;
  71842. __Pyx_XGIVEREF(__pyx_r);
  71843. __Pyx_RefNannyFinishContext();
  71844. return __pyx_r;
  71845. }
  71846. /* "uvloop/handles/poll.pyx":92
  71847. * return self._is_alive() and self.writing_handle is not None
  71848. *
  71849. * cdef start_reading(self, Handle callback): # <<<<<<<<<<<<<<
  71850. * cdef:
  71851. * int mask = 0
  71852. */
  71853. static PyObject *__pyx_f_6uvloop_4loop_6UVPoll_start_reading(struct __pyx_obj_6uvloop_4loop_UVPoll *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_callback) {
  71854. int __pyx_v_mask;
  71855. PyObject *__pyx_r = NULL;
  71856. __Pyx_RefNannyDeclarations
  71857. int __pyx_t_1;
  71858. int __pyx_t_2;
  71859. PyObject *__pyx_t_3 = NULL;
  71860. __Pyx_RefNannySetupContext("start_reading", 0);
  71861. /* "uvloop/handles/poll.pyx":94
  71862. * cdef start_reading(self, Handle callback):
  71863. * cdef:
  71864. * int mask = 0 # <<<<<<<<<<<<<<
  71865. *
  71866. * if self.reading_handle is None:
  71867. */
  71868. __pyx_v_mask = 0;
  71869. /* "uvloop/handles/poll.pyx":96
  71870. * int mask = 0
  71871. *
  71872. * if self.reading_handle is None: # <<<<<<<<<<<<<<
  71873. * # not reading right now, setup the handle
  71874. *
  71875. */
  71876. __pyx_t_1 = (((PyObject *)__pyx_v_self->reading_handle) == Py_None);
  71877. __pyx_t_2 = (__pyx_t_1 != 0);
  71878. if (__pyx_t_2) {
  71879. /* "uvloop/handles/poll.pyx":99
  71880. * # not reading right now, setup the handle
  71881. *
  71882. * mask = uv.UV_READABLE # <<<<<<<<<<<<<<
  71883. * if self.writing_handle is not None:
  71884. * # are we writing right now?
  71885. */
  71886. __pyx_v_mask = UV_READABLE;
  71887. /* "uvloop/handles/poll.pyx":100
  71888. *
  71889. * mask = uv.UV_READABLE
  71890. * if self.writing_handle is not None: # <<<<<<<<<<<<<<
  71891. * # are we writing right now?
  71892. * mask |= uv.UV_WRITABLE
  71893. */
  71894. __pyx_t_2 = (((PyObject *)__pyx_v_self->writing_handle) != Py_None);
  71895. __pyx_t_1 = (__pyx_t_2 != 0);
  71896. if (__pyx_t_1) {
  71897. /* "uvloop/handles/poll.pyx":102
  71898. * if self.writing_handle is not None:
  71899. * # are we writing right now?
  71900. * mask |= uv.UV_WRITABLE # <<<<<<<<<<<<<<
  71901. *
  71902. * self._poll_start(mask)
  71903. */
  71904. __pyx_v_mask = (__pyx_v_mask | UV_WRITABLE);
  71905. /* "uvloop/handles/poll.pyx":100
  71906. *
  71907. * mask = uv.UV_READABLE
  71908. * if self.writing_handle is not None: # <<<<<<<<<<<<<<
  71909. * # are we writing right now?
  71910. * mask |= uv.UV_WRITABLE
  71911. */
  71912. }
  71913. /* "uvloop/handles/poll.pyx":104
  71914. * mask |= uv.UV_WRITABLE
  71915. *
  71916. * self._poll_start(mask) # <<<<<<<<<<<<<<
  71917. * else:
  71918. * self.reading_handle._cancel()
  71919. */
  71920. __pyx_t_3 = __pyx_f_6uvloop_4loop_6UVPoll__poll_start(__pyx_v_self, __pyx_v_mask); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 104, __pyx_L1_error)
  71921. __Pyx_GOTREF(__pyx_t_3);
  71922. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  71923. /* "uvloop/handles/poll.pyx":96
  71924. * int mask = 0
  71925. *
  71926. * if self.reading_handle is None: # <<<<<<<<<<<<<<
  71927. * # not reading right now, setup the handle
  71928. *
  71929. */
  71930. goto __pyx_L3;
  71931. }
  71932. /* "uvloop/handles/poll.pyx":106
  71933. * self._poll_start(mask)
  71934. * else:
  71935. * self.reading_handle._cancel() # <<<<<<<<<<<<<<
  71936. *
  71937. * self.reading_handle = callback
  71938. */
  71939. /*else*/ {
  71940. __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_Handle *)__pyx_v_self->reading_handle->__pyx_vtab)->_cancel(__pyx_v_self->reading_handle); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 106, __pyx_L1_error)
  71941. __Pyx_GOTREF(__pyx_t_3);
  71942. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  71943. }
  71944. __pyx_L3:;
  71945. /* "uvloop/handles/poll.pyx":108
  71946. * self.reading_handle._cancel()
  71947. *
  71948. * self.reading_handle = callback # <<<<<<<<<<<<<<
  71949. *
  71950. * cdef start_writing(self, Handle callback):
  71951. */
  71952. __Pyx_INCREF(((PyObject *)__pyx_v_callback));
  71953. __Pyx_GIVEREF(((PyObject *)__pyx_v_callback));
  71954. __Pyx_GOTREF(__pyx_v_self->reading_handle);
  71955. __Pyx_DECREF(((PyObject *)__pyx_v_self->reading_handle));
  71956. __pyx_v_self->reading_handle = __pyx_v_callback;
  71957. /* "uvloop/handles/poll.pyx":92
  71958. * return self._is_alive() and self.writing_handle is not None
  71959. *
  71960. * cdef start_reading(self, Handle callback): # <<<<<<<<<<<<<<
  71961. * cdef:
  71962. * int mask = 0
  71963. */
  71964. /* function exit code */
  71965. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  71966. goto __pyx_L0;
  71967. __pyx_L1_error:;
  71968. __Pyx_XDECREF(__pyx_t_3);
  71969. __Pyx_AddTraceback("uvloop.loop.UVPoll.start_reading", __pyx_clineno, __pyx_lineno, __pyx_filename);
  71970. __pyx_r = 0;
  71971. __pyx_L0:;
  71972. __Pyx_XGIVEREF(__pyx_r);
  71973. __Pyx_RefNannyFinishContext();
  71974. return __pyx_r;
  71975. }
  71976. /* "uvloop/handles/poll.pyx":110
  71977. * self.reading_handle = callback
  71978. *
  71979. * cdef start_writing(self, Handle callback): # <<<<<<<<<<<<<<
  71980. * cdef:
  71981. * int mask = 0
  71982. */
  71983. static PyObject *__pyx_f_6uvloop_4loop_6UVPoll_start_writing(struct __pyx_obj_6uvloop_4loop_UVPoll *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_callback) {
  71984. int __pyx_v_mask;
  71985. PyObject *__pyx_r = NULL;
  71986. __Pyx_RefNannyDeclarations
  71987. int __pyx_t_1;
  71988. int __pyx_t_2;
  71989. PyObject *__pyx_t_3 = NULL;
  71990. __Pyx_RefNannySetupContext("start_writing", 0);
  71991. /* "uvloop/handles/poll.pyx":112
  71992. * cdef start_writing(self, Handle callback):
  71993. * cdef:
  71994. * int mask = 0 # <<<<<<<<<<<<<<
  71995. *
  71996. * if self.writing_handle is None:
  71997. */
  71998. __pyx_v_mask = 0;
  71999. /* "uvloop/handles/poll.pyx":114
  72000. * int mask = 0
  72001. *
  72002. * if self.writing_handle is None: # <<<<<<<<<<<<<<
  72003. * # not writing right now, setup the handle
  72004. *
  72005. */
  72006. __pyx_t_1 = (((PyObject *)__pyx_v_self->writing_handle) == Py_None);
  72007. __pyx_t_2 = (__pyx_t_1 != 0);
  72008. if (__pyx_t_2) {
  72009. /* "uvloop/handles/poll.pyx":117
  72010. * # not writing right now, setup the handle
  72011. *
  72012. * mask = uv.UV_WRITABLE # <<<<<<<<<<<<<<
  72013. * if self.reading_handle is not None:
  72014. * # are we reading right now?
  72015. */
  72016. __pyx_v_mask = UV_WRITABLE;
  72017. /* "uvloop/handles/poll.pyx":118
  72018. *
  72019. * mask = uv.UV_WRITABLE
  72020. * if self.reading_handle is not None: # <<<<<<<<<<<<<<
  72021. * # are we reading right now?
  72022. * mask |= uv.UV_READABLE
  72023. */
  72024. __pyx_t_2 = (((PyObject *)__pyx_v_self->reading_handle) != Py_None);
  72025. __pyx_t_1 = (__pyx_t_2 != 0);
  72026. if (__pyx_t_1) {
  72027. /* "uvloop/handles/poll.pyx":120
  72028. * if self.reading_handle is not None:
  72029. * # are we reading right now?
  72030. * mask |= uv.UV_READABLE # <<<<<<<<<<<<<<
  72031. *
  72032. * self._poll_start(mask)
  72033. */
  72034. __pyx_v_mask = (__pyx_v_mask | UV_READABLE);
  72035. /* "uvloop/handles/poll.pyx":118
  72036. *
  72037. * mask = uv.UV_WRITABLE
  72038. * if self.reading_handle is not None: # <<<<<<<<<<<<<<
  72039. * # are we reading right now?
  72040. * mask |= uv.UV_READABLE
  72041. */
  72042. }
  72043. /* "uvloop/handles/poll.pyx":122
  72044. * mask |= uv.UV_READABLE
  72045. *
  72046. * self._poll_start(mask) # <<<<<<<<<<<<<<
  72047. * else:
  72048. * self.writing_handle._cancel()
  72049. */
  72050. __pyx_t_3 = __pyx_f_6uvloop_4loop_6UVPoll__poll_start(__pyx_v_self, __pyx_v_mask); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 122, __pyx_L1_error)
  72051. __Pyx_GOTREF(__pyx_t_3);
  72052. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  72053. /* "uvloop/handles/poll.pyx":114
  72054. * int mask = 0
  72055. *
  72056. * if self.writing_handle is None: # <<<<<<<<<<<<<<
  72057. * # not writing right now, setup the handle
  72058. *
  72059. */
  72060. goto __pyx_L3;
  72061. }
  72062. /* "uvloop/handles/poll.pyx":124
  72063. * self._poll_start(mask)
  72064. * else:
  72065. * self.writing_handle._cancel() # <<<<<<<<<<<<<<
  72066. *
  72067. * self.writing_handle = callback
  72068. */
  72069. /*else*/ {
  72070. __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_Handle *)__pyx_v_self->writing_handle->__pyx_vtab)->_cancel(__pyx_v_self->writing_handle); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 124, __pyx_L1_error)
  72071. __Pyx_GOTREF(__pyx_t_3);
  72072. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  72073. }
  72074. __pyx_L3:;
  72075. /* "uvloop/handles/poll.pyx":126
  72076. * self.writing_handle._cancel()
  72077. *
  72078. * self.writing_handle = callback # <<<<<<<<<<<<<<
  72079. *
  72080. * cdef stop_reading(self):
  72081. */
  72082. __Pyx_INCREF(((PyObject *)__pyx_v_callback));
  72083. __Pyx_GIVEREF(((PyObject *)__pyx_v_callback));
  72084. __Pyx_GOTREF(__pyx_v_self->writing_handle);
  72085. __Pyx_DECREF(((PyObject *)__pyx_v_self->writing_handle));
  72086. __pyx_v_self->writing_handle = __pyx_v_callback;
  72087. /* "uvloop/handles/poll.pyx":110
  72088. * self.reading_handle = callback
  72089. *
  72090. * cdef start_writing(self, Handle callback): # <<<<<<<<<<<<<<
  72091. * cdef:
  72092. * int mask = 0
  72093. */
  72094. /* function exit code */
  72095. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  72096. goto __pyx_L0;
  72097. __pyx_L1_error:;
  72098. __Pyx_XDECREF(__pyx_t_3);
  72099. __Pyx_AddTraceback("uvloop.loop.UVPoll.start_writing", __pyx_clineno, __pyx_lineno, __pyx_filename);
  72100. __pyx_r = 0;
  72101. __pyx_L0:;
  72102. __Pyx_XGIVEREF(__pyx_r);
  72103. __Pyx_RefNannyFinishContext();
  72104. return __pyx_r;
  72105. }
  72106. /* "uvloop/handles/poll.pyx":128
  72107. * self.writing_handle = callback
  72108. *
  72109. * cdef stop_reading(self): # <<<<<<<<<<<<<<
  72110. * if self.reading_handle is None:
  72111. * return False
  72112. */
  72113. static PyObject *__pyx_f_6uvloop_4loop_6UVPoll_stop_reading(struct __pyx_obj_6uvloop_4loop_UVPoll *__pyx_v_self) {
  72114. PyObject *__pyx_r = NULL;
  72115. __Pyx_RefNannyDeclarations
  72116. int __pyx_t_1;
  72117. int __pyx_t_2;
  72118. PyObject *__pyx_t_3 = NULL;
  72119. __Pyx_RefNannySetupContext("stop_reading", 0);
  72120. /* "uvloop/handles/poll.pyx":129
  72121. *
  72122. * cdef stop_reading(self):
  72123. * if self.reading_handle is None: # <<<<<<<<<<<<<<
  72124. * return False
  72125. *
  72126. */
  72127. __pyx_t_1 = (((PyObject *)__pyx_v_self->reading_handle) == Py_None);
  72128. __pyx_t_2 = (__pyx_t_1 != 0);
  72129. if (__pyx_t_2) {
  72130. /* "uvloop/handles/poll.pyx":130
  72131. * cdef stop_reading(self):
  72132. * if self.reading_handle is None:
  72133. * return False # <<<<<<<<<<<<<<
  72134. *
  72135. * self.reading_handle._cancel()
  72136. */
  72137. __Pyx_XDECREF(__pyx_r);
  72138. __Pyx_INCREF(Py_False);
  72139. __pyx_r = Py_False;
  72140. goto __pyx_L0;
  72141. /* "uvloop/handles/poll.pyx":129
  72142. *
  72143. * cdef stop_reading(self):
  72144. * if self.reading_handle is None: # <<<<<<<<<<<<<<
  72145. * return False
  72146. *
  72147. */
  72148. }
  72149. /* "uvloop/handles/poll.pyx":132
  72150. * return False
  72151. *
  72152. * self.reading_handle._cancel() # <<<<<<<<<<<<<<
  72153. * self.reading_handle = None
  72154. *
  72155. */
  72156. __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_Handle *)__pyx_v_self->reading_handle->__pyx_vtab)->_cancel(__pyx_v_self->reading_handle); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 132, __pyx_L1_error)
  72157. __Pyx_GOTREF(__pyx_t_3);
  72158. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  72159. /* "uvloop/handles/poll.pyx":133
  72160. *
  72161. * self.reading_handle._cancel()
  72162. * self.reading_handle = None # <<<<<<<<<<<<<<
  72163. *
  72164. * if self.writing_handle is None:
  72165. */
  72166. __Pyx_INCREF(Py_None);
  72167. __Pyx_GIVEREF(Py_None);
  72168. __Pyx_GOTREF(__pyx_v_self->reading_handle);
  72169. __Pyx_DECREF(((PyObject *)__pyx_v_self->reading_handle));
  72170. __pyx_v_self->reading_handle = ((struct __pyx_obj_6uvloop_4loop_Handle *)Py_None);
  72171. /* "uvloop/handles/poll.pyx":135
  72172. * self.reading_handle = None
  72173. *
  72174. * if self.writing_handle is None: # <<<<<<<<<<<<<<
  72175. * self.stop()
  72176. * else:
  72177. */
  72178. __pyx_t_2 = (((PyObject *)__pyx_v_self->writing_handle) == Py_None);
  72179. __pyx_t_1 = (__pyx_t_2 != 0);
  72180. if (__pyx_t_1) {
  72181. /* "uvloop/handles/poll.pyx":136
  72182. *
  72183. * if self.writing_handle is None:
  72184. * self.stop() # <<<<<<<<<<<<<<
  72185. * else:
  72186. * self._poll_start(uv.UV_WRITABLE)
  72187. */
  72188. __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVPoll *)__pyx_v_self->__pyx_base.__pyx_vtab)->stop(__pyx_v_self); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 136, __pyx_L1_error)
  72189. __Pyx_GOTREF(__pyx_t_3);
  72190. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  72191. /* "uvloop/handles/poll.pyx":135
  72192. * self.reading_handle = None
  72193. *
  72194. * if self.writing_handle is None: # <<<<<<<<<<<<<<
  72195. * self.stop()
  72196. * else:
  72197. */
  72198. goto __pyx_L4;
  72199. }
  72200. /* "uvloop/handles/poll.pyx":138
  72201. * self.stop()
  72202. * else:
  72203. * self._poll_start(uv.UV_WRITABLE) # <<<<<<<<<<<<<<
  72204. *
  72205. * return True
  72206. */
  72207. /*else*/ {
  72208. __pyx_t_3 = __pyx_f_6uvloop_4loop_6UVPoll__poll_start(__pyx_v_self, UV_WRITABLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 138, __pyx_L1_error)
  72209. __Pyx_GOTREF(__pyx_t_3);
  72210. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  72211. }
  72212. __pyx_L4:;
  72213. /* "uvloop/handles/poll.pyx":140
  72214. * self._poll_start(uv.UV_WRITABLE)
  72215. *
  72216. * return True # <<<<<<<<<<<<<<
  72217. *
  72218. * cdef stop_writing(self):
  72219. */
  72220. __Pyx_XDECREF(__pyx_r);
  72221. __Pyx_INCREF(Py_True);
  72222. __pyx_r = Py_True;
  72223. goto __pyx_L0;
  72224. /* "uvloop/handles/poll.pyx":128
  72225. * self.writing_handle = callback
  72226. *
  72227. * cdef stop_reading(self): # <<<<<<<<<<<<<<
  72228. * if self.reading_handle is None:
  72229. * return False
  72230. */
  72231. /* function exit code */
  72232. __pyx_L1_error:;
  72233. __Pyx_XDECREF(__pyx_t_3);
  72234. __Pyx_AddTraceback("uvloop.loop.UVPoll.stop_reading", __pyx_clineno, __pyx_lineno, __pyx_filename);
  72235. __pyx_r = 0;
  72236. __pyx_L0:;
  72237. __Pyx_XGIVEREF(__pyx_r);
  72238. __Pyx_RefNannyFinishContext();
  72239. return __pyx_r;
  72240. }
  72241. /* "uvloop/handles/poll.pyx":142
  72242. * return True
  72243. *
  72244. * cdef stop_writing(self): # <<<<<<<<<<<<<<
  72245. * if self.writing_handle is None:
  72246. * return False
  72247. */
  72248. static PyObject *__pyx_f_6uvloop_4loop_6UVPoll_stop_writing(struct __pyx_obj_6uvloop_4loop_UVPoll *__pyx_v_self) {
  72249. PyObject *__pyx_r = NULL;
  72250. __Pyx_RefNannyDeclarations
  72251. int __pyx_t_1;
  72252. int __pyx_t_2;
  72253. PyObject *__pyx_t_3 = NULL;
  72254. __Pyx_RefNannySetupContext("stop_writing", 0);
  72255. /* "uvloop/handles/poll.pyx":143
  72256. *
  72257. * cdef stop_writing(self):
  72258. * if self.writing_handle is None: # <<<<<<<<<<<<<<
  72259. * return False
  72260. *
  72261. */
  72262. __pyx_t_1 = (((PyObject *)__pyx_v_self->writing_handle) == Py_None);
  72263. __pyx_t_2 = (__pyx_t_1 != 0);
  72264. if (__pyx_t_2) {
  72265. /* "uvloop/handles/poll.pyx":144
  72266. * cdef stop_writing(self):
  72267. * if self.writing_handle is None:
  72268. * return False # <<<<<<<<<<<<<<
  72269. *
  72270. * self.writing_handle._cancel()
  72271. */
  72272. __Pyx_XDECREF(__pyx_r);
  72273. __Pyx_INCREF(Py_False);
  72274. __pyx_r = Py_False;
  72275. goto __pyx_L0;
  72276. /* "uvloop/handles/poll.pyx":143
  72277. *
  72278. * cdef stop_writing(self):
  72279. * if self.writing_handle is None: # <<<<<<<<<<<<<<
  72280. * return False
  72281. *
  72282. */
  72283. }
  72284. /* "uvloop/handles/poll.pyx":146
  72285. * return False
  72286. *
  72287. * self.writing_handle._cancel() # <<<<<<<<<<<<<<
  72288. * self.writing_handle = None
  72289. *
  72290. */
  72291. __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_Handle *)__pyx_v_self->writing_handle->__pyx_vtab)->_cancel(__pyx_v_self->writing_handle); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 146, __pyx_L1_error)
  72292. __Pyx_GOTREF(__pyx_t_3);
  72293. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  72294. /* "uvloop/handles/poll.pyx":147
  72295. *
  72296. * self.writing_handle._cancel()
  72297. * self.writing_handle = None # <<<<<<<<<<<<<<
  72298. *
  72299. * if self.reading_handle is None:
  72300. */
  72301. __Pyx_INCREF(Py_None);
  72302. __Pyx_GIVEREF(Py_None);
  72303. __Pyx_GOTREF(__pyx_v_self->writing_handle);
  72304. __Pyx_DECREF(((PyObject *)__pyx_v_self->writing_handle));
  72305. __pyx_v_self->writing_handle = ((struct __pyx_obj_6uvloop_4loop_Handle *)Py_None);
  72306. /* "uvloop/handles/poll.pyx":149
  72307. * self.writing_handle = None
  72308. *
  72309. * if self.reading_handle is None: # <<<<<<<<<<<<<<
  72310. * self.stop()
  72311. * else:
  72312. */
  72313. __pyx_t_2 = (((PyObject *)__pyx_v_self->reading_handle) == Py_None);
  72314. __pyx_t_1 = (__pyx_t_2 != 0);
  72315. if (__pyx_t_1) {
  72316. /* "uvloop/handles/poll.pyx":150
  72317. *
  72318. * if self.reading_handle is None:
  72319. * self.stop() # <<<<<<<<<<<<<<
  72320. * else:
  72321. * self._poll_start(uv.UV_READABLE)
  72322. */
  72323. __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVPoll *)__pyx_v_self->__pyx_base.__pyx_vtab)->stop(__pyx_v_self); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 150, __pyx_L1_error)
  72324. __Pyx_GOTREF(__pyx_t_3);
  72325. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  72326. /* "uvloop/handles/poll.pyx":149
  72327. * self.writing_handle = None
  72328. *
  72329. * if self.reading_handle is None: # <<<<<<<<<<<<<<
  72330. * self.stop()
  72331. * else:
  72332. */
  72333. goto __pyx_L4;
  72334. }
  72335. /* "uvloop/handles/poll.pyx":152
  72336. * self.stop()
  72337. * else:
  72338. * self._poll_start(uv.UV_READABLE) # <<<<<<<<<<<<<<
  72339. *
  72340. * return True
  72341. */
  72342. /*else*/ {
  72343. __pyx_t_3 = __pyx_f_6uvloop_4loop_6UVPoll__poll_start(__pyx_v_self, UV_READABLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 152, __pyx_L1_error)
  72344. __Pyx_GOTREF(__pyx_t_3);
  72345. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  72346. }
  72347. __pyx_L4:;
  72348. /* "uvloop/handles/poll.pyx":154
  72349. * self._poll_start(uv.UV_READABLE)
  72350. *
  72351. * return True # <<<<<<<<<<<<<<
  72352. *
  72353. * cdef stop(self):
  72354. */
  72355. __Pyx_XDECREF(__pyx_r);
  72356. __Pyx_INCREF(Py_True);
  72357. __pyx_r = Py_True;
  72358. goto __pyx_L0;
  72359. /* "uvloop/handles/poll.pyx":142
  72360. * return True
  72361. *
  72362. * cdef stop_writing(self): # <<<<<<<<<<<<<<
  72363. * if self.writing_handle is None:
  72364. * return False
  72365. */
  72366. /* function exit code */
  72367. __pyx_L1_error:;
  72368. __Pyx_XDECREF(__pyx_t_3);
  72369. __Pyx_AddTraceback("uvloop.loop.UVPoll.stop_writing", __pyx_clineno, __pyx_lineno, __pyx_filename);
  72370. __pyx_r = 0;
  72371. __pyx_L0:;
  72372. __Pyx_XGIVEREF(__pyx_r);
  72373. __Pyx_RefNannyFinishContext();
  72374. return __pyx_r;
  72375. }
  72376. /* "uvloop/handles/poll.pyx":156
  72377. * return True
  72378. *
  72379. * cdef stop(self): # <<<<<<<<<<<<<<
  72380. * if self.reading_handle is not None:
  72381. * self.reading_handle._cancel()
  72382. */
  72383. static PyObject *__pyx_f_6uvloop_4loop_6UVPoll_stop(struct __pyx_obj_6uvloop_4loop_UVPoll *__pyx_v_self) {
  72384. PyObject *__pyx_r = NULL;
  72385. __Pyx_RefNannyDeclarations
  72386. int __pyx_t_1;
  72387. int __pyx_t_2;
  72388. PyObject *__pyx_t_3 = NULL;
  72389. __Pyx_RefNannySetupContext("stop", 0);
  72390. /* "uvloop/handles/poll.pyx":157
  72391. *
  72392. * cdef stop(self):
  72393. * if self.reading_handle is not None: # <<<<<<<<<<<<<<
  72394. * self.reading_handle._cancel()
  72395. * self.reading_handle = None
  72396. */
  72397. __pyx_t_1 = (((PyObject *)__pyx_v_self->reading_handle) != Py_None);
  72398. __pyx_t_2 = (__pyx_t_1 != 0);
  72399. if (__pyx_t_2) {
  72400. /* "uvloop/handles/poll.pyx":158
  72401. * cdef stop(self):
  72402. * if self.reading_handle is not None:
  72403. * self.reading_handle._cancel() # <<<<<<<<<<<<<<
  72404. * self.reading_handle = None
  72405. *
  72406. */
  72407. __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_Handle *)__pyx_v_self->reading_handle->__pyx_vtab)->_cancel(__pyx_v_self->reading_handle); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 158, __pyx_L1_error)
  72408. __Pyx_GOTREF(__pyx_t_3);
  72409. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  72410. /* "uvloop/handles/poll.pyx":159
  72411. * if self.reading_handle is not None:
  72412. * self.reading_handle._cancel()
  72413. * self.reading_handle = None # <<<<<<<<<<<<<<
  72414. *
  72415. * if self.writing_handle is not None:
  72416. */
  72417. __Pyx_INCREF(Py_None);
  72418. __Pyx_GIVEREF(Py_None);
  72419. __Pyx_GOTREF(__pyx_v_self->reading_handle);
  72420. __Pyx_DECREF(((PyObject *)__pyx_v_self->reading_handle));
  72421. __pyx_v_self->reading_handle = ((struct __pyx_obj_6uvloop_4loop_Handle *)Py_None);
  72422. /* "uvloop/handles/poll.pyx":157
  72423. *
  72424. * cdef stop(self):
  72425. * if self.reading_handle is not None: # <<<<<<<<<<<<<<
  72426. * self.reading_handle._cancel()
  72427. * self.reading_handle = None
  72428. */
  72429. }
  72430. /* "uvloop/handles/poll.pyx":161
  72431. * self.reading_handle = None
  72432. *
  72433. * if self.writing_handle is not None: # <<<<<<<<<<<<<<
  72434. * self.writing_handle._cancel()
  72435. * self.writing_handle = None
  72436. */
  72437. __pyx_t_2 = (((PyObject *)__pyx_v_self->writing_handle) != Py_None);
  72438. __pyx_t_1 = (__pyx_t_2 != 0);
  72439. if (__pyx_t_1) {
  72440. /* "uvloop/handles/poll.pyx":162
  72441. *
  72442. * if self.writing_handle is not None:
  72443. * self.writing_handle._cancel() # <<<<<<<<<<<<<<
  72444. * self.writing_handle = None
  72445. *
  72446. */
  72447. __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_Handle *)__pyx_v_self->writing_handle->__pyx_vtab)->_cancel(__pyx_v_self->writing_handle); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 162, __pyx_L1_error)
  72448. __Pyx_GOTREF(__pyx_t_3);
  72449. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  72450. /* "uvloop/handles/poll.pyx":163
  72451. * if self.writing_handle is not None:
  72452. * self.writing_handle._cancel()
  72453. * self.writing_handle = None # <<<<<<<<<<<<<<
  72454. *
  72455. * self._poll_stop()
  72456. */
  72457. __Pyx_INCREF(Py_None);
  72458. __Pyx_GIVEREF(Py_None);
  72459. __Pyx_GOTREF(__pyx_v_self->writing_handle);
  72460. __Pyx_DECREF(((PyObject *)__pyx_v_self->writing_handle));
  72461. __pyx_v_self->writing_handle = ((struct __pyx_obj_6uvloop_4loop_Handle *)Py_None);
  72462. /* "uvloop/handles/poll.pyx":161
  72463. * self.reading_handle = None
  72464. *
  72465. * if self.writing_handle is not None: # <<<<<<<<<<<<<<
  72466. * self.writing_handle._cancel()
  72467. * self.writing_handle = None
  72468. */
  72469. }
  72470. /* "uvloop/handles/poll.pyx":165
  72471. * self.writing_handle = None
  72472. *
  72473. * self._poll_stop() # <<<<<<<<<<<<<<
  72474. *
  72475. * cdef _close(self):
  72476. */
  72477. __pyx_t_3 = __pyx_f_6uvloop_4loop_6UVPoll__poll_stop(__pyx_v_self); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 165, __pyx_L1_error)
  72478. __Pyx_GOTREF(__pyx_t_3);
  72479. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  72480. /* "uvloop/handles/poll.pyx":156
  72481. * return True
  72482. *
  72483. * cdef stop(self): # <<<<<<<<<<<<<<
  72484. * if self.reading_handle is not None:
  72485. * self.reading_handle._cancel()
  72486. */
  72487. /* function exit code */
  72488. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  72489. goto __pyx_L0;
  72490. __pyx_L1_error:;
  72491. __Pyx_XDECREF(__pyx_t_3);
  72492. __Pyx_AddTraceback("uvloop.loop.UVPoll.stop", __pyx_clineno, __pyx_lineno, __pyx_filename);
  72493. __pyx_r = 0;
  72494. __pyx_L0:;
  72495. __Pyx_XGIVEREF(__pyx_r);
  72496. __Pyx_RefNannyFinishContext();
  72497. return __pyx_r;
  72498. }
  72499. /* "uvloop/handles/poll.pyx":167
  72500. * self._poll_stop()
  72501. *
  72502. * cdef _close(self): # <<<<<<<<<<<<<<
  72503. * if self.is_active():
  72504. * self.stop()
  72505. */
  72506. static PyObject *__pyx_f_6uvloop_4loop_6UVPoll__close(struct __pyx_obj_6uvloop_4loop_UVPoll *__pyx_v_self) {
  72507. PyObject *__pyx_r = NULL;
  72508. __Pyx_RefNannyDeclarations
  72509. int __pyx_t_1;
  72510. PyObject *__pyx_t_2 = NULL;
  72511. __Pyx_RefNannySetupContext("_close", 0);
  72512. /* "uvloop/handles/poll.pyx":168
  72513. *
  72514. * cdef _close(self):
  72515. * if self.is_active(): # <<<<<<<<<<<<<<
  72516. * self.stop()
  72517. *
  72518. */
  72519. __pyx_t_1 = (((struct __pyx_vtabstruct_6uvloop_4loop_UVPoll *)__pyx_v_self->__pyx_base.__pyx_vtab)->is_active(__pyx_v_self) != 0);
  72520. if (__pyx_t_1) {
  72521. /* "uvloop/handles/poll.pyx":169
  72522. * cdef _close(self):
  72523. * if self.is_active():
  72524. * self.stop() # <<<<<<<<<<<<<<
  72525. *
  72526. * UVHandle._close(<UVHandle>self)
  72527. */
  72528. __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVPoll *)__pyx_v_self->__pyx_base.__pyx_vtab)->stop(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 169, __pyx_L1_error)
  72529. __Pyx_GOTREF(__pyx_t_2);
  72530. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  72531. /* "uvloop/handles/poll.pyx":168
  72532. *
  72533. * cdef _close(self):
  72534. * if self.is_active(): # <<<<<<<<<<<<<<
  72535. * self.stop()
  72536. *
  72537. */
  72538. }
  72539. /* "uvloop/handles/poll.pyx":171
  72540. * self.stop()
  72541. *
  72542. * UVHandle._close(<UVHandle>self) # <<<<<<<<<<<<<<
  72543. *
  72544. * cdef _fatal_error(self, exc, throw, reason=None):
  72545. */
  72546. __pyx_t_2 = __pyx_f_6uvloop_4loop_8UVHandle__close(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 171, __pyx_L1_error)
  72547. __Pyx_GOTREF(__pyx_t_2);
  72548. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  72549. /* "uvloop/handles/poll.pyx":167
  72550. * self._poll_stop()
  72551. *
  72552. * cdef _close(self): # <<<<<<<<<<<<<<
  72553. * if self.is_active():
  72554. * self.stop()
  72555. */
  72556. /* function exit code */
  72557. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  72558. goto __pyx_L0;
  72559. __pyx_L1_error:;
  72560. __Pyx_XDECREF(__pyx_t_2);
  72561. __Pyx_AddTraceback("uvloop.loop.UVPoll._close", __pyx_clineno, __pyx_lineno, __pyx_filename);
  72562. __pyx_r = 0;
  72563. __pyx_L0:;
  72564. __Pyx_XGIVEREF(__pyx_r);
  72565. __Pyx_RefNannyFinishContext();
  72566. return __pyx_r;
  72567. }
  72568. /* "uvloop/handles/poll.pyx":173
  72569. * UVHandle._close(<UVHandle>self)
  72570. *
  72571. * cdef _fatal_error(self, exc, throw, reason=None): # <<<<<<<<<<<<<<
  72572. * try:
  72573. * if self.reading_handle is not None:
  72574. */
  72575. static PyObject *__pyx_f_6uvloop_4loop_6UVPoll__fatal_error(struct __pyx_obj_6uvloop_4loop_UVPoll *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_exc, CYTHON_UNUSED PyObject *__pyx_v_throw, struct __pyx_opt_args_6uvloop_4loop_6UVPoll__fatal_error *__pyx_optional_args) {
  72576. PyObject *__pyx_v_ex = NULL;
  72577. PyObject *__pyx_r = NULL;
  72578. __Pyx_RefNannyDeclarations
  72579. int __pyx_t_1;
  72580. int __pyx_t_2;
  72581. PyObject *__pyx_t_3 = NULL;
  72582. PyObject *__pyx_t_4 = NULL;
  72583. PyObject *__pyx_t_5 = NULL;
  72584. PyObject *__pyx_t_6 = NULL;
  72585. int __pyx_t_7;
  72586. PyObject *__pyx_t_8 = NULL;
  72587. PyObject *__pyx_t_9 = NULL;
  72588. int __pyx_t_10;
  72589. char const *__pyx_t_11;
  72590. PyObject *__pyx_t_12 = NULL;
  72591. PyObject *__pyx_t_13 = NULL;
  72592. PyObject *__pyx_t_14 = NULL;
  72593. __Pyx_RefNannySetupContext("_fatal_error", 0);
  72594. if (__pyx_optional_args) {
  72595. }
  72596. /* "uvloop/handles/poll.pyx":174
  72597. *
  72598. * cdef _fatal_error(self, exc, throw, reason=None):
  72599. * try: # <<<<<<<<<<<<<<
  72600. * if self.reading_handle is not None:
  72601. * try:
  72602. */
  72603. /*try:*/ {
  72604. /* "uvloop/handles/poll.pyx":175
  72605. * cdef _fatal_error(self, exc, throw, reason=None):
  72606. * try:
  72607. * if self.reading_handle is not None: # <<<<<<<<<<<<<<
  72608. * try:
  72609. * self.reading_handle._run()
  72610. */
  72611. __pyx_t_1 = (((PyObject *)__pyx_v_self->reading_handle) != Py_None);
  72612. __pyx_t_2 = (__pyx_t_1 != 0);
  72613. if (__pyx_t_2) {
  72614. /* "uvloop/handles/poll.pyx":176
  72615. * try:
  72616. * if self.reading_handle is not None:
  72617. * try: # <<<<<<<<<<<<<<
  72618. * self.reading_handle._run()
  72619. * except BaseException as ex:
  72620. */
  72621. {
  72622. __Pyx_PyThreadState_declare
  72623. __Pyx_PyThreadState_assign
  72624. __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
  72625. __Pyx_XGOTREF(__pyx_t_3);
  72626. __Pyx_XGOTREF(__pyx_t_4);
  72627. __Pyx_XGOTREF(__pyx_t_5);
  72628. /*try:*/ {
  72629. /* "uvloop/handles/poll.pyx":177
  72630. * if self.reading_handle is not None:
  72631. * try:
  72632. * self.reading_handle._run() # <<<<<<<<<<<<<<
  72633. * except BaseException as ex:
  72634. * self._loop._handle_exception(ex)
  72635. */
  72636. __pyx_t_6 = __pyx_f_6uvloop_4loop_6Handle__run(__pyx_v_self->reading_handle); if (unlikely(!__pyx_t_6)) __PYX_ERR(15, 177, __pyx_L7_error)
  72637. __Pyx_GOTREF(__pyx_t_6);
  72638. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  72639. /* "uvloop/handles/poll.pyx":176
  72640. * try:
  72641. * if self.reading_handle is not None:
  72642. * try: # <<<<<<<<<<<<<<
  72643. * self.reading_handle._run()
  72644. * except BaseException as ex:
  72645. */
  72646. }
  72647. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  72648. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  72649. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  72650. goto __pyx_L12_try_end;
  72651. __pyx_L7_error:;
  72652. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  72653. /* "uvloop/handles/poll.pyx":178
  72654. * try:
  72655. * self.reading_handle._run()
  72656. * except BaseException as ex: # <<<<<<<<<<<<<<
  72657. * self._loop._handle_exception(ex)
  72658. * self.reading_handle = None
  72659. */
  72660. __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_BaseException);
  72661. if (__pyx_t_7) {
  72662. __Pyx_AddTraceback("uvloop.loop.UVPoll._fatal_error", __pyx_clineno, __pyx_lineno, __pyx_filename);
  72663. if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_8, &__pyx_t_9) < 0) __PYX_ERR(15, 178, __pyx_L9_except_error)
  72664. __Pyx_GOTREF(__pyx_t_6);
  72665. __Pyx_GOTREF(__pyx_t_8);
  72666. __Pyx_GOTREF(__pyx_t_9);
  72667. __Pyx_INCREF(__pyx_t_8);
  72668. __pyx_v_ex = __pyx_t_8;
  72669. /*try:*/ {
  72670. /* "uvloop/handles/poll.pyx":179
  72671. * self.reading_handle._run()
  72672. * except BaseException as ex:
  72673. * self._loop._handle_exception(ex) # <<<<<<<<<<<<<<
  72674. * self.reading_handle = None
  72675. *
  72676. */
  72677. ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_base._loop->__pyx_vtab)->_handle_exception(__pyx_v_self->__pyx_base._loop, __pyx_v_ex);
  72678. }
  72679. /* "uvloop/handles/poll.pyx":178
  72680. * try:
  72681. * self.reading_handle._run()
  72682. * except BaseException as ex: # <<<<<<<<<<<<<<
  72683. * self._loop._handle_exception(ex)
  72684. * self.reading_handle = None
  72685. */
  72686. /*finally:*/ {
  72687. /*normal exit:*/{
  72688. __Pyx_DECREF(__pyx_v_ex);
  72689. __pyx_v_ex = NULL;
  72690. goto __pyx_L19;
  72691. }
  72692. __pyx_L19:;
  72693. }
  72694. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  72695. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  72696. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  72697. goto __pyx_L8_exception_handled;
  72698. }
  72699. goto __pyx_L9_except_error;
  72700. __pyx_L9_except_error:;
  72701. /* "uvloop/handles/poll.pyx":176
  72702. * try:
  72703. * if self.reading_handle is not None:
  72704. * try: # <<<<<<<<<<<<<<
  72705. * self.reading_handle._run()
  72706. * except BaseException as ex:
  72707. */
  72708. __Pyx_XGIVEREF(__pyx_t_3);
  72709. __Pyx_XGIVEREF(__pyx_t_4);
  72710. __Pyx_XGIVEREF(__pyx_t_5);
  72711. __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
  72712. goto __pyx_L4_error;
  72713. __pyx_L8_exception_handled:;
  72714. __Pyx_XGIVEREF(__pyx_t_3);
  72715. __Pyx_XGIVEREF(__pyx_t_4);
  72716. __Pyx_XGIVEREF(__pyx_t_5);
  72717. __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
  72718. __pyx_L12_try_end:;
  72719. }
  72720. /* "uvloop/handles/poll.pyx":180
  72721. * except BaseException as ex:
  72722. * self._loop._handle_exception(ex)
  72723. * self.reading_handle = None # <<<<<<<<<<<<<<
  72724. *
  72725. * if self.writing_handle is not None:
  72726. */
  72727. __Pyx_INCREF(Py_None);
  72728. __Pyx_GIVEREF(Py_None);
  72729. __Pyx_GOTREF(__pyx_v_self->reading_handle);
  72730. __Pyx_DECREF(((PyObject *)__pyx_v_self->reading_handle));
  72731. __pyx_v_self->reading_handle = ((struct __pyx_obj_6uvloop_4loop_Handle *)Py_None);
  72732. /* "uvloop/handles/poll.pyx":175
  72733. * cdef _fatal_error(self, exc, throw, reason=None):
  72734. * try:
  72735. * if self.reading_handle is not None: # <<<<<<<<<<<<<<
  72736. * try:
  72737. * self.reading_handle._run()
  72738. */
  72739. }
  72740. /* "uvloop/handles/poll.pyx":182
  72741. * self.reading_handle = None
  72742. *
  72743. * if self.writing_handle is not None: # <<<<<<<<<<<<<<
  72744. * try:
  72745. * self.writing_handle._run()
  72746. */
  72747. __pyx_t_2 = (((PyObject *)__pyx_v_self->writing_handle) != Py_None);
  72748. __pyx_t_1 = (__pyx_t_2 != 0);
  72749. if (__pyx_t_1) {
  72750. /* "uvloop/handles/poll.pyx":183
  72751. *
  72752. * if self.writing_handle is not None:
  72753. * try: # <<<<<<<<<<<<<<
  72754. * self.writing_handle._run()
  72755. * except BaseException as ex:
  72756. */
  72757. {
  72758. __Pyx_PyThreadState_declare
  72759. __Pyx_PyThreadState_assign
  72760. __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_4, &__pyx_t_3);
  72761. __Pyx_XGOTREF(__pyx_t_5);
  72762. __Pyx_XGOTREF(__pyx_t_4);
  72763. __Pyx_XGOTREF(__pyx_t_3);
  72764. /*try:*/ {
  72765. /* "uvloop/handles/poll.pyx":184
  72766. * if self.writing_handle is not None:
  72767. * try:
  72768. * self.writing_handle._run() # <<<<<<<<<<<<<<
  72769. * except BaseException as ex:
  72770. * self._loop._handle_exception(ex)
  72771. */
  72772. __pyx_t_9 = __pyx_f_6uvloop_4loop_6Handle__run(__pyx_v_self->writing_handle); if (unlikely(!__pyx_t_9)) __PYX_ERR(15, 184, __pyx_L21_error)
  72773. __Pyx_GOTREF(__pyx_t_9);
  72774. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  72775. /* "uvloop/handles/poll.pyx":183
  72776. *
  72777. * if self.writing_handle is not None:
  72778. * try: # <<<<<<<<<<<<<<
  72779. * self.writing_handle._run()
  72780. * except BaseException as ex:
  72781. */
  72782. }
  72783. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  72784. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  72785. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  72786. goto __pyx_L26_try_end;
  72787. __pyx_L21_error:;
  72788. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  72789. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  72790. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  72791. /* "uvloop/handles/poll.pyx":185
  72792. * try:
  72793. * self.writing_handle._run()
  72794. * except BaseException as ex: # <<<<<<<<<<<<<<
  72795. * self._loop._handle_exception(ex)
  72796. * self.writing_handle = None
  72797. */
  72798. __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_BaseException);
  72799. if (__pyx_t_7) {
  72800. __Pyx_AddTraceback("uvloop.loop.UVPoll._fatal_error", __pyx_clineno, __pyx_lineno, __pyx_filename);
  72801. if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_8, &__pyx_t_6) < 0) __PYX_ERR(15, 185, __pyx_L23_except_error)
  72802. __Pyx_GOTREF(__pyx_t_9);
  72803. __Pyx_GOTREF(__pyx_t_8);
  72804. __Pyx_GOTREF(__pyx_t_6);
  72805. __Pyx_INCREF(__pyx_t_8);
  72806. __pyx_v_ex = __pyx_t_8;
  72807. /*try:*/ {
  72808. /* "uvloop/handles/poll.pyx":186
  72809. * self.writing_handle._run()
  72810. * except BaseException as ex:
  72811. * self._loop._handle_exception(ex) # <<<<<<<<<<<<<<
  72812. * self.writing_handle = None
  72813. *
  72814. */
  72815. ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_base._loop->__pyx_vtab)->_handle_exception(__pyx_v_self->__pyx_base._loop, __pyx_v_ex);
  72816. }
  72817. /* "uvloop/handles/poll.pyx":185
  72818. * try:
  72819. * self.writing_handle._run()
  72820. * except BaseException as ex: # <<<<<<<<<<<<<<
  72821. * self._loop._handle_exception(ex)
  72822. * self.writing_handle = None
  72823. */
  72824. /*finally:*/ {
  72825. /*normal exit:*/{
  72826. __Pyx_DECREF(__pyx_v_ex);
  72827. __pyx_v_ex = NULL;
  72828. goto __pyx_L33;
  72829. }
  72830. __pyx_L33:;
  72831. }
  72832. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  72833. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  72834. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  72835. goto __pyx_L22_exception_handled;
  72836. }
  72837. goto __pyx_L23_except_error;
  72838. __pyx_L23_except_error:;
  72839. /* "uvloop/handles/poll.pyx":183
  72840. *
  72841. * if self.writing_handle is not None:
  72842. * try: # <<<<<<<<<<<<<<
  72843. * self.writing_handle._run()
  72844. * except BaseException as ex:
  72845. */
  72846. __Pyx_XGIVEREF(__pyx_t_5);
  72847. __Pyx_XGIVEREF(__pyx_t_4);
  72848. __Pyx_XGIVEREF(__pyx_t_3);
  72849. __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_4, __pyx_t_3);
  72850. goto __pyx_L4_error;
  72851. __pyx_L22_exception_handled:;
  72852. __Pyx_XGIVEREF(__pyx_t_5);
  72853. __Pyx_XGIVEREF(__pyx_t_4);
  72854. __Pyx_XGIVEREF(__pyx_t_3);
  72855. __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_4, __pyx_t_3);
  72856. __pyx_L26_try_end:;
  72857. }
  72858. /* "uvloop/handles/poll.pyx":187
  72859. * except BaseException as ex:
  72860. * self._loop._handle_exception(ex)
  72861. * self.writing_handle = None # <<<<<<<<<<<<<<
  72862. *
  72863. * finally:
  72864. */
  72865. __Pyx_INCREF(Py_None);
  72866. __Pyx_GIVEREF(Py_None);
  72867. __Pyx_GOTREF(__pyx_v_self->writing_handle);
  72868. __Pyx_DECREF(((PyObject *)__pyx_v_self->writing_handle));
  72869. __pyx_v_self->writing_handle = ((struct __pyx_obj_6uvloop_4loop_Handle *)Py_None);
  72870. /* "uvloop/handles/poll.pyx":182
  72871. * self.reading_handle = None
  72872. *
  72873. * if self.writing_handle is not None: # <<<<<<<<<<<<<<
  72874. * try:
  72875. * self.writing_handle._run()
  72876. */
  72877. }
  72878. }
  72879. /* "uvloop/handles/poll.pyx":190
  72880. *
  72881. * finally:
  72882. * self._close() # <<<<<<<<<<<<<<
  72883. *
  72884. *
  72885. */
  72886. /*finally:*/ {
  72887. /*normal exit:*/{
  72888. __pyx_t_6 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVPoll *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._close(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_6)) __PYX_ERR(15, 190, __pyx_L1_error)
  72889. __Pyx_GOTREF(__pyx_t_6);
  72890. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  72891. goto __pyx_L5;
  72892. }
  72893. __pyx_L4_error:;
  72894. /*exception exit:*/{
  72895. __Pyx_PyThreadState_declare
  72896. __Pyx_PyThreadState_assign
  72897. __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0;
  72898. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  72899. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  72900. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  72901. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
  72902. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5) < 0)) __Pyx_ErrFetch(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
  72903. __Pyx_XGOTREF(__pyx_t_3);
  72904. __Pyx_XGOTREF(__pyx_t_4);
  72905. __Pyx_XGOTREF(__pyx_t_5);
  72906. __Pyx_XGOTREF(__pyx_t_12);
  72907. __Pyx_XGOTREF(__pyx_t_13);
  72908. __Pyx_XGOTREF(__pyx_t_14);
  72909. __pyx_t_7 = __pyx_lineno; __pyx_t_10 = __pyx_clineno; __pyx_t_11 = __pyx_filename;
  72910. {
  72911. __pyx_t_6 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVPoll *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._close(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_6)) __PYX_ERR(15, 190, __pyx_L35_error)
  72912. __Pyx_GOTREF(__pyx_t_6);
  72913. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  72914. }
  72915. if (PY_MAJOR_VERSION >= 3) {
  72916. __Pyx_XGIVEREF(__pyx_t_12);
  72917. __Pyx_XGIVEREF(__pyx_t_13);
  72918. __Pyx_XGIVEREF(__pyx_t_14);
  72919. __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
  72920. }
  72921. __Pyx_XGIVEREF(__pyx_t_3);
  72922. __Pyx_XGIVEREF(__pyx_t_4);
  72923. __Pyx_XGIVEREF(__pyx_t_5);
  72924. __Pyx_ErrRestore(__pyx_t_3, __pyx_t_4, __pyx_t_5);
  72925. __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0;
  72926. __pyx_lineno = __pyx_t_7; __pyx_clineno = __pyx_t_10; __pyx_filename = __pyx_t_11;
  72927. goto __pyx_L1_error;
  72928. __pyx_L35_error:;
  72929. if (PY_MAJOR_VERSION >= 3) {
  72930. __Pyx_XGIVEREF(__pyx_t_12);
  72931. __Pyx_XGIVEREF(__pyx_t_13);
  72932. __Pyx_XGIVEREF(__pyx_t_14);
  72933. __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
  72934. }
  72935. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  72936. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  72937. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  72938. __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0;
  72939. goto __pyx_L1_error;
  72940. }
  72941. __pyx_L5:;
  72942. }
  72943. /* "uvloop/handles/poll.pyx":173
  72944. * UVHandle._close(<UVHandle>self)
  72945. *
  72946. * cdef _fatal_error(self, exc, throw, reason=None): # <<<<<<<<<<<<<<
  72947. * try:
  72948. * if self.reading_handle is not None:
  72949. */
  72950. /* function exit code */
  72951. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  72952. goto __pyx_L0;
  72953. __pyx_L1_error:;
  72954. __Pyx_XDECREF(__pyx_t_6);
  72955. __Pyx_XDECREF(__pyx_t_8);
  72956. __Pyx_XDECREF(__pyx_t_9);
  72957. __Pyx_AddTraceback("uvloop.loop.UVPoll._fatal_error", __pyx_clineno, __pyx_lineno, __pyx_filename);
  72958. __pyx_r = 0;
  72959. __pyx_L0:;
  72960. __Pyx_XDECREF(__pyx_v_ex);
  72961. __Pyx_XGIVEREF(__pyx_r);
  72962. __Pyx_RefNannyFinishContext();
  72963. return __pyx_r;
  72964. }
  72965. /* "(tree fragment)":1
  72966. * def __reduce_cython__(self): # <<<<<<<<<<<<<<
  72967. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  72968. * def __setstate_cython__(self, __pyx_state):
  72969. */
  72970. /* Python wrapper */
  72971. static PyObject *__pyx_pw_6uvloop_4loop_6UVPoll_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  72972. static char __pyx_doc_6uvloop_4loop_6UVPoll___reduce_cython__[] = "UVPoll.__reduce_cython__(self)";
  72973. static PyObject *__pyx_pw_6uvloop_4loop_6UVPoll_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  72974. PyObject *__pyx_r = 0;
  72975. __Pyx_RefNannyDeclarations
  72976. __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  72977. __pyx_r = __pyx_pf_6uvloop_4loop_6UVPoll___reduce_cython__(((struct __pyx_obj_6uvloop_4loop_UVPoll *)__pyx_v_self));
  72978. /* function exit code */
  72979. __Pyx_RefNannyFinishContext();
  72980. return __pyx_r;
  72981. }
  72982. static PyObject *__pyx_pf_6uvloop_4loop_6UVPoll___reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVPoll *__pyx_v_self) {
  72983. PyObject *__pyx_r = NULL;
  72984. __Pyx_RefNannyDeclarations
  72985. PyObject *__pyx_t_1 = NULL;
  72986. __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  72987. /* "(tree fragment)":2
  72988. * def __reduce_cython__(self):
  72989. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  72990. * def __setstate_cython__(self, __pyx_state):
  72991. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  72992. */
  72993. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__116, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 2, __pyx_L1_error)
  72994. __Pyx_GOTREF(__pyx_t_1);
  72995. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  72996. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  72997. __PYX_ERR(9, 2, __pyx_L1_error)
  72998. /* "(tree fragment)":1
  72999. * def __reduce_cython__(self): # <<<<<<<<<<<<<<
  73000. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  73001. * def __setstate_cython__(self, __pyx_state):
  73002. */
  73003. /* function exit code */
  73004. __pyx_L1_error:;
  73005. __Pyx_XDECREF(__pyx_t_1);
  73006. __Pyx_AddTraceback("uvloop.loop.UVPoll.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  73007. __pyx_r = NULL;
  73008. __Pyx_XGIVEREF(__pyx_r);
  73009. __Pyx_RefNannyFinishContext();
  73010. return __pyx_r;
  73011. }
  73012. /* "(tree fragment)":3
  73013. * def __reduce_cython__(self):
  73014. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  73015. * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
  73016. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  73017. */
  73018. /* Python wrapper */
  73019. static PyObject *__pyx_pw_6uvloop_4loop_6UVPoll_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
  73020. static char __pyx_doc_6uvloop_4loop_6UVPoll_2__setstate_cython__[] = "UVPoll.__setstate_cython__(self, __pyx_state)";
  73021. static PyObject *__pyx_pw_6uvloop_4loop_6UVPoll_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  73022. PyObject *__pyx_r = 0;
  73023. __Pyx_RefNannyDeclarations
  73024. __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  73025. __pyx_r = __pyx_pf_6uvloop_4loop_6UVPoll_2__setstate_cython__(((struct __pyx_obj_6uvloop_4loop_UVPoll *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
  73026. /* function exit code */
  73027. __Pyx_RefNannyFinishContext();
  73028. return __pyx_r;
  73029. }
  73030. static PyObject *__pyx_pf_6uvloop_4loop_6UVPoll_2__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVPoll *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  73031. PyObject *__pyx_r = NULL;
  73032. __Pyx_RefNannyDeclarations
  73033. PyObject *__pyx_t_1 = NULL;
  73034. __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  73035. /* "(tree fragment)":4
  73036. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  73037. * def __setstate_cython__(self, __pyx_state):
  73038. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  73039. */
  73040. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__117, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 4, __pyx_L1_error)
  73041. __Pyx_GOTREF(__pyx_t_1);
  73042. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  73043. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  73044. __PYX_ERR(9, 4, __pyx_L1_error)
  73045. /* "(tree fragment)":3
  73046. * def __reduce_cython__(self):
  73047. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  73048. * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
  73049. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  73050. */
  73051. /* function exit code */
  73052. __pyx_L1_error:;
  73053. __Pyx_XDECREF(__pyx_t_1);
  73054. __Pyx_AddTraceback("uvloop.loop.UVPoll.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  73055. __pyx_r = NULL;
  73056. __Pyx_XGIVEREF(__pyx_r);
  73057. __Pyx_RefNannyFinishContext();
  73058. return __pyx_r;
  73059. }
  73060. /* "uvloop/handles/poll.pyx":193
  73061. *
  73062. *
  73063. * cdef void __on_uvpoll_event(uv.uv_poll_t* handle, # <<<<<<<<<<<<<<
  73064. * int status, int events) with gil:
  73065. *
  73066. */
  73067. static void __pyx_f_6uvloop_4loop___on_uvpoll_event(uv_poll_t *__pyx_v_handle, int __pyx_v_status, int __pyx_v_events) {
  73068. struct __pyx_obj_6uvloop_4loop_UVPoll *__pyx_v_poll = 0;
  73069. PyObject *__pyx_v_exc = NULL;
  73070. PyObject *__pyx_v_ex = NULL;
  73071. __Pyx_RefNannyDeclarations
  73072. int __pyx_t_1;
  73073. PyObject *__pyx_t_2 = NULL;
  73074. int __pyx_t_3;
  73075. int __pyx_t_4;
  73076. PyObject *__pyx_t_5 = NULL;
  73077. PyObject *__pyx_t_6 = NULL;
  73078. PyObject *__pyx_t_7 = NULL;
  73079. struct __pyx_obj_6uvloop_4loop_Loop *__pyx_t_8 = NULL;
  73080. int __pyx_t_9;
  73081. PyObject *__pyx_t_10 = NULL;
  73082. PyObject *__pyx_t_11 = NULL;
  73083. PyObject *__pyx_t_12 = NULL;
  73084. int __pyx_t_13;
  73085. char const *__pyx_t_14;
  73086. PyObject *__pyx_t_15 = NULL;
  73087. PyObject *__pyx_t_16 = NULL;
  73088. PyObject *__pyx_t_17 = NULL;
  73089. PyObject *__pyx_t_18 = NULL;
  73090. PyObject *__pyx_t_19 = NULL;
  73091. PyObject *__pyx_t_20 = NULL;
  73092. char const *__pyx_t_21;
  73093. #ifdef WITH_THREAD
  73094. PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  73095. #endif
  73096. __Pyx_RefNannySetupContext("__on_uvpoll_event", 0);
  73097. /* "uvloop/handles/poll.pyx":196
  73098. * int status, int events) with gil:
  73099. *
  73100. * if __ensure_handle_data(<uv.uv_handle_t*>handle, "UVPoll callback") == 0: # <<<<<<<<<<<<<<
  73101. * return
  73102. *
  73103. */
  73104. __pyx_t_1 = ((__pyx_f_6uvloop_4loop___ensure_handle_data(((uv_handle_t *)__pyx_v_handle), ((char const *)"UVPoll callback")) == 0) != 0);
  73105. if (__pyx_t_1) {
  73106. /* "uvloop/handles/poll.pyx":197
  73107. *
  73108. * if __ensure_handle_data(<uv.uv_handle_t*>handle, "UVPoll callback") == 0:
  73109. * return # <<<<<<<<<<<<<<
  73110. *
  73111. * cdef:
  73112. */
  73113. goto __pyx_L0;
  73114. /* "uvloop/handles/poll.pyx":196
  73115. * int status, int events) with gil:
  73116. *
  73117. * if __ensure_handle_data(<uv.uv_handle_t*>handle, "UVPoll callback") == 0: # <<<<<<<<<<<<<<
  73118. * return
  73119. *
  73120. */
  73121. }
  73122. /* "uvloop/handles/poll.pyx":200
  73123. *
  73124. * cdef:
  73125. * UVPoll poll = <UVPoll> handle.data # <<<<<<<<<<<<<<
  73126. *
  73127. * if status < 0:
  73128. */
  73129. __pyx_t_2 = ((PyObject *)__pyx_v_handle->data);
  73130. __Pyx_INCREF(__pyx_t_2);
  73131. __pyx_v_poll = ((struct __pyx_obj_6uvloop_4loop_UVPoll *)__pyx_t_2);
  73132. __pyx_t_2 = 0;
  73133. /* "uvloop/handles/poll.pyx":202
  73134. * UVPoll poll = <UVPoll> handle.data
  73135. *
  73136. * if status < 0: # <<<<<<<<<<<<<<
  73137. * exc = convert_error(status)
  73138. * poll._fatal_error(exc, False)
  73139. */
  73140. __pyx_t_1 = ((__pyx_v_status < 0) != 0);
  73141. if (__pyx_t_1) {
  73142. /* "uvloop/handles/poll.pyx":203
  73143. *
  73144. * if status < 0:
  73145. * exc = convert_error(status) # <<<<<<<<<<<<<<
  73146. * poll._fatal_error(exc, False)
  73147. * return
  73148. */
  73149. __pyx_t_2 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_status); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 203, __pyx_L1_error)
  73150. __Pyx_GOTREF(__pyx_t_2);
  73151. __pyx_v_exc = __pyx_t_2;
  73152. __pyx_t_2 = 0;
  73153. /* "uvloop/handles/poll.pyx":204
  73154. * if status < 0:
  73155. * exc = convert_error(status)
  73156. * poll._fatal_error(exc, False) # <<<<<<<<<<<<<<
  73157. * return
  73158. *
  73159. */
  73160. __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVPoll *)__pyx_v_poll->__pyx_base.__pyx_vtab)->__pyx_base._fatal_error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_poll), __pyx_v_exc, Py_False, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 204, __pyx_L1_error)
  73161. __Pyx_GOTREF(__pyx_t_2);
  73162. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  73163. /* "uvloop/handles/poll.pyx":205
  73164. * exc = convert_error(status)
  73165. * poll._fatal_error(exc, False)
  73166. * return # <<<<<<<<<<<<<<
  73167. *
  73168. * if ((events & (uv.UV_READABLE | uv.UV_DISCONNECT)) and
  73169. */
  73170. goto __pyx_L0;
  73171. /* "uvloop/handles/poll.pyx":202
  73172. * UVPoll poll = <UVPoll> handle.data
  73173. *
  73174. * if status < 0: # <<<<<<<<<<<<<<
  73175. * exc = convert_error(status)
  73176. * poll._fatal_error(exc, False)
  73177. */
  73178. }
  73179. /* "uvloop/handles/poll.pyx":207
  73180. * return
  73181. *
  73182. * if ((events & (uv.UV_READABLE | uv.UV_DISCONNECT)) and # <<<<<<<<<<<<<<
  73183. * poll.reading_handle is not None):
  73184. *
  73185. */
  73186. __pyx_t_3 = ((__pyx_v_events & (UV_READABLE | UV_DISCONNECT)) != 0);
  73187. if (__pyx_t_3) {
  73188. } else {
  73189. __pyx_t_1 = __pyx_t_3;
  73190. goto __pyx_L6_bool_binop_done;
  73191. }
  73192. /* "uvloop/handles/poll.pyx":208
  73193. *
  73194. * if ((events & (uv.UV_READABLE | uv.UV_DISCONNECT)) and
  73195. * poll.reading_handle is not None): # <<<<<<<<<<<<<<
  73196. *
  73197. * try:
  73198. */
  73199. __pyx_t_3 = (((PyObject *)__pyx_v_poll->reading_handle) != Py_None);
  73200. __pyx_t_4 = (__pyx_t_3 != 0);
  73201. __pyx_t_1 = __pyx_t_4;
  73202. __pyx_L6_bool_binop_done:;
  73203. /* "uvloop/handles/poll.pyx":207
  73204. * return
  73205. *
  73206. * if ((events & (uv.UV_READABLE | uv.UV_DISCONNECT)) and # <<<<<<<<<<<<<<
  73207. * poll.reading_handle is not None):
  73208. *
  73209. */
  73210. if (__pyx_t_1) {
  73211. /* "uvloop/handles/poll.pyx":210
  73212. * poll.reading_handle is not None):
  73213. *
  73214. * try: # <<<<<<<<<<<<<<
  73215. * if UVLOOP_DEBUG:
  73216. * poll._loop._poll_read_events_total += 1
  73217. */
  73218. {
  73219. __Pyx_PyThreadState_declare
  73220. __Pyx_PyThreadState_assign
  73221. __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7);
  73222. __Pyx_XGOTREF(__pyx_t_5);
  73223. __Pyx_XGOTREF(__pyx_t_6);
  73224. __Pyx_XGOTREF(__pyx_t_7);
  73225. /*try:*/ {
  73226. /* "uvloop/handles/poll.pyx":211
  73227. *
  73228. * try:
  73229. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  73230. * poll._loop._poll_read_events_total += 1
  73231. * poll.reading_handle._run()
  73232. */
  73233. __pyx_t_1 = (UVLOOP_DEBUG != 0);
  73234. if (__pyx_t_1) {
  73235. /* "uvloop/handles/poll.pyx":212
  73236. * try:
  73237. * if UVLOOP_DEBUG:
  73238. * poll._loop._poll_read_events_total += 1 # <<<<<<<<<<<<<<
  73239. * poll.reading_handle._run()
  73240. * except BaseException as ex:
  73241. */
  73242. __Pyx_INCREF(((PyObject *)__pyx_v_poll->__pyx_base._loop));
  73243. __pyx_t_8 = __pyx_v_poll->__pyx_base._loop;
  73244. __pyx_t_8->_poll_read_events_total = (__pyx_t_8->_poll_read_events_total + 1);
  73245. __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
  73246. /* "uvloop/handles/poll.pyx":211
  73247. *
  73248. * try:
  73249. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  73250. * poll._loop._poll_read_events_total += 1
  73251. * poll.reading_handle._run()
  73252. */
  73253. }
  73254. /* "uvloop/handles/poll.pyx":213
  73255. * if UVLOOP_DEBUG:
  73256. * poll._loop._poll_read_events_total += 1
  73257. * poll.reading_handle._run() # <<<<<<<<<<<<<<
  73258. * except BaseException as ex:
  73259. * if UVLOOP_DEBUG:
  73260. */
  73261. __pyx_t_2 = __pyx_f_6uvloop_4loop_6Handle__run(__pyx_v_poll->reading_handle); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 213, __pyx_L8_error)
  73262. __Pyx_GOTREF(__pyx_t_2);
  73263. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  73264. /* "uvloop/handles/poll.pyx":210
  73265. * poll.reading_handle is not None):
  73266. *
  73267. * try: # <<<<<<<<<<<<<<
  73268. * if UVLOOP_DEBUG:
  73269. * poll._loop._poll_read_events_total += 1
  73270. */
  73271. }
  73272. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  73273. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  73274. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  73275. goto __pyx_L13_try_end;
  73276. __pyx_L8_error:;
  73277. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  73278. __Pyx_XDECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
  73279. /* "uvloop/handles/poll.pyx":214
  73280. * poll._loop._poll_read_events_total += 1
  73281. * poll.reading_handle._run()
  73282. * except BaseException as ex: # <<<<<<<<<<<<<<
  73283. * if UVLOOP_DEBUG:
  73284. * poll._loop._poll_read_cb_errors_total += 1
  73285. */
  73286. __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_BaseException);
  73287. if (__pyx_t_9) {
  73288. __Pyx_AddTraceback("uvloop.loop.__on_uvpoll_event", __pyx_clineno, __pyx_lineno, __pyx_filename);
  73289. if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_10, &__pyx_t_11) < 0) __PYX_ERR(15, 214, __pyx_L10_except_error)
  73290. __Pyx_GOTREF(__pyx_t_2);
  73291. __Pyx_GOTREF(__pyx_t_10);
  73292. __Pyx_GOTREF(__pyx_t_11);
  73293. __Pyx_INCREF(__pyx_t_10);
  73294. __pyx_v_ex = __pyx_t_10;
  73295. /*try:*/ {
  73296. /* "uvloop/handles/poll.pyx":215
  73297. * poll.reading_handle._run()
  73298. * except BaseException as ex:
  73299. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  73300. * poll._loop._poll_read_cb_errors_total += 1
  73301. * poll._error(ex, False)
  73302. */
  73303. __pyx_t_1 = (UVLOOP_DEBUG != 0);
  73304. if (__pyx_t_1) {
  73305. /* "uvloop/handles/poll.pyx":216
  73306. * except BaseException as ex:
  73307. * if UVLOOP_DEBUG:
  73308. * poll._loop._poll_read_cb_errors_total += 1 # <<<<<<<<<<<<<<
  73309. * poll._error(ex, False)
  73310. * # continue code execution
  73311. */
  73312. __Pyx_INCREF(((PyObject *)__pyx_v_poll->__pyx_base._loop));
  73313. __pyx_t_8 = __pyx_v_poll->__pyx_base._loop;
  73314. __pyx_t_8->_poll_read_cb_errors_total = (__pyx_t_8->_poll_read_cb_errors_total + 1);
  73315. __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
  73316. /* "uvloop/handles/poll.pyx":215
  73317. * poll.reading_handle._run()
  73318. * except BaseException as ex:
  73319. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  73320. * poll._loop._poll_read_cb_errors_total += 1
  73321. * poll._error(ex, False)
  73322. */
  73323. }
  73324. /* "uvloop/handles/poll.pyx":217
  73325. * if UVLOOP_DEBUG:
  73326. * poll._loop._poll_read_cb_errors_total += 1
  73327. * poll._error(ex, False) # <<<<<<<<<<<<<<
  73328. * # continue code execution
  73329. *
  73330. */
  73331. __pyx_t_12 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVPoll *)__pyx_v_poll->__pyx_base.__pyx_vtab)->__pyx_base._error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_poll), __pyx_v_ex, Py_False); if (unlikely(!__pyx_t_12)) __PYX_ERR(15, 217, __pyx_L20_error)
  73332. __Pyx_GOTREF(__pyx_t_12);
  73333. __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  73334. }
  73335. /* "uvloop/handles/poll.pyx":214
  73336. * poll._loop._poll_read_events_total += 1
  73337. * poll.reading_handle._run()
  73338. * except BaseException as ex: # <<<<<<<<<<<<<<
  73339. * if UVLOOP_DEBUG:
  73340. * poll._loop._poll_read_cb_errors_total += 1
  73341. */
  73342. /*finally:*/ {
  73343. /*normal exit:*/{
  73344. __Pyx_DECREF(__pyx_v_ex);
  73345. __pyx_v_ex = NULL;
  73346. goto __pyx_L21;
  73347. }
  73348. __pyx_L20_error:;
  73349. /*exception exit:*/{
  73350. __Pyx_PyThreadState_declare
  73351. __Pyx_PyThreadState_assign
  73352. __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0;
  73353. __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
  73354. __Pyx_XDECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
  73355. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20);
  73356. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17) < 0)) __Pyx_ErrFetch(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17);
  73357. __Pyx_XGOTREF(__pyx_t_15);
  73358. __Pyx_XGOTREF(__pyx_t_16);
  73359. __Pyx_XGOTREF(__pyx_t_17);
  73360. __Pyx_XGOTREF(__pyx_t_18);
  73361. __Pyx_XGOTREF(__pyx_t_19);
  73362. __Pyx_XGOTREF(__pyx_t_20);
  73363. __pyx_t_9 = __pyx_lineno; __pyx_t_13 = __pyx_clineno; __pyx_t_14 = __pyx_filename;
  73364. {
  73365. __Pyx_DECREF(__pyx_v_ex);
  73366. __pyx_v_ex = NULL;
  73367. }
  73368. if (PY_MAJOR_VERSION >= 3) {
  73369. __Pyx_XGIVEREF(__pyx_t_18);
  73370. __Pyx_XGIVEREF(__pyx_t_19);
  73371. __Pyx_XGIVEREF(__pyx_t_20);
  73372. __Pyx_ExceptionReset(__pyx_t_18, __pyx_t_19, __pyx_t_20);
  73373. }
  73374. __Pyx_XGIVEREF(__pyx_t_15);
  73375. __Pyx_XGIVEREF(__pyx_t_16);
  73376. __Pyx_XGIVEREF(__pyx_t_17);
  73377. __Pyx_ErrRestore(__pyx_t_15, __pyx_t_16, __pyx_t_17);
  73378. __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0;
  73379. __pyx_lineno = __pyx_t_9; __pyx_clineno = __pyx_t_13; __pyx_filename = __pyx_t_14;
  73380. goto __pyx_L10_except_error;
  73381. }
  73382. __pyx_L21:;
  73383. }
  73384. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  73385. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  73386. __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
  73387. goto __pyx_L9_exception_handled;
  73388. }
  73389. goto __pyx_L10_except_error;
  73390. __pyx_L10_except_error:;
  73391. /* "uvloop/handles/poll.pyx":210
  73392. * poll.reading_handle is not None):
  73393. *
  73394. * try: # <<<<<<<<<<<<<<
  73395. * if UVLOOP_DEBUG:
  73396. * poll._loop._poll_read_events_total += 1
  73397. */
  73398. __Pyx_XGIVEREF(__pyx_t_5);
  73399. __Pyx_XGIVEREF(__pyx_t_6);
  73400. __Pyx_XGIVEREF(__pyx_t_7);
  73401. __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
  73402. goto __pyx_L1_error;
  73403. __pyx_L9_exception_handled:;
  73404. __Pyx_XGIVEREF(__pyx_t_5);
  73405. __Pyx_XGIVEREF(__pyx_t_6);
  73406. __Pyx_XGIVEREF(__pyx_t_7);
  73407. __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
  73408. __pyx_L13_try_end:;
  73409. }
  73410. /* "uvloop/handles/poll.pyx":207
  73411. * return
  73412. *
  73413. * if ((events & (uv.UV_READABLE | uv.UV_DISCONNECT)) and # <<<<<<<<<<<<<<
  73414. * poll.reading_handle is not None):
  73415. *
  73416. */
  73417. }
  73418. /* "uvloop/handles/poll.pyx":220
  73419. * # continue code execution
  73420. *
  73421. * if ((events & (uv.UV_WRITABLE | uv.UV_DISCONNECT)) and # <<<<<<<<<<<<<<
  73422. * poll.writing_handle is not None):
  73423. *
  73424. */
  73425. __pyx_t_4 = ((__pyx_v_events & (UV_WRITABLE | UV_DISCONNECT)) != 0);
  73426. if (__pyx_t_4) {
  73427. } else {
  73428. __pyx_t_1 = __pyx_t_4;
  73429. goto __pyx_L28_bool_binop_done;
  73430. }
  73431. /* "uvloop/handles/poll.pyx":221
  73432. *
  73433. * if ((events & (uv.UV_WRITABLE | uv.UV_DISCONNECT)) and
  73434. * poll.writing_handle is not None): # <<<<<<<<<<<<<<
  73435. *
  73436. * try:
  73437. */
  73438. __pyx_t_4 = (((PyObject *)__pyx_v_poll->writing_handle) != Py_None);
  73439. __pyx_t_3 = (__pyx_t_4 != 0);
  73440. __pyx_t_1 = __pyx_t_3;
  73441. __pyx_L28_bool_binop_done:;
  73442. /* "uvloop/handles/poll.pyx":220
  73443. * # continue code execution
  73444. *
  73445. * if ((events & (uv.UV_WRITABLE | uv.UV_DISCONNECT)) and # <<<<<<<<<<<<<<
  73446. * poll.writing_handle is not None):
  73447. *
  73448. */
  73449. if (__pyx_t_1) {
  73450. /* "uvloop/handles/poll.pyx":223
  73451. * poll.writing_handle is not None):
  73452. *
  73453. * try: # <<<<<<<<<<<<<<
  73454. * if UVLOOP_DEBUG:
  73455. * poll._loop._poll_write_events_total += 1
  73456. */
  73457. {
  73458. __Pyx_PyThreadState_declare
  73459. __Pyx_PyThreadState_assign
  73460. __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_6, &__pyx_t_5);
  73461. __Pyx_XGOTREF(__pyx_t_7);
  73462. __Pyx_XGOTREF(__pyx_t_6);
  73463. __Pyx_XGOTREF(__pyx_t_5);
  73464. /*try:*/ {
  73465. /* "uvloop/handles/poll.pyx":224
  73466. *
  73467. * try:
  73468. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  73469. * poll._loop._poll_write_events_total += 1
  73470. * poll.writing_handle._run()
  73471. */
  73472. __pyx_t_1 = (UVLOOP_DEBUG != 0);
  73473. if (__pyx_t_1) {
  73474. /* "uvloop/handles/poll.pyx":225
  73475. * try:
  73476. * if UVLOOP_DEBUG:
  73477. * poll._loop._poll_write_events_total += 1 # <<<<<<<<<<<<<<
  73478. * poll.writing_handle._run()
  73479. * except BaseException as ex:
  73480. */
  73481. __Pyx_INCREF(((PyObject *)__pyx_v_poll->__pyx_base._loop));
  73482. __pyx_t_8 = __pyx_v_poll->__pyx_base._loop;
  73483. __pyx_t_8->_poll_write_events_total = (__pyx_t_8->_poll_write_events_total + 1);
  73484. __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
  73485. /* "uvloop/handles/poll.pyx":224
  73486. *
  73487. * try:
  73488. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  73489. * poll._loop._poll_write_events_total += 1
  73490. * poll.writing_handle._run()
  73491. */
  73492. }
  73493. /* "uvloop/handles/poll.pyx":226
  73494. * if UVLOOP_DEBUG:
  73495. * poll._loop._poll_write_events_total += 1
  73496. * poll.writing_handle._run() # <<<<<<<<<<<<<<
  73497. * except BaseException as ex:
  73498. * if UVLOOP_DEBUG:
  73499. */
  73500. __pyx_t_11 = __pyx_f_6uvloop_4loop_6Handle__run(__pyx_v_poll->writing_handle); if (unlikely(!__pyx_t_11)) __PYX_ERR(15, 226, __pyx_L30_error)
  73501. __Pyx_GOTREF(__pyx_t_11);
  73502. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  73503. /* "uvloop/handles/poll.pyx":223
  73504. * poll.writing_handle is not None):
  73505. *
  73506. * try: # <<<<<<<<<<<<<<
  73507. * if UVLOOP_DEBUG:
  73508. * poll._loop._poll_write_events_total += 1
  73509. */
  73510. }
  73511. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  73512. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  73513. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  73514. goto __pyx_L35_try_end;
  73515. __pyx_L30_error:;
  73516. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  73517. __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
  73518. __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
  73519. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  73520. __Pyx_XDECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
  73521. /* "uvloop/handles/poll.pyx":227
  73522. * poll._loop._poll_write_events_total += 1
  73523. * poll.writing_handle._run()
  73524. * except BaseException as ex: # <<<<<<<<<<<<<<
  73525. * if UVLOOP_DEBUG:
  73526. * poll._loop._poll_write_cb_errors_total += 1
  73527. */
  73528. __pyx_t_13 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_BaseException);
  73529. if (__pyx_t_13) {
  73530. __Pyx_AddTraceback("uvloop.loop.__on_uvpoll_event", __pyx_clineno, __pyx_lineno, __pyx_filename);
  73531. if (__Pyx_GetException(&__pyx_t_11, &__pyx_t_10, &__pyx_t_2) < 0) __PYX_ERR(15, 227, __pyx_L32_except_error)
  73532. __Pyx_GOTREF(__pyx_t_11);
  73533. __Pyx_GOTREF(__pyx_t_10);
  73534. __Pyx_GOTREF(__pyx_t_2);
  73535. __Pyx_INCREF(__pyx_t_10);
  73536. __pyx_v_ex = __pyx_t_10;
  73537. /*try:*/ {
  73538. /* "uvloop/handles/poll.pyx":228
  73539. * poll.writing_handle._run()
  73540. * except BaseException as ex:
  73541. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  73542. * poll._loop._poll_write_cb_errors_total += 1
  73543. * poll._error(ex, False)
  73544. */
  73545. __pyx_t_1 = (UVLOOP_DEBUG != 0);
  73546. if (__pyx_t_1) {
  73547. /* "uvloop/handles/poll.pyx":229
  73548. * except BaseException as ex:
  73549. * if UVLOOP_DEBUG:
  73550. * poll._loop._poll_write_cb_errors_total += 1 # <<<<<<<<<<<<<<
  73551. * poll._error(ex, False)
  73552. */
  73553. __Pyx_INCREF(((PyObject *)__pyx_v_poll->__pyx_base._loop));
  73554. __pyx_t_8 = __pyx_v_poll->__pyx_base._loop;
  73555. __pyx_t_8->_poll_write_cb_errors_total = (__pyx_t_8->_poll_write_cb_errors_total + 1);
  73556. __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
  73557. /* "uvloop/handles/poll.pyx":228
  73558. * poll.writing_handle._run()
  73559. * except BaseException as ex:
  73560. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  73561. * poll._loop._poll_write_cb_errors_total += 1
  73562. * poll._error(ex, False)
  73563. */
  73564. }
  73565. /* "uvloop/handles/poll.pyx":230
  73566. * if UVLOOP_DEBUG:
  73567. * poll._loop._poll_write_cb_errors_total += 1
  73568. * poll._error(ex, False) # <<<<<<<<<<<<<<
  73569. */
  73570. __pyx_t_12 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVPoll *)__pyx_v_poll->__pyx_base.__pyx_vtab)->__pyx_base._error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_poll), __pyx_v_ex, Py_False); if (unlikely(!__pyx_t_12)) __PYX_ERR(15, 230, __pyx_L42_error)
  73571. __Pyx_GOTREF(__pyx_t_12);
  73572. __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  73573. }
  73574. /* "uvloop/handles/poll.pyx":227
  73575. * poll._loop._poll_write_events_total += 1
  73576. * poll.writing_handle._run()
  73577. * except BaseException as ex: # <<<<<<<<<<<<<<
  73578. * if UVLOOP_DEBUG:
  73579. * poll._loop._poll_write_cb_errors_total += 1
  73580. */
  73581. /*finally:*/ {
  73582. /*normal exit:*/{
  73583. __Pyx_DECREF(__pyx_v_ex);
  73584. __pyx_v_ex = NULL;
  73585. goto __pyx_L43;
  73586. }
  73587. __pyx_L42_error:;
  73588. /*exception exit:*/{
  73589. __Pyx_PyThreadState_declare
  73590. __Pyx_PyThreadState_assign
  73591. __pyx_t_20 = 0; __pyx_t_19 = 0; __pyx_t_18 = 0; __pyx_t_17 = 0; __pyx_t_16 = 0; __pyx_t_15 = 0;
  73592. __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
  73593. __Pyx_XDECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
  73594. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_17, &__pyx_t_16, &__pyx_t_15);
  73595. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_20, &__pyx_t_19, &__pyx_t_18) < 0)) __Pyx_ErrFetch(&__pyx_t_20, &__pyx_t_19, &__pyx_t_18);
  73596. __Pyx_XGOTREF(__pyx_t_20);
  73597. __Pyx_XGOTREF(__pyx_t_19);
  73598. __Pyx_XGOTREF(__pyx_t_18);
  73599. __Pyx_XGOTREF(__pyx_t_17);
  73600. __Pyx_XGOTREF(__pyx_t_16);
  73601. __Pyx_XGOTREF(__pyx_t_15);
  73602. __pyx_t_13 = __pyx_lineno; __pyx_t_9 = __pyx_clineno; __pyx_t_21 = __pyx_filename;
  73603. {
  73604. __Pyx_DECREF(__pyx_v_ex);
  73605. __pyx_v_ex = NULL;
  73606. }
  73607. if (PY_MAJOR_VERSION >= 3) {
  73608. __Pyx_XGIVEREF(__pyx_t_17);
  73609. __Pyx_XGIVEREF(__pyx_t_16);
  73610. __Pyx_XGIVEREF(__pyx_t_15);
  73611. __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_16, __pyx_t_15);
  73612. }
  73613. __Pyx_XGIVEREF(__pyx_t_20);
  73614. __Pyx_XGIVEREF(__pyx_t_19);
  73615. __Pyx_XGIVEREF(__pyx_t_18);
  73616. __Pyx_ErrRestore(__pyx_t_20, __pyx_t_19, __pyx_t_18);
  73617. __pyx_t_20 = 0; __pyx_t_19 = 0; __pyx_t_18 = 0; __pyx_t_17 = 0; __pyx_t_16 = 0; __pyx_t_15 = 0;
  73618. __pyx_lineno = __pyx_t_13; __pyx_clineno = __pyx_t_9; __pyx_filename = __pyx_t_21;
  73619. goto __pyx_L32_except_error;
  73620. }
  73621. __pyx_L43:;
  73622. }
  73623. __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
  73624. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  73625. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  73626. goto __pyx_L31_exception_handled;
  73627. }
  73628. goto __pyx_L32_except_error;
  73629. __pyx_L32_except_error:;
  73630. /* "uvloop/handles/poll.pyx":223
  73631. * poll.writing_handle is not None):
  73632. *
  73633. * try: # <<<<<<<<<<<<<<
  73634. * if UVLOOP_DEBUG:
  73635. * poll._loop._poll_write_events_total += 1
  73636. */
  73637. __Pyx_XGIVEREF(__pyx_t_7);
  73638. __Pyx_XGIVEREF(__pyx_t_6);
  73639. __Pyx_XGIVEREF(__pyx_t_5);
  73640. __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_6, __pyx_t_5);
  73641. goto __pyx_L1_error;
  73642. __pyx_L31_exception_handled:;
  73643. __Pyx_XGIVEREF(__pyx_t_7);
  73644. __Pyx_XGIVEREF(__pyx_t_6);
  73645. __Pyx_XGIVEREF(__pyx_t_5);
  73646. __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_6, __pyx_t_5);
  73647. __pyx_L35_try_end:;
  73648. }
  73649. /* "uvloop/handles/poll.pyx":220
  73650. * # continue code execution
  73651. *
  73652. * if ((events & (uv.UV_WRITABLE | uv.UV_DISCONNECT)) and # <<<<<<<<<<<<<<
  73653. * poll.writing_handle is not None):
  73654. *
  73655. */
  73656. }
  73657. /* "uvloop/handles/poll.pyx":193
  73658. *
  73659. *
  73660. * cdef void __on_uvpoll_event(uv.uv_poll_t* handle, # <<<<<<<<<<<<<<
  73661. * int status, int events) with gil:
  73662. *
  73663. */
  73664. /* function exit code */
  73665. goto __pyx_L0;
  73666. __pyx_L1_error:;
  73667. __Pyx_XDECREF(__pyx_t_2);
  73668. __Pyx_XDECREF(((PyObject *)__pyx_t_8));
  73669. __Pyx_XDECREF(__pyx_t_10);
  73670. __Pyx_XDECREF(__pyx_t_11);
  73671. __Pyx_XDECREF(__pyx_t_12);
  73672. __Pyx_WriteUnraisable("uvloop.loop.__on_uvpoll_event", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  73673. __pyx_L0:;
  73674. __Pyx_XDECREF((PyObject *)__pyx_v_poll);
  73675. __Pyx_XDECREF(__pyx_v_exc);
  73676. __Pyx_XDECREF(__pyx_v_ex);
  73677. __Pyx_RefNannyFinishContext();
  73678. #ifdef WITH_THREAD
  73679. __Pyx_PyGILState_Release(__pyx_gilstate_save);
  73680. #endif
  73681. }
  73682. /* "uvloop/handles/basetransport.pyx":3
  73683. * cdef class UVBaseTransport(UVSocketHandle):
  73684. *
  73685. * def __cinit__(self): # <<<<<<<<<<<<<<
  73686. * # Flow control
  73687. * self._high_water = FLOW_CONTROL_HIGH_WATER * 1024
  73688. */
  73689. /* Python wrapper */
  73690. static int __pyx_pw_6uvloop_4loop_15UVBaseTransport_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  73691. static int __pyx_pw_6uvloop_4loop_15UVBaseTransport_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  73692. int __pyx_r;
  73693. __Pyx_RefNannyDeclarations
  73694. __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  73695. if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
  73696. __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  73697. if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
  73698. __pyx_r = __pyx_pf_6uvloop_4loop_15UVBaseTransport___cinit__(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_v_self));
  73699. /* function exit code */
  73700. __Pyx_RefNannyFinishContext();
  73701. return __pyx_r;
  73702. }
  73703. static int __pyx_pf_6uvloop_4loop_15UVBaseTransport___cinit__(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self) {
  73704. int __pyx_r;
  73705. __Pyx_RefNannyDeclarations
  73706. __Pyx_RefNannySetupContext("__cinit__", 0);
  73707. /* "uvloop/handles/basetransport.pyx":5
  73708. * def __cinit__(self):
  73709. * # Flow control
  73710. * self._high_water = FLOW_CONTROL_HIGH_WATER * 1024 # <<<<<<<<<<<<<<
  73711. * self._low_water = FLOW_CONTROL_HIGH_WATER // 4
  73712. *
  73713. */
  73714. __pyx_v_self->_high_water = 0x10000;
  73715. /* "uvloop/handles/basetransport.pyx":6
  73716. * # Flow control
  73717. * self._high_water = FLOW_CONTROL_HIGH_WATER * 1024
  73718. * self._low_water = FLOW_CONTROL_HIGH_WATER // 4 # <<<<<<<<<<<<<<
  73719. *
  73720. * self._protocol = None
  73721. */
  73722. __pyx_v_self->_low_water = 16;
  73723. /* "uvloop/handles/basetransport.pyx":8
  73724. * self._low_water = FLOW_CONTROL_HIGH_WATER // 4
  73725. *
  73726. * self._protocol = None # <<<<<<<<<<<<<<
  73727. * self._protocol_connected = 0
  73728. * self._protocol_paused = 0
  73729. */
  73730. __Pyx_INCREF(Py_None);
  73731. __Pyx_GIVEREF(Py_None);
  73732. __Pyx_GOTREF(__pyx_v_self->_protocol);
  73733. __Pyx_DECREF(__pyx_v_self->_protocol);
  73734. __pyx_v_self->_protocol = Py_None;
  73735. /* "uvloop/handles/basetransport.pyx":9
  73736. *
  73737. * self._protocol = None
  73738. * self._protocol_connected = 0 # <<<<<<<<<<<<<<
  73739. * self._protocol_paused = 0
  73740. * self._protocol_data_received = None
  73741. */
  73742. __pyx_v_self->_protocol_connected = 0;
  73743. /* "uvloop/handles/basetransport.pyx":10
  73744. * self._protocol = None
  73745. * self._protocol_connected = 0
  73746. * self._protocol_paused = 0 # <<<<<<<<<<<<<<
  73747. * self._protocol_data_received = None
  73748. *
  73749. */
  73750. __pyx_v_self->_protocol_paused = 0;
  73751. /* "uvloop/handles/basetransport.pyx":11
  73752. * self._protocol_connected = 0
  73753. * self._protocol_paused = 0
  73754. * self._protocol_data_received = None # <<<<<<<<<<<<<<
  73755. *
  73756. * self._server = None
  73757. */
  73758. __Pyx_INCREF(Py_None);
  73759. __Pyx_GIVEREF(Py_None);
  73760. __Pyx_GOTREF(__pyx_v_self->_protocol_data_received);
  73761. __Pyx_DECREF(__pyx_v_self->_protocol_data_received);
  73762. __pyx_v_self->_protocol_data_received = Py_None;
  73763. /* "uvloop/handles/basetransport.pyx":13
  73764. * self._protocol_data_received = None
  73765. *
  73766. * self._server = None # <<<<<<<<<<<<<<
  73767. * self._waiter = None
  73768. * self._extra_info = None
  73769. */
  73770. __Pyx_INCREF(Py_None);
  73771. __Pyx_GIVEREF(Py_None);
  73772. __Pyx_GOTREF(__pyx_v_self->_server);
  73773. __Pyx_DECREF(((PyObject *)__pyx_v_self->_server));
  73774. __pyx_v_self->_server = ((struct __pyx_obj_6uvloop_4loop_Server *)Py_None);
  73775. /* "uvloop/handles/basetransport.pyx":14
  73776. *
  73777. * self._server = None
  73778. * self._waiter = None # <<<<<<<<<<<<<<
  73779. * self._extra_info = None
  73780. *
  73781. */
  73782. __Pyx_INCREF(Py_None);
  73783. __Pyx_GIVEREF(Py_None);
  73784. __Pyx_GOTREF(__pyx_v_self->_waiter);
  73785. __Pyx_DECREF(__pyx_v_self->_waiter);
  73786. __pyx_v_self->_waiter = Py_None;
  73787. /* "uvloop/handles/basetransport.pyx":15
  73788. * self._server = None
  73789. * self._waiter = None
  73790. * self._extra_info = None # <<<<<<<<<<<<<<
  73791. *
  73792. * self._conn_lost = 0
  73793. */
  73794. __Pyx_INCREF(Py_None);
  73795. __Pyx_GIVEREF(Py_None);
  73796. __Pyx_GOTREF(__pyx_v_self->_extra_info);
  73797. __Pyx_DECREF(__pyx_v_self->_extra_info);
  73798. __pyx_v_self->_extra_info = ((PyObject*)Py_None);
  73799. /* "uvloop/handles/basetransport.pyx":17
  73800. * self._extra_info = None
  73801. *
  73802. * self._conn_lost = 0 # <<<<<<<<<<<<<<
  73803. *
  73804. * self._closing = 0
  73805. */
  73806. __pyx_v_self->_conn_lost = 0;
  73807. /* "uvloop/handles/basetransport.pyx":19
  73808. * self._conn_lost = 0
  73809. *
  73810. * self._closing = 0 # <<<<<<<<<<<<<<
  73811. *
  73812. * cdef size_t _get_write_buffer_size(self):
  73813. */
  73814. __pyx_v_self->_closing = 0;
  73815. /* "uvloop/handles/basetransport.pyx":3
  73816. * cdef class UVBaseTransport(UVSocketHandle):
  73817. *
  73818. * def __cinit__(self): # <<<<<<<<<<<<<<
  73819. * # Flow control
  73820. * self._high_water = FLOW_CONTROL_HIGH_WATER * 1024
  73821. */
  73822. /* function exit code */
  73823. __pyx_r = 0;
  73824. __Pyx_RefNannyFinishContext();
  73825. return __pyx_r;
  73826. }
  73827. /* "uvloop/handles/basetransport.pyx":21
  73828. * self._closing = 0
  73829. *
  73830. * cdef size_t _get_write_buffer_size(self): # <<<<<<<<<<<<<<
  73831. * return 0
  73832. *
  73833. */
  73834. static size_t __pyx_f_6uvloop_4loop_15UVBaseTransport__get_write_buffer_size(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self) {
  73835. size_t __pyx_r;
  73836. __Pyx_RefNannyDeclarations
  73837. __Pyx_RefNannySetupContext("_get_write_buffer_size", 0);
  73838. /* "uvloop/handles/basetransport.pyx":22
  73839. *
  73840. * cdef size_t _get_write_buffer_size(self):
  73841. * return 0 # <<<<<<<<<<<<<<
  73842. *
  73843. * cdef inline _schedule_call_connection_made(self):
  73844. */
  73845. __pyx_r = 0;
  73846. goto __pyx_L0;
  73847. /* "uvloop/handles/basetransport.pyx":21
  73848. * self._closing = 0
  73849. *
  73850. * cdef size_t _get_write_buffer_size(self): # <<<<<<<<<<<<<<
  73851. * return 0
  73852. *
  73853. */
  73854. /* function exit code */
  73855. __pyx_L0:;
  73856. __Pyx_RefNannyFinishContext();
  73857. return __pyx_r;
  73858. }
  73859. /* "uvloop/handles/basetransport.pyx":24
  73860. * return 0
  73861. *
  73862. * cdef inline _schedule_call_connection_made(self): # <<<<<<<<<<<<<<
  73863. * self._loop._call_soon_handle(
  73864. * new_MethodHandle(self._loop,
  73865. */
  73866. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_15UVBaseTransport__schedule_call_connection_made(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self) {
  73867. PyObject *__pyx_r = NULL;
  73868. __Pyx_RefNannyDeclarations
  73869. PyObject *__pyx_t_1 = NULL;
  73870. PyObject *__pyx_t_2 = NULL;
  73871. __Pyx_RefNannySetupContext("_schedule_call_connection_made", 0);
  73872. /* "uvloop/handles/basetransport.pyx":26
  73873. * cdef inline _schedule_call_connection_made(self):
  73874. * self._loop._call_soon_handle(
  73875. * new_MethodHandle(self._loop, # <<<<<<<<<<<<<<
  73876. * "UVTransport._call_connection_made",
  73877. * <method_t>self._call_connection_made,
  73878. */
  73879. __pyx_t_1 = ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._loop);
  73880. __Pyx_INCREF(__pyx_t_1);
  73881. /* "uvloop/handles/basetransport.pyx":29
  73882. * "UVTransport._call_connection_made",
  73883. * <method_t>self._call_connection_made,
  73884. * self)) # <<<<<<<<<<<<<<
  73885. *
  73886. * cdef inline _schedule_call_connection_lost(self, exc):
  73887. */
  73888. __pyx_t_2 = __pyx_f_6uvloop_4loop_new_MethodHandle(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_t_1), __pyx_kp_u_UVTransport__call_connection_mad, ((__pyx_t_6uvloop_4loop_method_t)((struct __pyx_vtabstruct_6uvloop_4loop_UVBaseTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_call_connection_made), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(16, 26, __pyx_L1_error)
  73889. __Pyx_GOTREF(__pyx_t_2);
  73890. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  73891. /* "uvloop/handles/basetransport.pyx":26
  73892. * cdef inline _schedule_call_connection_made(self):
  73893. * self._loop._call_soon_handle(
  73894. * new_MethodHandle(self._loop, # <<<<<<<<<<<<<<
  73895. * "UVTransport._call_connection_made",
  73896. * <method_t>self._call_connection_made,
  73897. */
  73898. if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_6uvloop_4loop_Handle))))) __PYX_ERR(16, 26, __pyx_L1_error)
  73899. /* "uvloop/handles/basetransport.pyx":25
  73900. *
  73901. * cdef inline _schedule_call_connection_made(self):
  73902. * self._loop._call_soon_handle( # <<<<<<<<<<<<<<
  73903. * new_MethodHandle(self._loop,
  73904. * "UVTransport._call_connection_made",
  73905. */
  73906. __pyx_t_1 = __pyx_f_6uvloop_4loop_4Loop__call_soon_handle(__pyx_v_self->__pyx_base.__pyx_base._loop, ((struct __pyx_obj_6uvloop_4loop_Handle *)__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 25, __pyx_L1_error)
  73907. __Pyx_GOTREF(__pyx_t_1);
  73908. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  73909. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  73910. /* "uvloop/handles/basetransport.pyx":24
  73911. * return 0
  73912. *
  73913. * cdef inline _schedule_call_connection_made(self): # <<<<<<<<<<<<<<
  73914. * self._loop._call_soon_handle(
  73915. * new_MethodHandle(self._loop,
  73916. */
  73917. /* function exit code */
  73918. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  73919. goto __pyx_L0;
  73920. __pyx_L1_error:;
  73921. __Pyx_XDECREF(__pyx_t_1);
  73922. __Pyx_XDECREF(__pyx_t_2);
  73923. __Pyx_AddTraceback("uvloop.loop.UVBaseTransport._schedule_call_connection_made", __pyx_clineno, __pyx_lineno, __pyx_filename);
  73924. __pyx_r = 0;
  73925. __pyx_L0:;
  73926. __Pyx_XGIVEREF(__pyx_r);
  73927. __Pyx_RefNannyFinishContext();
  73928. return __pyx_r;
  73929. }
  73930. /* "uvloop/handles/basetransport.pyx":31
  73931. * self))
  73932. *
  73933. * cdef inline _schedule_call_connection_lost(self, exc): # <<<<<<<<<<<<<<
  73934. * self._loop._call_soon_handle(
  73935. * new_MethodHandle1(self._loop,
  73936. */
  73937. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_15UVBaseTransport__schedule_call_connection_lost(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self, PyObject *__pyx_v_exc) {
  73938. PyObject *__pyx_r = NULL;
  73939. __Pyx_RefNannyDeclarations
  73940. PyObject *__pyx_t_1 = NULL;
  73941. PyObject *__pyx_t_2 = NULL;
  73942. __Pyx_RefNannySetupContext("_schedule_call_connection_lost", 0);
  73943. /* "uvloop/handles/basetransport.pyx":33
  73944. * cdef inline _schedule_call_connection_lost(self, exc):
  73945. * self._loop._call_soon_handle(
  73946. * new_MethodHandle1(self._loop, # <<<<<<<<<<<<<<
  73947. * "UVTransport._call_connection_lost",
  73948. * <method1_t>self._call_connection_lost,
  73949. */
  73950. __pyx_t_1 = ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._loop);
  73951. __Pyx_INCREF(__pyx_t_1);
  73952. /* "uvloop/handles/basetransport.pyx":36
  73953. * "UVTransport._call_connection_lost",
  73954. * <method1_t>self._call_connection_lost,
  73955. * self, exc)) # <<<<<<<<<<<<<<
  73956. *
  73957. * cdef _fatal_error(self, exc, throw, reason=None):
  73958. */
  73959. __pyx_t_2 = __pyx_f_6uvloop_4loop_new_MethodHandle1(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_t_1), __pyx_kp_u_UVTransport__call_connection_los, ((__pyx_t_6uvloop_4loop_method1_t)((struct __pyx_vtabstruct_6uvloop_4loop_UVBaseTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_call_connection_lost), ((PyObject *)__pyx_v_self), __pyx_v_exc); if (unlikely(!__pyx_t_2)) __PYX_ERR(16, 33, __pyx_L1_error)
  73960. __Pyx_GOTREF(__pyx_t_2);
  73961. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  73962. /* "uvloop/handles/basetransport.pyx":33
  73963. * cdef inline _schedule_call_connection_lost(self, exc):
  73964. * self._loop._call_soon_handle(
  73965. * new_MethodHandle1(self._loop, # <<<<<<<<<<<<<<
  73966. * "UVTransport._call_connection_lost",
  73967. * <method1_t>self._call_connection_lost,
  73968. */
  73969. if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_6uvloop_4loop_Handle))))) __PYX_ERR(16, 33, __pyx_L1_error)
  73970. /* "uvloop/handles/basetransport.pyx":32
  73971. *
  73972. * cdef inline _schedule_call_connection_lost(self, exc):
  73973. * self._loop._call_soon_handle( # <<<<<<<<<<<<<<
  73974. * new_MethodHandle1(self._loop,
  73975. * "UVTransport._call_connection_lost",
  73976. */
  73977. __pyx_t_1 = __pyx_f_6uvloop_4loop_4Loop__call_soon_handle(__pyx_v_self->__pyx_base.__pyx_base._loop, ((struct __pyx_obj_6uvloop_4loop_Handle *)__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 32, __pyx_L1_error)
  73978. __Pyx_GOTREF(__pyx_t_1);
  73979. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  73980. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  73981. /* "uvloop/handles/basetransport.pyx":31
  73982. * self))
  73983. *
  73984. * cdef inline _schedule_call_connection_lost(self, exc): # <<<<<<<<<<<<<<
  73985. * self._loop._call_soon_handle(
  73986. * new_MethodHandle1(self._loop,
  73987. */
  73988. /* function exit code */
  73989. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  73990. goto __pyx_L0;
  73991. __pyx_L1_error:;
  73992. __Pyx_XDECREF(__pyx_t_1);
  73993. __Pyx_XDECREF(__pyx_t_2);
  73994. __Pyx_AddTraceback("uvloop.loop.UVBaseTransport._schedule_call_connection_lost", __pyx_clineno, __pyx_lineno, __pyx_filename);
  73995. __pyx_r = 0;
  73996. __pyx_L0:;
  73997. __Pyx_XGIVEREF(__pyx_r);
  73998. __Pyx_RefNannyFinishContext();
  73999. return __pyx_r;
  74000. }
  74001. /* "uvloop/handles/basetransport.pyx":38
  74002. * self, exc))
  74003. *
  74004. * cdef _fatal_error(self, exc, throw, reason=None): # <<<<<<<<<<<<<<
  74005. * # Overload UVHandle._fatal_error
  74006. *
  74007. */
  74008. static PyObject *__pyx_f_6uvloop_4loop_15UVBaseTransport__fatal_error(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self, PyObject *__pyx_v_exc, PyObject *__pyx_v_throw, struct __pyx_opt_args_6uvloop_4loop_15UVBaseTransport__fatal_error *__pyx_optional_args) {
  74009. PyObject *__pyx_v_reason = ((PyObject *)Py_None);
  74010. PyObject *__pyx_v_msg = NULL;
  74011. PyObject *__pyx_r = NULL;
  74012. __Pyx_RefNannyDeclarations
  74013. PyObject *__pyx_t_1 = NULL;
  74014. PyObject *__pyx_t_2 = NULL;
  74015. PyObject *__pyx_t_3 = NULL;
  74016. int __pyx_t_4;
  74017. int __pyx_t_5;
  74018. int __pyx_t_6;
  74019. Py_ssize_t __pyx_t_7;
  74020. Py_UCS4 __pyx_t_8;
  74021. PyObject *__pyx_t_9 = NULL;
  74022. __Pyx_RefNannySetupContext("_fatal_error", 0);
  74023. if (__pyx_optional_args) {
  74024. if (__pyx_optional_args->__pyx_n > 0) {
  74025. __pyx_v_reason = __pyx_optional_args->reason;
  74026. }
  74027. }
  74028. /* "uvloop/handles/basetransport.pyx":41
  74029. * # Overload UVHandle._fatal_error
  74030. *
  74031. * self._force_close(exc) # <<<<<<<<<<<<<<
  74032. *
  74033. * if not isinstance(exc, OSError):
  74034. */
  74035. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_force_close); if (unlikely(!__pyx_t_2)) __PYX_ERR(16, 41, __pyx_L1_error)
  74036. __Pyx_GOTREF(__pyx_t_2);
  74037. __pyx_t_3 = NULL;
  74038. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
  74039. __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
  74040. if (likely(__pyx_t_3)) {
  74041. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  74042. __Pyx_INCREF(__pyx_t_3);
  74043. __Pyx_INCREF(function);
  74044. __Pyx_DECREF_SET(__pyx_t_2, function);
  74045. }
  74046. }
  74047. __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_exc) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_exc);
  74048. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  74049. if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 41, __pyx_L1_error)
  74050. __Pyx_GOTREF(__pyx_t_1);
  74051. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  74052. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  74053. /* "uvloop/handles/basetransport.pyx":43
  74054. * self._force_close(exc)
  74055. *
  74056. * if not isinstance(exc, OSError): # <<<<<<<<<<<<<<
  74057. *
  74058. * if throw or self._loop is None:
  74059. */
  74060. __pyx_t_4 = PyObject_IsInstance(__pyx_v_exc, __pyx_builtin_OSError); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(16, 43, __pyx_L1_error)
  74061. __pyx_t_5 = ((!(__pyx_t_4 != 0)) != 0);
  74062. if (__pyx_t_5) {
  74063. /* "uvloop/handles/basetransport.pyx":45
  74064. * if not isinstance(exc, OSError):
  74065. *
  74066. * if throw or self._loop is None: # <<<<<<<<<<<<<<
  74067. * raise exc
  74068. *
  74069. */
  74070. __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_throw); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(16, 45, __pyx_L1_error)
  74071. if (!__pyx_t_4) {
  74072. } else {
  74073. __pyx_t_5 = __pyx_t_4;
  74074. goto __pyx_L5_bool_binop_done;
  74075. }
  74076. __pyx_t_4 = (((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._loop) == Py_None);
  74077. __pyx_t_6 = (__pyx_t_4 != 0);
  74078. __pyx_t_5 = __pyx_t_6;
  74079. __pyx_L5_bool_binop_done:;
  74080. if (unlikely(__pyx_t_5)) {
  74081. /* "uvloop/handles/basetransport.pyx":46
  74082. *
  74083. * if throw or self._loop is None:
  74084. * raise exc # <<<<<<<<<<<<<<
  74085. *
  74086. * msg = f'Fatal error on transport {self.__class__.__name__}'
  74087. */
  74088. __Pyx_Raise(__pyx_v_exc, 0, 0, 0);
  74089. __PYX_ERR(16, 46, __pyx_L1_error)
  74090. /* "uvloop/handles/basetransport.pyx":45
  74091. * if not isinstance(exc, OSError):
  74092. *
  74093. * if throw or self._loop is None: # <<<<<<<<<<<<<<
  74094. * raise exc
  74095. *
  74096. */
  74097. }
  74098. /* "uvloop/handles/basetransport.pyx":48
  74099. * raise exc
  74100. *
  74101. * msg = f'Fatal error on transport {self.__class__.__name__}' # <<<<<<<<<<<<<<
  74102. * if reason is not None:
  74103. * msg = f'{msg} ({reason})'
  74104. */
  74105. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 48, __pyx_L1_error)
  74106. __Pyx_GOTREF(__pyx_t_1);
  74107. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(16, 48, __pyx_L1_error)
  74108. __Pyx_GOTREF(__pyx_t_2);
  74109. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  74110. __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_t_2, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 48, __pyx_L1_error)
  74111. __Pyx_GOTREF(__pyx_t_1);
  74112. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  74113. __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Fatal_error_on_transport, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(16, 48, __pyx_L1_error)
  74114. __Pyx_GOTREF(__pyx_t_2);
  74115. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  74116. __pyx_v_msg = ((PyObject*)__pyx_t_2);
  74117. __pyx_t_2 = 0;
  74118. /* "uvloop/handles/basetransport.pyx":49
  74119. *
  74120. * msg = f'Fatal error on transport {self.__class__.__name__}'
  74121. * if reason is not None: # <<<<<<<<<<<<<<
  74122. * msg = f'{msg} ({reason})'
  74123. *
  74124. */
  74125. __pyx_t_5 = (__pyx_v_reason != Py_None);
  74126. __pyx_t_6 = (__pyx_t_5 != 0);
  74127. if (__pyx_t_6) {
  74128. /* "uvloop/handles/basetransport.pyx":50
  74129. * msg = f'Fatal error on transport {self.__class__.__name__}'
  74130. * if reason is not None:
  74131. * msg = f'{msg} ({reason})' # <<<<<<<<<<<<<<
  74132. *
  74133. * self._loop.call_exception_handler({
  74134. */
  74135. __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(16, 50, __pyx_L1_error)
  74136. __Pyx_GOTREF(__pyx_t_2);
  74137. __pyx_t_7 = 0;
  74138. __pyx_t_8 = 127;
  74139. __Pyx_INCREF(__pyx_v_msg);
  74140. __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_v_msg) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_v_msg) : __pyx_t_8;
  74141. __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_v_msg);
  74142. __Pyx_GIVEREF(__pyx_v_msg);
  74143. PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_msg);
  74144. __Pyx_INCREF(__pyx_kp_u__118);
  74145. __pyx_t_7 += 2;
  74146. __Pyx_GIVEREF(__pyx_kp_u__118);
  74147. PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_kp_u__118);
  74148. __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_v_reason, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 50, __pyx_L1_error)
  74149. __Pyx_GOTREF(__pyx_t_1);
  74150. __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) : __pyx_t_8;
  74151. __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1);
  74152. __Pyx_GIVEREF(__pyx_t_1);
  74153. PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_1);
  74154. __pyx_t_1 = 0;
  74155. __Pyx_INCREF(__pyx_kp_u__119);
  74156. __pyx_t_7 += 1;
  74157. __Pyx_GIVEREF(__pyx_kp_u__119);
  74158. PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_kp_u__119);
  74159. __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_2, 4, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 50, __pyx_L1_error)
  74160. __Pyx_GOTREF(__pyx_t_1);
  74161. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  74162. __Pyx_DECREF_SET(__pyx_v_msg, ((PyObject*)__pyx_t_1));
  74163. __pyx_t_1 = 0;
  74164. /* "uvloop/handles/basetransport.pyx":49
  74165. *
  74166. * msg = f'Fatal error on transport {self.__class__.__name__}'
  74167. * if reason is not None: # <<<<<<<<<<<<<<
  74168. * msg = f'{msg} ({reason})'
  74169. *
  74170. */
  74171. }
  74172. /* "uvloop/handles/basetransport.pyx":52
  74173. * msg = f'{msg} ({reason})'
  74174. *
  74175. * self._loop.call_exception_handler({ # <<<<<<<<<<<<<<
  74176. * 'message': msg,
  74177. * 'exception': exc,
  74178. */
  74179. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._loop), __pyx_n_s_call_exception_handler); if (unlikely(!__pyx_t_2)) __PYX_ERR(16, 52, __pyx_L1_error)
  74180. __Pyx_GOTREF(__pyx_t_2);
  74181. /* "uvloop/handles/basetransport.pyx":53
  74182. *
  74183. * self._loop.call_exception_handler({
  74184. * 'message': msg, # <<<<<<<<<<<<<<
  74185. * 'exception': exc,
  74186. * 'transport': self,
  74187. */
  74188. __pyx_t_3 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 53, __pyx_L1_error)
  74189. __Pyx_GOTREF(__pyx_t_3);
  74190. if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_message, __pyx_v_msg) < 0) __PYX_ERR(16, 53, __pyx_L1_error)
  74191. /* "uvloop/handles/basetransport.pyx":54
  74192. * self._loop.call_exception_handler({
  74193. * 'message': msg,
  74194. * 'exception': exc, # <<<<<<<<<<<<<<
  74195. * 'transport': self,
  74196. * 'protocol': self._protocol,
  74197. */
  74198. if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_exception, __pyx_v_exc) < 0) __PYX_ERR(16, 53, __pyx_L1_error)
  74199. /* "uvloop/handles/basetransport.pyx":55
  74200. * 'message': msg,
  74201. * 'exception': exc,
  74202. * 'transport': self, # <<<<<<<<<<<<<<
  74203. * 'protocol': self._protocol,
  74204. * })
  74205. */
  74206. if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_transport, ((PyObject *)__pyx_v_self)) < 0) __PYX_ERR(16, 53, __pyx_L1_error)
  74207. /* "uvloop/handles/basetransport.pyx":56
  74208. * 'exception': exc,
  74209. * 'transport': self,
  74210. * 'protocol': self._protocol, # <<<<<<<<<<<<<<
  74211. * })
  74212. *
  74213. */
  74214. if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_protocol, __pyx_v_self->_protocol) < 0) __PYX_ERR(16, 53, __pyx_L1_error)
  74215. __pyx_t_9 = NULL;
  74216. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
  74217. __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
  74218. if (likely(__pyx_t_9)) {
  74219. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  74220. __Pyx_INCREF(__pyx_t_9);
  74221. __Pyx_INCREF(function);
  74222. __Pyx_DECREF_SET(__pyx_t_2, function);
  74223. }
  74224. }
  74225. __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_9, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
  74226. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  74227. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  74228. if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 52, __pyx_L1_error)
  74229. __Pyx_GOTREF(__pyx_t_1);
  74230. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  74231. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  74232. /* "uvloop/handles/basetransport.pyx":43
  74233. * self._force_close(exc)
  74234. *
  74235. * if not isinstance(exc, OSError): # <<<<<<<<<<<<<<
  74236. *
  74237. * if throw or self._loop is None:
  74238. */
  74239. }
  74240. /* "uvloop/handles/basetransport.pyx":38
  74241. * self, exc))
  74242. *
  74243. * cdef _fatal_error(self, exc, throw, reason=None): # <<<<<<<<<<<<<<
  74244. * # Overload UVHandle._fatal_error
  74245. *
  74246. */
  74247. /* function exit code */
  74248. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  74249. goto __pyx_L0;
  74250. __pyx_L1_error:;
  74251. __Pyx_XDECREF(__pyx_t_1);
  74252. __Pyx_XDECREF(__pyx_t_2);
  74253. __Pyx_XDECREF(__pyx_t_3);
  74254. __Pyx_XDECREF(__pyx_t_9);
  74255. __Pyx_AddTraceback("uvloop.loop.UVBaseTransport._fatal_error", __pyx_clineno, __pyx_lineno, __pyx_filename);
  74256. __pyx_r = 0;
  74257. __pyx_L0:;
  74258. __Pyx_XDECREF(__pyx_v_msg);
  74259. __Pyx_XGIVEREF(__pyx_r);
  74260. __Pyx_RefNannyFinishContext();
  74261. return __pyx_r;
  74262. }
  74263. /* "uvloop/handles/basetransport.pyx":59
  74264. * })
  74265. *
  74266. * cdef inline _maybe_pause_protocol(self): # <<<<<<<<<<<<<<
  74267. * cdef:
  74268. * size_t size = self._get_write_buffer_size()
  74269. */
  74270. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_15UVBaseTransport__maybe_pause_protocol(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self) {
  74271. size_t __pyx_v_size;
  74272. PyObject *__pyx_v_exc = NULL;
  74273. PyObject *__pyx_r = NULL;
  74274. __Pyx_RefNannyDeclarations
  74275. int __pyx_t_1;
  74276. PyObject *__pyx_t_2 = NULL;
  74277. PyObject *__pyx_t_3 = NULL;
  74278. PyObject *__pyx_t_4 = NULL;
  74279. PyObject *__pyx_t_5 = NULL;
  74280. PyObject *__pyx_t_6 = NULL;
  74281. PyObject *__pyx_t_7 = NULL;
  74282. int __pyx_t_8;
  74283. PyObject *__pyx_t_9 = NULL;
  74284. PyObject *__pyx_t_10 = NULL;
  74285. PyObject *__pyx_t_11 = NULL;
  74286. PyObject *__pyx_t_12 = NULL;
  74287. int __pyx_t_13;
  74288. char const *__pyx_t_14;
  74289. PyObject *__pyx_t_15 = NULL;
  74290. PyObject *__pyx_t_16 = NULL;
  74291. PyObject *__pyx_t_17 = NULL;
  74292. PyObject *__pyx_t_18 = NULL;
  74293. PyObject *__pyx_t_19 = NULL;
  74294. PyObject *__pyx_t_20 = NULL;
  74295. __Pyx_RefNannySetupContext("_maybe_pause_protocol", 0);
  74296. /* "uvloop/handles/basetransport.pyx":61
  74297. * cdef inline _maybe_pause_protocol(self):
  74298. * cdef:
  74299. * size_t size = self._get_write_buffer_size() # <<<<<<<<<<<<<<
  74300. *
  74301. * if size <= self._high_water:
  74302. */
  74303. __pyx_v_size = ((struct __pyx_vtabstruct_6uvloop_4loop_UVBaseTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_get_write_buffer_size(__pyx_v_self);
  74304. /* "uvloop/handles/basetransport.pyx":63
  74305. * size_t size = self._get_write_buffer_size()
  74306. *
  74307. * if size <= self._high_water: # <<<<<<<<<<<<<<
  74308. * return
  74309. *
  74310. */
  74311. __pyx_t_1 = ((__pyx_v_size <= __pyx_v_self->_high_water) != 0);
  74312. if (__pyx_t_1) {
  74313. /* "uvloop/handles/basetransport.pyx":64
  74314. *
  74315. * if size <= self._high_water:
  74316. * return # <<<<<<<<<<<<<<
  74317. *
  74318. * if not self._protocol_paused:
  74319. */
  74320. __Pyx_XDECREF(__pyx_r);
  74321. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  74322. goto __pyx_L0;
  74323. /* "uvloop/handles/basetransport.pyx":63
  74324. * size_t size = self._get_write_buffer_size()
  74325. *
  74326. * if size <= self._high_water: # <<<<<<<<<<<<<<
  74327. * return
  74328. *
  74329. */
  74330. }
  74331. /* "uvloop/handles/basetransport.pyx":66
  74332. * return
  74333. *
  74334. * if not self._protocol_paused: # <<<<<<<<<<<<<<
  74335. * self._protocol_paused = 1
  74336. * try:
  74337. */
  74338. __pyx_t_1 = ((!(__pyx_v_self->_protocol_paused != 0)) != 0);
  74339. if (__pyx_t_1) {
  74340. /* "uvloop/handles/basetransport.pyx":67
  74341. *
  74342. * if not self._protocol_paused:
  74343. * self._protocol_paused = 1 # <<<<<<<<<<<<<<
  74344. * try:
  74345. * self._protocol.pause_writing()
  74346. */
  74347. __pyx_v_self->_protocol_paused = 1;
  74348. /* "uvloop/handles/basetransport.pyx":68
  74349. * if not self._protocol_paused:
  74350. * self._protocol_paused = 1
  74351. * try: # <<<<<<<<<<<<<<
  74352. * self._protocol.pause_writing()
  74353. * except Exception as exc:
  74354. */
  74355. {
  74356. __Pyx_PyThreadState_declare
  74357. __Pyx_PyThreadState_assign
  74358. __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
  74359. __Pyx_XGOTREF(__pyx_t_2);
  74360. __Pyx_XGOTREF(__pyx_t_3);
  74361. __Pyx_XGOTREF(__pyx_t_4);
  74362. /*try:*/ {
  74363. /* "uvloop/handles/basetransport.pyx":69
  74364. * self._protocol_paused = 1
  74365. * try:
  74366. * self._protocol.pause_writing() # <<<<<<<<<<<<<<
  74367. * except Exception as exc:
  74368. * self._loop.call_exception_handler({
  74369. */
  74370. __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_protocol, __pyx_n_s_pause_writing); if (unlikely(!__pyx_t_6)) __PYX_ERR(16, 69, __pyx_L5_error)
  74371. __Pyx_GOTREF(__pyx_t_6);
  74372. __pyx_t_7 = NULL;
  74373. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
  74374. __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
  74375. if (likely(__pyx_t_7)) {
  74376. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
  74377. __Pyx_INCREF(__pyx_t_7);
  74378. __Pyx_INCREF(function);
  74379. __Pyx_DECREF_SET(__pyx_t_6, function);
  74380. }
  74381. }
  74382. __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
  74383. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  74384. if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 69, __pyx_L5_error)
  74385. __Pyx_GOTREF(__pyx_t_5);
  74386. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  74387. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  74388. /* "uvloop/handles/basetransport.pyx":68
  74389. * if not self._protocol_paused:
  74390. * self._protocol_paused = 1
  74391. * try: # <<<<<<<<<<<<<<
  74392. * self._protocol.pause_writing()
  74393. * except Exception as exc:
  74394. */
  74395. }
  74396. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  74397. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  74398. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  74399. goto __pyx_L10_try_end;
  74400. __pyx_L5_error:;
  74401. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  74402. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  74403. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  74404. /* "uvloop/handles/basetransport.pyx":70
  74405. * try:
  74406. * self._protocol.pause_writing()
  74407. * except Exception as exc: # <<<<<<<<<<<<<<
  74408. * self._loop.call_exception_handler({
  74409. * 'message': 'protocol.pause_writing() failed',
  74410. */
  74411. __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
  74412. if (__pyx_t_8) {
  74413. __Pyx_AddTraceback("uvloop.loop.UVBaseTransport._maybe_pause_protocol", __pyx_clineno, __pyx_lineno, __pyx_filename);
  74414. if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(16, 70, __pyx_L7_except_error)
  74415. __Pyx_GOTREF(__pyx_t_5);
  74416. __Pyx_GOTREF(__pyx_t_6);
  74417. __Pyx_GOTREF(__pyx_t_7);
  74418. __Pyx_INCREF(__pyx_t_6);
  74419. __pyx_v_exc = __pyx_t_6;
  74420. /*try:*/ {
  74421. /* "uvloop/handles/basetransport.pyx":71
  74422. * self._protocol.pause_writing()
  74423. * except Exception as exc:
  74424. * self._loop.call_exception_handler({ # <<<<<<<<<<<<<<
  74425. * 'message': 'protocol.pause_writing() failed',
  74426. * 'exception': exc,
  74427. */
  74428. __pyx_t_10 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._loop), __pyx_n_s_call_exception_handler); if (unlikely(!__pyx_t_10)) __PYX_ERR(16, 71, __pyx_L16_error)
  74429. __Pyx_GOTREF(__pyx_t_10);
  74430. /* "uvloop/handles/basetransport.pyx":72
  74431. * except Exception as exc:
  74432. * self._loop.call_exception_handler({
  74433. * 'message': 'protocol.pause_writing() failed', # <<<<<<<<<<<<<<
  74434. * 'exception': exc,
  74435. * 'transport': self,
  74436. */
  74437. __pyx_t_11 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_11)) __PYX_ERR(16, 72, __pyx_L16_error)
  74438. __Pyx_GOTREF(__pyx_t_11);
  74439. if (PyDict_SetItem(__pyx_t_11, __pyx_n_u_message, __pyx_kp_u_protocol_pause_writing_failed) < 0) __PYX_ERR(16, 72, __pyx_L16_error)
  74440. /* "uvloop/handles/basetransport.pyx":73
  74441. * self._loop.call_exception_handler({
  74442. * 'message': 'protocol.pause_writing() failed',
  74443. * 'exception': exc, # <<<<<<<<<<<<<<
  74444. * 'transport': self,
  74445. * 'protocol': self._protocol,
  74446. */
  74447. if (PyDict_SetItem(__pyx_t_11, __pyx_n_u_exception, __pyx_v_exc) < 0) __PYX_ERR(16, 72, __pyx_L16_error)
  74448. /* "uvloop/handles/basetransport.pyx":74
  74449. * 'message': 'protocol.pause_writing() failed',
  74450. * 'exception': exc,
  74451. * 'transport': self, # <<<<<<<<<<<<<<
  74452. * 'protocol': self._protocol,
  74453. * })
  74454. */
  74455. if (PyDict_SetItem(__pyx_t_11, __pyx_n_u_transport, ((PyObject *)__pyx_v_self)) < 0) __PYX_ERR(16, 72, __pyx_L16_error)
  74456. /* "uvloop/handles/basetransport.pyx":75
  74457. * 'exception': exc,
  74458. * 'transport': self,
  74459. * 'protocol': self._protocol, # <<<<<<<<<<<<<<
  74460. * })
  74461. *
  74462. */
  74463. if (PyDict_SetItem(__pyx_t_11, __pyx_n_u_protocol, __pyx_v_self->_protocol) < 0) __PYX_ERR(16, 72, __pyx_L16_error)
  74464. __pyx_t_12 = NULL;
  74465. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) {
  74466. __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
  74467. if (likely(__pyx_t_12)) {
  74468. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
  74469. __Pyx_INCREF(__pyx_t_12);
  74470. __Pyx_INCREF(function);
  74471. __Pyx_DECREF_SET(__pyx_t_10, function);
  74472. }
  74473. }
  74474. __pyx_t_9 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_10, __pyx_t_12, __pyx_t_11) : __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_11);
  74475. __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
  74476. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  74477. if (unlikely(!__pyx_t_9)) __PYX_ERR(16, 71, __pyx_L16_error)
  74478. __Pyx_GOTREF(__pyx_t_9);
  74479. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  74480. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  74481. }
  74482. /* "uvloop/handles/basetransport.pyx":70
  74483. * try:
  74484. * self._protocol.pause_writing()
  74485. * except Exception as exc: # <<<<<<<<<<<<<<
  74486. * self._loop.call_exception_handler({
  74487. * 'message': 'protocol.pause_writing() failed',
  74488. */
  74489. /*finally:*/ {
  74490. /*normal exit:*/{
  74491. __Pyx_DECREF(__pyx_v_exc);
  74492. __pyx_v_exc = NULL;
  74493. goto __pyx_L17;
  74494. }
  74495. __pyx_L16_error:;
  74496. /*exception exit:*/{
  74497. __Pyx_PyThreadState_declare
  74498. __Pyx_PyThreadState_assign
  74499. __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0;
  74500. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  74501. __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
  74502. __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
  74503. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  74504. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20);
  74505. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17) < 0)) __Pyx_ErrFetch(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17);
  74506. __Pyx_XGOTREF(__pyx_t_15);
  74507. __Pyx_XGOTREF(__pyx_t_16);
  74508. __Pyx_XGOTREF(__pyx_t_17);
  74509. __Pyx_XGOTREF(__pyx_t_18);
  74510. __Pyx_XGOTREF(__pyx_t_19);
  74511. __Pyx_XGOTREF(__pyx_t_20);
  74512. __pyx_t_8 = __pyx_lineno; __pyx_t_13 = __pyx_clineno; __pyx_t_14 = __pyx_filename;
  74513. {
  74514. __Pyx_DECREF(__pyx_v_exc);
  74515. __pyx_v_exc = NULL;
  74516. }
  74517. if (PY_MAJOR_VERSION >= 3) {
  74518. __Pyx_XGIVEREF(__pyx_t_18);
  74519. __Pyx_XGIVEREF(__pyx_t_19);
  74520. __Pyx_XGIVEREF(__pyx_t_20);
  74521. __Pyx_ExceptionReset(__pyx_t_18, __pyx_t_19, __pyx_t_20);
  74522. }
  74523. __Pyx_XGIVEREF(__pyx_t_15);
  74524. __Pyx_XGIVEREF(__pyx_t_16);
  74525. __Pyx_XGIVEREF(__pyx_t_17);
  74526. __Pyx_ErrRestore(__pyx_t_15, __pyx_t_16, __pyx_t_17);
  74527. __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0;
  74528. __pyx_lineno = __pyx_t_8; __pyx_clineno = __pyx_t_13; __pyx_filename = __pyx_t_14;
  74529. goto __pyx_L7_except_error;
  74530. }
  74531. __pyx_L17:;
  74532. }
  74533. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  74534. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  74535. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  74536. goto __pyx_L6_exception_handled;
  74537. }
  74538. goto __pyx_L7_except_error;
  74539. __pyx_L7_except_error:;
  74540. /* "uvloop/handles/basetransport.pyx":68
  74541. * if not self._protocol_paused:
  74542. * self._protocol_paused = 1
  74543. * try: # <<<<<<<<<<<<<<
  74544. * self._protocol.pause_writing()
  74545. * except Exception as exc:
  74546. */
  74547. __Pyx_XGIVEREF(__pyx_t_2);
  74548. __Pyx_XGIVEREF(__pyx_t_3);
  74549. __Pyx_XGIVEREF(__pyx_t_4);
  74550. __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
  74551. goto __pyx_L1_error;
  74552. __pyx_L6_exception_handled:;
  74553. __Pyx_XGIVEREF(__pyx_t_2);
  74554. __Pyx_XGIVEREF(__pyx_t_3);
  74555. __Pyx_XGIVEREF(__pyx_t_4);
  74556. __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
  74557. __pyx_L10_try_end:;
  74558. }
  74559. /* "uvloop/handles/basetransport.pyx":66
  74560. * return
  74561. *
  74562. * if not self._protocol_paused: # <<<<<<<<<<<<<<
  74563. * self._protocol_paused = 1
  74564. * try:
  74565. */
  74566. }
  74567. /* "uvloop/handles/basetransport.pyx":59
  74568. * })
  74569. *
  74570. * cdef inline _maybe_pause_protocol(self): # <<<<<<<<<<<<<<
  74571. * cdef:
  74572. * size_t size = self._get_write_buffer_size()
  74573. */
  74574. /* function exit code */
  74575. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  74576. goto __pyx_L0;
  74577. __pyx_L1_error:;
  74578. __Pyx_XDECREF(__pyx_t_5);
  74579. __Pyx_XDECREF(__pyx_t_6);
  74580. __Pyx_XDECREF(__pyx_t_7);
  74581. __Pyx_XDECREF(__pyx_t_9);
  74582. __Pyx_XDECREF(__pyx_t_10);
  74583. __Pyx_XDECREF(__pyx_t_11);
  74584. __Pyx_XDECREF(__pyx_t_12);
  74585. __Pyx_AddTraceback("uvloop.loop.UVBaseTransport._maybe_pause_protocol", __pyx_clineno, __pyx_lineno, __pyx_filename);
  74586. __pyx_r = 0;
  74587. __pyx_L0:;
  74588. __Pyx_XDECREF(__pyx_v_exc);
  74589. __Pyx_XGIVEREF(__pyx_r);
  74590. __Pyx_RefNannyFinishContext();
  74591. return __pyx_r;
  74592. }
  74593. /* "uvloop/handles/basetransport.pyx":78
  74594. * })
  74595. *
  74596. * cdef inline _maybe_resume_protocol(self): # <<<<<<<<<<<<<<
  74597. * cdef:
  74598. * size_t size = self._get_write_buffer_size()
  74599. */
  74600. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_15UVBaseTransport__maybe_resume_protocol(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self) {
  74601. size_t __pyx_v_size;
  74602. PyObject *__pyx_v_exc = NULL;
  74603. PyObject *__pyx_r = NULL;
  74604. __Pyx_RefNannyDeclarations
  74605. int __pyx_t_1;
  74606. int __pyx_t_2;
  74607. PyObject *__pyx_t_3 = NULL;
  74608. PyObject *__pyx_t_4 = NULL;
  74609. PyObject *__pyx_t_5 = NULL;
  74610. PyObject *__pyx_t_6 = NULL;
  74611. PyObject *__pyx_t_7 = NULL;
  74612. PyObject *__pyx_t_8 = NULL;
  74613. int __pyx_t_9;
  74614. PyObject *__pyx_t_10 = NULL;
  74615. PyObject *__pyx_t_11 = NULL;
  74616. PyObject *__pyx_t_12 = NULL;
  74617. PyObject *__pyx_t_13 = NULL;
  74618. int __pyx_t_14;
  74619. char const *__pyx_t_15;
  74620. PyObject *__pyx_t_16 = NULL;
  74621. PyObject *__pyx_t_17 = NULL;
  74622. PyObject *__pyx_t_18 = NULL;
  74623. PyObject *__pyx_t_19 = NULL;
  74624. PyObject *__pyx_t_20 = NULL;
  74625. PyObject *__pyx_t_21 = NULL;
  74626. __Pyx_RefNannySetupContext("_maybe_resume_protocol", 0);
  74627. /* "uvloop/handles/basetransport.pyx":80
  74628. * cdef inline _maybe_resume_protocol(self):
  74629. * cdef:
  74630. * size_t size = self._get_write_buffer_size() # <<<<<<<<<<<<<<
  74631. *
  74632. * if self._protocol_paused and size <= self._low_water:
  74633. */
  74634. __pyx_v_size = ((struct __pyx_vtabstruct_6uvloop_4loop_UVBaseTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_get_write_buffer_size(__pyx_v_self);
  74635. /* "uvloop/handles/basetransport.pyx":82
  74636. * size_t size = self._get_write_buffer_size()
  74637. *
  74638. * if self._protocol_paused and size <= self._low_water: # <<<<<<<<<<<<<<
  74639. * self._protocol_paused = 0
  74640. * try:
  74641. */
  74642. __pyx_t_2 = (__pyx_v_self->_protocol_paused != 0);
  74643. if (__pyx_t_2) {
  74644. } else {
  74645. __pyx_t_1 = __pyx_t_2;
  74646. goto __pyx_L4_bool_binop_done;
  74647. }
  74648. __pyx_t_2 = ((__pyx_v_size <= __pyx_v_self->_low_water) != 0);
  74649. __pyx_t_1 = __pyx_t_2;
  74650. __pyx_L4_bool_binop_done:;
  74651. if (__pyx_t_1) {
  74652. /* "uvloop/handles/basetransport.pyx":83
  74653. *
  74654. * if self._protocol_paused and size <= self._low_water:
  74655. * self._protocol_paused = 0 # <<<<<<<<<<<<<<
  74656. * try:
  74657. * self._protocol.resume_writing()
  74658. */
  74659. __pyx_v_self->_protocol_paused = 0;
  74660. /* "uvloop/handles/basetransport.pyx":84
  74661. * if self._protocol_paused and size <= self._low_water:
  74662. * self._protocol_paused = 0
  74663. * try: # <<<<<<<<<<<<<<
  74664. * self._protocol.resume_writing()
  74665. * except Exception as exc:
  74666. */
  74667. {
  74668. __Pyx_PyThreadState_declare
  74669. __Pyx_PyThreadState_assign
  74670. __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
  74671. __Pyx_XGOTREF(__pyx_t_3);
  74672. __Pyx_XGOTREF(__pyx_t_4);
  74673. __Pyx_XGOTREF(__pyx_t_5);
  74674. /*try:*/ {
  74675. /* "uvloop/handles/basetransport.pyx":85
  74676. * self._protocol_paused = 0
  74677. * try:
  74678. * self._protocol.resume_writing() # <<<<<<<<<<<<<<
  74679. * except Exception as exc:
  74680. * self._loop.call_exception_handler({
  74681. */
  74682. __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_protocol, __pyx_n_s_resume_writing); if (unlikely(!__pyx_t_7)) __PYX_ERR(16, 85, __pyx_L6_error)
  74683. __Pyx_GOTREF(__pyx_t_7);
  74684. __pyx_t_8 = NULL;
  74685. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
  74686. __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
  74687. if (likely(__pyx_t_8)) {
  74688. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
  74689. __Pyx_INCREF(__pyx_t_8);
  74690. __Pyx_INCREF(function);
  74691. __Pyx_DECREF_SET(__pyx_t_7, function);
  74692. }
  74693. }
  74694. __pyx_t_6 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_7);
  74695. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  74696. if (unlikely(!__pyx_t_6)) __PYX_ERR(16, 85, __pyx_L6_error)
  74697. __Pyx_GOTREF(__pyx_t_6);
  74698. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  74699. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  74700. /* "uvloop/handles/basetransport.pyx":84
  74701. * if self._protocol_paused and size <= self._low_water:
  74702. * self._protocol_paused = 0
  74703. * try: # <<<<<<<<<<<<<<
  74704. * self._protocol.resume_writing()
  74705. * except Exception as exc:
  74706. */
  74707. }
  74708. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  74709. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  74710. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  74711. goto __pyx_L11_try_end;
  74712. __pyx_L6_error:;
  74713. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  74714. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  74715. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  74716. /* "uvloop/handles/basetransport.pyx":86
  74717. * try:
  74718. * self._protocol.resume_writing()
  74719. * except Exception as exc: # <<<<<<<<<<<<<<
  74720. * self._loop.call_exception_handler({
  74721. * 'message': 'protocol.resume_writing() failed',
  74722. */
  74723. __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
  74724. if (__pyx_t_9) {
  74725. __Pyx_AddTraceback("uvloop.loop.UVBaseTransport._maybe_resume_protocol", __pyx_clineno, __pyx_lineno, __pyx_filename);
  74726. if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8) < 0) __PYX_ERR(16, 86, __pyx_L8_except_error)
  74727. __Pyx_GOTREF(__pyx_t_6);
  74728. __Pyx_GOTREF(__pyx_t_7);
  74729. __Pyx_GOTREF(__pyx_t_8);
  74730. __Pyx_INCREF(__pyx_t_7);
  74731. __pyx_v_exc = __pyx_t_7;
  74732. /*try:*/ {
  74733. /* "uvloop/handles/basetransport.pyx":87
  74734. * self._protocol.resume_writing()
  74735. * except Exception as exc:
  74736. * self._loop.call_exception_handler({ # <<<<<<<<<<<<<<
  74737. * 'message': 'protocol.resume_writing() failed',
  74738. * 'exception': exc,
  74739. */
  74740. __pyx_t_11 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._loop), __pyx_n_s_call_exception_handler); if (unlikely(!__pyx_t_11)) __PYX_ERR(16, 87, __pyx_L17_error)
  74741. __Pyx_GOTREF(__pyx_t_11);
  74742. /* "uvloop/handles/basetransport.pyx":88
  74743. * except Exception as exc:
  74744. * self._loop.call_exception_handler({
  74745. * 'message': 'protocol.resume_writing() failed', # <<<<<<<<<<<<<<
  74746. * 'exception': exc,
  74747. * 'transport': self,
  74748. */
  74749. __pyx_t_12 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_12)) __PYX_ERR(16, 88, __pyx_L17_error)
  74750. __Pyx_GOTREF(__pyx_t_12);
  74751. if (PyDict_SetItem(__pyx_t_12, __pyx_n_u_message, __pyx_kp_u_protocol_resume_writing_failed) < 0) __PYX_ERR(16, 88, __pyx_L17_error)
  74752. /* "uvloop/handles/basetransport.pyx":89
  74753. * self._loop.call_exception_handler({
  74754. * 'message': 'protocol.resume_writing() failed',
  74755. * 'exception': exc, # <<<<<<<<<<<<<<
  74756. * 'transport': self,
  74757. * 'protocol': self._protocol,
  74758. */
  74759. if (PyDict_SetItem(__pyx_t_12, __pyx_n_u_exception, __pyx_v_exc) < 0) __PYX_ERR(16, 88, __pyx_L17_error)
  74760. /* "uvloop/handles/basetransport.pyx":90
  74761. * 'message': 'protocol.resume_writing() failed',
  74762. * 'exception': exc,
  74763. * 'transport': self, # <<<<<<<<<<<<<<
  74764. * 'protocol': self._protocol,
  74765. * })
  74766. */
  74767. if (PyDict_SetItem(__pyx_t_12, __pyx_n_u_transport, ((PyObject *)__pyx_v_self)) < 0) __PYX_ERR(16, 88, __pyx_L17_error)
  74768. /* "uvloop/handles/basetransport.pyx":91
  74769. * 'exception': exc,
  74770. * 'transport': self,
  74771. * 'protocol': self._protocol, # <<<<<<<<<<<<<<
  74772. * })
  74773. *
  74774. */
  74775. if (PyDict_SetItem(__pyx_t_12, __pyx_n_u_protocol, __pyx_v_self->_protocol) < 0) __PYX_ERR(16, 88, __pyx_L17_error)
  74776. __pyx_t_13 = NULL;
  74777. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) {
  74778. __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_11);
  74779. if (likely(__pyx_t_13)) {
  74780. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
  74781. __Pyx_INCREF(__pyx_t_13);
  74782. __Pyx_INCREF(function);
  74783. __Pyx_DECREF_SET(__pyx_t_11, function);
  74784. }
  74785. }
  74786. __pyx_t_10 = (__pyx_t_13) ? __Pyx_PyObject_Call2Args(__pyx_t_11, __pyx_t_13, __pyx_t_12) : __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_12);
  74787. __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
  74788. __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  74789. if (unlikely(!__pyx_t_10)) __PYX_ERR(16, 87, __pyx_L17_error)
  74790. __Pyx_GOTREF(__pyx_t_10);
  74791. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  74792. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  74793. }
  74794. /* "uvloop/handles/basetransport.pyx":86
  74795. * try:
  74796. * self._protocol.resume_writing()
  74797. * except Exception as exc: # <<<<<<<<<<<<<<
  74798. * self._loop.call_exception_handler({
  74799. * 'message': 'protocol.resume_writing() failed',
  74800. */
  74801. /*finally:*/ {
  74802. /*normal exit:*/{
  74803. __Pyx_DECREF(__pyx_v_exc);
  74804. __pyx_v_exc = NULL;
  74805. goto __pyx_L18;
  74806. }
  74807. __pyx_L17_error:;
  74808. /*exception exit:*/{
  74809. __Pyx_PyThreadState_declare
  74810. __Pyx_PyThreadState_assign
  74811. __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0;
  74812. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  74813. __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
  74814. __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
  74815. __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
  74816. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21);
  74817. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18) < 0)) __Pyx_ErrFetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18);
  74818. __Pyx_XGOTREF(__pyx_t_16);
  74819. __Pyx_XGOTREF(__pyx_t_17);
  74820. __Pyx_XGOTREF(__pyx_t_18);
  74821. __Pyx_XGOTREF(__pyx_t_19);
  74822. __Pyx_XGOTREF(__pyx_t_20);
  74823. __Pyx_XGOTREF(__pyx_t_21);
  74824. __pyx_t_9 = __pyx_lineno; __pyx_t_14 = __pyx_clineno; __pyx_t_15 = __pyx_filename;
  74825. {
  74826. __Pyx_DECREF(__pyx_v_exc);
  74827. __pyx_v_exc = NULL;
  74828. }
  74829. if (PY_MAJOR_VERSION >= 3) {
  74830. __Pyx_XGIVEREF(__pyx_t_19);
  74831. __Pyx_XGIVEREF(__pyx_t_20);
  74832. __Pyx_XGIVEREF(__pyx_t_21);
  74833. __Pyx_ExceptionReset(__pyx_t_19, __pyx_t_20, __pyx_t_21);
  74834. }
  74835. __Pyx_XGIVEREF(__pyx_t_16);
  74836. __Pyx_XGIVEREF(__pyx_t_17);
  74837. __Pyx_XGIVEREF(__pyx_t_18);
  74838. __Pyx_ErrRestore(__pyx_t_16, __pyx_t_17, __pyx_t_18);
  74839. __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0;
  74840. __pyx_lineno = __pyx_t_9; __pyx_clineno = __pyx_t_14; __pyx_filename = __pyx_t_15;
  74841. goto __pyx_L8_except_error;
  74842. }
  74843. __pyx_L18:;
  74844. }
  74845. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  74846. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  74847. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  74848. goto __pyx_L7_exception_handled;
  74849. }
  74850. goto __pyx_L8_except_error;
  74851. __pyx_L8_except_error:;
  74852. /* "uvloop/handles/basetransport.pyx":84
  74853. * if self._protocol_paused and size <= self._low_water:
  74854. * self._protocol_paused = 0
  74855. * try: # <<<<<<<<<<<<<<
  74856. * self._protocol.resume_writing()
  74857. * except Exception as exc:
  74858. */
  74859. __Pyx_XGIVEREF(__pyx_t_3);
  74860. __Pyx_XGIVEREF(__pyx_t_4);
  74861. __Pyx_XGIVEREF(__pyx_t_5);
  74862. __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
  74863. goto __pyx_L1_error;
  74864. __pyx_L7_exception_handled:;
  74865. __Pyx_XGIVEREF(__pyx_t_3);
  74866. __Pyx_XGIVEREF(__pyx_t_4);
  74867. __Pyx_XGIVEREF(__pyx_t_5);
  74868. __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
  74869. __pyx_L11_try_end:;
  74870. }
  74871. /* "uvloop/handles/basetransport.pyx":82
  74872. * size_t size = self._get_write_buffer_size()
  74873. *
  74874. * if self._protocol_paused and size <= self._low_water: # <<<<<<<<<<<<<<
  74875. * self._protocol_paused = 0
  74876. * try:
  74877. */
  74878. }
  74879. /* "uvloop/handles/basetransport.pyx":78
  74880. * })
  74881. *
  74882. * cdef inline _maybe_resume_protocol(self): # <<<<<<<<<<<<<<
  74883. * cdef:
  74884. * size_t size = self._get_write_buffer_size()
  74885. */
  74886. /* function exit code */
  74887. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  74888. goto __pyx_L0;
  74889. __pyx_L1_error:;
  74890. __Pyx_XDECREF(__pyx_t_6);
  74891. __Pyx_XDECREF(__pyx_t_7);
  74892. __Pyx_XDECREF(__pyx_t_8);
  74893. __Pyx_XDECREF(__pyx_t_10);
  74894. __Pyx_XDECREF(__pyx_t_11);
  74895. __Pyx_XDECREF(__pyx_t_12);
  74896. __Pyx_XDECREF(__pyx_t_13);
  74897. __Pyx_AddTraceback("uvloop.loop.UVBaseTransport._maybe_resume_protocol", __pyx_clineno, __pyx_lineno, __pyx_filename);
  74898. __pyx_r = 0;
  74899. __pyx_L0:;
  74900. __Pyx_XDECREF(__pyx_v_exc);
  74901. __Pyx_XGIVEREF(__pyx_r);
  74902. __Pyx_RefNannyFinishContext();
  74903. return __pyx_r;
  74904. }
  74905. /* "uvloop/handles/basetransport.pyx":94
  74906. * })
  74907. *
  74908. * cdef _wakeup_waiter(self): # <<<<<<<<<<<<<<
  74909. * if self._waiter is not None:
  74910. * if not self._waiter.cancelled():
  74911. */
  74912. static PyObject *__pyx_f_6uvloop_4loop_15UVBaseTransport__wakeup_waiter(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self) {
  74913. PyObject *__pyx_r = NULL;
  74914. __Pyx_RefNannyDeclarations
  74915. int __pyx_t_1;
  74916. int __pyx_t_2;
  74917. PyObject *__pyx_t_3 = NULL;
  74918. PyObject *__pyx_t_4 = NULL;
  74919. PyObject *__pyx_t_5 = NULL;
  74920. PyObject *__pyx_t_6 = NULL;
  74921. __Pyx_RefNannySetupContext("_wakeup_waiter", 0);
  74922. /* "uvloop/handles/basetransport.pyx":95
  74923. *
  74924. * cdef _wakeup_waiter(self):
  74925. * if self._waiter is not None: # <<<<<<<<<<<<<<
  74926. * if not self._waiter.cancelled():
  74927. * if not self._is_alive():
  74928. */
  74929. __pyx_t_1 = (__pyx_v_self->_waiter != Py_None);
  74930. __pyx_t_2 = (__pyx_t_1 != 0);
  74931. if (__pyx_t_2) {
  74932. /* "uvloop/handles/basetransport.pyx":96
  74933. * cdef _wakeup_waiter(self):
  74934. * if self._waiter is not None:
  74935. * if not self._waiter.cancelled(): # <<<<<<<<<<<<<<
  74936. * if not self._is_alive():
  74937. * self._waiter.set_exception(
  74938. */
  74939. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_waiter, __pyx_n_s_cancelled); if (unlikely(!__pyx_t_4)) __PYX_ERR(16, 96, __pyx_L1_error)
  74940. __Pyx_GOTREF(__pyx_t_4);
  74941. __pyx_t_5 = NULL;
  74942. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
  74943. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
  74944. if (likely(__pyx_t_5)) {
  74945. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  74946. __Pyx_INCREF(__pyx_t_5);
  74947. __Pyx_INCREF(function);
  74948. __Pyx_DECREF_SET(__pyx_t_4, function);
  74949. }
  74950. }
  74951. __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
  74952. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  74953. if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 96, __pyx_L1_error)
  74954. __Pyx_GOTREF(__pyx_t_3);
  74955. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  74956. __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(16, 96, __pyx_L1_error)
  74957. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  74958. __pyx_t_1 = ((!__pyx_t_2) != 0);
  74959. if (__pyx_t_1) {
  74960. /* "uvloop/handles/basetransport.pyx":97
  74961. * if self._waiter is not None:
  74962. * if not self._waiter.cancelled():
  74963. * if not self._is_alive(): # <<<<<<<<<<<<<<
  74964. * self._waiter.set_exception(
  74965. * RuntimeError(
  74966. */
  74967. __pyx_t_1 = ((!(((struct __pyx_vtabstruct_6uvloop_4loop_UVBaseTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._is_alive(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)) != 0)) != 0);
  74968. if (__pyx_t_1) {
  74969. /* "uvloop/handles/basetransport.pyx":98
  74970. * if not self._waiter.cancelled():
  74971. * if not self._is_alive():
  74972. * self._waiter.set_exception( # <<<<<<<<<<<<<<
  74973. * RuntimeError(
  74974. * 'closed Transport handle and unset waiter'))
  74975. */
  74976. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_waiter, __pyx_n_s_set_exception); if (unlikely(!__pyx_t_4)) __PYX_ERR(16, 98, __pyx_L1_error)
  74977. __Pyx_GOTREF(__pyx_t_4);
  74978. /* "uvloop/handles/basetransport.pyx":99
  74979. * if not self._is_alive():
  74980. * self._waiter.set_exception(
  74981. * RuntimeError( # <<<<<<<<<<<<<<
  74982. * 'closed Transport handle and unset waiter'))
  74983. * else:
  74984. */
  74985. __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__120, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 99, __pyx_L1_error)
  74986. __Pyx_GOTREF(__pyx_t_5);
  74987. __pyx_t_6 = NULL;
  74988. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
  74989. __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
  74990. if (likely(__pyx_t_6)) {
  74991. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  74992. __Pyx_INCREF(__pyx_t_6);
  74993. __Pyx_INCREF(function);
  74994. __Pyx_DECREF_SET(__pyx_t_4, function);
  74995. }
  74996. }
  74997. __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5);
  74998. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  74999. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  75000. if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 98, __pyx_L1_error)
  75001. __Pyx_GOTREF(__pyx_t_3);
  75002. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  75003. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  75004. /* "uvloop/handles/basetransport.pyx":97
  75005. * if self._waiter is not None:
  75006. * if not self._waiter.cancelled():
  75007. * if not self._is_alive(): # <<<<<<<<<<<<<<
  75008. * self._waiter.set_exception(
  75009. * RuntimeError(
  75010. */
  75011. goto __pyx_L5;
  75012. }
  75013. /* "uvloop/handles/basetransport.pyx":102
  75014. * 'closed Transport handle and unset waiter'))
  75015. * else:
  75016. * self._waiter.set_result(True) # <<<<<<<<<<<<<<
  75017. * self._waiter = None
  75018. *
  75019. */
  75020. /*else*/ {
  75021. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_waiter, __pyx_n_s_set_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(16, 102, __pyx_L1_error)
  75022. __Pyx_GOTREF(__pyx_t_4);
  75023. __pyx_t_5 = NULL;
  75024. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
  75025. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
  75026. if (likely(__pyx_t_5)) {
  75027. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  75028. __Pyx_INCREF(__pyx_t_5);
  75029. __Pyx_INCREF(function);
  75030. __Pyx_DECREF_SET(__pyx_t_4, function);
  75031. }
  75032. }
  75033. __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, Py_True) : __Pyx_PyObject_CallOneArg(__pyx_t_4, Py_True);
  75034. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  75035. if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 102, __pyx_L1_error)
  75036. __Pyx_GOTREF(__pyx_t_3);
  75037. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  75038. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  75039. }
  75040. __pyx_L5:;
  75041. /* "uvloop/handles/basetransport.pyx":96
  75042. * cdef _wakeup_waiter(self):
  75043. * if self._waiter is not None:
  75044. * if not self._waiter.cancelled(): # <<<<<<<<<<<<<<
  75045. * if not self._is_alive():
  75046. * self._waiter.set_exception(
  75047. */
  75048. }
  75049. /* "uvloop/handles/basetransport.pyx":103
  75050. * else:
  75051. * self._waiter.set_result(True)
  75052. * self._waiter = None # <<<<<<<<<<<<<<
  75053. *
  75054. * cdef _call_connection_made(self):
  75055. */
  75056. __Pyx_INCREF(Py_None);
  75057. __Pyx_GIVEREF(Py_None);
  75058. __Pyx_GOTREF(__pyx_v_self->_waiter);
  75059. __Pyx_DECREF(__pyx_v_self->_waiter);
  75060. __pyx_v_self->_waiter = Py_None;
  75061. /* "uvloop/handles/basetransport.pyx":95
  75062. *
  75063. * cdef _wakeup_waiter(self):
  75064. * if self._waiter is not None: # <<<<<<<<<<<<<<
  75065. * if not self._waiter.cancelled():
  75066. * if not self._is_alive():
  75067. */
  75068. }
  75069. /* "uvloop/handles/basetransport.pyx":94
  75070. * })
  75071. *
  75072. * cdef _wakeup_waiter(self): # <<<<<<<<<<<<<<
  75073. * if self._waiter is not None:
  75074. * if not self._waiter.cancelled():
  75075. */
  75076. /* function exit code */
  75077. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  75078. goto __pyx_L0;
  75079. __pyx_L1_error:;
  75080. __Pyx_XDECREF(__pyx_t_3);
  75081. __Pyx_XDECREF(__pyx_t_4);
  75082. __Pyx_XDECREF(__pyx_t_5);
  75083. __Pyx_XDECREF(__pyx_t_6);
  75084. __Pyx_AddTraceback("uvloop.loop.UVBaseTransport._wakeup_waiter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  75085. __pyx_r = 0;
  75086. __pyx_L0:;
  75087. __Pyx_XGIVEREF(__pyx_r);
  75088. __Pyx_RefNannyFinishContext();
  75089. return __pyx_r;
  75090. }
  75091. /* "uvloop/handles/basetransport.pyx":105
  75092. * self._waiter = None
  75093. *
  75094. * cdef _call_connection_made(self): # <<<<<<<<<<<<<<
  75095. * if self._protocol is None:
  75096. * raise RuntimeError(
  75097. */
  75098. static PyObject *__pyx_f_6uvloop_4loop_15UVBaseTransport__call_connection_made(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self) {
  75099. PyObject *__pyx_r = NULL;
  75100. __Pyx_RefNannyDeclarations
  75101. int __pyx_t_1;
  75102. int __pyx_t_2;
  75103. PyObject *__pyx_t_3 = NULL;
  75104. PyObject *__pyx_t_4 = NULL;
  75105. PyObject *__pyx_t_5 = NULL;
  75106. PyObject *__pyx_t_6 = NULL;
  75107. PyObject *__pyx_t_7 = NULL;
  75108. PyObject *__pyx_t_8 = NULL;
  75109. int __pyx_t_9;
  75110. PyObject *__pyx_t_10 = NULL;
  75111. __Pyx_RefNannySetupContext("_call_connection_made", 0);
  75112. /* "uvloop/handles/basetransport.pyx":106
  75113. *
  75114. * cdef _call_connection_made(self):
  75115. * if self._protocol is None: # <<<<<<<<<<<<<<
  75116. * raise RuntimeError(
  75117. * 'protocol is not set, cannot call connection_made()')
  75118. */
  75119. __pyx_t_1 = (__pyx_v_self->_protocol == Py_None);
  75120. __pyx_t_2 = (__pyx_t_1 != 0);
  75121. if (unlikely(__pyx_t_2)) {
  75122. /* "uvloop/handles/basetransport.pyx":107
  75123. * cdef _call_connection_made(self):
  75124. * if self._protocol is None:
  75125. * raise RuntimeError( # <<<<<<<<<<<<<<
  75126. * 'protocol is not set, cannot call connection_made()')
  75127. *
  75128. */
  75129. __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__121, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 107, __pyx_L1_error)
  75130. __Pyx_GOTREF(__pyx_t_3);
  75131. __Pyx_Raise(__pyx_t_3, 0, 0, 0);
  75132. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  75133. __PYX_ERR(16, 107, __pyx_L1_error)
  75134. /* "uvloop/handles/basetransport.pyx":106
  75135. *
  75136. * cdef _call_connection_made(self):
  75137. * if self._protocol is None: # <<<<<<<<<<<<<<
  75138. * raise RuntimeError(
  75139. * 'protocol is not set, cannot call connection_made()')
  75140. */
  75141. }
  75142. /* "uvloop/handles/basetransport.pyx":113
  75143. * # `transport._close()` in `loop.create_connection()` if an
  75144. * # exception happens during `await waiter`.
  75145. * if not self._is_alive(): # <<<<<<<<<<<<<<
  75146. * # A connection waiter can be cancelled between
  75147. * # 'await loop.create_connection()' and
  75148. */
  75149. __pyx_t_2 = ((!(((struct __pyx_vtabstruct_6uvloop_4loop_UVBaseTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._is_alive(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)) != 0)) != 0);
  75150. if (__pyx_t_2) {
  75151. /* "uvloop/handles/basetransport.pyx":118
  75152. * # `_schedule_call_connection_made` and
  75153. * # the actual `_call_connection_made`.
  75154. * self._wakeup_waiter() # <<<<<<<<<<<<<<
  75155. * return
  75156. *
  75157. */
  75158. __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVBaseTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_wakeup_waiter(__pyx_v_self); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 118, __pyx_L1_error)
  75159. __Pyx_GOTREF(__pyx_t_3);
  75160. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  75161. /* "uvloop/handles/basetransport.pyx":119
  75162. * # the actual `_call_connection_made`.
  75163. * self._wakeup_waiter()
  75164. * return # <<<<<<<<<<<<<<
  75165. *
  75166. * # Set _protocol_connected to 1 before calling "connection_made":
  75167. */
  75168. __Pyx_XDECREF(__pyx_r);
  75169. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  75170. goto __pyx_L0;
  75171. /* "uvloop/handles/basetransport.pyx":113
  75172. * # `transport._close()` in `loop.create_connection()` if an
  75173. * # exception happens during `await waiter`.
  75174. * if not self._is_alive(): # <<<<<<<<<<<<<<
  75175. * # A connection waiter can be cancelled between
  75176. * # 'await loop.create_connection()' and
  75177. */
  75178. }
  75179. /* "uvloop/handles/basetransport.pyx":124
  75180. * # if transport is aborted or closed, "connection_lost" will
  75181. * # still be scheduled.
  75182. * self._protocol_connected = 1 # <<<<<<<<<<<<<<
  75183. *
  75184. * try:
  75185. */
  75186. __pyx_v_self->_protocol_connected = 1;
  75187. /* "uvloop/handles/basetransport.pyx":126
  75188. * self._protocol_connected = 1
  75189. *
  75190. * try: # <<<<<<<<<<<<<<
  75191. * self._protocol.connection_made(self)
  75192. * except BaseException:
  75193. */
  75194. {
  75195. __Pyx_PyThreadState_declare
  75196. __Pyx_PyThreadState_assign
  75197. __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
  75198. __Pyx_XGOTREF(__pyx_t_4);
  75199. __Pyx_XGOTREF(__pyx_t_5);
  75200. __Pyx_XGOTREF(__pyx_t_6);
  75201. /*try:*/ {
  75202. /* "uvloop/handles/basetransport.pyx":127
  75203. *
  75204. * try:
  75205. * self._protocol.connection_made(self) # <<<<<<<<<<<<<<
  75206. * except BaseException:
  75207. * self._wakeup_waiter()
  75208. */
  75209. __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_protocol, __pyx_n_s_connection_made); if (unlikely(!__pyx_t_7)) __PYX_ERR(16, 127, __pyx_L5_error)
  75210. __Pyx_GOTREF(__pyx_t_7);
  75211. __pyx_t_8 = NULL;
  75212. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
  75213. __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
  75214. if (likely(__pyx_t_8)) {
  75215. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
  75216. __Pyx_INCREF(__pyx_t_8);
  75217. __Pyx_INCREF(function);
  75218. __Pyx_DECREF_SET(__pyx_t_7, function);
  75219. }
  75220. }
  75221. __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, ((PyObject *)__pyx_v_self)) : __Pyx_PyObject_CallOneArg(__pyx_t_7, ((PyObject *)__pyx_v_self));
  75222. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  75223. if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 127, __pyx_L5_error)
  75224. __Pyx_GOTREF(__pyx_t_3);
  75225. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  75226. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  75227. /* "uvloop/handles/basetransport.pyx":126
  75228. * self._protocol_connected = 1
  75229. *
  75230. * try: # <<<<<<<<<<<<<<
  75231. * self._protocol.connection_made(self)
  75232. * except BaseException:
  75233. */
  75234. }
  75235. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  75236. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  75237. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  75238. goto __pyx_L10_try_end;
  75239. __pyx_L5_error:;
  75240. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  75241. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  75242. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  75243. /* "uvloop/handles/basetransport.pyx":128
  75244. * try:
  75245. * self._protocol.connection_made(self)
  75246. * except BaseException: # <<<<<<<<<<<<<<
  75247. * self._wakeup_waiter()
  75248. * raise
  75249. */
  75250. __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_BaseException);
  75251. if (__pyx_t_9) {
  75252. __Pyx_AddTraceback("uvloop.loop.UVBaseTransport._call_connection_made", __pyx_clineno, __pyx_lineno, __pyx_filename);
  75253. if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_7, &__pyx_t_8) < 0) __PYX_ERR(16, 128, __pyx_L7_except_error)
  75254. __Pyx_GOTREF(__pyx_t_3);
  75255. __Pyx_GOTREF(__pyx_t_7);
  75256. __Pyx_GOTREF(__pyx_t_8);
  75257. /* "uvloop/handles/basetransport.pyx":129
  75258. * self._protocol.connection_made(self)
  75259. * except BaseException:
  75260. * self._wakeup_waiter() # <<<<<<<<<<<<<<
  75261. * raise
  75262. *
  75263. */
  75264. __pyx_t_10 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVBaseTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_wakeup_waiter(__pyx_v_self); if (unlikely(!__pyx_t_10)) __PYX_ERR(16, 129, __pyx_L7_except_error)
  75265. __Pyx_GOTREF(__pyx_t_10);
  75266. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  75267. /* "uvloop/handles/basetransport.pyx":130
  75268. * except BaseException:
  75269. * self._wakeup_waiter()
  75270. * raise # <<<<<<<<<<<<<<
  75271. *
  75272. * if not self._is_alive():
  75273. */
  75274. __Pyx_GIVEREF(__pyx_t_3);
  75275. __Pyx_GIVEREF(__pyx_t_7);
  75276. __Pyx_XGIVEREF(__pyx_t_8);
  75277. __Pyx_ErrRestoreWithState(__pyx_t_3, __pyx_t_7, __pyx_t_8);
  75278. __pyx_t_3 = 0; __pyx_t_7 = 0; __pyx_t_8 = 0;
  75279. __PYX_ERR(16, 130, __pyx_L7_except_error)
  75280. }
  75281. goto __pyx_L7_except_error;
  75282. __pyx_L7_except_error:;
  75283. /* "uvloop/handles/basetransport.pyx":126
  75284. * self._protocol_connected = 1
  75285. *
  75286. * try: # <<<<<<<<<<<<<<
  75287. * self._protocol.connection_made(self)
  75288. * except BaseException:
  75289. */
  75290. __Pyx_XGIVEREF(__pyx_t_4);
  75291. __Pyx_XGIVEREF(__pyx_t_5);
  75292. __Pyx_XGIVEREF(__pyx_t_6);
  75293. __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
  75294. goto __pyx_L1_error;
  75295. __pyx_L10_try_end:;
  75296. }
  75297. /* "uvloop/handles/basetransport.pyx":132
  75298. * raise
  75299. *
  75300. * if not self._is_alive(): # <<<<<<<<<<<<<<
  75301. * # This might happen when "transport.abort()" is called
  75302. * # from "Protocol.connection_made".
  75303. */
  75304. __pyx_t_2 = ((!(((struct __pyx_vtabstruct_6uvloop_4loop_UVBaseTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._is_alive(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)) != 0)) != 0);
  75305. if (__pyx_t_2) {
  75306. /* "uvloop/handles/basetransport.pyx":135
  75307. * # This might happen when "transport.abort()" is called
  75308. * # from "Protocol.connection_made".
  75309. * self._wakeup_waiter() # <<<<<<<<<<<<<<
  75310. * return
  75311. *
  75312. */
  75313. __pyx_t_8 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVBaseTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_wakeup_waiter(__pyx_v_self); if (unlikely(!__pyx_t_8)) __PYX_ERR(16, 135, __pyx_L1_error)
  75314. __Pyx_GOTREF(__pyx_t_8);
  75315. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  75316. /* "uvloop/handles/basetransport.pyx":136
  75317. * # from "Protocol.connection_made".
  75318. * self._wakeup_waiter()
  75319. * return # <<<<<<<<<<<<<<
  75320. *
  75321. * self._start_reading()
  75322. */
  75323. __Pyx_XDECREF(__pyx_r);
  75324. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  75325. goto __pyx_L0;
  75326. /* "uvloop/handles/basetransport.pyx":132
  75327. * raise
  75328. *
  75329. * if not self._is_alive(): # <<<<<<<<<<<<<<
  75330. * # This might happen when "transport.abort()" is called
  75331. * # from "Protocol.connection_made".
  75332. */
  75333. }
  75334. /* "uvloop/handles/basetransport.pyx":138
  75335. * return
  75336. *
  75337. * self._start_reading() # <<<<<<<<<<<<<<
  75338. * self._wakeup_waiter()
  75339. *
  75340. */
  75341. __pyx_t_8 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVBaseTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_start_reading(__pyx_v_self); if (unlikely(!__pyx_t_8)) __PYX_ERR(16, 138, __pyx_L1_error)
  75342. __Pyx_GOTREF(__pyx_t_8);
  75343. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  75344. /* "uvloop/handles/basetransport.pyx":139
  75345. *
  75346. * self._start_reading()
  75347. * self._wakeup_waiter() # <<<<<<<<<<<<<<
  75348. *
  75349. * cdef _call_connection_lost(self, exc):
  75350. */
  75351. __pyx_t_8 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVBaseTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_wakeup_waiter(__pyx_v_self); if (unlikely(!__pyx_t_8)) __PYX_ERR(16, 139, __pyx_L1_error)
  75352. __Pyx_GOTREF(__pyx_t_8);
  75353. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  75354. /* "uvloop/handles/basetransport.pyx":105
  75355. * self._waiter = None
  75356. *
  75357. * cdef _call_connection_made(self): # <<<<<<<<<<<<<<
  75358. * if self._protocol is None:
  75359. * raise RuntimeError(
  75360. */
  75361. /* function exit code */
  75362. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  75363. goto __pyx_L0;
  75364. __pyx_L1_error:;
  75365. __Pyx_XDECREF(__pyx_t_3);
  75366. __Pyx_XDECREF(__pyx_t_7);
  75367. __Pyx_XDECREF(__pyx_t_8);
  75368. __Pyx_XDECREF(__pyx_t_10);
  75369. __Pyx_AddTraceback("uvloop.loop.UVBaseTransport._call_connection_made", __pyx_clineno, __pyx_lineno, __pyx_filename);
  75370. __pyx_r = 0;
  75371. __pyx_L0:;
  75372. __Pyx_XGIVEREF(__pyx_r);
  75373. __Pyx_RefNannyFinishContext();
  75374. return __pyx_r;
  75375. }
  75376. /* "uvloop/handles/basetransport.pyx":141
  75377. * self._wakeup_waiter()
  75378. *
  75379. * cdef _call_connection_lost(self, exc): # <<<<<<<<<<<<<<
  75380. * if self._waiter is not None:
  75381. * if not self._waiter.done():
  75382. */
  75383. static PyObject *__pyx_f_6uvloop_4loop_15UVBaseTransport__call_connection_lost(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self, PyObject *__pyx_v_exc) {
  75384. struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_server = NULL;
  75385. PyObject *__pyx_r = NULL;
  75386. __Pyx_RefNannyDeclarations
  75387. int __pyx_t_1;
  75388. int __pyx_t_2;
  75389. PyObject *__pyx_t_3 = NULL;
  75390. PyObject *__pyx_t_4 = NULL;
  75391. PyObject *__pyx_t_5 = NULL;
  75392. int __pyx_t_6;
  75393. int __pyx_t_7;
  75394. char const *__pyx_t_8;
  75395. PyObject *__pyx_t_9 = NULL;
  75396. PyObject *__pyx_t_10 = NULL;
  75397. PyObject *__pyx_t_11 = NULL;
  75398. PyObject *__pyx_t_12 = NULL;
  75399. PyObject *__pyx_t_13 = NULL;
  75400. PyObject *__pyx_t_14 = NULL;
  75401. __Pyx_RefNannySetupContext("_call_connection_lost", 0);
  75402. /* "uvloop/handles/basetransport.pyx":142
  75403. *
  75404. * cdef _call_connection_lost(self, exc):
  75405. * if self._waiter is not None: # <<<<<<<<<<<<<<
  75406. * if not self._waiter.done():
  75407. * self._waiter.set_exception(exc)
  75408. */
  75409. __pyx_t_1 = (__pyx_v_self->_waiter != Py_None);
  75410. __pyx_t_2 = (__pyx_t_1 != 0);
  75411. if (__pyx_t_2) {
  75412. /* "uvloop/handles/basetransport.pyx":143
  75413. * cdef _call_connection_lost(self, exc):
  75414. * if self._waiter is not None:
  75415. * if not self._waiter.done(): # <<<<<<<<<<<<<<
  75416. * self._waiter.set_exception(exc)
  75417. * self._waiter = None
  75418. */
  75419. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_waiter, __pyx_n_s_done); if (unlikely(!__pyx_t_4)) __PYX_ERR(16, 143, __pyx_L1_error)
  75420. __Pyx_GOTREF(__pyx_t_4);
  75421. __pyx_t_5 = NULL;
  75422. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
  75423. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
  75424. if (likely(__pyx_t_5)) {
  75425. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  75426. __Pyx_INCREF(__pyx_t_5);
  75427. __Pyx_INCREF(function);
  75428. __Pyx_DECREF_SET(__pyx_t_4, function);
  75429. }
  75430. }
  75431. __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
  75432. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  75433. if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 143, __pyx_L1_error)
  75434. __Pyx_GOTREF(__pyx_t_3);
  75435. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  75436. __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(16, 143, __pyx_L1_error)
  75437. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  75438. __pyx_t_1 = ((!__pyx_t_2) != 0);
  75439. if (__pyx_t_1) {
  75440. /* "uvloop/handles/basetransport.pyx":144
  75441. * if self._waiter is not None:
  75442. * if not self._waiter.done():
  75443. * self._waiter.set_exception(exc) # <<<<<<<<<<<<<<
  75444. * self._waiter = None
  75445. *
  75446. */
  75447. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_waiter, __pyx_n_s_set_exception); if (unlikely(!__pyx_t_4)) __PYX_ERR(16, 144, __pyx_L1_error)
  75448. __Pyx_GOTREF(__pyx_t_4);
  75449. __pyx_t_5 = NULL;
  75450. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
  75451. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
  75452. if (likely(__pyx_t_5)) {
  75453. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  75454. __Pyx_INCREF(__pyx_t_5);
  75455. __Pyx_INCREF(function);
  75456. __Pyx_DECREF_SET(__pyx_t_4, function);
  75457. }
  75458. }
  75459. __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_exc) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_exc);
  75460. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  75461. if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 144, __pyx_L1_error)
  75462. __Pyx_GOTREF(__pyx_t_3);
  75463. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  75464. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  75465. /* "uvloop/handles/basetransport.pyx":143
  75466. * cdef _call_connection_lost(self, exc):
  75467. * if self._waiter is not None:
  75468. * if not self._waiter.done(): # <<<<<<<<<<<<<<
  75469. * self._waiter.set_exception(exc)
  75470. * self._waiter = None
  75471. */
  75472. }
  75473. /* "uvloop/handles/basetransport.pyx":145
  75474. * if not self._waiter.done():
  75475. * self._waiter.set_exception(exc)
  75476. * self._waiter = None # <<<<<<<<<<<<<<
  75477. *
  75478. * if self._closed:
  75479. */
  75480. __Pyx_INCREF(Py_None);
  75481. __Pyx_GIVEREF(Py_None);
  75482. __Pyx_GOTREF(__pyx_v_self->_waiter);
  75483. __Pyx_DECREF(__pyx_v_self->_waiter);
  75484. __pyx_v_self->_waiter = Py_None;
  75485. /* "uvloop/handles/basetransport.pyx":142
  75486. *
  75487. * cdef _call_connection_lost(self, exc):
  75488. * if self._waiter is not None: # <<<<<<<<<<<<<<
  75489. * if not self._waiter.done():
  75490. * self._waiter.set_exception(exc)
  75491. */
  75492. }
  75493. /* "uvloop/handles/basetransport.pyx":147
  75494. * self._waiter = None
  75495. *
  75496. * if self._closed: # <<<<<<<<<<<<<<
  75497. * # The handle is closed -- likely, _call_connection_lost
  75498. * # was already called before.
  75499. */
  75500. __pyx_t_1 = (__pyx_v_self->__pyx_base.__pyx_base._closed != 0);
  75501. if (__pyx_t_1) {
  75502. /* "uvloop/handles/basetransport.pyx":150
  75503. * # The handle is closed -- likely, _call_connection_lost
  75504. * # was already called before.
  75505. * return # <<<<<<<<<<<<<<
  75506. *
  75507. * try:
  75508. */
  75509. __Pyx_XDECREF(__pyx_r);
  75510. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  75511. goto __pyx_L0;
  75512. /* "uvloop/handles/basetransport.pyx":147
  75513. * self._waiter = None
  75514. *
  75515. * if self._closed: # <<<<<<<<<<<<<<
  75516. * # The handle is closed -- likely, _call_connection_lost
  75517. * # was already called before.
  75518. */
  75519. }
  75520. /* "uvloop/handles/basetransport.pyx":152
  75521. * return
  75522. *
  75523. * try: # <<<<<<<<<<<<<<
  75524. * if self._protocol_connected:
  75525. * self._protocol.connection_lost(exc)
  75526. */
  75527. /*try:*/ {
  75528. /* "uvloop/handles/basetransport.pyx":153
  75529. *
  75530. * try:
  75531. * if self._protocol_connected: # <<<<<<<<<<<<<<
  75532. * self._protocol.connection_lost(exc)
  75533. * finally:
  75534. */
  75535. __pyx_t_1 = (__pyx_v_self->_protocol_connected != 0);
  75536. if (__pyx_t_1) {
  75537. /* "uvloop/handles/basetransport.pyx":154
  75538. * try:
  75539. * if self._protocol_connected:
  75540. * self._protocol.connection_lost(exc) # <<<<<<<<<<<<<<
  75541. * finally:
  75542. * self._clear_protocol()
  75543. */
  75544. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_protocol, __pyx_n_s_connection_lost); if (unlikely(!__pyx_t_4)) __PYX_ERR(16, 154, __pyx_L7_error)
  75545. __Pyx_GOTREF(__pyx_t_4);
  75546. __pyx_t_5 = NULL;
  75547. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
  75548. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
  75549. if (likely(__pyx_t_5)) {
  75550. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  75551. __Pyx_INCREF(__pyx_t_5);
  75552. __Pyx_INCREF(function);
  75553. __Pyx_DECREF_SET(__pyx_t_4, function);
  75554. }
  75555. }
  75556. __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_exc) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_exc);
  75557. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  75558. if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 154, __pyx_L7_error)
  75559. __Pyx_GOTREF(__pyx_t_3);
  75560. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  75561. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  75562. /* "uvloop/handles/basetransport.pyx":153
  75563. *
  75564. * try:
  75565. * if self._protocol_connected: # <<<<<<<<<<<<<<
  75566. * self._protocol.connection_lost(exc)
  75567. * finally:
  75568. */
  75569. }
  75570. }
  75571. /* "uvloop/handles/basetransport.pyx":156
  75572. * self._protocol.connection_lost(exc)
  75573. * finally:
  75574. * self._clear_protocol() # <<<<<<<<<<<<<<
  75575. *
  75576. * self._close()
  75577. */
  75578. /*finally:*/ {
  75579. /*normal exit:*/{
  75580. __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVBaseTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_clear_protocol(__pyx_v_self); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 156, __pyx_L1_error)
  75581. __Pyx_GOTREF(__pyx_t_3);
  75582. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  75583. /* "uvloop/handles/basetransport.pyx":158
  75584. * self._clear_protocol()
  75585. *
  75586. * self._close() # <<<<<<<<<<<<<<
  75587. *
  75588. * server = self._server
  75589. */
  75590. __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVBaseTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._close(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 158, __pyx_L1_error)
  75591. __Pyx_GOTREF(__pyx_t_3);
  75592. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  75593. /* "uvloop/handles/basetransport.pyx":160
  75594. * self._close()
  75595. *
  75596. * server = self._server # <<<<<<<<<<<<<<
  75597. * if server is not None:
  75598. * (<Server>server)._detach()
  75599. */
  75600. __pyx_t_3 = ((PyObject *)__pyx_v_self->_server);
  75601. __Pyx_INCREF(__pyx_t_3);
  75602. __pyx_v_server = ((struct __pyx_obj_6uvloop_4loop_Server *)__pyx_t_3);
  75603. __pyx_t_3 = 0;
  75604. /* "uvloop/handles/basetransport.pyx":161
  75605. *
  75606. * server = self._server
  75607. * if server is not None: # <<<<<<<<<<<<<<
  75608. * (<Server>server)._detach()
  75609. * self._server = None
  75610. */
  75611. __pyx_t_1 = (((PyObject *)__pyx_v_server) != Py_None);
  75612. __pyx_t_2 = (__pyx_t_1 != 0);
  75613. if (__pyx_t_2) {
  75614. /* "uvloop/handles/basetransport.pyx":162
  75615. * server = self._server
  75616. * if server is not None:
  75617. * (<Server>server)._detach() # <<<<<<<<<<<<<<
  75618. * self._server = None
  75619. *
  75620. */
  75621. __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_Server *)((struct __pyx_obj_6uvloop_4loop_Server *)__pyx_v_server)->__pyx_vtab)->_detach(((struct __pyx_obj_6uvloop_4loop_Server *)__pyx_v_server)); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 162, __pyx_L1_error)
  75622. __Pyx_GOTREF(__pyx_t_3);
  75623. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  75624. /* "uvloop/handles/basetransport.pyx":163
  75625. * if server is not None:
  75626. * (<Server>server)._detach()
  75627. * self._server = None # <<<<<<<<<<<<<<
  75628. *
  75629. * cdef inline _set_server(self, Server server):
  75630. */
  75631. __Pyx_INCREF(Py_None);
  75632. __Pyx_GIVEREF(Py_None);
  75633. __Pyx_GOTREF(__pyx_v_self->_server);
  75634. __Pyx_DECREF(((PyObject *)__pyx_v_self->_server));
  75635. __pyx_v_self->_server = ((struct __pyx_obj_6uvloop_4loop_Server *)Py_None);
  75636. /* "uvloop/handles/basetransport.pyx":161
  75637. *
  75638. * server = self._server
  75639. * if server is not None: # <<<<<<<<<<<<<<
  75640. * (<Server>server)._detach()
  75641. * self._server = None
  75642. */
  75643. }
  75644. goto __pyx_L8;
  75645. }
  75646. __pyx_L7_error:;
  75647. /*exception exit:*/{
  75648. __Pyx_PyThreadState_declare
  75649. __Pyx_PyThreadState_assign
  75650. __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0;
  75651. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  75652. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  75653. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  75654. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
  75655. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11) < 0)) __Pyx_ErrFetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
  75656. __Pyx_XGOTREF(__pyx_t_9);
  75657. __Pyx_XGOTREF(__pyx_t_10);
  75658. __Pyx_XGOTREF(__pyx_t_11);
  75659. __Pyx_XGOTREF(__pyx_t_12);
  75660. __Pyx_XGOTREF(__pyx_t_13);
  75661. __Pyx_XGOTREF(__pyx_t_14);
  75662. __pyx_t_6 = __pyx_lineno; __pyx_t_7 = __pyx_clineno; __pyx_t_8 = __pyx_filename;
  75663. {
  75664. /* "uvloop/handles/basetransport.pyx":156
  75665. * self._protocol.connection_lost(exc)
  75666. * finally:
  75667. * self._clear_protocol() # <<<<<<<<<<<<<<
  75668. *
  75669. * self._close()
  75670. */
  75671. __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVBaseTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_clear_protocol(__pyx_v_self); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 156, __pyx_L12_error)
  75672. __Pyx_GOTREF(__pyx_t_3);
  75673. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  75674. /* "uvloop/handles/basetransport.pyx":158
  75675. * self._clear_protocol()
  75676. *
  75677. * self._close() # <<<<<<<<<<<<<<
  75678. *
  75679. * server = self._server
  75680. */
  75681. __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVBaseTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._close(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 158, __pyx_L12_error)
  75682. __Pyx_GOTREF(__pyx_t_3);
  75683. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  75684. /* "uvloop/handles/basetransport.pyx":160
  75685. * self._close()
  75686. *
  75687. * server = self._server # <<<<<<<<<<<<<<
  75688. * if server is not None:
  75689. * (<Server>server)._detach()
  75690. */
  75691. __pyx_t_3 = ((PyObject *)__pyx_v_self->_server);
  75692. __Pyx_INCREF(__pyx_t_3);
  75693. __pyx_v_server = ((struct __pyx_obj_6uvloop_4loop_Server *)__pyx_t_3);
  75694. __pyx_t_3 = 0;
  75695. /* "uvloop/handles/basetransport.pyx":161
  75696. *
  75697. * server = self._server
  75698. * if server is not None: # <<<<<<<<<<<<<<
  75699. * (<Server>server)._detach()
  75700. * self._server = None
  75701. */
  75702. __pyx_t_2 = (((PyObject *)__pyx_v_server) != Py_None);
  75703. __pyx_t_1 = (__pyx_t_2 != 0);
  75704. if (__pyx_t_1) {
  75705. /* "uvloop/handles/basetransport.pyx":162
  75706. * server = self._server
  75707. * if server is not None:
  75708. * (<Server>server)._detach() # <<<<<<<<<<<<<<
  75709. * self._server = None
  75710. *
  75711. */
  75712. __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_Server *)((struct __pyx_obj_6uvloop_4loop_Server *)__pyx_v_server)->__pyx_vtab)->_detach(((struct __pyx_obj_6uvloop_4loop_Server *)__pyx_v_server)); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 162, __pyx_L12_error)
  75713. __Pyx_GOTREF(__pyx_t_3);
  75714. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  75715. /* "uvloop/handles/basetransport.pyx":163
  75716. * if server is not None:
  75717. * (<Server>server)._detach()
  75718. * self._server = None # <<<<<<<<<<<<<<
  75719. *
  75720. * cdef inline _set_server(self, Server server):
  75721. */
  75722. __Pyx_INCREF(Py_None);
  75723. __Pyx_GIVEREF(Py_None);
  75724. __Pyx_GOTREF(__pyx_v_self->_server);
  75725. __Pyx_DECREF(((PyObject *)__pyx_v_self->_server));
  75726. __pyx_v_self->_server = ((struct __pyx_obj_6uvloop_4loop_Server *)Py_None);
  75727. /* "uvloop/handles/basetransport.pyx":161
  75728. *
  75729. * server = self._server
  75730. * if server is not None: # <<<<<<<<<<<<<<
  75731. * (<Server>server)._detach()
  75732. * self._server = None
  75733. */
  75734. }
  75735. }
  75736. if (PY_MAJOR_VERSION >= 3) {
  75737. __Pyx_XGIVEREF(__pyx_t_12);
  75738. __Pyx_XGIVEREF(__pyx_t_13);
  75739. __Pyx_XGIVEREF(__pyx_t_14);
  75740. __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
  75741. }
  75742. __Pyx_XGIVEREF(__pyx_t_9);
  75743. __Pyx_XGIVEREF(__pyx_t_10);
  75744. __Pyx_XGIVEREF(__pyx_t_11);
  75745. __Pyx_ErrRestore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
  75746. __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0;
  75747. __pyx_lineno = __pyx_t_6; __pyx_clineno = __pyx_t_7; __pyx_filename = __pyx_t_8;
  75748. goto __pyx_L1_error;
  75749. __pyx_L12_error:;
  75750. if (PY_MAJOR_VERSION >= 3) {
  75751. __Pyx_XGIVEREF(__pyx_t_12);
  75752. __Pyx_XGIVEREF(__pyx_t_13);
  75753. __Pyx_XGIVEREF(__pyx_t_14);
  75754. __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
  75755. }
  75756. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  75757. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  75758. __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
  75759. __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0;
  75760. goto __pyx_L1_error;
  75761. }
  75762. __pyx_L8:;
  75763. }
  75764. /* "uvloop/handles/basetransport.pyx":141
  75765. * self._wakeup_waiter()
  75766. *
  75767. * cdef _call_connection_lost(self, exc): # <<<<<<<<<<<<<<
  75768. * if self._waiter is not None:
  75769. * if not self._waiter.done():
  75770. */
  75771. /* function exit code */
  75772. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  75773. goto __pyx_L0;
  75774. __pyx_L1_error:;
  75775. __Pyx_XDECREF(__pyx_t_3);
  75776. __Pyx_XDECREF(__pyx_t_4);
  75777. __Pyx_XDECREF(__pyx_t_5);
  75778. __Pyx_AddTraceback("uvloop.loop.UVBaseTransport._call_connection_lost", __pyx_clineno, __pyx_lineno, __pyx_filename);
  75779. __pyx_r = 0;
  75780. __pyx_L0:;
  75781. __Pyx_XDECREF((PyObject *)__pyx_v_server);
  75782. __Pyx_XGIVEREF(__pyx_r);
  75783. __Pyx_RefNannyFinishContext();
  75784. return __pyx_r;
  75785. }
  75786. /* "uvloop/handles/basetransport.pyx":165
  75787. * self._server = None
  75788. *
  75789. * cdef inline _set_server(self, Server server): # <<<<<<<<<<<<<<
  75790. * self._server = server
  75791. * (<Server>server)._attach()
  75792. */
  75793. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_15UVBaseTransport__set_server(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_server) {
  75794. PyObject *__pyx_r = NULL;
  75795. __Pyx_RefNannyDeclarations
  75796. PyObject *__pyx_t_1 = NULL;
  75797. __Pyx_RefNannySetupContext("_set_server", 0);
  75798. /* "uvloop/handles/basetransport.pyx":166
  75799. *
  75800. * cdef inline _set_server(self, Server server):
  75801. * self._server = server # <<<<<<<<<<<<<<
  75802. * (<Server>server)._attach()
  75803. *
  75804. */
  75805. __Pyx_INCREF(((PyObject *)__pyx_v_server));
  75806. __Pyx_GIVEREF(((PyObject *)__pyx_v_server));
  75807. __Pyx_GOTREF(__pyx_v_self->_server);
  75808. __Pyx_DECREF(((PyObject *)__pyx_v_self->_server));
  75809. __pyx_v_self->_server = __pyx_v_server;
  75810. /* "uvloop/handles/basetransport.pyx":167
  75811. * cdef inline _set_server(self, Server server):
  75812. * self._server = server
  75813. * (<Server>server)._attach() # <<<<<<<<<<<<<<
  75814. *
  75815. * cdef inline _set_waiter(self, object waiter):
  75816. */
  75817. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_Server *)((struct __pyx_obj_6uvloop_4loop_Server *)__pyx_v_server)->__pyx_vtab)->_attach(((struct __pyx_obj_6uvloop_4loop_Server *)__pyx_v_server)); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 167, __pyx_L1_error)
  75818. __Pyx_GOTREF(__pyx_t_1);
  75819. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  75820. /* "uvloop/handles/basetransport.pyx":165
  75821. * self._server = None
  75822. *
  75823. * cdef inline _set_server(self, Server server): # <<<<<<<<<<<<<<
  75824. * self._server = server
  75825. * (<Server>server)._attach()
  75826. */
  75827. /* function exit code */
  75828. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  75829. goto __pyx_L0;
  75830. __pyx_L1_error:;
  75831. __Pyx_XDECREF(__pyx_t_1);
  75832. __Pyx_AddTraceback("uvloop.loop.UVBaseTransport._set_server", __pyx_clineno, __pyx_lineno, __pyx_filename);
  75833. __pyx_r = 0;
  75834. __pyx_L0:;
  75835. __Pyx_XGIVEREF(__pyx_r);
  75836. __Pyx_RefNannyFinishContext();
  75837. return __pyx_r;
  75838. }
  75839. /* "uvloop/handles/basetransport.pyx":169
  75840. * (<Server>server)._attach()
  75841. *
  75842. * cdef inline _set_waiter(self, object waiter): # <<<<<<<<<<<<<<
  75843. * if waiter is not None and not isfuture(waiter):
  75844. * raise TypeError(
  75845. */
  75846. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_15UVBaseTransport__set_waiter(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self, PyObject *__pyx_v_waiter) {
  75847. PyObject *__pyx_r = NULL;
  75848. __Pyx_RefNannyDeclarations
  75849. int __pyx_t_1;
  75850. int __pyx_t_2;
  75851. int __pyx_t_3;
  75852. PyObject *__pyx_t_4 = NULL;
  75853. Py_ssize_t __pyx_t_5;
  75854. Py_UCS4 __pyx_t_6;
  75855. PyObject *__pyx_t_7 = NULL;
  75856. __Pyx_RefNannySetupContext("_set_waiter", 0);
  75857. /* "uvloop/handles/basetransport.pyx":170
  75858. *
  75859. * cdef inline _set_waiter(self, object waiter):
  75860. * if waiter is not None and not isfuture(waiter): # <<<<<<<<<<<<<<
  75861. * raise TypeError(
  75862. * f'invalid waiter object {waiter!r}, expected asyncio.Future')
  75863. */
  75864. __pyx_t_2 = (__pyx_v_waiter != Py_None);
  75865. __pyx_t_3 = (__pyx_t_2 != 0);
  75866. if (__pyx_t_3) {
  75867. } else {
  75868. __pyx_t_1 = __pyx_t_3;
  75869. goto __pyx_L4_bool_binop_done;
  75870. }
  75871. __pyx_t_4 = __pyx_f_6uvloop_4loop_isfuture(__pyx_v_waiter); if (unlikely(!__pyx_t_4)) __PYX_ERR(16, 170, __pyx_L1_error)
  75872. __Pyx_GOTREF(__pyx_t_4);
  75873. __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(16, 170, __pyx_L1_error)
  75874. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  75875. __pyx_t_2 = ((!__pyx_t_3) != 0);
  75876. __pyx_t_1 = __pyx_t_2;
  75877. __pyx_L4_bool_binop_done:;
  75878. if (unlikely(__pyx_t_1)) {
  75879. /* "uvloop/handles/basetransport.pyx":172
  75880. * if waiter is not None and not isfuture(waiter):
  75881. * raise TypeError(
  75882. * f'invalid waiter object {waiter!r}, expected asyncio.Future') # <<<<<<<<<<<<<<
  75883. *
  75884. * self._waiter = waiter
  75885. */
  75886. __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(16, 172, __pyx_L1_error)
  75887. __Pyx_GOTREF(__pyx_t_4);
  75888. __pyx_t_5 = 0;
  75889. __pyx_t_6 = 127;
  75890. __Pyx_INCREF(__pyx_kp_u_invalid_waiter_object);
  75891. __pyx_t_5 += 22;
  75892. __Pyx_GIVEREF(__pyx_kp_u_invalid_waiter_object);
  75893. PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_invalid_waiter_object);
  75894. __pyx_t_7 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_waiter), __pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(16, 172, __pyx_L1_error)
  75895. __Pyx_GOTREF(__pyx_t_7);
  75896. __pyx_t_6 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) > __pyx_t_6) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) : __pyx_t_6;
  75897. __pyx_t_5 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7);
  75898. __Pyx_GIVEREF(__pyx_t_7);
  75899. PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_7);
  75900. __pyx_t_7 = 0;
  75901. __Pyx_INCREF(__pyx_kp_u_expected_asyncio_Future);
  75902. __pyx_t_5 += 25;
  75903. __Pyx_GIVEREF(__pyx_kp_u_expected_asyncio_Future);
  75904. PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_kp_u_expected_asyncio_Future);
  75905. __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_4, 3, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(16, 172, __pyx_L1_error)
  75906. __Pyx_GOTREF(__pyx_t_7);
  75907. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  75908. /* "uvloop/handles/basetransport.pyx":171
  75909. * cdef inline _set_waiter(self, object waiter):
  75910. * if waiter is not None and not isfuture(waiter):
  75911. * raise TypeError( # <<<<<<<<<<<<<<
  75912. * f'invalid waiter object {waiter!r}, expected asyncio.Future')
  75913. *
  75914. */
  75915. __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(16, 171, __pyx_L1_error)
  75916. __Pyx_GOTREF(__pyx_t_4);
  75917. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  75918. __Pyx_Raise(__pyx_t_4, 0, 0, 0);
  75919. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  75920. __PYX_ERR(16, 171, __pyx_L1_error)
  75921. /* "uvloop/handles/basetransport.pyx":170
  75922. *
  75923. * cdef inline _set_waiter(self, object waiter):
  75924. * if waiter is not None and not isfuture(waiter): # <<<<<<<<<<<<<<
  75925. * raise TypeError(
  75926. * f'invalid waiter object {waiter!r}, expected asyncio.Future')
  75927. */
  75928. }
  75929. /* "uvloop/handles/basetransport.pyx":174
  75930. * f'invalid waiter object {waiter!r}, expected asyncio.Future')
  75931. *
  75932. * self._waiter = waiter # <<<<<<<<<<<<<<
  75933. *
  75934. * cdef _set_protocol(self, object protocol):
  75935. */
  75936. __Pyx_INCREF(__pyx_v_waiter);
  75937. __Pyx_GIVEREF(__pyx_v_waiter);
  75938. __Pyx_GOTREF(__pyx_v_self->_waiter);
  75939. __Pyx_DECREF(__pyx_v_self->_waiter);
  75940. __pyx_v_self->_waiter = __pyx_v_waiter;
  75941. /* "uvloop/handles/basetransport.pyx":169
  75942. * (<Server>server)._attach()
  75943. *
  75944. * cdef inline _set_waiter(self, object waiter): # <<<<<<<<<<<<<<
  75945. * if waiter is not None and not isfuture(waiter):
  75946. * raise TypeError(
  75947. */
  75948. /* function exit code */
  75949. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  75950. goto __pyx_L0;
  75951. __pyx_L1_error:;
  75952. __Pyx_XDECREF(__pyx_t_4);
  75953. __Pyx_XDECREF(__pyx_t_7);
  75954. __Pyx_AddTraceback("uvloop.loop.UVBaseTransport._set_waiter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  75955. __pyx_r = 0;
  75956. __pyx_L0:;
  75957. __Pyx_XGIVEREF(__pyx_r);
  75958. __Pyx_RefNannyFinishContext();
  75959. return __pyx_r;
  75960. }
  75961. /* "uvloop/handles/basetransport.pyx":176
  75962. * self._waiter = waiter
  75963. *
  75964. * cdef _set_protocol(self, object protocol): # <<<<<<<<<<<<<<
  75965. * self._protocol = protocol
  75966. * # Store a reference to the bound method directly
  75967. */
  75968. static PyObject *__pyx_f_6uvloop_4loop_15UVBaseTransport__set_protocol(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self, PyObject *__pyx_v_protocol) {
  75969. PyObject *__pyx_r = NULL;
  75970. __Pyx_RefNannyDeclarations
  75971. PyObject *__pyx_t_1 = NULL;
  75972. PyObject *__pyx_t_2 = NULL;
  75973. PyObject *__pyx_t_3 = NULL;
  75974. PyObject *__pyx_t_4 = NULL;
  75975. int __pyx_t_5;
  75976. __Pyx_RefNannySetupContext("_set_protocol", 0);
  75977. /* "uvloop/handles/basetransport.pyx":177
  75978. *
  75979. * cdef _set_protocol(self, object protocol):
  75980. * self._protocol = protocol # <<<<<<<<<<<<<<
  75981. * # Store a reference to the bound method directly
  75982. * try:
  75983. */
  75984. __Pyx_INCREF(__pyx_v_protocol);
  75985. __Pyx_GIVEREF(__pyx_v_protocol);
  75986. __Pyx_GOTREF(__pyx_v_self->_protocol);
  75987. __Pyx_DECREF(__pyx_v_self->_protocol);
  75988. __pyx_v_self->_protocol = __pyx_v_protocol;
  75989. /* "uvloop/handles/basetransport.pyx":179
  75990. * self._protocol = protocol
  75991. * # Store a reference to the bound method directly
  75992. * try: # <<<<<<<<<<<<<<
  75993. * self._protocol_data_received = protocol.data_received
  75994. * except AttributeError:
  75995. */
  75996. {
  75997. __Pyx_PyThreadState_declare
  75998. __Pyx_PyThreadState_assign
  75999. __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
  76000. __Pyx_XGOTREF(__pyx_t_1);
  76001. __Pyx_XGOTREF(__pyx_t_2);
  76002. __Pyx_XGOTREF(__pyx_t_3);
  76003. /*try:*/ {
  76004. /* "uvloop/handles/basetransport.pyx":180
  76005. * # Store a reference to the bound method directly
  76006. * try:
  76007. * self._protocol_data_received = protocol.data_received # <<<<<<<<<<<<<<
  76008. * except AttributeError:
  76009. * pass
  76010. */
  76011. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_protocol, __pyx_n_s_data_received); if (unlikely(!__pyx_t_4)) __PYX_ERR(16, 180, __pyx_L3_error)
  76012. __Pyx_GOTREF(__pyx_t_4);
  76013. __Pyx_GIVEREF(__pyx_t_4);
  76014. __Pyx_GOTREF(__pyx_v_self->_protocol_data_received);
  76015. __Pyx_DECREF(__pyx_v_self->_protocol_data_received);
  76016. __pyx_v_self->_protocol_data_received = __pyx_t_4;
  76017. __pyx_t_4 = 0;
  76018. /* "uvloop/handles/basetransport.pyx":179
  76019. * self._protocol = protocol
  76020. * # Store a reference to the bound method directly
  76021. * try: # <<<<<<<<<<<<<<
  76022. * self._protocol_data_received = protocol.data_received
  76023. * except AttributeError:
  76024. */
  76025. }
  76026. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  76027. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  76028. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  76029. goto __pyx_L8_try_end;
  76030. __pyx_L3_error:;
  76031. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  76032. /* "uvloop/handles/basetransport.pyx":181
  76033. * try:
  76034. * self._protocol_data_received = protocol.data_received
  76035. * except AttributeError: # <<<<<<<<<<<<<<
  76036. * pass
  76037. *
  76038. */
  76039. __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
  76040. if (__pyx_t_5) {
  76041. __Pyx_ErrRestore(0,0,0);
  76042. goto __pyx_L4_exception_handled;
  76043. }
  76044. goto __pyx_L5_except_error;
  76045. __pyx_L5_except_error:;
  76046. /* "uvloop/handles/basetransport.pyx":179
  76047. * self._protocol = protocol
  76048. * # Store a reference to the bound method directly
  76049. * try: # <<<<<<<<<<<<<<
  76050. * self._protocol_data_received = protocol.data_received
  76051. * except AttributeError:
  76052. */
  76053. __Pyx_XGIVEREF(__pyx_t_1);
  76054. __Pyx_XGIVEREF(__pyx_t_2);
  76055. __Pyx_XGIVEREF(__pyx_t_3);
  76056. __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
  76057. goto __pyx_L1_error;
  76058. __pyx_L4_exception_handled:;
  76059. __Pyx_XGIVEREF(__pyx_t_1);
  76060. __Pyx_XGIVEREF(__pyx_t_2);
  76061. __Pyx_XGIVEREF(__pyx_t_3);
  76062. __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
  76063. __pyx_L8_try_end:;
  76064. }
  76065. /* "uvloop/handles/basetransport.pyx":176
  76066. * self._waiter = waiter
  76067. *
  76068. * cdef _set_protocol(self, object protocol): # <<<<<<<<<<<<<<
  76069. * self._protocol = protocol
  76070. * # Store a reference to the bound method directly
  76071. */
  76072. /* function exit code */
  76073. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  76074. goto __pyx_L0;
  76075. __pyx_L1_error:;
  76076. __Pyx_XDECREF(__pyx_t_4);
  76077. __Pyx_AddTraceback("uvloop.loop.UVBaseTransport._set_protocol", __pyx_clineno, __pyx_lineno, __pyx_filename);
  76078. __pyx_r = 0;
  76079. __pyx_L0:;
  76080. __Pyx_XGIVEREF(__pyx_r);
  76081. __Pyx_RefNannyFinishContext();
  76082. return __pyx_r;
  76083. }
  76084. /* "uvloop/handles/basetransport.pyx":184
  76085. * pass
  76086. *
  76087. * cdef _clear_protocol(self): # <<<<<<<<<<<<<<
  76088. * self._protocol = None
  76089. * self._protocol_data_received = None
  76090. */
  76091. static PyObject *__pyx_f_6uvloop_4loop_15UVBaseTransport__clear_protocol(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self) {
  76092. PyObject *__pyx_r = NULL;
  76093. __Pyx_RefNannyDeclarations
  76094. __Pyx_RefNannySetupContext("_clear_protocol", 0);
  76095. /* "uvloop/handles/basetransport.pyx":185
  76096. *
  76097. * cdef _clear_protocol(self):
  76098. * self._protocol = None # <<<<<<<<<<<<<<
  76099. * self._protocol_data_received = None
  76100. *
  76101. */
  76102. __Pyx_INCREF(Py_None);
  76103. __Pyx_GIVEREF(Py_None);
  76104. __Pyx_GOTREF(__pyx_v_self->_protocol);
  76105. __Pyx_DECREF(__pyx_v_self->_protocol);
  76106. __pyx_v_self->_protocol = Py_None;
  76107. /* "uvloop/handles/basetransport.pyx":186
  76108. * cdef _clear_protocol(self):
  76109. * self._protocol = None
  76110. * self._protocol_data_received = None # <<<<<<<<<<<<<<
  76111. *
  76112. * cdef inline _init_protocol(self):
  76113. */
  76114. __Pyx_INCREF(Py_None);
  76115. __Pyx_GIVEREF(Py_None);
  76116. __Pyx_GOTREF(__pyx_v_self->_protocol_data_received);
  76117. __Pyx_DECREF(__pyx_v_self->_protocol_data_received);
  76118. __pyx_v_self->_protocol_data_received = Py_None;
  76119. /* "uvloop/handles/basetransport.pyx":184
  76120. * pass
  76121. *
  76122. * cdef _clear_protocol(self): # <<<<<<<<<<<<<<
  76123. * self._protocol = None
  76124. * self._protocol_data_received = None
  76125. */
  76126. /* function exit code */
  76127. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  76128. __Pyx_XGIVEREF(__pyx_r);
  76129. __Pyx_RefNannyFinishContext();
  76130. return __pyx_r;
  76131. }
  76132. /* "uvloop/handles/basetransport.pyx":188
  76133. * self._protocol_data_received = None
  76134. *
  76135. * cdef inline _init_protocol(self): # <<<<<<<<<<<<<<
  76136. * self._loop._track_transport(self)
  76137. * if self._protocol is None:
  76138. */
  76139. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_15UVBaseTransport__init_protocol(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self) {
  76140. PyObject *__pyx_r = NULL;
  76141. __Pyx_RefNannyDeclarations
  76142. PyObject *__pyx_t_1 = NULL;
  76143. int __pyx_t_2;
  76144. int __pyx_t_3;
  76145. __Pyx_RefNannySetupContext("_init_protocol", 0);
  76146. /* "uvloop/handles/basetransport.pyx":189
  76147. *
  76148. * cdef inline _init_protocol(self):
  76149. * self._loop._track_transport(self) # <<<<<<<<<<<<<<
  76150. * if self._protocol is None:
  76151. * raise RuntimeError('invalid _init_protocol call')
  76152. */
  76153. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_base.__pyx_base._loop->__pyx_vtab)->_track_transport(__pyx_v_self->__pyx_base.__pyx_base._loop, __pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 189, __pyx_L1_error)
  76154. __Pyx_GOTREF(__pyx_t_1);
  76155. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  76156. /* "uvloop/handles/basetransport.pyx":190
  76157. * cdef inline _init_protocol(self):
  76158. * self._loop._track_transport(self)
  76159. * if self._protocol is None: # <<<<<<<<<<<<<<
  76160. * raise RuntimeError('invalid _init_protocol call')
  76161. * self._schedule_call_connection_made()
  76162. */
  76163. __pyx_t_2 = (__pyx_v_self->_protocol == Py_None);
  76164. __pyx_t_3 = (__pyx_t_2 != 0);
  76165. if (unlikely(__pyx_t_3)) {
  76166. /* "uvloop/handles/basetransport.pyx":191
  76167. * self._loop._track_transport(self)
  76168. * if self._protocol is None:
  76169. * raise RuntimeError('invalid _init_protocol call') # <<<<<<<<<<<<<<
  76170. * self._schedule_call_connection_made()
  76171. *
  76172. */
  76173. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__122, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 191, __pyx_L1_error)
  76174. __Pyx_GOTREF(__pyx_t_1);
  76175. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  76176. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  76177. __PYX_ERR(16, 191, __pyx_L1_error)
  76178. /* "uvloop/handles/basetransport.pyx":190
  76179. * cdef inline _init_protocol(self):
  76180. * self._loop._track_transport(self)
  76181. * if self._protocol is None: # <<<<<<<<<<<<<<
  76182. * raise RuntimeError('invalid _init_protocol call')
  76183. * self._schedule_call_connection_made()
  76184. */
  76185. }
  76186. /* "uvloop/handles/basetransport.pyx":192
  76187. * if self._protocol is None:
  76188. * raise RuntimeError('invalid _init_protocol call')
  76189. * self._schedule_call_connection_made() # <<<<<<<<<<<<<<
  76190. *
  76191. * cdef inline _add_extra_info(self, str name, object obj):
  76192. */
  76193. __pyx_t_1 = __pyx_f_6uvloop_4loop_15UVBaseTransport__schedule_call_connection_made(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 192, __pyx_L1_error)
  76194. __Pyx_GOTREF(__pyx_t_1);
  76195. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  76196. /* "uvloop/handles/basetransport.pyx":188
  76197. * self._protocol_data_received = None
  76198. *
  76199. * cdef inline _init_protocol(self): # <<<<<<<<<<<<<<
  76200. * self._loop._track_transport(self)
  76201. * if self._protocol is None:
  76202. */
  76203. /* function exit code */
  76204. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  76205. goto __pyx_L0;
  76206. __pyx_L1_error:;
  76207. __Pyx_XDECREF(__pyx_t_1);
  76208. __Pyx_AddTraceback("uvloop.loop.UVBaseTransport._init_protocol", __pyx_clineno, __pyx_lineno, __pyx_filename);
  76209. __pyx_r = 0;
  76210. __pyx_L0:;
  76211. __Pyx_XGIVEREF(__pyx_r);
  76212. __Pyx_RefNannyFinishContext();
  76213. return __pyx_r;
  76214. }
  76215. /* "uvloop/handles/basetransport.pyx":194
  76216. * self._schedule_call_connection_made()
  76217. *
  76218. * cdef inline _add_extra_info(self, str name, object obj): # <<<<<<<<<<<<<<
  76219. * if self._extra_info is None:
  76220. * self._extra_info = {}
  76221. */
  76222. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_15UVBaseTransport__add_extra_info(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_obj) {
  76223. PyObject *__pyx_r = NULL;
  76224. __Pyx_RefNannyDeclarations
  76225. int __pyx_t_1;
  76226. int __pyx_t_2;
  76227. PyObject *__pyx_t_3 = NULL;
  76228. __Pyx_RefNannySetupContext("_add_extra_info", 0);
  76229. /* "uvloop/handles/basetransport.pyx":195
  76230. *
  76231. * cdef inline _add_extra_info(self, str name, object obj):
  76232. * if self._extra_info is None: # <<<<<<<<<<<<<<
  76233. * self._extra_info = {}
  76234. * self._extra_info[name] = obj
  76235. */
  76236. __pyx_t_1 = (__pyx_v_self->_extra_info == ((PyObject*)Py_None));
  76237. __pyx_t_2 = (__pyx_t_1 != 0);
  76238. if (__pyx_t_2) {
  76239. /* "uvloop/handles/basetransport.pyx":196
  76240. * cdef inline _add_extra_info(self, str name, object obj):
  76241. * if self._extra_info is None:
  76242. * self._extra_info = {} # <<<<<<<<<<<<<<
  76243. * self._extra_info[name] = obj
  76244. *
  76245. */
  76246. __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 196, __pyx_L1_error)
  76247. __Pyx_GOTREF(__pyx_t_3);
  76248. __Pyx_GIVEREF(__pyx_t_3);
  76249. __Pyx_GOTREF(__pyx_v_self->_extra_info);
  76250. __Pyx_DECREF(__pyx_v_self->_extra_info);
  76251. __pyx_v_self->_extra_info = ((PyObject*)__pyx_t_3);
  76252. __pyx_t_3 = 0;
  76253. /* "uvloop/handles/basetransport.pyx":195
  76254. *
  76255. * cdef inline _add_extra_info(self, str name, object obj):
  76256. * if self._extra_info is None: # <<<<<<<<<<<<<<
  76257. * self._extra_info = {}
  76258. * self._extra_info[name] = obj
  76259. */
  76260. }
  76261. /* "uvloop/handles/basetransport.pyx":197
  76262. * if self._extra_info is None:
  76263. * self._extra_info = {}
  76264. * self._extra_info[name] = obj # <<<<<<<<<<<<<<
  76265. *
  76266. * cdef bint _is_reading(self):
  76267. */
  76268. if (unlikely(__pyx_v_self->_extra_info == Py_None)) {
  76269. PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
  76270. __PYX_ERR(16, 197, __pyx_L1_error)
  76271. }
  76272. if (unlikely(PyDict_SetItem(__pyx_v_self->_extra_info, __pyx_v_name, __pyx_v_obj) < 0)) __PYX_ERR(16, 197, __pyx_L1_error)
  76273. /* "uvloop/handles/basetransport.pyx":194
  76274. * self._schedule_call_connection_made()
  76275. *
  76276. * cdef inline _add_extra_info(self, str name, object obj): # <<<<<<<<<<<<<<
  76277. * if self._extra_info is None:
  76278. * self._extra_info = {}
  76279. */
  76280. /* function exit code */
  76281. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  76282. goto __pyx_L0;
  76283. __pyx_L1_error:;
  76284. __Pyx_XDECREF(__pyx_t_3);
  76285. __Pyx_AddTraceback("uvloop.loop.UVBaseTransport._add_extra_info", __pyx_clineno, __pyx_lineno, __pyx_filename);
  76286. __pyx_r = 0;
  76287. __pyx_L0:;
  76288. __Pyx_XGIVEREF(__pyx_r);
  76289. __Pyx_RefNannyFinishContext();
  76290. return __pyx_r;
  76291. }
  76292. /* "uvloop/handles/basetransport.pyx":199
  76293. * self._extra_info[name] = obj
  76294. *
  76295. * cdef bint _is_reading(self): # <<<<<<<<<<<<<<
  76296. * raise NotImplementedError
  76297. *
  76298. */
  76299. static int __pyx_f_6uvloop_4loop_15UVBaseTransport__is_reading(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self) {
  76300. int __pyx_r;
  76301. __Pyx_RefNannyDeclarations
  76302. __Pyx_RefNannySetupContext("_is_reading", 0);
  76303. /* "uvloop/handles/basetransport.pyx":200
  76304. *
  76305. * cdef bint _is_reading(self):
  76306. * raise NotImplementedError # <<<<<<<<<<<<<<
  76307. *
  76308. * cdef _start_reading(self):
  76309. */
  76310. __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0);
  76311. __PYX_ERR(16, 200, __pyx_L1_error)
  76312. /* "uvloop/handles/basetransport.pyx":199
  76313. * self._extra_info[name] = obj
  76314. *
  76315. * cdef bint _is_reading(self): # <<<<<<<<<<<<<<
  76316. * raise NotImplementedError
  76317. *
  76318. */
  76319. /* function exit code */
  76320. __pyx_L1_error:;
  76321. __Pyx_WriteUnraisable("uvloop.loop.UVBaseTransport._is_reading", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  76322. __pyx_r = 0;
  76323. __Pyx_RefNannyFinishContext();
  76324. return __pyx_r;
  76325. }
  76326. /* "uvloop/handles/basetransport.pyx":202
  76327. * raise NotImplementedError
  76328. *
  76329. * cdef _start_reading(self): # <<<<<<<<<<<<<<
  76330. * raise NotImplementedError
  76331. *
  76332. */
  76333. static PyObject *__pyx_f_6uvloop_4loop_15UVBaseTransport__start_reading(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self) {
  76334. PyObject *__pyx_r = NULL;
  76335. __Pyx_RefNannyDeclarations
  76336. __Pyx_RefNannySetupContext("_start_reading", 0);
  76337. /* "uvloop/handles/basetransport.pyx":203
  76338. *
  76339. * cdef _start_reading(self):
  76340. * raise NotImplementedError # <<<<<<<<<<<<<<
  76341. *
  76342. * cdef _stop_reading(self):
  76343. */
  76344. __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0);
  76345. __PYX_ERR(16, 203, __pyx_L1_error)
  76346. /* "uvloop/handles/basetransport.pyx":202
  76347. * raise NotImplementedError
  76348. *
  76349. * cdef _start_reading(self): # <<<<<<<<<<<<<<
  76350. * raise NotImplementedError
  76351. *
  76352. */
  76353. /* function exit code */
  76354. __pyx_L1_error:;
  76355. __Pyx_AddTraceback("uvloop.loop.UVBaseTransport._start_reading", __pyx_clineno, __pyx_lineno, __pyx_filename);
  76356. __pyx_r = 0;
  76357. __Pyx_XGIVEREF(__pyx_r);
  76358. __Pyx_RefNannyFinishContext();
  76359. return __pyx_r;
  76360. }
  76361. /* "uvloop/handles/basetransport.pyx":205
  76362. * raise NotImplementedError
  76363. *
  76364. * cdef _stop_reading(self): # <<<<<<<<<<<<<<
  76365. * raise NotImplementedError
  76366. *
  76367. */
  76368. static PyObject *__pyx_f_6uvloop_4loop_15UVBaseTransport__stop_reading(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self) {
  76369. PyObject *__pyx_r = NULL;
  76370. __Pyx_RefNannyDeclarations
  76371. __Pyx_RefNannySetupContext("_stop_reading", 0);
  76372. /* "uvloop/handles/basetransport.pyx":206
  76373. *
  76374. * cdef _stop_reading(self):
  76375. * raise NotImplementedError # <<<<<<<<<<<<<<
  76376. *
  76377. * # === Public API ===
  76378. */
  76379. __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0);
  76380. __PYX_ERR(16, 206, __pyx_L1_error)
  76381. /* "uvloop/handles/basetransport.pyx":205
  76382. * raise NotImplementedError
  76383. *
  76384. * cdef _stop_reading(self): # <<<<<<<<<<<<<<
  76385. * raise NotImplementedError
  76386. *
  76387. */
  76388. /* function exit code */
  76389. __pyx_L1_error:;
  76390. __Pyx_AddTraceback("uvloop.loop.UVBaseTransport._stop_reading", __pyx_clineno, __pyx_lineno, __pyx_filename);
  76391. __pyx_r = 0;
  76392. __Pyx_XGIVEREF(__pyx_r);
  76393. __Pyx_RefNannyFinishContext();
  76394. return __pyx_r;
  76395. }
  76396. /* "uvloop/handles/basetransport.pyx":212
  76397. * property _paused:
  76398. * # Used by SSLProto. Might be removed in the future.
  76399. * def __get__(self): # <<<<<<<<<<<<<<
  76400. * return bool(not self._is_reading())
  76401. *
  76402. */
  76403. /* Python wrapper */
  76404. static PyObject *__pyx_pw_6uvloop_4loop_15UVBaseTransport_7_paused_1__get__(PyObject *__pyx_v_self); /*proto*/
  76405. static PyObject *__pyx_pw_6uvloop_4loop_15UVBaseTransport_7_paused_1__get__(PyObject *__pyx_v_self) {
  76406. PyObject *__pyx_r = 0;
  76407. __Pyx_RefNannyDeclarations
  76408. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  76409. __pyx_r = __pyx_pf_6uvloop_4loop_15UVBaseTransport_7_paused___get__(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_v_self));
  76410. /* function exit code */
  76411. __Pyx_RefNannyFinishContext();
  76412. return __pyx_r;
  76413. }
  76414. static PyObject *__pyx_pf_6uvloop_4loop_15UVBaseTransport_7_paused___get__(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self) {
  76415. PyObject *__pyx_r = NULL;
  76416. __Pyx_RefNannyDeclarations
  76417. int __pyx_t_1;
  76418. PyObject *__pyx_t_2 = NULL;
  76419. __Pyx_RefNannySetupContext("__get__", 0);
  76420. /* "uvloop/handles/basetransport.pyx":213
  76421. * # Used by SSLProto. Might be removed in the future.
  76422. * def __get__(self):
  76423. * return bool(not self._is_reading()) # <<<<<<<<<<<<<<
  76424. *
  76425. * def get_protocol(self):
  76426. */
  76427. __Pyx_XDECREF(__pyx_r);
  76428. __pyx_t_1 = (!(((struct __pyx_vtabstruct_6uvloop_4loop_UVBaseTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_is_reading(__pyx_v_self) != 0));
  76429. __pyx_t_2 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_2)) __PYX_ERR(16, 213, __pyx_L1_error)
  76430. __Pyx_GOTREF(__pyx_t_2);
  76431. __pyx_r = __pyx_t_2;
  76432. __pyx_t_2 = 0;
  76433. goto __pyx_L0;
  76434. /* "uvloop/handles/basetransport.pyx":212
  76435. * property _paused:
  76436. * # Used by SSLProto. Might be removed in the future.
  76437. * def __get__(self): # <<<<<<<<<<<<<<
  76438. * return bool(not self._is_reading())
  76439. *
  76440. */
  76441. /* function exit code */
  76442. __pyx_L1_error:;
  76443. __Pyx_XDECREF(__pyx_t_2);
  76444. __Pyx_AddTraceback("uvloop.loop.UVBaseTransport._paused.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  76445. __pyx_r = NULL;
  76446. __pyx_L0:;
  76447. __Pyx_XGIVEREF(__pyx_r);
  76448. __Pyx_RefNannyFinishContext();
  76449. return __pyx_r;
  76450. }
  76451. /* "uvloop/handles/basetransport.pyx":215
  76452. * return bool(not self._is_reading())
  76453. *
  76454. * def get_protocol(self): # <<<<<<<<<<<<<<
  76455. * return self._protocol
  76456. *
  76457. */
  76458. /* Python wrapper */
  76459. static PyObject *__pyx_pw_6uvloop_4loop_15UVBaseTransport_3get_protocol(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  76460. static char __pyx_doc_6uvloop_4loop_15UVBaseTransport_2get_protocol[] = "UVBaseTransport.get_protocol(self)";
  76461. static PyObject *__pyx_pw_6uvloop_4loop_15UVBaseTransport_3get_protocol(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  76462. PyObject *__pyx_r = 0;
  76463. __Pyx_RefNannyDeclarations
  76464. __Pyx_RefNannySetupContext("get_protocol (wrapper)", 0);
  76465. __pyx_r = __pyx_pf_6uvloop_4loop_15UVBaseTransport_2get_protocol(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_v_self));
  76466. /* function exit code */
  76467. __Pyx_RefNannyFinishContext();
  76468. return __pyx_r;
  76469. }
  76470. static PyObject *__pyx_pf_6uvloop_4loop_15UVBaseTransport_2get_protocol(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self) {
  76471. PyObject *__pyx_r = NULL;
  76472. __Pyx_RefNannyDeclarations
  76473. __Pyx_RefNannySetupContext("get_protocol", 0);
  76474. /* "uvloop/handles/basetransport.pyx":216
  76475. *
  76476. * def get_protocol(self):
  76477. * return self._protocol # <<<<<<<<<<<<<<
  76478. *
  76479. * def set_protocol(self, protocol):
  76480. */
  76481. __Pyx_XDECREF(__pyx_r);
  76482. __Pyx_INCREF(__pyx_v_self->_protocol);
  76483. __pyx_r = __pyx_v_self->_protocol;
  76484. goto __pyx_L0;
  76485. /* "uvloop/handles/basetransport.pyx":215
  76486. * return bool(not self._is_reading())
  76487. *
  76488. * def get_protocol(self): # <<<<<<<<<<<<<<
  76489. * return self._protocol
  76490. *
  76491. */
  76492. /* function exit code */
  76493. __pyx_L0:;
  76494. __Pyx_XGIVEREF(__pyx_r);
  76495. __Pyx_RefNannyFinishContext();
  76496. return __pyx_r;
  76497. }
  76498. /* "uvloop/handles/basetransport.pyx":218
  76499. * return self._protocol
  76500. *
  76501. * def set_protocol(self, protocol): # <<<<<<<<<<<<<<
  76502. * self._set_protocol(protocol)
  76503. * if self._is_reading():
  76504. */
  76505. /* Python wrapper */
  76506. static PyObject *__pyx_pw_6uvloop_4loop_15UVBaseTransport_5set_protocol(PyObject *__pyx_v_self, PyObject *__pyx_v_protocol); /*proto*/
  76507. static char __pyx_doc_6uvloop_4loop_15UVBaseTransport_4set_protocol[] = "UVBaseTransport.set_protocol(self, protocol)";
  76508. static PyObject *__pyx_pw_6uvloop_4loop_15UVBaseTransport_5set_protocol(PyObject *__pyx_v_self, PyObject *__pyx_v_protocol) {
  76509. PyObject *__pyx_r = 0;
  76510. __Pyx_RefNannyDeclarations
  76511. __Pyx_RefNannySetupContext("set_protocol (wrapper)", 0);
  76512. __pyx_r = __pyx_pf_6uvloop_4loop_15UVBaseTransport_4set_protocol(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_v_self), ((PyObject *)__pyx_v_protocol));
  76513. /* function exit code */
  76514. __Pyx_RefNannyFinishContext();
  76515. return __pyx_r;
  76516. }
  76517. static PyObject *__pyx_pf_6uvloop_4loop_15UVBaseTransport_4set_protocol(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self, PyObject *__pyx_v_protocol) {
  76518. PyObject *__pyx_r = NULL;
  76519. __Pyx_RefNannyDeclarations
  76520. PyObject *__pyx_t_1 = NULL;
  76521. int __pyx_t_2;
  76522. __Pyx_RefNannySetupContext("set_protocol", 0);
  76523. /* "uvloop/handles/basetransport.pyx":219
  76524. *
  76525. * def set_protocol(self, protocol):
  76526. * self._set_protocol(protocol) # <<<<<<<<<<<<<<
  76527. * if self._is_reading():
  76528. * self._stop_reading()
  76529. */
  76530. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVBaseTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_set_protocol(__pyx_v_self, __pyx_v_protocol); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 219, __pyx_L1_error)
  76531. __Pyx_GOTREF(__pyx_t_1);
  76532. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  76533. /* "uvloop/handles/basetransport.pyx":220
  76534. * def set_protocol(self, protocol):
  76535. * self._set_protocol(protocol)
  76536. * if self._is_reading(): # <<<<<<<<<<<<<<
  76537. * self._stop_reading()
  76538. * self._start_reading()
  76539. */
  76540. __pyx_t_2 = (((struct __pyx_vtabstruct_6uvloop_4loop_UVBaseTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_is_reading(__pyx_v_self) != 0);
  76541. if (__pyx_t_2) {
  76542. /* "uvloop/handles/basetransport.pyx":221
  76543. * self._set_protocol(protocol)
  76544. * if self._is_reading():
  76545. * self._stop_reading() # <<<<<<<<<<<<<<
  76546. * self._start_reading()
  76547. *
  76548. */
  76549. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVBaseTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_stop_reading(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 221, __pyx_L1_error)
  76550. __Pyx_GOTREF(__pyx_t_1);
  76551. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  76552. /* "uvloop/handles/basetransport.pyx":222
  76553. * if self._is_reading():
  76554. * self._stop_reading()
  76555. * self._start_reading() # <<<<<<<<<<<<<<
  76556. *
  76557. * def _force_close(self, exc):
  76558. */
  76559. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVBaseTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_start_reading(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 222, __pyx_L1_error)
  76560. __Pyx_GOTREF(__pyx_t_1);
  76561. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  76562. /* "uvloop/handles/basetransport.pyx":220
  76563. * def set_protocol(self, protocol):
  76564. * self._set_protocol(protocol)
  76565. * if self._is_reading(): # <<<<<<<<<<<<<<
  76566. * self._stop_reading()
  76567. * self._start_reading()
  76568. */
  76569. }
  76570. /* "uvloop/handles/basetransport.pyx":218
  76571. * return self._protocol
  76572. *
  76573. * def set_protocol(self, protocol): # <<<<<<<<<<<<<<
  76574. * self._set_protocol(protocol)
  76575. * if self._is_reading():
  76576. */
  76577. /* function exit code */
  76578. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  76579. goto __pyx_L0;
  76580. __pyx_L1_error:;
  76581. __Pyx_XDECREF(__pyx_t_1);
  76582. __Pyx_AddTraceback("uvloop.loop.UVBaseTransport.set_protocol", __pyx_clineno, __pyx_lineno, __pyx_filename);
  76583. __pyx_r = NULL;
  76584. __pyx_L0:;
  76585. __Pyx_XGIVEREF(__pyx_r);
  76586. __Pyx_RefNannyFinishContext();
  76587. return __pyx_r;
  76588. }
  76589. /* "uvloop/handles/basetransport.pyx":224
  76590. * self._start_reading()
  76591. *
  76592. * def _force_close(self, exc): # <<<<<<<<<<<<<<
  76593. * # Used by SSLProto. Might be removed in the future.
  76594. * if self._conn_lost or self._closed:
  76595. */
  76596. /* Python wrapper */
  76597. static PyObject *__pyx_pw_6uvloop_4loop_15UVBaseTransport_7_force_close(PyObject *__pyx_v_self, PyObject *__pyx_v_exc); /*proto*/
  76598. static char __pyx_doc_6uvloop_4loop_15UVBaseTransport_6_force_close[] = "UVBaseTransport._force_close(self, exc)";
  76599. static PyObject *__pyx_pw_6uvloop_4loop_15UVBaseTransport_7_force_close(PyObject *__pyx_v_self, PyObject *__pyx_v_exc) {
  76600. PyObject *__pyx_r = 0;
  76601. __Pyx_RefNannyDeclarations
  76602. __Pyx_RefNannySetupContext("_force_close (wrapper)", 0);
  76603. __pyx_r = __pyx_pf_6uvloop_4loop_15UVBaseTransport_6_force_close(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_v_self), ((PyObject *)__pyx_v_exc));
  76604. /* function exit code */
  76605. __Pyx_RefNannyFinishContext();
  76606. return __pyx_r;
  76607. }
  76608. static PyObject *__pyx_pf_6uvloop_4loop_15UVBaseTransport_6_force_close(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self, PyObject *__pyx_v_exc) {
  76609. PyObject *__pyx_r = NULL;
  76610. __Pyx_RefNannyDeclarations
  76611. int __pyx_t_1;
  76612. int __pyx_t_2;
  76613. PyObject *__pyx_t_3 = NULL;
  76614. __Pyx_RefNannySetupContext("_force_close", 0);
  76615. /* "uvloop/handles/basetransport.pyx":226
  76616. * def _force_close(self, exc):
  76617. * # Used by SSLProto. Might be removed in the future.
  76618. * if self._conn_lost or self._closed: # <<<<<<<<<<<<<<
  76619. * return
  76620. * if not self._closing:
  76621. */
  76622. __pyx_t_2 = (__pyx_v_self->_conn_lost != 0);
  76623. if (!__pyx_t_2) {
  76624. } else {
  76625. __pyx_t_1 = __pyx_t_2;
  76626. goto __pyx_L4_bool_binop_done;
  76627. }
  76628. __pyx_t_2 = (__pyx_v_self->__pyx_base.__pyx_base._closed != 0);
  76629. __pyx_t_1 = __pyx_t_2;
  76630. __pyx_L4_bool_binop_done:;
  76631. if (__pyx_t_1) {
  76632. /* "uvloop/handles/basetransport.pyx":227
  76633. * # Used by SSLProto. Might be removed in the future.
  76634. * if self._conn_lost or self._closed:
  76635. * return # <<<<<<<<<<<<<<
  76636. * if not self._closing:
  76637. * self._closing = 1
  76638. */
  76639. __Pyx_XDECREF(__pyx_r);
  76640. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  76641. goto __pyx_L0;
  76642. /* "uvloop/handles/basetransport.pyx":226
  76643. * def _force_close(self, exc):
  76644. * # Used by SSLProto. Might be removed in the future.
  76645. * if self._conn_lost or self._closed: # <<<<<<<<<<<<<<
  76646. * return
  76647. * if not self._closing:
  76648. */
  76649. }
  76650. /* "uvloop/handles/basetransport.pyx":228
  76651. * if self._conn_lost or self._closed:
  76652. * return
  76653. * if not self._closing: # <<<<<<<<<<<<<<
  76654. * self._closing = 1
  76655. * self._stop_reading()
  76656. */
  76657. __pyx_t_1 = ((!(__pyx_v_self->_closing != 0)) != 0);
  76658. if (__pyx_t_1) {
  76659. /* "uvloop/handles/basetransport.pyx":229
  76660. * return
  76661. * if not self._closing:
  76662. * self._closing = 1 # <<<<<<<<<<<<<<
  76663. * self._stop_reading()
  76664. * self._conn_lost += 1
  76665. */
  76666. __pyx_v_self->_closing = 1;
  76667. /* "uvloop/handles/basetransport.pyx":230
  76668. * if not self._closing:
  76669. * self._closing = 1
  76670. * self._stop_reading() # <<<<<<<<<<<<<<
  76671. * self._conn_lost += 1
  76672. * self._schedule_call_connection_lost(exc)
  76673. */
  76674. __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVBaseTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_stop_reading(__pyx_v_self); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 230, __pyx_L1_error)
  76675. __Pyx_GOTREF(__pyx_t_3);
  76676. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  76677. /* "uvloop/handles/basetransport.pyx":228
  76678. * if self._conn_lost or self._closed:
  76679. * return
  76680. * if not self._closing: # <<<<<<<<<<<<<<
  76681. * self._closing = 1
  76682. * self._stop_reading()
  76683. */
  76684. }
  76685. /* "uvloop/handles/basetransport.pyx":231
  76686. * self._closing = 1
  76687. * self._stop_reading()
  76688. * self._conn_lost += 1 # <<<<<<<<<<<<<<
  76689. * self._schedule_call_connection_lost(exc)
  76690. *
  76691. */
  76692. __pyx_v_self->_conn_lost = (__pyx_v_self->_conn_lost + 1);
  76693. /* "uvloop/handles/basetransport.pyx":232
  76694. * self._stop_reading()
  76695. * self._conn_lost += 1
  76696. * self._schedule_call_connection_lost(exc) # <<<<<<<<<<<<<<
  76697. *
  76698. * def abort(self):
  76699. */
  76700. __pyx_t_3 = __pyx_f_6uvloop_4loop_15UVBaseTransport__schedule_call_connection_lost(__pyx_v_self, __pyx_v_exc); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 232, __pyx_L1_error)
  76701. __Pyx_GOTREF(__pyx_t_3);
  76702. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  76703. /* "uvloop/handles/basetransport.pyx":224
  76704. * self._start_reading()
  76705. *
  76706. * def _force_close(self, exc): # <<<<<<<<<<<<<<
  76707. * # Used by SSLProto. Might be removed in the future.
  76708. * if self._conn_lost or self._closed:
  76709. */
  76710. /* function exit code */
  76711. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  76712. goto __pyx_L0;
  76713. __pyx_L1_error:;
  76714. __Pyx_XDECREF(__pyx_t_3);
  76715. __Pyx_AddTraceback("uvloop.loop.UVBaseTransport._force_close", __pyx_clineno, __pyx_lineno, __pyx_filename);
  76716. __pyx_r = NULL;
  76717. __pyx_L0:;
  76718. __Pyx_XGIVEREF(__pyx_r);
  76719. __Pyx_RefNannyFinishContext();
  76720. return __pyx_r;
  76721. }
  76722. /* "uvloop/handles/basetransport.pyx":234
  76723. * self._schedule_call_connection_lost(exc)
  76724. *
  76725. * def abort(self): # <<<<<<<<<<<<<<
  76726. * self._force_close(None)
  76727. *
  76728. */
  76729. /* Python wrapper */
  76730. static PyObject *__pyx_pw_6uvloop_4loop_15UVBaseTransport_9abort(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  76731. static char __pyx_doc_6uvloop_4loop_15UVBaseTransport_8abort[] = "UVBaseTransport.abort(self)";
  76732. static PyObject *__pyx_pw_6uvloop_4loop_15UVBaseTransport_9abort(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  76733. PyObject *__pyx_r = 0;
  76734. __Pyx_RefNannyDeclarations
  76735. __Pyx_RefNannySetupContext("abort (wrapper)", 0);
  76736. __pyx_r = __pyx_pf_6uvloop_4loop_15UVBaseTransport_8abort(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_v_self));
  76737. /* function exit code */
  76738. __Pyx_RefNannyFinishContext();
  76739. return __pyx_r;
  76740. }
  76741. static PyObject *__pyx_pf_6uvloop_4loop_15UVBaseTransport_8abort(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self) {
  76742. PyObject *__pyx_r = NULL;
  76743. __Pyx_RefNannyDeclarations
  76744. PyObject *__pyx_t_1 = NULL;
  76745. PyObject *__pyx_t_2 = NULL;
  76746. PyObject *__pyx_t_3 = NULL;
  76747. __Pyx_RefNannySetupContext("abort", 0);
  76748. /* "uvloop/handles/basetransport.pyx":235
  76749. *
  76750. * def abort(self):
  76751. * self._force_close(None) # <<<<<<<<<<<<<<
  76752. *
  76753. * def close(self):
  76754. */
  76755. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_force_close); if (unlikely(!__pyx_t_2)) __PYX_ERR(16, 235, __pyx_L1_error)
  76756. __Pyx_GOTREF(__pyx_t_2);
  76757. __pyx_t_3 = NULL;
  76758. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
  76759. __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
  76760. if (likely(__pyx_t_3)) {
  76761. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  76762. __Pyx_INCREF(__pyx_t_3);
  76763. __Pyx_INCREF(function);
  76764. __Pyx_DECREF_SET(__pyx_t_2, function);
  76765. }
  76766. }
  76767. __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, Py_None) : __Pyx_PyObject_CallOneArg(__pyx_t_2, Py_None);
  76768. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  76769. if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 235, __pyx_L1_error)
  76770. __Pyx_GOTREF(__pyx_t_1);
  76771. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  76772. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  76773. /* "uvloop/handles/basetransport.pyx":234
  76774. * self._schedule_call_connection_lost(exc)
  76775. *
  76776. * def abort(self): # <<<<<<<<<<<<<<
  76777. * self._force_close(None)
  76778. *
  76779. */
  76780. /* function exit code */
  76781. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  76782. goto __pyx_L0;
  76783. __pyx_L1_error:;
  76784. __Pyx_XDECREF(__pyx_t_1);
  76785. __Pyx_XDECREF(__pyx_t_2);
  76786. __Pyx_XDECREF(__pyx_t_3);
  76787. __Pyx_AddTraceback("uvloop.loop.UVBaseTransport.abort", __pyx_clineno, __pyx_lineno, __pyx_filename);
  76788. __pyx_r = NULL;
  76789. __pyx_L0:;
  76790. __Pyx_XGIVEREF(__pyx_r);
  76791. __Pyx_RefNannyFinishContext();
  76792. return __pyx_r;
  76793. }
  76794. /* "uvloop/handles/basetransport.pyx":237
  76795. * self._force_close(None)
  76796. *
  76797. * def close(self): # <<<<<<<<<<<<<<
  76798. * if self._closing or self._closed:
  76799. * return
  76800. */
  76801. /* Python wrapper */
  76802. static PyObject *__pyx_pw_6uvloop_4loop_15UVBaseTransport_11close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  76803. static char __pyx_doc_6uvloop_4loop_15UVBaseTransport_10close[] = "UVBaseTransport.close(self)";
  76804. static PyObject *__pyx_pw_6uvloop_4loop_15UVBaseTransport_11close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  76805. PyObject *__pyx_r = 0;
  76806. __Pyx_RefNannyDeclarations
  76807. __Pyx_RefNannySetupContext("close (wrapper)", 0);
  76808. __pyx_r = __pyx_pf_6uvloop_4loop_15UVBaseTransport_10close(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_v_self));
  76809. /* function exit code */
  76810. __Pyx_RefNannyFinishContext();
  76811. return __pyx_r;
  76812. }
  76813. static PyObject *__pyx_pf_6uvloop_4loop_15UVBaseTransport_10close(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self) {
  76814. PyObject *__pyx_r = NULL;
  76815. __Pyx_RefNannyDeclarations
  76816. int __pyx_t_1;
  76817. int __pyx_t_2;
  76818. PyObject *__pyx_t_3 = NULL;
  76819. __Pyx_RefNannySetupContext("close", 0);
  76820. /* "uvloop/handles/basetransport.pyx":238
  76821. *
  76822. * def close(self):
  76823. * if self._closing or self._closed: # <<<<<<<<<<<<<<
  76824. * return
  76825. *
  76826. */
  76827. __pyx_t_2 = (__pyx_v_self->_closing != 0);
  76828. if (!__pyx_t_2) {
  76829. } else {
  76830. __pyx_t_1 = __pyx_t_2;
  76831. goto __pyx_L4_bool_binop_done;
  76832. }
  76833. __pyx_t_2 = (__pyx_v_self->__pyx_base.__pyx_base._closed != 0);
  76834. __pyx_t_1 = __pyx_t_2;
  76835. __pyx_L4_bool_binop_done:;
  76836. if (__pyx_t_1) {
  76837. /* "uvloop/handles/basetransport.pyx":239
  76838. * def close(self):
  76839. * if self._closing or self._closed:
  76840. * return # <<<<<<<<<<<<<<
  76841. *
  76842. * self._closing = 1
  76843. */
  76844. __Pyx_XDECREF(__pyx_r);
  76845. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  76846. goto __pyx_L0;
  76847. /* "uvloop/handles/basetransport.pyx":238
  76848. *
  76849. * def close(self):
  76850. * if self._closing or self._closed: # <<<<<<<<<<<<<<
  76851. * return
  76852. *
  76853. */
  76854. }
  76855. /* "uvloop/handles/basetransport.pyx":241
  76856. * return
  76857. *
  76858. * self._closing = 1 # <<<<<<<<<<<<<<
  76859. * self._stop_reading()
  76860. *
  76861. */
  76862. __pyx_v_self->_closing = 1;
  76863. /* "uvloop/handles/basetransport.pyx":242
  76864. *
  76865. * self._closing = 1
  76866. * self._stop_reading() # <<<<<<<<<<<<<<
  76867. *
  76868. * if not self._get_write_buffer_size():
  76869. */
  76870. __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVBaseTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_stop_reading(__pyx_v_self); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 242, __pyx_L1_error)
  76871. __Pyx_GOTREF(__pyx_t_3);
  76872. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  76873. /* "uvloop/handles/basetransport.pyx":244
  76874. * self._stop_reading()
  76875. *
  76876. * if not self._get_write_buffer_size(): # <<<<<<<<<<<<<<
  76877. * # The write buffer is empty
  76878. * self._conn_lost += 1
  76879. */
  76880. __pyx_t_1 = ((!(((struct __pyx_vtabstruct_6uvloop_4loop_UVBaseTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_get_write_buffer_size(__pyx_v_self) != 0)) != 0);
  76881. if (__pyx_t_1) {
  76882. /* "uvloop/handles/basetransport.pyx":246
  76883. * if not self._get_write_buffer_size():
  76884. * # The write buffer is empty
  76885. * self._conn_lost += 1 # <<<<<<<<<<<<<<
  76886. * self._schedule_call_connection_lost(None)
  76887. *
  76888. */
  76889. __pyx_v_self->_conn_lost = (__pyx_v_self->_conn_lost + 1);
  76890. /* "uvloop/handles/basetransport.pyx":247
  76891. * # The write buffer is empty
  76892. * self._conn_lost += 1
  76893. * self._schedule_call_connection_lost(None) # <<<<<<<<<<<<<<
  76894. *
  76895. * def is_closing(self):
  76896. */
  76897. __pyx_t_3 = __pyx_f_6uvloop_4loop_15UVBaseTransport__schedule_call_connection_lost(__pyx_v_self, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 247, __pyx_L1_error)
  76898. __Pyx_GOTREF(__pyx_t_3);
  76899. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  76900. /* "uvloop/handles/basetransport.pyx":244
  76901. * self._stop_reading()
  76902. *
  76903. * if not self._get_write_buffer_size(): # <<<<<<<<<<<<<<
  76904. * # The write buffer is empty
  76905. * self._conn_lost += 1
  76906. */
  76907. }
  76908. /* "uvloop/handles/basetransport.pyx":237
  76909. * self._force_close(None)
  76910. *
  76911. * def close(self): # <<<<<<<<<<<<<<
  76912. * if self._closing or self._closed:
  76913. * return
  76914. */
  76915. /* function exit code */
  76916. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  76917. goto __pyx_L0;
  76918. __pyx_L1_error:;
  76919. __Pyx_XDECREF(__pyx_t_3);
  76920. __Pyx_AddTraceback("uvloop.loop.UVBaseTransport.close", __pyx_clineno, __pyx_lineno, __pyx_filename);
  76921. __pyx_r = NULL;
  76922. __pyx_L0:;
  76923. __Pyx_XGIVEREF(__pyx_r);
  76924. __Pyx_RefNannyFinishContext();
  76925. return __pyx_r;
  76926. }
  76927. /* "uvloop/handles/basetransport.pyx":249
  76928. * self._schedule_call_connection_lost(None)
  76929. *
  76930. * def is_closing(self): # <<<<<<<<<<<<<<
  76931. * return self._closing
  76932. *
  76933. */
  76934. /* Python wrapper */
  76935. static PyObject *__pyx_pw_6uvloop_4loop_15UVBaseTransport_13is_closing(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  76936. static char __pyx_doc_6uvloop_4loop_15UVBaseTransport_12is_closing[] = "UVBaseTransport.is_closing(self)";
  76937. static PyObject *__pyx_pw_6uvloop_4loop_15UVBaseTransport_13is_closing(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  76938. PyObject *__pyx_r = 0;
  76939. __Pyx_RefNannyDeclarations
  76940. __Pyx_RefNannySetupContext("is_closing (wrapper)", 0);
  76941. __pyx_r = __pyx_pf_6uvloop_4loop_15UVBaseTransport_12is_closing(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_v_self));
  76942. /* function exit code */
  76943. __Pyx_RefNannyFinishContext();
  76944. return __pyx_r;
  76945. }
  76946. static PyObject *__pyx_pf_6uvloop_4loop_15UVBaseTransport_12is_closing(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self) {
  76947. PyObject *__pyx_r = NULL;
  76948. __Pyx_RefNannyDeclarations
  76949. PyObject *__pyx_t_1 = NULL;
  76950. __Pyx_RefNannySetupContext("is_closing", 0);
  76951. /* "uvloop/handles/basetransport.pyx":250
  76952. *
  76953. * def is_closing(self):
  76954. * return self._closing # <<<<<<<<<<<<<<
  76955. *
  76956. * def get_write_buffer_size(self):
  76957. */
  76958. __Pyx_XDECREF(__pyx_r);
  76959. __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->_closing); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 250, __pyx_L1_error)
  76960. __Pyx_GOTREF(__pyx_t_1);
  76961. __pyx_r = __pyx_t_1;
  76962. __pyx_t_1 = 0;
  76963. goto __pyx_L0;
  76964. /* "uvloop/handles/basetransport.pyx":249
  76965. * self._schedule_call_connection_lost(None)
  76966. *
  76967. * def is_closing(self): # <<<<<<<<<<<<<<
  76968. * return self._closing
  76969. *
  76970. */
  76971. /* function exit code */
  76972. __pyx_L1_error:;
  76973. __Pyx_XDECREF(__pyx_t_1);
  76974. __Pyx_AddTraceback("uvloop.loop.UVBaseTransport.is_closing", __pyx_clineno, __pyx_lineno, __pyx_filename);
  76975. __pyx_r = NULL;
  76976. __pyx_L0:;
  76977. __Pyx_XGIVEREF(__pyx_r);
  76978. __Pyx_RefNannyFinishContext();
  76979. return __pyx_r;
  76980. }
  76981. /* "uvloop/handles/basetransport.pyx":252
  76982. * return self._closing
  76983. *
  76984. * def get_write_buffer_size(self): # <<<<<<<<<<<<<<
  76985. * return self._get_write_buffer_size()
  76986. *
  76987. */
  76988. /* Python wrapper */
  76989. static PyObject *__pyx_pw_6uvloop_4loop_15UVBaseTransport_15get_write_buffer_size(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  76990. static char __pyx_doc_6uvloop_4loop_15UVBaseTransport_14get_write_buffer_size[] = "UVBaseTransport.get_write_buffer_size(self)";
  76991. static PyObject *__pyx_pw_6uvloop_4loop_15UVBaseTransport_15get_write_buffer_size(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  76992. PyObject *__pyx_r = 0;
  76993. __Pyx_RefNannyDeclarations
  76994. __Pyx_RefNannySetupContext("get_write_buffer_size (wrapper)", 0);
  76995. __pyx_r = __pyx_pf_6uvloop_4loop_15UVBaseTransport_14get_write_buffer_size(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_v_self));
  76996. /* function exit code */
  76997. __Pyx_RefNannyFinishContext();
  76998. return __pyx_r;
  76999. }
  77000. static PyObject *__pyx_pf_6uvloop_4loop_15UVBaseTransport_14get_write_buffer_size(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self) {
  77001. PyObject *__pyx_r = NULL;
  77002. __Pyx_RefNannyDeclarations
  77003. PyObject *__pyx_t_1 = NULL;
  77004. __Pyx_RefNannySetupContext("get_write_buffer_size", 0);
  77005. /* "uvloop/handles/basetransport.pyx":253
  77006. *
  77007. * def get_write_buffer_size(self):
  77008. * return self._get_write_buffer_size() # <<<<<<<<<<<<<<
  77009. *
  77010. * def set_write_buffer_limits(self, high=None, low=None):
  77011. */
  77012. __Pyx_XDECREF(__pyx_r);
  77013. __pyx_t_1 = __Pyx_PyInt_FromSize_t(((struct __pyx_vtabstruct_6uvloop_4loop_UVBaseTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_get_write_buffer_size(__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 253, __pyx_L1_error)
  77014. __Pyx_GOTREF(__pyx_t_1);
  77015. __pyx_r = __pyx_t_1;
  77016. __pyx_t_1 = 0;
  77017. goto __pyx_L0;
  77018. /* "uvloop/handles/basetransport.pyx":252
  77019. * return self._closing
  77020. *
  77021. * def get_write_buffer_size(self): # <<<<<<<<<<<<<<
  77022. * return self._get_write_buffer_size()
  77023. *
  77024. */
  77025. /* function exit code */
  77026. __pyx_L1_error:;
  77027. __Pyx_XDECREF(__pyx_t_1);
  77028. __Pyx_AddTraceback("uvloop.loop.UVBaseTransport.get_write_buffer_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
  77029. __pyx_r = NULL;
  77030. __pyx_L0:;
  77031. __Pyx_XGIVEREF(__pyx_r);
  77032. __Pyx_RefNannyFinishContext();
  77033. return __pyx_r;
  77034. }
  77035. /* "uvloop/handles/basetransport.pyx":255
  77036. * return self._get_write_buffer_size()
  77037. *
  77038. * def set_write_buffer_limits(self, high=None, low=None): # <<<<<<<<<<<<<<
  77039. * self._ensure_alive()
  77040. *
  77041. */
  77042. /* Python wrapper */
  77043. static PyObject *__pyx_pw_6uvloop_4loop_15UVBaseTransport_17set_write_buffer_limits(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  77044. static char __pyx_doc_6uvloop_4loop_15UVBaseTransport_16set_write_buffer_limits[] = "UVBaseTransport.set_write_buffer_limits(self, high=None, low=None)";
  77045. static PyObject *__pyx_pw_6uvloop_4loop_15UVBaseTransport_17set_write_buffer_limits(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  77046. PyObject *__pyx_v_high = 0;
  77047. PyObject *__pyx_v_low = 0;
  77048. PyObject *__pyx_r = 0;
  77049. __Pyx_RefNannyDeclarations
  77050. __Pyx_RefNannySetupContext("set_write_buffer_limits (wrapper)", 0);
  77051. {
  77052. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_high,&__pyx_n_s_low,0};
  77053. PyObject* values[2] = {0,0};
  77054. values[0] = ((PyObject *)Py_None);
  77055. values[1] = ((PyObject *)Py_None);
  77056. if (unlikely(__pyx_kwds)) {
  77057. Py_ssize_t kw_args;
  77058. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  77059. switch (pos_args) {
  77060. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  77061. CYTHON_FALLTHROUGH;
  77062. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  77063. CYTHON_FALLTHROUGH;
  77064. case 0: break;
  77065. default: goto __pyx_L5_argtuple_error;
  77066. }
  77067. kw_args = PyDict_Size(__pyx_kwds);
  77068. switch (pos_args) {
  77069. case 0:
  77070. if (kw_args > 0) {
  77071. PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_high);
  77072. if (value) { values[0] = value; kw_args--; }
  77073. }
  77074. CYTHON_FALLTHROUGH;
  77075. case 1:
  77076. if (kw_args > 0) {
  77077. PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_low);
  77078. if (value) { values[1] = value; kw_args--; }
  77079. }
  77080. }
  77081. if (unlikely(kw_args > 0)) {
  77082. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_write_buffer_limits") < 0)) __PYX_ERR(16, 255, __pyx_L3_error)
  77083. }
  77084. } else {
  77085. switch (PyTuple_GET_SIZE(__pyx_args)) {
  77086. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  77087. CYTHON_FALLTHROUGH;
  77088. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  77089. CYTHON_FALLTHROUGH;
  77090. case 0: break;
  77091. default: goto __pyx_L5_argtuple_error;
  77092. }
  77093. }
  77094. __pyx_v_high = values[0];
  77095. __pyx_v_low = values[1];
  77096. }
  77097. goto __pyx_L4_argument_unpacking_done;
  77098. __pyx_L5_argtuple_error:;
  77099. __Pyx_RaiseArgtupleInvalid("set_write_buffer_limits", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(16, 255, __pyx_L3_error)
  77100. __pyx_L3_error:;
  77101. __Pyx_AddTraceback("uvloop.loop.UVBaseTransport.set_write_buffer_limits", __pyx_clineno, __pyx_lineno, __pyx_filename);
  77102. __Pyx_RefNannyFinishContext();
  77103. return NULL;
  77104. __pyx_L4_argument_unpacking_done:;
  77105. __pyx_r = __pyx_pf_6uvloop_4loop_15UVBaseTransport_16set_write_buffer_limits(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_v_self), __pyx_v_high, __pyx_v_low);
  77106. /* function exit code */
  77107. __Pyx_RefNannyFinishContext();
  77108. return __pyx_r;
  77109. }
  77110. static PyObject *__pyx_pf_6uvloop_4loop_15UVBaseTransport_16set_write_buffer_limits(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self, PyObject *__pyx_v_high, PyObject *__pyx_v_low) {
  77111. PyObject *__pyx_r = NULL;
  77112. __Pyx_RefNannyDeclarations
  77113. PyObject *__pyx_t_1 = NULL;
  77114. PyObject *__pyx_t_2 = NULL;
  77115. PyObject *__pyx_t_3 = NULL;
  77116. PyObject *__pyx_t_4 = NULL;
  77117. PyObject *(*__pyx_t_5)(PyObject *);
  77118. size_t __pyx_t_6;
  77119. size_t __pyx_t_7;
  77120. __Pyx_RefNannySetupContext("set_write_buffer_limits", 0);
  77121. /* "uvloop/handles/basetransport.pyx":256
  77122. *
  77123. * def set_write_buffer_limits(self, high=None, low=None):
  77124. * self._ensure_alive() # <<<<<<<<<<<<<<
  77125. *
  77126. * self._high_water, self._low_water = add_flowcontrol_defaults(
  77127. */
  77128. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVBaseTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._ensure_alive(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 256, __pyx_L1_error)
  77129. __Pyx_GOTREF(__pyx_t_1);
  77130. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  77131. /* "uvloop/handles/basetransport.pyx":258
  77132. * self._ensure_alive()
  77133. *
  77134. * self._high_water, self._low_water = add_flowcontrol_defaults( # <<<<<<<<<<<<<<
  77135. * high, low, FLOW_CONTROL_HIGH_WATER)
  77136. *
  77137. */
  77138. __pyx_t_1 = __pyx_f_6uvloop_8includes_11flowcontrol_add_flowcontrol_defaults(__pyx_v_high, __pyx_v_low, 64); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 258, __pyx_L1_error)
  77139. __Pyx_GOTREF(__pyx_t_1);
  77140. if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
  77141. PyObject* sequence = __pyx_t_1;
  77142. Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
  77143. if (unlikely(size != 2)) {
  77144. if (size > 2) __Pyx_RaiseTooManyValuesError(2);
  77145. else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
  77146. __PYX_ERR(16, 258, __pyx_L1_error)
  77147. }
  77148. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  77149. if (likely(PyTuple_CheckExact(sequence))) {
  77150. __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0);
  77151. __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1);
  77152. } else {
  77153. __pyx_t_2 = PyList_GET_ITEM(sequence, 0);
  77154. __pyx_t_3 = PyList_GET_ITEM(sequence, 1);
  77155. }
  77156. __Pyx_INCREF(__pyx_t_2);
  77157. __Pyx_INCREF(__pyx_t_3);
  77158. #else
  77159. __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(16, 258, __pyx_L1_error)
  77160. __Pyx_GOTREF(__pyx_t_2);
  77161. __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 258, __pyx_L1_error)
  77162. __Pyx_GOTREF(__pyx_t_3);
  77163. #endif
  77164. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  77165. } else {
  77166. Py_ssize_t index = -1;
  77167. __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(16, 258, __pyx_L1_error)
  77168. __Pyx_GOTREF(__pyx_t_4);
  77169. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  77170. __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext;
  77171. index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
  77172. __Pyx_GOTREF(__pyx_t_2);
  77173. index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
  77174. __Pyx_GOTREF(__pyx_t_3);
  77175. if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) __PYX_ERR(16, 258, __pyx_L1_error)
  77176. __pyx_t_5 = NULL;
  77177. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  77178. goto __pyx_L4_unpacking_done;
  77179. __pyx_L3_unpacking_failed:;
  77180. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  77181. __pyx_t_5 = NULL;
  77182. if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
  77183. __PYX_ERR(16, 258, __pyx_L1_error)
  77184. __pyx_L4_unpacking_done:;
  77185. }
  77186. __pyx_t_6 = __Pyx_PyInt_As_size_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(16, 258, __pyx_L1_error)
  77187. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  77188. __pyx_t_7 = __Pyx_PyInt_As_size_t(__pyx_t_3); if (unlikely((__pyx_t_7 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(16, 258, __pyx_L1_error)
  77189. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  77190. __pyx_v_self->_high_water = __pyx_t_6;
  77191. __pyx_v_self->_low_water = __pyx_t_7;
  77192. /* "uvloop/handles/basetransport.pyx":261
  77193. * high, low, FLOW_CONTROL_HIGH_WATER)
  77194. *
  77195. * self._maybe_pause_protocol() # <<<<<<<<<<<<<<
  77196. *
  77197. * def get_write_buffer_limits(self):
  77198. */
  77199. __pyx_t_1 = __pyx_f_6uvloop_4loop_15UVBaseTransport__maybe_pause_protocol(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 261, __pyx_L1_error)
  77200. __Pyx_GOTREF(__pyx_t_1);
  77201. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  77202. /* "uvloop/handles/basetransport.pyx":255
  77203. * return self._get_write_buffer_size()
  77204. *
  77205. * def set_write_buffer_limits(self, high=None, low=None): # <<<<<<<<<<<<<<
  77206. * self._ensure_alive()
  77207. *
  77208. */
  77209. /* function exit code */
  77210. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  77211. goto __pyx_L0;
  77212. __pyx_L1_error:;
  77213. __Pyx_XDECREF(__pyx_t_1);
  77214. __Pyx_XDECREF(__pyx_t_2);
  77215. __Pyx_XDECREF(__pyx_t_3);
  77216. __Pyx_XDECREF(__pyx_t_4);
  77217. __Pyx_AddTraceback("uvloop.loop.UVBaseTransport.set_write_buffer_limits", __pyx_clineno, __pyx_lineno, __pyx_filename);
  77218. __pyx_r = NULL;
  77219. __pyx_L0:;
  77220. __Pyx_XGIVEREF(__pyx_r);
  77221. __Pyx_RefNannyFinishContext();
  77222. return __pyx_r;
  77223. }
  77224. /* "uvloop/handles/basetransport.pyx":263
  77225. * self._maybe_pause_protocol()
  77226. *
  77227. * def get_write_buffer_limits(self): # <<<<<<<<<<<<<<
  77228. * return (self._low_water, self._high_water)
  77229. *
  77230. */
  77231. /* Python wrapper */
  77232. static PyObject *__pyx_pw_6uvloop_4loop_15UVBaseTransport_19get_write_buffer_limits(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  77233. static char __pyx_doc_6uvloop_4loop_15UVBaseTransport_18get_write_buffer_limits[] = "UVBaseTransport.get_write_buffer_limits(self)";
  77234. static PyObject *__pyx_pw_6uvloop_4loop_15UVBaseTransport_19get_write_buffer_limits(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  77235. PyObject *__pyx_r = 0;
  77236. __Pyx_RefNannyDeclarations
  77237. __Pyx_RefNannySetupContext("get_write_buffer_limits (wrapper)", 0);
  77238. __pyx_r = __pyx_pf_6uvloop_4loop_15UVBaseTransport_18get_write_buffer_limits(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_v_self));
  77239. /* function exit code */
  77240. __Pyx_RefNannyFinishContext();
  77241. return __pyx_r;
  77242. }
  77243. static PyObject *__pyx_pf_6uvloop_4loop_15UVBaseTransport_18get_write_buffer_limits(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self) {
  77244. PyObject *__pyx_r = NULL;
  77245. __Pyx_RefNannyDeclarations
  77246. PyObject *__pyx_t_1 = NULL;
  77247. PyObject *__pyx_t_2 = NULL;
  77248. PyObject *__pyx_t_3 = NULL;
  77249. __Pyx_RefNannySetupContext("get_write_buffer_limits", 0);
  77250. /* "uvloop/handles/basetransport.pyx":264
  77251. *
  77252. * def get_write_buffer_limits(self):
  77253. * return (self._low_water, self._high_water) # <<<<<<<<<<<<<<
  77254. *
  77255. * def get_extra_info(self, name, default=None):
  77256. */
  77257. __Pyx_XDECREF(__pyx_r);
  77258. __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_self->_low_water); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 264, __pyx_L1_error)
  77259. __Pyx_GOTREF(__pyx_t_1);
  77260. __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_v_self->_high_water); if (unlikely(!__pyx_t_2)) __PYX_ERR(16, 264, __pyx_L1_error)
  77261. __Pyx_GOTREF(__pyx_t_2);
  77262. __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 264, __pyx_L1_error)
  77263. __Pyx_GOTREF(__pyx_t_3);
  77264. __Pyx_GIVEREF(__pyx_t_1);
  77265. PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  77266. __Pyx_GIVEREF(__pyx_t_2);
  77267. PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  77268. __pyx_t_1 = 0;
  77269. __pyx_t_2 = 0;
  77270. __pyx_r = __pyx_t_3;
  77271. __pyx_t_3 = 0;
  77272. goto __pyx_L0;
  77273. /* "uvloop/handles/basetransport.pyx":263
  77274. * self._maybe_pause_protocol()
  77275. *
  77276. * def get_write_buffer_limits(self): # <<<<<<<<<<<<<<
  77277. * return (self._low_water, self._high_water)
  77278. *
  77279. */
  77280. /* function exit code */
  77281. __pyx_L1_error:;
  77282. __Pyx_XDECREF(__pyx_t_1);
  77283. __Pyx_XDECREF(__pyx_t_2);
  77284. __Pyx_XDECREF(__pyx_t_3);
  77285. __Pyx_AddTraceback("uvloop.loop.UVBaseTransport.get_write_buffer_limits", __pyx_clineno, __pyx_lineno, __pyx_filename);
  77286. __pyx_r = NULL;
  77287. __pyx_L0:;
  77288. __Pyx_XGIVEREF(__pyx_r);
  77289. __Pyx_RefNannyFinishContext();
  77290. return __pyx_r;
  77291. }
  77292. /* "uvloop/handles/basetransport.pyx":266
  77293. * return (self._low_water, self._high_water)
  77294. *
  77295. * def get_extra_info(self, name, default=None): # <<<<<<<<<<<<<<
  77296. * if self._extra_info is not None and name in self._extra_info:
  77297. * return self._extra_info[name]
  77298. */
  77299. /* Python wrapper */
  77300. static PyObject *__pyx_pw_6uvloop_4loop_15UVBaseTransport_21get_extra_info(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  77301. static char __pyx_doc_6uvloop_4loop_15UVBaseTransport_20get_extra_info[] = "UVBaseTransport.get_extra_info(self, name, default=None)";
  77302. static PyObject *__pyx_pw_6uvloop_4loop_15UVBaseTransport_21get_extra_info(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  77303. PyObject *__pyx_v_name = 0;
  77304. PyObject *__pyx_v_default = 0;
  77305. PyObject *__pyx_r = 0;
  77306. __Pyx_RefNannyDeclarations
  77307. __Pyx_RefNannySetupContext("get_extra_info (wrapper)", 0);
  77308. {
  77309. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name_2,&__pyx_n_s_default,0};
  77310. PyObject* values[2] = {0,0};
  77311. values[1] = ((PyObject *)Py_None);
  77312. if (unlikely(__pyx_kwds)) {
  77313. Py_ssize_t kw_args;
  77314. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  77315. switch (pos_args) {
  77316. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  77317. CYTHON_FALLTHROUGH;
  77318. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  77319. CYTHON_FALLTHROUGH;
  77320. case 0: break;
  77321. default: goto __pyx_L5_argtuple_error;
  77322. }
  77323. kw_args = PyDict_Size(__pyx_kwds);
  77324. switch (pos_args) {
  77325. case 0:
  77326. if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name_2)) != 0)) kw_args--;
  77327. else goto __pyx_L5_argtuple_error;
  77328. CYTHON_FALLTHROUGH;
  77329. case 1:
  77330. if (kw_args > 0) {
  77331. PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_default);
  77332. if (value) { values[1] = value; kw_args--; }
  77333. }
  77334. }
  77335. if (unlikely(kw_args > 0)) {
  77336. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_extra_info") < 0)) __PYX_ERR(16, 266, __pyx_L3_error)
  77337. }
  77338. } else {
  77339. switch (PyTuple_GET_SIZE(__pyx_args)) {
  77340. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  77341. CYTHON_FALLTHROUGH;
  77342. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  77343. break;
  77344. default: goto __pyx_L5_argtuple_error;
  77345. }
  77346. }
  77347. __pyx_v_name = values[0];
  77348. __pyx_v_default = values[1];
  77349. }
  77350. goto __pyx_L4_argument_unpacking_done;
  77351. __pyx_L5_argtuple_error:;
  77352. __Pyx_RaiseArgtupleInvalid("get_extra_info", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(16, 266, __pyx_L3_error)
  77353. __pyx_L3_error:;
  77354. __Pyx_AddTraceback("uvloop.loop.UVBaseTransport.get_extra_info", __pyx_clineno, __pyx_lineno, __pyx_filename);
  77355. __Pyx_RefNannyFinishContext();
  77356. return NULL;
  77357. __pyx_L4_argument_unpacking_done:;
  77358. __pyx_r = __pyx_pf_6uvloop_4loop_15UVBaseTransport_20get_extra_info(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_v_self), __pyx_v_name, __pyx_v_default);
  77359. /* function exit code */
  77360. __Pyx_RefNannyFinishContext();
  77361. return __pyx_r;
  77362. }
  77363. static PyObject *__pyx_pf_6uvloop_4loop_15UVBaseTransport_20get_extra_info(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_default) {
  77364. PyObject *__pyx_r = NULL;
  77365. __Pyx_RefNannyDeclarations
  77366. int __pyx_t_1;
  77367. int __pyx_t_2;
  77368. int __pyx_t_3;
  77369. PyObject *__pyx_t_4 = NULL;
  77370. PyObject *__pyx_t_5 = NULL;
  77371. PyObject *__pyx_t_6 = NULL;
  77372. PyObject *__pyx_t_7 = NULL;
  77373. PyObject *__pyx_t_8 = NULL;
  77374. PyObject *__pyx_t_9 = NULL;
  77375. int __pyx_t_10;
  77376. __Pyx_RefNannySetupContext("get_extra_info", 0);
  77377. /* "uvloop/handles/basetransport.pyx":267
  77378. *
  77379. * def get_extra_info(self, name, default=None):
  77380. * if self._extra_info is not None and name in self._extra_info: # <<<<<<<<<<<<<<
  77381. * return self._extra_info[name]
  77382. * if name == 'socket':
  77383. */
  77384. __pyx_t_2 = (__pyx_v_self->_extra_info != ((PyObject*)Py_None));
  77385. __pyx_t_3 = (__pyx_t_2 != 0);
  77386. if (__pyx_t_3) {
  77387. } else {
  77388. __pyx_t_1 = __pyx_t_3;
  77389. goto __pyx_L4_bool_binop_done;
  77390. }
  77391. if (unlikely(__pyx_v_self->_extra_info == Py_None)) {
  77392. PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
  77393. __PYX_ERR(16, 267, __pyx_L1_error)
  77394. }
  77395. __pyx_t_3 = (__Pyx_PyDict_ContainsTF(__pyx_v_name, __pyx_v_self->_extra_info, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(16, 267, __pyx_L1_error)
  77396. __pyx_t_2 = (__pyx_t_3 != 0);
  77397. __pyx_t_1 = __pyx_t_2;
  77398. __pyx_L4_bool_binop_done:;
  77399. if (__pyx_t_1) {
  77400. /* "uvloop/handles/basetransport.pyx":268
  77401. * def get_extra_info(self, name, default=None):
  77402. * if self._extra_info is not None and name in self._extra_info:
  77403. * return self._extra_info[name] # <<<<<<<<<<<<<<
  77404. * if name == 'socket':
  77405. * return self._get_socket()
  77406. */
  77407. __Pyx_XDECREF(__pyx_r);
  77408. if (unlikely(__pyx_v_self->_extra_info == Py_None)) {
  77409. PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
  77410. __PYX_ERR(16, 268, __pyx_L1_error)
  77411. }
  77412. __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_self->_extra_info, __pyx_v_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(16, 268, __pyx_L1_error)
  77413. __Pyx_GOTREF(__pyx_t_4);
  77414. __pyx_r = __pyx_t_4;
  77415. __pyx_t_4 = 0;
  77416. goto __pyx_L0;
  77417. /* "uvloop/handles/basetransport.pyx":267
  77418. *
  77419. * def get_extra_info(self, name, default=None):
  77420. * if self._extra_info is not None and name in self._extra_info: # <<<<<<<<<<<<<<
  77421. * return self._extra_info[name]
  77422. * if name == 'socket':
  77423. */
  77424. }
  77425. /* "uvloop/handles/basetransport.pyx":269
  77426. * if self._extra_info is not None and name in self._extra_info:
  77427. * return self._extra_info[name]
  77428. * if name == 'socket': # <<<<<<<<<<<<<<
  77429. * return self._get_socket()
  77430. * if name == 'sockname':
  77431. */
  77432. __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_name, __pyx_n_u_socket_2, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(16, 269, __pyx_L1_error)
  77433. if (__pyx_t_1) {
  77434. /* "uvloop/handles/basetransport.pyx":270
  77435. * return self._extra_info[name]
  77436. * if name == 'socket':
  77437. * return self._get_socket() # <<<<<<<<<<<<<<
  77438. * if name == 'sockname':
  77439. * return self._get_socket().getsockname()
  77440. */
  77441. __Pyx_XDECREF(__pyx_r);
  77442. __pyx_t_4 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVBaseTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._get_socket(((struct __pyx_obj_6uvloop_4loop_UVSocketHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_4)) __PYX_ERR(16, 270, __pyx_L1_error)
  77443. __Pyx_GOTREF(__pyx_t_4);
  77444. __pyx_r = __pyx_t_4;
  77445. __pyx_t_4 = 0;
  77446. goto __pyx_L0;
  77447. /* "uvloop/handles/basetransport.pyx":269
  77448. * if self._extra_info is not None and name in self._extra_info:
  77449. * return self._extra_info[name]
  77450. * if name == 'socket': # <<<<<<<<<<<<<<
  77451. * return self._get_socket()
  77452. * if name == 'sockname':
  77453. */
  77454. }
  77455. /* "uvloop/handles/basetransport.pyx":271
  77456. * if name == 'socket':
  77457. * return self._get_socket()
  77458. * if name == 'sockname': # <<<<<<<<<<<<<<
  77459. * return self._get_socket().getsockname()
  77460. * if name == 'peername':
  77461. */
  77462. __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_name, __pyx_n_u_sockname, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(16, 271, __pyx_L1_error)
  77463. if (__pyx_t_1) {
  77464. /* "uvloop/handles/basetransport.pyx":272
  77465. * return self._get_socket()
  77466. * if name == 'sockname':
  77467. * return self._get_socket().getsockname() # <<<<<<<<<<<<<<
  77468. * if name == 'peername':
  77469. * try:
  77470. */
  77471. __Pyx_XDECREF(__pyx_r);
  77472. __pyx_t_5 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVBaseTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._get_socket(((struct __pyx_obj_6uvloop_4loop_UVSocketHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 272, __pyx_L1_error)
  77473. __Pyx_GOTREF(__pyx_t_5);
  77474. __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_getsockname); if (unlikely(!__pyx_t_6)) __PYX_ERR(16, 272, __pyx_L1_error)
  77475. __Pyx_GOTREF(__pyx_t_6);
  77476. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  77477. __pyx_t_5 = NULL;
  77478. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
  77479. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
  77480. if (likely(__pyx_t_5)) {
  77481. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
  77482. __Pyx_INCREF(__pyx_t_5);
  77483. __Pyx_INCREF(function);
  77484. __Pyx_DECREF_SET(__pyx_t_6, function);
  77485. }
  77486. }
  77487. __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
  77488. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  77489. if (unlikely(!__pyx_t_4)) __PYX_ERR(16, 272, __pyx_L1_error)
  77490. __Pyx_GOTREF(__pyx_t_4);
  77491. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  77492. __pyx_r = __pyx_t_4;
  77493. __pyx_t_4 = 0;
  77494. goto __pyx_L0;
  77495. /* "uvloop/handles/basetransport.pyx":271
  77496. * if name == 'socket':
  77497. * return self._get_socket()
  77498. * if name == 'sockname': # <<<<<<<<<<<<<<
  77499. * return self._get_socket().getsockname()
  77500. * if name == 'peername':
  77501. */
  77502. }
  77503. /* "uvloop/handles/basetransport.pyx":273
  77504. * if name == 'sockname':
  77505. * return self._get_socket().getsockname()
  77506. * if name == 'peername': # <<<<<<<<<<<<<<
  77507. * try:
  77508. * return self._get_socket().getpeername()
  77509. */
  77510. __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_name, __pyx_n_u_peername, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(16, 273, __pyx_L1_error)
  77511. if (__pyx_t_1) {
  77512. /* "uvloop/handles/basetransport.pyx":274
  77513. * return self._get_socket().getsockname()
  77514. * if name == 'peername':
  77515. * try: # <<<<<<<<<<<<<<
  77516. * return self._get_socket().getpeername()
  77517. * except socket_error:
  77518. */
  77519. {
  77520. __Pyx_PyThreadState_declare
  77521. __Pyx_PyThreadState_assign
  77522. __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
  77523. __Pyx_XGOTREF(__pyx_t_7);
  77524. __Pyx_XGOTREF(__pyx_t_8);
  77525. __Pyx_XGOTREF(__pyx_t_9);
  77526. /*try:*/ {
  77527. /* "uvloop/handles/basetransport.pyx":275
  77528. * if name == 'peername':
  77529. * try:
  77530. * return self._get_socket().getpeername() # <<<<<<<<<<<<<<
  77531. * except socket_error:
  77532. * return default
  77533. */
  77534. __Pyx_XDECREF(__pyx_r);
  77535. __pyx_t_6 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVBaseTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._get_socket(((struct __pyx_obj_6uvloop_4loop_UVSocketHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_6)) __PYX_ERR(16, 275, __pyx_L9_error)
  77536. __Pyx_GOTREF(__pyx_t_6);
  77537. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_getpeername); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 275, __pyx_L9_error)
  77538. __Pyx_GOTREF(__pyx_t_5);
  77539. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  77540. __pyx_t_6 = NULL;
  77541. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
  77542. __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
  77543. if (likely(__pyx_t_6)) {
  77544. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
  77545. __Pyx_INCREF(__pyx_t_6);
  77546. __Pyx_INCREF(function);
  77547. __Pyx_DECREF_SET(__pyx_t_5, function);
  77548. }
  77549. }
  77550. __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
  77551. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  77552. if (unlikely(!__pyx_t_4)) __PYX_ERR(16, 275, __pyx_L9_error)
  77553. __Pyx_GOTREF(__pyx_t_4);
  77554. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  77555. __pyx_r = __pyx_t_4;
  77556. __pyx_t_4 = 0;
  77557. goto __pyx_L13_try_return;
  77558. /* "uvloop/handles/basetransport.pyx":274
  77559. * return self._get_socket().getsockname()
  77560. * if name == 'peername':
  77561. * try: # <<<<<<<<<<<<<<
  77562. * return self._get_socket().getpeername()
  77563. * except socket_error:
  77564. */
  77565. }
  77566. __pyx_L9_error:;
  77567. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  77568. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  77569. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  77570. /* "uvloop/handles/basetransport.pyx":276
  77571. * try:
  77572. * return self._get_socket().getpeername()
  77573. * except socket_error: # <<<<<<<<<<<<<<
  77574. * return default
  77575. * return default
  77576. */
  77577. __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(__pyx_v_6uvloop_4loop_socket_error);
  77578. if (__pyx_t_10) {
  77579. __Pyx_AddTraceback("uvloop.loop.UVBaseTransport.get_extra_info", __pyx_clineno, __pyx_lineno, __pyx_filename);
  77580. if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6) < 0) __PYX_ERR(16, 276, __pyx_L11_except_error)
  77581. __Pyx_GOTREF(__pyx_t_4);
  77582. __Pyx_GOTREF(__pyx_t_5);
  77583. __Pyx_GOTREF(__pyx_t_6);
  77584. /* "uvloop/handles/basetransport.pyx":277
  77585. * return self._get_socket().getpeername()
  77586. * except socket_error:
  77587. * return default # <<<<<<<<<<<<<<
  77588. * return default
  77589. */
  77590. __Pyx_XDECREF(__pyx_r);
  77591. __Pyx_INCREF(__pyx_v_default);
  77592. __pyx_r = __pyx_v_default;
  77593. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  77594. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  77595. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  77596. goto __pyx_L12_except_return;
  77597. }
  77598. goto __pyx_L11_except_error;
  77599. __pyx_L11_except_error:;
  77600. /* "uvloop/handles/basetransport.pyx":274
  77601. * return self._get_socket().getsockname()
  77602. * if name == 'peername':
  77603. * try: # <<<<<<<<<<<<<<
  77604. * return self._get_socket().getpeername()
  77605. * except socket_error:
  77606. */
  77607. __Pyx_XGIVEREF(__pyx_t_7);
  77608. __Pyx_XGIVEREF(__pyx_t_8);
  77609. __Pyx_XGIVEREF(__pyx_t_9);
  77610. __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
  77611. goto __pyx_L1_error;
  77612. __pyx_L13_try_return:;
  77613. __Pyx_XGIVEREF(__pyx_t_7);
  77614. __Pyx_XGIVEREF(__pyx_t_8);
  77615. __Pyx_XGIVEREF(__pyx_t_9);
  77616. __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
  77617. goto __pyx_L0;
  77618. __pyx_L12_except_return:;
  77619. __Pyx_XGIVEREF(__pyx_t_7);
  77620. __Pyx_XGIVEREF(__pyx_t_8);
  77621. __Pyx_XGIVEREF(__pyx_t_9);
  77622. __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
  77623. goto __pyx_L0;
  77624. }
  77625. /* "uvloop/handles/basetransport.pyx":273
  77626. * if name == 'sockname':
  77627. * return self._get_socket().getsockname()
  77628. * if name == 'peername': # <<<<<<<<<<<<<<
  77629. * try:
  77630. * return self._get_socket().getpeername()
  77631. */
  77632. }
  77633. /* "uvloop/handles/basetransport.pyx":278
  77634. * except socket_error:
  77635. * return default
  77636. * return default # <<<<<<<<<<<<<<
  77637. */
  77638. __Pyx_XDECREF(__pyx_r);
  77639. __Pyx_INCREF(__pyx_v_default);
  77640. __pyx_r = __pyx_v_default;
  77641. goto __pyx_L0;
  77642. /* "uvloop/handles/basetransport.pyx":266
  77643. * return (self._low_water, self._high_water)
  77644. *
  77645. * def get_extra_info(self, name, default=None): # <<<<<<<<<<<<<<
  77646. * if self._extra_info is not None and name in self._extra_info:
  77647. * return self._extra_info[name]
  77648. */
  77649. /* function exit code */
  77650. __pyx_L1_error:;
  77651. __Pyx_XDECREF(__pyx_t_4);
  77652. __Pyx_XDECREF(__pyx_t_5);
  77653. __Pyx_XDECREF(__pyx_t_6);
  77654. __Pyx_AddTraceback("uvloop.loop.UVBaseTransport.get_extra_info", __pyx_clineno, __pyx_lineno, __pyx_filename);
  77655. __pyx_r = NULL;
  77656. __pyx_L0:;
  77657. __Pyx_XGIVEREF(__pyx_r);
  77658. __Pyx_RefNannyFinishContext();
  77659. return __pyx_r;
  77660. }
  77661. /* "uvloop/handles/basetransport.pxd":4
  77662. *
  77663. * cdef:
  77664. * readonly bint _closing # <<<<<<<<<<<<<<
  77665. *
  77666. * bint _protocol_connected
  77667. */
  77668. /* Python wrapper */
  77669. static PyObject *__pyx_pw_6uvloop_4loop_15UVBaseTransport_8_closing_1__get__(PyObject *__pyx_v_self); /*proto*/
  77670. static PyObject *__pyx_pw_6uvloop_4loop_15UVBaseTransport_8_closing_1__get__(PyObject *__pyx_v_self) {
  77671. PyObject *__pyx_r = 0;
  77672. __Pyx_RefNannyDeclarations
  77673. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  77674. __pyx_r = __pyx_pf_6uvloop_4loop_15UVBaseTransport_8_closing___get__(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_v_self));
  77675. /* function exit code */
  77676. __Pyx_RefNannyFinishContext();
  77677. return __pyx_r;
  77678. }
  77679. static PyObject *__pyx_pf_6uvloop_4loop_15UVBaseTransport_8_closing___get__(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self) {
  77680. PyObject *__pyx_r = NULL;
  77681. __Pyx_RefNannyDeclarations
  77682. PyObject *__pyx_t_1 = NULL;
  77683. __Pyx_RefNannySetupContext("__get__", 0);
  77684. __Pyx_XDECREF(__pyx_r);
  77685. __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->_closing); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 4, __pyx_L1_error)
  77686. __Pyx_GOTREF(__pyx_t_1);
  77687. __pyx_r = __pyx_t_1;
  77688. __pyx_t_1 = 0;
  77689. goto __pyx_L0;
  77690. /* function exit code */
  77691. __pyx_L1_error:;
  77692. __Pyx_XDECREF(__pyx_t_1);
  77693. __Pyx_AddTraceback("uvloop.loop.UVBaseTransport._closing.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  77694. __pyx_r = NULL;
  77695. __pyx_L0:;
  77696. __Pyx_XGIVEREF(__pyx_r);
  77697. __Pyx_RefNannyFinishContext();
  77698. return __pyx_r;
  77699. }
  77700. /* "(tree fragment)":1
  77701. * def __reduce_cython__(self): # <<<<<<<<<<<<<<
  77702. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  77703. * def __setstate_cython__(self, __pyx_state):
  77704. */
  77705. /* Python wrapper */
  77706. static PyObject *__pyx_pw_6uvloop_4loop_15UVBaseTransport_23__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  77707. static char __pyx_doc_6uvloop_4loop_15UVBaseTransport_22__reduce_cython__[] = "UVBaseTransport.__reduce_cython__(self)";
  77708. static PyObject *__pyx_pw_6uvloop_4loop_15UVBaseTransport_23__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  77709. PyObject *__pyx_r = 0;
  77710. __Pyx_RefNannyDeclarations
  77711. __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  77712. __pyx_r = __pyx_pf_6uvloop_4loop_15UVBaseTransport_22__reduce_cython__(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_v_self));
  77713. /* function exit code */
  77714. __Pyx_RefNannyFinishContext();
  77715. return __pyx_r;
  77716. }
  77717. static PyObject *__pyx_pf_6uvloop_4loop_15UVBaseTransport_22__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self) {
  77718. PyObject *__pyx_r = NULL;
  77719. __Pyx_RefNannyDeclarations
  77720. PyObject *__pyx_t_1 = NULL;
  77721. __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  77722. /* "(tree fragment)":2
  77723. * def __reduce_cython__(self):
  77724. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  77725. * def __setstate_cython__(self, __pyx_state):
  77726. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  77727. */
  77728. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__123, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 2, __pyx_L1_error)
  77729. __Pyx_GOTREF(__pyx_t_1);
  77730. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  77731. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  77732. __PYX_ERR(9, 2, __pyx_L1_error)
  77733. /* "(tree fragment)":1
  77734. * def __reduce_cython__(self): # <<<<<<<<<<<<<<
  77735. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  77736. * def __setstate_cython__(self, __pyx_state):
  77737. */
  77738. /* function exit code */
  77739. __pyx_L1_error:;
  77740. __Pyx_XDECREF(__pyx_t_1);
  77741. __Pyx_AddTraceback("uvloop.loop.UVBaseTransport.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  77742. __pyx_r = NULL;
  77743. __Pyx_XGIVEREF(__pyx_r);
  77744. __Pyx_RefNannyFinishContext();
  77745. return __pyx_r;
  77746. }
  77747. /* "(tree fragment)":3
  77748. * def __reduce_cython__(self):
  77749. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  77750. * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
  77751. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  77752. */
  77753. /* Python wrapper */
  77754. static PyObject *__pyx_pw_6uvloop_4loop_15UVBaseTransport_25__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
  77755. static char __pyx_doc_6uvloop_4loop_15UVBaseTransport_24__setstate_cython__[] = "UVBaseTransport.__setstate_cython__(self, __pyx_state)";
  77756. static PyObject *__pyx_pw_6uvloop_4loop_15UVBaseTransport_25__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  77757. PyObject *__pyx_r = 0;
  77758. __Pyx_RefNannyDeclarations
  77759. __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  77760. __pyx_r = __pyx_pf_6uvloop_4loop_15UVBaseTransport_24__setstate_cython__(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
  77761. /* function exit code */
  77762. __Pyx_RefNannyFinishContext();
  77763. return __pyx_r;
  77764. }
  77765. static PyObject *__pyx_pf_6uvloop_4loop_15UVBaseTransport_24__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  77766. PyObject *__pyx_r = NULL;
  77767. __Pyx_RefNannyDeclarations
  77768. PyObject *__pyx_t_1 = NULL;
  77769. __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  77770. /* "(tree fragment)":4
  77771. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  77772. * def __setstate_cython__(self, __pyx_state):
  77773. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  77774. */
  77775. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__124, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 4, __pyx_L1_error)
  77776. __Pyx_GOTREF(__pyx_t_1);
  77777. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  77778. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  77779. __PYX_ERR(9, 4, __pyx_L1_error)
  77780. /* "(tree fragment)":3
  77781. * def __reduce_cython__(self):
  77782. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  77783. * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
  77784. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  77785. */
  77786. /* function exit code */
  77787. __pyx_L1_error:;
  77788. __Pyx_XDECREF(__pyx_t_1);
  77789. __Pyx_AddTraceback("uvloop.loop.UVBaseTransport.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  77790. __pyx_r = NULL;
  77791. __Pyx_XGIVEREF(__pyx_r);
  77792. __Pyx_RefNannyFinishContext();
  77793. return __pyx_r;
  77794. }
  77795. /* "uvloop/handles/stream.pyx":29
  77796. * bint closed
  77797. *
  77798. * cdef free_bufs(self): # <<<<<<<<<<<<<<
  77799. * cdef size_t i
  77800. *
  77801. */
  77802. static PyObject *__pyx_f_6uvloop_4loop_19_StreamWriteContext_free_bufs(struct __pyx_obj_6uvloop_4loop__StreamWriteContext *__pyx_v_self) {
  77803. size_t __pyx_v_i;
  77804. PyObject *__pyx_r = NULL;
  77805. __Pyx_RefNannyDeclarations
  77806. int __pyx_t_1;
  77807. PyObject *__pyx_t_2 = NULL;
  77808. size_t __pyx_t_3;
  77809. __Pyx_RefNannySetupContext("free_bufs", 0);
  77810. /* "uvloop/handles/stream.pyx":32
  77811. * cdef size_t i
  77812. *
  77813. * if self.uv_bufs is not NULL: # <<<<<<<<<<<<<<
  77814. * PyMem_RawFree(self.uv_bufs)
  77815. * self.uv_bufs = NULL
  77816. */
  77817. __pyx_t_1 = ((__pyx_v_self->uv_bufs != NULL) != 0);
  77818. if (__pyx_t_1) {
  77819. /* "uvloop/handles/stream.pyx":33
  77820. *
  77821. * if self.uv_bufs is not NULL:
  77822. * PyMem_RawFree(self.uv_bufs) # <<<<<<<<<<<<<<
  77823. * self.uv_bufs = NULL
  77824. * if UVLOOP_DEBUG:
  77825. */
  77826. PyMem_RawFree(__pyx_v_self->uv_bufs);
  77827. /* "uvloop/handles/stream.pyx":34
  77828. * if self.uv_bufs is not NULL:
  77829. * PyMem_RawFree(self.uv_bufs)
  77830. * self.uv_bufs = NULL # <<<<<<<<<<<<<<
  77831. * if UVLOOP_DEBUG:
  77832. * if self.py_bufs_sml_inuse:
  77833. */
  77834. __pyx_v_self->uv_bufs = NULL;
  77835. /* "uvloop/handles/stream.pyx":35
  77836. * PyMem_RawFree(self.uv_bufs)
  77837. * self.uv_bufs = NULL
  77838. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  77839. * if self.py_bufs_sml_inuse:
  77840. * raise RuntimeError(
  77841. */
  77842. __pyx_t_1 = (UVLOOP_DEBUG != 0);
  77843. if (__pyx_t_1) {
  77844. /* "uvloop/handles/stream.pyx":36
  77845. * self.uv_bufs = NULL
  77846. * if UVLOOP_DEBUG:
  77847. * if self.py_bufs_sml_inuse: # <<<<<<<<<<<<<<
  77848. * raise RuntimeError(
  77849. * '_StreamWriteContext.close: uv_bufs != NULL and '
  77850. */
  77851. __pyx_t_1 = (__pyx_v_self->py_bufs_sml_inuse != 0);
  77852. if (unlikely(__pyx_t_1)) {
  77853. /* "uvloop/handles/stream.pyx":37
  77854. * if UVLOOP_DEBUG:
  77855. * if self.py_bufs_sml_inuse:
  77856. * raise RuntimeError( # <<<<<<<<<<<<<<
  77857. * '_StreamWriteContext.close: uv_bufs != NULL and '
  77858. * 'py_bufs_sml_inuse is True')
  77859. */
  77860. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__125, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 37, __pyx_L1_error)
  77861. __Pyx_GOTREF(__pyx_t_2);
  77862. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  77863. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  77864. __PYX_ERR(18, 37, __pyx_L1_error)
  77865. /* "uvloop/handles/stream.pyx":36
  77866. * self.uv_bufs = NULL
  77867. * if UVLOOP_DEBUG:
  77868. * if self.py_bufs_sml_inuse: # <<<<<<<<<<<<<<
  77869. * raise RuntimeError(
  77870. * '_StreamWriteContext.close: uv_bufs != NULL and '
  77871. */
  77872. }
  77873. /* "uvloop/handles/stream.pyx":35
  77874. * PyMem_RawFree(self.uv_bufs)
  77875. * self.uv_bufs = NULL
  77876. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  77877. * if self.py_bufs_sml_inuse:
  77878. * raise RuntimeError(
  77879. */
  77880. }
  77881. /* "uvloop/handles/stream.pyx":32
  77882. * cdef size_t i
  77883. *
  77884. * if self.uv_bufs is not NULL: # <<<<<<<<<<<<<<
  77885. * PyMem_RawFree(self.uv_bufs)
  77886. * self.uv_bufs = NULL
  77887. */
  77888. }
  77889. /* "uvloop/handles/stream.pyx":41
  77890. * 'py_bufs_sml_inuse is True')
  77891. *
  77892. * if self.py_bufs is not NULL: # <<<<<<<<<<<<<<
  77893. * for i from 0 <= i < self.py_bufs_len:
  77894. * PyBuffer_Release(&self.py_bufs[i])
  77895. */
  77896. __pyx_t_1 = ((__pyx_v_self->py_bufs != NULL) != 0);
  77897. if (__pyx_t_1) {
  77898. /* "uvloop/handles/stream.pyx":42
  77899. *
  77900. * if self.py_bufs is not NULL:
  77901. * for i from 0 <= i < self.py_bufs_len: # <<<<<<<<<<<<<<
  77902. * PyBuffer_Release(&self.py_bufs[i])
  77903. * PyMem_RawFree(self.py_bufs)
  77904. */
  77905. __pyx_t_3 = __pyx_v_self->py_bufs_len;
  77906. for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_3; __pyx_v_i++) {
  77907. /* "uvloop/handles/stream.pyx":43
  77908. * if self.py_bufs is not NULL:
  77909. * for i from 0 <= i < self.py_bufs_len:
  77910. * PyBuffer_Release(&self.py_bufs[i]) # <<<<<<<<<<<<<<
  77911. * PyMem_RawFree(self.py_bufs)
  77912. * self.py_bufs = NULL
  77913. */
  77914. PyBuffer_Release((&(__pyx_v_self->py_bufs[__pyx_v_i])));
  77915. }
  77916. /* "uvloop/handles/stream.pyx":44
  77917. * for i from 0 <= i < self.py_bufs_len:
  77918. * PyBuffer_Release(&self.py_bufs[i])
  77919. * PyMem_RawFree(self.py_bufs) # <<<<<<<<<<<<<<
  77920. * self.py_bufs = NULL
  77921. * if UVLOOP_DEBUG:
  77922. */
  77923. PyMem_RawFree(__pyx_v_self->py_bufs);
  77924. /* "uvloop/handles/stream.pyx":45
  77925. * PyBuffer_Release(&self.py_bufs[i])
  77926. * PyMem_RawFree(self.py_bufs)
  77927. * self.py_bufs = NULL # <<<<<<<<<<<<<<
  77928. * if UVLOOP_DEBUG:
  77929. * if self.py_bufs_sml_inuse:
  77930. */
  77931. __pyx_v_self->py_bufs = NULL;
  77932. /* "uvloop/handles/stream.pyx":46
  77933. * PyMem_RawFree(self.py_bufs)
  77934. * self.py_bufs = NULL
  77935. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  77936. * if self.py_bufs_sml_inuse:
  77937. * raise RuntimeError(
  77938. */
  77939. __pyx_t_1 = (UVLOOP_DEBUG != 0);
  77940. if (__pyx_t_1) {
  77941. /* "uvloop/handles/stream.pyx":47
  77942. * self.py_bufs = NULL
  77943. * if UVLOOP_DEBUG:
  77944. * if self.py_bufs_sml_inuse: # <<<<<<<<<<<<<<
  77945. * raise RuntimeError(
  77946. * '_StreamWriteContext.close: py_bufs != NULL and '
  77947. */
  77948. __pyx_t_1 = (__pyx_v_self->py_bufs_sml_inuse != 0);
  77949. if (unlikely(__pyx_t_1)) {
  77950. /* "uvloop/handles/stream.pyx":48
  77951. * if UVLOOP_DEBUG:
  77952. * if self.py_bufs_sml_inuse:
  77953. * raise RuntimeError( # <<<<<<<<<<<<<<
  77954. * '_StreamWriteContext.close: py_bufs != NULL and '
  77955. * 'py_bufs_sml_inuse is True')
  77956. */
  77957. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__126, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 48, __pyx_L1_error)
  77958. __Pyx_GOTREF(__pyx_t_2);
  77959. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  77960. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  77961. __PYX_ERR(18, 48, __pyx_L1_error)
  77962. /* "uvloop/handles/stream.pyx":47
  77963. * self.py_bufs = NULL
  77964. * if UVLOOP_DEBUG:
  77965. * if self.py_bufs_sml_inuse: # <<<<<<<<<<<<<<
  77966. * raise RuntimeError(
  77967. * '_StreamWriteContext.close: py_bufs != NULL and '
  77968. */
  77969. }
  77970. /* "uvloop/handles/stream.pyx":46
  77971. * PyMem_RawFree(self.py_bufs)
  77972. * self.py_bufs = NULL
  77973. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  77974. * if self.py_bufs_sml_inuse:
  77975. * raise RuntimeError(
  77976. */
  77977. }
  77978. /* "uvloop/handles/stream.pyx":41
  77979. * 'py_bufs_sml_inuse is True')
  77980. *
  77981. * if self.py_bufs is not NULL: # <<<<<<<<<<<<<<
  77982. * for i from 0 <= i < self.py_bufs_len:
  77983. * PyBuffer_Release(&self.py_bufs[i])
  77984. */
  77985. }
  77986. /* "uvloop/handles/stream.pyx":52
  77987. * 'py_bufs_sml_inuse is True')
  77988. *
  77989. * if self.py_bufs_sml_inuse: # <<<<<<<<<<<<<<
  77990. * for i from 0 <= i < self.py_bufs_len:
  77991. * PyBuffer_Release(&self.py_bufs_sml[i])
  77992. */
  77993. __pyx_t_1 = (__pyx_v_self->py_bufs_sml_inuse != 0);
  77994. if (__pyx_t_1) {
  77995. /* "uvloop/handles/stream.pyx":53
  77996. *
  77997. * if self.py_bufs_sml_inuse:
  77998. * for i from 0 <= i < self.py_bufs_len: # <<<<<<<<<<<<<<
  77999. * PyBuffer_Release(&self.py_bufs_sml[i])
  78000. * self.py_bufs_sml_inuse = 0
  78001. */
  78002. __pyx_t_3 = __pyx_v_self->py_bufs_len;
  78003. for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_3; __pyx_v_i++) {
  78004. /* "uvloop/handles/stream.pyx":54
  78005. * if self.py_bufs_sml_inuse:
  78006. * for i from 0 <= i < self.py_bufs_len:
  78007. * PyBuffer_Release(&self.py_bufs_sml[i]) # <<<<<<<<<<<<<<
  78008. * self.py_bufs_sml_inuse = 0
  78009. *
  78010. */
  78011. PyBuffer_Release((&(__pyx_v_self->py_bufs_sml[__pyx_v_i])));
  78012. }
  78013. /* "uvloop/handles/stream.pyx":55
  78014. * for i from 0 <= i < self.py_bufs_len:
  78015. * PyBuffer_Release(&self.py_bufs_sml[i])
  78016. * self.py_bufs_sml_inuse = 0 # <<<<<<<<<<<<<<
  78017. *
  78018. * self.py_bufs_len = 0
  78019. */
  78020. __pyx_v_self->py_bufs_sml_inuse = 0;
  78021. /* "uvloop/handles/stream.pyx":52
  78022. * 'py_bufs_sml_inuse is True')
  78023. *
  78024. * if self.py_bufs_sml_inuse: # <<<<<<<<<<<<<<
  78025. * for i from 0 <= i < self.py_bufs_len:
  78026. * PyBuffer_Release(&self.py_bufs_sml[i])
  78027. */
  78028. }
  78029. /* "uvloop/handles/stream.pyx":57
  78030. * self.py_bufs_sml_inuse = 0
  78031. *
  78032. * self.py_bufs_len = 0 # <<<<<<<<<<<<<<
  78033. * self.buffers = None
  78034. *
  78035. */
  78036. __pyx_v_self->py_bufs_len = 0;
  78037. /* "uvloop/handles/stream.pyx":58
  78038. *
  78039. * self.py_bufs_len = 0
  78040. * self.buffers = None # <<<<<<<<<<<<<<
  78041. *
  78042. * cdef close(self):
  78043. */
  78044. __Pyx_INCREF(Py_None);
  78045. __Pyx_GIVEREF(Py_None);
  78046. __Pyx_GOTREF(__pyx_v_self->buffers);
  78047. __Pyx_DECREF(__pyx_v_self->buffers);
  78048. __pyx_v_self->buffers = ((PyObject*)Py_None);
  78049. /* "uvloop/handles/stream.pyx":29
  78050. * bint closed
  78051. *
  78052. * cdef free_bufs(self): # <<<<<<<<<<<<<<
  78053. * cdef size_t i
  78054. *
  78055. */
  78056. /* function exit code */
  78057. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  78058. goto __pyx_L0;
  78059. __pyx_L1_error:;
  78060. __Pyx_XDECREF(__pyx_t_2);
  78061. __Pyx_AddTraceback("uvloop.loop._StreamWriteContext.free_bufs", __pyx_clineno, __pyx_lineno, __pyx_filename);
  78062. __pyx_r = 0;
  78063. __pyx_L0:;
  78064. __Pyx_XGIVEREF(__pyx_r);
  78065. __Pyx_RefNannyFinishContext();
  78066. return __pyx_r;
  78067. }
  78068. /* "uvloop/handles/stream.pyx":60
  78069. * self.buffers = None
  78070. *
  78071. * cdef close(self): # <<<<<<<<<<<<<<
  78072. * if self.closed:
  78073. * return
  78074. */
  78075. static PyObject *__pyx_f_6uvloop_4loop_19_StreamWriteContext_close(struct __pyx_obj_6uvloop_4loop__StreamWriteContext *__pyx_v_self) {
  78076. PyObject *__pyx_r = NULL;
  78077. __Pyx_RefNannyDeclarations
  78078. int __pyx_t_1;
  78079. PyObject *__pyx_t_2 = NULL;
  78080. __Pyx_RefNannySetupContext("close", 0);
  78081. /* "uvloop/handles/stream.pyx":61
  78082. *
  78083. * cdef close(self):
  78084. * if self.closed: # <<<<<<<<<<<<<<
  78085. * return
  78086. * self.closed = 1
  78087. */
  78088. __pyx_t_1 = (__pyx_v_self->closed != 0);
  78089. if (__pyx_t_1) {
  78090. /* "uvloop/handles/stream.pyx":62
  78091. * cdef close(self):
  78092. * if self.closed:
  78093. * return # <<<<<<<<<<<<<<
  78094. * self.closed = 1
  78095. * self.free_bufs()
  78096. */
  78097. __Pyx_XDECREF(__pyx_r);
  78098. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  78099. goto __pyx_L0;
  78100. /* "uvloop/handles/stream.pyx":61
  78101. *
  78102. * cdef close(self):
  78103. * if self.closed: # <<<<<<<<<<<<<<
  78104. * return
  78105. * self.closed = 1
  78106. */
  78107. }
  78108. /* "uvloop/handles/stream.pyx":63
  78109. * if self.closed:
  78110. * return
  78111. * self.closed = 1 # <<<<<<<<<<<<<<
  78112. * self.free_bufs()
  78113. * Py_DECREF(self)
  78114. */
  78115. __pyx_v_self->closed = 1;
  78116. /* "uvloop/handles/stream.pyx":64
  78117. * return
  78118. * self.closed = 1
  78119. * self.free_bufs() # <<<<<<<<<<<<<<
  78120. * Py_DECREF(self)
  78121. *
  78122. */
  78123. __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop__StreamWriteContext *)__pyx_v_self->__pyx_vtab)->free_bufs(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 64, __pyx_L1_error)
  78124. __Pyx_GOTREF(__pyx_t_2);
  78125. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  78126. /* "uvloop/handles/stream.pyx":65
  78127. * self.closed = 1
  78128. * self.free_bufs()
  78129. * Py_DECREF(self) # <<<<<<<<<<<<<<
  78130. *
  78131. * cdef advance_uv_buf(self, size_t sent):
  78132. */
  78133. Py_DECREF(((PyObject *)__pyx_v_self));
  78134. /* "uvloop/handles/stream.pyx":60
  78135. * self.buffers = None
  78136. *
  78137. * cdef close(self): # <<<<<<<<<<<<<<
  78138. * if self.closed:
  78139. * return
  78140. */
  78141. /* function exit code */
  78142. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  78143. goto __pyx_L0;
  78144. __pyx_L1_error:;
  78145. __Pyx_XDECREF(__pyx_t_2);
  78146. __Pyx_AddTraceback("uvloop.loop._StreamWriteContext.close", __pyx_clineno, __pyx_lineno, __pyx_filename);
  78147. __pyx_r = 0;
  78148. __pyx_L0:;
  78149. __Pyx_XGIVEREF(__pyx_r);
  78150. __Pyx_RefNannyFinishContext();
  78151. return __pyx_r;
  78152. }
  78153. /* "uvloop/handles/stream.pyx":67
  78154. * Py_DECREF(self)
  78155. *
  78156. * cdef advance_uv_buf(self, size_t sent): # <<<<<<<<<<<<<<
  78157. * # Advance the pointer to first uv_buf and the
  78158. * # pointer to first byte in that buffer.
  78159. */
  78160. static PyObject *__pyx_f_6uvloop_4loop_19_StreamWriteContext_advance_uv_buf(struct __pyx_obj_6uvloop_4loop__StreamWriteContext *__pyx_v_self, size_t __pyx_v_sent) {
  78161. uv_buf_t *__pyx_v_buf;
  78162. size_t __pyx_v_idx;
  78163. PyObject *__pyx_r = NULL;
  78164. __Pyx_RefNannyDeclarations
  78165. size_t __pyx_t_1;
  78166. int __pyx_t_2;
  78167. PyObject *__pyx_t_3 = NULL;
  78168. __Pyx_RefNannySetupContext("advance_uv_buf", 0);
  78169. /* "uvloop/handles/stream.pyx":80
  78170. * size_t idx
  78171. *
  78172. * for idx from 0 <= idx < self.uv_bufs_len: # <<<<<<<<<<<<<<
  78173. * buf = &self.uv_bufs_start[idx]
  78174. * if buf.len > sent:
  78175. */
  78176. __pyx_t_1 = __pyx_v_self->uv_bufs_len;
  78177. for (__pyx_v_idx = 0; __pyx_v_idx < __pyx_t_1; __pyx_v_idx++) {
  78178. /* "uvloop/handles/stream.pyx":81
  78179. *
  78180. * for idx from 0 <= idx < self.uv_bufs_len:
  78181. * buf = &self.uv_bufs_start[idx] # <<<<<<<<<<<<<<
  78182. * if buf.len > sent:
  78183. * buf.len -= sent
  78184. */
  78185. __pyx_v_buf = (&(__pyx_v_self->uv_bufs_start[__pyx_v_idx]));
  78186. /* "uvloop/handles/stream.pyx":82
  78187. * for idx from 0 <= idx < self.uv_bufs_len:
  78188. * buf = &self.uv_bufs_start[idx]
  78189. * if buf.len > sent: # <<<<<<<<<<<<<<
  78190. * buf.len -= sent
  78191. * buf.base = buf.base + sent
  78192. */
  78193. __pyx_t_2 = ((__pyx_v_buf->len > __pyx_v_sent) != 0);
  78194. if (__pyx_t_2) {
  78195. /* "uvloop/handles/stream.pyx":83
  78196. * buf = &self.uv_bufs_start[idx]
  78197. * if buf.len > sent:
  78198. * buf.len -= sent # <<<<<<<<<<<<<<
  78199. * buf.base = buf.base + sent
  78200. * self.uv_bufs_start = buf
  78201. */
  78202. __pyx_v_buf->len = (__pyx_v_buf->len - __pyx_v_sent);
  78203. /* "uvloop/handles/stream.pyx":84
  78204. * if buf.len > sent:
  78205. * buf.len -= sent
  78206. * buf.base = buf.base + sent # <<<<<<<<<<<<<<
  78207. * self.uv_bufs_start = buf
  78208. * self.uv_bufs_len -= idx
  78209. */
  78210. __pyx_v_buf->base = (__pyx_v_buf->base + __pyx_v_sent);
  78211. /* "uvloop/handles/stream.pyx":85
  78212. * buf.len -= sent
  78213. * buf.base = buf.base + sent
  78214. * self.uv_bufs_start = buf # <<<<<<<<<<<<<<
  78215. * self.uv_bufs_len -= idx
  78216. * return
  78217. */
  78218. __pyx_v_self->uv_bufs_start = __pyx_v_buf;
  78219. /* "uvloop/handles/stream.pyx":86
  78220. * buf.base = buf.base + sent
  78221. * self.uv_bufs_start = buf
  78222. * self.uv_bufs_len -= idx # <<<<<<<<<<<<<<
  78223. * return
  78224. * else:
  78225. */
  78226. __pyx_v_self->uv_bufs_len = (__pyx_v_self->uv_bufs_len - __pyx_v_idx);
  78227. /* "uvloop/handles/stream.pyx":87
  78228. * self.uv_bufs_start = buf
  78229. * self.uv_bufs_len -= idx
  78230. * return # <<<<<<<<<<<<<<
  78231. * else:
  78232. * sent -= self.uv_bufs_start[idx].len
  78233. */
  78234. __Pyx_XDECREF(__pyx_r);
  78235. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  78236. goto __pyx_L0;
  78237. /* "uvloop/handles/stream.pyx":82
  78238. * for idx from 0 <= idx < self.uv_bufs_len:
  78239. * buf = &self.uv_bufs_start[idx]
  78240. * if buf.len > sent: # <<<<<<<<<<<<<<
  78241. * buf.len -= sent
  78242. * buf.base = buf.base + sent
  78243. */
  78244. }
  78245. /* "uvloop/handles/stream.pyx":89
  78246. * return
  78247. * else:
  78248. * sent -= self.uv_bufs_start[idx].len # <<<<<<<<<<<<<<
  78249. *
  78250. * if UVLOOP_DEBUG:
  78251. */
  78252. /*else*/ {
  78253. __pyx_v_sent = (__pyx_v_sent - (__pyx_v_self->uv_bufs_start[__pyx_v_idx]).len);
  78254. }
  78255. /* "uvloop/handles/stream.pyx":91
  78256. * sent -= self.uv_bufs_start[idx].len
  78257. *
  78258. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  78259. * if sent < 0:
  78260. * raise RuntimeError('fatal: sent < 0 in advance_uv_buf')
  78261. */
  78262. __pyx_t_2 = (UVLOOP_DEBUG != 0);
  78263. if (__pyx_t_2) {
  78264. /* "uvloop/handles/stream.pyx":92
  78265. *
  78266. * if UVLOOP_DEBUG:
  78267. * if sent < 0: # <<<<<<<<<<<<<<
  78268. * raise RuntimeError('fatal: sent < 0 in advance_uv_buf')
  78269. *
  78270. */
  78271. __pyx_t_2 = ((__pyx_v_sent < 0) != 0);
  78272. if (unlikely(__pyx_t_2)) {
  78273. /* "uvloop/handles/stream.pyx":93
  78274. * if UVLOOP_DEBUG:
  78275. * if sent < 0:
  78276. * raise RuntimeError('fatal: sent < 0 in advance_uv_buf') # <<<<<<<<<<<<<<
  78277. *
  78278. * raise RuntimeError('fatal: Could not advance _StreamWriteContext')
  78279. */
  78280. __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__127, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(18, 93, __pyx_L1_error)
  78281. __Pyx_GOTREF(__pyx_t_3);
  78282. __Pyx_Raise(__pyx_t_3, 0, 0, 0);
  78283. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  78284. __PYX_ERR(18, 93, __pyx_L1_error)
  78285. /* "uvloop/handles/stream.pyx":92
  78286. *
  78287. * if UVLOOP_DEBUG:
  78288. * if sent < 0: # <<<<<<<<<<<<<<
  78289. * raise RuntimeError('fatal: sent < 0 in advance_uv_buf')
  78290. *
  78291. */
  78292. }
  78293. /* "uvloop/handles/stream.pyx":91
  78294. * sent -= self.uv_bufs_start[idx].len
  78295. *
  78296. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  78297. * if sent < 0:
  78298. * raise RuntimeError('fatal: sent < 0 in advance_uv_buf')
  78299. */
  78300. }
  78301. }
  78302. /* "uvloop/handles/stream.pyx":95
  78303. * raise RuntimeError('fatal: sent < 0 in advance_uv_buf')
  78304. *
  78305. * raise RuntimeError('fatal: Could not advance _StreamWriteContext') # <<<<<<<<<<<<<<
  78306. *
  78307. * @staticmethod
  78308. */
  78309. __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__128, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(18, 95, __pyx_L1_error)
  78310. __Pyx_GOTREF(__pyx_t_3);
  78311. __Pyx_Raise(__pyx_t_3, 0, 0, 0);
  78312. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  78313. __PYX_ERR(18, 95, __pyx_L1_error)
  78314. /* "uvloop/handles/stream.pyx":67
  78315. * Py_DECREF(self)
  78316. *
  78317. * cdef advance_uv_buf(self, size_t sent): # <<<<<<<<<<<<<<
  78318. * # Advance the pointer to first uv_buf and the
  78319. * # pointer to first byte in that buffer.
  78320. */
  78321. /* function exit code */
  78322. __pyx_L1_error:;
  78323. __Pyx_XDECREF(__pyx_t_3);
  78324. __Pyx_AddTraceback("uvloop.loop._StreamWriteContext.advance_uv_buf", __pyx_clineno, __pyx_lineno, __pyx_filename);
  78325. __pyx_r = 0;
  78326. __pyx_L0:;
  78327. __Pyx_XGIVEREF(__pyx_r);
  78328. __Pyx_RefNannyFinishContext();
  78329. return __pyx_r;
  78330. }
  78331. /* "uvloop/handles/stream.pyx":98
  78332. *
  78333. * @staticmethod
  78334. * cdef _StreamWriteContext new(UVStream stream, list buffers): # <<<<<<<<<<<<<<
  78335. * cdef:
  78336. * _StreamWriteContext ctx
  78337. */
  78338. static struct __pyx_obj_6uvloop_4loop__StreamWriteContext *__pyx_f_6uvloop_4loop_19_StreamWriteContext_new(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_stream, PyObject *__pyx_v_buffers) {
  78339. struct __pyx_obj_6uvloop_4loop__StreamWriteContext *__pyx_v_ctx = 0;
  78340. int __pyx_v_uv_bufs_idx;
  78341. size_t __pyx_v_py_bufs_len;
  78342. Py_buffer *__pyx_v_p_pybufs;
  78343. uv_buf_t *__pyx_v_p_uvbufs;
  78344. PyObject *__pyx_v_buf = NULL;
  78345. struct __pyx_obj_6uvloop_4loop__StreamWriteContext *__pyx_r = NULL;
  78346. __Pyx_RefNannyDeclarations
  78347. PyObject *__pyx_t_1 = NULL;
  78348. Py_ssize_t __pyx_t_2;
  78349. int __pyx_t_3;
  78350. PyObject *__pyx_t_4 = NULL;
  78351. int __pyx_t_5;
  78352. int __pyx_t_6;
  78353. PyObject *__pyx_t_7 = NULL;
  78354. PyObject *__pyx_t_8 = NULL;
  78355. Py_buffer *__pyx_t_9;
  78356. uv_buf_t *__pyx_t_10;
  78357. PyObject *__pyx_t_11 = NULL;
  78358. PyObject *__pyx_t_12 = NULL;
  78359. PyObject *__pyx_t_13 = NULL;
  78360. int __pyx_t_14;
  78361. PyObject *__pyx_t_15 = NULL;
  78362. Py_ssize_t __pyx_t_16;
  78363. struct __pyx_obj_6uvloop_4loop_Loop *__pyx_t_17 = NULL;
  78364. __Pyx_RefNannySetupContext("new", 0);
  78365. /* "uvloop/handles/stream.pyx":101
  78366. * cdef:
  78367. * _StreamWriteContext ctx
  78368. * int uv_bufs_idx = 0 # <<<<<<<<<<<<<<
  78369. * size_t py_bufs_len = 0
  78370. * int i
  78371. */
  78372. __pyx_v_uv_bufs_idx = 0;
  78373. /* "uvloop/handles/stream.pyx":102
  78374. * _StreamWriteContext ctx
  78375. * int uv_bufs_idx = 0
  78376. * size_t py_bufs_len = 0 # <<<<<<<<<<<<<<
  78377. * int i
  78378. *
  78379. */
  78380. __pyx_v_py_bufs_len = 0;
  78381. /* "uvloop/handles/stream.pyx":108
  78382. * uv.uv_buf_t* p_uvbufs
  78383. *
  78384. * ctx = _StreamWriteContext.__new__(_StreamWriteContext) # <<<<<<<<<<<<<<
  78385. * ctx.stream = None
  78386. * ctx.closed = 1
  78387. */
  78388. __pyx_t_1 = ((PyObject *)__pyx_tp_new_6uvloop_4loop__StreamWriteContext(((PyTypeObject *)__pyx_ptype_6uvloop_4loop__StreamWriteContext), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 108, __pyx_L1_error)
  78389. __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  78390. __pyx_v_ctx = ((struct __pyx_obj_6uvloop_4loop__StreamWriteContext *)__pyx_t_1);
  78391. __pyx_t_1 = 0;
  78392. /* "uvloop/handles/stream.pyx":109
  78393. *
  78394. * ctx = _StreamWriteContext.__new__(_StreamWriteContext)
  78395. * ctx.stream = None # <<<<<<<<<<<<<<
  78396. * ctx.closed = 1
  78397. * ctx.py_bufs_len = 0
  78398. */
  78399. __Pyx_INCREF(Py_None);
  78400. __Pyx_GIVEREF(Py_None);
  78401. __Pyx_GOTREF(__pyx_v_ctx->stream);
  78402. __Pyx_DECREF(((PyObject *)__pyx_v_ctx->stream));
  78403. __pyx_v_ctx->stream = ((struct __pyx_obj_6uvloop_4loop_UVStream *)Py_None);
  78404. /* "uvloop/handles/stream.pyx":110
  78405. * ctx = _StreamWriteContext.__new__(_StreamWriteContext)
  78406. * ctx.stream = None
  78407. * ctx.closed = 1 # <<<<<<<<<<<<<<
  78408. * ctx.py_bufs_len = 0
  78409. * ctx.py_bufs_sml_inuse = 0
  78410. */
  78411. __pyx_v_ctx->closed = 1;
  78412. /* "uvloop/handles/stream.pyx":111
  78413. * ctx.stream = None
  78414. * ctx.closed = 1
  78415. * ctx.py_bufs_len = 0 # <<<<<<<<<<<<<<
  78416. * ctx.py_bufs_sml_inuse = 0
  78417. * ctx.uv_bufs = NULL
  78418. */
  78419. __pyx_v_ctx->py_bufs_len = 0;
  78420. /* "uvloop/handles/stream.pyx":112
  78421. * ctx.closed = 1
  78422. * ctx.py_bufs_len = 0
  78423. * ctx.py_bufs_sml_inuse = 0 # <<<<<<<<<<<<<<
  78424. * ctx.uv_bufs = NULL
  78425. * ctx.py_bufs = NULL
  78426. */
  78427. __pyx_v_ctx->py_bufs_sml_inuse = 0;
  78428. /* "uvloop/handles/stream.pyx":113
  78429. * ctx.py_bufs_len = 0
  78430. * ctx.py_bufs_sml_inuse = 0
  78431. * ctx.uv_bufs = NULL # <<<<<<<<<<<<<<
  78432. * ctx.py_bufs = NULL
  78433. * ctx.buffers = buffers
  78434. */
  78435. __pyx_v_ctx->uv_bufs = NULL;
  78436. /* "uvloop/handles/stream.pyx":114
  78437. * ctx.py_bufs_sml_inuse = 0
  78438. * ctx.uv_bufs = NULL
  78439. * ctx.py_bufs = NULL # <<<<<<<<<<<<<<
  78440. * ctx.buffers = buffers
  78441. * ctx.stream = stream
  78442. */
  78443. __pyx_v_ctx->py_bufs = NULL;
  78444. /* "uvloop/handles/stream.pyx":115
  78445. * ctx.uv_bufs = NULL
  78446. * ctx.py_bufs = NULL
  78447. * ctx.buffers = buffers # <<<<<<<<<<<<<<
  78448. * ctx.stream = stream
  78449. *
  78450. */
  78451. __Pyx_INCREF(__pyx_v_buffers);
  78452. __Pyx_GIVEREF(__pyx_v_buffers);
  78453. __Pyx_GOTREF(__pyx_v_ctx->buffers);
  78454. __Pyx_DECREF(__pyx_v_ctx->buffers);
  78455. __pyx_v_ctx->buffers = __pyx_v_buffers;
  78456. /* "uvloop/handles/stream.pyx":116
  78457. * ctx.py_bufs = NULL
  78458. * ctx.buffers = buffers
  78459. * ctx.stream = stream # <<<<<<<<<<<<<<
  78460. *
  78461. * if len(buffers) <= __PREALLOCED_BUFS:
  78462. */
  78463. __Pyx_INCREF(((PyObject *)__pyx_v_stream));
  78464. __Pyx_GIVEREF(((PyObject *)__pyx_v_stream));
  78465. __Pyx_GOTREF(__pyx_v_ctx->stream);
  78466. __Pyx_DECREF(((PyObject *)__pyx_v_ctx->stream));
  78467. __pyx_v_ctx->stream = __pyx_v_stream;
  78468. /* "uvloop/handles/stream.pyx":118
  78469. * ctx.stream = stream
  78470. *
  78471. * if len(buffers) <= __PREALLOCED_BUFS: # <<<<<<<<<<<<<<
  78472. * # We've got a small number of buffers to write, don't
  78473. * # need to use malloc.
  78474. */
  78475. if (unlikely(__pyx_v_buffers == Py_None)) {
  78476. PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
  78477. __PYX_ERR(18, 118, __pyx_L1_error)
  78478. }
  78479. __pyx_t_2 = PyList_GET_SIZE(__pyx_v_buffers); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(18, 118, __pyx_L1_error)
  78480. __pyx_t_3 = ((__pyx_t_2 <= 4) != 0);
  78481. if (__pyx_t_3) {
  78482. /* "uvloop/handles/stream.pyx":121
  78483. * # We've got a small number of buffers to write, don't
  78484. * # need to use malloc.
  78485. * ctx.py_bufs_sml_inuse = 1 # <<<<<<<<<<<<<<
  78486. * p_pybufs = <Py_buffer*>&ctx.py_bufs_sml
  78487. * p_uvbufs = <uv.uv_buf_t*>&ctx.uv_bufs_sml
  78488. */
  78489. __pyx_v_ctx->py_bufs_sml_inuse = 1;
  78490. /* "uvloop/handles/stream.pyx":122
  78491. * # need to use malloc.
  78492. * ctx.py_bufs_sml_inuse = 1
  78493. * p_pybufs = <Py_buffer*>&ctx.py_bufs_sml # <<<<<<<<<<<<<<
  78494. * p_uvbufs = <uv.uv_buf_t*>&ctx.uv_bufs_sml
  78495. *
  78496. */
  78497. __pyx_v_p_pybufs = ((Py_buffer *)(&__pyx_v_ctx->py_bufs_sml));
  78498. /* "uvloop/handles/stream.pyx":123
  78499. * ctx.py_bufs_sml_inuse = 1
  78500. * p_pybufs = <Py_buffer*>&ctx.py_bufs_sml
  78501. * p_uvbufs = <uv.uv_buf_t*>&ctx.uv_bufs_sml # <<<<<<<<<<<<<<
  78502. *
  78503. * else:
  78504. */
  78505. __pyx_v_p_uvbufs = ((uv_buf_t *)(&__pyx_v_ctx->uv_bufs_sml));
  78506. /* "uvloop/handles/stream.pyx":118
  78507. * ctx.stream = stream
  78508. *
  78509. * if len(buffers) <= __PREALLOCED_BUFS: # <<<<<<<<<<<<<<
  78510. * # We've got a small number of buffers to write, don't
  78511. * # need to use malloc.
  78512. */
  78513. goto __pyx_L3;
  78514. }
  78515. /* "uvloop/handles/stream.pyx":126
  78516. *
  78517. * else:
  78518. * for buf in buffers: # <<<<<<<<<<<<<<
  78519. * if UVLOOP_DEBUG:
  78520. * if not isinstance(buf, (bytes, bytearray, memoryview)):
  78521. */
  78522. /*else*/ {
  78523. if (unlikely(__pyx_v_buffers == Py_None)) {
  78524. PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
  78525. __PYX_ERR(18, 126, __pyx_L1_error)
  78526. }
  78527. __pyx_t_1 = __pyx_v_buffers; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
  78528. for (;;) {
  78529. if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
  78530. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  78531. __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(18, 126, __pyx_L1_error)
  78532. #else
  78533. __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(18, 126, __pyx_L1_error)
  78534. __Pyx_GOTREF(__pyx_t_4);
  78535. #endif
  78536. __Pyx_XDECREF_SET(__pyx_v_buf, __pyx_t_4);
  78537. __pyx_t_4 = 0;
  78538. /* "uvloop/handles/stream.pyx":127
  78539. * else:
  78540. * for buf in buffers:
  78541. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  78542. * if not isinstance(buf, (bytes, bytearray, memoryview)):
  78543. * raise RuntimeError(
  78544. */
  78545. __pyx_t_3 = (UVLOOP_DEBUG != 0);
  78546. if (__pyx_t_3) {
  78547. /* "uvloop/handles/stream.pyx":128
  78548. * for buf in buffers:
  78549. * if UVLOOP_DEBUG:
  78550. * if not isinstance(buf, (bytes, bytearray, memoryview)): # <<<<<<<<<<<<<<
  78551. * raise RuntimeError(
  78552. * 'invalid data in writebuf: an instance of '
  78553. */
  78554. __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_memoryview); if (unlikely(!__pyx_t_4)) __PYX_ERR(18, 128, __pyx_L1_error)
  78555. __Pyx_GOTREF(__pyx_t_4);
  78556. __pyx_t_5 = PyBytes_Check(__pyx_v_buf);
  78557. __pyx_t_6 = (__pyx_t_5 != 0);
  78558. if (!__pyx_t_6) {
  78559. } else {
  78560. __pyx_t_3 = __pyx_t_6;
  78561. goto __pyx_L8_bool_binop_done;
  78562. }
  78563. __pyx_t_6 = PyByteArray_Check(__pyx_v_buf);
  78564. __pyx_t_5 = (__pyx_t_6 != 0);
  78565. if (!__pyx_t_5) {
  78566. } else {
  78567. __pyx_t_3 = __pyx_t_5;
  78568. goto __pyx_L8_bool_binop_done;
  78569. }
  78570. __pyx_t_5 = PyObject_IsInstance(__pyx_v_buf, __pyx_t_4);
  78571. __pyx_t_6 = (__pyx_t_5 != 0);
  78572. __pyx_t_3 = __pyx_t_6;
  78573. __pyx_L8_bool_binop_done:;
  78574. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  78575. __pyx_t_6 = ((!(__pyx_t_3 != 0)) != 0);
  78576. if (unlikely(__pyx_t_6)) {
  78577. /* "uvloop/handles/stream.pyx":132
  78578. * 'invalid data in writebuf: an instance of '
  78579. * 'bytes, bytearray or memoryview was expected, '
  78580. * 'got {}'.format(type(buf))) # <<<<<<<<<<<<<<
  78581. *
  78582. * if not PyBytes_CheckExact(buf):
  78583. */
  78584. __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_invalid_data_in_writebuf_an_inst, __pyx_n_s_format); if (unlikely(!__pyx_t_7)) __PYX_ERR(18, 132, __pyx_L1_error)
  78585. __Pyx_GOTREF(__pyx_t_7);
  78586. __pyx_t_8 = NULL;
  78587. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
  78588. __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
  78589. if (likely(__pyx_t_8)) {
  78590. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
  78591. __Pyx_INCREF(__pyx_t_8);
  78592. __Pyx_INCREF(function);
  78593. __Pyx_DECREF_SET(__pyx_t_7, function);
  78594. }
  78595. }
  78596. __pyx_t_4 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, ((PyObject *)Py_TYPE(__pyx_v_buf))) : __Pyx_PyObject_CallOneArg(__pyx_t_7, ((PyObject *)Py_TYPE(__pyx_v_buf)));
  78597. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  78598. if (unlikely(!__pyx_t_4)) __PYX_ERR(18, 132, __pyx_L1_error)
  78599. __Pyx_GOTREF(__pyx_t_4);
  78600. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  78601. /* "uvloop/handles/stream.pyx":129
  78602. * if UVLOOP_DEBUG:
  78603. * if not isinstance(buf, (bytes, bytearray, memoryview)):
  78604. * raise RuntimeError( # <<<<<<<<<<<<<<
  78605. * 'invalid data in writebuf: an instance of '
  78606. * 'bytes, bytearray or memoryview was expected, '
  78607. */
  78608. __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(18, 129, __pyx_L1_error)
  78609. __Pyx_GOTREF(__pyx_t_7);
  78610. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  78611. __Pyx_Raise(__pyx_t_7, 0, 0, 0);
  78612. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  78613. __PYX_ERR(18, 129, __pyx_L1_error)
  78614. /* "uvloop/handles/stream.pyx":128
  78615. * for buf in buffers:
  78616. * if UVLOOP_DEBUG:
  78617. * if not isinstance(buf, (bytes, bytearray, memoryview)): # <<<<<<<<<<<<<<
  78618. * raise RuntimeError(
  78619. * 'invalid data in writebuf: an instance of '
  78620. */
  78621. }
  78622. /* "uvloop/handles/stream.pyx":127
  78623. * else:
  78624. * for buf in buffers:
  78625. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  78626. * if not isinstance(buf, (bytes, bytearray, memoryview)):
  78627. * raise RuntimeError(
  78628. */
  78629. }
  78630. /* "uvloop/handles/stream.pyx":134
  78631. * 'got {}'.format(type(buf)))
  78632. *
  78633. * if not PyBytes_CheckExact(buf): # <<<<<<<<<<<<<<
  78634. * py_bufs_len += 1
  78635. *
  78636. */
  78637. __pyx_t_6 = ((!(PyBytes_CheckExact(__pyx_v_buf) != 0)) != 0);
  78638. if (__pyx_t_6) {
  78639. /* "uvloop/handles/stream.pyx":135
  78640. *
  78641. * if not PyBytes_CheckExact(buf):
  78642. * py_bufs_len += 1 # <<<<<<<<<<<<<<
  78643. *
  78644. * if py_bufs_len > 0:
  78645. */
  78646. __pyx_v_py_bufs_len = (__pyx_v_py_bufs_len + 1);
  78647. /* "uvloop/handles/stream.pyx":134
  78648. * 'got {}'.format(type(buf)))
  78649. *
  78650. * if not PyBytes_CheckExact(buf): # <<<<<<<<<<<<<<
  78651. * py_bufs_len += 1
  78652. *
  78653. */
  78654. }
  78655. /* "uvloop/handles/stream.pyx":126
  78656. *
  78657. * else:
  78658. * for buf in buffers: # <<<<<<<<<<<<<<
  78659. * if UVLOOP_DEBUG:
  78660. * if not isinstance(buf, (bytes, bytearray, memoryview)):
  78661. */
  78662. }
  78663. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  78664. /* "uvloop/handles/stream.pyx":137
  78665. * py_bufs_len += 1
  78666. *
  78667. * if py_bufs_len > 0: # <<<<<<<<<<<<<<
  78668. * ctx.py_bufs = <Py_buffer*>PyMem_RawMalloc(
  78669. * py_bufs_len * sizeof(Py_buffer))
  78670. */
  78671. __pyx_t_6 = ((__pyx_v_py_bufs_len > 0) != 0);
  78672. if (__pyx_t_6) {
  78673. /* "uvloop/handles/stream.pyx":138
  78674. *
  78675. * if py_bufs_len > 0:
  78676. * ctx.py_bufs = <Py_buffer*>PyMem_RawMalloc( # <<<<<<<<<<<<<<
  78677. * py_bufs_len * sizeof(Py_buffer))
  78678. * if ctx.py_bufs is NULL:
  78679. */
  78680. __pyx_v_ctx->py_bufs = ((Py_buffer *)PyMem_RawMalloc((__pyx_v_py_bufs_len * (sizeof(Py_buffer)))));
  78681. /* "uvloop/handles/stream.pyx":140
  78682. * ctx.py_bufs = <Py_buffer*>PyMem_RawMalloc(
  78683. * py_bufs_len * sizeof(Py_buffer))
  78684. * if ctx.py_bufs is NULL: # <<<<<<<<<<<<<<
  78685. * raise MemoryError()
  78686. *
  78687. */
  78688. __pyx_t_6 = ((__pyx_v_ctx->py_bufs == NULL) != 0);
  78689. if (unlikely(__pyx_t_6)) {
  78690. /* "uvloop/handles/stream.pyx":141
  78691. * py_bufs_len * sizeof(Py_buffer))
  78692. * if ctx.py_bufs is NULL:
  78693. * raise MemoryError() # <<<<<<<<<<<<<<
  78694. *
  78695. * ctx.uv_bufs = <uv.uv_buf_t*>PyMem_RawMalloc(
  78696. */
  78697. PyErr_NoMemory(); __PYX_ERR(18, 141, __pyx_L1_error)
  78698. /* "uvloop/handles/stream.pyx":140
  78699. * ctx.py_bufs = <Py_buffer*>PyMem_RawMalloc(
  78700. * py_bufs_len * sizeof(Py_buffer))
  78701. * if ctx.py_bufs is NULL: # <<<<<<<<<<<<<<
  78702. * raise MemoryError()
  78703. *
  78704. */
  78705. }
  78706. /* "uvloop/handles/stream.pyx":137
  78707. * py_bufs_len += 1
  78708. *
  78709. * if py_bufs_len > 0: # <<<<<<<<<<<<<<
  78710. * ctx.py_bufs = <Py_buffer*>PyMem_RawMalloc(
  78711. * py_bufs_len * sizeof(Py_buffer))
  78712. */
  78713. }
  78714. /* "uvloop/handles/stream.pyx":144
  78715. *
  78716. * ctx.uv_bufs = <uv.uv_buf_t*>PyMem_RawMalloc(
  78717. * len(buffers) * sizeof(uv.uv_buf_t)) # <<<<<<<<<<<<<<
  78718. * if ctx.uv_bufs is NULL:
  78719. * raise MemoryError()
  78720. */
  78721. if (unlikely(__pyx_v_buffers == Py_None)) {
  78722. PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
  78723. __PYX_ERR(18, 144, __pyx_L1_error)
  78724. }
  78725. __pyx_t_2 = PyList_GET_SIZE(__pyx_v_buffers); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(18, 144, __pyx_L1_error)
  78726. /* "uvloop/handles/stream.pyx":143
  78727. * raise MemoryError()
  78728. *
  78729. * ctx.uv_bufs = <uv.uv_buf_t*>PyMem_RawMalloc( # <<<<<<<<<<<<<<
  78730. * len(buffers) * sizeof(uv.uv_buf_t))
  78731. * if ctx.uv_bufs is NULL:
  78732. */
  78733. __pyx_v_ctx->uv_bufs = ((uv_buf_t *)PyMem_RawMalloc((__pyx_t_2 * (sizeof(uv_buf_t)))));
  78734. /* "uvloop/handles/stream.pyx":145
  78735. * ctx.uv_bufs = <uv.uv_buf_t*>PyMem_RawMalloc(
  78736. * len(buffers) * sizeof(uv.uv_buf_t))
  78737. * if ctx.uv_bufs is NULL: # <<<<<<<<<<<<<<
  78738. * raise MemoryError()
  78739. *
  78740. */
  78741. __pyx_t_6 = ((__pyx_v_ctx->uv_bufs == NULL) != 0);
  78742. if (unlikely(__pyx_t_6)) {
  78743. /* "uvloop/handles/stream.pyx":146
  78744. * len(buffers) * sizeof(uv.uv_buf_t))
  78745. * if ctx.uv_bufs is NULL:
  78746. * raise MemoryError() # <<<<<<<<<<<<<<
  78747. *
  78748. * p_pybufs = ctx.py_bufs
  78749. */
  78750. PyErr_NoMemory(); __PYX_ERR(18, 146, __pyx_L1_error)
  78751. /* "uvloop/handles/stream.pyx":145
  78752. * ctx.uv_bufs = <uv.uv_buf_t*>PyMem_RawMalloc(
  78753. * len(buffers) * sizeof(uv.uv_buf_t))
  78754. * if ctx.uv_bufs is NULL: # <<<<<<<<<<<<<<
  78755. * raise MemoryError()
  78756. *
  78757. */
  78758. }
  78759. /* "uvloop/handles/stream.pyx":148
  78760. * raise MemoryError()
  78761. *
  78762. * p_pybufs = ctx.py_bufs # <<<<<<<<<<<<<<
  78763. * p_uvbufs = ctx.uv_bufs
  78764. *
  78765. */
  78766. __pyx_t_9 = __pyx_v_ctx->py_bufs;
  78767. __pyx_v_p_pybufs = __pyx_t_9;
  78768. /* "uvloop/handles/stream.pyx":149
  78769. *
  78770. * p_pybufs = ctx.py_bufs
  78771. * p_uvbufs = ctx.uv_bufs # <<<<<<<<<<<<<<
  78772. *
  78773. * py_bufs_len = 0
  78774. */
  78775. __pyx_t_10 = __pyx_v_ctx->uv_bufs;
  78776. __pyx_v_p_uvbufs = __pyx_t_10;
  78777. }
  78778. __pyx_L3:;
  78779. /* "uvloop/handles/stream.pyx":151
  78780. * p_uvbufs = ctx.uv_bufs
  78781. *
  78782. * py_bufs_len = 0 # <<<<<<<<<<<<<<
  78783. * for buf in buffers:
  78784. * if PyBytes_CheckExact(buf):
  78785. */
  78786. __pyx_v_py_bufs_len = 0;
  78787. /* "uvloop/handles/stream.pyx":152
  78788. *
  78789. * py_bufs_len = 0
  78790. * for buf in buffers: # <<<<<<<<<<<<<<
  78791. * if PyBytes_CheckExact(buf):
  78792. * # We can only use this hack for bytes since it's
  78793. */
  78794. if (unlikely(__pyx_v_buffers == Py_None)) {
  78795. PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
  78796. __PYX_ERR(18, 152, __pyx_L1_error)
  78797. }
  78798. __pyx_t_1 = __pyx_v_buffers; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
  78799. for (;;) {
  78800. if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
  78801. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  78802. __pyx_t_7 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_7); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(18, 152, __pyx_L1_error)
  78803. #else
  78804. __pyx_t_7 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_7)) __PYX_ERR(18, 152, __pyx_L1_error)
  78805. __Pyx_GOTREF(__pyx_t_7);
  78806. #endif
  78807. __Pyx_XDECREF_SET(__pyx_v_buf, __pyx_t_7);
  78808. __pyx_t_7 = 0;
  78809. /* "uvloop/handles/stream.pyx":153
  78810. * py_bufs_len = 0
  78811. * for buf in buffers:
  78812. * if PyBytes_CheckExact(buf): # <<<<<<<<<<<<<<
  78813. * # We can only use this hack for bytes since it's
  78814. * # immutable. For everything else it is only safe to
  78815. */
  78816. __pyx_t_6 = (PyBytes_CheckExact(__pyx_v_buf) != 0);
  78817. if (__pyx_t_6) {
  78818. /* "uvloop/handles/stream.pyx":157
  78819. * # immutable. For everything else it is only safe to
  78820. * # use buffer protocol.
  78821. * p_uvbufs[uv_bufs_idx].base = PyBytes_AS_STRING(buf) # <<<<<<<<<<<<<<
  78822. * p_uvbufs[uv_bufs_idx].len = Py_SIZE(buf)
  78823. *
  78824. */
  78825. (__pyx_v_p_uvbufs[__pyx_v_uv_bufs_idx]).base = PyBytes_AS_STRING(__pyx_v_buf);
  78826. /* "uvloop/handles/stream.pyx":158
  78827. * # use buffer protocol.
  78828. * p_uvbufs[uv_bufs_idx].base = PyBytes_AS_STRING(buf)
  78829. * p_uvbufs[uv_bufs_idx].len = Py_SIZE(buf) # <<<<<<<<<<<<<<
  78830. *
  78831. * else:
  78832. */
  78833. (__pyx_v_p_uvbufs[__pyx_v_uv_bufs_idx]).len = Py_SIZE(__pyx_v_buf);
  78834. /* "uvloop/handles/stream.pyx":153
  78835. * py_bufs_len = 0
  78836. * for buf in buffers:
  78837. * if PyBytes_CheckExact(buf): # <<<<<<<<<<<<<<
  78838. * # We can only use this hack for bytes since it's
  78839. * # immutable. For everything else it is only safe to
  78840. */
  78841. goto __pyx_L17;
  78842. }
  78843. /* "uvloop/handles/stream.pyx":161
  78844. *
  78845. * else:
  78846. * try: # <<<<<<<<<<<<<<
  78847. * PyObject_GetBuffer(
  78848. * buf, &p_pybufs[py_bufs_len], PyBUF_SIMPLE)
  78849. */
  78850. /*else*/ {
  78851. {
  78852. __Pyx_PyThreadState_declare
  78853. __Pyx_PyThreadState_assign
  78854. __Pyx_ExceptionSave(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
  78855. __Pyx_XGOTREF(__pyx_t_11);
  78856. __Pyx_XGOTREF(__pyx_t_12);
  78857. __Pyx_XGOTREF(__pyx_t_13);
  78858. /*try:*/ {
  78859. /* "uvloop/handles/stream.pyx":162
  78860. * else:
  78861. * try:
  78862. * PyObject_GetBuffer( # <<<<<<<<<<<<<<
  78863. * buf, &p_pybufs[py_bufs_len], PyBUF_SIMPLE)
  78864. * except Exception:
  78865. */
  78866. __pyx_t_14 = PyObject_GetBuffer(__pyx_v_buf, (&(__pyx_v_p_pybufs[__pyx_v_py_bufs_len])), PyBUF_SIMPLE); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(18, 162, __pyx_L18_error)
  78867. /* "uvloop/handles/stream.pyx":161
  78868. *
  78869. * else:
  78870. * try: # <<<<<<<<<<<<<<
  78871. * PyObject_GetBuffer(
  78872. * buf, &p_pybufs[py_bufs_len], PyBUF_SIMPLE)
  78873. */
  78874. }
  78875. __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
  78876. __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
  78877. __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
  78878. goto __pyx_L25_try_end;
  78879. __pyx_L18_error:;
  78880. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  78881. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  78882. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  78883. /* "uvloop/handles/stream.pyx":164
  78884. * PyObject_GetBuffer(
  78885. * buf, &p_pybufs[py_bufs_len], PyBUF_SIMPLE)
  78886. * except Exception: # <<<<<<<<<<<<<<
  78887. * # This shouldn't ever happen, as `UVStream._write`
  78888. * # casts non-bytes objects to `memoryviews`.
  78889. */
  78890. __pyx_t_14 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
  78891. if (__pyx_t_14) {
  78892. __Pyx_AddTraceback("uvloop.loop._StreamWriteContext.new", __pyx_clineno, __pyx_lineno, __pyx_filename);
  78893. if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_4, &__pyx_t_8) < 0) __PYX_ERR(18, 164, __pyx_L20_except_error)
  78894. __Pyx_GOTREF(__pyx_t_7);
  78895. __Pyx_GOTREF(__pyx_t_4);
  78896. __Pyx_GOTREF(__pyx_t_8);
  78897. /* "uvloop/handles/stream.pyx":167
  78898. * # This shouldn't ever happen, as `UVStream._write`
  78899. * # casts non-bytes objects to `memoryviews`.
  78900. * ctx.py_bufs_len = py_bufs_len # <<<<<<<<<<<<<<
  78901. * ctx.free_bufs()
  78902. * raise
  78903. */
  78904. __pyx_v_ctx->py_bufs_len = __pyx_v_py_bufs_len;
  78905. /* "uvloop/handles/stream.pyx":168
  78906. * # casts non-bytes objects to `memoryviews`.
  78907. * ctx.py_bufs_len = py_bufs_len
  78908. * ctx.free_bufs() # <<<<<<<<<<<<<<
  78909. * raise
  78910. *
  78911. */
  78912. __pyx_t_15 = ((struct __pyx_vtabstruct_6uvloop_4loop__StreamWriteContext *)__pyx_v_ctx->__pyx_vtab)->free_bufs(__pyx_v_ctx); if (unlikely(!__pyx_t_15)) __PYX_ERR(18, 168, __pyx_L20_except_error)
  78913. __Pyx_GOTREF(__pyx_t_15);
  78914. __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  78915. /* "uvloop/handles/stream.pyx":169
  78916. * ctx.py_bufs_len = py_bufs_len
  78917. * ctx.free_bufs()
  78918. * raise # <<<<<<<<<<<<<<
  78919. *
  78920. * p_uvbufs[uv_bufs_idx].base = <char*>p_pybufs[py_bufs_len].buf
  78921. */
  78922. __Pyx_GIVEREF(__pyx_t_7);
  78923. __Pyx_GIVEREF(__pyx_t_4);
  78924. __Pyx_XGIVEREF(__pyx_t_8);
  78925. __Pyx_ErrRestoreWithState(__pyx_t_7, __pyx_t_4, __pyx_t_8);
  78926. __pyx_t_7 = 0; __pyx_t_4 = 0; __pyx_t_8 = 0;
  78927. __PYX_ERR(18, 169, __pyx_L20_except_error)
  78928. }
  78929. goto __pyx_L20_except_error;
  78930. __pyx_L20_except_error:;
  78931. /* "uvloop/handles/stream.pyx":161
  78932. *
  78933. * else:
  78934. * try: # <<<<<<<<<<<<<<
  78935. * PyObject_GetBuffer(
  78936. * buf, &p_pybufs[py_bufs_len], PyBUF_SIMPLE)
  78937. */
  78938. __Pyx_XGIVEREF(__pyx_t_11);
  78939. __Pyx_XGIVEREF(__pyx_t_12);
  78940. __Pyx_XGIVEREF(__pyx_t_13);
  78941. __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13);
  78942. goto __pyx_L1_error;
  78943. __pyx_L25_try_end:;
  78944. }
  78945. /* "uvloop/handles/stream.pyx":171
  78946. * raise
  78947. *
  78948. * p_uvbufs[uv_bufs_idx].base = <char*>p_pybufs[py_bufs_len].buf # <<<<<<<<<<<<<<
  78949. * p_uvbufs[uv_bufs_idx].len = p_pybufs[py_bufs_len].len
  78950. *
  78951. */
  78952. (__pyx_v_p_uvbufs[__pyx_v_uv_bufs_idx]).base = ((char *)(__pyx_v_p_pybufs[__pyx_v_py_bufs_len]).buf);
  78953. /* "uvloop/handles/stream.pyx":172
  78954. *
  78955. * p_uvbufs[uv_bufs_idx].base = <char*>p_pybufs[py_bufs_len].buf
  78956. * p_uvbufs[uv_bufs_idx].len = p_pybufs[py_bufs_len].len # <<<<<<<<<<<<<<
  78957. *
  78958. * py_bufs_len += 1
  78959. */
  78960. __pyx_t_16 = (__pyx_v_p_pybufs[__pyx_v_py_bufs_len]).len;
  78961. (__pyx_v_p_uvbufs[__pyx_v_uv_bufs_idx]).len = __pyx_t_16;
  78962. /* "uvloop/handles/stream.pyx":174
  78963. * p_uvbufs[uv_bufs_idx].len = p_pybufs[py_bufs_len].len
  78964. *
  78965. * py_bufs_len += 1 # <<<<<<<<<<<<<<
  78966. *
  78967. * uv_bufs_idx += 1
  78968. */
  78969. __pyx_v_py_bufs_len = (__pyx_v_py_bufs_len + 1);
  78970. }
  78971. __pyx_L17:;
  78972. /* "uvloop/handles/stream.pyx":176
  78973. * py_bufs_len += 1
  78974. *
  78975. * uv_bufs_idx += 1 # <<<<<<<<<<<<<<
  78976. *
  78977. * ctx.uv_bufs_start = p_uvbufs
  78978. */
  78979. __pyx_v_uv_bufs_idx = (__pyx_v_uv_bufs_idx + 1);
  78980. /* "uvloop/handles/stream.pyx":152
  78981. *
  78982. * py_bufs_len = 0
  78983. * for buf in buffers: # <<<<<<<<<<<<<<
  78984. * if PyBytes_CheckExact(buf):
  78985. * # We can only use this hack for bytes since it's
  78986. */
  78987. }
  78988. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  78989. /* "uvloop/handles/stream.pyx":178
  78990. * uv_bufs_idx += 1
  78991. *
  78992. * ctx.uv_bufs_start = p_uvbufs # <<<<<<<<<<<<<<
  78993. * ctx.uv_bufs_len = uv_bufs_idx
  78994. *
  78995. */
  78996. __pyx_v_ctx->uv_bufs_start = __pyx_v_p_uvbufs;
  78997. /* "uvloop/handles/stream.pyx":179
  78998. *
  78999. * ctx.uv_bufs_start = p_uvbufs
  79000. * ctx.uv_bufs_len = uv_bufs_idx # <<<<<<<<<<<<<<
  79001. *
  79002. * ctx.py_bufs_len = py_bufs_len
  79003. */
  79004. __pyx_v_ctx->uv_bufs_len = __pyx_v_uv_bufs_idx;
  79005. /* "uvloop/handles/stream.pyx":181
  79006. * ctx.uv_bufs_len = uv_bufs_idx
  79007. *
  79008. * ctx.py_bufs_len = py_bufs_len # <<<<<<<<<<<<<<
  79009. * ctx.req.data = <void*> ctx
  79010. *
  79011. */
  79012. __pyx_v_ctx->py_bufs_len = __pyx_v_py_bufs_len;
  79013. /* "uvloop/handles/stream.pyx":182
  79014. *
  79015. * ctx.py_bufs_len = py_bufs_len
  79016. * ctx.req.data = <void*> ctx # <<<<<<<<<<<<<<
  79017. *
  79018. * if UVLOOP_DEBUG:
  79019. */
  79020. __pyx_v_ctx->req.data = ((void *)__pyx_v_ctx);
  79021. /* "uvloop/handles/stream.pyx":184
  79022. * ctx.req.data = <void*> ctx
  79023. *
  79024. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  79025. * stream._loop._debug_stream_write_ctx_total += 1
  79026. * stream._loop._debug_stream_write_ctx_cnt += 1
  79027. */
  79028. __pyx_t_6 = (UVLOOP_DEBUG != 0);
  79029. if (__pyx_t_6) {
  79030. /* "uvloop/handles/stream.pyx":185
  79031. *
  79032. * if UVLOOP_DEBUG:
  79033. * stream._loop._debug_stream_write_ctx_total += 1 # <<<<<<<<<<<<<<
  79034. * stream._loop._debug_stream_write_ctx_cnt += 1
  79035. *
  79036. */
  79037. __Pyx_INCREF(((PyObject *)__pyx_v_stream->__pyx_base.__pyx_base.__pyx_base._loop));
  79038. __pyx_t_17 = __pyx_v_stream->__pyx_base.__pyx_base.__pyx_base._loop;
  79039. __pyx_t_17->_debug_stream_write_ctx_total = (__pyx_t_17->_debug_stream_write_ctx_total + 1);
  79040. __Pyx_DECREF(((PyObject *)__pyx_t_17)); __pyx_t_17 = 0;
  79041. /* "uvloop/handles/stream.pyx":186
  79042. * if UVLOOP_DEBUG:
  79043. * stream._loop._debug_stream_write_ctx_total += 1
  79044. * stream._loop._debug_stream_write_ctx_cnt += 1 # <<<<<<<<<<<<<<
  79045. *
  79046. * # Do incref after everything else is done.
  79047. */
  79048. __Pyx_INCREF(((PyObject *)__pyx_v_stream->__pyx_base.__pyx_base.__pyx_base._loop));
  79049. __pyx_t_17 = __pyx_v_stream->__pyx_base.__pyx_base.__pyx_base._loop;
  79050. __pyx_t_17->_debug_stream_write_ctx_cnt = (__pyx_t_17->_debug_stream_write_ctx_cnt + 1);
  79051. __Pyx_DECREF(((PyObject *)__pyx_t_17)); __pyx_t_17 = 0;
  79052. /* "uvloop/handles/stream.pyx":184
  79053. * ctx.req.data = <void*> ctx
  79054. *
  79055. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  79056. * stream._loop._debug_stream_write_ctx_total += 1
  79057. * stream._loop._debug_stream_write_ctx_cnt += 1
  79058. */
  79059. }
  79060. /* "uvloop/handles/stream.pyx":191
  79061. * # Under no circumstances we want `ctx` to be GCed while
  79062. * # libuv is still working with `ctx.uv_bufs`.
  79063. * Py_INCREF(ctx) # <<<<<<<<<<<<<<
  79064. * ctx.closed = 0
  79065. * return ctx
  79066. */
  79067. Py_INCREF(((PyObject *)__pyx_v_ctx));
  79068. /* "uvloop/handles/stream.pyx":192
  79069. * # libuv is still working with `ctx.uv_bufs`.
  79070. * Py_INCREF(ctx)
  79071. * ctx.closed = 0 # <<<<<<<<<<<<<<
  79072. * return ctx
  79073. *
  79074. */
  79075. __pyx_v_ctx->closed = 0;
  79076. /* "uvloop/handles/stream.pyx":193
  79077. * Py_INCREF(ctx)
  79078. * ctx.closed = 0
  79079. * return ctx # <<<<<<<<<<<<<<
  79080. *
  79081. * def __dealloc__(self):
  79082. */
  79083. __Pyx_XDECREF(((PyObject *)__pyx_r));
  79084. __Pyx_INCREF(((PyObject *)__pyx_v_ctx));
  79085. __pyx_r = __pyx_v_ctx;
  79086. goto __pyx_L0;
  79087. /* "uvloop/handles/stream.pyx":98
  79088. *
  79089. * @staticmethod
  79090. * cdef _StreamWriteContext new(UVStream stream, list buffers): # <<<<<<<<<<<<<<
  79091. * cdef:
  79092. * _StreamWriteContext ctx
  79093. */
  79094. /* function exit code */
  79095. __pyx_L1_error:;
  79096. __Pyx_XDECREF(__pyx_t_1);
  79097. __Pyx_XDECREF(__pyx_t_4);
  79098. __Pyx_XDECREF(__pyx_t_7);
  79099. __Pyx_XDECREF(__pyx_t_8);
  79100. __Pyx_XDECREF(__pyx_t_15);
  79101. __Pyx_XDECREF(((PyObject *)__pyx_t_17));
  79102. __Pyx_AddTraceback("uvloop.loop._StreamWriteContext.new", __pyx_clineno, __pyx_lineno, __pyx_filename);
  79103. __pyx_r = 0;
  79104. __pyx_L0:;
  79105. __Pyx_XDECREF((PyObject *)__pyx_v_ctx);
  79106. __Pyx_XDECREF(__pyx_v_buf);
  79107. __Pyx_XGIVEREF((PyObject *)__pyx_r);
  79108. __Pyx_RefNannyFinishContext();
  79109. return __pyx_r;
  79110. }
  79111. /* "uvloop/handles/stream.pyx":195
  79112. * return ctx
  79113. *
  79114. * def __dealloc__(self): # <<<<<<<<<<<<<<
  79115. * if not self.closed:
  79116. * # Because we do an INCREF in _StreamWriteContext.new,
  79117. */
  79118. /* Python wrapper */
  79119. static void __pyx_pw_6uvloop_4loop_19_StreamWriteContext_1__dealloc__(PyObject *__pyx_v_self); /*proto*/
  79120. static void __pyx_pw_6uvloop_4loop_19_StreamWriteContext_1__dealloc__(PyObject *__pyx_v_self) {
  79121. __Pyx_RefNannyDeclarations
  79122. __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  79123. __pyx_pf_6uvloop_4loop_19_StreamWriteContext___dealloc__(((struct __pyx_obj_6uvloop_4loop__StreamWriteContext *)__pyx_v_self));
  79124. /* function exit code */
  79125. __Pyx_RefNannyFinishContext();
  79126. }
  79127. static void __pyx_pf_6uvloop_4loop_19_StreamWriteContext___dealloc__(struct __pyx_obj_6uvloop_4loop__StreamWriteContext *__pyx_v_self) {
  79128. __Pyx_RefNannyDeclarations
  79129. int __pyx_t_1;
  79130. PyObject *__pyx_t_2 = NULL;
  79131. int __pyx_t_3;
  79132. struct __pyx_obj_6uvloop_4loop_Loop *__pyx_t_4 = NULL;
  79133. __Pyx_RefNannySetupContext("__dealloc__", 0);
  79134. /* "uvloop/handles/stream.pyx":196
  79135. *
  79136. * def __dealloc__(self):
  79137. * if not self.closed: # <<<<<<<<<<<<<<
  79138. * # Because we do an INCREF in _StreamWriteContext.new,
  79139. * # __dealloc__ shouldn't ever happen with `self.closed == 1`
  79140. */
  79141. __pyx_t_1 = ((!(__pyx_v_self->closed != 0)) != 0);
  79142. if (unlikely(__pyx_t_1)) {
  79143. /* "uvloop/handles/stream.pyx":199
  79144. * # Because we do an INCREF in _StreamWriteContext.new,
  79145. * # __dealloc__ shouldn't ever happen with `self.closed == 1`
  79146. * raise RuntimeError( # <<<<<<<<<<<<<<
  79147. * 'open _StreamWriteContext is being deallocated')
  79148. *
  79149. */
  79150. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__129, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 199, __pyx_L1_error)
  79151. __Pyx_GOTREF(__pyx_t_2);
  79152. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  79153. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  79154. __PYX_ERR(18, 199, __pyx_L1_error)
  79155. /* "uvloop/handles/stream.pyx":196
  79156. *
  79157. * def __dealloc__(self):
  79158. * if not self.closed: # <<<<<<<<<<<<<<
  79159. * # Because we do an INCREF in _StreamWriteContext.new,
  79160. * # __dealloc__ shouldn't ever happen with `self.closed == 1`
  79161. */
  79162. }
  79163. /* "uvloop/handles/stream.pyx":202
  79164. * 'open _StreamWriteContext is being deallocated')
  79165. *
  79166. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  79167. * if self.stream is not None:
  79168. * self.stream._loop._debug_stream_write_ctx_cnt -= 1
  79169. */
  79170. __pyx_t_1 = (UVLOOP_DEBUG != 0);
  79171. if (__pyx_t_1) {
  79172. /* "uvloop/handles/stream.pyx":203
  79173. *
  79174. * if UVLOOP_DEBUG:
  79175. * if self.stream is not None: # <<<<<<<<<<<<<<
  79176. * self.stream._loop._debug_stream_write_ctx_cnt -= 1
  79177. * self.stream = None
  79178. */
  79179. __pyx_t_1 = (((PyObject *)__pyx_v_self->stream) != Py_None);
  79180. __pyx_t_3 = (__pyx_t_1 != 0);
  79181. if (__pyx_t_3) {
  79182. /* "uvloop/handles/stream.pyx":204
  79183. * if UVLOOP_DEBUG:
  79184. * if self.stream is not None:
  79185. * self.stream._loop._debug_stream_write_ctx_cnt -= 1 # <<<<<<<<<<<<<<
  79186. * self.stream = None
  79187. *
  79188. */
  79189. __Pyx_INCREF(((PyObject *)__pyx_v_self->stream->__pyx_base.__pyx_base.__pyx_base._loop));
  79190. __pyx_t_4 = __pyx_v_self->stream->__pyx_base.__pyx_base.__pyx_base._loop;
  79191. __pyx_t_4->_debug_stream_write_ctx_cnt = (__pyx_t_4->_debug_stream_write_ctx_cnt - 1);
  79192. __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  79193. /* "uvloop/handles/stream.pyx":205
  79194. * if self.stream is not None:
  79195. * self.stream._loop._debug_stream_write_ctx_cnt -= 1
  79196. * self.stream = None # <<<<<<<<<<<<<<
  79197. *
  79198. *
  79199. */
  79200. __Pyx_INCREF(Py_None);
  79201. __Pyx_GIVEREF(Py_None);
  79202. __Pyx_GOTREF(__pyx_v_self->stream);
  79203. __Pyx_DECREF(((PyObject *)__pyx_v_self->stream));
  79204. __pyx_v_self->stream = ((struct __pyx_obj_6uvloop_4loop_UVStream *)Py_None);
  79205. /* "uvloop/handles/stream.pyx":203
  79206. *
  79207. * if UVLOOP_DEBUG:
  79208. * if self.stream is not None: # <<<<<<<<<<<<<<
  79209. * self.stream._loop._debug_stream_write_ctx_cnt -= 1
  79210. * self.stream = None
  79211. */
  79212. }
  79213. /* "uvloop/handles/stream.pyx":202
  79214. * 'open _StreamWriteContext is being deallocated')
  79215. *
  79216. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  79217. * if self.stream is not None:
  79218. * self.stream._loop._debug_stream_write_ctx_cnt -= 1
  79219. */
  79220. }
  79221. /* "uvloop/handles/stream.pyx":195
  79222. * return ctx
  79223. *
  79224. * def __dealloc__(self): # <<<<<<<<<<<<<<
  79225. * if not self.closed:
  79226. * # Because we do an INCREF in _StreamWriteContext.new,
  79227. */
  79228. /* function exit code */
  79229. goto __pyx_L0;
  79230. __pyx_L1_error:;
  79231. __Pyx_XDECREF(__pyx_t_2);
  79232. __Pyx_XDECREF(((PyObject *)__pyx_t_4));
  79233. __Pyx_WriteUnraisable("uvloop.loop._StreamWriteContext.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  79234. __pyx_L0:;
  79235. __Pyx_RefNannyFinishContext();
  79236. }
  79237. /* "(tree fragment)":1
  79238. * def __reduce_cython__(self): # <<<<<<<<<<<<<<
  79239. * raise TypeError("self.py_bufs,self.py_bufs_sml,self.req,self.uv_bufs,self.uv_bufs_start cannot be converted to a Python object for pickling")
  79240. * def __setstate_cython__(self, __pyx_state):
  79241. */
  79242. /* Python wrapper */
  79243. static PyObject *__pyx_pw_6uvloop_4loop_19_StreamWriteContext_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  79244. static char __pyx_doc_6uvloop_4loop_19_StreamWriteContext_2__reduce_cython__[] = "_StreamWriteContext.__reduce_cython__(self)";
  79245. static PyObject *__pyx_pw_6uvloop_4loop_19_StreamWriteContext_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  79246. PyObject *__pyx_r = 0;
  79247. __Pyx_RefNannyDeclarations
  79248. __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  79249. __pyx_r = __pyx_pf_6uvloop_4loop_19_StreamWriteContext_2__reduce_cython__(((struct __pyx_obj_6uvloop_4loop__StreamWriteContext *)__pyx_v_self));
  79250. /* function exit code */
  79251. __Pyx_RefNannyFinishContext();
  79252. return __pyx_r;
  79253. }
  79254. static PyObject *__pyx_pf_6uvloop_4loop_19_StreamWriteContext_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop__StreamWriteContext *__pyx_v_self) {
  79255. PyObject *__pyx_r = NULL;
  79256. __Pyx_RefNannyDeclarations
  79257. PyObject *__pyx_t_1 = NULL;
  79258. __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  79259. /* "(tree fragment)":2
  79260. * def __reduce_cython__(self):
  79261. * raise TypeError("self.py_bufs,self.py_bufs_sml,self.req,self.uv_bufs,self.uv_bufs_start cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
  79262. * def __setstate_cython__(self, __pyx_state):
  79263. * raise TypeError("self.py_bufs,self.py_bufs_sml,self.req,self.uv_bufs,self.uv_bufs_start cannot be converted to a Python object for pickling")
  79264. */
  79265. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__130, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 2, __pyx_L1_error)
  79266. __Pyx_GOTREF(__pyx_t_1);
  79267. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  79268. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  79269. __PYX_ERR(9, 2, __pyx_L1_error)
  79270. /* "(tree fragment)":1
  79271. * def __reduce_cython__(self): # <<<<<<<<<<<<<<
  79272. * raise TypeError("self.py_bufs,self.py_bufs_sml,self.req,self.uv_bufs,self.uv_bufs_start cannot be converted to a Python object for pickling")
  79273. * def __setstate_cython__(self, __pyx_state):
  79274. */
  79275. /* function exit code */
  79276. __pyx_L1_error:;
  79277. __Pyx_XDECREF(__pyx_t_1);
  79278. __Pyx_AddTraceback("uvloop.loop._StreamWriteContext.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  79279. __pyx_r = NULL;
  79280. __Pyx_XGIVEREF(__pyx_r);
  79281. __Pyx_RefNannyFinishContext();
  79282. return __pyx_r;
  79283. }
  79284. /* "(tree fragment)":3
  79285. * def __reduce_cython__(self):
  79286. * raise TypeError("self.py_bufs,self.py_bufs_sml,self.req,self.uv_bufs,self.uv_bufs_start cannot be converted to a Python object for pickling")
  79287. * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
  79288. * raise TypeError("self.py_bufs,self.py_bufs_sml,self.req,self.uv_bufs,self.uv_bufs_start cannot be converted to a Python object for pickling")
  79289. */
  79290. /* Python wrapper */
  79291. static PyObject *__pyx_pw_6uvloop_4loop_19_StreamWriteContext_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
  79292. static char __pyx_doc_6uvloop_4loop_19_StreamWriteContext_4__setstate_cython__[] = "_StreamWriteContext.__setstate_cython__(self, __pyx_state)";
  79293. static PyObject *__pyx_pw_6uvloop_4loop_19_StreamWriteContext_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  79294. PyObject *__pyx_r = 0;
  79295. __Pyx_RefNannyDeclarations
  79296. __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  79297. __pyx_r = __pyx_pf_6uvloop_4loop_19_StreamWriteContext_4__setstate_cython__(((struct __pyx_obj_6uvloop_4loop__StreamWriteContext *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
  79298. /* function exit code */
  79299. __Pyx_RefNannyFinishContext();
  79300. return __pyx_r;
  79301. }
  79302. static PyObject *__pyx_pf_6uvloop_4loop_19_StreamWriteContext_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop__StreamWriteContext *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  79303. PyObject *__pyx_r = NULL;
  79304. __Pyx_RefNannyDeclarations
  79305. PyObject *__pyx_t_1 = NULL;
  79306. __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  79307. /* "(tree fragment)":4
  79308. * raise TypeError("self.py_bufs,self.py_bufs_sml,self.req,self.uv_bufs,self.uv_bufs_start cannot be converted to a Python object for pickling")
  79309. * def __setstate_cython__(self, __pyx_state):
  79310. * raise TypeError("self.py_bufs,self.py_bufs_sml,self.req,self.uv_bufs,self.uv_bufs_start cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
  79311. */
  79312. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__131, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 4, __pyx_L1_error)
  79313. __Pyx_GOTREF(__pyx_t_1);
  79314. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  79315. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  79316. __PYX_ERR(9, 4, __pyx_L1_error)
  79317. /* "(tree fragment)":3
  79318. * def __reduce_cython__(self):
  79319. * raise TypeError("self.py_bufs,self.py_bufs_sml,self.req,self.uv_bufs,self.uv_bufs_start cannot be converted to a Python object for pickling")
  79320. * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
  79321. * raise TypeError("self.py_bufs,self.py_bufs_sml,self.req,self.uv_bufs,self.uv_bufs_start cannot be converted to a Python object for pickling")
  79322. */
  79323. /* function exit code */
  79324. __pyx_L1_error:;
  79325. __Pyx_XDECREF(__pyx_t_1);
  79326. __Pyx_AddTraceback("uvloop.loop._StreamWriteContext.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  79327. __pyx_r = NULL;
  79328. __Pyx_XGIVEREF(__pyx_r);
  79329. __Pyx_RefNannyFinishContext();
  79330. return __pyx_r;
  79331. }
  79332. /* "uvloop/handles/stream.pyx":211
  79333. * cdef class UVStream(UVBaseTransport):
  79334. *
  79335. * def __cinit__(self): # <<<<<<<<<<<<<<
  79336. * self.__shutting_down = 0
  79337. * self.__reading = 0
  79338. */
  79339. /* Python wrapper */
  79340. static int __pyx_pw_6uvloop_4loop_8UVStream_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  79341. static int __pyx_pw_6uvloop_4loop_8UVStream_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  79342. int __pyx_r;
  79343. __Pyx_RefNannyDeclarations
  79344. __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  79345. if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
  79346. __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  79347. if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
  79348. __pyx_r = __pyx_pf_6uvloop_4loop_8UVStream___cinit__(((struct __pyx_obj_6uvloop_4loop_UVStream *)__pyx_v_self));
  79349. /* function exit code */
  79350. __Pyx_RefNannyFinishContext();
  79351. return __pyx_r;
  79352. }
  79353. static int __pyx_pf_6uvloop_4loop_8UVStream___cinit__(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self) {
  79354. int __pyx_r;
  79355. __Pyx_RefNannyDeclarations
  79356. PyObject *__pyx_t_1 = NULL;
  79357. __Pyx_RefNannySetupContext("__cinit__", 0);
  79358. /* "uvloop/handles/stream.pyx":212
  79359. *
  79360. * def __cinit__(self):
  79361. * self.__shutting_down = 0 # <<<<<<<<<<<<<<
  79362. * self.__reading = 0
  79363. * self.__read_error_close = 0
  79364. */
  79365. __pyx_v_self->__pyx___shutting_down = 0;
  79366. /* "uvloop/handles/stream.pyx":213
  79367. * def __cinit__(self):
  79368. * self.__shutting_down = 0
  79369. * self.__reading = 0 # <<<<<<<<<<<<<<
  79370. * self.__read_error_close = 0
  79371. * self.__buffered = 0
  79372. */
  79373. __pyx_v_self->__pyx___reading = 0;
  79374. /* "uvloop/handles/stream.pyx":214
  79375. * self.__shutting_down = 0
  79376. * self.__reading = 0
  79377. * self.__read_error_close = 0 # <<<<<<<<<<<<<<
  79378. * self.__buffered = 0
  79379. * self._eof = 0
  79380. */
  79381. __pyx_v_self->__pyx___read_error_close = 0;
  79382. /* "uvloop/handles/stream.pyx":215
  79383. * self.__reading = 0
  79384. * self.__read_error_close = 0
  79385. * self.__buffered = 0 # <<<<<<<<<<<<<<
  79386. * self._eof = 0
  79387. * self._buffer = []
  79388. */
  79389. __pyx_v_self->__pyx___buffered = 0;
  79390. /* "uvloop/handles/stream.pyx":216
  79391. * self.__read_error_close = 0
  79392. * self.__buffered = 0
  79393. * self._eof = 0 # <<<<<<<<<<<<<<
  79394. * self._buffer = []
  79395. * self._buffer_size = 0
  79396. */
  79397. __pyx_v_self->_eof = 0;
  79398. /* "uvloop/handles/stream.pyx":217
  79399. * self.__buffered = 0
  79400. * self._eof = 0
  79401. * self._buffer = [] # <<<<<<<<<<<<<<
  79402. * self._buffer_size = 0
  79403. *
  79404. */
  79405. __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 217, __pyx_L1_error)
  79406. __Pyx_GOTREF(__pyx_t_1);
  79407. __Pyx_GIVEREF(__pyx_t_1);
  79408. __Pyx_GOTREF(__pyx_v_self->_buffer);
  79409. __Pyx_DECREF(__pyx_v_self->_buffer);
  79410. __pyx_v_self->_buffer = ((PyObject*)__pyx_t_1);
  79411. __pyx_t_1 = 0;
  79412. /* "uvloop/handles/stream.pyx":218
  79413. * self._eof = 0
  79414. * self._buffer = []
  79415. * self._buffer_size = 0 # <<<<<<<<<<<<<<
  79416. *
  79417. * self._protocol_get_buffer = None
  79418. */
  79419. __pyx_v_self->_buffer_size = 0;
  79420. /* "uvloop/handles/stream.pyx":220
  79421. * self._buffer_size = 0
  79422. *
  79423. * self._protocol_get_buffer = None # <<<<<<<<<<<<<<
  79424. * self._protocol_buffer_updated = None
  79425. *
  79426. */
  79427. __Pyx_INCREF(Py_None);
  79428. __Pyx_GIVEREF(Py_None);
  79429. __Pyx_GOTREF(__pyx_v_self->_protocol_get_buffer);
  79430. __Pyx_DECREF(__pyx_v_self->_protocol_get_buffer);
  79431. __pyx_v_self->_protocol_get_buffer = Py_None;
  79432. /* "uvloop/handles/stream.pyx":221
  79433. *
  79434. * self._protocol_get_buffer = None
  79435. * self._protocol_buffer_updated = None # <<<<<<<<<<<<<<
  79436. *
  79437. * self._read_pybuf_acquired = False
  79438. */
  79439. __Pyx_INCREF(Py_None);
  79440. __Pyx_GIVEREF(Py_None);
  79441. __Pyx_GOTREF(__pyx_v_self->_protocol_buffer_updated);
  79442. __Pyx_DECREF(__pyx_v_self->_protocol_buffer_updated);
  79443. __pyx_v_self->_protocol_buffer_updated = Py_None;
  79444. /* "uvloop/handles/stream.pyx":223
  79445. * self._protocol_buffer_updated = None
  79446. *
  79447. * self._read_pybuf_acquired = False # <<<<<<<<<<<<<<
  79448. *
  79449. * cdef _set_protocol(self, object protocol):
  79450. */
  79451. __pyx_v_self->_read_pybuf_acquired = 0;
  79452. /* "uvloop/handles/stream.pyx":211
  79453. * cdef class UVStream(UVBaseTransport):
  79454. *
  79455. * def __cinit__(self): # <<<<<<<<<<<<<<
  79456. * self.__shutting_down = 0
  79457. * self.__reading = 0
  79458. */
  79459. /* function exit code */
  79460. __pyx_r = 0;
  79461. goto __pyx_L0;
  79462. __pyx_L1_error:;
  79463. __Pyx_XDECREF(__pyx_t_1);
  79464. __Pyx_AddTraceback("uvloop.loop.UVStream.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  79465. __pyx_r = -1;
  79466. __pyx_L0:;
  79467. __Pyx_RefNannyFinishContext();
  79468. return __pyx_r;
  79469. }
  79470. /* "uvloop/handles/stream.pyx":225
  79471. * self._read_pybuf_acquired = False
  79472. *
  79473. * cdef _set_protocol(self, object protocol): # <<<<<<<<<<<<<<
  79474. * if protocol is None:
  79475. * raise TypeError('protocol is required')
  79476. */
  79477. static PyObject *__pyx_f_6uvloop_4loop_8UVStream__set_protocol(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self, PyObject *__pyx_v_protocol) {
  79478. PyObject *__pyx_r = NULL;
  79479. __Pyx_RefNannyDeclarations
  79480. int __pyx_t_1;
  79481. int __pyx_t_2;
  79482. PyObject *__pyx_t_3 = NULL;
  79483. int __pyx_t_4;
  79484. PyObject *__pyx_t_5 = NULL;
  79485. PyObject *__pyx_t_6 = NULL;
  79486. PyObject *__pyx_t_7 = NULL;
  79487. int __pyx_t_8;
  79488. __Pyx_RefNannySetupContext("_set_protocol", 0);
  79489. /* "uvloop/handles/stream.pyx":226
  79490. *
  79491. * cdef _set_protocol(self, object protocol):
  79492. * if protocol is None: # <<<<<<<<<<<<<<
  79493. * raise TypeError('protocol is required')
  79494. *
  79495. */
  79496. __pyx_t_1 = (__pyx_v_protocol == Py_None);
  79497. __pyx_t_2 = (__pyx_t_1 != 0);
  79498. if (unlikely(__pyx_t_2)) {
  79499. /* "uvloop/handles/stream.pyx":227
  79500. * cdef _set_protocol(self, object protocol):
  79501. * if protocol is None:
  79502. * raise TypeError('protocol is required') # <<<<<<<<<<<<<<
  79503. *
  79504. * UVBaseTransport._set_protocol(self, protocol)
  79505. */
  79506. __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__132, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(18, 227, __pyx_L1_error)
  79507. __Pyx_GOTREF(__pyx_t_3);
  79508. __Pyx_Raise(__pyx_t_3, 0, 0, 0);
  79509. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  79510. __PYX_ERR(18, 227, __pyx_L1_error)
  79511. /* "uvloop/handles/stream.pyx":226
  79512. *
  79513. * cdef _set_protocol(self, object protocol):
  79514. * if protocol is None: # <<<<<<<<<<<<<<
  79515. * raise TypeError('protocol is required')
  79516. *
  79517. */
  79518. }
  79519. /* "uvloop/handles/stream.pyx":229
  79520. * raise TypeError('protocol is required')
  79521. *
  79522. * UVBaseTransport._set_protocol(self, protocol) # <<<<<<<<<<<<<<
  79523. *
  79524. * if (hasattr(protocol, 'get_buffer') and
  79525. */
  79526. __pyx_t_3 = __pyx_f_6uvloop_4loop_15UVBaseTransport__set_protocol(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_v_self), __pyx_v_protocol); if (unlikely(!__pyx_t_3)) __PYX_ERR(18, 229, __pyx_L1_error)
  79527. __Pyx_GOTREF(__pyx_t_3);
  79528. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  79529. /* "uvloop/handles/stream.pyx":231
  79530. * UVBaseTransport._set_protocol(self, protocol)
  79531. *
  79532. * if (hasattr(protocol, 'get_buffer') and # <<<<<<<<<<<<<<
  79533. * not isinstance(protocol, aio_Protocol)):
  79534. * try:
  79535. */
  79536. __pyx_t_1 = __Pyx_HasAttr(__pyx_v_protocol, __pyx_n_u_get_buffer); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(18, 231, __pyx_L1_error)
  79537. __pyx_t_4 = (__pyx_t_1 != 0);
  79538. if (__pyx_t_4) {
  79539. } else {
  79540. __pyx_t_2 = __pyx_t_4;
  79541. goto __pyx_L5_bool_binop_done;
  79542. }
  79543. /* "uvloop/handles/stream.pyx":232
  79544. *
  79545. * if (hasattr(protocol, 'get_buffer') and
  79546. * not isinstance(protocol, aio_Protocol)): # <<<<<<<<<<<<<<
  79547. * try:
  79548. * self._protocol_get_buffer = protocol.get_buffer
  79549. */
  79550. __pyx_t_3 = __pyx_v_6uvloop_4loop_aio_Protocol;
  79551. __Pyx_INCREF(__pyx_t_3);
  79552. __pyx_t_4 = PyObject_IsInstance(__pyx_v_protocol, __pyx_t_3); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(18, 232, __pyx_L1_error)
  79553. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  79554. __pyx_t_1 = ((!(__pyx_t_4 != 0)) != 0);
  79555. __pyx_t_2 = __pyx_t_1;
  79556. __pyx_L5_bool_binop_done:;
  79557. /* "uvloop/handles/stream.pyx":231
  79558. * UVBaseTransport._set_protocol(self, protocol)
  79559. *
  79560. * if (hasattr(protocol, 'get_buffer') and # <<<<<<<<<<<<<<
  79561. * not isinstance(protocol, aio_Protocol)):
  79562. * try:
  79563. */
  79564. if (__pyx_t_2) {
  79565. /* "uvloop/handles/stream.pyx":233
  79566. * if (hasattr(protocol, 'get_buffer') and
  79567. * not isinstance(protocol, aio_Protocol)):
  79568. * try: # <<<<<<<<<<<<<<
  79569. * self._protocol_get_buffer = protocol.get_buffer
  79570. * self._protocol_buffer_updated = protocol.buffer_updated
  79571. */
  79572. {
  79573. __Pyx_PyThreadState_declare
  79574. __Pyx_PyThreadState_assign
  79575. __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7);
  79576. __Pyx_XGOTREF(__pyx_t_5);
  79577. __Pyx_XGOTREF(__pyx_t_6);
  79578. __Pyx_XGOTREF(__pyx_t_7);
  79579. /*try:*/ {
  79580. /* "uvloop/handles/stream.pyx":234
  79581. * not isinstance(protocol, aio_Protocol)):
  79582. * try:
  79583. * self._protocol_get_buffer = protocol.get_buffer # <<<<<<<<<<<<<<
  79584. * self._protocol_buffer_updated = protocol.buffer_updated
  79585. * self.__buffered = 1
  79586. */
  79587. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_protocol, __pyx_n_s_get_buffer); if (unlikely(!__pyx_t_3)) __PYX_ERR(18, 234, __pyx_L7_error)
  79588. __Pyx_GOTREF(__pyx_t_3);
  79589. __Pyx_GIVEREF(__pyx_t_3);
  79590. __Pyx_GOTREF(__pyx_v_self->_protocol_get_buffer);
  79591. __Pyx_DECREF(__pyx_v_self->_protocol_get_buffer);
  79592. __pyx_v_self->_protocol_get_buffer = __pyx_t_3;
  79593. __pyx_t_3 = 0;
  79594. /* "uvloop/handles/stream.pyx":235
  79595. * try:
  79596. * self._protocol_get_buffer = protocol.get_buffer
  79597. * self._protocol_buffer_updated = protocol.buffer_updated # <<<<<<<<<<<<<<
  79598. * self.__buffered = 1
  79599. * except AttributeError:
  79600. */
  79601. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_protocol, __pyx_n_s_buffer_updated); if (unlikely(!__pyx_t_3)) __PYX_ERR(18, 235, __pyx_L7_error)
  79602. __Pyx_GOTREF(__pyx_t_3);
  79603. __Pyx_GIVEREF(__pyx_t_3);
  79604. __Pyx_GOTREF(__pyx_v_self->_protocol_buffer_updated);
  79605. __Pyx_DECREF(__pyx_v_self->_protocol_buffer_updated);
  79606. __pyx_v_self->_protocol_buffer_updated = __pyx_t_3;
  79607. __pyx_t_3 = 0;
  79608. /* "uvloop/handles/stream.pyx":236
  79609. * self._protocol_get_buffer = protocol.get_buffer
  79610. * self._protocol_buffer_updated = protocol.buffer_updated
  79611. * self.__buffered = 1 # <<<<<<<<<<<<<<
  79612. * except AttributeError:
  79613. * pass
  79614. */
  79615. __pyx_v_self->__pyx___buffered = 1;
  79616. /* "uvloop/handles/stream.pyx":233
  79617. * if (hasattr(protocol, 'get_buffer') and
  79618. * not isinstance(protocol, aio_Protocol)):
  79619. * try: # <<<<<<<<<<<<<<
  79620. * self._protocol_get_buffer = protocol.get_buffer
  79621. * self._protocol_buffer_updated = protocol.buffer_updated
  79622. */
  79623. }
  79624. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  79625. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  79626. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  79627. goto __pyx_L12_try_end;
  79628. __pyx_L7_error:;
  79629. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  79630. /* "uvloop/handles/stream.pyx":237
  79631. * self._protocol_buffer_updated = protocol.buffer_updated
  79632. * self.__buffered = 1
  79633. * except AttributeError: # <<<<<<<<<<<<<<
  79634. * pass
  79635. * else:
  79636. */
  79637. __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
  79638. if (__pyx_t_8) {
  79639. __Pyx_ErrRestore(0,0,0);
  79640. goto __pyx_L8_exception_handled;
  79641. }
  79642. goto __pyx_L9_except_error;
  79643. __pyx_L9_except_error:;
  79644. /* "uvloop/handles/stream.pyx":233
  79645. * if (hasattr(protocol, 'get_buffer') and
  79646. * not isinstance(protocol, aio_Protocol)):
  79647. * try: # <<<<<<<<<<<<<<
  79648. * self._protocol_get_buffer = protocol.get_buffer
  79649. * self._protocol_buffer_updated = protocol.buffer_updated
  79650. */
  79651. __Pyx_XGIVEREF(__pyx_t_5);
  79652. __Pyx_XGIVEREF(__pyx_t_6);
  79653. __Pyx_XGIVEREF(__pyx_t_7);
  79654. __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
  79655. goto __pyx_L1_error;
  79656. __pyx_L8_exception_handled:;
  79657. __Pyx_XGIVEREF(__pyx_t_5);
  79658. __Pyx_XGIVEREF(__pyx_t_6);
  79659. __Pyx_XGIVEREF(__pyx_t_7);
  79660. __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
  79661. __pyx_L12_try_end:;
  79662. }
  79663. /* "uvloop/handles/stream.pyx":231
  79664. * UVBaseTransport._set_protocol(self, protocol)
  79665. *
  79666. * if (hasattr(protocol, 'get_buffer') and # <<<<<<<<<<<<<<
  79667. * not isinstance(protocol, aio_Protocol)):
  79668. * try:
  79669. */
  79670. goto __pyx_L4;
  79671. }
  79672. /* "uvloop/handles/stream.pyx":240
  79673. * pass
  79674. * else:
  79675. * self.__buffered = 0 # <<<<<<<<<<<<<<
  79676. *
  79677. * cdef _clear_protocol(self):
  79678. */
  79679. /*else*/ {
  79680. __pyx_v_self->__pyx___buffered = 0;
  79681. }
  79682. __pyx_L4:;
  79683. /* "uvloop/handles/stream.pyx":225
  79684. * self._read_pybuf_acquired = False
  79685. *
  79686. * cdef _set_protocol(self, object protocol): # <<<<<<<<<<<<<<
  79687. * if protocol is None:
  79688. * raise TypeError('protocol is required')
  79689. */
  79690. /* function exit code */
  79691. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  79692. goto __pyx_L0;
  79693. __pyx_L1_error:;
  79694. __Pyx_XDECREF(__pyx_t_3);
  79695. __Pyx_AddTraceback("uvloop.loop.UVStream._set_protocol", __pyx_clineno, __pyx_lineno, __pyx_filename);
  79696. __pyx_r = 0;
  79697. __pyx_L0:;
  79698. __Pyx_XGIVEREF(__pyx_r);
  79699. __Pyx_RefNannyFinishContext();
  79700. return __pyx_r;
  79701. }
  79702. /* "uvloop/handles/stream.pyx":242
  79703. * self.__buffered = 0
  79704. *
  79705. * cdef _clear_protocol(self): # <<<<<<<<<<<<<<
  79706. * UVBaseTransport._clear_protocol(self)
  79707. * self._protocol_get_buffer = None
  79708. */
  79709. static PyObject *__pyx_f_6uvloop_4loop_8UVStream__clear_protocol(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self) {
  79710. PyObject *__pyx_r = NULL;
  79711. __Pyx_RefNannyDeclarations
  79712. PyObject *__pyx_t_1 = NULL;
  79713. __Pyx_RefNannySetupContext("_clear_protocol", 0);
  79714. /* "uvloop/handles/stream.pyx":243
  79715. *
  79716. * cdef _clear_protocol(self):
  79717. * UVBaseTransport._clear_protocol(self) # <<<<<<<<<<<<<<
  79718. * self._protocol_get_buffer = None
  79719. * self._protocol_buffer_updated = None
  79720. */
  79721. __pyx_t_1 = __pyx_f_6uvloop_4loop_15UVBaseTransport__clear_protocol(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 243, __pyx_L1_error)
  79722. __Pyx_GOTREF(__pyx_t_1);
  79723. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  79724. /* "uvloop/handles/stream.pyx":244
  79725. * cdef _clear_protocol(self):
  79726. * UVBaseTransport._clear_protocol(self)
  79727. * self._protocol_get_buffer = None # <<<<<<<<<<<<<<
  79728. * self._protocol_buffer_updated = None
  79729. * self.__buffered = 0
  79730. */
  79731. __Pyx_INCREF(Py_None);
  79732. __Pyx_GIVEREF(Py_None);
  79733. __Pyx_GOTREF(__pyx_v_self->_protocol_get_buffer);
  79734. __Pyx_DECREF(__pyx_v_self->_protocol_get_buffer);
  79735. __pyx_v_self->_protocol_get_buffer = Py_None;
  79736. /* "uvloop/handles/stream.pyx":245
  79737. * UVBaseTransport._clear_protocol(self)
  79738. * self._protocol_get_buffer = None
  79739. * self._protocol_buffer_updated = None # <<<<<<<<<<<<<<
  79740. * self.__buffered = 0
  79741. *
  79742. */
  79743. __Pyx_INCREF(Py_None);
  79744. __Pyx_GIVEREF(Py_None);
  79745. __Pyx_GOTREF(__pyx_v_self->_protocol_buffer_updated);
  79746. __Pyx_DECREF(__pyx_v_self->_protocol_buffer_updated);
  79747. __pyx_v_self->_protocol_buffer_updated = Py_None;
  79748. /* "uvloop/handles/stream.pyx":246
  79749. * self._protocol_get_buffer = None
  79750. * self._protocol_buffer_updated = None
  79751. * self.__buffered = 0 # <<<<<<<<<<<<<<
  79752. *
  79753. * cdef inline _shutdown(self):
  79754. */
  79755. __pyx_v_self->__pyx___buffered = 0;
  79756. /* "uvloop/handles/stream.pyx":242
  79757. * self.__buffered = 0
  79758. *
  79759. * cdef _clear_protocol(self): # <<<<<<<<<<<<<<
  79760. * UVBaseTransport._clear_protocol(self)
  79761. * self._protocol_get_buffer = None
  79762. */
  79763. /* function exit code */
  79764. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  79765. goto __pyx_L0;
  79766. __pyx_L1_error:;
  79767. __Pyx_XDECREF(__pyx_t_1);
  79768. __Pyx_AddTraceback("uvloop.loop.UVStream._clear_protocol", __pyx_clineno, __pyx_lineno, __pyx_filename);
  79769. __pyx_r = 0;
  79770. __pyx_L0:;
  79771. __Pyx_XGIVEREF(__pyx_r);
  79772. __Pyx_RefNannyFinishContext();
  79773. return __pyx_r;
  79774. }
  79775. /* "uvloop/handles/stream.pyx":248
  79776. * self.__buffered = 0
  79777. *
  79778. * cdef inline _shutdown(self): # <<<<<<<<<<<<<<
  79779. * cdef int err
  79780. *
  79781. */
  79782. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVStream__shutdown(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self) {
  79783. int __pyx_v_err;
  79784. PyObject *__pyx_v_exc = NULL;
  79785. PyObject *__pyx_r = NULL;
  79786. __Pyx_RefNannyDeclarations
  79787. int __pyx_t_1;
  79788. PyObject *__pyx_t_2 = NULL;
  79789. __Pyx_RefNannySetupContext("_shutdown", 0);
  79790. /* "uvloop/handles/stream.pyx":251
  79791. * cdef int err
  79792. *
  79793. * if self.__shutting_down: # <<<<<<<<<<<<<<
  79794. * return
  79795. * self.__shutting_down = 1
  79796. */
  79797. __pyx_t_1 = (__pyx_v_self->__pyx___shutting_down != 0);
  79798. if (__pyx_t_1) {
  79799. /* "uvloop/handles/stream.pyx":252
  79800. *
  79801. * if self.__shutting_down:
  79802. * return # <<<<<<<<<<<<<<
  79803. * self.__shutting_down = 1
  79804. *
  79805. */
  79806. __Pyx_XDECREF(__pyx_r);
  79807. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  79808. goto __pyx_L0;
  79809. /* "uvloop/handles/stream.pyx":251
  79810. * cdef int err
  79811. *
  79812. * if self.__shutting_down: # <<<<<<<<<<<<<<
  79813. * return
  79814. * self.__shutting_down = 1
  79815. */
  79816. }
  79817. /* "uvloop/handles/stream.pyx":253
  79818. * if self.__shutting_down:
  79819. * return
  79820. * self.__shutting_down = 1 # <<<<<<<<<<<<<<
  79821. *
  79822. * self._ensure_alive()
  79823. */
  79824. __pyx_v_self->__pyx___shutting_down = 1;
  79825. /* "uvloop/handles/stream.pyx":255
  79826. * self.__shutting_down = 1
  79827. *
  79828. * self._ensure_alive() # <<<<<<<<<<<<<<
  79829. *
  79830. * self._shutdown_req.data = <void*> self
  79831. */
  79832. __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._ensure_alive(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 255, __pyx_L1_error)
  79833. __Pyx_GOTREF(__pyx_t_2);
  79834. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  79835. /* "uvloop/handles/stream.pyx":257
  79836. * self._ensure_alive()
  79837. *
  79838. * self._shutdown_req.data = <void*> self # <<<<<<<<<<<<<<
  79839. * err = uv.uv_shutdown(&self._shutdown_req,
  79840. * <uv.uv_stream_t*> self._handle,
  79841. */
  79842. __pyx_v_self->_shutdown_req.data = ((void *)__pyx_v_self);
  79843. /* "uvloop/handles/stream.pyx":258
  79844. *
  79845. * self._shutdown_req.data = <void*> self
  79846. * err = uv.uv_shutdown(&self._shutdown_req, # <<<<<<<<<<<<<<
  79847. * <uv.uv_stream_t*> self._handle,
  79848. * __uv_stream_on_shutdown)
  79849. */
  79850. __pyx_v_err = uv_shutdown((&__pyx_v_self->_shutdown_req), ((uv_stream_t *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._handle), __pyx_f_6uvloop_4loop___uv_stream_on_shutdown);
  79851. /* "uvloop/handles/stream.pyx":261
  79852. * <uv.uv_stream_t*> self._handle,
  79853. * __uv_stream_on_shutdown)
  79854. * if err < 0: # <<<<<<<<<<<<<<
  79855. * exc = convert_error(err)
  79856. * self._fatal_error(exc, True)
  79857. */
  79858. __pyx_t_1 = ((__pyx_v_err < 0) != 0);
  79859. if (__pyx_t_1) {
  79860. /* "uvloop/handles/stream.pyx":262
  79861. * __uv_stream_on_shutdown)
  79862. * if err < 0:
  79863. * exc = convert_error(err) # <<<<<<<<<<<<<<
  79864. * self._fatal_error(exc, True)
  79865. * return
  79866. */
  79867. __pyx_t_2 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 262, __pyx_L1_error)
  79868. __Pyx_GOTREF(__pyx_t_2);
  79869. __pyx_v_exc = __pyx_t_2;
  79870. __pyx_t_2 = 0;
  79871. /* "uvloop/handles/stream.pyx":263
  79872. * if err < 0:
  79873. * exc = convert_error(err)
  79874. * self._fatal_error(exc, True) # <<<<<<<<<<<<<<
  79875. * return
  79876. *
  79877. */
  79878. __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._fatal_error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self), __pyx_v_exc, Py_True, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 263, __pyx_L1_error)
  79879. __Pyx_GOTREF(__pyx_t_2);
  79880. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  79881. /* "uvloop/handles/stream.pyx":264
  79882. * exc = convert_error(err)
  79883. * self._fatal_error(exc, True)
  79884. * return # <<<<<<<<<<<<<<
  79885. *
  79886. * cdef inline _accept(self, UVStream server):
  79887. */
  79888. __Pyx_XDECREF(__pyx_r);
  79889. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  79890. goto __pyx_L0;
  79891. /* "uvloop/handles/stream.pyx":261
  79892. * <uv.uv_stream_t*> self._handle,
  79893. * __uv_stream_on_shutdown)
  79894. * if err < 0: # <<<<<<<<<<<<<<
  79895. * exc = convert_error(err)
  79896. * self._fatal_error(exc, True)
  79897. */
  79898. }
  79899. /* "uvloop/handles/stream.pyx":248
  79900. * self.__buffered = 0
  79901. *
  79902. * cdef inline _shutdown(self): # <<<<<<<<<<<<<<
  79903. * cdef int err
  79904. *
  79905. */
  79906. /* function exit code */
  79907. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  79908. goto __pyx_L0;
  79909. __pyx_L1_error:;
  79910. __Pyx_XDECREF(__pyx_t_2);
  79911. __Pyx_AddTraceback("uvloop.loop.UVStream._shutdown", __pyx_clineno, __pyx_lineno, __pyx_filename);
  79912. __pyx_r = 0;
  79913. __pyx_L0:;
  79914. __Pyx_XDECREF(__pyx_v_exc);
  79915. __Pyx_XGIVEREF(__pyx_r);
  79916. __Pyx_RefNannyFinishContext();
  79917. return __pyx_r;
  79918. }
  79919. /* "uvloop/handles/stream.pyx":266
  79920. * return
  79921. *
  79922. * cdef inline _accept(self, UVStream server): # <<<<<<<<<<<<<<
  79923. * cdef int err
  79924. * self._ensure_alive()
  79925. */
  79926. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVStream__accept(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_server) {
  79927. int __pyx_v_err;
  79928. PyObject *__pyx_v_exc = NULL;
  79929. PyObject *__pyx_r = NULL;
  79930. __Pyx_RefNannyDeclarations
  79931. PyObject *__pyx_t_1 = NULL;
  79932. int __pyx_t_2;
  79933. __Pyx_RefNannySetupContext("_accept", 0);
  79934. /* "uvloop/handles/stream.pyx":268
  79935. * cdef inline _accept(self, UVStream server):
  79936. * cdef int err
  79937. * self._ensure_alive() # <<<<<<<<<<<<<<
  79938. *
  79939. * err = uv.uv_accept(<uv.uv_stream_t*>server._handle,
  79940. */
  79941. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._ensure_alive(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 268, __pyx_L1_error)
  79942. __Pyx_GOTREF(__pyx_t_1);
  79943. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  79944. /* "uvloop/handles/stream.pyx":270
  79945. * self._ensure_alive()
  79946. *
  79947. * err = uv.uv_accept(<uv.uv_stream_t*>server._handle, # <<<<<<<<<<<<<<
  79948. * <uv.uv_stream_t*>self._handle)
  79949. * if err < 0:
  79950. */
  79951. __pyx_v_err = uv_accept(((uv_stream_t *)__pyx_v_server->__pyx_base.__pyx_base.__pyx_base._handle), ((uv_stream_t *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._handle));
  79952. /* "uvloop/handles/stream.pyx":272
  79953. * err = uv.uv_accept(<uv.uv_stream_t*>server._handle,
  79954. * <uv.uv_stream_t*>self._handle)
  79955. * if err < 0: # <<<<<<<<<<<<<<
  79956. * exc = convert_error(err)
  79957. * self._fatal_error(exc, True)
  79958. */
  79959. __pyx_t_2 = ((__pyx_v_err < 0) != 0);
  79960. if (__pyx_t_2) {
  79961. /* "uvloop/handles/stream.pyx":273
  79962. * <uv.uv_stream_t*>self._handle)
  79963. * if err < 0:
  79964. * exc = convert_error(err) # <<<<<<<<<<<<<<
  79965. * self._fatal_error(exc, True)
  79966. * return
  79967. */
  79968. __pyx_t_1 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 273, __pyx_L1_error)
  79969. __Pyx_GOTREF(__pyx_t_1);
  79970. __pyx_v_exc = __pyx_t_1;
  79971. __pyx_t_1 = 0;
  79972. /* "uvloop/handles/stream.pyx":274
  79973. * if err < 0:
  79974. * exc = convert_error(err)
  79975. * self._fatal_error(exc, True) # <<<<<<<<<<<<<<
  79976. * return
  79977. *
  79978. */
  79979. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._fatal_error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self), __pyx_v_exc, Py_True, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 274, __pyx_L1_error)
  79980. __Pyx_GOTREF(__pyx_t_1);
  79981. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  79982. /* "uvloop/handles/stream.pyx":275
  79983. * exc = convert_error(err)
  79984. * self._fatal_error(exc, True)
  79985. * return # <<<<<<<<<<<<<<
  79986. *
  79987. * self._on_accept()
  79988. */
  79989. __Pyx_XDECREF(__pyx_r);
  79990. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  79991. goto __pyx_L0;
  79992. /* "uvloop/handles/stream.pyx":272
  79993. * err = uv.uv_accept(<uv.uv_stream_t*>server._handle,
  79994. * <uv.uv_stream_t*>self._handle)
  79995. * if err < 0: # <<<<<<<<<<<<<<
  79996. * exc = convert_error(err)
  79997. * self._fatal_error(exc, True)
  79998. */
  79999. }
  80000. /* "uvloop/handles/stream.pyx":277
  80001. * return
  80002. *
  80003. * self._on_accept() # <<<<<<<<<<<<<<
  80004. *
  80005. * cdef inline _close_on_read_error(self):
  80006. */
  80007. __pyx_t_1 = __pyx_f_6uvloop_4loop_8UVStream__on_accept(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 277, __pyx_L1_error)
  80008. __Pyx_GOTREF(__pyx_t_1);
  80009. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  80010. /* "uvloop/handles/stream.pyx":266
  80011. * return
  80012. *
  80013. * cdef inline _accept(self, UVStream server): # <<<<<<<<<<<<<<
  80014. * cdef int err
  80015. * self._ensure_alive()
  80016. */
  80017. /* function exit code */
  80018. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  80019. goto __pyx_L0;
  80020. __pyx_L1_error:;
  80021. __Pyx_XDECREF(__pyx_t_1);
  80022. __Pyx_AddTraceback("uvloop.loop.UVStream._accept", __pyx_clineno, __pyx_lineno, __pyx_filename);
  80023. __pyx_r = 0;
  80024. __pyx_L0:;
  80025. __Pyx_XDECREF(__pyx_v_exc);
  80026. __Pyx_XGIVEREF(__pyx_r);
  80027. __Pyx_RefNannyFinishContext();
  80028. return __pyx_r;
  80029. }
  80030. /* "uvloop/handles/stream.pyx":279
  80031. * self._on_accept()
  80032. *
  80033. * cdef inline _close_on_read_error(self): # <<<<<<<<<<<<<<
  80034. * self.__read_error_close = 1
  80035. *
  80036. */
  80037. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVStream__close_on_read_error(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self) {
  80038. PyObject *__pyx_r = NULL;
  80039. __Pyx_RefNannyDeclarations
  80040. __Pyx_RefNannySetupContext("_close_on_read_error", 0);
  80041. /* "uvloop/handles/stream.pyx":280
  80042. *
  80043. * cdef inline _close_on_read_error(self):
  80044. * self.__read_error_close = 1 # <<<<<<<<<<<<<<
  80045. *
  80046. * cdef bint _is_reading(self):
  80047. */
  80048. __pyx_v_self->__pyx___read_error_close = 1;
  80049. /* "uvloop/handles/stream.pyx":279
  80050. * self._on_accept()
  80051. *
  80052. * cdef inline _close_on_read_error(self): # <<<<<<<<<<<<<<
  80053. * self.__read_error_close = 1
  80054. *
  80055. */
  80056. /* function exit code */
  80057. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  80058. __Pyx_XGIVEREF(__pyx_r);
  80059. __Pyx_RefNannyFinishContext();
  80060. return __pyx_r;
  80061. }
  80062. /* "uvloop/handles/stream.pyx":282
  80063. * self.__read_error_close = 1
  80064. *
  80065. * cdef bint _is_reading(self): # <<<<<<<<<<<<<<
  80066. * return self.__reading
  80067. *
  80068. */
  80069. static int __pyx_f_6uvloop_4loop_8UVStream__is_reading(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self) {
  80070. int __pyx_r;
  80071. __Pyx_RefNannyDeclarations
  80072. __Pyx_RefNannySetupContext("_is_reading", 0);
  80073. /* "uvloop/handles/stream.pyx":283
  80074. *
  80075. * cdef bint _is_reading(self):
  80076. * return self.__reading # <<<<<<<<<<<<<<
  80077. *
  80078. * cdef _start_reading(self):
  80079. */
  80080. __pyx_r = __pyx_v_self->__pyx___reading;
  80081. goto __pyx_L0;
  80082. /* "uvloop/handles/stream.pyx":282
  80083. * self.__read_error_close = 1
  80084. *
  80085. * cdef bint _is_reading(self): # <<<<<<<<<<<<<<
  80086. * return self.__reading
  80087. *
  80088. */
  80089. /* function exit code */
  80090. __pyx_L0:;
  80091. __Pyx_RefNannyFinishContext();
  80092. return __pyx_r;
  80093. }
  80094. /* "uvloop/handles/stream.pyx":285
  80095. * return self.__reading
  80096. *
  80097. * cdef _start_reading(self): # <<<<<<<<<<<<<<
  80098. * cdef int err
  80099. *
  80100. */
  80101. static PyObject *__pyx_f_6uvloop_4loop_8UVStream__start_reading(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self) {
  80102. int __pyx_v_err;
  80103. PyObject *__pyx_v_exc = NULL;
  80104. PyObject *__pyx_r = NULL;
  80105. __Pyx_RefNannyDeclarations
  80106. int __pyx_t_1;
  80107. PyObject *__pyx_t_2 = NULL;
  80108. __Pyx_RefNannySetupContext("_start_reading", 0);
  80109. /* "uvloop/handles/stream.pyx":288
  80110. * cdef int err
  80111. *
  80112. * if self._closing: # <<<<<<<<<<<<<<
  80113. * return
  80114. *
  80115. */
  80116. __pyx_t_1 = (__pyx_v_self->__pyx_base._closing != 0);
  80117. if (__pyx_t_1) {
  80118. /* "uvloop/handles/stream.pyx":289
  80119. *
  80120. * if self._closing:
  80121. * return # <<<<<<<<<<<<<<
  80122. *
  80123. * self._ensure_alive()
  80124. */
  80125. __Pyx_XDECREF(__pyx_r);
  80126. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  80127. goto __pyx_L0;
  80128. /* "uvloop/handles/stream.pyx":288
  80129. * cdef int err
  80130. *
  80131. * if self._closing: # <<<<<<<<<<<<<<
  80132. * return
  80133. *
  80134. */
  80135. }
  80136. /* "uvloop/handles/stream.pyx":291
  80137. * return
  80138. *
  80139. * self._ensure_alive() # <<<<<<<<<<<<<<
  80140. *
  80141. * if self.__reading:
  80142. */
  80143. __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._ensure_alive(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 291, __pyx_L1_error)
  80144. __Pyx_GOTREF(__pyx_t_2);
  80145. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  80146. /* "uvloop/handles/stream.pyx":293
  80147. * self._ensure_alive()
  80148. *
  80149. * if self.__reading: # <<<<<<<<<<<<<<
  80150. * return
  80151. *
  80152. */
  80153. __pyx_t_1 = (__pyx_v_self->__pyx___reading != 0);
  80154. if (__pyx_t_1) {
  80155. /* "uvloop/handles/stream.pyx":294
  80156. *
  80157. * if self.__reading:
  80158. * return # <<<<<<<<<<<<<<
  80159. *
  80160. * if self.__buffered:
  80161. */
  80162. __Pyx_XDECREF(__pyx_r);
  80163. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  80164. goto __pyx_L0;
  80165. /* "uvloop/handles/stream.pyx":293
  80166. * self._ensure_alive()
  80167. *
  80168. * if self.__reading: # <<<<<<<<<<<<<<
  80169. * return
  80170. *
  80171. */
  80172. }
  80173. /* "uvloop/handles/stream.pyx":296
  80174. * return
  80175. *
  80176. * if self.__buffered: # <<<<<<<<<<<<<<
  80177. * err = uv.uv_read_start(<uv.uv_stream_t*>self._handle,
  80178. * __uv_stream_buffered_alloc,
  80179. */
  80180. __pyx_t_1 = (__pyx_v_self->__pyx___buffered != 0);
  80181. if (__pyx_t_1) {
  80182. /* "uvloop/handles/stream.pyx":297
  80183. *
  80184. * if self.__buffered:
  80185. * err = uv.uv_read_start(<uv.uv_stream_t*>self._handle, # <<<<<<<<<<<<<<
  80186. * __uv_stream_buffered_alloc,
  80187. * __uv_stream_buffered_on_read)
  80188. */
  80189. __pyx_v_err = uv_read_start(((uv_stream_t *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._handle), __pyx_f_6uvloop_4loop___uv_stream_buffered_alloc, __pyx_f_6uvloop_4loop___uv_stream_buffered_on_read);
  80190. /* "uvloop/handles/stream.pyx":296
  80191. * return
  80192. *
  80193. * if self.__buffered: # <<<<<<<<<<<<<<
  80194. * err = uv.uv_read_start(<uv.uv_stream_t*>self._handle,
  80195. * __uv_stream_buffered_alloc,
  80196. */
  80197. goto __pyx_L5;
  80198. }
  80199. /* "uvloop/handles/stream.pyx":301
  80200. * __uv_stream_buffered_on_read)
  80201. * else:
  80202. * err = uv.uv_read_start(<uv.uv_stream_t*>self._handle, # <<<<<<<<<<<<<<
  80203. * __loop_alloc_buffer,
  80204. * __uv_stream_on_read)
  80205. */
  80206. /*else*/ {
  80207. /* "uvloop/handles/stream.pyx":303
  80208. * err = uv.uv_read_start(<uv.uv_stream_t*>self._handle,
  80209. * __loop_alloc_buffer,
  80210. * __uv_stream_on_read) # <<<<<<<<<<<<<<
  80211. * if err < 0:
  80212. * exc = convert_error(err)
  80213. */
  80214. __pyx_v_err = uv_read_start(((uv_stream_t *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._handle), __pyx_f_6uvloop_4loop___loop_alloc_buffer, __pyx_f_6uvloop_4loop___uv_stream_on_read);
  80215. }
  80216. __pyx_L5:;
  80217. /* "uvloop/handles/stream.pyx":304
  80218. * __loop_alloc_buffer,
  80219. * __uv_stream_on_read)
  80220. * if err < 0: # <<<<<<<<<<<<<<
  80221. * exc = convert_error(err)
  80222. * self._fatal_error(exc, True)
  80223. */
  80224. __pyx_t_1 = ((__pyx_v_err < 0) != 0);
  80225. if (__pyx_t_1) {
  80226. /* "uvloop/handles/stream.pyx":305
  80227. * __uv_stream_on_read)
  80228. * if err < 0:
  80229. * exc = convert_error(err) # <<<<<<<<<<<<<<
  80230. * self._fatal_error(exc, True)
  80231. * return
  80232. */
  80233. __pyx_t_2 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 305, __pyx_L1_error)
  80234. __Pyx_GOTREF(__pyx_t_2);
  80235. __pyx_v_exc = __pyx_t_2;
  80236. __pyx_t_2 = 0;
  80237. /* "uvloop/handles/stream.pyx":306
  80238. * if err < 0:
  80239. * exc = convert_error(err)
  80240. * self._fatal_error(exc, True) # <<<<<<<<<<<<<<
  80241. * return
  80242. * else:
  80243. */
  80244. __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._fatal_error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self), __pyx_v_exc, Py_True, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 306, __pyx_L1_error)
  80245. __Pyx_GOTREF(__pyx_t_2);
  80246. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  80247. /* "uvloop/handles/stream.pyx":307
  80248. * exc = convert_error(err)
  80249. * self._fatal_error(exc, True)
  80250. * return # <<<<<<<<<<<<<<
  80251. * else:
  80252. * # UVStream must live until the read callback is called
  80253. */
  80254. __Pyx_XDECREF(__pyx_r);
  80255. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  80256. goto __pyx_L0;
  80257. /* "uvloop/handles/stream.pyx":304
  80258. * __loop_alloc_buffer,
  80259. * __uv_stream_on_read)
  80260. * if err < 0: # <<<<<<<<<<<<<<
  80261. * exc = convert_error(err)
  80262. * self._fatal_error(exc, True)
  80263. */
  80264. }
  80265. /* "uvloop/handles/stream.pyx":310
  80266. * else:
  80267. * # UVStream must live until the read callback is called
  80268. * self.__reading_started() # <<<<<<<<<<<<<<
  80269. *
  80270. * cdef inline __reading_started(self):
  80271. */
  80272. /*else*/ {
  80273. __pyx_t_2 = __pyx_f_6uvloop_4loop_8UVStream___reading_started(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 310, __pyx_L1_error)
  80274. __Pyx_GOTREF(__pyx_t_2);
  80275. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  80276. }
  80277. /* "uvloop/handles/stream.pyx":285
  80278. * return self.__reading
  80279. *
  80280. * cdef _start_reading(self): # <<<<<<<<<<<<<<
  80281. * cdef int err
  80282. *
  80283. */
  80284. /* function exit code */
  80285. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  80286. goto __pyx_L0;
  80287. __pyx_L1_error:;
  80288. __Pyx_XDECREF(__pyx_t_2);
  80289. __Pyx_AddTraceback("uvloop.loop.UVStream._start_reading", __pyx_clineno, __pyx_lineno, __pyx_filename);
  80290. __pyx_r = 0;
  80291. __pyx_L0:;
  80292. __Pyx_XDECREF(__pyx_v_exc);
  80293. __Pyx_XGIVEREF(__pyx_r);
  80294. __Pyx_RefNannyFinishContext();
  80295. return __pyx_r;
  80296. }
  80297. /* "uvloop/handles/stream.pyx":312
  80298. * self.__reading_started()
  80299. *
  80300. * cdef inline __reading_started(self): # <<<<<<<<<<<<<<
  80301. * if self.__reading:
  80302. * return
  80303. */
  80304. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVStream___reading_started(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self) {
  80305. PyObject *__pyx_r = NULL;
  80306. __Pyx_RefNannyDeclarations
  80307. int __pyx_t_1;
  80308. __Pyx_RefNannySetupContext("__reading_started", 0);
  80309. /* "uvloop/handles/stream.pyx":313
  80310. *
  80311. * cdef inline __reading_started(self):
  80312. * if self.__reading: # <<<<<<<<<<<<<<
  80313. * return
  80314. * self.__reading = 1
  80315. */
  80316. __pyx_t_1 = (__pyx_v_self->__pyx___reading != 0);
  80317. if (__pyx_t_1) {
  80318. /* "uvloop/handles/stream.pyx":314
  80319. * cdef inline __reading_started(self):
  80320. * if self.__reading:
  80321. * return # <<<<<<<<<<<<<<
  80322. * self.__reading = 1
  80323. * Py_INCREF(self)
  80324. */
  80325. __Pyx_XDECREF(__pyx_r);
  80326. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  80327. goto __pyx_L0;
  80328. /* "uvloop/handles/stream.pyx":313
  80329. *
  80330. * cdef inline __reading_started(self):
  80331. * if self.__reading: # <<<<<<<<<<<<<<
  80332. * return
  80333. * self.__reading = 1
  80334. */
  80335. }
  80336. /* "uvloop/handles/stream.pyx":315
  80337. * if self.__reading:
  80338. * return
  80339. * self.__reading = 1 # <<<<<<<<<<<<<<
  80340. * Py_INCREF(self)
  80341. *
  80342. */
  80343. __pyx_v_self->__pyx___reading = 1;
  80344. /* "uvloop/handles/stream.pyx":316
  80345. * return
  80346. * self.__reading = 1
  80347. * Py_INCREF(self) # <<<<<<<<<<<<<<
  80348. *
  80349. * cdef inline __reading_stopped(self):
  80350. */
  80351. Py_INCREF(((PyObject *)__pyx_v_self));
  80352. /* "uvloop/handles/stream.pyx":312
  80353. * self.__reading_started()
  80354. *
  80355. * cdef inline __reading_started(self): # <<<<<<<<<<<<<<
  80356. * if self.__reading:
  80357. * return
  80358. */
  80359. /* function exit code */
  80360. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  80361. __pyx_L0:;
  80362. __Pyx_XGIVEREF(__pyx_r);
  80363. __Pyx_RefNannyFinishContext();
  80364. return __pyx_r;
  80365. }
  80366. /* "uvloop/handles/stream.pyx":318
  80367. * Py_INCREF(self)
  80368. *
  80369. * cdef inline __reading_stopped(self): # <<<<<<<<<<<<<<
  80370. * if not self.__reading:
  80371. * return
  80372. */
  80373. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVStream___reading_stopped(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self) {
  80374. PyObject *__pyx_r = NULL;
  80375. __Pyx_RefNannyDeclarations
  80376. int __pyx_t_1;
  80377. __Pyx_RefNannySetupContext("__reading_stopped", 0);
  80378. /* "uvloop/handles/stream.pyx":319
  80379. *
  80380. * cdef inline __reading_stopped(self):
  80381. * if not self.__reading: # <<<<<<<<<<<<<<
  80382. * return
  80383. * self.__reading = 0
  80384. */
  80385. __pyx_t_1 = ((!(__pyx_v_self->__pyx___reading != 0)) != 0);
  80386. if (__pyx_t_1) {
  80387. /* "uvloop/handles/stream.pyx":320
  80388. * cdef inline __reading_stopped(self):
  80389. * if not self.__reading:
  80390. * return # <<<<<<<<<<<<<<
  80391. * self.__reading = 0
  80392. * Py_DECREF(self)
  80393. */
  80394. __Pyx_XDECREF(__pyx_r);
  80395. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  80396. goto __pyx_L0;
  80397. /* "uvloop/handles/stream.pyx":319
  80398. *
  80399. * cdef inline __reading_stopped(self):
  80400. * if not self.__reading: # <<<<<<<<<<<<<<
  80401. * return
  80402. * self.__reading = 0
  80403. */
  80404. }
  80405. /* "uvloop/handles/stream.pyx":321
  80406. * if not self.__reading:
  80407. * return
  80408. * self.__reading = 0 # <<<<<<<<<<<<<<
  80409. * Py_DECREF(self)
  80410. *
  80411. */
  80412. __pyx_v_self->__pyx___reading = 0;
  80413. /* "uvloop/handles/stream.pyx":322
  80414. * return
  80415. * self.__reading = 0
  80416. * Py_DECREF(self) # <<<<<<<<<<<<<<
  80417. *
  80418. * cdef _stop_reading(self):
  80419. */
  80420. Py_DECREF(((PyObject *)__pyx_v_self));
  80421. /* "uvloop/handles/stream.pyx":318
  80422. * Py_INCREF(self)
  80423. *
  80424. * cdef inline __reading_stopped(self): # <<<<<<<<<<<<<<
  80425. * if not self.__reading:
  80426. * return
  80427. */
  80428. /* function exit code */
  80429. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  80430. __pyx_L0:;
  80431. __Pyx_XGIVEREF(__pyx_r);
  80432. __Pyx_RefNannyFinishContext();
  80433. return __pyx_r;
  80434. }
  80435. /* "uvloop/handles/stream.pyx":324
  80436. * Py_DECREF(self)
  80437. *
  80438. * cdef _stop_reading(self): # <<<<<<<<<<<<<<
  80439. * cdef int err
  80440. *
  80441. */
  80442. static PyObject *__pyx_f_6uvloop_4loop_8UVStream__stop_reading(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self) {
  80443. int __pyx_v_err;
  80444. PyObject *__pyx_v_exc = NULL;
  80445. PyObject *__pyx_r = NULL;
  80446. __Pyx_RefNannyDeclarations
  80447. int __pyx_t_1;
  80448. PyObject *__pyx_t_2 = NULL;
  80449. __Pyx_RefNannySetupContext("_stop_reading", 0);
  80450. /* "uvloop/handles/stream.pyx":327
  80451. * cdef int err
  80452. *
  80453. * if not self.__reading: # <<<<<<<<<<<<<<
  80454. * return
  80455. *
  80456. */
  80457. __pyx_t_1 = ((!(__pyx_v_self->__pyx___reading != 0)) != 0);
  80458. if (__pyx_t_1) {
  80459. /* "uvloop/handles/stream.pyx":328
  80460. *
  80461. * if not self.__reading:
  80462. * return # <<<<<<<<<<<<<<
  80463. *
  80464. * self._ensure_alive()
  80465. */
  80466. __Pyx_XDECREF(__pyx_r);
  80467. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  80468. goto __pyx_L0;
  80469. /* "uvloop/handles/stream.pyx":327
  80470. * cdef int err
  80471. *
  80472. * if not self.__reading: # <<<<<<<<<<<<<<
  80473. * return
  80474. *
  80475. */
  80476. }
  80477. /* "uvloop/handles/stream.pyx":330
  80478. * return
  80479. *
  80480. * self._ensure_alive() # <<<<<<<<<<<<<<
  80481. *
  80482. * # From libuv docs:
  80483. */
  80484. __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._ensure_alive(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 330, __pyx_L1_error)
  80485. __Pyx_GOTREF(__pyx_t_2);
  80486. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  80487. /* "uvloop/handles/stream.pyx":335
  80488. * # This function is idempotent and may be safely
  80489. * # called on a stopped stream.
  80490. * err = uv.uv_read_stop(<uv.uv_stream_t*>self._handle) # <<<<<<<<<<<<<<
  80491. * if err < 0:
  80492. * exc = convert_error(err)
  80493. */
  80494. __pyx_v_err = uv_read_stop(((uv_stream_t *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._handle));
  80495. /* "uvloop/handles/stream.pyx":336
  80496. * # called on a stopped stream.
  80497. * err = uv.uv_read_stop(<uv.uv_stream_t*>self._handle)
  80498. * if err < 0: # <<<<<<<<<<<<<<
  80499. * exc = convert_error(err)
  80500. * self._fatal_error(exc, True)
  80501. */
  80502. __pyx_t_1 = ((__pyx_v_err < 0) != 0);
  80503. if (__pyx_t_1) {
  80504. /* "uvloop/handles/stream.pyx":337
  80505. * err = uv.uv_read_stop(<uv.uv_stream_t*>self._handle)
  80506. * if err < 0:
  80507. * exc = convert_error(err) # <<<<<<<<<<<<<<
  80508. * self._fatal_error(exc, True)
  80509. * return
  80510. */
  80511. __pyx_t_2 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 337, __pyx_L1_error)
  80512. __Pyx_GOTREF(__pyx_t_2);
  80513. __pyx_v_exc = __pyx_t_2;
  80514. __pyx_t_2 = 0;
  80515. /* "uvloop/handles/stream.pyx":338
  80516. * if err < 0:
  80517. * exc = convert_error(err)
  80518. * self._fatal_error(exc, True) # <<<<<<<<<<<<<<
  80519. * return
  80520. * else:
  80521. */
  80522. __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._fatal_error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self), __pyx_v_exc, Py_True, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 338, __pyx_L1_error)
  80523. __Pyx_GOTREF(__pyx_t_2);
  80524. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  80525. /* "uvloop/handles/stream.pyx":339
  80526. * exc = convert_error(err)
  80527. * self._fatal_error(exc, True)
  80528. * return # <<<<<<<<<<<<<<
  80529. * else:
  80530. * self.__reading_stopped()
  80531. */
  80532. __Pyx_XDECREF(__pyx_r);
  80533. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  80534. goto __pyx_L0;
  80535. /* "uvloop/handles/stream.pyx":336
  80536. * # called on a stopped stream.
  80537. * err = uv.uv_read_stop(<uv.uv_stream_t*>self._handle)
  80538. * if err < 0: # <<<<<<<<<<<<<<
  80539. * exc = convert_error(err)
  80540. * self._fatal_error(exc, True)
  80541. */
  80542. }
  80543. /* "uvloop/handles/stream.pyx":341
  80544. * return
  80545. * else:
  80546. * self.__reading_stopped() # <<<<<<<<<<<<<<
  80547. *
  80548. * cdef inline _try_write(self, object data):
  80549. */
  80550. /*else*/ {
  80551. __pyx_t_2 = __pyx_f_6uvloop_4loop_8UVStream___reading_stopped(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 341, __pyx_L1_error)
  80552. __Pyx_GOTREF(__pyx_t_2);
  80553. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  80554. }
  80555. /* "uvloop/handles/stream.pyx":324
  80556. * Py_DECREF(self)
  80557. *
  80558. * cdef _stop_reading(self): # <<<<<<<<<<<<<<
  80559. * cdef int err
  80560. *
  80561. */
  80562. /* function exit code */
  80563. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  80564. goto __pyx_L0;
  80565. __pyx_L1_error:;
  80566. __Pyx_XDECREF(__pyx_t_2);
  80567. __Pyx_AddTraceback("uvloop.loop.UVStream._stop_reading", __pyx_clineno, __pyx_lineno, __pyx_filename);
  80568. __pyx_r = 0;
  80569. __pyx_L0:;
  80570. __Pyx_XDECREF(__pyx_v_exc);
  80571. __Pyx_XGIVEREF(__pyx_r);
  80572. __Pyx_RefNannyFinishContext();
  80573. return __pyx_r;
  80574. }
  80575. /* "uvloop/handles/stream.pyx":343
  80576. * self.__reading_stopped()
  80577. *
  80578. * cdef inline _try_write(self, object data): # <<<<<<<<<<<<<<
  80579. * cdef:
  80580. * ssize_t written
  80581. */
  80582. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVStream__try_write(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self, PyObject *__pyx_v_data) {
  80583. Py_ssize_t __pyx_v_written;
  80584. int __pyx_v_used_buf;
  80585. Py_buffer __pyx_v_py_buf;
  80586. void *__pyx_v_buf;
  80587. size_t __pyx_v_blen;
  80588. int __pyx_v_saved_errno;
  80589. int __pyx_v_fd;
  80590. PyObject *__pyx_v_exc = NULL;
  80591. PyObject *__pyx_r = NULL;
  80592. __Pyx_RefNannyDeclarations
  80593. int __pyx_t_1;
  80594. PyObject *__pyx_t_2 = NULL;
  80595. int __pyx_t_3;
  80596. void *__pyx_t_4;
  80597. Py_ssize_t __pyx_t_5;
  80598. int __pyx_t_6;
  80599. struct __pyx_obj_6uvloop_4loop_Loop *__pyx_t_7 = NULL;
  80600. __Pyx_RefNannySetupContext("_try_write", 0);
  80601. /* "uvloop/handles/stream.pyx":346
  80602. * cdef:
  80603. * ssize_t written
  80604. * bint used_buf = 0 # <<<<<<<<<<<<<<
  80605. * Py_buffer py_buf
  80606. * void* buf
  80607. */
  80608. __pyx_v_used_buf = 0;
  80609. /* "uvloop/handles/stream.pyx":353
  80610. * int fd
  80611. *
  80612. * if (<uv.uv_stream_t*>self._handle).write_queue_size != 0: # <<<<<<<<<<<<<<
  80613. * raise RuntimeError(
  80614. * 'UVStream._try_write called with data in uv buffers')
  80615. */
  80616. __pyx_t_1 = ((((uv_stream_t *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._handle)->write_queue_size != 0) != 0);
  80617. if (unlikely(__pyx_t_1)) {
  80618. /* "uvloop/handles/stream.pyx":354
  80619. *
  80620. * if (<uv.uv_stream_t*>self._handle).write_queue_size != 0:
  80621. * raise RuntimeError( # <<<<<<<<<<<<<<
  80622. * 'UVStream._try_write called with data in uv buffers')
  80623. *
  80624. */
  80625. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__133, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 354, __pyx_L1_error)
  80626. __Pyx_GOTREF(__pyx_t_2);
  80627. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  80628. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  80629. __PYX_ERR(18, 354, __pyx_L1_error)
  80630. /* "uvloop/handles/stream.pyx":353
  80631. * int fd
  80632. *
  80633. * if (<uv.uv_stream_t*>self._handle).write_queue_size != 0: # <<<<<<<<<<<<<<
  80634. * raise RuntimeError(
  80635. * 'UVStream._try_write called with data in uv buffers')
  80636. */
  80637. }
  80638. /* "uvloop/handles/stream.pyx":357
  80639. * 'UVStream._try_write called with data in uv buffers')
  80640. *
  80641. * if PyBytes_CheckExact(data): # <<<<<<<<<<<<<<
  80642. * # We can only use this hack for bytes since it's
  80643. * # immutable. For everything else it is only safe to
  80644. */
  80645. __pyx_t_1 = (PyBytes_CheckExact(__pyx_v_data) != 0);
  80646. if (__pyx_t_1) {
  80647. /* "uvloop/handles/stream.pyx":361
  80648. * # immutable. For everything else it is only safe to
  80649. * # use buffer protocol.
  80650. * buf = <void*>PyBytes_AS_STRING(data) # <<<<<<<<<<<<<<
  80651. * blen = Py_SIZE(data)
  80652. * else:
  80653. */
  80654. __pyx_v_buf = ((void *)PyBytes_AS_STRING(__pyx_v_data));
  80655. /* "uvloop/handles/stream.pyx":362
  80656. * # use buffer protocol.
  80657. * buf = <void*>PyBytes_AS_STRING(data)
  80658. * blen = Py_SIZE(data) # <<<<<<<<<<<<<<
  80659. * else:
  80660. * PyObject_GetBuffer(data, &py_buf, PyBUF_SIMPLE)
  80661. */
  80662. __pyx_v_blen = Py_SIZE(__pyx_v_data);
  80663. /* "uvloop/handles/stream.pyx":357
  80664. * 'UVStream._try_write called with data in uv buffers')
  80665. *
  80666. * if PyBytes_CheckExact(data): # <<<<<<<<<<<<<<
  80667. * # We can only use this hack for bytes since it's
  80668. * # immutable. For everything else it is only safe to
  80669. */
  80670. goto __pyx_L4;
  80671. }
  80672. /* "uvloop/handles/stream.pyx":364
  80673. * blen = Py_SIZE(data)
  80674. * else:
  80675. * PyObject_GetBuffer(data, &py_buf, PyBUF_SIMPLE) # <<<<<<<<<<<<<<
  80676. * used_buf = 1
  80677. * buf = py_buf.buf
  80678. */
  80679. /*else*/ {
  80680. __pyx_t_3 = PyObject_GetBuffer(__pyx_v_data, (&__pyx_v_py_buf), PyBUF_SIMPLE); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(18, 364, __pyx_L1_error)
  80681. /* "uvloop/handles/stream.pyx":365
  80682. * else:
  80683. * PyObject_GetBuffer(data, &py_buf, PyBUF_SIMPLE)
  80684. * used_buf = 1 # <<<<<<<<<<<<<<
  80685. * buf = py_buf.buf
  80686. * blen = py_buf.len
  80687. */
  80688. __pyx_v_used_buf = 1;
  80689. /* "uvloop/handles/stream.pyx":366
  80690. * PyObject_GetBuffer(data, &py_buf, PyBUF_SIMPLE)
  80691. * used_buf = 1
  80692. * buf = py_buf.buf # <<<<<<<<<<<<<<
  80693. * blen = py_buf.len
  80694. *
  80695. */
  80696. __pyx_t_4 = __pyx_v_py_buf.buf;
  80697. __pyx_v_buf = __pyx_t_4;
  80698. /* "uvloop/handles/stream.pyx":367
  80699. * used_buf = 1
  80700. * buf = py_buf.buf
  80701. * blen = py_buf.len # <<<<<<<<<<<<<<
  80702. *
  80703. * if blen == 0:
  80704. */
  80705. __pyx_t_5 = __pyx_v_py_buf.len;
  80706. __pyx_v_blen = __pyx_t_5;
  80707. }
  80708. __pyx_L4:;
  80709. /* "uvloop/handles/stream.pyx":369
  80710. * blen = py_buf.len
  80711. *
  80712. * if blen == 0: # <<<<<<<<<<<<<<
  80713. * # Empty data, do nothing.
  80714. * return 0
  80715. */
  80716. __pyx_t_1 = ((__pyx_v_blen == 0) != 0);
  80717. if (__pyx_t_1) {
  80718. /* "uvloop/handles/stream.pyx":371
  80719. * if blen == 0:
  80720. * # Empty data, do nothing.
  80721. * return 0 # <<<<<<<<<<<<<<
  80722. *
  80723. * fd = self._fileno()
  80724. */
  80725. __Pyx_XDECREF(__pyx_r);
  80726. __Pyx_INCREF(__pyx_int_0);
  80727. __pyx_r = __pyx_int_0;
  80728. goto __pyx_L0;
  80729. /* "uvloop/handles/stream.pyx":369
  80730. * blen = py_buf.len
  80731. *
  80732. * if blen == 0: # <<<<<<<<<<<<<<
  80733. * # Empty data, do nothing.
  80734. * return 0
  80735. */
  80736. }
  80737. /* "uvloop/handles/stream.pyx":373
  80738. * return 0
  80739. *
  80740. * fd = self._fileno() # <<<<<<<<<<<<<<
  80741. * # Use `unistd.h/write` directly, it's faster than
  80742. * # uv_try_write -- less layers of code. The error
  80743. */
  80744. __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._fileno(((struct __pyx_obj_6uvloop_4loop_UVSocketHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 373, __pyx_L1_error)
  80745. __Pyx_GOTREF(__pyx_t_2);
  80746. __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(18, 373, __pyx_L1_error)
  80747. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  80748. __pyx_v_fd = __pyx_t_3;
  80749. /* "uvloop/handles/stream.pyx":377
  80750. * # uv_try_write -- less layers of code. The error
  80751. * # checking logic is copied from libuv.
  80752. * written = system.write(fd, buf, blen) # <<<<<<<<<<<<<<
  80753. * while written == -1 and (
  80754. * errno.errno == errno.EINTR or
  80755. */
  80756. __pyx_v_written = write(__pyx_v_fd, __pyx_v_buf, __pyx_v_blen);
  80757. /* "uvloop/handles/stream.pyx":378
  80758. * # checking logic is copied from libuv.
  80759. * written = system.write(fd, buf, blen)
  80760. * while written == -1 and ( # <<<<<<<<<<<<<<
  80761. * errno.errno == errno.EINTR or
  80762. * (system.PLATFORM_IS_APPLE and
  80763. */
  80764. while (1) {
  80765. __pyx_t_6 = ((__pyx_v_written == -1L) != 0);
  80766. if (__pyx_t_6) {
  80767. } else {
  80768. __pyx_t_1 = __pyx_t_6;
  80769. goto __pyx_L8_bool_binop_done;
  80770. }
  80771. /* "uvloop/handles/stream.pyx":379
  80772. * written = system.write(fd, buf, blen)
  80773. * while written == -1 and (
  80774. * errno.errno == errno.EINTR or # <<<<<<<<<<<<<<
  80775. * (system.PLATFORM_IS_APPLE and
  80776. * errno.errno == errno.EPROTOTYPE)):
  80777. */
  80778. __pyx_t_6 = ((errno == EINTR) != 0);
  80779. if (!__pyx_t_6) {
  80780. } else {
  80781. __pyx_t_1 = __pyx_t_6;
  80782. goto __pyx_L8_bool_binop_done;
  80783. }
  80784. /* "uvloop/handles/stream.pyx":380
  80785. * while written == -1 and (
  80786. * errno.errno == errno.EINTR or
  80787. * (system.PLATFORM_IS_APPLE and # <<<<<<<<<<<<<<
  80788. * errno.errno == errno.EPROTOTYPE)):
  80789. * # From libuv code (unix/stream.c):
  80790. */
  80791. __pyx_t_6 = (PLATFORM_IS_APPLE != 0);
  80792. if (__pyx_t_6) {
  80793. } else {
  80794. __pyx_t_1 = __pyx_t_6;
  80795. goto __pyx_L8_bool_binop_done;
  80796. }
  80797. /* "uvloop/handles/stream.pyx":381
  80798. * errno.errno == errno.EINTR or
  80799. * (system.PLATFORM_IS_APPLE and
  80800. * errno.errno == errno.EPROTOTYPE)): # <<<<<<<<<<<<<<
  80801. * # From libuv code (unix/stream.c):
  80802. * # Due to a possible kernel bug at least in OS X 10.10 "Yosemite",
  80803. */
  80804. __pyx_t_6 = ((errno == EPROTOTYPE) != 0);
  80805. __pyx_t_1 = __pyx_t_6;
  80806. __pyx_L8_bool_binop_done:;
  80807. if (!__pyx_t_1) break;
  80808. /* "uvloop/handles/stream.pyx":387
  80809. * # that is shutting down. If we retry the write, we should get
  80810. * # the expected EPIPE instead.
  80811. * written = system.write(fd, buf, blen) # <<<<<<<<<<<<<<
  80812. * saved_errno = errno.errno
  80813. *
  80814. */
  80815. __pyx_v_written = write(__pyx_v_fd, __pyx_v_buf, __pyx_v_blen);
  80816. }
  80817. /* "uvloop/handles/stream.pyx":388
  80818. * # the expected EPIPE instead.
  80819. * written = system.write(fd, buf, blen)
  80820. * saved_errno = errno.errno # <<<<<<<<<<<<<<
  80821. *
  80822. * if used_buf:
  80823. */
  80824. __pyx_v_saved_errno = errno;
  80825. /* "uvloop/handles/stream.pyx":390
  80826. * saved_errno = errno.errno
  80827. *
  80828. * if used_buf: # <<<<<<<<<<<<<<
  80829. * PyBuffer_Release(&py_buf)
  80830. *
  80831. */
  80832. __pyx_t_1 = (__pyx_v_used_buf != 0);
  80833. if (__pyx_t_1) {
  80834. /* "uvloop/handles/stream.pyx":391
  80835. *
  80836. * if used_buf:
  80837. * PyBuffer_Release(&py_buf) # <<<<<<<<<<<<<<
  80838. *
  80839. * if written < 0:
  80840. */
  80841. PyBuffer_Release((&__pyx_v_py_buf));
  80842. /* "uvloop/handles/stream.pyx":390
  80843. * saved_errno = errno.errno
  80844. *
  80845. * if used_buf: # <<<<<<<<<<<<<<
  80846. * PyBuffer_Release(&py_buf)
  80847. *
  80848. */
  80849. }
  80850. /* "uvloop/handles/stream.pyx":393
  80851. * PyBuffer_Release(&py_buf)
  80852. *
  80853. * if written < 0: # <<<<<<<<<<<<<<
  80854. * if saved_errno == errno.EAGAIN or \
  80855. * saved_errno == system.EWOULDBLOCK:
  80856. */
  80857. __pyx_t_1 = ((__pyx_v_written < 0) != 0);
  80858. if (__pyx_t_1) {
  80859. /* "uvloop/handles/stream.pyx":394
  80860. *
  80861. * if written < 0:
  80862. * if saved_errno == errno.EAGAIN or \ # <<<<<<<<<<<<<<
  80863. * saved_errno == system.EWOULDBLOCK:
  80864. * return -1
  80865. */
  80866. __pyx_t_6 = ((__pyx_v_saved_errno == EAGAIN) != 0);
  80867. if (!__pyx_t_6) {
  80868. } else {
  80869. __pyx_t_1 = __pyx_t_6;
  80870. goto __pyx_L15_bool_binop_done;
  80871. }
  80872. /* "uvloop/handles/stream.pyx":395
  80873. * if written < 0:
  80874. * if saved_errno == errno.EAGAIN or \
  80875. * saved_errno == system.EWOULDBLOCK: # <<<<<<<<<<<<<<
  80876. * return -1
  80877. * else:
  80878. */
  80879. __pyx_t_6 = ((__pyx_v_saved_errno == EWOULDBLOCK) != 0);
  80880. __pyx_t_1 = __pyx_t_6;
  80881. __pyx_L15_bool_binop_done:;
  80882. /* "uvloop/handles/stream.pyx":394
  80883. *
  80884. * if written < 0:
  80885. * if saved_errno == errno.EAGAIN or \ # <<<<<<<<<<<<<<
  80886. * saved_errno == system.EWOULDBLOCK:
  80887. * return -1
  80888. */
  80889. if (__pyx_t_1) {
  80890. /* "uvloop/handles/stream.pyx":396
  80891. * if saved_errno == errno.EAGAIN or \
  80892. * saved_errno == system.EWOULDBLOCK:
  80893. * return -1 # <<<<<<<<<<<<<<
  80894. * else:
  80895. * exc = convert_error(-saved_errno)
  80896. */
  80897. __Pyx_XDECREF(__pyx_r);
  80898. __Pyx_INCREF(__pyx_int_neg_1);
  80899. __pyx_r = __pyx_int_neg_1;
  80900. goto __pyx_L0;
  80901. /* "uvloop/handles/stream.pyx":394
  80902. *
  80903. * if written < 0:
  80904. * if saved_errno == errno.EAGAIN or \ # <<<<<<<<<<<<<<
  80905. * saved_errno == system.EWOULDBLOCK:
  80906. * return -1
  80907. */
  80908. }
  80909. /* "uvloop/handles/stream.pyx":398
  80910. * return -1
  80911. * else:
  80912. * exc = convert_error(-saved_errno) # <<<<<<<<<<<<<<
  80913. * self._fatal_error(exc, True)
  80914. * return
  80915. */
  80916. /*else*/ {
  80917. __pyx_t_2 = __pyx_f_6uvloop_4loop_convert_error((-__pyx_v_saved_errno)); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 398, __pyx_L1_error)
  80918. __Pyx_GOTREF(__pyx_t_2);
  80919. __pyx_v_exc = __pyx_t_2;
  80920. __pyx_t_2 = 0;
  80921. /* "uvloop/handles/stream.pyx":399
  80922. * else:
  80923. * exc = convert_error(-saved_errno)
  80924. * self._fatal_error(exc, True) # <<<<<<<<<<<<<<
  80925. * return
  80926. *
  80927. */
  80928. __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._fatal_error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self), __pyx_v_exc, Py_True, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 399, __pyx_L1_error)
  80929. __Pyx_GOTREF(__pyx_t_2);
  80930. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  80931. /* "uvloop/handles/stream.pyx":400
  80932. * exc = convert_error(-saved_errno)
  80933. * self._fatal_error(exc, True)
  80934. * return # <<<<<<<<<<<<<<
  80935. *
  80936. * if UVLOOP_DEBUG:
  80937. */
  80938. __Pyx_XDECREF(__pyx_r);
  80939. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  80940. goto __pyx_L0;
  80941. }
  80942. /* "uvloop/handles/stream.pyx":393
  80943. * PyBuffer_Release(&py_buf)
  80944. *
  80945. * if written < 0: # <<<<<<<<<<<<<<
  80946. * if saved_errno == errno.EAGAIN or \
  80947. * saved_errno == system.EWOULDBLOCK:
  80948. */
  80949. }
  80950. /* "uvloop/handles/stream.pyx":402
  80951. * return
  80952. *
  80953. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  80954. * self._loop._debug_stream_write_tries += 1
  80955. *
  80956. */
  80957. __pyx_t_1 = (UVLOOP_DEBUG != 0);
  80958. if (__pyx_t_1) {
  80959. /* "uvloop/handles/stream.pyx":403
  80960. *
  80961. * if UVLOOP_DEBUG:
  80962. * self._loop._debug_stream_write_tries += 1 # <<<<<<<<<<<<<<
  80963. *
  80964. * if <size_t>written == blen:
  80965. */
  80966. __Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._loop));
  80967. __pyx_t_7 = __pyx_v_self->__pyx_base.__pyx_base.__pyx_base._loop;
  80968. __pyx_t_7->_debug_stream_write_tries = (__pyx_t_7->_debug_stream_write_tries + 1);
  80969. __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
  80970. /* "uvloop/handles/stream.pyx":402
  80971. * return
  80972. *
  80973. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  80974. * self._loop._debug_stream_write_tries += 1
  80975. *
  80976. */
  80977. }
  80978. /* "uvloop/handles/stream.pyx":405
  80979. * self._loop._debug_stream_write_tries += 1
  80980. *
  80981. * if <size_t>written == blen: # <<<<<<<<<<<<<<
  80982. * return 0
  80983. *
  80984. */
  80985. __pyx_t_1 = ((((size_t)__pyx_v_written) == __pyx_v_blen) != 0);
  80986. if (__pyx_t_1) {
  80987. /* "uvloop/handles/stream.pyx":406
  80988. *
  80989. * if <size_t>written == blen:
  80990. * return 0 # <<<<<<<<<<<<<<
  80991. *
  80992. * return written
  80993. */
  80994. __Pyx_XDECREF(__pyx_r);
  80995. __Pyx_INCREF(__pyx_int_0);
  80996. __pyx_r = __pyx_int_0;
  80997. goto __pyx_L0;
  80998. /* "uvloop/handles/stream.pyx":405
  80999. * self._loop._debug_stream_write_tries += 1
  81000. *
  81001. * if <size_t>written == blen: # <<<<<<<<<<<<<<
  81002. * return 0
  81003. *
  81004. */
  81005. }
  81006. /* "uvloop/handles/stream.pyx":408
  81007. * return 0
  81008. *
  81009. * return written # <<<<<<<<<<<<<<
  81010. *
  81011. * cdef inline _write(self, object data):
  81012. */
  81013. __Pyx_XDECREF(__pyx_r);
  81014. __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_written); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 408, __pyx_L1_error)
  81015. __Pyx_GOTREF(__pyx_t_2);
  81016. __pyx_r = __pyx_t_2;
  81017. __pyx_t_2 = 0;
  81018. goto __pyx_L0;
  81019. /* "uvloop/handles/stream.pyx":343
  81020. * self.__reading_stopped()
  81021. *
  81022. * cdef inline _try_write(self, object data): # <<<<<<<<<<<<<<
  81023. * cdef:
  81024. * ssize_t written
  81025. */
  81026. /* function exit code */
  81027. __pyx_L1_error:;
  81028. __Pyx_XDECREF(__pyx_t_2);
  81029. __Pyx_XDECREF(((PyObject *)__pyx_t_7));
  81030. __Pyx_AddTraceback("uvloop.loop.UVStream._try_write", __pyx_clineno, __pyx_lineno, __pyx_filename);
  81031. __pyx_r = 0;
  81032. __pyx_L0:;
  81033. __Pyx_XDECREF(__pyx_v_exc);
  81034. __Pyx_XGIVEREF(__pyx_r);
  81035. __Pyx_RefNannyFinishContext();
  81036. return __pyx_r;
  81037. }
  81038. /* "uvloop/handles/stream.pyx":410
  81039. * return written
  81040. *
  81041. * cdef inline _write(self, object data): # <<<<<<<<<<<<<<
  81042. * cdef int dlen
  81043. *
  81044. */
  81045. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVStream__write(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self, PyObject *__pyx_v_data) {
  81046. int __pyx_v_dlen;
  81047. PyObject *__pyx_v_all_sent = NULL;
  81048. PyObject *__pyx_r = NULL;
  81049. __Pyx_RefNannyDeclarations
  81050. int __pyx_t_1;
  81051. PyObject *__pyx_t_2 = NULL;
  81052. PyObject *__pyx_t_3 = NULL;
  81053. PyObject *__pyx_t_4 = NULL;
  81054. Py_ssize_t __pyx_t_5;
  81055. int __pyx_t_6;
  81056. int __pyx_t_7;
  81057. __Pyx_RefNannySetupContext("_write", 0);
  81058. __Pyx_INCREF(__pyx_v_data);
  81059. /* "uvloop/handles/stream.pyx":413
  81060. * cdef int dlen
  81061. *
  81062. * if not PyBytes_CheckExact(data): # <<<<<<<<<<<<<<
  81063. * data = memoryview(data).cast('b')
  81064. *
  81065. */
  81066. __pyx_t_1 = ((!(PyBytes_CheckExact(__pyx_v_data) != 0)) != 0);
  81067. if (__pyx_t_1) {
  81068. /* "uvloop/handles/stream.pyx":414
  81069. *
  81070. * if not PyBytes_CheckExact(data):
  81071. * data = memoryview(data).cast('b') # <<<<<<<<<<<<<<
  81072. *
  81073. * dlen = len(data)
  81074. */
  81075. __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_memoryview); if (unlikely(!__pyx_t_3)) __PYX_ERR(18, 414, __pyx_L1_error)
  81076. __Pyx_GOTREF(__pyx_t_3);
  81077. __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_data); if (unlikely(!__pyx_t_4)) __PYX_ERR(18, 414, __pyx_L1_error)
  81078. __Pyx_GOTREF(__pyx_t_4);
  81079. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  81080. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_cast); if (unlikely(!__pyx_t_3)) __PYX_ERR(18, 414, __pyx_L1_error)
  81081. __Pyx_GOTREF(__pyx_t_3);
  81082. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  81083. __pyx_t_4 = NULL;
  81084. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
  81085. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
  81086. if (likely(__pyx_t_4)) {
  81087. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  81088. __Pyx_INCREF(__pyx_t_4);
  81089. __Pyx_INCREF(function);
  81090. __Pyx_DECREF_SET(__pyx_t_3, function);
  81091. }
  81092. }
  81093. __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_n_u_b) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_n_u_b);
  81094. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  81095. if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 414, __pyx_L1_error)
  81096. __Pyx_GOTREF(__pyx_t_2);
  81097. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  81098. __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_2);
  81099. __pyx_t_2 = 0;
  81100. /* "uvloop/handles/stream.pyx":413
  81101. * cdef int dlen
  81102. *
  81103. * if not PyBytes_CheckExact(data): # <<<<<<<<<<<<<<
  81104. * data = memoryview(data).cast('b')
  81105. *
  81106. */
  81107. }
  81108. /* "uvloop/handles/stream.pyx":416
  81109. * data = memoryview(data).cast('b')
  81110. *
  81111. * dlen = len(data) # <<<<<<<<<<<<<<
  81112. * if not dlen:
  81113. * return
  81114. */
  81115. __pyx_t_5 = PyObject_Length(__pyx_v_data); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(18, 416, __pyx_L1_error)
  81116. __pyx_v_dlen = __pyx_t_5;
  81117. /* "uvloop/handles/stream.pyx":417
  81118. *
  81119. * dlen = len(data)
  81120. * if not dlen: # <<<<<<<<<<<<<<
  81121. * return
  81122. *
  81123. */
  81124. __pyx_t_1 = ((!(__pyx_v_dlen != 0)) != 0);
  81125. if (__pyx_t_1) {
  81126. /* "uvloop/handles/stream.pyx":418
  81127. * dlen = len(data)
  81128. * if not dlen:
  81129. * return # <<<<<<<<<<<<<<
  81130. *
  81131. * self._buffer_size += dlen
  81132. */
  81133. __Pyx_XDECREF(__pyx_r);
  81134. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  81135. goto __pyx_L0;
  81136. /* "uvloop/handles/stream.pyx":417
  81137. *
  81138. * dlen = len(data)
  81139. * if not dlen: # <<<<<<<<<<<<<<
  81140. * return
  81141. *
  81142. */
  81143. }
  81144. /* "uvloop/handles/stream.pyx":420
  81145. * return
  81146. *
  81147. * self._buffer_size += dlen # <<<<<<<<<<<<<<
  81148. * self._buffer.append(data)
  81149. *
  81150. */
  81151. __pyx_v_self->_buffer_size = (__pyx_v_self->_buffer_size + __pyx_v_dlen);
  81152. /* "uvloop/handles/stream.pyx":421
  81153. *
  81154. * self._buffer_size += dlen
  81155. * self._buffer.append(data) # <<<<<<<<<<<<<<
  81156. *
  81157. * if (not self._protocol_paused and
  81158. */
  81159. if (unlikely(__pyx_v_self->_buffer == Py_None)) {
  81160. PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append");
  81161. __PYX_ERR(18, 421, __pyx_L1_error)
  81162. }
  81163. __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_self->_buffer, __pyx_v_data); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(18, 421, __pyx_L1_error)
  81164. /* "uvloop/handles/stream.pyx":423
  81165. * self._buffer.append(data)
  81166. *
  81167. * if (not self._protocol_paused and # <<<<<<<<<<<<<<
  81168. * (<uv.uv_stream_t*>self._handle).write_queue_size == 0 and
  81169. * self._buffer_size > self._high_water):
  81170. */
  81171. __pyx_t_7 = ((!(__pyx_v_self->__pyx_base._protocol_paused != 0)) != 0);
  81172. if (__pyx_t_7) {
  81173. } else {
  81174. __pyx_t_1 = __pyx_t_7;
  81175. goto __pyx_L6_bool_binop_done;
  81176. }
  81177. /* "uvloop/handles/stream.pyx":424
  81178. *
  81179. * if (not self._protocol_paused and
  81180. * (<uv.uv_stream_t*>self._handle).write_queue_size == 0 and # <<<<<<<<<<<<<<
  81181. * self._buffer_size > self._high_water):
  81182. * # Fast-path. If:
  81183. */
  81184. __pyx_t_7 = ((((uv_stream_t *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._handle)->write_queue_size == 0) != 0);
  81185. if (__pyx_t_7) {
  81186. } else {
  81187. __pyx_t_1 = __pyx_t_7;
  81188. goto __pyx_L6_bool_binop_done;
  81189. }
  81190. /* "uvloop/handles/stream.pyx":425
  81191. * if (not self._protocol_paused and
  81192. * (<uv.uv_stream_t*>self._handle).write_queue_size == 0 and
  81193. * self._buffer_size > self._high_water): # <<<<<<<<<<<<<<
  81194. * # Fast-path. If:
  81195. * # - the protocol isn't yet paused,
  81196. */
  81197. __pyx_t_7 = ((__pyx_v_self->_buffer_size > __pyx_v_self->__pyx_base._high_water) != 0);
  81198. __pyx_t_1 = __pyx_t_7;
  81199. __pyx_L6_bool_binop_done:;
  81200. /* "uvloop/handles/stream.pyx":423
  81201. * self._buffer.append(data)
  81202. *
  81203. * if (not self._protocol_paused and # <<<<<<<<<<<<<<
  81204. * (<uv.uv_stream_t*>self._handle).write_queue_size == 0 and
  81205. * self._buffer_size > self._high_water):
  81206. */
  81207. if (__pyx_t_1) {
  81208. /* "uvloop/handles/stream.pyx":433
  81209. * # Then:
  81210. * # - Try to write all buffered data right now.
  81211. * all_sent = self._exec_write() # <<<<<<<<<<<<<<
  81212. * if UVLOOP_DEBUG:
  81213. * if self._buffer_size != 0 or self._buffer != []:
  81214. */
  81215. __pyx_t_2 = __pyx_f_6uvloop_4loop_8UVStream__exec_write(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 433, __pyx_L1_error)
  81216. __Pyx_GOTREF(__pyx_t_2);
  81217. __pyx_v_all_sent = __pyx_t_2;
  81218. __pyx_t_2 = 0;
  81219. /* "uvloop/handles/stream.pyx":434
  81220. * # - Try to write all buffered data right now.
  81221. * all_sent = self._exec_write()
  81222. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  81223. * if self._buffer_size != 0 or self._buffer != []:
  81224. * raise RuntimeError(
  81225. */
  81226. __pyx_t_1 = (UVLOOP_DEBUG != 0);
  81227. if (__pyx_t_1) {
  81228. /* "uvloop/handles/stream.pyx":435
  81229. * all_sent = self._exec_write()
  81230. * if UVLOOP_DEBUG:
  81231. * if self._buffer_size != 0 or self._buffer != []: # <<<<<<<<<<<<<<
  81232. * raise RuntimeError(
  81233. * '_buffer_size is not 0 after a successful _exec_write')
  81234. */
  81235. __pyx_t_7 = ((__pyx_v_self->_buffer_size != 0) != 0);
  81236. if (!__pyx_t_7) {
  81237. } else {
  81238. __pyx_t_1 = __pyx_t_7;
  81239. goto __pyx_L11_bool_binop_done;
  81240. }
  81241. __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 435, __pyx_L1_error)
  81242. __Pyx_GOTREF(__pyx_t_2);
  81243. __pyx_t_3 = PyObject_RichCompare(__pyx_v_self->_buffer, __pyx_t_2, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(18, 435, __pyx_L1_error)
  81244. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  81245. __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(18, 435, __pyx_L1_error)
  81246. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  81247. __pyx_t_1 = __pyx_t_7;
  81248. __pyx_L11_bool_binop_done:;
  81249. if (unlikely(__pyx_t_1)) {
  81250. /* "uvloop/handles/stream.pyx":436
  81251. * if UVLOOP_DEBUG:
  81252. * if self._buffer_size != 0 or self._buffer != []:
  81253. * raise RuntimeError( # <<<<<<<<<<<<<<
  81254. * '_buffer_size is not 0 after a successful _exec_write')
  81255. *
  81256. */
  81257. __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__134, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(18, 436, __pyx_L1_error)
  81258. __Pyx_GOTREF(__pyx_t_3);
  81259. __Pyx_Raise(__pyx_t_3, 0, 0, 0);
  81260. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  81261. __PYX_ERR(18, 436, __pyx_L1_error)
  81262. /* "uvloop/handles/stream.pyx":435
  81263. * all_sent = self._exec_write()
  81264. * if UVLOOP_DEBUG:
  81265. * if self._buffer_size != 0 or self._buffer != []: # <<<<<<<<<<<<<<
  81266. * raise RuntimeError(
  81267. * '_buffer_size is not 0 after a successful _exec_write')
  81268. */
  81269. }
  81270. /* "uvloop/handles/stream.pyx":434
  81271. * # - Try to write all buffered data right now.
  81272. * all_sent = self._exec_write()
  81273. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  81274. * if self._buffer_size != 0 or self._buffer != []:
  81275. * raise RuntimeError(
  81276. */
  81277. }
  81278. /* "uvloop/handles/stream.pyx":442
  81279. * # as `uv_write` should be called already.
  81280. *
  81281. * if not all_sent: # <<<<<<<<<<<<<<
  81282. * # If not all of the data was sent successfully,
  81283. * # we might need to pause the protocol.
  81284. */
  81285. __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_all_sent); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(18, 442, __pyx_L1_error)
  81286. __pyx_t_7 = ((!__pyx_t_1) != 0);
  81287. if (__pyx_t_7) {
  81288. /* "uvloop/handles/stream.pyx":445
  81289. * # If not all of the data was sent successfully,
  81290. * # we might need to pause the protocol.
  81291. * self._maybe_pause_protocol() # <<<<<<<<<<<<<<
  81292. * return
  81293. *
  81294. */
  81295. __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._maybe_pause_protocol(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(18, 445, __pyx_L1_error)
  81296. __Pyx_GOTREF(__pyx_t_3);
  81297. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  81298. /* "uvloop/handles/stream.pyx":442
  81299. * # as `uv_write` should be called already.
  81300. *
  81301. * if not all_sent: # <<<<<<<<<<<<<<
  81302. * # If not all of the data was sent successfully,
  81303. * # we might need to pause the protocol.
  81304. */
  81305. }
  81306. /* "uvloop/handles/stream.pyx":446
  81307. * # we might need to pause the protocol.
  81308. * self._maybe_pause_protocol()
  81309. * return # <<<<<<<<<<<<<<
  81310. *
  81311. * self._maybe_pause_protocol()
  81312. */
  81313. __Pyx_XDECREF(__pyx_r);
  81314. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  81315. goto __pyx_L0;
  81316. /* "uvloop/handles/stream.pyx":423
  81317. * self._buffer.append(data)
  81318. *
  81319. * if (not self._protocol_paused and # <<<<<<<<<<<<<<
  81320. * (<uv.uv_stream_t*>self._handle).write_queue_size == 0 and
  81321. * self._buffer_size > self._high_water):
  81322. */
  81323. }
  81324. /* "uvloop/handles/stream.pyx":448
  81325. * return
  81326. *
  81327. * self._maybe_pause_protocol() # <<<<<<<<<<<<<<
  81328. * self._loop._queue_write(self)
  81329. *
  81330. */
  81331. __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._maybe_pause_protocol(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(18, 448, __pyx_L1_error)
  81332. __Pyx_GOTREF(__pyx_t_3);
  81333. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  81334. /* "uvloop/handles/stream.pyx":449
  81335. *
  81336. * self._maybe_pause_protocol()
  81337. * self._loop._queue_write(self) # <<<<<<<<<<<<<<
  81338. *
  81339. * cdef inline _exec_write(self):
  81340. */
  81341. __pyx_t_3 = __pyx_f_6uvloop_4loop_4Loop__queue_write(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._loop, __pyx_v_self); if (unlikely(!__pyx_t_3)) __PYX_ERR(18, 449, __pyx_L1_error)
  81342. __Pyx_GOTREF(__pyx_t_3);
  81343. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  81344. /* "uvloop/handles/stream.pyx":410
  81345. * return written
  81346. *
  81347. * cdef inline _write(self, object data): # <<<<<<<<<<<<<<
  81348. * cdef int dlen
  81349. *
  81350. */
  81351. /* function exit code */
  81352. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  81353. goto __pyx_L0;
  81354. __pyx_L1_error:;
  81355. __Pyx_XDECREF(__pyx_t_2);
  81356. __Pyx_XDECREF(__pyx_t_3);
  81357. __Pyx_XDECREF(__pyx_t_4);
  81358. __Pyx_AddTraceback("uvloop.loop.UVStream._write", __pyx_clineno, __pyx_lineno, __pyx_filename);
  81359. __pyx_r = 0;
  81360. __pyx_L0:;
  81361. __Pyx_XDECREF(__pyx_v_all_sent);
  81362. __Pyx_XDECREF(__pyx_v_data);
  81363. __Pyx_XGIVEREF(__pyx_r);
  81364. __Pyx_RefNannyFinishContext();
  81365. return __pyx_r;
  81366. }
  81367. /* "uvloop/handles/stream.pyx":451
  81368. * self._loop._queue_write(self)
  81369. *
  81370. * cdef inline _exec_write(self): # <<<<<<<<<<<<<<
  81371. * cdef:
  81372. * int err
  81373. */
  81374. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVStream__exec_write(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self) {
  81375. int __pyx_v_err;
  81376. int __pyx_v_buf_len;
  81377. struct __pyx_obj_6uvloop_4loop__StreamWriteContext *__pyx_v_ctx = 0;
  81378. PyObject *__pyx_v_data = NULL;
  81379. PyObject *__pyx_v_sent = NULL;
  81380. PyObject *__pyx_v_ex = NULL;
  81381. PyObject *__pyx_v_exc = NULL;
  81382. PyObject *__pyx_r = NULL;
  81383. __Pyx_RefNannyDeclarations
  81384. int __pyx_t_1;
  81385. PyObject *__pyx_t_2 = NULL;
  81386. Py_ssize_t __pyx_t_3;
  81387. int __pyx_t_4;
  81388. PyObject *__pyx_t_5 = NULL;
  81389. PyObject *__pyx_t_6 = NULL;
  81390. size_t __pyx_t_7;
  81391. PyObject *__pyx_t_8 = NULL;
  81392. PyObject *__pyx_t_9 = NULL;
  81393. PyObject *__pyx_t_10 = NULL;
  81394. int __pyx_t_11;
  81395. PyObject *__pyx_t_12 = NULL;
  81396. PyObject *__pyx_t_13 = NULL;
  81397. PyObject *__pyx_t_14 = NULL;
  81398. int __pyx_t_15;
  81399. char const *__pyx_t_16;
  81400. PyObject *__pyx_t_17 = NULL;
  81401. PyObject *__pyx_t_18 = NULL;
  81402. PyObject *__pyx_t_19 = NULL;
  81403. PyObject *__pyx_t_20 = NULL;
  81404. PyObject *__pyx_t_21 = NULL;
  81405. PyObject *__pyx_t_22 = NULL;
  81406. __Pyx_RefNannySetupContext("_exec_write", 0);
  81407. /* "uvloop/handles/stream.pyx":455
  81408. * int err
  81409. * int buf_len
  81410. * _StreamWriteContext ctx = None # <<<<<<<<<<<<<<
  81411. *
  81412. * if self._closed:
  81413. */
  81414. __Pyx_INCREF(Py_None);
  81415. __pyx_v_ctx = ((struct __pyx_obj_6uvloop_4loop__StreamWriteContext *)Py_None);
  81416. /* "uvloop/handles/stream.pyx":457
  81417. * _StreamWriteContext ctx = None
  81418. *
  81419. * if self._closed: # <<<<<<<<<<<<<<
  81420. * # If the handle is closed, just return, it's too
  81421. * # late to do anything.
  81422. */
  81423. __pyx_t_1 = (__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._closed != 0);
  81424. if (__pyx_t_1) {
  81425. /* "uvloop/handles/stream.pyx":460
  81426. * # If the handle is closed, just return, it's too
  81427. * # late to do anything.
  81428. * return # <<<<<<<<<<<<<<
  81429. *
  81430. * buf_len = len(self._buffer)
  81431. */
  81432. __Pyx_XDECREF(__pyx_r);
  81433. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  81434. goto __pyx_L0;
  81435. /* "uvloop/handles/stream.pyx":457
  81436. * _StreamWriteContext ctx = None
  81437. *
  81438. * if self._closed: # <<<<<<<<<<<<<<
  81439. * # If the handle is closed, just return, it's too
  81440. * # late to do anything.
  81441. */
  81442. }
  81443. /* "uvloop/handles/stream.pyx":462
  81444. * return
  81445. *
  81446. * buf_len = len(self._buffer) # <<<<<<<<<<<<<<
  81447. * if not buf_len:
  81448. * return
  81449. */
  81450. __pyx_t_2 = __pyx_v_self->_buffer;
  81451. __Pyx_INCREF(__pyx_t_2);
  81452. if (unlikely(__pyx_t_2 == Py_None)) {
  81453. PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
  81454. __PYX_ERR(18, 462, __pyx_L1_error)
  81455. }
  81456. __pyx_t_3 = PyList_GET_SIZE(__pyx_t_2); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(18, 462, __pyx_L1_error)
  81457. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  81458. __pyx_v_buf_len = __pyx_t_3;
  81459. /* "uvloop/handles/stream.pyx":463
  81460. *
  81461. * buf_len = len(self._buffer)
  81462. * if not buf_len: # <<<<<<<<<<<<<<
  81463. * return
  81464. *
  81465. */
  81466. __pyx_t_1 = ((!(__pyx_v_buf_len != 0)) != 0);
  81467. if (__pyx_t_1) {
  81468. /* "uvloop/handles/stream.pyx":464
  81469. * buf_len = len(self._buffer)
  81470. * if not buf_len:
  81471. * return # <<<<<<<<<<<<<<
  81472. *
  81473. * if (<uv.uv_stream_t*>self._handle).write_queue_size == 0:
  81474. */
  81475. __Pyx_XDECREF(__pyx_r);
  81476. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  81477. goto __pyx_L0;
  81478. /* "uvloop/handles/stream.pyx":463
  81479. *
  81480. * buf_len = len(self._buffer)
  81481. * if not buf_len: # <<<<<<<<<<<<<<
  81482. * return
  81483. *
  81484. */
  81485. }
  81486. /* "uvloop/handles/stream.pyx":466
  81487. * return
  81488. *
  81489. * if (<uv.uv_stream_t*>self._handle).write_queue_size == 0: # <<<<<<<<<<<<<<
  81490. * # libuv internal write buffers for this stream are empty.
  81491. * if buf_len == 1:
  81492. */
  81493. __pyx_t_1 = ((((uv_stream_t *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._handle)->write_queue_size == 0) != 0);
  81494. if (__pyx_t_1) {
  81495. /* "uvloop/handles/stream.pyx":468
  81496. * if (<uv.uv_stream_t*>self._handle).write_queue_size == 0:
  81497. * # libuv internal write buffers for this stream are empty.
  81498. * if buf_len == 1: # <<<<<<<<<<<<<<
  81499. * # If we only have one piece of data to send, let's
  81500. * # use our fast implementation of try_write.
  81501. */
  81502. __pyx_t_1 = ((__pyx_v_buf_len == 1) != 0);
  81503. if (__pyx_t_1) {
  81504. /* "uvloop/handles/stream.pyx":471
  81505. * # If we only have one piece of data to send, let's
  81506. * # use our fast implementation of try_write.
  81507. * data = self._buffer[0] # <<<<<<<<<<<<<<
  81508. * sent = self._try_write(data)
  81509. *
  81510. */
  81511. if (unlikely(__pyx_v_self->_buffer == Py_None)) {
  81512. PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
  81513. __PYX_ERR(18, 471, __pyx_L1_error)
  81514. }
  81515. __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_self->_buffer, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 471, __pyx_L1_error)
  81516. __Pyx_GOTREF(__pyx_t_2);
  81517. __pyx_v_data = __pyx_t_2;
  81518. __pyx_t_2 = 0;
  81519. /* "uvloop/handles/stream.pyx":472
  81520. * # use our fast implementation of try_write.
  81521. * data = self._buffer[0]
  81522. * sent = self._try_write(data) # <<<<<<<<<<<<<<
  81523. *
  81524. * if sent is None:
  81525. */
  81526. __pyx_t_2 = __pyx_f_6uvloop_4loop_8UVStream__try_write(__pyx_v_self, __pyx_v_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 472, __pyx_L1_error)
  81527. __Pyx_GOTREF(__pyx_t_2);
  81528. __pyx_v_sent = __pyx_t_2;
  81529. __pyx_t_2 = 0;
  81530. /* "uvloop/handles/stream.pyx":474
  81531. * sent = self._try_write(data)
  81532. *
  81533. * if sent is None: # <<<<<<<<<<<<<<
  81534. * # A `self._fatal_error` was called.
  81535. * # It might not raise an exception under some
  81536. */
  81537. __pyx_t_1 = (__pyx_v_sent == Py_None);
  81538. __pyx_t_4 = (__pyx_t_1 != 0);
  81539. if (__pyx_t_4) {
  81540. /* "uvloop/handles/stream.pyx":478
  81541. * # It might not raise an exception under some
  81542. * # conditions.
  81543. * self._buffer_size = 0 # <<<<<<<<<<<<<<
  81544. * self._buffer.clear()
  81545. * if not self._closing:
  81546. */
  81547. __pyx_v_self->_buffer_size = 0;
  81548. /* "uvloop/handles/stream.pyx":479
  81549. * # conditions.
  81550. * self._buffer_size = 0
  81551. * self._buffer.clear() # <<<<<<<<<<<<<<
  81552. * if not self._closing:
  81553. * # This should never happen.
  81554. */
  81555. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_buffer, __pyx_n_s_clear); if (unlikely(!__pyx_t_5)) __PYX_ERR(18, 479, __pyx_L1_error)
  81556. __Pyx_GOTREF(__pyx_t_5);
  81557. __pyx_t_6 = NULL;
  81558. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
  81559. __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
  81560. if (likely(__pyx_t_6)) {
  81561. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
  81562. __Pyx_INCREF(__pyx_t_6);
  81563. __Pyx_INCREF(function);
  81564. __Pyx_DECREF_SET(__pyx_t_5, function);
  81565. }
  81566. }
  81567. __pyx_t_2 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
  81568. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  81569. if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 479, __pyx_L1_error)
  81570. __Pyx_GOTREF(__pyx_t_2);
  81571. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  81572. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  81573. /* "uvloop/handles/stream.pyx":480
  81574. * self._buffer_size = 0
  81575. * self._buffer.clear()
  81576. * if not self._closing: # <<<<<<<<<<<<<<
  81577. * # This should never happen.
  81578. * raise RuntimeError(
  81579. */
  81580. __pyx_t_4 = ((!(__pyx_v_self->__pyx_base._closing != 0)) != 0);
  81581. if (unlikely(__pyx_t_4)) {
  81582. /* "uvloop/handles/stream.pyx":482
  81583. * if not self._closing:
  81584. * # This should never happen.
  81585. * raise RuntimeError( # <<<<<<<<<<<<<<
  81586. * 'stream is open after UVStream._try_write '
  81587. * 'returned None')
  81588. */
  81589. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__135, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 482, __pyx_L1_error)
  81590. __Pyx_GOTREF(__pyx_t_2);
  81591. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  81592. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  81593. __PYX_ERR(18, 482, __pyx_L1_error)
  81594. /* "uvloop/handles/stream.pyx":480
  81595. * self._buffer_size = 0
  81596. * self._buffer.clear()
  81597. * if not self._closing: # <<<<<<<<<<<<<<
  81598. * # This should never happen.
  81599. * raise RuntimeError(
  81600. */
  81601. }
  81602. /* "uvloop/handles/stream.pyx":485
  81603. * 'stream is open after UVStream._try_write '
  81604. * 'returned None')
  81605. * return # <<<<<<<<<<<<<<
  81606. *
  81607. * if sent == 0:
  81608. */
  81609. __Pyx_XDECREF(__pyx_r);
  81610. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  81611. goto __pyx_L0;
  81612. /* "uvloop/handles/stream.pyx":474
  81613. * sent = self._try_write(data)
  81614. *
  81615. * if sent is None: # <<<<<<<<<<<<<<
  81616. * # A `self._fatal_error` was called.
  81617. * # It might not raise an exception under some
  81618. */
  81619. }
  81620. /* "uvloop/handles/stream.pyx":487
  81621. * return
  81622. *
  81623. * if sent == 0: # <<<<<<<<<<<<<<
  81624. * # All data was successfully written.
  81625. * self._buffer_size = 0
  81626. */
  81627. __pyx_t_2 = __Pyx_PyInt_EqObjC(__pyx_v_sent, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 487, __pyx_L1_error)
  81628. __Pyx_GOTREF(__pyx_t_2);
  81629. __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(18, 487, __pyx_L1_error)
  81630. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  81631. if (__pyx_t_4) {
  81632. /* "uvloop/handles/stream.pyx":489
  81633. * if sent == 0:
  81634. * # All data was successfully written.
  81635. * self._buffer_size = 0 # <<<<<<<<<<<<<<
  81636. * self._buffer.clear()
  81637. * # on_write will call "maybe_resume_protocol".
  81638. */
  81639. __pyx_v_self->_buffer_size = 0;
  81640. /* "uvloop/handles/stream.pyx":490
  81641. * # All data was successfully written.
  81642. * self._buffer_size = 0
  81643. * self._buffer.clear() # <<<<<<<<<<<<<<
  81644. * # on_write will call "maybe_resume_protocol".
  81645. * self._on_write()
  81646. */
  81647. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_buffer, __pyx_n_s_clear); if (unlikely(!__pyx_t_5)) __PYX_ERR(18, 490, __pyx_L1_error)
  81648. __Pyx_GOTREF(__pyx_t_5);
  81649. __pyx_t_6 = NULL;
  81650. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
  81651. __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
  81652. if (likely(__pyx_t_6)) {
  81653. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
  81654. __Pyx_INCREF(__pyx_t_6);
  81655. __Pyx_INCREF(function);
  81656. __Pyx_DECREF_SET(__pyx_t_5, function);
  81657. }
  81658. }
  81659. __pyx_t_2 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
  81660. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  81661. if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 490, __pyx_L1_error)
  81662. __Pyx_GOTREF(__pyx_t_2);
  81663. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  81664. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  81665. /* "uvloop/handles/stream.pyx":492
  81666. * self._buffer.clear()
  81667. * # on_write will call "maybe_resume_protocol".
  81668. * self._on_write() # <<<<<<<<<<<<<<
  81669. * return True
  81670. *
  81671. */
  81672. __pyx_t_2 = __pyx_f_6uvloop_4loop_8UVStream__on_write(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 492, __pyx_L1_error)
  81673. __Pyx_GOTREF(__pyx_t_2);
  81674. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  81675. /* "uvloop/handles/stream.pyx":493
  81676. * # on_write will call "maybe_resume_protocol".
  81677. * self._on_write()
  81678. * return True # <<<<<<<<<<<<<<
  81679. *
  81680. * if sent > 0:
  81681. */
  81682. __Pyx_XDECREF(__pyx_r);
  81683. __Pyx_INCREF(Py_True);
  81684. __pyx_r = Py_True;
  81685. goto __pyx_L0;
  81686. /* "uvloop/handles/stream.pyx":487
  81687. * return
  81688. *
  81689. * if sent == 0: # <<<<<<<<<<<<<<
  81690. * # All data was successfully written.
  81691. * self._buffer_size = 0
  81692. */
  81693. }
  81694. /* "uvloop/handles/stream.pyx":495
  81695. * return True
  81696. *
  81697. * if sent > 0: # <<<<<<<<<<<<<<
  81698. * if UVLOOP_DEBUG:
  81699. * if sent == len(data):
  81700. */
  81701. __pyx_t_2 = PyObject_RichCompare(__pyx_v_sent, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 495, __pyx_L1_error)
  81702. __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(18, 495, __pyx_L1_error)
  81703. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  81704. if (__pyx_t_4) {
  81705. /* "uvloop/handles/stream.pyx":496
  81706. *
  81707. * if sent > 0:
  81708. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  81709. * if sent == len(data):
  81710. * raise RuntimeError(
  81711. */
  81712. __pyx_t_4 = (UVLOOP_DEBUG != 0);
  81713. if (__pyx_t_4) {
  81714. /* "uvloop/handles/stream.pyx":497
  81715. * if sent > 0:
  81716. * if UVLOOP_DEBUG:
  81717. * if sent == len(data): # <<<<<<<<<<<<<<
  81718. * raise RuntimeError(
  81719. * '_try_write sent all data and returned '
  81720. */
  81721. __pyx_t_3 = PyObject_Length(__pyx_v_data); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(18, 497, __pyx_L1_error)
  81722. __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 497, __pyx_L1_error)
  81723. __Pyx_GOTREF(__pyx_t_2);
  81724. __pyx_t_5 = PyObject_RichCompare(__pyx_v_sent, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(18, 497, __pyx_L1_error)
  81725. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  81726. __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(18, 497, __pyx_L1_error)
  81727. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  81728. if (unlikely(__pyx_t_4)) {
  81729. /* "uvloop/handles/stream.pyx":498
  81730. * if UVLOOP_DEBUG:
  81731. * if sent == len(data):
  81732. * raise RuntimeError( # <<<<<<<<<<<<<<
  81733. * '_try_write sent all data and returned '
  81734. * 'non-zero')
  81735. */
  81736. __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__136, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(18, 498, __pyx_L1_error)
  81737. __Pyx_GOTREF(__pyx_t_5);
  81738. __Pyx_Raise(__pyx_t_5, 0, 0, 0);
  81739. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  81740. __PYX_ERR(18, 498, __pyx_L1_error)
  81741. /* "uvloop/handles/stream.pyx":497
  81742. * if sent > 0:
  81743. * if UVLOOP_DEBUG:
  81744. * if sent == len(data): # <<<<<<<<<<<<<<
  81745. * raise RuntimeError(
  81746. * '_try_write sent all data and returned '
  81747. */
  81748. }
  81749. /* "uvloop/handles/stream.pyx":496
  81750. *
  81751. * if sent > 0:
  81752. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  81753. * if sent == len(data):
  81754. * raise RuntimeError(
  81755. */
  81756. }
  81757. /* "uvloop/handles/stream.pyx":502
  81758. * 'non-zero')
  81759. *
  81760. * if PyBytes_CheckExact(data): # <<<<<<<<<<<<<<
  81761. * # Cast bytes to memoryview to avoid copying
  81762. * # data that wasn't sent.
  81763. */
  81764. __pyx_t_4 = (PyBytes_CheckExact(__pyx_v_data) != 0);
  81765. if (__pyx_t_4) {
  81766. /* "uvloop/handles/stream.pyx":505
  81767. * # Cast bytes to memoryview to avoid copying
  81768. * # data that wasn't sent.
  81769. * data = memoryview(data) # <<<<<<<<<<<<<<
  81770. * data = data[sent:]
  81771. *
  81772. */
  81773. __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_memoryview); if (unlikely(!__pyx_t_5)) __PYX_ERR(18, 505, __pyx_L1_error)
  81774. __Pyx_GOTREF(__pyx_t_5);
  81775. __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 505, __pyx_L1_error)
  81776. __Pyx_GOTREF(__pyx_t_2);
  81777. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  81778. __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_2);
  81779. __pyx_t_2 = 0;
  81780. /* "uvloop/handles/stream.pyx":502
  81781. * 'non-zero')
  81782. *
  81783. * if PyBytes_CheckExact(data): # <<<<<<<<<<<<<<
  81784. * # Cast bytes to memoryview to avoid copying
  81785. * # data that wasn't sent.
  81786. */
  81787. }
  81788. /* "uvloop/handles/stream.pyx":506
  81789. * # data that wasn't sent.
  81790. * data = memoryview(data)
  81791. * data = data[sent:] # <<<<<<<<<<<<<<
  81792. *
  81793. * self._buffer_size -= sent
  81794. */
  81795. __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_data, 0, 0, &__pyx_v_sent, NULL, NULL, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 506, __pyx_L1_error)
  81796. __Pyx_GOTREF(__pyx_t_2);
  81797. __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_2);
  81798. __pyx_t_2 = 0;
  81799. /* "uvloop/handles/stream.pyx":508
  81800. * data = data[sent:]
  81801. *
  81802. * self._buffer_size -= sent # <<<<<<<<<<<<<<
  81803. * self._buffer[0] = data
  81804. *
  81805. */
  81806. __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_v_self->_buffer_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 508, __pyx_L1_error)
  81807. __Pyx_GOTREF(__pyx_t_2);
  81808. __pyx_t_5 = PyNumber_InPlaceSubtract(__pyx_t_2, __pyx_v_sent); if (unlikely(!__pyx_t_5)) __PYX_ERR(18, 508, __pyx_L1_error)
  81809. __Pyx_GOTREF(__pyx_t_5);
  81810. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  81811. __pyx_t_7 = __Pyx_PyInt_As_size_t(__pyx_t_5); if (unlikely((__pyx_t_7 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(18, 508, __pyx_L1_error)
  81812. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  81813. __pyx_v_self->_buffer_size = __pyx_t_7;
  81814. /* "uvloop/handles/stream.pyx":509
  81815. *
  81816. * self._buffer_size -= sent
  81817. * self._buffer[0] = data # <<<<<<<<<<<<<<
  81818. *
  81819. * # At this point it's either data was sent partially,
  81820. */
  81821. if (unlikely(__pyx_v_self->_buffer == Py_None)) {
  81822. PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
  81823. __PYX_ERR(18, 509, __pyx_L1_error)
  81824. }
  81825. if (unlikely(__Pyx_SetItemInt(__pyx_v_self->_buffer, 0, __pyx_v_data, long, 1, __Pyx_PyInt_From_long, 1, 0, 1) < 0)) __PYX_ERR(18, 509, __pyx_L1_error)
  81826. /* "uvloop/handles/stream.pyx":495
  81827. * return True
  81828. *
  81829. * if sent > 0: # <<<<<<<<<<<<<<
  81830. * if UVLOOP_DEBUG:
  81831. * if sent == len(data):
  81832. */
  81833. }
  81834. /* "uvloop/handles/stream.pyx":468
  81835. * if (<uv.uv_stream_t*>self._handle).write_queue_size == 0:
  81836. * # libuv internal write buffers for this stream are empty.
  81837. * if buf_len == 1: # <<<<<<<<<<<<<<
  81838. * # If we only have one piece of data to send, let's
  81839. * # use our fast implementation of try_write.
  81840. */
  81841. goto __pyx_L6;
  81842. }
  81843. /* "uvloop/handles/stream.pyx":515
  81844. *
  81845. * else:
  81846. * ctx = _StreamWriteContext.new(self, self._buffer) # <<<<<<<<<<<<<<
  81847. *
  81848. * err = uv.uv_try_write(<uv.uv_stream_t*>self._handle,
  81849. */
  81850. /*else*/ {
  81851. __pyx_t_5 = __pyx_v_self->_buffer;
  81852. __Pyx_INCREF(__pyx_t_5);
  81853. __pyx_t_2 = ((PyObject *)__pyx_f_6uvloop_4loop_19_StreamWriteContext_new(__pyx_v_self, ((PyObject*)__pyx_t_5))); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 515, __pyx_L1_error)
  81854. __Pyx_GOTREF(__pyx_t_2);
  81855. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  81856. __Pyx_DECREF_SET(__pyx_v_ctx, ((struct __pyx_obj_6uvloop_4loop__StreamWriteContext *)__pyx_t_2));
  81857. __pyx_t_2 = 0;
  81858. /* "uvloop/handles/stream.pyx":517
  81859. * ctx = _StreamWriteContext.new(self, self._buffer)
  81860. *
  81861. * err = uv.uv_try_write(<uv.uv_stream_t*>self._handle, # <<<<<<<<<<<<<<
  81862. * ctx.uv_bufs_start,
  81863. * ctx.uv_bufs_len)
  81864. */
  81865. __pyx_v_err = uv_try_write(((uv_stream_t *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._handle), __pyx_v_ctx->uv_bufs_start, __pyx_v_ctx->uv_bufs_len);
  81866. /* "uvloop/handles/stream.pyx":521
  81867. * ctx.uv_bufs_len)
  81868. *
  81869. * if err > 0: # <<<<<<<<<<<<<<
  81870. * # Some data was successfully sent.
  81871. *
  81872. */
  81873. __pyx_t_4 = ((__pyx_v_err > 0) != 0);
  81874. if (__pyx_t_4) {
  81875. /* "uvloop/handles/stream.pyx":524
  81876. * # Some data was successfully sent.
  81877. *
  81878. * if <size_t>err == self._buffer_size: # <<<<<<<<<<<<<<
  81879. * # Everything was sent.
  81880. * ctx.close()
  81881. */
  81882. __pyx_t_4 = ((((size_t)__pyx_v_err) == __pyx_v_self->_buffer_size) != 0);
  81883. if (__pyx_t_4) {
  81884. /* "uvloop/handles/stream.pyx":526
  81885. * if <size_t>err == self._buffer_size:
  81886. * # Everything was sent.
  81887. * ctx.close() # <<<<<<<<<<<<<<
  81888. * self._buffer.clear()
  81889. * self._buffer_size = 0
  81890. */
  81891. __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop__StreamWriteContext *)__pyx_v_ctx->__pyx_vtab)->close(__pyx_v_ctx); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 526, __pyx_L1_error)
  81892. __Pyx_GOTREF(__pyx_t_2);
  81893. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  81894. /* "uvloop/handles/stream.pyx":527
  81895. * # Everything was sent.
  81896. * ctx.close()
  81897. * self._buffer.clear() # <<<<<<<<<<<<<<
  81898. * self._buffer_size = 0
  81899. * # on_write will call "maybe_resume_protocol".
  81900. */
  81901. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_buffer, __pyx_n_s_clear); if (unlikely(!__pyx_t_5)) __PYX_ERR(18, 527, __pyx_L1_error)
  81902. __Pyx_GOTREF(__pyx_t_5);
  81903. __pyx_t_6 = NULL;
  81904. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
  81905. __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
  81906. if (likely(__pyx_t_6)) {
  81907. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
  81908. __Pyx_INCREF(__pyx_t_6);
  81909. __Pyx_INCREF(function);
  81910. __Pyx_DECREF_SET(__pyx_t_5, function);
  81911. }
  81912. }
  81913. __pyx_t_2 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
  81914. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  81915. if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 527, __pyx_L1_error)
  81916. __Pyx_GOTREF(__pyx_t_2);
  81917. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  81918. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  81919. /* "uvloop/handles/stream.pyx":528
  81920. * ctx.close()
  81921. * self._buffer.clear()
  81922. * self._buffer_size = 0 # <<<<<<<<<<<<<<
  81923. * # on_write will call "maybe_resume_protocol".
  81924. * self._on_write()
  81925. */
  81926. __pyx_v_self->_buffer_size = 0;
  81927. /* "uvloop/handles/stream.pyx":530
  81928. * self._buffer_size = 0
  81929. * # on_write will call "maybe_resume_protocol".
  81930. * self._on_write() # <<<<<<<<<<<<<<
  81931. * return True
  81932. *
  81933. */
  81934. __pyx_t_2 = __pyx_f_6uvloop_4loop_8UVStream__on_write(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 530, __pyx_L1_error)
  81935. __Pyx_GOTREF(__pyx_t_2);
  81936. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  81937. /* "uvloop/handles/stream.pyx":531
  81938. * # on_write will call "maybe_resume_protocol".
  81939. * self._on_write()
  81940. * return True # <<<<<<<<<<<<<<
  81941. *
  81942. * try:
  81943. */
  81944. __Pyx_XDECREF(__pyx_r);
  81945. __Pyx_INCREF(Py_True);
  81946. __pyx_r = Py_True;
  81947. goto __pyx_L0;
  81948. /* "uvloop/handles/stream.pyx":524
  81949. * # Some data was successfully sent.
  81950. *
  81951. * if <size_t>err == self._buffer_size: # <<<<<<<<<<<<<<
  81952. * # Everything was sent.
  81953. * ctx.close()
  81954. */
  81955. }
  81956. /* "uvloop/handles/stream.pyx":533
  81957. * return True
  81958. *
  81959. * try: # <<<<<<<<<<<<<<
  81960. * # Advance pointers to uv_bufs in `ctx`,
  81961. * # we will reuse it soon for a uv_write
  81962. */
  81963. {
  81964. __Pyx_PyThreadState_declare
  81965. __Pyx_PyThreadState_assign
  81966. __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
  81967. __Pyx_XGOTREF(__pyx_t_8);
  81968. __Pyx_XGOTREF(__pyx_t_9);
  81969. __Pyx_XGOTREF(__pyx_t_10);
  81970. /*try:*/ {
  81971. /* "uvloop/handles/stream.pyx":537
  81972. * # we will reuse it soon for a uv_write
  81973. * # call.
  81974. * ctx.advance_uv_buf(<ssize_t>err) # <<<<<<<<<<<<<<
  81975. * except Exception as ex: # This should never happen.
  81976. * # Let's try to close the `ctx` anyways.
  81977. */
  81978. __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop__StreamWriteContext *)__pyx_v_ctx->__pyx_vtab)->advance_uv_buf(__pyx_v_ctx, ((Py_ssize_t)__pyx_v_err)); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 537, __pyx_L16_error)
  81979. __Pyx_GOTREF(__pyx_t_2);
  81980. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  81981. /* "uvloop/handles/stream.pyx":533
  81982. * return True
  81983. *
  81984. * try: # <<<<<<<<<<<<<<
  81985. * # Advance pointers to uv_bufs in `ctx`,
  81986. * # we will reuse it soon for a uv_write
  81987. */
  81988. }
  81989. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  81990. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  81991. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  81992. goto __pyx_L21_try_end;
  81993. __pyx_L16_error:;
  81994. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  81995. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  81996. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  81997. /* "uvloop/handles/stream.pyx":538
  81998. * # call.
  81999. * ctx.advance_uv_buf(<ssize_t>err)
  82000. * except Exception as ex: # This should never happen. # <<<<<<<<<<<<<<
  82001. * # Let's try to close the `ctx` anyways.
  82002. * ctx.close()
  82003. */
  82004. __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
  82005. if (__pyx_t_11) {
  82006. __Pyx_AddTraceback("uvloop.loop.UVStream._exec_write", __pyx_clineno, __pyx_lineno, __pyx_filename);
  82007. if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_5, &__pyx_t_6) < 0) __PYX_ERR(18, 538, __pyx_L18_except_error)
  82008. __Pyx_GOTREF(__pyx_t_2);
  82009. __Pyx_GOTREF(__pyx_t_5);
  82010. __Pyx_GOTREF(__pyx_t_6);
  82011. __Pyx_INCREF(__pyx_t_5);
  82012. __pyx_v_ex = __pyx_t_5;
  82013. /*try:*/ {
  82014. /* "uvloop/handles/stream.pyx":540
  82015. * except Exception as ex: # This should never happen.
  82016. * # Let's try to close the `ctx` anyways.
  82017. * ctx.close() # <<<<<<<<<<<<<<
  82018. * self._fatal_error(ex, True)
  82019. * self._buffer.clear()
  82020. */
  82021. __pyx_t_12 = ((struct __pyx_vtabstruct_6uvloop_4loop__StreamWriteContext *)__pyx_v_ctx->__pyx_vtab)->close(__pyx_v_ctx); if (unlikely(!__pyx_t_12)) __PYX_ERR(18, 540, __pyx_L27_error)
  82022. __Pyx_GOTREF(__pyx_t_12);
  82023. __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  82024. /* "uvloop/handles/stream.pyx":541
  82025. * # Let's try to close the `ctx` anyways.
  82026. * ctx.close()
  82027. * self._fatal_error(ex, True) # <<<<<<<<<<<<<<
  82028. * self._buffer.clear()
  82029. * self._buffer_size = 0
  82030. */
  82031. __pyx_t_12 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._fatal_error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self), __pyx_v_ex, Py_True, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(18, 541, __pyx_L27_error)
  82032. __Pyx_GOTREF(__pyx_t_12);
  82033. __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  82034. /* "uvloop/handles/stream.pyx":542
  82035. * ctx.close()
  82036. * self._fatal_error(ex, True)
  82037. * self._buffer.clear() # <<<<<<<<<<<<<<
  82038. * self._buffer_size = 0
  82039. * return
  82040. */
  82041. __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_buffer, __pyx_n_s_clear); if (unlikely(!__pyx_t_13)) __PYX_ERR(18, 542, __pyx_L27_error)
  82042. __Pyx_GOTREF(__pyx_t_13);
  82043. __pyx_t_14 = NULL;
  82044. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_13))) {
  82045. __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_13);
  82046. if (likely(__pyx_t_14)) {
  82047. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
  82048. __Pyx_INCREF(__pyx_t_14);
  82049. __Pyx_INCREF(function);
  82050. __Pyx_DECREF_SET(__pyx_t_13, function);
  82051. }
  82052. }
  82053. __pyx_t_12 = (__pyx_t_14) ? __Pyx_PyObject_CallOneArg(__pyx_t_13, __pyx_t_14) : __Pyx_PyObject_CallNoArg(__pyx_t_13);
  82054. __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
  82055. if (unlikely(!__pyx_t_12)) __PYX_ERR(18, 542, __pyx_L27_error)
  82056. __Pyx_GOTREF(__pyx_t_12);
  82057. __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  82058. __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  82059. /* "uvloop/handles/stream.pyx":543
  82060. * self._fatal_error(ex, True)
  82061. * self._buffer.clear()
  82062. * self._buffer_size = 0 # <<<<<<<<<<<<<<
  82063. * return
  82064. *
  82065. */
  82066. __pyx_v_self->_buffer_size = 0;
  82067. /* "uvloop/handles/stream.pyx":544
  82068. * self._buffer.clear()
  82069. * self._buffer_size = 0
  82070. * return # <<<<<<<<<<<<<<
  82071. *
  82072. * elif err != uv.UV_EAGAIN:
  82073. */
  82074. __Pyx_XDECREF(__pyx_r);
  82075. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  82076. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  82077. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  82078. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  82079. goto __pyx_L26_return;
  82080. }
  82081. /* "uvloop/handles/stream.pyx":538
  82082. * # call.
  82083. * ctx.advance_uv_buf(<ssize_t>err)
  82084. * except Exception as ex: # This should never happen. # <<<<<<<<<<<<<<
  82085. * # Let's try to close the `ctx` anyways.
  82086. * ctx.close()
  82087. */
  82088. /*finally:*/ {
  82089. __pyx_L27_error:;
  82090. /*exception exit:*/{
  82091. __Pyx_PyThreadState_declare
  82092. __Pyx_PyThreadState_assign
  82093. __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
  82094. __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
  82095. __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
  82096. __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
  82097. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22);
  82098. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19) < 0)) __Pyx_ErrFetch(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19);
  82099. __Pyx_XGOTREF(__pyx_t_17);
  82100. __Pyx_XGOTREF(__pyx_t_18);
  82101. __Pyx_XGOTREF(__pyx_t_19);
  82102. __Pyx_XGOTREF(__pyx_t_20);
  82103. __Pyx_XGOTREF(__pyx_t_21);
  82104. __Pyx_XGOTREF(__pyx_t_22);
  82105. __pyx_t_11 = __pyx_lineno; __pyx_t_15 = __pyx_clineno; __pyx_t_16 = __pyx_filename;
  82106. {
  82107. __Pyx_DECREF(__pyx_v_ex);
  82108. __pyx_v_ex = NULL;
  82109. }
  82110. if (PY_MAJOR_VERSION >= 3) {
  82111. __Pyx_XGIVEREF(__pyx_t_20);
  82112. __Pyx_XGIVEREF(__pyx_t_21);
  82113. __Pyx_XGIVEREF(__pyx_t_22);
  82114. __Pyx_ExceptionReset(__pyx_t_20, __pyx_t_21, __pyx_t_22);
  82115. }
  82116. __Pyx_XGIVEREF(__pyx_t_17);
  82117. __Pyx_XGIVEREF(__pyx_t_18);
  82118. __Pyx_XGIVEREF(__pyx_t_19);
  82119. __Pyx_ErrRestore(__pyx_t_17, __pyx_t_18, __pyx_t_19);
  82120. __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
  82121. __pyx_lineno = __pyx_t_11; __pyx_clineno = __pyx_t_15; __pyx_filename = __pyx_t_16;
  82122. goto __pyx_L18_except_error;
  82123. }
  82124. __pyx_L26_return: {
  82125. __pyx_t_22 = __pyx_r;
  82126. __pyx_r = 0;
  82127. __Pyx_DECREF(__pyx_v_ex);
  82128. __pyx_v_ex = NULL;
  82129. __pyx_r = __pyx_t_22;
  82130. __pyx_t_22 = 0;
  82131. goto __pyx_L19_except_return;
  82132. }
  82133. }
  82134. }
  82135. goto __pyx_L18_except_error;
  82136. __pyx_L18_except_error:;
  82137. /* "uvloop/handles/stream.pyx":533
  82138. * return True
  82139. *
  82140. * try: # <<<<<<<<<<<<<<
  82141. * # Advance pointers to uv_bufs in `ctx`,
  82142. * # we will reuse it soon for a uv_write
  82143. */
  82144. __Pyx_XGIVEREF(__pyx_t_8);
  82145. __Pyx_XGIVEREF(__pyx_t_9);
  82146. __Pyx_XGIVEREF(__pyx_t_10);
  82147. __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
  82148. goto __pyx_L1_error;
  82149. __pyx_L19_except_return:;
  82150. __Pyx_XGIVEREF(__pyx_t_8);
  82151. __Pyx_XGIVEREF(__pyx_t_9);
  82152. __Pyx_XGIVEREF(__pyx_t_10);
  82153. __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
  82154. goto __pyx_L0;
  82155. __pyx_L21_try_end:;
  82156. }
  82157. /* "uvloop/handles/stream.pyx":521
  82158. * ctx.uv_bufs_len)
  82159. *
  82160. * if err > 0: # <<<<<<<<<<<<<<
  82161. * # Some data was successfully sent.
  82162. *
  82163. */
  82164. goto __pyx_L14;
  82165. }
  82166. /* "uvloop/handles/stream.pyx":546
  82167. * return
  82168. *
  82169. * elif err != uv.UV_EAGAIN: # <<<<<<<<<<<<<<
  82170. * ctx.close()
  82171. * exc = convert_error(err)
  82172. */
  82173. __pyx_t_4 = ((__pyx_v_err != UV_EAGAIN) != 0);
  82174. if (__pyx_t_4) {
  82175. /* "uvloop/handles/stream.pyx":547
  82176. *
  82177. * elif err != uv.UV_EAGAIN:
  82178. * ctx.close() # <<<<<<<<<<<<<<
  82179. * exc = convert_error(err)
  82180. * self._fatal_error(exc, True)
  82181. */
  82182. __pyx_t_6 = ((struct __pyx_vtabstruct_6uvloop_4loop__StreamWriteContext *)__pyx_v_ctx->__pyx_vtab)->close(__pyx_v_ctx); if (unlikely(!__pyx_t_6)) __PYX_ERR(18, 547, __pyx_L1_error)
  82183. __Pyx_GOTREF(__pyx_t_6);
  82184. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  82185. /* "uvloop/handles/stream.pyx":548
  82186. * elif err != uv.UV_EAGAIN:
  82187. * ctx.close()
  82188. * exc = convert_error(err) # <<<<<<<<<<<<<<
  82189. * self._fatal_error(exc, True)
  82190. * self._buffer.clear()
  82191. */
  82192. __pyx_t_6 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_6)) __PYX_ERR(18, 548, __pyx_L1_error)
  82193. __Pyx_GOTREF(__pyx_t_6);
  82194. __pyx_v_exc = __pyx_t_6;
  82195. __pyx_t_6 = 0;
  82196. /* "uvloop/handles/stream.pyx":549
  82197. * ctx.close()
  82198. * exc = convert_error(err)
  82199. * self._fatal_error(exc, True) # <<<<<<<<<<<<<<
  82200. * self._buffer.clear()
  82201. * self._buffer_size = 0
  82202. */
  82203. __pyx_t_6 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._fatal_error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self), __pyx_v_exc, Py_True, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(18, 549, __pyx_L1_error)
  82204. __Pyx_GOTREF(__pyx_t_6);
  82205. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  82206. /* "uvloop/handles/stream.pyx":550
  82207. * exc = convert_error(err)
  82208. * self._fatal_error(exc, True)
  82209. * self._buffer.clear() # <<<<<<<<<<<<<<
  82210. * self._buffer_size = 0
  82211. * return
  82212. */
  82213. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_buffer, __pyx_n_s_clear); if (unlikely(!__pyx_t_5)) __PYX_ERR(18, 550, __pyx_L1_error)
  82214. __Pyx_GOTREF(__pyx_t_5);
  82215. __pyx_t_2 = NULL;
  82216. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
  82217. __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5);
  82218. if (likely(__pyx_t_2)) {
  82219. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
  82220. __Pyx_INCREF(__pyx_t_2);
  82221. __Pyx_INCREF(function);
  82222. __Pyx_DECREF_SET(__pyx_t_5, function);
  82223. }
  82224. }
  82225. __pyx_t_6 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
  82226. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  82227. if (unlikely(!__pyx_t_6)) __PYX_ERR(18, 550, __pyx_L1_error)
  82228. __Pyx_GOTREF(__pyx_t_6);
  82229. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  82230. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  82231. /* "uvloop/handles/stream.pyx":551
  82232. * self._fatal_error(exc, True)
  82233. * self._buffer.clear()
  82234. * self._buffer_size = 0 # <<<<<<<<<<<<<<
  82235. * return
  82236. *
  82237. */
  82238. __pyx_v_self->_buffer_size = 0;
  82239. /* "uvloop/handles/stream.pyx":552
  82240. * self._buffer.clear()
  82241. * self._buffer_size = 0
  82242. * return # <<<<<<<<<<<<<<
  82243. *
  82244. * # fall through
  82245. */
  82246. __Pyx_XDECREF(__pyx_r);
  82247. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  82248. goto __pyx_L0;
  82249. /* "uvloop/handles/stream.pyx":546
  82250. * return
  82251. *
  82252. * elif err != uv.UV_EAGAIN: # <<<<<<<<<<<<<<
  82253. * ctx.close()
  82254. * exc = convert_error(err)
  82255. */
  82256. }
  82257. __pyx_L14:;
  82258. }
  82259. __pyx_L6:;
  82260. /* "uvloop/handles/stream.pyx":466
  82261. * return
  82262. *
  82263. * if (<uv.uv_stream_t*>self._handle).write_queue_size == 0: # <<<<<<<<<<<<<<
  82264. * # libuv internal write buffers for this stream are empty.
  82265. * if buf_len == 1:
  82266. */
  82267. }
  82268. /* "uvloop/handles/stream.pyx":556
  82269. * # fall through
  82270. *
  82271. * if ctx is None: # <<<<<<<<<<<<<<
  82272. * ctx = _StreamWriteContext.new(self, self._buffer)
  82273. *
  82274. */
  82275. __pyx_t_4 = (((PyObject *)__pyx_v_ctx) == Py_None);
  82276. __pyx_t_1 = (__pyx_t_4 != 0);
  82277. if (__pyx_t_1) {
  82278. /* "uvloop/handles/stream.pyx":557
  82279. *
  82280. * if ctx is None:
  82281. * ctx = _StreamWriteContext.new(self, self._buffer) # <<<<<<<<<<<<<<
  82282. *
  82283. * err = uv.uv_write(&ctx.req,
  82284. */
  82285. __pyx_t_6 = __pyx_v_self->_buffer;
  82286. __Pyx_INCREF(__pyx_t_6);
  82287. __pyx_t_5 = ((PyObject *)__pyx_f_6uvloop_4loop_19_StreamWriteContext_new(__pyx_v_self, ((PyObject*)__pyx_t_6))); if (unlikely(!__pyx_t_5)) __PYX_ERR(18, 557, __pyx_L1_error)
  82288. __Pyx_GOTREF(__pyx_t_5);
  82289. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  82290. __Pyx_DECREF_SET(__pyx_v_ctx, ((struct __pyx_obj_6uvloop_4loop__StreamWriteContext *)__pyx_t_5));
  82291. __pyx_t_5 = 0;
  82292. /* "uvloop/handles/stream.pyx":556
  82293. * # fall through
  82294. *
  82295. * if ctx is None: # <<<<<<<<<<<<<<
  82296. * ctx = _StreamWriteContext.new(self, self._buffer)
  82297. *
  82298. */
  82299. }
  82300. /* "uvloop/handles/stream.pyx":559
  82301. * ctx = _StreamWriteContext.new(self, self._buffer)
  82302. *
  82303. * err = uv.uv_write(&ctx.req, # <<<<<<<<<<<<<<
  82304. * <uv.uv_stream_t*>self._handle,
  82305. * ctx.uv_bufs_start,
  82306. */
  82307. __pyx_v_err = uv_write((&__pyx_v_ctx->req), ((uv_stream_t *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._handle), __pyx_v_ctx->uv_bufs_start, __pyx_v_ctx->uv_bufs_len, __pyx_f_6uvloop_4loop___uv_stream_on_write);
  82308. /* "uvloop/handles/stream.pyx":565
  82309. * __uv_stream_on_write)
  82310. *
  82311. * self._buffer_size = 0 # <<<<<<<<<<<<<<
  82312. * # Can't use `_buffer.clear()` here: `ctx` holds a reference to
  82313. * # the `_buffer`.
  82314. */
  82315. __pyx_v_self->_buffer_size = 0;
  82316. /* "uvloop/handles/stream.pyx":568
  82317. * # Can't use `_buffer.clear()` here: `ctx` holds a reference to
  82318. * # the `_buffer`.
  82319. * self._buffer = [] # <<<<<<<<<<<<<<
  82320. *
  82321. * if err < 0:
  82322. */
  82323. __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(18, 568, __pyx_L1_error)
  82324. __Pyx_GOTREF(__pyx_t_5);
  82325. __Pyx_GIVEREF(__pyx_t_5);
  82326. __Pyx_GOTREF(__pyx_v_self->_buffer);
  82327. __Pyx_DECREF(__pyx_v_self->_buffer);
  82328. __pyx_v_self->_buffer = ((PyObject*)__pyx_t_5);
  82329. __pyx_t_5 = 0;
  82330. /* "uvloop/handles/stream.pyx":570
  82331. * self._buffer = []
  82332. *
  82333. * if err < 0: # <<<<<<<<<<<<<<
  82334. * # close write context
  82335. * ctx.close()
  82336. */
  82337. __pyx_t_1 = ((__pyx_v_err < 0) != 0);
  82338. if (__pyx_t_1) {
  82339. /* "uvloop/handles/stream.pyx":572
  82340. * if err < 0:
  82341. * # close write context
  82342. * ctx.close() # <<<<<<<<<<<<<<
  82343. *
  82344. * exc = convert_error(err)
  82345. */
  82346. __pyx_t_5 = ((struct __pyx_vtabstruct_6uvloop_4loop__StreamWriteContext *)__pyx_v_ctx->__pyx_vtab)->close(__pyx_v_ctx); if (unlikely(!__pyx_t_5)) __PYX_ERR(18, 572, __pyx_L1_error)
  82347. __Pyx_GOTREF(__pyx_t_5);
  82348. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  82349. /* "uvloop/handles/stream.pyx":574
  82350. * ctx.close()
  82351. *
  82352. * exc = convert_error(err) # <<<<<<<<<<<<<<
  82353. * self._fatal_error(exc, True)
  82354. * return
  82355. */
  82356. __pyx_t_5 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_5)) __PYX_ERR(18, 574, __pyx_L1_error)
  82357. __Pyx_GOTREF(__pyx_t_5);
  82358. __pyx_v_exc = __pyx_t_5;
  82359. __pyx_t_5 = 0;
  82360. /* "uvloop/handles/stream.pyx":575
  82361. *
  82362. * exc = convert_error(err)
  82363. * self._fatal_error(exc, True) # <<<<<<<<<<<<<<
  82364. * return
  82365. *
  82366. */
  82367. __pyx_t_5 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._fatal_error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self), __pyx_v_exc, Py_True, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(18, 575, __pyx_L1_error)
  82368. __Pyx_GOTREF(__pyx_t_5);
  82369. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  82370. /* "uvloop/handles/stream.pyx":576
  82371. * exc = convert_error(err)
  82372. * self._fatal_error(exc, True)
  82373. * return # <<<<<<<<<<<<<<
  82374. *
  82375. * self._maybe_resume_protocol()
  82376. */
  82377. __Pyx_XDECREF(__pyx_r);
  82378. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  82379. goto __pyx_L0;
  82380. /* "uvloop/handles/stream.pyx":570
  82381. * self._buffer = []
  82382. *
  82383. * if err < 0: # <<<<<<<<<<<<<<
  82384. * # close write context
  82385. * ctx.close()
  82386. */
  82387. }
  82388. /* "uvloop/handles/stream.pyx":578
  82389. * return
  82390. *
  82391. * self._maybe_resume_protocol() # <<<<<<<<<<<<<<
  82392. *
  82393. * cdef size_t _get_write_buffer_size(self):
  82394. */
  82395. __pyx_t_5 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._maybe_resume_protocol(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_v_self)); if (unlikely(!__pyx_t_5)) __PYX_ERR(18, 578, __pyx_L1_error)
  82396. __Pyx_GOTREF(__pyx_t_5);
  82397. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  82398. /* "uvloop/handles/stream.pyx":451
  82399. * self._loop._queue_write(self)
  82400. *
  82401. * cdef inline _exec_write(self): # <<<<<<<<<<<<<<
  82402. * cdef:
  82403. * int err
  82404. */
  82405. /* function exit code */
  82406. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  82407. goto __pyx_L0;
  82408. __pyx_L1_error:;
  82409. __Pyx_XDECREF(__pyx_t_2);
  82410. __Pyx_XDECREF(__pyx_t_5);
  82411. __Pyx_XDECREF(__pyx_t_6);
  82412. __Pyx_XDECREF(__pyx_t_12);
  82413. __Pyx_XDECREF(__pyx_t_13);
  82414. __Pyx_XDECREF(__pyx_t_14);
  82415. __Pyx_AddTraceback("uvloop.loop.UVStream._exec_write", __pyx_clineno, __pyx_lineno, __pyx_filename);
  82416. __pyx_r = 0;
  82417. __pyx_L0:;
  82418. __Pyx_XDECREF((PyObject *)__pyx_v_ctx);
  82419. __Pyx_XDECREF(__pyx_v_data);
  82420. __Pyx_XDECREF(__pyx_v_sent);
  82421. __Pyx_XDECREF(__pyx_v_ex);
  82422. __Pyx_XDECREF(__pyx_v_exc);
  82423. __Pyx_XGIVEREF(__pyx_r);
  82424. __Pyx_RefNannyFinishContext();
  82425. return __pyx_r;
  82426. }
  82427. /* "uvloop/handles/stream.pyx":580
  82428. * self._maybe_resume_protocol()
  82429. *
  82430. * cdef size_t _get_write_buffer_size(self): # <<<<<<<<<<<<<<
  82431. * if self._handle is NULL:
  82432. * return 0
  82433. */
  82434. static size_t __pyx_f_6uvloop_4loop_8UVStream__get_write_buffer_size(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self) {
  82435. size_t __pyx_r;
  82436. __Pyx_RefNannyDeclarations
  82437. int __pyx_t_1;
  82438. __Pyx_RefNannySetupContext("_get_write_buffer_size", 0);
  82439. /* "uvloop/handles/stream.pyx":581
  82440. *
  82441. * cdef size_t _get_write_buffer_size(self):
  82442. * if self._handle is NULL: # <<<<<<<<<<<<<<
  82443. * return 0
  82444. * return ((<uv.uv_stream_t*>self._handle).write_queue_size +
  82445. */
  82446. __pyx_t_1 = ((__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._handle == NULL) != 0);
  82447. if (__pyx_t_1) {
  82448. /* "uvloop/handles/stream.pyx":582
  82449. * cdef size_t _get_write_buffer_size(self):
  82450. * if self._handle is NULL:
  82451. * return 0 # <<<<<<<<<<<<<<
  82452. * return ((<uv.uv_stream_t*>self._handle).write_queue_size +
  82453. * self._buffer_size)
  82454. */
  82455. __pyx_r = 0;
  82456. goto __pyx_L0;
  82457. /* "uvloop/handles/stream.pyx":581
  82458. *
  82459. * cdef size_t _get_write_buffer_size(self):
  82460. * if self._handle is NULL: # <<<<<<<<<<<<<<
  82461. * return 0
  82462. * return ((<uv.uv_stream_t*>self._handle).write_queue_size +
  82463. */
  82464. }
  82465. /* "uvloop/handles/stream.pyx":583
  82466. * if self._handle is NULL:
  82467. * return 0
  82468. * return ((<uv.uv_stream_t*>self._handle).write_queue_size + # <<<<<<<<<<<<<<
  82469. * self._buffer_size)
  82470. *
  82471. */
  82472. __pyx_r = (((uv_stream_t *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._handle)->write_queue_size + __pyx_v_self->_buffer_size);
  82473. goto __pyx_L0;
  82474. /* "uvloop/handles/stream.pyx":580
  82475. * self._maybe_resume_protocol()
  82476. *
  82477. * cdef size_t _get_write_buffer_size(self): # <<<<<<<<<<<<<<
  82478. * if self._handle is NULL:
  82479. * return 0
  82480. */
  82481. /* function exit code */
  82482. __pyx_L0:;
  82483. __Pyx_RefNannyFinishContext();
  82484. return __pyx_r;
  82485. }
  82486. /* "uvloop/handles/stream.pyx":586
  82487. * self._buffer_size)
  82488. *
  82489. * cdef _close(self): # <<<<<<<<<<<<<<
  82490. * try:
  82491. * if self._read_pybuf_acquired:
  82492. */
  82493. static PyObject *__pyx_f_6uvloop_4loop_8UVStream__close(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self) {
  82494. PyObject *__pyx_r = NULL;
  82495. __Pyx_RefNannyDeclarations
  82496. int __pyx_t_1;
  82497. PyObject *__pyx_t_2 = NULL;
  82498. PyObject *__pyx_t_3 = NULL;
  82499. PyObject *__pyx_t_4 = NULL;
  82500. PyObject *__pyx_t_5 = NULL;
  82501. int __pyx_t_6;
  82502. int __pyx_t_7;
  82503. char const *__pyx_t_8;
  82504. PyObject *__pyx_t_9 = NULL;
  82505. PyObject *__pyx_t_10 = NULL;
  82506. PyObject *__pyx_t_11 = NULL;
  82507. PyObject *__pyx_t_12 = NULL;
  82508. PyObject *__pyx_t_13 = NULL;
  82509. PyObject *__pyx_t_14 = NULL;
  82510. __Pyx_RefNannySetupContext("_close", 0);
  82511. /* "uvloop/handles/stream.pyx":587
  82512. *
  82513. * cdef _close(self):
  82514. * try: # <<<<<<<<<<<<<<
  82515. * if self._read_pybuf_acquired:
  82516. * # Should never happen. libuv always calls uv_alloc/uv_read
  82517. */
  82518. /*try:*/ {
  82519. /* "uvloop/handles/stream.pyx":588
  82520. * cdef _close(self):
  82521. * try:
  82522. * if self._read_pybuf_acquired: # <<<<<<<<<<<<<<
  82523. * # Should never happen. libuv always calls uv_alloc/uv_read
  82524. * # in pairs.
  82525. */
  82526. __pyx_t_1 = (__pyx_v_self->_read_pybuf_acquired != 0);
  82527. if (__pyx_t_1) {
  82528. /* "uvloop/handles/stream.pyx":591
  82529. * # Should never happen. libuv always calls uv_alloc/uv_read
  82530. * # in pairs.
  82531. * self._loop.call_exception_handler({ # <<<<<<<<<<<<<<
  82532. * 'transport': self,
  82533. * 'message': 'XXX: an allocated buffer in transport._close()'
  82534. */
  82535. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._loop), __pyx_n_s_call_exception_handler); if (unlikely(!__pyx_t_3)) __PYX_ERR(18, 591, __pyx_L4_error)
  82536. __Pyx_GOTREF(__pyx_t_3);
  82537. /* "uvloop/handles/stream.pyx":592
  82538. * # in pairs.
  82539. * self._loop.call_exception_handler({
  82540. * 'transport': self, # <<<<<<<<<<<<<<
  82541. * 'message': 'XXX: an allocated buffer in transport._close()'
  82542. * })
  82543. */
  82544. __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(18, 592, __pyx_L4_error)
  82545. __Pyx_GOTREF(__pyx_t_4);
  82546. if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_transport, ((PyObject *)__pyx_v_self)) < 0) __PYX_ERR(18, 592, __pyx_L4_error)
  82547. if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_message, __pyx_kp_u_XXX_an_allocated_buffer_in_trans) < 0) __PYX_ERR(18, 592, __pyx_L4_error)
  82548. __pyx_t_5 = NULL;
  82549. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
  82550. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
  82551. if (likely(__pyx_t_5)) {
  82552. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  82553. __Pyx_INCREF(__pyx_t_5);
  82554. __Pyx_INCREF(function);
  82555. __Pyx_DECREF_SET(__pyx_t_3, function);
  82556. }
  82557. }
  82558. __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
  82559. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  82560. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  82561. if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 591, __pyx_L4_error)
  82562. __Pyx_GOTREF(__pyx_t_2);
  82563. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  82564. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  82565. /* "uvloop/handles/stream.pyx":595
  82566. * 'message': 'XXX: an allocated buffer in transport._close()'
  82567. * })
  82568. * self._read_pybuf_acquired = 0 # <<<<<<<<<<<<<<
  82569. * PyBuffer_Release(&self._read_pybuf)
  82570. *
  82571. */
  82572. __pyx_v_self->_read_pybuf_acquired = 0;
  82573. /* "uvloop/handles/stream.pyx":596
  82574. * })
  82575. * self._read_pybuf_acquired = 0
  82576. * PyBuffer_Release(&self._read_pybuf) # <<<<<<<<<<<<<<
  82577. *
  82578. * self._stop_reading()
  82579. */
  82580. PyBuffer_Release((&__pyx_v_self->_read_pybuf));
  82581. /* "uvloop/handles/stream.pyx":588
  82582. * cdef _close(self):
  82583. * try:
  82584. * if self._read_pybuf_acquired: # <<<<<<<<<<<<<<
  82585. * # Should never happen. libuv always calls uv_alloc/uv_read
  82586. * # in pairs.
  82587. */
  82588. }
  82589. /* "uvloop/handles/stream.pyx":598
  82590. * PyBuffer_Release(&self._read_pybuf)
  82591. *
  82592. * self._stop_reading() # <<<<<<<<<<<<<<
  82593. * finally:
  82594. * UVSocketHandle._close(<UVHandle>self)
  82595. */
  82596. __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._stop_reading(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 598, __pyx_L4_error)
  82597. __Pyx_GOTREF(__pyx_t_2);
  82598. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  82599. }
  82600. /* "uvloop/handles/stream.pyx":600
  82601. * self._stop_reading()
  82602. * finally:
  82603. * UVSocketHandle._close(<UVHandle>self) # <<<<<<<<<<<<<<
  82604. *
  82605. * cdef inline _on_accept(self):
  82606. */
  82607. /*finally:*/ {
  82608. /*normal exit:*/{
  82609. if (!(likely(((((PyObject *)__pyx_v_self)) == Py_None) || likely(__Pyx_TypeTest(((PyObject *)__pyx_v_self), __pyx_ptype_6uvloop_4loop_UVSocketHandle))))) __PYX_ERR(18, 600, __pyx_L1_error)
  82610. __pyx_t_2 = __pyx_f_6uvloop_4loop_14UVSocketHandle__close(((struct __pyx_obj_6uvloop_4loop_UVSocketHandle *)((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self))); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 600, __pyx_L1_error)
  82611. __Pyx_GOTREF(__pyx_t_2);
  82612. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  82613. goto __pyx_L5;
  82614. }
  82615. __pyx_L4_error:;
  82616. /*exception exit:*/{
  82617. __Pyx_PyThreadState_declare
  82618. __Pyx_PyThreadState_assign
  82619. __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0;
  82620. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  82621. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  82622. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  82623. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  82624. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
  82625. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11) < 0)) __Pyx_ErrFetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
  82626. __Pyx_XGOTREF(__pyx_t_9);
  82627. __Pyx_XGOTREF(__pyx_t_10);
  82628. __Pyx_XGOTREF(__pyx_t_11);
  82629. __Pyx_XGOTREF(__pyx_t_12);
  82630. __Pyx_XGOTREF(__pyx_t_13);
  82631. __Pyx_XGOTREF(__pyx_t_14);
  82632. __pyx_t_6 = __pyx_lineno; __pyx_t_7 = __pyx_clineno; __pyx_t_8 = __pyx_filename;
  82633. {
  82634. if (!(likely(((((PyObject *)__pyx_v_self)) == Py_None) || likely(__Pyx_TypeTest(((PyObject *)__pyx_v_self), __pyx_ptype_6uvloop_4loop_UVSocketHandle))))) __PYX_ERR(18, 600, __pyx_L8_error)
  82635. __pyx_t_2 = __pyx_f_6uvloop_4loop_14UVSocketHandle__close(((struct __pyx_obj_6uvloop_4loop_UVSocketHandle *)((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self))); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 600, __pyx_L8_error)
  82636. __Pyx_GOTREF(__pyx_t_2);
  82637. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  82638. }
  82639. if (PY_MAJOR_VERSION >= 3) {
  82640. __Pyx_XGIVEREF(__pyx_t_12);
  82641. __Pyx_XGIVEREF(__pyx_t_13);
  82642. __Pyx_XGIVEREF(__pyx_t_14);
  82643. __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
  82644. }
  82645. __Pyx_XGIVEREF(__pyx_t_9);
  82646. __Pyx_XGIVEREF(__pyx_t_10);
  82647. __Pyx_XGIVEREF(__pyx_t_11);
  82648. __Pyx_ErrRestore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
  82649. __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0;
  82650. __pyx_lineno = __pyx_t_6; __pyx_clineno = __pyx_t_7; __pyx_filename = __pyx_t_8;
  82651. goto __pyx_L1_error;
  82652. __pyx_L8_error:;
  82653. if (PY_MAJOR_VERSION >= 3) {
  82654. __Pyx_XGIVEREF(__pyx_t_12);
  82655. __Pyx_XGIVEREF(__pyx_t_13);
  82656. __Pyx_XGIVEREF(__pyx_t_14);
  82657. __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
  82658. }
  82659. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  82660. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  82661. __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
  82662. __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0;
  82663. goto __pyx_L1_error;
  82664. }
  82665. __pyx_L5:;
  82666. }
  82667. /* "uvloop/handles/stream.pyx":586
  82668. * self._buffer_size)
  82669. *
  82670. * cdef _close(self): # <<<<<<<<<<<<<<
  82671. * try:
  82672. * if self._read_pybuf_acquired:
  82673. */
  82674. /* function exit code */
  82675. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  82676. goto __pyx_L0;
  82677. __pyx_L1_error:;
  82678. __Pyx_XDECREF(__pyx_t_2);
  82679. __Pyx_XDECREF(__pyx_t_3);
  82680. __Pyx_XDECREF(__pyx_t_4);
  82681. __Pyx_XDECREF(__pyx_t_5);
  82682. __Pyx_AddTraceback("uvloop.loop.UVStream._close", __pyx_clineno, __pyx_lineno, __pyx_filename);
  82683. __pyx_r = 0;
  82684. __pyx_L0:;
  82685. __Pyx_XGIVEREF(__pyx_r);
  82686. __Pyx_RefNannyFinishContext();
  82687. return __pyx_r;
  82688. }
  82689. /* "uvloop/handles/stream.pyx":602
  82690. * UVSocketHandle._close(<UVHandle>self)
  82691. *
  82692. * cdef inline _on_accept(self): # <<<<<<<<<<<<<<
  82693. * # Ultimately called by __uv_stream_on_listen.
  82694. * self._init_protocol()
  82695. */
  82696. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVStream__on_accept(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self) {
  82697. PyObject *__pyx_r = NULL;
  82698. __Pyx_RefNannyDeclarations
  82699. PyObject *__pyx_t_1 = NULL;
  82700. __Pyx_RefNannySetupContext("_on_accept", 0);
  82701. /* "uvloop/handles/stream.pyx":604
  82702. * cdef inline _on_accept(self):
  82703. * # Ultimately called by __uv_stream_on_listen.
  82704. * self._init_protocol() # <<<<<<<<<<<<<<
  82705. *
  82706. * cdef inline _on_eof(self):
  82707. */
  82708. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._init_protocol(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 604, __pyx_L1_error)
  82709. __Pyx_GOTREF(__pyx_t_1);
  82710. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  82711. /* "uvloop/handles/stream.pyx":602
  82712. * UVSocketHandle._close(<UVHandle>self)
  82713. *
  82714. * cdef inline _on_accept(self): # <<<<<<<<<<<<<<
  82715. * # Ultimately called by __uv_stream_on_listen.
  82716. * self._init_protocol()
  82717. */
  82718. /* function exit code */
  82719. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  82720. goto __pyx_L0;
  82721. __pyx_L1_error:;
  82722. __Pyx_XDECREF(__pyx_t_1);
  82723. __Pyx_AddTraceback("uvloop.loop.UVStream._on_accept", __pyx_clineno, __pyx_lineno, __pyx_filename);
  82724. __pyx_r = 0;
  82725. __pyx_L0:;
  82726. __Pyx_XGIVEREF(__pyx_r);
  82727. __Pyx_RefNannyFinishContext();
  82728. return __pyx_r;
  82729. }
  82730. /* "uvloop/handles/stream.pyx":606
  82731. * self._init_protocol()
  82732. *
  82733. * cdef inline _on_eof(self): # <<<<<<<<<<<<<<
  82734. * # Any exception raised here will be caught in
  82735. * # __uv_stream_on_read.
  82736. */
  82737. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVStream__on_eof(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self) {
  82738. PyObject *__pyx_v_meth = NULL;
  82739. PyObject *__pyx_v_keep_open = NULL;
  82740. PyObject *__pyx_r = NULL;
  82741. __Pyx_RefNannyDeclarations
  82742. PyObject *__pyx_t_1 = NULL;
  82743. PyObject *__pyx_t_2 = NULL;
  82744. PyObject *__pyx_t_3 = NULL;
  82745. PyObject *__pyx_t_4 = NULL;
  82746. PyObject *__pyx_t_5 = NULL;
  82747. PyObject *__pyx_t_6 = NULL;
  82748. int __pyx_t_7;
  82749. int __pyx_t_8;
  82750. __Pyx_RefNannySetupContext("_on_eof", 0);
  82751. /* "uvloop/handles/stream.pyx":610
  82752. * # __uv_stream_on_read.
  82753. *
  82754. * try: # <<<<<<<<<<<<<<
  82755. * meth = self._protocol.eof_received
  82756. * except AttributeError:
  82757. */
  82758. {
  82759. __Pyx_PyThreadState_declare
  82760. __Pyx_PyThreadState_assign
  82761. __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
  82762. __Pyx_XGOTREF(__pyx_t_1);
  82763. __Pyx_XGOTREF(__pyx_t_2);
  82764. __Pyx_XGOTREF(__pyx_t_3);
  82765. /*try:*/ {
  82766. /* "uvloop/handles/stream.pyx":611
  82767. *
  82768. * try:
  82769. * meth = self._protocol.eof_received # <<<<<<<<<<<<<<
  82770. * except AttributeError:
  82771. * keep_open = False
  82772. */
  82773. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base._protocol, __pyx_n_s_eof_received); if (unlikely(!__pyx_t_4)) __PYX_ERR(18, 611, __pyx_L3_error)
  82774. __Pyx_GOTREF(__pyx_t_4);
  82775. __pyx_v_meth = __pyx_t_4;
  82776. __pyx_t_4 = 0;
  82777. /* "uvloop/handles/stream.pyx":610
  82778. * # __uv_stream_on_read.
  82779. *
  82780. * try: # <<<<<<<<<<<<<<
  82781. * meth = self._protocol.eof_received
  82782. * except AttributeError:
  82783. */
  82784. }
  82785. /* "uvloop/handles/stream.pyx":615
  82786. * keep_open = False
  82787. * else:
  82788. * keep_open = meth() # <<<<<<<<<<<<<<
  82789. *
  82790. * if keep_open:
  82791. */
  82792. /*else:*/ {
  82793. __Pyx_INCREF(__pyx_v_meth);
  82794. __pyx_t_5 = __pyx_v_meth; __pyx_t_6 = NULL;
  82795. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
  82796. __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
  82797. if (likely(__pyx_t_6)) {
  82798. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
  82799. __Pyx_INCREF(__pyx_t_6);
  82800. __Pyx_INCREF(function);
  82801. __Pyx_DECREF_SET(__pyx_t_5, function);
  82802. }
  82803. }
  82804. __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
  82805. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  82806. if (unlikely(!__pyx_t_4)) __PYX_ERR(18, 615, __pyx_L5_except_error)
  82807. __Pyx_GOTREF(__pyx_t_4);
  82808. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  82809. __pyx_v_keep_open = __pyx_t_4;
  82810. __pyx_t_4 = 0;
  82811. }
  82812. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  82813. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  82814. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  82815. goto __pyx_L8_try_end;
  82816. __pyx_L3_error:;
  82817. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  82818. /* "uvloop/handles/stream.pyx":612
  82819. * try:
  82820. * meth = self._protocol.eof_received
  82821. * except AttributeError: # <<<<<<<<<<<<<<
  82822. * keep_open = False
  82823. * else:
  82824. */
  82825. __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
  82826. if (__pyx_t_7) {
  82827. __Pyx_AddTraceback("uvloop.loop.UVStream._on_eof", __pyx_clineno, __pyx_lineno, __pyx_filename);
  82828. if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6) < 0) __PYX_ERR(18, 612, __pyx_L5_except_error)
  82829. __Pyx_GOTREF(__pyx_t_4);
  82830. __Pyx_GOTREF(__pyx_t_5);
  82831. __Pyx_GOTREF(__pyx_t_6);
  82832. /* "uvloop/handles/stream.pyx":613
  82833. * meth = self._protocol.eof_received
  82834. * except AttributeError:
  82835. * keep_open = False # <<<<<<<<<<<<<<
  82836. * else:
  82837. * keep_open = meth()
  82838. */
  82839. __Pyx_INCREF(Py_False);
  82840. __pyx_v_keep_open = Py_False;
  82841. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  82842. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  82843. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  82844. goto __pyx_L4_exception_handled;
  82845. }
  82846. goto __pyx_L5_except_error;
  82847. __pyx_L5_except_error:;
  82848. /* "uvloop/handles/stream.pyx":610
  82849. * # __uv_stream_on_read.
  82850. *
  82851. * try: # <<<<<<<<<<<<<<
  82852. * meth = self._protocol.eof_received
  82853. * except AttributeError:
  82854. */
  82855. __Pyx_XGIVEREF(__pyx_t_1);
  82856. __Pyx_XGIVEREF(__pyx_t_2);
  82857. __Pyx_XGIVEREF(__pyx_t_3);
  82858. __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
  82859. goto __pyx_L1_error;
  82860. __pyx_L4_exception_handled:;
  82861. __Pyx_XGIVEREF(__pyx_t_1);
  82862. __Pyx_XGIVEREF(__pyx_t_2);
  82863. __Pyx_XGIVEREF(__pyx_t_3);
  82864. __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
  82865. __pyx_L8_try_end:;
  82866. }
  82867. /* "uvloop/handles/stream.pyx":617
  82868. * keep_open = meth()
  82869. *
  82870. * if keep_open: # <<<<<<<<<<<<<<
  82871. * # We're keeping the connection open so the
  82872. * # protocol can write more, but we still can't
  82873. */
  82874. __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_keep_open); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(18, 617, __pyx_L1_error)
  82875. if (__pyx_t_8) {
  82876. /* "uvloop/handles/stream.pyx":621
  82877. * # protocol can write more, but we still can't
  82878. * # receive more, so remove the reader callback.
  82879. * self._stop_reading() # <<<<<<<<<<<<<<
  82880. * else:
  82881. * self.close()
  82882. */
  82883. __pyx_t_6 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._stop_reading(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_v_self)); if (unlikely(!__pyx_t_6)) __PYX_ERR(18, 621, __pyx_L1_error)
  82884. __Pyx_GOTREF(__pyx_t_6);
  82885. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  82886. /* "uvloop/handles/stream.pyx":617
  82887. * keep_open = meth()
  82888. *
  82889. * if keep_open: # <<<<<<<<<<<<<<
  82890. * # We're keeping the connection open so the
  82891. * # protocol can write more, but we still can't
  82892. */
  82893. goto __pyx_L11;
  82894. }
  82895. /* "uvloop/handles/stream.pyx":623
  82896. * self._stop_reading()
  82897. * else:
  82898. * self.close() # <<<<<<<<<<<<<<
  82899. *
  82900. * cdef inline _on_write(self):
  82901. */
  82902. /*else*/ {
  82903. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_close); if (unlikely(!__pyx_t_5)) __PYX_ERR(18, 623, __pyx_L1_error)
  82904. __Pyx_GOTREF(__pyx_t_5);
  82905. __pyx_t_4 = NULL;
  82906. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
  82907. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
  82908. if (likely(__pyx_t_4)) {
  82909. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
  82910. __Pyx_INCREF(__pyx_t_4);
  82911. __Pyx_INCREF(function);
  82912. __Pyx_DECREF_SET(__pyx_t_5, function);
  82913. }
  82914. }
  82915. __pyx_t_6 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
  82916. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  82917. if (unlikely(!__pyx_t_6)) __PYX_ERR(18, 623, __pyx_L1_error)
  82918. __Pyx_GOTREF(__pyx_t_6);
  82919. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  82920. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  82921. }
  82922. __pyx_L11:;
  82923. /* "uvloop/handles/stream.pyx":606
  82924. * self._init_protocol()
  82925. *
  82926. * cdef inline _on_eof(self): # <<<<<<<<<<<<<<
  82927. * # Any exception raised here will be caught in
  82928. * # __uv_stream_on_read.
  82929. */
  82930. /* function exit code */
  82931. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  82932. goto __pyx_L0;
  82933. __pyx_L1_error:;
  82934. __Pyx_XDECREF(__pyx_t_4);
  82935. __Pyx_XDECREF(__pyx_t_5);
  82936. __Pyx_XDECREF(__pyx_t_6);
  82937. __Pyx_AddTraceback("uvloop.loop.UVStream._on_eof", __pyx_clineno, __pyx_lineno, __pyx_filename);
  82938. __pyx_r = 0;
  82939. __pyx_L0:;
  82940. __Pyx_XDECREF(__pyx_v_meth);
  82941. __Pyx_XDECREF(__pyx_v_keep_open);
  82942. __Pyx_XGIVEREF(__pyx_r);
  82943. __Pyx_RefNannyFinishContext();
  82944. return __pyx_r;
  82945. }
  82946. /* "uvloop/handles/stream.pyx":625
  82947. * self.close()
  82948. *
  82949. * cdef inline _on_write(self): # <<<<<<<<<<<<<<
  82950. * self._maybe_resume_protocol()
  82951. * if not self._get_write_buffer_size():
  82952. */
  82953. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVStream__on_write(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self) {
  82954. PyObject *__pyx_r = NULL;
  82955. __Pyx_RefNannyDeclarations
  82956. PyObject *__pyx_t_1 = NULL;
  82957. int __pyx_t_2;
  82958. __Pyx_RefNannySetupContext("_on_write", 0);
  82959. /* "uvloop/handles/stream.pyx":626
  82960. *
  82961. * cdef inline _on_write(self):
  82962. * self._maybe_resume_protocol() # <<<<<<<<<<<<<<
  82963. * if not self._get_write_buffer_size():
  82964. * if self._closing:
  82965. */
  82966. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._maybe_resume_protocol(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 626, __pyx_L1_error)
  82967. __Pyx_GOTREF(__pyx_t_1);
  82968. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  82969. /* "uvloop/handles/stream.pyx":627
  82970. * cdef inline _on_write(self):
  82971. * self._maybe_resume_protocol()
  82972. * if not self._get_write_buffer_size(): # <<<<<<<<<<<<<<
  82973. * if self._closing:
  82974. * self._schedule_call_connection_lost(None)
  82975. */
  82976. __pyx_t_2 = ((!(((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._get_write_buffer_size(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_v_self)) != 0)) != 0);
  82977. if (__pyx_t_2) {
  82978. /* "uvloop/handles/stream.pyx":628
  82979. * self._maybe_resume_protocol()
  82980. * if not self._get_write_buffer_size():
  82981. * if self._closing: # <<<<<<<<<<<<<<
  82982. * self._schedule_call_connection_lost(None)
  82983. * elif self._eof:
  82984. */
  82985. __pyx_t_2 = (__pyx_v_self->__pyx_base._closing != 0);
  82986. if (__pyx_t_2) {
  82987. /* "uvloop/handles/stream.pyx":629
  82988. * if not self._get_write_buffer_size():
  82989. * if self._closing:
  82990. * self._schedule_call_connection_lost(None) # <<<<<<<<<<<<<<
  82991. * elif self._eof:
  82992. * self._shutdown()
  82993. */
  82994. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._schedule_call_connection_lost(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_v_self), Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 629, __pyx_L1_error)
  82995. __Pyx_GOTREF(__pyx_t_1);
  82996. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  82997. /* "uvloop/handles/stream.pyx":628
  82998. * self._maybe_resume_protocol()
  82999. * if not self._get_write_buffer_size():
  83000. * if self._closing: # <<<<<<<<<<<<<<
  83001. * self._schedule_call_connection_lost(None)
  83002. * elif self._eof:
  83003. */
  83004. goto __pyx_L4;
  83005. }
  83006. /* "uvloop/handles/stream.pyx":630
  83007. * if self._closing:
  83008. * self._schedule_call_connection_lost(None)
  83009. * elif self._eof: # <<<<<<<<<<<<<<
  83010. * self._shutdown()
  83011. *
  83012. */
  83013. __pyx_t_2 = (__pyx_v_self->_eof != 0);
  83014. if (__pyx_t_2) {
  83015. /* "uvloop/handles/stream.pyx":631
  83016. * self._schedule_call_connection_lost(None)
  83017. * elif self._eof:
  83018. * self._shutdown() # <<<<<<<<<<<<<<
  83019. *
  83020. * cdef inline _init(self, Loop loop, object protocol, Server server,
  83021. */
  83022. __pyx_t_1 = __pyx_f_6uvloop_4loop_8UVStream__shutdown(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 631, __pyx_L1_error)
  83023. __Pyx_GOTREF(__pyx_t_1);
  83024. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  83025. /* "uvloop/handles/stream.pyx":630
  83026. * if self._closing:
  83027. * self._schedule_call_connection_lost(None)
  83028. * elif self._eof: # <<<<<<<<<<<<<<
  83029. * self._shutdown()
  83030. *
  83031. */
  83032. }
  83033. __pyx_L4:;
  83034. /* "uvloop/handles/stream.pyx":627
  83035. * cdef inline _on_write(self):
  83036. * self._maybe_resume_protocol()
  83037. * if not self._get_write_buffer_size(): # <<<<<<<<<<<<<<
  83038. * if self._closing:
  83039. * self._schedule_call_connection_lost(None)
  83040. */
  83041. }
  83042. /* "uvloop/handles/stream.pyx":625
  83043. * self.close()
  83044. *
  83045. * cdef inline _on_write(self): # <<<<<<<<<<<<<<
  83046. * self._maybe_resume_protocol()
  83047. * if not self._get_write_buffer_size():
  83048. */
  83049. /* function exit code */
  83050. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  83051. goto __pyx_L0;
  83052. __pyx_L1_error:;
  83053. __Pyx_XDECREF(__pyx_t_1);
  83054. __Pyx_AddTraceback("uvloop.loop.UVStream._on_write", __pyx_clineno, __pyx_lineno, __pyx_filename);
  83055. __pyx_r = 0;
  83056. __pyx_L0:;
  83057. __Pyx_XGIVEREF(__pyx_r);
  83058. __Pyx_RefNannyFinishContext();
  83059. return __pyx_r;
  83060. }
  83061. /* "uvloop/handles/stream.pyx":633
  83062. * self._shutdown()
  83063. *
  83064. * cdef inline _init(self, Loop loop, object protocol, Server server, # <<<<<<<<<<<<<<
  83065. * object waiter):
  83066. *
  83067. */
  83068. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVStream__init(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, PyObject *__pyx_v_protocol, struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_server, PyObject *__pyx_v_waiter) {
  83069. PyObject *__pyx_r = NULL;
  83070. __Pyx_RefNannyDeclarations
  83071. PyObject *__pyx_t_1 = NULL;
  83072. int __pyx_t_2;
  83073. int __pyx_t_3;
  83074. __Pyx_RefNannySetupContext("_init", 0);
  83075. /* "uvloop/handles/stream.pyx":636
  83076. * object waiter):
  83077. *
  83078. * self._set_protocol(protocol) # <<<<<<<<<<<<<<
  83079. * self._start_init(loop)
  83080. *
  83081. */
  83082. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._set_protocol(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_v_self), __pyx_v_protocol); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 636, __pyx_L1_error)
  83083. __Pyx_GOTREF(__pyx_t_1);
  83084. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  83085. /* "uvloop/handles/stream.pyx":637
  83086. *
  83087. * self._set_protocol(protocol)
  83088. * self._start_init(loop) # <<<<<<<<<<<<<<
  83089. *
  83090. * if server is not None:
  83091. */
  83092. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._start_init(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self), __pyx_v_loop); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 637, __pyx_L1_error)
  83093. __Pyx_GOTREF(__pyx_t_1);
  83094. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  83095. /* "uvloop/handles/stream.pyx":639
  83096. * self._start_init(loop)
  83097. *
  83098. * if server is not None: # <<<<<<<<<<<<<<
  83099. * self._set_server(server)
  83100. *
  83101. */
  83102. __pyx_t_2 = (((PyObject *)__pyx_v_server) != Py_None);
  83103. __pyx_t_3 = (__pyx_t_2 != 0);
  83104. if (__pyx_t_3) {
  83105. /* "uvloop/handles/stream.pyx":640
  83106. *
  83107. * if server is not None:
  83108. * self._set_server(server) # <<<<<<<<<<<<<<
  83109. *
  83110. * if waiter is not None:
  83111. */
  83112. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._set_server(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_v_self), __pyx_v_server); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 640, __pyx_L1_error)
  83113. __Pyx_GOTREF(__pyx_t_1);
  83114. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  83115. /* "uvloop/handles/stream.pyx":639
  83116. * self._start_init(loop)
  83117. *
  83118. * if server is not None: # <<<<<<<<<<<<<<
  83119. * self._set_server(server)
  83120. *
  83121. */
  83122. }
  83123. /* "uvloop/handles/stream.pyx":642
  83124. * self._set_server(server)
  83125. *
  83126. * if waiter is not None: # <<<<<<<<<<<<<<
  83127. * self._set_waiter(waiter)
  83128. *
  83129. */
  83130. __pyx_t_3 = (__pyx_v_waiter != Py_None);
  83131. __pyx_t_2 = (__pyx_t_3 != 0);
  83132. if (__pyx_t_2) {
  83133. /* "uvloop/handles/stream.pyx":643
  83134. *
  83135. * if waiter is not None:
  83136. * self._set_waiter(waiter) # <<<<<<<<<<<<<<
  83137. *
  83138. * cdef inline _on_connect(self, object exc):
  83139. */
  83140. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._set_waiter(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_v_self), __pyx_v_waiter); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 643, __pyx_L1_error)
  83141. __Pyx_GOTREF(__pyx_t_1);
  83142. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  83143. /* "uvloop/handles/stream.pyx":642
  83144. * self._set_server(server)
  83145. *
  83146. * if waiter is not None: # <<<<<<<<<<<<<<
  83147. * self._set_waiter(waiter)
  83148. *
  83149. */
  83150. }
  83151. /* "uvloop/handles/stream.pyx":633
  83152. * self._shutdown()
  83153. *
  83154. * cdef inline _init(self, Loop loop, object protocol, Server server, # <<<<<<<<<<<<<<
  83155. * object waiter):
  83156. *
  83157. */
  83158. /* function exit code */
  83159. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  83160. goto __pyx_L0;
  83161. __pyx_L1_error:;
  83162. __Pyx_XDECREF(__pyx_t_1);
  83163. __Pyx_AddTraceback("uvloop.loop.UVStream._init", __pyx_clineno, __pyx_lineno, __pyx_filename);
  83164. __pyx_r = 0;
  83165. __pyx_L0:;
  83166. __Pyx_XGIVEREF(__pyx_r);
  83167. __Pyx_RefNannyFinishContext();
  83168. return __pyx_r;
  83169. }
  83170. /* "uvloop/handles/stream.pyx":645
  83171. * self._set_waiter(waiter)
  83172. *
  83173. * cdef inline _on_connect(self, object exc): # <<<<<<<<<<<<<<
  83174. * # Called from __tcp_connect_callback (tcp.pyx) and
  83175. * # __pipe_connect_callback (pipe.pyx).
  83176. */
  83177. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVStream__on_connect(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self, PyObject *__pyx_v_exc) {
  83178. PyObject *__pyx_r = NULL;
  83179. __Pyx_RefNannyDeclarations
  83180. int __pyx_t_1;
  83181. int __pyx_t_2;
  83182. PyObject *__pyx_t_3 = NULL;
  83183. struct __pyx_opt_args_6uvloop_4loop_8UVHandle__fatal_error __pyx_t_4;
  83184. PyObject *__pyx_t_5 = NULL;
  83185. PyObject *__pyx_t_6 = NULL;
  83186. __Pyx_RefNannySetupContext("_on_connect", 0);
  83187. /* "uvloop/handles/stream.pyx":648
  83188. * # Called from __tcp_connect_callback (tcp.pyx) and
  83189. * # __pipe_connect_callback (pipe.pyx).
  83190. * if exc is None: # <<<<<<<<<<<<<<
  83191. * self._init_protocol()
  83192. * else:
  83193. */
  83194. __pyx_t_1 = (__pyx_v_exc == Py_None);
  83195. __pyx_t_2 = (__pyx_t_1 != 0);
  83196. if (__pyx_t_2) {
  83197. /* "uvloop/handles/stream.pyx":649
  83198. * # __pipe_connect_callback (pipe.pyx).
  83199. * if exc is None:
  83200. * self._init_protocol() # <<<<<<<<<<<<<<
  83201. * else:
  83202. * if self._waiter is None:
  83203. */
  83204. __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._init_protocol(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(18, 649, __pyx_L1_error)
  83205. __Pyx_GOTREF(__pyx_t_3);
  83206. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  83207. /* "uvloop/handles/stream.pyx":648
  83208. * # Called from __tcp_connect_callback (tcp.pyx) and
  83209. * # __pipe_connect_callback (pipe.pyx).
  83210. * if exc is None: # <<<<<<<<<<<<<<
  83211. * self._init_protocol()
  83212. * else:
  83213. */
  83214. goto __pyx_L3;
  83215. }
  83216. /* "uvloop/handles/stream.pyx":651
  83217. * self._init_protocol()
  83218. * else:
  83219. * if self._waiter is None: # <<<<<<<<<<<<<<
  83220. * self._fatal_error(exc, False, "connect failed")
  83221. * elif self._waiter.cancelled():
  83222. */
  83223. /*else*/ {
  83224. __pyx_t_2 = (__pyx_v_self->__pyx_base._waiter == Py_None);
  83225. __pyx_t_1 = (__pyx_t_2 != 0);
  83226. if (__pyx_t_1) {
  83227. /* "uvloop/handles/stream.pyx":652
  83228. * else:
  83229. * if self._waiter is None:
  83230. * self._fatal_error(exc, False, "connect failed") # <<<<<<<<<<<<<<
  83231. * elif self._waiter.cancelled():
  83232. * # Connect call was cancelled; just close the transport
  83233. */
  83234. __pyx_t_4.__pyx_n = 1;
  83235. __pyx_t_4.reason = __pyx_kp_u_connect_failed;
  83236. __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._fatal_error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self), __pyx_v_exc, Py_False, &__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(18, 652, __pyx_L1_error)
  83237. __Pyx_GOTREF(__pyx_t_3);
  83238. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  83239. /* "uvloop/handles/stream.pyx":651
  83240. * self._init_protocol()
  83241. * else:
  83242. * if self._waiter is None: # <<<<<<<<<<<<<<
  83243. * self._fatal_error(exc, False, "connect failed")
  83244. * elif self._waiter.cancelled():
  83245. */
  83246. goto __pyx_L4;
  83247. }
  83248. /* "uvloop/handles/stream.pyx":653
  83249. * if self._waiter is None:
  83250. * self._fatal_error(exc, False, "connect failed")
  83251. * elif self._waiter.cancelled(): # <<<<<<<<<<<<<<
  83252. * # Connect call was cancelled; just close the transport
  83253. * # silently.
  83254. */
  83255. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base._waiter, __pyx_n_s_cancelled); if (unlikely(!__pyx_t_5)) __PYX_ERR(18, 653, __pyx_L1_error)
  83256. __Pyx_GOTREF(__pyx_t_5);
  83257. __pyx_t_6 = NULL;
  83258. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
  83259. __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
  83260. if (likely(__pyx_t_6)) {
  83261. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
  83262. __Pyx_INCREF(__pyx_t_6);
  83263. __Pyx_INCREF(function);
  83264. __Pyx_DECREF_SET(__pyx_t_5, function);
  83265. }
  83266. }
  83267. __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
  83268. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  83269. if (unlikely(!__pyx_t_3)) __PYX_ERR(18, 653, __pyx_L1_error)
  83270. __Pyx_GOTREF(__pyx_t_3);
  83271. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  83272. __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(18, 653, __pyx_L1_error)
  83273. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  83274. if (__pyx_t_1) {
  83275. /* "uvloop/handles/stream.pyx":656
  83276. * # Connect call was cancelled; just close the transport
  83277. * # silently.
  83278. * self._close() # <<<<<<<<<<<<<<
  83279. * elif self._waiter.done():
  83280. * self._fatal_error(exc, False, "connect failed")
  83281. */
  83282. __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._close(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(18, 656, __pyx_L1_error)
  83283. __Pyx_GOTREF(__pyx_t_3);
  83284. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  83285. /* "uvloop/handles/stream.pyx":653
  83286. * if self._waiter is None:
  83287. * self._fatal_error(exc, False, "connect failed")
  83288. * elif self._waiter.cancelled(): # <<<<<<<<<<<<<<
  83289. * # Connect call was cancelled; just close the transport
  83290. * # silently.
  83291. */
  83292. goto __pyx_L4;
  83293. }
  83294. /* "uvloop/handles/stream.pyx":657
  83295. * # silently.
  83296. * self._close()
  83297. * elif self._waiter.done(): # <<<<<<<<<<<<<<
  83298. * self._fatal_error(exc, False, "connect failed")
  83299. * else:
  83300. */
  83301. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base._waiter, __pyx_n_s_done); if (unlikely(!__pyx_t_5)) __PYX_ERR(18, 657, __pyx_L1_error)
  83302. __Pyx_GOTREF(__pyx_t_5);
  83303. __pyx_t_6 = NULL;
  83304. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
  83305. __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
  83306. if (likely(__pyx_t_6)) {
  83307. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
  83308. __Pyx_INCREF(__pyx_t_6);
  83309. __Pyx_INCREF(function);
  83310. __Pyx_DECREF_SET(__pyx_t_5, function);
  83311. }
  83312. }
  83313. __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
  83314. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  83315. if (unlikely(!__pyx_t_3)) __PYX_ERR(18, 657, __pyx_L1_error)
  83316. __Pyx_GOTREF(__pyx_t_3);
  83317. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  83318. __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(18, 657, __pyx_L1_error)
  83319. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  83320. if (__pyx_t_1) {
  83321. /* "uvloop/handles/stream.pyx":658
  83322. * self._close()
  83323. * elif self._waiter.done():
  83324. * self._fatal_error(exc, False, "connect failed") # <<<<<<<<<<<<<<
  83325. * else:
  83326. * self._waiter.set_exception(exc)
  83327. */
  83328. __pyx_t_4.__pyx_n = 1;
  83329. __pyx_t_4.reason = __pyx_kp_u_connect_failed;
  83330. __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._fatal_error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self), __pyx_v_exc, Py_False, &__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(18, 658, __pyx_L1_error)
  83331. __Pyx_GOTREF(__pyx_t_3);
  83332. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  83333. /* "uvloop/handles/stream.pyx":657
  83334. * # silently.
  83335. * self._close()
  83336. * elif self._waiter.done(): # <<<<<<<<<<<<<<
  83337. * self._fatal_error(exc, False, "connect failed")
  83338. * else:
  83339. */
  83340. goto __pyx_L4;
  83341. }
  83342. /* "uvloop/handles/stream.pyx":660
  83343. * self._fatal_error(exc, False, "connect failed")
  83344. * else:
  83345. * self._waiter.set_exception(exc) # <<<<<<<<<<<<<<
  83346. * self._close()
  83347. *
  83348. */
  83349. /*else*/ {
  83350. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base._waiter, __pyx_n_s_set_exception); if (unlikely(!__pyx_t_5)) __PYX_ERR(18, 660, __pyx_L1_error)
  83351. __Pyx_GOTREF(__pyx_t_5);
  83352. __pyx_t_6 = NULL;
  83353. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
  83354. __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
  83355. if (likely(__pyx_t_6)) {
  83356. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
  83357. __Pyx_INCREF(__pyx_t_6);
  83358. __Pyx_INCREF(function);
  83359. __Pyx_DECREF_SET(__pyx_t_5, function);
  83360. }
  83361. }
  83362. __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_v_exc) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_exc);
  83363. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  83364. if (unlikely(!__pyx_t_3)) __PYX_ERR(18, 660, __pyx_L1_error)
  83365. __Pyx_GOTREF(__pyx_t_3);
  83366. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  83367. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  83368. /* "uvloop/handles/stream.pyx":661
  83369. * else:
  83370. * self._waiter.set_exception(exc)
  83371. * self._close() # <<<<<<<<<<<<<<
  83372. *
  83373. * # === Public API ===
  83374. */
  83375. __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._close(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(18, 661, __pyx_L1_error)
  83376. __Pyx_GOTREF(__pyx_t_3);
  83377. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  83378. }
  83379. __pyx_L4:;
  83380. }
  83381. __pyx_L3:;
  83382. /* "uvloop/handles/stream.pyx":645
  83383. * self._set_waiter(waiter)
  83384. *
  83385. * cdef inline _on_connect(self, object exc): # <<<<<<<<<<<<<<
  83386. * # Called from __tcp_connect_callback (tcp.pyx) and
  83387. * # __pipe_connect_callback (pipe.pyx).
  83388. */
  83389. /* function exit code */
  83390. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  83391. goto __pyx_L0;
  83392. __pyx_L1_error:;
  83393. __Pyx_XDECREF(__pyx_t_3);
  83394. __Pyx_XDECREF(__pyx_t_5);
  83395. __Pyx_XDECREF(__pyx_t_6);
  83396. __Pyx_AddTraceback("uvloop.loop.UVStream._on_connect", __pyx_clineno, __pyx_lineno, __pyx_filename);
  83397. __pyx_r = 0;
  83398. __pyx_L0:;
  83399. __Pyx_XGIVEREF(__pyx_r);
  83400. __Pyx_RefNannyFinishContext();
  83401. return __pyx_r;
  83402. }
  83403. /* "uvloop/handles/stream.pyx":665
  83404. * # === Public API ===
  83405. *
  83406. * def __repr__(self): # <<<<<<<<<<<<<<
  83407. * return '<{} closed={} reading={} {:#x}>'.format(
  83408. * self.__class__.__name__,
  83409. */
  83410. /* Python wrapper */
  83411. static PyObject *__pyx_pw_6uvloop_4loop_8UVStream_3__repr__(PyObject *__pyx_v_self); /*proto*/
  83412. static PyObject *__pyx_pw_6uvloop_4loop_8UVStream_3__repr__(PyObject *__pyx_v_self) {
  83413. PyObject *__pyx_r = 0;
  83414. __Pyx_RefNannyDeclarations
  83415. __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  83416. __pyx_r = __pyx_pf_6uvloop_4loop_8UVStream_2__repr__(((struct __pyx_obj_6uvloop_4loop_UVStream *)__pyx_v_self));
  83417. /* function exit code */
  83418. __Pyx_RefNannyFinishContext();
  83419. return __pyx_r;
  83420. }
  83421. static PyObject *__pyx_pf_6uvloop_4loop_8UVStream_2__repr__(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self) {
  83422. PyObject *__pyx_r = NULL;
  83423. __Pyx_RefNannyDeclarations
  83424. PyObject *__pyx_t_1 = NULL;
  83425. PyObject *__pyx_t_2 = NULL;
  83426. PyObject *__pyx_t_3 = NULL;
  83427. PyObject *__pyx_t_4 = NULL;
  83428. PyObject *__pyx_t_5 = NULL;
  83429. PyObject *__pyx_t_6 = NULL;
  83430. PyObject *__pyx_t_7 = NULL;
  83431. int __pyx_t_8;
  83432. PyObject *__pyx_t_9 = NULL;
  83433. __Pyx_RefNannySetupContext("__repr__", 0);
  83434. /* "uvloop/handles/stream.pyx":666
  83435. *
  83436. * def __repr__(self):
  83437. * return '<{} closed={} reading={} {:#x}>'.format( # <<<<<<<<<<<<<<
  83438. * self.__class__.__name__,
  83439. * self._closed,
  83440. */
  83441. __Pyx_XDECREF(__pyx_r);
  83442. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_closed_reading_x, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 666, __pyx_L1_error)
  83443. __Pyx_GOTREF(__pyx_t_2);
  83444. /* "uvloop/handles/stream.pyx":667
  83445. * def __repr__(self):
  83446. * return '<{} closed={} reading={} {:#x}>'.format(
  83447. * self.__class__.__name__, # <<<<<<<<<<<<<<
  83448. * self._closed,
  83449. * self.__reading,
  83450. */
  83451. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(18, 667, __pyx_L1_error)
  83452. __Pyx_GOTREF(__pyx_t_3);
  83453. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(18, 667, __pyx_L1_error)
  83454. __Pyx_GOTREF(__pyx_t_4);
  83455. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  83456. /* "uvloop/handles/stream.pyx":668
  83457. * return '<{} closed={} reading={} {:#x}>'.format(
  83458. * self.__class__.__name__,
  83459. * self._closed, # <<<<<<<<<<<<<<
  83460. * self.__reading,
  83461. * id(self))
  83462. */
  83463. __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._closed); if (unlikely(!__pyx_t_3)) __PYX_ERR(18, 668, __pyx_L1_error)
  83464. __Pyx_GOTREF(__pyx_t_3);
  83465. /* "uvloop/handles/stream.pyx":669
  83466. * self.__class__.__name__,
  83467. * self._closed,
  83468. * self.__reading, # <<<<<<<<<<<<<<
  83469. * id(self))
  83470. *
  83471. */
  83472. __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_self->__pyx___reading); if (unlikely(!__pyx_t_5)) __PYX_ERR(18, 669, __pyx_L1_error)
  83473. __Pyx_GOTREF(__pyx_t_5);
  83474. /* "uvloop/handles/stream.pyx":670
  83475. * self._closed,
  83476. * self.__reading,
  83477. * id(self)) # <<<<<<<<<<<<<<
  83478. *
  83479. * def write(self, object buf):
  83480. */
  83481. __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_6)) __PYX_ERR(18, 670, __pyx_L1_error)
  83482. __Pyx_GOTREF(__pyx_t_6);
  83483. __pyx_t_7 = NULL;
  83484. __pyx_t_8 = 0;
  83485. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
  83486. __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
  83487. if (likely(__pyx_t_7)) {
  83488. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  83489. __Pyx_INCREF(__pyx_t_7);
  83490. __Pyx_INCREF(function);
  83491. __Pyx_DECREF_SET(__pyx_t_2, function);
  83492. __pyx_t_8 = 1;
  83493. }
  83494. }
  83495. #if CYTHON_FAST_PYCALL
  83496. if (PyFunction_Check(__pyx_t_2)) {
  83497. PyObject *__pyx_temp[5] = {__pyx_t_7, __pyx_t_4, __pyx_t_3, __pyx_t_5, __pyx_t_6};
  83498. __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 4+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 666, __pyx_L1_error)
  83499. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  83500. __Pyx_GOTREF(__pyx_t_1);
  83501. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  83502. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  83503. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  83504. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  83505. } else
  83506. #endif
  83507. #if CYTHON_FAST_PYCCALL
  83508. if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
  83509. PyObject *__pyx_temp[5] = {__pyx_t_7, __pyx_t_4, __pyx_t_3, __pyx_t_5, __pyx_t_6};
  83510. __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 4+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 666, __pyx_L1_error)
  83511. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  83512. __Pyx_GOTREF(__pyx_t_1);
  83513. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  83514. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  83515. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  83516. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  83517. } else
  83518. #endif
  83519. {
  83520. __pyx_t_9 = PyTuple_New(4+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(18, 666, __pyx_L1_error)
  83521. __Pyx_GOTREF(__pyx_t_9);
  83522. if (__pyx_t_7) {
  83523. __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
  83524. }
  83525. __Pyx_GIVEREF(__pyx_t_4);
  83526. PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_4);
  83527. __Pyx_GIVEREF(__pyx_t_3);
  83528. PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_3);
  83529. __Pyx_GIVEREF(__pyx_t_5);
  83530. PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_t_5);
  83531. __Pyx_GIVEREF(__pyx_t_6);
  83532. PyTuple_SET_ITEM(__pyx_t_9, 3+__pyx_t_8, __pyx_t_6);
  83533. __pyx_t_4 = 0;
  83534. __pyx_t_3 = 0;
  83535. __pyx_t_5 = 0;
  83536. __pyx_t_6 = 0;
  83537. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 666, __pyx_L1_error)
  83538. __Pyx_GOTREF(__pyx_t_1);
  83539. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  83540. }
  83541. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  83542. __pyx_r = __pyx_t_1;
  83543. __pyx_t_1 = 0;
  83544. goto __pyx_L0;
  83545. /* "uvloop/handles/stream.pyx":665
  83546. * # === Public API ===
  83547. *
  83548. * def __repr__(self): # <<<<<<<<<<<<<<
  83549. * return '<{} closed={} reading={} {:#x}>'.format(
  83550. * self.__class__.__name__,
  83551. */
  83552. /* function exit code */
  83553. __pyx_L1_error:;
  83554. __Pyx_XDECREF(__pyx_t_1);
  83555. __Pyx_XDECREF(__pyx_t_2);
  83556. __Pyx_XDECREF(__pyx_t_3);
  83557. __Pyx_XDECREF(__pyx_t_4);
  83558. __Pyx_XDECREF(__pyx_t_5);
  83559. __Pyx_XDECREF(__pyx_t_6);
  83560. __Pyx_XDECREF(__pyx_t_7);
  83561. __Pyx_XDECREF(__pyx_t_9);
  83562. __Pyx_AddTraceback("uvloop.loop.UVStream.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  83563. __pyx_r = NULL;
  83564. __pyx_L0:;
  83565. __Pyx_XGIVEREF(__pyx_r);
  83566. __Pyx_RefNannyFinishContext();
  83567. return __pyx_r;
  83568. }
  83569. /* "uvloop/handles/stream.pyx":672
  83570. * id(self))
  83571. *
  83572. * def write(self, object buf): # <<<<<<<<<<<<<<
  83573. * self._ensure_alive()
  83574. *
  83575. */
  83576. /* Python wrapper */
  83577. static PyObject *__pyx_pw_6uvloop_4loop_8UVStream_5write(PyObject *__pyx_v_self, PyObject *__pyx_v_buf); /*proto*/
  83578. static char __pyx_doc_6uvloop_4loop_8UVStream_4write[] = "UVStream.write(self, buf)";
  83579. static PyObject *__pyx_pw_6uvloop_4loop_8UVStream_5write(PyObject *__pyx_v_self, PyObject *__pyx_v_buf) {
  83580. PyObject *__pyx_r = 0;
  83581. __Pyx_RefNannyDeclarations
  83582. __Pyx_RefNannySetupContext("write (wrapper)", 0);
  83583. __pyx_r = __pyx_pf_6uvloop_4loop_8UVStream_4write(((struct __pyx_obj_6uvloop_4loop_UVStream *)__pyx_v_self), ((PyObject *)__pyx_v_buf));
  83584. /* function exit code */
  83585. __Pyx_RefNannyFinishContext();
  83586. return __pyx_r;
  83587. }
  83588. static PyObject *__pyx_pf_6uvloop_4loop_8UVStream_4write(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self, PyObject *__pyx_v_buf) {
  83589. PyObject *__pyx_r = NULL;
  83590. __Pyx_RefNannyDeclarations
  83591. PyObject *__pyx_t_1 = NULL;
  83592. int __pyx_t_2;
  83593. int __pyx_t_3;
  83594. __Pyx_RefNannySetupContext("write", 0);
  83595. /* "uvloop/handles/stream.pyx":673
  83596. *
  83597. * def write(self, object buf):
  83598. * self._ensure_alive() # <<<<<<<<<<<<<<
  83599. *
  83600. * if self._eof:
  83601. */
  83602. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._ensure_alive(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 673, __pyx_L1_error)
  83603. __Pyx_GOTREF(__pyx_t_1);
  83604. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  83605. /* "uvloop/handles/stream.pyx":675
  83606. * self._ensure_alive()
  83607. *
  83608. * if self._eof: # <<<<<<<<<<<<<<
  83609. * raise RuntimeError('Cannot call write() after write_eof()')
  83610. * if not buf:
  83611. */
  83612. __pyx_t_2 = (__pyx_v_self->_eof != 0);
  83613. if (unlikely(__pyx_t_2)) {
  83614. /* "uvloop/handles/stream.pyx":676
  83615. *
  83616. * if self._eof:
  83617. * raise RuntimeError('Cannot call write() after write_eof()') # <<<<<<<<<<<<<<
  83618. * if not buf:
  83619. * return
  83620. */
  83621. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__137, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 676, __pyx_L1_error)
  83622. __Pyx_GOTREF(__pyx_t_1);
  83623. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  83624. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  83625. __PYX_ERR(18, 676, __pyx_L1_error)
  83626. /* "uvloop/handles/stream.pyx":675
  83627. * self._ensure_alive()
  83628. *
  83629. * if self._eof: # <<<<<<<<<<<<<<
  83630. * raise RuntimeError('Cannot call write() after write_eof()')
  83631. * if not buf:
  83632. */
  83633. }
  83634. /* "uvloop/handles/stream.pyx":677
  83635. * if self._eof:
  83636. * raise RuntimeError('Cannot call write() after write_eof()')
  83637. * if not buf: # <<<<<<<<<<<<<<
  83638. * return
  83639. * if self._conn_lost:
  83640. */
  83641. __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_buf); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(18, 677, __pyx_L1_error)
  83642. __pyx_t_3 = ((!__pyx_t_2) != 0);
  83643. if (__pyx_t_3) {
  83644. /* "uvloop/handles/stream.pyx":678
  83645. * raise RuntimeError('Cannot call write() after write_eof()')
  83646. * if not buf:
  83647. * return # <<<<<<<<<<<<<<
  83648. * if self._conn_lost:
  83649. * self._conn_lost += 1
  83650. */
  83651. __Pyx_XDECREF(__pyx_r);
  83652. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  83653. goto __pyx_L0;
  83654. /* "uvloop/handles/stream.pyx":677
  83655. * if self._eof:
  83656. * raise RuntimeError('Cannot call write() after write_eof()')
  83657. * if not buf: # <<<<<<<<<<<<<<
  83658. * return
  83659. * if self._conn_lost:
  83660. */
  83661. }
  83662. /* "uvloop/handles/stream.pyx":679
  83663. * if not buf:
  83664. * return
  83665. * if self._conn_lost: # <<<<<<<<<<<<<<
  83666. * self._conn_lost += 1
  83667. * return
  83668. */
  83669. __pyx_t_3 = (__pyx_v_self->__pyx_base._conn_lost != 0);
  83670. if (__pyx_t_3) {
  83671. /* "uvloop/handles/stream.pyx":680
  83672. * return
  83673. * if self._conn_lost:
  83674. * self._conn_lost += 1 # <<<<<<<<<<<<<<
  83675. * return
  83676. * self._write(buf)
  83677. */
  83678. __pyx_v_self->__pyx_base._conn_lost = (__pyx_v_self->__pyx_base._conn_lost + 1);
  83679. /* "uvloop/handles/stream.pyx":681
  83680. * if self._conn_lost:
  83681. * self._conn_lost += 1
  83682. * return # <<<<<<<<<<<<<<
  83683. * self._write(buf)
  83684. *
  83685. */
  83686. __Pyx_XDECREF(__pyx_r);
  83687. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  83688. goto __pyx_L0;
  83689. /* "uvloop/handles/stream.pyx":679
  83690. * if not buf:
  83691. * return
  83692. * if self._conn_lost: # <<<<<<<<<<<<<<
  83693. * self._conn_lost += 1
  83694. * return
  83695. */
  83696. }
  83697. /* "uvloop/handles/stream.pyx":682
  83698. * self._conn_lost += 1
  83699. * return
  83700. * self._write(buf) # <<<<<<<<<<<<<<
  83701. *
  83702. * def writelines(self, bufs):
  83703. */
  83704. __pyx_t_1 = __pyx_f_6uvloop_4loop_8UVStream__write(__pyx_v_self, __pyx_v_buf); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 682, __pyx_L1_error)
  83705. __Pyx_GOTREF(__pyx_t_1);
  83706. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  83707. /* "uvloop/handles/stream.pyx":672
  83708. * id(self))
  83709. *
  83710. * def write(self, object buf): # <<<<<<<<<<<<<<
  83711. * self._ensure_alive()
  83712. *
  83713. */
  83714. /* function exit code */
  83715. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  83716. goto __pyx_L0;
  83717. __pyx_L1_error:;
  83718. __Pyx_XDECREF(__pyx_t_1);
  83719. __Pyx_AddTraceback("uvloop.loop.UVStream.write", __pyx_clineno, __pyx_lineno, __pyx_filename);
  83720. __pyx_r = NULL;
  83721. __pyx_L0:;
  83722. __Pyx_XGIVEREF(__pyx_r);
  83723. __Pyx_RefNannyFinishContext();
  83724. return __pyx_r;
  83725. }
  83726. /* "uvloop/handles/stream.pyx":684
  83727. * self._write(buf)
  83728. *
  83729. * def writelines(self, bufs): # <<<<<<<<<<<<<<
  83730. * self._ensure_alive()
  83731. *
  83732. */
  83733. /* Python wrapper */
  83734. static PyObject *__pyx_pw_6uvloop_4loop_8UVStream_7writelines(PyObject *__pyx_v_self, PyObject *__pyx_v_bufs); /*proto*/
  83735. static char __pyx_doc_6uvloop_4loop_8UVStream_6writelines[] = "UVStream.writelines(self, bufs)";
  83736. static PyObject *__pyx_pw_6uvloop_4loop_8UVStream_7writelines(PyObject *__pyx_v_self, PyObject *__pyx_v_bufs) {
  83737. PyObject *__pyx_r = 0;
  83738. __Pyx_RefNannyDeclarations
  83739. __Pyx_RefNannySetupContext("writelines (wrapper)", 0);
  83740. __pyx_r = __pyx_pf_6uvloop_4loop_8UVStream_6writelines(((struct __pyx_obj_6uvloop_4loop_UVStream *)__pyx_v_self), ((PyObject *)__pyx_v_bufs));
  83741. /* function exit code */
  83742. __Pyx_RefNannyFinishContext();
  83743. return __pyx_r;
  83744. }
  83745. static PyObject *__pyx_pf_6uvloop_4loop_8UVStream_6writelines(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self, PyObject *__pyx_v_bufs) {
  83746. PyObject *__pyx_v_buf = NULL;
  83747. PyObject *__pyx_r = NULL;
  83748. __Pyx_RefNannyDeclarations
  83749. PyObject *__pyx_t_1 = NULL;
  83750. int __pyx_t_2;
  83751. Py_ssize_t __pyx_t_3;
  83752. PyObject *(*__pyx_t_4)(PyObject *);
  83753. PyObject *__pyx_t_5 = NULL;
  83754. __Pyx_RefNannySetupContext("writelines", 0);
  83755. /* "uvloop/handles/stream.pyx":685
  83756. *
  83757. * def writelines(self, bufs):
  83758. * self._ensure_alive() # <<<<<<<<<<<<<<
  83759. *
  83760. * if self._eof:
  83761. */
  83762. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._ensure_alive(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 685, __pyx_L1_error)
  83763. __Pyx_GOTREF(__pyx_t_1);
  83764. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  83765. /* "uvloop/handles/stream.pyx":687
  83766. * self._ensure_alive()
  83767. *
  83768. * if self._eof: # <<<<<<<<<<<<<<
  83769. * raise RuntimeError('Cannot call writelines() after write_eof()')
  83770. * if self._conn_lost:
  83771. */
  83772. __pyx_t_2 = (__pyx_v_self->_eof != 0);
  83773. if (unlikely(__pyx_t_2)) {
  83774. /* "uvloop/handles/stream.pyx":688
  83775. *
  83776. * if self._eof:
  83777. * raise RuntimeError('Cannot call writelines() after write_eof()') # <<<<<<<<<<<<<<
  83778. * if self._conn_lost:
  83779. * self._conn_lost += 1
  83780. */
  83781. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__138, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 688, __pyx_L1_error)
  83782. __Pyx_GOTREF(__pyx_t_1);
  83783. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  83784. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  83785. __PYX_ERR(18, 688, __pyx_L1_error)
  83786. /* "uvloop/handles/stream.pyx":687
  83787. * self._ensure_alive()
  83788. *
  83789. * if self._eof: # <<<<<<<<<<<<<<
  83790. * raise RuntimeError('Cannot call writelines() after write_eof()')
  83791. * if self._conn_lost:
  83792. */
  83793. }
  83794. /* "uvloop/handles/stream.pyx":689
  83795. * if self._eof:
  83796. * raise RuntimeError('Cannot call writelines() after write_eof()')
  83797. * if self._conn_lost: # <<<<<<<<<<<<<<
  83798. * self._conn_lost += 1
  83799. * return
  83800. */
  83801. __pyx_t_2 = (__pyx_v_self->__pyx_base._conn_lost != 0);
  83802. if (__pyx_t_2) {
  83803. /* "uvloop/handles/stream.pyx":690
  83804. * raise RuntimeError('Cannot call writelines() after write_eof()')
  83805. * if self._conn_lost:
  83806. * self._conn_lost += 1 # <<<<<<<<<<<<<<
  83807. * return
  83808. * for buf in bufs:
  83809. */
  83810. __pyx_v_self->__pyx_base._conn_lost = (__pyx_v_self->__pyx_base._conn_lost + 1);
  83811. /* "uvloop/handles/stream.pyx":691
  83812. * if self._conn_lost:
  83813. * self._conn_lost += 1
  83814. * return # <<<<<<<<<<<<<<
  83815. * for buf in bufs:
  83816. * self._write(buf)
  83817. */
  83818. __Pyx_XDECREF(__pyx_r);
  83819. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  83820. goto __pyx_L0;
  83821. /* "uvloop/handles/stream.pyx":689
  83822. * if self._eof:
  83823. * raise RuntimeError('Cannot call writelines() after write_eof()')
  83824. * if self._conn_lost: # <<<<<<<<<<<<<<
  83825. * self._conn_lost += 1
  83826. * return
  83827. */
  83828. }
  83829. /* "uvloop/handles/stream.pyx":692
  83830. * self._conn_lost += 1
  83831. * return
  83832. * for buf in bufs: # <<<<<<<<<<<<<<
  83833. * self._write(buf)
  83834. *
  83835. */
  83836. if (likely(PyList_CheckExact(__pyx_v_bufs)) || PyTuple_CheckExact(__pyx_v_bufs)) {
  83837. __pyx_t_1 = __pyx_v_bufs; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0;
  83838. __pyx_t_4 = NULL;
  83839. } else {
  83840. __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_bufs); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 692, __pyx_L1_error)
  83841. __Pyx_GOTREF(__pyx_t_1);
  83842. __pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(18, 692, __pyx_L1_error)
  83843. }
  83844. for (;;) {
  83845. if (likely(!__pyx_t_4)) {
  83846. if (likely(PyList_CheckExact(__pyx_t_1))) {
  83847. if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
  83848. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  83849. __pyx_t_5 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(18, 692, __pyx_L1_error)
  83850. #else
  83851. __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(18, 692, __pyx_L1_error)
  83852. __Pyx_GOTREF(__pyx_t_5);
  83853. #endif
  83854. } else {
  83855. if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
  83856. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  83857. __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(18, 692, __pyx_L1_error)
  83858. #else
  83859. __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(18, 692, __pyx_L1_error)
  83860. __Pyx_GOTREF(__pyx_t_5);
  83861. #endif
  83862. }
  83863. } else {
  83864. __pyx_t_5 = __pyx_t_4(__pyx_t_1);
  83865. if (unlikely(!__pyx_t_5)) {
  83866. PyObject* exc_type = PyErr_Occurred();
  83867. if (exc_type) {
  83868. if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
  83869. else __PYX_ERR(18, 692, __pyx_L1_error)
  83870. }
  83871. break;
  83872. }
  83873. __Pyx_GOTREF(__pyx_t_5);
  83874. }
  83875. __Pyx_XDECREF_SET(__pyx_v_buf, __pyx_t_5);
  83876. __pyx_t_5 = 0;
  83877. /* "uvloop/handles/stream.pyx":693
  83878. * return
  83879. * for buf in bufs:
  83880. * self._write(buf) # <<<<<<<<<<<<<<
  83881. *
  83882. * def write_eof(self):
  83883. */
  83884. __pyx_t_5 = __pyx_f_6uvloop_4loop_8UVStream__write(__pyx_v_self, __pyx_v_buf); if (unlikely(!__pyx_t_5)) __PYX_ERR(18, 693, __pyx_L1_error)
  83885. __Pyx_GOTREF(__pyx_t_5);
  83886. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  83887. /* "uvloop/handles/stream.pyx":692
  83888. * self._conn_lost += 1
  83889. * return
  83890. * for buf in bufs: # <<<<<<<<<<<<<<
  83891. * self._write(buf)
  83892. *
  83893. */
  83894. }
  83895. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  83896. /* "uvloop/handles/stream.pyx":684
  83897. * self._write(buf)
  83898. *
  83899. * def writelines(self, bufs): # <<<<<<<<<<<<<<
  83900. * self._ensure_alive()
  83901. *
  83902. */
  83903. /* function exit code */
  83904. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  83905. goto __pyx_L0;
  83906. __pyx_L1_error:;
  83907. __Pyx_XDECREF(__pyx_t_1);
  83908. __Pyx_XDECREF(__pyx_t_5);
  83909. __Pyx_AddTraceback("uvloop.loop.UVStream.writelines", __pyx_clineno, __pyx_lineno, __pyx_filename);
  83910. __pyx_r = NULL;
  83911. __pyx_L0:;
  83912. __Pyx_XDECREF(__pyx_v_buf);
  83913. __Pyx_XGIVEREF(__pyx_r);
  83914. __Pyx_RefNannyFinishContext();
  83915. return __pyx_r;
  83916. }
  83917. /* "uvloop/handles/stream.pyx":695
  83918. * self._write(buf)
  83919. *
  83920. * def write_eof(self): # <<<<<<<<<<<<<<
  83921. * self._ensure_alive()
  83922. *
  83923. */
  83924. /* Python wrapper */
  83925. static PyObject *__pyx_pw_6uvloop_4loop_8UVStream_9write_eof(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  83926. static char __pyx_doc_6uvloop_4loop_8UVStream_8write_eof[] = "UVStream.write_eof(self)";
  83927. static PyObject *__pyx_pw_6uvloop_4loop_8UVStream_9write_eof(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  83928. PyObject *__pyx_r = 0;
  83929. __Pyx_RefNannyDeclarations
  83930. __Pyx_RefNannySetupContext("write_eof (wrapper)", 0);
  83931. __pyx_r = __pyx_pf_6uvloop_4loop_8UVStream_8write_eof(((struct __pyx_obj_6uvloop_4loop_UVStream *)__pyx_v_self));
  83932. /* function exit code */
  83933. __Pyx_RefNannyFinishContext();
  83934. return __pyx_r;
  83935. }
  83936. static PyObject *__pyx_pf_6uvloop_4loop_8UVStream_8write_eof(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self) {
  83937. PyObject *__pyx_r = NULL;
  83938. __Pyx_RefNannyDeclarations
  83939. PyObject *__pyx_t_1 = NULL;
  83940. int __pyx_t_2;
  83941. __Pyx_RefNannySetupContext("write_eof", 0);
  83942. /* "uvloop/handles/stream.pyx":696
  83943. *
  83944. * def write_eof(self):
  83945. * self._ensure_alive() # <<<<<<<<<<<<<<
  83946. *
  83947. * if self._eof:
  83948. */
  83949. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._ensure_alive(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 696, __pyx_L1_error)
  83950. __Pyx_GOTREF(__pyx_t_1);
  83951. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  83952. /* "uvloop/handles/stream.pyx":698
  83953. * self._ensure_alive()
  83954. *
  83955. * if self._eof: # <<<<<<<<<<<<<<
  83956. * return
  83957. *
  83958. */
  83959. __pyx_t_2 = (__pyx_v_self->_eof != 0);
  83960. if (__pyx_t_2) {
  83961. /* "uvloop/handles/stream.pyx":699
  83962. *
  83963. * if self._eof:
  83964. * return # <<<<<<<<<<<<<<
  83965. *
  83966. * self._eof = 1
  83967. */
  83968. __Pyx_XDECREF(__pyx_r);
  83969. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  83970. goto __pyx_L0;
  83971. /* "uvloop/handles/stream.pyx":698
  83972. * self._ensure_alive()
  83973. *
  83974. * if self._eof: # <<<<<<<<<<<<<<
  83975. * return
  83976. *
  83977. */
  83978. }
  83979. /* "uvloop/handles/stream.pyx":701
  83980. * return
  83981. *
  83982. * self._eof = 1 # <<<<<<<<<<<<<<
  83983. * if not self._get_write_buffer_size():
  83984. * self._shutdown()
  83985. */
  83986. __pyx_v_self->_eof = 1;
  83987. /* "uvloop/handles/stream.pyx":702
  83988. *
  83989. * self._eof = 1
  83990. * if not self._get_write_buffer_size(): # <<<<<<<<<<<<<<
  83991. * self._shutdown()
  83992. *
  83993. */
  83994. __pyx_t_2 = ((!(((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._get_write_buffer_size(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_v_self)) != 0)) != 0);
  83995. if (__pyx_t_2) {
  83996. /* "uvloop/handles/stream.pyx":703
  83997. * self._eof = 1
  83998. * if not self._get_write_buffer_size():
  83999. * self._shutdown() # <<<<<<<<<<<<<<
  84000. *
  84001. * def can_write_eof(self):
  84002. */
  84003. __pyx_t_1 = __pyx_f_6uvloop_4loop_8UVStream__shutdown(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 703, __pyx_L1_error)
  84004. __Pyx_GOTREF(__pyx_t_1);
  84005. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  84006. /* "uvloop/handles/stream.pyx":702
  84007. *
  84008. * self._eof = 1
  84009. * if not self._get_write_buffer_size(): # <<<<<<<<<<<<<<
  84010. * self._shutdown()
  84011. *
  84012. */
  84013. }
  84014. /* "uvloop/handles/stream.pyx":695
  84015. * self._write(buf)
  84016. *
  84017. * def write_eof(self): # <<<<<<<<<<<<<<
  84018. * self._ensure_alive()
  84019. *
  84020. */
  84021. /* function exit code */
  84022. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  84023. goto __pyx_L0;
  84024. __pyx_L1_error:;
  84025. __Pyx_XDECREF(__pyx_t_1);
  84026. __Pyx_AddTraceback("uvloop.loop.UVStream.write_eof", __pyx_clineno, __pyx_lineno, __pyx_filename);
  84027. __pyx_r = NULL;
  84028. __pyx_L0:;
  84029. __Pyx_XGIVEREF(__pyx_r);
  84030. __Pyx_RefNannyFinishContext();
  84031. return __pyx_r;
  84032. }
  84033. /* "uvloop/handles/stream.pyx":705
  84034. * self._shutdown()
  84035. *
  84036. * def can_write_eof(self): # <<<<<<<<<<<<<<
  84037. * return True
  84038. *
  84039. */
  84040. /* Python wrapper */
  84041. static PyObject *__pyx_pw_6uvloop_4loop_8UVStream_11can_write_eof(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  84042. static char __pyx_doc_6uvloop_4loop_8UVStream_10can_write_eof[] = "UVStream.can_write_eof(self)";
  84043. static PyObject *__pyx_pw_6uvloop_4loop_8UVStream_11can_write_eof(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  84044. PyObject *__pyx_r = 0;
  84045. __Pyx_RefNannyDeclarations
  84046. __Pyx_RefNannySetupContext("can_write_eof (wrapper)", 0);
  84047. __pyx_r = __pyx_pf_6uvloop_4loop_8UVStream_10can_write_eof(((struct __pyx_obj_6uvloop_4loop_UVStream *)__pyx_v_self));
  84048. /* function exit code */
  84049. __Pyx_RefNannyFinishContext();
  84050. return __pyx_r;
  84051. }
  84052. static PyObject *__pyx_pf_6uvloop_4loop_8UVStream_10can_write_eof(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self) {
  84053. PyObject *__pyx_r = NULL;
  84054. __Pyx_RefNannyDeclarations
  84055. __Pyx_RefNannySetupContext("can_write_eof", 0);
  84056. /* "uvloop/handles/stream.pyx":706
  84057. *
  84058. * def can_write_eof(self):
  84059. * return True # <<<<<<<<<<<<<<
  84060. *
  84061. * def is_reading(self):
  84062. */
  84063. __Pyx_XDECREF(__pyx_r);
  84064. __Pyx_INCREF(Py_True);
  84065. __pyx_r = Py_True;
  84066. goto __pyx_L0;
  84067. /* "uvloop/handles/stream.pyx":705
  84068. * self._shutdown()
  84069. *
  84070. * def can_write_eof(self): # <<<<<<<<<<<<<<
  84071. * return True
  84072. *
  84073. */
  84074. /* function exit code */
  84075. __pyx_L0:;
  84076. __Pyx_XGIVEREF(__pyx_r);
  84077. __Pyx_RefNannyFinishContext();
  84078. return __pyx_r;
  84079. }
  84080. /* "uvloop/handles/stream.pyx":708
  84081. * return True
  84082. *
  84083. * def is_reading(self): # <<<<<<<<<<<<<<
  84084. * return self._is_reading()
  84085. *
  84086. */
  84087. /* Python wrapper */
  84088. static PyObject *__pyx_pw_6uvloop_4loop_8UVStream_13is_reading(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  84089. static char __pyx_doc_6uvloop_4loop_8UVStream_12is_reading[] = "UVStream.is_reading(self)";
  84090. static PyObject *__pyx_pw_6uvloop_4loop_8UVStream_13is_reading(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  84091. PyObject *__pyx_r = 0;
  84092. __Pyx_RefNannyDeclarations
  84093. __Pyx_RefNannySetupContext("is_reading (wrapper)", 0);
  84094. __pyx_r = __pyx_pf_6uvloop_4loop_8UVStream_12is_reading(((struct __pyx_obj_6uvloop_4loop_UVStream *)__pyx_v_self));
  84095. /* function exit code */
  84096. __Pyx_RefNannyFinishContext();
  84097. return __pyx_r;
  84098. }
  84099. static PyObject *__pyx_pf_6uvloop_4loop_8UVStream_12is_reading(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self) {
  84100. PyObject *__pyx_r = NULL;
  84101. __Pyx_RefNannyDeclarations
  84102. PyObject *__pyx_t_1 = NULL;
  84103. __Pyx_RefNannySetupContext("is_reading", 0);
  84104. /* "uvloop/handles/stream.pyx":709
  84105. *
  84106. * def is_reading(self):
  84107. * return self._is_reading() # <<<<<<<<<<<<<<
  84108. *
  84109. * def pause_reading(self):
  84110. */
  84111. __Pyx_XDECREF(__pyx_r);
  84112. __pyx_t_1 = __Pyx_PyBool_FromLong(((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._is_reading(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_v_self))); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 709, __pyx_L1_error)
  84113. __Pyx_GOTREF(__pyx_t_1);
  84114. __pyx_r = __pyx_t_1;
  84115. __pyx_t_1 = 0;
  84116. goto __pyx_L0;
  84117. /* "uvloop/handles/stream.pyx":708
  84118. * return True
  84119. *
  84120. * def is_reading(self): # <<<<<<<<<<<<<<
  84121. * return self._is_reading()
  84122. *
  84123. */
  84124. /* function exit code */
  84125. __pyx_L1_error:;
  84126. __Pyx_XDECREF(__pyx_t_1);
  84127. __Pyx_AddTraceback("uvloop.loop.UVStream.is_reading", __pyx_clineno, __pyx_lineno, __pyx_filename);
  84128. __pyx_r = NULL;
  84129. __pyx_L0:;
  84130. __Pyx_XGIVEREF(__pyx_r);
  84131. __Pyx_RefNannyFinishContext();
  84132. return __pyx_r;
  84133. }
  84134. /* "uvloop/handles/stream.pyx":711
  84135. * return self._is_reading()
  84136. *
  84137. * def pause_reading(self): # <<<<<<<<<<<<<<
  84138. * if self._closing or not self._is_reading():
  84139. * return
  84140. */
  84141. /* Python wrapper */
  84142. static PyObject *__pyx_pw_6uvloop_4loop_8UVStream_15pause_reading(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  84143. static char __pyx_doc_6uvloop_4loop_8UVStream_14pause_reading[] = "UVStream.pause_reading(self)";
  84144. static PyObject *__pyx_pw_6uvloop_4loop_8UVStream_15pause_reading(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  84145. PyObject *__pyx_r = 0;
  84146. __Pyx_RefNannyDeclarations
  84147. __Pyx_RefNannySetupContext("pause_reading (wrapper)", 0);
  84148. __pyx_r = __pyx_pf_6uvloop_4loop_8UVStream_14pause_reading(((struct __pyx_obj_6uvloop_4loop_UVStream *)__pyx_v_self));
  84149. /* function exit code */
  84150. __Pyx_RefNannyFinishContext();
  84151. return __pyx_r;
  84152. }
  84153. static PyObject *__pyx_pf_6uvloop_4loop_8UVStream_14pause_reading(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self) {
  84154. PyObject *__pyx_r = NULL;
  84155. __Pyx_RefNannyDeclarations
  84156. int __pyx_t_1;
  84157. int __pyx_t_2;
  84158. PyObject *__pyx_t_3 = NULL;
  84159. __Pyx_RefNannySetupContext("pause_reading", 0);
  84160. /* "uvloop/handles/stream.pyx":712
  84161. *
  84162. * def pause_reading(self):
  84163. * if self._closing or not self._is_reading(): # <<<<<<<<<<<<<<
  84164. * return
  84165. * self._stop_reading()
  84166. */
  84167. __pyx_t_2 = (__pyx_v_self->__pyx_base._closing != 0);
  84168. if (!__pyx_t_2) {
  84169. } else {
  84170. __pyx_t_1 = __pyx_t_2;
  84171. goto __pyx_L4_bool_binop_done;
  84172. }
  84173. __pyx_t_2 = ((!(((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._is_reading(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_v_self)) != 0)) != 0);
  84174. __pyx_t_1 = __pyx_t_2;
  84175. __pyx_L4_bool_binop_done:;
  84176. if (__pyx_t_1) {
  84177. /* "uvloop/handles/stream.pyx":713
  84178. * def pause_reading(self):
  84179. * if self._closing or not self._is_reading():
  84180. * return # <<<<<<<<<<<<<<
  84181. * self._stop_reading()
  84182. *
  84183. */
  84184. __Pyx_XDECREF(__pyx_r);
  84185. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  84186. goto __pyx_L0;
  84187. /* "uvloop/handles/stream.pyx":712
  84188. *
  84189. * def pause_reading(self):
  84190. * if self._closing or not self._is_reading(): # <<<<<<<<<<<<<<
  84191. * return
  84192. * self._stop_reading()
  84193. */
  84194. }
  84195. /* "uvloop/handles/stream.pyx":714
  84196. * if self._closing or not self._is_reading():
  84197. * return
  84198. * self._stop_reading() # <<<<<<<<<<<<<<
  84199. *
  84200. * def resume_reading(self):
  84201. */
  84202. __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._stop_reading(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(18, 714, __pyx_L1_error)
  84203. __Pyx_GOTREF(__pyx_t_3);
  84204. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  84205. /* "uvloop/handles/stream.pyx":711
  84206. * return self._is_reading()
  84207. *
  84208. * def pause_reading(self): # <<<<<<<<<<<<<<
  84209. * if self._closing or not self._is_reading():
  84210. * return
  84211. */
  84212. /* function exit code */
  84213. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  84214. goto __pyx_L0;
  84215. __pyx_L1_error:;
  84216. __Pyx_XDECREF(__pyx_t_3);
  84217. __Pyx_AddTraceback("uvloop.loop.UVStream.pause_reading", __pyx_clineno, __pyx_lineno, __pyx_filename);
  84218. __pyx_r = NULL;
  84219. __pyx_L0:;
  84220. __Pyx_XGIVEREF(__pyx_r);
  84221. __Pyx_RefNannyFinishContext();
  84222. return __pyx_r;
  84223. }
  84224. /* "uvloop/handles/stream.pyx":716
  84225. * self._stop_reading()
  84226. *
  84227. * def resume_reading(self): # <<<<<<<<<<<<<<
  84228. * if self._is_reading() or self._closing:
  84229. * return
  84230. */
  84231. /* Python wrapper */
  84232. static PyObject *__pyx_pw_6uvloop_4loop_8UVStream_17resume_reading(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  84233. static char __pyx_doc_6uvloop_4loop_8UVStream_16resume_reading[] = "UVStream.resume_reading(self)";
  84234. static PyObject *__pyx_pw_6uvloop_4loop_8UVStream_17resume_reading(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  84235. PyObject *__pyx_r = 0;
  84236. __Pyx_RefNannyDeclarations
  84237. __Pyx_RefNannySetupContext("resume_reading (wrapper)", 0);
  84238. __pyx_r = __pyx_pf_6uvloop_4loop_8UVStream_16resume_reading(((struct __pyx_obj_6uvloop_4loop_UVStream *)__pyx_v_self));
  84239. /* function exit code */
  84240. __Pyx_RefNannyFinishContext();
  84241. return __pyx_r;
  84242. }
  84243. static PyObject *__pyx_pf_6uvloop_4loop_8UVStream_16resume_reading(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self) {
  84244. PyObject *__pyx_r = NULL;
  84245. __Pyx_RefNannyDeclarations
  84246. int __pyx_t_1;
  84247. int __pyx_t_2;
  84248. PyObject *__pyx_t_3 = NULL;
  84249. __Pyx_RefNannySetupContext("resume_reading", 0);
  84250. /* "uvloop/handles/stream.pyx":717
  84251. *
  84252. * def resume_reading(self):
  84253. * if self._is_reading() or self._closing: # <<<<<<<<<<<<<<
  84254. * return
  84255. * self._start_reading()
  84256. */
  84257. __pyx_t_2 = (((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._is_reading(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_v_self)) != 0);
  84258. if (!__pyx_t_2) {
  84259. } else {
  84260. __pyx_t_1 = __pyx_t_2;
  84261. goto __pyx_L4_bool_binop_done;
  84262. }
  84263. __pyx_t_2 = (__pyx_v_self->__pyx_base._closing != 0);
  84264. __pyx_t_1 = __pyx_t_2;
  84265. __pyx_L4_bool_binop_done:;
  84266. if (__pyx_t_1) {
  84267. /* "uvloop/handles/stream.pyx":718
  84268. * def resume_reading(self):
  84269. * if self._is_reading() or self._closing:
  84270. * return # <<<<<<<<<<<<<<
  84271. * self._start_reading()
  84272. *
  84273. */
  84274. __Pyx_XDECREF(__pyx_r);
  84275. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  84276. goto __pyx_L0;
  84277. /* "uvloop/handles/stream.pyx":717
  84278. *
  84279. * def resume_reading(self):
  84280. * if self._is_reading() or self._closing: # <<<<<<<<<<<<<<
  84281. * return
  84282. * self._start_reading()
  84283. */
  84284. }
  84285. /* "uvloop/handles/stream.pyx":719
  84286. * if self._is_reading() or self._closing:
  84287. * return
  84288. * self._start_reading() # <<<<<<<<<<<<<<
  84289. *
  84290. *
  84291. */
  84292. __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._start_reading(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(18, 719, __pyx_L1_error)
  84293. __Pyx_GOTREF(__pyx_t_3);
  84294. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  84295. /* "uvloop/handles/stream.pyx":716
  84296. * self._stop_reading()
  84297. *
  84298. * def resume_reading(self): # <<<<<<<<<<<<<<
  84299. * if self._is_reading() or self._closing:
  84300. * return
  84301. */
  84302. /* function exit code */
  84303. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  84304. goto __pyx_L0;
  84305. __pyx_L1_error:;
  84306. __Pyx_XDECREF(__pyx_t_3);
  84307. __Pyx_AddTraceback("uvloop.loop.UVStream.resume_reading", __pyx_clineno, __pyx_lineno, __pyx_filename);
  84308. __pyx_r = NULL;
  84309. __pyx_L0:;
  84310. __Pyx_XGIVEREF(__pyx_r);
  84311. __Pyx_RefNannyFinishContext();
  84312. return __pyx_r;
  84313. }
  84314. /* "(tree fragment)":1
  84315. * def __reduce_cython__(self): # <<<<<<<<<<<<<<
  84316. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  84317. * def __setstate_cython__(self, __pyx_state):
  84318. */
  84319. /* Python wrapper */
  84320. static PyObject *__pyx_pw_6uvloop_4loop_8UVStream_19__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  84321. static char __pyx_doc_6uvloop_4loop_8UVStream_18__reduce_cython__[] = "UVStream.__reduce_cython__(self)";
  84322. static PyObject *__pyx_pw_6uvloop_4loop_8UVStream_19__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  84323. PyObject *__pyx_r = 0;
  84324. __Pyx_RefNannyDeclarations
  84325. __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  84326. __pyx_r = __pyx_pf_6uvloop_4loop_8UVStream_18__reduce_cython__(((struct __pyx_obj_6uvloop_4loop_UVStream *)__pyx_v_self));
  84327. /* function exit code */
  84328. __Pyx_RefNannyFinishContext();
  84329. return __pyx_r;
  84330. }
  84331. static PyObject *__pyx_pf_6uvloop_4loop_8UVStream_18__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self) {
  84332. PyObject *__pyx_r = NULL;
  84333. __Pyx_RefNannyDeclarations
  84334. PyObject *__pyx_t_1 = NULL;
  84335. __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  84336. /* "(tree fragment)":2
  84337. * def __reduce_cython__(self):
  84338. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  84339. * def __setstate_cython__(self, __pyx_state):
  84340. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  84341. */
  84342. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__139, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 2, __pyx_L1_error)
  84343. __Pyx_GOTREF(__pyx_t_1);
  84344. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  84345. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  84346. __PYX_ERR(9, 2, __pyx_L1_error)
  84347. /* "(tree fragment)":1
  84348. * def __reduce_cython__(self): # <<<<<<<<<<<<<<
  84349. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  84350. * def __setstate_cython__(self, __pyx_state):
  84351. */
  84352. /* function exit code */
  84353. __pyx_L1_error:;
  84354. __Pyx_XDECREF(__pyx_t_1);
  84355. __Pyx_AddTraceback("uvloop.loop.UVStream.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  84356. __pyx_r = NULL;
  84357. __Pyx_XGIVEREF(__pyx_r);
  84358. __Pyx_RefNannyFinishContext();
  84359. return __pyx_r;
  84360. }
  84361. /* "(tree fragment)":3
  84362. * def __reduce_cython__(self):
  84363. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  84364. * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
  84365. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  84366. */
  84367. /* Python wrapper */
  84368. static PyObject *__pyx_pw_6uvloop_4loop_8UVStream_21__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
  84369. static char __pyx_doc_6uvloop_4loop_8UVStream_20__setstate_cython__[] = "UVStream.__setstate_cython__(self, __pyx_state)";
  84370. static PyObject *__pyx_pw_6uvloop_4loop_8UVStream_21__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  84371. PyObject *__pyx_r = 0;
  84372. __Pyx_RefNannyDeclarations
  84373. __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  84374. __pyx_r = __pyx_pf_6uvloop_4loop_8UVStream_20__setstate_cython__(((struct __pyx_obj_6uvloop_4loop_UVStream *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
  84375. /* function exit code */
  84376. __Pyx_RefNannyFinishContext();
  84377. return __pyx_r;
  84378. }
  84379. static PyObject *__pyx_pf_6uvloop_4loop_8UVStream_20__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  84380. PyObject *__pyx_r = NULL;
  84381. __Pyx_RefNannyDeclarations
  84382. PyObject *__pyx_t_1 = NULL;
  84383. __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  84384. /* "(tree fragment)":4
  84385. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  84386. * def __setstate_cython__(self, __pyx_state):
  84387. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  84388. */
  84389. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__140, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 4, __pyx_L1_error)
  84390. __Pyx_GOTREF(__pyx_t_1);
  84391. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  84392. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  84393. __PYX_ERR(9, 4, __pyx_L1_error)
  84394. /* "(tree fragment)":3
  84395. * def __reduce_cython__(self):
  84396. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  84397. * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
  84398. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  84399. */
  84400. /* function exit code */
  84401. __pyx_L1_error:;
  84402. __Pyx_XDECREF(__pyx_t_1);
  84403. __Pyx_AddTraceback("uvloop.loop.UVStream.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  84404. __pyx_r = NULL;
  84405. __Pyx_XGIVEREF(__pyx_r);
  84406. __Pyx_RefNannyFinishContext();
  84407. return __pyx_r;
  84408. }
  84409. /* "uvloop/handles/stream.pyx":722
  84410. *
  84411. *
  84412. * cdef void __uv_stream_on_shutdown(uv.uv_shutdown_t* req, # <<<<<<<<<<<<<<
  84413. * int status) with gil:
  84414. *
  84415. */
  84416. static void __pyx_f_6uvloop_4loop___uv_stream_on_shutdown(uv_shutdown_t *__pyx_v_req, int __pyx_v_status) {
  84417. struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_stream = 0;
  84418. PyObject *__pyx_v_exc = NULL;
  84419. __Pyx_RefNannyDeclarations
  84420. int __pyx_t_1;
  84421. PyObject *__pyx_t_2 = NULL;
  84422. PyObject *__pyx_t_3 = NULL;
  84423. PyObject *__pyx_t_4 = NULL;
  84424. PyObject *__pyx_t_5 = NULL;
  84425. int __pyx_t_6;
  84426. PyObject *__pyx_t_7 = NULL;
  84427. int __pyx_t_8;
  84428. struct __pyx_obj_6uvloop_4loop_Loop *__pyx_t_9 = NULL;
  84429. struct __pyx_opt_args_6uvloop_4loop_8UVHandle__fatal_error __pyx_t_10;
  84430. #ifdef WITH_THREAD
  84431. PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  84432. #endif
  84433. __Pyx_RefNannySetupContext("__uv_stream_on_shutdown", 0);
  84434. /* "uvloop/handles/stream.pyx":727
  84435. * # callback for uv_shutdown
  84436. *
  84437. * if req.data is NULL: # <<<<<<<<<<<<<<
  84438. * aio_logger.error(
  84439. * 'UVStream.shutdown callback called with NULL req.data, status=%r',
  84440. */
  84441. __pyx_t_1 = ((__pyx_v_req->data == NULL) != 0);
  84442. if (__pyx_t_1) {
  84443. /* "uvloop/handles/stream.pyx":728
  84444. *
  84445. * if req.data is NULL:
  84446. * aio_logger.error( # <<<<<<<<<<<<<<
  84447. * 'UVStream.shutdown callback called with NULL req.data, status=%r',
  84448. * status)
  84449. */
  84450. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_6uvloop_4loop_aio_logger, __pyx_n_s_error); if (unlikely(!__pyx_t_3)) __PYX_ERR(18, 728, __pyx_L1_error)
  84451. __Pyx_GOTREF(__pyx_t_3);
  84452. /* "uvloop/handles/stream.pyx":730
  84453. * aio_logger.error(
  84454. * 'UVStream.shutdown callback called with NULL req.data, status=%r',
  84455. * status) # <<<<<<<<<<<<<<
  84456. * return
  84457. *
  84458. */
  84459. __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_4)) __PYX_ERR(18, 730, __pyx_L1_error)
  84460. __Pyx_GOTREF(__pyx_t_4);
  84461. __pyx_t_5 = NULL;
  84462. __pyx_t_6 = 0;
  84463. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
  84464. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
  84465. if (likely(__pyx_t_5)) {
  84466. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  84467. __Pyx_INCREF(__pyx_t_5);
  84468. __Pyx_INCREF(function);
  84469. __Pyx_DECREF_SET(__pyx_t_3, function);
  84470. __pyx_t_6 = 1;
  84471. }
  84472. }
  84473. #if CYTHON_FAST_PYCALL
  84474. if (PyFunction_Check(__pyx_t_3)) {
  84475. PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_kp_u_UVStream_shutdown_callback_calle, __pyx_t_4};
  84476. __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 728, __pyx_L1_error)
  84477. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  84478. __Pyx_GOTREF(__pyx_t_2);
  84479. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  84480. } else
  84481. #endif
  84482. #if CYTHON_FAST_PYCCALL
  84483. if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
  84484. PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_kp_u_UVStream_shutdown_callback_calle, __pyx_t_4};
  84485. __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 728, __pyx_L1_error)
  84486. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  84487. __Pyx_GOTREF(__pyx_t_2);
  84488. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  84489. } else
  84490. #endif
  84491. {
  84492. __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(18, 728, __pyx_L1_error)
  84493. __Pyx_GOTREF(__pyx_t_7);
  84494. if (__pyx_t_5) {
  84495. __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
  84496. }
  84497. __Pyx_INCREF(__pyx_kp_u_UVStream_shutdown_callback_calle);
  84498. __Pyx_GIVEREF(__pyx_kp_u_UVStream_shutdown_callback_calle);
  84499. PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_kp_u_UVStream_shutdown_callback_calle);
  84500. __Pyx_GIVEREF(__pyx_t_4);
  84501. PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_4);
  84502. __pyx_t_4 = 0;
  84503. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 728, __pyx_L1_error)
  84504. __Pyx_GOTREF(__pyx_t_2);
  84505. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  84506. }
  84507. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  84508. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  84509. /* "uvloop/handles/stream.pyx":731
  84510. * 'UVStream.shutdown callback called with NULL req.data, status=%r',
  84511. * status)
  84512. * return # <<<<<<<<<<<<<<
  84513. *
  84514. * cdef UVStream stream = <UVStream> req.data
  84515. */
  84516. goto __pyx_L0;
  84517. /* "uvloop/handles/stream.pyx":727
  84518. * # callback for uv_shutdown
  84519. *
  84520. * if req.data is NULL: # <<<<<<<<<<<<<<
  84521. * aio_logger.error(
  84522. * 'UVStream.shutdown callback called with NULL req.data, status=%r',
  84523. */
  84524. }
  84525. /* "uvloop/handles/stream.pyx":733
  84526. * return
  84527. *
  84528. * cdef UVStream stream = <UVStream> req.data # <<<<<<<<<<<<<<
  84529. *
  84530. * if status < 0 and status != uv.UV_ECANCELED:
  84531. */
  84532. __pyx_t_2 = ((PyObject *)__pyx_v_req->data);
  84533. __Pyx_INCREF(__pyx_t_2);
  84534. __pyx_v_stream = ((struct __pyx_obj_6uvloop_4loop_UVStream *)__pyx_t_2);
  84535. __pyx_t_2 = 0;
  84536. /* "uvloop/handles/stream.pyx":735
  84537. * cdef UVStream stream = <UVStream> req.data
  84538. *
  84539. * if status < 0 and status != uv.UV_ECANCELED: # <<<<<<<<<<<<<<
  84540. * # From libuv source code:
  84541. * # The ECANCELED error code is a lie, the shutdown(2) syscall is a
  84542. */
  84543. __pyx_t_8 = ((__pyx_v_status < 0) != 0);
  84544. if (__pyx_t_8) {
  84545. } else {
  84546. __pyx_t_1 = __pyx_t_8;
  84547. goto __pyx_L5_bool_binop_done;
  84548. }
  84549. __pyx_t_8 = ((__pyx_v_status != UV_ECANCELED) != 0);
  84550. __pyx_t_1 = __pyx_t_8;
  84551. __pyx_L5_bool_binop_done:;
  84552. if (__pyx_t_1) {
  84553. /* "uvloop/handles/stream.pyx":742
  84554. * # informs the callee that the handle has been destroyed.
  84555. *
  84556. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  84557. * stream._loop._debug_stream_shutdown_errors_total += 1
  84558. *
  84559. */
  84560. __pyx_t_1 = (UVLOOP_DEBUG != 0);
  84561. if (__pyx_t_1) {
  84562. /* "uvloop/handles/stream.pyx":743
  84563. *
  84564. * if UVLOOP_DEBUG:
  84565. * stream._loop._debug_stream_shutdown_errors_total += 1 # <<<<<<<<<<<<<<
  84566. *
  84567. * exc = convert_error(status)
  84568. */
  84569. __Pyx_INCREF(((PyObject *)__pyx_v_stream->__pyx_base.__pyx_base.__pyx_base._loop));
  84570. __pyx_t_9 = __pyx_v_stream->__pyx_base.__pyx_base.__pyx_base._loop;
  84571. __pyx_t_9->_debug_stream_shutdown_errors_total = (__pyx_t_9->_debug_stream_shutdown_errors_total + 1);
  84572. __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
  84573. /* "uvloop/handles/stream.pyx":742
  84574. * # informs the callee that the handle has been destroyed.
  84575. *
  84576. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  84577. * stream._loop._debug_stream_shutdown_errors_total += 1
  84578. *
  84579. */
  84580. }
  84581. /* "uvloop/handles/stream.pyx":745
  84582. * stream._loop._debug_stream_shutdown_errors_total += 1
  84583. *
  84584. * exc = convert_error(status) # <<<<<<<<<<<<<<
  84585. * stream._fatal_error(
  84586. * exc, False, "error status in uv_stream_t.shutdown callback")
  84587. */
  84588. __pyx_t_2 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_status); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 745, __pyx_L1_error)
  84589. __Pyx_GOTREF(__pyx_t_2);
  84590. __pyx_v_exc = __pyx_t_2;
  84591. __pyx_t_2 = 0;
  84592. /* "uvloop/handles/stream.pyx":746
  84593. *
  84594. * exc = convert_error(status)
  84595. * stream._fatal_error( # <<<<<<<<<<<<<<
  84596. * exc, False, "error status in uv_stream_t.shutdown callback")
  84597. * return
  84598. */
  84599. __pyx_t_10.__pyx_n = 1;
  84600. __pyx_t_10.reason = __pyx_kp_u_error_status_in_uv_stream_t_shut;
  84601. __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_stream->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._fatal_error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_stream), __pyx_v_exc, Py_False, &__pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 746, __pyx_L1_error)
  84602. __Pyx_GOTREF(__pyx_t_2);
  84603. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  84604. /* "uvloop/handles/stream.pyx":748
  84605. * stream._fatal_error(
  84606. * exc, False, "error status in uv_stream_t.shutdown callback")
  84607. * return # <<<<<<<<<<<<<<
  84608. *
  84609. *
  84610. */
  84611. goto __pyx_L0;
  84612. /* "uvloop/handles/stream.pyx":735
  84613. * cdef UVStream stream = <UVStream> req.data
  84614. *
  84615. * if status < 0 and status != uv.UV_ECANCELED: # <<<<<<<<<<<<<<
  84616. * # From libuv source code:
  84617. * # The ECANCELED error code is a lie, the shutdown(2) syscall is a
  84618. */
  84619. }
  84620. /* "uvloop/handles/stream.pyx":722
  84621. *
  84622. *
  84623. * cdef void __uv_stream_on_shutdown(uv.uv_shutdown_t* req, # <<<<<<<<<<<<<<
  84624. * int status) with gil:
  84625. *
  84626. */
  84627. /* function exit code */
  84628. goto __pyx_L0;
  84629. __pyx_L1_error:;
  84630. __Pyx_XDECREF(__pyx_t_2);
  84631. __Pyx_XDECREF(__pyx_t_3);
  84632. __Pyx_XDECREF(__pyx_t_4);
  84633. __Pyx_XDECREF(__pyx_t_5);
  84634. __Pyx_XDECREF(__pyx_t_7);
  84635. __Pyx_XDECREF(((PyObject *)__pyx_t_9));
  84636. __Pyx_WriteUnraisable("uvloop.loop.__uv_stream_on_shutdown", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  84637. __pyx_L0:;
  84638. __Pyx_XDECREF((PyObject *)__pyx_v_stream);
  84639. __Pyx_XDECREF(__pyx_v_exc);
  84640. __Pyx_RefNannyFinishContext();
  84641. #ifdef WITH_THREAD
  84642. __Pyx_PyGILState_Release(__pyx_gilstate_save);
  84643. #endif
  84644. }
  84645. /* "uvloop/handles/stream.pyx":751
  84646. *
  84647. *
  84648. * cdef inline bint __uv_stream_on_read_common(UVStream sc, Loop loop, # <<<<<<<<<<<<<<
  84649. * ssize_t nread):
  84650. * if sc._closed:
  84651. */
  84652. static CYTHON_INLINE int __pyx_f_6uvloop_4loop___uv_stream_on_read_common(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_sc, struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, Py_ssize_t __pyx_v_nread) {
  84653. PyObject *__pyx_v_ex = NULL;
  84654. PyObject *__pyx_v_exc = NULL;
  84655. int __pyx_r;
  84656. __Pyx_RefNannyDeclarations
  84657. int __pyx_t_1;
  84658. PyObject *__pyx_t_2 = NULL;
  84659. PyObject *__pyx_t_3 = NULL;
  84660. PyObject *__pyx_t_4 = NULL;
  84661. PyObject *__pyx_t_5 = NULL;
  84662. int __pyx_t_6;
  84663. PyObject *__pyx_t_7 = NULL;
  84664. PyObject *__pyx_t_8 = NULL;
  84665. PyObject *__pyx_t_9 = NULL;
  84666. int __pyx_t_10;
  84667. char const *__pyx_t_11;
  84668. PyObject *__pyx_t_12 = NULL;
  84669. PyObject *__pyx_t_13 = NULL;
  84670. PyObject *__pyx_t_14 = NULL;
  84671. PyObject *__pyx_t_15 = NULL;
  84672. PyObject *__pyx_t_16 = NULL;
  84673. PyObject *__pyx_t_17 = NULL;
  84674. struct __pyx_opt_args_6uvloop_4loop_8UVHandle__fatal_error __pyx_t_18;
  84675. __Pyx_RefNannySetupContext("__uv_stream_on_read_common", 0);
  84676. /* "uvloop/handles/stream.pyx":753
  84677. * cdef inline bint __uv_stream_on_read_common(UVStream sc, Loop loop,
  84678. * ssize_t nread):
  84679. * if sc._closed: # <<<<<<<<<<<<<<
  84680. * # The stream was closed, there is no reason to
  84681. * # do any work now.
  84682. */
  84683. __pyx_t_1 = (__pyx_v_sc->__pyx_base.__pyx_base.__pyx_base._closed != 0);
  84684. if (__pyx_t_1) {
  84685. /* "uvloop/handles/stream.pyx":756
  84686. * # The stream was closed, there is no reason to
  84687. * # do any work now.
  84688. * sc.__reading_stopped() # Just in case. # <<<<<<<<<<<<<<
  84689. * return True
  84690. *
  84691. */
  84692. __pyx_t_2 = __pyx_f_6uvloop_4loop_8UVStream___reading_stopped(__pyx_v_sc); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 756, __pyx_L1_error)
  84693. __Pyx_GOTREF(__pyx_t_2);
  84694. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  84695. /* "uvloop/handles/stream.pyx":757
  84696. * # do any work now.
  84697. * sc.__reading_stopped() # Just in case.
  84698. * return True # <<<<<<<<<<<<<<
  84699. *
  84700. * if nread == uv.UV_EOF:
  84701. */
  84702. __pyx_r = 1;
  84703. goto __pyx_L0;
  84704. /* "uvloop/handles/stream.pyx":753
  84705. * cdef inline bint __uv_stream_on_read_common(UVStream sc, Loop loop,
  84706. * ssize_t nread):
  84707. * if sc._closed: # <<<<<<<<<<<<<<
  84708. * # The stream was closed, there is no reason to
  84709. * # do any work now.
  84710. */
  84711. }
  84712. /* "uvloop/handles/stream.pyx":759
  84713. * return True
  84714. *
  84715. * if nread == uv.UV_EOF: # <<<<<<<<<<<<<<
  84716. * # From libuv docs:
  84717. * # The callee is responsible for stopping closing the stream
  84718. */
  84719. __pyx_t_1 = ((__pyx_v_nread == UV_EOF) != 0);
  84720. if (__pyx_t_1) {
  84721. /* "uvloop/handles/stream.pyx":764
  84722. * # when an error happens by calling uv_read_stop() or uv_close().
  84723. * # Trying to read from the stream again is undefined.
  84724. * try: # <<<<<<<<<<<<<<
  84725. * if UVLOOP_DEBUG:
  84726. * loop._debug_stream_read_eof_total += 1
  84727. */
  84728. /*try:*/ {
  84729. {
  84730. __Pyx_PyThreadState_declare
  84731. __Pyx_PyThreadState_assign
  84732. __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
  84733. __Pyx_XGOTREF(__pyx_t_3);
  84734. __Pyx_XGOTREF(__pyx_t_4);
  84735. __Pyx_XGOTREF(__pyx_t_5);
  84736. /*try:*/ {
  84737. /* "uvloop/handles/stream.pyx":765
  84738. * # Trying to read from the stream again is undefined.
  84739. * try:
  84740. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  84741. * loop._debug_stream_read_eof_total += 1
  84742. *
  84743. */
  84744. __pyx_t_1 = (UVLOOP_DEBUG != 0);
  84745. if (__pyx_t_1) {
  84746. /* "uvloop/handles/stream.pyx":766
  84747. * try:
  84748. * if UVLOOP_DEBUG:
  84749. * loop._debug_stream_read_eof_total += 1 # <<<<<<<<<<<<<<
  84750. *
  84751. * sc._stop_reading()
  84752. */
  84753. __pyx_v_loop->_debug_stream_read_eof_total = (__pyx_v_loop->_debug_stream_read_eof_total + 1);
  84754. /* "uvloop/handles/stream.pyx":765
  84755. * # Trying to read from the stream again is undefined.
  84756. * try:
  84757. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  84758. * loop._debug_stream_read_eof_total += 1
  84759. *
  84760. */
  84761. }
  84762. /* "uvloop/handles/stream.pyx":768
  84763. * loop._debug_stream_read_eof_total += 1
  84764. *
  84765. * sc._stop_reading() # <<<<<<<<<<<<<<
  84766. * sc._on_eof()
  84767. * except BaseException as ex:
  84768. */
  84769. __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_sc->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._stop_reading(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_v_sc)); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 768, __pyx_L8_error)
  84770. __Pyx_GOTREF(__pyx_t_2);
  84771. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  84772. /* "uvloop/handles/stream.pyx":769
  84773. *
  84774. * sc._stop_reading()
  84775. * sc._on_eof() # <<<<<<<<<<<<<<
  84776. * except BaseException as ex:
  84777. * if UVLOOP_DEBUG:
  84778. */
  84779. __pyx_t_2 = __pyx_f_6uvloop_4loop_8UVStream__on_eof(__pyx_v_sc); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 769, __pyx_L8_error)
  84780. __Pyx_GOTREF(__pyx_t_2);
  84781. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  84782. /* "uvloop/handles/stream.pyx":764
  84783. * # when an error happens by calling uv_read_stop() or uv_close().
  84784. * # Trying to read from the stream again is undefined.
  84785. * try: # <<<<<<<<<<<<<<
  84786. * if UVLOOP_DEBUG:
  84787. * loop._debug_stream_read_eof_total += 1
  84788. */
  84789. }
  84790. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  84791. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  84792. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  84793. goto __pyx_L13_try_end;
  84794. __pyx_L8_error:;
  84795. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  84796. /* "uvloop/handles/stream.pyx":770
  84797. * sc._stop_reading()
  84798. * sc._on_eof()
  84799. * except BaseException as ex: # <<<<<<<<<<<<<<
  84800. * if UVLOOP_DEBUG:
  84801. * loop._debug_stream_read_eof_cb_errors_total += 1
  84802. */
  84803. __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_BaseException);
  84804. if (__pyx_t_6) {
  84805. __Pyx_AddTraceback("uvloop.loop.__uv_stream_on_read_common", __pyx_clineno, __pyx_lineno, __pyx_filename);
  84806. if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_7, &__pyx_t_8) < 0) __PYX_ERR(18, 770, __pyx_L10_except_error)
  84807. __Pyx_GOTREF(__pyx_t_2);
  84808. __Pyx_GOTREF(__pyx_t_7);
  84809. __Pyx_GOTREF(__pyx_t_8);
  84810. __Pyx_INCREF(__pyx_t_7);
  84811. __pyx_v_ex = __pyx_t_7;
  84812. /*try:*/ {
  84813. /* "uvloop/handles/stream.pyx":771
  84814. * sc._on_eof()
  84815. * except BaseException as ex:
  84816. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  84817. * loop._debug_stream_read_eof_cb_errors_total += 1
  84818. *
  84819. */
  84820. __pyx_t_1 = (UVLOOP_DEBUG != 0);
  84821. if (__pyx_t_1) {
  84822. /* "uvloop/handles/stream.pyx":772
  84823. * except BaseException as ex:
  84824. * if UVLOOP_DEBUG:
  84825. * loop._debug_stream_read_eof_cb_errors_total += 1 # <<<<<<<<<<<<<<
  84826. *
  84827. * sc._fatal_error(ex, False)
  84828. */
  84829. __pyx_v_loop->_debug_stream_read_eof_cb_errors_total = (__pyx_v_loop->_debug_stream_read_eof_cb_errors_total + 1);
  84830. /* "uvloop/handles/stream.pyx":771
  84831. * sc._on_eof()
  84832. * except BaseException as ex:
  84833. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  84834. * loop._debug_stream_read_eof_cb_errors_total += 1
  84835. *
  84836. */
  84837. }
  84838. /* "uvloop/handles/stream.pyx":774
  84839. * loop._debug_stream_read_eof_cb_errors_total += 1
  84840. *
  84841. * sc._fatal_error(ex, False) # <<<<<<<<<<<<<<
  84842. * finally:
  84843. * return True
  84844. */
  84845. __pyx_t_9 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_sc->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._fatal_error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_sc), __pyx_v_ex, Py_False, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(18, 774, __pyx_L20_error)
  84846. __Pyx_GOTREF(__pyx_t_9);
  84847. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  84848. }
  84849. /* "uvloop/handles/stream.pyx":770
  84850. * sc._stop_reading()
  84851. * sc._on_eof()
  84852. * except BaseException as ex: # <<<<<<<<<<<<<<
  84853. * if UVLOOP_DEBUG:
  84854. * loop._debug_stream_read_eof_cb_errors_total += 1
  84855. */
  84856. /*finally:*/ {
  84857. /*normal exit:*/{
  84858. __Pyx_DECREF(__pyx_v_ex);
  84859. __pyx_v_ex = NULL;
  84860. goto __pyx_L21;
  84861. }
  84862. __pyx_L20_error:;
  84863. /*exception exit:*/{
  84864. __Pyx_PyThreadState_declare
  84865. __Pyx_PyThreadState_assign
  84866. __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0;
  84867. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  84868. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17);
  84869. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14) < 0)) __Pyx_ErrFetch(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
  84870. __Pyx_XGOTREF(__pyx_t_12);
  84871. __Pyx_XGOTREF(__pyx_t_13);
  84872. __Pyx_XGOTREF(__pyx_t_14);
  84873. __Pyx_XGOTREF(__pyx_t_15);
  84874. __Pyx_XGOTREF(__pyx_t_16);
  84875. __Pyx_XGOTREF(__pyx_t_17);
  84876. __pyx_t_6 = __pyx_lineno; __pyx_t_10 = __pyx_clineno; __pyx_t_11 = __pyx_filename;
  84877. {
  84878. __Pyx_DECREF(__pyx_v_ex);
  84879. __pyx_v_ex = NULL;
  84880. }
  84881. if (PY_MAJOR_VERSION >= 3) {
  84882. __Pyx_XGIVEREF(__pyx_t_15);
  84883. __Pyx_XGIVEREF(__pyx_t_16);
  84884. __Pyx_XGIVEREF(__pyx_t_17);
  84885. __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17);
  84886. }
  84887. __Pyx_XGIVEREF(__pyx_t_12);
  84888. __Pyx_XGIVEREF(__pyx_t_13);
  84889. __Pyx_XGIVEREF(__pyx_t_14);
  84890. __Pyx_ErrRestore(__pyx_t_12, __pyx_t_13, __pyx_t_14);
  84891. __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0;
  84892. __pyx_lineno = __pyx_t_6; __pyx_clineno = __pyx_t_10; __pyx_filename = __pyx_t_11;
  84893. goto __pyx_L10_except_error;
  84894. }
  84895. __pyx_L21:;
  84896. }
  84897. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  84898. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  84899. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  84900. goto __pyx_L9_exception_handled;
  84901. }
  84902. goto __pyx_L10_except_error;
  84903. __pyx_L10_except_error:;
  84904. /* "uvloop/handles/stream.pyx":764
  84905. * # when an error happens by calling uv_read_stop() or uv_close().
  84906. * # Trying to read from the stream again is undefined.
  84907. * try: # <<<<<<<<<<<<<<
  84908. * if UVLOOP_DEBUG:
  84909. * loop._debug_stream_read_eof_total += 1
  84910. */
  84911. __Pyx_XGIVEREF(__pyx_t_3);
  84912. __Pyx_XGIVEREF(__pyx_t_4);
  84913. __Pyx_XGIVEREF(__pyx_t_5);
  84914. __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
  84915. goto __pyx_L6_error;
  84916. __pyx_L9_exception_handled:;
  84917. __Pyx_XGIVEREF(__pyx_t_3);
  84918. __Pyx_XGIVEREF(__pyx_t_4);
  84919. __Pyx_XGIVEREF(__pyx_t_5);
  84920. __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
  84921. __pyx_L13_try_end:;
  84922. }
  84923. }
  84924. /* "uvloop/handles/stream.pyx":776
  84925. * sc._fatal_error(ex, False)
  84926. * finally:
  84927. * return True # <<<<<<<<<<<<<<
  84928. *
  84929. * if nread == 0:
  84930. */
  84931. /*finally:*/ {
  84932. /*normal exit:*/{
  84933. __pyx_r = 1;
  84934. goto __pyx_L0;
  84935. }
  84936. __pyx_L6_error:;
  84937. /*exception exit:*/{
  84938. __Pyx_PyThreadState_declare
  84939. __Pyx_PyThreadState_assign
  84940. __pyx_t_5 = 0; __pyx_t_4 = 0; __pyx_t_3 = 0; __pyx_t_17 = 0; __pyx_t_16 = 0; __pyx_t_15 = 0;
  84941. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  84942. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  84943. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  84944. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  84945. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_17, &__pyx_t_16, &__pyx_t_15);
  84946. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_3) < 0)) __Pyx_ErrFetch(&__pyx_t_5, &__pyx_t_4, &__pyx_t_3);
  84947. __Pyx_XGOTREF(__pyx_t_5);
  84948. __Pyx_XGOTREF(__pyx_t_4);
  84949. __Pyx_XGOTREF(__pyx_t_3);
  84950. __Pyx_XGOTREF(__pyx_t_17);
  84951. __Pyx_XGOTREF(__pyx_t_16);
  84952. __Pyx_XGOTREF(__pyx_t_15);
  84953. {
  84954. __pyx_r = 1;
  84955. goto __pyx_L27_return;
  84956. }
  84957. __pyx_L27_return:;
  84958. if (PY_MAJOR_VERSION >= 3) {
  84959. __Pyx_XGIVEREF(__pyx_t_17);
  84960. __Pyx_XGIVEREF(__pyx_t_16);
  84961. __Pyx_XGIVEREF(__pyx_t_15);
  84962. __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_16, __pyx_t_15);
  84963. }
  84964. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  84965. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  84966. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  84967. __pyx_t_17 = 0; __pyx_t_16 = 0; __pyx_t_15 = 0;
  84968. goto __pyx_L0;
  84969. }
  84970. }
  84971. /* "uvloop/handles/stream.pyx":759
  84972. * return True
  84973. *
  84974. * if nread == uv.UV_EOF: # <<<<<<<<<<<<<<
  84975. * # From libuv docs:
  84976. * # The callee is responsible for stopping closing the stream
  84977. */
  84978. }
  84979. /* "uvloop/handles/stream.pyx":778
  84980. * return True
  84981. *
  84982. * if nread == 0: # <<<<<<<<<<<<<<
  84983. * # From libuv docs:
  84984. * # nread might be 0, which does not indicate an error or EOF.
  84985. */
  84986. __pyx_t_1 = ((__pyx_v_nread == 0) != 0);
  84987. if (__pyx_t_1) {
  84988. /* "uvloop/handles/stream.pyx":782
  84989. * # nread might be 0, which does not indicate an error or EOF.
  84990. * # This is equivalent to EAGAIN or EWOULDBLOCK under read(2).
  84991. * return True # <<<<<<<<<<<<<<
  84992. *
  84993. * if nread < 0:
  84994. */
  84995. __pyx_r = 1;
  84996. goto __pyx_L0;
  84997. /* "uvloop/handles/stream.pyx":778
  84998. * return True
  84999. *
  85000. * if nread == 0: # <<<<<<<<<<<<<<
  85001. * # From libuv docs:
  85002. * # nread might be 0, which does not indicate an error or EOF.
  85003. */
  85004. }
  85005. /* "uvloop/handles/stream.pyx":784
  85006. * return True
  85007. *
  85008. * if nread < 0: # <<<<<<<<<<<<<<
  85009. * # From libuv docs:
  85010. * # The callee is responsible for stopping closing the stream
  85011. */
  85012. __pyx_t_1 = ((__pyx_v_nread < 0) != 0);
  85013. if (__pyx_t_1) {
  85014. /* "uvloop/handles/stream.pyx":794
  85015. * # we don't need try...finally here.
  85016. *
  85017. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  85018. * loop._debug_stream_read_errors_total += 1
  85019. *
  85020. */
  85021. __pyx_t_1 = (UVLOOP_DEBUG != 0);
  85022. if (__pyx_t_1) {
  85023. /* "uvloop/handles/stream.pyx":795
  85024. *
  85025. * if UVLOOP_DEBUG:
  85026. * loop._debug_stream_read_errors_total += 1 # <<<<<<<<<<<<<<
  85027. *
  85028. * if sc.__read_error_close:
  85029. */
  85030. __pyx_v_loop->_debug_stream_read_errors_total = (__pyx_v_loop->_debug_stream_read_errors_total + 1);
  85031. /* "uvloop/handles/stream.pyx":794
  85032. * # we don't need try...finally here.
  85033. *
  85034. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  85035. * loop._debug_stream_read_errors_total += 1
  85036. *
  85037. */
  85038. }
  85039. /* "uvloop/handles/stream.pyx":797
  85040. * loop._debug_stream_read_errors_total += 1
  85041. *
  85042. * if sc.__read_error_close: # <<<<<<<<<<<<<<
  85043. * # Used for getting notified when a pipe is closed.
  85044. * # See WriteUnixTransport for the explanation.
  85045. */
  85046. __pyx_t_1 = (__pyx_v_sc->__pyx___read_error_close != 0);
  85047. if (__pyx_t_1) {
  85048. /* "uvloop/handles/stream.pyx":800
  85049. * # Used for getting notified when a pipe is closed.
  85050. * # See WriteUnixTransport for the explanation.
  85051. * sc._on_eof() # <<<<<<<<<<<<<<
  85052. * return True
  85053. *
  85054. */
  85055. __pyx_t_8 = __pyx_f_6uvloop_4loop_8UVStream__on_eof(__pyx_v_sc); if (unlikely(!__pyx_t_8)) __PYX_ERR(18, 800, __pyx_L1_error)
  85056. __Pyx_GOTREF(__pyx_t_8);
  85057. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  85058. /* "uvloop/handles/stream.pyx":801
  85059. * # See WriteUnixTransport for the explanation.
  85060. * sc._on_eof()
  85061. * return True # <<<<<<<<<<<<<<
  85062. *
  85063. * exc = convert_error(nread)
  85064. */
  85065. __pyx_r = 1;
  85066. goto __pyx_L0;
  85067. /* "uvloop/handles/stream.pyx":797
  85068. * loop._debug_stream_read_errors_total += 1
  85069. *
  85070. * if sc.__read_error_close: # <<<<<<<<<<<<<<
  85071. * # Used for getting notified when a pipe is closed.
  85072. * # See WriteUnixTransport for the explanation.
  85073. */
  85074. }
  85075. /* "uvloop/handles/stream.pyx":803
  85076. * return True
  85077. *
  85078. * exc = convert_error(nread) # <<<<<<<<<<<<<<
  85079. * sc._fatal_error(
  85080. * exc, False, "error status in uv_stream_t.read callback")
  85081. */
  85082. __pyx_t_8 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_nread); if (unlikely(!__pyx_t_8)) __PYX_ERR(18, 803, __pyx_L1_error)
  85083. __Pyx_GOTREF(__pyx_t_8);
  85084. __pyx_v_exc = __pyx_t_8;
  85085. __pyx_t_8 = 0;
  85086. /* "uvloop/handles/stream.pyx":804
  85087. *
  85088. * exc = convert_error(nread)
  85089. * sc._fatal_error( # <<<<<<<<<<<<<<
  85090. * exc, False, "error status in uv_stream_t.read callback")
  85091. * return True
  85092. */
  85093. __pyx_t_18.__pyx_n = 1;
  85094. __pyx_t_18.reason = __pyx_kp_u_error_status_in_uv_stream_t_read;
  85095. __pyx_t_8 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_sc->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._fatal_error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_sc), __pyx_v_exc, Py_False, &__pyx_t_18); if (unlikely(!__pyx_t_8)) __PYX_ERR(18, 804, __pyx_L1_error)
  85096. __Pyx_GOTREF(__pyx_t_8);
  85097. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  85098. /* "uvloop/handles/stream.pyx":806
  85099. * sc._fatal_error(
  85100. * exc, False, "error status in uv_stream_t.read callback")
  85101. * return True # <<<<<<<<<<<<<<
  85102. *
  85103. * return False
  85104. */
  85105. __pyx_r = 1;
  85106. goto __pyx_L0;
  85107. /* "uvloop/handles/stream.pyx":784
  85108. * return True
  85109. *
  85110. * if nread < 0: # <<<<<<<<<<<<<<
  85111. * # From libuv docs:
  85112. * # The callee is responsible for stopping closing the stream
  85113. */
  85114. }
  85115. /* "uvloop/handles/stream.pyx":808
  85116. * return True
  85117. *
  85118. * return False # <<<<<<<<<<<<<<
  85119. *
  85120. *
  85121. */
  85122. __pyx_r = 0;
  85123. goto __pyx_L0;
  85124. /* "uvloop/handles/stream.pyx":751
  85125. *
  85126. *
  85127. * cdef inline bint __uv_stream_on_read_common(UVStream sc, Loop loop, # <<<<<<<<<<<<<<
  85128. * ssize_t nread):
  85129. * if sc._closed:
  85130. */
  85131. /* function exit code */
  85132. __pyx_L1_error:;
  85133. __Pyx_XDECREF(__pyx_t_2);
  85134. __Pyx_XDECREF(__pyx_t_7);
  85135. __Pyx_XDECREF(__pyx_t_8);
  85136. __Pyx_XDECREF(__pyx_t_9);
  85137. __Pyx_WriteUnraisable("uvloop.loop.__uv_stream_on_read_common", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  85138. __pyx_r = 0;
  85139. __pyx_L0:;
  85140. __Pyx_XDECREF(__pyx_v_ex);
  85141. __Pyx_XDECREF(__pyx_v_exc);
  85142. __Pyx_RefNannyFinishContext();
  85143. return __pyx_r;
  85144. }
  85145. /* "uvloop/handles/stream.pyx":811
  85146. *
  85147. *
  85148. * cdef inline void __uv_stream_on_read_impl(uv.uv_stream_t* stream, # <<<<<<<<<<<<<<
  85149. * ssize_t nread,
  85150. * const uv.uv_buf_t* buf):
  85151. */
  85152. static CYTHON_INLINE void __pyx_f_6uvloop_4loop___uv_stream_on_read_impl(uv_stream_t *__pyx_v_stream, Py_ssize_t __pyx_v_nread, CYTHON_UNUSED uv_buf_t const *__pyx_v_buf) {
  85153. struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_sc = 0;
  85154. struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop = 0;
  85155. PyObject *__pyx_v_exc = NULL;
  85156. __Pyx_RefNannyDeclarations
  85157. PyObject *__pyx_t_1 = NULL;
  85158. int __pyx_t_2;
  85159. PyObject *__pyx_t_3 = NULL;
  85160. PyObject *__pyx_t_4 = NULL;
  85161. PyObject *__pyx_t_5 = NULL;
  85162. PyObject *__pyx_t_6 = NULL;
  85163. PyObject *__pyx_t_7 = NULL;
  85164. PyObject *__pyx_t_8 = NULL;
  85165. int __pyx_t_9;
  85166. int __pyx_t_10;
  85167. char const *__pyx_t_11;
  85168. PyObject *__pyx_t_12 = NULL;
  85169. PyObject *__pyx_t_13 = NULL;
  85170. PyObject *__pyx_t_14 = NULL;
  85171. PyObject *__pyx_t_15 = NULL;
  85172. PyObject *__pyx_t_16 = NULL;
  85173. PyObject *__pyx_t_17 = NULL;
  85174. __Pyx_RefNannySetupContext("__uv_stream_on_read_impl", 0);
  85175. /* "uvloop/handles/stream.pyx":815
  85176. * const uv.uv_buf_t* buf):
  85177. * cdef:
  85178. * UVStream sc = <UVStream>stream.data # <<<<<<<<<<<<<<
  85179. * Loop loop = sc._loop
  85180. *
  85181. */
  85182. __pyx_t_1 = ((PyObject *)__pyx_v_stream->data);
  85183. __Pyx_INCREF(__pyx_t_1);
  85184. __pyx_v_sc = ((struct __pyx_obj_6uvloop_4loop_UVStream *)__pyx_t_1);
  85185. __pyx_t_1 = 0;
  85186. /* "uvloop/handles/stream.pyx":816
  85187. * cdef:
  85188. * UVStream sc = <UVStream>stream.data
  85189. * Loop loop = sc._loop # <<<<<<<<<<<<<<
  85190. *
  85191. * # It's OK to free the buffer early, since nothing will
  85192. */
  85193. __pyx_t_1 = ((PyObject *)__pyx_v_sc->__pyx_base.__pyx_base.__pyx_base._loop);
  85194. __Pyx_INCREF(__pyx_t_1);
  85195. __pyx_v_loop = ((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_t_1);
  85196. __pyx_t_1 = 0;
  85197. /* "uvloop/handles/stream.pyx":820
  85198. * # It's OK to free the buffer early, since nothing will
  85199. * # be able to touch it until this method is done.
  85200. * __loop_free_buffer(loop) # <<<<<<<<<<<<<<
  85201. *
  85202. * if __uv_stream_on_read_common(sc, loop, nread):
  85203. */
  85204. __pyx_f_6uvloop_4loop___loop_free_buffer(__pyx_v_loop);
  85205. /* "uvloop/handles/stream.pyx":822
  85206. * __loop_free_buffer(loop)
  85207. *
  85208. * if __uv_stream_on_read_common(sc, loop, nread): # <<<<<<<<<<<<<<
  85209. * return
  85210. *
  85211. */
  85212. __pyx_t_2 = (__pyx_f_6uvloop_4loop___uv_stream_on_read_common(__pyx_v_sc, __pyx_v_loop, __pyx_v_nread) != 0);
  85213. if (__pyx_t_2) {
  85214. /* "uvloop/handles/stream.pyx":823
  85215. *
  85216. * if __uv_stream_on_read_common(sc, loop, nread):
  85217. * return # <<<<<<<<<<<<<<
  85218. *
  85219. * try:
  85220. */
  85221. goto __pyx_L0;
  85222. /* "uvloop/handles/stream.pyx":822
  85223. * __loop_free_buffer(loop)
  85224. *
  85225. * if __uv_stream_on_read_common(sc, loop, nread): # <<<<<<<<<<<<<<
  85226. * return
  85227. *
  85228. */
  85229. }
  85230. /* "uvloop/handles/stream.pyx":825
  85231. * return
  85232. *
  85233. * try: # <<<<<<<<<<<<<<
  85234. * if UVLOOP_DEBUG:
  85235. * loop._debug_stream_read_cb_total += 1
  85236. */
  85237. {
  85238. __Pyx_PyThreadState_declare
  85239. __Pyx_PyThreadState_assign
  85240. __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
  85241. __Pyx_XGOTREF(__pyx_t_3);
  85242. __Pyx_XGOTREF(__pyx_t_4);
  85243. __Pyx_XGOTREF(__pyx_t_5);
  85244. /*try:*/ {
  85245. /* "uvloop/handles/stream.pyx":826
  85246. *
  85247. * try:
  85248. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  85249. * loop._debug_stream_read_cb_total += 1
  85250. *
  85251. */
  85252. __pyx_t_2 = (UVLOOP_DEBUG != 0);
  85253. if (__pyx_t_2) {
  85254. /* "uvloop/handles/stream.pyx":827
  85255. * try:
  85256. * if UVLOOP_DEBUG:
  85257. * loop._debug_stream_read_cb_total += 1 # <<<<<<<<<<<<<<
  85258. *
  85259. * sc._protocol_data_received(loop._recv_buffer[:nread])
  85260. */
  85261. __pyx_v_loop->_debug_stream_read_cb_total = (__pyx_v_loop->_debug_stream_read_cb_total + 1);
  85262. /* "uvloop/handles/stream.pyx":826
  85263. *
  85264. * try:
  85265. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  85266. * loop._debug_stream_read_cb_total += 1
  85267. *
  85268. */
  85269. }
  85270. /* "uvloop/handles/stream.pyx":829
  85271. * loop._debug_stream_read_cb_total += 1
  85272. *
  85273. * sc._protocol_data_received(loop._recv_buffer[:nread]) # <<<<<<<<<<<<<<
  85274. * except BaseException as exc:
  85275. * if UVLOOP_DEBUG:
  85276. */
  85277. __pyx_t_6 = __Pyx_PyBytes_FromStringAndSize(((const char*)__pyx_v_loop->_recv_buffer) + 0, __pyx_v_nread - 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(18, 829, __pyx_L4_error)
  85278. __Pyx_GOTREF(__pyx_t_6);
  85279. __Pyx_INCREF(__pyx_v_sc->__pyx_base._protocol_data_received);
  85280. __pyx_t_7 = __pyx_v_sc->__pyx_base._protocol_data_received; __pyx_t_8 = NULL;
  85281. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
  85282. __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
  85283. if (likely(__pyx_t_8)) {
  85284. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
  85285. __Pyx_INCREF(__pyx_t_8);
  85286. __Pyx_INCREF(function);
  85287. __Pyx_DECREF_SET(__pyx_t_7, function);
  85288. }
  85289. }
  85290. __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
  85291. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  85292. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  85293. if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 829, __pyx_L4_error)
  85294. __Pyx_GOTREF(__pyx_t_1);
  85295. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  85296. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  85297. /* "uvloop/handles/stream.pyx":825
  85298. * return
  85299. *
  85300. * try: # <<<<<<<<<<<<<<
  85301. * if UVLOOP_DEBUG:
  85302. * loop._debug_stream_read_cb_total += 1
  85303. */
  85304. }
  85305. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  85306. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  85307. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  85308. goto __pyx_L9_try_end;
  85309. __pyx_L4_error:;
  85310. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  85311. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  85312. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  85313. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  85314. /* "uvloop/handles/stream.pyx":830
  85315. *
  85316. * sc._protocol_data_received(loop._recv_buffer[:nread])
  85317. * except BaseException as exc: # <<<<<<<<<<<<<<
  85318. * if UVLOOP_DEBUG:
  85319. * loop._debug_stream_read_cb_errors_total += 1
  85320. */
  85321. __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_BaseException);
  85322. if (__pyx_t_9) {
  85323. __Pyx_AddTraceback("uvloop.loop.__uv_stream_on_read_impl", __pyx_clineno, __pyx_lineno, __pyx_filename);
  85324. if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_7, &__pyx_t_6) < 0) __PYX_ERR(18, 830, __pyx_L6_except_error)
  85325. __Pyx_GOTREF(__pyx_t_1);
  85326. __Pyx_GOTREF(__pyx_t_7);
  85327. __Pyx_GOTREF(__pyx_t_6);
  85328. __Pyx_INCREF(__pyx_t_7);
  85329. __pyx_v_exc = __pyx_t_7;
  85330. /*try:*/ {
  85331. /* "uvloop/handles/stream.pyx":831
  85332. * sc._protocol_data_received(loop._recv_buffer[:nread])
  85333. * except BaseException as exc:
  85334. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  85335. * loop._debug_stream_read_cb_errors_total += 1
  85336. *
  85337. */
  85338. __pyx_t_2 = (UVLOOP_DEBUG != 0);
  85339. if (__pyx_t_2) {
  85340. /* "uvloop/handles/stream.pyx":832
  85341. * except BaseException as exc:
  85342. * if UVLOOP_DEBUG:
  85343. * loop._debug_stream_read_cb_errors_total += 1 # <<<<<<<<<<<<<<
  85344. *
  85345. * sc._fatal_error(exc, False)
  85346. */
  85347. __pyx_v_loop->_debug_stream_read_cb_errors_total = (__pyx_v_loop->_debug_stream_read_cb_errors_total + 1);
  85348. /* "uvloop/handles/stream.pyx":831
  85349. * sc._protocol_data_received(loop._recv_buffer[:nread])
  85350. * except BaseException as exc:
  85351. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  85352. * loop._debug_stream_read_cb_errors_total += 1
  85353. *
  85354. */
  85355. }
  85356. /* "uvloop/handles/stream.pyx":834
  85357. * loop._debug_stream_read_cb_errors_total += 1
  85358. *
  85359. * sc._fatal_error(exc, False) # <<<<<<<<<<<<<<
  85360. *
  85361. *
  85362. */
  85363. __pyx_t_8 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_sc->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._fatal_error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_sc), __pyx_v_exc, Py_False, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(18, 834, __pyx_L16_error)
  85364. __Pyx_GOTREF(__pyx_t_8);
  85365. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  85366. }
  85367. /* "uvloop/handles/stream.pyx":830
  85368. *
  85369. * sc._protocol_data_received(loop._recv_buffer[:nread])
  85370. * except BaseException as exc: # <<<<<<<<<<<<<<
  85371. * if UVLOOP_DEBUG:
  85372. * loop._debug_stream_read_cb_errors_total += 1
  85373. */
  85374. /*finally:*/ {
  85375. /*normal exit:*/{
  85376. __Pyx_DECREF(__pyx_v_exc);
  85377. __pyx_v_exc = NULL;
  85378. goto __pyx_L17;
  85379. }
  85380. __pyx_L16_error:;
  85381. /*exception exit:*/{
  85382. __Pyx_PyThreadState_declare
  85383. __Pyx_PyThreadState_assign
  85384. __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0;
  85385. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  85386. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17);
  85387. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14) < 0)) __Pyx_ErrFetch(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
  85388. __Pyx_XGOTREF(__pyx_t_12);
  85389. __Pyx_XGOTREF(__pyx_t_13);
  85390. __Pyx_XGOTREF(__pyx_t_14);
  85391. __Pyx_XGOTREF(__pyx_t_15);
  85392. __Pyx_XGOTREF(__pyx_t_16);
  85393. __Pyx_XGOTREF(__pyx_t_17);
  85394. __pyx_t_9 = __pyx_lineno; __pyx_t_10 = __pyx_clineno; __pyx_t_11 = __pyx_filename;
  85395. {
  85396. __Pyx_DECREF(__pyx_v_exc);
  85397. __pyx_v_exc = NULL;
  85398. }
  85399. if (PY_MAJOR_VERSION >= 3) {
  85400. __Pyx_XGIVEREF(__pyx_t_15);
  85401. __Pyx_XGIVEREF(__pyx_t_16);
  85402. __Pyx_XGIVEREF(__pyx_t_17);
  85403. __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17);
  85404. }
  85405. __Pyx_XGIVEREF(__pyx_t_12);
  85406. __Pyx_XGIVEREF(__pyx_t_13);
  85407. __Pyx_XGIVEREF(__pyx_t_14);
  85408. __Pyx_ErrRestore(__pyx_t_12, __pyx_t_13, __pyx_t_14);
  85409. __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0;
  85410. __pyx_lineno = __pyx_t_9; __pyx_clineno = __pyx_t_10; __pyx_filename = __pyx_t_11;
  85411. goto __pyx_L6_except_error;
  85412. }
  85413. __pyx_L17:;
  85414. }
  85415. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  85416. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  85417. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  85418. goto __pyx_L5_exception_handled;
  85419. }
  85420. goto __pyx_L6_except_error;
  85421. __pyx_L6_except_error:;
  85422. /* "uvloop/handles/stream.pyx":825
  85423. * return
  85424. *
  85425. * try: # <<<<<<<<<<<<<<
  85426. * if UVLOOP_DEBUG:
  85427. * loop._debug_stream_read_cb_total += 1
  85428. */
  85429. __Pyx_XGIVEREF(__pyx_t_3);
  85430. __Pyx_XGIVEREF(__pyx_t_4);
  85431. __Pyx_XGIVEREF(__pyx_t_5);
  85432. __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
  85433. goto __pyx_L1_error;
  85434. __pyx_L5_exception_handled:;
  85435. __Pyx_XGIVEREF(__pyx_t_3);
  85436. __Pyx_XGIVEREF(__pyx_t_4);
  85437. __Pyx_XGIVEREF(__pyx_t_5);
  85438. __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
  85439. __pyx_L9_try_end:;
  85440. }
  85441. /* "uvloop/handles/stream.pyx":811
  85442. *
  85443. *
  85444. * cdef inline void __uv_stream_on_read_impl(uv.uv_stream_t* stream, # <<<<<<<<<<<<<<
  85445. * ssize_t nread,
  85446. * const uv.uv_buf_t* buf):
  85447. */
  85448. /* function exit code */
  85449. goto __pyx_L0;
  85450. __pyx_L1_error:;
  85451. __Pyx_XDECREF(__pyx_t_1);
  85452. __Pyx_XDECREF(__pyx_t_6);
  85453. __Pyx_XDECREF(__pyx_t_7);
  85454. __Pyx_XDECREF(__pyx_t_8);
  85455. __Pyx_WriteUnraisable("uvloop.loop.__uv_stream_on_read_impl", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  85456. __pyx_L0:;
  85457. __Pyx_XDECREF((PyObject *)__pyx_v_sc);
  85458. __Pyx_XDECREF((PyObject *)__pyx_v_loop);
  85459. __Pyx_XDECREF(__pyx_v_exc);
  85460. __Pyx_RefNannyFinishContext();
  85461. }
  85462. /* "uvloop/handles/stream.pyx":837
  85463. *
  85464. *
  85465. * cdef inline void __uv_stream_on_write_impl(uv.uv_write_t* req, int status): # <<<<<<<<<<<<<<
  85466. * cdef:
  85467. * _StreamWriteContext ctx = <_StreamWriteContext> req.data
  85468. */
  85469. static CYTHON_INLINE void __pyx_f_6uvloop_4loop___uv_stream_on_write_impl(uv_write_t *__pyx_v_req, int __pyx_v_status) {
  85470. struct __pyx_obj_6uvloop_4loop__StreamWriteContext *__pyx_v_ctx = 0;
  85471. struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_stream = 0;
  85472. PyObject *__pyx_v_exc = NULL;
  85473. __Pyx_RefNannyDeclarations
  85474. PyObject *__pyx_t_1 = NULL;
  85475. int __pyx_t_2;
  85476. struct __pyx_obj_6uvloop_4loop_Loop *__pyx_t_3 = NULL;
  85477. struct __pyx_opt_args_6uvloop_4loop_8UVHandle__fatal_error __pyx_t_4;
  85478. PyObject *__pyx_t_5 = NULL;
  85479. PyObject *__pyx_t_6 = NULL;
  85480. PyObject *__pyx_t_7 = NULL;
  85481. int __pyx_t_8;
  85482. PyObject *__pyx_t_9 = NULL;
  85483. PyObject *__pyx_t_10 = NULL;
  85484. PyObject *__pyx_t_11 = NULL;
  85485. int __pyx_t_12;
  85486. char const *__pyx_t_13;
  85487. PyObject *__pyx_t_14 = NULL;
  85488. PyObject *__pyx_t_15 = NULL;
  85489. PyObject *__pyx_t_16 = NULL;
  85490. PyObject *__pyx_t_17 = NULL;
  85491. PyObject *__pyx_t_18 = NULL;
  85492. PyObject *__pyx_t_19 = NULL;
  85493. __Pyx_RefNannySetupContext("__uv_stream_on_write_impl", 0);
  85494. /* "uvloop/handles/stream.pyx":839
  85495. * cdef inline void __uv_stream_on_write_impl(uv.uv_write_t* req, int status):
  85496. * cdef:
  85497. * _StreamWriteContext ctx = <_StreamWriteContext> req.data # <<<<<<<<<<<<<<
  85498. * UVStream stream = <UVStream>ctx.stream
  85499. *
  85500. */
  85501. __pyx_t_1 = ((PyObject *)__pyx_v_req->data);
  85502. __Pyx_INCREF(__pyx_t_1);
  85503. __pyx_v_ctx = ((struct __pyx_obj_6uvloop_4loop__StreamWriteContext *)__pyx_t_1);
  85504. __pyx_t_1 = 0;
  85505. /* "uvloop/handles/stream.pyx":840
  85506. * cdef:
  85507. * _StreamWriteContext ctx = <_StreamWriteContext> req.data
  85508. * UVStream stream = <UVStream>ctx.stream # <<<<<<<<<<<<<<
  85509. *
  85510. * ctx.close()
  85511. */
  85512. __pyx_t_1 = ((PyObject *)__pyx_v_ctx->stream);
  85513. __Pyx_INCREF(__pyx_t_1);
  85514. __pyx_v_stream = ((struct __pyx_obj_6uvloop_4loop_UVStream *)__pyx_t_1);
  85515. __pyx_t_1 = 0;
  85516. /* "uvloop/handles/stream.pyx":842
  85517. * UVStream stream = <UVStream>ctx.stream
  85518. *
  85519. * ctx.close() # <<<<<<<<<<<<<<
  85520. *
  85521. * if stream._closed:
  85522. */
  85523. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop__StreamWriteContext *)__pyx_v_ctx->__pyx_vtab)->close(__pyx_v_ctx); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 842, __pyx_L1_error)
  85524. __Pyx_GOTREF(__pyx_t_1);
  85525. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  85526. /* "uvloop/handles/stream.pyx":844
  85527. * ctx.close()
  85528. *
  85529. * if stream._closed: # <<<<<<<<<<<<<<
  85530. * # The stream was closed, there is nothing to do.
  85531. * # Even if there is an error, like EPIPE, there
  85532. */
  85533. __pyx_t_2 = (__pyx_v_stream->__pyx_base.__pyx_base.__pyx_base._closed != 0);
  85534. if (__pyx_t_2) {
  85535. /* "uvloop/handles/stream.pyx":848
  85536. * # Even if there is an error, like EPIPE, there
  85537. * # is no reason to report it.
  85538. * return # <<<<<<<<<<<<<<
  85539. *
  85540. * if status < 0:
  85541. */
  85542. goto __pyx_L0;
  85543. /* "uvloop/handles/stream.pyx":844
  85544. * ctx.close()
  85545. *
  85546. * if stream._closed: # <<<<<<<<<<<<<<
  85547. * # The stream was closed, there is nothing to do.
  85548. * # Even if there is an error, like EPIPE, there
  85549. */
  85550. }
  85551. /* "uvloop/handles/stream.pyx":850
  85552. * return
  85553. *
  85554. * if status < 0: # <<<<<<<<<<<<<<
  85555. * if UVLOOP_DEBUG:
  85556. * stream._loop._debug_stream_write_errors_total += 1
  85557. */
  85558. __pyx_t_2 = ((__pyx_v_status < 0) != 0);
  85559. if (__pyx_t_2) {
  85560. /* "uvloop/handles/stream.pyx":851
  85561. *
  85562. * if status < 0:
  85563. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  85564. * stream._loop._debug_stream_write_errors_total += 1
  85565. *
  85566. */
  85567. __pyx_t_2 = (UVLOOP_DEBUG != 0);
  85568. if (__pyx_t_2) {
  85569. /* "uvloop/handles/stream.pyx":852
  85570. * if status < 0:
  85571. * if UVLOOP_DEBUG:
  85572. * stream._loop._debug_stream_write_errors_total += 1 # <<<<<<<<<<<<<<
  85573. *
  85574. * exc = convert_error(status)
  85575. */
  85576. __Pyx_INCREF(((PyObject *)__pyx_v_stream->__pyx_base.__pyx_base.__pyx_base._loop));
  85577. __pyx_t_3 = __pyx_v_stream->__pyx_base.__pyx_base.__pyx_base._loop;
  85578. __pyx_t_3->_debug_stream_write_errors_total = (__pyx_t_3->_debug_stream_write_errors_total + 1);
  85579. __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  85580. /* "uvloop/handles/stream.pyx":851
  85581. *
  85582. * if status < 0:
  85583. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  85584. * stream._loop._debug_stream_write_errors_total += 1
  85585. *
  85586. */
  85587. }
  85588. /* "uvloop/handles/stream.pyx":854
  85589. * stream._loop._debug_stream_write_errors_total += 1
  85590. *
  85591. * exc = convert_error(status) # <<<<<<<<<<<<<<
  85592. * stream._fatal_error(
  85593. * exc, False, "error status in uv_stream_t.write callback")
  85594. */
  85595. __pyx_t_1 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_status); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 854, __pyx_L1_error)
  85596. __Pyx_GOTREF(__pyx_t_1);
  85597. __pyx_v_exc = __pyx_t_1;
  85598. __pyx_t_1 = 0;
  85599. /* "uvloop/handles/stream.pyx":855
  85600. *
  85601. * exc = convert_error(status)
  85602. * stream._fatal_error( # <<<<<<<<<<<<<<
  85603. * exc, False, "error status in uv_stream_t.write callback")
  85604. * return
  85605. */
  85606. __pyx_t_4.__pyx_n = 1;
  85607. __pyx_t_4.reason = __pyx_kp_u_error_status_in_uv_stream_t_writ;
  85608. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_stream->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._fatal_error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_stream), __pyx_v_exc, Py_False, &__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 855, __pyx_L1_error)
  85609. __Pyx_GOTREF(__pyx_t_1);
  85610. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  85611. /* "uvloop/handles/stream.pyx":857
  85612. * stream._fatal_error(
  85613. * exc, False, "error status in uv_stream_t.write callback")
  85614. * return # <<<<<<<<<<<<<<
  85615. *
  85616. * try:
  85617. */
  85618. goto __pyx_L0;
  85619. /* "uvloop/handles/stream.pyx":850
  85620. * return
  85621. *
  85622. * if status < 0: # <<<<<<<<<<<<<<
  85623. * if UVLOOP_DEBUG:
  85624. * stream._loop._debug_stream_write_errors_total += 1
  85625. */
  85626. }
  85627. /* "uvloop/handles/stream.pyx":859
  85628. * return
  85629. *
  85630. * try: # <<<<<<<<<<<<<<
  85631. * stream._on_write()
  85632. * except BaseException as exc:
  85633. */
  85634. {
  85635. __Pyx_PyThreadState_declare
  85636. __Pyx_PyThreadState_assign
  85637. __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7);
  85638. __Pyx_XGOTREF(__pyx_t_5);
  85639. __Pyx_XGOTREF(__pyx_t_6);
  85640. __Pyx_XGOTREF(__pyx_t_7);
  85641. /*try:*/ {
  85642. /* "uvloop/handles/stream.pyx":860
  85643. *
  85644. * try:
  85645. * stream._on_write() # <<<<<<<<<<<<<<
  85646. * except BaseException as exc:
  85647. * if UVLOOP_DEBUG:
  85648. */
  85649. __pyx_t_1 = __pyx_f_6uvloop_4loop_8UVStream__on_write(__pyx_v_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 860, __pyx_L6_error)
  85650. __Pyx_GOTREF(__pyx_t_1);
  85651. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  85652. /* "uvloop/handles/stream.pyx":859
  85653. * return
  85654. *
  85655. * try: # <<<<<<<<<<<<<<
  85656. * stream._on_write()
  85657. * except BaseException as exc:
  85658. */
  85659. }
  85660. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  85661. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  85662. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  85663. goto __pyx_L11_try_end;
  85664. __pyx_L6_error:;
  85665. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  85666. __Pyx_XDECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  85667. /* "uvloop/handles/stream.pyx":861
  85668. * try:
  85669. * stream._on_write()
  85670. * except BaseException as exc: # <<<<<<<<<<<<<<
  85671. * if UVLOOP_DEBUG:
  85672. * stream._loop._debug_stream_write_cb_errors_total += 1
  85673. */
  85674. __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_BaseException);
  85675. if (__pyx_t_8) {
  85676. __Pyx_AddTraceback("uvloop.loop.__uv_stream_on_write_impl", __pyx_clineno, __pyx_lineno, __pyx_filename);
  85677. if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_9, &__pyx_t_10) < 0) __PYX_ERR(18, 861, __pyx_L8_except_error)
  85678. __Pyx_GOTREF(__pyx_t_1);
  85679. __Pyx_GOTREF(__pyx_t_9);
  85680. __Pyx_GOTREF(__pyx_t_10);
  85681. __Pyx_INCREF(__pyx_t_9);
  85682. __pyx_v_exc = __pyx_t_9;
  85683. /*try:*/ {
  85684. /* "uvloop/handles/stream.pyx":862
  85685. * stream._on_write()
  85686. * except BaseException as exc:
  85687. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  85688. * stream._loop._debug_stream_write_cb_errors_total += 1
  85689. *
  85690. */
  85691. __pyx_t_2 = (UVLOOP_DEBUG != 0);
  85692. if (__pyx_t_2) {
  85693. /* "uvloop/handles/stream.pyx":863
  85694. * except BaseException as exc:
  85695. * if UVLOOP_DEBUG:
  85696. * stream._loop._debug_stream_write_cb_errors_total += 1 # <<<<<<<<<<<<<<
  85697. *
  85698. * stream._fatal_error(exc, False)
  85699. */
  85700. __Pyx_INCREF(((PyObject *)__pyx_v_stream->__pyx_base.__pyx_base.__pyx_base._loop));
  85701. __pyx_t_3 = __pyx_v_stream->__pyx_base.__pyx_base.__pyx_base._loop;
  85702. __pyx_t_3->_debug_stream_write_cb_errors_total = (__pyx_t_3->_debug_stream_write_cb_errors_total + 1);
  85703. __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  85704. /* "uvloop/handles/stream.pyx":862
  85705. * stream._on_write()
  85706. * except BaseException as exc:
  85707. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  85708. * stream._loop._debug_stream_write_cb_errors_total += 1
  85709. *
  85710. */
  85711. }
  85712. /* "uvloop/handles/stream.pyx":865
  85713. * stream._loop._debug_stream_write_cb_errors_total += 1
  85714. *
  85715. * stream._fatal_error(exc, False) # <<<<<<<<<<<<<<
  85716. *
  85717. *
  85718. */
  85719. __pyx_t_11 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_stream->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._fatal_error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_stream), __pyx_v_exc, Py_False, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(18, 865, __pyx_L17_error)
  85720. __Pyx_GOTREF(__pyx_t_11);
  85721. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  85722. }
  85723. /* "uvloop/handles/stream.pyx":861
  85724. * try:
  85725. * stream._on_write()
  85726. * except BaseException as exc: # <<<<<<<<<<<<<<
  85727. * if UVLOOP_DEBUG:
  85728. * stream._loop._debug_stream_write_cb_errors_total += 1
  85729. */
  85730. /*finally:*/ {
  85731. /*normal exit:*/{
  85732. __Pyx_DECREF(__pyx_v_exc);
  85733. __pyx_v_exc = NULL;
  85734. goto __pyx_L18;
  85735. }
  85736. __pyx_L17_error:;
  85737. /*exception exit:*/{
  85738. __Pyx_PyThreadState_declare
  85739. __Pyx_PyThreadState_assign
  85740. __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0;
  85741. __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
  85742. __Pyx_XDECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  85743. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19);
  85744. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16) < 0)) __Pyx_ErrFetch(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16);
  85745. __Pyx_XGOTREF(__pyx_t_14);
  85746. __Pyx_XGOTREF(__pyx_t_15);
  85747. __Pyx_XGOTREF(__pyx_t_16);
  85748. __Pyx_XGOTREF(__pyx_t_17);
  85749. __Pyx_XGOTREF(__pyx_t_18);
  85750. __Pyx_XGOTREF(__pyx_t_19);
  85751. __pyx_t_8 = __pyx_lineno; __pyx_t_12 = __pyx_clineno; __pyx_t_13 = __pyx_filename;
  85752. {
  85753. __Pyx_DECREF(__pyx_v_exc);
  85754. __pyx_v_exc = NULL;
  85755. }
  85756. if (PY_MAJOR_VERSION >= 3) {
  85757. __Pyx_XGIVEREF(__pyx_t_17);
  85758. __Pyx_XGIVEREF(__pyx_t_18);
  85759. __Pyx_XGIVEREF(__pyx_t_19);
  85760. __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_18, __pyx_t_19);
  85761. }
  85762. __Pyx_XGIVEREF(__pyx_t_14);
  85763. __Pyx_XGIVEREF(__pyx_t_15);
  85764. __Pyx_XGIVEREF(__pyx_t_16);
  85765. __Pyx_ErrRestore(__pyx_t_14, __pyx_t_15, __pyx_t_16);
  85766. __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0;
  85767. __pyx_lineno = __pyx_t_8; __pyx_clineno = __pyx_t_12; __pyx_filename = __pyx_t_13;
  85768. goto __pyx_L8_except_error;
  85769. }
  85770. __pyx_L18:;
  85771. }
  85772. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  85773. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  85774. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  85775. goto __pyx_L7_exception_handled;
  85776. }
  85777. goto __pyx_L8_except_error;
  85778. __pyx_L8_except_error:;
  85779. /* "uvloop/handles/stream.pyx":859
  85780. * return
  85781. *
  85782. * try: # <<<<<<<<<<<<<<
  85783. * stream._on_write()
  85784. * except BaseException as exc:
  85785. */
  85786. __Pyx_XGIVEREF(__pyx_t_5);
  85787. __Pyx_XGIVEREF(__pyx_t_6);
  85788. __Pyx_XGIVEREF(__pyx_t_7);
  85789. __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
  85790. goto __pyx_L1_error;
  85791. __pyx_L7_exception_handled:;
  85792. __Pyx_XGIVEREF(__pyx_t_5);
  85793. __Pyx_XGIVEREF(__pyx_t_6);
  85794. __Pyx_XGIVEREF(__pyx_t_7);
  85795. __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
  85796. __pyx_L11_try_end:;
  85797. }
  85798. /* "uvloop/handles/stream.pyx":837
  85799. *
  85800. *
  85801. * cdef inline void __uv_stream_on_write_impl(uv.uv_write_t* req, int status): # <<<<<<<<<<<<<<
  85802. * cdef:
  85803. * _StreamWriteContext ctx = <_StreamWriteContext> req.data
  85804. */
  85805. /* function exit code */
  85806. goto __pyx_L0;
  85807. __pyx_L1_error:;
  85808. __Pyx_XDECREF(__pyx_t_1);
  85809. __Pyx_XDECREF(((PyObject *)__pyx_t_3));
  85810. __Pyx_XDECREF(__pyx_t_9);
  85811. __Pyx_XDECREF(__pyx_t_10);
  85812. __Pyx_XDECREF(__pyx_t_11);
  85813. __Pyx_WriteUnraisable("uvloop.loop.__uv_stream_on_write_impl", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  85814. __pyx_L0:;
  85815. __Pyx_XDECREF((PyObject *)__pyx_v_ctx);
  85816. __Pyx_XDECREF((PyObject *)__pyx_v_stream);
  85817. __Pyx_XDECREF(__pyx_v_exc);
  85818. __Pyx_RefNannyFinishContext();
  85819. }
  85820. /* "uvloop/handles/stream.pyx":868
  85821. *
  85822. *
  85823. * cdef void __uv_stream_on_read(uv.uv_stream_t* stream, # <<<<<<<<<<<<<<
  85824. * ssize_t nread,
  85825. * const uv.uv_buf_t* buf) with gil:
  85826. */
  85827. static void __pyx_f_6uvloop_4loop___uv_stream_on_read(uv_stream_t *__pyx_v_stream, Py_ssize_t __pyx_v_nread, uv_buf_t const *__pyx_v_buf) {
  85828. __Pyx_RefNannyDeclarations
  85829. int __pyx_t_1;
  85830. #ifdef WITH_THREAD
  85831. PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  85832. #endif
  85833. __Pyx_RefNannySetupContext("__uv_stream_on_read", 0);
  85834. /* "uvloop/handles/stream.pyx":873
  85835. *
  85836. * if __ensure_handle_data(<uv.uv_handle_t*>stream,
  85837. * "UVStream read callback") == 0: # <<<<<<<<<<<<<<
  85838. * return
  85839. *
  85840. */
  85841. __pyx_t_1 = ((__pyx_f_6uvloop_4loop___ensure_handle_data(((uv_handle_t *)__pyx_v_stream), ((char const *)"UVStream read callback")) == 0) != 0);
  85842. /* "uvloop/handles/stream.pyx":872
  85843. * const uv.uv_buf_t* buf) with gil:
  85844. *
  85845. * if __ensure_handle_data(<uv.uv_handle_t*>stream, # <<<<<<<<<<<<<<
  85846. * "UVStream read callback") == 0:
  85847. * return
  85848. */
  85849. if (__pyx_t_1) {
  85850. /* "uvloop/handles/stream.pyx":874
  85851. * if __ensure_handle_data(<uv.uv_handle_t*>stream,
  85852. * "UVStream read callback") == 0:
  85853. * return # <<<<<<<<<<<<<<
  85854. *
  85855. * # Don't need try-finally, __uv_stream_on_read_impl is void
  85856. */
  85857. goto __pyx_L0;
  85858. /* "uvloop/handles/stream.pyx":872
  85859. * const uv.uv_buf_t* buf) with gil:
  85860. *
  85861. * if __ensure_handle_data(<uv.uv_handle_t*>stream, # <<<<<<<<<<<<<<
  85862. * "UVStream read callback") == 0:
  85863. * return
  85864. */
  85865. }
  85866. /* "uvloop/handles/stream.pyx":877
  85867. *
  85868. * # Don't need try-finally, __uv_stream_on_read_impl is void
  85869. * __uv_stream_on_read_impl(stream, nread, buf) # <<<<<<<<<<<<<<
  85870. *
  85871. *
  85872. */
  85873. __pyx_f_6uvloop_4loop___uv_stream_on_read_impl(__pyx_v_stream, __pyx_v_nread, __pyx_v_buf);
  85874. /* "uvloop/handles/stream.pyx":868
  85875. *
  85876. *
  85877. * cdef void __uv_stream_on_read(uv.uv_stream_t* stream, # <<<<<<<<<<<<<<
  85878. * ssize_t nread,
  85879. * const uv.uv_buf_t* buf) with gil:
  85880. */
  85881. /* function exit code */
  85882. __pyx_L0:;
  85883. __Pyx_RefNannyFinishContext();
  85884. #ifdef WITH_THREAD
  85885. __Pyx_PyGILState_Release(__pyx_gilstate_save);
  85886. #endif
  85887. }
  85888. /* "uvloop/handles/stream.pyx":880
  85889. *
  85890. *
  85891. * cdef void __uv_stream_on_write(uv.uv_write_t* req, int status) with gil: # <<<<<<<<<<<<<<
  85892. *
  85893. * if UVLOOP_DEBUG:
  85894. */
  85895. static void __pyx_f_6uvloop_4loop___uv_stream_on_write(uv_write_t *__pyx_v_req, int __pyx_v_status) {
  85896. __Pyx_RefNannyDeclarations
  85897. int __pyx_t_1;
  85898. PyObject *__pyx_t_2 = NULL;
  85899. PyObject *__pyx_t_3 = NULL;
  85900. PyObject *__pyx_t_4 = NULL;
  85901. PyObject *__pyx_t_5 = NULL;
  85902. int __pyx_t_6;
  85903. PyObject *__pyx_t_7 = NULL;
  85904. #ifdef WITH_THREAD
  85905. PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  85906. #endif
  85907. __Pyx_RefNannySetupContext("__uv_stream_on_write", 0);
  85908. /* "uvloop/handles/stream.pyx":882
  85909. * cdef void __uv_stream_on_write(uv.uv_write_t* req, int status) with gil:
  85910. *
  85911. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  85912. * if req.data is NULL:
  85913. * aio_logger.error(
  85914. */
  85915. __pyx_t_1 = (UVLOOP_DEBUG != 0);
  85916. if (__pyx_t_1) {
  85917. /* "uvloop/handles/stream.pyx":883
  85918. *
  85919. * if UVLOOP_DEBUG:
  85920. * if req.data is NULL: # <<<<<<<<<<<<<<
  85921. * aio_logger.error(
  85922. * 'UVStream.write callback called with NULL req.data, status=%r',
  85923. */
  85924. __pyx_t_1 = ((__pyx_v_req->data == NULL) != 0);
  85925. if (__pyx_t_1) {
  85926. /* "uvloop/handles/stream.pyx":884
  85927. * if UVLOOP_DEBUG:
  85928. * if req.data is NULL:
  85929. * aio_logger.error( # <<<<<<<<<<<<<<
  85930. * 'UVStream.write callback called with NULL req.data, status=%r',
  85931. * status)
  85932. */
  85933. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_6uvloop_4loop_aio_logger, __pyx_n_s_error); if (unlikely(!__pyx_t_3)) __PYX_ERR(18, 884, __pyx_L1_error)
  85934. __Pyx_GOTREF(__pyx_t_3);
  85935. /* "uvloop/handles/stream.pyx":886
  85936. * aio_logger.error(
  85937. * 'UVStream.write callback called with NULL req.data, status=%r',
  85938. * status) # <<<<<<<<<<<<<<
  85939. * return
  85940. *
  85941. */
  85942. __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_4)) __PYX_ERR(18, 886, __pyx_L1_error)
  85943. __Pyx_GOTREF(__pyx_t_4);
  85944. __pyx_t_5 = NULL;
  85945. __pyx_t_6 = 0;
  85946. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
  85947. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
  85948. if (likely(__pyx_t_5)) {
  85949. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  85950. __Pyx_INCREF(__pyx_t_5);
  85951. __Pyx_INCREF(function);
  85952. __Pyx_DECREF_SET(__pyx_t_3, function);
  85953. __pyx_t_6 = 1;
  85954. }
  85955. }
  85956. #if CYTHON_FAST_PYCALL
  85957. if (PyFunction_Check(__pyx_t_3)) {
  85958. PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_kp_u_UVStream_write_callback_called_w, __pyx_t_4};
  85959. __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 884, __pyx_L1_error)
  85960. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  85961. __Pyx_GOTREF(__pyx_t_2);
  85962. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  85963. } else
  85964. #endif
  85965. #if CYTHON_FAST_PYCCALL
  85966. if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
  85967. PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_kp_u_UVStream_write_callback_called_w, __pyx_t_4};
  85968. __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 884, __pyx_L1_error)
  85969. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  85970. __Pyx_GOTREF(__pyx_t_2);
  85971. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  85972. } else
  85973. #endif
  85974. {
  85975. __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(18, 884, __pyx_L1_error)
  85976. __Pyx_GOTREF(__pyx_t_7);
  85977. if (__pyx_t_5) {
  85978. __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
  85979. }
  85980. __Pyx_INCREF(__pyx_kp_u_UVStream_write_callback_called_w);
  85981. __Pyx_GIVEREF(__pyx_kp_u_UVStream_write_callback_called_w);
  85982. PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_kp_u_UVStream_write_callback_called_w);
  85983. __Pyx_GIVEREF(__pyx_t_4);
  85984. PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_4);
  85985. __pyx_t_4 = 0;
  85986. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 884, __pyx_L1_error)
  85987. __Pyx_GOTREF(__pyx_t_2);
  85988. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  85989. }
  85990. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  85991. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  85992. /* "uvloop/handles/stream.pyx":887
  85993. * 'UVStream.write callback called with NULL req.data, status=%r',
  85994. * status)
  85995. * return # <<<<<<<<<<<<<<
  85996. *
  85997. * # Don't need try-finally, __uv_stream_on_write_impl is void
  85998. */
  85999. goto __pyx_L0;
  86000. /* "uvloop/handles/stream.pyx":883
  86001. *
  86002. * if UVLOOP_DEBUG:
  86003. * if req.data is NULL: # <<<<<<<<<<<<<<
  86004. * aio_logger.error(
  86005. * 'UVStream.write callback called with NULL req.data, status=%r',
  86006. */
  86007. }
  86008. /* "uvloop/handles/stream.pyx":882
  86009. * cdef void __uv_stream_on_write(uv.uv_write_t* req, int status) with gil:
  86010. *
  86011. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  86012. * if req.data is NULL:
  86013. * aio_logger.error(
  86014. */
  86015. }
  86016. /* "uvloop/handles/stream.pyx":890
  86017. *
  86018. * # Don't need try-finally, __uv_stream_on_write_impl is void
  86019. * __uv_stream_on_write_impl(req, status) # <<<<<<<<<<<<<<
  86020. *
  86021. *
  86022. */
  86023. __pyx_f_6uvloop_4loop___uv_stream_on_write_impl(__pyx_v_req, __pyx_v_status);
  86024. /* "uvloop/handles/stream.pyx":880
  86025. *
  86026. *
  86027. * cdef void __uv_stream_on_write(uv.uv_write_t* req, int status) with gil: # <<<<<<<<<<<<<<
  86028. *
  86029. * if UVLOOP_DEBUG:
  86030. */
  86031. /* function exit code */
  86032. goto __pyx_L0;
  86033. __pyx_L1_error:;
  86034. __Pyx_XDECREF(__pyx_t_2);
  86035. __Pyx_XDECREF(__pyx_t_3);
  86036. __Pyx_XDECREF(__pyx_t_4);
  86037. __Pyx_XDECREF(__pyx_t_5);
  86038. __Pyx_XDECREF(__pyx_t_7);
  86039. __Pyx_WriteUnraisable("uvloop.loop.__uv_stream_on_write", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  86040. __pyx_L0:;
  86041. __Pyx_RefNannyFinishContext();
  86042. #ifdef WITH_THREAD
  86043. __Pyx_PyGILState_Release(__pyx_gilstate_save);
  86044. #endif
  86045. }
  86046. /* "uvloop/handles/stream.pyx":893
  86047. *
  86048. *
  86049. * cdef void __uv_stream_buffered_alloc(uv.uv_handle_t* stream, # <<<<<<<<<<<<<<
  86050. * size_t suggested_size,
  86051. * uv.uv_buf_t* uvbuf) with gil:
  86052. */
  86053. static void __pyx_f_6uvloop_4loop___uv_stream_buffered_alloc(uv_handle_t *__pyx_v_stream, size_t __pyx_v_suggested_size, uv_buf_t *__pyx_v_uvbuf) {
  86054. struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_sc = 0;
  86055. CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop = 0;
  86056. Py_buffer *__pyx_v_pybuf;
  86057. int __pyx_v_got_buf;
  86058. PyObject *__pyx_v_buf = NULL;
  86059. CYTHON_UNUSED PyObject *__pyx_v_exc = NULL;
  86060. __Pyx_RefNannyDeclarations
  86061. int __pyx_t_1;
  86062. PyObject *__pyx_t_2 = NULL;
  86063. PyObject *__pyx_t_3 = NULL;
  86064. PyObject *__pyx_t_4 = NULL;
  86065. PyObject *__pyx_t_5 = NULL;
  86066. PyObject *__pyx_t_6 = NULL;
  86067. PyObject *__pyx_t_7 = NULL;
  86068. PyObject *__pyx_t_8 = NULL;
  86069. int __pyx_t_9;
  86070. Py_ssize_t __pyx_t_10;
  86071. #ifdef WITH_THREAD
  86072. PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  86073. #endif
  86074. __Pyx_RefNannySetupContext("__uv_stream_buffered_alloc", 0);
  86075. /* "uvloop/handles/stream.pyx":898
  86076. *
  86077. * if __ensure_handle_data(<uv.uv_handle_t*>stream,
  86078. * "UVStream alloc buffer callback") == 0: # <<<<<<<<<<<<<<
  86079. * return
  86080. *
  86081. */
  86082. __pyx_t_1 = ((__pyx_f_6uvloop_4loop___ensure_handle_data(((uv_handle_t *)__pyx_v_stream), ((char const *)"UVStream alloc buffer callback")) == 0) != 0);
  86083. /* "uvloop/handles/stream.pyx":897
  86084. * uv.uv_buf_t* uvbuf) with gil:
  86085. *
  86086. * if __ensure_handle_data(<uv.uv_handle_t*>stream, # <<<<<<<<<<<<<<
  86087. * "UVStream alloc buffer callback") == 0:
  86088. * return
  86089. */
  86090. if (__pyx_t_1) {
  86091. /* "uvloop/handles/stream.pyx":899
  86092. * if __ensure_handle_data(<uv.uv_handle_t*>stream,
  86093. * "UVStream alloc buffer callback") == 0:
  86094. * return # <<<<<<<<<<<<<<
  86095. *
  86096. * cdef:
  86097. */
  86098. goto __pyx_L0;
  86099. /* "uvloop/handles/stream.pyx":897
  86100. * uv.uv_buf_t* uvbuf) with gil:
  86101. *
  86102. * if __ensure_handle_data(<uv.uv_handle_t*>stream, # <<<<<<<<<<<<<<
  86103. * "UVStream alloc buffer callback") == 0:
  86104. * return
  86105. */
  86106. }
  86107. /* "uvloop/handles/stream.pyx":902
  86108. *
  86109. * cdef:
  86110. * UVStream sc = <UVStream>stream.data # <<<<<<<<<<<<<<
  86111. * Loop loop = sc._loop
  86112. * Py_buffer* pybuf = &sc._read_pybuf
  86113. */
  86114. __pyx_t_2 = ((PyObject *)__pyx_v_stream->data);
  86115. __Pyx_INCREF(__pyx_t_2);
  86116. __pyx_v_sc = ((struct __pyx_obj_6uvloop_4loop_UVStream *)__pyx_t_2);
  86117. __pyx_t_2 = 0;
  86118. /* "uvloop/handles/stream.pyx":903
  86119. * cdef:
  86120. * UVStream sc = <UVStream>stream.data
  86121. * Loop loop = sc._loop # <<<<<<<<<<<<<<
  86122. * Py_buffer* pybuf = &sc._read_pybuf
  86123. * int got_buf = 0
  86124. */
  86125. __pyx_t_2 = ((PyObject *)__pyx_v_sc->__pyx_base.__pyx_base.__pyx_base._loop);
  86126. __Pyx_INCREF(__pyx_t_2);
  86127. __pyx_v_loop = ((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_t_2);
  86128. __pyx_t_2 = 0;
  86129. /* "uvloop/handles/stream.pyx":904
  86130. * UVStream sc = <UVStream>stream.data
  86131. * Loop loop = sc._loop
  86132. * Py_buffer* pybuf = &sc._read_pybuf # <<<<<<<<<<<<<<
  86133. * int got_buf = 0
  86134. *
  86135. */
  86136. __pyx_v_pybuf = (&__pyx_v_sc->_read_pybuf);
  86137. /* "uvloop/handles/stream.pyx":905
  86138. * Loop loop = sc._loop
  86139. * Py_buffer* pybuf = &sc._read_pybuf
  86140. * int got_buf = 0 # <<<<<<<<<<<<<<
  86141. *
  86142. * if sc._read_pybuf_acquired:
  86143. */
  86144. __pyx_v_got_buf = 0;
  86145. /* "uvloop/handles/stream.pyx":907
  86146. * int got_buf = 0
  86147. *
  86148. * if sc._read_pybuf_acquired: # <<<<<<<<<<<<<<
  86149. * uvbuf.len = 0
  86150. * uvbuf.base = NULL
  86151. */
  86152. __pyx_t_1 = (__pyx_v_sc->_read_pybuf_acquired != 0);
  86153. if (__pyx_t_1) {
  86154. /* "uvloop/handles/stream.pyx":908
  86155. *
  86156. * if sc._read_pybuf_acquired:
  86157. * uvbuf.len = 0 # <<<<<<<<<<<<<<
  86158. * uvbuf.base = NULL
  86159. * return
  86160. */
  86161. __pyx_v_uvbuf->len = 0;
  86162. /* "uvloop/handles/stream.pyx":909
  86163. * if sc._read_pybuf_acquired:
  86164. * uvbuf.len = 0
  86165. * uvbuf.base = NULL # <<<<<<<<<<<<<<
  86166. * return
  86167. *
  86168. */
  86169. __pyx_v_uvbuf->base = NULL;
  86170. /* "uvloop/handles/stream.pyx":910
  86171. * uvbuf.len = 0
  86172. * uvbuf.base = NULL
  86173. * return # <<<<<<<<<<<<<<
  86174. *
  86175. * sc._read_pybuf_acquired = 0
  86176. */
  86177. goto __pyx_L0;
  86178. /* "uvloop/handles/stream.pyx":907
  86179. * int got_buf = 0
  86180. *
  86181. * if sc._read_pybuf_acquired: # <<<<<<<<<<<<<<
  86182. * uvbuf.len = 0
  86183. * uvbuf.base = NULL
  86184. */
  86185. }
  86186. /* "uvloop/handles/stream.pyx":912
  86187. * return
  86188. *
  86189. * sc._read_pybuf_acquired = 0 # <<<<<<<<<<<<<<
  86190. * try:
  86191. * buf = sc._protocol_get_buffer(suggested_size)
  86192. */
  86193. __pyx_v_sc->_read_pybuf_acquired = 0;
  86194. /* "uvloop/handles/stream.pyx":913
  86195. *
  86196. * sc._read_pybuf_acquired = 0
  86197. * try: # <<<<<<<<<<<<<<
  86198. * buf = sc._protocol_get_buffer(suggested_size)
  86199. * PyObject_GetBuffer(buf, pybuf, PyBUF_WRITABLE)
  86200. */
  86201. {
  86202. __Pyx_PyThreadState_declare
  86203. __Pyx_PyThreadState_assign
  86204. __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
  86205. __Pyx_XGOTREF(__pyx_t_3);
  86206. __Pyx_XGOTREF(__pyx_t_4);
  86207. __Pyx_XGOTREF(__pyx_t_5);
  86208. /*try:*/ {
  86209. /* "uvloop/handles/stream.pyx":914
  86210. * sc._read_pybuf_acquired = 0
  86211. * try:
  86212. * buf = sc._protocol_get_buffer(suggested_size) # <<<<<<<<<<<<<<
  86213. * PyObject_GetBuffer(buf, pybuf, PyBUF_WRITABLE)
  86214. * got_buf = 1
  86215. */
  86216. __pyx_t_6 = __Pyx_PyInt_FromSize_t(__pyx_v_suggested_size); if (unlikely(!__pyx_t_6)) __PYX_ERR(18, 914, __pyx_L5_error)
  86217. __Pyx_GOTREF(__pyx_t_6);
  86218. __Pyx_INCREF(__pyx_v_sc->_protocol_get_buffer);
  86219. __pyx_t_7 = __pyx_v_sc->_protocol_get_buffer; __pyx_t_8 = NULL;
  86220. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
  86221. __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
  86222. if (likely(__pyx_t_8)) {
  86223. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
  86224. __Pyx_INCREF(__pyx_t_8);
  86225. __Pyx_INCREF(function);
  86226. __Pyx_DECREF_SET(__pyx_t_7, function);
  86227. }
  86228. }
  86229. __pyx_t_2 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
  86230. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  86231. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  86232. if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 914, __pyx_L5_error)
  86233. __Pyx_GOTREF(__pyx_t_2);
  86234. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  86235. __pyx_v_buf = __pyx_t_2;
  86236. __pyx_t_2 = 0;
  86237. /* "uvloop/handles/stream.pyx":915
  86238. * try:
  86239. * buf = sc._protocol_get_buffer(suggested_size)
  86240. * PyObject_GetBuffer(buf, pybuf, PyBUF_WRITABLE) # <<<<<<<<<<<<<<
  86241. * got_buf = 1
  86242. * except BaseException as exc:
  86243. */
  86244. __pyx_t_9 = PyObject_GetBuffer(__pyx_v_buf, __pyx_v_pybuf, PyBUF_WRITABLE); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(18, 915, __pyx_L5_error)
  86245. /* "uvloop/handles/stream.pyx":916
  86246. * buf = sc._protocol_get_buffer(suggested_size)
  86247. * PyObject_GetBuffer(buf, pybuf, PyBUF_WRITABLE)
  86248. * got_buf = 1 # <<<<<<<<<<<<<<
  86249. * except BaseException as exc:
  86250. * # Can't call 'sc._fatal_error' or 'sc._close', libuv will SF.
  86251. */
  86252. __pyx_v_got_buf = 1;
  86253. /* "uvloop/handles/stream.pyx":913
  86254. *
  86255. * sc._read_pybuf_acquired = 0
  86256. * try: # <<<<<<<<<<<<<<
  86257. * buf = sc._protocol_get_buffer(suggested_size)
  86258. * PyObject_GetBuffer(buf, pybuf, PyBUF_WRITABLE)
  86259. */
  86260. }
  86261. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  86262. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  86263. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  86264. goto __pyx_L10_try_end;
  86265. __pyx_L5_error:;
  86266. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  86267. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  86268. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  86269. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  86270. /* "uvloop/handles/stream.pyx":917
  86271. * PyObject_GetBuffer(buf, pybuf, PyBUF_WRITABLE)
  86272. * got_buf = 1
  86273. * except BaseException as exc: # <<<<<<<<<<<<<<
  86274. * # Can't call 'sc._fatal_error' or 'sc._close', libuv will SF.
  86275. * # We'll do it later in __uv_stream_buffered_on_read when we
  86276. */
  86277. __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_BaseException);
  86278. if (__pyx_t_9) {
  86279. __Pyx_AddTraceback("uvloop.loop.__uv_stream_buffered_alloc", __pyx_clineno, __pyx_lineno, __pyx_filename);
  86280. if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_7, &__pyx_t_6) < 0) __PYX_ERR(18, 917, __pyx_L7_except_error)
  86281. __Pyx_GOTREF(__pyx_t_2);
  86282. __Pyx_GOTREF(__pyx_t_7);
  86283. __Pyx_GOTREF(__pyx_t_6);
  86284. __Pyx_INCREF(__pyx_t_7);
  86285. __pyx_v_exc = __pyx_t_7;
  86286. /*try:*/ {
  86287. /* "uvloop/handles/stream.pyx":921
  86288. * # We'll do it later in __uv_stream_buffered_on_read when we
  86289. * # receive UV_ENOBUFS.
  86290. * uvbuf.len = 0 # <<<<<<<<<<<<<<
  86291. * uvbuf.base = NULL
  86292. * return
  86293. */
  86294. __pyx_v_uvbuf->len = 0;
  86295. /* "uvloop/handles/stream.pyx":922
  86296. * # receive UV_ENOBUFS.
  86297. * uvbuf.len = 0
  86298. * uvbuf.base = NULL # <<<<<<<<<<<<<<
  86299. * return
  86300. *
  86301. */
  86302. __pyx_v_uvbuf->base = NULL;
  86303. /* "uvloop/handles/stream.pyx":923
  86304. * uvbuf.len = 0
  86305. * uvbuf.base = NULL
  86306. * return # <<<<<<<<<<<<<<
  86307. *
  86308. * if not pybuf.len:
  86309. */
  86310. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  86311. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  86312. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  86313. goto __pyx_L15_return;
  86314. }
  86315. /* "uvloop/handles/stream.pyx":917
  86316. * PyObject_GetBuffer(buf, pybuf, PyBUF_WRITABLE)
  86317. * got_buf = 1
  86318. * except BaseException as exc: # <<<<<<<<<<<<<<
  86319. * # Can't call 'sc._fatal_error' or 'sc._close', libuv will SF.
  86320. * # We'll do it later in __uv_stream_buffered_on_read when we
  86321. */
  86322. /*finally:*/ {
  86323. __pyx_L15_return: {
  86324. __Pyx_DECREF(__pyx_v_exc);
  86325. __pyx_v_exc = NULL;
  86326. goto __pyx_L8_except_return;
  86327. }
  86328. }
  86329. }
  86330. goto __pyx_L7_except_error;
  86331. __pyx_L7_except_error:;
  86332. /* "uvloop/handles/stream.pyx":913
  86333. *
  86334. * sc._read_pybuf_acquired = 0
  86335. * try: # <<<<<<<<<<<<<<
  86336. * buf = sc._protocol_get_buffer(suggested_size)
  86337. * PyObject_GetBuffer(buf, pybuf, PyBUF_WRITABLE)
  86338. */
  86339. __Pyx_XGIVEREF(__pyx_t_3);
  86340. __Pyx_XGIVEREF(__pyx_t_4);
  86341. __Pyx_XGIVEREF(__pyx_t_5);
  86342. __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
  86343. goto __pyx_L1_error;
  86344. __pyx_L8_except_return:;
  86345. __Pyx_XGIVEREF(__pyx_t_3);
  86346. __Pyx_XGIVEREF(__pyx_t_4);
  86347. __Pyx_XGIVEREF(__pyx_t_5);
  86348. __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
  86349. goto __pyx_L0;
  86350. __pyx_L10_try_end:;
  86351. }
  86352. /* "uvloop/handles/stream.pyx":925
  86353. * return
  86354. *
  86355. * if not pybuf.len: # <<<<<<<<<<<<<<
  86356. * uvbuf.len = 0
  86357. * uvbuf.base = NULL
  86358. */
  86359. __pyx_t_1 = ((!(__pyx_v_pybuf->len != 0)) != 0);
  86360. if (__pyx_t_1) {
  86361. /* "uvloop/handles/stream.pyx":926
  86362. *
  86363. * if not pybuf.len:
  86364. * uvbuf.len = 0 # <<<<<<<<<<<<<<
  86365. * uvbuf.base = NULL
  86366. * if got_buf:
  86367. */
  86368. __pyx_v_uvbuf->len = 0;
  86369. /* "uvloop/handles/stream.pyx":927
  86370. * if not pybuf.len:
  86371. * uvbuf.len = 0
  86372. * uvbuf.base = NULL # <<<<<<<<<<<<<<
  86373. * if got_buf:
  86374. * PyBuffer_Release(pybuf)
  86375. */
  86376. __pyx_v_uvbuf->base = NULL;
  86377. /* "uvloop/handles/stream.pyx":928
  86378. * uvbuf.len = 0
  86379. * uvbuf.base = NULL
  86380. * if got_buf: # <<<<<<<<<<<<<<
  86381. * PyBuffer_Release(pybuf)
  86382. * return
  86383. */
  86384. __pyx_t_1 = (__pyx_v_got_buf != 0);
  86385. if (__pyx_t_1) {
  86386. /* "uvloop/handles/stream.pyx":929
  86387. * uvbuf.base = NULL
  86388. * if got_buf:
  86389. * PyBuffer_Release(pybuf) # <<<<<<<<<<<<<<
  86390. * return
  86391. *
  86392. */
  86393. PyBuffer_Release(__pyx_v_pybuf);
  86394. /* "uvloop/handles/stream.pyx":928
  86395. * uvbuf.len = 0
  86396. * uvbuf.base = NULL
  86397. * if got_buf: # <<<<<<<<<<<<<<
  86398. * PyBuffer_Release(pybuf)
  86399. * return
  86400. */
  86401. }
  86402. /* "uvloop/handles/stream.pyx":930
  86403. * if got_buf:
  86404. * PyBuffer_Release(pybuf)
  86405. * return # <<<<<<<<<<<<<<
  86406. *
  86407. * sc._read_pybuf_acquired = 1
  86408. */
  86409. goto __pyx_L0;
  86410. /* "uvloop/handles/stream.pyx":925
  86411. * return
  86412. *
  86413. * if not pybuf.len: # <<<<<<<<<<<<<<
  86414. * uvbuf.len = 0
  86415. * uvbuf.base = NULL
  86416. */
  86417. }
  86418. /* "uvloop/handles/stream.pyx":932
  86419. * return
  86420. *
  86421. * sc._read_pybuf_acquired = 1 # <<<<<<<<<<<<<<
  86422. * uvbuf.base = <char*>pybuf.buf
  86423. * uvbuf.len = pybuf.len
  86424. */
  86425. __pyx_v_sc->_read_pybuf_acquired = 1;
  86426. /* "uvloop/handles/stream.pyx":933
  86427. *
  86428. * sc._read_pybuf_acquired = 1
  86429. * uvbuf.base = <char*>pybuf.buf # <<<<<<<<<<<<<<
  86430. * uvbuf.len = pybuf.len
  86431. *
  86432. */
  86433. __pyx_v_uvbuf->base = ((char *)__pyx_v_pybuf->buf);
  86434. /* "uvloop/handles/stream.pyx":934
  86435. * sc._read_pybuf_acquired = 1
  86436. * uvbuf.base = <char*>pybuf.buf
  86437. * uvbuf.len = pybuf.len # <<<<<<<<<<<<<<
  86438. *
  86439. *
  86440. */
  86441. __pyx_t_10 = __pyx_v_pybuf->len;
  86442. __pyx_v_uvbuf->len = __pyx_t_10;
  86443. /* "uvloop/handles/stream.pyx":893
  86444. *
  86445. *
  86446. * cdef void __uv_stream_buffered_alloc(uv.uv_handle_t* stream, # <<<<<<<<<<<<<<
  86447. * size_t suggested_size,
  86448. * uv.uv_buf_t* uvbuf) with gil:
  86449. */
  86450. /* function exit code */
  86451. goto __pyx_L0;
  86452. __pyx_L1_error:;
  86453. __Pyx_XDECREF(__pyx_t_2);
  86454. __Pyx_XDECREF(__pyx_t_6);
  86455. __Pyx_XDECREF(__pyx_t_7);
  86456. __Pyx_XDECREF(__pyx_t_8);
  86457. __Pyx_WriteUnraisable("uvloop.loop.__uv_stream_buffered_alloc", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  86458. __pyx_L0:;
  86459. __Pyx_XDECREF((PyObject *)__pyx_v_sc);
  86460. __Pyx_XDECREF((PyObject *)__pyx_v_loop);
  86461. __Pyx_XDECREF(__pyx_v_buf);
  86462. __Pyx_XDECREF(__pyx_v_exc);
  86463. __Pyx_RefNannyFinishContext();
  86464. #ifdef WITH_THREAD
  86465. __Pyx_PyGILState_Release(__pyx_gilstate_save);
  86466. #endif
  86467. }
  86468. /* "uvloop/handles/stream.pyx":937
  86469. *
  86470. *
  86471. * cdef void __uv_stream_buffered_on_read(uv.uv_stream_t* stream, # <<<<<<<<<<<<<<
  86472. * ssize_t nread,
  86473. * const uv.uv_buf_t* buf) with gil:
  86474. */
  86475. static void __pyx_f_6uvloop_4loop___uv_stream_buffered_on_read(uv_stream_t *__pyx_v_stream, Py_ssize_t __pyx_v_nread, CYTHON_UNUSED uv_buf_t const *__pyx_v_buf) {
  86476. struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_sc = 0;
  86477. struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop = 0;
  86478. Py_buffer *__pyx_v_pybuf;
  86479. PyObject *__pyx_v_exc = NULL;
  86480. __Pyx_RefNannyDeclarations
  86481. int __pyx_t_1;
  86482. PyObject *__pyx_t_2 = NULL;
  86483. PyObject *__pyx_t_3 = NULL;
  86484. PyObject *__pyx_t_4 = NULL;
  86485. PyObject *__pyx_t_5 = NULL;
  86486. PyObject *__pyx_t_6 = NULL;
  86487. int __pyx_t_7;
  86488. PyObject *__pyx_t_8 = NULL;
  86489. PyObject *__pyx_t_9 = NULL;
  86490. int __pyx_t_10;
  86491. int __pyx_t_11;
  86492. char const *__pyx_t_12;
  86493. PyObject *__pyx_t_13 = NULL;
  86494. PyObject *__pyx_t_14 = NULL;
  86495. PyObject *__pyx_t_15 = NULL;
  86496. PyObject *__pyx_t_16 = NULL;
  86497. PyObject *__pyx_t_17 = NULL;
  86498. PyObject *__pyx_t_18 = NULL;
  86499. char const *__pyx_t_19;
  86500. #ifdef WITH_THREAD
  86501. PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  86502. #endif
  86503. __Pyx_RefNannySetupContext("__uv_stream_buffered_on_read", 0);
  86504. /* "uvloop/handles/stream.pyx":942
  86505. *
  86506. * if __ensure_handle_data(<uv.uv_handle_t*>stream,
  86507. * "UVStream buffered read callback") == 0: # <<<<<<<<<<<<<<
  86508. * return
  86509. *
  86510. */
  86511. __pyx_t_1 = ((__pyx_f_6uvloop_4loop___ensure_handle_data(((uv_handle_t *)__pyx_v_stream), ((char const *)"UVStream buffered read callback")) == 0) != 0);
  86512. /* "uvloop/handles/stream.pyx":941
  86513. * const uv.uv_buf_t* buf) with gil:
  86514. *
  86515. * if __ensure_handle_data(<uv.uv_handle_t*>stream, # <<<<<<<<<<<<<<
  86516. * "UVStream buffered read callback") == 0:
  86517. * return
  86518. */
  86519. if (__pyx_t_1) {
  86520. /* "uvloop/handles/stream.pyx":943
  86521. * if __ensure_handle_data(<uv.uv_handle_t*>stream,
  86522. * "UVStream buffered read callback") == 0:
  86523. * return # <<<<<<<<<<<<<<
  86524. *
  86525. * cdef:
  86526. */
  86527. goto __pyx_L0;
  86528. /* "uvloop/handles/stream.pyx":941
  86529. * const uv.uv_buf_t* buf) with gil:
  86530. *
  86531. * if __ensure_handle_data(<uv.uv_handle_t*>stream, # <<<<<<<<<<<<<<
  86532. * "UVStream buffered read callback") == 0:
  86533. * return
  86534. */
  86535. }
  86536. /* "uvloop/handles/stream.pyx":946
  86537. *
  86538. * cdef:
  86539. * UVStream sc = <UVStream>stream.data # <<<<<<<<<<<<<<
  86540. * Loop loop = sc._loop
  86541. * Py_buffer* pybuf = &sc._read_pybuf
  86542. */
  86543. __pyx_t_2 = ((PyObject *)__pyx_v_stream->data);
  86544. __Pyx_INCREF(__pyx_t_2);
  86545. __pyx_v_sc = ((struct __pyx_obj_6uvloop_4loop_UVStream *)__pyx_t_2);
  86546. __pyx_t_2 = 0;
  86547. /* "uvloop/handles/stream.pyx":947
  86548. * cdef:
  86549. * UVStream sc = <UVStream>stream.data
  86550. * Loop loop = sc._loop # <<<<<<<<<<<<<<
  86551. * Py_buffer* pybuf = &sc._read_pybuf
  86552. *
  86553. */
  86554. __pyx_t_2 = ((PyObject *)__pyx_v_sc->__pyx_base.__pyx_base.__pyx_base._loop);
  86555. __Pyx_INCREF(__pyx_t_2);
  86556. __pyx_v_loop = ((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_t_2);
  86557. __pyx_t_2 = 0;
  86558. /* "uvloop/handles/stream.pyx":948
  86559. * UVStream sc = <UVStream>stream.data
  86560. * Loop loop = sc._loop
  86561. * Py_buffer* pybuf = &sc._read_pybuf # <<<<<<<<<<<<<<
  86562. *
  86563. * if nread == uv.UV_ENOBUFS:
  86564. */
  86565. __pyx_v_pybuf = (&__pyx_v_sc->_read_pybuf);
  86566. /* "uvloop/handles/stream.pyx":950
  86567. * Py_buffer* pybuf = &sc._read_pybuf
  86568. *
  86569. * if nread == uv.UV_ENOBUFS: # <<<<<<<<<<<<<<
  86570. * sc._fatal_error(
  86571. * RuntimeError(
  86572. */
  86573. __pyx_t_1 = ((__pyx_v_nread == UV_ENOBUFS) != 0);
  86574. if (__pyx_t_1) {
  86575. /* "uvloop/handles/stream.pyx":952
  86576. * if nread == uv.UV_ENOBUFS:
  86577. * sc._fatal_error(
  86578. * RuntimeError( # <<<<<<<<<<<<<<
  86579. * 'unhandled error (or an empty buffer) in get_buffer()'),
  86580. * False)
  86581. */
  86582. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__141, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 952, __pyx_L1_error)
  86583. __Pyx_GOTREF(__pyx_t_2);
  86584. /* "uvloop/handles/stream.pyx":951
  86585. *
  86586. * if nread == uv.UV_ENOBUFS:
  86587. * sc._fatal_error( # <<<<<<<<<<<<<<
  86588. * RuntimeError(
  86589. * 'unhandled error (or an empty buffer) in get_buffer()'),
  86590. */
  86591. __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_sc->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._fatal_error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_sc), __pyx_t_2, Py_False, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(18, 951, __pyx_L1_error)
  86592. __Pyx_GOTREF(__pyx_t_3);
  86593. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  86594. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  86595. /* "uvloop/handles/stream.pyx":955
  86596. * 'unhandled error (or an empty buffer) in get_buffer()'),
  86597. * False)
  86598. * return # <<<<<<<<<<<<<<
  86599. *
  86600. * try:
  86601. */
  86602. goto __pyx_L0;
  86603. /* "uvloop/handles/stream.pyx":950
  86604. * Py_buffer* pybuf = &sc._read_pybuf
  86605. *
  86606. * if nread == uv.UV_ENOBUFS: # <<<<<<<<<<<<<<
  86607. * sc._fatal_error(
  86608. * RuntimeError(
  86609. */
  86610. }
  86611. /* "uvloop/handles/stream.pyx":957
  86612. * return
  86613. *
  86614. * try: # <<<<<<<<<<<<<<
  86615. * if nread > 0 and not sc._read_pybuf_acquired:
  86616. * # From libuv docs:
  86617. */
  86618. /*try:*/ {
  86619. {
  86620. __Pyx_PyThreadState_declare
  86621. __Pyx_PyThreadState_assign
  86622. __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
  86623. __Pyx_XGOTREF(__pyx_t_4);
  86624. __Pyx_XGOTREF(__pyx_t_5);
  86625. __Pyx_XGOTREF(__pyx_t_6);
  86626. /*try:*/ {
  86627. /* "uvloop/handles/stream.pyx":958
  86628. *
  86629. * try:
  86630. * if nread > 0 and not sc._read_pybuf_acquired: # <<<<<<<<<<<<<<
  86631. * # From libuv docs:
  86632. * # nread is > 0 if there is data available or < 0 on error. When
  86633. */
  86634. __pyx_t_7 = ((__pyx_v_nread > 0) != 0);
  86635. if (__pyx_t_7) {
  86636. } else {
  86637. __pyx_t_1 = __pyx_t_7;
  86638. goto __pyx_L15_bool_binop_done;
  86639. }
  86640. __pyx_t_7 = ((!(__pyx_v_sc->_read_pybuf_acquired != 0)) != 0);
  86641. __pyx_t_1 = __pyx_t_7;
  86642. __pyx_L15_bool_binop_done:;
  86643. if (unlikely(__pyx_t_1)) {
  86644. /* "uvloop/handles/stream.pyx":965
  86645. * # buffer; in that case buf.len and buf.base are both set to 0.
  86646. * raise RuntimeError(
  86647. * f'no python buffer is allocated in on_read; nread={nread}') # <<<<<<<<<<<<<<
  86648. *
  86649. * if nread == 0:
  86650. */
  86651. __pyx_t_3 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_nread, 0, ' ', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(18, 965, __pyx_L8_error)
  86652. __Pyx_GOTREF(__pyx_t_3);
  86653. __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_no_python_buffer_is_allocated_in, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 965, __pyx_L8_error)
  86654. __Pyx_GOTREF(__pyx_t_2);
  86655. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  86656. /* "uvloop/handles/stream.pyx":964
  86657. * # nread < 0, the buf parameter might not point to a valid
  86658. * # buffer; in that case buf.len and buf.base are both set to 0.
  86659. * raise RuntimeError( # <<<<<<<<<<<<<<
  86660. * f'no python buffer is allocated in on_read; nread={nread}')
  86661. *
  86662. */
  86663. __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(18, 964, __pyx_L8_error)
  86664. __Pyx_GOTREF(__pyx_t_3);
  86665. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  86666. __Pyx_Raise(__pyx_t_3, 0, 0, 0);
  86667. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  86668. __PYX_ERR(18, 964, __pyx_L8_error)
  86669. /* "uvloop/handles/stream.pyx":958
  86670. *
  86671. * try:
  86672. * if nread > 0 and not sc._read_pybuf_acquired: # <<<<<<<<<<<<<<
  86673. * # From libuv docs:
  86674. * # nread is > 0 if there is data available or < 0 on error. When
  86675. */
  86676. }
  86677. /* "uvloop/handles/stream.pyx":967
  86678. * f'no python buffer is allocated in on_read; nread={nread}')
  86679. *
  86680. * if nread == 0: # <<<<<<<<<<<<<<
  86681. * # From libuv docs:
  86682. * # nread might be 0, which does not indicate an error or EOF.
  86683. */
  86684. __pyx_t_1 = ((__pyx_v_nread == 0) != 0);
  86685. if (__pyx_t_1) {
  86686. /* "uvloop/handles/stream.pyx":971
  86687. * # nread might be 0, which does not indicate an error or EOF.
  86688. * # This is equivalent to EAGAIN or EWOULDBLOCK under read(2).
  86689. * return # <<<<<<<<<<<<<<
  86690. *
  86691. * if __uv_stream_on_read_common(sc, loop, nread):
  86692. */
  86693. goto __pyx_L12_try_return;
  86694. /* "uvloop/handles/stream.pyx":967
  86695. * f'no python buffer is allocated in on_read; nread={nread}')
  86696. *
  86697. * if nread == 0: # <<<<<<<<<<<<<<
  86698. * # From libuv docs:
  86699. * # nread might be 0, which does not indicate an error or EOF.
  86700. */
  86701. }
  86702. /* "uvloop/handles/stream.pyx":973
  86703. * return
  86704. *
  86705. * if __uv_stream_on_read_common(sc, loop, nread): # <<<<<<<<<<<<<<
  86706. * return
  86707. *
  86708. */
  86709. __pyx_t_1 = (__pyx_f_6uvloop_4loop___uv_stream_on_read_common(__pyx_v_sc, __pyx_v_loop, __pyx_v_nread) != 0);
  86710. if (__pyx_t_1) {
  86711. /* "uvloop/handles/stream.pyx":974
  86712. *
  86713. * if __uv_stream_on_read_common(sc, loop, nread):
  86714. * return # <<<<<<<<<<<<<<
  86715. *
  86716. * if UVLOOP_DEBUG:
  86717. */
  86718. goto __pyx_L12_try_return;
  86719. /* "uvloop/handles/stream.pyx":973
  86720. * return
  86721. *
  86722. * if __uv_stream_on_read_common(sc, loop, nread): # <<<<<<<<<<<<<<
  86723. * return
  86724. *
  86725. */
  86726. }
  86727. /* "uvloop/handles/stream.pyx":976
  86728. * return
  86729. *
  86730. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  86731. * loop._debug_stream_read_cb_total += 1
  86732. *
  86733. */
  86734. __pyx_t_1 = (UVLOOP_DEBUG != 0);
  86735. if (__pyx_t_1) {
  86736. /* "uvloop/handles/stream.pyx":977
  86737. *
  86738. * if UVLOOP_DEBUG:
  86739. * loop._debug_stream_read_cb_total += 1 # <<<<<<<<<<<<<<
  86740. *
  86741. * sc._protocol_buffer_updated(nread)
  86742. */
  86743. __pyx_v_loop->_debug_stream_read_cb_total = (__pyx_v_loop->_debug_stream_read_cb_total + 1);
  86744. /* "uvloop/handles/stream.pyx":976
  86745. * return
  86746. *
  86747. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  86748. * loop._debug_stream_read_cb_total += 1
  86749. *
  86750. */
  86751. }
  86752. /* "uvloop/handles/stream.pyx":979
  86753. * loop._debug_stream_read_cb_total += 1
  86754. *
  86755. * sc._protocol_buffer_updated(nread) # <<<<<<<<<<<<<<
  86756. * except BaseException as exc:
  86757. * if UVLOOP_DEBUG:
  86758. */
  86759. __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_nread); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 979, __pyx_L8_error)
  86760. __Pyx_GOTREF(__pyx_t_2);
  86761. __Pyx_INCREF(__pyx_v_sc->_protocol_buffer_updated);
  86762. __pyx_t_8 = __pyx_v_sc->_protocol_buffer_updated; __pyx_t_9 = NULL;
  86763. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
  86764. __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
  86765. if (likely(__pyx_t_9)) {
  86766. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
  86767. __Pyx_INCREF(__pyx_t_9);
  86768. __Pyx_INCREF(function);
  86769. __Pyx_DECREF_SET(__pyx_t_8, function);
  86770. }
  86771. }
  86772. __pyx_t_3 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_2);
  86773. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  86774. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  86775. if (unlikely(!__pyx_t_3)) __PYX_ERR(18, 979, __pyx_L8_error)
  86776. __Pyx_GOTREF(__pyx_t_3);
  86777. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  86778. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  86779. /* "uvloop/handles/stream.pyx":957
  86780. * return
  86781. *
  86782. * try: # <<<<<<<<<<<<<<
  86783. * if nread > 0 and not sc._read_pybuf_acquired:
  86784. * # From libuv docs:
  86785. */
  86786. }
  86787. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  86788. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  86789. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  86790. goto __pyx_L13_try_end;
  86791. __pyx_L8_error:;
  86792. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  86793. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  86794. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  86795. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  86796. /* "uvloop/handles/stream.pyx":980
  86797. *
  86798. * sc._protocol_buffer_updated(nread)
  86799. * except BaseException as exc: # <<<<<<<<<<<<<<
  86800. * if UVLOOP_DEBUG:
  86801. * loop._debug_stream_read_cb_errors_total += 1
  86802. */
  86803. __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_BaseException);
  86804. if (__pyx_t_10) {
  86805. __Pyx_AddTraceback("uvloop.loop.__uv_stream_buffered_on_read", __pyx_clineno, __pyx_lineno, __pyx_filename);
  86806. if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_8, &__pyx_t_2) < 0) __PYX_ERR(18, 980, __pyx_L10_except_error)
  86807. __Pyx_GOTREF(__pyx_t_3);
  86808. __Pyx_GOTREF(__pyx_t_8);
  86809. __Pyx_GOTREF(__pyx_t_2);
  86810. __Pyx_INCREF(__pyx_t_8);
  86811. __pyx_v_exc = __pyx_t_8;
  86812. /*try:*/ {
  86813. /* "uvloop/handles/stream.pyx":981
  86814. * sc._protocol_buffer_updated(nread)
  86815. * except BaseException as exc:
  86816. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  86817. * loop._debug_stream_read_cb_errors_total += 1
  86818. *
  86819. */
  86820. __pyx_t_1 = (UVLOOP_DEBUG != 0);
  86821. if (__pyx_t_1) {
  86822. /* "uvloop/handles/stream.pyx":982
  86823. * except BaseException as exc:
  86824. * if UVLOOP_DEBUG:
  86825. * loop._debug_stream_read_cb_errors_total += 1 # <<<<<<<<<<<<<<
  86826. *
  86827. * sc._fatal_error(exc, False)
  86828. */
  86829. __pyx_v_loop->_debug_stream_read_cb_errors_total = (__pyx_v_loop->_debug_stream_read_cb_errors_total + 1);
  86830. /* "uvloop/handles/stream.pyx":981
  86831. * sc._protocol_buffer_updated(nread)
  86832. * except BaseException as exc:
  86833. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  86834. * loop._debug_stream_read_cb_errors_total += 1
  86835. *
  86836. */
  86837. }
  86838. /* "uvloop/handles/stream.pyx":984
  86839. * loop._debug_stream_read_cb_errors_total += 1
  86840. *
  86841. * sc._fatal_error(exc, False) # <<<<<<<<<<<<<<
  86842. * finally:
  86843. * sc._read_pybuf_acquired = 0
  86844. */
  86845. __pyx_t_9 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_sc->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._fatal_error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_sc), __pyx_v_exc, Py_False, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(18, 984, __pyx_L25_error)
  86846. __Pyx_GOTREF(__pyx_t_9);
  86847. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  86848. }
  86849. /* "uvloop/handles/stream.pyx":980
  86850. *
  86851. * sc._protocol_buffer_updated(nread)
  86852. * except BaseException as exc: # <<<<<<<<<<<<<<
  86853. * if UVLOOP_DEBUG:
  86854. * loop._debug_stream_read_cb_errors_total += 1
  86855. */
  86856. /*finally:*/ {
  86857. /*normal exit:*/{
  86858. __Pyx_DECREF(__pyx_v_exc);
  86859. __pyx_v_exc = NULL;
  86860. goto __pyx_L26;
  86861. }
  86862. __pyx_L25_error:;
  86863. /*exception exit:*/{
  86864. __Pyx_PyThreadState_declare
  86865. __Pyx_PyThreadState_assign
  86866. __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0;
  86867. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  86868. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18);
  86869. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15) < 0)) __Pyx_ErrFetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
  86870. __Pyx_XGOTREF(__pyx_t_13);
  86871. __Pyx_XGOTREF(__pyx_t_14);
  86872. __Pyx_XGOTREF(__pyx_t_15);
  86873. __Pyx_XGOTREF(__pyx_t_16);
  86874. __Pyx_XGOTREF(__pyx_t_17);
  86875. __Pyx_XGOTREF(__pyx_t_18);
  86876. __pyx_t_10 = __pyx_lineno; __pyx_t_11 = __pyx_clineno; __pyx_t_12 = __pyx_filename;
  86877. {
  86878. __Pyx_DECREF(__pyx_v_exc);
  86879. __pyx_v_exc = NULL;
  86880. }
  86881. if (PY_MAJOR_VERSION >= 3) {
  86882. __Pyx_XGIVEREF(__pyx_t_16);
  86883. __Pyx_XGIVEREF(__pyx_t_17);
  86884. __Pyx_XGIVEREF(__pyx_t_18);
  86885. __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18);
  86886. }
  86887. __Pyx_XGIVEREF(__pyx_t_13);
  86888. __Pyx_XGIVEREF(__pyx_t_14);
  86889. __Pyx_XGIVEREF(__pyx_t_15);
  86890. __Pyx_ErrRestore(__pyx_t_13, __pyx_t_14, __pyx_t_15);
  86891. __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0;
  86892. __pyx_lineno = __pyx_t_10; __pyx_clineno = __pyx_t_11; __pyx_filename = __pyx_t_12;
  86893. goto __pyx_L10_except_error;
  86894. }
  86895. __pyx_L26:;
  86896. }
  86897. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  86898. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  86899. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  86900. goto __pyx_L9_exception_handled;
  86901. }
  86902. goto __pyx_L10_except_error;
  86903. __pyx_L10_except_error:;
  86904. /* "uvloop/handles/stream.pyx":957
  86905. * return
  86906. *
  86907. * try: # <<<<<<<<<<<<<<
  86908. * if nread > 0 and not sc._read_pybuf_acquired:
  86909. * # From libuv docs:
  86910. */
  86911. __Pyx_XGIVEREF(__pyx_t_4);
  86912. __Pyx_XGIVEREF(__pyx_t_5);
  86913. __Pyx_XGIVEREF(__pyx_t_6);
  86914. __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
  86915. goto __pyx_L6_error;
  86916. __pyx_L12_try_return:;
  86917. __Pyx_XGIVEREF(__pyx_t_4);
  86918. __Pyx_XGIVEREF(__pyx_t_5);
  86919. __Pyx_XGIVEREF(__pyx_t_6);
  86920. __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
  86921. goto __pyx_L5_return;
  86922. __pyx_L9_exception_handled:;
  86923. __Pyx_XGIVEREF(__pyx_t_4);
  86924. __Pyx_XGIVEREF(__pyx_t_5);
  86925. __Pyx_XGIVEREF(__pyx_t_6);
  86926. __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
  86927. __pyx_L13_try_end:;
  86928. }
  86929. }
  86930. /* "uvloop/handles/stream.pyx":986
  86931. * sc._fatal_error(exc, False)
  86932. * finally:
  86933. * sc._read_pybuf_acquired = 0 # <<<<<<<<<<<<<<
  86934. * PyBuffer_Release(pybuf)
  86935. */
  86936. /*finally:*/ {
  86937. /*normal exit:*/{
  86938. __pyx_v_sc->_read_pybuf_acquired = 0;
  86939. /* "uvloop/handles/stream.pyx":987
  86940. * finally:
  86941. * sc._read_pybuf_acquired = 0
  86942. * PyBuffer_Release(pybuf) # <<<<<<<<<<<<<<
  86943. */
  86944. PyBuffer_Release(__pyx_v_pybuf);
  86945. goto __pyx_L7;
  86946. }
  86947. __pyx_L6_error:;
  86948. /*exception exit:*/{
  86949. __Pyx_PyThreadState_declare
  86950. __Pyx_PyThreadState_assign
  86951. __pyx_t_6 = 0; __pyx_t_5 = 0; __pyx_t_4 = 0; __pyx_t_18 = 0; __pyx_t_17 = 0; __pyx_t_16 = 0;
  86952. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  86953. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  86954. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  86955. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  86956. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_18, &__pyx_t_17, &__pyx_t_16);
  86957. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4) < 0)) __Pyx_ErrFetch(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4);
  86958. __Pyx_XGOTREF(__pyx_t_6);
  86959. __Pyx_XGOTREF(__pyx_t_5);
  86960. __Pyx_XGOTREF(__pyx_t_4);
  86961. __Pyx_XGOTREF(__pyx_t_18);
  86962. __Pyx_XGOTREF(__pyx_t_17);
  86963. __Pyx_XGOTREF(__pyx_t_16);
  86964. __pyx_t_11 = __pyx_lineno; __pyx_t_10 = __pyx_clineno; __pyx_t_19 = __pyx_filename;
  86965. {
  86966. /* "uvloop/handles/stream.pyx":986
  86967. * sc._fatal_error(exc, False)
  86968. * finally:
  86969. * sc._read_pybuf_acquired = 0 # <<<<<<<<<<<<<<
  86970. * PyBuffer_Release(pybuf)
  86971. */
  86972. __pyx_v_sc->_read_pybuf_acquired = 0;
  86973. /* "uvloop/handles/stream.pyx":987
  86974. * finally:
  86975. * sc._read_pybuf_acquired = 0
  86976. * PyBuffer_Release(pybuf) # <<<<<<<<<<<<<<
  86977. */
  86978. PyBuffer_Release(__pyx_v_pybuf);
  86979. }
  86980. if (PY_MAJOR_VERSION >= 3) {
  86981. __Pyx_XGIVEREF(__pyx_t_18);
  86982. __Pyx_XGIVEREF(__pyx_t_17);
  86983. __Pyx_XGIVEREF(__pyx_t_16);
  86984. __Pyx_ExceptionReset(__pyx_t_18, __pyx_t_17, __pyx_t_16);
  86985. }
  86986. __Pyx_XGIVEREF(__pyx_t_6);
  86987. __Pyx_XGIVEREF(__pyx_t_5);
  86988. __Pyx_XGIVEREF(__pyx_t_4);
  86989. __Pyx_ErrRestore(__pyx_t_6, __pyx_t_5, __pyx_t_4);
  86990. __pyx_t_6 = 0; __pyx_t_5 = 0; __pyx_t_4 = 0; __pyx_t_18 = 0; __pyx_t_17 = 0; __pyx_t_16 = 0;
  86991. __pyx_lineno = __pyx_t_11; __pyx_clineno = __pyx_t_10; __pyx_filename = __pyx_t_19;
  86992. goto __pyx_L1_error;
  86993. }
  86994. __pyx_L5_return: {
  86995. /* "uvloop/handles/stream.pyx":986
  86996. * sc._fatal_error(exc, False)
  86997. * finally:
  86998. * sc._read_pybuf_acquired = 0 # <<<<<<<<<<<<<<
  86999. * PyBuffer_Release(pybuf)
  87000. */
  87001. __pyx_v_sc->_read_pybuf_acquired = 0;
  87002. /* "uvloop/handles/stream.pyx":987
  87003. * finally:
  87004. * sc._read_pybuf_acquired = 0
  87005. * PyBuffer_Release(pybuf) # <<<<<<<<<<<<<<
  87006. */
  87007. PyBuffer_Release(__pyx_v_pybuf);
  87008. goto __pyx_L0;
  87009. }
  87010. __pyx_L7:;
  87011. }
  87012. /* "uvloop/handles/stream.pyx":937
  87013. *
  87014. *
  87015. * cdef void __uv_stream_buffered_on_read(uv.uv_stream_t* stream, # <<<<<<<<<<<<<<
  87016. * ssize_t nread,
  87017. * const uv.uv_buf_t* buf) with gil:
  87018. */
  87019. /* function exit code */
  87020. goto __pyx_L0;
  87021. __pyx_L1_error:;
  87022. __Pyx_XDECREF(__pyx_t_2);
  87023. __Pyx_XDECREF(__pyx_t_3);
  87024. __Pyx_XDECREF(__pyx_t_8);
  87025. __Pyx_XDECREF(__pyx_t_9);
  87026. __Pyx_WriteUnraisable("uvloop.loop.__uv_stream_buffered_on_read", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  87027. __pyx_L0:;
  87028. __Pyx_XDECREF((PyObject *)__pyx_v_sc);
  87029. __Pyx_XDECREF((PyObject *)__pyx_v_loop);
  87030. __Pyx_XDECREF(__pyx_v_exc);
  87031. __Pyx_RefNannyFinishContext();
  87032. #ifdef WITH_THREAD
  87033. __Pyx_PyGILState_Release(__pyx_gilstate_save);
  87034. #endif
  87035. }
  87036. /* "uvloop/handles/streamserver.pyx":4
  87037. * cdef class UVStreamServer(UVSocketHandle):
  87038. *
  87039. * def __cinit__(self): # <<<<<<<<<<<<<<
  87040. * self.opened = 0
  87041. * self._server = None
  87042. */
  87043. /* Python wrapper */
  87044. static int __pyx_pw_6uvloop_4loop_14UVStreamServer_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  87045. static int __pyx_pw_6uvloop_4loop_14UVStreamServer_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  87046. int __pyx_r;
  87047. __Pyx_RefNannyDeclarations
  87048. __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  87049. if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
  87050. __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  87051. if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
  87052. __pyx_r = __pyx_pf_6uvloop_4loop_14UVStreamServer___cinit__(((struct __pyx_obj_6uvloop_4loop_UVStreamServer *)__pyx_v_self));
  87053. /* function exit code */
  87054. __Pyx_RefNannyFinishContext();
  87055. return __pyx_r;
  87056. }
  87057. static int __pyx_pf_6uvloop_4loop_14UVStreamServer___cinit__(struct __pyx_obj_6uvloop_4loop_UVStreamServer *__pyx_v_self) {
  87058. int __pyx_r;
  87059. __Pyx_RefNannyDeclarations
  87060. __Pyx_RefNannySetupContext("__cinit__", 0);
  87061. /* "uvloop/handles/streamserver.pyx":5
  87062. *
  87063. * def __cinit__(self):
  87064. * self.opened = 0 # <<<<<<<<<<<<<<
  87065. * self._server = None
  87066. * self.ssl = None
  87067. */
  87068. __pyx_v_self->opened = 0;
  87069. /* "uvloop/handles/streamserver.pyx":6
  87070. * def __cinit__(self):
  87071. * self.opened = 0
  87072. * self._server = None # <<<<<<<<<<<<<<
  87073. * self.ssl = None
  87074. * self.ssl_handshake_timeout = None
  87075. */
  87076. __Pyx_INCREF(Py_None);
  87077. __Pyx_GIVEREF(Py_None);
  87078. __Pyx_GOTREF(__pyx_v_self->_server);
  87079. __Pyx_DECREF(((PyObject *)__pyx_v_self->_server));
  87080. __pyx_v_self->_server = ((struct __pyx_obj_6uvloop_4loop_Server *)Py_None);
  87081. /* "uvloop/handles/streamserver.pyx":7
  87082. * self.opened = 0
  87083. * self._server = None
  87084. * self.ssl = None # <<<<<<<<<<<<<<
  87085. * self.ssl_handshake_timeout = None
  87086. * self.ssl_shutdown_timeout = None
  87087. */
  87088. __Pyx_INCREF(Py_None);
  87089. __Pyx_GIVEREF(Py_None);
  87090. __Pyx_GOTREF(__pyx_v_self->ssl);
  87091. __Pyx_DECREF(__pyx_v_self->ssl);
  87092. __pyx_v_self->ssl = Py_None;
  87093. /* "uvloop/handles/streamserver.pyx":8
  87094. * self._server = None
  87095. * self.ssl = None
  87096. * self.ssl_handshake_timeout = None # <<<<<<<<<<<<<<
  87097. * self.ssl_shutdown_timeout = None
  87098. * self.protocol_factory = None
  87099. */
  87100. __Pyx_INCREF(Py_None);
  87101. __Pyx_GIVEREF(Py_None);
  87102. __Pyx_GOTREF(__pyx_v_self->ssl_handshake_timeout);
  87103. __Pyx_DECREF(__pyx_v_self->ssl_handshake_timeout);
  87104. __pyx_v_self->ssl_handshake_timeout = Py_None;
  87105. /* "uvloop/handles/streamserver.pyx":9
  87106. * self.ssl = None
  87107. * self.ssl_handshake_timeout = None
  87108. * self.ssl_shutdown_timeout = None # <<<<<<<<<<<<<<
  87109. * self.protocol_factory = None
  87110. *
  87111. */
  87112. __Pyx_INCREF(Py_None);
  87113. __Pyx_GIVEREF(Py_None);
  87114. __Pyx_GOTREF(__pyx_v_self->ssl_shutdown_timeout);
  87115. __Pyx_DECREF(__pyx_v_self->ssl_shutdown_timeout);
  87116. __pyx_v_self->ssl_shutdown_timeout = Py_None;
  87117. /* "uvloop/handles/streamserver.pyx":10
  87118. * self.ssl_handshake_timeout = None
  87119. * self.ssl_shutdown_timeout = None
  87120. * self.protocol_factory = None # <<<<<<<<<<<<<<
  87121. *
  87122. * cdef inline _init(self, Loop loop, object protocol_factory,
  87123. */
  87124. __Pyx_INCREF(Py_None);
  87125. __Pyx_GIVEREF(Py_None);
  87126. __Pyx_GOTREF(__pyx_v_self->protocol_factory);
  87127. __Pyx_DECREF(__pyx_v_self->protocol_factory);
  87128. __pyx_v_self->protocol_factory = Py_None;
  87129. /* "uvloop/handles/streamserver.pyx":4
  87130. * cdef class UVStreamServer(UVSocketHandle):
  87131. *
  87132. * def __cinit__(self): # <<<<<<<<<<<<<<
  87133. * self.opened = 0
  87134. * self._server = None
  87135. */
  87136. /* function exit code */
  87137. __pyx_r = 0;
  87138. __Pyx_RefNannyFinishContext();
  87139. return __pyx_r;
  87140. }
  87141. /* "uvloop/handles/streamserver.pyx":12
  87142. * self.protocol_factory = None
  87143. *
  87144. * cdef inline _init(self, Loop loop, object protocol_factory, # <<<<<<<<<<<<<<
  87145. * Server server,
  87146. * object backlog,
  87147. */
  87148. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_14UVStreamServer__init(struct __pyx_obj_6uvloop_4loop_UVStreamServer *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, PyObject *__pyx_v_protocol_factory, struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_server, PyObject *__pyx_v_backlog, PyObject *__pyx_v_ssl, PyObject *__pyx_v_ssl_handshake_timeout, PyObject *__pyx_v_ssl_shutdown_timeout) {
  87149. PyObject *__pyx_r = NULL;
  87150. __Pyx_RefNannyDeclarations
  87151. int __pyx_t_1;
  87152. int __pyx_t_2;
  87153. PyObject *__pyx_t_3 = NULL;
  87154. PyObject *__pyx_t_4 = NULL;
  87155. PyObject *__pyx_t_5 = NULL;
  87156. PyObject *__pyx_t_6 = NULL;
  87157. int __pyx_t_7;
  87158. __Pyx_RefNannySetupContext("_init", 0);
  87159. /* "uvloop/handles/streamserver.pyx":19
  87160. * object ssl_shutdown_timeout):
  87161. *
  87162. * if not isinstance(backlog, int): # <<<<<<<<<<<<<<
  87163. * # Don't allow floats
  87164. * raise TypeError('integer argument expected, got {}'.format(
  87165. */
  87166. __pyx_t_1 = PyInt_Check(__pyx_v_backlog);
  87167. __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
  87168. if (unlikely(__pyx_t_2)) {
  87169. /* "uvloop/handles/streamserver.pyx":21
  87170. * if not isinstance(backlog, int):
  87171. * # Don't allow floats
  87172. * raise TypeError('integer argument expected, got {}'.format( # <<<<<<<<<<<<<<
  87173. * type(backlog).__name__))
  87174. *
  87175. */
  87176. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_integer_argument_expected_got, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(19, 21, __pyx_L1_error)
  87177. __Pyx_GOTREF(__pyx_t_4);
  87178. /* "uvloop/handles/streamserver.pyx":22
  87179. * # Don't allow floats
  87180. * raise TypeError('integer argument expected, got {}'.format(
  87181. * type(backlog).__name__)) # <<<<<<<<<<<<<<
  87182. *
  87183. * if ssl is not None:
  87184. */
  87185. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(__pyx_v_backlog)), __pyx_n_s_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(19, 22, __pyx_L1_error)
  87186. __Pyx_GOTREF(__pyx_t_5);
  87187. __pyx_t_6 = NULL;
  87188. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
  87189. __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
  87190. if (likely(__pyx_t_6)) {
  87191. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  87192. __Pyx_INCREF(__pyx_t_6);
  87193. __Pyx_INCREF(function);
  87194. __Pyx_DECREF_SET(__pyx_t_4, function);
  87195. }
  87196. }
  87197. __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5);
  87198. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  87199. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  87200. if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 21, __pyx_L1_error)
  87201. __Pyx_GOTREF(__pyx_t_3);
  87202. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  87203. /* "uvloop/handles/streamserver.pyx":21
  87204. * if not isinstance(backlog, int):
  87205. * # Don't allow floats
  87206. * raise TypeError('integer argument expected, got {}'.format( # <<<<<<<<<<<<<<
  87207. * type(backlog).__name__))
  87208. *
  87209. */
  87210. __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(19, 21, __pyx_L1_error)
  87211. __Pyx_GOTREF(__pyx_t_4);
  87212. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  87213. __Pyx_Raise(__pyx_t_4, 0, 0, 0);
  87214. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  87215. __PYX_ERR(19, 21, __pyx_L1_error)
  87216. /* "uvloop/handles/streamserver.pyx":19
  87217. * object ssl_shutdown_timeout):
  87218. *
  87219. * if not isinstance(backlog, int): # <<<<<<<<<<<<<<
  87220. * # Don't allow floats
  87221. * raise TypeError('integer argument expected, got {}'.format(
  87222. */
  87223. }
  87224. /* "uvloop/handles/streamserver.pyx":24
  87225. * type(backlog).__name__))
  87226. *
  87227. * if ssl is not None: # <<<<<<<<<<<<<<
  87228. * if not isinstance(ssl, ssl_SSLContext):
  87229. * raise TypeError(
  87230. */
  87231. __pyx_t_2 = (__pyx_v_ssl != Py_None);
  87232. __pyx_t_1 = (__pyx_t_2 != 0);
  87233. if (__pyx_t_1) {
  87234. /* "uvloop/handles/streamserver.pyx":25
  87235. *
  87236. * if ssl is not None:
  87237. * if not isinstance(ssl, ssl_SSLContext): # <<<<<<<<<<<<<<
  87238. * raise TypeError(
  87239. * 'ssl is expected to be None or an instance of '
  87240. */
  87241. __pyx_t_4 = __pyx_v_6uvloop_4loop_ssl_SSLContext;
  87242. __Pyx_INCREF(__pyx_t_4);
  87243. __pyx_t_1 = PyObject_IsInstance(__pyx_v_ssl, __pyx_t_4); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(19, 25, __pyx_L1_error)
  87244. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  87245. __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
  87246. if (unlikely(__pyx_t_2)) {
  87247. /* "uvloop/handles/streamserver.pyx":28
  87248. * raise TypeError(
  87249. * 'ssl is expected to be None or an instance of '
  87250. * 'ssl.SSLContext, got {!r}'.format(ssl)) # <<<<<<<<<<<<<<
  87251. * else:
  87252. * if ssl_handshake_timeout is not None:
  87253. */
  87254. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_ssl_is_expected_to_be_None_or_an, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 28, __pyx_L1_error)
  87255. __Pyx_GOTREF(__pyx_t_3);
  87256. __pyx_t_5 = NULL;
  87257. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
  87258. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
  87259. if (likely(__pyx_t_5)) {
  87260. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  87261. __Pyx_INCREF(__pyx_t_5);
  87262. __Pyx_INCREF(function);
  87263. __Pyx_DECREF_SET(__pyx_t_3, function);
  87264. }
  87265. }
  87266. __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_v_ssl) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_ssl);
  87267. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  87268. if (unlikely(!__pyx_t_4)) __PYX_ERR(19, 28, __pyx_L1_error)
  87269. __Pyx_GOTREF(__pyx_t_4);
  87270. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  87271. /* "uvloop/handles/streamserver.pyx":26
  87272. * if ssl is not None:
  87273. * if not isinstance(ssl, ssl_SSLContext):
  87274. * raise TypeError( # <<<<<<<<<<<<<<
  87275. * 'ssl is expected to be None or an instance of '
  87276. * 'ssl.SSLContext, got {!r}'.format(ssl))
  87277. */
  87278. __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 26, __pyx_L1_error)
  87279. __Pyx_GOTREF(__pyx_t_3);
  87280. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  87281. __Pyx_Raise(__pyx_t_3, 0, 0, 0);
  87282. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  87283. __PYX_ERR(19, 26, __pyx_L1_error)
  87284. /* "uvloop/handles/streamserver.pyx":25
  87285. *
  87286. * if ssl is not None:
  87287. * if not isinstance(ssl, ssl_SSLContext): # <<<<<<<<<<<<<<
  87288. * raise TypeError(
  87289. * 'ssl is expected to be None or an instance of '
  87290. */
  87291. }
  87292. /* "uvloop/handles/streamserver.pyx":24
  87293. * type(backlog).__name__))
  87294. *
  87295. * if ssl is not None: # <<<<<<<<<<<<<<
  87296. * if not isinstance(ssl, ssl_SSLContext):
  87297. * raise TypeError(
  87298. */
  87299. goto __pyx_L4;
  87300. }
  87301. /* "uvloop/handles/streamserver.pyx":30
  87302. * 'ssl.SSLContext, got {!r}'.format(ssl))
  87303. * else:
  87304. * if ssl_handshake_timeout is not None: # <<<<<<<<<<<<<<
  87305. * raise ValueError(
  87306. * 'ssl_handshake_timeout is only meaningful with ssl')
  87307. */
  87308. /*else*/ {
  87309. __pyx_t_2 = (__pyx_v_ssl_handshake_timeout != Py_None);
  87310. __pyx_t_1 = (__pyx_t_2 != 0);
  87311. if (unlikely(__pyx_t_1)) {
  87312. /* "uvloop/handles/streamserver.pyx":31
  87313. * else:
  87314. * if ssl_handshake_timeout is not None:
  87315. * raise ValueError( # <<<<<<<<<<<<<<
  87316. * 'ssl_handshake_timeout is only meaningful with ssl')
  87317. * if ssl_shutdown_timeout is not None:
  87318. */
  87319. __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__42, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 31, __pyx_L1_error)
  87320. __Pyx_GOTREF(__pyx_t_3);
  87321. __Pyx_Raise(__pyx_t_3, 0, 0, 0);
  87322. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  87323. __PYX_ERR(19, 31, __pyx_L1_error)
  87324. /* "uvloop/handles/streamserver.pyx":30
  87325. * 'ssl.SSLContext, got {!r}'.format(ssl))
  87326. * else:
  87327. * if ssl_handshake_timeout is not None: # <<<<<<<<<<<<<<
  87328. * raise ValueError(
  87329. * 'ssl_handshake_timeout is only meaningful with ssl')
  87330. */
  87331. }
  87332. /* "uvloop/handles/streamserver.pyx":33
  87333. * raise ValueError(
  87334. * 'ssl_handshake_timeout is only meaningful with ssl')
  87335. * if ssl_shutdown_timeout is not None: # <<<<<<<<<<<<<<
  87336. * raise ValueError(
  87337. * 'ssl_shutdown_timeout is only meaningful with ssl')
  87338. */
  87339. __pyx_t_1 = (__pyx_v_ssl_shutdown_timeout != Py_None);
  87340. __pyx_t_2 = (__pyx_t_1 != 0);
  87341. if (unlikely(__pyx_t_2)) {
  87342. /* "uvloop/handles/streamserver.pyx":34
  87343. * 'ssl_handshake_timeout is only meaningful with ssl')
  87344. * if ssl_shutdown_timeout is not None:
  87345. * raise ValueError( # <<<<<<<<<<<<<<
  87346. * 'ssl_shutdown_timeout is only meaningful with ssl')
  87347. *
  87348. */
  87349. __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 34, __pyx_L1_error)
  87350. __Pyx_GOTREF(__pyx_t_3);
  87351. __Pyx_Raise(__pyx_t_3, 0, 0, 0);
  87352. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  87353. __PYX_ERR(19, 34, __pyx_L1_error)
  87354. /* "uvloop/handles/streamserver.pyx":33
  87355. * raise ValueError(
  87356. * 'ssl_handshake_timeout is only meaningful with ssl')
  87357. * if ssl_shutdown_timeout is not None: # <<<<<<<<<<<<<<
  87358. * raise ValueError(
  87359. * 'ssl_shutdown_timeout is only meaningful with ssl')
  87360. */
  87361. }
  87362. }
  87363. __pyx_L4:;
  87364. /* "uvloop/handles/streamserver.pyx":37
  87365. * 'ssl_shutdown_timeout is only meaningful with ssl')
  87366. *
  87367. * self.backlog = backlog # <<<<<<<<<<<<<<
  87368. * self.ssl = ssl
  87369. * self.ssl_handshake_timeout = ssl_handshake_timeout
  87370. */
  87371. __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_backlog); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(19, 37, __pyx_L1_error)
  87372. __pyx_v_self->backlog = __pyx_t_7;
  87373. /* "uvloop/handles/streamserver.pyx":38
  87374. *
  87375. * self.backlog = backlog
  87376. * self.ssl = ssl # <<<<<<<<<<<<<<
  87377. * self.ssl_handshake_timeout = ssl_handshake_timeout
  87378. * self.ssl_shutdown_timeout = ssl_shutdown_timeout
  87379. */
  87380. __Pyx_INCREF(__pyx_v_ssl);
  87381. __Pyx_GIVEREF(__pyx_v_ssl);
  87382. __Pyx_GOTREF(__pyx_v_self->ssl);
  87383. __Pyx_DECREF(__pyx_v_self->ssl);
  87384. __pyx_v_self->ssl = __pyx_v_ssl;
  87385. /* "uvloop/handles/streamserver.pyx":39
  87386. * self.backlog = backlog
  87387. * self.ssl = ssl
  87388. * self.ssl_handshake_timeout = ssl_handshake_timeout # <<<<<<<<<<<<<<
  87389. * self.ssl_shutdown_timeout = ssl_shutdown_timeout
  87390. *
  87391. */
  87392. __Pyx_INCREF(__pyx_v_ssl_handshake_timeout);
  87393. __Pyx_GIVEREF(__pyx_v_ssl_handshake_timeout);
  87394. __Pyx_GOTREF(__pyx_v_self->ssl_handshake_timeout);
  87395. __Pyx_DECREF(__pyx_v_self->ssl_handshake_timeout);
  87396. __pyx_v_self->ssl_handshake_timeout = __pyx_v_ssl_handshake_timeout;
  87397. /* "uvloop/handles/streamserver.pyx":40
  87398. * self.ssl = ssl
  87399. * self.ssl_handshake_timeout = ssl_handshake_timeout
  87400. * self.ssl_shutdown_timeout = ssl_shutdown_timeout # <<<<<<<<<<<<<<
  87401. *
  87402. * self._start_init(loop)
  87403. */
  87404. __Pyx_INCREF(__pyx_v_ssl_shutdown_timeout);
  87405. __Pyx_GIVEREF(__pyx_v_ssl_shutdown_timeout);
  87406. __Pyx_GOTREF(__pyx_v_self->ssl_shutdown_timeout);
  87407. __Pyx_DECREF(__pyx_v_self->ssl_shutdown_timeout);
  87408. __pyx_v_self->ssl_shutdown_timeout = __pyx_v_ssl_shutdown_timeout;
  87409. /* "uvloop/handles/streamserver.pyx":42
  87410. * self.ssl_shutdown_timeout = ssl_shutdown_timeout
  87411. *
  87412. * self._start_init(loop) # <<<<<<<<<<<<<<
  87413. * self.protocol_factory = protocol_factory
  87414. * self._server = server
  87415. */
  87416. __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStreamServer *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._start_init(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self), __pyx_v_loop); if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 42, __pyx_L1_error)
  87417. __Pyx_GOTREF(__pyx_t_3);
  87418. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  87419. /* "uvloop/handles/streamserver.pyx":43
  87420. *
  87421. * self._start_init(loop)
  87422. * self.protocol_factory = protocol_factory # <<<<<<<<<<<<<<
  87423. * self._server = server
  87424. *
  87425. */
  87426. __Pyx_INCREF(__pyx_v_protocol_factory);
  87427. __Pyx_GIVEREF(__pyx_v_protocol_factory);
  87428. __Pyx_GOTREF(__pyx_v_self->protocol_factory);
  87429. __Pyx_DECREF(__pyx_v_self->protocol_factory);
  87430. __pyx_v_self->protocol_factory = __pyx_v_protocol_factory;
  87431. /* "uvloop/handles/streamserver.pyx":44
  87432. * self._start_init(loop)
  87433. * self.protocol_factory = protocol_factory
  87434. * self._server = server # <<<<<<<<<<<<<<
  87435. *
  87436. * cdef inline listen(self):
  87437. */
  87438. __Pyx_INCREF(((PyObject *)__pyx_v_server));
  87439. __Pyx_GIVEREF(((PyObject *)__pyx_v_server));
  87440. __Pyx_GOTREF(__pyx_v_self->_server);
  87441. __Pyx_DECREF(((PyObject *)__pyx_v_self->_server));
  87442. __pyx_v_self->_server = __pyx_v_server;
  87443. /* "uvloop/handles/streamserver.pyx":12
  87444. * self.protocol_factory = None
  87445. *
  87446. * cdef inline _init(self, Loop loop, object protocol_factory, # <<<<<<<<<<<<<<
  87447. * Server server,
  87448. * object backlog,
  87449. */
  87450. /* function exit code */
  87451. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  87452. goto __pyx_L0;
  87453. __pyx_L1_error:;
  87454. __Pyx_XDECREF(__pyx_t_3);
  87455. __Pyx_XDECREF(__pyx_t_4);
  87456. __Pyx_XDECREF(__pyx_t_5);
  87457. __Pyx_XDECREF(__pyx_t_6);
  87458. __Pyx_AddTraceback("uvloop.loop.UVStreamServer._init", __pyx_clineno, __pyx_lineno, __pyx_filename);
  87459. __pyx_r = 0;
  87460. __pyx_L0:;
  87461. __Pyx_XGIVEREF(__pyx_r);
  87462. __Pyx_RefNannyFinishContext();
  87463. return __pyx_r;
  87464. }
  87465. /* "uvloop/handles/streamserver.pyx":46
  87466. * self._server = server
  87467. *
  87468. * cdef inline listen(self): # <<<<<<<<<<<<<<
  87469. * cdef int err
  87470. * self._ensure_alive()
  87471. */
  87472. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_14UVStreamServer_listen(struct __pyx_obj_6uvloop_4loop_UVStreamServer *__pyx_v_self) {
  87473. int __pyx_v_err;
  87474. PyObject *__pyx_v_exc = NULL;
  87475. PyObject *__pyx_r = NULL;
  87476. __Pyx_RefNannyDeclarations
  87477. PyObject *__pyx_t_1 = NULL;
  87478. int __pyx_t_2;
  87479. int __pyx_t_3;
  87480. __Pyx_RefNannySetupContext("listen", 0);
  87481. /* "uvloop/handles/streamserver.pyx":48
  87482. * cdef inline listen(self):
  87483. * cdef int err
  87484. * self._ensure_alive() # <<<<<<<<<<<<<<
  87485. *
  87486. * if self.protocol_factory is None:
  87487. */
  87488. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStreamServer *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._ensure_alive(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 48, __pyx_L1_error)
  87489. __Pyx_GOTREF(__pyx_t_1);
  87490. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  87491. /* "uvloop/handles/streamserver.pyx":50
  87492. * self._ensure_alive()
  87493. *
  87494. * if self.protocol_factory is None: # <<<<<<<<<<<<<<
  87495. * raise RuntimeError('unable to listen(); no protocol_factory')
  87496. *
  87497. */
  87498. __pyx_t_2 = (__pyx_v_self->protocol_factory == Py_None);
  87499. __pyx_t_3 = (__pyx_t_2 != 0);
  87500. if (unlikely(__pyx_t_3)) {
  87501. /* "uvloop/handles/streamserver.pyx":51
  87502. *
  87503. * if self.protocol_factory is None:
  87504. * raise RuntimeError('unable to listen(); no protocol_factory') # <<<<<<<<<<<<<<
  87505. *
  87506. * if self.opened != 1:
  87507. */
  87508. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__142, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 51, __pyx_L1_error)
  87509. __Pyx_GOTREF(__pyx_t_1);
  87510. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  87511. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  87512. __PYX_ERR(19, 51, __pyx_L1_error)
  87513. /* "uvloop/handles/streamserver.pyx":50
  87514. * self._ensure_alive()
  87515. *
  87516. * if self.protocol_factory is None: # <<<<<<<<<<<<<<
  87517. * raise RuntimeError('unable to listen(); no protocol_factory')
  87518. *
  87519. */
  87520. }
  87521. /* "uvloop/handles/streamserver.pyx":53
  87522. * raise RuntimeError('unable to listen(); no protocol_factory')
  87523. *
  87524. * if self.opened != 1: # <<<<<<<<<<<<<<
  87525. * raise RuntimeError('unopened TCPServer')
  87526. *
  87527. */
  87528. __pyx_t_3 = ((__pyx_v_self->opened != 1) != 0);
  87529. if (unlikely(__pyx_t_3)) {
  87530. /* "uvloop/handles/streamserver.pyx":54
  87531. *
  87532. * if self.opened != 1:
  87533. * raise RuntimeError('unopened TCPServer') # <<<<<<<<<<<<<<
  87534. *
  87535. * err = uv.uv_listen(<uv.uv_stream_t*> self._handle,
  87536. */
  87537. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__143, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 54, __pyx_L1_error)
  87538. __Pyx_GOTREF(__pyx_t_1);
  87539. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  87540. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  87541. __PYX_ERR(19, 54, __pyx_L1_error)
  87542. /* "uvloop/handles/streamserver.pyx":53
  87543. * raise RuntimeError('unable to listen(); no protocol_factory')
  87544. *
  87545. * if self.opened != 1: # <<<<<<<<<<<<<<
  87546. * raise RuntimeError('unopened TCPServer')
  87547. *
  87548. */
  87549. }
  87550. /* "uvloop/handles/streamserver.pyx":56
  87551. * raise RuntimeError('unopened TCPServer')
  87552. *
  87553. * err = uv.uv_listen(<uv.uv_stream_t*> self._handle, # <<<<<<<<<<<<<<
  87554. * self.backlog,
  87555. * __uv_streamserver_on_listen)
  87556. */
  87557. __pyx_v_err = uv_listen(((uv_stream_t *)__pyx_v_self->__pyx_base.__pyx_base._handle), __pyx_v_self->backlog, __pyx_f_6uvloop_4loop___uv_streamserver_on_listen);
  87558. /* "uvloop/handles/streamserver.pyx":59
  87559. * self.backlog,
  87560. * __uv_streamserver_on_listen)
  87561. * if err < 0: # <<<<<<<<<<<<<<
  87562. * exc = convert_error(err)
  87563. * self._fatal_error(exc, True)
  87564. */
  87565. __pyx_t_3 = ((__pyx_v_err < 0) != 0);
  87566. if (__pyx_t_3) {
  87567. /* "uvloop/handles/streamserver.pyx":60
  87568. * __uv_streamserver_on_listen)
  87569. * if err < 0:
  87570. * exc = convert_error(err) # <<<<<<<<<<<<<<
  87571. * self._fatal_error(exc, True)
  87572. * return
  87573. */
  87574. __pyx_t_1 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 60, __pyx_L1_error)
  87575. __Pyx_GOTREF(__pyx_t_1);
  87576. __pyx_v_exc = __pyx_t_1;
  87577. __pyx_t_1 = 0;
  87578. /* "uvloop/handles/streamserver.pyx":61
  87579. * if err < 0:
  87580. * exc = convert_error(err)
  87581. * self._fatal_error(exc, True) # <<<<<<<<<<<<<<
  87582. * return
  87583. *
  87584. */
  87585. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStreamServer *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._fatal_error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self), __pyx_v_exc, Py_True, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 61, __pyx_L1_error)
  87586. __Pyx_GOTREF(__pyx_t_1);
  87587. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  87588. /* "uvloop/handles/streamserver.pyx":62
  87589. * exc = convert_error(err)
  87590. * self._fatal_error(exc, True)
  87591. * return # <<<<<<<<<<<<<<
  87592. *
  87593. * cdef inline _on_listen(self):
  87594. */
  87595. __Pyx_XDECREF(__pyx_r);
  87596. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  87597. goto __pyx_L0;
  87598. /* "uvloop/handles/streamserver.pyx":59
  87599. * self.backlog,
  87600. * __uv_streamserver_on_listen)
  87601. * if err < 0: # <<<<<<<<<<<<<<
  87602. * exc = convert_error(err)
  87603. * self._fatal_error(exc, True)
  87604. */
  87605. }
  87606. /* "uvloop/handles/streamserver.pyx":46
  87607. * self._server = server
  87608. *
  87609. * cdef inline listen(self): # <<<<<<<<<<<<<<
  87610. * cdef int err
  87611. * self._ensure_alive()
  87612. */
  87613. /* function exit code */
  87614. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  87615. goto __pyx_L0;
  87616. __pyx_L1_error:;
  87617. __Pyx_XDECREF(__pyx_t_1);
  87618. __Pyx_AddTraceback("uvloop.loop.UVStreamServer.listen", __pyx_clineno, __pyx_lineno, __pyx_filename);
  87619. __pyx_r = 0;
  87620. __pyx_L0:;
  87621. __Pyx_XDECREF(__pyx_v_exc);
  87622. __Pyx_XGIVEREF(__pyx_r);
  87623. __Pyx_RefNannyFinishContext();
  87624. return __pyx_r;
  87625. }
  87626. /* "uvloop/handles/streamserver.pyx":64
  87627. * return
  87628. *
  87629. * cdef inline _on_listen(self): # <<<<<<<<<<<<<<
  87630. * cdef UVStream client
  87631. *
  87632. */
  87633. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_14UVStreamServer__on_listen(struct __pyx_obj_6uvloop_4loop_UVStreamServer *__pyx_v_self) {
  87634. struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_client = 0;
  87635. PyObject *__pyx_v_protocol = NULL;
  87636. PyObject *__pyx_v_waiter = NULL;
  87637. struct __pyx_obj_6uvloop_4loop_SSLProtocol *__pyx_v_ssl_protocol = NULL;
  87638. PyObject *__pyx_r = NULL;
  87639. __Pyx_RefNannyDeclarations
  87640. PyObject *__pyx_t_1 = NULL;
  87641. PyObject *__pyx_t_2 = NULL;
  87642. PyObject *__pyx_t_3 = NULL;
  87643. int __pyx_t_4;
  87644. int __pyx_t_5;
  87645. PyObject *__pyx_t_6 = NULL;
  87646. PyObject *__pyx_t_7 = NULL;
  87647. PyObject *__pyx_t_8 = NULL;
  87648. int __pyx_t_9;
  87649. PyObject *__pyx_t_10 = NULL;
  87650. __Pyx_RefNannySetupContext("_on_listen", 0);
  87651. /* "uvloop/handles/streamserver.pyx":67
  87652. * cdef UVStream client
  87653. *
  87654. * protocol = self.protocol_factory() # <<<<<<<<<<<<<<
  87655. *
  87656. * if self.ssl is None:
  87657. */
  87658. __Pyx_INCREF(__pyx_v_self->protocol_factory);
  87659. __pyx_t_2 = __pyx_v_self->protocol_factory; __pyx_t_3 = NULL;
  87660. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
  87661. __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
  87662. if (likely(__pyx_t_3)) {
  87663. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  87664. __Pyx_INCREF(__pyx_t_3);
  87665. __Pyx_INCREF(function);
  87666. __Pyx_DECREF_SET(__pyx_t_2, function);
  87667. }
  87668. }
  87669. __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  87670. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  87671. if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 67, __pyx_L1_error)
  87672. __Pyx_GOTREF(__pyx_t_1);
  87673. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  87674. __pyx_v_protocol = __pyx_t_1;
  87675. __pyx_t_1 = 0;
  87676. /* "uvloop/handles/streamserver.pyx":69
  87677. * protocol = self.protocol_factory()
  87678. *
  87679. * if self.ssl is None: # <<<<<<<<<<<<<<
  87680. * client = self._make_new_transport(protocol, None)
  87681. *
  87682. */
  87683. __pyx_t_4 = (__pyx_v_self->ssl == Py_None);
  87684. __pyx_t_5 = (__pyx_t_4 != 0);
  87685. if (__pyx_t_5) {
  87686. /* "uvloop/handles/streamserver.pyx":70
  87687. *
  87688. * if self.ssl is None:
  87689. * client = self._make_new_transport(protocol, None) # <<<<<<<<<<<<<<
  87690. *
  87691. * else:
  87692. */
  87693. __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_6uvloop_4loop_UVStreamServer *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_make_new_transport(__pyx_v_self, __pyx_v_protocol, Py_None)); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 70, __pyx_L1_error)
  87694. __Pyx_GOTREF(__pyx_t_1);
  87695. __pyx_v_client = ((struct __pyx_obj_6uvloop_4loop_UVStream *)__pyx_t_1);
  87696. __pyx_t_1 = 0;
  87697. /* "uvloop/handles/streamserver.pyx":69
  87698. * protocol = self.protocol_factory()
  87699. *
  87700. * if self.ssl is None: # <<<<<<<<<<<<<<
  87701. * client = self._make_new_transport(protocol, None)
  87702. *
  87703. */
  87704. goto __pyx_L3;
  87705. }
  87706. /* "uvloop/handles/streamserver.pyx":73
  87707. *
  87708. * else:
  87709. * waiter = self._loop._new_future() # <<<<<<<<<<<<<<
  87710. *
  87711. * ssl_protocol = SSLProtocol(
  87712. */
  87713. /*else*/ {
  87714. __pyx_t_1 = __pyx_f_6uvloop_4loop_4Loop__new_future(__pyx_v_self->__pyx_base.__pyx_base._loop); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 73, __pyx_L1_error)
  87715. __Pyx_GOTREF(__pyx_t_1);
  87716. __pyx_v_waiter = __pyx_t_1;
  87717. __pyx_t_1 = 0;
  87718. /* "uvloop/handles/streamserver.pyx":75
  87719. * waiter = self._loop._new_future()
  87720. *
  87721. * ssl_protocol = SSLProtocol( # <<<<<<<<<<<<<<
  87722. * self._loop, protocol, self.ssl,
  87723. * waiter,
  87724. */
  87725. __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 75, __pyx_L1_error)
  87726. __Pyx_GOTREF(__pyx_t_1);
  87727. __Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._loop));
  87728. __Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._loop));
  87729. PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._loop));
  87730. __Pyx_INCREF(__pyx_v_protocol);
  87731. __Pyx_GIVEREF(__pyx_v_protocol);
  87732. PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_protocol);
  87733. __Pyx_INCREF(__pyx_v_self->ssl);
  87734. __Pyx_GIVEREF(__pyx_v_self->ssl);
  87735. PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_self->ssl);
  87736. __Pyx_INCREF(__pyx_v_waiter);
  87737. __Pyx_GIVEREF(__pyx_v_waiter);
  87738. PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_waiter);
  87739. /* "uvloop/handles/streamserver.pyx":78
  87740. * self._loop, protocol, self.ssl,
  87741. * waiter,
  87742. * server_side=True, # <<<<<<<<<<<<<<
  87743. * server_hostname=None,
  87744. * ssl_handshake_timeout=self.ssl_handshake_timeout,
  87745. */
  87746. __pyx_t_2 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(19, 78, __pyx_L1_error)
  87747. __Pyx_GOTREF(__pyx_t_2);
  87748. if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_server_side, Py_True) < 0) __PYX_ERR(19, 78, __pyx_L1_error)
  87749. /* "uvloop/handles/streamserver.pyx":79
  87750. * waiter,
  87751. * server_side=True,
  87752. * server_hostname=None, # <<<<<<<<<<<<<<
  87753. * ssl_handshake_timeout=self.ssl_handshake_timeout,
  87754. * ssl_shutdown_timeout=self.ssl_shutdown_timeout)
  87755. */
  87756. if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_server_hostname, Py_None) < 0) __PYX_ERR(19, 78, __pyx_L1_error)
  87757. /* "uvloop/handles/streamserver.pyx":80
  87758. * server_side=True,
  87759. * server_hostname=None,
  87760. * ssl_handshake_timeout=self.ssl_handshake_timeout, # <<<<<<<<<<<<<<
  87761. * ssl_shutdown_timeout=self.ssl_shutdown_timeout)
  87762. *
  87763. */
  87764. if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_ssl_handshake_timeout, __pyx_v_self->ssl_handshake_timeout) < 0) __PYX_ERR(19, 78, __pyx_L1_error)
  87765. /* "uvloop/handles/streamserver.pyx":81
  87766. * server_hostname=None,
  87767. * ssl_handshake_timeout=self.ssl_handshake_timeout,
  87768. * ssl_shutdown_timeout=self.ssl_shutdown_timeout) # <<<<<<<<<<<<<<
  87769. *
  87770. * client = self._make_new_transport(ssl_protocol, None)
  87771. */
  87772. if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_ssl_shutdown_timeout, __pyx_v_self->ssl_shutdown_timeout) < 0) __PYX_ERR(19, 78, __pyx_L1_error)
  87773. /* "uvloop/handles/streamserver.pyx":75
  87774. * waiter = self._loop._new_future()
  87775. *
  87776. * ssl_protocol = SSLProtocol( # <<<<<<<<<<<<<<
  87777. * self._loop, protocol, self.ssl,
  87778. * waiter,
  87779. */
  87780. __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6uvloop_4loop_SSLProtocol), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 75, __pyx_L1_error)
  87781. __Pyx_GOTREF(__pyx_t_3);
  87782. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  87783. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  87784. __pyx_v_ssl_protocol = ((struct __pyx_obj_6uvloop_4loop_SSLProtocol *)__pyx_t_3);
  87785. __pyx_t_3 = 0;
  87786. /* "uvloop/handles/streamserver.pyx":83
  87787. * ssl_shutdown_timeout=self.ssl_shutdown_timeout)
  87788. *
  87789. * client = self._make_new_transport(ssl_protocol, None) # <<<<<<<<<<<<<<
  87790. *
  87791. * waiter.add_done_callback(
  87792. */
  87793. __pyx_t_3 = ((PyObject *)((struct __pyx_vtabstruct_6uvloop_4loop_UVStreamServer *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_make_new_transport(__pyx_v_self, ((PyObject *)__pyx_v_ssl_protocol), Py_None)); if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 83, __pyx_L1_error)
  87794. __Pyx_GOTREF(__pyx_t_3);
  87795. __pyx_v_client = ((struct __pyx_obj_6uvloop_4loop_UVStream *)__pyx_t_3);
  87796. __pyx_t_3 = 0;
  87797. /* "uvloop/handles/streamserver.pyx":85
  87798. * client = self._make_new_transport(ssl_protocol, None)
  87799. *
  87800. * waiter.add_done_callback( # <<<<<<<<<<<<<<
  87801. * ft_partial(self.__on_ssl_connected, client))
  87802. *
  87803. */
  87804. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_waiter, __pyx_n_s_add_done_callback); if (unlikely(!__pyx_t_2)) __PYX_ERR(19, 85, __pyx_L1_error)
  87805. __Pyx_GOTREF(__pyx_t_2);
  87806. /* "uvloop/handles/streamserver.pyx":86
  87807. *
  87808. * waiter.add_done_callback(
  87809. * ft_partial(self.__on_ssl_connected, client)) # <<<<<<<<<<<<<<
  87810. *
  87811. * client._accept(<UVStream>self)
  87812. */
  87813. __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_on_ssl_connected); if (unlikely(!__pyx_t_6)) __PYX_ERR(19, 86, __pyx_L1_error)
  87814. __Pyx_GOTREF(__pyx_t_6);
  87815. __Pyx_INCREF(__pyx_v_6uvloop_4loop_ft_partial);
  87816. __pyx_t_7 = __pyx_v_6uvloop_4loop_ft_partial; __pyx_t_8 = NULL;
  87817. __pyx_t_9 = 0;
  87818. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
  87819. __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
  87820. if (likely(__pyx_t_8)) {
  87821. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
  87822. __Pyx_INCREF(__pyx_t_8);
  87823. __Pyx_INCREF(function);
  87824. __Pyx_DECREF_SET(__pyx_t_7, function);
  87825. __pyx_t_9 = 1;
  87826. }
  87827. }
  87828. #if CYTHON_FAST_PYCALL
  87829. if (PyFunction_Check(__pyx_t_7)) {
  87830. PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_6, ((PyObject *)__pyx_v_client)};
  87831. __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 86, __pyx_L1_error)
  87832. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  87833. __Pyx_GOTREF(__pyx_t_1);
  87834. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  87835. } else
  87836. #endif
  87837. #if CYTHON_FAST_PYCCALL
  87838. if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
  87839. PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_6, ((PyObject *)__pyx_v_client)};
  87840. __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 86, __pyx_L1_error)
  87841. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  87842. __Pyx_GOTREF(__pyx_t_1);
  87843. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  87844. } else
  87845. #endif
  87846. {
  87847. __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(19, 86, __pyx_L1_error)
  87848. __Pyx_GOTREF(__pyx_t_10);
  87849. if (__pyx_t_8) {
  87850. __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL;
  87851. }
  87852. __Pyx_GIVEREF(__pyx_t_6);
  87853. PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_t_6);
  87854. __Pyx_INCREF(((PyObject *)__pyx_v_client));
  87855. __Pyx_GIVEREF(((PyObject *)__pyx_v_client));
  87856. PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, ((PyObject *)__pyx_v_client));
  87857. __pyx_t_6 = 0;
  87858. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 86, __pyx_L1_error)
  87859. __Pyx_GOTREF(__pyx_t_1);
  87860. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  87861. }
  87862. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  87863. __pyx_t_7 = NULL;
  87864. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
  87865. __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
  87866. if (likely(__pyx_t_7)) {
  87867. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  87868. __Pyx_INCREF(__pyx_t_7);
  87869. __Pyx_INCREF(function);
  87870. __Pyx_DECREF_SET(__pyx_t_2, function);
  87871. }
  87872. }
  87873. __pyx_t_3 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_7, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1);
  87874. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  87875. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  87876. if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 85, __pyx_L1_error)
  87877. __Pyx_GOTREF(__pyx_t_3);
  87878. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  87879. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  87880. }
  87881. __pyx_L3:;
  87882. /* "uvloop/handles/streamserver.pyx":88
  87883. * ft_partial(self.__on_ssl_connected, client))
  87884. *
  87885. * client._accept(<UVStream>self) # <<<<<<<<<<<<<<
  87886. *
  87887. * cdef _fatal_error(self, exc, throw, reason=None):
  87888. */
  87889. __pyx_t_3 = __pyx_f_6uvloop_4loop_8UVStream__accept(__pyx_v_client, ((struct __pyx_obj_6uvloop_4loop_UVStream *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 88, __pyx_L1_error)
  87890. __Pyx_GOTREF(__pyx_t_3);
  87891. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  87892. /* "uvloop/handles/streamserver.pyx":64
  87893. * return
  87894. *
  87895. * cdef inline _on_listen(self): # <<<<<<<<<<<<<<
  87896. * cdef UVStream client
  87897. *
  87898. */
  87899. /* function exit code */
  87900. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  87901. goto __pyx_L0;
  87902. __pyx_L1_error:;
  87903. __Pyx_XDECREF(__pyx_t_1);
  87904. __Pyx_XDECREF(__pyx_t_2);
  87905. __Pyx_XDECREF(__pyx_t_3);
  87906. __Pyx_XDECREF(__pyx_t_6);
  87907. __Pyx_XDECREF(__pyx_t_7);
  87908. __Pyx_XDECREF(__pyx_t_8);
  87909. __Pyx_XDECREF(__pyx_t_10);
  87910. __Pyx_AddTraceback("uvloop.loop.UVStreamServer._on_listen", __pyx_clineno, __pyx_lineno, __pyx_filename);
  87911. __pyx_r = 0;
  87912. __pyx_L0:;
  87913. __Pyx_XDECREF((PyObject *)__pyx_v_client);
  87914. __Pyx_XDECREF(__pyx_v_protocol);
  87915. __Pyx_XDECREF(__pyx_v_waiter);
  87916. __Pyx_XDECREF((PyObject *)__pyx_v_ssl_protocol);
  87917. __Pyx_XGIVEREF(__pyx_r);
  87918. __Pyx_RefNannyFinishContext();
  87919. return __pyx_r;
  87920. }
  87921. /* "uvloop/handles/streamserver.pyx":90
  87922. * client._accept(<UVStream>self)
  87923. *
  87924. * cdef _fatal_error(self, exc, throw, reason=None): # <<<<<<<<<<<<<<
  87925. * # Overload UVHandle._fatal_error
  87926. *
  87927. */
  87928. static PyObject *__pyx_f_6uvloop_4loop_14UVStreamServer__fatal_error(struct __pyx_obj_6uvloop_4loop_UVStreamServer *__pyx_v_self, PyObject *__pyx_v_exc, PyObject *__pyx_v_throw, struct __pyx_opt_args_6uvloop_4loop_14UVStreamServer__fatal_error *__pyx_optional_args) {
  87929. PyObject *__pyx_v_reason = ((PyObject *)Py_None);
  87930. PyObject *__pyx_v_msg = NULL;
  87931. PyObject *__pyx_r = NULL;
  87932. __Pyx_RefNannyDeclarations
  87933. PyObject *__pyx_t_1 = NULL;
  87934. int __pyx_t_2;
  87935. int __pyx_t_3;
  87936. int __pyx_t_4;
  87937. PyObject *__pyx_t_5 = NULL;
  87938. Py_ssize_t __pyx_t_6;
  87939. Py_UCS4 __pyx_t_7;
  87940. PyObject *__pyx_t_8 = NULL;
  87941. PyObject *__pyx_t_9 = NULL;
  87942. __Pyx_RefNannySetupContext("_fatal_error", 0);
  87943. if (__pyx_optional_args) {
  87944. if (__pyx_optional_args->__pyx_n > 0) {
  87945. __pyx_v_reason = __pyx_optional_args->reason;
  87946. }
  87947. }
  87948. /* "uvloop/handles/streamserver.pyx":93
  87949. * # Overload UVHandle._fatal_error
  87950. *
  87951. * self._close() # <<<<<<<<<<<<<<
  87952. *
  87953. * if not isinstance(exc, OSError):
  87954. */
  87955. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStreamServer *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._close(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 93, __pyx_L1_error)
  87956. __Pyx_GOTREF(__pyx_t_1);
  87957. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  87958. /* "uvloop/handles/streamserver.pyx":95
  87959. * self._close()
  87960. *
  87961. * if not isinstance(exc, OSError): # <<<<<<<<<<<<<<
  87962. *
  87963. * if throw or self._loop is None:
  87964. */
  87965. __pyx_t_2 = PyObject_IsInstance(__pyx_v_exc, __pyx_builtin_OSError); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(19, 95, __pyx_L1_error)
  87966. __pyx_t_3 = ((!(__pyx_t_2 != 0)) != 0);
  87967. if (__pyx_t_3) {
  87968. /* "uvloop/handles/streamserver.pyx":97
  87969. * if not isinstance(exc, OSError):
  87970. *
  87971. * if throw or self._loop is None: # <<<<<<<<<<<<<<
  87972. * raise exc
  87973. *
  87974. */
  87975. __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_throw); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(19, 97, __pyx_L1_error)
  87976. if (!__pyx_t_2) {
  87977. } else {
  87978. __pyx_t_3 = __pyx_t_2;
  87979. goto __pyx_L5_bool_binop_done;
  87980. }
  87981. __pyx_t_2 = (((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._loop) == Py_None);
  87982. __pyx_t_4 = (__pyx_t_2 != 0);
  87983. __pyx_t_3 = __pyx_t_4;
  87984. __pyx_L5_bool_binop_done:;
  87985. if (unlikely(__pyx_t_3)) {
  87986. /* "uvloop/handles/streamserver.pyx":98
  87987. *
  87988. * if throw or self._loop is None:
  87989. * raise exc # <<<<<<<<<<<<<<
  87990. *
  87991. * msg = f'Fatal error on server {self.__class__.__name__}'
  87992. */
  87993. __Pyx_Raise(__pyx_v_exc, 0, 0, 0);
  87994. __PYX_ERR(19, 98, __pyx_L1_error)
  87995. /* "uvloop/handles/streamserver.pyx":97
  87996. * if not isinstance(exc, OSError):
  87997. *
  87998. * if throw or self._loop is None: # <<<<<<<<<<<<<<
  87999. * raise exc
  88000. *
  88001. */
  88002. }
  88003. /* "uvloop/handles/streamserver.pyx":100
  88004. * raise exc
  88005. *
  88006. * msg = f'Fatal error on server {self.__class__.__name__}' # <<<<<<<<<<<<<<
  88007. * if reason is not None:
  88008. * msg = f'{msg} ({reason})'
  88009. */
  88010. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 100, __pyx_L1_error)
  88011. __Pyx_GOTREF(__pyx_t_1);
  88012. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(19, 100, __pyx_L1_error)
  88013. __Pyx_GOTREF(__pyx_t_5);
  88014. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  88015. __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 100, __pyx_L1_error)
  88016. __Pyx_GOTREF(__pyx_t_1);
  88017. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  88018. __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Fatal_error_on_server, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(19, 100, __pyx_L1_error)
  88019. __Pyx_GOTREF(__pyx_t_5);
  88020. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  88021. __pyx_v_msg = ((PyObject*)__pyx_t_5);
  88022. __pyx_t_5 = 0;
  88023. /* "uvloop/handles/streamserver.pyx":101
  88024. *
  88025. * msg = f'Fatal error on server {self.__class__.__name__}'
  88026. * if reason is not None: # <<<<<<<<<<<<<<
  88027. * msg = f'{msg} ({reason})'
  88028. *
  88029. */
  88030. __pyx_t_3 = (__pyx_v_reason != Py_None);
  88031. __pyx_t_4 = (__pyx_t_3 != 0);
  88032. if (__pyx_t_4) {
  88033. /* "uvloop/handles/streamserver.pyx":102
  88034. * msg = f'Fatal error on server {self.__class__.__name__}'
  88035. * if reason is not None:
  88036. * msg = f'{msg} ({reason})' # <<<<<<<<<<<<<<
  88037. *
  88038. * self._loop.call_exception_handler({
  88039. */
  88040. __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(19, 102, __pyx_L1_error)
  88041. __Pyx_GOTREF(__pyx_t_5);
  88042. __pyx_t_6 = 0;
  88043. __pyx_t_7 = 127;
  88044. __Pyx_INCREF(__pyx_v_msg);
  88045. __pyx_t_7 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_v_msg) > __pyx_t_7) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_v_msg) : __pyx_t_7;
  88046. __pyx_t_6 += __Pyx_PyUnicode_GET_LENGTH(__pyx_v_msg);
  88047. __Pyx_GIVEREF(__pyx_v_msg);
  88048. PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_msg);
  88049. __Pyx_INCREF(__pyx_kp_u__118);
  88050. __pyx_t_6 += 2;
  88051. __Pyx_GIVEREF(__pyx_kp_u__118);
  88052. PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_kp_u__118);
  88053. __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_v_reason, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 102, __pyx_L1_error)
  88054. __Pyx_GOTREF(__pyx_t_1);
  88055. __pyx_t_7 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) > __pyx_t_7) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) : __pyx_t_7;
  88056. __pyx_t_6 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1);
  88057. __Pyx_GIVEREF(__pyx_t_1);
  88058. PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_1);
  88059. __pyx_t_1 = 0;
  88060. __Pyx_INCREF(__pyx_kp_u__119);
  88061. __pyx_t_6 += 1;
  88062. __Pyx_GIVEREF(__pyx_kp_u__119);
  88063. PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_kp_u__119);
  88064. __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_5, 4, __pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 102, __pyx_L1_error)
  88065. __Pyx_GOTREF(__pyx_t_1);
  88066. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  88067. __Pyx_DECREF_SET(__pyx_v_msg, ((PyObject*)__pyx_t_1));
  88068. __pyx_t_1 = 0;
  88069. /* "uvloop/handles/streamserver.pyx":101
  88070. *
  88071. * msg = f'Fatal error on server {self.__class__.__name__}'
  88072. * if reason is not None: # <<<<<<<<<<<<<<
  88073. * msg = f'{msg} ({reason})'
  88074. *
  88075. */
  88076. }
  88077. /* "uvloop/handles/streamserver.pyx":104
  88078. * msg = f'{msg} ({reason})'
  88079. *
  88080. * self._loop.call_exception_handler({ # <<<<<<<<<<<<<<
  88081. * 'message': msg,
  88082. * 'exception': exc,
  88083. */
  88084. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._loop), __pyx_n_s_call_exception_handler); if (unlikely(!__pyx_t_5)) __PYX_ERR(19, 104, __pyx_L1_error)
  88085. __Pyx_GOTREF(__pyx_t_5);
  88086. /* "uvloop/handles/streamserver.pyx":105
  88087. *
  88088. * self._loop.call_exception_handler({
  88089. * 'message': msg, # <<<<<<<<<<<<<<
  88090. * 'exception': exc,
  88091. * })
  88092. */
  88093. __pyx_t_8 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(19, 105, __pyx_L1_error)
  88094. __Pyx_GOTREF(__pyx_t_8);
  88095. if (PyDict_SetItem(__pyx_t_8, __pyx_n_u_message, __pyx_v_msg) < 0) __PYX_ERR(19, 105, __pyx_L1_error)
  88096. /* "uvloop/handles/streamserver.pyx":106
  88097. * self._loop.call_exception_handler({
  88098. * 'message': msg,
  88099. * 'exception': exc, # <<<<<<<<<<<<<<
  88100. * })
  88101. *
  88102. */
  88103. if (PyDict_SetItem(__pyx_t_8, __pyx_n_u_exception, __pyx_v_exc) < 0) __PYX_ERR(19, 105, __pyx_L1_error)
  88104. __pyx_t_9 = NULL;
  88105. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
  88106. __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5);
  88107. if (likely(__pyx_t_9)) {
  88108. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
  88109. __Pyx_INCREF(__pyx_t_9);
  88110. __Pyx_INCREF(function);
  88111. __Pyx_DECREF_SET(__pyx_t_5, function);
  88112. }
  88113. }
  88114. __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_8);
  88115. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  88116. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  88117. if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 104, __pyx_L1_error)
  88118. __Pyx_GOTREF(__pyx_t_1);
  88119. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  88120. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  88121. /* "uvloop/handles/streamserver.pyx":95
  88122. * self._close()
  88123. *
  88124. * if not isinstance(exc, OSError): # <<<<<<<<<<<<<<
  88125. *
  88126. * if throw or self._loop is None:
  88127. */
  88128. }
  88129. /* "uvloop/handles/streamserver.pyx":90
  88130. * client._accept(<UVStream>self)
  88131. *
  88132. * cdef _fatal_error(self, exc, throw, reason=None): # <<<<<<<<<<<<<<
  88133. * # Overload UVHandle._fatal_error
  88134. *
  88135. */
  88136. /* function exit code */
  88137. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  88138. goto __pyx_L0;
  88139. __pyx_L1_error:;
  88140. __Pyx_XDECREF(__pyx_t_1);
  88141. __Pyx_XDECREF(__pyx_t_5);
  88142. __Pyx_XDECREF(__pyx_t_8);
  88143. __Pyx_XDECREF(__pyx_t_9);
  88144. __Pyx_AddTraceback("uvloop.loop.UVStreamServer._fatal_error", __pyx_clineno, __pyx_lineno, __pyx_filename);
  88145. __pyx_r = 0;
  88146. __pyx_L0:;
  88147. __Pyx_XDECREF(__pyx_v_msg);
  88148. __Pyx_XGIVEREF(__pyx_r);
  88149. __Pyx_RefNannyFinishContext();
  88150. return __pyx_r;
  88151. }
  88152. /* "uvloop/handles/streamserver.pyx":109
  88153. * })
  88154. *
  88155. * cdef inline _mark_as_open(self): # <<<<<<<<<<<<<<
  88156. * self.opened = 1
  88157. *
  88158. */
  88159. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_14UVStreamServer__mark_as_open(struct __pyx_obj_6uvloop_4loop_UVStreamServer *__pyx_v_self) {
  88160. PyObject *__pyx_r = NULL;
  88161. __Pyx_RefNannyDeclarations
  88162. __Pyx_RefNannySetupContext("_mark_as_open", 0);
  88163. /* "uvloop/handles/streamserver.pyx":110
  88164. *
  88165. * cdef inline _mark_as_open(self):
  88166. * self.opened = 1 # <<<<<<<<<<<<<<
  88167. *
  88168. * cdef UVStream _make_new_transport(self, object protocol, object waiter):
  88169. */
  88170. __pyx_v_self->opened = 1;
  88171. /* "uvloop/handles/streamserver.pyx":109
  88172. * })
  88173. *
  88174. * cdef inline _mark_as_open(self): # <<<<<<<<<<<<<<
  88175. * self.opened = 1
  88176. *
  88177. */
  88178. /* function exit code */
  88179. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  88180. __Pyx_XGIVEREF(__pyx_r);
  88181. __Pyx_RefNannyFinishContext();
  88182. return __pyx_r;
  88183. }
  88184. /* "uvloop/handles/streamserver.pyx":112
  88185. * self.opened = 1
  88186. *
  88187. * cdef UVStream _make_new_transport(self, object protocol, object waiter): # <<<<<<<<<<<<<<
  88188. * raise NotImplementedError
  88189. *
  88190. */
  88191. static struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_f_6uvloop_4loop_14UVStreamServer__make_new_transport(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVStreamServer *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_protocol, CYTHON_UNUSED PyObject *__pyx_v_waiter) {
  88192. struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_r = NULL;
  88193. __Pyx_RefNannyDeclarations
  88194. __Pyx_RefNannySetupContext("_make_new_transport", 0);
  88195. /* "uvloop/handles/streamserver.pyx":113
  88196. *
  88197. * cdef UVStream _make_new_transport(self, object protocol, object waiter):
  88198. * raise NotImplementedError # <<<<<<<<<<<<<<
  88199. *
  88200. * def __on_ssl_connected(self, transport, fut):
  88201. */
  88202. __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0);
  88203. __PYX_ERR(19, 113, __pyx_L1_error)
  88204. /* "uvloop/handles/streamserver.pyx":112
  88205. * self.opened = 1
  88206. *
  88207. * cdef UVStream _make_new_transport(self, object protocol, object waiter): # <<<<<<<<<<<<<<
  88208. * raise NotImplementedError
  88209. *
  88210. */
  88211. /* function exit code */
  88212. __pyx_L1_error:;
  88213. __Pyx_AddTraceback("uvloop.loop.UVStreamServer._make_new_transport", __pyx_clineno, __pyx_lineno, __pyx_filename);
  88214. __pyx_r = 0;
  88215. __Pyx_XGIVEREF((PyObject *)__pyx_r);
  88216. __Pyx_RefNannyFinishContext();
  88217. return __pyx_r;
  88218. }
  88219. /* "uvloop/handles/streamserver.pyx":115
  88220. * raise NotImplementedError
  88221. *
  88222. * def __on_ssl_connected(self, transport, fut): # <<<<<<<<<<<<<<
  88223. * exc = fut.exception()
  88224. * if exc is not None:
  88225. */
  88226. /* Python wrapper */
  88227. static PyObject *__pyx_pw_6uvloop_4loop_14UVStreamServer_3__on_ssl_connected(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  88228. static char __pyx_doc_6uvloop_4loop_14UVStreamServer_2__on_ssl_connected[] = "UVStreamServer.__on_ssl_connected(self, transport, fut)";
  88229. static PyObject *__pyx_pw_6uvloop_4loop_14UVStreamServer_3__on_ssl_connected(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  88230. PyObject *__pyx_v_transport = 0;
  88231. PyObject *__pyx_v_fut = 0;
  88232. PyObject *__pyx_r = 0;
  88233. __Pyx_RefNannyDeclarations
  88234. __Pyx_RefNannySetupContext("__on_ssl_connected (wrapper)", 0);
  88235. {
  88236. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_transport,&__pyx_n_s_fut,0};
  88237. PyObject* values[2] = {0,0};
  88238. if (unlikely(__pyx_kwds)) {
  88239. Py_ssize_t kw_args;
  88240. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  88241. switch (pos_args) {
  88242. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  88243. CYTHON_FALLTHROUGH;
  88244. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  88245. CYTHON_FALLTHROUGH;
  88246. case 0: break;
  88247. default: goto __pyx_L5_argtuple_error;
  88248. }
  88249. kw_args = PyDict_Size(__pyx_kwds);
  88250. switch (pos_args) {
  88251. case 0:
  88252. if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_transport)) != 0)) kw_args--;
  88253. else goto __pyx_L5_argtuple_error;
  88254. CYTHON_FALLTHROUGH;
  88255. case 1:
  88256. if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_fut)) != 0)) kw_args--;
  88257. else {
  88258. __Pyx_RaiseArgtupleInvalid("__on_ssl_connected", 1, 2, 2, 1); __PYX_ERR(19, 115, __pyx_L3_error)
  88259. }
  88260. }
  88261. if (unlikely(kw_args > 0)) {
  88262. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__on_ssl_connected") < 0)) __PYX_ERR(19, 115, __pyx_L3_error)
  88263. }
  88264. } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
  88265. goto __pyx_L5_argtuple_error;
  88266. } else {
  88267. values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  88268. values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  88269. }
  88270. __pyx_v_transport = values[0];
  88271. __pyx_v_fut = values[1];
  88272. }
  88273. goto __pyx_L4_argument_unpacking_done;
  88274. __pyx_L5_argtuple_error:;
  88275. __Pyx_RaiseArgtupleInvalid("__on_ssl_connected", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(19, 115, __pyx_L3_error)
  88276. __pyx_L3_error:;
  88277. __Pyx_AddTraceback("uvloop.loop.UVStreamServer.__on_ssl_connected", __pyx_clineno, __pyx_lineno, __pyx_filename);
  88278. __Pyx_RefNannyFinishContext();
  88279. return NULL;
  88280. __pyx_L4_argument_unpacking_done:;
  88281. __pyx_r = __pyx_pf_6uvloop_4loop_14UVStreamServer_2__on_ssl_connected(((struct __pyx_obj_6uvloop_4loop_UVStreamServer *)__pyx_v_self), __pyx_v_transport, __pyx_v_fut);
  88282. /* function exit code */
  88283. __Pyx_RefNannyFinishContext();
  88284. return __pyx_r;
  88285. }
  88286. static PyObject *__pyx_pf_6uvloop_4loop_14UVStreamServer_2__on_ssl_connected(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVStreamServer *__pyx_v_self, PyObject *__pyx_v_transport, PyObject *__pyx_v_fut) {
  88287. PyObject *__pyx_v_exc = NULL;
  88288. PyObject *__pyx_r = NULL;
  88289. __Pyx_RefNannyDeclarations
  88290. PyObject *__pyx_t_1 = NULL;
  88291. PyObject *__pyx_t_2 = NULL;
  88292. PyObject *__pyx_t_3 = NULL;
  88293. int __pyx_t_4;
  88294. int __pyx_t_5;
  88295. __Pyx_RefNannySetupContext("__on_ssl_connected", 0);
  88296. /* "uvloop/handles/streamserver.pyx":116
  88297. *
  88298. * def __on_ssl_connected(self, transport, fut):
  88299. * exc = fut.exception() # <<<<<<<<<<<<<<
  88300. * if exc is not None:
  88301. * transport._force_close(exc)
  88302. */
  88303. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_fut, __pyx_n_s_exception); if (unlikely(!__pyx_t_2)) __PYX_ERR(19, 116, __pyx_L1_error)
  88304. __Pyx_GOTREF(__pyx_t_2);
  88305. __pyx_t_3 = NULL;
  88306. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
  88307. __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
  88308. if (likely(__pyx_t_3)) {
  88309. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  88310. __Pyx_INCREF(__pyx_t_3);
  88311. __Pyx_INCREF(function);
  88312. __Pyx_DECREF_SET(__pyx_t_2, function);
  88313. }
  88314. }
  88315. __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  88316. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  88317. if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 116, __pyx_L1_error)
  88318. __Pyx_GOTREF(__pyx_t_1);
  88319. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  88320. __pyx_v_exc = __pyx_t_1;
  88321. __pyx_t_1 = 0;
  88322. /* "uvloop/handles/streamserver.pyx":117
  88323. * def __on_ssl_connected(self, transport, fut):
  88324. * exc = fut.exception()
  88325. * if exc is not None: # <<<<<<<<<<<<<<
  88326. * transport._force_close(exc)
  88327. *
  88328. */
  88329. __pyx_t_4 = (__pyx_v_exc != Py_None);
  88330. __pyx_t_5 = (__pyx_t_4 != 0);
  88331. if (__pyx_t_5) {
  88332. /* "uvloop/handles/streamserver.pyx":118
  88333. * exc = fut.exception()
  88334. * if exc is not None:
  88335. * transport._force_close(exc) # <<<<<<<<<<<<<<
  88336. *
  88337. *
  88338. */
  88339. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_transport, __pyx_n_s_force_close); if (unlikely(!__pyx_t_2)) __PYX_ERR(19, 118, __pyx_L1_error)
  88340. __Pyx_GOTREF(__pyx_t_2);
  88341. __pyx_t_3 = NULL;
  88342. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
  88343. __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
  88344. if (likely(__pyx_t_3)) {
  88345. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  88346. __Pyx_INCREF(__pyx_t_3);
  88347. __Pyx_INCREF(function);
  88348. __Pyx_DECREF_SET(__pyx_t_2, function);
  88349. }
  88350. }
  88351. __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_exc) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_exc);
  88352. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  88353. if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 118, __pyx_L1_error)
  88354. __Pyx_GOTREF(__pyx_t_1);
  88355. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  88356. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  88357. /* "uvloop/handles/streamserver.pyx":117
  88358. * def __on_ssl_connected(self, transport, fut):
  88359. * exc = fut.exception()
  88360. * if exc is not None: # <<<<<<<<<<<<<<
  88361. * transport._force_close(exc)
  88362. *
  88363. */
  88364. }
  88365. /* "uvloop/handles/streamserver.pyx":115
  88366. * raise NotImplementedError
  88367. *
  88368. * def __on_ssl_connected(self, transport, fut): # <<<<<<<<<<<<<<
  88369. * exc = fut.exception()
  88370. * if exc is not None:
  88371. */
  88372. /* function exit code */
  88373. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  88374. goto __pyx_L0;
  88375. __pyx_L1_error:;
  88376. __Pyx_XDECREF(__pyx_t_1);
  88377. __Pyx_XDECREF(__pyx_t_2);
  88378. __Pyx_XDECREF(__pyx_t_3);
  88379. __Pyx_AddTraceback("uvloop.loop.UVStreamServer.__on_ssl_connected", __pyx_clineno, __pyx_lineno, __pyx_filename);
  88380. __pyx_r = NULL;
  88381. __pyx_L0:;
  88382. __Pyx_XDECREF(__pyx_v_exc);
  88383. __Pyx_XGIVEREF(__pyx_r);
  88384. __Pyx_RefNannyFinishContext();
  88385. return __pyx_r;
  88386. }
  88387. /* "(tree fragment)":1
  88388. * def __reduce_cython__(self): # <<<<<<<<<<<<<<
  88389. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  88390. * def __setstate_cython__(self, __pyx_state):
  88391. */
  88392. /* Python wrapper */
  88393. static PyObject *__pyx_pw_6uvloop_4loop_14UVStreamServer_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  88394. static char __pyx_doc_6uvloop_4loop_14UVStreamServer_4__reduce_cython__[] = "UVStreamServer.__reduce_cython__(self)";
  88395. static PyObject *__pyx_pw_6uvloop_4loop_14UVStreamServer_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  88396. PyObject *__pyx_r = 0;
  88397. __Pyx_RefNannyDeclarations
  88398. __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  88399. __pyx_r = __pyx_pf_6uvloop_4loop_14UVStreamServer_4__reduce_cython__(((struct __pyx_obj_6uvloop_4loop_UVStreamServer *)__pyx_v_self));
  88400. /* function exit code */
  88401. __Pyx_RefNannyFinishContext();
  88402. return __pyx_r;
  88403. }
  88404. static PyObject *__pyx_pf_6uvloop_4loop_14UVStreamServer_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVStreamServer *__pyx_v_self) {
  88405. PyObject *__pyx_r = NULL;
  88406. __Pyx_RefNannyDeclarations
  88407. PyObject *__pyx_t_1 = NULL;
  88408. __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  88409. /* "(tree fragment)":2
  88410. * def __reduce_cython__(self):
  88411. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  88412. * def __setstate_cython__(self, __pyx_state):
  88413. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  88414. */
  88415. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__144, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 2, __pyx_L1_error)
  88416. __Pyx_GOTREF(__pyx_t_1);
  88417. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  88418. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  88419. __PYX_ERR(9, 2, __pyx_L1_error)
  88420. /* "(tree fragment)":1
  88421. * def __reduce_cython__(self): # <<<<<<<<<<<<<<
  88422. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  88423. * def __setstate_cython__(self, __pyx_state):
  88424. */
  88425. /* function exit code */
  88426. __pyx_L1_error:;
  88427. __Pyx_XDECREF(__pyx_t_1);
  88428. __Pyx_AddTraceback("uvloop.loop.UVStreamServer.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  88429. __pyx_r = NULL;
  88430. __Pyx_XGIVEREF(__pyx_r);
  88431. __Pyx_RefNannyFinishContext();
  88432. return __pyx_r;
  88433. }
  88434. /* "(tree fragment)":3
  88435. * def __reduce_cython__(self):
  88436. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  88437. * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
  88438. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  88439. */
  88440. /* Python wrapper */
  88441. static PyObject *__pyx_pw_6uvloop_4loop_14UVStreamServer_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
  88442. static char __pyx_doc_6uvloop_4loop_14UVStreamServer_6__setstate_cython__[] = "UVStreamServer.__setstate_cython__(self, __pyx_state)";
  88443. static PyObject *__pyx_pw_6uvloop_4loop_14UVStreamServer_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  88444. PyObject *__pyx_r = 0;
  88445. __Pyx_RefNannyDeclarations
  88446. __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  88447. __pyx_r = __pyx_pf_6uvloop_4loop_14UVStreamServer_6__setstate_cython__(((struct __pyx_obj_6uvloop_4loop_UVStreamServer *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
  88448. /* function exit code */
  88449. __Pyx_RefNannyFinishContext();
  88450. return __pyx_r;
  88451. }
  88452. static PyObject *__pyx_pf_6uvloop_4loop_14UVStreamServer_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVStreamServer *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  88453. PyObject *__pyx_r = NULL;
  88454. __Pyx_RefNannyDeclarations
  88455. PyObject *__pyx_t_1 = NULL;
  88456. __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  88457. /* "(tree fragment)":4
  88458. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  88459. * def __setstate_cython__(self, __pyx_state):
  88460. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  88461. */
  88462. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__145, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 4, __pyx_L1_error)
  88463. __Pyx_GOTREF(__pyx_t_1);
  88464. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  88465. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  88466. __PYX_ERR(9, 4, __pyx_L1_error)
  88467. /* "(tree fragment)":3
  88468. * def __reduce_cython__(self):
  88469. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  88470. * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
  88471. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  88472. */
  88473. /* function exit code */
  88474. __pyx_L1_error:;
  88475. __Pyx_XDECREF(__pyx_t_1);
  88476. __Pyx_AddTraceback("uvloop.loop.UVStreamServer.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  88477. __pyx_r = NULL;
  88478. __Pyx_XGIVEREF(__pyx_r);
  88479. __Pyx_RefNannyFinishContext();
  88480. return __pyx_r;
  88481. }
  88482. /* "uvloop/handles/streamserver.pyx":121
  88483. *
  88484. *
  88485. * cdef void __uv_streamserver_on_listen(uv.uv_stream_t* handle, # <<<<<<<<<<<<<<
  88486. * int status) with gil:
  88487. *
  88488. */
  88489. static void __pyx_f_6uvloop_4loop___uv_streamserver_on_listen(uv_stream_t *__pyx_v_handle, int __pyx_v_status) {
  88490. struct __pyx_obj_6uvloop_4loop_UVStreamServer *__pyx_v_stream = 0;
  88491. PyObject *__pyx_v_exc = NULL;
  88492. __Pyx_RefNannyDeclarations
  88493. int __pyx_t_1;
  88494. PyObject *__pyx_t_2 = NULL;
  88495. struct __pyx_obj_6uvloop_4loop_Loop *__pyx_t_3 = NULL;
  88496. struct __pyx_opt_args_6uvloop_4loop_8UVHandle__fatal_error __pyx_t_4;
  88497. PyObject *__pyx_t_5 = NULL;
  88498. PyObject *__pyx_t_6 = NULL;
  88499. PyObject *__pyx_t_7 = NULL;
  88500. int __pyx_t_8;
  88501. PyObject *__pyx_t_9 = NULL;
  88502. PyObject *__pyx_t_10 = NULL;
  88503. PyObject *__pyx_t_11 = NULL;
  88504. int __pyx_t_12;
  88505. char const *__pyx_t_13;
  88506. PyObject *__pyx_t_14 = NULL;
  88507. PyObject *__pyx_t_15 = NULL;
  88508. PyObject *__pyx_t_16 = NULL;
  88509. PyObject *__pyx_t_17 = NULL;
  88510. PyObject *__pyx_t_18 = NULL;
  88511. PyObject *__pyx_t_19 = NULL;
  88512. #ifdef WITH_THREAD
  88513. PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  88514. #endif
  88515. __Pyx_RefNannySetupContext("__uv_streamserver_on_listen", 0);
  88516. /* "uvloop/handles/streamserver.pyx":127
  88517. *
  88518. * if __ensure_handle_data(<uv.uv_handle_t*>handle,
  88519. * "UVStream listen callback") == 0: # <<<<<<<<<<<<<<
  88520. * return
  88521. *
  88522. */
  88523. __pyx_t_1 = ((__pyx_f_6uvloop_4loop___ensure_handle_data(((uv_handle_t *)__pyx_v_handle), ((char const *)"UVStream listen callback")) == 0) != 0);
  88524. /* "uvloop/handles/streamserver.pyx":126
  88525. * # callback for uv_listen
  88526. *
  88527. * if __ensure_handle_data(<uv.uv_handle_t*>handle, # <<<<<<<<<<<<<<
  88528. * "UVStream listen callback") == 0:
  88529. * return
  88530. */
  88531. if (__pyx_t_1) {
  88532. /* "uvloop/handles/streamserver.pyx":128
  88533. * if __ensure_handle_data(<uv.uv_handle_t*>handle,
  88534. * "UVStream listen callback") == 0:
  88535. * return # <<<<<<<<<<<<<<
  88536. *
  88537. * cdef:
  88538. */
  88539. goto __pyx_L0;
  88540. /* "uvloop/handles/streamserver.pyx":126
  88541. * # callback for uv_listen
  88542. *
  88543. * if __ensure_handle_data(<uv.uv_handle_t*>handle, # <<<<<<<<<<<<<<
  88544. * "UVStream listen callback") == 0:
  88545. * return
  88546. */
  88547. }
  88548. /* "uvloop/handles/streamserver.pyx":131
  88549. *
  88550. * cdef:
  88551. * UVStreamServer stream = <UVStreamServer> handle.data # <<<<<<<<<<<<<<
  88552. *
  88553. * if status < 0:
  88554. */
  88555. __pyx_t_2 = ((PyObject *)__pyx_v_handle->data);
  88556. __Pyx_INCREF(__pyx_t_2);
  88557. __pyx_v_stream = ((struct __pyx_obj_6uvloop_4loop_UVStreamServer *)__pyx_t_2);
  88558. __pyx_t_2 = 0;
  88559. /* "uvloop/handles/streamserver.pyx":133
  88560. * UVStreamServer stream = <UVStreamServer> handle.data
  88561. *
  88562. * if status < 0: # <<<<<<<<<<<<<<
  88563. * if UVLOOP_DEBUG:
  88564. * stream._loop._debug_stream_listen_errors_total += 1
  88565. */
  88566. __pyx_t_1 = ((__pyx_v_status < 0) != 0);
  88567. if (__pyx_t_1) {
  88568. /* "uvloop/handles/streamserver.pyx":134
  88569. *
  88570. * if status < 0:
  88571. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  88572. * stream._loop._debug_stream_listen_errors_total += 1
  88573. *
  88574. */
  88575. __pyx_t_1 = (UVLOOP_DEBUG != 0);
  88576. if (__pyx_t_1) {
  88577. /* "uvloop/handles/streamserver.pyx":135
  88578. * if status < 0:
  88579. * if UVLOOP_DEBUG:
  88580. * stream._loop._debug_stream_listen_errors_total += 1 # <<<<<<<<<<<<<<
  88581. *
  88582. * exc = convert_error(status)
  88583. */
  88584. __Pyx_INCREF(((PyObject *)__pyx_v_stream->__pyx_base.__pyx_base._loop));
  88585. __pyx_t_3 = __pyx_v_stream->__pyx_base.__pyx_base._loop;
  88586. __pyx_t_3->_debug_stream_listen_errors_total = (__pyx_t_3->_debug_stream_listen_errors_total + 1);
  88587. __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  88588. /* "uvloop/handles/streamserver.pyx":134
  88589. *
  88590. * if status < 0:
  88591. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  88592. * stream._loop._debug_stream_listen_errors_total += 1
  88593. *
  88594. */
  88595. }
  88596. /* "uvloop/handles/streamserver.pyx":137
  88597. * stream._loop._debug_stream_listen_errors_total += 1
  88598. *
  88599. * exc = convert_error(status) # <<<<<<<<<<<<<<
  88600. * stream._fatal_error(
  88601. * exc, False, "error status in uv_stream_t.listen callback")
  88602. */
  88603. __pyx_t_2 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_status); if (unlikely(!__pyx_t_2)) __PYX_ERR(19, 137, __pyx_L1_error)
  88604. __Pyx_GOTREF(__pyx_t_2);
  88605. __pyx_v_exc = __pyx_t_2;
  88606. __pyx_t_2 = 0;
  88607. /* "uvloop/handles/streamserver.pyx":138
  88608. *
  88609. * exc = convert_error(status)
  88610. * stream._fatal_error( # <<<<<<<<<<<<<<
  88611. * exc, False, "error status in uv_stream_t.listen callback")
  88612. * return
  88613. */
  88614. __pyx_t_4.__pyx_n = 1;
  88615. __pyx_t_4.reason = __pyx_kp_u_error_status_in_uv_stream_t_list;
  88616. __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStreamServer *)__pyx_v_stream->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._fatal_error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_stream), __pyx_v_exc, Py_False, &__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(19, 138, __pyx_L1_error)
  88617. __Pyx_GOTREF(__pyx_t_2);
  88618. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  88619. /* "uvloop/handles/streamserver.pyx":140
  88620. * stream._fatal_error(
  88621. * exc, False, "error status in uv_stream_t.listen callback")
  88622. * return # <<<<<<<<<<<<<<
  88623. *
  88624. * try:
  88625. */
  88626. goto __pyx_L0;
  88627. /* "uvloop/handles/streamserver.pyx":133
  88628. * UVStreamServer stream = <UVStreamServer> handle.data
  88629. *
  88630. * if status < 0: # <<<<<<<<<<<<<<
  88631. * if UVLOOP_DEBUG:
  88632. * stream._loop._debug_stream_listen_errors_total += 1
  88633. */
  88634. }
  88635. /* "uvloop/handles/streamserver.pyx":142
  88636. * return
  88637. *
  88638. * try: # <<<<<<<<<<<<<<
  88639. * stream._on_listen()
  88640. * except BaseException as exc:
  88641. */
  88642. {
  88643. __Pyx_PyThreadState_declare
  88644. __Pyx_PyThreadState_assign
  88645. __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7);
  88646. __Pyx_XGOTREF(__pyx_t_5);
  88647. __Pyx_XGOTREF(__pyx_t_6);
  88648. __Pyx_XGOTREF(__pyx_t_7);
  88649. /*try:*/ {
  88650. /* "uvloop/handles/streamserver.pyx":143
  88651. *
  88652. * try:
  88653. * stream._on_listen() # <<<<<<<<<<<<<<
  88654. * except BaseException as exc:
  88655. * stream._error(exc, False)
  88656. */
  88657. __pyx_t_2 = __pyx_f_6uvloop_4loop_14UVStreamServer__on_listen(__pyx_v_stream); if (unlikely(!__pyx_t_2)) __PYX_ERR(19, 143, __pyx_L6_error)
  88658. __Pyx_GOTREF(__pyx_t_2);
  88659. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  88660. /* "uvloop/handles/streamserver.pyx":142
  88661. * return
  88662. *
  88663. * try: # <<<<<<<<<<<<<<
  88664. * stream._on_listen()
  88665. * except BaseException as exc:
  88666. */
  88667. }
  88668. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  88669. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  88670. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  88671. goto __pyx_L11_try_end;
  88672. __pyx_L6_error:;
  88673. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  88674. __Pyx_XDECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  88675. /* "uvloop/handles/streamserver.pyx":144
  88676. * try:
  88677. * stream._on_listen()
  88678. * except BaseException as exc: # <<<<<<<<<<<<<<
  88679. * stream._error(exc, False)
  88680. */
  88681. __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_BaseException);
  88682. if (__pyx_t_8) {
  88683. __Pyx_AddTraceback("uvloop.loop.__uv_streamserver_on_listen", __pyx_clineno, __pyx_lineno, __pyx_filename);
  88684. if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_9, &__pyx_t_10) < 0) __PYX_ERR(19, 144, __pyx_L8_except_error)
  88685. __Pyx_GOTREF(__pyx_t_2);
  88686. __Pyx_GOTREF(__pyx_t_9);
  88687. __Pyx_GOTREF(__pyx_t_10);
  88688. __Pyx_INCREF(__pyx_t_9);
  88689. __pyx_v_exc = __pyx_t_9;
  88690. /*try:*/ {
  88691. /* "uvloop/handles/streamserver.pyx":145
  88692. * stream._on_listen()
  88693. * except BaseException as exc:
  88694. * stream._error(exc, False) # <<<<<<<<<<<<<<
  88695. */
  88696. __pyx_t_11 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStreamServer *)__pyx_v_stream->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_stream), __pyx_v_exc, Py_False); if (unlikely(!__pyx_t_11)) __PYX_ERR(19, 145, __pyx_L17_error)
  88697. __Pyx_GOTREF(__pyx_t_11);
  88698. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  88699. }
  88700. /* "uvloop/handles/streamserver.pyx":144
  88701. * try:
  88702. * stream._on_listen()
  88703. * except BaseException as exc: # <<<<<<<<<<<<<<
  88704. * stream._error(exc, False)
  88705. */
  88706. /*finally:*/ {
  88707. /*normal exit:*/{
  88708. __Pyx_DECREF(__pyx_v_exc);
  88709. __pyx_v_exc = NULL;
  88710. goto __pyx_L18;
  88711. }
  88712. __pyx_L17_error:;
  88713. /*exception exit:*/{
  88714. __Pyx_PyThreadState_declare
  88715. __Pyx_PyThreadState_assign
  88716. __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0;
  88717. __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
  88718. __Pyx_XDECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  88719. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19);
  88720. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16) < 0)) __Pyx_ErrFetch(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16);
  88721. __Pyx_XGOTREF(__pyx_t_14);
  88722. __Pyx_XGOTREF(__pyx_t_15);
  88723. __Pyx_XGOTREF(__pyx_t_16);
  88724. __Pyx_XGOTREF(__pyx_t_17);
  88725. __Pyx_XGOTREF(__pyx_t_18);
  88726. __Pyx_XGOTREF(__pyx_t_19);
  88727. __pyx_t_8 = __pyx_lineno; __pyx_t_12 = __pyx_clineno; __pyx_t_13 = __pyx_filename;
  88728. {
  88729. __Pyx_DECREF(__pyx_v_exc);
  88730. __pyx_v_exc = NULL;
  88731. }
  88732. if (PY_MAJOR_VERSION >= 3) {
  88733. __Pyx_XGIVEREF(__pyx_t_17);
  88734. __Pyx_XGIVEREF(__pyx_t_18);
  88735. __Pyx_XGIVEREF(__pyx_t_19);
  88736. __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_18, __pyx_t_19);
  88737. }
  88738. __Pyx_XGIVEREF(__pyx_t_14);
  88739. __Pyx_XGIVEREF(__pyx_t_15);
  88740. __Pyx_XGIVEREF(__pyx_t_16);
  88741. __Pyx_ErrRestore(__pyx_t_14, __pyx_t_15, __pyx_t_16);
  88742. __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0;
  88743. __pyx_lineno = __pyx_t_8; __pyx_clineno = __pyx_t_12; __pyx_filename = __pyx_t_13;
  88744. goto __pyx_L8_except_error;
  88745. }
  88746. __pyx_L18:;
  88747. }
  88748. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  88749. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  88750. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  88751. goto __pyx_L7_exception_handled;
  88752. }
  88753. goto __pyx_L8_except_error;
  88754. __pyx_L8_except_error:;
  88755. /* "uvloop/handles/streamserver.pyx":142
  88756. * return
  88757. *
  88758. * try: # <<<<<<<<<<<<<<
  88759. * stream._on_listen()
  88760. * except BaseException as exc:
  88761. */
  88762. __Pyx_XGIVEREF(__pyx_t_5);
  88763. __Pyx_XGIVEREF(__pyx_t_6);
  88764. __Pyx_XGIVEREF(__pyx_t_7);
  88765. __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
  88766. goto __pyx_L1_error;
  88767. __pyx_L7_exception_handled:;
  88768. __Pyx_XGIVEREF(__pyx_t_5);
  88769. __Pyx_XGIVEREF(__pyx_t_6);
  88770. __Pyx_XGIVEREF(__pyx_t_7);
  88771. __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
  88772. __pyx_L11_try_end:;
  88773. }
  88774. /* "uvloop/handles/streamserver.pyx":121
  88775. *
  88776. *
  88777. * cdef void __uv_streamserver_on_listen(uv.uv_stream_t* handle, # <<<<<<<<<<<<<<
  88778. * int status) with gil:
  88779. *
  88780. */
  88781. /* function exit code */
  88782. goto __pyx_L0;
  88783. __pyx_L1_error:;
  88784. __Pyx_XDECREF(__pyx_t_2);
  88785. __Pyx_XDECREF(((PyObject *)__pyx_t_3));
  88786. __Pyx_XDECREF(__pyx_t_9);
  88787. __Pyx_XDECREF(__pyx_t_10);
  88788. __Pyx_XDECREF(__pyx_t_11);
  88789. __Pyx_WriteUnraisable("uvloop.loop.__uv_streamserver_on_listen", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  88790. __pyx_L0:;
  88791. __Pyx_XDECREF((PyObject *)__pyx_v_stream);
  88792. __Pyx_XDECREF(__pyx_v_exc);
  88793. __Pyx_RefNannyFinishContext();
  88794. #ifdef WITH_THREAD
  88795. __Pyx_PyGILState_Release(__pyx_gilstate_save);
  88796. #endif
  88797. }
  88798. /* "uvloop/handles/tcp.pyx":1
  88799. * cdef __tcp_init_uv_handle(UVStream handle, Loop loop, unsigned int flags): # <<<<<<<<<<<<<<
  88800. * cdef int err
  88801. *
  88802. */
  88803. static PyObject *__pyx_f_6uvloop_4loop___tcp_init_uv_handle(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_handle, CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, unsigned int __pyx_v_flags) {
  88804. int __pyx_v_err;
  88805. PyObject *__pyx_r = NULL;
  88806. __Pyx_RefNannyDeclarations
  88807. int __pyx_t_1;
  88808. PyObject *__pyx_t_2 = NULL;
  88809. __Pyx_RefNannySetupContext("__tcp_init_uv_handle", 0);
  88810. /* "uvloop/handles/tcp.pyx":4
  88811. * cdef int err
  88812. *
  88813. * handle._handle = <uv.uv_handle_t*>PyMem_RawMalloc(sizeof(uv.uv_tcp_t)) # <<<<<<<<<<<<<<
  88814. * if handle._handle is NULL:
  88815. * handle._abort_init()
  88816. */
  88817. __pyx_v_handle->__pyx_base.__pyx_base.__pyx_base._handle = ((uv_handle_t *)PyMem_RawMalloc((sizeof(uv_tcp_t))));
  88818. /* "uvloop/handles/tcp.pyx":5
  88819. *
  88820. * handle._handle = <uv.uv_handle_t*>PyMem_RawMalloc(sizeof(uv.uv_tcp_t))
  88821. * if handle._handle is NULL: # <<<<<<<<<<<<<<
  88822. * handle._abort_init()
  88823. * raise MemoryError()
  88824. */
  88825. __pyx_t_1 = ((__pyx_v_handle->__pyx_base.__pyx_base.__pyx_base._handle == NULL) != 0);
  88826. if (unlikely(__pyx_t_1)) {
  88827. /* "uvloop/handles/tcp.pyx":6
  88828. * handle._handle = <uv.uv_handle_t*>PyMem_RawMalloc(sizeof(uv.uv_tcp_t))
  88829. * if handle._handle is NULL:
  88830. * handle._abort_init() # <<<<<<<<<<<<<<
  88831. * raise MemoryError()
  88832. *
  88833. */
  88834. __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_handle->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._abort_init(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_handle)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6, __pyx_L1_error)
  88835. __Pyx_GOTREF(__pyx_t_2);
  88836. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  88837. /* "uvloop/handles/tcp.pyx":7
  88838. * if handle._handle is NULL:
  88839. * handle._abort_init()
  88840. * raise MemoryError() # <<<<<<<<<<<<<<
  88841. *
  88842. * err = uv.uv_tcp_init_ex(handle._loop.uvloop,
  88843. */
  88844. PyErr_NoMemory(); __PYX_ERR(5, 7, __pyx_L1_error)
  88845. /* "uvloop/handles/tcp.pyx":5
  88846. *
  88847. * handle._handle = <uv.uv_handle_t*>PyMem_RawMalloc(sizeof(uv.uv_tcp_t))
  88848. * if handle._handle is NULL: # <<<<<<<<<<<<<<
  88849. * handle._abort_init()
  88850. * raise MemoryError()
  88851. */
  88852. }
  88853. /* "uvloop/handles/tcp.pyx":9
  88854. * raise MemoryError()
  88855. *
  88856. * err = uv.uv_tcp_init_ex(handle._loop.uvloop, # <<<<<<<<<<<<<<
  88857. * <uv.uv_tcp_t*>handle._handle,
  88858. * flags)
  88859. */
  88860. __pyx_v_err = uv_tcp_init_ex(__pyx_v_handle->__pyx_base.__pyx_base.__pyx_base._loop->uvloop, ((uv_tcp_t *)__pyx_v_handle->__pyx_base.__pyx_base.__pyx_base._handle), __pyx_v_flags);
  88861. /* "uvloop/handles/tcp.pyx":12
  88862. * <uv.uv_tcp_t*>handle._handle,
  88863. * flags)
  88864. * if err < 0: # <<<<<<<<<<<<<<
  88865. * handle._abort_init()
  88866. * raise convert_error(err)
  88867. */
  88868. __pyx_t_1 = ((__pyx_v_err < 0) != 0);
  88869. if (unlikely(__pyx_t_1)) {
  88870. /* "uvloop/handles/tcp.pyx":13
  88871. * flags)
  88872. * if err < 0:
  88873. * handle._abort_init() # <<<<<<<<<<<<<<
  88874. * raise convert_error(err)
  88875. *
  88876. */
  88877. __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_handle->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._abort_init(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_handle)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 13, __pyx_L1_error)
  88878. __Pyx_GOTREF(__pyx_t_2);
  88879. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  88880. /* "uvloop/handles/tcp.pyx":14
  88881. * if err < 0:
  88882. * handle._abort_init()
  88883. * raise convert_error(err) # <<<<<<<<<<<<<<
  88884. *
  88885. * handle._finish_init()
  88886. */
  88887. __pyx_t_2 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 14, __pyx_L1_error)
  88888. __Pyx_GOTREF(__pyx_t_2);
  88889. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  88890. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  88891. __PYX_ERR(5, 14, __pyx_L1_error)
  88892. /* "uvloop/handles/tcp.pyx":12
  88893. * <uv.uv_tcp_t*>handle._handle,
  88894. * flags)
  88895. * if err < 0: # <<<<<<<<<<<<<<
  88896. * handle._abort_init()
  88897. * raise convert_error(err)
  88898. */
  88899. }
  88900. /* "uvloop/handles/tcp.pyx":16
  88901. * raise convert_error(err)
  88902. *
  88903. * handle._finish_init() # <<<<<<<<<<<<<<
  88904. *
  88905. *
  88906. */
  88907. __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_handle->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._finish_init(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_handle)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 16, __pyx_L1_error)
  88908. __Pyx_GOTREF(__pyx_t_2);
  88909. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  88910. /* "uvloop/handles/tcp.pyx":1
  88911. * cdef __tcp_init_uv_handle(UVStream handle, Loop loop, unsigned int flags): # <<<<<<<<<<<<<<
  88912. * cdef int err
  88913. *
  88914. */
  88915. /* function exit code */
  88916. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  88917. goto __pyx_L0;
  88918. __pyx_L1_error:;
  88919. __Pyx_XDECREF(__pyx_t_2);
  88920. __Pyx_AddTraceback("uvloop.loop.__tcp_init_uv_handle", __pyx_clineno, __pyx_lineno, __pyx_filename);
  88921. __pyx_r = 0;
  88922. __pyx_L0:;
  88923. __Pyx_XGIVEREF(__pyx_r);
  88924. __Pyx_RefNannyFinishContext();
  88925. return __pyx_r;
  88926. }
  88927. /* "uvloop/handles/tcp.pyx":19
  88928. *
  88929. *
  88930. * cdef __tcp_bind(UVStream handle, system.sockaddr* addr, unsigned int flags): # <<<<<<<<<<<<<<
  88931. * cdef int err
  88932. * err = uv.uv_tcp_bind(<uv.uv_tcp_t *>handle._handle,
  88933. */
  88934. static PyObject *__pyx_f_6uvloop_4loop___tcp_bind(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_handle, struct sockaddr *__pyx_v_addr, unsigned int __pyx_v_flags) {
  88935. int __pyx_v_err;
  88936. PyObject *__pyx_v_exc = NULL;
  88937. PyObject *__pyx_r = NULL;
  88938. __Pyx_RefNannyDeclarations
  88939. int __pyx_t_1;
  88940. PyObject *__pyx_t_2 = NULL;
  88941. __Pyx_RefNannySetupContext("__tcp_bind", 0);
  88942. /* "uvloop/handles/tcp.pyx":21
  88943. * cdef __tcp_bind(UVStream handle, system.sockaddr* addr, unsigned int flags):
  88944. * cdef int err
  88945. * err = uv.uv_tcp_bind(<uv.uv_tcp_t *>handle._handle, # <<<<<<<<<<<<<<
  88946. * addr, flags)
  88947. * if err < 0:
  88948. */
  88949. __pyx_v_err = uv_tcp_bind(((uv_tcp_t *)__pyx_v_handle->__pyx_base.__pyx_base.__pyx_base._handle), __pyx_v_addr, __pyx_v_flags);
  88950. /* "uvloop/handles/tcp.pyx":23
  88951. * err = uv.uv_tcp_bind(<uv.uv_tcp_t *>handle._handle,
  88952. * addr, flags)
  88953. * if err < 0: # <<<<<<<<<<<<<<
  88954. * exc = convert_error(err)
  88955. * raise exc
  88956. */
  88957. __pyx_t_1 = ((__pyx_v_err < 0) != 0);
  88958. if (unlikely(__pyx_t_1)) {
  88959. /* "uvloop/handles/tcp.pyx":24
  88960. * addr, flags)
  88961. * if err < 0:
  88962. * exc = convert_error(err) # <<<<<<<<<<<<<<
  88963. * raise exc
  88964. *
  88965. */
  88966. __pyx_t_2 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 24, __pyx_L1_error)
  88967. __Pyx_GOTREF(__pyx_t_2);
  88968. __pyx_v_exc = __pyx_t_2;
  88969. __pyx_t_2 = 0;
  88970. /* "uvloop/handles/tcp.pyx":25
  88971. * if err < 0:
  88972. * exc = convert_error(err)
  88973. * raise exc # <<<<<<<<<<<<<<
  88974. *
  88975. *
  88976. */
  88977. __Pyx_Raise(__pyx_v_exc, 0, 0, 0);
  88978. __PYX_ERR(5, 25, __pyx_L1_error)
  88979. /* "uvloop/handles/tcp.pyx":23
  88980. * err = uv.uv_tcp_bind(<uv.uv_tcp_t *>handle._handle,
  88981. * addr, flags)
  88982. * if err < 0: # <<<<<<<<<<<<<<
  88983. * exc = convert_error(err)
  88984. * raise exc
  88985. */
  88986. }
  88987. /* "uvloop/handles/tcp.pyx":19
  88988. *
  88989. *
  88990. * cdef __tcp_bind(UVStream handle, system.sockaddr* addr, unsigned int flags): # <<<<<<<<<<<<<<
  88991. * cdef int err
  88992. * err = uv.uv_tcp_bind(<uv.uv_tcp_t *>handle._handle,
  88993. */
  88994. /* function exit code */
  88995. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  88996. goto __pyx_L0;
  88997. __pyx_L1_error:;
  88998. __Pyx_XDECREF(__pyx_t_2);
  88999. __Pyx_AddTraceback("uvloop.loop.__tcp_bind", __pyx_clineno, __pyx_lineno, __pyx_filename);
  89000. __pyx_r = 0;
  89001. __pyx_L0:;
  89002. __Pyx_XDECREF(__pyx_v_exc);
  89003. __Pyx_XGIVEREF(__pyx_r);
  89004. __Pyx_RefNannyFinishContext();
  89005. return __pyx_r;
  89006. }
  89007. /* "uvloop/handles/tcp.pyx":28
  89008. *
  89009. *
  89010. * cdef __tcp_open(UVStream handle, int sockfd): # <<<<<<<<<<<<<<
  89011. * cdef int err
  89012. * err = uv.uv_tcp_open(<uv.uv_tcp_t *>handle._handle,
  89013. */
  89014. static PyObject *__pyx_f_6uvloop_4loop___tcp_open(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_handle, int __pyx_v_sockfd) {
  89015. int __pyx_v_err;
  89016. PyObject *__pyx_v_exc = NULL;
  89017. PyObject *__pyx_r = NULL;
  89018. __Pyx_RefNannyDeclarations
  89019. int __pyx_t_1;
  89020. PyObject *__pyx_t_2 = NULL;
  89021. __Pyx_RefNannySetupContext("__tcp_open", 0);
  89022. /* "uvloop/handles/tcp.pyx":30
  89023. * cdef __tcp_open(UVStream handle, int sockfd):
  89024. * cdef int err
  89025. * err = uv.uv_tcp_open(<uv.uv_tcp_t *>handle._handle, # <<<<<<<<<<<<<<
  89026. * <uv.uv_os_sock_t>sockfd)
  89027. * if err < 0:
  89028. */
  89029. __pyx_v_err = uv_tcp_open(((uv_tcp_t *)__pyx_v_handle->__pyx_base.__pyx_base.__pyx_base._handle), ((uv_os_sock_t)__pyx_v_sockfd));
  89030. /* "uvloop/handles/tcp.pyx":32
  89031. * err = uv.uv_tcp_open(<uv.uv_tcp_t *>handle._handle,
  89032. * <uv.uv_os_sock_t>sockfd)
  89033. * if err < 0: # <<<<<<<<<<<<<<
  89034. * exc = convert_error(err)
  89035. * raise exc
  89036. */
  89037. __pyx_t_1 = ((__pyx_v_err < 0) != 0);
  89038. if (unlikely(__pyx_t_1)) {
  89039. /* "uvloop/handles/tcp.pyx":33
  89040. * <uv.uv_os_sock_t>sockfd)
  89041. * if err < 0:
  89042. * exc = convert_error(err) # <<<<<<<<<<<<<<
  89043. * raise exc
  89044. *
  89045. */
  89046. __pyx_t_2 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 33, __pyx_L1_error)
  89047. __Pyx_GOTREF(__pyx_t_2);
  89048. __pyx_v_exc = __pyx_t_2;
  89049. __pyx_t_2 = 0;
  89050. /* "uvloop/handles/tcp.pyx":34
  89051. * if err < 0:
  89052. * exc = convert_error(err)
  89053. * raise exc # <<<<<<<<<<<<<<
  89054. *
  89055. *
  89056. */
  89057. __Pyx_Raise(__pyx_v_exc, 0, 0, 0);
  89058. __PYX_ERR(5, 34, __pyx_L1_error)
  89059. /* "uvloop/handles/tcp.pyx":32
  89060. * err = uv.uv_tcp_open(<uv.uv_tcp_t *>handle._handle,
  89061. * <uv.uv_os_sock_t>sockfd)
  89062. * if err < 0: # <<<<<<<<<<<<<<
  89063. * exc = convert_error(err)
  89064. * raise exc
  89065. */
  89066. }
  89067. /* "uvloop/handles/tcp.pyx":28
  89068. *
  89069. *
  89070. * cdef __tcp_open(UVStream handle, int sockfd): # <<<<<<<<<<<<<<
  89071. * cdef int err
  89072. * err = uv.uv_tcp_open(<uv.uv_tcp_t *>handle._handle,
  89073. */
  89074. /* function exit code */
  89075. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  89076. goto __pyx_L0;
  89077. __pyx_L1_error:;
  89078. __Pyx_XDECREF(__pyx_t_2);
  89079. __Pyx_AddTraceback("uvloop.loop.__tcp_open", __pyx_clineno, __pyx_lineno, __pyx_filename);
  89080. __pyx_r = 0;
  89081. __pyx_L0:;
  89082. __Pyx_XDECREF(__pyx_v_exc);
  89083. __Pyx_XGIVEREF(__pyx_r);
  89084. __Pyx_RefNannyFinishContext();
  89085. return __pyx_r;
  89086. }
  89087. /* "uvloop/handles/tcp.pyx":37
  89088. *
  89089. *
  89090. * cdef __tcp_get_socket(UVSocketHandle handle): # <<<<<<<<<<<<<<
  89091. * cdef:
  89092. * int buf_len = sizeof(system.sockaddr_storage)
  89093. */
  89094. static PyObject *__pyx_f_6uvloop_4loop___tcp_get_socket(struct __pyx_obj_6uvloop_4loop_UVSocketHandle *__pyx_v_handle) {
  89095. int __pyx_v_buf_len;
  89096. int __pyx_v_fileno;
  89097. int __pyx_v_err;
  89098. struct sockaddr_storage __pyx_v_buf;
  89099. PyObject *__pyx_r = NULL;
  89100. __Pyx_RefNannyDeclarations
  89101. PyObject *__pyx_t_1 = NULL;
  89102. int __pyx_t_2;
  89103. int __pyx_t_3;
  89104. PyObject *__pyx_t_4 = NULL;
  89105. PyObject *__pyx_t_5 = NULL;
  89106. PyObject *__pyx_t_6 = NULL;
  89107. __Pyx_RefNannySetupContext("__tcp_get_socket", 0);
  89108. /* "uvloop/handles/tcp.pyx":39
  89109. * cdef __tcp_get_socket(UVSocketHandle handle):
  89110. * cdef:
  89111. * int buf_len = sizeof(system.sockaddr_storage) # <<<<<<<<<<<<<<
  89112. * int fileno
  89113. * int err
  89114. */
  89115. __pyx_v_buf_len = (sizeof(struct sockaddr_storage));
  89116. /* "uvloop/handles/tcp.pyx":44
  89117. * system.sockaddr_storage buf
  89118. *
  89119. * fileno = handle._fileno() # <<<<<<<<<<<<<<
  89120. *
  89121. * err = uv.uv_tcp_getsockname(<uv.uv_tcp_t*>handle._handle,
  89122. */
  89123. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVSocketHandle *)__pyx_v_handle->__pyx_base.__pyx_vtab)->_fileno(__pyx_v_handle); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 44, __pyx_L1_error)
  89124. __Pyx_GOTREF(__pyx_t_1);
  89125. __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(5, 44, __pyx_L1_error)
  89126. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  89127. __pyx_v_fileno = __pyx_t_2;
  89128. /* "uvloop/handles/tcp.pyx":46
  89129. * fileno = handle._fileno()
  89130. *
  89131. * err = uv.uv_tcp_getsockname(<uv.uv_tcp_t*>handle._handle, # <<<<<<<<<<<<<<
  89132. * <system.sockaddr*>&buf,
  89133. * &buf_len)
  89134. */
  89135. __pyx_v_err = uv_tcp_getsockname(((uv_tcp_t *)__pyx_v_handle->__pyx_base._handle), ((struct sockaddr *)(&__pyx_v_buf)), (&__pyx_v_buf_len));
  89136. /* "uvloop/handles/tcp.pyx":49
  89137. * <system.sockaddr*>&buf,
  89138. * &buf_len)
  89139. * if err < 0: # <<<<<<<<<<<<<<
  89140. * raise convert_error(err)
  89141. *
  89142. */
  89143. __pyx_t_3 = ((__pyx_v_err < 0) != 0);
  89144. if (unlikely(__pyx_t_3)) {
  89145. /* "uvloop/handles/tcp.pyx":50
  89146. * &buf_len)
  89147. * if err < 0:
  89148. * raise convert_error(err) # <<<<<<<<<<<<<<
  89149. *
  89150. * return PseudoSocket(buf.ss_family, uv.SOCK_STREAM, 0, fileno)
  89151. */
  89152. __pyx_t_1 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 50, __pyx_L1_error)
  89153. __Pyx_GOTREF(__pyx_t_1);
  89154. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  89155. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  89156. __PYX_ERR(5, 50, __pyx_L1_error)
  89157. /* "uvloop/handles/tcp.pyx":49
  89158. * <system.sockaddr*>&buf,
  89159. * &buf_len)
  89160. * if err < 0: # <<<<<<<<<<<<<<
  89161. * raise convert_error(err)
  89162. *
  89163. */
  89164. }
  89165. /* "uvloop/handles/tcp.pyx":52
  89166. * raise convert_error(err)
  89167. *
  89168. * return PseudoSocket(buf.ss_family, uv.SOCK_STREAM, 0, fileno) # <<<<<<<<<<<<<<
  89169. *
  89170. *
  89171. */
  89172. __Pyx_XDECREF(__pyx_r);
  89173. __pyx_t_1 = __Pyx_PyInt_From_unsigned_short(__pyx_v_buf.ss_family); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 52, __pyx_L1_error)
  89174. __Pyx_GOTREF(__pyx_t_1);
  89175. __pyx_t_4 = __Pyx_PyInt_From_int(SOCK_STREAM); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 52, __pyx_L1_error)
  89176. __Pyx_GOTREF(__pyx_t_4);
  89177. __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_fileno); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 52, __pyx_L1_error)
  89178. __Pyx_GOTREF(__pyx_t_5);
  89179. __pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 52, __pyx_L1_error)
  89180. __Pyx_GOTREF(__pyx_t_6);
  89181. __Pyx_GIVEREF(__pyx_t_1);
  89182. PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
  89183. __Pyx_GIVEREF(__pyx_t_4);
  89184. PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_4);
  89185. __Pyx_INCREF(__pyx_int_0);
  89186. __Pyx_GIVEREF(__pyx_int_0);
  89187. PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_int_0);
  89188. __Pyx_GIVEREF(__pyx_t_5);
  89189. PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_5);
  89190. __pyx_t_1 = 0;
  89191. __pyx_t_4 = 0;
  89192. __pyx_t_5 = 0;
  89193. __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6uvloop_4loop_PseudoSocket), __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 52, __pyx_L1_error)
  89194. __Pyx_GOTREF(__pyx_t_5);
  89195. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  89196. __pyx_r = __pyx_t_5;
  89197. __pyx_t_5 = 0;
  89198. goto __pyx_L0;
  89199. /* "uvloop/handles/tcp.pyx":37
  89200. *
  89201. *
  89202. * cdef __tcp_get_socket(UVSocketHandle handle): # <<<<<<<<<<<<<<
  89203. * cdef:
  89204. * int buf_len = sizeof(system.sockaddr_storage)
  89205. */
  89206. /* function exit code */
  89207. __pyx_L1_error:;
  89208. __Pyx_XDECREF(__pyx_t_1);
  89209. __Pyx_XDECREF(__pyx_t_4);
  89210. __Pyx_XDECREF(__pyx_t_5);
  89211. __Pyx_XDECREF(__pyx_t_6);
  89212. __Pyx_AddTraceback("uvloop.loop.__tcp_get_socket", __pyx_clineno, __pyx_lineno, __pyx_filename);
  89213. __pyx_r = 0;
  89214. __pyx_L0:;
  89215. __Pyx_XGIVEREF(__pyx_r);
  89216. __Pyx_RefNannyFinishContext();
  89217. return __pyx_r;
  89218. }
  89219. /* "uvloop/handles/tcp.pyx":59
  89220. *
  89221. * @staticmethod
  89222. * cdef TCPServer new(Loop loop, object protocol_factory, Server server, # <<<<<<<<<<<<<<
  89223. * unsigned int flags,
  89224. * object backlog,
  89225. */
  89226. static struct __pyx_obj_6uvloop_4loop_TCPServer *__pyx_f_6uvloop_4loop_9TCPServer_new(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, PyObject *__pyx_v_protocol_factory, struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_server, unsigned int __pyx_v_flags, PyObject *__pyx_v_backlog, PyObject *__pyx_v_ssl, PyObject *__pyx_v_ssl_handshake_timeout, PyObject *__pyx_v_ssl_shutdown_timeout) {
  89227. struct __pyx_obj_6uvloop_4loop_TCPServer *__pyx_v_handle = 0;
  89228. struct __pyx_obj_6uvloop_4loop_TCPServer *__pyx_r = NULL;
  89229. __Pyx_RefNannyDeclarations
  89230. PyObject *__pyx_t_1 = NULL;
  89231. __Pyx_RefNannySetupContext("new", 0);
  89232. /* "uvloop/handles/tcp.pyx":67
  89233. *
  89234. * cdef TCPServer handle
  89235. * handle = TCPServer.__new__(TCPServer) # <<<<<<<<<<<<<<
  89236. * handle._init(loop, protocol_factory, server, backlog,
  89237. * ssl, ssl_handshake_timeout, ssl_shutdown_timeout)
  89238. */
  89239. __pyx_t_1 = ((PyObject *)__pyx_tp_new_6uvloop_4loop_TCPServer(((PyTypeObject *)__pyx_ptype_6uvloop_4loop_TCPServer), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 67, __pyx_L1_error)
  89240. __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  89241. __pyx_v_handle = ((struct __pyx_obj_6uvloop_4loop_TCPServer *)__pyx_t_1);
  89242. __pyx_t_1 = 0;
  89243. /* "uvloop/handles/tcp.pyx":68
  89244. * cdef TCPServer handle
  89245. * handle = TCPServer.__new__(TCPServer)
  89246. * handle._init(loop, protocol_factory, server, backlog, # <<<<<<<<<<<<<<
  89247. * ssl, ssl_handshake_timeout, ssl_shutdown_timeout)
  89248. * __tcp_init_uv_handle(<UVStream>handle, loop, flags)
  89249. */
  89250. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_TCPServer *)__pyx_v_handle->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._init(((struct __pyx_obj_6uvloop_4loop_UVStreamServer *)__pyx_v_handle), __pyx_v_loop, __pyx_v_protocol_factory, __pyx_v_server, __pyx_v_backlog, __pyx_v_ssl, __pyx_v_ssl_handshake_timeout, __pyx_v_ssl_shutdown_timeout); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 68, __pyx_L1_error)
  89251. __Pyx_GOTREF(__pyx_t_1);
  89252. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  89253. /* "uvloop/handles/tcp.pyx":70
  89254. * handle._init(loop, protocol_factory, server, backlog,
  89255. * ssl, ssl_handshake_timeout, ssl_shutdown_timeout)
  89256. * __tcp_init_uv_handle(<UVStream>handle, loop, flags) # <<<<<<<<<<<<<<
  89257. * return handle
  89258. *
  89259. */
  89260. __pyx_t_1 = __pyx_f_6uvloop_4loop___tcp_init_uv_handle(((struct __pyx_obj_6uvloop_4loop_UVStream *)__pyx_v_handle), __pyx_v_loop, __pyx_v_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 70, __pyx_L1_error)
  89261. __Pyx_GOTREF(__pyx_t_1);
  89262. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  89263. /* "uvloop/handles/tcp.pyx":71
  89264. * ssl, ssl_handshake_timeout, ssl_shutdown_timeout)
  89265. * __tcp_init_uv_handle(<UVStream>handle, loop, flags)
  89266. * return handle # <<<<<<<<<<<<<<
  89267. *
  89268. * cdef _new_socket(self):
  89269. */
  89270. __Pyx_XDECREF(((PyObject *)__pyx_r));
  89271. __Pyx_INCREF(((PyObject *)__pyx_v_handle));
  89272. __pyx_r = __pyx_v_handle;
  89273. goto __pyx_L0;
  89274. /* "uvloop/handles/tcp.pyx":59
  89275. *
  89276. * @staticmethod
  89277. * cdef TCPServer new(Loop loop, object protocol_factory, Server server, # <<<<<<<<<<<<<<
  89278. * unsigned int flags,
  89279. * object backlog,
  89280. */
  89281. /* function exit code */
  89282. __pyx_L1_error:;
  89283. __Pyx_XDECREF(__pyx_t_1);
  89284. __Pyx_AddTraceback("uvloop.loop.TCPServer.new", __pyx_clineno, __pyx_lineno, __pyx_filename);
  89285. __pyx_r = 0;
  89286. __pyx_L0:;
  89287. __Pyx_XDECREF((PyObject *)__pyx_v_handle);
  89288. __Pyx_XGIVEREF((PyObject *)__pyx_r);
  89289. __Pyx_RefNannyFinishContext();
  89290. return __pyx_r;
  89291. }
  89292. /* "uvloop/handles/tcp.pyx":73
  89293. * return handle
  89294. *
  89295. * cdef _new_socket(self): # <<<<<<<<<<<<<<
  89296. * return __tcp_get_socket(<UVSocketHandle>self)
  89297. *
  89298. */
  89299. static PyObject *__pyx_f_6uvloop_4loop_9TCPServer__new_socket(struct __pyx_obj_6uvloop_4loop_TCPServer *__pyx_v_self) {
  89300. PyObject *__pyx_r = NULL;
  89301. __Pyx_RefNannyDeclarations
  89302. PyObject *__pyx_t_1 = NULL;
  89303. __Pyx_RefNannySetupContext("_new_socket", 0);
  89304. /* "uvloop/handles/tcp.pyx":74
  89305. *
  89306. * cdef _new_socket(self):
  89307. * return __tcp_get_socket(<UVSocketHandle>self) # <<<<<<<<<<<<<<
  89308. *
  89309. * cdef _open(self, int sockfd):
  89310. */
  89311. __Pyx_XDECREF(__pyx_r);
  89312. __pyx_t_1 = __pyx_f_6uvloop_4loop___tcp_get_socket(((struct __pyx_obj_6uvloop_4loop_UVSocketHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 74, __pyx_L1_error)
  89313. __Pyx_GOTREF(__pyx_t_1);
  89314. __pyx_r = __pyx_t_1;
  89315. __pyx_t_1 = 0;
  89316. goto __pyx_L0;
  89317. /* "uvloop/handles/tcp.pyx":73
  89318. * return handle
  89319. *
  89320. * cdef _new_socket(self): # <<<<<<<<<<<<<<
  89321. * return __tcp_get_socket(<UVSocketHandle>self)
  89322. *
  89323. */
  89324. /* function exit code */
  89325. __pyx_L1_error:;
  89326. __Pyx_XDECREF(__pyx_t_1);
  89327. __Pyx_AddTraceback("uvloop.loop.TCPServer._new_socket", __pyx_clineno, __pyx_lineno, __pyx_filename);
  89328. __pyx_r = 0;
  89329. __pyx_L0:;
  89330. __Pyx_XGIVEREF(__pyx_r);
  89331. __Pyx_RefNannyFinishContext();
  89332. return __pyx_r;
  89333. }
  89334. /* "uvloop/handles/tcp.pyx":76
  89335. * return __tcp_get_socket(<UVSocketHandle>self)
  89336. *
  89337. * cdef _open(self, int sockfd): # <<<<<<<<<<<<<<
  89338. * self._ensure_alive()
  89339. * try:
  89340. */
  89341. static PyObject *__pyx_f_6uvloop_4loop_9TCPServer__open(struct __pyx_obj_6uvloop_4loop_TCPServer *__pyx_v_self, int __pyx_v_sockfd) {
  89342. PyObject *__pyx_v_exc = NULL;
  89343. PyObject *__pyx_r = NULL;
  89344. __Pyx_RefNannyDeclarations
  89345. PyObject *__pyx_t_1 = NULL;
  89346. PyObject *__pyx_t_2 = NULL;
  89347. PyObject *__pyx_t_3 = NULL;
  89348. PyObject *__pyx_t_4 = NULL;
  89349. int __pyx_t_5;
  89350. PyObject *__pyx_t_6 = NULL;
  89351. PyObject *__pyx_t_7 = NULL;
  89352. PyObject *__pyx_t_8 = NULL;
  89353. int __pyx_t_9;
  89354. char const *__pyx_t_10;
  89355. PyObject *__pyx_t_11 = NULL;
  89356. PyObject *__pyx_t_12 = NULL;
  89357. PyObject *__pyx_t_13 = NULL;
  89358. PyObject *__pyx_t_14 = NULL;
  89359. PyObject *__pyx_t_15 = NULL;
  89360. PyObject *__pyx_t_16 = NULL;
  89361. __Pyx_RefNannySetupContext("_open", 0);
  89362. /* "uvloop/handles/tcp.pyx":77
  89363. *
  89364. * cdef _open(self, int sockfd):
  89365. * self._ensure_alive() # <<<<<<<<<<<<<<
  89366. * try:
  89367. * __tcp_open(<UVStream>self, sockfd)
  89368. */
  89369. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_TCPServer *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._ensure_alive(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 77, __pyx_L1_error)
  89370. __Pyx_GOTREF(__pyx_t_1);
  89371. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  89372. /* "uvloop/handles/tcp.pyx":78
  89373. * cdef _open(self, int sockfd):
  89374. * self._ensure_alive()
  89375. * try: # <<<<<<<<<<<<<<
  89376. * __tcp_open(<UVStream>self, sockfd)
  89377. * except Exception as exc:
  89378. */
  89379. {
  89380. __Pyx_PyThreadState_declare
  89381. __Pyx_PyThreadState_assign
  89382. __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
  89383. __Pyx_XGOTREF(__pyx_t_2);
  89384. __Pyx_XGOTREF(__pyx_t_3);
  89385. __Pyx_XGOTREF(__pyx_t_4);
  89386. /*try:*/ {
  89387. /* "uvloop/handles/tcp.pyx":79
  89388. * self._ensure_alive()
  89389. * try:
  89390. * __tcp_open(<UVStream>self, sockfd) # <<<<<<<<<<<<<<
  89391. * except Exception as exc:
  89392. * self._fatal_error(exc, True)
  89393. */
  89394. __pyx_t_1 = __pyx_f_6uvloop_4loop___tcp_open(((struct __pyx_obj_6uvloop_4loop_UVStream *)__pyx_v_self), __pyx_v_sockfd); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 79, __pyx_L3_error)
  89395. __Pyx_GOTREF(__pyx_t_1);
  89396. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  89397. /* "uvloop/handles/tcp.pyx":78
  89398. * cdef _open(self, int sockfd):
  89399. * self._ensure_alive()
  89400. * try: # <<<<<<<<<<<<<<
  89401. * __tcp_open(<UVStream>self, sockfd)
  89402. * except Exception as exc:
  89403. */
  89404. }
  89405. /* "uvloop/handles/tcp.pyx":83
  89406. * self._fatal_error(exc, True)
  89407. * else:
  89408. * self._mark_as_open() # <<<<<<<<<<<<<<
  89409. *
  89410. * cdef bind(self, system.sockaddr* addr, unsigned int flags=0):
  89411. */
  89412. /*else:*/ {
  89413. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_TCPServer *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._mark_as_open(((struct __pyx_obj_6uvloop_4loop_UVStreamServer *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 83, __pyx_L5_except_error)
  89414. __Pyx_GOTREF(__pyx_t_1);
  89415. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  89416. }
  89417. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  89418. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  89419. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  89420. goto __pyx_L8_try_end;
  89421. __pyx_L3_error:;
  89422. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  89423. /* "uvloop/handles/tcp.pyx":80
  89424. * try:
  89425. * __tcp_open(<UVStream>self, sockfd)
  89426. * except Exception as exc: # <<<<<<<<<<<<<<
  89427. * self._fatal_error(exc, True)
  89428. * else:
  89429. */
  89430. __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
  89431. if (__pyx_t_5) {
  89432. __Pyx_AddTraceback("uvloop.loop.TCPServer._open", __pyx_clineno, __pyx_lineno, __pyx_filename);
  89433. if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(5, 80, __pyx_L5_except_error)
  89434. __Pyx_GOTREF(__pyx_t_1);
  89435. __Pyx_GOTREF(__pyx_t_6);
  89436. __Pyx_GOTREF(__pyx_t_7);
  89437. __Pyx_INCREF(__pyx_t_6);
  89438. __pyx_v_exc = __pyx_t_6;
  89439. /*try:*/ {
  89440. /* "uvloop/handles/tcp.pyx":81
  89441. * __tcp_open(<UVStream>self, sockfd)
  89442. * except Exception as exc:
  89443. * self._fatal_error(exc, True) # <<<<<<<<<<<<<<
  89444. * else:
  89445. * self._mark_as_open()
  89446. */
  89447. __pyx_t_8 = ((struct __pyx_vtabstruct_6uvloop_4loop_TCPServer *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._fatal_error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self), __pyx_v_exc, Py_True, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 81, __pyx_L14_error)
  89448. __Pyx_GOTREF(__pyx_t_8);
  89449. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  89450. }
  89451. /* "uvloop/handles/tcp.pyx":80
  89452. * try:
  89453. * __tcp_open(<UVStream>self, sockfd)
  89454. * except Exception as exc: # <<<<<<<<<<<<<<
  89455. * self._fatal_error(exc, True)
  89456. * else:
  89457. */
  89458. /*finally:*/ {
  89459. /*normal exit:*/{
  89460. __Pyx_DECREF(__pyx_v_exc);
  89461. __pyx_v_exc = NULL;
  89462. goto __pyx_L15;
  89463. }
  89464. __pyx_L14_error:;
  89465. /*exception exit:*/{
  89466. __Pyx_PyThreadState_declare
  89467. __Pyx_PyThreadState_assign
  89468. __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0;
  89469. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  89470. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16);
  89471. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13) < 0)) __Pyx_ErrFetch(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
  89472. __Pyx_XGOTREF(__pyx_t_11);
  89473. __Pyx_XGOTREF(__pyx_t_12);
  89474. __Pyx_XGOTREF(__pyx_t_13);
  89475. __Pyx_XGOTREF(__pyx_t_14);
  89476. __Pyx_XGOTREF(__pyx_t_15);
  89477. __Pyx_XGOTREF(__pyx_t_16);
  89478. __pyx_t_5 = __pyx_lineno; __pyx_t_9 = __pyx_clineno; __pyx_t_10 = __pyx_filename;
  89479. {
  89480. __Pyx_DECREF(__pyx_v_exc);
  89481. __pyx_v_exc = NULL;
  89482. }
  89483. if (PY_MAJOR_VERSION >= 3) {
  89484. __Pyx_XGIVEREF(__pyx_t_14);
  89485. __Pyx_XGIVEREF(__pyx_t_15);
  89486. __Pyx_XGIVEREF(__pyx_t_16);
  89487. __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_15, __pyx_t_16);
  89488. }
  89489. __Pyx_XGIVEREF(__pyx_t_11);
  89490. __Pyx_XGIVEREF(__pyx_t_12);
  89491. __Pyx_XGIVEREF(__pyx_t_13);
  89492. __Pyx_ErrRestore(__pyx_t_11, __pyx_t_12, __pyx_t_13);
  89493. __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0;
  89494. __pyx_lineno = __pyx_t_5; __pyx_clineno = __pyx_t_9; __pyx_filename = __pyx_t_10;
  89495. goto __pyx_L5_except_error;
  89496. }
  89497. __pyx_L15:;
  89498. }
  89499. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  89500. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  89501. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  89502. goto __pyx_L4_exception_handled;
  89503. }
  89504. goto __pyx_L5_except_error;
  89505. __pyx_L5_except_error:;
  89506. /* "uvloop/handles/tcp.pyx":78
  89507. * cdef _open(self, int sockfd):
  89508. * self._ensure_alive()
  89509. * try: # <<<<<<<<<<<<<<
  89510. * __tcp_open(<UVStream>self, sockfd)
  89511. * except Exception as exc:
  89512. */
  89513. __Pyx_XGIVEREF(__pyx_t_2);
  89514. __Pyx_XGIVEREF(__pyx_t_3);
  89515. __Pyx_XGIVEREF(__pyx_t_4);
  89516. __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
  89517. goto __pyx_L1_error;
  89518. __pyx_L4_exception_handled:;
  89519. __Pyx_XGIVEREF(__pyx_t_2);
  89520. __Pyx_XGIVEREF(__pyx_t_3);
  89521. __Pyx_XGIVEREF(__pyx_t_4);
  89522. __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
  89523. __pyx_L8_try_end:;
  89524. }
  89525. /* "uvloop/handles/tcp.pyx":76
  89526. * return __tcp_get_socket(<UVSocketHandle>self)
  89527. *
  89528. * cdef _open(self, int sockfd): # <<<<<<<<<<<<<<
  89529. * self._ensure_alive()
  89530. * try:
  89531. */
  89532. /* function exit code */
  89533. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  89534. goto __pyx_L0;
  89535. __pyx_L1_error:;
  89536. __Pyx_XDECREF(__pyx_t_1);
  89537. __Pyx_XDECREF(__pyx_t_6);
  89538. __Pyx_XDECREF(__pyx_t_7);
  89539. __Pyx_XDECREF(__pyx_t_8);
  89540. __Pyx_AddTraceback("uvloop.loop.TCPServer._open", __pyx_clineno, __pyx_lineno, __pyx_filename);
  89541. __pyx_r = 0;
  89542. __pyx_L0:;
  89543. __Pyx_XDECREF(__pyx_v_exc);
  89544. __Pyx_XGIVEREF(__pyx_r);
  89545. __Pyx_RefNannyFinishContext();
  89546. return __pyx_r;
  89547. }
  89548. /* "uvloop/handles/tcp.pyx":85
  89549. * self._mark_as_open()
  89550. *
  89551. * cdef bind(self, system.sockaddr* addr, unsigned int flags=0): # <<<<<<<<<<<<<<
  89552. * self._ensure_alive()
  89553. * try:
  89554. */
  89555. static PyObject *__pyx_f_6uvloop_4loop_9TCPServer_bind(struct __pyx_obj_6uvloop_4loop_TCPServer *__pyx_v_self, struct sockaddr *__pyx_v_addr, struct __pyx_opt_args_6uvloop_4loop_9TCPServer_bind *__pyx_optional_args) {
  89556. unsigned int __pyx_v_flags = ((unsigned int)0);
  89557. PyObject *__pyx_v_exc = NULL;
  89558. PyObject *__pyx_r = NULL;
  89559. __Pyx_RefNannyDeclarations
  89560. PyObject *__pyx_t_1 = NULL;
  89561. PyObject *__pyx_t_2 = NULL;
  89562. PyObject *__pyx_t_3 = NULL;
  89563. PyObject *__pyx_t_4 = NULL;
  89564. int __pyx_t_5;
  89565. PyObject *__pyx_t_6 = NULL;
  89566. PyObject *__pyx_t_7 = NULL;
  89567. PyObject *__pyx_t_8 = NULL;
  89568. int __pyx_t_9;
  89569. char const *__pyx_t_10;
  89570. PyObject *__pyx_t_11 = NULL;
  89571. PyObject *__pyx_t_12 = NULL;
  89572. PyObject *__pyx_t_13 = NULL;
  89573. PyObject *__pyx_t_14 = NULL;
  89574. PyObject *__pyx_t_15 = NULL;
  89575. PyObject *__pyx_t_16 = NULL;
  89576. __Pyx_RefNannySetupContext("bind", 0);
  89577. if (__pyx_optional_args) {
  89578. if (__pyx_optional_args->__pyx_n > 0) {
  89579. __pyx_v_flags = __pyx_optional_args->flags;
  89580. }
  89581. }
  89582. /* "uvloop/handles/tcp.pyx":86
  89583. *
  89584. * cdef bind(self, system.sockaddr* addr, unsigned int flags=0):
  89585. * self._ensure_alive() # <<<<<<<<<<<<<<
  89586. * try:
  89587. * __tcp_bind(<UVStream>self, addr, flags)
  89588. */
  89589. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_TCPServer *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._ensure_alive(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 86, __pyx_L1_error)
  89590. __Pyx_GOTREF(__pyx_t_1);
  89591. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  89592. /* "uvloop/handles/tcp.pyx":87
  89593. * cdef bind(self, system.sockaddr* addr, unsigned int flags=0):
  89594. * self._ensure_alive()
  89595. * try: # <<<<<<<<<<<<<<
  89596. * __tcp_bind(<UVStream>self, addr, flags)
  89597. * except Exception as exc:
  89598. */
  89599. {
  89600. __Pyx_PyThreadState_declare
  89601. __Pyx_PyThreadState_assign
  89602. __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
  89603. __Pyx_XGOTREF(__pyx_t_2);
  89604. __Pyx_XGOTREF(__pyx_t_3);
  89605. __Pyx_XGOTREF(__pyx_t_4);
  89606. /*try:*/ {
  89607. /* "uvloop/handles/tcp.pyx":88
  89608. * self._ensure_alive()
  89609. * try:
  89610. * __tcp_bind(<UVStream>self, addr, flags) # <<<<<<<<<<<<<<
  89611. * except Exception as exc:
  89612. * self._fatal_error(exc, True)
  89613. */
  89614. __pyx_t_1 = __pyx_f_6uvloop_4loop___tcp_bind(((struct __pyx_obj_6uvloop_4loop_UVStream *)__pyx_v_self), __pyx_v_addr, __pyx_v_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 88, __pyx_L3_error)
  89615. __Pyx_GOTREF(__pyx_t_1);
  89616. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  89617. /* "uvloop/handles/tcp.pyx":87
  89618. * cdef bind(self, system.sockaddr* addr, unsigned int flags=0):
  89619. * self._ensure_alive()
  89620. * try: # <<<<<<<<<<<<<<
  89621. * __tcp_bind(<UVStream>self, addr, flags)
  89622. * except Exception as exc:
  89623. */
  89624. }
  89625. /* "uvloop/handles/tcp.pyx":92
  89626. * self._fatal_error(exc, True)
  89627. * else:
  89628. * self._mark_as_open() # <<<<<<<<<<<<<<
  89629. *
  89630. * cdef UVStream _make_new_transport(self, object protocol, object waiter):
  89631. */
  89632. /*else:*/ {
  89633. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_TCPServer *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._mark_as_open(((struct __pyx_obj_6uvloop_4loop_UVStreamServer *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 92, __pyx_L5_except_error)
  89634. __Pyx_GOTREF(__pyx_t_1);
  89635. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  89636. }
  89637. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  89638. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  89639. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  89640. goto __pyx_L8_try_end;
  89641. __pyx_L3_error:;
  89642. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  89643. /* "uvloop/handles/tcp.pyx":89
  89644. * try:
  89645. * __tcp_bind(<UVStream>self, addr, flags)
  89646. * except Exception as exc: # <<<<<<<<<<<<<<
  89647. * self._fatal_error(exc, True)
  89648. * else:
  89649. */
  89650. __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
  89651. if (__pyx_t_5) {
  89652. __Pyx_AddTraceback("uvloop.loop.TCPServer.bind", __pyx_clineno, __pyx_lineno, __pyx_filename);
  89653. if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(5, 89, __pyx_L5_except_error)
  89654. __Pyx_GOTREF(__pyx_t_1);
  89655. __Pyx_GOTREF(__pyx_t_6);
  89656. __Pyx_GOTREF(__pyx_t_7);
  89657. __Pyx_INCREF(__pyx_t_6);
  89658. __pyx_v_exc = __pyx_t_6;
  89659. /*try:*/ {
  89660. /* "uvloop/handles/tcp.pyx":90
  89661. * __tcp_bind(<UVStream>self, addr, flags)
  89662. * except Exception as exc:
  89663. * self._fatal_error(exc, True) # <<<<<<<<<<<<<<
  89664. * else:
  89665. * self._mark_as_open()
  89666. */
  89667. __pyx_t_8 = ((struct __pyx_vtabstruct_6uvloop_4loop_TCPServer *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._fatal_error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self), __pyx_v_exc, Py_True, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 90, __pyx_L14_error)
  89668. __Pyx_GOTREF(__pyx_t_8);
  89669. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  89670. }
  89671. /* "uvloop/handles/tcp.pyx":89
  89672. * try:
  89673. * __tcp_bind(<UVStream>self, addr, flags)
  89674. * except Exception as exc: # <<<<<<<<<<<<<<
  89675. * self._fatal_error(exc, True)
  89676. * else:
  89677. */
  89678. /*finally:*/ {
  89679. /*normal exit:*/{
  89680. __Pyx_DECREF(__pyx_v_exc);
  89681. __pyx_v_exc = NULL;
  89682. goto __pyx_L15;
  89683. }
  89684. __pyx_L14_error:;
  89685. /*exception exit:*/{
  89686. __Pyx_PyThreadState_declare
  89687. __Pyx_PyThreadState_assign
  89688. __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0;
  89689. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  89690. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16);
  89691. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13) < 0)) __Pyx_ErrFetch(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
  89692. __Pyx_XGOTREF(__pyx_t_11);
  89693. __Pyx_XGOTREF(__pyx_t_12);
  89694. __Pyx_XGOTREF(__pyx_t_13);
  89695. __Pyx_XGOTREF(__pyx_t_14);
  89696. __Pyx_XGOTREF(__pyx_t_15);
  89697. __Pyx_XGOTREF(__pyx_t_16);
  89698. __pyx_t_5 = __pyx_lineno; __pyx_t_9 = __pyx_clineno; __pyx_t_10 = __pyx_filename;
  89699. {
  89700. __Pyx_DECREF(__pyx_v_exc);
  89701. __pyx_v_exc = NULL;
  89702. }
  89703. if (PY_MAJOR_VERSION >= 3) {
  89704. __Pyx_XGIVEREF(__pyx_t_14);
  89705. __Pyx_XGIVEREF(__pyx_t_15);
  89706. __Pyx_XGIVEREF(__pyx_t_16);
  89707. __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_15, __pyx_t_16);
  89708. }
  89709. __Pyx_XGIVEREF(__pyx_t_11);
  89710. __Pyx_XGIVEREF(__pyx_t_12);
  89711. __Pyx_XGIVEREF(__pyx_t_13);
  89712. __Pyx_ErrRestore(__pyx_t_11, __pyx_t_12, __pyx_t_13);
  89713. __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0;
  89714. __pyx_lineno = __pyx_t_5; __pyx_clineno = __pyx_t_9; __pyx_filename = __pyx_t_10;
  89715. goto __pyx_L5_except_error;
  89716. }
  89717. __pyx_L15:;
  89718. }
  89719. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  89720. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  89721. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  89722. goto __pyx_L4_exception_handled;
  89723. }
  89724. goto __pyx_L5_except_error;
  89725. __pyx_L5_except_error:;
  89726. /* "uvloop/handles/tcp.pyx":87
  89727. * cdef bind(self, system.sockaddr* addr, unsigned int flags=0):
  89728. * self._ensure_alive()
  89729. * try: # <<<<<<<<<<<<<<
  89730. * __tcp_bind(<UVStream>self, addr, flags)
  89731. * except Exception as exc:
  89732. */
  89733. __Pyx_XGIVEREF(__pyx_t_2);
  89734. __Pyx_XGIVEREF(__pyx_t_3);
  89735. __Pyx_XGIVEREF(__pyx_t_4);
  89736. __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
  89737. goto __pyx_L1_error;
  89738. __pyx_L4_exception_handled:;
  89739. __Pyx_XGIVEREF(__pyx_t_2);
  89740. __Pyx_XGIVEREF(__pyx_t_3);
  89741. __Pyx_XGIVEREF(__pyx_t_4);
  89742. __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
  89743. __pyx_L8_try_end:;
  89744. }
  89745. /* "uvloop/handles/tcp.pyx":85
  89746. * self._mark_as_open()
  89747. *
  89748. * cdef bind(self, system.sockaddr* addr, unsigned int flags=0): # <<<<<<<<<<<<<<
  89749. * self._ensure_alive()
  89750. * try:
  89751. */
  89752. /* function exit code */
  89753. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  89754. goto __pyx_L0;
  89755. __pyx_L1_error:;
  89756. __Pyx_XDECREF(__pyx_t_1);
  89757. __Pyx_XDECREF(__pyx_t_6);
  89758. __Pyx_XDECREF(__pyx_t_7);
  89759. __Pyx_XDECREF(__pyx_t_8);
  89760. __Pyx_AddTraceback("uvloop.loop.TCPServer.bind", __pyx_clineno, __pyx_lineno, __pyx_filename);
  89761. __pyx_r = 0;
  89762. __pyx_L0:;
  89763. __Pyx_XDECREF(__pyx_v_exc);
  89764. __Pyx_XGIVEREF(__pyx_r);
  89765. __Pyx_RefNannyFinishContext();
  89766. return __pyx_r;
  89767. }
  89768. /* "uvloop/handles/tcp.pyx":94
  89769. * self._mark_as_open()
  89770. *
  89771. * cdef UVStream _make_new_transport(self, object protocol, object waiter): # <<<<<<<<<<<<<<
  89772. * cdef TCPTransport tr
  89773. * tr = TCPTransport.new(self._loop, protocol, self._server, waiter)
  89774. */
  89775. static struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_f_6uvloop_4loop_9TCPServer__make_new_transport(struct __pyx_obj_6uvloop_4loop_TCPServer *__pyx_v_self, PyObject *__pyx_v_protocol, PyObject *__pyx_v_waiter) {
  89776. struct __pyx_obj_6uvloop_4loop_TCPTransport *__pyx_v_tr = 0;
  89777. struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_r = NULL;
  89778. __Pyx_RefNannyDeclarations
  89779. PyObject *__pyx_t_1 = NULL;
  89780. PyObject *__pyx_t_2 = NULL;
  89781. PyObject *__pyx_t_3 = NULL;
  89782. __Pyx_RefNannySetupContext("_make_new_transport", 0);
  89783. /* "uvloop/handles/tcp.pyx":96
  89784. * cdef UVStream _make_new_transport(self, object protocol, object waiter):
  89785. * cdef TCPTransport tr
  89786. * tr = TCPTransport.new(self._loop, protocol, self._server, waiter) # <<<<<<<<<<<<<<
  89787. * return <UVStream>tr
  89788. *
  89789. */
  89790. __pyx_t_1 = ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._loop);
  89791. __Pyx_INCREF(__pyx_t_1);
  89792. __pyx_t_2 = ((PyObject *)__pyx_v_self->__pyx_base._server);
  89793. __Pyx_INCREF(__pyx_t_2);
  89794. __pyx_t_3 = ((PyObject *)__pyx_f_6uvloop_4loop_12TCPTransport_new(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_t_1), __pyx_v_protocol, ((struct __pyx_obj_6uvloop_4loop_Server *)__pyx_t_2), __pyx_v_waiter)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 96, __pyx_L1_error)
  89795. __Pyx_GOTREF(__pyx_t_3);
  89796. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  89797. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  89798. __pyx_v_tr = ((struct __pyx_obj_6uvloop_4loop_TCPTransport *)__pyx_t_3);
  89799. __pyx_t_3 = 0;
  89800. /* "uvloop/handles/tcp.pyx":97
  89801. * cdef TCPTransport tr
  89802. * tr = TCPTransport.new(self._loop, protocol, self._server, waiter)
  89803. * return <UVStream>tr # <<<<<<<<<<<<<<
  89804. *
  89805. *
  89806. */
  89807. __Pyx_XDECREF(((PyObject *)__pyx_r));
  89808. __Pyx_INCREF(((PyObject *)((struct __pyx_obj_6uvloop_4loop_UVStream *)__pyx_v_tr)));
  89809. __pyx_r = ((struct __pyx_obj_6uvloop_4loop_UVStream *)__pyx_v_tr);
  89810. goto __pyx_L0;
  89811. /* "uvloop/handles/tcp.pyx":94
  89812. * self._mark_as_open()
  89813. *
  89814. * cdef UVStream _make_new_transport(self, object protocol, object waiter): # <<<<<<<<<<<<<<
  89815. * cdef TCPTransport tr
  89816. * tr = TCPTransport.new(self._loop, protocol, self._server, waiter)
  89817. */
  89818. /* function exit code */
  89819. __pyx_L1_error:;
  89820. __Pyx_XDECREF(__pyx_t_1);
  89821. __Pyx_XDECREF(__pyx_t_2);
  89822. __Pyx_XDECREF(__pyx_t_3);
  89823. __Pyx_AddTraceback("uvloop.loop.TCPServer._make_new_transport", __pyx_clineno, __pyx_lineno, __pyx_filename);
  89824. __pyx_r = 0;
  89825. __pyx_L0:;
  89826. __Pyx_XDECREF((PyObject *)__pyx_v_tr);
  89827. __Pyx_XGIVEREF((PyObject *)__pyx_r);
  89828. __Pyx_RefNannyFinishContext();
  89829. return __pyx_r;
  89830. }
  89831. /* "(tree fragment)":1
  89832. * def __reduce_cython__(self): # <<<<<<<<<<<<<<
  89833. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  89834. * def __setstate_cython__(self, __pyx_state):
  89835. */
  89836. /* Python wrapper */
  89837. static PyObject *__pyx_pw_6uvloop_4loop_9TCPServer_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  89838. static char __pyx_doc_6uvloop_4loop_9TCPServer___reduce_cython__[] = "TCPServer.__reduce_cython__(self)";
  89839. static PyObject *__pyx_pw_6uvloop_4loop_9TCPServer_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  89840. PyObject *__pyx_r = 0;
  89841. __Pyx_RefNannyDeclarations
  89842. __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  89843. __pyx_r = __pyx_pf_6uvloop_4loop_9TCPServer___reduce_cython__(((struct __pyx_obj_6uvloop_4loop_TCPServer *)__pyx_v_self));
  89844. /* function exit code */
  89845. __Pyx_RefNannyFinishContext();
  89846. return __pyx_r;
  89847. }
  89848. static PyObject *__pyx_pf_6uvloop_4loop_9TCPServer___reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_TCPServer *__pyx_v_self) {
  89849. PyObject *__pyx_r = NULL;
  89850. __Pyx_RefNannyDeclarations
  89851. PyObject *__pyx_t_1 = NULL;
  89852. __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  89853. /* "(tree fragment)":2
  89854. * def __reduce_cython__(self):
  89855. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  89856. * def __setstate_cython__(self, __pyx_state):
  89857. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  89858. */
  89859. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__146, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 2, __pyx_L1_error)
  89860. __Pyx_GOTREF(__pyx_t_1);
  89861. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  89862. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  89863. __PYX_ERR(9, 2, __pyx_L1_error)
  89864. /* "(tree fragment)":1
  89865. * def __reduce_cython__(self): # <<<<<<<<<<<<<<
  89866. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  89867. * def __setstate_cython__(self, __pyx_state):
  89868. */
  89869. /* function exit code */
  89870. __pyx_L1_error:;
  89871. __Pyx_XDECREF(__pyx_t_1);
  89872. __Pyx_AddTraceback("uvloop.loop.TCPServer.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  89873. __pyx_r = NULL;
  89874. __Pyx_XGIVEREF(__pyx_r);
  89875. __Pyx_RefNannyFinishContext();
  89876. return __pyx_r;
  89877. }
  89878. /* "(tree fragment)":3
  89879. * def __reduce_cython__(self):
  89880. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  89881. * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
  89882. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  89883. */
  89884. /* Python wrapper */
  89885. static PyObject *__pyx_pw_6uvloop_4loop_9TCPServer_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
  89886. static char __pyx_doc_6uvloop_4loop_9TCPServer_2__setstate_cython__[] = "TCPServer.__setstate_cython__(self, __pyx_state)";
  89887. static PyObject *__pyx_pw_6uvloop_4loop_9TCPServer_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  89888. PyObject *__pyx_r = 0;
  89889. __Pyx_RefNannyDeclarations
  89890. __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  89891. __pyx_r = __pyx_pf_6uvloop_4loop_9TCPServer_2__setstate_cython__(((struct __pyx_obj_6uvloop_4loop_TCPServer *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
  89892. /* function exit code */
  89893. __Pyx_RefNannyFinishContext();
  89894. return __pyx_r;
  89895. }
  89896. static PyObject *__pyx_pf_6uvloop_4loop_9TCPServer_2__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_TCPServer *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  89897. PyObject *__pyx_r = NULL;
  89898. __Pyx_RefNannyDeclarations
  89899. PyObject *__pyx_t_1 = NULL;
  89900. __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  89901. /* "(tree fragment)":4
  89902. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  89903. * def __setstate_cython__(self, __pyx_state):
  89904. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  89905. */
  89906. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__147, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 4, __pyx_L1_error)
  89907. __Pyx_GOTREF(__pyx_t_1);
  89908. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  89909. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  89910. __PYX_ERR(9, 4, __pyx_L1_error)
  89911. /* "(tree fragment)":3
  89912. * def __reduce_cython__(self):
  89913. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  89914. * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
  89915. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  89916. */
  89917. /* function exit code */
  89918. __pyx_L1_error:;
  89919. __Pyx_XDECREF(__pyx_t_1);
  89920. __Pyx_AddTraceback("uvloop.loop.TCPServer.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  89921. __pyx_r = NULL;
  89922. __Pyx_XGIVEREF(__pyx_r);
  89923. __Pyx_RefNannyFinishContext();
  89924. return __pyx_r;
  89925. }
  89926. /* "uvloop/handles/tcp.pyx":104
  89927. *
  89928. * @staticmethod
  89929. * cdef TCPTransport new(Loop loop, object protocol, Server server, # <<<<<<<<<<<<<<
  89930. * object waiter):
  89931. *
  89932. */
  89933. static struct __pyx_obj_6uvloop_4loop_TCPTransport *__pyx_f_6uvloop_4loop_12TCPTransport_new(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, PyObject *__pyx_v_protocol, struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_server, PyObject *__pyx_v_waiter) {
  89934. struct __pyx_obj_6uvloop_4loop_TCPTransport *__pyx_v_handle = 0;
  89935. struct __pyx_obj_6uvloop_4loop_TCPTransport *__pyx_r = NULL;
  89936. __Pyx_RefNannyDeclarations
  89937. PyObject *__pyx_t_1 = NULL;
  89938. __Pyx_RefNannySetupContext("new", 0);
  89939. /* "uvloop/handles/tcp.pyx":108
  89940. *
  89941. * cdef TCPTransport handle
  89942. * handle = TCPTransport.__new__(TCPTransport) # <<<<<<<<<<<<<<
  89943. * handle._init(loop, protocol, server, waiter)
  89944. * __tcp_init_uv_handle(<UVStream>handle, loop, uv.AF_UNSPEC)
  89945. */
  89946. __pyx_t_1 = ((PyObject *)__pyx_tp_new_6uvloop_4loop_TCPTransport(((PyTypeObject *)__pyx_ptype_6uvloop_4loop_TCPTransport), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 108, __pyx_L1_error)
  89947. __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  89948. __pyx_v_handle = ((struct __pyx_obj_6uvloop_4loop_TCPTransport *)__pyx_t_1);
  89949. __pyx_t_1 = 0;
  89950. /* "uvloop/handles/tcp.pyx":109
  89951. * cdef TCPTransport handle
  89952. * handle = TCPTransport.__new__(TCPTransport)
  89953. * handle._init(loop, protocol, server, waiter) # <<<<<<<<<<<<<<
  89954. * __tcp_init_uv_handle(<UVStream>handle, loop, uv.AF_UNSPEC)
  89955. * handle.__peername_set = 0
  89956. */
  89957. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_TCPTransport *)__pyx_v_handle->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._init(((struct __pyx_obj_6uvloop_4loop_UVStream *)__pyx_v_handle), __pyx_v_loop, __pyx_v_protocol, __pyx_v_server, __pyx_v_waiter); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 109, __pyx_L1_error)
  89958. __Pyx_GOTREF(__pyx_t_1);
  89959. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  89960. /* "uvloop/handles/tcp.pyx":110
  89961. * handle = TCPTransport.__new__(TCPTransport)
  89962. * handle._init(loop, protocol, server, waiter)
  89963. * __tcp_init_uv_handle(<UVStream>handle, loop, uv.AF_UNSPEC) # <<<<<<<<<<<<<<
  89964. * handle.__peername_set = 0
  89965. * handle.__sockname_set = 0
  89966. */
  89967. __pyx_t_1 = __pyx_f_6uvloop_4loop___tcp_init_uv_handle(((struct __pyx_obj_6uvloop_4loop_UVStream *)__pyx_v_handle), __pyx_v_loop, AF_UNSPEC); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 110, __pyx_L1_error)
  89968. __Pyx_GOTREF(__pyx_t_1);
  89969. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  89970. /* "uvloop/handles/tcp.pyx":111
  89971. * handle._init(loop, protocol, server, waiter)
  89972. * __tcp_init_uv_handle(<UVStream>handle, loop, uv.AF_UNSPEC)
  89973. * handle.__peername_set = 0 # <<<<<<<<<<<<<<
  89974. * handle.__sockname_set = 0
  89975. * handle._set_nodelay()
  89976. */
  89977. __pyx_v_handle->__pyx___peername_set = 0;
  89978. /* "uvloop/handles/tcp.pyx":112
  89979. * __tcp_init_uv_handle(<UVStream>handle, loop, uv.AF_UNSPEC)
  89980. * handle.__peername_set = 0
  89981. * handle.__sockname_set = 0 # <<<<<<<<<<<<<<
  89982. * handle._set_nodelay()
  89983. * return handle
  89984. */
  89985. __pyx_v_handle->__pyx___sockname_set = 0;
  89986. /* "uvloop/handles/tcp.pyx":113
  89987. * handle.__peername_set = 0
  89988. * handle.__sockname_set = 0
  89989. * handle._set_nodelay() # <<<<<<<<<<<<<<
  89990. * return handle
  89991. *
  89992. */
  89993. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_TCPTransport *)__pyx_v_handle->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->_set_nodelay(__pyx_v_handle); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 113, __pyx_L1_error)
  89994. __Pyx_GOTREF(__pyx_t_1);
  89995. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  89996. /* "uvloop/handles/tcp.pyx":114
  89997. * handle.__sockname_set = 0
  89998. * handle._set_nodelay()
  89999. * return handle # <<<<<<<<<<<<<<
  90000. *
  90001. * cdef _set_nodelay(self):
  90002. */
  90003. __Pyx_XDECREF(((PyObject *)__pyx_r));
  90004. __Pyx_INCREF(((PyObject *)__pyx_v_handle));
  90005. __pyx_r = __pyx_v_handle;
  90006. goto __pyx_L0;
  90007. /* "uvloop/handles/tcp.pyx":104
  90008. *
  90009. * @staticmethod
  90010. * cdef TCPTransport new(Loop loop, object protocol, Server server, # <<<<<<<<<<<<<<
  90011. * object waiter):
  90012. *
  90013. */
  90014. /* function exit code */
  90015. __pyx_L1_error:;
  90016. __Pyx_XDECREF(__pyx_t_1);
  90017. __Pyx_AddTraceback("uvloop.loop.TCPTransport.new", __pyx_clineno, __pyx_lineno, __pyx_filename);
  90018. __pyx_r = 0;
  90019. __pyx_L0:;
  90020. __Pyx_XDECREF((PyObject *)__pyx_v_handle);
  90021. __Pyx_XGIVEREF((PyObject *)__pyx_r);
  90022. __Pyx_RefNannyFinishContext();
  90023. return __pyx_r;
  90024. }
  90025. /* "uvloop/handles/tcp.pyx":116
  90026. * return handle
  90027. *
  90028. * cdef _set_nodelay(self): # <<<<<<<<<<<<<<
  90029. * cdef int err
  90030. * self._ensure_alive()
  90031. */
  90032. static PyObject *__pyx_f_6uvloop_4loop_12TCPTransport__set_nodelay(struct __pyx_obj_6uvloop_4loop_TCPTransport *__pyx_v_self) {
  90033. int __pyx_v_err;
  90034. PyObject *__pyx_r = NULL;
  90035. __Pyx_RefNannyDeclarations
  90036. PyObject *__pyx_t_1 = NULL;
  90037. int __pyx_t_2;
  90038. __Pyx_RefNannySetupContext("_set_nodelay", 0);
  90039. /* "uvloop/handles/tcp.pyx":118
  90040. * cdef _set_nodelay(self):
  90041. * cdef int err
  90042. * self._ensure_alive() # <<<<<<<<<<<<<<
  90043. * err = uv.uv_tcp_nodelay(<uv.uv_tcp_t*>self._handle, 1)
  90044. * if err < 0:
  90045. */
  90046. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_TCPTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base.__pyx_base._ensure_alive(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 118, __pyx_L1_error)
  90047. __Pyx_GOTREF(__pyx_t_1);
  90048. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  90049. /* "uvloop/handles/tcp.pyx":119
  90050. * cdef int err
  90051. * self._ensure_alive()
  90052. * err = uv.uv_tcp_nodelay(<uv.uv_tcp_t*>self._handle, 1) # <<<<<<<<<<<<<<
  90053. * if err < 0:
  90054. * raise convert_error(err)
  90055. */
  90056. __pyx_v_err = uv_tcp_nodelay(((uv_tcp_t *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base._handle), 1);
  90057. /* "uvloop/handles/tcp.pyx":120
  90058. * self._ensure_alive()
  90059. * err = uv.uv_tcp_nodelay(<uv.uv_tcp_t*>self._handle, 1)
  90060. * if err < 0: # <<<<<<<<<<<<<<
  90061. * raise convert_error(err)
  90062. *
  90063. */
  90064. __pyx_t_2 = ((__pyx_v_err < 0) != 0);
  90065. if (unlikely(__pyx_t_2)) {
  90066. /* "uvloop/handles/tcp.pyx":121
  90067. * err = uv.uv_tcp_nodelay(<uv.uv_tcp_t*>self._handle, 1)
  90068. * if err < 0:
  90069. * raise convert_error(err) # <<<<<<<<<<<<<<
  90070. *
  90071. * cdef _call_connection_made(self):
  90072. */
  90073. __pyx_t_1 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 121, __pyx_L1_error)
  90074. __Pyx_GOTREF(__pyx_t_1);
  90075. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  90076. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  90077. __PYX_ERR(5, 121, __pyx_L1_error)
  90078. /* "uvloop/handles/tcp.pyx":120
  90079. * self._ensure_alive()
  90080. * err = uv.uv_tcp_nodelay(<uv.uv_tcp_t*>self._handle, 1)
  90081. * if err < 0: # <<<<<<<<<<<<<<
  90082. * raise convert_error(err)
  90083. *
  90084. */
  90085. }
  90086. /* "uvloop/handles/tcp.pyx":116
  90087. * return handle
  90088. *
  90089. * cdef _set_nodelay(self): # <<<<<<<<<<<<<<
  90090. * cdef int err
  90091. * self._ensure_alive()
  90092. */
  90093. /* function exit code */
  90094. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  90095. goto __pyx_L0;
  90096. __pyx_L1_error:;
  90097. __Pyx_XDECREF(__pyx_t_1);
  90098. __Pyx_AddTraceback("uvloop.loop.TCPTransport._set_nodelay", __pyx_clineno, __pyx_lineno, __pyx_filename);
  90099. __pyx_r = 0;
  90100. __pyx_L0:;
  90101. __Pyx_XGIVEREF(__pyx_r);
  90102. __Pyx_RefNannyFinishContext();
  90103. return __pyx_r;
  90104. }
  90105. /* "uvloop/handles/tcp.pyx":123
  90106. * raise convert_error(err)
  90107. *
  90108. * cdef _call_connection_made(self): # <<<<<<<<<<<<<<
  90109. * # asyncio saves peername & sockname when transports are instantiated,
  90110. * # so that they're accessible even after the transport is closed.
  90111. */
  90112. static PyObject *__pyx_f_6uvloop_4loop_12TCPTransport__call_connection_made(struct __pyx_obj_6uvloop_4loop_TCPTransport *__pyx_v_self) {
  90113. int __pyx_v_err;
  90114. int __pyx_v_buf_len;
  90115. PyObject *__pyx_r = NULL;
  90116. __Pyx_RefNannyDeclarations
  90117. int __pyx_t_1;
  90118. PyObject *__pyx_t_2 = NULL;
  90119. __Pyx_RefNannySetupContext("_call_connection_made", 0);
  90120. /* "uvloop/handles/tcp.pyx":133
  90121. * int buf_len
  90122. *
  90123. * buf_len = sizeof(system.sockaddr_storage) # <<<<<<<<<<<<<<
  90124. * err = uv.uv_tcp_getsockname(<uv.uv_tcp_t*>self._handle,
  90125. * <system.sockaddr*>&self.__sockname,
  90126. */
  90127. __pyx_v_buf_len = (sizeof(struct sockaddr_storage));
  90128. /* "uvloop/handles/tcp.pyx":134
  90129. *
  90130. * buf_len = sizeof(system.sockaddr_storage)
  90131. * err = uv.uv_tcp_getsockname(<uv.uv_tcp_t*>self._handle, # <<<<<<<<<<<<<<
  90132. * <system.sockaddr*>&self.__sockname,
  90133. * &buf_len)
  90134. */
  90135. __pyx_v_err = uv_tcp_getsockname(((uv_tcp_t *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base._handle), ((struct sockaddr *)(&__pyx_v_self->__pyx___sockname)), (&__pyx_v_buf_len));
  90136. /* "uvloop/handles/tcp.pyx":137
  90137. * <system.sockaddr*>&self.__sockname,
  90138. * &buf_len)
  90139. * if err >= 0: # <<<<<<<<<<<<<<
  90140. * # Ignore errors, this is an optional thing.
  90141. * # If something serious is going on, the transport
  90142. */
  90143. __pyx_t_1 = ((__pyx_v_err >= 0) != 0);
  90144. if (__pyx_t_1) {
  90145. /* "uvloop/handles/tcp.pyx":142
  90146. * # will crash later (in roughly the same way how
  90147. * # an asyncio transport would.)
  90148. * self.__sockname_set = 1 # <<<<<<<<<<<<<<
  90149. *
  90150. * buf_len = sizeof(system.sockaddr_storage)
  90151. */
  90152. __pyx_v_self->__pyx___sockname_set = 1;
  90153. /* "uvloop/handles/tcp.pyx":137
  90154. * <system.sockaddr*>&self.__sockname,
  90155. * &buf_len)
  90156. * if err >= 0: # <<<<<<<<<<<<<<
  90157. * # Ignore errors, this is an optional thing.
  90158. * # If something serious is going on, the transport
  90159. */
  90160. }
  90161. /* "uvloop/handles/tcp.pyx":144
  90162. * self.__sockname_set = 1
  90163. *
  90164. * buf_len = sizeof(system.sockaddr_storage) # <<<<<<<<<<<<<<
  90165. * err = uv.uv_tcp_getpeername(<uv.uv_tcp_t*>self._handle,
  90166. * <system.sockaddr*>&self.__peername,
  90167. */
  90168. __pyx_v_buf_len = (sizeof(struct sockaddr_storage));
  90169. /* "uvloop/handles/tcp.pyx":145
  90170. *
  90171. * buf_len = sizeof(system.sockaddr_storage)
  90172. * err = uv.uv_tcp_getpeername(<uv.uv_tcp_t*>self._handle, # <<<<<<<<<<<<<<
  90173. * <system.sockaddr*>&self.__peername,
  90174. * &buf_len)
  90175. */
  90176. __pyx_v_err = uv_tcp_getpeername(((uv_tcp_t *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base._handle), ((struct sockaddr *)(&__pyx_v_self->__pyx___peername)), (&__pyx_v_buf_len));
  90177. /* "uvloop/handles/tcp.pyx":148
  90178. * <system.sockaddr*>&self.__peername,
  90179. * &buf_len)
  90180. * if err >= 0: # <<<<<<<<<<<<<<
  90181. * # Same as few lines above -- we don't really care
  90182. * # about error case here.
  90183. */
  90184. __pyx_t_1 = ((__pyx_v_err >= 0) != 0);
  90185. if (__pyx_t_1) {
  90186. /* "uvloop/handles/tcp.pyx":151
  90187. * # Same as few lines above -- we don't really care
  90188. * # about error case here.
  90189. * self.__peername_set = 1 # <<<<<<<<<<<<<<
  90190. *
  90191. * UVBaseTransport._call_connection_made(self)
  90192. */
  90193. __pyx_v_self->__pyx___peername_set = 1;
  90194. /* "uvloop/handles/tcp.pyx":148
  90195. * <system.sockaddr*>&self.__peername,
  90196. * &buf_len)
  90197. * if err >= 0: # <<<<<<<<<<<<<<
  90198. * # Same as few lines above -- we don't really care
  90199. * # about error case here.
  90200. */
  90201. }
  90202. /* "uvloop/handles/tcp.pyx":153
  90203. * self.__peername_set = 1
  90204. *
  90205. * UVBaseTransport._call_connection_made(self) # <<<<<<<<<<<<<<
  90206. *
  90207. * def get_extra_info(self, name, default=None):
  90208. */
  90209. __pyx_t_2 = __pyx_f_6uvloop_4loop_15UVBaseTransport__call_connection_made(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 153, __pyx_L1_error)
  90210. __Pyx_GOTREF(__pyx_t_2);
  90211. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  90212. /* "uvloop/handles/tcp.pyx":123
  90213. * raise convert_error(err)
  90214. *
  90215. * cdef _call_connection_made(self): # <<<<<<<<<<<<<<
  90216. * # asyncio saves peername & sockname when transports are instantiated,
  90217. * # so that they're accessible even after the transport is closed.
  90218. */
  90219. /* function exit code */
  90220. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  90221. goto __pyx_L0;
  90222. __pyx_L1_error:;
  90223. __Pyx_XDECREF(__pyx_t_2);
  90224. __Pyx_AddTraceback("uvloop.loop.TCPTransport._call_connection_made", __pyx_clineno, __pyx_lineno, __pyx_filename);
  90225. __pyx_r = 0;
  90226. __pyx_L0:;
  90227. __Pyx_XGIVEREF(__pyx_r);
  90228. __Pyx_RefNannyFinishContext();
  90229. return __pyx_r;
  90230. }
  90231. /* "uvloop/handles/tcp.pyx":155
  90232. * UVBaseTransport._call_connection_made(self)
  90233. *
  90234. * def get_extra_info(self, name, default=None): # <<<<<<<<<<<<<<
  90235. * if name == 'sockname':
  90236. * if self.__sockname_set:
  90237. */
  90238. /* Python wrapper */
  90239. static PyObject *__pyx_pw_6uvloop_4loop_12TCPTransport_1get_extra_info(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  90240. static char __pyx_doc_6uvloop_4loop_12TCPTransport_get_extra_info[] = "TCPTransport.get_extra_info(self, name, default=None)";
  90241. static PyObject *__pyx_pw_6uvloop_4loop_12TCPTransport_1get_extra_info(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  90242. PyObject *__pyx_v_name = 0;
  90243. PyObject *__pyx_v_default = 0;
  90244. PyObject *__pyx_r = 0;
  90245. __Pyx_RefNannyDeclarations
  90246. __Pyx_RefNannySetupContext("get_extra_info (wrapper)", 0);
  90247. {
  90248. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name_2,&__pyx_n_s_default,0};
  90249. PyObject* values[2] = {0,0};
  90250. values[1] = ((PyObject *)Py_None);
  90251. if (unlikely(__pyx_kwds)) {
  90252. Py_ssize_t kw_args;
  90253. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  90254. switch (pos_args) {
  90255. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  90256. CYTHON_FALLTHROUGH;
  90257. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  90258. CYTHON_FALLTHROUGH;
  90259. case 0: break;
  90260. default: goto __pyx_L5_argtuple_error;
  90261. }
  90262. kw_args = PyDict_Size(__pyx_kwds);
  90263. switch (pos_args) {
  90264. case 0:
  90265. if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name_2)) != 0)) kw_args--;
  90266. else goto __pyx_L5_argtuple_error;
  90267. CYTHON_FALLTHROUGH;
  90268. case 1:
  90269. if (kw_args > 0) {
  90270. PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_default);
  90271. if (value) { values[1] = value; kw_args--; }
  90272. }
  90273. }
  90274. if (unlikely(kw_args > 0)) {
  90275. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_extra_info") < 0)) __PYX_ERR(5, 155, __pyx_L3_error)
  90276. }
  90277. } else {
  90278. switch (PyTuple_GET_SIZE(__pyx_args)) {
  90279. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  90280. CYTHON_FALLTHROUGH;
  90281. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  90282. break;
  90283. default: goto __pyx_L5_argtuple_error;
  90284. }
  90285. }
  90286. __pyx_v_name = values[0];
  90287. __pyx_v_default = values[1];
  90288. }
  90289. goto __pyx_L4_argument_unpacking_done;
  90290. __pyx_L5_argtuple_error:;
  90291. __Pyx_RaiseArgtupleInvalid("get_extra_info", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(5, 155, __pyx_L3_error)
  90292. __pyx_L3_error:;
  90293. __Pyx_AddTraceback("uvloop.loop.TCPTransport.get_extra_info", __pyx_clineno, __pyx_lineno, __pyx_filename);
  90294. __Pyx_RefNannyFinishContext();
  90295. return NULL;
  90296. __pyx_L4_argument_unpacking_done:;
  90297. __pyx_r = __pyx_pf_6uvloop_4loop_12TCPTransport_get_extra_info(((struct __pyx_obj_6uvloop_4loop_TCPTransport *)__pyx_v_self), __pyx_v_name, __pyx_v_default);
  90298. /* function exit code */
  90299. __Pyx_RefNannyFinishContext();
  90300. return __pyx_r;
  90301. }
  90302. static PyObject *__pyx_pf_6uvloop_4loop_12TCPTransport_get_extra_info(struct __pyx_obj_6uvloop_4loop_TCPTransport *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_default) {
  90303. PyObject *__pyx_r = NULL;
  90304. __Pyx_RefNannyDeclarations
  90305. int __pyx_t_1;
  90306. PyObject *__pyx_t_2 = NULL;
  90307. PyObject *__pyx_t_3 = NULL;
  90308. PyObject *__pyx_t_4 = NULL;
  90309. int __pyx_t_5;
  90310. PyObject *__pyx_t_6 = NULL;
  90311. __Pyx_RefNannySetupContext("get_extra_info", 0);
  90312. /* "uvloop/handles/tcp.pyx":156
  90313. *
  90314. * def get_extra_info(self, name, default=None):
  90315. * if name == 'sockname': # <<<<<<<<<<<<<<
  90316. * if self.__sockname_set:
  90317. * return __convert_sockaddr_to_pyaddr(
  90318. */
  90319. __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_name, __pyx_n_u_sockname, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(5, 156, __pyx_L1_error)
  90320. if (__pyx_t_1) {
  90321. /* "uvloop/handles/tcp.pyx":157
  90322. * def get_extra_info(self, name, default=None):
  90323. * if name == 'sockname':
  90324. * if self.__sockname_set: # <<<<<<<<<<<<<<
  90325. * return __convert_sockaddr_to_pyaddr(
  90326. * <system.sockaddr*>&self.__sockname)
  90327. */
  90328. __pyx_t_1 = (__pyx_v_self->__pyx___sockname_set != 0);
  90329. if (__pyx_t_1) {
  90330. /* "uvloop/handles/tcp.pyx":158
  90331. * if name == 'sockname':
  90332. * if self.__sockname_set:
  90333. * return __convert_sockaddr_to_pyaddr( # <<<<<<<<<<<<<<
  90334. * <system.sockaddr*>&self.__sockname)
  90335. * elif name == 'peername':
  90336. */
  90337. __Pyx_XDECREF(__pyx_r);
  90338. /* "uvloop/handles/tcp.pyx":159
  90339. * if self.__sockname_set:
  90340. * return __convert_sockaddr_to_pyaddr(
  90341. * <system.sockaddr*>&self.__sockname) # <<<<<<<<<<<<<<
  90342. * elif name == 'peername':
  90343. * if self.__peername_set:
  90344. */
  90345. __pyx_t_2 = __pyx_f_6uvloop_4loop___convert_sockaddr_to_pyaddr(((struct sockaddr *)(&__pyx_v_self->__pyx___sockname))); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 158, __pyx_L1_error)
  90346. __Pyx_GOTREF(__pyx_t_2);
  90347. __pyx_r = __pyx_t_2;
  90348. __pyx_t_2 = 0;
  90349. goto __pyx_L0;
  90350. /* "uvloop/handles/tcp.pyx":157
  90351. * def get_extra_info(self, name, default=None):
  90352. * if name == 'sockname':
  90353. * if self.__sockname_set: # <<<<<<<<<<<<<<
  90354. * return __convert_sockaddr_to_pyaddr(
  90355. * <system.sockaddr*>&self.__sockname)
  90356. */
  90357. }
  90358. /* "uvloop/handles/tcp.pyx":156
  90359. *
  90360. * def get_extra_info(self, name, default=None):
  90361. * if name == 'sockname': # <<<<<<<<<<<<<<
  90362. * if self.__sockname_set:
  90363. * return __convert_sockaddr_to_pyaddr(
  90364. */
  90365. goto __pyx_L3;
  90366. }
  90367. /* "uvloop/handles/tcp.pyx":160
  90368. * return __convert_sockaddr_to_pyaddr(
  90369. * <system.sockaddr*>&self.__sockname)
  90370. * elif name == 'peername': # <<<<<<<<<<<<<<
  90371. * if self.__peername_set:
  90372. * return __convert_sockaddr_to_pyaddr(
  90373. */
  90374. __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_name, __pyx_n_u_peername, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(5, 160, __pyx_L1_error)
  90375. if (__pyx_t_1) {
  90376. /* "uvloop/handles/tcp.pyx":161
  90377. * <system.sockaddr*>&self.__sockname)
  90378. * elif name == 'peername':
  90379. * if self.__peername_set: # <<<<<<<<<<<<<<
  90380. * return __convert_sockaddr_to_pyaddr(
  90381. * <system.sockaddr*>&self.__peername)
  90382. */
  90383. __pyx_t_1 = (__pyx_v_self->__pyx___peername_set != 0);
  90384. if (__pyx_t_1) {
  90385. /* "uvloop/handles/tcp.pyx":162
  90386. * elif name == 'peername':
  90387. * if self.__peername_set:
  90388. * return __convert_sockaddr_to_pyaddr( # <<<<<<<<<<<<<<
  90389. * <system.sockaddr*>&self.__peername)
  90390. * return super().get_extra_info(name, default)
  90391. */
  90392. __Pyx_XDECREF(__pyx_r);
  90393. /* "uvloop/handles/tcp.pyx":163
  90394. * if self.__peername_set:
  90395. * return __convert_sockaddr_to_pyaddr(
  90396. * <system.sockaddr*>&self.__peername) # <<<<<<<<<<<<<<
  90397. * return super().get_extra_info(name, default)
  90398. *
  90399. */
  90400. __pyx_t_2 = __pyx_f_6uvloop_4loop___convert_sockaddr_to_pyaddr(((struct sockaddr *)(&__pyx_v_self->__pyx___peername))); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 162, __pyx_L1_error)
  90401. __Pyx_GOTREF(__pyx_t_2);
  90402. __pyx_r = __pyx_t_2;
  90403. __pyx_t_2 = 0;
  90404. goto __pyx_L0;
  90405. /* "uvloop/handles/tcp.pyx":161
  90406. * <system.sockaddr*>&self.__sockname)
  90407. * elif name == 'peername':
  90408. * if self.__peername_set: # <<<<<<<<<<<<<<
  90409. * return __convert_sockaddr_to_pyaddr(
  90410. * <system.sockaddr*>&self.__peername)
  90411. */
  90412. }
  90413. /* "uvloop/handles/tcp.pyx":160
  90414. * return __convert_sockaddr_to_pyaddr(
  90415. * <system.sockaddr*>&self.__sockname)
  90416. * elif name == 'peername': # <<<<<<<<<<<<<<
  90417. * if self.__peername_set:
  90418. * return __convert_sockaddr_to_pyaddr(
  90419. */
  90420. }
  90421. __pyx_L3:;
  90422. /* "uvloop/handles/tcp.pyx":164
  90423. * return __convert_sockaddr_to_pyaddr(
  90424. * <system.sockaddr*>&self.__peername)
  90425. * return super().get_extra_info(name, default) # <<<<<<<<<<<<<<
  90426. *
  90427. * cdef _new_socket(self):
  90428. */
  90429. __Pyx_XDECREF(__pyx_r);
  90430. __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 164, __pyx_L1_error)
  90431. __Pyx_GOTREF(__pyx_t_3);
  90432. __Pyx_INCREF(((PyObject *)__pyx_ptype_6uvloop_4loop_TCPTransport));
  90433. __Pyx_GIVEREF(((PyObject *)__pyx_ptype_6uvloop_4loop_TCPTransport));
  90434. PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_ptype_6uvloop_4loop_TCPTransport));
  90435. __Pyx_INCREF(((PyObject *)__pyx_v_self));
  90436. __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  90437. PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_self));
  90438. __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 164, __pyx_L1_error)
  90439. __Pyx_GOTREF(__pyx_t_4);
  90440. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  90441. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_get_extra_info); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 164, __pyx_L1_error)
  90442. __Pyx_GOTREF(__pyx_t_3);
  90443. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  90444. __pyx_t_4 = NULL;
  90445. __pyx_t_5 = 0;
  90446. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
  90447. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
  90448. if (likely(__pyx_t_4)) {
  90449. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  90450. __Pyx_INCREF(__pyx_t_4);
  90451. __Pyx_INCREF(function);
  90452. __Pyx_DECREF_SET(__pyx_t_3, function);
  90453. __pyx_t_5 = 1;
  90454. }
  90455. }
  90456. #if CYTHON_FAST_PYCALL
  90457. if (PyFunction_Check(__pyx_t_3)) {
  90458. PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_name, __pyx_v_default};
  90459. __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 164, __pyx_L1_error)
  90460. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  90461. __Pyx_GOTREF(__pyx_t_2);
  90462. } else
  90463. #endif
  90464. #if CYTHON_FAST_PYCCALL
  90465. if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
  90466. PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_name, __pyx_v_default};
  90467. __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 164, __pyx_L1_error)
  90468. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  90469. __Pyx_GOTREF(__pyx_t_2);
  90470. } else
  90471. #endif
  90472. {
  90473. __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 164, __pyx_L1_error)
  90474. __Pyx_GOTREF(__pyx_t_6);
  90475. if (__pyx_t_4) {
  90476. __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
  90477. }
  90478. __Pyx_INCREF(__pyx_v_name);
  90479. __Pyx_GIVEREF(__pyx_v_name);
  90480. PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_name);
  90481. __Pyx_INCREF(__pyx_v_default);
  90482. __Pyx_GIVEREF(__pyx_v_default);
  90483. PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_default);
  90484. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 164, __pyx_L1_error)
  90485. __Pyx_GOTREF(__pyx_t_2);
  90486. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  90487. }
  90488. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  90489. __pyx_r = __pyx_t_2;
  90490. __pyx_t_2 = 0;
  90491. goto __pyx_L0;
  90492. /* "uvloop/handles/tcp.pyx":155
  90493. * UVBaseTransport._call_connection_made(self)
  90494. *
  90495. * def get_extra_info(self, name, default=None): # <<<<<<<<<<<<<<
  90496. * if name == 'sockname':
  90497. * if self.__sockname_set:
  90498. */
  90499. /* function exit code */
  90500. __pyx_L1_error:;
  90501. __Pyx_XDECREF(__pyx_t_2);
  90502. __Pyx_XDECREF(__pyx_t_3);
  90503. __Pyx_XDECREF(__pyx_t_4);
  90504. __Pyx_XDECREF(__pyx_t_6);
  90505. __Pyx_AddTraceback("uvloop.loop.TCPTransport.get_extra_info", __pyx_clineno, __pyx_lineno, __pyx_filename);
  90506. __pyx_r = NULL;
  90507. __pyx_L0:;
  90508. __Pyx_XGIVEREF(__pyx_r);
  90509. __Pyx_RefNannyFinishContext();
  90510. return __pyx_r;
  90511. }
  90512. /* "uvloop/handles/tcp.pyx":166
  90513. * return super().get_extra_info(name, default)
  90514. *
  90515. * cdef _new_socket(self): # <<<<<<<<<<<<<<
  90516. * return __tcp_get_socket(<UVSocketHandle>self)
  90517. *
  90518. */
  90519. static PyObject *__pyx_f_6uvloop_4loop_12TCPTransport__new_socket(struct __pyx_obj_6uvloop_4loop_TCPTransport *__pyx_v_self) {
  90520. PyObject *__pyx_r = NULL;
  90521. __Pyx_RefNannyDeclarations
  90522. PyObject *__pyx_t_1 = NULL;
  90523. __Pyx_RefNannySetupContext("_new_socket", 0);
  90524. /* "uvloop/handles/tcp.pyx":167
  90525. *
  90526. * cdef _new_socket(self):
  90527. * return __tcp_get_socket(<UVSocketHandle>self) # <<<<<<<<<<<<<<
  90528. *
  90529. * cdef bind(self, system.sockaddr* addr, unsigned int flags=0):
  90530. */
  90531. __Pyx_XDECREF(__pyx_r);
  90532. __pyx_t_1 = __pyx_f_6uvloop_4loop___tcp_get_socket(((struct __pyx_obj_6uvloop_4loop_UVSocketHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 167, __pyx_L1_error)
  90533. __Pyx_GOTREF(__pyx_t_1);
  90534. __pyx_r = __pyx_t_1;
  90535. __pyx_t_1 = 0;
  90536. goto __pyx_L0;
  90537. /* "uvloop/handles/tcp.pyx":166
  90538. * return super().get_extra_info(name, default)
  90539. *
  90540. * cdef _new_socket(self): # <<<<<<<<<<<<<<
  90541. * return __tcp_get_socket(<UVSocketHandle>self)
  90542. *
  90543. */
  90544. /* function exit code */
  90545. __pyx_L1_error:;
  90546. __Pyx_XDECREF(__pyx_t_1);
  90547. __Pyx_AddTraceback("uvloop.loop.TCPTransport._new_socket", __pyx_clineno, __pyx_lineno, __pyx_filename);
  90548. __pyx_r = 0;
  90549. __pyx_L0:;
  90550. __Pyx_XGIVEREF(__pyx_r);
  90551. __Pyx_RefNannyFinishContext();
  90552. return __pyx_r;
  90553. }
  90554. /* "uvloop/handles/tcp.pyx":169
  90555. * return __tcp_get_socket(<UVSocketHandle>self)
  90556. *
  90557. * cdef bind(self, system.sockaddr* addr, unsigned int flags=0): # <<<<<<<<<<<<<<
  90558. * self._ensure_alive()
  90559. * __tcp_bind(<UVStream>self, addr, flags)
  90560. */
  90561. static PyObject *__pyx_f_6uvloop_4loop_12TCPTransport_bind(struct __pyx_obj_6uvloop_4loop_TCPTransport *__pyx_v_self, struct sockaddr *__pyx_v_addr, struct __pyx_opt_args_6uvloop_4loop_12TCPTransport_bind *__pyx_optional_args) {
  90562. unsigned int __pyx_v_flags = ((unsigned int)0);
  90563. PyObject *__pyx_r = NULL;
  90564. __Pyx_RefNannyDeclarations
  90565. PyObject *__pyx_t_1 = NULL;
  90566. __Pyx_RefNannySetupContext("bind", 0);
  90567. if (__pyx_optional_args) {
  90568. if (__pyx_optional_args->__pyx_n > 0) {
  90569. __pyx_v_flags = __pyx_optional_args->flags;
  90570. }
  90571. }
  90572. /* "uvloop/handles/tcp.pyx":170
  90573. *
  90574. * cdef bind(self, system.sockaddr* addr, unsigned int flags=0):
  90575. * self._ensure_alive() # <<<<<<<<<<<<<<
  90576. * __tcp_bind(<UVStream>self, addr, flags)
  90577. *
  90578. */
  90579. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_TCPTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base.__pyx_base._ensure_alive(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 170, __pyx_L1_error)
  90580. __Pyx_GOTREF(__pyx_t_1);
  90581. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  90582. /* "uvloop/handles/tcp.pyx":171
  90583. * cdef bind(self, system.sockaddr* addr, unsigned int flags=0):
  90584. * self._ensure_alive()
  90585. * __tcp_bind(<UVStream>self, addr, flags) # <<<<<<<<<<<<<<
  90586. *
  90587. * cdef _open(self, int sockfd):
  90588. */
  90589. __pyx_t_1 = __pyx_f_6uvloop_4loop___tcp_bind(((struct __pyx_obj_6uvloop_4loop_UVStream *)__pyx_v_self), __pyx_v_addr, __pyx_v_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 171, __pyx_L1_error)
  90590. __Pyx_GOTREF(__pyx_t_1);
  90591. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  90592. /* "uvloop/handles/tcp.pyx":169
  90593. * return __tcp_get_socket(<UVSocketHandle>self)
  90594. *
  90595. * cdef bind(self, system.sockaddr* addr, unsigned int flags=0): # <<<<<<<<<<<<<<
  90596. * self._ensure_alive()
  90597. * __tcp_bind(<UVStream>self, addr, flags)
  90598. */
  90599. /* function exit code */
  90600. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  90601. goto __pyx_L0;
  90602. __pyx_L1_error:;
  90603. __Pyx_XDECREF(__pyx_t_1);
  90604. __Pyx_AddTraceback("uvloop.loop.TCPTransport.bind", __pyx_clineno, __pyx_lineno, __pyx_filename);
  90605. __pyx_r = 0;
  90606. __pyx_L0:;
  90607. __Pyx_XGIVEREF(__pyx_r);
  90608. __Pyx_RefNannyFinishContext();
  90609. return __pyx_r;
  90610. }
  90611. /* "uvloop/handles/tcp.pyx":173
  90612. * __tcp_bind(<UVStream>self, addr, flags)
  90613. *
  90614. * cdef _open(self, int sockfd): # <<<<<<<<<<<<<<
  90615. * self._ensure_alive()
  90616. * __tcp_open(<UVStream>self, sockfd)
  90617. */
  90618. static PyObject *__pyx_f_6uvloop_4loop_12TCPTransport__open(struct __pyx_obj_6uvloop_4loop_TCPTransport *__pyx_v_self, int __pyx_v_sockfd) {
  90619. PyObject *__pyx_r = NULL;
  90620. __Pyx_RefNannyDeclarations
  90621. PyObject *__pyx_t_1 = NULL;
  90622. __Pyx_RefNannySetupContext("_open", 0);
  90623. /* "uvloop/handles/tcp.pyx":174
  90624. *
  90625. * cdef _open(self, int sockfd):
  90626. * self._ensure_alive() # <<<<<<<<<<<<<<
  90627. * __tcp_open(<UVStream>self, sockfd)
  90628. *
  90629. */
  90630. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_TCPTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base.__pyx_base._ensure_alive(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 174, __pyx_L1_error)
  90631. __Pyx_GOTREF(__pyx_t_1);
  90632. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  90633. /* "uvloop/handles/tcp.pyx":175
  90634. * cdef _open(self, int sockfd):
  90635. * self._ensure_alive()
  90636. * __tcp_open(<UVStream>self, sockfd) # <<<<<<<<<<<<<<
  90637. *
  90638. * cdef connect(self, system.sockaddr* addr):
  90639. */
  90640. __pyx_t_1 = __pyx_f_6uvloop_4loop___tcp_open(((struct __pyx_obj_6uvloop_4loop_UVStream *)__pyx_v_self), __pyx_v_sockfd); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 175, __pyx_L1_error)
  90641. __Pyx_GOTREF(__pyx_t_1);
  90642. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  90643. /* "uvloop/handles/tcp.pyx":173
  90644. * __tcp_bind(<UVStream>self, addr, flags)
  90645. *
  90646. * cdef _open(self, int sockfd): # <<<<<<<<<<<<<<
  90647. * self._ensure_alive()
  90648. * __tcp_open(<UVStream>self, sockfd)
  90649. */
  90650. /* function exit code */
  90651. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  90652. goto __pyx_L0;
  90653. __pyx_L1_error:;
  90654. __Pyx_XDECREF(__pyx_t_1);
  90655. __Pyx_AddTraceback("uvloop.loop.TCPTransport._open", __pyx_clineno, __pyx_lineno, __pyx_filename);
  90656. __pyx_r = 0;
  90657. __pyx_L0:;
  90658. __Pyx_XGIVEREF(__pyx_r);
  90659. __Pyx_RefNannyFinishContext();
  90660. return __pyx_r;
  90661. }
  90662. /* "uvloop/handles/tcp.pyx":177
  90663. * __tcp_open(<UVStream>self, sockfd)
  90664. *
  90665. * cdef connect(self, system.sockaddr* addr): # <<<<<<<<<<<<<<
  90666. * cdef _TCPConnectRequest req
  90667. * req = _TCPConnectRequest(self._loop, self)
  90668. */
  90669. static PyObject *__pyx_f_6uvloop_4loop_12TCPTransport_connect(struct __pyx_obj_6uvloop_4loop_TCPTransport *__pyx_v_self, struct sockaddr *__pyx_v_addr) {
  90670. struct __pyx_obj_6uvloop_4loop__TCPConnectRequest *__pyx_v_req = 0;
  90671. PyObject *__pyx_r = NULL;
  90672. __Pyx_RefNannyDeclarations
  90673. PyObject *__pyx_t_1 = NULL;
  90674. PyObject *__pyx_t_2 = NULL;
  90675. __Pyx_RefNannySetupContext("connect", 0);
  90676. /* "uvloop/handles/tcp.pyx":179
  90677. * cdef connect(self, system.sockaddr* addr):
  90678. * cdef _TCPConnectRequest req
  90679. * req = _TCPConnectRequest(self._loop, self) # <<<<<<<<<<<<<<
  90680. * req.connect(addr)
  90681. *
  90682. */
  90683. __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 179, __pyx_L1_error)
  90684. __Pyx_GOTREF(__pyx_t_1);
  90685. __Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base._loop));
  90686. __Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base._loop));
  90687. PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base._loop));
  90688. __Pyx_INCREF(((PyObject *)__pyx_v_self));
  90689. __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  90690. PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_self));
  90691. __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6uvloop_4loop__TCPConnectRequest), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 179, __pyx_L1_error)
  90692. __Pyx_GOTREF(__pyx_t_2);
  90693. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  90694. __pyx_v_req = ((struct __pyx_obj_6uvloop_4loop__TCPConnectRequest *)__pyx_t_2);
  90695. __pyx_t_2 = 0;
  90696. /* "uvloop/handles/tcp.pyx":180
  90697. * cdef _TCPConnectRequest req
  90698. * req = _TCPConnectRequest(self._loop, self)
  90699. * req.connect(addr) # <<<<<<<<<<<<<<
  90700. *
  90701. *
  90702. */
  90703. __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop__TCPConnectRequest *)__pyx_v_req->__pyx_base.__pyx_vtab)->connect(__pyx_v_req, __pyx_v_addr); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 180, __pyx_L1_error)
  90704. __Pyx_GOTREF(__pyx_t_2);
  90705. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  90706. /* "uvloop/handles/tcp.pyx":177
  90707. * __tcp_open(<UVStream>self, sockfd)
  90708. *
  90709. * cdef connect(self, system.sockaddr* addr): # <<<<<<<<<<<<<<
  90710. * cdef _TCPConnectRequest req
  90711. * req = _TCPConnectRequest(self._loop, self)
  90712. */
  90713. /* function exit code */
  90714. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  90715. goto __pyx_L0;
  90716. __pyx_L1_error:;
  90717. __Pyx_XDECREF(__pyx_t_1);
  90718. __Pyx_XDECREF(__pyx_t_2);
  90719. __Pyx_AddTraceback("uvloop.loop.TCPTransport.connect", __pyx_clineno, __pyx_lineno, __pyx_filename);
  90720. __pyx_r = 0;
  90721. __pyx_L0:;
  90722. __Pyx_XDECREF((PyObject *)__pyx_v_req);
  90723. __Pyx_XGIVEREF(__pyx_r);
  90724. __Pyx_RefNannyFinishContext();
  90725. return __pyx_r;
  90726. }
  90727. /* "(tree fragment)":1
  90728. * def __reduce_cython__(self): # <<<<<<<<<<<<<<
  90729. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  90730. * def __setstate_cython__(self, __pyx_state):
  90731. */
  90732. /* Python wrapper */
  90733. static PyObject *__pyx_pw_6uvloop_4loop_12TCPTransport_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  90734. static char __pyx_doc_6uvloop_4loop_12TCPTransport_2__reduce_cython__[] = "TCPTransport.__reduce_cython__(self)";
  90735. static PyObject *__pyx_pw_6uvloop_4loop_12TCPTransport_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  90736. PyObject *__pyx_r = 0;
  90737. __Pyx_RefNannyDeclarations
  90738. __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  90739. __pyx_r = __pyx_pf_6uvloop_4loop_12TCPTransport_2__reduce_cython__(((struct __pyx_obj_6uvloop_4loop_TCPTransport *)__pyx_v_self));
  90740. /* function exit code */
  90741. __Pyx_RefNannyFinishContext();
  90742. return __pyx_r;
  90743. }
  90744. static PyObject *__pyx_pf_6uvloop_4loop_12TCPTransport_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_TCPTransport *__pyx_v_self) {
  90745. PyObject *__pyx_r = NULL;
  90746. __Pyx_RefNannyDeclarations
  90747. PyObject *__pyx_t_1 = NULL;
  90748. __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  90749. /* "(tree fragment)":2
  90750. * def __reduce_cython__(self):
  90751. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  90752. * def __setstate_cython__(self, __pyx_state):
  90753. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  90754. */
  90755. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__148, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 2, __pyx_L1_error)
  90756. __Pyx_GOTREF(__pyx_t_1);
  90757. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  90758. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  90759. __PYX_ERR(9, 2, __pyx_L1_error)
  90760. /* "(tree fragment)":1
  90761. * def __reduce_cython__(self): # <<<<<<<<<<<<<<
  90762. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  90763. * def __setstate_cython__(self, __pyx_state):
  90764. */
  90765. /* function exit code */
  90766. __pyx_L1_error:;
  90767. __Pyx_XDECREF(__pyx_t_1);
  90768. __Pyx_AddTraceback("uvloop.loop.TCPTransport.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  90769. __pyx_r = NULL;
  90770. __Pyx_XGIVEREF(__pyx_r);
  90771. __Pyx_RefNannyFinishContext();
  90772. return __pyx_r;
  90773. }
  90774. /* "(tree fragment)":3
  90775. * def __reduce_cython__(self):
  90776. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  90777. * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
  90778. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  90779. */
  90780. /* Python wrapper */
  90781. static PyObject *__pyx_pw_6uvloop_4loop_12TCPTransport_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
  90782. static char __pyx_doc_6uvloop_4loop_12TCPTransport_4__setstate_cython__[] = "TCPTransport.__setstate_cython__(self, __pyx_state)";
  90783. static PyObject *__pyx_pw_6uvloop_4loop_12TCPTransport_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  90784. PyObject *__pyx_r = 0;
  90785. __Pyx_RefNannyDeclarations
  90786. __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  90787. __pyx_r = __pyx_pf_6uvloop_4loop_12TCPTransport_4__setstate_cython__(((struct __pyx_obj_6uvloop_4loop_TCPTransport *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
  90788. /* function exit code */
  90789. __Pyx_RefNannyFinishContext();
  90790. return __pyx_r;
  90791. }
  90792. static PyObject *__pyx_pf_6uvloop_4loop_12TCPTransport_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_TCPTransport *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  90793. PyObject *__pyx_r = NULL;
  90794. __Pyx_RefNannyDeclarations
  90795. PyObject *__pyx_t_1 = NULL;
  90796. __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  90797. /* "(tree fragment)":4
  90798. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  90799. * def __setstate_cython__(self, __pyx_state):
  90800. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  90801. */
  90802. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__149, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 4, __pyx_L1_error)
  90803. __Pyx_GOTREF(__pyx_t_1);
  90804. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  90805. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  90806. __PYX_ERR(9, 4, __pyx_L1_error)
  90807. /* "(tree fragment)":3
  90808. * def __reduce_cython__(self):
  90809. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  90810. * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
  90811. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  90812. */
  90813. /* function exit code */
  90814. __pyx_L1_error:;
  90815. __Pyx_XDECREF(__pyx_t_1);
  90816. __Pyx_AddTraceback("uvloop.loop.TCPTransport.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  90817. __pyx_r = NULL;
  90818. __Pyx_XGIVEREF(__pyx_r);
  90819. __Pyx_RefNannyFinishContext();
  90820. return __pyx_r;
  90821. }
  90822. /* "uvloop/handles/tcp.pyx":188
  90823. * uv.uv_connect_t _req_data
  90824. *
  90825. * def __cinit__(self, loop, transport): # <<<<<<<<<<<<<<
  90826. * self.request = <uv.uv_req_t*>&self._req_data
  90827. * self.request.data = <void*>self
  90828. */
  90829. /* Python wrapper */
  90830. static int __pyx_pw_6uvloop_4loop_18_TCPConnectRequest_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  90831. static int __pyx_pw_6uvloop_4loop_18_TCPConnectRequest_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  90832. CYTHON_UNUSED PyObject *__pyx_v_loop = 0;
  90833. PyObject *__pyx_v_transport = 0;
  90834. int __pyx_r;
  90835. __Pyx_RefNannyDeclarations
  90836. __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  90837. {
  90838. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_loop,&__pyx_n_s_transport,0};
  90839. PyObject* values[2] = {0,0};
  90840. if (unlikely(__pyx_kwds)) {
  90841. Py_ssize_t kw_args;
  90842. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  90843. switch (pos_args) {
  90844. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  90845. CYTHON_FALLTHROUGH;
  90846. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  90847. CYTHON_FALLTHROUGH;
  90848. case 0: break;
  90849. default: goto __pyx_L5_argtuple_error;
  90850. }
  90851. kw_args = PyDict_Size(__pyx_kwds);
  90852. switch (pos_args) {
  90853. case 0:
  90854. if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_loop)) != 0)) kw_args--;
  90855. else goto __pyx_L5_argtuple_error;
  90856. CYTHON_FALLTHROUGH;
  90857. case 1:
  90858. if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_transport)) != 0)) kw_args--;
  90859. else {
  90860. __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, 1); __PYX_ERR(5, 188, __pyx_L3_error)
  90861. }
  90862. }
  90863. if (unlikely(kw_args > 0)) {
  90864. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(5, 188, __pyx_L3_error)
  90865. }
  90866. } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
  90867. goto __pyx_L5_argtuple_error;
  90868. } else {
  90869. values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  90870. values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  90871. }
  90872. __pyx_v_loop = values[0];
  90873. __pyx_v_transport = values[1];
  90874. }
  90875. goto __pyx_L4_argument_unpacking_done;
  90876. __pyx_L5_argtuple_error:;
  90877. __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(5, 188, __pyx_L3_error)
  90878. __pyx_L3_error:;
  90879. __Pyx_AddTraceback("uvloop.loop._TCPConnectRequest.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  90880. __Pyx_RefNannyFinishContext();
  90881. return -1;
  90882. __pyx_L4_argument_unpacking_done:;
  90883. __pyx_r = __pyx_pf_6uvloop_4loop_18_TCPConnectRequest___cinit__(((struct __pyx_obj_6uvloop_4loop__TCPConnectRequest *)__pyx_v_self), __pyx_v_loop, __pyx_v_transport);
  90884. /* function exit code */
  90885. __Pyx_RefNannyFinishContext();
  90886. return __pyx_r;
  90887. }
  90888. static int __pyx_pf_6uvloop_4loop_18_TCPConnectRequest___cinit__(struct __pyx_obj_6uvloop_4loop__TCPConnectRequest *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_loop, PyObject *__pyx_v_transport) {
  90889. int __pyx_r;
  90890. __Pyx_RefNannyDeclarations
  90891. PyObject *__pyx_t_1 = NULL;
  90892. __Pyx_RefNannySetupContext("__cinit__", 0);
  90893. /* "uvloop/handles/tcp.pyx":189
  90894. *
  90895. * def __cinit__(self, loop, transport):
  90896. * self.request = <uv.uv_req_t*>&self._req_data # <<<<<<<<<<<<<<
  90897. * self.request.data = <void*>self
  90898. * self.transport = transport
  90899. */
  90900. __pyx_v_self->__pyx_base.request = ((uv_req_t *)(&__pyx_v_self->_req_data));
  90901. /* "uvloop/handles/tcp.pyx":190
  90902. * def __cinit__(self, loop, transport):
  90903. * self.request = <uv.uv_req_t*>&self._req_data
  90904. * self.request.data = <void*>self # <<<<<<<<<<<<<<
  90905. * self.transport = transport
  90906. *
  90907. */
  90908. __pyx_v_self->__pyx_base.request->data = ((void *)__pyx_v_self);
  90909. /* "uvloop/handles/tcp.pyx":191
  90910. * self.request = <uv.uv_req_t*>&self._req_data
  90911. * self.request.data = <void*>self
  90912. * self.transport = transport # <<<<<<<<<<<<<<
  90913. *
  90914. * cdef connect(self, system.sockaddr* addr):
  90915. */
  90916. if (!(likely(((__pyx_v_transport) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_transport, __pyx_ptype_6uvloop_4loop_TCPTransport))))) __PYX_ERR(5, 191, __pyx_L1_error)
  90917. __pyx_t_1 = __pyx_v_transport;
  90918. __Pyx_INCREF(__pyx_t_1);
  90919. __Pyx_GIVEREF(__pyx_t_1);
  90920. __Pyx_GOTREF(__pyx_v_self->transport);
  90921. __Pyx_DECREF(((PyObject *)__pyx_v_self->transport));
  90922. __pyx_v_self->transport = ((struct __pyx_obj_6uvloop_4loop_TCPTransport *)__pyx_t_1);
  90923. __pyx_t_1 = 0;
  90924. /* "uvloop/handles/tcp.pyx":188
  90925. * uv.uv_connect_t _req_data
  90926. *
  90927. * def __cinit__(self, loop, transport): # <<<<<<<<<<<<<<
  90928. * self.request = <uv.uv_req_t*>&self._req_data
  90929. * self.request.data = <void*>self
  90930. */
  90931. /* function exit code */
  90932. __pyx_r = 0;
  90933. goto __pyx_L0;
  90934. __pyx_L1_error:;
  90935. __Pyx_XDECREF(__pyx_t_1);
  90936. __Pyx_AddTraceback("uvloop.loop._TCPConnectRequest.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  90937. __pyx_r = -1;
  90938. __pyx_L0:;
  90939. __Pyx_RefNannyFinishContext();
  90940. return __pyx_r;
  90941. }
  90942. /* "uvloop/handles/tcp.pyx":193
  90943. * self.transport = transport
  90944. *
  90945. * cdef connect(self, system.sockaddr* addr): # <<<<<<<<<<<<<<
  90946. * cdef int err
  90947. * err = uv.uv_tcp_connect(<uv.uv_connect_t*>self.request,
  90948. */
  90949. static PyObject *__pyx_f_6uvloop_4loop_18_TCPConnectRequest_connect(struct __pyx_obj_6uvloop_4loop__TCPConnectRequest *__pyx_v_self, struct sockaddr *__pyx_v_addr) {
  90950. int __pyx_v_err;
  90951. PyObject *__pyx_v_exc = NULL;
  90952. PyObject *__pyx_r = NULL;
  90953. __Pyx_RefNannyDeclarations
  90954. int __pyx_t_1;
  90955. PyObject *__pyx_t_2 = NULL;
  90956. __Pyx_RefNannySetupContext("connect", 0);
  90957. /* "uvloop/handles/tcp.pyx":195
  90958. * cdef connect(self, system.sockaddr* addr):
  90959. * cdef int err
  90960. * err = uv.uv_tcp_connect(<uv.uv_connect_t*>self.request, # <<<<<<<<<<<<<<
  90961. * <uv.uv_tcp_t*>self.transport._handle,
  90962. * addr,
  90963. */
  90964. __pyx_v_err = uv_tcp_connect(((uv_connect_t *)__pyx_v_self->__pyx_base.request), ((uv_tcp_t *)__pyx_v_self->transport->__pyx_base.__pyx_base.__pyx_base.__pyx_base._handle), __pyx_v_addr, __pyx_f_6uvloop_4loop___tcp_connect_callback);
  90965. /* "uvloop/handles/tcp.pyx":199
  90966. * addr,
  90967. * __tcp_connect_callback)
  90968. * if err < 0: # <<<<<<<<<<<<<<
  90969. * exc = convert_error(err)
  90970. * self.on_done()
  90971. */
  90972. __pyx_t_1 = ((__pyx_v_err < 0) != 0);
  90973. if (unlikely(__pyx_t_1)) {
  90974. /* "uvloop/handles/tcp.pyx":200
  90975. * __tcp_connect_callback)
  90976. * if err < 0:
  90977. * exc = convert_error(err) # <<<<<<<<<<<<<<
  90978. * self.on_done()
  90979. * raise exc
  90980. */
  90981. __pyx_t_2 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 200, __pyx_L1_error)
  90982. __Pyx_GOTREF(__pyx_t_2);
  90983. __pyx_v_exc = __pyx_t_2;
  90984. __pyx_t_2 = 0;
  90985. /* "uvloop/handles/tcp.pyx":201
  90986. * if err < 0:
  90987. * exc = convert_error(err)
  90988. * self.on_done() # <<<<<<<<<<<<<<
  90989. * raise exc
  90990. *
  90991. */
  90992. __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop__TCPConnectRequest *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.on_done(((struct __pyx_obj_6uvloop_4loop_UVRequest *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 201, __pyx_L1_error)
  90993. __Pyx_GOTREF(__pyx_t_2);
  90994. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  90995. /* "uvloop/handles/tcp.pyx":202
  90996. * exc = convert_error(err)
  90997. * self.on_done()
  90998. * raise exc # <<<<<<<<<<<<<<
  90999. *
  91000. *
  91001. */
  91002. __Pyx_Raise(__pyx_v_exc, 0, 0, 0);
  91003. __PYX_ERR(5, 202, __pyx_L1_error)
  91004. /* "uvloop/handles/tcp.pyx":199
  91005. * addr,
  91006. * __tcp_connect_callback)
  91007. * if err < 0: # <<<<<<<<<<<<<<
  91008. * exc = convert_error(err)
  91009. * self.on_done()
  91010. */
  91011. }
  91012. /* "uvloop/handles/tcp.pyx":193
  91013. * self.transport = transport
  91014. *
  91015. * cdef connect(self, system.sockaddr* addr): # <<<<<<<<<<<<<<
  91016. * cdef int err
  91017. * err = uv.uv_tcp_connect(<uv.uv_connect_t*>self.request,
  91018. */
  91019. /* function exit code */
  91020. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  91021. goto __pyx_L0;
  91022. __pyx_L1_error:;
  91023. __Pyx_XDECREF(__pyx_t_2);
  91024. __Pyx_AddTraceback("uvloop.loop._TCPConnectRequest.connect", __pyx_clineno, __pyx_lineno, __pyx_filename);
  91025. __pyx_r = 0;
  91026. __pyx_L0:;
  91027. __Pyx_XDECREF(__pyx_v_exc);
  91028. __Pyx_XGIVEREF(__pyx_r);
  91029. __Pyx_RefNannyFinishContext();
  91030. return __pyx_r;
  91031. }
  91032. /* "(tree fragment)":1
  91033. * def __reduce_cython__(self): # <<<<<<<<<<<<<<
  91034. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  91035. * def __setstate_cython__(self, __pyx_state):
  91036. */
  91037. /* Python wrapper */
  91038. static PyObject *__pyx_pw_6uvloop_4loop_18_TCPConnectRequest_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  91039. static char __pyx_doc_6uvloop_4loop_18_TCPConnectRequest_2__reduce_cython__[] = "_TCPConnectRequest.__reduce_cython__(self)";
  91040. static PyObject *__pyx_pw_6uvloop_4loop_18_TCPConnectRequest_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  91041. PyObject *__pyx_r = 0;
  91042. __Pyx_RefNannyDeclarations
  91043. __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  91044. __pyx_r = __pyx_pf_6uvloop_4loop_18_TCPConnectRequest_2__reduce_cython__(((struct __pyx_obj_6uvloop_4loop__TCPConnectRequest *)__pyx_v_self));
  91045. /* function exit code */
  91046. __Pyx_RefNannyFinishContext();
  91047. return __pyx_r;
  91048. }
  91049. static PyObject *__pyx_pf_6uvloop_4loop_18_TCPConnectRequest_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop__TCPConnectRequest *__pyx_v_self) {
  91050. PyObject *__pyx_r = NULL;
  91051. __Pyx_RefNannyDeclarations
  91052. PyObject *__pyx_t_1 = NULL;
  91053. __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  91054. /* "(tree fragment)":2
  91055. * def __reduce_cython__(self):
  91056. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  91057. * def __setstate_cython__(self, __pyx_state):
  91058. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  91059. */
  91060. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__150, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 2, __pyx_L1_error)
  91061. __Pyx_GOTREF(__pyx_t_1);
  91062. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  91063. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  91064. __PYX_ERR(9, 2, __pyx_L1_error)
  91065. /* "(tree fragment)":1
  91066. * def __reduce_cython__(self): # <<<<<<<<<<<<<<
  91067. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  91068. * def __setstate_cython__(self, __pyx_state):
  91069. */
  91070. /* function exit code */
  91071. __pyx_L1_error:;
  91072. __Pyx_XDECREF(__pyx_t_1);
  91073. __Pyx_AddTraceback("uvloop.loop._TCPConnectRequest.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  91074. __pyx_r = NULL;
  91075. __Pyx_XGIVEREF(__pyx_r);
  91076. __Pyx_RefNannyFinishContext();
  91077. return __pyx_r;
  91078. }
  91079. /* "(tree fragment)":3
  91080. * def __reduce_cython__(self):
  91081. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  91082. * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
  91083. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  91084. */
  91085. /* Python wrapper */
  91086. static PyObject *__pyx_pw_6uvloop_4loop_18_TCPConnectRequest_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
  91087. static char __pyx_doc_6uvloop_4loop_18_TCPConnectRequest_4__setstate_cython__[] = "_TCPConnectRequest.__setstate_cython__(self, __pyx_state)";
  91088. static PyObject *__pyx_pw_6uvloop_4loop_18_TCPConnectRequest_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  91089. PyObject *__pyx_r = 0;
  91090. __Pyx_RefNannyDeclarations
  91091. __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  91092. __pyx_r = __pyx_pf_6uvloop_4loop_18_TCPConnectRequest_4__setstate_cython__(((struct __pyx_obj_6uvloop_4loop__TCPConnectRequest *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
  91093. /* function exit code */
  91094. __Pyx_RefNannyFinishContext();
  91095. return __pyx_r;
  91096. }
  91097. static PyObject *__pyx_pf_6uvloop_4loop_18_TCPConnectRequest_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop__TCPConnectRequest *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  91098. PyObject *__pyx_r = NULL;
  91099. __Pyx_RefNannyDeclarations
  91100. PyObject *__pyx_t_1 = NULL;
  91101. __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  91102. /* "(tree fragment)":4
  91103. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  91104. * def __setstate_cython__(self, __pyx_state):
  91105. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  91106. */
  91107. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__151, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 4, __pyx_L1_error)
  91108. __Pyx_GOTREF(__pyx_t_1);
  91109. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  91110. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  91111. __PYX_ERR(9, 4, __pyx_L1_error)
  91112. /* "(tree fragment)":3
  91113. * def __reduce_cython__(self):
  91114. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  91115. * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
  91116. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  91117. */
  91118. /* function exit code */
  91119. __pyx_L1_error:;
  91120. __Pyx_XDECREF(__pyx_t_1);
  91121. __Pyx_AddTraceback("uvloop.loop._TCPConnectRequest.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  91122. __pyx_r = NULL;
  91123. __Pyx_XGIVEREF(__pyx_r);
  91124. __Pyx_RefNannyFinishContext();
  91125. return __pyx_r;
  91126. }
  91127. /* "uvloop/handles/tcp.pyx":205
  91128. *
  91129. *
  91130. * cdef void __tcp_connect_callback(uv.uv_connect_t* req, int status) with gil: # <<<<<<<<<<<<<<
  91131. * cdef:
  91132. * _TCPConnectRequest wrapper
  91133. */
  91134. static void __pyx_f_6uvloop_4loop___tcp_connect_callback(uv_connect_t *__pyx_v_req, int __pyx_v_status) {
  91135. struct __pyx_obj_6uvloop_4loop__TCPConnectRequest *__pyx_v_wrapper = 0;
  91136. struct __pyx_obj_6uvloop_4loop_TCPTransport *__pyx_v_transport = 0;
  91137. PyObject *__pyx_v_exc = NULL;
  91138. PyObject *__pyx_v_ex = NULL;
  91139. __Pyx_RefNannyDeclarations
  91140. PyObject *__pyx_t_1 = NULL;
  91141. int __pyx_t_2;
  91142. PyObject *__pyx_t_3 = NULL;
  91143. PyObject *__pyx_t_4 = NULL;
  91144. PyObject *__pyx_t_5 = NULL;
  91145. int __pyx_t_6;
  91146. PyObject *__pyx_t_7 = NULL;
  91147. PyObject *__pyx_t_8 = NULL;
  91148. PyObject *__pyx_t_9 = NULL;
  91149. int __pyx_t_10;
  91150. char const *__pyx_t_11;
  91151. PyObject *__pyx_t_12 = NULL;
  91152. PyObject *__pyx_t_13 = NULL;
  91153. PyObject *__pyx_t_14 = NULL;
  91154. PyObject *__pyx_t_15 = NULL;
  91155. PyObject *__pyx_t_16 = NULL;
  91156. PyObject *__pyx_t_17 = NULL;
  91157. char const *__pyx_t_18;
  91158. #ifdef WITH_THREAD
  91159. PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  91160. #endif
  91161. __Pyx_RefNannySetupContext("__tcp_connect_callback", 0);
  91162. /* "uvloop/handles/tcp.pyx":210
  91163. * TCPTransport transport
  91164. *
  91165. * wrapper = <_TCPConnectRequest> req.data # <<<<<<<<<<<<<<
  91166. * transport = wrapper.transport
  91167. *
  91168. */
  91169. __pyx_t_1 = ((PyObject *)__pyx_v_req->data);
  91170. __Pyx_INCREF(__pyx_t_1);
  91171. __pyx_v_wrapper = ((struct __pyx_obj_6uvloop_4loop__TCPConnectRequest *)__pyx_t_1);
  91172. __pyx_t_1 = 0;
  91173. /* "uvloop/handles/tcp.pyx":211
  91174. *
  91175. * wrapper = <_TCPConnectRequest> req.data
  91176. * transport = wrapper.transport # <<<<<<<<<<<<<<
  91177. *
  91178. * if status < 0:
  91179. */
  91180. __pyx_t_1 = ((PyObject *)__pyx_v_wrapper->transport);
  91181. __Pyx_INCREF(__pyx_t_1);
  91182. __pyx_v_transport = ((struct __pyx_obj_6uvloop_4loop_TCPTransport *)__pyx_t_1);
  91183. __pyx_t_1 = 0;
  91184. /* "uvloop/handles/tcp.pyx":213
  91185. * transport = wrapper.transport
  91186. *
  91187. * if status < 0: # <<<<<<<<<<<<<<
  91188. * exc = convert_error(status)
  91189. * else:
  91190. */
  91191. __pyx_t_2 = ((__pyx_v_status < 0) != 0);
  91192. if (__pyx_t_2) {
  91193. /* "uvloop/handles/tcp.pyx":214
  91194. *
  91195. * if status < 0:
  91196. * exc = convert_error(status) # <<<<<<<<<<<<<<
  91197. * else:
  91198. * exc = None
  91199. */
  91200. __pyx_t_1 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_status); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 214, __pyx_L1_error)
  91201. __Pyx_GOTREF(__pyx_t_1);
  91202. __pyx_v_exc = __pyx_t_1;
  91203. __pyx_t_1 = 0;
  91204. /* "uvloop/handles/tcp.pyx":213
  91205. * transport = wrapper.transport
  91206. *
  91207. * if status < 0: # <<<<<<<<<<<<<<
  91208. * exc = convert_error(status)
  91209. * else:
  91210. */
  91211. goto __pyx_L3;
  91212. }
  91213. /* "uvloop/handles/tcp.pyx":216
  91214. * exc = convert_error(status)
  91215. * else:
  91216. * exc = None # <<<<<<<<<<<<<<
  91217. *
  91218. * try:
  91219. */
  91220. /*else*/ {
  91221. __Pyx_INCREF(Py_None);
  91222. __pyx_v_exc = Py_None;
  91223. }
  91224. __pyx_L3:;
  91225. /* "uvloop/handles/tcp.pyx":218
  91226. * exc = None
  91227. *
  91228. * try: # <<<<<<<<<<<<<<
  91229. * transport._on_connect(exc)
  91230. * except BaseException as ex:
  91231. */
  91232. /*try:*/ {
  91233. {
  91234. __Pyx_PyThreadState_declare
  91235. __Pyx_PyThreadState_assign
  91236. __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
  91237. __Pyx_XGOTREF(__pyx_t_3);
  91238. __Pyx_XGOTREF(__pyx_t_4);
  91239. __Pyx_XGOTREF(__pyx_t_5);
  91240. /*try:*/ {
  91241. /* "uvloop/handles/tcp.pyx":219
  91242. *
  91243. * try:
  91244. * transport._on_connect(exc) # <<<<<<<<<<<<<<
  91245. * except BaseException as ex:
  91246. * wrapper.transport._fatal_error(ex, False)
  91247. */
  91248. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_TCPTransport *)__pyx_v_transport->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._on_connect(((struct __pyx_obj_6uvloop_4loop_UVStream *)__pyx_v_transport), __pyx_v_exc); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 219, __pyx_L7_error)
  91249. __Pyx_GOTREF(__pyx_t_1);
  91250. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  91251. /* "uvloop/handles/tcp.pyx":218
  91252. * exc = None
  91253. *
  91254. * try: # <<<<<<<<<<<<<<
  91255. * transport._on_connect(exc)
  91256. * except BaseException as ex:
  91257. */
  91258. }
  91259. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  91260. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  91261. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  91262. goto __pyx_L12_try_end;
  91263. __pyx_L7_error:;
  91264. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  91265. /* "uvloop/handles/tcp.pyx":220
  91266. * try:
  91267. * transport._on_connect(exc)
  91268. * except BaseException as ex: # <<<<<<<<<<<<<<
  91269. * wrapper.transport._fatal_error(ex, False)
  91270. * finally:
  91271. */
  91272. __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_BaseException);
  91273. if (__pyx_t_6) {
  91274. __Pyx_AddTraceback("uvloop.loop.__tcp_connect_callback", __pyx_clineno, __pyx_lineno, __pyx_filename);
  91275. if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_7, &__pyx_t_8) < 0) __PYX_ERR(5, 220, __pyx_L9_except_error)
  91276. __Pyx_GOTREF(__pyx_t_1);
  91277. __Pyx_GOTREF(__pyx_t_7);
  91278. __Pyx_GOTREF(__pyx_t_8);
  91279. __Pyx_INCREF(__pyx_t_7);
  91280. __pyx_v_ex = __pyx_t_7;
  91281. /*try:*/ {
  91282. /* "uvloop/handles/tcp.pyx":221
  91283. * transport._on_connect(exc)
  91284. * except BaseException as ex:
  91285. * wrapper.transport._fatal_error(ex, False) # <<<<<<<<<<<<<<
  91286. * finally:
  91287. * wrapper.on_done()
  91288. */
  91289. __pyx_t_9 = ((struct __pyx_vtabstruct_6uvloop_4loop_TCPTransport *)__pyx_v_wrapper->transport->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base.__pyx_base._fatal_error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_wrapper->transport), __pyx_v_ex, Py_False, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 221, __pyx_L18_error)
  91290. __Pyx_GOTREF(__pyx_t_9);
  91291. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  91292. }
  91293. /* "uvloop/handles/tcp.pyx":220
  91294. * try:
  91295. * transport._on_connect(exc)
  91296. * except BaseException as ex: # <<<<<<<<<<<<<<
  91297. * wrapper.transport._fatal_error(ex, False)
  91298. * finally:
  91299. */
  91300. /*finally:*/ {
  91301. /*normal exit:*/{
  91302. __Pyx_DECREF(__pyx_v_ex);
  91303. __pyx_v_ex = NULL;
  91304. goto __pyx_L19;
  91305. }
  91306. __pyx_L18_error:;
  91307. /*exception exit:*/{
  91308. __Pyx_PyThreadState_declare
  91309. __Pyx_PyThreadState_assign
  91310. __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0;
  91311. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  91312. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17);
  91313. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14) < 0)) __Pyx_ErrFetch(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
  91314. __Pyx_XGOTREF(__pyx_t_12);
  91315. __Pyx_XGOTREF(__pyx_t_13);
  91316. __Pyx_XGOTREF(__pyx_t_14);
  91317. __Pyx_XGOTREF(__pyx_t_15);
  91318. __Pyx_XGOTREF(__pyx_t_16);
  91319. __Pyx_XGOTREF(__pyx_t_17);
  91320. __pyx_t_6 = __pyx_lineno; __pyx_t_10 = __pyx_clineno; __pyx_t_11 = __pyx_filename;
  91321. {
  91322. __Pyx_DECREF(__pyx_v_ex);
  91323. __pyx_v_ex = NULL;
  91324. }
  91325. if (PY_MAJOR_VERSION >= 3) {
  91326. __Pyx_XGIVEREF(__pyx_t_15);
  91327. __Pyx_XGIVEREF(__pyx_t_16);
  91328. __Pyx_XGIVEREF(__pyx_t_17);
  91329. __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17);
  91330. }
  91331. __Pyx_XGIVEREF(__pyx_t_12);
  91332. __Pyx_XGIVEREF(__pyx_t_13);
  91333. __Pyx_XGIVEREF(__pyx_t_14);
  91334. __Pyx_ErrRestore(__pyx_t_12, __pyx_t_13, __pyx_t_14);
  91335. __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0;
  91336. __pyx_lineno = __pyx_t_6; __pyx_clineno = __pyx_t_10; __pyx_filename = __pyx_t_11;
  91337. goto __pyx_L9_except_error;
  91338. }
  91339. __pyx_L19:;
  91340. }
  91341. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  91342. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  91343. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  91344. goto __pyx_L8_exception_handled;
  91345. }
  91346. goto __pyx_L9_except_error;
  91347. __pyx_L9_except_error:;
  91348. /* "uvloop/handles/tcp.pyx":218
  91349. * exc = None
  91350. *
  91351. * try: # <<<<<<<<<<<<<<
  91352. * transport._on_connect(exc)
  91353. * except BaseException as ex:
  91354. */
  91355. __Pyx_XGIVEREF(__pyx_t_3);
  91356. __Pyx_XGIVEREF(__pyx_t_4);
  91357. __Pyx_XGIVEREF(__pyx_t_5);
  91358. __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
  91359. goto __pyx_L5_error;
  91360. __pyx_L8_exception_handled:;
  91361. __Pyx_XGIVEREF(__pyx_t_3);
  91362. __Pyx_XGIVEREF(__pyx_t_4);
  91363. __Pyx_XGIVEREF(__pyx_t_5);
  91364. __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
  91365. __pyx_L12_try_end:;
  91366. }
  91367. }
  91368. /* "uvloop/handles/tcp.pyx":223
  91369. * wrapper.transport._fatal_error(ex, False)
  91370. * finally:
  91371. * wrapper.on_done() # <<<<<<<<<<<<<<
  91372. */
  91373. /*finally:*/ {
  91374. /*normal exit:*/{
  91375. __pyx_t_8 = ((struct __pyx_vtabstruct_6uvloop_4loop__TCPConnectRequest *)__pyx_v_wrapper->__pyx_base.__pyx_vtab)->__pyx_base.on_done(((struct __pyx_obj_6uvloop_4loop_UVRequest *)__pyx_v_wrapper)); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 223, __pyx_L1_error)
  91376. __Pyx_GOTREF(__pyx_t_8);
  91377. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  91378. goto __pyx_L6;
  91379. }
  91380. __pyx_L5_error:;
  91381. /*exception exit:*/{
  91382. __Pyx_PyThreadState_declare
  91383. __Pyx_PyThreadState_assign
  91384. __pyx_t_5 = 0; __pyx_t_4 = 0; __pyx_t_3 = 0; __pyx_t_17 = 0; __pyx_t_16 = 0; __pyx_t_15 = 0;
  91385. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  91386. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  91387. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  91388. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  91389. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_17, &__pyx_t_16, &__pyx_t_15);
  91390. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_3) < 0)) __Pyx_ErrFetch(&__pyx_t_5, &__pyx_t_4, &__pyx_t_3);
  91391. __Pyx_XGOTREF(__pyx_t_5);
  91392. __Pyx_XGOTREF(__pyx_t_4);
  91393. __Pyx_XGOTREF(__pyx_t_3);
  91394. __Pyx_XGOTREF(__pyx_t_17);
  91395. __Pyx_XGOTREF(__pyx_t_16);
  91396. __Pyx_XGOTREF(__pyx_t_15);
  91397. __pyx_t_10 = __pyx_lineno; __pyx_t_6 = __pyx_clineno; __pyx_t_18 = __pyx_filename;
  91398. {
  91399. __pyx_t_8 = ((struct __pyx_vtabstruct_6uvloop_4loop__TCPConnectRequest *)__pyx_v_wrapper->__pyx_base.__pyx_vtab)->__pyx_base.on_done(((struct __pyx_obj_6uvloop_4loop_UVRequest *)__pyx_v_wrapper)); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 223, __pyx_L25_error)
  91400. __Pyx_GOTREF(__pyx_t_8);
  91401. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  91402. }
  91403. if (PY_MAJOR_VERSION >= 3) {
  91404. __Pyx_XGIVEREF(__pyx_t_17);
  91405. __Pyx_XGIVEREF(__pyx_t_16);
  91406. __Pyx_XGIVEREF(__pyx_t_15);
  91407. __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_16, __pyx_t_15);
  91408. }
  91409. __Pyx_XGIVEREF(__pyx_t_5);
  91410. __Pyx_XGIVEREF(__pyx_t_4);
  91411. __Pyx_XGIVEREF(__pyx_t_3);
  91412. __Pyx_ErrRestore(__pyx_t_5, __pyx_t_4, __pyx_t_3);
  91413. __pyx_t_5 = 0; __pyx_t_4 = 0; __pyx_t_3 = 0; __pyx_t_17 = 0; __pyx_t_16 = 0; __pyx_t_15 = 0;
  91414. __pyx_lineno = __pyx_t_10; __pyx_clineno = __pyx_t_6; __pyx_filename = __pyx_t_18;
  91415. goto __pyx_L1_error;
  91416. __pyx_L25_error:;
  91417. if (PY_MAJOR_VERSION >= 3) {
  91418. __Pyx_XGIVEREF(__pyx_t_17);
  91419. __Pyx_XGIVEREF(__pyx_t_16);
  91420. __Pyx_XGIVEREF(__pyx_t_15);
  91421. __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_16, __pyx_t_15);
  91422. }
  91423. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  91424. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  91425. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  91426. __pyx_t_17 = 0; __pyx_t_16 = 0; __pyx_t_15 = 0;
  91427. goto __pyx_L1_error;
  91428. }
  91429. __pyx_L6:;
  91430. }
  91431. /* "uvloop/handles/tcp.pyx":205
  91432. *
  91433. *
  91434. * cdef void __tcp_connect_callback(uv.uv_connect_t* req, int status) with gil: # <<<<<<<<<<<<<<
  91435. * cdef:
  91436. * _TCPConnectRequest wrapper
  91437. */
  91438. /* function exit code */
  91439. goto __pyx_L0;
  91440. __pyx_L1_error:;
  91441. __Pyx_XDECREF(__pyx_t_1);
  91442. __Pyx_XDECREF(__pyx_t_7);
  91443. __Pyx_XDECREF(__pyx_t_8);
  91444. __Pyx_XDECREF(__pyx_t_9);
  91445. __Pyx_WriteUnraisable("uvloop.loop.__tcp_connect_callback", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  91446. __pyx_L0:;
  91447. __Pyx_XDECREF((PyObject *)__pyx_v_wrapper);
  91448. __Pyx_XDECREF((PyObject *)__pyx_v_transport);
  91449. __Pyx_XDECREF(__pyx_v_exc);
  91450. __Pyx_XDECREF(__pyx_v_ex);
  91451. __Pyx_RefNannyFinishContext();
  91452. #ifdef WITH_THREAD
  91453. __Pyx_PyGILState_Release(__pyx_gilstate_save);
  91454. #endif
  91455. }
  91456. /* "uvloop/handles/pipe.pyx":1
  91457. * cdef __pipe_init_uv_handle(UVStream handle, Loop loop): # <<<<<<<<<<<<<<
  91458. * cdef int err
  91459. *
  91460. */
  91461. static PyObject *__pyx_f_6uvloop_4loop___pipe_init_uv_handle(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_handle, CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop) {
  91462. int __pyx_v_err;
  91463. PyObject *__pyx_r = NULL;
  91464. __Pyx_RefNannyDeclarations
  91465. int __pyx_t_1;
  91466. PyObject *__pyx_t_2 = NULL;
  91467. __Pyx_RefNannySetupContext("__pipe_init_uv_handle", 0);
  91468. /* "uvloop/handles/pipe.pyx":4
  91469. * cdef int err
  91470. *
  91471. * handle._handle = <uv.uv_handle_t*>PyMem_RawMalloc(sizeof(uv.uv_pipe_t)) # <<<<<<<<<<<<<<
  91472. * if handle._handle is NULL:
  91473. * handle._abort_init()
  91474. */
  91475. __pyx_v_handle->__pyx_base.__pyx_base.__pyx_base._handle = ((uv_handle_t *)PyMem_RawMalloc((sizeof(uv_pipe_t))));
  91476. /* "uvloop/handles/pipe.pyx":5
  91477. *
  91478. * handle._handle = <uv.uv_handle_t*>PyMem_RawMalloc(sizeof(uv.uv_pipe_t))
  91479. * if handle._handle is NULL: # <<<<<<<<<<<<<<
  91480. * handle._abort_init()
  91481. * raise MemoryError()
  91482. */
  91483. __pyx_t_1 = ((__pyx_v_handle->__pyx_base.__pyx_base.__pyx_base._handle == NULL) != 0);
  91484. if (unlikely(__pyx_t_1)) {
  91485. /* "uvloop/handles/pipe.pyx":6
  91486. * handle._handle = <uv.uv_handle_t*>PyMem_RawMalloc(sizeof(uv.uv_pipe_t))
  91487. * if handle._handle is NULL:
  91488. * handle._abort_init() # <<<<<<<<<<<<<<
  91489. * raise MemoryError()
  91490. *
  91491. */
  91492. __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_handle->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._abort_init(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_handle)); if (unlikely(!__pyx_t_2)) __PYX_ERR(20, 6, __pyx_L1_error)
  91493. __Pyx_GOTREF(__pyx_t_2);
  91494. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  91495. /* "uvloop/handles/pipe.pyx":7
  91496. * if handle._handle is NULL:
  91497. * handle._abort_init()
  91498. * raise MemoryError() # <<<<<<<<<<<<<<
  91499. *
  91500. * # Initialize pipe handle with ipc=0.
  91501. */
  91502. PyErr_NoMemory(); __PYX_ERR(20, 7, __pyx_L1_error)
  91503. /* "uvloop/handles/pipe.pyx":5
  91504. *
  91505. * handle._handle = <uv.uv_handle_t*>PyMem_RawMalloc(sizeof(uv.uv_pipe_t))
  91506. * if handle._handle is NULL: # <<<<<<<<<<<<<<
  91507. * handle._abort_init()
  91508. * raise MemoryError()
  91509. */
  91510. }
  91511. /* "uvloop/handles/pipe.pyx":12
  91512. * # ipc=1 means that libuv will use recvmsg/sendmsg
  91513. * # instead of recv/send.
  91514. * err = uv.uv_pipe_init(handle._loop.uvloop, # <<<<<<<<<<<<<<
  91515. * <uv.uv_pipe_t*>handle._handle,
  91516. * 0)
  91517. */
  91518. __pyx_v_err = uv_pipe_init(__pyx_v_handle->__pyx_base.__pyx_base.__pyx_base._loop->uvloop, ((uv_pipe_t *)__pyx_v_handle->__pyx_base.__pyx_base.__pyx_base._handle), 0);
  91519. /* "uvloop/handles/pipe.pyx":15
  91520. * <uv.uv_pipe_t*>handle._handle,
  91521. * 0)
  91522. * if err < 0: # <<<<<<<<<<<<<<
  91523. * handle._abort_init()
  91524. * raise convert_error(err)
  91525. */
  91526. __pyx_t_1 = ((__pyx_v_err < 0) != 0);
  91527. if (unlikely(__pyx_t_1)) {
  91528. /* "uvloop/handles/pipe.pyx":16
  91529. * 0)
  91530. * if err < 0:
  91531. * handle._abort_init() # <<<<<<<<<<<<<<
  91532. * raise convert_error(err)
  91533. *
  91534. */
  91535. __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_handle->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._abort_init(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_handle)); if (unlikely(!__pyx_t_2)) __PYX_ERR(20, 16, __pyx_L1_error)
  91536. __Pyx_GOTREF(__pyx_t_2);
  91537. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  91538. /* "uvloop/handles/pipe.pyx":17
  91539. * if err < 0:
  91540. * handle._abort_init()
  91541. * raise convert_error(err) # <<<<<<<<<<<<<<
  91542. *
  91543. * handle._finish_init()
  91544. */
  91545. __pyx_t_2 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(20, 17, __pyx_L1_error)
  91546. __Pyx_GOTREF(__pyx_t_2);
  91547. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  91548. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  91549. __PYX_ERR(20, 17, __pyx_L1_error)
  91550. /* "uvloop/handles/pipe.pyx":15
  91551. * <uv.uv_pipe_t*>handle._handle,
  91552. * 0)
  91553. * if err < 0: # <<<<<<<<<<<<<<
  91554. * handle._abort_init()
  91555. * raise convert_error(err)
  91556. */
  91557. }
  91558. /* "uvloop/handles/pipe.pyx":19
  91559. * raise convert_error(err)
  91560. *
  91561. * handle._finish_init() # <<<<<<<<<<<<<<
  91562. *
  91563. *
  91564. */
  91565. __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_handle->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._finish_init(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_handle)); if (unlikely(!__pyx_t_2)) __PYX_ERR(20, 19, __pyx_L1_error)
  91566. __Pyx_GOTREF(__pyx_t_2);
  91567. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  91568. /* "uvloop/handles/pipe.pyx":1
  91569. * cdef __pipe_init_uv_handle(UVStream handle, Loop loop): # <<<<<<<<<<<<<<
  91570. * cdef int err
  91571. *
  91572. */
  91573. /* function exit code */
  91574. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  91575. goto __pyx_L0;
  91576. __pyx_L1_error:;
  91577. __Pyx_XDECREF(__pyx_t_2);
  91578. __Pyx_AddTraceback("uvloop.loop.__pipe_init_uv_handle", __pyx_clineno, __pyx_lineno, __pyx_filename);
  91579. __pyx_r = 0;
  91580. __pyx_L0:;
  91581. __Pyx_XGIVEREF(__pyx_r);
  91582. __Pyx_RefNannyFinishContext();
  91583. return __pyx_r;
  91584. }
  91585. /* "uvloop/handles/pipe.pyx":22
  91586. *
  91587. *
  91588. * cdef __pipe_open(UVStream handle, int fd): # <<<<<<<<<<<<<<
  91589. * cdef int err
  91590. * err = uv.uv_pipe_open(<uv.uv_pipe_t *>handle._handle,
  91591. */
  91592. static PyObject *__pyx_f_6uvloop_4loop___pipe_open(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_handle, int __pyx_v_fd) {
  91593. int __pyx_v_err;
  91594. PyObject *__pyx_v_exc = NULL;
  91595. PyObject *__pyx_r = NULL;
  91596. __Pyx_RefNannyDeclarations
  91597. int __pyx_t_1;
  91598. PyObject *__pyx_t_2 = NULL;
  91599. __Pyx_RefNannySetupContext("__pipe_open", 0);
  91600. /* "uvloop/handles/pipe.pyx":24
  91601. * cdef __pipe_open(UVStream handle, int fd):
  91602. * cdef int err
  91603. * err = uv.uv_pipe_open(<uv.uv_pipe_t *>handle._handle, # <<<<<<<<<<<<<<
  91604. * <uv.uv_file>fd)
  91605. * if err < 0:
  91606. */
  91607. __pyx_v_err = uv_pipe_open(((uv_pipe_t *)__pyx_v_handle->__pyx_base.__pyx_base.__pyx_base._handle), ((uv_file)__pyx_v_fd));
  91608. /* "uvloop/handles/pipe.pyx":26
  91609. * err = uv.uv_pipe_open(<uv.uv_pipe_t *>handle._handle,
  91610. * <uv.uv_file>fd)
  91611. * if err < 0: # <<<<<<<<<<<<<<
  91612. * exc = convert_error(err)
  91613. * raise exc
  91614. */
  91615. __pyx_t_1 = ((__pyx_v_err < 0) != 0);
  91616. if (unlikely(__pyx_t_1)) {
  91617. /* "uvloop/handles/pipe.pyx":27
  91618. * <uv.uv_file>fd)
  91619. * if err < 0:
  91620. * exc = convert_error(err) # <<<<<<<<<<<<<<
  91621. * raise exc
  91622. *
  91623. */
  91624. __pyx_t_2 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(20, 27, __pyx_L1_error)
  91625. __Pyx_GOTREF(__pyx_t_2);
  91626. __pyx_v_exc = __pyx_t_2;
  91627. __pyx_t_2 = 0;
  91628. /* "uvloop/handles/pipe.pyx":28
  91629. * if err < 0:
  91630. * exc = convert_error(err)
  91631. * raise exc # <<<<<<<<<<<<<<
  91632. *
  91633. *
  91634. */
  91635. __Pyx_Raise(__pyx_v_exc, 0, 0, 0);
  91636. __PYX_ERR(20, 28, __pyx_L1_error)
  91637. /* "uvloop/handles/pipe.pyx":26
  91638. * err = uv.uv_pipe_open(<uv.uv_pipe_t *>handle._handle,
  91639. * <uv.uv_file>fd)
  91640. * if err < 0: # <<<<<<<<<<<<<<
  91641. * exc = convert_error(err)
  91642. * raise exc
  91643. */
  91644. }
  91645. /* "uvloop/handles/pipe.pyx":22
  91646. *
  91647. *
  91648. * cdef __pipe_open(UVStream handle, int fd): # <<<<<<<<<<<<<<
  91649. * cdef int err
  91650. * err = uv.uv_pipe_open(<uv.uv_pipe_t *>handle._handle,
  91651. */
  91652. /* function exit code */
  91653. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  91654. goto __pyx_L0;
  91655. __pyx_L1_error:;
  91656. __Pyx_XDECREF(__pyx_t_2);
  91657. __Pyx_AddTraceback("uvloop.loop.__pipe_open", __pyx_clineno, __pyx_lineno, __pyx_filename);
  91658. __pyx_r = 0;
  91659. __pyx_L0:;
  91660. __Pyx_XDECREF(__pyx_v_exc);
  91661. __Pyx_XGIVEREF(__pyx_r);
  91662. __Pyx_RefNannyFinishContext();
  91663. return __pyx_r;
  91664. }
  91665. /* "uvloop/handles/pipe.pyx":31
  91666. *
  91667. *
  91668. * cdef __pipe_get_socket(UVSocketHandle handle): # <<<<<<<<<<<<<<
  91669. * fileno = handle._fileno()
  91670. * return PseudoSocket(uv.AF_UNIX, uv.SOCK_STREAM, 0, fileno)
  91671. */
  91672. static PyObject *__pyx_f_6uvloop_4loop___pipe_get_socket(struct __pyx_obj_6uvloop_4loop_UVSocketHandle *__pyx_v_handle) {
  91673. PyObject *__pyx_v_fileno = NULL;
  91674. PyObject *__pyx_r = NULL;
  91675. __Pyx_RefNannyDeclarations
  91676. PyObject *__pyx_t_1 = NULL;
  91677. PyObject *__pyx_t_2 = NULL;
  91678. PyObject *__pyx_t_3 = NULL;
  91679. __Pyx_RefNannySetupContext("__pipe_get_socket", 0);
  91680. /* "uvloop/handles/pipe.pyx":32
  91681. *
  91682. * cdef __pipe_get_socket(UVSocketHandle handle):
  91683. * fileno = handle._fileno() # <<<<<<<<<<<<<<
  91684. * return PseudoSocket(uv.AF_UNIX, uv.SOCK_STREAM, 0, fileno)
  91685. *
  91686. */
  91687. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVSocketHandle *)__pyx_v_handle->__pyx_base.__pyx_vtab)->_fileno(__pyx_v_handle); if (unlikely(!__pyx_t_1)) __PYX_ERR(20, 32, __pyx_L1_error)
  91688. __Pyx_GOTREF(__pyx_t_1);
  91689. __pyx_v_fileno = __pyx_t_1;
  91690. __pyx_t_1 = 0;
  91691. /* "uvloop/handles/pipe.pyx":33
  91692. * cdef __pipe_get_socket(UVSocketHandle handle):
  91693. * fileno = handle._fileno()
  91694. * return PseudoSocket(uv.AF_UNIX, uv.SOCK_STREAM, 0, fileno) # <<<<<<<<<<<<<<
  91695. *
  91696. *
  91697. */
  91698. __Pyx_XDECREF(__pyx_r);
  91699. __pyx_t_1 = __Pyx_PyInt_From_int(AF_UNIX); if (unlikely(!__pyx_t_1)) __PYX_ERR(20, 33, __pyx_L1_error)
  91700. __Pyx_GOTREF(__pyx_t_1);
  91701. __pyx_t_2 = __Pyx_PyInt_From_int(SOCK_STREAM); if (unlikely(!__pyx_t_2)) __PYX_ERR(20, 33, __pyx_L1_error)
  91702. __Pyx_GOTREF(__pyx_t_2);
  91703. __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(20, 33, __pyx_L1_error)
  91704. __Pyx_GOTREF(__pyx_t_3);
  91705. __Pyx_GIVEREF(__pyx_t_1);
  91706. PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  91707. __Pyx_GIVEREF(__pyx_t_2);
  91708. PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  91709. __Pyx_INCREF(__pyx_int_0);
  91710. __Pyx_GIVEREF(__pyx_int_0);
  91711. PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_int_0);
  91712. __Pyx_INCREF(__pyx_v_fileno);
  91713. __Pyx_GIVEREF(__pyx_v_fileno);
  91714. PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_v_fileno);
  91715. __pyx_t_1 = 0;
  91716. __pyx_t_2 = 0;
  91717. __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6uvloop_4loop_PseudoSocket), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(20, 33, __pyx_L1_error)
  91718. __Pyx_GOTREF(__pyx_t_2);
  91719. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  91720. __pyx_r = __pyx_t_2;
  91721. __pyx_t_2 = 0;
  91722. goto __pyx_L0;
  91723. /* "uvloop/handles/pipe.pyx":31
  91724. *
  91725. *
  91726. * cdef __pipe_get_socket(UVSocketHandle handle): # <<<<<<<<<<<<<<
  91727. * fileno = handle._fileno()
  91728. * return PseudoSocket(uv.AF_UNIX, uv.SOCK_STREAM, 0, fileno)
  91729. */
  91730. /* function exit code */
  91731. __pyx_L1_error:;
  91732. __Pyx_XDECREF(__pyx_t_1);
  91733. __Pyx_XDECREF(__pyx_t_2);
  91734. __Pyx_XDECREF(__pyx_t_3);
  91735. __Pyx_AddTraceback("uvloop.loop.__pipe_get_socket", __pyx_clineno, __pyx_lineno, __pyx_filename);
  91736. __pyx_r = 0;
  91737. __pyx_L0:;
  91738. __Pyx_XDECREF(__pyx_v_fileno);
  91739. __Pyx_XGIVEREF(__pyx_r);
  91740. __Pyx_RefNannyFinishContext();
  91741. return __pyx_r;
  91742. }
  91743. /* "uvloop/handles/pipe.pyx":40
  91744. *
  91745. * @staticmethod
  91746. * cdef UnixServer new(Loop loop, object protocol_factory, Server server, # <<<<<<<<<<<<<<
  91747. * object backlog,
  91748. * object ssl,
  91749. */
  91750. static struct __pyx_obj_6uvloop_4loop_UnixServer *__pyx_f_6uvloop_4loop_10UnixServer_new(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, PyObject *__pyx_v_protocol_factory, struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_server, PyObject *__pyx_v_backlog, PyObject *__pyx_v_ssl, PyObject *__pyx_v_ssl_handshake_timeout, PyObject *__pyx_v_ssl_shutdown_timeout) {
  91751. struct __pyx_obj_6uvloop_4loop_UnixServer *__pyx_v_handle = 0;
  91752. struct __pyx_obj_6uvloop_4loop_UnixServer *__pyx_r = NULL;
  91753. __Pyx_RefNannyDeclarations
  91754. PyObject *__pyx_t_1 = NULL;
  91755. __Pyx_RefNannySetupContext("new", 0);
  91756. /* "uvloop/handles/pipe.pyx":47
  91757. *
  91758. * cdef UnixServer handle
  91759. * handle = UnixServer.__new__(UnixServer) # <<<<<<<<<<<<<<
  91760. * handle._init(loop, protocol_factory, server, backlog,
  91761. * ssl, ssl_handshake_timeout, ssl_shutdown_timeout)
  91762. */
  91763. __pyx_t_1 = ((PyObject *)__pyx_tp_new_6uvloop_4loop_UnixServer(((PyTypeObject *)__pyx_ptype_6uvloop_4loop_UnixServer), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(20, 47, __pyx_L1_error)
  91764. __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  91765. __pyx_v_handle = ((struct __pyx_obj_6uvloop_4loop_UnixServer *)__pyx_t_1);
  91766. __pyx_t_1 = 0;
  91767. /* "uvloop/handles/pipe.pyx":48
  91768. * cdef UnixServer handle
  91769. * handle = UnixServer.__new__(UnixServer)
  91770. * handle._init(loop, protocol_factory, server, backlog, # <<<<<<<<<<<<<<
  91771. * ssl, ssl_handshake_timeout, ssl_shutdown_timeout)
  91772. * __pipe_init_uv_handle(<UVStream>handle, loop)
  91773. */
  91774. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UnixServer *)__pyx_v_handle->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._init(((struct __pyx_obj_6uvloop_4loop_UVStreamServer *)__pyx_v_handle), __pyx_v_loop, __pyx_v_protocol_factory, __pyx_v_server, __pyx_v_backlog, __pyx_v_ssl, __pyx_v_ssl_handshake_timeout, __pyx_v_ssl_shutdown_timeout); if (unlikely(!__pyx_t_1)) __PYX_ERR(20, 48, __pyx_L1_error)
  91775. __Pyx_GOTREF(__pyx_t_1);
  91776. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  91777. /* "uvloop/handles/pipe.pyx":50
  91778. * handle._init(loop, protocol_factory, server, backlog,
  91779. * ssl, ssl_handshake_timeout, ssl_shutdown_timeout)
  91780. * __pipe_init_uv_handle(<UVStream>handle, loop) # <<<<<<<<<<<<<<
  91781. * return handle
  91782. *
  91783. */
  91784. __pyx_t_1 = __pyx_f_6uvloop_4loop___pipe_init_uv_handle(((struct __pyx_obj_6uvloop_4loop_UVStream *)__pyx_v_handle), __pyx_v_loop); if (unlikely(!__pyx_t_1)) __PYX_ERR(20, 50, __pyx_L1_error)
  91785. __Pyx_GOTREF(__pyx_t_1);
  91786. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  91787. /* "uvloop/handles/pipe.pyx":51
  91788. * ssl, ssl_handshake_timeout, ssl_shutdown_timeout)
  91789. * __pipe_init_uv_handle(<UVStream>handle, loop)
  91790. * return handle # <<<<<<<<<<<<<<
  91791. *
  91792. * cdef _new_socket(self):
  91793. */
  91794. __Pyx_XDECREF(((PyObject *)__pyx_r));
  91795. __Pyx_INCREF(((PyObject *)__pyx_v_handle));
  91796. __pyx_r = __pyx_v_handle;
  91797. goto __pyx_L0;
  91798. /* "uvloop/handles/pipe.pyx":40
  91799. *
  91800. * @staticmethod
  91801. * cdef UnixServer new(Loop loop, object protocol_factory, Server server, # <<<<<<<<<<<<<<
  91802. * object backlog,
  91803. * object ssl,
  91804. */
  91805. /* function exit code */
  91806. __pyx_L1_error:;
  91807. __Pyx_XDECREF(__pyx_t_1);
  91808. __Pyx_AddTraceback("uvloop.loop.UnixServer.new", __pyx_clineno, __pyx_lineno, __pyx_filename);
  91809. __pyx_r = 0;
  91810. __pyx_L0:;
  91811. __Pyx_XDECREF((PyObject *)__pyx_v_handle);
  91812. __Pyx_XGIVEREF((PyObject *)__pyx_r);
  91813. __Pyx_RefNannyFinishContext();
  91814. return __pyx_r;
  91815. }
  91816. /* "uvloop/handles/pipe.pyx":53
  91817. * return handle
  91818. *
  91819. * cdef _new_socket(self): # <<<<<<<<<<<<<<
  91820. * return __pipe_get_socket(<UVSocketHandle>self)
  91821. *
  91822. */
  91823. static PyObject *__pyx_f_6uvloop_4loop_10UnixServer__new_socket(struct __pyx_obj_6uvloop_4loop_UnixServer *__pyx_v_self) {
  91824. PyObject *__pyx_r = NULL;
  91825. __Pyx_RefNannyDeclarations
  91826. PyObject *__pyx_t_1 = NULL;
  91827. __Pyx_RefNannySetupContext("_new_socket", 0);
  91828. /* "uvloop/handles/pipe.pyx":54
  91829. *
  91830. * cdef _new_socket(self):
  91831. * return __pipe_get_socket(<UVSocketHandle>self) # <<<<<<<<<<<<<<
  91832. *
  91833. * cdef _open(self, int sockfd):
  91834. */
  91835. __Pyx_XDECREF(__pyx_r);
  91836. __pyx_t_1 = __pyx_f_6uvloop_4loop___pipe_get_socket(((struct __pyx_obj_6uvloop_4loop_UVSocketHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(20, 54, __pyx_L1_error)
  91837. __Pyx_GOTREF(__pyx_t_1);
  91838. __pyx_r = __pyx_t_1;
  91839. __pyx_t_1 = 0;
  91840. goto __pyx_L0;
  91841. /* "uvloop/handles/pipe.pyx":53
  91842. * return handle
  91843. *
  91844. * cdef _new_socket(self): # <<<<<<<<<<<<<<
  91845. * return __pipe_get_socket(<UVSocketHandle>self)
  91846. *
  91847. */
  91848. /* function exit code */
  91849. __pyx_L1_error:;
  91850. __Pyx_XDECREF(__pyx_t_1);
  91851. __Pyx_AddTraceback("uvloop.loop.UnixServer._new_socket", __pyx_clineno, __pyx_lineno, __pyx_filename);
  91852. __pyx_r = 0;
  91853. __pyx_L0:;
  91854. __Pyx_XGIVEREF(__pyx_r);
  91855. __Pyx_RefNannyFinishContext();
  91856. return __pyx_r;
  91857. }
  91858. /* "uvloop/handles/pipe.pyx":56
  91859. * return __pipe_get_socket(<UVSocketHandle>self)
  91860. *
  91861. * cdef _open(self, int sockfd): # <<<<<<<<<<<<<<
  91862. * self._ensure_alive()
  91863. * __pipe_open(<UVStream>self, sockfd)
  91864. */
  91865. static PyObject *__pyx_f_6uvloop_4loop_10UnixServer__open(struct __pyx_obj_6uvloop_4loop_UnixServer *__pyx_v_self, int __pyx_v_sockfd) {
  91866. PyObject *__pyx_r = NULL;
  91867. __Pyx_RefNannyDeclarations
  91868. PyObject *__pyx_t_1 = NULL;
  91869. __Pyx_RefNannySetupContext("_open", 0);
  91870. /* "uvloop/handles/pipe.pyx":57
  91871. *
  91872. * cdef _open(self, int sockfd):
  91873. * self._ensure_alive() # <<<<<<<<<<<<<<
  91874. * __pipe_open(<UVStream>self, sockfd)
  91875. * self._mark_as_open()
  91876. */
  91877. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UnixServer *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._ensure_alive(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(20, 57, __pyx_L1_error)
  91878. __Pyx_GOTREF(__pyx_t_1);
  91879. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  91880. /* "uvloop/handles/pipe.pyx":58
  91881. * cdef _open(self, int sockfd):
  91882. * self._ensure_alive()
  91883. * __pipe_open(<UVStream>self, sockfd) # <<<<<<<<<<<<<<
  91884. * self._mark_as_open()
  91885. *
  91886. */
  91887. __pyx_t_1 = __pyx_f_6uvloop_4loop___pipe_open(((struct __pyx_obj_6uvloop_4loop_UVStream *)__pyx_v_self), __pyx_v_sockfd); if (unlikely(!__pyx_t_1)) __PYX_ERR(20, 58, __pyx_L1_error)
  91888. __Pyx_GOTREF(__pyx_t_1);
  91889. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  91890. /* "uvloop/handles/pipe.pyx":59
  91891. * self._ensure_alive()
  91892. * __pipe_open(<UVStream>self, sockfd)
  91893. * self._mark_as_open() # <<<<<<<<<<<<<<
  91894. *
  91895. * cdef bind(self, str path):
  91896. */
  91897. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UnixServer *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._mark_as_open(((struct __pyx_obj_6uvloop_4loop_UVStreamServer *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(20, 59, __pyx_L1_error)
  91898. __Pyx_GOTREF(__pyx_t_1);
  91899. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  91900. /* "uvloop/handles/pipe.pyx":56
  91901. * return __pipe_get_socket(<UVSocketHandle>self)
  91902. *
  91903. * cdef _open(self, int sockfd): # <<<<<<<<<<<<<<
  91904. * self._ensure_alive()
  91905. * __pipe_open(<UVStream>self, sockfd)
  91906. */
  91907. /* function exit code */
  91908. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  91909. goto __pyx_L0;
  91910. __pyx_L1_error:;
  91911. __Pyx_XDECREF(__pyx_t_1);
  91912. __Pyx_AddTraceback("uvloop.loop.UnixServer._open", __pyx_clineno, __pyx_lineno, __pyx_filename);
  91913. __pyx_r = 0;
  91914. __pyx_L0:;
  91915. __Pyx_XGIVEREF(__pyx_r);
  91916. __Pyx_RefNannyFinishContext();
  91917. return __pyx_r;
  91918. }
  91919. /* "uvloop/handles/pipe.pyx":61
  91920. * self._mark_as_open()
  91921. *
  91922. * cdef bind(self, str path): # <<<<<<<<<<<<<<
  91923. * cdef int err
  91924. * self._ensure_alive()
  91925. */
  91926. static PyObject *__pyx_f_6uvloop_4loop_10UnixServer_bind(struct __pyx_obj_6uvloop_4loop_UnixServer *__pyx_v_self, PyObject *__pyx_v_path) {
  91927. int __pyx_v_err;
  91928. PyObject *__pyx_v_exc = NULL;
  91929. PyObject *__pyx_r = NULL;
  91930. __Pyx_RefNannyDeclarations
  91931. PyObject *__pyx_t_1 = NULL;
  91932. char const *__pyx_t_2;
  91933. int __pyx_t_3;
  91934. __Pyx_RefNannySetupContext("bind", 0);
  91935. /* "uvloop/handles/pipe.pyx":63
  91936. * cdef bind(self, str path):
  91937. * cdef int err
  91938. * self._ensure_alive() # <<<<<<<<<<<<<<
  91939. * err = uv.uv_pipe_bind(<uv.uv_pipe_t *>self._handle,
  91940. * path.encode())
  91941. */
  91942. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UnixServer *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._ensure_alive(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(20, 63, __pyx_L1_error)
  91943. __Pyx_GOTREF(__pyx_t_1);
  91944. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  91945. /* "uvloop/handles/pipe.pyx":65
  91946. * self._ensure_alive()
  91947. * err = uv.uv_pipe_bind(<uv.uv_pipe_t *>self._handle,
  91948. * path.encode()) # <<<<<<<<<<<<<<
  91949. * if err < 0:
  91950. * exc = convert_error(err)
  91951. */
  91952. if (unlikely(__pyx_v_path == Py_None)) {
  91953. PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode");
  91954. __PYX_ERR(20, 65, __pyx_L1_error)
  91955. }
  91956. __pyx_t_1 = PyUnicode_AsEncodedString(__pyx_v_path, NULL, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(20, 65, __pyx_L1_error)
  91957. __Pyx_GOTREF(__pyx_t_1);
  91958. __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_t_1); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(20, 65, __pyx_L1_error)
  91959. /* "uvloop/handles/pipe.pyx":64
  91960. * cdef int err
  91961. * self._ensure_alive()
  91962. * err = uv.uv_pipe_bind(<uv.uv_pipe_t *>self._handle, # <<<<<<<<<<<<<<
  91963. * path.encode())
  91964. * if err < 0:
  91965. */
  91966. __pyx_v_err = uv_pipe_bind(((uv_pipe_t *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._handle), __pyx_t_2);
  91967. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  91968. /* "uvloop/handles/pipe.pyx":66
  91969. * err = uv.uv_pipe_bind(<uv.uv_pipe_t *>self._handle,
  91970. * path.encode())
  91971. * if err < 0: # <<<<<<<<<<<<<<
  91972. * exc = convert_error(err)
  91973. * self._fatal_error(exc, True)
  91974. */
  91975. __pyx_t_3 = ((__pyx_v_err < 0) != 0);
  91976. if (__pyx_t_3) {
  91977. /* "uvloop/handles/pipe.pyx":67
  91978. * path.encode())
  91979. * if err < 0:
  91980. * exc = convert_error(err) # <<<<<<<<<<<<<<
  91981. * self._fatal_error(exc, True)
  91982. * return
  91983. */
  91984. __pyx_t_1 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(20, 67, __pyx_L1_error)
  91985. __Pyx_GOTREF(__pyx_t_1);
  91986. __pyx_v_exc = __pyx_t_1;
  91987. __pyx_t_1 = 0;
  91988. /* "uvloop/handles/pipe.pyx":68
  91989. * if err < 0:
  91990. * exc = convert_error(err)
  91991. * self._fatal_error(exc, True) # <<<<<<<<<<<<<<
  91992. * return
  91993. *
  91994. */
  91995. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UnixServer *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._fatal_error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self), __pyx_v_exc, Py_True, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(20, 68, __pyx_L1_error)
  91996. __Pyx_GOTREF(__pyx_t_1);
  91997. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  91998. /* "uvloop/handles/pipe.pyx":69
  91999. * exc = convert_error(err)
  92000. * self._fatal_error(exc, True)
  92001. * return # <<<<<<<<<<<<<<
  92002. *
  92003. * self._mark_as_open()
  92004. */
  92005. __Pyx_XDECREF(__pyx_r);
  92006. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  92007. goto __pyx_L0;
  92008. /* "uvloop/handles/pipe.pyx":66
  92009. * err = uv.uv_pipe_bind(<uv.uv_pipe_t *>self._handle,
  92010. * path.encode())
  92011. * if err < 0: # <<<<<<<<<<<<<<
  92012. * exc = convert_error(err)
  92013. * self._fatal_error(exc, True)
  92014. */
  92015. }
  92016. /* "uvloop/handles/pipe.pyx":71
  92017. * return
  92018. *
  92019. * self._mark_as_open() # <<<<<<<<<<<<<<
  92020. *
  92021. * cdef UVStream _make_new_transport(self, object protocol, object waiter):
  92022. */
  92023. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UnixServer *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._mark_as_open(((struct __pyx_obj_6uvloop_4loop_UVStreamServer *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(20, 71, __pyx_L1_error)
  92024. __Pyx_GOTREF(__pyx_t_1);
  92025. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  92026. /* "uvloop/handles/pipe.pyx":61
  92027. * self._mark_as_open()
  92028. *
  92029. * cdef bind(self, str path): # <<<<<<<<<<<<<<
  92030. * cdef int err
  92031. * self._ensure_alive()
  92032. */
  92033. /* function exit code */
  92034. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  92035. goto __pyx_L0;
  92036. __pyx_L1_error:;
  92037. __Pyx_XDECREF(__pyx_t_1);
  92038. __Pyx_AddTraceback("uvloop.loop.UnixServer.bind", __pyx_clineno, __pyx_lineno, __pyx_filename);
  92039. __pyx_r = 0;
  92040. __pyx_L0:;
  92041. __Pyx_XDECREF(__pyx_v_exc);
  92042. __Pyx_XGIVEREF(__pyx_r);
  92043. __Pyx_RefNannyFinishContext();
  92044. return __pyx_r;
  92045. }
  92046. /* "uvloop/handles/pipe.pyx":73
  92047. * self._mark_as_open()
  92048. *
  92049. * cdef UVStream _make_new_transport(self, object protocol, object waiter): # <<<<<<<<<<<<<<
  92050. * cdef UnixTransport tr
  92051. * tr = UnixTransport.new(self._loop, protocol, self._server, waiter)
  92052. */
  92053. static struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_f_6uvloop_4loop_10UnixServer__make_new_transport(struct __pyx_obj_6uvloop_4loop_UnixServer *__pyx_v_self, PyObject *__pyx_v_protocol, PyObject *__pyx_v_waiter) {
  92054. struct __pyx_obj_6uvloop_4loop_UnixTransport *__pyx_v_tr = 0;
  92055. struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_r = NULL;
  92056. __Pyx_RefNannyDeclarations
  92057. PyObject *__pyx_t_1 = NULL;
  92058. PyObject *__pyx_t_2 = NULL;
  92059. PyObject *__pyx_t_3 = NULL;
  92060. __Pyx_RefNannySetupContext("_make_new_transport", 0);
  92061. /* "uvloop/handles/pipe.pyx":75
  92062. * cdef UVStream _make_new_transport(self, object protocol, object waiter):
  92063. * cdef UnixTransport tr
  92064. * tr = UnixTransport.new(self._loop, protocol, self._server, waiter) # <<<<<<<<<<<<<<
  92065. * return <UVStream>tr
  92066. *
  92067. */
  92068. __pyx_t_1 = ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._loop);
  92069. __Pyx_INCREF(__pyx_t_1);
  92070. __pyx_t_2 = ((PyObject *)__pyx_v_self->__pyx_base._server);
  92071. __Pyx_INCREF(__pyx_t_2);
  92072. __pyx_t_3 = ((PyObject *)__pyx_f_6uvloop_4loop_13UnixTransport_new(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_t_1), __pyx_v_protocol, ((struct __pyx_obj_6uvloop_4loop_Server *)__pyx_t_2), __pyx_v_waiter)); if (unlikely(!__pyx_t_3)) __PYX_ERR(20, 75, __pyx_L1_error)
  92073. __Pyx_GOTREF(__pyx_t_3);
  92074. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  92075. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  92076. __pyx_v_tr = ((struct __pyx_obj_6uvloop_4loop_UnixTransport *)__pyx_t_3);
  92077. __pyx_t_3 = 0;
  92078. /* "uvloop/handles/pipe.pyx":76
  92079. * cdef UnixTransport tr
  92080. * tr = UnixTransport.new(self._loop, protocol, self._server, waiter)
  92081. * return <UVStream>tr # <<<<<<<<<<<<<<
  92082. *
  92083. *
  92084. */
  92085. __Pyx_XDECREF(((PyObject *)__pyx_r));
  92086. __Pyx_INCREF(((PyObject *)((struct __pyx_obj_6uvloop_4loop_UVStream *)__pyx_v_tr)));
  92087. __pyx_r = ((struct __pyx_obj_6uvloop_4loop_UVStream *)__pyx_v_tr);
  92088. goto __pyx_L0;
  92089. /* "uvloop/handles/pipe.pyx":73
  92090. * self._mark_as_open()
  92091. *
  92092. * cdef UVStream _make_new_transport(self, object protocol, object waiter): # <<<<<<<<<<<<<<
  92093. * cdef UnixTransport tr
  92094. * tr = UnixTransport.new(self._loop, protocol, self._server, waiter)
  92095. */
  92096. /* function exit code */
  92097. __pyx_L1_error:;
  92098. __Pyx_XDECREF(__pyx_t_1);
  92099. __Pyx_XDECREF(__pyx_t_2);
  92100. __Pyx_XDECREF(__pyx_t_3);
  92101. __Pyx_AddTraceback("uvloop.loop.UnixServer._make_new_transport", __pyx_clineno, __pyx_lineno, __pyx_filename);
  92102. __pyx_r = 0;
  92103. __pyx_L0:;
  92104. __Pyx_XDECREF((PyObject *)__pyx_v_tr);
  92105. __Pyx_XGIVEREF((PyObject *)__pyx_r);
  92106. __Pyx_RefNannyFinishContext();
  92107. return __pyx_r;
  92108. }
  92109. /* "(tree fragment)":1
  92110. * def __reduce_cython__(self): # <<<<<<<<<<<<<<
  92111. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  92112. * def __setstate_cython__(self, __pyx_state):
  92113. */
  92114. /* Python wrapper */
  92115. static PyObject *__pyx_pw_6uvloop_4loop_10UnixServer_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  92116. static char __pyx_doc_6uvloop_4loop_10UnixServer___reduce_cython__[] = "UnixServer.__reduce_cython__(self)";
  92117. static PyObject *__pyx_pw_6uvloop_4loop_10UnixServer_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  92118. PyObject *__pyx_r = 0;
  92119. __Pyx_RefNannyDeclarations
  92120. __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  92121. __pyx_r = __pyx_pf_6uvloop_4loop_10UnixServer___reduce_cython__(((struct __pyx_obj_6uvloop_4loop_UnixServer *)__pyx_v_self));
  92122. /* function exit code */
  92123. __Pyx_RefNannyFinishContext();
  92124. return __pyx_r;
  92125. }
  92126. static PyObject *__pyx_pf_6uvloop_4loop_10UnixServer___reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UnixServer *__pyx_v_self) {
  92127. PyObject *__pyx_r = NULL;
  92128. __Pyx_RefNannyDeclarations
  92129. PyObject *__pyx_t_1 = NULL;
  92130. __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  92131. /* "(tree fragment)":2
  92132. * def __reduce_cython__(self):
  92133. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  92134. * def __setstate_cython__(self, __pyx_state):
  92135. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  92136. */
  92137. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__152, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 2, __pyx_L1_error)
  92138. __Pyx_GOTREF(__pyx_t_1);
  92139. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  92140. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  92141. __PYX_ERR(9, 2, __pyx_L1_error)
  92142. /* "(tree fragment)":1
  92143. * def __reduce_cython__(self): # <<<<<<<<<<<<<<
  92144. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  92145. * def __setstate_cython__(self, __pyx_state):
  92146. */
  92147. /* function exit code */
  92148. __pyx_L1_error:;
  92149. __Pyx_XDECREF(__pyx_t_1);
  92150. __Pyx_AddTraceback("uvloop.loop.UnixServer.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  92151. __pyx_r = NULL;
  92152. __Pyx_XGIVEREF(__pyx_r);
  92153. __Pyx_RefNannyFinishContext();
  92154. return __pyx_r;
  92155. }
  92156. /* "(tree fragment)":3
  92157. * def __reduce_cython__(self):
  92158. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  92159. * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
  92160. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  92161. */
  92162. /* Python wrapper */
  92163. static PyObject *__pyx_pw_6uvloop_4loop_10UnixServer_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
  92164. static char __pyx_doc_6uvloop_4loop_10UnixServer_2__setstate_cython__[] = "UnixServer.__setstate_cython__(self, __pyx_state)";
  92165. static PyObject *__pyx_pw_6uvloop_4loop_10UnixServer_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  92166. PyObject *__pyx_r = 0;
  92167. __Pyx_RefNannyDeclarations
  92168. __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  92169. __pyx_r = __pyx_pf_6uvloop_4loop_10UnixServer_2__setstate_cython__(((struct __pyx_obj_6uvloop_4loop_UnixServer *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
  92170. /* function exit code */
  92171. __Pyx_RefNannyFinishContext();
  92172. return __pyx_r;
  92173. }
  92174. static PyObject *__pyx_pf_6uvloop_4loop_10UnixServer_2__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UnixServer *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  92175. PyObject *__pyx_r = NULL;
  92176. __Pyx_RefNannyDeclarations
  92177. PyObject *__pyx_t_1 = NULL;
  92178. __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  92179. /* "(tree fragment)":4
  92180. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  92181. * def __setstate_cython__(self, __pyx_state):
  92182. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  92183. */
  92184. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__153, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 4, __pyx_L1_error)
  92185. __Pyx_GOTREF(__pyx_t_1);
  92186. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  92187. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  92188. __PYX_ERR(9, 4, __pyx_L1_error)
  92189. /* "(tree fragment)":3
  92190. * def __reduce_cython__(self):
  92191. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  92192. * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
  92193. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  92194. */
  92195. /* function exit code */
  92196. __pyx_L1_error:;
  92197. __Pyx_XDECREF(__pyx_t_1);
  92198. __Pyx_AddTraceback("uvloop.loop.UnixServer.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  92199. __pyx_r = NULL;
  92200. __Pyx_XGIVEREF(__pyx_r);
  92201. __Pyx_RefNannyFinishContext();
  92202. return __pyx_r;
  92203. }
  92204. /* "uvloop/handles/pipe.pyx":83
  92205. *
  92206. * @staticmethod
  92207. * cdef UnixTransport new(Loop loop, object protocol, Server server, # <<<<<<<<<<<<<<
  92208. * object waiter):
  92209. *
  92210. */
  92211. static struct __pyx_obj_6uvloop_4loop_UnixTransport *__pyx_f_6uvloop_4loop_13UnixTransport_new(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, PyObject *__pyx_v_protocol, struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_server, PyObject *__pyx_v_waiter) {
  92212. struct __pyx_obj_6uvloop_4loop_UnixTransport *__pyx_v_handle = 0;
  92213. struct __pyx_obj_6uvloop_4loop_UnixTransport *__pyx_r = NULL;
  92214. __Pyx_RefNannyDeclarations
  92215. PyObject *__pyx_t_1 = NULL;
  92216. __Pyx_RefNannySetupContext("new", 0);
  92217. /* "uvloop/handles/pipe.pyx":87
  92218. *
  92219. * cdef UnixTransport handle
  92220. * handle = UnixTransport.__new__(UnixTransport) # <<<<<<<<<<<<<<
  92221. * handle._init(loop, protocol, server, waiter)
  92222. * __pipe_init_uv_handle(<UVStream>handle, loop)
  92223. */
  92224. __pyx_t_1 = ((PyObject *)__pyx_tp_new_6uvloop_4loop_UnixTransport(((PyTypeObject *)__pyx_ptype_6uvloop_4loop_UnixTransport), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(20, 87, __pyx_L1_error)
  92225. __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  92226. __pyx_v_handle = ((struct __pyx_obj_6uvloop_4loop_UnixTransport *)__pyx_t_1);
  92227. __pyx_t_1 = 0;
  92228. /* "uvloop/handles/pipe.pyx":88
  92229. * cdef UnixTransport handle
  92230. * handle = UnixTransport.__new__(UnixTransport)
  92231. * handle._init(loop, protocol, server, waiter) # <<<<<<<<<<<<<<
  92232. * __pipe_init_uv_handle(<UVStream>handle, loop)
  92233. * return handle
  92234. */
  92235. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UnixTransport *)__pyx_v_handle->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._init(((struct __pyx_obj_6uvloop_4loop_UVStream *)__pyx_v_handle), __pyx_v_loop, __pyx_v_protocol, __pyx_v_server, __pyx_v_waiter); if (unlikely(!__pyx_t_1)) __PYX_ERR(20, 88, __pyx_L1_error)
  92236. __Pyx_GOTREF(__pyx_t_1);
  92237. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  92238. /* "uvloop/handles/pipe.pyx":89
  92239. * handle = UnixTransport.__new__(UnixTransport)
  92240. * handle._init(loop, protocol, server, waiter)
  92241. * __pipe_init_uv_handle(<UVStream>handle, loop) # <<<<<<<<<<<<<<
  92242. * return handle
  92243. *
  92244. */
  92245. __pyx_t_1 = __pyx_f_6uvloop_4loop___pipe_init_uv_handle(((struct __pyx_obj_6uvloop_4loop_UVStream *)__pyx_v_handle), __pyx_v_loop); if (unlikely(!__pyx_t_1)) __PYX_ERR(20, 89, __pyx_L1_error)
  92246. __Pyx_GOTREF(__pyx_t_1);
  92247. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  92248. /* "uvloop/handles/pipe.pyx":90
  92249. * handle._init(loop, protocol, server, waiter)
  92250. * __pipe_init_uv_handle(<UVStream>handle, loop)
  92251. * return handle # <<<<<<<<<<<<<<
  92252. *
  92253. * cdef _new_socket(self):
  92254. */
  92255. __Pyx_XDECREF(((PyObject *)__pyx_r));
  92256. __Pyx_INCREF(((PyObject *)__pyx_v_handle));
  92257. __pyx_r = __pyx_v_handle;
  92258. goto __pyx_L0;
  92259. /* "uvloop/handles/pipe.pyx":83
  92260. *
  92261. * @staticmethod
  92262. * cdef UnixTransport new(Loop loop, object protocol, Server server, # <<<<<<<<<<<<<<
  92263. * object waiter):
  92264. *
  92265. */
  92266. /* function exit code */
  92267. __pyx_L1_error:;
  92268. __Pyx_XDECREF(__pyx_t_1);
  92269. __Pyx_AddTraceback("uvloop.loop.UnixTransport.new", __pyx_clineno, __pyx_lineno, __pyx_filename);
  92270. __pyx_r = 0;
  92271. __pyx_L0:;
  92272. __Pyx_XDECREF((PyObject *)__pyx_v_handle);
  92273. __Pyx_XGIVEREF((PyObject *)__pyx_r);
  92274. __Pyx_RefNannyFinishContext();
  92275. return __pyx_r;
  92276. }
  92277. /* "uvloop/handles/pipe.pyx":92
  92278. * return handle
  92279. *
  92280. * cdef _new_socket(self): # <<<<<<<<<<<<<<
  92281. * return __pipe_get_socket(<UVSocketHandle>self)
  92282. *
  92283. */
  92284. static PyObject *__pyx_f_6uvloop_4loop_13UnixTransport__new_socket(struct __pyx_obj_6uvloop_4loop_UnixTransport *__pyx_v_self) {
  92285. PyObject *__pyx_r = NULL;
  92286. __Pyx_RefNannyDeclarations
  92287. PyObject *__pyx_t_1 = NULL;
  92288. __Pyx_RefNannySetupContext("_new_socket", 0);
  92289. /* "uvloop/handles/pipe.pyx":93
  92290. *
  92291. * cdef _new_socket(self):
  92292. * return __pipe_get_socket(<UVSocketHandle>self) # <<<<<<<<<<<<<<
  92293. *
  92294. * cdef _open(self, int sockfd):
  92295. */
  92296. __Pyx_XDECREF(__pyx_r);
  92297. __pyx_t_1 = __pyx_f_6uvloop_4loop___pipe_get_socket(((struct __pyx_obj_6uvloop_4loop_UVSocketHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(20, 93, __pyx_L1_error)
  92298. __Pyx_GOTREF(__pyx_t_1);
  92299. __pyx_r = __pyx_t_1;
  92300. __pyx_t_1 = 0;
  92301. goto __pyx_L0;
  92302. /* "uvloop/handles/pipe.pyx":92
  92303. * return handle
  92304. *
  92305. * cdef _new_socket(self): # <<<<<<<<<<<<<<
  92306. * return __pipe_get_socket(<UVSocketHandle>self)
  92307. *
  92308. */
  92309. /* function exit code */
  92310. __pyx_L1_error:;
  92311. __Pyx_XDECREF(__pyx_t_1);
  92312. __Pyx_AddTraceback("uvloop.loop.UnixTransport._new_socket", __pyx_clineno, __pyx_lineno, __pyx_filename);
  92313. __pyx_r = 0;
  92314. __pyx_L0:;
  92315. __Pyx_XGIVEREF(__pyx_r);
  92316. __Pyx_RefNannyFinishContext();
  92317. return __pyx_r;
  92318. }
  92319. /* "uvloop/handles/pipe.pyx":95
  92320. * return __pipe_get_socket(<UVSocketHandle>self)
  92321. *
  92322. * cdef _open(self, int sockfd): # <<<<<<<<<<<<<<
  92323. * __pipe_open(<UVStream>self, sockfd)
  92324. *
  92325. */
  92326. static PyObject *__pyx_f_6uvloop_4loop_13UnixTransport__open(struct __pyx_obj_6uvloop_4loop_UnixTransport *__pyx_v_self, int __pyx_v_sockfd) {
  92327. PyObject *__pyx_r = NULL;
  92328. __Pyx_RefNannyDeclarations
  92329. PyObject *__pyx_t_1 = NULL;
  92330. __Pyx_RefNannySetupContext("_open", 0);
  92331. /* "uvloop/handles/pipe.pyx":96
  92332. *
  92333. * cdef _open(self, int sockfd):
  92334. * __pipe_open(<UVStream>self, sockfd) # <<<<<<<<<<<<<<
  92335. *
  92336. * cdef connect(self, char* addr):
  92337. */
  92338. __pyx_t_1 = __pyx_f_6uvloop_4loop___pipe_open(((struct __pyx_obj_6uvloop_4loop_UVStream *)__pyx_v_self), __pyx_v_sockfd); if (unlikely(!__pyx_t_1)) __PYX_ERR(20, 96, __pyx_L1_error)
  92339. __Pyx_GOTREF(__pyx_t_1);
  92340. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  92341. /* "uvloop/handles/pipe.pyx":95
  92342. * return __pipe_get_socket(<UVSocketHandle>self)
  92343. *
  92344. * cdef _open(self, int sockfd): # <<<<<<<<<<<<<<
  92345. * __pipe_open(<UVStream>self, sockfd)
  92346. *
  92347. */
  92348. /* function exit code */
  92349. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  92350. goto __pyx_L0;
  92351. __pyx_L1_error:;
  92352. __Pyx_XDECREF(__pyx_t_1);
  92353. __Pyx_AddTraceback("uvloop.loop.UnixTransport._open", __pyx_clineno, __pyx_lineno, __pyx_filename);
  92354. __pyx_r = 0;
  92355. __pyx_L0:;
  92356. __Pyx_XGIVEREF(__pyx_r);
  92357. __Pyx_RefNannyFinishContext();
  92358. return __pyx_r;
  92359. }
  92360. /* "uvloop/handles/pipe.pyx":98
  92361. * __pipe_open(<UVStream>self, sockfd)
  92362. *
  92363. * cdef connect(self, char* addr): # <<<<<<<<<<<<<<
  92364. * cdef _PipeConnectRequest req
  92365. * req = _PipeConnectRequest(self._loop, self)
  92366. */
  92367. static PyObject *__pyx_f_6uvloop_4loop_13UnixTransport_connect(struct __pyx_obj_6uvloop_4loop_UnixTransport *__pyx_v_self, char *__pyx_v_addr) {
  92368. struct __pyx_obj_6uvloop_4loop__PipeConnectRequest *__pyx_v_req = 0;
  92369. PyObject *__pyx_r = NULL;
  92370. __Pyx_RefNannyDeclarations
  92371. PyObject *__pyx_t_1 = NULL;
  92372. PyObject *__pyx_t_2 = NULL;
  92373. __Pyx_RefNannySetupContext("connect", 0);
  92374. /* "uvloop/handles/pipe.pyx":100
  92375. * cdef connect(self, char* addr):
  92376. * cdef _PipeConnectRequest req
  92377. * req = _PipeConnectRequest(self._loop, self) # <<<<<<<<<<<<<<
  92378. * req.connect(addr)
  92379. *
  92380. */
  92381. __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(20, 100, __pyx_L1_error)
  92382. __Pyx_GOTREF(__pyx_t_1);
  92383. __Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base._loop));
  92384. __Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base._loop));
  92385. PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base._loop));
  92386. __Pyx_INCREF(((PyObject *)__pyx_v_self));
  92387. __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  92388. PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_self));
  92389. __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6uvloop_4loop__PipeConnectRequest), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(20, 100, __pyx_L1_error)
  92390. __Pyx_GOTREF(__pyx_t_2);
  92391. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  92392. __pyx_v_req = ((struct __pyx_obj_6uvloop_4loop__PipeConnectRequest *)__pyx_t_2);
  92393. __pyx_t_2 = 0;
  92394. /* "uvloop/handles/pipe.pyx":101
  92395. * cdef _PipeConnectRequest req
  92396. * req = _PipeConnectRequest(self._loop, self)
  92397. * req.connect(addr) # <<<<<<<<<<<<<<
  92398. *
  92399. *
  92400. */
  92401. __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop__PipeConnectRequest *)__pyx_v_req->__pyx_base.__pyx_vtab)->connect(__pyx_v_req, __pyx_v_addr); if (unlikely(!__pyx_t_2)) __PYX_ERR(20, 101, __pyx_L1_error)
  92402. __Pyx_GOTREF(__pyx_t_2);
  92403. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  92404. /* "uvloop/handles/pipe.pyx":98
  92405. * __pipe_open(<UVStream>self, sockfd)
  92406. *
  92407. * cdef connect(self, char* addr): # <<<<<<<<<<<<<<
  92408. * cdef _PipeConnectRequest req
  92409. * req = _PipeConnectRequest(self._loop, self)
  92410. */
  92411. /* function exit code */
  92412. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  92413. goto __pyx_L0;
  92414. __pyx_L1_error:;
  92415. __Pyx_XDECREF(__pyx_t_1);
  92416. __Pyx_XDECREF(__pyx_t_2);
  92417. __Pyx_AddTraceback("uvloop.loop.UnixTransport.connect", __pyx_clineno, __pyx_lineno, __pyx_filename);
  92418. __pyx_r = 0;
  92419. __pyx_L0:;
  92420. __Pyx_XDECREF((PyObject *)__pyx_v_req);
  92421. __Pyx_XGIVEREF(__pyx_r);
  92422. __Pyx_RefNannyFinishContext();
  92423. return __pyx_r;
  92424. }
  92425. /* "(tree fragment)":1
  92426. * def __reduce_cython__(self): # <<<<<<<<<<<<<<
  92427. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  92428. * def __setstate_cython__(self, __pyx_state):
  92429. */
  92430. /* Python wrapper */
  92431. static PyObject *__pyx_pw_6uvloop_4loop_13UnixTransport_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  92432. static char __pyx_doc_6uvloop_4loop_13UnixTransport___reduce_cython__[] = "UnixTransport.__reduce_cython__(self)";
  92433. static PyObject *__pyx_pw_6uvloop_4loop_13UnixTransport_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  92434. PyObject *__pyx_r = 0;
  92435. __Pyx_RefNannyDeclarations
  92436. __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  92437. __pyx_r = __pyx_pf_6uvloop_4loop_13UnixTransport___reduce_cython__(((struct __pyx_obj_6uvloop_4loop_UnixTransport *)__pyx_v_self));
  92438. /* function exit code */
  92439. __Pyx_RefNannyFinishContext();
  92440. return __pyx_r;
  92441. }
  92442. static PyObject *__pyx_pf_6uvloop_4loop_13UnixTransport___reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UnixTransport *__pyx_v_self) {
  92443. PyObject *__pyx_r = NULL;
  92444. __Pyx_RefNannyDeclarations
  92445. PyObject *__pyx_t_1 = NULL;
  92446. __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  92447. /* "(tree fragment)":2
  92448. * def __reduce_cython__(self):
  92449. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  92450. * def __setstate_cython__(self, __pyx_state):
  92451. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  92452. */
  92453. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__154, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 2, __pyx_L1_error)
  92454. __Pyx_GOTREF(__pyx_t_1);
  92455. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  92456. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  92457. __PYX_ERR(9, 2, __pyx_L1_error)
  92458. /* "(tree fragment)":1
  92459. * def __reduce_cython__(self): # <<<<<<<<<<<<<<
  92460. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  92461. * def __setstate_cython__(self, __pyx_state):
  92462. */
  92463. /* function exit code */
  92464. __pyx_L1_error:;
  92465. __Pyx_XDECREF(__pyx_t_1);
  92466. __Pyx_AddTraceback("uvloop.loop.UnixTransport.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  92467. __pyx_r = NULL;
  92468. __Pyx_XGIVEREF(__pyx_r);
  92469. __Pyx_RefNannyFinishContext();
  92470. return __pyx_r;
  92471. }
  92472. /* "(tree fragment)":3
  92473. * def __reduce_cython__(self):
  92474. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  92475. * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
  92476. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  92477. */
  92478. /* Python wrapper */
  92479. static PyObject *__pyx_pw_6uvloop_4loop_13UnixTransport_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
  92480. static char __pyx_doc_6uvloop_4loop_13UnixTransport_2__setstate_cython__[] = "UnixTransport.__setstate_cython__(self, __pyx_state)";
  92481. static PyObject *__pyx_pw_6uvloop_4loop_13UnixTransport_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  92482. PyObject *__pyx_r = 0;
  92483. __Pyx_RefNannyDeclarations
  92484. __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  92485. __pyx_r = __pyx_pf_6uvloop_4loop_13UnixTransport_2__setstate_cython__(((struct __pyx_obj_6uvloop_4loop_UnixTransport *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
  92486. /* function exit code */
  92487. __Pyx_RefNannyFinishContext();
  92488. return __pyx_r;
  92489. }
  92490. static PyObject *__pyx_pf_6uvloop_4loop_13UnixTransport_2__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UnixTransport *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  92491. PyObject *__pyx_r = NULL;
  92492. __Pyx_RefNannyDeclarations
  92493. PyObject *__pyx_t_1 = NULL;
  92494. __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  92495. /* "(tree fragment)":4
  92496. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  92497. * def __setstate_cython__(self, __pyx_state):
  92498. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  92499. */
  92500. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__155, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 4, __pyx_L1_error)
  92501. __Pyx_GOTREF(__pyx_t_1);
  92502. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  92503. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  92504. __PYX_ERR(9, 4, __pyx_L1_error)
  92505. /* "(tree fragment)":3
  92506. * def __reduce_cython__(self):
  92507. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  92508. * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
  92509. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  92510. */
  92511. /* function exit code */
  92512. __pyx_L1_error:;
  92513. __Pyx_XDECREF(__pyx_t_1);
  92514. __Pyx_AddTraceback("uvloop.loop.UnixTransport.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  92515. __pyx_r = NULL;
  92516. __Pyx_XGIVEREF(__pyx_r);
  92517. __Pyx_RefNannyFinishContext();
  92518. return __pyx_r;
  92519. }
  92520. /* "uvloop/handles/pipe.pyx":108
  92521. *
  92522. * @staticmethod
  92523. * cdef ReadUnixTransport new(Loop loop, object protocol, Server server, # <<<<<<<<<<<<<<
  92524. * object waiter):
  92525. * cdef ReadUnixTransport handle
  92526. */
  92527. static struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *__pyx_f_6uvloop_4loop_17ReadUnixTransport_new(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, PyObject *__pyx_v_protocol, struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_server, PyObject *__pyx_v_waiter) {
  92528. struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *__pyx_v_handle = 0;
  92529. struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *__pyx_r = NULL;
  92530. __Pyx_RefNannyDeclarations
  92531. PyObject *__pyx_t_1 = NULL;
  92532. __Pyx_RefNannySetupContext("new", 0);
  92533. /* "uvloop/handles/pipe.pyx":111
  92534. * object waiter):
  92535. * cdef ReadUnixTransport handle
  92536. * handle = ReadUnixTransport.__new__(ReadUnixTransport) # <<<<<<<<<<<<<<
  92537. * handle._init(loop, protocol, server, waiter)
  92538. * __pipe_init_uv_handle(<UVStream>handle, loop)
  92539. */
  92540. __pyx_t_1 = ((PyObject *)__pyx_tp_new_6uvloop_4loop_ReadUnixTransport(((PyTypeObject *)__pyx_ptype_6uvloop_4loop_ReadUnixTransport), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(20, 111, __pyx_L1_error)
  92541. __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  92542. __pyx_v_handle = ((struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *)__pyx_t_1);
  92543. __pyx_t_1 = 0;
  92544. /* "uvloop/handles/pipe.pyx":112
  92545. * cdef ReadUnixTransport handle
  92546. * handle = ReadUnixTransport.__new__(ReadUnixTransport)
  92547. * handle._init(loop, protocol, server, waiter) # <<<<<<<<<<<<<<
  92548. * __pipe_init_uv_handle(<UVStream>handle, loop)
  92549. * return handle
  92550. */
  92551. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_ReadUnixTransport *)__pyx_v_handle->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._init(((struct __pyx_obj_6uvloop_4loop_UVStream *)__pyx_v_handle), __pyx_v_loop, __pyx_v_protocol, __pyx_v_server, __pyx_v_waiter); if (unlikely(!__pyx_t_1)) __PYX_ERR(20, 112, __pyx_L1_error)
  92552. __Pyx_GOTREF(__pyx_t_1);
  92553. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  92554. /* "uvloop/handles/pipe.pyx":113
  92555. * handle = ReadUnixTransport.__new__(ReadUnixTransport)
  92556. * handle._init(loop, protocol, server, waiter)
  92557. * __pipe_init_uv_handle(<UVStream>handle, loop) # <<<<<<<<<<<<<<
  92558. * return handle
  92559. *
  92560. */
  92561. __pyx_t_1 = __pyx_f_6uvloop_4loop___pipe_init_uv_handle(((struct __pyx_obj_6uvloop_4loop_UVStream *)__pyx_v_handle), __pyx_v_loop); if (unlikely(!__pyx_t_1)) __PYX_ERR(20, 113, __pyx_L1_error)
  92562. __Pyx_GOTREF(__pyx_t_1);
  92563. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  92564. /* "uvloop/handles/pipe.pyx":114
  92565. * handle._init(loop, protocol, server, waiter)
  92566. * __pipe_init_uv_handle(<UVStream>handle, loop)
  92567. * return handle # <<<<<<<<<<<<<<
  92568. *
  92569. * cdef _new_socket(self):
  92570. */
  92571. __Pyx_XDECREF(((PyObject *)__pyx_r));
  92572. __Pyx_INCREF(((PyObject *)__pyx_v_handle));
  92573. __pyx_r = __pyx_v_handle;
  92574. goto __pyx_L0;
  92575. /* "uvloop/handles/pipe.pyx":108
  92576. *
  92577. * @staticmethod
  92578. * cdef ReadUnixTransport new(Loop loop, object protocol, Server server, # <<<<<<<<<<<<<<
  92579. * object waiter):
  92580. * cdef ReadUnixTransport handle
  92581. */
  92582. /* function exit code */
  92583. __pyx_L1_error:;
  92584. __Pyx_XDECREF(__pyx_t_1);
  92585. __Pyx_AddTraceback("uvloop.loop.ReadUnixTransport.new", __pyx_clineno, __pyx_lineno, __pyx_filename);
  92586. __pyx_r = 0;
  92587. __pyx_L0:;
  92588. __Pyx_XDECREF((PyObject *)__pyx_v_handle);
  92589. __Pyx_XGIVEREF((PyObject *)__pyx_r);
  92590. __Pyx_RefNannyFinishContext();
  92591. return __pyx_r;
  92592. }
  92593. /* "uvloop/handles/pipe.pyx":116
  92594. * return handle
  92595. *
  92596. * cdef _new_socket(self): # <<<<<<<<<<<<<<
  92597. * return __pipe_get_socket(<UVSocketHandle>self)
  92598. *
  92599. */
  92600. static PyObject *__pyx_f_6uvloop_4loop_17ReadUnixTransport__new_socket(struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *__pyx_v_self) {
  92601. PyObject *__pyx_r = NULL;
  92602. __Pyx_RefNannyDeclarations
  92603. PyObject *__pyx_t_1 = NULL;
  92604. __Pyx_RefNannySetupContext("_new_socket", 0);
  92605. /* "uvloop/handles/pipe.pyx":117
  92606. *
  92607. * cdef _new_socket(self):
  92608. * return __pipe_get_socket(<UVSocketHandle>self) # <<<<<<<<<<<<<<
  92609. *
  92610. * cdef _open(self, int sockfd):
  92611. */
  92612. __Pyx_XDECREF(__pyx_r);
  92613. __pyx_t_1 = __pyx_f_6uvloop_4loop___pipe_get_socket(((struct __pyx_obj_6uvloop_4loop_UVSocketHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(20, 117, __pyx_L1_error)
  92614. __Pyx_GOTREF(__pyx_t_1);
  92615. __pyx_r = __pyx_t_1;
  92616. __pyx_t_1 = 0;
  92617. goto __pyx_L0;
  92618. /* "uvloop/handles/pipe.pyx":116
  92619. * return handle
  92620. *
  92621. * cdef _new_socket(self): # <<<<<<<<<<<<<<
  92622. * return __pipe_get_socket(<UVSocketHandle>self)
  92623. *
  92624. */
  92625. /* function exit code */
  92626. __pyx_L1_error:;
  92627. __Pyx_XDECREF(__pyx_t_1);
  92628. __Pyx_AddTraceback("uvloop.loop.ReadUnixTransport._new_socket", __pyx_clineno, __pyx_lineno, __pyx_filename);
  92629. __pyx_r = 0;
  92630. __pyx_L0:;
  92631. __Pyx_XGIVEREF(__pyx_r);
  92632. __Pyx_RefNannyFinishContext();
  92633. return __pyx_r;
  92634. }
  92635. /* "uvloop/handles/pipe.pyx":119
  92636. * return __pipe_get_socket(<UVSocketHandle>self)
  92637. *
  92638. * cdef _open(self, int sockfd): # <<<<<<<<<<<<<<
  92639. * __pipe_open(<UVStream>self, sockfd)
  92640. *
  92641. */
  92642. static PyObject *__pyx_f_6uvloop_4loop_17ReadUnixTransport__open(struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *__pyx_v_self, int __pyx_v_sockfd) {
  92643. PyObject *__pyx_r = NULL;
  92644. __Pyx_RefNannyDeclarations
  92645. PyObject *__pyx_t_1 = NULL;
  92646. __Pyx_RefNannySetupContext("_open", 0);
  92647. /* "uvloop/handles/pipe.pyx":120
  92648. *
  92649. * cdef _open(self, int sockfd):
  92650. * __pipe_open(<UVStream>self, sockfd) # <<<<<<<<<<<<<<
  92651. *
  92652. * def get_write_buffer_limits(self):
  92653. */
  92654. __pyx_t_1 = __pyx_f_6uvloop_4loop___pipe_open(((struct __pyx_obj_6uvloop_4loop_UVStream *)__pyx_v_self), __pyx_v_sockfd); if (unlikely(!__pyx_t_1)) __PYX_ERR(20, 120, __pyx_L1_error)
  92655. __Pyx_GOTREF(__pyx_t_1);
  92656. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  92657. /* "uvloop/handles/pipe.pyx":119
  92658. * return __pipe_get_socket(<UVSocketHandle>self)
  92659. *
  92660. * cdef _open(self, int sockfd): # <<<<<<<<<<<<<<
  92661. * __pipe_open(<UVStream>self, sockfd)
  92662. *
  92663. */
  92664. /* function exit code */
  92665. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  92666. goto __pyx_L0;
  92667. __pyx_L1_error:;
  92668. __Pyx_XDECREF(__pyx_t_1);
  92669. __Pyx_AddTraceback("uvloop.loop.ReadUnixTransport._open", __pyx_clineno, __pyx_lineno, __pyx_filename);
  92670. __pyx_r = 0;
  92671. __pyx_L0:;
  92672. __Pyx_XGIVEREF(__pyx_r);
  92673. __Pyx_RefNannyFinishContext();
  92674. return __pyx_r;
  92675. }
  92676. /* "uvloop/handles/pipe.pyx":122
  92677. * __pipe_open(<UVStream>self, sockfd)
  92678. *
  92679. * def get_write_buffer_limits(self): # <<<<<<<<<<<<<<
  92680. * raise NotImplementedError
  92681. *
  92682. */
  92683. /* Python wrapper */
  92684. static PyObject *__pyx_pw_6uvloop_4loop_17ReadUnixTransport_1get_write_buffer_limits(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  92685. static char __pyx_doc_6uvloop_4loop_17ReadUnixTransport_get_write_buffer_limits[] = "ReadUnixTransport.get_write_buffer_limits(self)";
  92686. static PyObject *__pyx_pw_6uvloop_4loop_17ReadUnixTransport_1get_write_buffer_limits(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  92687. PyObject *__pyx_r = 0;
  92688. __Pyx_RefNannyDeclarations
  92689. __Pyx_RefNannySetupContext("get_write_buffer_limits (wrapper)", 0);
  92690. __pyx_r = __pyx_pf_6uvloop_4loop_17ReadUnixTransport_get_write_buffer_limits(((struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *)__pyx_v_self));
  92691. /* function exit code */
  92692. __Pyx_RefNannyFinishContext();
  92693. return __pyx_r;
  92694. }
  92695. static PyObject *__pyx_pf_6uvloop_4loop_17ReadUnixTransport_get_write_buffer_limits(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *__pyx_v_self) {
  92696. PyObject *__pyx_r = NULL;
  92697. __Pyx_RefNannyDeclarations
  92698. __Pyx_RefNannySetupContext("get_write_buffer_limits", 0);
  92699. /* "uvloop/handles/pipe.pyx":123
  92700. *
  92701. * def get_write_buffer_limits(self):
  92702. * raise NotImplementedError # <<<<<<<<<<<<<<
  92703. *
  92704. * def set_write_buffer_limits(self, high=None, low=None):
  92705. */
  92706. __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0);
  92707. __PYX_ERR(20, 123, __pyx_L1_error)
  92708. /* "uvloop/handles/pipe.pyx":122
  92709. * __pipe_open(<UVStream>self, sockfd)
  92710. *
  92711. * def get_write_buffer_limits(self): # <<<<<<<<<<<<<<
  92712. * raise NotImplementedError
  92713. *
  92714. */
  92715. /* function exit code */
  92716. __pyx_L1_error:;
  92717. __Pyx_AddTraceback("uvloop.loop.ReadUnixTransport.get_write_buffer_limits", __pyx_clineno, __pyx_lineno, __pyx_filename);
  92718. __pyx_r = NULL;
  92719. __Pyx_XGIVEREF(__pyx_r);
  92720. __Pyx_RefNannyFinishContext();
  92721. return __pyx_r;
  92722. }
  92723. /* "uvloop/handles/pipe.pyx":125
  92724. * raise NotImplementedError
  92725. *
  92726. * def set_write_buffer_limits(self, high=None, low=None): # <<<<<<<<<<<<<<
  92727. * raise NotImplementedError
  92728. *
  92729. */
  92730. /* Python wrapper */
  92731. static PyObject *__pyx_pw_6uvloop_4loop_17ReadUnixTransport_3set_write_buffer_limits(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  92732. static char __pyx_doc_6uvloop_4loop_17ReadUnixTransport_2set_write_buffer_limits[] = "ReadUnixTransport.set_write_buffer_limits(self, high=None, low=None)";
  92733. static PyObject *__pyx_pw_6uvloop_4loop_17ReadUnixTransport_3set_write_buffer_limits(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  92734. CYTHON_UNUSED PyObject *__pyx_v_high = 0;
  92735. CYTHON_UNUSED PyObject *__pyx_v_low = 0;
  92736. PyObject *__pyx_r = 0;
  92737. __Pyx_RefNannyDeclarations
  92738. __Pyx_RefNannySetupContext("set_write_buffer_limits (wrapper)", 0);
  92739. {
  92740. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_high,&__pyx_n_s_low,0};
  92741. PyObject* values[2] = {0,0};
  92742. values[0] = ((PyObject *)Py_None);
  92743. values[1] = ((PyObject *)Py_None);
  92744. if (unlikely(__pyx_kwds)) {
  92745. Py_ssize_t kw_args;
  92746. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  92747. switch (pos_args) {
  92748. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  92749. CYTHON_FALLTHROUGH;
  92750. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  92751. CYTHON_FALLTHROUGH;
  92752. case 0: break;
  92753. default: goto __pyx_L5_argtuple_error;
  92754. }
  92755. kw_args = PyDict_Size(__pyx_kwds);
  92756. switch (pos_args) {
  92757. case 0:
  92758. if (kw_args > 0) {
  92759. PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_high);
  92760. if (value) { values[0] = value; kw_args--; }
  92761. }
  92762. CYTHON_FALLTHROUGH;
  92763. case 1:
  92764. if (kw_args > 0) {
  92765. PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_low);
  92766. if (value) { values[1] = value; kw_args--; }
  92767. }
  92768. }
  92769. if (unlikely(kw_args > 0)) {
  92770. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_write_buffer_limits") < 0)) __PYX_ERR(20, 125, __pyx_L3_error)
  92771. }
  92772. } else {
  92773. switch (PyTuple_GET_SIZE(__pyx_args)) {
  92774. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  92775. CYTHON_FALLTHROUGH;
  92776. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  92777. CYTHON_FALLTHROUGH;
  92778. case 0: break;
  92779. default: goto __pyx_L5_argtuple_error;
  92780. }
  92781. }
  92782. __pyx_v_high = values[0];
  92783. __pyx_v_low = values[1];
  92784. }
  92785. goto __pyx_L4_argument_unpacking_done;
  92786. __pyx_L5_argtuple_error:;
  92787. __Pyx_RaiseArgtupleInvalid("set_write_buffer_limits", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(20, 125, __pyx_L3_error)
  92788. __pyx_L3_error:;
  92789. __Pyx_AddTraceback("uvloop.loop.ReadUnixTransport.set_write_buffer_limits", __pyx_clineno, __pyx_lineno, __pyx_filename);
  92790. __Pyx_RefNannyFinishContext();
  92791. return NULL;
  92792. __pyx_L4_argument_unpacking_done:;
  92793. __pyx_r = __pyx_pf_6uvloop_4loop_17ReadUnixTransport_2set_write_buffer_limits(((struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *)__pyx_v_self), __pyx_v_high, __pyx_v_low);
  92794. /* function exit code */
  92795. __Pyx_RefNannyFinishContext();
  92796. return __pyx_r;
  92797. }
  92798. static PyObject *__pyx_pf_6uvloop_4loop_17ReadUnixTransport_2set_write_buffer_limits(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_high, CYTHON_UNUSED PyObject *__pyx_v_low) {
  92799. PyObject *__pyx_r = NULL;
  92800. __Pyx_RefNannyDeclarations
  92801. __Pyx_RefNannySetupContext("set_write_buffer_limits", 0);
  92802. /* "uvloop/handles/pipe.pyx":126
  92803. *
  92804. * def set_write_buffer_limits(self, high=None, low=None):
  92805. * raise NotImplementedError # <<<<<<<<<<<<<<
  92806. *
  92807. * def get_write_buffer_size(self):
  92808. */
  92809. __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0);
  92810. __PYX_ERR(20, 126, __pyx_L1_error)
  92811. /* "uvloop/handles/pipe.pyx":125
  92812. * raise NotImplementedError
  92813. *
  92814. * def set_write_buffer_limits(self, high=None, low=None): # <<<<<<<<<<<<<<
  92815. * raise NotImplementedError
  92816. *
  92817. */
  92818. /* function exit code */
  92819. __pyx_L1_error:;
  92820. __Pyx_AddTraceback("uvloop.loop.ReadUnixTransport.set_write_buffer_limits", __pyx_clineno, __pyx_lineno, __pyx_filename);
  92821. __pyx_r = NULL;
  92822. __Pyx_XGIVEREF(__pyx_r);
  92823. __Pyx_RefNannyFinishContext();
  92824. return __pyx_r;
  92825. }
  92826. /* "uvloop/handles/pipe.pyx":128
  92827. * raise NotImplementedError
  92828. *
  92829. * def get_write_buffer_size(self): # <<<<<<<<<<<<<<
  92830. * raise NotImplementedError
  92831. *
  92832. */
  92833. /* Python wrapper */
  92834. static PyObject *__pyx_pw_6uvloop_4loop_17ReadUnixTransport_5get_write_buffer_size(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  92835. static char __pyx_doc_6uvloop_4loop_17ReadUnixTransport_4get_write_buffer_size[] = "ReadUnixTransport.get_write_buffer_size(self)";
  92836. static PyObject *__pyx_pw_6uvloop_4loop_17ReadUnixTransport_5get_write_buffer_size(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  92837. PyObject *__pyx_r = 0;
  92838. __Pyx_RefNannyDeclarations
  92839. __Pyx_RefNannySetupContext("get_write_buffer_size (wrapper)", 0);
  92840. __pyx_r = __pyx_pf_6uvloop_4loop_17ReadUnixTransport_4get_write_buffer_size(((struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *)__pyx_v_self));
  92841. /* function exit code */
  92842. __Pyx_RefNannyFinishContext();
  92843. return __pyx_r;
  92844. }
  92845. static PyObject *__pyx_pf_6uvloop_4loop_17ReadUnixTransport_4get_write_buffer_size(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *__pyx_v_self) {
  92846. PyObject *__pyx_r = NULL;
  92847. __Pyx_RefNannyDeclarations
  92848. __Pyx_RefNannySetupContext("get_write_buffer_size", 0);
  92849. /* "uvloop/handles/pipe.pyx":129
  92850. *
  92851. * def get_write_buffer_size(self):
  92852. * raise NotImplementedError # <<<<<<<<<<<<<<
  92853. *
  92854. * def write(self, data):
  92855. */
  92856. __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0);
  92857. __PYX_ERR(20, 129, __pyx_L1_error)
  92858. /* "uvloop/handles/pipe.pyx":128
  92859. * raise NotImplementedError
  92860. *
  92861. * def get_write_buffer_size(self): # <<<<<<<<<<<<<<
  92862. * raise NotImplementedError
  92863. *
  92864. */
  92865. /* function exit code */
  92866. __pyx_L1_error:;
  92867. __Pyx_AddTraceback("uvloop.loop.ReadUnixTransport.get_write_buffer_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
  92868. __pyx_r = NULL;
  92869. __Pyx_XGIVEREF(__pyx_r);
  92870. __Pyx_RefNannyFinishContext();
  92871. return __pyx_r;
  92872. }
  92873. /* "uvloop/handles/pipe.pyx":131
  92874. * raise NotImplementedError
  92875. *
  92876. * def write(self, data): # <<<<<<<<<<<<<<
  92877. * raise NotImplementedError
  92878. *
  92879. */
  92880. /* Python wrapper */
  92881. static PyObject *__pyx_pw_6uvloop_4loop_17ReadUnixTransport_7write(PyObject *__pyx_v_self, PyObject *__pyx_v_data); /*proto*/
  92882. static char __pyx_doc_6uvloop_4loop_17ReadUnixTransport_6write[] = "ReadUnixTransport.write(self, data)";
  92883. static PyObject *__pyx_pw_6uvloop_4loop_17ReadUnixTransport_7write(PyObject *__pyx_v_self, PyObject *__pyx_v_data) {
  92884. PyObject *__pyx_r = 0;
  92885. __Pyx_RefNannyDeclarations
  92886. __Pyx_RefNannySetupContext("write (wrapper)", 0);
  92887. __pyx_r = __pyx_pf_6uvloop_4loop_17ReadUnixTransport_6write(((struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *)__pyx_v_self), ((PyObject *)__pyx_v_data));
  92888. /* function exit code */
  92889. __Pyx_RefNannyFinishContext();
  92890. return __pyx_r;
  92891. }
  92892. static PyObject *__pyx_pf_6uvloop_4loop_17ReadUnixTransport_6write(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_data) {
  92893. PyObject *__pyx_r = NULL;
  92894. __Pyx_RefNannyDeclarations
  92895. __Pyx_RefNannySetupContext("write", 0);
  92896. /* "uvloop/handles/pipe.pyx":132
  92897. *
  92898. * def write(self, data):
  92899. * raise NotImplementedError # <<<<<<<<<<<<<<
  92900. *
  92901. * def writelines(self, list_of_data):
  92902. */
  92903. __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0);
  92904. __PYX_ERR(20, 132, __pyx_L1_error)
  92905. /* "uvloop/handles/pipe.pyx":131
  92906. * raise NotImplementedError
  92907. *
  92908. * def write(self, data): # <<<<<<<<<<<<<<
  92909. * raise NotImplementedError
  92910. *
  92911. */
  92912. /* function exit code */
  92913. __pyx_L1_error:;
  92914. __Pyx_AddTraceback("uvloop.loop.ReadUnixTransport.write", __pyx_clineno, __pyx_lineno, __pyx_filename);
  92915. __pyx_r = NULL;
  92916. __Pyx_XGIVEREF(__pyx_r);
  92917. __Pyx_RefNannyFinishContext();
  92918. return __pyx_r;
  92919. }
  92920. /* "uvloop/handles/pipe.pyx":134
  92921. * raise NotImplementedError
  92922. *
  92923. * def writelines(self, list_of_data): # <<<<<<<<<<<<<<
  92924. * raise NotImplementedError
  92925. *
  92926. */
  92927. /* Python wrapper */
  92928. static PyObject *__pyx_pw_6uvloop_4loop_17ReadUnixTransport_9writelines(PyObject *__pyx_v_self, PyObject *__pyx_v_list_of_data); /*proto*/
  92929. static char __pyx_doc_6uvloop_4loop_17ReadUnixTransport_8writelines[] = "ReadUnixTransport.writelines(self, list_of_data)";
  92930. static PyObject *__pyx_pw_6uvloop_4loop_17ReadUnixTransport_9writelines(PyObject *__pyx_v_self, PyObject *__pyx_v_list_of_data) {
  92931. PyObject *__pyx_r = 0;
  92932. __Pyx_RefNannyDeclarations
  92933. __Pyx_RefNannySetupContext("writelines (wrapper)", 0);
  92934. __pyx_r = __pyx_pf_6uvloop_4loop_17ReadUnixTransport_8writelines(((struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *)__pyx_v_self), ((PyObject *)__pyx_v_list_of_data));
  92935. /* function exit code */
  92936. __Pyx_RefNannyFinishContext();
  92937. return __pyx_r;
  92938. }
  92939. static PyObject *__pyx_pf_6uvloop_4loop_17ReadUnixTransport_8writelines(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_list_of_data) {
  92940. PyObject *__pyx_r = NULL;
  92941. __Pyx_RefNannyDeclarations
  92942. __Pyx_RefNannySetupContext("writelines", 0);
  92943. /* "uvloop/handles/pipe.pyx":135
  92944. *
  92945. * def writelines(self, list_of_data):
  92946. * raise NotImplementedError # <<<<<<<<<<<<<<
  92947. *
  92948. * def write_eof(self):
  92949. */
  92950. __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0);
  92951. __PYX_ERR(20, 135, __pyx_L1_error)
  92952. /* "uvloop/handles/pipe.pyx":134
  92953. * raise NotImplementedError
  92954. *
  92955. * def writelines(self, list_of_data): # <<<<<<<<<<<<<<
  92956. * raise NotImplementedError
  92957. *
  92958. */
  92959. /* function exit code */
  92960. __pyx_L1_error:;
  92961. __Pyx_AddTraceback("uvloop.loop.ReadUnixTransport.writelines", __pyx_clineno, __pyx_lineno, __pyx_filename);
  92962. __pyx_r = NULL;
  92963. __Pyx_XGIVEREF(__pyx_r);
  92964. __Pyx_RefNannyFinishContext();
  92965. return __pyx_r;
  92966. }
  92967. /* "uvloop/handles/pipe.pyx":137
  92968. * raise NotImplementedError
  92969. *
  92970. * def write_eof(self): # <<<<<<<<<<<<<<
  92971. * raise NotImplementedError
  92972. *
  92973. */
  92974. /* Python wrapper */
  92975. static PyObject *__pyx_pw_6uvloop_4loop_17ReadUnixTransport_11write_eof(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  92976. static char __pyx_doc_6uvloop_4loop_17ReadUnixTransport_10write_eof[] = "ReadUnixTransport.write_eof(self)";
  92977. static PyObject *__pyx_pw_6uvloop_4loop_17ReadUnixTransport_11write_eof(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  92978. PyObject *__pyx_r = 0;
  92979. __Pyx_RefNannyDeclarations
  92980. __Pyx_RefNannySetupContext("write_eof (wrapper)", 0);
  92981. __pyx_r = __pyx_pf_6uvloop_4loop_17ReadUnixTransport_10write_eof(((struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *)__pyx_v_self));
  92982. /* function exit code */
  92983. __Pyx_RefNannyFinishContext();
  92984. return __pyx_r;
  92985. }
  92986. static PyObject *__pyx_pf_6uvloop_4loop_17ReadUnixTransport_10write_eof(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *__pyx_v_self) {
  92987. PyObject *__pyx_r = NULL;
  92988. __Pyx_RefNannyDeclarations
  92989. __Pyx_RefNannySetupContext("write_eof", 0);
  92990. /* "uvloop/handles/pipe.pyx":138
  92991. *
  92992. * def write_eof(self):
  92993. * raise NotImplementedError # <<<<<<<<<<<<<<
  92994. *
  92995. * def can_write_eof(self):
  92996. */
  92997. __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0);
  92998. __PYX_ERR(20, 138, __pyx_L1_error)
  92999. /* "uvloop/handles/pipe.pyx":137
  93000. * raise NotImplementedError
  93001. *
  93002. * def write_eof(self): # <<<<<<<<<<<<<<
  93003. * raise NotImplementedError
  93004. *
  93005. */
  93006. /* function exit code */
  93007. __pyx_L1_error:;
  93008. __Pyx_AddTraceback("uvloop.loop.ReadUnixTransport.write_eof", __pyx_clineno, __pyx_lineno, __pyx_filename);
  93009. __pyx_r = NULL;
  93010. __Pyx_XGIVEREF(__pyx_r);
  93011. __Pyx_RefNannyFinishContext();
  93012. return __pyx_r;
  93013. }
  93014. /* "uvloop/handles/pipe.pyx":140
  93015. * raise NotImplementedError
  93016. *
  93017. * def can_write_eof(self): # <<<<<<<<<<<<<<
  93018. * raise NotImplementedError
  93019. *
  93020. */
  93021. /* Python wrapper */
  93022. static PyObject *__pyx_pw_6uvloop_4loop_17ReadUnixTransport_13can_write_eof(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  93023. static char __pyx_doc_6uvloop_4loop_17ReadUnixTransport_12can_write_eof[] = "ReadUnixTransport.can_write_eof(self)";
  93024. static PyObject *__pyx_pw_6uvloop_4loop_17ReadUnixTransport_13can_write_eof(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  93025. PyObject *__pyx_r = 0;
  93026. __Pyx_RefNannyDeclarations
  93027. __Pyx_RefNannySetupContext("can_write_eof (wrapper)", 0);
  93028. __pyx_r = __pyx_pf_6uvloop_4loop_17ReadUnixTransport_12can_write_eof(((struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *)__pyx_v_self));
  93029. /* function exit code */
  93030. __Pyx_RefNannyFinishContext();
  93031. return __pyx_r;
  93032. }
  93033. static PyObject *__pyx_pf_6uvloop_4loop_17ReadUnixTransport_12can_write_eof(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *__pyx_v_self) {
  93034. PyObject *__pyx_r = NULL;
  93035. __Pyx_RefNannyDeclarations
  93036. __Pyx_RefNannySetupContext("can_write_eof", 0);
  93037. /* "uvloop/handles/pipe.pyx":141
  93038. *
  93039. * def can_write_eof(self):
  93040. * raise NotImplementedError # <<<<<<<<<<<<<<
  93041. *
  93042. * def abort(self):
  93043. */
  93044. __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0);
  93045. __PYX_ERR(20, 141, __pyx_L1_error)
  93046. /* "uvloop/handles/pipe.pyx":140
  93047. * raise NotImplementedError
  93048. *
  93049. * def can_write_eof(self): # <<<<<<<<<<<<<<
  93050. * raise NotImplementedError
  93051. *
  93052. */
  93053. /* function exit code */
  93054. __pyx_L1_error:;
  93055. __Pyx_AddTraceback("uvloop.loop.ReadUnixTransport.can_write_eof", __pyx_clineno, __pyx_lineno, __pyx_filename);
  93056. __pyx_r = NULL;
  93057. __Pyx_XGIVEREF(__pyx_r);
  93058. __Pyx_RefNannyFinishContext();
  93059. return __pyx_r;
  93060. }
  93061. /* "uvloop/handles/pipe.pyx":143
  93062. * raise NotImplementedError
  93063. *
  93064. * def abort(self): # <<<<<<<<<<<<<<
  93065. * raise NotImplementedError
  93066. *
  93067. */
  93068. /* Python wrapper */
  93069. static PyObject *__pyx_pw_6uvloop_4loop_17ReadUnixTransport_15abort(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  93070. static char __pyx_doc_6uvloop_4loop_17ReadUnixTransport_14abort[] = "ReadUnixTransport.abort(self)";
  93071. static PyObject *__pyx_pw_6uvloop_4loop_17ReadUnixTransport_15abort(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  93072. PyObject *__pyx_r = 0;
  93073. __Pyx_RefNannyDeclarations
  93074. __Pyx_RefNannySetupContext("abort (wrapper)", 0);
  93075. __pyx_r = __pyx_pf_6uvloop_4loop_17ReadUnixTransport_14abort(((struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *)__pyx_v_self));
  93076. /* function exit code */
  93077. __Pyx_RefNannyFinishContext();
  93078. return __pyx_r;
  93079. }
  93080. static PyObject *__pyx_pf_6uvloop_4loop_17ReadUnixTransport_14abort(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *__pyx_v_self) {
  93081. PyObject *__pyx_r = NULL;
  93082. __Pyx_RefNannyDeclarations
  93083. __Pyx_RefNannySetupContext("abort", 0);
  93084. /* "uvloop/handles/pipe.pyx":144
  93085. *
  93086. * def abort(self):
  93087. * raise NotImplementedError # <<<<<<<<<<<<<<
  93088. *
  93089. *
  93090. */
  93091. __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0);
  93092. __PYX_ERR(20, 144, __pyx_L1_error)
  93093. /* "uvloop/handles/pipe.pyx":143
  93094. * raise NotImplementedError
  93095. *
  93096. * def abort(self): # <<<<<<<<<<<<<<
  93097. * raise NotImplementedError
  93098. *
  93099. */
  93100. /* function exit code */
  93101. __pyx_L1_error:;
  93102. __Pyx_AddTraceback("uvloop.loop.ReadUnixTransport.abort", __pyx_clineno, __pyx_lineno, __pyx_filename);
  93103. __pyx_r = NULL;
  93104. __Pyx_XGIVEREF(__pyx_r);
  93105. __Pyx_RefNannyFinishContext();
  93106. return __pyx_r;
  93107. }
  93108. /* "(tree fragment)":1
  93109. * def __reduce_cython__(self): # <<<<<<<<<<<<<<
  93110. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  93111. * def __setstate_cython__(self, __pyx_state):
  93112. */
  93113. /* Python wrapper */
  93114. static PyObject *__pyx_pw_6uvloop_4loop_17ReadUnixTransport_17__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  93115. static char __pyx_doc_6uvloop_4loop_17ReadUnixTransport_16__reduce_cython__[] = "ReadUnixTransport.__reduce_cython__(self)";
  93116. static PyObject *__pyx_pw_6uvloop_4loop_17ReadUnixTransport_17__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  93117. PyObject *__pyx_r = 0;
  93118. __Pyx_RefNannyDeclarations
  93119. __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  93120. __pyx_r = __pyx_pf_6uvloop_4loop_17ReadUnixTransport_16__reduce_cython__(((struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *)__pyx_v_self));
  93121. /* function exit code */
  93122. __Pyx_RefNannyFinishContext();
  93123. return __pyx_r;
  93124. }
  93125. static PyObject *__pyx_pf_6uvloop_4loop_17ReadUnixTransport_16__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *__pyx_v_self) {
  93126. PyObject *__pyx_r = NULL;
  93127. __Pyx_RefNannyDeclarations
  93128. PyObject *__pyx_t_1 = NULL;
  93129. __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  93130. /* "(tree fragment)":2
  93131. * def __reduce_cython__(self):
  93132. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  93133. * def __setstate_cython__(self, __pyx_state):
  93134. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  93135. */
  93136. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__156, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 2, __pyx_L1_error)
  93137. __Pyx_GOTREF(__pyx_t_1);
  93138. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  93139. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  93140. __PYX_ERR(9, 2, __pyx_L1_error)
  93141. /* "(tree fragment)":1
  93142. * def __reduce_cython__(self): # <<<<<<<<<<<<<<
  93143. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  93144. * def __setstate_cython__(self, __pyx_state):
  93145. */
  93146. /* function exit code */
  93147. __pyx_L1_error:;
  93148. __Pyx_XDECREF(__pyx_t_1);
  93149. __Pyx_AddTraceback("uvloop.loop.ReadUnixTransport.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  93150. __pyx_r = NULL;
  93151. __Pyx_XGIVEREF(__pyx_r);
  93152. __Pyx_RefNannyFinishContext();
  93153. return __pyx_r;
  93154. }
  93155. /* "(tree fragment)":3
  93156. * def __reduce_cython__(self):
  93157. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  93158. * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
  93159. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  93160. */
  93161. /* Python wrapper */
  93162. static PyObject *__pyx_pw_6uvloop_4loop_17ReadUnixTransport_19__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
  93163. static char __pyx_doc_6uvloop_4loop_17ReadUnixTransport_18__setstate_cython__[] = "ReadUnixTransport.__setstate_cython__(self, __pyx_state)";
  93164. static PyObject *__pyx_pw_6uvloop_4loop_17ReadUnixTransport_19__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  93165. PyObject *__pyx_r = 0;
  93166. __Pyx_RefNannyDeclarations
  93167. __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  93168. __pyx_r = __pyx_pf_6uvloop_4loop_17ReadUnixTransport_18__setstate_cython__(((struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
  93169. /* function exit code */
  93170. __Pyx_RefNannyFinishContext();
  93171. return __pyx_r;
  93172. }
  93173. static PyObject *__pyx_pf_6uvloop_4loop_17ReadUnixTransport_18__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  93174. PyObject *__pyx_r = NULL;
  93175. __Pyx_RefNannyDeclarations
  93176. PyObject *__pyx_t_1 = NULL;
  93177. __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  93178. /* "(tree fragment)":4
  93179. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  93180. * def __setstate_cython__(self, __pyx_state):
  93181. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  93182. */
  93183. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__157, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 4, __pyx_L1_error)
  93184. __Pyx_GOTREF(__pyx_t_1);
  93185. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  93186. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  93187. __PYX_ERR(9, 4, __pyx_L1_error)
  93188. /* "(tree fragment)":3
  93189. * def __reduce_cython__(self):
  93190. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  93191. * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
  93192. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  93193. */
  93194. /* function exit code */
  93195. __pyx_L1_error:;
  93196. __Pyx_XDECREF(__pyx_t_1);
  93197. __Pyx_AddTraceback("uvloop.loop.ReadUnixTransport.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  93198. __pyx_r = NULL;
  93199. __Pyx_XGIVEREF(__pyx_r);
  93200. __Pyx_RefNannyFinishContext();
  93201. return __pyx_r;
  93202. }
  93203. /* "uvloop/handles/pipe.pyx":150
  93204. * cdef class WriteUnixTransport(UVStream):
  93205. *
  93206. * def __cinit__(self): # <<<<<<<<<<<<<<
  93207. * self.disconnect_listener_inited = False
  93208. * self.disconnect_listener.data = NULL
  93209. */
  93210. /* Python wrapper */
  93211. static int __pyx_pw_6uvloop_4loop_18WriteUnixTransport_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  93212. static int __pyx_pw_6uvloop_4loop_18WriteUnixTransport_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  93213. int __pyx_r;
  93214. __Pyx_RefNannyDeclarations
  93215. __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  93216. if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
  93217. __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  93218. if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
  93219. __pyx_r = __pyx_pf_6uvloop_4loop_18WriteUnixTransport___cinit__(((struct __pyx_obj_6uvloop_4loop_WriteUnixTransport *)__pyx_v_self));
  93220. /* function exit code */
  93221. __Pyx_RefNannyFinishContext();
  93222. return __pyx_r;
  93223. }
  93224. static int __pyx_pf_6uvloop_4loop_18WriteUnixTransport___cinit__(struct __pyx_obj_6uvloop_4loop_WriteUnixTransport *__pyx_v_self) {
  93225. int __pyx_r;
  93226. __Pyx_RefNannyDeclarations
  93227. __Pyx_RefNannySetupContext("__cinit__", 0);
  93228. /* "uvloop/handles/pipe.pyx":151
  93229. *
  93230. * def __cinit__(self):
  93231. * self.disconnect_listener_inited = False # <<<<<<<<<<<<<<
  93232. * self.disconnect_listener.data = NULL
  93233. *
  93234. */
  93235. __pyx_v_self->disconnect_listener_inited = 0;
  93236. /* "uvloop/handles/pipe.pyx":152
  93237. * def __cinit__(self):
  93238. * self.disconnect_listener_inited = False
  93239. * self.disconnect_listener.data = NULL # <<<<<<<<<<<<<<
  93240. *
  93241. * @staticmethod
  93242. */
  93243. __pyx_v_self->disconnect_listener.data = NULL;
  93244. /* "uvloop/handles/pipe.pyx":150
  93245. * cdef class WriteUnixTransport(UVStream):
  93246. *
  93247. * def __cinit__(self): # <<<<<<<<<<<<<<
  93248. * self.disconnect_listener_inited = False
  93249. * self.disconnect_listener.data = NULL
  93250. */
  93251. /* function exit code */
  93252. __pyx_r = 0;
  93253. __Pyx_RefNannyFinishContext();
  93254. return __pyx_r;
  93255. }
  93256. /* "uvloop/handles/pipe.pyx":155
  93257. *
  93258. * @staticmethod
  93259. * cdef WriteUnixTransport new(Loop loop, object protocol, Server server, # <<<<<<<<<<<<<<
  93260. * object waiter):
  93261. * cdef WriteUnixTransport handle
  93262. */
  93263. static struct __pyx_obj_6uvloop_4loop_WriteUnixTransport *__pyx_f_6uvloop_4loop_18WriteUnixTransport_new(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, PyObject *__pyx_v_protocol, struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_server, PyObject *__pyx_v_waiter) {
  93264. struct __pyx_obj_6uvloop_4loop_WriteUnixTransport *__pyx_v_handle = 0;
  93265. struct __pyx_obj_6uvloop_4loop_WriteUnixTransport *__pyx_r = NULL;
  93266. __Pyx_RefNannyDeclarations
  93267. PyObject *__pyx_t_1 = NULL;
  93268. __Pyx_RefNannySetupContext("new", 0);
  93269. /* "uvloop/handles/pipe.pyx":158
  93270. * object waiter):
  93271. * cdef WriteUnixTransport handle
  93272. * handle = WriteUnixTransport.__new__(WriteUnixTransport) # <<<<<<<<<<<<<<
  93273. *
  93274. * # We listen for read events on write-end of the pipe. When
  93275. */
  93276. __pyx_t_1 = ((PyObject *)__pyx_tp_new_6uvloop_4loop_WriteUnixTransport(((PyTypeObject *)__pyx_ptype_6uvloop_4loop_WriteUnixTransport), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(20, 158, __pyx_L1_error)
  93277. __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  93278. __pyx_v_handle = ((struct __pyx_obj_6uvloop_4loop_WriteUnixTransport *)__pyx_t_1);
  93279. __pyx_t_1 = 0;
  93280. /* "uvloop/handles/pipe.pyx":164
  93281. * # receive an error -- we want to silence that error, and just
  93282. * # close the transport.
  93283. * handle._close_on_read_error() # <<<<<<<<<<<<<<
  93284. *
  93285. * handle._init(loop, protocol, server, waiter)
  93286. */
  93287. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_WriteUnixTransport *)__pyx_v_handle->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._close_on_read_error(((struct __pyx_obj_6uvloop_4loop_UVStream *)__pyx_v_handle)); if (unlikely(!__pyx_t_1)) __PYX_ERR(20, 164, __pyx_L1_error)
  93288. __Pyx_GOTREF(__pyx_t_1);
  93289. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  93290. /* "uvloop/handles/pipe.pyx":166
  93291. * handle._close_on_read_error()
  93292. *
  93293. * handle._init(loop, protocol, server, waiter) # <<<<<<<<<<<<<<
  93294. * __pipe_init_uv_handle(<UVStream>handle, loop)
  93295. * return handle
  93296. */
  93297. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_WriteUnixTransport *)__pyx_v_handle->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._init(((struct __pyx_obj_6uvloop_4loop_UVStream *)__pyx_v_handle), __pyx_v_loop, __pyx_v_protocol, __pyx_v_server, __pyx_v_waiter); if (unlikely(!__pyx_t_1)) __PYX_ERR(20, 166, __pyx_L1_error)
  93298. __Pyx_GOTREF(__pyx_t_1);
  93299. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  93300. /* "uvloop/handles/pipe.pyx":167
  93301. *
  93302. * handle._init(loop, protocol, server, waiter)
  93303. * __pipe_init_uv_handle(<UVStream>handle, loop) # <<<<<<<<<<<<<<
  93304. * return handle
  93305. *
  93306. */
  93307. __pyx_t_1 = __pyx_f_6uvloop_4loop___pipe_init_uv_handle(((struct __pyx_obj_6uvloop_4loop_UVStream *)__pyx_v_handle), __pyx_v_loop); if (unlikely(!__pyx_t_1)) __PYX_ERR(20, 167, __pyx_L1_error)
  93308. __Pyx_GOTREF(__pyx_t_1);
  93309. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  93310. /* "uvloop/handles/pipe.pyx":168
  93311. * handle._init(loop, protocol, server, waiter)
  93312. * __pipe_init_uv_handle(<UVStream>handle, loop)
  93313. * return handle # <<<<<<<<<<<<<<
  93314. *
  93315. * cdef _start_reading(self):
  93316. */
  93317. __Pyx_XDECREF(((PyObject *)__pyx_r));
  93318. __Pyx_INCREF(((PyObject *)__pyx_v_handle));
  93319. __pyx_r = __pyx_v_handle;
  93320. goto __pyx_L0;
  93321. /* "uvloop/handles/pipe.pyx":155
  93322. *
  93323. * @staticmethod
  93324. * cdef WriteUnixTransport new(Loop loop, object protocol, Server server, # <<<<<<<<<<<<<<
  93325. * object waiter):
  93326. * cdef WriteUnixTransport handle
  93327. */
  93328. /* function exit code */
  93329. __pyx_L1_error:;
  93330. __Pyx_XDECREF(__pyx_t_1);
  93331. __Pyx_AddTraceback("uvloop.loop.WriteUnixTransport.new", __pyx_clineno, __pyx_lineno, __pyx_filename);
  93332. __pyx_r = 0;
  93333. __pyx_L0:;
  93334. __Pyx_XDECREF((PyObject *)__pyx_v_handle);
  93335. __Pyx_XGIVEREF((PyObject *)__pyx_r);
  93336. __Pyx_RefNannyFinishContext();
  93337. return __pyx_r;
  93338. }
  93339. /* "uvloop/handles/pipe.pyx":170
  93340. * return handle
  93341. *
  93342. * cdef _start_reading(self): # <<<<<<<<<<<<<<
  93343. * # A custom implementation for monitoring for EOF:
  93344. * # libuv since v1.23.1 prohibits using uv_read_start on
  93345. */
  93346. static PyObject *__pyx_f_6uvloop_4loop_18WriteUnixTransport__start_reading(struct __pyx_obj_6uvloop_4loop_WriteUnixTransport *__pyx_v_self) {
  93347. int __pyx_v_err;
  93348. PyObject *__pyx_r = NULL;
  93349. __Pyx_RefNannyDeclarations
  93350. int __pyx_t_1;
  93351. PyObject *__pyx_t_2 = NULL;
  93352. int __pyx_t_3;
  93353. __Pyx_RefNannySetupContext("_start_reading", 0);
  93354. /* "uvloop/handles/pipe.pyx":179
  93355. * cdef int err
  93356. *
  93357. * if not self.disconnect_listener_inited: # <<<<<<<<<<<<<<
  93358. * err = uv.uv_poll_init(self._loop.uvloop,
  93359. * &self.disconnect_listener,
  93360. */
  93361. __pyx_t_1 = ((!(__pyx_v_self->disconnect_listener_inited != 0)) != 0);
  93362. if (__pyx_t_1) {
  93363. /* "uvloop/handles/pipe.pyx":182
  93364. * err = uv.uv_poll_init(self._loop.uvloop,
  93365. * &self.disconnect_listener,
  93366. * self._fileno()) # <<<<<<<<<<<<<<
  93367. * if err < 0:
  93368. * raise convert_error(err)
  93369. */
  93370. __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_WriteUnixTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._fileno(((struct __pyx_obj_6uvloop_4loop_UVSocketHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(20, 182, __pyx_L1_error)
  93371. __Pyx_GOTREF(__pyx_t_2);
  93372. __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(20, 182, __pyx_L1_error)
  93373. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  93374. /* "uvloop/handles/pipe.pyx":180
  93375. *
  93376. * if not self.disconnect_listener_inited:
  93377. * err = uv.uv_poll_init(self._loop.uvloop, # <<<<<<<<<<<<<<
  93378. * &self.disconnect_listener,
  93379. * self._fileno())
  93380. */
  93381. __pyx_v_err = uv_poll_init(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base._loop->uvloop, (&__pyx_v_self->disconnect_listener), __pyx_t_3);
  93382. /* "uvloop/handles/pipe.pyx":183
  93383. * &self.disconnect_listener,
  93384. * self._fileno())
  93385. * if err < 0: # <<<<<<<<<<<<<<
  93386. * raise convert_error(err)
  93387. * self.disconnect_listener.data = <void*>self
  93388. */
  93389. __pyx_t_1 = ((__pyx_v_err < 0) != 0);
  93390. if (unlikely(__pyx_t_1)) {
  93391. /* "uvloop/handles/pipe.pyx":184
  93392. * self._fileno())
  93393. * if err < 0:
  93394. * raise convert_error(err) # <<<<<<<<<<<<<<
  93395. * self.disconnect_listener.data = <void*>self
  93396. * self.disconnect_listener_inited = True
  93397. */
  93398. __pyx_t_2 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(20, 184, __pyx_L1_error)
  93399. __Pyx_GOTREF(__pyx_t_2);
  93400. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  93401. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  93402. __PYX_ERR(20, 184, __pyx_L1_error)
  93403. /* "uvloop/handles/pipe.pyx":183
  93404. * &self.disconnect_listener,
  93405. * self._fileno())
  93406. * if err < 0: # <<<<<<<<<<<<<<
  93407. * raise convert_error(err)
  93408. * self.disconnect_listener.data = <void*>self
  93409. */
  93410. }
  93411. /* "uvloop/handles/pipe.pyx":185
  93412. * if err < 0:
  93413. * raise convert_error(err)
  93414. * self.disconnect_listener.data = <void*>self # <<<<<<<<<<<<<<
  93415. * self.disconnect_listener_inited = True
  93416. *
  93417. */
  93418. __pyx_v_self->disconnect_listener.data = ((void *)__pyx_v_self);
  93419. /* "uvloop/handles/pipe.pyx":186
  93420. * raise convert_error(err)
  93421. * self.disconnect_listener.data = <void*>self
  93422. * self.disconnect_listener_inited = True # <<<<<<<<<<<<<<
  93423. *
  93424. * err = uv.uv_poll_start(&self.disconnect_listener,
  93425. */
  93426. __pyx_v_self->disconnect_listener_inited = 1;
  93427. /* "uvloop/handles/pipe.pyx":179
  93428. * cdef int err
  93429. *
  93430. * if not self.disconnect_listener_inited: # <<<<<<<<<<<<<<
  93431. * err = uv.uv_poll_init(self._loop.uvloop,
  93432. * &self.disconnect_listener,
  93433. */
  93434. }
  93435. /* "uvloop/handles/pipe.pyx":188
  93436. * self.disconnect_listener_inited = True
  93437. *
  93438. * err = uv.uv_poll_start(&self.disconnect_listener, # <<<<<<<<<<<<<<
  93439. * uv.UV_READABLE | uv.UV_DISCONNECT,
  93440. * __on_write_pipe_poll_event)
  93441. */
  93442. __pyx_v_err = uv_poll_start((&__pyx_v_self->disconnect_listener), (UV_READABLE | UV_DISCONNECT), __pyx_f_6uvloop_4loop___on_write_pipe_poll_event);
  93443. /* "uvloop/handles/pipe.pyx":191
  93444. * uv.UV_READABLE | uv.UV_DISCONNECT,
  93445. * __on_write_pipe_poll_event)
  93446. * if err < 0: # <<<<<<<<<<<<<<
  93447. * raise convert_error(err)
  93448. *
  93449. */
  93450. __pyx_t_1 = ((__pyx_v_err < 0) != 0);
  93451. if (unlikely(__pyx_t_1)) {
  93452. /* "uvloop/handles/pipe.pyx":192
  93453. * __on_write_pipe_poll_event)
  93454. * if err < 0:
  93455. * raise convert_error(err) # <<<<<<<<<<<<<<
  93456. *
  93457. * cdef _stop_reading(self):
  93458. */
  93459. __pyx_t_2 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(20, 192, __pyx_L1_error)
  93460. __Pyx_GOTREF(__pyx_t_2);
  93461. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  93462. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  93463. __PYX_ERR(20, 192, __pyx_L1_error)
  93464. /* "uvloop/handles/pipe.pyx":191
  93465. * uv.UV_READABLE | uv.UV_DISCONNECT,
  93466. * __on_write_pipe_poll_event)
  93467. * if err < 0: # <<<<<<<<<<<<<<
  93468. * raise convert_error(err)
  93469. *
  93470. */
  93471. }
  93472. /* "uvloop/handles/pipe.pyx":170
  93473. * return handle
  93474. *
  93475. * cdef _start_reading(self): # <<<<<<<<<<<<<<
  93476. * # A custom implementation for monitoring for EOF:
  93477. * # libuv since v1.23.1 prohibits using uv_read_start on
  93478. */
  93479. /* function exit code */
  93480. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  93481. goto __pyx_L0;
  93482. __pyx_L1_error:;
  93483. __Pyx_XDECREF(__pyx_t_2);
  93484. __Pyx_AddTraceback("uvloop.loop.WriteUnixTransport._start_reading", __pyx_clineno, __pyx_lineno, __pyx_filename);
  93485. __pyx_r = 0;
  93486. __pyx_L0:;
  93487. __Pyx_XGIVEREF(__pyx_r);
  93488. __Pyx_RefNannyFinishContext();
  93489. return __pyx_r;
  93490. }
  93491. /* "uvloop/handles/pipe.pyx":194
  93492. * raise convert_error(err)
  93493. *
  93494. * cdef _stop_reading(self): # <<<<<<<<<<<<<<
  93495. * cdef int err
  93496. * if not self.disconnect_listener_inited:
  93497. */
  93498. static PyObject *__pyx_f_6uvloop_4loop_18WriteUnixTransport__stop_reading(struct __pyx_obj_6uvloop_4loop_WriteUnixTransport *__pyx_v_self) {
  93499. int __pyx_v_err;
  93500. PyObject *__pyx_r = NULL;
  93501. __Pyx_RefNannyDeclarations
  93502. int __pyx_t_1;
  93503. PyObject *__pyx_t_2 = NULL;
  93504. __Pyx_RefNannySetupContext("_stop_reading", 0);
  93505. /* "uvloop/handles/pipe.pyx":196
  93506. * cdef _stop_reading(self):
  93507. * cdef int err
  93508. * if not self.disconnect_listener_inited: # <<<<<<<<<<<<<<
  93509. * return
  93510. * err = uv.uv_poll_stop(&self.disconnect_listener)
  93511. */
  93512. __pyx_t_1 = ((!(__pyx_v_self->disconnect_listener_inited != 0)) != 0);
  93513. if (__pyx_t_1) {
  93514. /* "uvloop/handles/pipe.pyx":197
  93515. * cdef int err
  93516. * if not self.disconnect_listener_inited:
  93517. * return # <<<<<<<<<<<<<<
  93518. * err = uv.uv_poll_stop(&self.disconnect_listener)
  93519. * if err < 0:
  93520. */
  93521. __Pyx_XDECREF(__pyx_r);
  93522. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  93523. goto __pyx_L0;
  93524. /* "uvloop/handles/pipe.pyx":196
  93525. * cdef _stop_reading(self):
  93526. * cdef int err
  93527. * if not self.disconnect_listener_inited: # <<<<<<<<<<<<<<
  93528. * return
  93529. * err = uv.uv_poll_stop(&self.disconnect_listener)
  93530. */
  93531. }
  93532. /* "uvloop/handles/pipe.pyx":198
  93533. * if not self.disconnect_listener_inited:
  93534. * return
  93535. * err = uv.uv_poll_stop(&self.disconnect_listener) # <<<<<<<<<<<<<<
  93536. * if err < 0:
  93537. * raise convert_error(err)
  93538. */
  93539. __pyx_v_err = uv_poll_stop((&__pyx_v_self->disconnect_listener));
  93540. /* "uvloop/handles/pipe.pyx":199
  93541. * return
  93542. * err = uv.uv_poll_stop(&self.disconnect_listener)
  93543. * if err < 0: # <<<<<<<<<<<<<<
  93544. * raise convert_error(err)
  93545. *
  93546. */
  93547. __pyx_t_1 = ((__pyx_v_err < 0) != 0);
  93548. if (unlikely(__pyx_t_1)) {
  93549. /* "uvloop/handles/pipe.pyx":200
  93550. * err = uv.uv_poll_stop(&self.disconnect_listener)
  93551. * if err < 0:
  93552. * raise convert_error(err) # <<<<<<<<<<<<<<
  93553. *
  93554. * cdef _close(self):
  93555. */
  93556. __pyx_t_2 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(20, 200, __pyx_L1_error)
  93557. __Pyx_GOTREF(__pyx_t_2);
  93558. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  93559. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  93560. __PYX_ERR(20, 200, __pyx_L1_error)
  93561. /* "uvloop/handles/pipe.pyx":199
  93562. * return
  93563. * err = uv.uv_poll_stop(&self.disconnect_listener)
  93564. * if err < 0: # <<<<<<<<<<<<<<
  93565. * raise convert_error(err)
  93566. *
  93567. */
  93568. }
  93569. /* "uvloop/handles/pipe.pyx":194
  93570. * raise convert_error(err)
  93571. *
  93572. * cdef _stop_reading(self): # <<<<<<<<<<<<<<
  93573. * cdef int err
  93574. * if not self.disconnect_listener_inited:
  93575. */
  93576. /* function exit code */
  93577. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  93578. goto __pyx_L0;
  93579. __pyx_L1_error:;
  93580. __Pyx_XDECREF(__pyx_t_2);
  93581. __Pyx_AddTraceback("uvloop.loop.WriteUnixTransport._stop_reading", __pyx_clineno, __pyx_lineno, __pyx_filename);
  93582. __pyx_r = 0;
  93583. __pyx_L0:;
  93584. __Pyx_XGIVEREF(__pyx_r);
  93585. __Pyx_RefNannyFinishContext();
  93586. return __pyx_r;
  93587. }
  93588. /* "uvloop/handles/pipe.pyx":202
  93589. * raise convert_error(err)
  93590. *
  93591. * cdef _close(self): # <<<<<<<<<<<<<<
  93592. * if self.disconnect_listener_inited:
  93593. * self.disconnect_listener.data = NULL
  93594. */
  93595. static PyObject *__pyx_f_6uvloop_4loop_18WriteUnixTransport__close(struct __pyx_obj_6uvloop_4loop_WriteUnixTransport *__pyx_v_self) {
  93596. PyObject *__pyx_r = NULL;
  93597. __Pyx_RefNannyDeclarations
  93598. int __pyx_t_1;
  93599. PyObject *__pyx_t_2 = NULL;
  93600. __Pyx_RefNannySetupContext("_close", 0);
  93601. /* "uvloop/handles/pipe.pyx":203
  93602. *
  93603. * cdef _close(self):
  93604. * if self.disconnect_listener_inited: # <<<<<<<<<<<<<<
  93605. * self.disconnect_listener.data = NULL
  93606. * uv.uv_close(<uv.uv_handle_t *>(&self.disconnect_listener), NULL)
  93607. */
  93608. __pyx_t_1 = (__pyx_v_self->disconnect_listener_inited != 0);
  93609. if (__pyx_t_1) {
  93610. /* "uvloop/handles/pipe.pyx":204
  93611. * cdef _close(self):
  93612. * if self.disconnect_listener_inited:
  93613. * self.disconnect_listener.data = NULL # <<<<<<<<<<<<<<
  93614. * uv.uv_close(<uv.uv_handle_t *>(&self.disconnect_listener), NULL)
  93615. * self.disconnect_listener_inited = False
  93616. */
  93617. __pyx_v_self->disconnect_listener.data = NULL;
  93618. /* "uvloop/handles/pipe.pyx":205
  93619. * if self.disconnect_listener_inited:
  93620. * self.disconnect_listener.data = NULL
  93621. * uv.uv_close(<uv.uv_handle_t *>(&self.disconnect_listener), NULL) # <<<<<<<<<<<<<<
  93622. * self.disconnect_listener_inited = False
  93623. *
  93624. */
  93625. uv_close(((uv_handle_t *)(&__pyx_v_self->disconnect_listener)), NULL);
  93626. /* "uvloop/handles/pipe.pyx":206
  93627. * self.disconnect_listener.data = NULL
  93628. * uv.uv_close(<uv.uv_handle_t *>(&self.disconnect_listener), NULL)
  93629. * self.disconnect_listener_inited = False # <<<<<<<<<<<<<<
  93630. *
  93631. * UVStream._close(self)
  93632. */
  93633. __pyx_v_self->disconnect_listener_inited = 0;
  93634. /* "uvloop/handles/pipe.pyx":203
  93635. *
  93636. * cdef _close(self):
  93637. * if self.disconnect_listener_inited: # <<<<<<<<<<<<<<
  93638. * self.disconnect_listener.data = NULL
  93639. * uv.uv_close(<uv.uv_handle_t *>(&self.disconnect_listener), NULL)
  93640. */
  93641. }
  93642. /* "uvloop/handles/pipe.pyx":208
  93643. * self.disconnect_listener_inited = False
  93644. *
  93645. * UVStream._close(self) # <<<<<<<<<<<<<<
  93646. *
  93647. * cdef _new_socket(self):
  93648. */
  93649. __pyx_t_2 = __pyx_f_6uvloop_4loop_8UVStream__close(((struct __pyx_obj_6uvloop_4loop_UVStream *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(20, 208, __pyx_L1_error)
  93650. __Pyx_GOTREF(__pyx_t_2);
  93651. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  93652. /* "uvloop/handles/pipe.pyx":202
  93653. * raise convert_error(err)
  93654. *
  93655. * cdef _close(self): # <<<<<<<<<<<<<<
  93656. * if self.disconnect_listener_inited:
  93657. * self.disconnect_listener.data = NULL
  93658. */
  93659. /* function exit code */
  93660. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  93661. goto __pyx_L0;
  93662. __pyx_L1_error:;
  93663. __Pyx_XDECREF(__pyx_t_2);
  93664. __Pyx_AddTraceback("uvloop.loop.WriteUnixTransport._close", __pyx_clineno, __pyx_lineno, __pyx_filename);
  93665. __pyx_r = 0;
  93666. __pyx_L0:;
  93667. __Pyx_XGIVEREF(__pyx_r);
  93668. __Pyx_RefNannyFinishContext();
  93669. return __pyx_r;
  93670. }
  93671. /* "uvloop/handles/pipe.pyx":210
  93672. * UVStream._close(self)
  93673. *
  93674. * cdef _new_socket(self): # <<<<<<<<<<<<<<
  93675. * return __pipe_get_socket(<UVSocketHandle>self)
  93676. *
  93677. */
  93678. static PyObject *__pyx_f_6uvloop_4loop_18WriteUnixTransport__new_socket(struct __pyx_obj_6uvloop_4loop_WriteUnixTransport *__pyx_v_self) {
  93679. PyObject *__pyx_r = NULL;
  93680. __Pyx_RefNannyDeclarations
  93681. PyObject *__pyx_t_1 = NULL;
  93682. __Pyx_RefNannySetupContext("_new_socket", 0);
  93683. /* "uvloop/handles/pipe.pyx":211
  93684. *
  93685. * cdef _new_socket(self):
  93686. * return __pipe_get_socket(<UVSocketHandle>self) # <<<<<<<<<<<<<<
  93687. *
  93688. * cdef _open(self, int sockfd):
  93689. */
  93690. __Pyx_XDECREF(__pyx_r);
  93691. __pyx_t_1 = __pyx_f_6uvloop_4loop___pipe_get_socket(((struct __pyx_obj_6uvloop_4loop_UVSocketHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(20, 211, __pyx_L1_error)
  93692. __Pyx_GOTREF(__pyx_t_1);
  93693. __pyx_r = __pyx_t_1;
  93694. __pyx_t_1 = 0;
  93695. goto __pyx_L0;
  93696. /* "uvloop/handles/pipe.pyx":210
  93697. * UVStream._close(self)
  93698. *
  93699. * cdef _new_socket(self): # <<<<<<<<<<<<<<
  93700. * return __pipe_get_socket(<UVSocketHandle>self)
  93701. *
  93702. */
  93703. /* function exit code */
  93704. __pyx_L1_error:;
  93705. __Pyx_XDECREF(__pyx_t_1);
  93706. __Pyx_AddTraceback("uvloop.loop.WriteUnixTransport._new_socket", __pyx_clineno, __pyx_lineno, __pyx_filename);
  93707. __pyx_r = 0;
  93708. __pyx_L0:;
  93709. __Pyx_XGIVEREF(__pyx_r);
  93710. __Pyx_RefNannyFinishContext();
  93711. return __pyx_r;
  93712. }
  93713. /* "uvloop/handles/pipe.pyx":213
  93714. * return __pipe_get_socket(<UVSocketHandle>self)
  93715. *
  93716. * cdef _open(self, int sockfd): # <<<<<<<<<<<<<<
  93717. * __pipe_open(<UVStream>self, sockfd)
  93718. *
  93719. */
  93720. static PyObject *__pyx_f_6uvloop_4loop_18WriteUnixTransport__open(struct __pyx_obj_6uvloop_4loop_WriteUnixTransport *__pyx_v_self, int __pyx_v_sockfd) {
  93721. PyObject *__pyx_r = NULL;
  93722. __Pyx_RefNannyDeclarations
  93723. PyObject *__pyx_t_1 = NULL;
  93724. __Pyx_RefNannySetupContext("_open", 0);
  93725. /* "uvloop/handles/pipe.pyx":214
  93726. *
  93727. * cdef _open(self, int sockfd):
  93728. * __pipe_open(<UVStream>self, sockfd) # <<<<<<<<<<<<<<
  93729. *
  93730. * def pause_reading(self):
  93731. */
  93732. __pyx_t_1 = __pyx_f_6uvloop_4loop___pipe_open(((struct __pyx_obj_6uvloop_4loop_UVStream *)__pyx_v_self), __pyx_v_sockfd); if (unlikely(!__pyx_t_1)) __PYX_ERR(20, 214, __pyx_L1_error)
  93733. __Pyx_GOTREF(__pyx_t_1);
  93734. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  93735. /* "uvloop/handles/pipe.pyx":213
  93736. * return __pipe_get_socket(<UVSocketHandle>self)
  93737. *
  93738. * cdef _open(self, int sockfd): # <<<<<<<<<<<<<<
  93739. * __pipe_open(<UVStream>self, sockfd)
  93740. *
  93741. */
  93742. /* function exit code */
  93743. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  93744. goto __pyx_L0;
  93745. __pyx_L1_error:;
  93746. __Pyx_XDECREF(__pyx_t_1);
  93747. __Pyx_AddTraceback("uvloop.loop.WriteUnixTransport._open", __pyx_clineno, __pyx_lineno, __pyx_filename);
  93748. __pyx_r = 0;
  93749. __pyx_L0:;
  93750. __Pyx_XGIVEREF(__pyx_r);
  93751. __Pyx_RefNannyFinishContext();
  93752. return __pyx_r;
  93753. }
  93754. /* "uvloop/handles/pipe.pyx":216
  93755. * __pipe_open(<UVStream>self, sockfd)
  93756. *
  93757. * def pause_reading(self): # <<<<<<<<<<<<<<
  93758. * raise NotImplementedError
  93759. *
  93760. */
  93761. /* Python wrapper */
  93762. static PyObject *__pyx_pw_6uvloop_4loop_18WriteUnixTransport_3pause_reading(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  93763. static char __pyx_doc_6uvloop_4loop_18WriteUnixTransport_2pause_reading[] = "WriteUnixTransport.pause_reading(self)";
  93764. static PyObject *__pyx_pw_6uvloop_4loop_18WriteUnixTransport_3pause_reading(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  93765. PyObject *__pyx_r = 0;
  93766. __Pyx_RefNannyDeclarations
  93767. __Pyx_RefNannySetupContext("pause_reading (wrapper)", 0);
  93768. __pyx_r = __pyx_pf_6uvloop_4loop_18WriteUnixTransport_2pause_reading(((struct __pyx_obj_6uvloop_4loop_WriteUnixTransport *)__pyx_v_self));
  93769. /* function exit code */
  93770. __Pyx_RefNannyFinishContext();
  93771. return __pyx_r;
  93772. }
  93773. static PyObject *__pyx_pf_6uvloop_4loop_18WriteUnixTransport_2pause_reading(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_WriteUnixTransport *__pyx_v_self) {
  93774. PyObject *__pyx_r = NULL;
  93775. __Pyx_RefNannyDeclarations
  93776. __Pyx_RefNannySetupContext("pause_reading", 0);
  93777. /* "uvloop/handles/pipe.pyx":217
  93778. *
  93779. * def pause_reading(self):
  93780. * raise NotImplementedError # <<<<<<<<<<<<<<
  93781. *
  93782. * def resume_reading(self):
  93783. */
  93784. __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0);
  93785. __PYX_ERR(20, 217, __pyx_L1_error)
  93786. /* "uvloop/handles/pipe.pyx":216
  93787. * __pipe_open(<UVStream>self, sockfd)
  93788. *
  93789. * def pause_reading(self): # <<<<<<<<<<<<<<
  93790. * raise NotImplementedError
  93791. *
  93792. */
  93793. /* function exit code */
  93794. __pyx_L1_error:;
  93795. __Pyx_AddTraceback("uvloop.loop.WriteUnixTransport.pause_reading", __pyx_clineno, __pyx_lineno, __pyx_filename);
  93796. __pyx_r = NULL;
  93797. __Pyx_XGIVEREF(__pyx_r);
  93798. __Pyx_RefNannyFinishContext();
  93799. return __pyx_r;
  93800. }
  93801. /* "uvloop/handles/pipe.pyx":219
  93802. * raise NotImplementedError
  93803. *
  93804. * def resume_reading(self): # <<<<<<<<<<<<<<
  93805. * raise NotImplementedError
  93806. *
  93807. */
  93808. /* Python wrapper */
  93809. static PyObject *__pyx_pw_6uvloop_4loop_18WriteUnixTransport_5resume_reading(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  93810. static char __pyx_doc_6uvloop_4loop_18WriteUnixTransport_4resume_reading[] = "WriteUnixTransport.resume_reading(self)";
  93811. static PyObject *__pyx_pw_6uvloop_4loop_18WriteUnixTransport_5resume_reading(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  93812. PyObject *__pyx_r = 0;
  93813. __Pyx_RefNannyDeclarations
  93814. __Pyx_RefNannySetupContext("resume_reading (wrapper)", 0);
  93815. __pyx_r = __pyx_pf_6uvloop_4loop_18WriteUnixTransport_4resume_reading(((struct __pyx_obj_6uvloop_4loop_WriteUnixTransport *)__pyx_v_self));
  93816. /* function exit code */
  93817. __Pyx_RefNannyFinishContext();
  93818. return __pyx_r;
  93819. }
  93820. static PyObject *__pyx_pf_6uvloop_4loop_18WriteUnixTransport_4resume_reading(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_WriteUnixTransport *__pyx_v_self) {
  93821. PyObject *__pyx_r = NULL;
  93822. __Pyx_RefNannyDeclarations
  93823. __Pyx_RefNannySetupContext("resume_reading", 0);
  93824. /* "uvloop/handles/pipe.pyx":220
  93825. *
  93826. * def resume_reading(self):
  93827. * raise NotImplementedError # <<<<<<<<<<<<<<
  93828. *
  93829. *
  93830. */
  93831. __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0);
  93832. __PYX_ERR(20, 220, __pyx_L1_error)
  93833. /* "uvloop/handles/pipe.pyx":219
  93834. * raise NotImplementedError
  93835. *
  93836. * def resume_reading(self): # <<<<<<<<<<<<<<
  93837. * raise NotImplementedError
  93838. *
  93839. */
  93840. /* function exit code */
  93841. __pyx_L1_error:;
  93842. __Pyx_AddTraceback("uvloop.loop.WriteUnixTransport.resume_reading", __pyx_clineno, __pyx_lineno, __pyx_filename);
  93843. __pyx_r = NULL;
  93844. __Pyx_XGIVEREF(__pyx_r);
  93845. __Pyx_RefNannyFinishContext();
  93846. return __pyx_r;
  93847. }
  93848. /* "(tree fragment)":1
  93849. * def __reduce_cython__(self): # <<<<<<<<<<<<<<
  93850. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  93851. * def __setstate_cython__(self, __pyx_state):
  93852. */
  93853. /* Python wrapper */
  93854. static PyObject *__pyx_pw_6uvloop_4loop_18WriteUnixTransport_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  93855. static char __pyx_doc_6uvloop_4loop_18WriteUnixTransport_6__reduce_cython__[] = "WriteUnixTransport.__reduce_cython__(self)";
  93856. static PyObject *__pyx_pw_6uvloop_4loop_18WriteUnixTransport_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  93857. PyObject *__pyx_r = 0;
  93858. __Pyx_RefNannyDeclarations
  93859. __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  93860. __pyx_r = __pyx_pf_6uvloop_4loop_18WriteUnixTransport_6__reduce_cython__(((struct __pyx_obj_6uvloop_4loop_WriteUnixTransport *)__pyx_v_self));
  93861. /* function exit code */
  93862. __Pyx_RefNannyFinishContext();
  93863. return __pyx_r;
  93864. }
  93865. static PyObject *__pyx_pf_6uvloop_4loop_18WriteUnixTransport_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_WriteUnixTransport *__pyx_v_self) {
  93866. PyObject *__pyx_r = NULL;
  93867. __Pyx_RefNannyDeclarations
  93868. PyObject *__pyx_t_1 = NULL;
  93869. __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  93870. /* "(tree fragment)":2
  93871. * def __reduce_cython__(self):
  93872. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  93873. * def __setstate_cython__(self, __pyx_state):
  93874. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  93875. */
  93876. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__158, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 2, __pyx_L1_error)
  93877. __Pyx_GOTREF(__pyx_t_1);
  93878. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  93879. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  93880. __PYX_ERR(9, 2, __pyx_L1_error)
  93881. /* "(tree fragment)":1
  93882. * def __reduce_cython__(self): # <<<<<<<<<<<<<<
  93883. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  93884. * def __setstate_cython__(self, __pyx_state):
  93885. */
  93886. /* function exit code */
  93887. __pyx_L1_error:;
  93888. __Pyx_XDECREF(__pyx_t_1);
  93889. __Pyx_AddTraceback("uvloop.loop.WriteUnixTransport.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  93890. __pyx_r = NULL;
  93891. __Pyx_XGIVEREF(__pyx_r);
  93892. __Pyx_RefNannyFinishContext();
  93893. return __pyx_r;
  93894. }
  93895. /* "(tree fragment)":3
  93896. * def __reduce_cython__(self):
  93897. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  93898. * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
  93899. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  93900. */
  93901. /* Python wrapper */
  93902. static PyObject *__pyx_pw_6uvloop_4loop_18WriteUnixTransport_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
  93903. static char __pyx_doc_6uvloop_4loop_18WriteUnixTransport_8__setstate_cython__[] = "WriteUnixTransport.__setstate_cython__(self, __pyx_state)";
  93904. static PyObject *__pyx_pw_6uvloop_4loop_18WriteUnixTransport_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  93905. PyObject *__pyx_r = 0;
  93906. __Pyx_RefNannyDeclarations
  93907. __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  93908. __pyx_r = __pyx_pf_6uvloop_4loop_18WriteUnixTransport_8__setstate_cython__(((struct __pyx_obj_6uvloop_4loop_WriteUnixTransport *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
  93909. /* function exit code */
  93910. __Pyx_RefNannyFinishContext();
  93911. return __pyx_r;
  93912. }
  93913. static PyObject *__pyx_pf_6uvloop_4loop_18WriteUnixTransport_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_WriteUnixTransport *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  93914. PyObject *__pyx_r = NULL;
  93915. __Pyx_RefNannyDeclarations
  93916. PyObject *__pyx_t_1 = NULL;
  93917. __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  93918. /* "(tree fragment)":4
  93919. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  93920. * def __setstate_cython__(self, __pyx_state):
  93921. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  93922. */
  93923. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__159, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 4, __pyx_L1_error)
  93924. __Pyx_GOTREF(__pyx_t_1);
  93925. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  93926. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  93927. __PYX_ERR(9, 4, __pyx_L1_error)
  93928. /* "(tree fragment)":3
  93929. * def __reduce_cython__(self):
  93930. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  93931. * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
  93932. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  93933. */
  93934. /* function exit code */
  93935. __pyx_L1_error:;
  93936. __Pyx_XDECREF(__pyx_t_1);
  93937. __Pyx_AddTraceback("uvloop.loop.WriteUnixTransport.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  93938. __pyx_r = NULL;
  93939. __Pyx_XGIVEREF(__pyx_r);
  93940. __Pyx_RefNannyFinishContext();
  93941. return __pyx_r;
  93942. }
  93943. /* "uvloop/handles/pipe.pyx":223
  93944. *
  93945. *
  93946. * cdef void __on_write_pipe_poll_event(uv.uv_poll_t* handle, # <<<<<<<<<<<<<<
  93947. * int status, int events) with gil:
  93948. * cdef WriteUnixTransport tr
  93949. */
  93950. static void __pyx_f_6uvloop_4loop___on_write_pipe_poll_event(uv_poll_t *__pyx_v_handle, CYTHON_UNUSED int __pyx_v_status, int __pyx_v_events) {
  93951. struct __pyx_obj_6uvloop_4loop_WriteUnixTransport *__pyx_v_tr = 0;
  93952. PyObject *__pyx_v_ex = NULL;
  93953. __Pyx_RefNannyDeclarations
  93954. int __pyx_t_1;
  93955. PyObject *__pyx_t_2 = NULL;
  93956. PyObject *__pyx_t_3 = NULL;
  93957. PyObject *__pyx_t_4 = NULL;
  93958. PyObject *__pyx_t_5 = NULL;
  93959. int __pyx_t_6;
  93960. PyObject *__pyx_t_7 = NULL;
  93961. PyObject *__pyx_t_8 = NULL;
  93962. PyObject *__pyx_t_9 = NULL;
  93963. int __pyx_t_10;
  93964. char const *__pyx_t_11;
  93965. PyObject *__pyx_t_12 = NULL;
  93966. PyObject *__pyx_t_13 = NULL;
  93967. PyObject *__pyx_t_14 = NULL;
  93968. PyObject *__pyx_t_15 = NULL;
  93969. PyObject *__pyx_t_16 = NULL;
  93970. PyObject *__pyx_t_17 = NULL;
  93971. #ifdef WITH_THREAD
  93972. PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  93973. #endif
  93974. __Pyx_RefNannySetupContext("__on_write_pipe_poll_event", 0);
  93975. /* "uvloop/handles/pipe.pyx":227
  93976. * cdef WriteUnixTransport tr
  93977. *
  93978. * if handle.data is NULL: # <<<<<<<<<<<<<<
  93979. * return
  93980. *
  93981. */
  93982. __pyx_t_1 = ((__pyx_v_handle->data == NULL) != 0);
  93983. if (__pyx_t_1) {
  93984. /* "uvloop/handles/pipe.pyx":228
  93985. *
  93986. * if handle.data is NULL:
  93987. * return # <<<<<<<<<<<<<<
  93988. *
  93989. * tr = <WriteUnixTransport>handle.data
  93990. */
  93991. goto __pyx_L0;
  93992. /* "uvloop/handles/pipe.pyx":227
  93993. * cdef WriteUnixTransport tr
  93994. *
  93995. * if handle.data is NULL: # <<<<<<<<<<<<<<
  93996. * return
  93997. *
  93998. */
  93999. }
  94000. /* "uvloop/handles/pipe.pyx":230
  94001. * return
  94002. *
  94003. * tr = <WriteUnixTransport>handle.data # <<<<<<<<<<<<<<
  94004. * if tr._closed:
  94005. * return
  94006. */
  94007. __pyx_t_2 = ((PyObject *)__pyx_v_handle->data);
  94008. __Pyx_INCREF(__pyx_t_2);
  94009. __pyx_v_tr = ((struct __pyx_obj_6uvloop_4loop_WriteUnixTransport *)__pyx_t_2);
  94010. __pyx_t_2 = 0;
  94011. /* "uvloop/handles/pipe.pyx":231
  94012. *
  94013. * tr = <WriteUnixTransport>handle.data
  94014. * if tr._closed: # <<<<<<<<<<<<<<
  94015. * return
  94016. *
  94017. */
  94018. __pyx_t_1 = (__pyx_v_tr->__pyx_base.__pyx_base.__pyx_base.__pyx_base._closed != 0);
  94019. if (__pyx_t_1) {
  94020. /* "uvloop/handles/pipe.pyx":232
  94021. * tr = <WriteUnixTransport>handle.data
  94022. * if tr._closed:
  94023. * return # <<<<<<<<<<<<<<
  94024. *
  94025. * if events & uv.UV_DISCONNECT:
  94026. */
  94027. goto __pyx_L0;
  94028. /* "uvloop/handles/pipe.pyx":231
  94029. *
  94030. * tr = <WriteUnixTransport>handle.data
  94031. * if tr._closed: # <<<<<<<<<<<<<<
  94032. * return
  94033. *
  94034. */
  94035. }
  94036. /* "uvloop/handles/pipe.pyx":234
  94037. * return
  94038. *
  94039. * if events & uv.UV_DISCONNECT: # <<<<<<<<<<<<<<
  94040. * try:
  94041. * tr._stop_reading()
  94042. */
  94043. __pyx_t_1 = ((__pyx_v_events & UV_DISCONNECT) != 0);
  94044. if (__pyx_t_1) {
  94045. /* "uvloop/handles/pipe.pyx":235
  94046. *
  94047. * if events & uv.UV_DISCONNECT:
  94048. * try: # <<<<<<<<<<<<<<
  94049. * tr._stop_reading()
  94050. * tr._on_eof()
  94051. */
  94052. {
  94053. __Pyx_PyThreadState_declare
  94054. __Pyx_PyThreadState_assign
  94055. __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
  94056. __Pyx_XGOTREF(__pyx_t_3);
  94057. __Pyx_XGOTREF(__pyx_t_4);
  94058. __Pyx_XGOTREF(__pyx_t_5);
  94059. /*try:*/ {
  94060. /* "uvloop/handles/pipe.pyx":236
  94061. * if events & uv.UV_DISCONNECT:
  94062. * try:
  94063. * tr._stop_reading() # <<<<<<<<<<<<<<
  94064. * tr._on_eof()
  94065. * except BaseException as ex:
  94066. */
  94067. __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_WriteUnixTransport *)__pyx_v_tr->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._stop_reading(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_v_tr)); if (unlikely(!__pyx_t_2)) __PYX_ERR(20, 236, __pyx_L6_error)
  94068. __Pyx_GOTREF(__pyx_t_2);
  94069. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  94070. /* "uvloop/handles/pipe.pyx":237
  94071. * try:
  94072. * tr._stop_reading()
  94073. * tr._on_eof() # <<<<<<<<<<<<<<
  94074. * except BaseException as ex:
  94075. * tr._fatal_error(ex, False)
  94076. */
  94077. __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_WriteUnixTransport *)__pyx_v_tr->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._on_eof(((struct __pyx_obj_6uvloop_4loop_UVStream *)__pyx_v_tr)); if (unlikely(!__pyx_t_2)) __PYX_ERR(20, 237, __pyx_L6_error)
  94078. __Pyx_GOTREF(__pyx_t_2);
  94079. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  94080. /* "uvloop/handles/pipe.pyx":235
  94081. *
  94082. * if events & uv.UV_DISCONNECT:
  94083. * try: # <<<<<<<<<<<<<<
  94084. * tr._stop_reading()
  94085. * tr._on_eof()
  94086. */
  94087. }
  94088. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  94089. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  94090. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  94091. goto __pyx_L11_try_end;
  94092. __pyx_L6_error:;
  94093. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  94094. /* "uvloop/handles/pipe.pyx":238
  94095. * tr._stop_reading()
  94096. * tr._on_eof()
  94097. * except BaseException as ex: # <<<<<<<<<<<<<<
  94098. * tr._fatal_error(ex, False)
  94099. *
  94100. */
  94101. __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_BaseException);
  94102. if (__pyx_t_6) {
  94103. __Pyx_AddTraceback("uvloop.loop.__on_write_pipe_poll_event", __pyx_clineno, __pyx_lineno, __pyx_filename);
  94104. if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_7, &__pyx_t_8) < 0) __PYX_ERR(20, 238, __pyx_L8_except_error)
  94105. __Pyx_GOTREF(__pyx_t_2);
  94106. __Pyx_GOTREF(__pyx_t_7);
  94107. __Pyx_GOTREF(__pyx_t_8);
  94108. __Pyx_INCREF(__pyx_t_7);
  94109. __pyx_v_ex = __pyx_t_7;
  94110. /*try:*/ {
  94111. /* "uvloop/handles/pipe.pyx":239
  94112. * tr._on_eof()
  94113. * except BaseException as ex:
  94114. * tr._fatal_error(ex, False) # <<<<<<<<<<<<<<
  94115. *
  94116. *
  94117. */
  94118. __pyx_t_9 = ((struct __pyx_vtabstruct_6uvloop_4loop_WriteUnixTransport *)__pyx_v_tr->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base.__pyx_base._fatal_error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_tr), __pyx_v_ex, Py_False, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(20, 239, __pyx_L17_error)
  94119. __Pyx_GOTREF(__pyx_t_9);
  94120. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  94121. }
  94122. /* "uvloop/handles/pipe.pyx":238
  94123. * tr._stop_reading()
  94124. * tr._on_eof()
  94125. * except BaseException as ex: # <<<<<<<<<<<<<<
  94126. * tr._fatal_error(ex, False)
  94127. *
  94128. */
  94129. /*finally:*/ {
  94130. /*normal exit:*/{
  94131. __Pyx_DECREF(__pyx_v_ex);
  94132. __pyx_v_ex = NULL;
  94133. goto __pyx_L18;
  94134. }
  94135. __pyx_L17_error:;
  94136. /*exception exit:*/{
  94137. __Pyx_PyThreadState_declare
  94138. __Pyx_PyThreadState_assign
  94139. __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0;
  94140. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  94141. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17);
  94142. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14) < 0)) __Pyx_ErrFetch(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
  94143. __Pyx_XGOTREF(__pyx_t_12);
  94144. __Pyx_XGOTREF(__pyx_t_13);
  94145. __Pyx_XGOTREF(__pyx_t_14);
  94146. __Pyx_XGOTREF(__pyx_t_15);
  94147. __Pyx_XGOTREF(__pyx_t_16);
  94148. __Pyx_XGOTREF(__pyx_t_17);
  94149. __pyx_t_6 = __pyx_lineno; __pyx_t_10 = __pyx_clineno; __pyx_t_11 = __pyx_filename;
  94150. {
  94151. __Pyx_DECREF(__pyx_v_ex);
  94152. __pyx_v_ex = NULL;
  94153. }
  94154. if (PY_MAJOR_VERSION >= 3) {
  94155. __Pyx_XGIVEREF(__pyx_t_15);
  94156. __Pyx_XGIVEREF(__pyx_t_16);
  94157. __Pyx_XGIVEREF(__pyx_t_17);
  94158. __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17);
  94159. }
  94160. __Pyx_XGIVEREF(__pyx_t_12);
  94161. __Pyx_XGIVEREF(__pyx_t_13);
  94162. __Pyx_XGIVEREF(__pyx_t_14);
  94163. __Pyx_ErrRestore(__pyx_t_12, __pyx_t_13, __pyx_t_14);
  94164. __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0;
  94165. __pyx_lineno = __pyx_t_6; __pyx_clineno = __pyx_t_10; __pyx_filename = __pyx_t_11;
  94166. goto __pyx_L8_except_error;
  94167. }
  94168. __pyx_L18:;
  94169. }
  94170. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  94171. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  94172. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  94173. goto __pyx_L7_exception_handled;
  94174. }
  94175. goto __pyx_L8_except_error;
  94176. __pyx_L8_except_error:;
  94177. /* "uvloop/handles/pipe.pyx":235
  94178. *
  94179. * if events & uv.UV_DISCONNECT:
  94180. * try: # <<<<<<<<<<<<<<
  94181. * tr._stop_reading()
  94182. * tr._on_eof()
  94183. */
  94184. __Pyx_XGIVEREF(__pyx_t_3);
  94185. __Pyx_XGIVEREF(__pyx_t_4);
  94186. __Pyx_XGIVEREF(__pyx_t_5);
  94187. __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
  94188. goto __pyx_L1_error;
  94189. __pyx_L7_exception_handled:;
  94190. __Pyx_XGIVEREF(__pyx_t_3);
  94191. __Pyx_XGIVEREF(__pyx_t_4);
  94192. __Pyx_XGIVEREF(__pyx_t_5);
  94193. __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
  94194. __pyx_L11_try_end:;
  94195. }
  94196. /* "uvloop/handles/pipe.pyx":234
  94197. * return
  94198. *
  94199. * if events & uv.UV_DISCONNECT: # <<<<<<<<<<<<<<
  94200. * try:
  94201. * tr._stop_reading()
  94202. */
  94203. }
  94204. /* "uvloop/handles/pipe.pyx":223
  94205. *
  94206. *
  94207. * cdef void __on_write_pipe_poll_event(uv.uv_poll_t* handle, # <<<<<<<<<<<<<<
  94208. * int status, int events) with gil:
  94209. * cdef WriteUnixTransport tr
  94210. */
  94211. /* function exit code */
  94212. goto __pyx_L0;
  94213. __pyx_L1_error:;
  94214. __Pyx_XDECREF(__pyx_t_2);
  94215. __Pyx_XDECREF(__pyx_t_7);
  94216. __Pyx_XDECREF(__pyx_t_8);
  94217. __Pyx_XDECREF(__pyx_t_9);
  94218. __Pyx_WriteUnraisable("uvloop.loop.__on_write_pipe_poll_event", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  94219. __pyx_L0:;
  94220. __Pyx_XDECREF((PyObject *)__pyx_v_tr);
  94221. __Pyx_XDECREF(__pyx_v_ex);
  94222. __Pyx_RefNannyFinishContext();
  94223. #ifdef WITH_THREAD
  94224. __Pyx_PyGILState_Release(__pyx_gilstate_save);
  94225. #endif
  94226. }
  94227. /* "uvloop/handles/pipe.pyx":247
  94228. * uv.uv_connect_t _req_data
  94229. *
  94230. * def __cinit__(self, loop, transport): # <<<<<<<<<<<<<<
  94231. * self.request = <uv.uv_req_t*> &self._req_data
  94232. * self.request.data = <void*>self
  94233. */
  94234. /* Python wrapper */
  94235. static int __pyx_pw_6uvloop_4loop_19_PipeConnectRequest_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  94236. static int __pyx_pw_6uvloop_4loop_19_PipeConnectRequest_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  94237. CYTHON_UNUSED PyObject *__pyx_v_loop = 0;
  94238. PyObject *__pyx_v_transport = 0;
  94239. int __pyx_r;
  94240. __Pyx_RefNannyDeclarations
  94241. __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  94242. {
  94243. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_loop,&__pyx_n_s_transport,0};
  94244. PyObject* values[2] = {0,0};
  94245. if (unlikely(__pyx_kwds)) {
  94246. Py_ssize_t kw_args;
  94247. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  94248. switch (pos_args) {
  94249. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  94250. CYTHON_FALLTHROUGH;
  94251. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  94252. CYTHON_FALLTHROUGH;
  94253. case 0: break;
  94254. default: goto __pyx_L5_argtuple_error;
  94255. }
  94256. kw_args = PyDict_Size(__pyx_kwds);
  94257. switch (pos_args) {
  94258. case 0:
  94259. if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_loop)) != 0)) kw_args--;
  94260. else goto __pyx_L5_argtuple_error;
  94261. CYTHON_FALLTHROUGH;
  94262. case 1:
  94263. if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_transport)) != 0)) kw_args--;
  94264. else {
  94265. __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, 1); __PYX_ERR(20, 247, __pyx_L3_error)
  94266. }
  94267. }
  94268. if (unlikely(kw_args > 0)) {
  94269. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(20, 247, __pyx_L3_error)
  94270. }
  94271. } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
  94272. goto __pyx_L5_argtuple_error;
  94273. } else {
  94274. values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  94275. values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  94276. }
  94277. __pyx_v_loop = values[0];
  94278. __pyx_v_transport = values[1];
  94279. }
  94280. goto __pyx_L4_argument_unpacking_done;
  94281. __pyx_L5_argtuple_error:;
  94282. __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(20, 247, __pyx_L3_error)
  94283. __pyx_L3_error:;
  94284. __Pyx_AddTraceback("uvloop.loop._PipeConnectRequest.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  94285. __Pyx_RefNannyFinishContext();
  94286. return -1;
  94287. __pyx_L4_argument_unpacking_done:;
  94288. __pyx_r = __pyx_pf_6uvloop_4loop_19_PipeConnectRequest___cinit__(((struct __pyx_obj_6uvloop_4loop__PipeConnectRequest *)__pyx_v_self), __pyx_v_loop, __pyx_v_transport);
  94289. /* function exit code */
  94290. __Pyx_RefNannyFinishContext();
  94291. return __pyx_r;
  94292. }
  94293. static int __pyx_pf_6uvloop_4loop_19_PipeConnectRequest___cinit__(struct __pyx_obj_6uvloop_4loop__PipeConnectRequest *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_loop, PyObject *__pyx_v_transport) {
  94294. int __pyx_r;
  94295. __Pyx_RefNannyDeclarations
  94296. PyObject *__pyx_t_1 = NULL;
  94297. __Pyx_RefNannySetupContext("__cinit__", 0);
  94298. /* "uvloop/handles/pipe.pyx":248
  94299. *
  94300. * def __cinit__(self, loop, transport):
  94301. * self.request = <uv.uv_req_t*> &self._req_data # <<<<<<<<<<<<<<
  94302. * self.request.data = <void*>self
  94303. * self.transport = transport
  94304. */
  94305. __pyx_v_self->__pyx_base.request = ((uv_req_t *)(&__pyx_v_self->_req_data));
  94306. /* "uvloop/handles/pipe.pyx":249
  94307. * def __cinit__(self, loop, transport):
  94308. * self.request = <uv.uv_req_t*> &self._req_data
  94309. * self.request.data = <void*>self # <<<<<<<<<<<<<<
  94310. * self.transport = transport
  94311. *
  94312. */
  94313. __pyx_v_self->__pyx_base.request->data = ((void *)__pyx_v_self);
  94314. /* "uvloop/handles/pipe.pyx":250
  94315. * self.request = <uv.uv_req_t*> &self._req_data
  94316. * self.request.data = <void*>self
  94317. * self.transport = transport # <<<<<<<<<<<<<<
  94318. *
  94319. * cdef connect(self, char* addr):
  94320. */
  94321. if (!(likely(((__pyx_v_transport) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_transport, __pyx_ptype_6uvloop_4loop_UnixTransport))))) __PYX_ERR(20, 250, __pyx_L1_error)
  94322. __pyx_t_1 = __pyx_v_transport;
  94323. __Pyx_INCREF(__pyx_t_1);
  94324. __Pyx_GIVEREF(__pyx_t_1);
  94325. __Pyx_GOTREF(__pyx_v_self->transport);
  94326. __Pyx_DECREF(((PyObject *)__pyx_v_self->transport));
  94327. __pyx_v_self->transport = ((struct __pyx_obj_6uvloop_4loop_UnixTransport *)__pyx_t_1);
  94328. __pyx_t_1 = 0;
  94329. /* "uvloop/handles/pipe.pyx":247
  94330. * uv.uv_connect_t _req_data
  94331. *
  94332. * def __cinit__(self, loop, transport): # <<<<<<<<<<<<<<
  94333. * self.request = <uv.uv_req_t*> &self._req_data
  94334. * self.request.data = <void*>self
  94335. */
  94336. /* function exit code */
  94337. __pyx_r = 0;
  94338. goto __pyx_L0;
  94339. __pyx_L1_error:;
  94340. __Pyx_XDECREF(__pyx_t_1);
  94341. __Pyx_AddTraceback("uvloop.loop._PipeConnectRequest.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  94342. __pyx_r = -1;
  94343. __pyx_L0:;
  94344. __Pyx_RefNannyFinishContext();
  94345. return __pyx_r;
  94346. }
  94347. /* "uvloop/handles/pipe.pyx":252
  94348. * self.transport = transport
  94349. *
  94350. * cdef connect(self, char* addr): # <<<<<<<<<<<<<<
  94351. * # uv_pipe_connect returns void
  94352. * uv.uv_pipe_connect(<uv.uv_connect_t*>self.request,
  94353. */
  94354. static PyObject *__pyx_f_6uvloop_4loop_19_PipeConnectRequest_connect(struct __pyx_obj_6uvloop_4loop__PipeConnectRequest *__pyx_v_self, char *__pyx_v_addr) {
  94355. PyObject *__pyx_r = NULL;
  94356. __Pyx_RefNannyDeclarations
  94357. __Pyx_RefNannySetupContext("connect", 0);
  94358. /* "uvloop/handles/pipe.pyx":254
  94359. * cdef connect(self, char* addr):
  94360. * # uv_pipe_connect returns void
  94361. * uv.uv_pipe_connect(<uv.uv_connect_t*>self.request, # <<<<<<<<<<<<<<
  94362. * <uv.uv_pipe_t*>self.transport._handle,
  94363. * addr,
  94364. */
  94365. uv_pipe_connect(((uv_connect_t *)__pyx_v_self->__pyx_base.request), ((uv_pipe_t *)__pyx_v_self->transport->__pyx_base.__pyx_base.__pyx_base.__pyx_base._handle), __pyx_v_addr, __pyx_f_6uvloop_4loop___pipe_connect_callback);
  94366. /* "uvloop/handles/pipe.pyx":252
  94367. * self.transport = transport
  94368. *
  94369. * cdef connect(self, char* addr): # <<<<<<<<<<<<<<
  94370. * # uv_pipe_connect returns void
  94371. * uv.uv_pipe_connect(<uv.uv_connect_t*>self.request,
  94372. */
  94373. /* function exit code */
  94374. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  94375. __Pyx_XGIVEREF(__pyx_r);
  94376. __Pyx_RefNannyFinishContext();
  94377. return __pyx_r;
  94378. }
  94379. /* "(tree fragment)":1
  94380. * def __reduce_cython__(self): # <<<<<<<<<<<<<<
  94381. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  94382. * def __setstate_cython__(self, __pyx_state):
  94383. */
  94384. /* Python wrapper */
  94385. static PyObject *__pyx_pw_6uvloop_4loop_19_PipeConnectRequest_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  94386. static char __pyx_doc_6uvloop_4loop_19_PipeConnectRequest_2__reduce_cython__[] = "_PipeConnectRequest.__reduce_cython__(self)";
  94387. static PyObject *__pyx_pw_6uvloop_4loop_19_PipeConnectRequest_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  94388. PyObject *__pyx_r = 0;
  94389. __Pyx_RefNannyDeclarations
  94390. __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  94391. __pyx_r = __pyx_pf_6uvloop_4loop_19_PipeConnectRequest_2__reduce_cython__(((struct __pyx_obj_6uvloop_4loop__PipeConnectRequest *)__pyx_v_self));
  94392. /* function exit code */
  94393. __Pyx_RefNannyFinishContext();
  94394. return __pyx_r;
  94395. }
  94396. static PyObject *__pyx_pf_6uvloop_4loop_19_PipeConnectRequest_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop__PipeConnectRequest *__pyx_v_self) {
  94397. PyObject *__pyx_r = NULL;
  94398. __Pyx_RefNannyDeclarations
  94399. PyObject *__pyx_t_1 = NULL;
  94400. __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  94401. /* "(tree fragment)":2
  94402. * def __reduce_cython__(self):
  94403. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  94404. * def __setstate_cython__(self, __pyx_state):
  94405. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  94406. */
  94407. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__160, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 2, __pyx_L1_error)
  94408. __Pyx_GOTREF(__pyx_t_1);
  94409. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  94410. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  94411. __PYX_ERR(9, 2, __pyx_L1_error)
  94412. /* "(tree fragment)":1
  94413. * def __reduce_cython__(self): # <<<<<<<<<<<<<<
  94414. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  94415. * def __setstate_cython__(self, __pyx_state):
  94416. */
  94417. /* function exit code */
  94418. __pyx_L1_error:;
  94419. __Pyx_XDECREF(__pyx_t_1);
  94420. __Pyx_AddTraceback("uvloop.loop._PipeConnectRequest.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  94421. __pyx_r = NULL;
  94422. __Pyx_XGIVEREF(__pyx_r);
  94423. __Pyx_RefNannyFinishContext();
  94424. return __pyx_r;
  94425. }
  94426. /* "(tree fragment)":3
  94427. * def __reduce_cython__(self):
  94428. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  94429. * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
  94430. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  94431. */
  94432. /* Python wrapper */
  94433. static PyObject *__pyx_pw_6uvloop_4loop_19_PipeConnectRequest_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
  94434. static char __pyx_doc_6uvloop_4loop_19_PipeConnectRequest_4__setstate_cython__[] = "_PipeConnectRequest.__setstate_cython__(self, __pyx_state)";
  94435. static PyObject *__pyx_pw_6uvloop_4loop_19_PipeConnectRequest_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  94436. PyObject *__pyx_r = 0;
  94437. __Pyx_RefNannyDeclarations
  94438. __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  94439. __pyx_r = __pyx_pf_6uvloop_4loop_19_PipeConnectRequest_4__setstate_cython__(((struct __pyx_obj_6uvloop_4loop__PipeConnectRequest *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
  94440. /* function exit code */
  94441. __Pyx_RefNannyFinishContext();
  94442. return __pyx_r;
  94443. }
  94444. static PyObject *__pyx_pf_6uvloop_4loop_19_PipeConnectRequest_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop__PipeConnectRequest *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  94445. PyObject *__pyx_r = NULL;
  94446. __Pyx_RefNannyDeclarations
  94447. PyObject *__pyx_t_1 = NULL;
  94448. __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  94449. /* "(tree fragment)":4
  94450. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  94451. * def __setstate_cython__(self, __pyx_state):
  94452. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  94453. */
  94454. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__161, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 4, __pyx_L1_error)
  94455. __Pyx_GOTREF(__pyx_t_1);
  94456. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  94457. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  94458. __PYX_ERR(9, 4, __pyx_L1_error)
  94459. /* "(tree fragment)":3
  94460. * def __reduce_cython__(self):
  94461. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  94462. * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
  94463. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  94464. */
  94465. /* function exit code */
  94466. __pyx_L1_error:;
  94467. __Pyx_XDECREF(__pyx_t_1);
  94468. __Pyx_AddTraceback("uvloop.loop._PipeConnectRequest.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  94469. __pyx_r = NULL;
  94470. __Pyx_XGIVEREF(__pyx_r);
  94471. __Pyx_RefNannyFinishContext();
  94472. return __pyx_r;
  94473. }
  94474. /* "uvloop/handles/pipe.pyx":259
  94475. * __pipe_connect_callback)
  94476. *
  94477. * cdef void __pipe_connect_callback(uv.uv_connect_t* req, int status) with gil: # <<<<<<<<<<<<<<
  94478. * cdef:
  94479. * _PipeConnectRequest wrapper
  94480. */
  94481. static void __pyx_f_6uvloop_4loop___pipe_connect_callback(uv_connect_t *__pyx_v_req, int __pyx_v_status) {
  94482. struct __pyx_obj_6uvloop_4loop__PipeConnectRequest *__pyx_v_wrapper = 0;
  94483. struct __pyx_obj_6uvloop_4loop_UnixTransport *__pyx_v_transport = 0;
  94484. PyObject *__pyx_v_exc = NULL;
  94485. PyObject *__pyx_v_ex = NULL;
  94486. __Pyx_RefNannyDeclarations
  94487. PyObject *__pyx_t_1 = NULL;
  94488. int __pyx_t_2;
  94489. PyObject *__pyx_t_3 = NULL;
  94490. PyObject *__pyx_t_4 = NULL;
  94491. PyObject *__pyx_t_5 = NULL;
  94492. int __pyx_t_6;
  94493. PyObject *__pyx_t_7 = NULL;
  94494. PyObject *__pyx_t_8 = NULL;
  94495. PyObject *__pyx_t_9 = NULL;
  94496. int __pyx_t_10;
  94497. char const *__pyx_t_11;
  94498. PyObject *__pyx_t_12 = NULL;
  94499. PyObject *__pyx_t_13 = NULL;
  94500. PyObject *__pyx_t_14 = NULL;
  94501. PyObject *__pyx_t_15 = NULL;
  94502. PyObject *__pyx_t_16 = NULL;
  94503. PyObject *__pyx_t_17 = NULL;
  94504. char const *__pyx_t_18;
  94505. #ifdef WITH_THREAD
  94506. PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  94507. #endif
  94508. __Pyx_RefNannySetupContext("__pipe_connect_callback", 0);
  94509. /* "uvloop/handles/pipe.pyx":264
  94510. * UnixTransport transport
  94511. *
  94512. * wrapper = <_PipeConnectRequest> req.data # <<<<<<<<<<<<<<
  94513. * transport = wrapper.transport
  94514. *
  94515. */
  94516. __pyx_t_1 = ((PyObject *)__pyx_v_req->data);
  94517. __Pyx_INCREF(__pyx_t_1);
  94518. __pyx_v_wrapper = ((struct __pyx_obj_6uvloop_4loop__PipeConnectRequest *)__pyx_t_1);
  94519. __pyx_t_1 = 0;
  94520. /* "uvloop/handles/pipe.pyx":265
  94521. *
  94522. * wrapper = <_PipeConnectRequest> req.data
  94523. * transport = wrapper.transport # <<<<<<<<<<<<<<
  94524. *
  94525. * if status < 0:
  94526. */
  94527. __pyx_t_1 = ((PyObject *)__pyx_v_wrapper->transport);
  94528. __Pyx_INCREF(__pyx_t_1);
  94529. __pyx_v_transport = ((struct __pyx_obj_6uvloop_4loop_UnixTransport *)__pyx_t_1);
  94530. __pyx_t_1 = 0;
  94531. /* "uvloop/handles/pipe.pyx":267
  94532. * transport = wrapper.transport
  94533. *
  94534. * if status < 0: # <<<<<<<<<<<<<<
  94535. * exc = convert_error(status)
  94536. * else:
  94537. */
  94538. __pyx_t_2 = ((__pyx_v_status < 0) != 0);
  94539. if (__pyx_t_2) {
  94540. /* "uvloop/handles/pipe.pyx":268
  94541. *
  94542. * if status < 0:
  94543. * exc = convert_error(status) # <<<<<<<<<<<<<<
  94544. * else:
  94545. * exc = None
  94546. */
  94547. __pyx_t_1 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_status); if (unlikely(!__pyx_t_1)) __PYX_ERR(20, 268, __pyx_L1_error)
  94548. __Pyx_GOTREF(__pyx_t_1);
  94549. __pyx_v_exc = __pyx_t_1;
  94550. __pyx_t_1 = 0;
  94551. /* "uvloop/handles/pipe.pyx":267
  94552. * transport = wrapper.transport
  94553. *
  94554. * if status < 0: # <<<<<<<<<<<<<<
  94555. * exc = convert_error(status)
  94556. * else:
  94557. */
  94558. goto __pyx_L3;
  94559. }
  94560. /* "uvloop/handles/pipe.pyx":270
  94561. * exc = convert_error(status)
  94562. * else:
  94563. * exc = None # <<<<<<<<<<<<<<
  94564. *
  94565. * try:
  94566. */
  94567. /*else*/ {
  94568. __Pyx_INCREF(Py_None);
  94569. __pyx_v_exc = Py_None;
  94570. }
  94571. __pyx_L3:;
  94572. /* "uvloop/handles/pipe.pyx":272
  94573. * exc = None
  94574. *
  94575. * try: # <<<<<<<<<<<<<<
  94576. * transport._on_connect(exc)
  94577. * except BaseException as ex:
  94578. */
  94579. /*try:*/ {
  94580. {
  94581. __Pyx_PyThreadState_declare
  94582. __Pyx_PyThreadState_assign
  94583. __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
  94584. __Pyx_XGOTREF(__pyx_t_3);
  94585. __Pyx_XGOTREF(__pyx_t_4);
  94586. __Pyx_XGOTREF(__pyx_t_5);
  94587. /*try:*/ {
  94588. /* "uvloop/handles/pipe.pyx":273
  94589. *
  94590. * try:
  94591. * transport._on_connect(exc) # <<<<<<<<<<<<<<
  94592. * except BaseException as ex:
  94593. * wrapper.transport._fatal_error(ex, False)
  94594. */
  94595. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UnixTransport *)__pyx_v_transport->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._on_connect(((struct __pyx_obj_6uvloop_4loop_UVStream *)__pyx_v_transport), __pyx_v_exc); if (unlikely(!__pyx_t_1)) __PYX_ERR(20, 273, __pyx_L7_error)
  94596. __Pyx_GOTREF(__pyx_t_1);
  94597. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  94598. /* "uvloop/handles/pipe.pyx":272
  94599. * exc = None
  94600. *
  94601. * try: # <<<<<<<<<<<<<<
  94602. * transport._on_connect(exc)
  94603. * except BaseException as ex:
  94604. */
  94605. }
  94606. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  94607. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  94608. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  94609. goto __pyx_L12_try_end;
  94610. __pyx_L7_error:;
  94611. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  94612. /* "uvloop/handles/pipe.pyx":274
  94613. * try:
  94614. * transport._on_connect(exc)
  94615. * except BaseException as ex: # <<<<<<<<<<<<<<
  94616. * wrapper.transport._fatal_error(ex, False)
  94617. * finally:
  94618. */
  94619. __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_BaseException);
  94620. if (__pyx_t_6) {
  94621. __Pyx_AddTraceback("uvloop.loop.__pipe_connect_callback", __pyx_clineno, __pyx_lineno, __pyx_filename);
  94622. if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_7, &__pyx_t_8) < 0) __PYX_ERR(20, 274, __pyx_L9_except_error)
  94623. __Pyx_GOTREF(__pyx_t_1);
  94624. __Pyx_GOTREF(__pyx_t_7);
  94625. __Pyx_GOTREF(__pyx_t_8);
  94626. __Pyx_INCREF(__pyx_t_7);
  94627. __pyx_v_ex = __pyx_t_7;
  94628. /*try:*/ {
  94629. /* "uvloop/handles/pipe.pyx":275
  94630. * transport._on_connect(exc)
  94631. * except BaseException as ex:
  94632. * wrapper.transport._fatal_error(ex, False) # <<<<<<<<<<<<<<
  94633. * finally:
  94634. * wrapper.on_done()
  94635. */
  94636. __pyx_t_9 = ((struct __pyx_vtabstruct_6uvloop_4loop_UnixTransport *)__pyx_v_wrapper->transport->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base.__pyx_base._fatal_error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_wrapper->transport), __pyx_v_ex, Py_False, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(20, 275, __pyx_L18_error)
  94637. __Pyx_GOTREF(__pyx_t_9);
  94638. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  94639. }
  94640. /* "uvloop/handles/pipe.pyx":274
  94641. * try:
  94642. * transport._on_connect(exc)
  94643. * except BaseException as ex: # <<<<<<<<<<<<<<
  94644. * wrapper.transport._fatal_error(ex, False)
  94645. * finally:
  94646. */
  94647. /*finally:*/ {
  94648. /*normal exit:*/{
  94649. __Pyx_DECREF(__pyx_v_ex);
  94650. __pyx_v_ex = NULL;
  94651. goto __pyx_L19;
  94652. }
  94653. __pyx_L18_error:;
  94654. /*exception exit:*/{
  94655. __Pyx_PyThreadState_declare
  94656. __Pyx_PyThreadState_assign
  94657. __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0;
  94658. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  94659. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17);
  94660. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14) < 0)) __Pyx_ErrFetch(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
  94661. __Pyx_XGOTREF(__pyx_t_12);
  94662. __Pyx_XGOTREF(__pyx_t_13);
  94663. __Pyx_XGOTREF(__pyx_t_14);
  94664. __Pyx_XGOTREF(__pyx_t_15);
  94665. __Pyx_XGOTREF(__pyx_t_16);
  94666. __Pyx_XGOTREF(__pyx_t_17);
  94667. __pyx_t_6 = __pyx_lineno; __pyx_t_10 = __pyx_clineno; __pyx_t_11 = __pyx_filename;
  94668. {
  94669. __Pyx_DECREF(__pyx_v_ex);
  94670. __pyx_v_ex = NULL;
  94671. }
  94672. if (PY_MAJOR_VERSION >= 3) {
  94673. __Pyx_XGIVEREF(__pyx_t_15);
  94674. __Pyx_XGIVEREF(__pyx_t_16);
  94675. __Pyx_XGIVEREF(__pyx_t_17);
  94676. __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17);
  94677. }
  94678. __Pyx_XGIVEREF(__pyx_t_12);
  94679. __Pyx_XGIVEREF(__pyx_t_13);
  94680. __Pyx_XGIVEREF(__pyx_t_14);
  94681. __Pyx_ErrRestore(__pyx_t_12, __pyx_t_13, __pyx_t_14);
  94682. __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0;
  94683. __pyx_lineno = __pyx_t_6; __pyx_clineno = __pyx_t_10; __pyx_filename = __pyx_t_11;
  94684. goto __pyx_L9_except_error;
  94685. }
  94686. __pyx_L19:;
  94687. }
  94688. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  94689. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  94690. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  94691. goto __pyx_L8_exception_handled;
  94692. }
  94693. goto __pyx_L9_except_error;
  94694. __pyx_L9_except_error:;
  94695. /* "uvloop/handles/pipe.pyx":272
  94696. * exc = None
  94697. *
  94698. * try: # <<<<<<<<<<<<<<
  94699. * transport._on_connect(exc)
  94700. * except BaseException as ex:
  94701. */
  94702. __Pyx_XGIVEREF(__pyx_t_3);
  94703. __Pyx_XGIVEREF(__pyx_t_4);
  94704. __Pyx_XGIVEREF(__pyx_t_5);
  94705. __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
  94706. goto __pyx_L5_error;
  94707. __pyx_L8_exception_handled:;
  94708. __Pyx_XGIVEREF(__pyx_t_3);
  94709. __Pyx_XGIVEREF(__pyx_t_4);
  94710. __Pyx_XGIVEREF(__pyx_t_5);
  94711. __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
  94712. __pyx_L12_try_end:;
  94713. }
  94714. }
  94715. /* "uvloop/handles/pipe.pyx":277
  94716. * wrapper.transport._fatal_error(ex, False)
  94717. * finally:
  94718. * wrapper.on_done() # <<<<<<<<<<<<<<
  94719. */
  94720. /*finally:*/ {
  94721. /*normal exit:*/{
  94722. __pyx_t_8 = ((struct __pyx_vtabstruct_6uvloop_4loop__PipeConnectRequest *)__pyx_v_wrapper->__pyx_base.__pyx_vtab)->__pyx_base.on_done(((struct __pyx_obj_6uvloop_4loop_UVRequest *)__pyx_v_wrapper)); if (unlikely(!__pyx_t_8)) __PYX_ERR(20, 277, __pyx_L1_error)
  94723. __Pyx_GOTREF(__pyx_t_8);
  94724. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  94725. goto __pyx_L6;
  94726. }
  94727. __pyx_L5_error:;
  94728. /*exception exit:*/{
  94729. __Pyx_PyThreadState_declare
  94730. __Pyx_PyThreadState_assign
  94731. __pyx_t_5 = 0; __pyx_t_4 = 0; __pyx_t_3 = 0; __pyx_t_17 = 0; __pyx_t_16 = 0; __pyx_t_15 = 0;
  94732. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  94733. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  94734. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  94735. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  94736. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_17, &__pyx_t_16, &__pyx_t_15);
  94737. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_3) < 0)) __Pyx_ErrFetch(&__pyx_t_5, &__pyx_t_4, &__pyx_t_3);
  94738. __Pyx_XGOTREF(__pyx_t_5);
  94739. __Pyx_XGOTREF(__pyx_t_4);
  94740. __Pyx_XGOTREF(__pyx_t_3);
  94741. __Pyx_XGOTREF(__pyx_t_17);
  94742. __Pyx_XGOTREF(__pyx_t_16);
  94743. __Pyx_XGOTREF(__pyx_t_15);
  94744. __pyx_t_10 = __pyx_lineno; __pyx_t_6 = __pyx_clineno; __pyx_t_18 = __pyx_filename;
  94745. {
  94746. __pyx_t_8 = ((struct __pyx_vtabstruct_6uvloop_4loop__PipeConnectRequest *)__pyx_v_wrapper->__pyx_base.__pyx_vtab)->__pyx_base.on_done(((struct __pyx_obj_6uvloop_4loop_UVRequest *)__pyx_v_wrapper)); if (unlikely(!__pyx_t_8)) __PYX_ERR(20, 277, __pyx_L25_error)
  94747. __Pyx_GOTREF(__pyx_t_8);
  94748. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  94749. }
  94750. if (PY_MAJOR_VERSION >= 3) {
  94751. __Pyx_XGIVEREF(__pyx_t_17);
  94752. __Pyx_XGIVEREF(__pyx_t_16);
  94753. __Pyx_XGIVEREF(__pyx_t_15);
  94754. __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_16, __pyx_t_15);
  94755. }
  94756. __Pyx_XGIVEREF(__pyx_t_5);
  94757. __Pyx_XGIVEREF(__pyx_t_4);
  94758. __Pyx_XGIVEREF(__pyx_t_3);
  94759. __Pyx_ErrRestore(__pyx_t_5, __pyx_t_4, __pyx_t_3);
  94760. __pyx_t_5 = 0; __pyx_t_4 = 0; __pyx_t_3 = 0; __pyx_t_17 = 0; __pyx_t_16 = 0; __pyx_t_15 = 0;
  94761. __pyx_lineno = __pyx_t_10; __pyx_clineno = __pyx_t_6; __pyx_filename = __pyx_t_18;
  94762. goto __pyx_L1_error;
  94763. __pyx_L25_error:;
  94764. if (PY_MAJOR_VERSION >= 3) {
  94765. __Pyx_XGIVEREF(__pyx_t_17);
  94766. __Pyx_XGIVEREF(__pyx_t_16);
  94767. __Pyx_XGIVEREF(__pyx_t_15);
  94768. __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_16, __pyx_t_15);
  94769. }
  94770. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  94771. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  94772. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  94773. __pyx_t_17 = 0; __pyx_t_16 = 0; __pyx_t_15 = 0;
  94774. goto __pyx_L1_error;
  94775. }
  94776. __pyx_L6:;
  94777. }
  94778. /* "uvloop/handles/pipe.pyx":259
  94779. * __pipe_connect_callback)
  94780. *
  94781. * cdef void __pipe_connect_callback(uv.uv_connect_t* req, int status) with gil: # <<<<<<<<<<<<<<
  94782. * cdef:
  94783. * _PipeConnectRequest wrapper
  94784. */
  94785. /* function exit code */
  94786. goto __pyx_L0;
  94787. __pyx_L1_error:;
  94788. __Pyx_XDECREF(__pyx_t_1);
  94789. __Pyx_XDECREF(__pyx_t_7);
  94790. __Pyx_XDECREF(__pyx_t_8);
  94791. __Pyx_XDECREF(__pyx_t_9);
  94792. __Pyx_WriteUnraisable("uvloop.loop.__pipe_connect_callback", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  94793. __pyx_L0:;
  94794. __Pyx_XDECREF((PyObject *)__pyx_v_wrapper);
  94795. __Pyx_XDECREF((PyObject *)__pyx_v_transport);
  94796. __Pyx_XDECREF(__pyx_v_exc);
  94797. __Pyx_XDECREF(__pyx_v_ex);
  94798. __Pyx_RefNannyFinishContext();
  94799. #ifdef WITH_THREAD
  94800. __Pyx_PyGILState_Release(__pyx_gilstate_save);
  94801. #endif
  94802. }
  94803. /* "uvloop/handles/process.pyx":5
  94804. * """Abstract class; wrapper over uv_process_t handle."""
  94805. *
  94806. * def __cinit__(self): # <<<<<<<<<<<<<<
  94807. * self.uv_opt_env = NULL
  94808. * self.uv_opt_args = NULL
  94809. */
  94810. /* Python wrapper */
  94811. static int __pyx_pw_6uvloop_4loop_9UVProcess_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  94812. static int __pyx_pw_6uvloop_4loop_9UVProcess_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  94813. int __pyx_r;
  94814. __Pyx_RefNannyDeclarations
  94815. __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  94816. if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
  94817. __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  94818. if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
  94819. __pyx_r = __pyx_pf_6uvloop_4loop_9UVProcess___cinit__(((struct __pyx_obj_6uvloop_4loop_UVProcess *)__pyx_v_self));
  94820. /* function exit code */
  94821. __Pyx_RefNannyFinishContext();
  94822. return __pyx_r;
  94823. }
  94824. static int __pyx_pf_6uvloop_4loop_9UVProcess___cinit__(struct __pyx_obj_6uvloop_4loop_UVProcess *__pyx_v_self) {
  94825. int __pyx_r;
  94826. __Pyx_RefNannyDeclarations
  94827. PyObject *__pyx_t_1 = NULL;
  94828. __Pyx_RefNannySetupContext("__cinit__", 0);
  94829. /* "uvloop/handles/process.pyx":6
  94830. *
  94831. * def __cinit__(self):
  94832. * self.uv_opt_env = NULL # <<<<<<<<<<<<<<
  94833. * self.uv_opt_args = NULL
  94834. * self._returncode = None
  94835. */
  94836. __pyx_v_self->uv_opt_env = NULL;
  94837. /* "uvloop/handles/process.pyx":7
  94838. * def __cinit__(self):
  94839. * self.uv_opt_env = NULL
  94840. * self.uv_opt_args = NULL # <<<<<<<<<<<<<<
  94841. * self._returncode = None
  94842. * self._pid = None
  94843. */
  94844. __pyx_v_self->uv_opt_args = NULL;
  94845. /* "uvloop/handles/process.pyx":8
  94846. * self.uv_opt_env = NULL
  94847. * self.uv_opt_args = NULL
  94848. * self._returncode = None # <<<<<<<<<<<<<<
  94849. * self._pid = None
  94850. * self._fds_to_close = set()
  94851. */
  94852. __Pyx_INCREF(Py_None);
  94853. __Pyx_GIVEREF(Py_None);
  94854. __Pyx_GOTREF(__pyx_v_self->_returncode);
  94855. __Pyx_DECREF(__pyx_v_self->_returncode);
  94856. __pyx_v_self->_returncode = Py_None;
  94857. /* "uvloop/handles/process.pyx":9
  94858. * self.uv_opt_args = NULL
  94859. * self._returncode = None
  94860. * self._pid = None # <<<<<<<<<<<<<<
  94861. * self._fds_to_close = set()
  94862. * self._preexec_fn = None
  94863. */
  94864. __Pyx_INCREF(Py_None);
  94865. __Pyx_GIVEREF(Py_None);
  94866. __Pyx_GOTREF(__pyx_v_self->_pid);
  94867. __Pyx_DECREF(__pyx_v_self->_pid);
  94868. __pyx_v_self->_pid = Py_None;
  94869. /* "uvloop/handles/process.pyx":10
  94870. * self._returncode = None
  94871. * self._pid = None
  94872. * self._fds_to_close = set() # <<<<<<<<<<<<<<
  94873. * self._preexec_fn = None
  94874. * self._restore_signals = True
  94875. */
  94876. __pyx_t_1 = PySet_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 10, __pyx_L1_error)
  94877. __Pyx_GOTREF(__pyx_t_1);
  94878. __Pyx_GIVEREF(__pyx_t_1);
  94879. __Pyx_GOTREF(__pyx_v_self->_fds_to_close);
  94880. __Pyx_DECREF(__pyx_v_self->_fds_to_close);
  94881. __pyx_v_self->_fds_to_close = ((PyObject*)__pyx_t_1);
  94882. __pyx_t_1 = 0;
  94883. /* "uvloop/handles/process.pyx":11
  94884. * self._pid = None
  94885. * self._fds_to_close = set()
  94886. * self._preexec_fn = None # <<<<<<<<<<<<<<
  94887. * self._restore_signals = True
  94888. *
  94889. */
  94890. __Pyx_INCREF(Py_None);
  94891. __Pyx_GIVEREF(Py_None);
  94892. __Pyx_GOTREF(__pyx_v_self->_preexec_fn);
  94893. __Pyx_DECREF(__pyx_v_self->_preexec_fn);
  94894. __pyx_v_self->_preexec_fn = Py_None;
  94895. /* "uvloop/handles/process.pyx":12
  94896. * self._fds_to_close = set()
  94897. * self._preexec_fn = None
  94898. * self._restore_signals = True # <<<<<<<<<<<<<<
  94899. *
  94900. * cdef _close_process_handle(self):
  94901. */
  94902. __pyx_v_self->_restore_signals = 1;
  94903. /* "uvloop/handles/process.pyx":5
  94904. * """Abstract class; wrapper over uv_process_t handle."""
  94905. *
  94906. * def __cinit__(self): # <<<<<<<<<<<<<<
  94907. * self.uv_opt_env = NULL
  94908. * self.uv_opt_args = NULL
  94909. */
  94910. /* function exit code */
  94911. __pyx_r = 0;
  94912. goto __pyx_L0;
  94913. __pyx_L1_error:;
  94914. __Pyx_XDECREF(__pyx_t_1);
  94915. __Pyx_AddTraceback("uvloop.loop.UVProcess.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  94916. __pyx_r = -1;
  94917. __pyx_L0:;
  94918. __Pyx_RefNannyFinishContext();
  94919. return __pyx_r;
  94920. }
  94921. /* "uvloop/handles/process.pyx":14
  94922. * self._restore_signals = True
  94923. *
  94924. * cdef _close_process_handle(self): # <<<<<<<<<<<<<<
  94925. * # XXX: This is a workaround for a libuv bug:
  94926. * # - https://github.com/libuv/libuv/issues/1933
  94927. */
  94928. static PyObject *__pyx_f_6uvloop_4loop_9UVProcess__close_process_handle(struct __pyx_obj_6uvloop_4loop_UVProcess *__pyx_v_self) {
  94929. PyObject *__pyx_r = NULL;
  94930. __Pyx_RefNannyDeclarations
  94931. int __pyx_t_1;
  94932. __Pyx_RefNannySetupContext("_close_process_handle", 0);
  94933. /* "uvloop/handles/process.pyx":18
  94934. * # - https://github.com/libuv/libuv/issues/1933
  94935. * # - https://github.com/libuv/libuv/pull/551
  94936. * if self._handle is NULL: # <<<<<<<<<<<<<<
  94937. * return
  94938. * self._handle.data = NULL
  94939. */
  94940. __pyx_t_1 = ((__pyx_v_self->__pyx_base._handle == NULL) != 0);
  94941. if (__pyx_t_1) {
  94942. /* "uvloop/handles/process.pyx":19
  94943. * # - https://github.com/libuv/libuv/pull/551
  94944. * if self._handle is NULL:
  94945. * return # <<<<<<<<<<<<<<
  94946. * self._handle.data = NULL
  94947. * uv.uv_close(self._handle, __uv_close_process_handle_cb)
  94948. */
  94949. __Pyx_XDECREF(__pyx_r);
  94950. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  94951. goto __pyx_L0;
  94952. /* "uvloop/handles/process.pyx":18
  94953. * # - https://github.com/libuv/libuv/issues/1933
  94954. * # - https://github.com/libuv/libuv/pull/551
  94955. * if self._handle is NULL: # <<<<<<<<<<<<<<
  94956. * return
  94957. * self._handle.data = NULL
  94958. */
  94959. }
  94960. /* "uvloop/handles/process.pyx":20
  94961. * if self._handle is NULL:
  94962. * return
  94963. * self._handle.data = NULL # <<<<<<<<<<<<<<
  94964. * uv.uv_close(self._handle, __uv_close_process_handle_cb)
  94965. * self._handle = NULL # close callback will free() the memory
  94966. */
  94967. __pyx_v_self->__pyx_base._handle->data = NULL;
  94968. /* "uvloop/handles/process.pyx":21
  94969. * return
  94970. * self._handle.data = NULL
  94971. * uv.uv_close(self._handle, __uv_close_process_handle_cb) # <<<<<<<<<<<<<<
  94972. * self._handle = NULL # close callback will free() the memory
  94973. *
  94974. */
  94975. uv_close(__pyx_v_self->__pyx_base._handle, __pyx_f_6uvloop_4loop___uv_close_process_handle_cb);
  94976. /* "uvloop/handles/process.pyx":22
  94977. * self._handle.data = NULL
  94978. * uv.uv_close(self._handle, __uv_close_process_handle_cb)
  94979. * self._handle = NULL # close callback will free() the memory # <<<<<<<<<<<<<<
  94980. *
  94981. * cdef _init(self, Loop loop, list args, dict env,
  94982. */
  94983. __pyx_v_self->__pyx_base._handle = NULL;
  94984. /* "uvloop/handles/process.pyx":14
  94985. * self._restore_signals = True
  94986. *
  94987. * cdef _close_process_handle(self): # <<<<<<<<<<<<<<
  94988. * # XXX: This is a workaround for a libuv bug:
  94989. * # - https://github.com/libuv/libuv/issues/1933
  94990. */
  94991. /* function exit code */
  94992. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  94993. __pyx_L0:;
  94994. __Pyx_XGIVEREF(__pyx_r);
  94995. __Pyx_RefNannyFinishContext();
  94996. return __pyx_r;
  94997. }
  94998. /* "uvloop/handles/process.pyx":24
  94999. * self._handle = NULL # close callback will free() the memory
  95000. *
  95001. * cdef _init(self, Loop loop, list args, dict env, # <<<<<<<<<<<<<<
  95002. * cwd, start_new_session,
  95003. * _stdin, _stdout, _stderr, # std* can be defined as macros in C
  95004. */
  95005. static PyObject *__pyx_f_6uvloop_4loop_9UVProcess__init(struct __pyx_obj_6uvloop_4loop_UVProcess *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, PyObject *__pyx_v_args, PyObject *__pyx_v_env, PyObject *__pyx_v_cwd, PyObject *__pyx_v_start_new_session, PyObject *__pyx_v__stdin, PyObject *__pyx_v__stdout, PyObject *__pyx_v__stderr, PyObject *__pyx_v_pass_fds, PyObject *__pyx_v_debug_flags, PyObject *__pyx_v_preexec_fn, PyObject *__pyx_v_restore_signals) {
  95006. int __pyx_v_err;
  95007. PyObject *__pyx_v_restore_inheritable = NULL;
  95008. PyObject *__pyx_v_fd = NULL;
  95009. PyObject *__pyx_v_errpipe_data = NULL;
  95010. PyObject *__pyx_v_part = NULL;
  95011. PyObject *__pyx_v_fds_to_close = NULL;
  95012. PyObject *__pyx_v_exc_name = NULL;
  95013. PyObject *__pyx_v_exc_msg = NULL;
  95014. PyObject *__pyx_v_exc_cls = NULL;
  95015. PyObject *__pyx_v_exc = NULL;
  95016. PyObject *__pyx_r = NULL;
  95017. __Pyx_RefNannyDeclarations
  95018. PyObject *__pyx_t_1 = NULL;
  95019. int __pyx_t_2;
  95020. PyObject *__pyx_t_3 = NULL;
  95021. PyObject *__pyx_t_4 = NULL;
  95022. PyObject *__pyx_t_5 = NULL;
  95023. Py_ssize_t __pyx_t_6;
  95024. PyObject *(*__pyx_t_7)(PyObject *);
  95025. PyObject *__pyx_t_8 = NULL;
  95026. PyObject *__pyx_t_9 = NULL;
  95027. PyObject *__pyx_t_10 = NULL;
  95028. int __pyx_t_11;
  95029. int __pyx_t_12;
  95030. int __pyx_t_13;
  95031. PyObject *__pyx_t_14 = NULL;
  95032. int __pyx_t_15;
  95033. PyObject *(*__pyx_t_16)(PyObject *);
  95034. Py_ssize_t __pyx_t_17;
  95035. int __pyx_t_18;
  95036. char const *__pyx_t_19;
  95037. PyObject *__pyx_t_20 = NULL;
  95038. PyObject *__pyx_t_21 = NULL;
  95039. PyObject *__pyx_t_22 = NULL;
  95040. PyObject *__pyx_t_23 = NULL;
  95041. PyObject *__pyx_t_24 = NULL;
  95042. PyObject *__pyx_t_25 = NULL;
  95043. int __pyx_t_26;
  95044. int __pyx_t_27;
  95045. PyObject *__pyx_t_28 = NULL;
  95046. PyObject *__pyx_t_29 = NULL;
  95047. __Pyx_RefNannySetupContext("_init", 0);
  95048. /* "uvloop/handles/process.pyx":34
  95049. * cdef int err
  95050. *
  95051. * self._start_init(loop) # <<<<<<<<<<<<<<
  95052. *
  95053. * self._handle = <uv.uv_handle_t*>PyMem_RawMalloc(
  95054. */
  95055. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcess *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._start_init(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self), __pyx_v_loop); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 34, __pyx_L1_error)
  95056. __Pyx_GOTREF(__pyx_t_1);
  95057. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  95058. /* "uvloop/handles/process.pyx":36
  95059. * self._start_init(loop)
  95060. *
  95061. * self._handle = <uv.uv_handle_t*>PyMem_RawMalloc( # <<<<<<<<<<<<<<
  95062. * sizeof(uv.uv_process_t))
  95063. * if self._handle is NULL:
  95064. */
  95065. __pyx_v_self->__pyx_base._handle = ((uv_handle_t *)PyMem_RawMalloc((sizeof(uv_process_t))));
  95066. /* "uvloop/handles/process.pyx":38
  95067. * self._handle = <uv.uv_handle_t*>PyMem_RawMalloc(
  95068. * sizeof(uv.uv_process_t))
  95069. * if self._handle is NULL: # <<<<<<<<<<<<<<
  95070. * self._abort_init()
  95071. * raise MemoryError()
  95072. */
  95073. __pyx_t_2 = ((__pyx_v_self->__pyx_base._handle == NULL) != 0);
  95074. if (unlikely(__pyx_t_2)) {
  95075. /* "uvloop/handles/process.pyx":39
  95076. * sizeof(uv.uv_process_t))
  95077. * if self._handle is NULL:
  95078. * self._abort_init() # <<<<<<<<<<<<<<
  95079. * raise MemoryError()
  95080. *
  95081. */
  95082. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcess *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._abort_init(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 39, __pyx_L1_error)
  95083. __Pyx_GOTREF(__pyx_t_1);
  95084. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  95085. /* "uvloop/handles/process.pyx":40
  95086. * if self._handle is NULL:
  95087. * self._abort_init()
  95088. * raise MemoryError() # <<<<<<<<<<<<<<
  95089. *
  95090. * # Too early to call _finish_init, but still a lot of work to do.
  95091. */
  95092. PyErr_NoMemory(); __PYX_ERR(6, 40, __pyx_L1_error)
  95093. /* "uvloop/handles/process.pyx":38
  95094. * self._handle = <uv.uv_handle_t*>PyMem_RawMalloc(
  95095. * sizeof(uv.uv_process_t))
  95096. * if self._handle is NULL: # <<<<<<<<<<<<<<
  95097. * self._abort_init()
  95098. * raise MemoryError()
  95099. */
  95100. }
  95101. /* "uvloop/handles/process.pyx":45
  95102. * # Let's set handle.data to NULL, so in case something goes wrong,
  95103. * # callbacks have a chance to avoid casting *something* into UVHandle.
  95104. * self._handle.data = NULL # <<<<<<<<<<<<<<
  95105. *
  95106. * try:
  95107. */
  95108. __pyx_v_self->__pyx_base._handle->data = NULL;
  95109. /* "uvloop/handles/process.pyx":47
  95110. * self._handle.data = NULL
  95111. *
  95112. * try: # <<<<<<<<<<<<<<
  95113. * self._init_options(args, env, cwd, start_new_session,
  95114. * _stdin, _stdout, _stderr)
  95115. */
  95116. {
  95117. __Pyx_PyThreadState_declare
  95118. __Pyx_PyThreadState_assign
  95119. __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
  95120. __Pyx_XGOTREF(__pyx_t_3);
  95121. __Pyx_XGOTREF(__pyx_t_4);
  95122. __Pyx_XGOTREF(__pyx_t_5);
  95123. /*try:*/ {
  95124. /* "uvloop/handles/process.pyx":48
  95125. *
  95126. * try:
  95127. * self._init_options(args, env, cwd, start_new_session, # <<<<<<<<<<<<<<
  95128. * _stdin, _stdout, _stderr)
  95129. *
  95130. */
  95131. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcess *)__pyx_v_self->__pyx_base.__pyx_vtab)->_init_options(__pyx_v_self, __pyx_v_args, __pyx_v_env, __pyx_v_cwd, __pyx_v_start_new_session, __pyx_v__stdin, __pyx_v__stdout, __pyx_v__stderr); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 48, __pyx_L4_error)
  95132. __Pyx_GOTREF(__pyx_t_1);
  95133. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  95134. /* "uvloop/handles/process.pyx":51
  95135. * _stdin, _stdout, _stderr)
  95136. *
  95137. * restore_inheritable = set() # <<<<<<<<<<<<<<
  95138. * if pass_fds:
  95139. * for fd in pass_fds:
  95140. */
  95141. __pyx_t_1 = PySet_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 51, __pyx_L4_error)
  95142. __Pyx_GOTREF(__pyx_t_1);
  95143. __pyx_v_restore_inheritable = ((PyObject*)__pyx_t_1);
  95144. __pyx_t_1 = 0;
  95145. /* "uvloop/handles/process.pyx":52
  95146. *
  95147. * restore_inheritable = set()
  95148. * if pass_fds: # <<<<<<<<<<<<<<
  95149. * for fd in pass_fds:
  95150. * if not os_get_inheritable(fd):
  95151. */
  95152. __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_pass_fds); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(6, 52, __pyx_L4_error)
  95153. if (__pyx_t_2) {
  95154. /* "uvloop/handles/process.pyx":53
  95155. * restore_inheritable = set()
  95156. * if pass_fds:
  95157. * for fd in pass_fds: # <<<<<<<<<<<<<<
  95158. * if not os_get_inheritable(fd):
  95159. * restore_inheritable.add(fd)
  95160. */
  95161. if (likely(PyList_CheckExact(__pyx_v_pass_fds)) || PyTuple_CheckExact(__pyx_v_pass_fds)) {
  95162. __pyx_t_1 = __pyx_v_pass_fds; __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = 0;
  95163. __pyx_t_7 = NULL;
  95164. } else {
  95165. __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_pass_fds); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 53, __pyx_L4_error)
  95166. __Pyx_GOTREF(__pyx_t_1);
  95167. __pyx_t_7 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(6, 53, __pyx_L4_error)
  95168. }
  95169. for (;;) {
  95170. if (likely(!__pyx_t_7)) {
  95171. if (likely(PyList_CheckExact(__pyx_t_1))) {
  95172. if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_1)) break;
  95173. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  95174. __pyx_t_8 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(6, 53, __pyx_L4_error)
  95175. #else
  95176. __pyx_t_8 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) __PYX_ERR(6, 53, __pyx_L4_error)
  95177. __Pyx_GOTREF(__pyx_t_8);
  95178. #endif
  95179. } else {
  95180. if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
  95181. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  95182. __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(6, 53, __pyx_L4_error)
  95183. #else
  95184. __pyx_t_8 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) __PYX_ERR(6, 53, __pyx_L4_error)
  95185. __Pyx_GOTREF(__pyx_t_8);
  95186. #endif
  95187. }
  95188. } else {
  95189. __pyx_t_8 = __pyx_t_7(__pyx_t_1);
  95190. if (unlikely(!__pyx_t_8)) {
  95191. PyObject* exc_type = PyErr_Occurred();
  95192. if (exc_type) {
  95193. if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
  95194. else __PYX_ERR(6, 53, __pyx_L4_error)
  95195. }
  95196. break;
  95197. }
  95198. __Pyx_GOTREF(__pyx_t_8);
  95199. }
  95200. __Pyx_XDECREF_SET(__pyx_v_fd, __pyx_t_8);
  95201. __pyx_t_8 = 0;
  95202. /* "uvloop/handles/process.pyx":54
  95203. * if pass_fds:
  95204. * for fd in pass_fds:
  95205. * if not os_get_inheritable(fd): # <<<<<<<<<<<<<<
  95206. * restore_inheritable.add(fd)
  95207. * os_set_inheritable(fd, True)
  95208. */
  95209. __Pyx_INCREF(__pyx_v_6uvloop_4loop_os_get_inheritable);
  95210. __pyx_t_9 = __pyx_v_6uvloop_4loop_os_get_inheritable; __pyx_t_10 = NULL;
  95211. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
  95212. __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
  95213. if (likely(__pyx_t_10)) {
  95214. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
  95215. __Pyx_INCREF(__pyx_t_10);
  95216. __Pyx_INCREF(function);
  95217. __Pyx_DECREF_SET(__pyx_t_9, function);
  95218. }
  95219. }
  95220. __pyx_t_8 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_10, __pyx_v_fd) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_fd);
  95221. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  95222. if (unlikely(!__pyx_t_8)) __PYX_ERR(6, 54, __pyx_L4_error)
  95223. __Pyx_GOTREF(__pyx_t_8);
  95224. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  95225. __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(6, 54, __pyx_L4_error)
  95226. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  95227. __pyx_t_11 = ((!__pyx_t_2) != 0);
  95228. if (__pyx_t_11) {
  95229. /* "uvloop/handles/process.pyx":55
  95230. * for fd in pass_fds:
  95231. * if not os_get_inheritable(fd):
  95232. * restore_inheritable.add(fd) # <<<<<<<<<<<<<<
  95233. * os_set_inheritable(fd, True)
  95234. * except Exception:
  95235. */
  95236. __pyx_t_12 = PySet_Add(__pyx_v_restore_inheritable, __pyx_v_fd); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(6, 55, __pyx_L4_error)
  95237. /* "uvloop/handles/process.pyx":56
  95238. * if not os_get_inheritable(fd):
  95239. * restore_inheritable.add(fd)
  95240. * os_set_inheritable(fd, True) # <<<<<<<<<<<<<<
  95241. * except Exception:
  95242. * self._abort_init()
  95243. */
  95244. __Pyx_INCREF(__pyx_v_6uvloop_4loop_os_set_inheritable);
  95245. __pyx_t_9 = __pyx_v_6uvloop_4loop_os_set_inheritable; __pyx_t_10 = NULL;
  95246. __pyx_t_13 = 0;
  95247. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
  95248. __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
  95249. if (likely(__pyx_t_10)) {
  95250. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
  95251. __Pyx_INCREF(__pyx_t_10);
  95252. __Pyx_INCREF(function);
  95253. __Pyx_DECREF_SET(__pyx_t_9, function);
  95254. __pyx_t_13 = 1;
  95255. }
  95256. }
  95257. #if CYTHON_FAST_PYCALL
  95258. if (PyFunction_Check(__pyx_t_9)) {
  95259. PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_fd, Py_True};
  95260. __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_8)) __PYX_ERR(6, 56, __pyx_L4_error)
  95261. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  95262. __Pyx_GOTREF(__pyx_t_8);
  95263. } else
  95264. #endif
  95265. #if CYTHON_FAST_PYCCALL
  95266. if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
  95267. PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_fd, Py_True};
  95268. __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_8)) __PYX_ERR(6, 56, __pyx_L4_error)
  95269. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  95270. __Pyx_GOTREF(__pyx_t_8);
  95271. } else
  95272. #endif
  95273. {
  95274. __pyx_t_14 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_14)) __PYX_ERR(6, 56, __pyx_L4_error)
  95275. __Pyx_GOTREF(__pyx_t_14);
  95276. if (__pyx_t_10) {
  95277. __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_10); __pyx_t_10 = NULL;
  95278. }
  95279. __Pyx_INCREF(__pyx_v_fd);
  95280. __Pyx_GIVEREF(__pyx_v_fd);
  95281. PyTuple_SET_ITEM(__pyx_t_14, 0+__pyx_t_13, __pyx_v_fd);
  95282. __Pyx_INCREF(Py_True);
  95283. __Pyx_GIVEREF(Py_True);
  95284. PyTuple_SET_ITEM(__pyx_t_14, 1+__pyx_t_13, Py_True);
  95285. __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_14, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(6, 56, __pyx_L4_error)
  95286. __Pyx_GOTREF(__pyx_t_8);
  95287. __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  95288. }
  95289. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  95290. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  95291. /* "uvloop/handles/process.pyx":54
  95292. * if pass_fds:
  95293. * for fd in pass_fds:
  95294. * if not os_get_inheritable(fd): # <<<<<<<<<<<<<<
  95295. * restore_inheritable.add(fd)
  95296. * os_set_inheritable(fd, True)
  95297. */
  95298. }
  95299. /* "uvloop/handles/process.pyx":53
  95300. * restore_inheritable = set()
  95301. * if pass_fds:
  95302. * for fd in pass_fds: # <<<<<<<<<<<<<<
  95303. * if not os_get_inheritable(fd):
  95304. * restore_inheritable.add(fd)
  95305. */
  95306. }
  95307. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  95308. /* "uvloop/handles/process.pyx":52
  95309. *
  95310. * restore_inheritable = set()
  95311. * if pass_fds: # <<<<<<<<<<<<<<
  95312. * for fd in pass_fds:
  95313. * if not os_get_inheritable(fd):
  95314. */
  95315. }
  95316. /* "uvloop/handles/process.pyx":47
  95317. * self._handle.data = NULL
  95318. *
  95319. * try: # <<<<<<<<<<<<<<
  95320. * self._init_options(args, env, cwd, start_new_session,
  95321. * _stdin, _stdout, _stderr)
  95322. */
  95323. }
  95324. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  95325. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  95326. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  95327. goto __pyx_L9_try_end;
  95328. __pyx_L4_error:;
  95329. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  95330. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  95331. __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
  95332. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  95333. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  95334. /* "uvloop/handles/process.pyx":57
  95335. * restore_inheritable.add(fd)
  95336. * os_set_inheritable(fd, True)
  95337. * except Exception: # <<<<<<<<<<<<<<
  95338. * self._abort_init()
  95339. * raise
  95340. */
  95341. __pyx_t_13 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
  95342. if (__pyx_t_13) {
  95343. __Pyx_AddTraceback("uvloop.loop.UVProcess._init", __pyx_clineno, __pyx_lineno, __pyx_filename);
  95344. if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_8, &__pyx_t_9) < 0) __PYX_ERR(6, 57, __pyx_L6_except_error)
  95345. __Pyx_GOTREF(__pyx_t_1);
  95346. __Pyx_GOTREF(__pyx_t_8);
  95347. __Pyx_GOTREF(__pyx_t_9);
  95348. /* "uvloop/handles/process.pyx":58
  95349. * os_set_inheritable(fd, True)
  95350. * except Exception:
  95351. * self._abort_init() # <<<<<<<<<<<<<<
  95352. * raise
  95353. *
  95354. */
  95355. __pyx_t_14 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcess *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._abort_init(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_14)) __PYX_ERR(6, 58, __pyx_L6_except_error)
  95356. __Pyx_GOTREF(__pyx_t_14);
  95357. __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  95358. /* "uvloop/handles/process.pyx":59
  95359. * except Exception:
  95360. * self._abort_init()
  95361. * raise # <<<<<<<<<<<<<<
  95362. *
  95363. * if __forking or loop.active_process_handler is not None:
  95364. */
  95365. __Pyx_GIVEREF(__pyx_t_1);
  95366. __Pyx_GIVEREF(__pyx_t_8);
  95367. __Pyx_XGIVEREF(__pyx_t_9);
  95368. __Pyx_ErrRestoreWithState(__pyx_t_1, __pyx_t_8, __pyx_t_9);
  95369. __pyx_t_1 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0;
  95370. __PYX_ERR(6, 59, __pyx_L6_except_error)
  95371. }
  95372. goto __pyx_L6_except_error;
  95373. __pyx_L6_except_error:;
  95374. /* "uvloop/handles/process.pyx":47
  95375. * self._handle.data = NULL
  95376. *
  95377. * try: # <<<<<<<<<<<<<<
  95378. * self._init_options(args, env, cwd, start_new_session,
  95379. * _stdin, _stdout, _stderr)
  95380. */
  95381. __Pyx_XGIVEREF(__pyx_t_3);
  95382. __Pyx_XGIVEREF(__pyx_t_4);
  95383. __Pyx_XGIVEREF(__pyx_t_5);
  95384. __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
  95385. goto __pyx_L1_error;
  95386. __pyx_L9_try_end:;
  95387. }
  95388. /* "uvloop/handles/process.pyx":61
  95389. * raise
  95390. *
  95391. * if __forking or loop.active_process_handler is not None: # <<<<<<<<<<<<<<
  95392. * # Our pthread_atfork handlers won't work correctly when
  95393. * # another loop is forking in another thread (even though
  95394. */
  95395. __pyx_t_2 = (__pyx_v_6uvloop_4loop___forking != 0);
  95396. if (!__pyx_t_2) {
  95397. } else {
  95398. __pyx_t_11 = __pyx_t_2;
  95399. goto __pyx_L17_bool_binop_done;
  95400. }
  95401. __pyx_t_2 = (((PyObject *)__pyx_v_loop->active_process_handler) != Py_None);
  95402. __pyx_t_15 = (__pyx_t_2 != 0);
  95403. __pyx_t_11 = __pyx_t_15;
  95404. __pyx_L17_bool_binop_done:;
  95405. if (unlikely(__pyx_t_11)) {
  95406. /* "uvloop/handles/process.pyx":65
  95407. * # another loop is forking in another thread (even though
  95408. * # GIL should help us to avoid that.)
  95409. * self._abort_init() # <<<<<<<<<<<<<<
  95410. * raise RuntimeError(
  95411. * 'Racing with another loop to spawn a process.')
  95412. */
  95413. __pyx_t_9 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcess *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._abort_init(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_9)) __PYX_ERR(6, 65, __pyx_L1_error)
  95414. __Pyx_GOTREF(__pyx_t_9);
  95415. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  95416. /* "uvloop/handles/process.pyx":66
  95417. * # GIL should help us to avoid that.)
  95418. * self._abort_init()
  95419. * raise RuntimeError( # <<<<<<<<<<<<<<
  95420. * 'Racing with another loop to spawn a process.')
  95421. *
  95422. */
  95423. __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__162, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(6, 66, __pyx_L1_error)
  95424. __Pyx_GOTREF(__pyx_t_9);
  95425. __Pyx_Raise(__pyx_t_9, 0, 0, 0);
  95426. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  95427. __PYX_ERR(6, 66, __pyx_L1_error)
  95428. /* "uvloop/handles/process.pyx":61
  95429. * raise
  95430. *
  95431. * if __forking or loop.active_process_handler is not None: # <<<<<<<<<<<<<<
  95432. * # Our pthread_atfork handlers won't work correctly when
  95433. * # another loop is forking in another thread (even though
  95434. */
  95435. }
  95436. /* "uvloop/handles/process.pyx":69
  95437. * 'Racing with another loop to spawn a process.')
  95438. *
  95439. * self._errpipe_read, self._errpipe_write = os_pipe() # <<<<<<<<<<<<<<
  95440. * try:
  95441. * os_set_inheritable(self._errpipe_write, True)
  95442. */
  95443. __Pyx_INCREF(__pyx_v_6uvloop_4loop_os_pipe);
  95444. __pyx_t_8 = __pyx_v_6uvloop_4loop_os_pipe; __pyx_t_1 = NULL;
  95445. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
  95446. __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_8);
  95447. if (likely(__pyx_t_1)) {
  95448. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
  95449. __Pyx_INCREF(__pyx_t_1);
  95450. __Pyx_INCREF(function);
  95451. __Pyx_DECREF_SET(__pyx_t_8, function);
  95452. }
  95453. }
  95454. __pyx_t_9 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_8);
  95455. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  95456. if (unlikely(!__pyx_t_9)) __PYX_ERR(6, 69, __pyx_L1_error)
  95457. __Pyx_GOTREF(__pyx_t_9);
  95458. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  95459. if ((likely(PyTuple_CheckExact(__pyx_t_9))) || (PyList_CheckExact(__pyx_t_9))) {
  95460. PyObject* sequence = __pyx_t_9;
  95461. Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
  95462. if (unlikely(size != 2)) {
  95463. if (size > 2) __Pyx_RaiseTooManyValuesError(2);
  95464. else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
  95465. __PYX_ERR(6, 69, __pyx_L1_error)
  95466. }
  95467. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  95468. if (likely(PyTuple_CheckExact(sequence))) {
  95469. __pyx_t_8 = PyTuple_GET_ITEM(sequence, 0);
  95470. __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1);
  95471. } else {
  95472. __pyx_t_8 = PyList_GET_ITEM(sequence, 0);
  95473. __pyx_t_1 = PyList_GET_ITEM(sequence, 1);
  95474. }
  95475. __Pyx_INCREF(__pyx_t_8);
  95476. __Pyx_INCREF(__pyx_t_1);
  95477. #else
  95478. __pyx_t_8 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(6, 69, __pyx_L1_error)
  95479. __Pyx_GOTREF(__pyx_t_8);
  95480. __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 69, __pyx_L1_error)
  95481. __Pyx_GOTREF(__pyx_t_1);
  95482. #endif
  95483. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  95484. } else {
  95485. Py_ssize_t index = -1;
  95486. __pyx_t_14 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_14)) __PYX_ERR(6, 69, __pyx_L1_error)
  95487. __Pyx_GOTREF(__pyx_t_14);
  95488. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  95489. __pyx_t_16 = Py_TYPE(__pyx_t_14)->tp_iternext;
  95490. index = 0; __pyx_t_8 = __pyx_t_16(__pyx_t_14); if (unlikely(!__pyx_t_8)) goto __pyx_L19_unpacking_failed;
  95491. __Pyx_GOTREF(__pyx_t_8);
  95492. index = 1; __pyx_t_1 = __pyx_t_16(__pyx_t_14); if (unlikely(!__pyx_t_1)) goto __pyx_L19_unpacking_failed;
  95493. __Pyx_GOTREF(__pyx_t_1);
  95494. if (__Pyx_IternextUnpackEndCheck(__pyx_t_16(__pyx_t_14), 2) < 0) __PYX_ERR(6, 69, __pyx_L1_error)
  95495. __pyx_t_16 = NULL;
  95496. __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  95497. goto __pyx_L20_unpacking_done;
  95498. __pyx_L19_unpacking_failed:;
  95499. __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  95500. __pyx_t_16 = NULL;
  95501. if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
  95502. __PYX_ERR(6, 69, __pyx_L1_error)
  95503. __pyx_L20_unpacking_done:;
  95504. }
  95505. __Pyx_GIVEREF(__pyx_t_8);
  95506. __Pyx_GOTREF(__pyx_v_self->_errpipe_read);
  95507. __Pyx_DECREF(__pyx_v_self->_errpipe_read);
  95508. __pyx_v_self->_errpipe_read = __pyx_t_8;
  95509. __pyx_t_8 = 0;
  95510. __Pyx_GIVEREF(__pyx_t_1);
  95511. __Pyx_GOTREF(__pyx_v_self->_errpipe_write);
  95512. __Pyx_DECREF(__pyx_v_self->_errpipe_write);
  95513. __pyx_v_self->_errpipe_write = __pyx_t_1;
  95514. __pyx_t_1 = 0;
  95515. /* "uvloop/handles/process.pyx":70
  95516. *
  95517. * self._errpipe_read, self._errpipe_write = os_pipe()
  95518. * try: # <<<<<<<<<<<<<<
  95519. * os_set_inheritable(self._errpipe_write, True)
  95520. *
  95521. */
  95522. /*try:*/ {
  95523. /* "uvloop/handles/process.pyx":71
  95524. * self._errpipe_read, self._errpipe_write = os_pipe()
  95525. * try:
  95526. * os_set_inheritable(self._errpipe_write, True) # <<<<<<<<<<<<<<
  95527. *
  95528. * self._preexec_fn = preexec_fn
  95529. */
  95530. __Pyx_INCREF(__pyx_v_6uvloop_4loop_os_set_inheritable);
  95531. __pyx_t_1 = __pyx_v_6uvloop_4loop_os_set_inheritable; __pyx_t_8 = NULL;
  95532. __pyx_t_13 = 0;
  95533. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
  95534. __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_1);
  95535. if (likely(__pyx_t_8)) {
  95536. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
  95537. __Pyx_INCREF(__pyx_t_8);
  95538. __Pyx_INCREF(function);
  95539. __Pyx_DECREF_SET(__pyx_t_1, function);
  95540. __pyx_t_13 = 1;
  95541. }
  95542. }
  95543. #if CYTHON_FAST_PYCALL
  95544. if (PyFunction_Check(__pyx_t_1)) {
  95545. PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_self->_errpipe_write, Py_True};
  95546. __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_9)) __PYX_ERR(6, 71, __pyx_L22_error)
  95547. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  95548. __Pyx_GOTREF(__pyx_t_9);
  95549. } else
  95550. #endif
  95551. #if CYTHON_FAST_PYCCALL
  95552. if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
  95553. PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_self->_errpipe_write, Py_True};
  95554. __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_9)) __PYX_ERR(6, 71, __pyx_L22_error)
  95555. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  95556. __Pyx_GOTREF(__pyx_t_9);
  95557. } else
  95558. #endif
  95559. {
  95560. __pyx_t_14 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_14)) __PYX_ERR(6, 71, __pyx_L22_error)
  95561. __Pyx_GOTREF(__pyx_t_14);
  95562. if (__pyx_t_8) {
  95563. __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_8); __pyx_t_8 = NULL;
  95564. }
  95565. __Pyx_INCREF(__pyx_v_self->_errpipe_write);
  95566. __Pyx_GIVEREF(__pyx_v_self->_errpipe_write);
  95567. PyTuple_SET_ITEM(__pyx_t_14, 0+__pyx_t_13, __pyx_v_self->_errpipe_write);
  95568. __Pyx_INCREF(Py_True);
  95569. __Pyx_GIVEREF(Py_True);
  95570. PyTuple_SET_ITEM(__pyx_t_14, 1+__pyx_t_13, Py_True);
  95571. __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_14, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(6, 71, __pyx_L22_error)
  95572. __Pyx_GOTREF(__pyx_t_9);
  95573. __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  95574. }
  95575. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  95576. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  95577. /* "uvloop/handles/process.pyx":73
  95578. * os_set_inheritable(self._errpipe_write, True)
  95579. *
  95580. * self._preexec_fn = preexec_fn # <<<<<<<<<<<<<<
  95581. * self._restore_signals = restore_signals
  95582. *
  95583. */
  95584. __Pyx_INCREF(__pyx_v_preexec_fn);
  95585. __Pyx_GIVEREF(__pyx_v_preexec_fn);
  95586. __Pyx_GOTREF(__pyx_v_self->_preexec_fn);
  95587. __Pyx_DECREF(__pyx_v_self->_preexec_fn);
  95588. __pyx_v_self->_preexec_fn = __pyx_v_preexec_fn;
  95589. /* "uvloop/handles/process.pyx":74
  95590. *
  95591. * self._preexec_fn = preexec_fn
  95592. * self._restore_signals = restore_signals # <<<<<<<<<<<<<<
  95593. *
  95594. * loop.active_process_handler = self
  95595. */
  95596. __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_restore_signals); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) __PYX_ERR(6, 74, __pyx_L22_error)
  95597. __pyx_v_self->_restore_signals = __pyx_t_11;
  95598. /* "uvloop/handles/process.pyx":76
  95599. * self._restore_signals = restore_signals
  95600. *
  95601. * loop.active_process_handler = self # <<<<<<<<<<<<<<
  95602. * __forking = 1
  95603. * __forking_loop = loop
  95604. */
  95605. __Pyx_INCREF(((PyObject *)__pyx_v_self));
  95606. __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  95607. __Pyx_GOTREF(__pyx_v_loop->active_process_handler);
  95608. __Pyx_DECREF(((PyObject *)__pyx_v_loop->active_process_handler));
  95609. __pyx_v_loop->active_process_handler = __pyx_v_self;
  95610. /* "uvloop/handles/process.pyx":77
  95611. *
  95612. * loop.active_process_handler = self
  95613. * __forking = 1 # <<<<<<<<<<<<<<
  95614. * __forking_loop = loop
  95615. *
  95616. */
  95617. __pyx_v_6uvloop_4loop___forking = 1;
  95618. /* "uvloop/handles/process.pyx":78
  95619. * loop.active_process_handler = self
  95620. * __forking = 1
  95621. * __forking_loop = loop # <<<<<<<<<<<<<<
  95622. *
  95623. * PyOS_BeforeFork()
  95624. */
  95625. __Pyx_INCREF(((PyObject *)__pyx_v_loop));
  95626. __Pyx_XGOTREF(((PyObject *)__pyx_v_6uvloop_4loop___forking_loop));
  95627. __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop___forking_loop, __pyx_v_loop);
  95628. __Pyx_GIVEREF(((PyObject *)__pyx_v_loop));
  95629. /* "uvloop/handles/process.pyx":80
  95630. * __forking_loop = loop
  95631. *
  95632. * PyOS_BeforeFork() # <<<<<<<<<<<<<<
  95633. *
  95634. * err = uv.uv_spawn(loop.uvloop,
  95635. */
  95636. PyOS_BeforeFork();
  95637. /* "uvloop/handles/process.pyx":82
  95638. * PyOS_BeforeFork()
  95639. *
  95640. * err = uv.uv_spawn(loop.uvloop, # <<<<<<<<<<<<<<
  95641. * <uv.uv_process_t*>self._handle,
  95642. * &self.options)
  95643. */
  95644. __pyx_v_err = uv_spawn(__pyx_v_loop->uvloop, ((uv_process_t *)__pyx_v_self->__pyx_base._handle), (&__pyx_v_self->options));
  95645. /* "uvloop/handles/process.pyx":86
  95646. * &self.options)
  95647. *
  95648. * __forking = 0 # <<<<<<<<<<<<<<
  95649. * __forking_loop = None
  95650. * loop.active_process_handler = None
  95651. */
  95652. __pyx_v_6uvloop_4loop___forking = 0;
  95653. /* "uvloop/handles/process.pyx":87
  95654. *
  95655. * __forking = 0
  95656. * __forking_loop = None # <<<<<<<<<<<<<<
  95657. * loop.active_process_handler = None
  95658. *
  95659. */
  95660. __Pyx_INCREF(Py_None);
  95661. __Pyx_XGOTREF(((PyObject *)__pyx_v_6uvloop_4loop___forking_loop));
  95662. __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop___forking_loop, ((struct __pyx_obj_6uvloop_4loop_Loop *)Py_None));
  95663. __Pyx_GIVEREF(Py_None);
  95664. /* "uvloop/handles/process.pyx":88
  95665. * __forking = 0
  95666. * __forking_loop = None
  95667. * loop.active_process_handler = None # <<<<<<<<<<<<<<
  95668. *
  95669. * PyOS_AfterFork_Parent()
  95670. */
  95671. __Pyx_INCREF(Py_None);
  95672. __Pyx_GIVEREF(Py_None);
  95673. __Pyx_GOTREF(__pyx_v_loop->active_process_handler);
  95674. __Pyx_DECREF(((PyObject *)__pyx_v_loop->active_process_handler));
  95675. __pyx_v_loop->active_process_handler = ((struct __pyx_obj_6uvloop_4loop_UVProcess *)Py_None);
  95676. /* "uvloop/handles/process.pyx":90
  95677. * loop.active_process_handler = None
  95678. *
  95679. * PyOS_AfterFork_Parent() # <<<<<<<<<<<<<<
  95680. *
  95681. * if err < 0:
  95682. */
  95683. PyOS_AfterFork_Parent();
  95684. /* "uvloop/handles/process.pyx":92
  95685. * PyOS_AfterFork_Parent()
  95686. *
  95687. * if err < 0: # <<<<<<<<<<<<<<
  95688. * self._close_process_handle()
  95689. * self._abort_init()
  95690. */
  95691. __pyx_t_11 = ((__pyx_v_err < 0) != 0);
  95692. if (unlikely(__pyx_t_11)) {
  95693. /* "uvloop/handles/process.pyx":93
  95694. *
  95695. * if err < 0:
  95696. * self._close_process_handle() # <<<<<<<<<<<<<<
  95697. * self._abort_init()
  95698. * raise convert_error(err)
  95699. */
  95700. __pyx_t_9 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcess *)__pyx_v_self->__pyx_base.__pyx_vtab)->_close_process_handle(__pyx_v_self); if (unlikely(!__pyx_t_9)) __PYX_ERR(6, 93, __pyx_L22_error)
  95701. __Pyx_GOTREF(__pyx_t_9);
  95702. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  95703. /* "uvloop/handles/process.pyx":94
  95704. * if err < 0:
  95705. * self._close_process_handle()
  95706. * self._abort_init() # <<<<<<<<<<<<<<
  95707. * raise convert_error(err)
  95708. *
  95709. */
  95710. __pyx_t_9 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcess *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._abort_init(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_9)) __PYX_ERR(6, 94, __pyx_L22_error)
  95711. __Pyx_GOTREF(__pyx_t_9);
  95712. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  95713. /* "uvloop/handles/process.pyx":95
  95714. * self._close_process_handle()
  95715. * self._abort_init()
  95716. * raise convert_error(err) # <<<<<<<<<<<<<<
  95717. *
  95718. * self._finish_init()
  95719. */
  95720. __pyx_t_9 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_9)) __PYX_ERR(6, 95, __pyx_L22_error)
  95721. __Pyx_GOTREF(__pyx_t_9);
  95722. __Pyx_Raise(__pyx_t_9, 0, 0, 0);
  95723. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  95724. __PYX_ERR(6, 95, __pyx_L22_error)
  95725. /* "uvloop/handles/process.pyx":92
  95726. * PyOS_AfterFork_Parent()
  95727. *
  95728. * if err < 0: # <<<<<<<<<<<<<<
  95729. * self._close_process_handle()
  95730. * self._abort_init()
  95731. */
  95732. }
  95733. /* "uvloop/handles/process.pyx":97
  95734. * raise convert_error(err)
  95735. *
  95736. * self._finish_init() # <<<<<<<<<<<<<<
  95737. *
  95738. * os_close(self._errpipe_write)
  95739. */
  95740. __pyx_t_9 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcess *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._finish_init(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_9)) __PYX_ERR(6, 97, __pyx_L22_error)
  95741. __Pyx_GOTREF(__pyx_t_9);
  95742. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  95743. /* "uvloop/handles/process.pyx":99
  95744. * self._finish_init()
  95745. *
  95746. * os_close(self._errpipe_write) # <<<<<<<<<<<<<<
  95747. *
  95748. * if preexec_fn is not None:
  95749. */
  95750. __Pyx_INCREF(__pyx_v_6uvloop_4loop_os_close);
  95751. __pyx_t_1 = __pyx_v_6uvloop_4loop_os_close; __pyx_t_14 = NULL;
  95752. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
  95753. __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_1);
  95754. if (likely(__pyx_t_14)) {
  95755. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
  95756. __Pyx_INCREF(__pyx_t_14);
  95757. __Pyx_INCREF(function);
  95758. __Pyx_DECREF_SET(__pyx_t_1, function);
  95759. }
  95760. }
  95761. __pyx_t_9 = (__pyx_t_14) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_14, __pyx_v_self->_errpipe_write) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_self->_errpipe_write);
  95762. __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
  95763. if (unlikely(!__pyx_t_9)) __PYX_ERR(6, 99, __pyx_L22_error)
  95764. __Pyx_GOTREF(__pyx_t_9);
  95765. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  95766. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  95767. /* "uvloop/handles/process.pyx":101
  95768. * os_close(self._errpipe_write)
  95769. *
  95770. * if preexec_fn is not None: # <<<<<<<<<<<<<<
  95771. * errpipe_data = bytearray()
  95772. * while True:
  95773. */
  95774. __pyx_t_11 = (__pyx_v_preexec_fn != Py_None);
  95775. __pyx_t_15 = (__pyx_t_11 != 0);
  95776. if (__pyx_t_15) {
  95777. /* "uvloop/handles/process.pyx":102
  95778. *
  95779. * if preexec_fn is not None:
  95780. * errpipe_data = bytearray() # <<<<<<<<<<<<<<
  95781. * while True:
  95782. * # XXX: This is a blocking code that has to be
  95783. */
  95784. __pyx_t_9 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyByteArray_Type))); if (unlikely(!__pyx_t_9)) __PYX_ERR(6, 102, __pyx_L22_error)
  95785. __Pyx_GOTREF(__pyx_t_9);
  95786. __pyx_v_errpipe_data = __pyx_t_9;
  95787. __pyx_t_9 = 0;
  95788. /* "uvloop/handles/process.pyx":103
  95789. * if preexec_fn is not None:
  95790. * errpipe_data = bytearray()
  95791. * while True: # <<<<<<<<<<<<<<
  95792. * # XXX: This is a blocking code that has to be
  95793. * # rewritten (using loop.connect_read_pipe() or
  95794. */
  95795. while (1) {
  95796. /* "uvloop/handles/process.pyx":107
  95797. * # rewritten (using loop.connect_read_pipe() or
  95798. * # otherwise.)
  95799. * part = os_read(self._errpipe_read, 50000) # <<<<<<<<<<<<<<
  95800. * errpipe_data += part
  95801. * if not part or len(errpipe_data) > 50000:
  95802. */
  95803. __Pyx_INCREF(__pyx_v_6uvloop_4loop_os_read);
  95804. __pyx_t_1 = __pyx_v_6uvloop_4loop_os_read; __pyx_t_14 = NULL;
  95805. __pyx_t_13 = 0;
  95806. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
  95807. __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_1);
  95808. if (likely(__pyx_t_14)) {
  95809. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
  95810. __Pyx_INCREF(__pyx_t_14);
  95811. __Pyx_INCREF(function);
  95812. __Pyx_DECREF_SET(__pyx_t_1, function);
  95813. __pyx_t_13 = 1;
  95814. }
  95815. }
  95816. #if CYTHON_FAST_PYCALL
  95817. if (PyFunction_Check(__pyx_t_1)) {
  95818. PyObject *__pyx_temp[3] = {__pyx_t_14, __pyx_v_self->_errpipe_read, __pyx_int_50000};
  95819. __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_9)) __PYX_ERR(6, 107, __pyx_L22_error)
  95820. __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
  95821. __Pyx_GOTREF(__pyx_t_9);
  95822. } else
  95823. #endif
  95824. #if CYTHON_FAST_PYCCALL
  95825. if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
  95826. PyObject *__pyx_temp[3] = {__pyx_t_14, __pyx_v_self->_errpipe_read, __pyx_int_50000};
  95827. __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_9)) __PYX_ERR(6, 107, __pyx_L22_error)
  95828. __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
  95829. __Pyx_GOTREF(__pyx_t_9);
  95830. } else
  95831. #endif
  95832. {
  95833. __pyx_t_8 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_8)) __PYX_ERR(6, 107, __pyx_L22_error)
  95834. __Pyx_GOTREF(__pyx_t_8);
  95835. if (__pyx_t_14) {
  95836. __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_14); __pyx_t_14 = NULL;
  95837. }
  95838. __Pyx_INCREF(__pyx_v_self->_errpipe_read);
  95839. __Pyx_GIVEREF(__pyx_v_self->_errpipe_read);
  95840. PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_13, __pyx_v_self->_errpipe_read);
  95841. __Pyx_INCREF(__pyx_int_50000);
  95842. __Pyx_GIVEREF(__pyx_int_50000);
  95843. PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_13, __pyx_int_50000);
  95844. __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_8, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(6, 107, __pyx_L22_error)
  95845. __Pyx_GOTREF(__pyx_t_9);
  95846. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  95847. }
  95848. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  95849. __Pyx_XDECREF_SET(__pyx_v_part, __pyx_t_9);
  95850. __pyx_t_9 = 0;
  95851. /* "uvloop/handles/process.pyx":108
  95852. * # otherwise.)
  95853. * part = os_read(self._errpipe_read, 50000)
  95854. * errpipe_data += part # <<<<<<<<<<<<<<
  95855. * if not part or len(errpipe_data) > 50000:
  95856. * break
  95857. */
  95858. __pyx_t_9 = PyNumber_InPlaceAdd(__pyx_v_errpipe_data, __pyx_v_part); if (unlikely(!__pyx_t_9)) __PYX_ERR(6, 108, __pyx_L22_error)
  95859. __Pyx_GOTREF(__pyx_t_9);
  95860. __Pyx_DECREF_SET(__pyx_v_errpipe_data, __pyx_t_9);
  95861. __pyx_t_9 = 0;
  95862. /* "uvloop/handles/process.pyx":109
  95863. * part = os_read(self._errpipe_read, 50000)
  95864. * errpipe_data += part
  95865. * if not part or len(errpipe_data) > 50000: # <<<<<<<<<<<<<<
  95866. * break
  95867. *
  95868. */
  95869. __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_part); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(6, 109, __pyx_L22_error)
  95870. __pyx_t_2 = ((!__pyx_t_11) != 0);
  95871. if (!__pyx_t_2) {
  95872. } else {
  95873. __pyx_t_15 = __pyx_t_2;
  95874. goto __pyx_L29_bool_binop_done;
  95875. }
  95876. __pyx_t_6 = PyObject_Length(__pyx_v_errpipe_data); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(6, 109, __pyx_L22_error)
  95877. __pyx_t_2 = ((__pyx_t_6 > 0xC350) != 0);
  95878. __pyx_t_15 = __pyx_t_2;
  95879. __pyx_L29_bool_binop_done:;
  95880. if (__pyx_t_15) {
  95881. /* "uvloop/handles/process.pyx":110
  95882. * errpipe_data += part
  95883. * if not part or len(errpipe_data) > 50000:
  95884. * break # <<<<<<<<<<<<<<
  95885. *
  95886. * finally:
  95887. */
  95888. goto __pyx_L27_break;
  95889. /* "uvloop/handles/process.pyx":109
  95890. * part = os_read(self._errpipe_read, 50000)
  95891. * errpipe_data += part
  95892. * if not part or len(errpipe_data) > 50000: # <<<<<<<<<<<<<<
  95893. * break
  95894. *
  95895. */
  95896. }
  95897. }
  95898. __pyx_L27_break:;
  95899. /* "uvloop/handles/process.pyx":101
  95900. * os_close(self._errpipe_write)
  95901. *
  95902. * if preexec_fn is not None: # <<<<<<<<<<<<<<
  95903. * errpipe_data = bytearray()
  95904. * while True:
  95905. */
  95906. }
  95907. }
  95908. /* "uvloop/handles/process.pyx":113
  95909. *
  95910. * finally:
  95911. * os_close(self._errpipe_read) # <<<<<<<<<<<<<<
  95912. * try:
  95913. * os_close(self._errpipe_write)
  95914. */
  95915. /*finally:*/ {
  95916. /*normal exit:*/{
  95917. __Pyx_INCREF(__pyx_v_6uvloop_4loop_os_close);
  95918. __pyx_t_1 = __pyx_v_6uvloop_4loop_os_close; __pyx_t_8 = NULL;
  95919. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
  95920. __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_1);
  95921. if (likely(__pyx_t_8)) {
  95922. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
  95923. __Pyx_INCREF(__pyx_t_8);
  95924. __Pyx_INCREF(function);
  95925. __Pyx_DECREF_SET(__pyx_t_1, function);
  95926. }
  95927. }
  95928. __pyx_t_9 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_8, __pyx_v_self->_errpipe_read) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_self->_errpipe_read);
  95929. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  95930. if (unlikely(!__pyx_t_9)) __PYX_ERR(6, 113, __pyx_L1_error)
  95931. __Pyx_GOTREF(__pyx_t_9);
  95932. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  95933. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  95934. /* "uvloop/handles/process.pyx":114
  95935. * finally:
  95936. * os_close(self._errpipe_read)
  95937. * try: # <<<<<<<<<<<<<<
  95938. * os_close(self._errpipe_write)
  95939. * except OSError:
  95940. */
  95941. {
  95942. __Pyx_PyThreadState_declare
  95943. __Pyx_PyThreadState_assign
  95944. __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_4, &__pyx_t_3);
  95945. __Pyx_XGOTREF(__pyx_t_5);
  95946. __Pyx_XGOTREF(__pyx_t_4);
  95947. __Pyx_XGOTREF(__pyx_t_3);
  95948. /*try:*/ {
  95949. /* "uvloop/handles/process.pyx":115
  95950. * os_close(self._errpipe_read)
  95951. * try:
  95952. * os_close(self._errpipe_write) # <<<<<<<<<<<<<<
  95953. * except OSError:
  95954. * # Might be already closed
  95955. */
  95956. __Pyx_INCREF(__pyx_v_6uvloop_4loop_os_close);
  95957. __pyx_t_1 = __pyx_v_6uvloop_4loop_os_close; __pyx_t_8 = NULL;
  95958. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
  95959. __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_1);
  95960. if (likely(__pyx_t_8)) {
  95961. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
  95962. __Pyx_INCREF(__pyx_t_8);
  95963. __Pyx_INCREF(function);
  95964. __Pyx_DECREF_SET(__pyx_t_1, function);
  95965. }
  95966. }
  95967. __pyx_t_9 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_8, __pyx_v_self->_errpipe_write) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_self->_errpipe_write);
  95968. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  95969. if (unlikely(!__pyx_t_9)) __PYX_ERR(6, 115, __pyx_L31_error)
  95970. __Pyx_GOTREF(__pyx_t_9);
  95971. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  95972. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  95973. /* "uvloop/handles/process.pyx":114
  95974. * finally:
  95975. * os_close(self._errpipe_read)
  95976. * try: # <<<<<<<<<<<<<<
  95977. * os_close(self._errpipe_write)
  95978. * except OSError:
  95979. */
  95980. }
  95981. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  95982. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  95983. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  95984. goto __pyx_L36_try_end;
  95985. __pyx_L31_error:;
  95986. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  95987. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  95988. __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
  95989. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  95990. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  95991. /* "uvloop/handles/process.pyx":116
  95992. * try:
  95993. * os_close(self._errpipe_write)
  95994. * except OSError: # <<<<<<<<<<<<<<
  95995. * # Might be already closed
  95996. * pass
  95997. */
  95998. __pyx_t_13 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_OSError);
  95999. if (__pyx_t_13) {
  96000. __Pyx_ErrRestore(0,0,0);
  96001. goto __pyx_L32_exception_handled;
  96002. }
  96003. goto __pyx_L33_except_error;
  96004. __pyx_L33_except_error:;
  96005. /* "uvloop/handles/process.pyx":114
  96006. * finally:
  96007. * os_close(self._errpipe_read)
  96008. * try: # <<<<<<<<<<<<<<
  96009. * os_close(self._errpipe_write)
  96010. * except OSError:
  96011. */
  96012. __Pyx_XGIVEREF(__pyx_t_5);
  96013. __Pyx_XGIVEREF(__pyx_t_4);
  96014. __Pyx_XGIVEREF(__pyx_t_3);
  96015. __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_4, __pyx_t_3);
  96016. goto __pyx_L1_error;
  96017. __pyx_L32_exception_handled:;
  96018. __Pyx_XGIVEREF(__pyx_t_5);
  96019. __Pyx_XGIVEREF(__pyx_t_4);
  96020. __Pyx_XGIVEREF(__pyx_t_3);
  96021. __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_4, __pyx_t_3);
  96022. __pyx_L36_try_end:;
  96023. }
  96024. /* "uvloop/handles/process.pyx":120
  96025. * pass
  96026. *
  96027. * fds_to_close = self._fds_to_close # <<<<<<<<<<<<<<
  96028. * self._fds_to_close = None
  96029. * for fd in fds_to_close:
  96030. */
  96031. __pyx_t_9 = __pyx_v_self->_fds_to_close;
  96032. __Pyx_INCREF(__pyx_t_9);
  96033. __pyx_v_fds_to_close = ((PyObject*)__pyx_t_9);
  96034. __pyx_t_9 = 0;
  96035. /* "uvloop/handles/process.pyx":121
  96036. *
  96037. * fds_to_close = self._fds_to_close
  96038. * self._fds_to_close = None # <<<<<<<<<<<<<<
  96039. * for fd in fds_to_close:
  96040. * os_close(fd)
  96041. */
  96042. __Pyx_INCREF(Py_None);
  96043. __Pyx_GIVEREF(Py_None);
  96044. __Pyx_GOTREF(__pyx_v_self->_fds_to_close);
  96045. __Pyx_DECREF(__pyx_v_self->_fds_to_close);
  96046. __pyx_v_self->_fds_to_close = ((PyObject*)Py_None);
  96047. /* "uvloop/handles/process.pyx":122
  96048. * fds_to_close = self._fds_to_close
  96049. * self._fds_to_close = None
  96050. * for fd in fds_to_close: # <<<<<<<<<<<<<<
  96051. * os_close(fd)
  96052. *
  96053. */
  96054. __pyx_t_6 = 0;
  96055. __pyx_t_1 = __Pyx_set_iterator(__pyx_v_fds_to_close, 1, (&__pyx_t_17), (&__pyx_t_13)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 122, __pyx_L1_error)
  96056. __Pyx_GOTREF(__pyx_t_1);
  96057. __Pyx_XDECREF(__pyx_t_9);
  96058. __pyx_t_9 = __pyx_t_1;
  96059. __pyx_t_1 = 0;
  96060. while (1) {
  96061. __pyx_t_18 = __Pyx_set_iter_next(__pyx_t_9, __pyx_t_17, &__pyx_t_6, &__pyx_t_1, __pyx_t_13);
  96062. if (unlikely(__pyx_t_18 == 0)) break;
  96063. if (unlikely(__pyx_t_18 == -1)) __PYX_ERR(6, 122, __pyx_L1_error)
  96064. __Pyx_GOTREF(__pyx_t_1);
  96065. __Pyx_XDECREF_SET(__pyx_v_fd, __pyx_t_1);
  96066. __pyx_t_1 = 0;
  96067. /* "uvloop/handles/process.pyx":123
  96068. * self._fds_to_close = None
  96069. * for fd in fds_to_close:
  96070. * os_close(fd) # <<<<<<<<<<<<<<
  96071. *
  96072. * for fd in restore_inheritable:
  96073. */
  96074. __Pyx_INCREF(__pyx_v_6uvloop_4loop_os_close);
  96075. __pyx_t_8 = __pyx_v_6uvloop_4loop_os_close; __pyx_t_14 = NULL;
  96076. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
  96077. __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_8);
  96078. if (likely(__pyx_t_14)) {
  96079. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
  96080. __Pyx_INCREF(__pyx_t_14);
  96081. __Pyx_INCREF(function);
  96082. __Pyx_DECREF_SET(__pyx_t_8, function);
  96083. }
  96084. }
  96085. __pyx_t_1 = (__pyx_t_14) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_14, __pyx_v_fd) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_fd);
  96086. __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
  96087. if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 123, __pyx_L1_error)
  96088. __Pyx_GOTREF(__pyx_t_1);
  96089. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  96090. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  96091. }
  96092. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  96093. /* "uvloop/handles/process.pyx":125
  96094. * os_close(fd)
  96095. *
  96096. * for fd in restore_inheritable: # <<<<<<<<<<<<<<
  96097. * os_set_inheritable(fd, False)
  96098. *
  96099. */
  96100. __pyx_t_17 = 0;
  96101. __pyx_t_1 = __Pyx_set_iterator(__pyx_v_restore_inheritable, 1, (&__pyx_t_6), (&__pyx_t_13)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 125, __pyx_L1_error)
  96102. __Pyx_GOTREF(__pyx_t_1);
  96103. __Pyx_XDECREF(__pyx_t_9);
  96104. __pyx_t_9 = __pyx_t_1;
  96105. __pyx_t_1 = 0;
  96106. while (1) {
  96107. __pyx_t_18 = __Pyx_set_iter_next(__pyx_t_9, __pyx_t_6, &__pyx_t_17, &__pyx_t_1, __pyx_t_13);
  96108. if (unlikely(__pyx_t_18 == 0)) break;
  96109. if (unlikely(__pyx_t_18 == -1)) __PYX_ERR(6, 125, __pyx_L1_error)
  96110. __Pyx_GOTREF(__pyx_t_1);
  96111. __Pyx_XDECREF_SET(__pyx_v_fd, __pyx_t_1);
  96112. __pyx_t_1 = 0;
  96113. /* "uvloop/handles/process.pyx":126
  96114. *
  96115. * for fd in restore_inheritable:
  96116. * os_set_inheritable(fd, False) # <<<<<<<<<<<<<<
  96117. *
  96118. * # asyncio caches the PID in BaseSubprocessTransport,
  96119. */
  96120. __Pyx_INCREF(__pyx_v_6uvloop_4loop_os_set_inheritable);
  96121. __pyx_t_8 = __pyx_v_6uvloop_4loop_os_set_inheritable; __pyx_t_14 = NULL;
  96122. __pyx_t_18 = 0;
  96123. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
  96124. __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_8);
  96125. if (likely(__pyx_t_14)) {
  96126. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
  96127. __Pyx_INCREF(__pyx_t_14);
  96128. __Pyx_INCREF(function);
  96129. __Pyx_DECREF_SET(__pyx_t_8, function);
  96130. __pyx_t_18 = 1;
  96131. }
  96132. }
  96133. #if CYTHON_FAST_PYCALL
  96134. if (PyFunction_Check(__pyx_t_8)) {
  96135. PyObject *__pyx_temp[3] = {__pyx_t_14, __pyx_v_fd, Py_False};
  96136. __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_18, 2+__pyx_t_18); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 126, __pyx_L1_error)
  96137. __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
  96138. __Pyx_GOTREF(__pyx_t_1);
  96139. } else
  96140. #endif
  96141. #if CYTHON_FAST_PYCCALL
  96142. if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
  96143. PyObject *__pyx_temp[3] = {__pyx_t_14, __pyx_v_fd, Py_False};
  96144. __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_18, 2+__pyx_t_18); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 126, __pyx_L1_error)
  96145. __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
  96146. __Pyx_GOTREF(__pyx_t_1);
  96147. } else
  96148. #endif
  96149. {
  96150. __pyx_t_10 = PyTuple_New(2+__pyx_t_18); if (unlikely(!__pyx_t_10)) __PYX_ERR(6, 126, __pyx_L1_error)
  96151. __Pyx_GOTREF(__pyx_t_10);
  96152. if (__pyx_t_14) {
  96153. __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_14); __pyx_t_14 = NULL;
  96154. }
  96155. __Pyx_INCREF(__pyx_v_fd);
  96156. __Pyx_GIVEREF(__pyx_v_fd);
  96157. PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_18, __pyx_v_fd);
  96158. __Pyx_INCREF(Py_False);
  96159. __Pyx_GIVEREF(Py_False);
  96160. PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_18, Py_False);
  96161. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 126, __pyx_L1_error)
  96162. __Pyx_GOTREF(__pyx_t_1);
  96163. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  96164. }
  96165. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  96166. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  96167. }
  96168. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  96169. goto __pyx_L23;
  96170. }
  96171. __pyx_L22_error:;
  96172. /*exception exit:*/{
  96173. __Pyx_PyThreadState_declare
  96174. __Pyx_PyThreadState_assign
  96175. __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
  96176. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  96177. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  96178. __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
  96179. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  96180. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  96181. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22);
  96182. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5) < 0)) __Pyx_ErrFetch(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
  96183. __Pyx_XGOTREF(__pyx_t_3);
  96184. __Pyx_XGOTREF(__pyx_t_4);
  96185. __Pyx_XGOTREF(__pyx_t_5);
  96186. __Pyx_XGOTREF(__pyx_t_20);
  96187. __Pyx_XGOTREF(__pyx_t_21);
  96188. __Pyx_XGOTREF(__pyx_t_22);
  96189. __pyx_t_13 = __pyx_lineno; __pyx_t_18 = __pyx_clineno; __pyx_t_19 = __pyx_filename;
  96190. {
  96191. /* "uvloop/handles/process.pyx":113
  96192. *
  96193. * finally:
  96194. * os_close(self._errpipe_read) # <<<<<<<<<<<<<<
  96195. * try:
  96196. * os_close(self._errpipe_write)
  96197. */
  96198. __Pyx_INCREF(__pyx_v_6uvloop_4loop_os_close);
  96199. __pyx_t_1 = __pyx_v_6uvloop_4loop_os_close; __pyx_t_8 = NULL;
  96200. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
  96201. __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_1);
  96202. if (likely(__pyx_t_8)) {
  96203. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
  96204. __Pyx_INCREF(__pyx_t_8);
  96205. __Pyx_INCREF(function);
  96206. __Pyx_DECREF_SET(__pyx_t_1, function);
  96207. }
  96208. }
  96209. __pyx_t_9 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_8, __pyx_v_self->_errpipe_read) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_self->_errpipe_read);
  96210. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  96211. if (unlikely(!__pyx_t_9)) __PYX_ERR(6, 113, __pyx_L42_error)
  96212. __Pyx_GOTREF(__pyx_t_9);
  96213. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  96214. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  96215. /* "uvloop/handles/process.pyx":114
  96216. * finally:
  96217. * os_close(self._errpipe_read)
  96218. * try: # <<<<<<<<<<<<<<
  96219. * os_close(self._errpipe_write)
  96220. * except OSError:
  96221. */
  96222. {
  96223. __Pyx_PyThreadState_declare
  96224. __Pyx_PyThreadState_assign
  96225. __Pyx_ExceptionSave(&__pyx_t_23, &__pyx_t_24, &__pyx_t_25);
  96226. __Pyx_XGOTREF(__pyx_t_23);
  96227. __Pyx_XGOTREF(__pyx_t_24);
  96228. __Pyx_XGOTREF(__pyx_t_25);
  96229. /*try:*/ {
  96230. /* "uvloop/handles/process.pyx":115
  96231. * os_close(self._errpipe_read)
  96232. * try:
  96233. * os_close(self._errpipe_write) # <<<<<<<<<<<<<<
  96234. * except OSError:
  96235. * # Might be already closed
  96236. */
  96237. __Pyx_INCREF(__pyx_v_6uvloop_4loop_os_close);
  96238. __pyx_t_1 = __pyx_v_6uvloop_4loop_os_close; __pyx_t_8 = NULL;
  96239. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
  96240. __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_1);
  96241. if (likely(__pyx_t_8)) {
  96242. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
  96243. __Pyx_INCREF(__pyx_t_8);
  96244. __Pyx_INCREF(function);
  96245. __Pyx_DECREF_SET(__pyx_t_1, function);
  96246. }
  96247. }
  96248. __pyx_t_9 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_8, __pyx_v_self->_errpipe_write) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_self->_errpipe_write);
  96249. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  96250. if (unlikely(!__pyx_t_9)) __PYX_ERR(6, 115, __pyx_L43_error)
  96251. __Pyx_GOTREF(__pyx_t_9);
  96252. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  96253. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  96254. /* "uvloop/handles/process.pyx":114
  96255. * finally:
  96256. * os_close(self._errpipe_read)
  96257. * try: # <<<<<<<<<<<<<<
  96258. * os_close(self._errpipe_write)
  96259. * except OSError:
  96260. */
  96261. }
  96262. __Pyx_XDECREF(__pyx_t_23); __pyx_t_23 = 0;
  96263. __Pyx_XDECREF(__pyx_t_24); __pyx_t_24 = 0;
  96264. __Pyx_XDECREF(__pyx_t_25); __pyx_t_25 = 0;
  96265. goto __pyx_L48_try_end;
  96266. __pyx_L43_error:;
  96267. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  96268. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  96269. __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
  96270. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  96271. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  96272. /* "uvloop/handles/process.pyx":116
  96273. * try:
  96274. * os_close(self._errpipe_write)
  96275. * except OSError: # <<<<<<<<<<<<<<
  96276. * # Might be already closed
  96277. * pass
  96278. */
  96279. __pyx_t_26 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_OSError);
  96280. if (__pyx_t_26) {
  96281. __Pyx_ErrRestore(0,0,0);
  96282. goto __pyx_L44_exception_handled;
  96283. }
  96284. goto __pyx_L45_except_error;
  96285. __pyx_L45_except_error:;
  96286. /* "uvloop/handles/process.pyx":114
  96287. * finally:
  96288. * os_close(self._errpipe_read)
  96289. * try: # <<<<<<<<<<<<<<
  96290. * os_close(self._errpipe_write)
  96291. * except OSError:
  96292. */
  96293. __Pyx_XGIVEREF(__pyx_t_23);
  96294. __Pyx_XGIVEREF(__pyx_t_24);
  96295. __Pyx_XGIVEREF(__pyx_t_25);
  96296. __Pyx_ExceptionReset(__pyx_t_23, __pyx_t_24, __pyx_t_25);
  96297. goto __pyx_L42_error;
  96298. __pyx_L44_exception_handled:;
  96299. __Pyx_XGIVEREF(__pyx_t_23);
  96300. __Pyx_XGIVEREF(__pyx_t_24);
  96301. __Pyx_XGIVEREF(__pyx_t_25);
  96302. __Pyx_ExceptionReset(__pyx_t_23, __pyx_t_24, __pyx_t_25);
  96303. __pyx_L48_try_end:;
  96304. }
  96305. /* "uvloop/handles/process.pyx":120
  96306. * pass
  96307. *
  96308. * fds_to_close = self._fds_to_close # <<<<<<<<<<<<<<
  96309. * self._fds_to_close = None
  96310. * for fd in fds_to_close:
  96311. */
  96312. __pyx_t_9 = __pyx_v_self->_fds_to_close;
  96313. __Pyx_INCREF(__pyx_t_9);
  96314. __pyx_v_fds_to_close = ((PyObject*)__pyx_t_9);
  96315. __pyx_t_9 = 0;
  96316. /* "uvloop/handles/process.pyx":121
  96317. *
  96318. * fds_to_close = self._fds_to_close
  96319. * self._fds_to_close = None # <<<<<<<<<<<<<<
  96320. * for fd in fds_to_close:
  96321. * os_close(fd)
  96322. */
  96323. __Pyx_INCREF(Py_None);
  96324. __Pyx_GIVEREF(Py_None);
  96325. __Pyx_GOTREF(__pyx_v_self->_fds_to_close);
  96326. __Pyx_DECREF(__pyx_v_self->_fds_to_close);
  96327. __pyx_v_self->_fds_to_close = ((PyObject*)Py_None);
  96328. /* "uvloop/handles/process.pyx":122
  96329. * fds_to_close = self._fds_to_close
  96330. * self._fds_to_close = None
  96331. * for fd in fds_to_close: # <<<<<<<<<<<<<<
  96332. * os_close(fd)
  96333. *
  96334. */
  96335. __pyx_t_6 = 0;
  96336. __pyx_t_1 = __Pyx_set_iterator(__pyx_v_fds_to_close, 1, (&__pyx_t_17), (&__pyx_t_26)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 122, __pyx_L42_error)
  96337. __Pyx_GOTREF(__pyx_t_1);
  96338. __Pyx_XDECREF(__pyx_t_9);
  96339. __pyx_t_9 = __pyx_t_1;
  96340. __pyx_t_1 = 0;
  96341. while (1) {
  96342. __pyx_t_27 = __Pyx_set_iter_next(__pyx_t_9, __pyx_t_17, &__pyx_t_6, &__pyx_t_1, __pyx_t_26);
  96343. if (unlikely(__pyx_t_27 == 0)) break;
  96344. if (unlikely(__pyx_t_27 == -1)) __PYX_ERR(6, 122, __pyx_L42_error)
  96345. __Pyx_GOTREF(__pyx_t_1);
  96346. __Pyx_XDECREF_SET(__pyx_v_fd, __pyx_t_1);
  96347. __pyx_t_1 = 0;
  96348. /* "uvloop/handles/process.pyx":123
  96349. * self._fds_to_close = None
  96350. * for fd in fds_to_close:
  96351. * os_close(fd) # <<<<<<<<<<<<<<
  96352. *
  96353. * for fd in restore_inheritable:
  96354. */
  96355. __Pyx_INCREF(__pyx_v_6uvloop_4loop_os_close);
  96356. __pyx_t_8 = __pyx_v_6uvloop_4loop_os_close; __pyx_t_10 = NULL;
  96357. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
  96358. __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_8);
  96359. if (likely(__pyx_t_10)) {
  96360. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
  96361. __Pyx_INCREF(__pyx_t_10);
  96362. __Pyx_INCREF(function);
  96363. __Pyx_DECREF_SET(__pyx_t_8, function);
  96364. }
  96365. }
  96366. __pyx_t_1 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_10, __pyx_v_fd) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_fd);
  96367. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  96368. if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 123, __pyx_L42_error)
  96369. __Pyx_GOTREF(__pyx_t_1);
  96370. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  96371. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  96372. }
  96373. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  96374. /* "uvloop/handles/process.pyx":125
  96375. * os_close(fd)
  96376. *
  96377. * for fd in restore_inheritable: # <<<<<<<<<<<<<<
  96378. * os_set_inheritable(fd, False)
  96379. *
  96380. */
  96381. __pyx_t_17 = 0;
  96382. __pyx_t_1 = __Pyx_set_iterator(__pyx_v_restore_inheritable, 1, (&__pyx_t_6), (&__pyx_t_26)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 125, __pyx_L42_error)
  96383. __Pyx_GOTREF(__pyx_t_1);
  96384. __Pyx_XDECREF(__pyx_t_9);
  96385. __pyx_t_9 = __pyx_t_1;
  96386. __pyx_t_1 = 0;
  96387. while (1) {
  96388. __pyx_t_27 = __Pyx_set_iter_next(__pyx_t_9, __pyx_t_6, &__pyx_t_17, &__pyx_t_1, __pyx_t_26);
  96389. if (unlikely(__pyx_t_27 == 0)) break;
  96390. if (unlikely(__pyx_t_27 == -1)) __PYX_ERR(6, 125, __pyx_L42_error)
  96391. __Pyx_GOTREF(__pyx_t_1);
  96392. __Pyx_XDECREF_SET(__pyx_v_fd, __pyx_t_1);
  96393. __pyx_t_1 = 0;
  96394. /* "uvloop/handles/process.pyx":126
  96395. *
  96396. * for fd in restore_inheritable:
  96397. * os_set_inheritable(fd, False) # <<<<<<<<<<<<<<
  96398. *
  96399. * # asyncio caches the PID in BaseSubprocessTransport,
  96400. */
  96401. __Pyx_INCREF(__pyx_v_6uvloop_4loop_os_set_inheritable);
  96402. __pyx_t_8 = __pyx_v_6uvloop_4loop_os_set_inheritable; __pyx_t_10 = NULL;
  96403. __pyx_t_27 = 0;
  96404. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
  96405. __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_8);
  96406. if (likely(__pyx_t_10)) {
  96407. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
  96408. __Pyx_INCREF(__pyx_t_10);
  96409. __Pyx_INCREF(function);
  96410. __Pyx_DECREF_SET(__pyx_t_8, function);
  96411. __pyx_t_27 = 1;
  96412. }
  96413. }
  96414. #if CYTHON_FAST_PYCALL
  96415. if (PyFunction_Check(__pyx_t_8)) {
  96416. PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_fd, Py_False};
  96417. __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_27, 2+__pyx_t_27); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 126, __pyx_L42_error)
  96418. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  96419. __Pyx_GOTREF(__pyx_t_1);
  96420. } else
  96421. #endif
  96422. #if CYTHON_FAST_PYCCALL
  96423. if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
  96424. PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_fd, Py_False};
  96425. __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_27, 2+__pyx_t_27); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 126, __pyx_L42_error)
  96426. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  96427. __Pyx_GOTREF(__pyx_t_1);
  96428. } else
  96429. #endif
  96430. {
  96431. __pyx_t_14 = PyTuple_New(2+__pyx_t_27); if (unlikely(!__pyx_t_14)) __PYX_ERR(6, 126, __pyx_L42_error)
  96432. __Pyx_GOTREF(__pyx_t_14);
  96433. if (__pyx_t_10) {
  96434. __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_10); __pyx_t_10 = NULL;
  96435. }
  96436. __Pyx_INCREF(__pyx_v_fd);
  96437. __Pyx_GIVEREF(__pyx_v_fd);
  96438. PyTuple_SET_ITEM(__pyx_t_14, 0+__pyx_t_27, __pyx_v_fd);
  96439. __Pyx_INCREF(Py_False);
  96440. __Pyx_GIVEREF(Py_False);
  96441. PyTuple_SET_ITEM(__pyx_t_14, 1+__pyx_t_27, Py_False);
  96442. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_14, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 126, __pyx_L42_error)
  96443. __Pyx_GOTREF(__pyx_t_1);
  96444. __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  96445. }
  96446. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  96447. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  96448. }
  96449. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  96450. }
  96451. if (PY_MAJOR_VERSION >= 3) {
  96452. __Pyx_XGIVEREF(__pyx_t_20);
  96453. __Pyx_XGIVEREF(__pyx_t_21);
  96454. __Pyx_XGIVEREF(__pyx_t_22);
  96455. __Pyx_ExceptionReset(__pyx_t_20, __pyx_t_21, __pyx_t_22);
  96456. }
  96457. __Pyx_XGIVEREF(__pyx_t_3);
  96458. __Pyx_XGIVEREF(__pyx_t_4);
  96459. __Pyx_XGIVEREF(__pyx_t_5);
  96460. __Pyx_ErrRestore(__pyx_t_3, __pyx_t_4, __pyx_t_5);
  96461. __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
  96462. __pyx_lineno = __pyx_t_13; __pyx_clineno = __pyx_t_18; __pyx_filename = __pyx_t_19;
  96463. goto __pyx_L1_error;
  96464. __pyx_L42_error:;
  96465. if (PY_MAJOR_VERSION >= 3) {
  96466. __Pyx_XGIVEREF(__pyx_t_20);
  96467. __Pyx_XGIVEREF(__pyx_t_21);
  96468. __Pyx_XGIVEREF(__pyx_t_22);
  96469. __Pyx_ExceptionReset(__pyx_t_20, __pyx_t_21, __pyx_t_22);
  96470. }
  96471. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  96472. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  96473. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  96474. __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
  96475. goto __pyx_L1_error;
  96476. }
  96477. __pyx_L23:;
  96478. }
  96479. /* "uvloop/handles/process.pyx":131
  96480. * # so that the transport knows what the PID was even
  96481. * # after the process is finished.
  96482. * self._pid = (<uv.uv_process_t*>self._handle).pid # <<<<<<<<<<<<<<
  96483. *
  96484. * # Track the process handle (create a strong ref to it)
  96485. */
  96486. __pyx_t_9 = __Pyx_PyInt_From_int(((uv_process_t *)__pyx_v_self->__pyx_base._handle)->pid); if (unlikely(!__pyx_t_9)) __PYX_ERR(6, 131, __pyx_L1_error)
  96487. __Pyx_GOTREF(__pyx_t_9);
  96488. __Pyx_GIVEREF(__pyx_t_9);
  96489. __Pyx_GOTREF(__pyx_v_self->_pid);
  96490. __Pyx_DECREF(__pyx_v_self->_pid);
  96491. __pyx_v_self->_pid = __pyx_t_9;
  96492. __pyx_t_9 = 0;
  96493. /* "uvloop/handles/process.pyx":139
  96494. * # which will call `UVProcess._close()`, which will, in turn,
  96495. * # untrack this handle.
  96496. * self._loop._track_process(self) # <<<<<<<<<<<<<<
  96497. *
  96498. * if debug_flags & __PROCESS_DEBUG_SLEEP_AFTER_FORK:
  96499. */
  96500. __pyx_t_9 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_base._loop->__pyx_vtab)->_track_process(__pyx_v_self->__pyx_base._loop, __pyx_v_self); if (unlikely(!__pyx_t_9)) __PYX_ERR(6, 139, __pyx_L1_error)
  96501. __Pyx_GOTREF(__pyx_t_9);
  96502. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  96503. /* "uvloop/handles/process.pyx":141
  96504. * self._loop._track_process(self)
  96505. *
  96506. * if debug_flags & __PROCESS_DEBUG_SLEEP_AFTER_FORK: # <<<<<<<<<<<<<<
  96507. * time_sleep(1)
  96508. *
  96509. */
  96510. __pyx_t_9 = __Pyx_PyInt_AndObjC(__pyx_v_debug_flags, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(6, 141, __pyx_L1_error)
  96511. __Pyx_GOTREF(__pyx_t_9);
  96512. __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(6, 141, __pyx_L1_error)
  96513. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  96514. if (__pyx_t_15) {
  96515. /* "uvloop/handles/process.pyx":142
  96516. *
  96517. * if debug_flags & __PROCESS_DEBUG_SLEEP_AFTER_FORK:
  96518. * time_sleep(1) # <<<<<<<<<<<<<<
  96519. *
  96520. * if preexec_fn is not None and errpipe_data:
  96521. */
  96522. __Pyx_INCREF(__pyx_v_6uvloop_4loop_time_sleep);
  96523. __pyx_t_1 = __pyx_v_6uvloop_4loop_time_sleep; __pyx_t_8 = NULL;
  96524. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
  96525. __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_1);
  96526. if (likely(__pyx_t_8)) {
  96527. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
  96528. __Pyx_INCREF(__pyx_t_8);
  96529. __Pyx_INCREF(function);
  96530. __Pyx_DECREF_SET(__pyx_t_1, function);
  96531. }
  96532. }
  96533. __pyx_t_9 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_8, __pyx_int_1) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_int_1);
  96534. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  96535. if (unlikely(!__pyx_t_9)) __PYX_ERR(6, 142, __pyx_L1_error)
  96536. __Pyx_GOTREF(__pyx_t_9);
  96537. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  96538. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  96539. /* "uvloop/handles/process.pyx":141
  96540. * self._loop._track_process(self)
  96541. *
  96542. * if debug_flags & __PROCESS_DEBUG_SLEEP_AFTER_FORK: # <<<<<<<<<<<<<<
  96543. * time_sleep(1)
  96544. *
  96545. */
  96546. }
  96547. /* "uvloop/handles/process.pyx":144
  96548. * time_sleep(1)
  96549. *
  96550. * if preexec_fn is not None and errpipe_data: # <<<<<<<<<<<<<<
  96551. * # preexec_fn has raised an exception. The child
  96552. * # process must be dead now.
  96553. */
  96554. __pyx_t_2 = (__pyx_v_preexec_fn != Py_None);
  96555. __pyx_t_11 = (__pyx_t_2 != 0);
  96556. if (__pyx_t_11) {
  96557. } else {
  96558. __pyx_t_15 = __pyx_t_11;
  96559. goto __pyx_L55_bool_binop_done;
  96560. }
  96561. if (unlikely(!__pyx_v_errpipe_data)) { __Pyx_RaiseUnboundLocalError("errpipe_data"); __PYX_ERR(6, 144, __pyx_L1_error) }
  96562. __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_errpipe_data); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(6, 144, __pyx_L1_error)
  96563. __pyx_t_15 = __pyx_t_11;
  96564. __pyx_L55_bool_binop_done:;
  96565. if (__pyx_t_15) {
  96566. /* "uvloop/handles/process.pyx":147
  96567. * # preexec_fn has raised an exception. The child
  96568. * # process must be dead now.
  96569. * try: # <<<<<<<<<<<<<<
  96570. * exc_name, exc_msg = errpipe_data.split(b':', 1)
  96571. * exc_name = exc_name.decode()
  96572. */
  96573. {
  96574. __Pyx_PyThreadState_declare
  96575. __Pyx_PyThreadState_assign
  96576. __Pyx_ExceptionSave(&__pyx_t_22, &__pyx_t_21, &__pyx_t_20);
  96577. __Pyx_XGOTREF(__pyx_t_22);
  96578. __Pyx_XGOTREF(__pyx_t_21);
  96579. __Pyx_XGOTREF(__pyx_t_20);
  96580. /*try:*/ {
  96581. /* "uvloop/handles/process.pyx":148
  96582. * # process must be dead now.
  96583. * try:
  96584. * exc_name, exc_msg = errpipe_data.split(b':', 1) # <<<<<<<<<<<<<<
  96585. * exc_name = exc_name.decode()
  96586. * exc_msg = exc_msg.decode()
  96587. */
  96588. if (unlikely(!__pyx_v_errpipe_data)) { __Pyx_RaiseUnboundLocalError("errpipe_data"); __PYX_ERR(6, 148, __pyx_L57_error) }
  96589. __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_errpipe_data, __pyx_n_s_split); if (unlikely(!__pyx_t_9)) __PYX_ERR(6, 148, __pyx_L57_error)
  96590. __Pyx_GOTREF(__pyx_t_9);
  96591. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_tuple__164, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 148, __pyx_L57_error)
  96592. __Pyx_GOTREF(__pyx_t_1);
  96593. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  96594. if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
  96595. PyObject* sequence = __pyx_t_1;
  96596. Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
  96597. if (unlikely(size != 2)) {
  96598. if (size > 2) __Pyx_RaiseTooManyValuesError(2);
  96599. else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
  96600. __PYX_ERR(6, 148, __pyx_L57_error)
  96601. }
  96602. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  96603. if (likely(PyTuple_CheckExact(sequence))) {
  96604. __pyx_t_9 = PyTuple_GET_ITEM(sequence, 0);
  96605. __pyx_t_8 = PyTuple_GET_ITEM(sequence, 1);
  96606. } else {
  96607. __pyx_t_9 = PyList_GET_ITEM(sequence, 0);
  96608. __pyx_t_8 = PyList_GET_ITEM(sequence, 1);
  96609. }
  96610. __Pyx_INCREF(__pyx_t_9);
  96611. __Pyx_INCREF(__pyx_t_8);
  96612. #else
  96613. __pyx_t_9 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(6, 148, __pyx_L57_error)
  96614. __Pyx_GOTREF(__pyx_t_9);
  96615. __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(6, 148, __pyx_L57_error)
  96616. __Pyx_GOTREF(__pyx_t_8);
  96617. #endif
  96618. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  96619. } else {
  96620. Py_ssize_t index = -1;
  96621. __pyx_t_14 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_14)) __PYX_ERR(6, 148, __pyx_L57_error)
  96622. __Pyx_GOTREF(__pyx_t_14);
  96623. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  96624. __pyx_t_16 = Py_TYPE(__pyx_t_14)->tp_iternext;
  96625. index = 0; __pyx_t_9 = __pyx_t_16(__pyx_t_14); if (unlikely(!__pyx_t_9)) goto __pyx_L63_unpacking_failed;
  96626. __Pyx_GOTREF(__pyx_t_9);
  96627. index = 1; __pyx_t_8 = __pyx_t_16(__pyx_t_14); if (unlikely(!__pyx_t_8)) goto __pyx_L63_unpacking_failed;
  96628. __Pyx_GOTREF(__pyx_t_8);
  96629. if (__Pyx_IternextUnpackEndCheck(__pyx_t_16(__pyx_t_14), 2) < 0) __PYX_ERR(6, 148, __pyx_L57_error)
  96630. __pyx_t_16 = NULL;
  96631. __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  96632. goto __pyx_L64_unpacking_done;
  96633. __pyx_L63_unpacking_failed:;
  96634. __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  96635. __pyx_t_16 = NULL;
  96636. if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
  96637. __PYX_ERR(6, 148, __pyx_L57_error)
  96638. __pyx_L64_unpacking_done:;
  96639. }
  96640. __pyx_v_exc_name = __pyx_t_9;
  96641. __pyx_t_9 = 0;
  96642. __pyx_v_exc_msg = __pyx_t_8;
  96643. __pyx_t_8 = 0;
  96644. /* "uvloop/handles/process.pyx":149
  96645. * try:
  96646. * exc_name, exc_msg = errpipe_data.split(b':', 1)
  96647. * exc_name = exc_name.decode() # <<<<<<<<<<<<<<
  96648. * exc_msg = exc_msg.decode()
  96649. * except Exception:
  96650. */
  96651. __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_exc_name, __pyx_n_s_decode); if (unlikely(!__pyx_t_8)) __PYX_ERR(6, 149, __pyx_L57_error)
  96652. __Pyx_GOTREF(__pyx_t_8);
  96653. __pyx_t_9 = NULL;
  96654. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
  96655. __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
  96656. if (likely(__pyx_t_9)) {
  96657. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
  96658. __Pyx_INCREF(__pyx_t_9);
  96659. __Pyx_INCREF(function);
  96660. __Pyx_DECREF_SET(__pyx_t_8, function);
  96661. }
  96662. }
  96663. __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_9) : __Pyx_PyObject_CallNoArg(__pyx_t_8);
  96664. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  96665. if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 149, __pyx_L57_error)
  96666. __Pyx_GOTREF(__pyx_t_1);
  96667. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  96668. __Pyx_DECREF_SET(__pyx_v_exc_name, __pyx_t_1);
  96669. __pyx_t_1 = 0;
  96670. /* "uvloop/handles/process.pyx":150
  96671. * exc_name, exc_msg = errpipe_data.split(b':', 1)
  96672. * exc_name = exc_name.decode()
  96673. * exc_msg = exc_msg.decode() # <<<<<<<<<<<<<<
  96674. * except Exception:
  96675. * self._close()
  96676. */
  96677. __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_exc_msg, __pyx_n_s_decode); if (unlikely(!__pyx_t_8)) __PYX_ERR(6, 150, __pyx_L57_error)
  96678. __Pyx_GOTREF(__pyx_t_8);
  96679. __pyx_t_9 = NULL;
  96680. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
  96681. __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
  96682. if (likely(__pyx_t_9)) {
  96683. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
  96684. __Pyx_INCREF(__pyx_t_9);
  96685. __Pyx_INCREF(function);
  96686. __Pyx_DECREF_SET(__pyx_t_8, function);
  96687. }
  96688. }
  96689. __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_9) : __Pyx_PyObject_CallNoArg(__pyx_t_8);
  96690. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  96691. if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 150, __pyx_L57_error)
  96692. __Pyx_GOTREF(__pyx_t_1);
  96693. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  96694. __Pyx_DECREF_SET(__pyx_v_exc_msg, __pyx_t_1);
  96695. __pyx_t_1 = 0;
  96696. /* "uvloop/handles/process.pyx":147
  96697. * # preexec_fn has raised an exception. The child
  96698. * # process must be dead now.
  96699. * try: # <<<<<<<<<<<<<<
  96700. * exc_name, exc_msg = errpipe_data.split(b':', 1)
  96701. * exc_name = exc_name.decode()
  96702. */
  96703. }
  96704. __Pyx_XDECREF(__pyx_t_22); __pyx_t_22 = 0;
  96705. __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0;
  96706. __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0;
  96707. goto __pyx_L62_try_end;
  96708. __pyx_L57_error:;
  96709. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  96710. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  96711. __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
  96712. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  96713. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  96714. /* "uvloop/handles/process.pyx":151
  96715. * exc_name = exc_name.decode()
  96716. * exc_msg = exc_msg.decode()
  96717. * except Exception: # <<<<<<<<<<<<<<
  96718. * self._close()
  96719. * raise subprocess_SubprocessError(
  96720. */
  96721. __pyx_t_18 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
  96722. if (__pyx_t_18) {
  96723. __Pyx_AddTraceback("uvloop.loop.UVProcess._init", __pyx_clineno, __pyx_lineno, __pyx_filename);
  96724. if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_8, &__pyx_t_9) < 0) __PYX_ERR(6, 151, __pyx_L59_except_error)
  96725. __Pyx_GOTREF(__pyx_t_1);
  96726. __Pyx_GOTREF(__pyx_t_8);
  96727. __Pyx_GOTREF(__pyx_t_9);
  96728. /* "uvloop/handles/process.pyx":152
  96729. * exc_msg = exc_msg.decode()
  96730. * except Exception:
  96731. * self._close() # <<<<<<<<<<<<<<
  96732. * raise subprocess_SubprocessError(
  96733. * 'Bad exception data from child: {!r}'.format(
  96734. */
  96735. __pyx_t_14 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcess *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._close(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_14)) __PYX_ERR(6, 152, __pyx_L59_except_error)
  96736. __Pyx_GOTREF(__pyx_t_14);
  96737. __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  96738. /* "uvloop/handles/process.pyx":154
  96739. * self._close()
  96740. * raise subprocess_SubprocessError(
  96741. * 'Bad exception data from child: {!r}'.format( # <<<<<<<<<<<<<<
  96742. * errpipe_data))
  96743. * exc_cls = getattr(__builtins__, exc_name,
  96744. */
  96745. __pyx_t_28 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Bad_exception_data_from_child_r, __pyx_n_s_format); if (unlikely(!__pyx_t_28)) __PYX_ERR(6, 154, __pyx_L59_except_error)
  96746. __Pyx_GOTREF(__pyx_t_28);
  96747. /* "uvloop/handles/process.pyx":155
  96748. * raise subprocess_SubprocessError(
  96749. * 'Bad exception data from child: {!r}'.format(
  96750. * errpipe_data)) # <<<<<<<<<<<<<<
  96751. * exc_cls = getattr(__builtins__, exc_name,
  96752. * subprocess_SubprocessError)
  96753. */
  96754. if (unlikely(!__pyx_v_errpipe_data)) { __Pyx_RaiseUnboundLocalError("errpipe_data"); __PYX_ERR(6, 155, __pyx_L59_except_error) }
  96755. __pyx_t_29 = NULL;
  96756. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_28))) {
  96757. __pyx_t_29 = PyMethod_GET_SELF(__pyx_t_28);
  96758. if (likely(__pyx_t_29)) {
  96759. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_28);
  96760. __Pyx_INCREF(__pyx_t_29);
  96761. __Pyx_INCREF(function);
  96762. __Pyx_DECREF_SET(__pyx_t_28, function);
  96763. }
  96764. }
  96765. __pyx_t_10 = (__pyx_t_29) ? __Pyx_PyObject_Call2Args(__pyx_t_28, __pyx_t_29, __pyx_v_errpipe_data) : __Pyx_PyObject_CallOneArg(__pyx_t_28, __pyx_v_errpipe_data);
  96766. __Pyx_XDECREF(__pyx_t_29); __pyx_t_29 = 0;
  96767. if (unlikely(!__pyx_t_10)) __PYX_ERR(6, 154, __pyx_L59_except_error)
  96768. __Pyx_GOTREF(__pyx_t_10);
  96769. __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
  96770. __Pyx_INCREF(__pyx_v_6uvloop_4loop_subprocess_SubprocessError);
  96771. __pyx_t_28 = __pyx_v_6uvloop_4loop_subprocess_SubprocessError; __pyx_t_29 = NULL;
  96772. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_28))) {
  96773. __pyx_t_29 = PyMethod_GET_SELF(__pyx_t_28);
  96774. if (likely(__pyx_t_29)) {
  96775. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_28);
  96776. __Pyx_INCREF(__pyx_t_29);
  96777. __Pyx_INCREF(function);
  96778. __Pyx_DECREF_SET(__pyx_t_28, function);
  96779. }
  96780. }
  96781. __pyx_t_14 = (__pyx_t_29) ? __Pyx_PyObject_Call2Args(__pyx_t_28, __pyx_t_29, __pyx_t_10) : __Pyx_PyObject_CallOneArg(__pyx_t_28, __pyx_t_10);
  96782. __Pyx_XDECREF(__pyx_t_29); __pyx_t_29 = 0;
  96783. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  96784. if (unlikely(!__pyx_t_14)) __PYX_ERR(6, 153, __pyx_L59_except_error)
  96785. __Pyx_GOTREF(__pyx_t_14);
  96786. __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
  96787. __Pyx_Raise(__pyx_t_14, 0, 0, 0);
  96788. __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  96789. __PYX_ERR(6, 153, __pyx_L59_except_error)
  96790. }
  96791. goto __pyx_L59_except_error;
  96792. __pyx_L59_except_error:;
  96793. /* "uvloop/handles/process.pyx":147
  96794. * # preexec_fn has raised an exception. The child
  96795. * # process must be dead now.
  96796. * try: # <<<<<<<<<<<<<<
  96797. * exc_name, exc_msg = errpipe_data.split(b':', 1)
  96798. * exc_name = exc_name.decode()
  96799. */
  96800. __Pyx_XGIVEREF(__pyx_t_22);
  96801. __Pyx_XGIVEREF(__pyx_t_21);
  96802. __Pyx_XGIVEREF(__pyx_t_20);
  96803. __Pyx_ExceptionReset(__pyx_t_22, __pyx_t_21, __pyx_t_20);
  96804. goto __pyx_L1_error;
  96805. __pyx_L62_try_end:;
  96806. }
  96807. /* "uvloop/handles/process.pyx":156
  96808. * 'Bad exception data from child: {!r}'.format(
  96809. * errpipe_data))
  96810. * exc_cls = getattr(__builtins__, exc_name, # <<<<<<<<<<<<<<
  96811. * subprocess_SubprocessError)
  96812. *
  96813. */
  96814. __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_builtins); if (unlikely(!__pyx_t_9)) __PYX_ERR(6, 156, __pyx_L1_error)
  96815. __Pyx_GOTREF(__pyx_t_9);
  96816. /* "uvloop/handles/process.pyx":157
  96817. * errpipe_data))
  96818. * exc_cls = getattr(__builtins__, exc_name,
  96819. * subprocess_SubprocessError) # <<<<<<<<<<<<<<
  96820. *
  96821. * exc = subprocess_SubprocessError(
  96822. */
  96823. __pyx_t_8 = __pyx_v_6uvloop_4loop_subprocess_SubprocessError;
  96824. __Pyx_INCREF(__pyx_t_8);
  96825. /* "uvloop/handles/process.pyx":156
  96826. * 'Bad exception data from child: {!r}'.format(
  96827. * errpipe_data))
  96828. * exc_cls = getattr(__builtins__, exc_name, # <<<<<<<<<<<<<<
  96829. * subprocess_SubprocessError)
  96830. *
  96831. */
  96832. __pyx_t_1 = __Pyx_GetAttr3(__pyx_t_9, __pyx_v_exc_name, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 156, __pyx_L1_error)
  96833. __Pyx_GOTREF(__pyx_t_1);
  96834. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  96835. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  96836. __pyx_v_exc_cls = __pyx_t_1;
  96837. __pyx_t_1 = 0;
  96838. /* "uvloop/handles/process.pyx":159
  96839. * subprocess_SubprocessError)
  96840. *
  96841. * exc = subprocess_SubprocessError( # <<<<<<<<<<<<<<
  96842. * 'Exception occurred in preexec_fn.')
  96843. * exc.__cause__ = exc_cls(exc_msg)
  96844. */
  96845. __Pyx_INCREF(__pyx_v_6uvloop_4loop_subprocess_SubprocessError);
  96846. __pyx_t_8 = __pyx_v_6uvloop_4loop_subprocess_SubprocessError; __pyx_t_9 = NULL;
  96847. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
  96848. __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
  96849. if (likely(__pyx_t_9)) {
  96850. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
  96851. __Pyx_INCREF(__pyx_t_9);
  96852. __Pyx_INCREF(function);
  96853. __Pyx_DECREF_SET(__pyx_t_8, function);
  96854. }
  96855. }
  96856. __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_kp_u_Exception_occurred_in_preexec_fn) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_kp_u_Exception_occurred_in_preexec_fn);
  96857. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  96858. if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 159, __pyx_L1_error)
  96859. __Pyx_GOTREF(__pyx_t_1);
  96860. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  96861. __pyx_v_exc = __pyx_t_1;
  96862. __pyx_t_1 = 0;
  96863. /* "uvloop/handles/process.pyx":161
  96864. * exc = subprocess_SubprocessError(
  96865. * 'Exception occurred in preexec_fn.')
  96866. * exc.__cause__ = exc_cls(exc_msg) # <<<<<<<<<<<<<<
  96867. * self._close()
  96868. * raise exc
  96869. */
  96870. __Pyx_INCREF(__pyx_v_exc_cls);
  96871. __pyx_t_8 = __pyx_v_exc_cls; __pyx_t_9 = NULL;
  96872. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
  96873. __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
  96874. if (likely(__pyx_t_9)) {
  96875. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
  96876. __Pyx_INCREF(__pyx_t_9);
  96877. __Pyx_INCREF(function);
  96878. __Pyx_DECREF_SET(__pyx_t_8, function);
  96879. }
  96880. }
  96881. __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_v_exc_msg) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_exc_msg);
  96882. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  96883. if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 161, __pyx_L1_error)
  96884. __Pyx_GOTREF(__pyx_t_1);
  96885. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  96886. if (__Pyx_PyObject_SetAttrStr(__pyx_v_exc, __pyx_n_s_cause, __pyx_t_1) < 0) __PYX_ERR(6, 161, __pyx_L1_error)
  96887. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  96888. /* "uvloop/handles/process.pyx":162
  96889. * 'Exception occurred in preexec_fn.')
  96890. * exc.__cause__ = exc_cls(exc_msg)
  96891. * self._close() # <<<<<<<<<<<<<<
  96892. * raise exc
  96893. *
  96894. */
  96895. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcess *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._close(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 162, __pyx_L1_error)
  96896. __Pyx_GOTREF(__pyx_t_1);
  96897. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  96898. /* "uvloop/handles/process.pyx":163
  96899. * exc.__cause__ = exc_cls(exc_msg)
  96900. * self._close()
  96901. * raise exc # <<<<<<<<<<<<<<
  96902. *
  96903. * cdef _after_fork(self):
  96904. */
  96905. __Pyx_Raise(__pyx_v_exc, 0, 0, 0);
  96906. __PYX_ERR(6, 163, __pyx_L1_error)
  96907. /* "uvloop/handles/process.pyx":144
  96908. * time_sleep(1)
  96909. *
  96910. * if preexec_fn is not None and errpipe_data: # <<<<<<<<<<<<<<
  96911. * # preexec_fn has raised an exception. The child
  96912. * # process must be dead now.
  96913. */
  96914. }
  96915. /* "uvloop/handles/process.pyx":24
  96916. * self._handle = NULL # close callback will free() the memory
  96917. *
  96918. * cdef _init(self, Loop loop, list args, dict env, # <<<<<<<<<<<<<<
  96919. * cwd, start_new_session,
  96920. * _stdin, _stdout, _stderr, # std* can be defined as macros in C
  96921. */
  96922. /* function exit code */
  96923. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  96924. goto __pyx_L0;
  96925. __pyx_L1_error:;
  96926. __Pyx_XDECREF(__pyx_t_1);
  96927. __Pyx_XDECREF(__pyx_t_8);
  96928. __Pyx_XDECREF(__pyx_t_9);
  96929. __Pyx_XDECREF(__pyx_t_10);
  96930. __Pyx_XDECREF(__pyx_t_14);
  96931. __Pyx_XDECREF(__pyx_t_28);
  96932. __Pyx_XDECREF(__pyx_t_29);
  96933. __Pyx_AddTraceback("uvloop.loop.UVProcess._init", __pyx_clineno, __pyx_lineno, __pyx_filename);
  96934. __pyx_r = 0;
  96935. __pyx_L0:;
  96936. __Pyx_XDECREF(__pyx_v_restore_inheritable);
  96937. __Pyx_XDECREF(__pyx_v_fd);
  96938. __Pyx_XDECREF(__pyx_v_errpipe_data);
  96939. __Pyx_XDECREF(__pyx_v_part);
  96940. __Pyx_XDECREF(__pyx_v_fds_to_close);
  96941. __Pyx_XDECREF(__pyx_v_exc_name);
  96942. __Pyx_XDECREF(__pyx_v_exc_msg);
  96943. __Pyx_XDECREF(__pyx_v_exc_cls);
  96944. __Pyx_XDECREF(__pyx_v_exc);
  96945. __Pyx_XGIVEREF(__pyx_r);
  96946. __Pyx_RefNannyFinishContext();
  96947. return __pyx_r;
  96948. }
  96949. /* "uvloop/handles/process.pyx":165
  96950. * raise exc
  96951. *
  96952. * cdef _after_fork(self): # <<<<<<<<<<<<<<
  96953. * # See CPython/_posixsubprocess.c for details
  96954. * cdef int err
  96955. */
  96956. static PyObject *__pyx_f_6uvloop_4loop_9UVProcess__after_fork(struct __pyx_obj_6uvloop_4loop_UVProcess *__pyx_v_self) {
  96957. int __pyx_v_err;
  96958. PyObject *__pyx_v_ex = NULL;
  96959. PyObject *__pyx_v_f = NULL;
  96960. PyObject *__pyx_r = NULL;
  96961. __Pyx_RefNannyDeclarations
  96962. int __pyx_t_1;
  96963. PyObject *__pyx_t_2 = NULL;
  96964. int __pyx_t_3;
  96965. PyObject *__pyx_t_4 = NULL;
  96966. PyObject *__pyx_t_5 = NULL;
  96967. PyObject *__pyx_t_6 = NULL;
  96968. PyObject *__pyx_t_7 = NULL;
  96969. PyObject *__pyx_t_8 = NULL;
  96970. int __pyx_t_9;
  96971. PyObject *__pyx_t_10 = NULL;
  96972. PyObject *__pyx_t_11 = NULL;
  96973. PyObject *__pyx_t_12 = NULL;
  96974. PyObject *__pyx_t_13 = NULL;
  96975. PyObject *__pyx_t_14 = NULL;
  96976. PyObject *__pyx_t_15 = NULL;
  96977. PyObject *__pyx_t_16 = NULL;
  96978. PyObject *__pyx_t_17 = NULL;
  96979. PyObject *__pyx_t_18 = NULL;
  96980. int __pyx_t_19;
  96981. char const *__pyx_t_20;
  96982. PyObject *__pyx_t_21 = NULL;
  96983. char const *__pyx_t_22;
  96984. __Pyx_RefNannySetupContext("_after_fork", 0);
  96985. /* "uvloop/handles/process.pyx":169
  96986. * cdef int err
  96987. *
  96988. * if self._restore_signals: # <<<<<<<<<<<<<<
  96989. * _Py_RestoreSignals()
  96990. *
  96991. */
  96992. __pyx_t_1 = (__pyx_v_self->_restore_signals != 0);
  96993. if (__pyx_t_1) {
  96994. /* "uvloop/handles/process.pyx":170
  96995. *
  96996. * if self._restore_signals:
  96997. * _Py_RestoreSignals() # <<<<<<<<<<<<<<
  96998. *
  96999. * PyOS_AfterFork_Child()
  97000. */
  97001. _Py_RestoreSignals();
  97002. /* "uvloop/handles/process.pyx":169
  97003. * cdef int err
  97004. *
  97005. * if self._restore_signals: # <<<<<<<<<<<<<<
  97006. * _Py_RestoreSignals()
  97007. *
  97008. */
  97009. }
  97010. /* "uvloop/handles/process.pyx":172
  97011. * _Py_RestoreSignals()
  97012. *
  97013. * PyOS_AfterFork_Child() # <<<<<<<<<<<<<<
  97014. *
  97015. * err = uv.uv_loop_fork(self._loop.uvloop)
  97016. */
  97017. PyOS_AfterFork_Child();
  97018. /* "uvloop/handles/process.pyx":174
  97019. * PyOS_AfterFork_Child()
  97020. *
  97021. * err = uv.uv_loop_fork(self._loop.uvloop) # <<<<<<<<<<<<<<
  97022. * if err < 0:
  97023. * raise convert_error(err)
  97024. */
  97025. __pyx_v_err = uv_loop_fork(__pyx_v_self->__pyx_base._loop->uvloop);
  97026. /* "uvloop/handles/process.pyx":175
  97027. *
  97028. * err = uv.uv_loop_fork(self._loop.uvloop)
  97029. * if err < 0: # <<<<<<<<<<<<<<
  97030. * raise convert_error(err)
  97031. *
  97032. */
  97033. __pyx_t_1 = ((__pyx_v_err < 0) != 0);
  97034. if (unlikely(__pyx_t_1)) {
  97035. /* "uvloop/handles/process.pyx":176
  97036. * err = uv.uv_loop_fork(self._loop.uvloop)
  97037. * if err < 0:
  97038. * raise convert_error(err) # <<<<<<<<<<<<<<
  97039. *
  97040. * if self._preexec_fn is not None:
  97041. */
  97042. __pyx_t_2 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 176, __pyx_L1_error)
  97043. __Pyx_GOTREF(__pyx_t_2);
  97044. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  97045. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  97046. __PYX_ERR(6, 176, __pyx_L1_error)
  97047. /* "uvloop/handles/process.pyx":175
  97048. *
  97049. * err = uv.uv_loop_fork(self._loop.uvloop)
  97050. * if err < 0: # <<<<<<<<<<<<<<
  97051. * raise convert_error(err)
  97052. *
  97053. */
  97054. }
  97055. /* "uvloop/handles/process.pyx":178
  97056. * raise convert_error(err)
  97057. *
  97058. * if self._preexec_fn is not None: # <<<<<<<<<<<<<<
  97059. * try:
  97060. * gc_disable()
  97061. */
  97062. __pyx_t_1 = (__pyx_v_self->_preexec_fn != Py_None);
  97063. __pyx_t_3 = (__pyx_t_1 != 0);
  97064. if (__pyx_t_3) {
  97065. /* "uvloop/handles/process.pyx":179
  97066. *
  97067. * if self._preexec_fn is not None:
  97068. * try: # <<<<<<<<<<<<<<
  97069. * gc_disable()
  97070. * self._preexec_fn()
  97071. */
  97072. {
  97073. __Pyx_PyThreadState_declare
  97074. __Pyx_PyThreadState_assign
  97075. __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
  97076. __Pyx_XGOTREF(__pyx_t_4);
  97077. __Pyx_XGOTREF(__pyx_t_5);
  97078. __Pyx_XGOTREF(__pyx_t_6);
  97079. /*try:*/ {
  97080. /* "uvloop/handles/process.pyx":180
  97081. * if self._preexec_fn is not None:
  97082. * try:
  97083. * gc_disable() # <<<<<<<<<<<<<<
  97084. * self._preexec_fn()
  97085. * except BaseException as ex:
  97086. */
  97087. __Pyx_INCREF(__pyx_v_6uvloop_4loop_gc_disable);
  97088. __pyx_t_7 = __pyx_v_6uvloop_4loop_gc_disable; __pyx_t_8 = NULL;
  97089. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
  97090. __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
  97091. if (likely(__pyx_t_8)) {
  97092. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
  97093. __Pyx_INCREF(__pyx_t_8);
  97094. __Pyx_INCREF(function);
  97095. __Pyx_DECREF_SET(__pyx_t_7, function);
  97096. }
  97097. }
  97098. __pyx_t_2 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_7);
  97099. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  97100. if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 180, __pyx_L6_error)
  97101. __Pyx_GOTREF(__pyx_t_2);
  97102. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  97103. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  97104. /* "uvloop/handles/process.pyx":181
  97105. * try:
  97106. * gc_disable()
  97107. * self._preexec_fn() # <<<<<<<<<<<<<<
  97108. * except BaseException as ex:
  97109. * try:
  97110. */
  97111. __Pyx_INCREF(__pyx_v_self->_preexec_fn);
  97112. __pyx_t_7 = __pyx_v_self->_preexec_fn; __pyx_t_8 = NULL;
  97113. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
  97114. __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
  97115. if (likely(__pyx_t_8)) {
  97116. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
  97117. __Pyx_INCREF(__pyx_t_8);
  97118. __Pyx_INCREF(function);
  97119. __Pyx_DECREF_SET(__pyx_t_7, function);
  97120. }
  97121. }
  97122. __pyx_t_2 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_7);
  97123. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  97124. if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 181, __pyx_L6_error)
  97125. __Pyx_GOTREF(__pyx_t_2);
  97126. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  97127. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  97128. /* "uvloop/handles/process.pyx":179
  97129. *
  97130. * if self._preexec_fn is not None:
  97131. * try: # <<<<<<<<<<<<<<
  97132. * gc_disable()
  97133. * self._preexec_fn()
  97134. */
  97135. }
  97136. /* "uvloop/handles/process.pyx":191
  97137. * system._exit(255)
  97138. * else:
  97139. * os_close(self._errpipe_write) # <<<<<<<<<<<<<<
  97140. * else:
  97141. * os_close(self._errpipe_write)
  97142. */
  97143. /*else:*/ {
  97144. __Pyx_INCREF(__pyx_v_6uvloop_4loop_os_close);
  97145. __pyx_t_7 = __pyx_v_6uvloop_4loop_os_close; __pyx_t_8 = NULL;
  97146. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
  97147. __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
  97148. if (likely(__pyx_t_8)) {
  97149. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
  97150. __Pyx_INCREF(__pyx_t_8);
  97151. __Pyx_INCREF(function);
  97152. __Pyx_DECREF_SET(__pyx_t_7, function);
  97153. }
  97154. }
  97155. __pyx_t_2 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_v_self->_errpipe_write) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_self->_errpipe_write);
  97156. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  97157. if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 191, __pyx_L8_except_error)
  97158. __Pyx_GOTREF(__pyx_t_2);
  97159. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  97160. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  97161. }
  97162. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  97163. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  97164. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  97165. goto __pyx_L11_try_end;
  97166. __pyx_L6_error:;
  97167. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  97168. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  97169. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  97170. /* "uvloop/handles/process.pyx":182
  97171. * gc_disable()
  97172. * self._preexec_fn()
  97173. * except BaseException as ex: # <<<<<<<<<<<<<<
  97174. * try:
  97175. * with open(self._errpipe_write, 'wb') as f:
  97176. */
  97177. __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_BaseException);
  97178. if (__pyx_t_9) {
  97179. __Pyx_AddTraceback("uvloop.loop.UVProcess._after_fork", __pyx_clineno, __pyx_lineno, __pyx_filename);
  97180. if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_7, &__pyx_t_8) < 0) __PYX_ERR(6, 182, __pyx_L8_except_error)
  97181. __Pyx_GOTREF(__pyx_t_2);
  97182. __Pyx_GOTREF(__pyx_t_7);
  97183. __Pyx_GOTREF(__pyx_t_8);
  97184. __Pyx_INCREF(__pyx_t_7);
  97185. __pyx_v_ex = __pyx_t_7;
  97186. /*try:*/ {
  97187. /* "uvloop/handles/process.pyx":183
  97188. * self._preexec_fn()
  97189. * except BaseException as ex:
  97190. * try: # <<<<<<<<<<<<<<
  97191. * with open(self._errpipe_write, 'wb') as f:
  97192. * f.write(str(ex.__class__.__name__).encode())
  97193. */
  97194. /*try:*/ {
  97195. /* "uvloop/handles/process.pyx":184
  97196. * except BaseException as ex:
  97197. * try:
  97198. * with open(self._errpipe_write, 'wb') as f: # <<<<<<<<<<<<<<
  97199. * f.write(str(ex.__class__.__name__).encode())
  97200. * f.write(b':')
  97201. */
  97202. /*with:*/ {
  97203. __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(6, 184, __pyx_L22_error)
  97204. __Pyx_GOTREF(__pyx_t_10);
  97205. __Pyx_INCREF(__pyx_v_self->_errpipe_write);
  97206. __Pyx_GIVEREF(__pyx_v_self->_errpipe_write);
  97207. PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_self->_errpipe_write);
  97208. __Pyx_INCREF(__pyx_n_u_wb);
  97209. __Pyx_GIVEREF(__pyx_n_u_wb);
  97210. PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_n_u_wb);
  97211. __pyx_t_11 = __Pyx_PyObject_Call(__pyx_builtin_open, __pyx_t_10, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(6, 184, __pyx_L22_error)
  97212. __Pyx_GOTREF(__pyx_t_11);
  97213. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  97214. __pyx_t_12 = __Pyx_PyObject_LookupSpecial(__pyx_t_11, __pyx_n_s_exit); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 184, __pyx_L22_error)
  97215. __Pyx_GOTREF(__pyx_t_12);
  97216. __pyx_t_13 = __Pyx_PyObject_LookupSpecial(__pyx_t_11, __pyx_n_s_enter); if (unlikely(!__pyx_t_13)) __PYX_ERR(6, 184, __pyx_L24_error)
  97217. __Pyx_GOTREF(__pyx_t_13);
  97218. __pyx_t_14 = NULL;
  97219. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_13))) {
  97220. __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_13);
  97221. if (likely(__pyx_t_14)) {
  97222. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
  97223. __Pyx_INCREF(__pyx_t_14);
  97224. __Pyx_INCREF(function);
  97225. __Pyx_DECREF_SET(__pyx_t_13, function);
  97226. }
  97227. }
  97228. __pyx_t_10 = (__pyx_t_14) ? __Pyx_PyObject_CallOneArg(__pyx_t_13, __pyx_t_14) : __Pyx_PyObject_CallNoArg(__pyx_t_13);
  97229. __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
  97230. if (unlikely(!__pyx_t_10)) __PYX_ERR(6, 184, __pyx_L24_error)
  97231. __Pyx_GOTREF(__pyx_t_10);
  97232. __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  97233. __pyx_t_13 = __pyx_t_10;
  97234. __pyx_t_10 = 0;
  97235. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  97236. /*try:*/ {
  97237. {
  97238. __Pyx_PyThreadState_declare
  97239. __Pyx_PyThreadState_assign
  97240. __Pyx_ExceptionSave(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17);
  97241. __Pyx_XGOTREF(__pyx_t_15);
  97242. __Pyx_XGOTREF(__pyx_t_16);
  97243. __Pyx_XGOTREF(__pyx_t_17);
  97244. /*try:*/ {
  97245. __pyx_v_f = __pyx_t_13;
  97246. __pyx_t_13 = 0;
  97247. /* "uvloop/handles/process.pyx":185
  97248. * try:
  97249. * with open(self._errpipe_write, 'wb') as f:
  97250. * f.write(str(ex.__class__.__name__).encode()) # <<<<<<<<<<<<<<
  97251. * f.write(b':')
  97252. * f.write(str(ex.args[0]).encode())
  97253. */
  97254. __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_write); if (unlikely(!__pyx_t_11)) __PYX_ERR(6, 185, __pyx_L30_error)
  97255. __Pyx_GOTREF(__pyx_t_11);
  97256. __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_ex, __pyx_n_s_class); if (unlikely(!__pyx_t_10)) __PYX_ERR(6, 185, __pyx_L30_error)
  97257. __Pyx_GOTREF(__pyx_t_10);
  97258. __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_name); if (unlikely(!__pyx_t_14)) __PYX_ERR(6, 185, __pyx_L30_error)
  97259. __Pyx_GOTREF(__pyx_t_14);
  97260. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  97261. __pyx_t_10 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_14); if (unlikely(!__pyx_t_10)) __PYX_ERR(6, 185, __pyx_L30_error)
  97262. __Pyx_GOTREF(__pyx_t_10);
  97263. __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  97264. __pyx_t_14 = PyUnicode_AsEncodedString(((PyObject*)__pyx_t_10), NULL, NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(6, 185, __pyx_L30_error)
  97265. __Pyx_GOTREF(__pyx_t_14);
  97266. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  97267. __pyx_t_10 = NULL;
  97268. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) {
  97269. __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_11);
  97270. if (likely(__pyx_t_10)) {
  97271. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
  97272. __Pyx_INCREF(__pyx_t_10);
  97273. __Pyx_INCREF(function);
  97274. __Pyx_DECREF_SET(__pyx_t_11, function);
  97275. }
  97276. }
  97277. __pyx_t_13 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_11, __pyx_t_10, __pyx_t_14) : __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_14);
  97278. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  97279. __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  97280. if (unlikely(!__pyx_t_13)) __PYX_ERR(6, 185, __pyx_L30_error)
  97281. __Pyx_GOTREF(__pyx_t_13);
  97282. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  97283. __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  97284. /* "uvloop/handles/process.pyx":186
  97285. * with open(self._errpipe_write, 'wb') as f:
  97286. * f.write(str(ex.__class__.__name__).encode())
  97287. * f.write(b':') # <<<<<<<<<<<<<<
  97288. * f.write(str(ex.args[0]).encode())
  97289. * finally:
  97290. */
  97291. __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_write); if (unlikely(!__pyx_t_11)) __PYX_ERR(6, 186, __pyx_L30_error)
  97292. __Pyx_GOTREF(__pyx_t_11);
  97293. __pyx_t_14 = NULL;
  97294. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) {
  97295. __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_11);
  97296. if (likely(__pyx_t_14)) {
  97297. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
  97298. __Pyx_INCREF(__pyx_t_14);
  97299. __Pyx_INCREF(function);
  97300. __Pyx_DECREF_SET(__pyx_t_11, function);
  97301. }
  97302. }
  97303. __pyx_t_13 = (__pyx_t_14) ? __Pyx_PyObject_Call2Args(__pyx_t_11, __pyx_t_14, __pyx_kp_b__163) : __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_kp_b__163);
  97304. __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
  97305. if (unlikely(!__pyx_t_13)) __PYX_ERR(6, 186, __pyx_L30_error)
  97306. __Pyx_GOTREF(__pyx_t_13);
  97307. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  97308. __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  97309. /* "uvloop/handles/process.pyx":187
  97310. * f.write(str(ex.__class__.__name__).encode())
  97311. * f.write(b':')
  97312. * f.write(str(ex.args[0]).encode()) # <<<<<<<<<<<<<<
  97313. * finally:
  97314. * system._exit(255)
  97315. */
  97316. __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_write); if (unlikely(!__pyx_t_11)) __PYX_ERR(6, 187, __pyx_L30_error)
  97317. __Pyx_GOTREF(__pyx_t_11);
  97318. __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_ex, __pyx_n_s_args); if (unlikely(!__pyx_t_14)) __PYX_ERR(6, 187, __pyx_L30_error)
  97319. __Pyx_GOTREF(__pyx_t_14);
  97320. __pyx_t_10 = __Pyx_GetItemInt(__pyx_t_14, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(6, 187, __pyx_L30_error)
  97321. __Pyx_GOTREF(__pyx_t_10);
  97322. __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  97323. __pyx_t_14 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_10); if (unlikely(!__pyx_t_14)) __PYX_ERR(6, 187, __pyx_L30_error)
  97324. __Pyx_GOTREF(__pyx_t_14);
  97325. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  97326. __pyx_t_10 = PyUnicode_AsEncodedString(((PyObject*)__pyx_t_14), NULL, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(6, 187, __pyx_L30_error)
  97327. __Pyx_GOTREF(__pyx_t_10);
  97328. __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  97329. __pyx_t_14 = NULL;
  97330. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) {
  97331. __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_11);
  97332. if (likely(__pyx_t_14)) {
  97333. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
  97334. __Pyx_INCREF(__pyx_t_14);
  97335. __Pyx_INCREF(function);
  97336. __Pyx_DECREF_SET(__pyx_t_11, function);
  97337. }
  97338. }
  97339. __pyx_t_13 = (__pyx_t_14) ? __Pyx_PyObject_Call2Args(__pyx_t_11, __pyx_t_14, __pyx_t_10) : __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_10);
  97340. __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
  97341. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  97342. if (unlikely(!__pyx_t_13)) __PYX_ERR(6, 187, __pyx_L30_error)
  97343. __Pyx_GOTREF(__pyx_t_13);
  97344. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  97345. __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  97346. /* "uvloop/handles/process.pyx":184
  97347. * except BaseException as ex:
  97348. * try:
  97349. * with open(self._errpipe_write, 'wb') as f: # <<<<<<<<<<<<<<
  97350. * f.write(str(ex.__class__.__name__).encode())
  97351. * f.write(b':')
  97352. */
  97353. }
  97354. __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
  97355. __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
  97356. __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
  97357. goto __pyx_L37_try_end;
  97358. __pyx_L30_error:;
  97359. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  97360. __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
  97361. __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
  97362. __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
  97363. /*except:*/ {
  97364. __Pyx_AddTraceback("uvloop.loop.UVProcess._after_fork", __pyx_clineno, __pyx_lineno, __pyx_filename);
  97365. if (__Pyx_GetException(&__pyx_t_13, &__pyx_t_11, &__pyx_t_10) < 0) __PYX_ERR(6, 184, __pyx_L32_except_error)
  97366. __Pyx_GOTREF(__pyx_t_13);
  97367. __Pyx_GOTREF(__pyx_t_11);
  97368. __Pyx_GOTREF(__pyx_t_10);
  97369. __pyx_t_14 = PyTuple_Pack(3, __pyx_t_13, __pyx_t_11, __pyx_t_10); if (unlikely(!__pyx_t_14)) __PYX_ERR(6, 184, __pyx_L32_except_error)
  97370. __Pyx_GOTREF(__pyx_t_14);
  97371. __pyx_t_18 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_14, NULL);
  97372. __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  97373. __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  97374. if (unlikely(!__pyx_t_18)) __PYX_ERR(6, 184, __pyx_L32_except_error)
  97375. __Pyx_GOTREF(__pyx_t_18);
  97376. __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_18);
  97377. __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  97378. if (__pyx_t_3 < 0) __PYX_ERR(6, 184, __pyx_L32_except_error)
  97379. __pyx_t_1 = ((!(__pyx_t_3 != 0)) != 0);
  97380. if (__pyx_t_1) {
  97381. __Pyx_GIVEREF(__pyx_t_13);
  97382. __Pyx_GIVEREF(__pyx_t_11);
  97383. __Pyx_XGIVEREF(__pyx_t_10);
  97384. __Pyx_ErrRestoreWithState(__pyx_t_13, __pyx_t_11, __pyx_t_10);
  97385. __pyx_t_13 = 0; __pyx_t_11 = 0; __pyx_t_10 = 0;
  97386. __PYX_ERR(6, 184, __pyx_L32_except_error)
  97387. }
  97388. __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
  97389. __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
  97390. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  97391. goto __pyx_L31_exception_handled;
  97392. }
  97393. __pyx_L32_except_error:;
  97394. __Pyx_XGIVEREF(__pyx_t_15);
  97395. __Pyx_XGIVEREF(__pyx_t_16);
  97396. __Pyx_XGIVEREF(__pyx_t_17);
  97397. __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17);
  97398. goto __pyx_L22_error;
  97399. __pyx_L31_exception_handled:;
  97400. __Pyx_XGIVEREF(__pyx_t_15);
  97401. __Pyx_XGIVEREF(__pyx_t_16);
  97402. __Pyx_XGIVEREF(__pyx_t_17);
  97403. __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17);
  97404. __pyx_L37_try_end:;
  97405. }
  97406. }
  97407. /*finally:*/ {
  97408. /*normal exit:*/{
  97409. if (__pyx_t_12) {
  97410. __pyx_t_17 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_tuple__165, NULL);
  97411. __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  97412. if (unlikely(!__pyx_t_17)) __PYX_ERR(6, 184, __pyx_L22_error)
  97413. __Pyx_GOTREF(__pyx_t_17);
  97414. __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
  97415. }
  97416. goto __pyx_L29;
  97417. }
  97418. __pyx_L29:;
  97419. }
  97420. goto __pyx_L41;
  97421. __pyx_L24_error:;
  97422. __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  97423. goto __pyx_L22_error;
  97424. __pyx_L41:;
  97425. }
  97426. }
  97427. /* "uvloop/handles/process.pyx":189
  97428. * f.write(str(ex.args[0]).encode())
  97429. * finally:
  97430. * system._exit(255) # <<<<<<<<<<<<<<
  97431. * else:
  97432. * os_close(self._errpipe_write)
  97433. */
  97434. /*finally:*/ {
  97435. /*normal exit:*/{
  97436. _exit(0xFF);
  97437. goto __pyx_L23;
  97438. }
  97439. __pyx_L22_error:;
  97440. /*exception exit:*/{
  97441. __Pyx_PyThreadState_declare
  97442. __Pyx_PyThreadState_assign
  97443. __pyx_t_12 = 0; __pyx_t_17 = 0; __pyx_t_16 = 0; __pyx_t_15 = 0; __pyx_t_18 = 0; __pyx_t_21 = 0;
  97444. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  97445. __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
  97446. __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
  97447. __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
  97448. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_15, &__pyx_t_18, &__pyx_t_21);
  97449. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_12, &__pyx_t_17, &__pyx_t_16) < 0)) __Pyx_ErrFetch(&__pyx_t_12, &__pyx_t_17, &__pyx_t_16);
  97450. __Pyx_XGOTREF(__pyx_t_12);
  97451. __Pyx_XGOTREF(__pyx_t_17);
  97452. __Pyx_XGOTREF(__pyx_t_16);
  97453. __Pyx_XGOTREF(__pyx_t_15);
  97454. __Pyx_XGOTREF(__pyx_t_18);
  97455. __Pyx_XGOTREF(__pyx_t_21);
  97456. __pyx_t_9 = __pyx_lineno; __pyx_t_19 = __pyx_clineno; __pyx_t_20 = __pyx_filename;
  97457. {
  97458. _exit(0xFF);
  97459. }
  97460. if (PY_MAJOR_VERSION >= 3) {
  97461. __Pyx_XGIVEREF(__pyx_t_15);
  97462. __Pyx_XGIVEREF(__pyx_t_18);
  97463. __Pyx_XGIVEREF(__pyx_t_21);
  97464. __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_18, __pyx_t_21);
  97465. }
  97466. __Pyx_XGIVEREF(__pyx_t_12);
  97467. __Pyx_XGIVEREF(__pyx_t_17);
  97468. __Pyx_XGIVEREF(__pyx_t_16);
  97469. __Pyx_ErrRestore(__pyx_t_12, __pyx_t_17, __pyx_t_16);
  97470. __pyx_t_12 = 0; __pyx_t_17 = 0; __pyx_t_16 = 0; __pyx_t_15 = 0; __pyx_t_18 = 0; __pyx_t_21 = 0;
  97471. __pyx_lineno = __pyx_t_9; __pyx_clineno = __pyx_t_19; __pyx_filename = __pyx_t_20;
  97472. goto __pyx_L17_error;
  97473. }
  97474. __pyx_L23:;
  97475. }
  97476. }
  97477. /* "uvloop/handles/process.pyx":182
  97478. * gc_disable()
  97479. * self._preexec_fn()
  97480. * except BaseException as ex: # <<<<<<<<<<<<<<
  97481. * try:
  97482. * with open(self._errpipe_write, 'wb') as f:
  97483. */
  97484. /*finally:*/ {
  97485. /*normal exit:*/{
  97486. __Pyx_DECREF(__pyx_v_ex);
  97487. __pyx_v_ex = NULL;
  97488. goto __pyx_L18;
  97489. }
  97490. __pyx_L17_error:;
  97491. /*exception exit:*/{
  97492. __Pyx_PyThreadState_declare
  97493. __Pyx_PyThreadState_assign
  97494. __pyx_t_21 = 0; __pyx_t_18 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_12 = 0;
  97495. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  97496. __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
  97497. __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
  97498. __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
  97499. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_16, &__pyx_t_17, &__pyx_t_12);
  97500. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_21, &__pyx_t_18, &__pyx_t_15) < 0)) __Pyx_ErrFetch(&__pyx_t_21, &__pyx_t_18, &__pyx_t_15);
  97501. __Pyx_XGOTREF(__pyx_t_21);
  97502. __Pyx_XGOTREF(__pyx_t_18);
  97503. __Pyx_XGOTREF(__pyx_t_15);
  97504. __Pyx_XGOTREF(__pyx_t_16);
  97505. __Pyx_XGOTREF(__pyx_t_17);
  97506. __Pyx_XGOTREF(__pyx_t_12);
  97507. __pyx_t_19 = __pyx_lineno; __pyx_t_9 = __pyx_clineno; __pyx_t_22 = __pyx_filename;
  97508. {
  97509. __Pyx_DECREF(__pyx_v_ex);
  97510. __pyx_v_ex = NULL;
  97511. }
  97512. if (PY_MAJOR_VERSION >= 3) {
  97513. __Pyx_XGIVEREF(__pyx_t_16);
  97514. __Pyx_XGIVEREF(__pyx_t_17);
  97515. __Pyx_XGIVEREF(__pyx_t_12);
  97516. __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_12);
  97517. }
  97518. __Pyx_XGIVEREF(__pyx_t_21);
  97519. __Pyx_XGIVEREF(__pyx_t_18);
  97520. __Pyx_XGIVEREF(__pyx_t_15);
  97521. __Pyx_ErrRestore(__pyx_t_21, __pyx_t_18, __pyx_t_15);
  97522. __pyx_t_21 = 0; __pyx_t_18 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_12 = 0;
  97523. __pyx_lineno = __pyx_t_19; __pyx_clineno = __pyx_t_9; __pyx_filename = __pyx_t_22;
  97524. goto __pyx_L8_except_error;
  97525. }
  97526. __pyx_L18:;
  97527. }
  97528. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  97529. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  97530. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  97531. goto __pyx_L7_exception_handled;
  97532. }
  97533. goto __pyx_L8_except_error;
  97534. __pyx_L8_except_error:;
  97535. /* "uvloop/handles/process.pyx":179
  97536. *
  97537. * if self._preexec_fn is not None:
  97538. * try: # <<<<<<<<<<<<<<
  97539. * gc_disable()
  97540. * self._preexec_fn()
  97541. */
  97542. __Pyx_XGIVEREF(__pyx_t_4);
  97543. __Pyx_XGIVEREF(__pyx_t_5);
  97544. __Pyx_XGIVEREF(__pyx_t_6);
  97545. __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
  97546. goto __pyx_L1_error;
  97547. __pyx_L7_exception_handled:;
  97548. __Pyx_XGIVEREF(__pyx_t_4);
  97549. __Pyx_XGIVEREF(__pyx_t_5);
  97550. __Pyx_XGIVEREF(__pyx_t_6);
  97551. __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
  97552. __pyx_L11_try_end:;
  97553. }
  97554. /* "uvloop/handles/process.pyx":178
  97555. * raise convert_error(err)
  97556. *
  97557. * if self._preexec_fn is not None: # <<<<<<<<<<<<<<
  97558. * try:
  97559. * gc_disable()
  97560. */
  97561. goto __pyx_L5;
  97562. }
  97563. /* "uvloop/handles/process.pyx":193
  97564. * os_close(self._errpipe_write)
  97565. * else:
  97566. * os_close(self._errpipe_write) # <<<<<<<<<<<<<<
  97567. *
  97568. * cdef _close_after_spawn(self, int fd):
  97569. */
  97570. /*else*/ {
  97571. __Pyx_INCREF(__pyx_v_6uvloop_4loop_os_close);
  97572. __pyx_t_7 = __pyx_v_6uvloop_4loop_os_close; __pyx_t_2 = NULL;
  97573. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
  97574. __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_7);
  97575. if (likely(__pyx_t_2)) {
  97576. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
  97577. __Pyx_INCREF(__pyx_t_2);
  97578. __Pyx_INCREF(function);
  97579. __Pyx_DECREF_SET(__pyx_t_7, function);
  97580. }
  97581. }
  97582. __pyx_t_8 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_2, __pyx_v_self->_errpipe_write) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_self->_errpipe_write);
  97583. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  97584. if (unlikely(!__pyx_t_8)) __PYX_ERR(6, 193, __pyx_L1_error)
  97585. __Pyx_GOTREF(__pyx_t_8);
  97586. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  97587. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  97588. }
  97589. __pyx_L5:;
  97590. /* "uvloop/handles/process.pyx":165
  97591. * raise exc
  97592. *
  97593. * cdef _after_fork(self): # <<<<<<<<<<<<<<
  97594. * # See CPython/_posixsubprocess.c for details
  97595. * cdef int err
  97596. */
  97597. /* function exit code */
  97598. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  97599. goto __pyx_L0;
  97600. __pyx_L1_error:;
  97601. __Pyx_XDECREF(__pyx_t_2);
  97602. __Pyx_XDECREF(__pyx_t_7);
  97603. __Pyx_XDECREF(__pyx_t_8);
  97604. __Pyx_XDECREF(__pyx_t_10);
  97605. __Pyx_XDECREF(__pyx_t_11);
  97606. __Pyx_XDECREF(__pyx_t_13);
  97607. __Pyx_XDECREF(__pyx_t_14);
  97608. __Pyx_AddTraceback("uvloop.loop.UVProcess._after_fork", __pyx_clineno, __pyx_lineno, __pyx_filename);
  97609. __pyx_r = 0;
  97610. __pyx_L0:;
  97611. __Pyx_XDECREF(__pyx_v_ex);
  97612. __Pyx_XDECREF(__pyx_v_f);
  97613. __Pyx_XGIVEREF(__pyx_r);
  97614. __Pyx_RefNannyFinishContext();
  97615. return __pyx_r;
  97616. }
  97617. /* "uvloop/handles/process.pyx":195
  97618. * os_close(self._errpipe_write)
  97619. *
  97620. * cdef _close_after_spawn(self, int fd): # <<<<<<<<<<<<<<
  97621. * if self._fds_to_close is None:
  97622. * raise RuntimeError(
  97623. */
  97624. static PyObject *__pyx_f_6uvloop_4loop_9UVProcess__close_after_spawn(struct __pyx_obj_6uvloop_4loop_UVProcess *__pyx_v_self, int __pyx_v_fd) {
  97625. PyObject *__pyx_r = NULL;
  97626. __Pyx_RefNannyDeclarations
  97627. int __pyx_t_1;
  97628. int __pyx_t_2;
  97629. PyObject *__pyx_t_3 = NULL;
  97630. int __pyx_t_4;
  97631. __Pyx_RefNannySetupContext("_close_after_spawn", 0);
  97632. /* "uvloop/handles/process.pyx":196
  97633. *
  97634. * cdef _close_after_spawn(self, int fd):
  97635. * if self._fds_to_close is None: # <<<<<<<<<<<<<<
  97636. * raise RuntimeError(
  97637. * 'UVProcess._close_after_spawn called after uv_spawn')
  97638. */
  97639. __pyx_t_1 = (__pyx_v_self->_fds_to_close == ((PyObject*)Py_None));
  97640. __pyx_t_2 = (__pyx_t_1 != 0);
  97641. if (unlikely(__pyx_t_2)) {
  97642. /* "uvloop/handles/process.pyx":197
  97643. * cdef _close_after_spawn(self, int fd):
  97644. * if self._fds_to_close is None:
  97645. * raise RuntimeError( # <<<<<<<<<<<<<<
  97646. * 'UVProcess._close_after_spawn called after uv_spawn')
  97647. * self._fds_to_close.add(fd)
  97648. */
  97649. __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__166, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 197, __pyx_L1_error)
  97650. __Pyx_GOTREF(__pyx_t_3);
  97651. __Pyx_Raise(__pyx_t_3, 0, 0, 0);
  97652. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  97653. __PYX_ERR(6, 197, __pyx_L1_error)
  97654. /* "uvloop/handles/process.pyx":196
  97655. *
  97656. * cdef _close_after_spawn(self, int fd):
  97657. * if self._fds_to_close is None: # <<<<<<<<<<<<<<
  97658. * raise RuntimeError(
  97659. * 'UVProcess._close_after_spawn called after uv_spawn')
  97660. */
  97661. }
  97662. /* "uvloop/handles/process.pyx":199
  97663. * raise RuntimeError(
  97664. * 'UVProcess._close_after_spawn called after uv_spawn')
  97665. * self._fds_to_close.add(fd) # <<<<<<<<<<<<<<
  97666. *
  97667. * def __dealloc__(self):
  97668. */
  97669. if (unlikely(__pyx_v_self->_fds_to_close == Py_None)) {
  97670. PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "add");
  97671. __PYX_ERR(6, 199, __pyx_L1_error)
  97672. }
  97673. __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_fd); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 199, __pyx_L1_error)
  97674. __Pyx_GOTREF(__pyx_t_3);
  97675. __pyx_t_4 = PySet_Add(__pyx_v_self->_fds_to_close, __pyx_t_3); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(6, 199, __pyx_L1_error)
  97676. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  97677. /* "uvloop/handles/process.pyx":195
  97678. * os_close(self._errpipe_write)
  97679. *
  97680. * cdef _close_after_spawn(self, int fd): # <<<<<<<<<<<<<<
  97681. * if self._fds_to_close is None:
  97682. * raise RuntimeError(
  97683. */
  97684. /* function exit code */
  97685. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  97686. goto __pyx_L0;
  97687. __pyx_L1_error:;
  97688. __Pyx_XDECREF(__pyx_t_3);
  97689. __Pyx_AddTraceback("uvloop.loop.UVProcess._close_after_spawn", __pyx_clineno, __pyx_lineno, __pyx_filename);
  97690. __pyx_r = 0;
  97691. __pyx_L0:;
  97692. __Pyx_XGIVEREF(__pyx_r);
  97693. __Pyx_RefNannyFinishContext();
  97694. return __pyx_r;
  97695. }
  97696. /* "uvloop/handles/process.pyx":201
  97697. * self._fds_to_close.add(fd)
  97698. *
  97699. * def __dealloc__(self): # <<<<<<<<<<<<<<
  97700. * if self.uv_opt_env is not NULL:
  97701. * PyMem_RawFree(self.uv_opt_env)
  97702. */
  97703. /* Python wrapper */
  97704. static void __pyx_pw_6uvloop_4loop_9UVProcess_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
  97705. static void __pyx_pw_6uvloop_4loop_9UVProcess_3__dealloc__(PyObject *__pyx_v_self) {
  97706. __Pyx_RefNannyDeclarations
  97707. __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  97708. __pyx_pf_6uvloop_4loop_9UVProcess_2__dealloc__(((struct __pyx_obj_6uvloop_4loop_UVProcess *)__pyx_v_self));
  97709. /* function exit code */
  97710. __Pyx_RefNannyFinishContext();
  97711. }
  97712. static void __pyx_pf_6uvloop_4loop_9UVProcess_2__dealloc__(struct __pyx_obj_6uvloop_4loop_UVProcess *__pyx_v_self) {
  97713. __Pyx_RefNannyDeclarations
  97714. int __pyx_t_1;
  97715. __Pyx_RefNannySetupContext("__dealloc__", 0);
  97716. /* "uvloop/handles/process.pyx":202
  97717. *
  97718. * def __dealloc__(self):
  97719. * if self.uv_opt_env is not NULL: # <<<<<<<<<<<<<<
  97720. * PyMem_RawFree(self.uv_opt_env)
  97721. * self.uv_opt_env = NULL
  97722. */
  97723. __pyx_t_1 = ((__pyx_v_self->uv_opt_env != NULL) != 0);
  97724. if (__pyx_t_1) {
  97725. /* "uvloop/handles/process.pyx":203
  97726. * def __dealloc__(self):
  97727. * if self.uv_opt_env is not NULL:
  97728. * PyMem_RawFree(self.uv_opt_env) # <<<<<<<<<<<<<<
  97729. * self.uv_opt_env = NULL
  97730. *
  97731. */
  97732. PyMem_RawFree(__pyx_v_self->uv_opt_env);
  97733. /* "uvloop/handles/process.pyx":204
  97734. * if self.uv_opt_env is not NULL:
  97735. * PyMem_RawFree(self.uv_opt_env)
  97736. * self.uv_opt_env = NULL # <<<<<<<<<<<<<<
  97737. *
  97738. * if self.uv_opt_args is not NULL:
  97739. */
  97740. __pyx_v_self->uv_opt_env = NULL;
  97741. /* "uvloop/handles/process.pyx":202
  97742. *
  97743. * def __dealloc__(self):
  97744. * if self.uv_opt_env is not NULL: # <<<<<<<<<<<<<<
  97745. * PyMem_RawFree(self.uv_opt_env)
  97746. * self.uv_opt_env = NULL
  97747. */
  97748. }
  97749. /* "uvloop/handles/process.pyx":206
  97750. * self.uv_opt_env = NULL
  97751. *
  97752. * if self.uv_opt_args is not NULL: # <<<<<<<<<<<<<<
  97753. * PyMem_RawFree(self.uv_opt_args)
  97754. * self.uv_opt_args = NULL
  97755. */
  97756. __pyx_t_1 = ((__pyx_v_self->uv_opt_args != NULL) != 0);
  97757. if (__pyx_t_1) {
  97758. /* "uvloop/handles/process.pyx":207
  97759. *
  97760. * if self.uv_opt_args is not NULL:
  97761. * PyMem_RawFree(self.uv_opt_args) # <<<<<<<<<<<<<<
  97762. * self.uv_opt_args = NULL
  97763. *
  97764. */
  97765. PyMem_RawFree(__pyx_v_self->uv_opt_args);
  97766. /* "uvloop/handles/process.pyx":208
  97767. * if self.uv_opt_args is not NULL:
  97768. * PyMem_RawFree(self.uv_opt_args)
  97769. * self.uv_opt_args = NULL # <<<<<<<<<<<<<<
  97770. *
  97771. * cdef char** __to_cstring_array(self, list arr):
  97772. */
  97773. __pyx_v_self->uv_opt_args = NULL;
  97774. /* "uvloop/handles/process.pyx":206
  97775. * self.uv_opt_env = NULL
  97776. *
  97777. * if self.uv_opt_args is not NULL: # <<<<<<<<<<<<<<
  97778. * PyMem_RawFree(self.uv_opt_args)
  97779. * self.uv_opt_args = NULL
  97780. */
  97781. }
  97782. /* "uvloop/handles/process.pyx":201
  97783. * self._fds_to_close.add(fd)
  97784. *
  97785. * def __dealloc__(self): # <<<<<<<<<<<<<<
  97786. * if self.uv_opt_env is not NULL:
  97787. * PyMem_RawFree(self.uv_opt_env)
  97788. */
  97789. /* function exit code */
  97790. __Pyx_RefNannyFinishContext();
  97791. }
  97792. /* "uvloop/handles/process.pyx":210
  97793. * self.uv_opt_args = NULL
  97794. *
  97795. * cdef char** __to_cstring_array(self, list arr): # <<<<<<<<<<<<<<
  97796. * cdef:
  97797. * int i
  97798. */
  97799. static char **__pyx_f_6uvloop_4loop_9UVProcess___to_cstring_array(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVProcess *__pyx_v_self, PyObject *__pyx_v_arr) {
  97800. int __pyx_v_i;
  97801. Py_ssize_t __pyx_v_arr_len;
  97802. PyObject *__pyx_v_el = 0;
  97803. char **__pyx_v_ret;
  97804. char **__pyx_r;
  97805. __Pyx_RefNannyDeclarations
  97806. Py_ssize_t __pyx_t_1;
  97807. int __pyx_t_2;
  97808. Py_ssize_t __pyx_t_3;
  97809. Py_ssize_t __pyx_t_4;
  97810. int __pyx_t_5;
  97811. PyObject *__pyx_t_6 = NULL;
  97812. char *__pyx_t_7;
  97813. __Pyx_RefNannySetupContext("__to_cstring_array", 0);
  97814. /* "uvloop/handles/process.pyx":213
  97815. * cdef:
  97816. * int i
  97817. * ssize_t arr_len = len(arr) # <<<<<<<<<<<<<<
  97818. * bytes el
  97819. *
  97820. */
  97821. if (unlikely(__pyx_v_arr == Py_None)) {
  97822. PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
  97823. __PYX_ERR(6, 213, __pyx_L1_error)
  97824. }
  97825. __pyx_t_1 = PyList_GET_SIZE(__pyx_v_arr); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(6, 213, __pyx_L1_error)
  97826. __pyx_v_arr_len = __pyx_t_1;
  97827. /* "uvloop/handles/process.pyx":218
  97828. * char **ret
  97829. *
  97830. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  97831. * assert arr_len > 0
  97832. *
  97833. */
  97834. __pyx_t_2 = (UVLOOP_DEBUG != 0);
  97835. if (__pyx_t_2) {
  97836. /* "uvloop/handles/process.pyx":219
  97837. *
  97838. * if UVLOOP_DEBUG:
  97839. * assert arr_len > 0 # <<<<<<<<<<<<<<
  97840. *
  97841. * ret = <char **>PyMem_RawMalloc((arr_len + 1) * sizeof(char *))
  97842. */
  97843. #ifndef CYTHON_WITHOUT_ASSERTIONS
  97844. if (unlikely(!Py_OptimizeFlag)) {
  97845. if (unlikely(!((__pyx_v_arr_len > 0) != 0))) {
  97846. PyErr_SetNone(PyExc_AssertionError);
  97847. __PYX_ERR(6, 219, __pyx_L1_error)
  97848. }
  97849. }
  97850. #endif
  97851. /* "uvloop/handles/process.pyx":218
  97852. * char **ret
  97853. *
  97854. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  97855. * assert arr_len > 0
  97856. *
  97857. */
  97858. }
  97859. /* "uvloop/handles/process.pyx":221
  97860. * assert arr_len > 0
  97861. *
  97862. * ret = <char **>PyMem_RawMalloc((arr_len + 1) * sizeof(char *)) # <<<<<<<<<<<<<<
  97863. * if ret is NULL:
  97864. * raise MemoryError()
  97865. */
  97866. __pyx_v_ret = ((char **)PyMem_RawMalloc(((__pyx_v_arr_len + 1) * (sizeof(char *)))));
  97867. /* "uvloop/handles/process.pyx":222
  97868. *
  97869. * ret = <char **>PyMem_RawMalloc((arr_len + 1) * sizeof(char *))
  97870. * if ret is NULL: # <<<<<<<<<<<<<<
  97871. * raise MemoryError()
  97872. *
  97873. */
  97874. __pyx_t_2 = ((__pyx_v_ret == NULL) != 0);
  97875. if (unlikely(__pyx_t_2)) {
  97876. /* "uvloop/handles/process.pyx":223
  97877. * ret = <char **>PyMem_RawMalloc((arr_len + 1) * sizeof(char *))
  97878. * if ret is NULL:
  97879. * raise MemoryError() # <<<<<<<<<<<<<<
  97880. *
  97881. * for i in range(arr_len):
  97882. */
  97883. PyErr_NoMemory(); __PYX_ERR(6, 223, __pyx_L1_error)
  97884. /* "uvloop/handles/process.pyx":222
  97885. *
  97886. * ret = <char **>PyMem_RawMalloc((arr_len + 1) * sizeof(char *))
  97887. * if ret is NULL: # <<<<<<<<<<<<<<
  97888. * raise MemoryError()
  97889. *
  97890. */
  97891. }
  97892. /* "uvloop/handles/process.pyx":225
  97893. * raise MemoryError()
  97894. *
  97895. * for i in range(arr_len): # <<<<<<<<<<<<<<
  97896. * el = arr[i]
  97897. * # NB: PyBytes_AsString doesn't copy the data;
  97898. */
  97899. __pyx_t_3 = __pyx_v_arr_len;
  97900. __pyx_t_4 = __pyx_t_3;
  97901. for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
  97902. __pyx_v_i = __pyx_t_5;
  97903. /* "uvloop/handles/process.pyx":226
  97904. *
  97905. * for i in range(arr_len):
  97906. * el = arr[i] # <<<<<<<<<<<<<<
  97907. * # NB: PyBytes_AsString doesn't copy the data;
  97908. * # we have to be careful when the "arr" is GCed,
  97909. */
  97910. if (unlikely(__pyx_v_arr == Py_None)) {
  97911. PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
  97912. __PYX_ERR(6, 226, __pyx_L1_error)
  97913. }
  97914. __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_arr, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 226, __pyx_L1_error)
  97915. __Pyx_GOTREF(__pyx_t_6);
  97916. if (!(likely(PyBytes_CheckExact(__pyx_t_6))||((__pyx_t_6) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_6)->tp_name), 0))) __PYX_ERR(6, 226, __pyx_L1_error)
  97917. __Pyx_XDECREF_SET(__pyx_v_el, ((PyObject*)__pyx_t_6));
  97918. __pyx_t_6 = 0;
  97919. /* "uvloop/handles/process.pyx":230
  97920. * # we have to be careful when the "arr" is GCed,
  97921. * # and it shouldn't be ever mutated.
  97922. * ret[i] = PyBytes_AsString(el) # <<<<<<<<<<<<<<
  97923. *
  97924. * ret[arr_len] = NULL
  97925. */
  97926. __pyx_t_7 = PyBytes_AsString(__pyx_v_el); if (unlikely(__pyx_t_7 == ((char *)NULL))) __PYX_ERR(6, 230, __pyx_L1_error)
  97927. (__pyx_v_ret[__pyx_v_i]) = __pyx_t_7;
  97928. }
  97929. /* "uvloop/handles/process.pyx":232
  97930. * ret[i] = PyBytes_AsString(el)
  97931. *
  97932. * ret[arr_len] = NULL # <<<<<<<<<<<<<<
  97933. * return ret
  97934. *
  97935. */
  97936. (__pyx_v_ret[__pyx_v_arr_len]) = NULL;
  97937. /* "uvloop/handles/process.pyx":233
  97938. *
  97939. * ret[arr_len] = NULL
  97940. * return ret # <<<<<<<<<<<<<<
  97941. *
  97942. * cdef _init_options(self, list args, dict env, cwd, start_new_session,
  97943. */
  97944. __pyx_r = __pyx_v_ret;
  97945. goto __pyx_L0;
  97946. /* "uvloop/handles/process.pyx":210
  97947. * self.uv_opt_args = NULL
  97948. *
  97949. * cdef char** __to_cstring_array(self, list arr): # <<<<<<<<<<<<<<
  97950. * cdef:
  97951. * int i
  97952. */
  97953. /* function exit code */
  97954. __pyx_L1_error:;
  97955. __Pyx_XDECREF(__pyx_t_6);
  97956. __Pyx_WriteUnraisable("uvloop.loop.UVProcess.__to_cstring_array", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  97957. __pyx_r = 0;
  97958. __pyx_L0:;
  97959. __Pyx_XDECREF(__pyx_v_el);
  97960. __Pyx_RefNannyFinishContext();
  97961. return __pyx_r;
  97962. }
  97963. /* "uvloop/handles/process.pyx":235
  97964. * return ret
  97965. *
  97966. * cdef _init_options(self, list args, dict env, cwd, start_new_session, # <<<<<<<<<<<<<<
  97967. * _stdin, _stdout, _stderr):
  97968. *
  97969. */
  97970. static PyObject *__pyx_f_6uvloop_4loop_9UVProcess__init_options(struct __pyx_obj_6uvloop_4loop_UVProcess *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_env, PyObject *__pyx_v_cwd, PyObject *__pyx_v_start_new_session, PyObject *__pyx_v__stdin, PyObject *__pyx_v__stdout, PyObject *__pyx_v__stderr) {
  97971. PyObject *__pyx_v_fspath = NULL;
  97972. PyObject *__pyx_r = NULL;
  97973. __Pyx_RefNannyDeclarations
  97974. PyObject *__pyx_t_1 = NULL;
  97975. char **__pyx_t_2;
  97976. char *__pyx_t_3;
  97977. int __pyx_t_4;
  97978. int __pyx_t_5;
  97979. PyObject *__pyx_t_6 = NULL;
  97980. PyObject *__pyx_t_7 = NULL;
  97981. PyObject *__pyx_t_8 = NULL;
  97982. PyObject *__pyx_t_9 = NULL;
  97983. PyObject *__pyx_t_10 = NULL;
  97984. int __pyx_t_11;
  97985. __Pyx_RefNannySetupContext("_init_options", 0);
  97986. __Pyx_INCREF(__pyx_v_cwd);
  97987. /* "uvloop/handles/process.pyx":238
  97988. * _stdin, _stdout, _stderr):
  97989. *
  97990. * memset(&self.options, 0, sizeof(uv.uv_process_options_t)) # <<<<<<<<<<<<<<
  97991. *
  97992. * self._init_env(env)
  97993. */
  97994. (void)(memset((&__pyx_v_self->options), 0, (sizeof(uv_process_options_t))));
  97995. /* "uvloop/handles/process.pyx":240
  97996. * memset(&self.options, 0, sizeof(uv.uv_process_options_t))
  97997. *
  97998. * self._init_env(env) # <<<<<<<<<<<<<<
  97999. * self.options.env = self.uv_opt_env
  98000. *
  98001. */
  98002. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcess *)__pyx_v_self->__pyx_base.__pyx_vtab)->_init_env(__pyx_v_self, __pyx_v_env); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 240, __pyx_L1_error)
  98003. __Pyx_GOTREF(__pyx_t_1);
  98004. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  98005. /* "uvloop/handles/process.pyx":241
  98006. *
  98007. * self._init_env(env)
  98008. * self.options.env = self.uv_opt_env # <<<<<<<<<<<<<<
  98009. *
  98010. * self._init_args(args)
  98011. */
  98012. __pyx_t_2 = __pyx_v_self->uv_opt_env;
  98013. __pyx_v_self->options.env = __pyx_t_2;
  98014. /* "uvloop/handles/process.pyx":243
  98015. * self.options.env = self.uv_opt_env
  98016. *
  98017. * self._init_args(args) # <<<<<<<<<<<<<<
  98018. * self.options.file = self.uv_opt_file
  98019. * self.options.args = self.uv_opt_args
  98020. */
  98021. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcess *)__pyx_v_self->__pyx_base.__pyx_vtab)->_init_args(__pyx_v_self, __pyx_v_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 243, __pyx_L1_error)
  98022. __Pyx_GOTREF(__pyx_t_1);
  98023. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  98024. /* "uvloop/handles/process.pyx":244
  98025. *
  98026. * self._init_args(args)
  98027. * self.options.file = self.uv_opt_file # <<<<<<<<<<<<<<
  98028. * self.options.args = self.uv_opt_args
  98029. *
  98030. */
  98031. __pyx_t_3 = __pyx_v_self->uv_opt_file;
  98032. __pyx_v_self->options.file = __pyx_t_3;
  98033. /* "uvloop/handles/process.pyx":245
  98034. * self._init_args(args)
  98035. * self.options.file = self.uv_opt_file
  98036. * self.options.args = self.uv_opt_args # <<<<<<<<<<<<<<
  98037. *
  98038. * if start_new_session:
  98039. */
  98040. __pyx_t_2 = __pyx_v_self->uv_opt_args;
  98041. __pyx_v_self->options.args = __pyx_t_2;
  98042. /* "uvloop/handles/process.pyx":247
  98043. * self.options.args = self.uv_opt_args
  98044. *
  98045. * if start_new_session: # <<<<<<<<<<<<<<
  98046. * self.options.flags |= uv.UV_PROCESS_DETACHED
  98047. *
  98048. */
  98049. __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_start_new_session); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(6, 247, __pyx_L1_error)
  98050. if (__pyx_t_4) {
  98051. /* "uvloop/handles/process.pyx":248
  98052. *
  98053. * if start_new_session:
  98054. * self.options.flags |= uv.UV_PROCESS_DETACHED # <<<<<<<<<<<<<<
  98055. *
  98056. * if cwd is not None:
  98057. */
  98058. __pyx_v_self->options.flags = (__pyx_v_self->options.flags | UV_PROCESS_DETACHED);
  98059. /* "uvloop/handles/process.pyx":247
  98060. * self.options.args = self.uv_opt_args
  98061. *
  98062. * if start_new_session: # <<<<<<<<<<<<<<
  98063. * self.options.flags |= uv.UV_PROCESS_DETACHED
  98064. *
  98065. */
  98066. }
  98067. /* "uvloop/handles/process.pyx":250
  98068. * self.options.flags |= uv.UV_PROCESS_DETACHED
  98069. *
  98070. * if cwd is not None: # <<<<<<<<<<<<<<
  98071. * try:
  98072. * # Lookup __fspath__ manually, as os.fspath() isn't
  98073. */
  98074. __pyx_t_4 = (__pyx_v_cwd != Py_None);
  98075. __pyx_t_5 = (__pyx_t_4 != 0);
  98076. if (__pyx_t_5) {
  98077. /* "uvloop/handles/process.pyx":251
  98078. *
  98079. * if cwd is not None:
  98080. * try: # <<<<<<<<<<<<<<
  98081. * # Lookup __fspath__ manually, as os.fspath() isn't
  98082. * # available on Python 3.5.
  98083. */
  98084. {
  98085. __Pyx_PyThreadState_declare
  98086. __Pyx_PyThreadState_assign
  98087. __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
  98088. __Pyx_XGOTREF(__pyx_t_6);
  98089. __Pyx_XGOTREF(__pyx_t_7);
  98090. __Pyx_XGOTREF(__pyx_t_8);
  98091. /*try:*/ {
  98092. /* "uvloop/handles/process.pyx":254
  98093. * # Lookup __fspath__ manually, as os.fspath() isn't
  98094. * # available on Python 3.5.
  98095. * fspath = type(cwd).__fspath__ # <<<<<<<<<<<<<<
  98096. * except AttributeError:
  98097. * pass
  98098. */
  98099. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(__pyx_v_cwd)), __pyx_n_s_fspath); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 254, __pyx_L5_error)
  98100. __Pyx_GOTREF(__pyx_t_1);
  98101. __pyx_v_fspath = __pyx_t_1;
  98102. __pyx_t_1 = 0;
  98103. /* "uvloop/handles/process.pyx":251
  98104. *
  98105. * if cwd is not None:
  98106. * try: # <<<<<<<<<<<<<<
  98107. * # Lookup __fspath__ manually, as os.fspath() isn't
  98108. * # available on Python 3.5.
  98109. */
  98110. }
  98111. /* "uvloop/handles/process.pyx":258
  98112. * pass
  98113. * else:
  98114. * cwd = fspath(cwd) # <<<<<<<<<<<<<<
  98115. *
  98116. * if isinstance(cwd, str):
  98117. */
  98118. /*else:*/ {
  98119. __Pyx_INCREF(__pyx_v_fspath);
  98120. __pyx_t_9 = __pyx_v_fspath; __pyx_t_10 = NULL;
  98121. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
  98122. __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
  98123. if (likely(__pyx_t_10)) {
  98124. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
  98125. __Pyx_INCREF(__pyx_t_10);
  98126. __Pyx_INCREF(function);
  98127. __Pyx_DECREF_SET(__pyx_t_9, function);
  98128. }
  98129. }
  98130. __pyx_t_1 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_10, __pyx_v_cwd) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_cwd);
  98131. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  98132. if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 258, __pyx_L7_except_error)
  98133. __Pyx_GOTREF(__pyx_t_1);
  98134. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  98135. __Pyx_DECREF_SET(__pyx_v_cwd, __pyx_t_1);
  98136. __pyx_t_1 = 0;
  98137. }
  98138. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  98139. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  98140. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  98141. goto __pyx_L10_try_end;
  98142. __pyx_L5_error:;
  98143. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  98144. /* "uvloop/handles/process.pyx":255
  98145. * # available on Python 3.5.
  98146. * fspath = type(cwd).__fspath__
  98147. * except AttributeError: # <<<<<<<<<<<<<<
  98148. * pass
  98149. * else:
  98150. */
  98151. __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
  98152. if (__pyx_t_11) {
  98153. __Pyx_ErrRestore(0,0,0);
  98154. goto __pyx_L6_exception_handled;
  98155. }
  98156. goto __pyx_L7_except_error;
  98157. __pyx_L7_except_error:;
  98158. /* "uvloop/handles/process.pyx":251
  98159. *
  98160. * if cwd is not None:
  98161. * try: # <<<<<<<<<<<<<<
  98162. * # Lookup __fspath__ manually, as os.fspath() isn't
  98163. * # available on Python 3.5.
  98164. */
  98165. __Pyx_XGIVEREF(__pyx_t_6);
  98166. __Pyx_XGIVEREF(__pyx_t_7);
  98167. __Pyx_XGIVEREF(__pyx_t_8);
  98168. __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
  98169. goto __pyx_L1_error;
  98170. __pyx_L6_exception_handled:;
  98171. __Pyx_XGIVEREF(__pyx_t_6);
  98172. __Pyx_XGIVEREF(__pyx_t_7);
  98173. __Pyx_XGIVEREF(__pyx_t_8);
  98174. __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
  98175. __pyx_L10_try_end:;
  98176. }
  98177. /* "uvloop/handles/process.pyx":260
  98178. * cwd = fspath(cwd)
  98179. *
  98180. * if isinstance(cwd, str): # <<<<<<<<<<<<<<
  98181. * cwd = PyUnicode_EncodeFSDefault(cwd)
  98182. * if not isinstance(cwd, bytes):
  98183. */
  98184. __pyx_t_5 = PyUnicode_Check(__pyx_v_cwd);
  98185. __pyx_t_4 = (__pyx_t_5 != 0);
  98186. if (__pyx_t_4) {
  98187. /* "uvloop/handles/process.pyx":261
  98188. *
  98189. * if isinstance(cwd, str):
  98190. * cwd = PyUnicode_EncodeFSDefault(cwd) # <<<<<<<<<<<<<<
  98191. * if not isinstance(cwd, bytes):
  98192. * raise ValueError('cwd must be a str or bytes object')
  98193. */
  98194. __pyx_t_1 = PyUnicode_EncodeFSDefault(__pyx_v_cwd); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 261, __pyx_L1_error)
  98195. __Pyx_GOTREF(__pyx_t_1);
  98196. __Pyx_DECREF_SET(__pyx_v_cwd, __pyx_t_1);
  98197. __pyx_t_1 = 0;
  98198. /* "uvloop/handles/process.pyx":260
  98199. * cwd = fspath(cwd)
  98200. *
  98201. * if isinstance(cwd, str): # <<<<<<<<<<<<<<
  98202. * cwd = PyUnicode_EncodeFSDefault(cwd)
  98203. * if not isinstance(cwd, bytes):
  98204. */
  98205. }
  98206. /* "uvloop/handles/process.pyx":262
  98207. * if isinstance(cwd, str):
  98208. * cwd = PyUnicode_EncodeFSDefault(cwd)
  98209. * if not isinstance(cwd, bytes): # <<<<<<<<<<<<<<
  98210. * raise ValueError('cwd must be a str or bytes object')
  98211. *
  98212. */
  98213. __pyx_t_4 = PyBytes_Check(__pyx_v_cwd);
  98214. __pyx_t_5 = ((!(__pyx_t_4 != 0)) != 0);
  98215. if (unlikely(__pyx_t_5)) {
  98216. /* "uvloop/handles/process.pyx":263
  98217. * cwd = PyUnicode_EncodeFSDefault(cwd)
  98218. * if not isinstance(cwd, bytes):
  98219. * raise ValueError('cwd must be a str or bytes object') # <<<<<<<<<<<<<<
  98220. *
  98221. * self.__cwd = cwd
  98222. */
  98223. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__167, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 263, __pyx_L1_error)
  98224. __Pyx_GOTREF(__pyx_t_1);
  98225. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  98226. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  98227. __PYX_ERR(6, 263, __pyx_L1_error)
  98228. /* "uvloop/handles/process.pyx":262
  98229. * if isinstance(cwd, str):
  98230. * cwd = PyUnicode_EncodeFSDefault(cwd)
  98231. * if not isinstance(cwd, bytes): # <<<<<<<<<<<<<<
  98232. * raise ValueError('cwd must be a str or bytes object')
  98233. *
  98234. */
  98235. }
  98236. /* "uvloop/handles/process.pyx":265
  98237. * raise ValueError('cwd must be a str or bytes object')
  98238. *
  98239. * self.__cwd = cwd # <<<<<<<<<<<<<<
  98240. * self.options.cwd = PyBytes_AsString(self.__cwd)
  98241. *
  98242. */
  98243. if (!(likely(PyBytes_CheckExact(__pyx_v_cwd))||((__pyx_v_cwd) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_v_cwd)->tp_name), 0))) __PYX_ERR(6, 265, __pyx_L1_error)
  98244. __pyx_t_1 = __pyx_v_cwd;
  98245. __Pyx_INCREF(__pyx_t_1);
  98246. __Pyx_GIVEREF(__pyx_t_1);
  98247. __Pyx_GOTREF(__pyx_v_self->__pyx___cwd);
  98248. __Pyx_DECREF(__pyx_v_self->__pyx___cwd);
  98249. __pyx_v_self->__pyx___cwd = ((PyObject*)__pyx_t_1);
  98250. __pyx_t_1 = 0;
  98251. /* "uvloop/handles/process.pyx":266
  98252. *
  98253. * self.__cwd = cwd
  98254. * self.options.cwd = PyBytes_AsString(self.__cwd) # <<<<<<<<<<<<<<
  98255. *
  98256. * self.options.exit_cb = &__uvprocess_on_exit_callback
  98257. */
  98258. __pyx_t_1 = __pyx_v_self->__pyx___cwd;
  98259. __Pyx_INCREF(__pyx_t_1);
  98260. __pyx_t_3 = PyBytes_AsString(__pyx_t_1); if (unlikely(__pyx_t_3 == ((char *)NULL))) __PYX_ERR(6, 266, __pyx_L1_error)
  98261. __pyx_v_self->options.cwd = __pyx_t_3;
  98262. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  98263. /* "uvloop/handles/process.pyx":250
  98264. * self.options.flags |= uv.UV_PROCESS_DETACHED
  98265. *
  98266. * if cwd is not None: # <<<<<<<<<<<<<<
  98267. * try:
  98268. * # Lookup __fspath__ manually, as os.fspath() isn't
  98269. */
  98270. }
  98271. /* "uvloop/handles/process.pyx":268
  98272. * self.options.cwd = PyBytes_AsString(self.__cwd)
  98273. *
  98274. * self.options.exit_cb = &__uvprocess_on_exit_callback # <<<<<<<<<<<<<<
  98275. *
  98276. * self._init_files(_stdin, _stdout, _stderr)
  98277. */
  98278. __pyx_v_self->options.exit_cb = (&__pyx_f_6uvloop_4loop___uvprocess_on_exit_callback);
  98279. /* "uvloop/handles/process.pyx":270
  98280. * self.options.exit_cb = &__uvprocess_on_exit_callback
  98281. *
  98282. * self._init_files(_stdin, _stdout, _stderr) # <<<<<<<<<<<<<<
  98283. *
  98284. * cdef _init_args(self, list args):
  98285. */
  98286. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcess *)__pyx_v_self->__pyx_base.__pyx_vtab)->_init_files(__pyx_v_self, __pyx_v__stdin, __pyx_v__stdout, __pyx_v__stderr); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 270, __pyx_L1_error)
  98287. __Pyx_GOTREF(__pyx_t_1);
  98288. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  98289. /* "uvloop/handles/process.pyx":235
  98290. * return ret
  98291. *
  98292. * cdef _init_options(self, list args, dict env, cwd, start_new_session, # <<<<<<<<<<<<<<
  98293. * _stdin, _stdout, _stderr):
  98294. *
  98295. */
  98296. /* function exit code */
  98297. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  98298. goto __pyx_L0;
  98299. __pyx_L1_error:;
  98300. __Pyx_XDECREF(__pyx_t_1);
  98301. __Pyx_XDECREF(__pyx_t_9);
  98302. __Pyx_XDECREF(__pyx_t_10);
  98303. __Pyx_AddTraceback("uvloop.loop.UVProcess._init_options", __pyx_clineno, __pyx_lineno, __pyx_filename);
  98304. __pyx_r = 0;
  98305. __pyx_L0:;
  98306. __Pyx_XDECREF(__pyx_v_fspath);
  98307. __Pyx_XDECREF(__pyx_v_cwd);
  98308. __Pyx_XGIVEREF(__pyx_r);
  98309. __Pyx_RefNannyFinishContext();
  98310. return __pyx_r;
  98311. }
  98312. /* "uvloop/handles/process.pyx":272
  98313. * self._init_files(_stdin, _stdout, _stderr)
  98314. *
  98315. * cdef _init_args(self, list args): # <<<<<<<<<<<<<<
  98316. * cdef:
  98317. * bytes path
  98318. */
  98319. static PyObject *__pyx_f_6uvloop_4loop_9UVProcess__init_args(struct __pyx_obj_6uvloop_4loop_UVProcess *__pyx_v_self, PyObject *__pyx_v_args) {
  98320. PyObject *__pyx_v_path = 0;
  98321. int __pyx_v_an;
  98322. int __pyx_v_i;
  98323. PyObject *__pyx_v_arg = NULL;
  98324. PyObject *__pyx_r = NULL;
  98325. __Pyx_RefNannyDeclarations
  98326. Py_ssize_t __pyx_t_1;
  98327. int __pyx_t_2;
  98328. PyObject *__pyx_t_3 = NULL;
  98329. int __pyx_t_4;
  98330. int __pyx_t_5;
  98331. int __pyx_t_6;
  98332. int __pyx_t_7;
  98333. char *__pyx_t_8;
  98334. __Pyx_RefNannySetupContext("_init_args", 0);
  98335. /* "uvloop/handles/process.pyx":275
  98336. * cdef:
  98337. * bytes path
  98338. * int an = len(args) # <<<<<<<<<<<<<<
  98339. *
  98340. * if an < 1:
  98341. */
  98342. if (unlikely(__pyx_v_args == Py_None)) {
  98343. PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
  98344. __PYX_ERR(6, 275, __pyx_L1_error)
  98345. }
  98346. __pyx_t_1 = PyList_GET_SIZE(__pyx_v_args); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(6, 275, __pyx_L1_error)
  98347. __pyx_v_an = __pyx_t_1;
  98348. /* "uvloop/handles/process.pyx":277
  98349. * int an = len(args)
  98350. *
  98351. * if an < 1: # <<<<<<<<<<<<<<
  98352. * raise ValueError('cannot spawn a process: args are empty')
  98353. *
  98354. */
  98355. __pyx_t_2 = ((__pyx_v_an < 1) != 0);
  98356. if (unlikely(__pyx_t_2)) {
  98357. /* "uvloop/handles/process.pyx":278
  98358. *
  98359. * if an < 1:
  98360. * raise ValueError('cannot spawn a process: args are empty') # <<<<<<<<<<<<<<
  98361. *
  98362. * self.__args = args.copy()
  98363. */
  98364. __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__168, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 278, __pyx_L1_error)
  98365. __Pyx_GOTREF(__pyx_t_3);
  98366. __Pyx_Raise(__pyx_t_3, 0, 0, 0);
  98367. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  98368. __PYX_ERR(6, 278, __pyx_L1_error)
  98369. /* "uvloop/handles/process.pyx":277
  98370. * int an = len(args)
  98371. *
  98372. * if an < 1: # <<<<<<<<<<<<<<
  98373. * raise ValueError('cannot spawn a process: args are empty')
  98374. *
  98375. */
  98376. }
  98377. /* "uvloop/handles/process.pyx":280
  98378. * raise ValueError('cannot spawn a process: args are empty')
  98379. *
  98380. * self.__args = args.copy() # <<<<<<<<<<<<<<
  98381. * for i in range(an):
  98382. * arg = args[i]
  98383. */
  98384. __pyx_t_3 = __Pyx_CallUnboundCMethod0(&__pyx_umethod_PyList_Type_copy, __pyx_v_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 280, __pyx_L1_error)
  98385. __Pyx_GOTREF(__pyx_t_3);
  98386. if (!(likely(PyList_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(6, 280, __pyx_L1_error)
  98387. __Pyx_GIVEREF(__pyx_t_3);
  98388. __Pyx_GOTREF(__pyx_v_self->__pyx___args);
  98389. __Pyx_DECREF(__pyx_v_self->__pyx___args);
  98390. __pyx_v_self->__pyx___args = ((PyObject*)__pyx_t_3);
  98391. __pyx_t_3 = 0;
  98392. /* "uvloop/handles/process.pyx":281
  98393. *
  98394. * self.__args = args.copy()
  98395. * for i in range(an): # <<<<<<<<<<<<<<
  98396. * arg = args[i]
  98397. * if isinstance(arg, str):
  98398. */
  98399. __pyx_t_4 = __pyx_v_an;
  98400. __pyx_t_5 = __pyx_t_4;
  98401. for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
  98402. __pyx_v_i = __pyx_t_6;
  98403. /* "uvloop/handles/process.pyx":282
  98404. * self.__args = args.copy()
  98405. * for i in range(an):
  98406. * arg = args[i] # <<<<<<<<<<<<<<
  98407. * if isinstance(arg, str):
  98408. * self.__args[i] = PyUnicode_EncodeFSDefault(arg)
  98409. */
  98410. if (unlikely(__pyx_v_args == Py_None)) {
  98411. PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
  98412. __PYX_ERR(6, 282, __pyx_L1_error)
  98413. }
  98414. __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_args, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 282, __pyx_L1_error)
  98415. __Pyx_GOTREF(__pyx_t_3);
  98416. __Pyx_XDECREF_SET(__pyx_v_arg, __pyx_t_3);
  98417. __pyx_t_3 = 0;
  98418. /* "uvloop/handles/process.pyx":283
  98419. * for i in range(an):
  98420. * arg = args[i]
  98421. * if isinstance(arg, str): # <<<<<<<<<<<<<<
  98422. * self.__args[i] = PyUnicode_EncodeFSDefault(arg)
  98423. * elif not isinstance(arg, bytes):
  98424. */
  98425. __pyx_t_2 = PyUnicode_Check(__pyx_v_arg);
  98426. __pyx_t_7 = (__pyx_t_2 != 0);
  98427. if (__pyx_t_7) {
  98428. /* "uvloop/handles/process.pyx":284
  98429. * arg = args[i]
  98430. * if isinstance(arg, str):
  98431. * self.__args[i] = PyUnicode_EncodeFSDefault(arg) # <<<<<<<<<<<<<<
  98432. * elif not isinstance(arg, bytes):
  98433. * raise TypeError('all args must be str or bytes')
  98434. */
  98435. __pyx_t_3 = PyUnicode_EncodeFSDefault(__pyx_v_arg); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 284, __pyx_L1_error)
  98436. __Pyx_GOTREF(__pyx_t_3);
  98437. if (unlikely(__pyx_v_self->__pyx___args == Py_None)) {
  98438. PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
  98439. __PYX_ERR(6, 284, __pyx_L1_error)
  98440. }
  98441. if (unlikely(__Pyx_SetItemInt(__pyx_v_self->__pyx___args, __pyx_v_i, __pyx_t_3, int, 1, __Pyx_PyInt_From_int, 1, 1, 1) < 0)) __PYX_ERR(6, 284, __pyx_L1_error)
  98442. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  98443. /* "uvloop/handles/process.pyx":283
  98444. * for i in range(an):
  98445. * arg = args[i]
  98446. * if isinstance(arg, str): # <<<<<<<<<<<<<<
  98447. * self.__args[i] = PyUnicode_EncodeFSDefault(arg)
  98448. * elif not isinstance(arg, bytes):
  98449. */
  98450. goto __pyx_L6;
  98451. }
  98452. /* "uvloop/handles/process.pyx":285
  98453. * if isinstance(arg, str):
  98454. * self.__args[i] = PyUnicode_EncodeFSDefault(arg)
  98455. * elif not isinstance(arg, bytes): # <<<<<<<<<<<<<<
  98456. * raise TypeError('all args must be str or bytes')
  98457. *
  98458. */
  98459. __pyx_t_7 = PyBytes_Check(__pyx_v_arg);
  98460. __pyx_t_2 = ((!(__pyx_t_7 != 0)) != 0);
  98461. if (unlikely(__pyx_t_2)) {
  98462. /* "uvloop/handles/process.pyx":286
  98463. * self.__args[i] = PyUnicode_EncodeFSDefault(arg)
  98464. * elif not isinstance(arg, bytes):
  98465. * raise TypeError('all args must be str or bytes') # <<<<<<<<<<<<<<
  98466. *
  98467. * path = self.__args[0]
  98468. */
  98469. __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__169, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 286, __pyx_L1_error)
  98470. __Pyx_GOTREF(__pyx_t_3);
  98471. __Pyx_Raise(__pyx_t_3, 0, 0, 0);
  98472. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  98473. __PYX_ERR(6, 286, __pyx_L1_error)
  98474. /* "uvloop/handles/process.pyx":285
  98475. * if isinstance(arg, str):
  98476. * self.__args[i] = PyUnicode_EncodeFSDefault(arg)
  98477. * elif not isinstance(arg, bytes): # <<<<<<<<<<<<<<
  98478. * raise TypeError('all args must be str or bytes')
  98479. *
  98480. */
  98481. }
  98482. __pyx_L6:;
  98483. }
  98484. /* "uvloop/handles/process.pyx":288
  98485. * raise TypeError('all args must be str or bytes')
  98486. *
  98487. * path = self.__args[0] # <<<<<<<<<<<<<<
  98488. * self.uv_opt_file = PyBytes_AsString(path)
  98489. * self.uv_opt_args = self.__to_cstring_array(self.__args)
  98490. */
  98491. if (unlikely(__pyx_v_self->__pyx___args == Py_None)) {
  98492. PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
  98493. __PYX_ERR(6, 288, __pyx_L1_error)
  98494. }
  98495. __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_self->__pyx___args, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 288, __pyx_L1_error)
  98496. __Pyx_GOTREF(__pyx_t_3);
  98497. if (!(likely(PyBytes_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(6, 288, __pyx_L1_error)
  98498. __pyx_v_path = ((PyObject*)__pyx_t_3);
  98499. __pyx_t_3 = 0;
  98500. /* "uvloop/handles/process.pyx":289
  98501. *
  98502. * path = self.__args[0]
  98503. * self.uv_opt_file = PyBytes_AsString(path) # <<<<<<<<<<<<<<
  98504. * self.uv_opt_args = self.__to_cstring_array(self.__args)
  98505. *
  98506. */
  98507. __pyx_t_8 = PyBytes_AsString(__pyx_v_path); if (unlikely(__pyx_t_8 == ((char *)NULL))) __PYX_ERR(6, 289, __pyx_L1_error)
  98508. __pyx_v_self->uv_opt_file = __pyx_t_8;
  98509. /* "uvloop/handles/process.pyx":290
  98510. * path = self.__args[0]
  98511. * self.uv_opt_file = PyBytes_AsString(path)
  98512. * self.uv_opt_args = self.__to_cstring_array(self.__args) # <<<<<<<<<<<<<<
  98513. *
  98514. * cdef _init_env(self, dict env):
  98515. */
  98516. __pyx_t_3 = __pyx_v_self->__pyx___args;
  98517. __Pyx_INCREF(__pyx_t_3);
  98518. __pyx_v_self->uv_opt_args = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcess *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx___to_cstring_array(__pyx_v_self, ((PyObject*)__pyx_t_3));
  98519. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  98520. /* "uvloop/handles/process.pyx":272
  98521. * self._init_files(_stdin, _stdout, _stderr)
  98522. *
  98523. * cdef _init_args(self, list args): # <<<<<<<<<<<<<<
  98524. * cdef:
  98525. * bytes path
  98526. */
  98527. /* function exit code */
  98528. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  98529. goto __pyx_L0;
  98530. __pyx_L1_error:;
  98531. __Pyx_XDECREF(__pyx_t_3);
  98532. __Pyx_AddTraceback("uvloop.loop.UVProcess._init_args", __pyx_clineno, __pyx_lineno, __pyx_filename);
  98533. __pyx_r = 0;
  98534. __pyx_L0:;
  98535. __Pyx_XDECREF(__pyx_v_path);
  98536. __Pyx_XDECREF(__pyx_v_arg);
  98537. __Pyx_XGIVEREF(__pyx_r);
  98538. __Pyx_RefNannyFinishContext();
  98539. return __pyx_r;
  98540. }
  98541. /* "uvloop/handles/process.pyx":292
  98542. * self.uv_opt_args = self.__to_cstring_array(self.__args)
  98543. *
  98544. * cdef _init_env(self, dict env): # <<<<<<<<<<<<<<
  98545. * if env is not None and len(env):
  98546. * self.__env = list()
  98547. */
  98548. static PyObject *__pyx_f_6uvloop_4loop_9UVProcess__init_env(struct __pyx_obj_6uvloop_4loop_UVProcess *__pyx_v_self, PyObject *__pyx_v_env) {
  98549. PyObject *__pyx_v_key = NULL;
  98550. PyObject *__pyx_v_val = NULL;
  98551. PyObject *__pyx_r = NULL;
  98552. __Pyx_RefNannyDeclarations
  98553. int __pyx_t_1;
  98554. int __pyx_t_2;
  98555. int __pyx_t_3;
  98556. Py_ssize_t __pyx_t_4;
  98557. PyObject *__pyx_t_5 = NULL;
  98558. Py_ssize_t __pyx_t_6;
  98559. int __pyx_t_7;
  98560. PyObject *__pyx_t_8 = NULL;
  98561. int __pyx_t_9;
  98562. PyObject *__pyx_t_10 = NULL;
  98563. int __pyx_t_11;
  98564. __Pyx_RefNannySetupContext("_init_env", 0);
  98565. /* "uvloop/handles/process.pyx":293
  98566. *
  98567. * cdef _init_env(self, dict env):
  98568. * if env is not None and len(env): # <<<<<<<<<<<<<<
  98569. * self.__env = list()
  98570. * for key in env:
  98571. */
  98572. __pyx_t_2 = (__pyx_v_env != ((PyObject*)Py_None));
  98573. __pyx_t_3 = (__pyx_t_2 != 0);
  98574. if (__pyx_t_3) {
  98575. } else {
  98576. __pyx_t_1 = __pyx_t_3;
  98577. goto __pyx_L4_bool_binop_done;
  98578. }
  98579. if (unlikely(__pyx_v_env == Py_None)) {
  98580. PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
  98581. __PYX_ERR(6, 293, __pyx_L1_error)
  98582. }
  98583. __pyx_t_4 = PyDict_Size(__pyx_v_env); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(6, 293, __pyx_L1_error)
  98584. __pyx_t_3 = (__pyx_t_4 != 0);
  98585. __pyx_t_1 = __pyx_t_3;
  98586. __pyx_L4_bool_binop_done:;
  98587. if (__pyx_t_1) {
  98588. /* "uvloop/handles/process.pyx":294
  98589. * cdef _init_env(self, dict env):
  98590. * if env is not None and len(env):
  98591. * self.__env = list() # <<<<<<<<<<<<<<
  98592. * for key in env:
  98593. * val = env[key]
  98594. */
  98595. __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 294, __pyx_L1_error)
  98596. __Pyx_GOTREF(__pyx_t_5);
  98597. __Pyx_GIVEREF(__pyx_t_5);
  98598. __Pyx_GOTREF(__pyx_v_self->__pyx___env);
  98599. __Pyx_DECREF(__pyx_v_self->__pyx___env);
  98600. __pyx_v_self->__pyx___env = ((PyObject*)__pyx_t_5);
  98601. __pyx_t_5 = 0;
  98602. /* "uvloop/handles/process.pyx":295
  98603. * if env is not None and len(env):
  98604. * self.__env = list()
  98605. * for key in env: # <<<<<<<<<<<<<<
  98606. * val = env[key]
  98607. *
  98608. */
  98609. __pyx_t_4 = 0;
  98610. if (unlikely(__pyx_v_env == Py_None)) {
  98611. PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
  98612. __PYX_ERR(6, 295, __pyx_L1_error)
  98613. }
  98614. __pyx_t_8 = __Pyx_dict_iterator(__pyx_v_env, 1, ((PyObject *)NULL), (&__pyx_t_6), (&__pyx_t_7)); if (unlikely(!__pyx_t_8)) __PYX_ERR(6, 295, __pyx_L1_error)
  98615. __Pyx_GOTREF(__pyx_t_8);
  98616. __Pyx_XDECREF(__pyx_t_5);
  98617. __pyx_t_5 = __pyx_t_8;
  98618. __pyx_t_8 = 0;
  98619. while (1) {
  98620. __pyx_t_9 = __Pyx_dict_iter_next(__pyx_t_5, __pyx_t_6, &__pyx_t_4, &__pyx_t_8, NULL, NULL, __pyx_t_7);
  98621. if (unlikely(__pyx_t_9 == 0)) break;
  98622. if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(6, 295, __pyx_L1_error)
  98623. __Pyx_GOTREF(__pyx_t_8);
  98624. __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_8);
  98625. __pyx_t_8 = 0;
  98626. /* "uvloop/handles/process.pyx":296
  98627. * self.__env = list()
  98628. * for key in env:
  98629. * val = env[key] # <<<<<<<<<<<<<<
  98630. *
  98631. * if isinstance(key, str):
  98632. */
  98633. if (unlikely(__pyx_v_env == Py_None)) {
  98634. PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
  98635. __PYX_ERR(6, 296, __pyx_L1_error)
  98636. }
  98637. __pyx_t_8 = __Pyx_PyDict_GetItem(__pyx_v_env, __pyx_v_key); if (unlikely(!__pyx_t_8)) __PYX_ERR(6, 296, __pyx_L1_error)
  98638. __Pyx_GOTREF(__pyx_t_8);
  98639. __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_8);
  98640. __pyx_t_8 = 0;
  98641. /* "uvloop/handles/process.pyx":298
  98642. * val = env[key]
  98643. *
  98644. * if isinstance(key, str): # <<<<<<<<<<<<<<
  98645. * key = PyUnicode_EncodeFSDefault(key)
  98646. * elif not isinstance(key, bytes):
  98647. */
  98648. __pyx_t_1 = PyUnicode_Check(__pyx_v_key);
  98649. __pyx_t_3 = (__pyx_t_1 != 0);
  98650. if (__pyx_t_3) {
  98651. /* "uvloop/handles/process.pyx":299
  98652. *
  98653. * if isinstance(key, str):
  98654. * key = PyUnicode_EncodeFSDefault(key) # <<<<<<<<<<<<<<
  98655. * elif not isinstance(key, bytes):
  98656. * raise TypeError(
  98657. */
  98658. __pyx_t_8 = PyUnicode_EncodeFSDefault(__pyx_v_key); if (unlikely(!__pyx_t_8)) __PYX_ERR(6, 299, __pyx_L1_error)
  98659. __Pyx_GOTREF(__pyx_t_8);
  98660. __Pyx_DECREF_SET(__pyx_v_key, __pyx_t_8);
  98661. __pyx_t_8 = 0;
  98662. /* "uvloop/handles/process.pyx":298
  98663. * val = env[key]
  98664. *
  98665. * if isinstance(key, str): # <<<<<<<<<<<<<<
  98666. * key = PyUnicode_EncodeFSDefault(key)
  98667. * elif not isinstance(key, bytes):
  98668. */
  98669. goto __pyx_L8;
  98670. }
  98671. /* "uvloop/handles/process.pyx":300
  98672. * if isinstance(key, str):
  98673. * key = PyUnicode_EncodeFSDefault(key)
  98674. * elif not isinstance(key, bytes): # <<<<<<<<<<<<<<
  98675. * raise TypeError(
  98676. * 'all environment vars must be bytes or str')
  98677. */
  98678. __pyx_t_3 = PyBytes_Check(__pyx_v_key);
  98679. __pyx_t_1 = ((!(__pyx_t_3 != 0)) != 0);
  98680. if (unlikely(__pyx_t_1)) {
  98681. /* "uvloop/handles/process.pyx":301
  98682. * key = PyUnicode_EncodeFSDefault(key)
  98683. * elif not isinstance(key, bytes):
  98684. * raise TypeError( # <<<<<<<<<<<<<<
  98685. * 'all environment vars must be bytes or str')
  98686. *
  98687. */
  98688. __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__170, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(6, 301, __pyx_L1_error)
  98689. __Pyx_GOTREF(__pyx_t_8);
  98690. __Pyx_Raise(__pyx_t_8, 0, 0, 0);
  98691. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  98692. __PYX_ERR(6, 301, __pyx_L1_error)
  98693. /* "uvloop/handles/process.pyx":300
  98694. * if isinstance(key, str):
  98695. * key = PyUnicode_EncodeFSDefault(key)
  98696. * elif not isinstance(key, bytes): # <<<<<<<<<<<<<<
  98697. * raise TypeError(
  98698. * 'all environment vars must be bytes or str')
  98699. */
  98700. }
  98701. __pyx_L8:;
  98702. /* "uvloop/handles/process.pyx":304
  98703. * 'all environment vars must be bytes or str')
  98704. *
  98705. * if isinstance(val, str): # <<<<<<<<<<<<<<
  98706. * val = PyUnicode_EncodeFSDefault(val)
  98707. * elif not isinstance(val, bytes):
  98708. */
  98709. __pyx_t_1 = PyUnicode_Check(__pyx_v_val);
  98710. __pyx_t_3 = (__pyx_t_1 != 0);
  98711. if (__pyx_t_3) {
  98712. /* "uvloop/handles/process.pyx":305
  98713. *
  98714. * if isinstance(val, str):
  98715. * val = PyUnicode_EncodeFSDefault(val) # <<<<<<<<<<<<<<
  98716. * elif not isinstance(val, bytes):
  98717. * raise TypeError(
  98718. */
  98719. __pyx_t_8 = PyUnicode_EncodeFSDefault(__pyx_v_val); if (unlikely(!__pyx_t_8)) __PYX_ERR(6, 305, __pyx_L1_error)
  98720. __Pyx_GOTREF(__pyx_t_8);
  98721. __Pyx_DECREF_SET(__pyx_v_val, __pyx_t_8);
  98722. __pyx_t_8 = 0;
  98723. /* "uvloop/handles/process.pyx":304
  98724. * 'all environment vars must be bytes or str')
  98725. *
  98726. * if isinstance(val, str): # <<<<<<<<<<<<<<
  98727. * val = PyUnicode_EncodeFSDefault(val)
  98728. * elif not isinstance(val, bytes):
  98729. */
  98730. goto __pyx_L9;
  98731. }
  98732. /* "uvloop/handles/process.pyx":306
  98733. * if isinstance(val, str):
  98734. * val = PyUnicode_EncodeFSDefault(val)
  98735. * elif not isinstance(val, bytes): # <<<<<<<<<<<<<<
  98736. * raise TypeError(
  98737. * 'all environment values must be bytes or str')
  98738. */
  98739. __pyx_t_3 = PyBytes_Check(__pyx_v_val);
  98740. __pyx_t_1 = ((!(__pyx_t_3 != 0)) != 0);
  98741. if (unlikely(__pyx_t_1)) {
  98742. /* "uvloop/handles/process.pyx":307
  98743. * val = PyUnicode_EncodeFSDefault(val)
  98744. * elif not isinstance(val, bytes):
  98745. * raise TypeError( # <<<<<<<<<<<<<<
  98746. * 'all environment values must be bytes or str')
  98747. *
  98748. */
  98749. __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__171, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(6, 307, __pyx_L1_error)
  98750. __Pyx_GOTREF(__pyx_t_8);
  98751. __Pyx_Raise(__pyx_t_8, 0, 0, 0);
  98752. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  98753. __PYX_ERR(6, 307, __pyx_L1_error)
  98754. /* "uvloop/handles/process.pyx":306
  98755. * if isinstance(val, str):
  98756. * val = PyUnicode_EncodeFSDefault(val)
  98757. * elif not isinstance(val, bytes): # <<<<<<<<<<<<<<
  98758. * raise TypeError(
  98759. * 'all environment values must be bytes or str')
  98760. */
  98761. }
  98762. __pyx_L9:;
  98763. /* "uvloop/handles/process.pyx":310
  98764. * 'all environment values must be bytes or str')
  98765. *
  98766. * self.__env.append(key + b'=' + val) # <<<<<<<<<<<<<<
  98767. *
  98768. * self.uv_opt_env = self.__to_cstring_array(self.__env)
  98769. */
  98770. if (unlikely(__pyx_v_self->__pyx___env == Py_None)) {
  98771. PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append");
  98772. __PYX_ERR(6, 310, __pyx_L1_error)
  98773. }
  98774. __pyx_t_8 = PyNumber_Add(__pyx_v_key, __pyx_kp_b__172); if (unlikely(!__pyx_t_8)) __PYX_ERR(6, 310, __pyx_L1_error)
  98775. __Pyx_GOTREF(__pyx_t_8);
  98776. __pyx_t_10 = PyNumber_Add(__pyx_t_8, __pyx_v_val); if (unlikely(!__pyx_t_10)) __PYX_ERR(6, 310, __pyx_L1_error)
  98777. __Pyx_GOTREF(__pyx_t_10);
  98778. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  98779. __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_self->__pyx___env, __pyx_t_10); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(6, 310, __pyx_L1_error)
  98780. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  98781. }
  98782. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  98783. /* "uvloop/handles/process.pyx":312
  98784. * self.__env.append(key + b'=' + val)
  98785. *
  98786. * self.uv_opt_env = self.__to_cstring_array(self.__env) # <<<<<<<<<<<<<<
  98787. * else:
  98788. * self.__env = None
  98789. */
  98790. __pyx_t_5 = __pyx_v_self->__pyx___env;
  98791. __Pyx_INCREF(__pyx_t_5);
  98792. __pyx_v_self->uv_opt_env = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcess *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx___to_cstring_array(__pyx_v_self, ((PyObject*)__pyx_t_5));
  98793. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  98794. /* "uvloop/handles/process.pyx":293
  98795. *
  98796. * cdef _init_env(self, dict env):
  98797. * if env is not None and len(env): # <<<<<<<<<<<<<<
  98798. * self.__env = list()
  98799. * for key in env:
  98800. */
  98801. goto __pyx_L3;
  98802. }
  98803. /* "uvloop/handles/process.pyx":314
  98804. * self.uv_opt_env = self.__to_cstring_array(self.__env)
  98805. * else:
  98806. * self.__env = None # <<<<<<<<<<<<<<
  98807. *
  98808. * cdef _init_files(self, _stdin, _stdout, _stderr):
  98809. */
  98810. /*else*/ {
  98811. __Pyx_INCREF(Py_None);
  98812. __Pyx_GIVEREF(Py_None);
  98813. __Pyx_GOTREF(__pyx_v_self->__pyx___env);
  98814. __Pyx_DECREF(__pyx_v_self->__pyx___env);
  98815. __pyx_v_self->__pyx___env = ((PyObject*)Py_None);
  98816. }
  98817. __pyx_L3:;
  98818. /* "uvloop/handles/process.pyx":292
  98819. * self.uv_opt_args = self.__to_cstring_array(self.__args)
  98820. *
  98821. * cdef _init_env(self, dict env): # <<<<<<<<<<<<<<
  98822. * if env is not None and len(env):
  98823. * self.__env = list()
  98824. */
  98825. /* function exit code */
  98826. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  98827. goto __pyx_L0;
  98828. __pyx_L1_error:;
  98829. __Pyx_XDECREF(__pyx_t_5);
  98830. __Pyx_XDECREF(__pyx_t_8);
  98831. __Pyx_XDECREF(__pyx_t_10);
  98832. __Pyx_AddTraceback("uvloop.loop.UVProcess._init_env", __pyx_clineno, __pyx_lineno, __pyx_filename);
  98833. __pyx_r = 0;
  98834. __pyx_L0:;
  98835. __Pyx_XDECREF(__pyx_v_key);
  98836. __Pyx_XDECREF(__pyx_v_val);
  98837. __Pyx_XGIVEREF(__pyx_r);
  98838. __Pyx_RefNannyFinishContext();
  98839. return __pyx_r;
  98840. }
  98841. /* "uvloop/handles/process.pyx":316
  98842. * self.__env = None
  98843. *
  98844. * cdef _init_files(self, _stdin, _stdout, _stderr): # <<<<<<<<<<<<<<
  98845. * self.options.stdio_count = 0
  98846. *
  98847. */
  98848. static PyObject *__pyx_f_6uvloop_4loop_9UVProcess__init_files(struct __pyx_obj_6uvloop_4loop_UVProcess *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v__stdin, CYTHON_UNUSED PyObject *__pyx_v__stdout, CYTHON_UNUSED PyObject *__pyx_v__stderr) {
  98849. PyObject *__pyx_r = NULL;
  98850. __Pyx_RefNannyDeclarations
  98851. __Pyx_RefNannySetupContext("_init_files", 0);
  98852. /* "uvloop/handles/process.pyx":317
  98853. *
  98854. * cdef _init_files(self, _stdin, _stdout, _stderr):
  98855. * self.options.stdio_count = 0 # <<<<<<<<<<<<<<
  98856. *
  98857. * cdef _kill(self, int signum):
  98858. */
  98859. __pyx_v_self->options.stdio_count = 0;
  98860. /* "uvloop/handles/process.pyx":316
  98861. * self.__env = None
  98862. *
  98863. * cdef _init_files(self, _stdin, _stdout, _stderr): # <<<<<<<<<<<<<<
  98864. * self.options.stdio_count = 0
  98865. *
  98866. */
  98867. /* function exit code */
  98868. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  98869. __Pyx_XGIVEREF(__pyx_r);
  98870. __Pyx_RefNannyFinishContext();
  98871. return __pyx_r;
  98872. }
  98873. /* "uvloop/handles/process.pyx":319
  98874. * self.options.stdio_count = 0
  98875. *
  98876. * cdef _kill(self, int signum): # <<<<<<<<<<<<<<
  98877. * cdef int err
  98878. * self._ensure_alive()
  98879. */
  98880. static PyObject *__pyx_f_6uvloop_4loop_9UVProcess__kill(struct __pyx_obj_6uvloop_4loop_UVProcess *__pyx_v_self, int __pyx_v_signum) {
  98881. int __pyx_v_err;
  98882. PyObject *__pyx_r = NULL;
  98883. __Pyx_RefNannyDeclarations
  98884. PyObject *__pyx_t_1 = NULL;
  98885. int __pyx_t_2;
  98886. __Pyx_RefNannySetupContext("_kill", 0);
  98887. /* "uvloop/handles/process.pyx":321
  98888. * cdef _kill(self, int signum):
  98889. * cdef int err
  98890. * self._ensure_alive() # <<<<<<<<<<<<<<
  98891. * err = uv.uv_process_kill(<uv.uv_process_t*>self._handle, signum)
  98892. * if err < 0:
  98893. */
  98894. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcess *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._ensure_alive(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 321, __pyx_L1_error)
  98895. __Pyx_GOTREF(__pyx_t_1);
  98896. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  98897. /* "uvloop/handles/process.pyx":322
  98898. * cdef int err
  98899. * self._ensure_alive()
  98900. * err = uv.uv_process_kill(<uv.uv_process_t*>self._handle, signum) # <<<<<<<<<<<<<<
  98901. * if err < 0:
  98902. * raise convert_error(err)
  98903. */
  98904. __pyx_v_err = uv_process_kill(((uv_process_t *)__pyx_v_self->__pyx_base._handle), __pyx_v_signum);
  98905. /* "uvloop/handles/process.pyx":323
  98906. * self._ensure_alive()
  98907. * err = uv.uv_process_kill(<uv.uv_process_t*>self._handle, signum)
  98908. * if err < 0: # <<<<<<<<<<<<<<
  98909. * raise convert_error(err)
  98910. *
  98911. */
  98912. __pyx_t_2 = ((__pyx_v_err < 0) != 0);
  98913. if (unlikely(__pyx_t_2)) {
  98914. /* "uvloop/handles/process.pyx":324
  98915. * err = uv.uv_process_kill(<uv.uv_process_t*>self._handle, signum)
  98916. * if err < 0:
  98917. * raise convert_error(err) # <<<<<<<<<<<<<<
  98918. *
  98919. * cdef _on_exit(self, int64_t exit_status, int term_signal):
  98920. */
  98921. __pyx_t_1 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 324, __pyx_L1_error)
  98922. __Pyx_GOTREF(__pyx_t_1);
  98923. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  98924. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  98925. __PYX_ERR(6, 324, __pyx_L1_error)
  98926. /* "uvloop/handles/process.pyx":323
  98927. * self._ensure_alive()
  98928. * err = uv.uv_process_kill(<uv.uv_process_t*>self._handle, signum)
  98929. * if err < 0: # <<<<<<<<<<<<<<
  98930. * raise convert_error(err)
  98931. *
  98932. */
  98933. }
  98934. /* "uvloop/handles/process.pyx":319
  98935. * self.options.stdio_count = 0
  98936. *
  98937. * cdef _kill(self, int signum): # <<<<<<<<<<<<<<
  98938. * cdef int err
  98939. * self._ensure_alive()
  98940. */
  98941. /* function exit code */
  98942. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  98943. goto __pyx_L0;
  98944. __pyx_L1_error:;
  98945. __Pyx_XDECREF(__pyx_t_1);
  98946. __Pyx_AddTraceback("uvloop.loop.UVProcess._kill", __pyx_clineno, __pyx_lineno, __pyx_filename);
  98947. __pyx_r = 0;
  98948. __pyx_L0:;
  98949. __Pyx_XGIVEREF(__pyx_r);
  98950. __Pyx_RefNannyFinishContext();
  98951. return __pyx_r;
  98952. }
  98953. /* "uvloop/handles/process.pyx":326
  98954. * raise convert_error(err)
  98955. *
  98956. * cdef _on_exit(self, int64_t exit_status, int term_signal): # <<<<<<<<<<<<<<
  98957. * if term_signal:
  98958. * # From Python docs:
  98959. */
  98960. static PyObject *__pyx_f_6uvloop_4loop_9UVProcess__on_exit(struct __pyx_obj_6uvloop_4loop_UVProcess *__pyx_v_self, int64_t __pyx_v_exit_status, int __pyx_v_term_signal) {
  98961. PyObject *__pyx_r = NULL;
  98962. __Pyx_RefNannyDeclarations
  98963. int __pyx_t_1;
  98964. PyObject *__pyx_t_2 = NULL;
  98965. __Pyx_RefNannySetupContext("_on_exit", 0);
  98966. /* "uvloop/handles/process.pyx":327
  98967. *
  98968. * cdef _on_exit(self, int64_t exit_status, int term_signal):
  98969. * if term_signal: # <<<<<<<<<<<<<<
  98970. * # From Python docs:
  98971. * # A negative value -N indicates that the child was
  98972. */
  98973. __pyx_t_1 = (__pyx_v_term_signal != 0);
  98974. if (__pyx_t_1) {
  98975. /* "uvloop/handles/process.pyx":331
  98976. * # A negative value -N indicates that the child was
  98977. * # terminated by signal N (POSIX only).
  98978. * self._returncode = -term_signal # <<<<<<<<<<<<<<
  98979. * else:
  98980. * self._returncode = exit_status
  98981. */
  98982. __pyx_t_2 = __Pyx_PyInt_From_int((-__pyx_v_term_signal)); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 331, __pyx_L1_error)
  98983. __Pyx_GOTREF(__pyx_t_2);
  98984. __Pyx_GIVEREF(__pyx_t_2);
  98985. __Pyx_GOTREF(__pyx_v_self->_returncode);
  98986. __Pyx_DECREF(__pyx_v_self->_returncode);
  98987. __pyx_v_self->_returncode = __pyx_t_2;
  98988. __pyx_t_2 = 0;
  98989. /* "uvloop/handles/process.pyx":327
  98990. *
  98991. * cdef _on_exit(self, int64_t exit_status, int term_signal):
  98992. * if term_signal: # <<<<<<<<<<<<<<
  98993. * # From Python docs:
  98994. * # A negative value -N indicates that the child was
  98995. */
  98996. goto __pyx_L3;
  98997. }
  98998. /* "uvloop/handles/process.pyx":333
  98999. * self._returncode = -term_signal
  99000. * else:
  99001. * self._returncode = exit_status # <<<<<<<<<<<<<<
  99002. *
  99003. * self._close()
  99004. */
  99005. /*else*/ {
  99006. __pyx_t_2 = __Pyx_PyInt_From_int64_t(__pyx_v_exit_status); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 333, __pyx_L1_error)
  99007. __Pyx_GOTREF(__pyx_t_2);
  99008. __Pyx_GIVEREF(__pyx_t_2);
  99009. __Pyx_GOTREF(__pyx_v_self->_returncode);
  99010. __Pyx_DECREF(__pyx_v_self->_returncode);
  99011. __pyx_v_self->_returncode = __pyx_t_2;
  99012. __pyx_t_2 = 0;
  99013. }
  99014. __pyx_L3:;
  99015. /* "uvloop/handles/process.pyx":335
  99016. * self._returncode = exit_status
  99017. *
  99018. * self._close() # <<<<<<<<<<<<<<
  99019. *
  99020. * cdef _close(self):
  99021. */
  99022. __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcess *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._close(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 335, __pyx_L1_error)
  99023. __Pyx_GOTREF(__pyx_t_2);
  99024. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  99025. /* "uvloop/handles/process.pyx":326
  99026. * raise convert_error(err)
  99027. *
  99028. * cdef _on_exit(self, int64_t exit_status, int term_signal): # <<<<<<<<<<<<<<
  99029. * if term_signal:
  99030. * # From Python docs:
  99031. */
  99032. /* function exit code */
  99033. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  99034. goto __pyx_L0;
  99035. __pyx_L1_error:;
  99036. __Pyx_XDECREF(__pyx_t_2);
  99037. __Pyx_AddTraceback("uvloop.loop.UVProcess._on_exit", __pyx_clineno, __pyx_lineno, __pyx_filename);
  99038. __pyx_r = 0;
  99039. __pyx_L0:;
  99040. __Pyx_XGIVEREF(__pyx_r);
  99041. __Pyx_RefNannyFinishContext();
  99042. return __pyx_r;
  99043. }
  99044. /* "uvloop/handles/process.pyx":337
  99045. * self._close()
  99046. *
  99047. * cdef _close(self): # <<<<<<<<<<<<<<
  99048. * try:
  99049. * if self._loop is not None:
  99050. */
  99051. static PyObject *__pyx_f_6uvloop_4loop_9UVProcess__close(struct __pyx_obj_6uvloop_4loop_UVProcess *__pyx_v_self) {
  99052. PyObject *__pyx_r = NULL;
  99053. __Pyx_RefNannyDeclarations
  99054. int __pyx_t_1;
  99055. int __pyx_t_2;
  99056. PyObject *__pyx_t_3 = NULL;
  99057. int __pyx_t_4;
  99058. int __pyx_t_5;
  99059. char const *__pyx_t_6;
  99060. PyObject *__pyx_t_7 = NULL;
  99061. PyObject *__pyx_t_8 = NULL;
  99062. PyObject *__pyx_t_9 = NULL;
  99063. PyObject *__pyx_t_10 = NULL;
  99064. PyObject *__pyx_t_11 = NULL;
  99065. PyObject *__pyx_t_12 = NULL;
  99066. __Pyx_RefNannySetupContext("_close", 0);
  99067. /* "uvloop/handles/process.pyx":338
  99068. *
  99069. * cdef _close(self):
  99070. * try: # <<<<<<<<<<<<<<
  99071. * if self._loop is not None:
  99072. * self._loop._untrack_process(self)
  99073. */
  99074. /*try:*/ {
  99075. /* "uvloop/handles/process.pyx":339
  99076. * cdef _close(self):
  99077. * try:
  99078. * if self._loop is not None: # <<<<<<<<<<<<<<
  99079. * self._loop._untrack_process(self)
  99080. * finally:
  99081. */
  99082. __pyx_t_1 = (((PyObject *)__pyx_v_self->__pyx_base._loop) != Py_None);
  99083. __pyx_t_2 = (__pyx_t_1 != 0);
  99084. if (__pyx_t_2) {
  99085. /* "uvloop/handles/process.pyx":340
  99086. * try:
  99087. * if self._loop is not None:
  99088. * self._loop._untrack_process(self) # <<<<<<<<<<<<<<
  99089. * finally:
  99090. * UVHandle._close(self)
  99091. */
  99092. __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_base._loop->__pyx_vtab)->_untrack_process(__pyx_v_self->__pyx_base._loop, __pyx_v_self); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 340, __pyx_L4_error)
  99093. __Pyx_GOTREF(__pyx_t_3);
  99094. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  99095. /* "uvloop/handles/process.pyx":339
  99096. * cdef _close(self):
  99097. * try:
  99098. * if self._loop is not None: # <<<<<<<<<<<<<<
  99099. * self._loop._untrack_process(self)
  99100. * finally:
  99101. */
  99102. }
  99103. }
  99104. /* "uvloop/handles/process.pyx":342
  99105. * self._loop._untrack_process(self)
  99106. * finally:
  99107. * UVHandle._close(self) # <<<<<<<<<<<<<<
  99108. *
  99109. *
  99110. */
  99111. /*finally:*/ {
  99112. /*normal exit:*/{
  99113. __pyx_t_3 = __pyx_f_6uvloop_4loop_8UVHandle__close(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 342, __pyx_L1_error)
  99114. __Pyx_GOTREF(__pyx_t_3);
  99115. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  99116. goto __pyx_L5;
  99117. }
  99118. __pyx_L4_error:;
  99119. /*exception exit:*/{
  99120. __Pyx_PyThreadState_declare
  99121. __Pyx_PyThreadState_assign
  99122. __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0;
  99123. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  99124. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
  99125. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9) < 0)) __Pyx_ErrFetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
  99126. __Pyx_XGOTREF(__pyx_t_7);
  99127. __Pyx_XGOTREF(__pyx_t_8);
  99128. __Pyx_XGOTREF(__pyx_t_9);
  99129. __Pyx_XGOTREF(__pyx_t_10);
  99130. __Pyx_XGOTREF(__pyx_t_11);
  99131. __Pyx_XGOTREF(__pyx_t_12);
  99132. __pyx_t_4 = __pyx_lineno; __pyx_t_5 = __pyx_clineno; __pyx_t_6 = __pyx_filename;
  99133. {
  99134. __pyx_t_3 = __pyx_f_6uvloop_4loop_8UVHandle__close(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 342, __pyx_L8_error)
  99135. __Pyx_GOTREF(__pyx_t_3);
  99136. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  99137. }
  99138. if (PY_MAJOR_VERSION >= 3) {
  99139. __Pyx_XGIVEREF(__pyx_t_10);
  99140. __Pyx_XGIVEREF(__pyx_t_11);
  99141. __Pyx_XGIVEREF(__pyx_t_12);
  99142. __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
  99143. }
  99144. __Pyx_XGIVEREF(__pyx_t_7);
  99145. __Pyx_XGIVEREF(__pyx_t_8);
  99146. __Pyx_XGIVEREF(__pyx_t_9);
  99147. __Pyx_ErrRestore(__pyx_t_7, __pyx_t_8, __pyx_t_9);
  99148. __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0;
  99149. __pyx_lineno = __pyx_t_4; __pyx_clineno = __pyx_t_5; __pyx_filename = __pyx_t_6;
  99150. goto __pyx_L1_error;
  99151. __pyx_L8_error:;
  99152. if (PY_MAJOR_VERSION >= 3) {
  99153. __Pyx_XGIVEREF(__pyx_t_10);
  99154. __Pyx_XGIVEREF(__pyx_t_11);
  99155. __Pyx_XGIVEREF(__pyx_t_12);
  99156. __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
  99157. }
  99158. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  99159. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  99160. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  99161. __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0;
  99162. goto __pyx_L1_error;
  99163. }
  99164. __pyx_L5:;
  99165. }
  99166. /* "uvloop/handles/process.pyx":337
  99167. * self._close()
  99168. *
  99169. * cdef _close(self): # <<<<<<<<<<<<<<
  99170. * try:
  99171. * if self._loop is not None:
  99172. */
  99173. /* function exit code */
  99174. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  99175. goto __pyx_L0;
  99176. __pyx_L1_error:;
  99177. __Pyx_XDECREF(__pyx_t_3);
  99178. __Pyx_AddTraceback("uvloop.loop.UVProcess._close", __pyx_clineno, __pyx_lineno, __pyx_filename);
  99179. __pyx_r = 0;
  99180. __pyx_L0:;
  99181. __Pyx_XGIVEREF(__pyx_r);
  99182. __Pyx_RefNannyFinishContext();
  99183. return __pyx_r;
  99184. }
  99185. /* "(tree fragment)":1
  99186. * def __reduce_cython__(self): # <<<<<<<<<<<<<<
  99187. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  99188. * def __setstate_cython__(self, __pyx_state):
  99189. */
  99190. /* Python wrapper */
  99191. static PyObject *__pyx_pw_6uvloop_4loop_9UVProcess_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  99192. static char __pyx_doc_6uvloop_4loop_9UVProcess_4__reduce_cython__[] = "UVProcess.__reduce_cython__(self)";
  99193. static PyObject *__pyx_pw_6uvloop_4loop_9UVProcess_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  99194. PyObject *__pyx_r = 0;
  99195. __Pyx_RefNannyDeclarations
  99196. __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  99197. __pyx_r = __pyx_pf_6uvloop_4loop_9UVProcess_4__reduce_cython__(((struct __pyx_obj_6uvloop_4loop_UVProcess *)__pyx_v_self));
  99198. /* function exit code */
  99199. __Pyx_RefNannyFinishContext();
  99200. return __pyx_r;
  99201. }
  99202. static PyObject *__pyx_pf_6uvloop_4loop_9UVProcess_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVProcess *__pyx_v_self) {
  99203. PyObject *__pyx_r = NULL;
  99204. __Pyx_RefNannyDeclarations
  99205. PyObject *__pyx_t_1 = NULL;
  99206. __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  99207. /* "(tree fragment)":2
  99208. * def __reduce_cython__(self):
  99209. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  99210. * def __setstate_cython__(self, __pyx_state):
  99211. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  99212. */
  99213. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__173, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 2, __pyx_L1_error)
  99214. __Pyx_GOTREF(__pyx_t_1);
  99215. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  99216. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  99217. __PYX_ERR(9, 2, __pyx_L1_error)
  99218. /* "(tree fragment)":1
  99219. * def __reduce_cython__(self): # <<<<<<<<<<<<<<
  99220. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  99221. * def __setstate_cython__(self, __pyx_state):
  99222. */
  99223. /* function exit code */
  99224. __pyx_L1_error:;
  99225. __Pyx_XDECREF(__pyx_t_1);
  99226. __Pyx_AddTraceback("uvloop.loop.UVProcess.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  99227. __pyx_r = NULL;
  99228. __Pyx_XGIVEREF(__pyx_r);
  99229. __Pyx_RefNannyFinishContext();
  99230. return __pyx_r;
  99231. }
  99232. /* "(tree fragment)":3
  99233. * def __reduce_cython__(self):
  99234. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  99235. * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
  99236. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  99237. */
  99238. /* Python wrapper */
  99239. static PyObject *__pyx_pw_6uvloop_4loop_9UVProcess_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
  99240. static char __pyx_doc_6uvloop_4loop_9UVProcess_6__setstate_cython__[] = "UVProcess.__setstate_cython__(self, __pyx_state)";
  99241. static PyObject *__pyx_pw_6uvloop_4loop_9UVProcess_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  99242. PyObject *__pyx_r = 0;
  99243. __Pyx_RefNannyDeclarations
  99244. __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  99245. __pyx_r = __pyx_pf_6uvloop_4loop_9UVProcess_6__setstate_cython__(((struct __pyx_obj_6uvloop_4loop_UVProcess *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
  99246. /* function exit code */
  99247. __Pyx_RefNannyFinishContext();
  99248. return __pyx_r;
  99249. }
  99250. static PyObject *__pyx_pf_6uvloop_4loop_9UVProcess_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVProcess *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  99251. PyObject *__pyx_r = NULL;
  99252. __Pyx_RefNannyDeclarations
  99253. PyObject *__pyx_t_1 = NULL;
  99254. __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  99255. /* "(tree fragment)":4
  99256. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  99257. * def __setstate_cython__(self, __pyx_state):
  99258. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  99259. */
  99260. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__174, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 4, __pyx_L1_error)
  99261. __Pyx_GOTREF(__pyx_t_1);
  99262. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  99263. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  99264. __PYX_ERR(9, 4, __pyx_L1_error)
  99265. /* "(tree fragment)":3
  99266. * def __reduce_cython__(self):
  99267. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  99268. * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
  99269. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  99270. */
  99271. /* function exit code */
  99272. __pyx_L1_error:;
  99273. __Pyx_XDECREF(__pyx_t_1);
  99274. __Pyx_AddTraceback("uvloop.loop.UVProcess.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  99275. __pyx_r = NULL;
  99276. __Pyx_XGIVEREF(__pyx_r);
  99277. __Pyx_RefNannyFinishContext();
  99278. return __pyx_r;
  99279. }
  99280. /* "uvloop/handles/process.pyx":353
  99281. * @cython.no_gc_clear
  99282. * cdef class UVProcessTransport(UVProcess):
  99283. * def __cinit__(self): # <<<<<<<<<<<<<<
  99284. * self._exit_waiters = []
  99285. * self._protocol = None
  99286. */
  99287. /* Python wrapper */
  99288. static int __pyx_pw_6uvloop_4loop_18UVProcessTransport_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  99289. static int __pyx_pw_6uvloop_4loop_18UVProcessTransport_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  99290. int __pyx_r;
  99291. __Pyx_RefNannyDeclarations
  99292. __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  99293. if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
  99294. __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  99295. if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
  99296. __pyx_r = __pyx_pf_6uvloop_4loop_18UVProcessTransport___cinit__(((struct __pyx_obj_6uvloop_4loop_UVProcessTransport *)__pyx_v_self));
  99297. /* function exit code */
  99298. __Pyx_RefNannyFinishContext();
  99299. return __pyx_r;
  99300. }
  99301. static int __pyx_pf_6uvloop_4loop_18UVProcessTransport___cinit__(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self) {
  99302. int __pyx_r;
  99303. __Pyx_RefNannyDeclarations
  99304. PyObject *__pyx_t_1 = NULL;
  99305. __Pyx_RefNannySetupContext("__cinit__", 0);
  99306. /* "uvloop/handles/process.pyx":354
  99307. * cdef class UVProcessTransport(UVProcess):
  99308. * def __cinit__(self):
  99309. * self._exit_waiters = [] # <<<<<<<<<<<<<<
  99310. * self._protocol = None
  99311. *
  99312. */
  99313. __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 354, __pyx_L1_error)
  99314. __Pyx_GOTREF(__pyx_t_1);
  99315. __Pyx_GIVEREF(__pyx_t_1);
  99316. __Pyx_GOTREF(__pyx_v_self->_exit_waiters);
  99317. __Pyx_DECREF(__pyx_v_self->_exit_waiters);
  99318. __pyx_v_self->_exit_waiters = ((PyObject*)__pyx_t_1);
  99319. __pyx_t_1 = 0;
  99320. /* "uvloop/handles/process.pyx":355
  99321. * def __cinit__(self):
  99322. * self._exit_waiters = []
  99323. * self._protocol = None # <<<<<<<<<<<<<<
  99324. *
  99325. * self._init_futs = []
  99326. */
  99327. __Pyx_INCREF(Py_None);
  99328. __Pyx_GIVEREF(Py_None);
  99329. __Pyx_GOTREF(__pyx_v_self->_protocol);
  99330. __Pyx_DECREF(__pyx_v_self->_protocol);
  99331. __pyx_v_self->_protocol = Py_None;
  99332. /* "uvloop/handles/process.pyx":357
  99333. * self._protocol = None
  99334. *
  99335. * self._init_futs = [] # <<<<<<<<<<<<<<
  99336. * self._pending_calls = []
  99337. * self._stdio_ready = 0
  99338. */
  99339. __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 357, __pyx_L1_error)
  99340. __Pyx_GOTREF(__pyx_t_1);
  99341. __Pyx_GIVEREF(__pyx_t_1);
  99342. __Pyx_GOTREF(__pyx_v_self->_init_futs);
  99343. __Pyx_DECREF(__pyx_v_self->_init_futs);
  99344. __pyx_v_self->_init_futs = ((PyObject*)__pyx_t_1);
  99345. __pyx_t_1 = 0;
  99346. /* "uvloop/handles/process.pyx":358
  99347. *
  99348. * self._init_futs = []
  99349. * self._pending_calls = [] # <<<<<<<<<<<<<<
  99350. * self._stdio_ready = 0
  99351. *
  99352. */
  99353. __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 358, __pyx_L1_error)
  99354. __Pyx_GOTREF(__pyx_t_1);
  99355. __Pyx_GIVEREF(__pyx_t_1);
  99356. __Pyx_GOTREF(__pyx_v_self->_pending_calls);
  99357. __Pyx_DECREF(__pyx_v_self->_pending_calls);
  99358. __pyx_v_self->_pending_calls = ((PyObject*)__pyx_t_1);
  99359. __pyx_t_1 = 0;
  99360. /* "uvloop/handles/process.pyx":359
  99361. * self._init_futs = []
  99362. * self._pending_calls = []
  99363. * self._stdio_ready = 0 # <<<<<<<<<<<<<<
  99364. *
  99365. * self._stdin = self._stdout = self._stderr = None
  99366. */
  99367. __pyx_v_self->_stdio_ready = 0;
  99368. /* "uvloop/handles/process.pyx":361
  99369. * self._stdio_ready = 0
  99370. *
  99371. * self._stdin = self._stdout = self._stderr = None # <<<<<<<<<<<<<<
  99372. * self.stdin_proto = self.stdout_proto = self.stderr_proto = None
  99373. *
  99374. */
  99375. __Pyx_INCREF(Py_None);
  99376. __Pyx_GIVEREF(Py_None);
  99377. __Pyx_GOTREF(__pyx_v_self->_stdin);
  99378. __Pyx_DECREF(((PyObject *)__pyx_v_self->_stdin));
  99379. __pyx_v_self->_stdin = ((struct __pyx_obj_6uvloop_4loop_WriteUnixTransport *)Py_None);
  99380. __Pyx_INCREF(Py_None);
  99381. __Pyx_GIVEREF(Py_None);
  99382. __Pyx_GOTREF(__pyx_v_self->_stdout);
  99383. __Pyx_DECREF(((PyObject *)__pyx_v_self->_stdout));
  99384. __pyx_v_self->_stdout = ((struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *)Py_None);
  99385. __Pyx_INCREF(Py_None);
  99386. __Pyx_GIVEREF(Py_None);
  99387. __Pyx_GOTREF(__pyx_v_self->_stderr);
  99388. __Pyx_DECREF(((PyObject *)__pyx_v_self->_stderr));
  99389. __pyx_v_self->_stderr = ((struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *)Py_None);
  99390. /* "uvloop/handles/process.pyx":362
  99391. *
  99392. * self._stdin = self._stdout = self._stderr = None
  99393. * self.stdin_proto = self.stdout_proto = self.stderr_proto = None # <<<<<<<<<<<<<<
  99394. *
  99395. * self._finished = 0
  99396. */
  99397. __Pyx_INCREF(Py_None);
  99398. __Pyx_GIVEREF(Py_None);
  99399. __Pyx_GOTREF(__pyx_v_self->stdin_proto);
  99400. __Pyx_DECREF(__pyx_v_self->stdin_proto);
  99401. __pyx_v_self->stdin_proto = Py_None;
  99402. __Pyx_INCREF(Py_None);
  99403. __Pyx_GIVEREF(Py_None);
  99404. __Pyx_GOTREF(__pyx_v_self->stdout_proto);
  99405. __Pyx_DECREF(__pyx_v_self->stdout_proto);
  99406. __pyx_v_self->stdout_proto = Py_None;
  99407. __Pyx_INCREF(Py_None);
  99408. __Pyx_GIVEREF(Py_None);
  99409. __Pyx_GOTREF(__pyx_v_self->stderr_proto);
  99410. __Pyx_DECREF(__pyx_v_self->stderr_proto);
  99411. __pyx_v_self->stderr_proto = Py_None;
  99412. /* "uvloop/handles/process.pyx":364
  99413. * self.stdin_proto = self.stdout_proto = self.stderr_proto = None
  99414. *
  99415. * self._finished = 0 # <<<<<<<<<<<<<<
  99416. *
  99417. * cdef _on_exit(self, int64_t exit_status, int term_signal):
  99418. */
  99419. __pyx_v_self->_finished = 0;
  99420. /* "uvloop/handles/process.pyx":353
  99421. * @cython.no_gc_clear
  99422. * cdef class UVProcessTransport(UVProcess):
  99423. * def __cinit__(self): # <<<<<<<<<<<<<<
  99424. * self._exit_waiters = []
  99425. * self._protocol = None
  99426. */
  99427. /* function exit code */
  99428. __pyx_r = 0;
  99429. goto __pyx_L0;
  99430. __pyx_L1_error:;
  99431. __Pyx_XDECREF(__pyx_t_1);
  99432. __Pyx_AddTraceback("uvloop.loop.UVProcessTransport.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  99433. __pyx_r = -1;
  99434. __pyx_L0:;
  99435. __Pyx_RefNannyFinishContext();
  99436. return __pyx_r;
  99437. }
  99438. /* "uvloop/handles/process.pyx":366
  99439. * self._finished = 0
  99440. *
  99441. * cdef _on_exit(self, int64_t exit_status, int term_signal): # <<<<<<<<<<<<<<
  99442. * UVProcess._on_exit(self, exit_status, term_signal)
  99443. *
  99444. */
  99445. static PyObject *__pyx_f_6uvloop_4loop_18UVProcessTransport__on_exit(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self, int64_t __pyx_v_exit_status, int __pyx_v_term_signal) {
  99446. PyObject *__pyx_v_waiter = NULL;
  99447. PyObject *__pyx_r = NULL;
  99448. __Pyx_RefNannyDeclarations
  99449. PyObject *__pyx_t_1 = NULL;
  99450. int __pyx_t_2;
  99451. PyObject *__pyx_t_3 = NULL;
  99452. PyObject *__pyx_t_4 = NULL;
  99453. PyObject *__pyx_t_5 = NULL;
  99454. int __pyx_t_6;
  99455. Py_ssize_t __pyx_t_7;
  99456. int __pyx_t_8;
  99457. __Pyx_RefNannySetupContext("_on_exit", 0);
  99458. /* "uvloop/handles/process.pyx":367
  99459. *
  99460. * cdef _on_exit(self, int64_t exit_status, int term_signal):
  99461. * UVProcess._on_exit(self, exit_status, term_signal) # <<<<<<<<<<<<<<
  99462. *
  99463. * if self._stdio_ready:
  99464. */
  99465. __pyx_t_1 = __pyx_f_6uvloop_4loop_9UVProcess__on_exit(((struct __pyx_obj_6uvloop_4loop_UVProcess *)__pyx_v_self), __pyx_v_exit_status, __pyx_v_term_signal); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 367, __pyx_L1_error)
  99466. __Pyx_GOTREF(__pyx_t_1);
  99467. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  99468. /* "uvloop/handles/process.pyx":369
  99469. * UVProcess._on_exit(self, exit_status, term_signal)
  99470. *
  99471. * if self._stdio_ready: # <<<<<<<<<<<<<<
  99472. * self._loop.call_soon(self._protocol.process_exited)
  99473. * else:
  99474. */
  99475. __pyx_t_2 = (__pyx_v_self->_stdio_ready != 0);
  99476. if (__pyx_t_2) {
  99477. /* "uvloop/handles/process.pyx":370
  99478. *
  99479. * if self._stdio_ready:
  99480. * self._loop.call_soon(self._protocol.process_exited) # <<<<<<<<<<<<<<
  99481. * else:
  99482. * self._pending_calls.append((_CALL_PROCESS_EXITED, None, None))
  99483. */
  99484. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._loop), __pyx_n_s_call_soon); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 370, __pyx_L1_error)
  99485. __Pyx_GOTREF(__pyx_t_3);
  99486. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_protocol, __pyx_n_s_process_exited); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 370, __pyx_L1_error)
  99487. __Pyx_GOTREF(__pyx_t_4);
  99488. __pyx_t_5 = NULL;
  99489. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
  99490. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
  99491. if (likely(__pyx_t_5)) {
  99492. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  99493. __Pyx_INCREF(__pyx_t_5);
  99494. __Pyx_INCREF(function);
  99495. __Pyx_DECREF_SET(__pyx_t_3, function);
  99496. }
  99497. }
  99498. __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
  99499. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  99500. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  99501. if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 370, __pyx_L1_error)
  99502. __Pyx_GOTREF(__pyx_t_1);
  99503. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  99504. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  99505. /* "uvloop/handles/process.pyx":369
  99506. * UVProcess._on_exit(self, exit_status, term_signal)
  99507. *
  99508. * if self._stdio_ready: # <<<<<<<<<<<<<<
  99509. * self._loop.call_soon(self._protocol.process_exited)
  99510. * else:
  99511. */
  99512. goto __pyx_L3;
  99513. }
  99514. /* "uvloop/handles/process.pyx":372
  99515. * self._loop.call_soon(self._protocol.process_exited)
  99516. * else:
  99517. * self._pending_calls.append((_CALL_PROCESS_EXITED, None, None)) # <<<<<<<<<<<<<<
  99518. *
  99519. * self._try_finish()
  99520. */
  99521. /*else*/ {
  99522. if (unlikely(__pyx_v_self->_pending_calls == Py_None)) {
  99523. PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append");
  99524. __PYX_ERR(6, 372, __pyx_L1_error)
  99525. }
  99526. __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_self->_pending_calls, __pyx_tuple__175); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(6, 372, __pyx_L1_error)
  99527. }
  99528. __pyx_L3:;
  99529. /* "uvloop/handles/process.pyx":374
  99530. * self._pending_calls.append((_CALL_PROCESS_EXITED, None, None))
  99531. *
  99532. * self._try_finish() # <<<<<<<<<<<<<<
  99533. *
  99534. * for waiter in self._exit_waiters:
  99535. */
  99536. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcessTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_try_finish(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 374, __pyx_L1_error)
  99537. __Pyx_GOTREF(__pyx_t_1);
  99538. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  99539. /* "uvloop/handles/process.pyx":376
  99540. * self._try_finish()
  99541. *
  99542. * for waiter in self._exit_waiters: # <<<<<<<<<<<<<<
  99543. * if not waiter.cancelled():
  99544. * waiter.set_result(self._returncode)
  99545. */
  99546. if (unlikely(__pyx_v_self->_exit_waiters == Py_None)) {
  99547. PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
  99548. __PYX_ERR(6, 376, __pyx_L1_error)
  99549. }
  99550. __pyx_t_1 = __pyx_v_self->_exit_waiters; __Pyx_INCREF(__pyx_t_1); __pyx_t_7 = 0;
  99551. for (;;) {
  99552. if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_1)) break;
  99553. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  99554. __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(6, 376, __pyx_L1_error)
  99555. #else
  99556. __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 376, __pyx_L1_error)
  99557. __Pyx_GOTREF(__pyx_t_3);
  99558. #endif
  99559. __Pyx_XDECREF_SET(__pyx_v_waiter, __pyx_t_3);
  99560. __pyx_t_3 = 0;
  99561. /* "uvloop/handles/process.pyx":377
  99562. *
  99563. * for waiter in self._exit_waiters:
  99564. * if not waiter.cancelled(): # <<<<<<<<<<<<<<
  99565. * waiter.set_result(self._returncode)
  99566. * self._exit_waiters.clear()
  99567. */
  99568. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_waiter, __pyx_n_s_cancelled); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 377, __pyx_L1_error)
  99569. __Pyx_GOTREF(__pyx_t_4);
  99570. __pyx_t_5 = NULL;
  99571. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
  99572. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
  99573. if (likely(__pyx_t_5)) {
  99574. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  99575. __Pyx_INCREF(__pyx_t_5);
  99576. __Pyx_INCREF(function);
  99577. __Pyx_DECREF_SET(__pyx_t_4, function);
  99578. }
  99579. }
  99580. __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
  99581. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  99582. if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 377, __pyx_L1_error)
  99583. __Pyx_GOTREF(__pyx_t_3);
  99584. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  99585. __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(6, 377, __pyx_L1_error)
  99586. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  99587. __pyx_t_8 = ((!__pyx_t_2) != 0);
  99588. if (__pyx_t_8) {
  99589. /* "uvloop/handles/process.pyx":378
  99590. * for waiter in self._exit_waiters:
  99591. * if not waiter.cancelled():
  99592. * waiter.set_result(self._returncode) # <<<<<<<<<<<<<<
  99593. * self._exit_waiters.clear()
  99594. *
  99595. */
  99596. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_waiter, __pyx_n_s_set_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 378, __pyx_L1_error)
  99597. __Pyx_GOTREF(__pyx_t_4);
  99598. __pyx_t_5 = NULL;
  99599. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
  99600. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
  99601. if (likely(__pyx_t_5)) {
  99602. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  99603. __Pyx_INCREF(__pyx_t_5);
  99604. __Pyx_INCREF(function);
  99605. __Pyx_DECREF_SET(__pyx_t_4, function);
  99606. }
  99607. }
  99608. __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_self->__pyx_base._returncode) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_self->__pyx_base._returncode);
  99609. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  99610. if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 378, __pyx_L1_error)
  99611. __Pyx_GOTREF(__pyx_t_3);
  99612. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  99613. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  99614. /* "uvloop/handles/process.pyx":377
  99615. *
  99616. * for waiter in self._exit_waiters:
  99617. * if not waiter.cancelled(): # <<<<<<<<<<<<<<
  99618. * waiter.set_result(self._returncode)
  99619. * self._exit_waiters.clear()
  99620. */
  99621. }
  99622. /* "uvloop/handles/process.pyx":376
  99623. * self._try_finish()
  99624. *
  99625. * for waiter in self._exit_waiters: # <<<<<<<<<<<<<<
  99626. * if not waiter.cancelled():
  99627. * waiter.set_result(self._returncode)
  99628. */
  99629. }
  99630. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  99631. /* "uvloop/handles/process.pyx":379
  99632. * if not waiter.cancelled():
  99633. * waiter.set_result(self._returncode)
  99634. * self._exit_waiters.clear() # <<<<<<<<<<<<<<
  99635. *
  99636. * self._close()
  99637. */
  99638. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_exit_waiters, __pyx_n_s_clear); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 379, __pyx_L1_error)
  99639. __Pyx_GOTREF(__pyx_t_3);
  99640. __pyx_t_4 = NULL;
  99641. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
  99642. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
  99643. if (likely(__pyx_t_4)) {
  99644. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  99645. __Pyx_INCREF(__pyx_t_4);
  99646. __Pyx_INCREF(function);
  99647. __Pyx_DECREF_SET(__pyx_t_3, function);
  99648. }
  99649. }
  99650. __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
  99651. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  99652. if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 379, __pyx_L1_error)
  99653. __Pyx_GOTREF(__pyx_t_1);
  99654. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  99655. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  99656. /* "uvloop/handles/process.pyx":381
  99657. * self._exit_waiters.clear()
  99658. *
  99659. * self._close() # <<<<<<<<<<<<<<
  99660. *
  99661. * cdef _check_proc(self):
  99662. */
  99663. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcessTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._close(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 381, __pyx_L1_error)
  99664. __Pyx_GOTREF(__pyx_t_1);
  99665. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  99666. /* "uvloop/handles/process.pyx":366
  99667. * self._finished = 0
  99668. *
  99669. * cdef _on_exit(self, int64_t exit_status, int term_signal): # <<<<<<<<<<<<<<
  99670. * UVProcess._on_exit(self, exit_status, term_signal)
  99671. *
  99672. */
  99673. /* function exit code */
  99674. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  99675. goto __pyx_L0;
  99676. __pyx_L1_error:;
  99677. __Pyx_XDECREF(__pyx_t_1);
  99678. __Pyx_XDECREF(__pyx_t_3);
  99679. __Pyx_XDECREF(__pyx_t_4);
  99680. __Pyx_XDECREF(__pyx_t_5);
  99681. __Pyx_AddTraceback("uvloop.loop.UVProcessTransport._on_exit", __pyx_clineno, __pyx_lineno, __pyx_filename);
  99682. __pyx_r = 0;
  99683. __pyx_L0:;
  99684. __Pyx_XDECREF(__pyx_v_waiter);
  99685. __Pyx_XGIVEREF(__pyx_r);
  99686. __Pyx_RefNannyFinishContext();
  99687. return __pyx_r;
  99688. }
  99689. /* "uvloop/handles/process.pyx":383
  99690. * self._close()
  99691. *
  99692. * cdef _check_proc(self): # <<<<<<<<<<<<<<
  99693. * if not self._is_alive() or self._returncode is not None:
  99694. * raise ProcessLookupError()
  99695. */
  99696. static PyObject *__pyx_f_6uvloop_4loop_18UVProcessTransport__check_proc(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self) {
  99697. PyObject *__pyx_r = NULL;
  99698. __Pyx_RefNannyDeclarations
  99699. int __pyx_t_1;
  99700. int __pyx_t_2;
  99701. int __pyx_t_3;
  99702. PyObject *__pyx_t_4 = NULL;
  99703. PyObject *__pyx_t_5 = NULL;
  99704. __Pyx_RefNannySetupContext("_check_proc", 0);
  99705. /* "uvloop/handles/process.pyx":384
  99706. *
  99707. * cdef _check_proc(self):
  99708. * if not self._is_alive() or self._returncode is not None: # <<<<<<<<<<<<<<
  99709. * raise ProcessLookupError()
  99710. *
  99711. */
  99712. __pyx_t_2 = ((!(((struct __pyx_vtabstruct_6uvloop_4loop_UVProcessTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._is_alive(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)) != 0)) != 0);
  99713. if (!__pyx_t_2) {
  99714. } else {
  99715. __pyx_t_1 = __pyx_t_2;
  99716. goto __pyx_L4_bool_binop_done;
  99717. }
  99718. __pyx_t_2 = (__pyx_v_self->__pyx_base._returncode != Py_None);
  99719. __pyx_t_3 = (__pyx_t_2 != 0);
  99720. __pyx_t_1 = __pyx_t_3;
  99721. __pyx_L4_bool_binop_done:;
  99722. if (unlikely(__pyx_t_1)) {
  99723. /* "uvloop/handles/process.pyx":385
  99724. * cdef _check_proc(self):
  99725. * if not self._is_alive() or self._returncode is not None:
  99726. * raise ProcessLookupError() # <<<<<<<<<<<<<<
  99727. *
  99728. * cdef _pipe_connection_lost(self, int fd, exc):
  99729. */
  99730. __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_ProcessLookupError); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 385, __pyx_L1_error)
  99731. __Pyx_GOTREF(__pyx_t_4);
  99732. __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 385, __pyx_L1_error)
  99733. __Pyx_GOTREF(__pyx_t_5);
  99734. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  99735. __Pyx_Raise(__pyx_t_5, 0, 0, 0);
  99736. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  99737. __PYX_ERR(6, 385, __pyx_L1_error)
  99738. /* "uvloop/handles/process.pyx":384
  99739. *
  99740. * cdef _check_proc(self):
  99741. * if not self._is_alive() or self._returncode is not None: # <<<<<<<<<<<<<<
  99742. * raise ProcessLookupError()
  99743. *
  99744. */
  99745. }
  99746. /* "uvloop/handles/process.pyx":383
  99747. * self._close()
  99748. *
  99749. * cdef _check_proc(self): # <<<<<<<<<<<<<<
  99750. * if not self._is_alive() or self._returncode is not None:
  99751. * raise ProcessLookupError()
  99752. */
  99753. /* function exit code */
  99754. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  99755. goto __pyx_L0;
  99756. __pyx_L1_error:;
  99757. __Pyx_XDECREF(__pyx_t_4);
  99758. __Pyx_XDECREF(__pyx_t_5);
  99759. __Pyx_AddTraceback("uvloop.loop.UVProcessTransport._check_proc", __pyx_clineno, __pyx_lineno, __pyx_filename);
  99760. __pyx_r = 0;
  99761. __pyx_L0:;
  99762. __Pyx_XGIVEREF(__pyx_r);
  99763. __Pyx_RefNannyFinishContext();
  99764. return __pyx_r;
  99765. }
  99766. /* "uvloop/handles/process.pyx":387
  99767. * raise ProcessLookupError()
  99768. *
  99769. * cdef _pipe_connection_lost(self, int fd, exc): # <<<<<<<<<<<<<<
  99770. * if self._stdio_ready:
  99771. * self._loop.call_soon(self._protocol.pipe_connection_lost, fd, exc)
  99772. */
  99773. static PyObject *__pyx_f_6uvloop_4loop_18UVProcessTransport__pipe_connection_lost(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self, int __pyx_v_fd, PyObject *__pyx_v_exc) {
  99774. PyObject *__pyx_r = NULL;
  99775. __Pyx_RefNannyDeclarations
  99776. int __pyx_t_1;
  99777. PyObject *__pyx_t_2 = NULL;
  99778. PyObject *__pyx_t_3 = NULL;
  99779. PyObject *__pyx_t_4 = NULL;
  99780. PyObject *__pyx_t_5 = NULL;
  99781. PyObject *__pyx_t_6 = NULL;
  99782. int __pyx_t_7;
  99783. PyObject *__pyx_t_8 = NULL;
  99784. int __pyx_t_9;
  99785. __Pyx_RefNannySetupContext("_pipe_connection_lost", 0);
  99786. /* "uvloop/handles/process.pyx":388
  99787. *
  99788. * cdef _pipe_connection_lost(self, int fd, exc):
  99789. * if self._stdio_ready: # <<<<<<<<<<<<<<
  99790. * self._loop.call_soon(self._protocol.pipe_connection_lost, fd, exc)
  99791. * self._try_finish()
  99792. */
  99793. __pyx_t_1 = (__pyx_v_self->_stdio_ready != 0);
  99794. if (__pyx_t_1) {
  99795. /* "uvloop/handles/process.pyx":389
  99796. * cdef _pipe_connection_lost(self, int fd, exc):
  99797. * if self._stdio_ready:
  99798. * self._loop.call_soon(self._protocol.pipe_connection_lost, fd, exc) # <<<<<<<<<<<<<<
  99799. * self._try_finish()
  99800. * else:
  99801. */
  99802. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._loop), __pyx_n_s_call_soon); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 389, __pyx_L1_error)
  99803. __Pyx_GOTREF(__pyx_t_3);
  99804. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_protocol, __pyx_n_s_pipe_connection_lost); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 389, __pyx_L1_error)
  99805. __Pyx_GOTREF(__pyx_t_4);
  99806. __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_fd); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 389, __pyx_L1_error)
  99807. __Pyx_GOTREF(__pyx_t_5);
  99808. __pyx_t_6 = NULL;
  99809. __pyx_t_7 = 0;
  99810. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
  99811. __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
  99812. if (likely(__pyx_t_6)) {
  99813. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  99814. __Pyx_INCREF(__pyx_t_6);
  99815. __Pyx_INCREF(function);
  99816. __Pyx_DECREF_SET(__pyx_t_3, function);
  99817. __pyx_t_7 = 1;
  99818. }
  99819. }
  99820. #if CYTHON_FAST_PYCALL
  99821. if (PyFunction_Check(__pyx_t_3)) {
  99822. PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_t_4, __pyx_t_5, __pyx_v_exc};
  99823. __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 389, __pyx_L1_error)
  99824. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  99825. __Pyx_GOTREF(__pyx_t_2);
  99826. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  99827. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  99828. } else
  99829. #endif
  99830. #if CYTHON_FAST_PYCCALL
  99831. if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
  99832. PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_t_4, __pyx_t_5, __pyx_v_exc};
  99833. __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 389, __pyx_L1_error)
  99834. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  99835. __Pyx_GOTREF(__pyx_t_2);
  99836. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  99837. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  99838. } else
  99839. #endif
  99840. {
  99841. __pyx_t_8 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(6, 389, __pyx_L1_error)
  99842. __Pyx_GOTREF(__pyx_t_8);
  99843. if (__pyx_t_6) {
  99844. __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
  99845. }
  99846. __Pyx_GIVEREF(__pyx_t_4);
  99847. PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_4);
  99848. __Pyx_GIVEREF(__pyx_t_5);
  99849. PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_5);
  99850. __Pyx_INCREF(__pyx_v_exc);
  99851. __Pyx_GIVEREF(__pyx_v_exc);
  99852. PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_v_exc);
  99853. __pyx_t_4 = 0;
  99854. __pyx_t_5 = 0;
  99855. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 389, __pyx_L1_error)
  99856. __Pyx_GOTREF(__pyx_t_2);
  99857. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  99858. }
  99859. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  99860. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  99861. /* "uvloop/handles/process.pyx":390
  99862. * if self._stdio_ready:
  99863. * self._loop.call_soon(self._protocol.pipe_connection_lost, fd, exc)
  99864. * self._try_finish() # <<<<<<<<<<<<<<
  99865. * else:
  99866. * self._pending_calls.append((_CALL_PIPE_CONNECTION_LOST, fd, exc))
  99867. */
  99868. __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcessTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_try_finish(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 390, __pyx_L1_error)
  99869. __Pyx_GOTREF(__pyx_t_2);
  99870. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  99871. /* "uvloop/handles/process.pyx":388
  99872. *
  99873. * cdef _pipe_connection_lost(self, int fd, exc):
  99874. * if self._stdio_ready: # <<<<<<<<<<<<<<
  99875. * self._loop.call_soon(self._protocol.pipe_connection_lost, fd, exc)
  99876. * self._try_finish()
  99877. */
  99878. goto __pyx_L3;
  99879. }
  99880. /* "uvloop/handles/process.pyx":392
  99881. * self._try_finish()
  99882. * else:
  99883. * self._pending_calls.append((_CALL_PIPE_CONNECTION_LOST, fd, exc)) # <<<<<<<<<<<<<<
  99884. *
  99885. * cdef _pipe_data_received(self, int fd, data):
  99886. */
  99887. /*else*/ {
  99888. if (unlikely(__pyx_v_self->_pending_calls == Py_None)) {
  99889. PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append");
  99890. __PYX_ERR(6, 392, __pyx_L1_error)
  99891. }
  99892. __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_fd); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 392, __pyx_L1_error)
  99893. __Pyx_GOTREF(__pyx_t_2);
  99894. __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 392, __pyx_L1_error)
  99895. __Pyx_GOTREF(__pyx_t_3);
  99896. __Pyx_INCREF(__pyx_int_1);
  99897. __Pyx_GIVEREF(__pyx_int_1);
  99898. PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_int_1);
  99899. __Pyx_GIVEREF(__pyx_t_2);
  99900. PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  99901. __Pyx_INCREF(__pyx_v_exc);
  99902. __Pyx_GIVEREF(__pyx_v_exc);
  99903. PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_exc);
  99904. __pyx_t_2 = 0;
  99905. __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_self->_pending_calls, __pyx_t_3); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(6, 392, __pyx_L1_error)
  99906. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  99907. }
  99908. __pyx_L3:;
  99909. /* "uvloop/handles/process.pyx":387
  99910. * raise ProcessLookupError()
  99911. *
  99912. * cdef _pipe_connection_lost(self, int fd, exc): # <<<<<<<<<<<<<<
  99913. * if self._stdio_ready:
  99914. * self._loop.call_soon(self._protocol.pipe_connection_lost, fd, exc)
  99915. */
  99916. /* function exit code */
  99917. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  99918. goto __pyx_L0;
  99919. __pyx_L1_error:;
  99920. __Pyx_XDECREF(__pyx_t_2);
  99921. __Pyx_XDECREF(__pyx_t_3);
  99922. __Pyx_XDECREF(__pyx_t_4);
  99923. __Pyx_XDECREF(__pyx_t_5);
  99924. __Pyx_XDECREF(__pyx_t_6);
  99925. __Pyx_XDECREF(__pyx_t_8);
  99926. __Pyx_AddTraceback("uvloop.loop.UVProcessTransport._pipe_connection_lost", __pyx_clineno, __pyx_lineno, __pyx_filename);
  99927. __pyx_r = 0;
  99928. __pyx_L0:;
  99929. __Pyx_XGIVEREF(__pyx_r);
  99930. __Pyx_RefNannyFinishContext();
  99931. return __pyx_r;
  99932. }
  99933. /* "uvloop/handles/process.pyx":394
  99934. * self._pending_calls.append((_CALL_PIPE_CONNECTION_LOST, fd, exc))
  99935. *
  99936. * cdef _pipe_data_received(self, int fd, data): # <<<<<<<<<<<<<<
  99937. * if self._stdio_ready:
  99938. * self._loop.call_soon(self._protocol.pipe_data_received, fd, data)
  99939. */
  99940. static PyObject *__pyx_f_6uvloop_4loop_18UVProcessTransport__pipe_data_received(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self, int __pyx_v_fd, PyObject *__pyx_v_data) {
  99941. PyObject *__pyx_r = NULL;
  99942. __Pyx_RefNannyDeclarations
  99943. int __pyx_t_1;
  99944. PyObject *__pyx_t_2 = NULL;
  99945. PyObject *__pyx_t_3 = NULL;
  99946. PyObject *__pyx_t_4 = NULL;
  99947. PyObject *__pyx_t_5 = NULL;
  99948. PyObject *__pyx_t_6 = NULL;
  99949. int __pyx_t_7;
  99950. PyObject *__pyx_t_8 = NULL;
  99951. int __pyx_t_9;
  99952. __Pyx_RefNannySetupContext("_pipe_data_received", 0);
  99953. /* "uvloop/handles/process.pyx":395
  99954. *
  99955. * cdef _pipe_data_received(self, int fd, data):
  99956. * if self._stdio_ready: # <<<<<<<<<<<<<<
  99957. * self._loop.call_soon(self._protocol.pipe_data_received, fd, data)
  99958. * else:
  99959. */
  99960. __pyx_t_1 = (__pyx_v_self->_stdio_ready != 0);
  99961. if (__pyx_t_1) {
  99962. /* "uvloop/handles/process.pyx":396
  99963. * cdef _pipe_data_received(self, int fd, data):
  99964. * if self._stdio_ready:
  99965. * self._loop.call_soon(self._protocol.pipe_data_received, fd, data) # <<<<<<<<<<<<<<
  99966. * else:
  99967. * self._pending_calls.append((_CALL_PIPE_DATA_RECEIVED, fd, data))
  99968. */
  99969. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._loop), __pyx_n_s_call_soon); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 396, __pyx_L1_error)
  99970. __Pyx_GOTREF(__pyx_t_3);
  99971. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_protocol, __pyx_n_s_pipe_data_received); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 396, __pyx_L1_error)
  99972. __Pyx_GOTREF(__pyx_t_4);
  99973. __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_fd); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 396, __pyx_L1_error)
  99974. __Pyx_GOTREF(__pyx_t_5);
  99975. __pyx_t_6 = NULL;
  99976. __pyx_t_7 = 0;
  99977. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
  99978. __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
  99979. if (likely(__pyx_t_6)) {
  99980. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  99981. __Pyx_INCREF(__pyx_t_6);
  99982. __Pyx_INCREF(function);
  99983. __Pyx_DECREF_SET(__pyx_t_3, function);
  99984. __pyx_t_7 = 1;
  99985. }
  99986. }
  99987. #if CYTHON_FAST_PYCALL
  99988. if (PyFunction_Check(__pyx_t_3)) {
  99989. PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_t_4, __pyx_t_5, __pyx_v_data};
  99990. __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 396, __pyx_L1_error)
  99991. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  99992. __Pyx_GOTREF(__pyx_t_2);
  99993. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  99994. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  99995. } else
  99996. #endif
  99997. #if CYTHON_FAST_PYCCALL
  99998. if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
  99999. PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_t_4, __pyx_t_5, __pyx_v_data};
  100000. __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 396, __pyx_L1_error)
  100001. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  100002. __Pyx_GOTREF(__pyx_t_2);
  100003. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  100004. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  100005. } else
  100006. #endif
  100007. {
  100008. __pyx_t_8 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(6, 396, __pyx_L1_error)
  100009. __Pyx_GOTREF(__pyx_t_8);
  100010. if (__pyx_t_6) {
  100011. __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
  100012. }
  100013. __Pyx_GIVEREF(__pyx_t_4);
  100014. PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_4);
  100015. __Pyx_GIVEREF(__pyx_t_5);
  100016. PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_5);
  100017. __Pyx_INCREF(__pyx_v_data);
  100018. __Pyx_GIVEREF(__pyx_v_data);
  100019. PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_v_data);
  100020. __pyx_t_4 = 0;
  100021. __pyx_t_5 = 0;
  100022. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 396, __pyx_L1_error)
  100023. __Pyx_GOTREF(__pyx_t_2);
  100024. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  100025. }
  100026. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  100027. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  100028. /* "uvloop/handles/process.pyx":395
  100029. *
  100030. * cdef _pipe_data_received(self, int fd, data):
  100031. * if self._stdio_ready: # <<<<<<<<<<<<<<
  100032. * self._loop.call_soon(self._protocol.pipe_data_received, fd, data)
  100033. * else:
  100034. */
  100035. goto __pyx_L3;
  100036. }
  100037. /* "uvloop/handles/process.pyx":398
  100038. * self._loop.call_soon(self._protocol.pipe_data_received, fd, data)
  100039. * else:
  100040. * self._pending_calls.append((_CALL_PIPE_DATA_RECEIVED, fd, data)) # <<<<<<<<<<<<<<
  100041. *
  100042. * cdef _file_redirect_stdio(self, int fd):
  100043. */
  100044. /*else*/ {
  100045. if (unlikely(__pyx_v_self->_pending_calls == Py_None)) {
  100046. PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append");
  100047. __PYX_ERR(6, 398, __pyx_L1_error)
  100048. }
  100049. __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_fd); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 398, __pyx_L1_error)
  100050. __Pyx_GOTREF(__pyx_t_2);
  100051. __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 398, __pyx_L1_error)
  100052. __Pyx_GOTREF(__pyx_t_3);
  100053. __Pyx_INCREF(__pyx_int_0);
  100054. __Pyx_GIVEREF(__pyx_int_0);
  100055. PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_int_0);
  100056. __Pyx_GIVEREF(__pyx_t_2);
  100057. PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  100058. __Pyx_INCREF(__pyx_v_data);
  100059. __Pyx_GIVEREF(__pyx_v_data);
  100060. PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_data);
  100061. __pyx_t_2 = 0;
  100062. __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_self->_pending_calls, __pyx_t_3); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(6, 398, __pyx_L1_error)
  100063. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  100064. }
  100065. __pyx_L3:;
  100066. /* "uvloop/handles/process.pyx":394
  100067. * self._pending_calls.append((_CALL_PIPE_CONNECTION_LOST, fd, exc))
  100068. *
  100069. * cdef _pipe_data_received(self, int fd, data): # <<<<<<<<<<<<<<
  100070. * if self._stdio_ready:
  100071. * self._loop.call_soon(self._protocol.pipe_data_received, fd, data)
  100072. */
  100073. /* function exit code */
  100074. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  100075. goto __pyx_L0;
  100076. __pyx_L1_error:;
  100077. __Pyx_XDECREF(__pyx_t_2);
  100078. __Pyx_XDECREF(__pyx_t_3);
  100079. __Pyx_XDECREF(__pyx_t_4);
  100080. __Pyx_XDECREF(__pyx_t_5);
  100081. __Pyx_XDECREF(__pyx_t_6);
  100082. __Pyx_XDECREF(__pyx_t_8);
  100083. __Pyx_AddTraceback("uvloop.loop.UVProcessTransport._pipe_data_received", __pyx_clineno, __pyx_lineno, __pyx_filename);
  100084. __pyx_r = 0;
  100085. __pyx_L0:;
  100086. __Pyx_XGIVEREF(__pyx_r);
  100087. __Pyx_RefNannyFinishContext();
  100088. return __pyx_r;
  100089. }
  100090. /* "uvloop/handles/process.pyx":400
  100091. * self._pending_calls.append((_CALL_PIPE_DATA_RECEIVED, fd, data))
  100092. *
  100093. * cdef _file_redirect_stdio(self, int fd): # <<<<<<<<<<<<<<
  100094. * fd = os_dup(fd)
  100095. * os_set_inheritable(fd, True)
  100096. */
  100097. static PyObject *__pyx_f_6uvloop_4loop_18UVProcessTransport__file_redirect_stdio(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self, int __pyx_v_fd) {
  100098. PyObject *__pyx_r = NULL;
  100099. __Pyx_RefNannyDeclarations
  100100. PyObject *__pyx_t_1 = NULL;
  100101. PyObject *__pyx_t_2 = NULL;
  100102. PyObject *__pyx_t_3 = NULL;
  100103. PyObject *__pyx_t_4 = NULL;
  100104. int __pyx_t_5;
  100105. PyObject *__pyx_t_6 = NULL;
  100106. __Pyx_RefNannySetupContext("_file_redirect_stdio", 0);
  100107. /* "uvloop/handles/process.pyx":401
  100108. *
  100109. * cdef _file_redirect_stdio(self, int fd):
  100110. * fd = os_dup(fd) # <<<<<<<<<<<<<<
  100111. * os_set_inheritable(fd, True)
  100112. * self._close_after_spawn(fd)
  100113. */
  100114. __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_fd); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 401, __pyx_L1_error)
  100115. __Pyx_GOTREF(__pyx_t_2);
  100116. __Pyx_INCREF(__pyx_v_6uvloop_4loop_os_dup);
  100117. __pyx_t_3 = __pyx_v_6uvloop_4loop_os_dup; __pyx_t_4 = NULL;
  100118. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
  100119. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
  100120. if (likely(__pyx_t_4)) {
  100121. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  100122. __Pyx_INCREF(__pyx_t_4);
  100123. __Pyx_INCREF(function);
  100124. __Pyx_DECREF_SET(__pyx_t_3, function);
  100125. }
  100126. }
  100127. __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2);
  100128. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  100129. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  100130. if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 401, __pyx_L1_error)
  100131. __Pyx_GOTREF(__pyx_t_1);
  100132. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  100133. __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(6, 401, __pyx_L1_error)
  100134. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  100135. __pyx_v_fd = __pyx_t_5;
  100136. /* "uvloop/handles/process.pyx":402
  100137. * cdef _file_redirect_stdio(self, int fd):
  100138. * fd = os_dup(fd)
  100139. * os_set_inheritable(fd, True) # <<<<<<<<<<<<<<
  100140. * self._close_after_spawn(fd)
  100141. * return fd
  100142. */
  100143. __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_fd); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 402, __pyx_L1_error)
  100144. __Pyx_GOTREF(__pyx_t_3);
  100145. __Pyx_INCREF(__pyx_v_6uvloop_4loop_os_set_inheritable);
  100146. __pyx_t_2 = __pyx_v_6uvloop_4loop_os_set_inheritable; __pyx_t_4 = NULL;
  100147. __pyx_t_5 = 0;
  100148. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
  100149. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
  100150. if (likely(__pyx_t_4)) {
  100151. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  100152. __Pyx_INCREF(__pyx_t_4);
  100153. __Pyx_INCREF(function);
  100154. __Pyx_DECREF_SET(__pyx_t_2, function);
  100155. __pyx_t_5 = 1;
  100156. }
  100157. }
  100158. #if CYTHON_FAST_PYCALL
  100159. if (PyFunction_Check(__pyx_t_2)) {
  100160. PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_3, Py_True};
  100161. __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 402, __pyx_L1_error)
  100162. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  100163. __Pyx_GOTREF(__pyx_t_1);
  100164. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  100165. } else
  100166. #endif
  100167. #if CYTHON_FAST_PYCCALL
  100168. if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
  100169. PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_3, Py_True};
  100170. __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 402, __pyx_L1_error)
  100171. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  100172. __Pyx_GOTREF(__pyx_t_1);
  100173. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  100174. } else
  100175. #endif
  100176. {
  100177. __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 402, __pyx_L1_error)
  100178. __Pyx_GOTREF(__pyx_t_6);
  100179. if (__pyx_t_4) {
  100180. __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
  100181. }
  100182. __Pyx_GIVEREF(__pyx_t_3);
  100183. PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_t_3);
  100184. __Pyx_INCREF(Py_True);
  100185. __Pyx_GIVEREF(Py_True);
  100186. PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, Py_True);
  100187. __pyx_t_3 = 0;
  100188. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 402, __pyx_L1_error)
  100189. __Pyx_GOTREF(__pyx_t_1);
  100190. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  100191. }
  100192. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  100193. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  100194. /* "uvloop/handles/process.pyx":403
  100195. * fd = os_dup(fd)
  100196. * os_set_inheritable(fd, True)
  100197. * self._close_after_spawn(fd) # <<<<<<<<<<<<<<
  100198. * return fd
  100199. *
  100200. */
  100201. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcessTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._close_after_spawn(((struct __pyx_obj_6uvloop_4loop_UVProcess *)__pyx_v_self), __pyx_v_fd); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 403, __pyx_L1_error)
  100202. __Pyx_GOTREF(__pyx_t_1);
  100203. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  100204. /* "uvloop/handles/process.pyx":404
  100205. * os_set_inheritable(fd, True)
  100206. * self._close_after_spawn(fd)
  100207. * return fd # <<<<<<<<<<<<<<
  100208. *
  100209. * cdef _file_devnull(self):
  100210. */
  100211. __Pyx_XDECREF(__pyx_r);
  100212. __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_fd); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 404, __pyx_L1_error)
  100213. __Pyx_GOTREF(__pyx_t_1);
  100214. __pyx_r = __pyx_t_1;
  100215. __pyx_t_1 = 0;
  100216. goto __pyx_L0;
  100217. /* "uvloop/handles/process.pyx":400
  100218. * self._pending_calls.append((_CALL_PIPE_DATA_RECEIVED, fd, data))
  100219. *
  100220. * cdef _file_redirect_stdio(self, int fd): # <<<<<<<<<<<<<<
  100221. * fd = os_dup(fd)
  100222. * os_set_inheritable(fd, True)
  100223. */
  100224. /* function exit code */
  100225. __pyx_L1_error:;
  100226. __Pyx_XDECREF(__pyx_t_1);
  100227. __Pyx_XDECREF(__pyx_t_2);
  100228. __Pyx_XDECREF(__pyx_t_3);
  100229. __Pyx_XDECREF(__pyx_t_4);
  100230. __Pyx_XDECREF(__pyx_t_6);
  100231. __Pyx_AddTraceback("uvloop.loop.UVProcessTransport._file_redirect_stdio", __pyx_clineno, __pyx_lineno, __pyx_filename);
  100232. __pyx_r = 0;
  100233. __pyx_L0:;
  100234. __Pyx_XGIVEREF(__pyx_r);
  100235. __Pyx_RefNannyFinishContext();
  100236. return __pyx_r;
  100237. }
  100238. /* "uvloop/handles/process.pyx":406
  100239. * return fd
  100240. *
  100241. * cdef _file_devnull(self): # <<<<<<<<<<<<<<
  100242. * dn = os_open(os_devnull, os_O_RDWR)
  100243. * os_set_inheritable(dn, True)
  100244. */
  100245. static PyObject *__pyx_f_6uvloop_4loop_18UVProcessTransport__file_devnull(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self) {
  100246. PyObject *__pyx_v_dn = NULL;
  100247. PyObject *__pyx_r = NULL;
  100248. __Pyx_RefNannyDeclarations
  100249. PyObject *__pyx_t_1 = NULL;
  100250. PyObject *__pyx_t_2 = NULL;
  100251. PyObject *__pyx_t_3 = NULL;
  100252. int __pyx_t_4;
  100253. PyObject *__pyx_t_5 = NULL;
  100254. __Pyx_RefNannySetupContext("_file_devnull", 0);
  100255. /* "uvloop/handles/process.pyx":407
  100256. *
  100257. * cdef _file_devnull(self):
  100258. * dn = os_open(os_devnull, os_O_RDWR) # <<<<<<<<<<<<<<
  100259. * os_set_inheritable(dn, True)
  100260. * self._close_after_spawn(dn)
  100261. */
  100262. __Pyx_INCREF(__pyx_v_6uvloop_4loop_os_open);
  100263. __pyx_t_2 = __pyx_v_6uvloop_4loop_os_open; __pyx_t_3 = NULL;
  100264. __pyx_t_4 = 0;
  100265. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
  100266. __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
  100267. if (likely(__pyx_t_3)) {
  100268. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  100269. __Pyx_INCREF(__pyx_t_3);
  100270. __Pyx_INCREF(function);
  100271. __Pyx_DECREF_SET(__pyx_t_2, function);
  100272. __pyx_t_4 = 1;
  100273. }
  100274. }
  100275. #if CYTHON_FAST_PYCALL
  100276. if (PyFunction_Check(__pyx_t_2)) {
  100277. PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_6uvloop_4loop_os_devnull, __pyx_v_6uvloop_4loop_os_O_RDWR};
  100278. __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 407, __pyx_L1_error)
  100279. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  100280. __Pyx_GOTREF(__pyx_t_1);
  100281. } else
  100282. #endif
  100283. #if CYTHON_FAST_PYCCALL
  100284. if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
  100285. PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_6uvloop_4loop_os_devnull, __pyx_v_6uvloop_4loop_os_O_RDWR};
  100286. __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 407, __pyx_L1_error)
  100287. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  100288. __Pyx_GOTREF(__pyx_t_1);
  100289. } else
  100290. #endif
  100291. {
  100292. __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 407, __pyx_L1_error)
  100293. __Pyx_GOTREF(__pyx_t_5);
  100294. if (__pyx_t_3) {
  100295. __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
  100296. }
  100297. __Pyx_INCREF(__pyx_v_6uvloop_4loop_os_devnull);
  100298. __Pyx_GIVEREF(__pyx_v_6uvloop_4loop_os_devnull);
  100299. PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_6uvloop_4loop_os_devnull);
  100300. __Pyx_INCREF(__pyx_v_6uvloop_4loop_os_O_RDWR);
  100301. __Pyx_GIVEREF(__pyx_v_6uvloop_4loop_os_O_RDWR);
  100302. PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_6uvloop_4loop_os_O_RDWR);
  100303. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 407, __pyx_L1_error)
  100304. __Pyx_GOTREF(__pyx_t_1);
  100305. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  100306. }
  100307. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  100308. __pyx_v_dn = __pyx_t_1;
  100309. __pyx_t_1 = 0;
  100310. /* "uvloop/handles/process.pyx":408
  100311. * cdef _file_devnull(self):
  100312. * dn = os_open(os_devnull, os_O_RDWR)
  100313. * os_set_inheritable(dn, True) # <<<<<<<<<<<<<<
  100314. * self._close_after_spawn(dn)
  100315. * return dn
  100316. */
  100317. __Pyx_INCREF(__pyx_v_6uvloop_4loop_os_set_inheritable);
  100318. __pyx_t_2 = __pyx_v_6uvloop_4loop_os_set_inheritable; __pyx_t_5 = NULL;
  100319. __pyx_t_4 = 0;
  100320. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
  100321. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
  100322. if (likely(__pyx_t_5)) {
  100323. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  100324. __Pyx_INCREF(__pyx_t_5);
  100325. __Pyx_INCREF(function);
  100326. __Pyx_DECREF_SET(__pyx_t_2, function);
  100327. __pyx_t_4 = 1;
  100328. }
  100329. }
  100330. #if CYTHON_FAST_PYCALL
  100331. if (PyFunction_Check(__pyx_t_2)) {
  100332. PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_dn, Py_True};
  100333. __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 408, __pyx_L1_error)
  100334. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  100335. __Pyx_GOTREF(__pyx_t_1);
  100336. } else
  100337. #endif
  100338. #if CYTHON_FAST_PYCCALL
  100339. if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
  100340. PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_dn, Py_True};
  100341. __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 408, __pyx_L1_error)
  100342. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  100343. __Pyx_GOTREF(__pyx_t_1);
  100344. } else
  100345. #endif
  100346. {
  100347. __pyx_t_3 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 408, __pyx_L1_error)
  100348. __Pyx_GOTREF(__pyx_t_3);
  100349. if (__pyx_t_5) {
  100350. __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5); __pyx_t_5 = NULL;
  100351. }
  100352. __Pyx_INCREF(__pyx_v_dn);
  100353. __Pyx_GIVEREF(__pyx_v_dn);
  100354. PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_4, __pyx_v_dn);
  100355. __Pyx_INCREF(Py_True);
  100356. __Pyx_GIVEREF(Py_True);
  100357. PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_4, Py_True);
  100358. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 408, __pyx_L1_error)
  100359. __Pyx_GOTREF(__pyx_t_1);
  100360. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  100361. }
  100362. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  100363. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  100364. /* "uvloop/handles/process.pyx":409
  100365. * dn = os_open(os_devnull, os_O_RDWR)
  100366. * os_set_inheritable(dn, True)
  100367. * self._close_after_spawn(dn) # <<<<<<<<<<<<<<
  100368. * return dn
  100369. *
  100370. */
  100371. __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_dn); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(6, 409, __pyx_L1_error)
  100372. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcessTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._close_after_spawn(((struct __pyx_obj_6uvloop_4loop_UVProcess *)__pyx_v_self), __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 409, __pyx_L1_error)
  100373. __Pyx_GOTREF(__pyx_t_1);
  100374. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  100375. /* "uvloop/handles/process.pyx":410
  100376. * os_set_inheritable(dn, True)
  100377. * self._close_after_spawn(dn)
  100378. * return dn # <<<<<<<<<<<<<<
  100379. *
  100380. * cdef _file_outpipe(self):
  100381. */
  100382. __Pyx_XDECREF(__pyx_r);
  100383. __Pyx_INCREF(__pyx_v_dn);
  100384. __pyx_r = __pyx_v_dn;
  100385. goto __pyx_L0;
  100386. /* "uvloop/handles/process.pyx":406
  100387. * return fd
  100388. *
  100389. * cdef _file_devnull(self): # <<<<<<<<<<<<<<
  100390. * dn = os_open(os_devnull, os_O_RDWR)
  100391. * os_set_inheritable(dn, True)
  100392. */
  100393. /* function exit code */
  100394. __pyx_L1_error:;
  100395. __Pyx_XDECREF(__pyx_t_1);
  100396. __Pyx_XDECREF(__pyx_t_2);
  100397. __Pyx_XDECREF(__pyx_t_3);
  100398. __Pyx_XDECREF(__pyx_t_5);
  100399. __Pyx_AddTraceback("uvloop.loop.UVProcessTransport._file_devnull", __pyx_clineno, __pyx_lineno, __pyx_filename);
  100400. __pyx_r = 0;
  100401. __pyx_L0:;
  100402. __Pyx_XDECREF(__pyx_v_dn);
  100403. __Pyx_XGIVEREF(__pyx_r);
  100404. __Pyx_RefNannyFinishContext();
  100405. return __pyx_r;
  100406. }
  100407. /* "uvloop/handles/process.pyx":412
  100408. * return dn
  100409. *
  100410. * cdef _file_outpipe(self): # <<<<<<<<<<<<<<
  100411. * r, w = __socketpair()
  100412. * os_set_inheritable(w, True)
  100413. */
  100414. static PyObject *__pyx_f_6uvloop_4loop_18UVProcessTransport__file_outpipe(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self) {
  100415. PyObject *__pyx_v_r = NULL;
  100416. PyObject *__pyx_v_w = NULL;
  100417. PyObject *__pyx_r = NULL;
  100418. __Pyx_RefNannyDeclarations
  100419. PyObject *__pyx_t_1 = NULL;
  100420. PyObject *__pyx_t_2 = NULL;
  100421. PyObject *__pyx_t_3 = NULL;
  100422. PyObject *__pyx_t_4 = NULL;
  100423. PyObject *(*__pyx_t_5)(PyObject *);
  100424. int __pyx_t_6;
  100425. __Pyx_RefNannySetupContext("_file_outpipe", 0);
  100426. /* "uvloop/handles/process.pyx":413
  100427. *
  100428. * cdef _file_outpipe(self):
  100429. * r, w = __socketpair() # <<<<<<<<<<<<<<
  100430. * os_set_inheritable(w, True)
  100431. * self._close_after_spawn(w)
  100432. */
  100433. __pyx_t_1 = __pyx_f_6uvloop_4loop___socketpair(); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 413, __pyx_L1_error)
  100434. __Pyx_GOTREF(__pyx_t_1);
  100435. if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
  100436. PyObject* sequence = __pyx_t_1;
  100437. Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
  100438. if (unlikely(size != 2)) {
  100439. if (size > 2) __Pyx_RaiseTooManyValuesError(2);
  100440. else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
  100441. __PYX_ERR(6, 413, __pyx_L1_error)
  100442. }
  100443. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  100444. if (likely(PyTuple_CheckExact(sequence))) {
  100445. __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0);
  100446. __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1);
  100447. } else {
  100448. __pyx_t_2 = PyList_GET_ITEM(sequence, 0);
  100449. __pyx_t_3 = PyList_GET_ITEM(sequence, 1);
  100450. }
  100451. __Pyx_INCREF(__pyx_t_2);
  100452. __Pyx_INCREF(__pyx_t_3);
  100453. #else
  100454. __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 413, __pyx_L1_error)
  100455. __Pyx_GOTREF(__pyx_t_2);
  100456. __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 413, __pyx_L1_error)
  100457. __Pyx_GOTREF(__pyx_t_3);
  100458. #endif
  100459. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  100460. } else {
  100461. Py_ssize_t index = -1;
  100462. __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 413, __pyx_L1_error)
  100463. __Pyx_GOTREF(__pyx_t_4);
  100464. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  100465. __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext;
  100466. index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
  100467. __Pyx_GOTREF(__pyx_t_2);
  100468. index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
  100469. __Pyx_GOTREF(__pyx_t_3);
  100470. if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) __PYX_ERR(6, 413, __pyx_L1_error)
  100471. __pyx_t_5 = NULL;
  100472. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  100473. goto __pyx_L4_unpacking_done;
  100474. __pyx_L3_unpacking_failed:;
  100475. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  100476. __pyx_t_5 = NULL;
  100477. if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
  100478. __PYX_ERR(6, 413, __pyx_L1_error)
  100479. __pyx_L4_unpacking_done:;
  100480. }
  100481. __pyx_v_r = __pyx_t_2;
  100482. __pyx_t_2 = 0;
  100483. __pyx_v_w = __pyx_t_3;
  100484. __pyx_t_3 = 0;
  100485. /* "uvloop/handles/process.pyx":414
  100486. * cdef _file_outpipe(self):
  100487. * r, w = __socketpair()
  100488. * os_set_inheritable(w, True) # <<<<<<<<<<<<<<
  100489. * self._close_after_spawn(w)
  100490. * return r, w
  100491. */
  100492. __Pyx_INCREF(__pyx_v_6uvloop_4loop_os_set_inheritable);
  100493. __pyx_t_3 = __pyx_v_6uvloop_4loop_os_set_inheritable; __pyx_t_2 = NULL;
  100494. __pyx_t_6 = 0;
  100495. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
  100496. __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
  100497. if (likely(__pyx_t_2)) {
  100498. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  100499. __Pyx_INCREF(__pyx_t_2);
  100500. __Pyx_INCREF(function);
  100501. __Pyx_DECREF_SET(__pyx_t_3, function);
  100502. __pyx_t_6 = 1;
  100503. }
  100504. }
  100505. #if CYTHON_FAST_PYCALL
  100506. if (PyFunction_Check(__pyx_t_3)) {
  100507. PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_w, Py_True};
  100508. __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 414, __pyx_L1_error)
  100509. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  100510. __Pyx_GOTREF(__pyx_t_1);
  100511. } else
  100512. #endif
  100513. #if CYTHON_FAST_PYCCALL
  100514. if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
  100515. PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_w, Py_True};
  100516. __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 414, __pyx_L1_error)
  100517. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  100518. __Pyx_GOTREF(__pyx_t_1);
  100519. } else
  100520. #endif
  100521. {
  100522. __pyx_t_4 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 414, __pyx_L1_error)
  100523. __Pyx_GOTREF(__pyx_t_4);
  100524. if (__pyx_t_2) {
  100525. __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __pyx_t_2 = NULL;
  100526. }
  100527. __Pyx_INCREF(__pyx_v_w);
  100528. __Pyx_GIVEREF(__pyx_v_w);
  100529. PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_6, __pyx_v_w);
  100530. __Pyx_INCREF(Py_True);
  100531. __Pyx_GIVEREF(Py_True);
  100532. PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_6, Py_True);
  100533. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 414, __pyx_L1_error)
  100534. __Pyx_GOTREF(__pyx_t_1);
  100535. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  100536. }
  100537. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  100538. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  100539. /* "uvloop/handles/process.pyx":415
  100540. * r, w = __socketpair()
  100541. * os_set_inheritable(w, True)
  100542. * self._close_after_spawn(w) # <<<<<<<<<<<<<<
  100543. * return r, w
  100544. *
  100545. */
  100546. __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_w); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(6, 415, __pyx_L1_error)
  100547. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcessTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._close_after_spawn(((struct __pyx_obj_6uvloop_4loop_UVProcess *)__pyx_v_self), __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 415, __pyx_L1_error)
  100548. __Pyx_GOTREF(__pyx_t_1);
  100549. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  100550. /* "uvloop/handles/process.pyx":416
  100551. * os_set_inheritable(w, True)
  100552. * self._close_after_spawn(w)
  100553. * return r, w # <<<<<<<<<<<<<<
  100554. *
  100555. * cdef _file_inpipe(self):
  100556. */
  100557. __Pyx_XDECREF(__pyx_r);
  100558. __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 416, __pyx_L1_error)
  100559. __Pyx_GOTREF(__pyx_t_1);
  100560. __Pyx_INCREF(__pyx_v_r);
  100561. __Pyx_GIVEREF(__pyx_v_r);
  100562. PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_r);
  100563. __Pyx_INCREF(__pyx_v_w);
  100564. __Pyx_GIVEREF(__pyx_v_w);
  100565. PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_w);
  100566. __pyx_r = __pyx_t_1;
  100567. __pyx_t_1 = 0;
  100568. goto __pyx_L0;
  100569. /* "uvloop/handles/process.pyx":412
  100570. * return dn
  100571. *
  100572. * cdef _file_outpipe(self): # <<<<<<<<<<<<<<
  100573. * r, w = __socketpair()
  100574. * os_set_inheritable(w, True)
  100575. */
  100576. /* function exit code */
  100577. __pyx_L1_error:;
  100578. __Pyx_XDECREF(__pyx_t_1);
  100579. __Pyx_XDECREF(__pyx_t_2);
  100580. __Pyx_XDECREF(__pyx_t_3);
  100581. __Pyx_XDECREF(__pyx_t_4);
  100582. __Pyx_AddTraceback("uvloop.loop.UVProcessTransport._file_outpipe", __pyx_clineno, __pyx_lineno, __pyx_filename);
  100583. __pyx_r = 0;
  100584. __pyx_L0:;
  100585. __Pyx_XDECREF(__pyx_v_r);
  100586. __Pyx_XDECREF(__pyx_v_w);
  100587. __Pyx_XGIVEREF(__pyx_r);
  100588. __Pyx_RefNannyFinishContext();
  100589. return __pyx_r;
  100590. }
  100591. /* "uvloop/handles/process.pyx":418
  100592. * return r, w
  100593. *
  100594. * cdef _file_inpipe(self): # <<<<<<<<<<<<<<
  100595. * r, w = __socketpair()
  100596. * os_set_inheritable(r, True)
  100597. */
  100598. static PyObject *__pyx_f_6uvloop_4loop_18UVProcessTransport__file_inpipe(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self) {
  100599. PyObject *__pyx_v_r = NULL;
  100600. PyObject *__pyx_v_w = NULL;
  100601. PyObject *__pyx_r = NULL;
  100602. __Pyx_RefNannyDeclarations
  100603. PyObject *__pyx_t_1 = NULL;
  100604. PyObject *__pyx_t_2 = NULL;
  100605. PyObject *__pyx_t_3 = NULL;
  100606. PyObject *__pyx_t_4 = NULL;
  100607. PyObject *(*__pyx_t_5)(PyObject *);
  100608. int __pyx_t_6;
  100609. __Pyx_RefNannySetupContext("_file_inpipe", 0);
  100610. /* "uvloop/handles/process.pyx":419
  100611. *
  100612. * cdef _file_inpipe(self):
  100613. * r, w = __socketpair() # <<<<<<<<<<<<<<
  100614. * os_set_inheritable(r, True)
  100615. * self._close_after_spawn(r)
  100616. */
  100617. __pyx_t_1 = __pyx_f_6uvloop_4loop___socketpair(); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 419, __pyx_L1_error)
  100618. __Pyx_GOTREF(__pyx_t_1);
  100619. if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
  100620. PyObject* sequence = __pyx_t_1;
  100621. Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
  100622. if (unlikely(size != 2)) {
  100623. if (size > 2) __Pyx_RaiseTooManyValuesError(2);
  100624. else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
  100625. __PYX_ERR(6, 419, __pyx_L1_error)
  100626. }
  100627. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  100628. if (likely(PyTuple_CheckExact(sequence))) {
  100629. __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0);
  100630. __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1);
  100631. } else {
  100632. __pyx_t_2 = PyList_GET_ITEM(sequence, 0);
  100633. __pyx_t_3 = PyList_GET_ITEM(sequence, 1);
  100634. }
  100635. __Pyx_INCREF(__pyx_t_2);
  100636. __Pyx_INCREF(__pyx_t_3);
  100637. #else
  100638. __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 419, __pyx_L1_error)
  100639. __Pyx_GOTREF(__pyx_t_2);
  100640. __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 419, __pyx_L1_error)
  100641. __Pyx_GOTREF(__pyx_t_3);
  100642. #endif
  100643. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  100644. } else {
  100645. Py_ssize_t index = -1;
  100646. __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 419, __pyx_L1_error)
  100647. __Pyx_GOTREF(__pyx_t_4);
  100648. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  100649. __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext;
  100650. index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
  100651. __Pyx_GOTREF(__pyx_t_2);
  100652. index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
  100653. __Pyx_GOTREF(__pyx_t_3);
  100654. if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) __PYX_ERR(6, 419, __pyx_L1_error)
  100655. __pyx_t_5 = NULL;
  100656. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  100657. goto __pyx_L4_unpacking_done;
  100658. __pyx_L3_unpacking_failed:;
  100659. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  100660. __pyx_t_5 = NULL;
  100661. if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
  100662. __PYX_ERR(6, 419, __pyx_L1_error)
  100663. __pyx_L4_unpacking_done:;
  100664. }
  100665. __pyx_v_r = __pyx_t_2;
  100666. __pyx_t_2 = 0;
  100667. __pyx_v_w = __pyx_t_3;
  100668. __pyx_t_3 = 0;
  100669. /* "uvloop/handles/process.pyx":420
  100670. * cdef _file_inpipe(self):
  100671. * r, w = __socketpair()
  100672. * os_set_inheritable(r, True) # <<<<<<<<<<<<<<
  100673. * self._close_after_spawn(r)
  100674. * return r, w
  100675. */
  100676. __Pyx_INCREF(__pyx_v_6uvloop_4loop_os_set_inheritable);
  100677. __pyx_t_3 = __pyx_v_6uvloop_4loop_os_set_inheritable; __pyx_t_2 = NULL;
  100678. __pyx_t_6 = 0;
  100679. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
  100680. __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
  100681. if (likely(__pyx_t_2)) {
  100682. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  100683. __Pyx_INCREF(__pyx_t_2);
  100684. __Pyx_INCREF(function);
  100685. __Pyx_DECREF_SET(__pyx_t_3, function);
  100686. __pyx_t_6 = 1;
  100687. }
  100688. }
  100689. #if CYTHON_FAST_PYCALL
  100690. if (PyFunction_Check(__pyx_t_3)) {
  100691. PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_r, Py_True};
  100692. __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 420, __pyx_L1_error)
  100693. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  100694. __Pyx_GOTREF(__pyx_t_1);
  100695. } else
  100696. #endif
  100697. #if CYTHON_FAST_PYCCALL
  100698. if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
  100699. PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_r, Py_True};
  100700. __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 420, __pyx_L1_error)
  100701. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  100702. __Pyx_GOTREF(__pyx_t_1);
  100703. } else
  100704. #endif
  100705. {
  100706. __pyx_t_4 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 420, __pyx_L1_error)
  100707. __Pyx_GOTREF(__pyx_t_4);
  100708. if (__pyx_t_2) {
  100709. __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __pyx_t_2 = NULL;
  100710. }
  100711. __Pyx_INCREF(__pyx_v_r);
  100712. __Pyx_GIVEREF(__pyx_v_r);
  100713. PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_6, __pyx_v_r);
  100714. __Pyx_INCREF(Py_True);
  100715. __Pyx_GIVEREF(Py_True);
  100716. PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_6, Py_True);
  100717. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 420, __pyx_L1_error)
  100718. __Pyx_GOTREF(__pyx_t_1);
  100719. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  100720. }
  100721. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  100722. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  100723. /* "uvloop/handles/process.pyx":421
  100724. * r, w = __socketpair()
  100725. * os_set_inheritable(r, True)
  100726. * self._close_after_spawn(r) # <<<<<<<<<<<<<<
  100727. * return r, w
  100728. *
  100729. */
  100730. __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_r); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(6, 421, __pyx_L1_error)
  100731. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcessTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._close_after_spawn(((struct __pyx_obj_6uvloop_4loop_UVProcess *)__pyx_v_self), __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 421, __pyx_L1_error)
  100732. __Pyx_GOTREF(__pyx_t_1);
  100733. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  100734. /* "uvloop/handles/process.pyx":422
  100735. * os_set_inheritable(r, True)
  100736. * self._close_after_spawn(r)
  100737. * return r, w # <<<<<<<<<<<<<<
  100738. *
  100739. * cdef _init_files(self, _stdin, _stdout, _stderr):
  100740. */
  100741. __Pyx_XDECREF(__pyx_r);
  100742. __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 422, __pyx_L1_error)
  100743. __Pyx_GOTREF(__pyx_t_1);
  100744. __Pyx_INCREF(__pyx_v_r);
  100745. __Pyx_GIVEREF(__pyx_v_r);
  100746. PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_r);
  100747. __Pyx_INCREF(__pyx_v_w);
  100748. __Pyx_GIVEREF(__pyx_v_w);
  100749. PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_w);
  100750. __pyx_r = __pyx_t_1;
  100751. __pyx_t_1 = 0;
  100752. goto __pyx_L0;
  100753. /* "uvloop/handles/process.pyx":418
  100754. * return r, w
  100755. *
  100756. * cdef _file_inpipe(self): # <<<<<<<<<<<<<<
  100757. * r, w = __socketpair()
  100758. * os_set_inheritable(r, True)
  100759. */
  100760. /* function exit code */
  100761. __pyx_L1_error:;
  100762. __Pyx_XDECREF(__pyx_t_1);
  100763. __Pyx_XDECREF(__pyx_t_2);
  100764. __Pyx_XDECREF(__pyx_t_3);
  100765. __Pyx_XDECREF(__pyx_t_4);
  100766. __Pyx_AddTraceback("uvloop.loop.UVProcessTransport._file_inpipe", __pyx_clineno, __pyx_lineno, __pyx_filename);
  100767. __pyx_r = 0;
  100768. __pyx_L0:;
  100769. __Pyx_XDECREF(__pyx_v_r);
  100770. __Pyx_XDECREF(__pyx_v_w);
  100771. __Pyx_XGIVEREF(__pyx_r);
  100772. __Pyx_RefNannyFinishContext();
  100773. return __pyx_r;
  100774. }
  100775. /* "uvloop/handles/process.pyx":424
  100776. * return r, w
  100777. *
  100778. * cdef _init_files(self, _stdin, _stdout, _stderr): # <<<<<<<<<<<<<<
  100779. * cdef uv.uv_stdio_container_t *iocnt
  100780. *
  100781. */
  100782. static PyObject *__pyx_f_6uvloop_4loop_18UVProcessTransport__init_files(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self, PyObject *__pyx_v__stdin, PyObject *__pyx_v__stdout, PyObject *__pyx_v__stderr) {
  100783. uv_stdio_container_t *__pyx_v_iocnt;
  100784. PyObject *__pyx_v_io = NULL;
  100785. PyObject *__pyx_v_r = NULL;
  100786. PyObject *__pyx_v_w = NULL;
  100787. PyObject *__pyx_v_waiter = NULL;
  100788. PyObject *__pyx_v_newfd = NULL;
  100789. long __pyx_v_idx;
  100790. PyObject *__pyx_r = NULL;
  100791. __Pyx_RefNannyDeclarations
  100792. PyObject *__pyx_t_1 = NULL;
  100793. uv_stdio_container_t *__pyx_t_2;
  100794. int __pyx_t_3;
  100795. int __pyx_t_4;
  100796. PyObject *__pyx_t_5 = NULL;
  100797. PyObject *__pyx_t_6 = NULL;
  100798. PyObject *__pyx_t_7 = NULL;
  100799. PyObject *(*__pyx_t_8)(PyObject *);
  100800. int __pyx_t_9;
  100801. int __pyx_t_10;
  100802. Py_ssize_t __pyx_t_11;
  100803. long __pyx_t_12;
  100804. __Pyx_RefNannySetupContext("_init_files", 0);
  100805. /* "uvloop/handles/process.pyx":427
  100806. * cdef uv.uv_stdio_container_t *iocnt
  100807. *
  100808. * UVProcess._init_files(self, _stdin, _stdout, _stderr) # <<<<<<<<<<<<<<
  100809. *
  100810. * io = [None, None, None]
  100811. */
  100812. __pyx_t_1 = __pyx_f_6uvloop_4loop_9UVProcess__init_files(((struct __pyx_obj_6uvloop_4loop_UVProcess *)__pyx_v_self), __pyx_v__stdin, __pyx_v__stdout, __pyx_v__stderr); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 427, __pyx_L1_error)
  100813. __Pyx_GOTREF(__pyx_t_1);
  100814. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  100815. /* "uvloop/handles/process.pyx":429
  100816. * UVProcess._init_files(self, _stdin, _stdout, _stderr)
  100817. *
  100818. * io = [None, None, None] # <<<<<<<<<<<<<<
  100819. *
  100820. * self.options.stdio_count = 3
  100821. */
  100822. __pyx_t_1 = PyList_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 429, __pyx_L1_error)
  100823. __Pyx_GOTREF(__pyx_t_1);
  100824. __Pyx_INCREF(Py_None);
  100825. __Pyx_GIVEREF(Py_None);
  100826. PyList_SET_ITEM(__pyx_t_1, 0, Py_None);
  100827. __Pyx_INCREF(Py_None);
  100828. __Pyx_GIVEREF(Py_None);
  100829. PyList_SET_ITEM(__pyx_t_1, 1, Py_None);
  100830. __Pyx_INCREF(Py_None);
  100831. __Pyx_GIVEREF(Py_None);
  100832. PyList_SET_ITEM(__pyx_t_1, 2, Py_None);
  100833. __pyx_v_io = ((PyObject*)__pyx_t_1);
  100834. __pyx_t_1 = 0;
  100835. /* "uvloop/handles/process.pyx":431
  100836. * io = [None, None, None]
  100837. *
  100838. * self.options.stdio_count = 3 # <<<<<<<<<<<<<<
  100839. * self.options.stdio = self.iocnt
  100840. *
  100841. */
  100842. __pyx_v_self->__pyx_base.options.stdio_count = 3;
  100843. /* "uvloop/handles/process.pyx":432
  100844. *
  100845. * self.options.stdio_count = 3
  100846. * self.options.stdio = self.iocnt # <<<<<<<<<<<<<<
  100847. *
  100848. * if _stdin is not None:
  100849. */
  100850. __pyx_t_2 = __pyx_v_self->__pyx_base.iocnt;
  100851. __pyx_v_self->__pyx_base.options.stdio = __pyx_t_2;
  100852. /* "uvloop/handles/process.pyx":434
  100853. * self.options.stdio = self.iocnt
  100854. *
  100855. * if _stdin is not None: # <<<<<<<<<<<<<<
  100856. * if _stdin == subprocess_PIPE:
  100857. * r, w = self._file_inpipe()
  100858. */
  100859. __pyx_t_3 = (__pyx_v__stdin != Py_None);
  100860. __pyx_t_4 = (__pyx_t_3 != 0);
  100861. if (__pyx_t_4) {
  100862. /* "uvloop/handles/process.pyx":435
  100863. *
  100864. * if _stdin is not None:
  100865. * if _stdin == subprocess_PIPE: # <<<<<<<<<<<<<<
  100866. * r, w = self._file_inpipe()
  100867. * io[0] = r
  100868. */
  100869. __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_6uvloop_4loop_subprocess_PIPE); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 435, __pyx_L1_error)
  100870. __Pyx_GOTREF(__pyx_t_1);
  100871. __pyx_t_5 = PyObject_RichCompare(__pyx_v__stdin, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 435, __pyx_L1_error)
  100872. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  100873. __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(6, 435, __pyx_L1_error)
  100874. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  100875. if (__pyx_t_4) {
  100876. /* "uvloop/handles/process.pyx":436
  100877. * if _stdin is not None:
  100878. * if _stdin == subprocess_PIPE:
  100879. * r, w = self._file_inpipe() # <<<<<<<<<<<<<<
  100880. * io[0] = r
  100881. *
  100882. */
  100883. __pyx_t_5 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcessTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_file_inpipe(__pyx_v_self); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 436, __pyx_L1_error)
  100884. __Pyx_GOTREF(__pyx_t_5);
  100885. if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) {
  100886. PyObject* sequence = __pyx_t_5;
  100887. Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
  100888. if (unlikely(size != 2)) {
  100889. if (size > 2) __Pyx_RaiseTooManyValuesError(2);
  100890. else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
  100891. __PYX_ERR(6, 436, __pyx_L1_error)
  100892. }
  100893. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  100894. if (likely(PyTuple_CheckExact(sequence))) {
  100895. __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0);
  100896. __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1);
  100897. } else {
  100898. __pyx_t_1 = PyList_GET_ITEM(sequence, 0);
  100899. __pyx_t_6 = PyList_GET_ITEM(sequence, 1);
  100900. }
  100901. __Pyx_INCREF(__pyx_t_1);
  100902. __Pyx_INCREF(__pyx_t_6);
  100903. #else
  100904. __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 436, __pyx_L1_error)
  100905. __Pyx_GOTREF(__pyx_t_1);
  100906. __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 436, __pyx_L1_error)
  100907. __Pyx_GOTREF(__pyx_t_6);
  100908. #endif
  100909. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  100910. } else {
  100911. Py_ssize_t index = -1;
  100912. __pyx_t_7 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(6, 436, __pyx_L1_error)
  100913. __Pyx_GOTREF(__pyx_t_7);
  100914. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  100915. __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext;
  100916. index = 0; __pyx_t_1 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_1)) goto __pyx_L5_unpacking_failed;
  100917. __Pyx_GOTREF(__pyx_t_1);
  100918. index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L5_unpacking_failed;
  100919. __Pyx_GOTREF(__pyx_t_6);
  100920. if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(6, 436, __pyx_L1_error)
  100921. __pyx_t_8 = NULL;
  100922. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  100923. goto __pyx_L6_unpacking_done;
  100924. __pyx_L5_unpacking_failed:;
  100925. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  100926. __pyx_t_8 = NULL;
  100927. if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
  100928. __PYX_ERR(6, 436, __pyx_L1_error)
  100929. __pyx_L6_unpacking_done:;
  100930. }
  100931. __pyx_v_r = __pyx_t_1;
  100932. __pyx_t_1 = 0;
  100933. __pyx_v_w = __pyx_t_6;
  100934. __pyx_t_6 = 0;
  100935. /* "uvloop/handles/process.pyx":437
  100936. * if _stdin == subprocess_PIPE:
  100937. * r, w = self._file_inpipe()
  100938. * io[0] = r # <<<<<<<<<<<<<<
  100939. *
  100940. * self.stdin_proto = WriteSubprocessPipeProto(self, 0)
  100941. */
  100942. if (unlikely(__Pyx_SetItemInt(__pyx_v_io, 0, __pyx_v_r, long, 1, __Pyx_PyInt_From_long, 1, 0, 1) < 0)) __PYX_ERR(6, 437, __pyx_L1_error)
  100943. /* "uvloop/handles/process.pyx":439
  100944. * io[0] = r
  100945. *
  100946. * self.stdin_proto = WriteSubprocessPipeProto(self, 0) # <<<<<<<<<<<<<<
  100947. * waiter = self._loop._new_future()
  100948. * self._stdin = WriteUnixTransport.new(
  100949. */
  100950. __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_WriteSubprocessPipeProto); if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 439, __pyx_L1_error)
  100951. __Pyx_GOTREF(__pyx_t_6);
  100952. __pyx_t_1 = NULL;
  100953. __pyx_t_9 = 0;
  100954. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
  100955. __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
  100956. if (likely(__pyx_t_1)) {
  100957. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
  100958. __Pyx_INCREF(__pyx_t_1);
  100959. __Pyx_INCREF(function);
  100960. __Pyx_DECREF_SET(__pyx_t_6, function);
  100961. __pyx_t_9 = 1;
  100962. }
  100963. }
  100964. #if CYTHON_FAST_PYCALL
  100965. if (PyFunction_Check(__pyx_t_6)) {
  100966. PyObject *__pyx_temp[3] = {__pyx_t_1, ((PyObject *)__pyx_v_self), __pyx_int_0};
  100967. __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 439, __pyx_L1_error)
  100968. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  100969. __Pyx_GOTREF(__pyx_t_5);
  100970. } else
  100971. #endif
  100972. #if CYTHON_FAST_PYCCALL
  100973. if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
  100974. PyObject *__pyx_temp[3] = {__pyx_t_1, ((PyObject *)__pyx_v_self), __pyx_int_0};
  100975. __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 439, __pyx_L1_error)
  100976. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  100977. __Pyx_GOTREF(__pyx_t_5);
  100978. } else
  100979. #endif
  100980. {
  100981. __pyx_t_7 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(6, 439, __pyx_L1_error)
  100982. __Pyx_GOTREF(__pyx_t_7);
  100983. if (__pyx_t_1) {
  100984. __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1); __pyx_t_1 = NULL;
  100985. }
  100986. __Pyx_INCREF(((PyObject *)__pyx_v_self));
  100987. __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  100988. PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_9, ((PyObject *)__pyx_v_self));
  100989. __Pyx_INCREF(__pyx_int_0);
  100990. __Pyx_GIVEREF(__pyx_int_0);
  100991. PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_9, __pyx_int_0);
  100992. __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 439, __pyx_L1_error)
  100993. __Pyx_GOTREF(__pyx_t_5);
  100994. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  100995. }
  100996. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  100997. __Pyx_GIVEREF(__pyx_t_5);
  100998. __Pyx_GOTREF(__pyx_v_self->stdin_proto);
  100999. __Pyx_DECREF(__pyx_v_self->stdin_proto);
  101000. __pyx_v_self->stdin_proto = __pyx_t_5;
  101001. __pyx_t_5 = 0;
  101002. /* "uvloop/handles/process.pyx":440
  101003. *
  101004. * self.stdin_proto = WriteSubprocessPipeProto(self, 0)
  101005. * waiter = self._loop._new_future() # <<<<<<<<<<<<<<
  101006. * self._stdin = WriteUnixTransport.new(
  101007. * self._loop, self.stdin_proto, None, waiter)
  101008. */
  101009. __pyx_t_5 = __pyx_f_6uvloop_4loop_4Loop__new_future(__pyx_v_self->__pyx_base.__pyx_base._loop); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 440, __pyx_L1_error)
  101010. __Pyx_GOTREF(__pyx_t_5);
  101011. __pyx_v_waiter = __pyx_t_5;
  101012. __pyx_t_5 = 0;
  101013. /* "uvloop/handles/process.pyx":442
  101014. * waiter = self._loop._new_future()
  101015. * self._stdin = WriteUnixTransport.new(
  101016. * self._loop, self.stdin_proto, None, waiter) # <<<<<<<<<<<<<<
  101017. * self._init_futs.append(waiter)
  101018. * self._stdin._open(w)
  101019. */
  101020. __pyx_t_5 = ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._loop);
  101021. __Pyx_INCREF(__pyx_t_5);
  101022. __pyx_t_6 = __pyx_v_self->stdin_proto;
  101023. __Pyx_INCREF(__pyx_t_6);
  101024. /* "uvloop/handles/process.pyx":441
  101025. * self.stdin_proto = WriteSubprocessPipeProto(self, 0)
  101026. * waiter = self._loop._new_future()
  101027. * self._stdin = WriteUnixTransport.new( # <<<<<<<<<<<<<<
  101028. * self._loop, self.stdin_proto, None, waiter)
  101029. * self._init_futs.append(waiter)
  101030. */
  101031. __pyx_t_7 = ((PyObject *)__pyx_f_6uvloop_4loop_18WriteUnixTransport_new(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_t_5), __pyx_t_6, ((struct __pyx_obj_6uvloop_4loop_Server *)Py_None), __pyx_v_waiter)); if (unlikely(!__pyx_t_7)) __PYX_ERR(6, 441, __pyx_L1_error)
  101032. __Pyx_GOTREF(__pyx_t_7);
  101033. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  101034. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  101035. __Pyx_GIVEREF(__pyx_t_7);
  101036. __Pyx_GOTREF(__pyx_v_self->_stdin);
  101037. __Pyx_DECREF(((PyObject *)__pyx_v_self->_stdin));
  101038. __pyx_v_self->_stdin = ((struct __pyx_obj_6uvloop_4loop_WriteUnixTransport *)__pyx_t_7);
  101039. __pyx_t_7 = 0;
  101040. /* "uvloop/handles/process.pyx":443
  101041. * self._stdin = WriteUnixTransport.new(
  101042. * self._loop, self.stdin_proto, None, waiter)
  101043. * self._init_futs.append(waiter) # <<<<<<<<<<<<<<
  101044. * self._stdin._open(w)
  101045. * self._stdin._init_protocol()
  101046. */
  101047. if (unlikely(__pyx_v_self->_init_futs == Py_None)) {
  101048. PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append");
  101049. __PYX_ERR(6, 443, __pyx_L1_error)
  101050. }
  101051. __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_self->_init_futs, __pyx_v_waiter); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(6, 443, __pyx_L1_error)
  101052. /* "uvloop/handles/process.pyx":444
  101053. * self._loop, self.stdin_proto, None, waiter)
  101054. * self._init_futs.append(waiter)
  101055. * self._stdin._open(w) # <<<<<<<<<<<<<<
  101056. * self._stdin._init_protocol()
  101057. * elif _stdin == subprocess_DEVNULL:
  101058. */
  101059. __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_v_w); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(6, 444, __pyx_L1_error)
  101060. __pyx_t_7 = ((struct __pyx_vtabstruct_6uvloop_4loop_WriteUnixTransport *)__pyx_v_self->_stdin->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._open(((struct __pyx_obj_6uvloop_4loop_UVSocketHandle *)__pyx_v_self->_stdin), __pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(6, 444, __pyx_L1_error)
  101061. __Pyx_GOTREF(__pyx_t_7);
  101062. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  101063. /* "uvloop/handles/process.pyx":445
  101064. * self._init_futs.append(waiter)
  101065. * self._stdin._open(w)
  101066. * self._stdin._init_protocol() # <<<<<<<<<<<<<<
  101067. * elif _stdin == subprocess_DEVNULL:
  101068. * io[0] = self._file_devnull()
  101069. */
  101070. __pyx_t_7 = ((struct __pyx_vtabstruct_6uvloop_4loop_WriteUnixTransport *)__pyx_v_self->_stdin->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._init_protocol(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_v_self->_stdin)); if (unlikely(!__pyx_t_7)) __PYX_ERR(6, 445, __pyx_L1_error)
  101071. __Pyx_GOTREF(__pyx_t_7);
  101072. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  101073. /* "uvloop/handles/process.pyx":435
  101074. *
  101075. * if _stdin is not None:
  101076. * if _stdin == subprocess_PIPE: # <<<<<<<<<<<<<<
  101077. * r, w = self._file_inpipe()
  101078. * io[0] = r
  101079. */
  101080. goto __pyx_L4;
  101081. }
  101082. /* "uvloop/handles/process.pyx":446
  101083. * self._stdin._open(w)
  101084. * self._stdin._init_protocol()
  101085. * elif _stdin == subprocess_DEVNULL: # <<<<<<<<<<<<<<
  101086. * io[0] = self._file_devnull()
  101087. * elif _stdout == subprocess_STDOUT:
  101088. */
  101089. __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_6uvloop_4loop_subprocess_DEVNULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(6, 446, __pyx_L1_error)
  101090. __Pyx_GOTREF(__pyx_t_7);
  101091. __pyx_t_6 = PyObject_RichCompare(__pyx_v__stdin, __pyx_t_7, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 446, __pyx_L1_error)
  101092. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  101093. __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(6, 446, __pyx_L1_error)
  101094. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  101095. if (__pyx_t_4) {
  101096. /* "uvloop/handles/process.pyx":447
  101097. * self._stdin._init_protocol()
  101098. * elif _stdin == subprocess_DEVNULL:
  101099. * io[0] = self._file_devnull() # <<<<<<<<<<<<<<
  101100. * elif _stdout == subprocess_STDOUT:
  101101. * raise ValueError(
  101102. */
  101103. __pyx_t_6 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcessTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_file_devnull(__pyx_v_self); if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 447, __pyx_L1_error)
  101104. __Pyx_GOTREF(__pyx_t_6);
  101105. if (unlikely(__Pyx_SetItemInt(__pyx_v_io, 0, __pyx_t_6, long, 1, __Pyx_PyInt_From_long, 1, 0, 1) < 0)) __PYX_ERR(6, 447, __pyx_L1_error)
  101106. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  101107. /* "uvloop/handles/process.pyx":446
  101108. * self._stdin._open(w)
  101109. * self._stdin._init_protocol()
  101110. * elif _stdin == subprocess_DEVNULL: # <<<<<<<<<<<<<<
  101111. * io[0] = self._file_devnull()
  101112. * elif _stdout == subprocess_STDOUT:
  101113. */
  101114. goto __pyx_L4;
  101115. }
  101116. /* "uvloop/handles/process.pyx":448
  101117. * elif _stdin == subprocess_DEVNULL:
  101118. * io[0] = self._file_devnull()
  101119. * elif _stdout == subprocess_STDOUT: # <<<<<<<<<<<<<<
  101120. * raise ValueError(
  101121. * 'subprocess.STDOUT is supported only by stderr parameter')
  101122. */
  101123. __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_6uvloop_4loop_subprocess_STDOUT); if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 448, __pyx_L1_error)
  101124. __Pyx_GOTREF(__pyx_t_6);
  101125. __pyx_t_7 = PyObject_RichCompare(__pyx_v__stdout, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(6, 448, __pyx_L1_error)
  101126. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  101127. __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(6, 448, __pyx_L1_error)
  101128. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  101129. if (unlikely(__pyx_t_4)) {
  101130. /* "uvloop/handles/process.pyx":449
  101131. * io[0] = self._file_devnull()
  101132. * elif _stdout == subprocess_STDOUT:
  101133. * raise ValueError( # <<<<<<<<<<<<<<
  101134. * 'subprocess.STDOUT is supported only by stderr parameter')
  101135. * else:
  101136. */
  101137. __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__176, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(6, 449, __pyx_L1_error)
  101138. __Pyx_GOTREF(__pyx_t_7);
  101139. __Pyx_Raise(__pyx_t_7, 0, 0, 0);
  101140. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  101141. __PYX_ERR(6, 449, __pyx_L1_error)
  101142. /* "uvloop/handles/process.pyx":448
  101143. * elif _stdin == subprocess_DEVNULL:
  101144. * io[0] = self._file_devnull()
  101145. * elif _stdout == subprocess_STDOUT: # <<<<<<<<<<<<<<
  101146. * raise ValueError(
  101147. * 'subprocess.STDOUT is supported only by stderr parameter')
  101148. */
  101149. }
  101150. /* "uvloop/handles/process.pyx":452
  101151. * 'subprocess.STDOUT is supported only by stderr parameter')
  101152. * else:
  101153. * io[0] = self._file_redirect_stdio(_stdin) # <<<<<<<<<<<<<<
  101154. * else:
  101155. * io[0] = self._file_redirect_stdio(sys.stdin.fileno())
  101156. */
  101157. /*else*/ {
  101158. __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_v__stdin); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(6, 452, __pyx_L1_error)
  101159. __pyx_t_7 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcessTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_file_redirect_stdio(__pyx_v_self, __pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(6, 452, __pyx_L1_error)
  101160. __Pyx_GOTREF(__pyx_t_7);
  101161. if (unlikely(__Pyx_SetItemInt(__pyx_v_io, 0, __pyx_t_7, long, 1, __Pyx_PyInt_From_long, 1, 0, 1) < 0)) __PYX_ERR(6, 452, __pyx_L1_error)
  101162. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  101163. }
  101164. __pyx_L4:;
  101165. /* "uvloop/handles/process.pyx":434
  101166. * self.options.stdio = self.iocnt
  101167. *
  101168. * if _stdin is not None: # <<<<<<<<<<<<<<
  101169. * if _stdin == subprocess_PIPE:
  101170. * r, w = self._file_inpipe()
  101171. */
  101172. goto __pyx_L3;
  101173. }
  101174. /* "uvloop/handles/process.pyx":454
  101175. * io[0] = self._file_redirect_stdio(_stdin)
  101176. * else:
  101177. * io[0] = self._file_redirect_stdio(sys.stdin.fileno()) # <<<<<<<<<<<<<<
  101178. *
  101179. * if _stdout is not None:
  101180. */
  101181. /*else*/ {
  101182. __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_sys); if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 454, __pyx_L1_error)
  101183. __Pyx_GOTREF(__pyx_t_6);
  101184. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_stdin); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 454, __pyx_L1_error)
  101185. __Pyx_GOTREF(__pyx_t_5);
  101186. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  101187. __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_fileno); if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 454, __pyx_L1_error)
  101188. __Pyx_GOTREF(__pyx_t_6);
  101189. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  101190. __pyx_t_5 = NULL;
  101191. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
  101192. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
  101193. if (likely(__pyx_t_5)) {
  101194. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
  101195. __Pyx_INCREF(__pyx_t_5);
  101196. __Pyx_INCREF(function);
  101197. __Pyx_DECREF_SET(__pyx_t_6, function);
  101198. }
  101199. }
  101200. __pyx_t_7 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
  101201. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  101202. if (unlikely(!__pyx_t_7)) __PYX_ERR(6, 454, __pyx_L1_error)
  101203. __Pyx_GOTREF(__pyx_t_7);
  101204. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  101205. __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_t_7); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(6, 454, __pyx_L1_error)
  101206. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  101207. __pyx_t_7 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcessTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_file_redirect_stdio(__pyx_v_self, __pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(6, 454, __pyx_L1_error)
  101208. __Pyx_GOTREF(__pyx_t_7);
  101209. if (unlikely(__Pyx_SetItemInt(__pyx_v_io, 0, __pyx_t_7, long, 1, __Pyx_PyInt_From_long, 1, 0, 1) < 0)) __PYX_ERR(6, 454, __pyx_L1_error)
  101210. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  101211. }
  101212. __pyx_L3:;
  101213. /* "uvloop/handles/process.pyx":456
  101214. * io[0] = self._file_redirect_stdio(sys.stdin.fileno())
  101215. *
  101216. * if _stdout is not None: # <<<<<<<<<<<<<<
  101217. * if _stdout == subprocess_PIPE:
  101218. * # We can't use UV_CREATE_PIPE here, since 'stderr' might be
  101219. */
  101220. __pyx_t_4 = (__pyx_v__stdout != Py_None);
  101221. __pyx_t_3 = (__pyx_t_4 != 0);
  101222. if (__pyx_t_3) {
  101223. /* "uvloop/handles/process.pyx":457
  101224. *
  101225. * if _stdout is not None:
  101226. * if _stdout == subprocess_PIPE: # <<<<<<<<<<<<<<
  101227. * # We can't use UV_CREATE_PIPE here, since 'stderr' might be
  101228. * # set to 'subprocess.STDOUT', and there is no way to
  101229. */
  101230. __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_6uvloop_4loop_subprocess_PIPE); if (unlikely(!__pyx_t_7)) __PYX_ERR(6, 457, __pyx_L1_error)
  101231. __Pyx_GOTREF(__pyx_t_7);
  101232. __pyx_t_6 = PyObject_RichCompare(__pyx_v__stdout, __pyx_t_7, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 457, __pyx_L1_error)
  101233. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  101234. __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(6, 457, __pyx_L1_error)
  101235. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  101236. if (__pyx_t_3) {
  101237. /* "uvloop/handles/process.pyx":464
  101238. * # stderr manually.
  101239. *
  101240. * r, w = self._file_outpipe() # <<<<<<<<<<<<<<
  101241. * io[1] = w
  101242. *
  101243. */
  101244. __pyx_t_6 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcessTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_file_outpipe(__pyx_v_self); if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 464, __pyx_L1_error)
  101245. __Pyx_GOTREF(__pyx_t_6);
  101246. if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) {
  101247. PyObject* sequence = __pyx_t_6;
  101248. Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
  101249. if (unlikely(size != 2)) {
  101250. if (size > 2) __Pyx_RaiseTooManyValuesError(2);
  101251. else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
  101252. __PYX_ERR(6, 464, __pyx_L1_error)
  101253. }
  101254. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  101255. if (likely(PyTuple_CheckExact(sequence))) {
  101256. __pyx_t_7 = PyTuple_GET_ITEM(sequence, 0);
  101257. __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1);
  101258. } else {
  101259. __pyx_t_7 = PyList_GET_ITEM(sequence, 0);
  101260. __pyx_t_5 = PyList_GET_ITEM(sequence, 1);
  101261. }
  101262. __Pyx_INCREF(__pyx_t_7);
  101263. __Pyx_INCREF(__pyx_t_5);
  101264. #else
  101265. __pyx_t_7 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(6, 464, __pyx_L1_error)
  101266. __Pyx_GOTREF(__pyx_t_7);
  101267. __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 464, __pyx_L1_error)
  101268. __Pyx_GOTREF(__pyx_t_5);
  101269. #endif
  101270. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  101271. } else {
  101272. Py_ssize_t index = -1;
  101273. __pyx_t_1 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 464, __pyx_L1_error)
  101274. __Pyx_GOTREF(__pyx_t_1);
  101275. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  101276. __pyx_t_8 = Py_TYPE(__pyx_t_1)->tp_iternext;
  101277. index = 0; __pyx_t_7 = __pyx_t_8(__pyx_t_1); if (unlikely(!__pyx_t_7)) goto __pyx_L9_unpacking_failed;
  101278. __Pyx_GOTREF(__pyx_t_7);
  101279. index = 1; __pyx_t_5 = __pyx_t_8(__pyx_t_1); if (unlikely(!__pyx_t_5)) goto __pyx_L9_unpacking_failed;
  101280. __Pyx_GOTREF(__pyx_t_5);
  101281. if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_1), 2) < 0) __PYX_ERR(6, 464, __pyx_L1_error)
  101282. __pyx_t_8 = NULL;
  101283. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  101284. goto __pyx_L10_unpacking_done;
  101285. __pyx_L9_unpacking_failed:;
  101286. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  101287. __pyx_t_8 = NULL;
  101288. if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
  101289. __PYX_ERR(6, 464, __pyx_L1_error)
  101290. __pyx_L10_unpacking_done:;
  101291. }
  101292. __Pyx_XDECREF_SET(__pyx_v_r, __pyx_t_7);
  101293. __pyx_t_7 = 0;
  101294. __Pyx_XDECREF_SET(__pyx_v_w, __pyx_t_5);
  101295. __pyx_t_5 = 0;
  101296. /* "uvloop/handles/process.pyx":465
  101297. *
  101298. * r, w = self._file_outpipe()
  101299. * io[1] = w # <<<<<<<<<<<<<<
  101300. *
  101301. * self.stdout_proto = ReadSubprocessPipeProto(self, 1)
  101302. */
  101303. if (unlikely(__Pyx_SetItemInt(__pyx_v_io, 1, __pyx_v_w, long, 1, __Pyx_PyInt_From_long, 1, 0, 1) < 0)) __PYX_ERR(6, 465, __pyx_L1_error)
  101304. /* "uvloop/handles/process.pyx":467
  101305. * io[1] = w
  101306. *
  101307. * self.stdout_proto = ReadSubprocessPipeProto(self, 1) # <<<<<<<<<<<<<<
  101308. * waiter = self._loop._new_future()
  101309. * self._stdout = ReadUnixTransport.new(
  101310. */
  101311. __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_ReadSubprocessPipeProto); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 467, __pyx_L1_error)
  101312. __Pyx_GOTREF(__pyx_t_5);
  101313. __pyx_t_7 = NULL;
  101314. __pyx_t_9 = 0;
  101315. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
  101316. __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
  101317. if (likely(__pyx_t_7)) {
  101318. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
  101319. __Pyx_INCREF(__pyx_t_7);
  101320. __Pyx_INCREF(function);
  101321. __Pyx_DECREF_SET(__pyx_t_5, function);
  101322. __pyx_t_9 = 1;
  101323. }
  101324. }
  101325. #if CYTHON_FAST_PYCALL
  101326. if (PyFunction_Check(__pyx_t_5)) {
  101327. PyObject *__pyx_temp[3] = {__pyx_t_7, ((PyObject *)__pyx_v_self), __pyx_int_1};
  101328. __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 467, __pyx_L1_error)
  101329. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  101330. __Pyx_GOTREF(__pyx_t_6);
  101331. } else
  101332. #endif
  101333. #if CYTHON_FAST_PYCCALL
  101334. if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
  101335. PyObject *__pyx_temp[3] = {__pyx_t_7, ((PyObject *)__pyx_v_self), __pyx_int_1};
  101336. __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 467, __pyx_L1_error)
  101337. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  101338. __Pyx_GOTREF(__pyx_t_6);
  101339. } else
  101340. #endif
  101341. {
  101342. __pyx_t_1 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 467, __pyx_L1_error)
  101343. __Pyx_GOTREF(__pyx_t_1);
  101344. if (__pyx_t_7) {
  101345. __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_7); __pyx_t_7 = NULL;
  101346. }
  101347. __Pyx_INCREF(((PyObject *)__pyx_v_self));
  101348. __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  101349. PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_9, ((PyObject *)__pyx_v_self));
  101350. __Pyx_INCREF(__pyx_int_1);
  101351. __Pyx_GIVEREF(__pyx_int_1);
  101352. PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_9, __pyx_int_1);
  101353. __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_1, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 467, __pyx_L1_error)
  101354. __Pyx_GOTREF(__pyx_t_6);
  101355. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  101356. }
  101357. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  101358. __Pyx_GIVEREF(__pyx_t_6);
  101359. __Pyx_GOTREF(__pyx_v_self->stdout_proto);
  101360. __Pyx_DECREF(__pyx_v_self->stdout_proto);
  101361. __pyx_v_self->stdout_proto = __pyx_t_6;
  101362. __pyx_t_6 = 0;
  101363. /* "uvloop/handles/process.pyx":468
  101364. *
  101365. * self.stdout_proto = ReadSubprocessPipeProto(self, 1)
  101366. * waiter = self._loop._new_future() # <<<<<<<<<<<<<<
  101367. * self._stdout = ReadUnixTransport.new(
  101368. * self._loop, self.stdout_proto, None, waiter)
  101369. */
  101370. __pyx_t_6 = __pyx_f_6uvloop_4loop_4Loop__new_future(__pyx_v_self->__pyx_base.__pyx_base._loop); if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 468, __pyx_L1_error)
  101371. __Pyx_GOTREF(__pyx_t_6);
  101372. __Pyx_XDECREF_SET(__pyx_v_waiter, __pyx_t_6);
  101373. __pyx_t_6 = 0;
  101374. /* "uvloop/handles/process.pyx":470
  101375. * waiter = self._loop._new_future()
  101376. * self._stdout = ReadUnixTransport.new(
  101377. * self._loop, self.stdout_proto, None, waiter) # <<<<<<<<<<<<<<
  101378. * self._init_futs.append(waiter)
  101379. * self._stdout._open(r)
  101380. */
  101381. __pyx_t_6 = ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._loop);
  101382. __Pyx_INCREF(__pyx_t_6);
  101383. __pyx_t_5 = __pyx_v_self->stdout_proto;
  101384. __Pyx_INCREF(__pyx_t_5);
  101385. /* "uvloop/handles/process.pyx":469
  101386. * self.stdout_proto = ReadSubprocessPipeProto(self, 1)
  101387. * waiter = self._loop._new_future()
  101388. * self._stdout = ReadUnixTransport.new( # <<<<<<<<<<<<<<
  101389. * self._loop, self.stdout_proto, None, waiter)
  101390. * self._init_futs.append(waiter)
  101391. */
  101392. __pyx_t_1 = ((PyObject *)__pyx_f_6uvloop_4loop_17ReadUnixTransport_new(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_t_6), __pyx_t_5, ((struct __pyx_obj_6uvloop_4loop_Server *)Py_None), __pyx_v_waiter)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 469, __pyx_L1_error)
  101393. __Pyx_GOTREF(__pyx_t_1);
  101394. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  101395. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  101396. __Pyx_GIVEREF(__pyx_t_1);
  101397. __Pyx_GOTREF(__pyx_v_self->_stdout);
  101398. __Pyx_DECREF(((PyObject *)__pyx_v_self->_stdout));
  101399. __pyx_v_self->_stdout = ((struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *)__pyx_t_1);
  101400. __pyx_t_1 = 0;
  101401. /* "uvloop/handles/process.pyx":471
  101402. * self._stdout = ReadUnixTransport.new(
  101403. * self._loop, self.stdout_proto, None, waiter)
  101404. * self._init_futs.append(waiter) # <<<<<<<<<<<<<<
  101405. * self._stdout._open(r)
  101406. * self._stdout._init_protocol()
  101407. */
  101408. if (unlikely(__pyx_v_self->_init_futs == Py_None)) {
  101409. PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append");
  101410. __PYX_ERR(6, 471, __pyx_L1_error)
  101411. }
  101412. __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_self->_init_futs, __pyx_v_waiter); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(6, 471, __pyx_L1_error)
  101413. /* "uvloop/handles/process.pyx":472
  101414. * self._loop, self.stdout_proto, None, waiter)
  101415. * self._init_futs.append(waiter)
  101416. * self._stdout._open(r) # <<<<<<<<<<<<<<
  101417. * self._stdout._init_protocol()
  101418. * elif _stdout == subprocess_DEVNULL:
  101419. */
  101420. __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_v_r); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(6, 472, __pyx_L1_error)
  101421. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_ReadUnixTransport *)__pyx_v_self->_stdout->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._open(((struct __pyx_obj_6uvloop_4loop_UVSocketHandle *)__pyx_v_self->_stdout), __pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 472, __pyx_L1_error)
  101422. __Pyx_GOTREF(__pyx_t_1);
  101423. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  101424. /* "uvloop/handles/process.pyx":473
  101425. * self._init_futs.append(waiter)
  101426. * self._stdout._open(r)
  101427. * self._stdout._init_protocol() # <<<<<<<<<<<<<<
  101428. * elif _stdout == subprocess_DEVNULL:
  101429. * io[1] = self._file_devnull()
  101430. */
  101431. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_ReadUnixTransport *)__pyx_v_self->_stdout->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._init_protocol(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_v_self->_stdout)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 473, __pyx_L1_error)
  101432. __Pyx_GOTREF(__pyx_t_1);
  101433. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  101434. /* "uvloop/handles/process.pyx":457
  101435. *
  101436. * if _stdout is not None:
  101437. * if _stdout == subprocess_PIPE: # <<<<<<<<<<<<<<
  101438. * # We can't use UV_CREATE_PIPE here, since 'stderr' might be
  101439. * # set to 'subprocess.STDOUT', and there is no way to
  101440. */
  101441. goto __pyx_L8;
  101442. }
  101443. /* "uvloop/handles/process.pyx":474
  101444. * self._stdout._open(r)
  101445. * self._stdout._init_protocol()
  101446. * elif _stdout == subprocess_DEVNULL: # <<<<<<<<<<<<<<
  101447. * io[1] = self._file_devnull()
  101448. * elif _stdout == subprocess_STDOUT:
  101449. */
  101450. __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_6uvloop_4loop_subprocess_DEVNULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 474, __pyx_L1_error)
  101451. __Pyx_GOTREF(__pyx_t_1);
  101452. __pyx_t_5 = PyObject_RichCompare(__pyx_v__stdout, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 474, __pyx_L1_error)
  101453. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  101454. __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(6, 474, __pyx_L1_error)
  101455. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  101456. if (__pyx_t_3) {
  101457. /* "uvloop/handles/process.pyx":475
  101458. * self._stdout._init_protocol()
  101459. * elif _stdout == subprocess_DEVNULL:
  101460. * io[1] = self._file_devnull() # <<<<<<<<<<<<<<
  101461. * elif _stdout == subprocess_STDOUT:
  101462. * raise ValueError(
  101463. */
  101464. __pyx_t_5 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcessTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_file_devnull(__pyx_v_self); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 475, __pyx_L1_error)
  101465. __Pyx_GOTREF(__pyx_t_5);
  101466. if (unlikely(__Pyx_SetItemInt(__pyx_v_io, 1, __pyx_t_5, long, 1, __Pyx_PyInt_From_long, 1, 0, 1) < 0)) __PYX_ERR(6, 475, __pyx_L1_error)
  101467. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  101468. /* "uvloop/handles/process.pyx":474
  101469. * self._stdout._open(r)
  101470. * self._stdout._init_protocol()
  101471. * elif _stdout == subprocess_DEVNULL: # <<<<<<<<<<<<<<
  101472. * io[1] = self._file_devnull()
  101473. * elif _stdout == subprocess_STDOUT:
  101474. */
  101475. goto __pyx_L8;
  101476. }
  101477. /* "uvloop/handles/process.pyx":476
  101478. * elif _stdout == subprocess_DEVNULL:
  101479. * io[1] = self._file_devnull()
  101480. * elif _stdout == subprocess_STDOUT: # <<<<<<<<<<<<<<
  101481. * raise ValueError(
  101482. * 'subprocess.STDOUT is supported only by stderr parameter')
  101483. */
  101484. __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_6uvloop_4loop_subprocess_STDOUT); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 476, __pyx_L1_error)
  101485. __Pyx_GOTREF(__pyx_t_5);
  101486. __pyx_t_1 = PyObject_RichCompare(__pyx_v__stdout, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 476, __pyx_L1_error)
  101487. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  101488. __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(6, 476, __pyx_L1_error)
  101489. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  101490. if (unlikely(__pyx_t_3)) {
  101491. /* "uvloop/handles/process.pyx":477
  101492. * io[1] = self._file_devnull()
  101493. * elif _stdout == subprocess_STDOUT:
  101494. * raise ValueError( # <<<<<<<<<<<<<<
  101495. * 'subprocess.STDOUT is supported only by stderr parameter')
  101496. * else:
  101497. */
  101498. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__176, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 477, __pyx_L1_error)
  101499. __Pyx_GOTREF(__pyx_t_1);
  101500. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  101501. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  101502. __PYX_ERR(6, 477, __pyx_L1_error)
  101503. /* "uvloop/handles/process.pyx":476
  101504. * elif _stdout == subprocess_DEVNULL:
  101505. * io[1] = self._file_devnull()
  101506. * elif _stdout == subprocess_STDOUT: # <<<<<<<<<<<<<<
  101507. * raise ValueError(
  101508. * 'subprocess.STDOUT is supported only by stderr parameter')
  101509. */
  101510. }
  101511. /* "uvloop/handles/process.pyx":480
  101512. * 'subprocess.STDOUT is supported only by stderr parameter')
  101513. * else:
  101514. * io[1] = self._file_redirect_stdio(_stdout) # <<<<<<<<<<<<<<
  101515. * else:
  101516. * io[1] = self._file_redirect_stdio(sys.stdout.fileno())
  101517. */
  101518. /*else*/ {
  101519. __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_v__stdout); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(6, 480, __pyx_L1_error)
  101520. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcessTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_file_redirect_stdio(__pyx_v_self, __pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 480, __pyx_L1_error)
  101521. __Pyx_GOTREF(__pyx_t_1);
  101522. if (unlikely(__Pyx_SetItemInt(__pyx_v_io, 1, __pyx_t_1, long, 1, __Pyx_PyInt_From_long, 1, 0, 1) < 0)) __PYX_ERR(6, 480, __pyx_L1_error)
  101523. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  101524. }
  101525. __pyx_L8:;
  101526. /* "uvloop/handles/process.pyx":456
  101527. * io[0] = self._file_redirect_stdio(sys.stdin.fileno())
  101528. *
  101529. * if _stdout is not None: # <<<<<<<<<<<<<<
  101530. * if _stdout == subprocess_PIPE:
  101531. * # We can't use UV_CREATE_PIPE here, since 'stderr' might be
  101532. */
  101533. goto __pyx_L7;
  101534. }
  101535. /* "uvloop/handles/process.pyx":482
  101536. * io[1] = self._file_redirect_stdio(_stdout)
  101537. * else:
  101538. * io[1] = self._file_redirect_stdio(sys.stdout.fileno()) # <<<<<<<<<<<<<<
  101539. *
  101540. * if _stderr is not None:
  101541. */
  101542. /*else*/ {
  101543. __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_sys); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 482, __pyx_L1_error)
  101544. __Pyx_GOTREF(__pyx_t_5);
  101545. __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_stdout); if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 482, __pyx_L1_error)
  101546. __Pyx_GOTREF(__pyx_t_6);
  101547. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  101548. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_fileno); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 482, __pyx_L1_error)
  101549. __Pyx_GOTREF(__pyx_t_5);
  101550. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  101551. __pyx_t_6 = NULL;
  101552. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
  101553. __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
  101554. if (likely(__pyx_t_6)) {
  101555. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
  101556. __Pyx_INCREF(__pyx_t_6);
  101557. __Pyx_INCREF(function);
  101558. __Pyx_DECREF_SET(__pyx_t_5, function);
  101559. }
  101560. }
  101561. __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
  101562. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  101563. if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 482, __pyx_L1_error)
  101564. __Pyx_GOTREF(__pyx_t_1);
  101565. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  101566. __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(6, 482, __pyx_L1_error)
  101567. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  101568. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcessTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_file_redirect_stdio(__pyx_v_self, __pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 482, __pyx_L1_error)
  101569. __Pyx_GOTREF(__pyx_t_1);
  101570. if (unlikely(__Pyx_SetItemInt(__pyx_v_io, 1, __pyx_t_1, long, 1, __Pyx_PyInt_From_long, 1, 0, 1) < 0)) __PYX_ERR(6, 482, __pyx_L1_error)
  101571. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  101572. }
  101573. __pyx_L7:;
  101574. /* "uvloop/handles/process.pyx":484
  101575. * io[1] = self._file_redirect_stdio(sys.stdout.fileno())
  101576. *
  101577. * if _stderr is not None: # <<<<<<<<<<<<<<
  101578. * if _stderr == subprocess_PIPE:
  101579. * r, w = self._file_outpipe()
  101580. */
  101581. __pyx_t_3 = (__pyx_v__stderr != Py_None);
  101582. __pyx_t_4 = (__pyx_t_3 != 0);
  101583. if (__pyx_t_4) {
  101584. /* "uvloop/handles/process.pyx":485
  101585. *
  101586. * if _stderr is not None:
  101587. * if _stderr == subprocess_PIPE: # <<<<<<<<<<<<<<
  101588. * r, w = self._file_outpipe()
  101589. * io[2] = w
  101590. */
  101591. __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_6uvloop_4loop_subprocess_PIPE); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 485, __pyx_L1_error)
  101592. __Pyx_GOTREF(__pyx_t_1);
  101593. __pyx_t_5 = PyObject_RichCompare(__pyx_v__stderr, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 485, __pyx_L1_error)
  101594. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  101595. __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(6, 485, __pyx_L1_error)
  101596. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  101597. if (__pyx_t_4) {
  101598. /* "uvloop/handles/process.pyx":486
  101599. * if _stderr is not None:
  101600. * if _stderr == subprocess_PIPE:
  101601. * r, w = self._file_outpipe() # <<<<<<<<<<<<<<
  101602. * io[2] = w
  101603. *
  101604. */
  101605. __pyx_t_5 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcessTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_file_outpipe(__pyx_v_self); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 486, __pyx_L1_error)
  101606. __Pyx_GOTREF(__pyx_t_5);
  101607. if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) {
  101608. PyObject* sequence = __pyx_t_5;
  101609. Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
  101610. if (unlikely(size != 2)) {
  101611. if (size > 2) __Pyx_RaiseTooManyValuesError(2);
  101612. else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
  101613. __PYX_ERR(6, 486, __pyx_L1_error)
  101614. }
  101615. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  101616. if (likely(PyTuple_CheckExact(sequence))) {
  101617. __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0);
  101618. __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1);
  101619. } else {
  101620. __pyx_t_1 = PyList_GET_ITEM(sequence, 0);
  101621. __pyx_t_6 = PyList_GET_ITEM(sequence, 1);
  101622. }
  101623. __Pyx_INCREF(__pyx_t_1);
  101624. __Pyx_INCREF(__pyx_t_6);
  101625. #else
  101626. __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 486, __pyx_L1_error)
  101627. __Pyx_GOTREF(__pyx_t_1);
  101628. __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 486, __pyx_L1_error)
  101629. __Pyx_GOTREF(__pyx_t_6);
  101630. #endif
  101631. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  101632. } else {
  101633. Py_ssize_t index = -1;
  101634. __pyx_t_7 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(6, 486, __pyx_L1_error)
  101635. __Pyx_GOTREF(__pyx_t_7);
  101636. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  101637. __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext;
  101638. index = 0; __pyx_t_1 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_1)) goto __pyx_L13_unpacking_failed;
  101639. __Pyx_GOTREF(__pyx_t_1);
  101640. index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L13_unpacking_failed;
  101641. __Pyx_GOTREF(__pyx_t_6);
  101642. if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(6, 486, __pyx_L1_error)
  101643. __pyx_t_8 = NULL;
  101644. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  101645. goto __pyx_L14_unpacking_done;
  101646. __pyx_L13_unpacking_failed:;
  101647. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  101648. __pyx_t_8 = NULL;
  101649. if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
  101650. __PYX_ERR(6, 486, __pyx_L1_error)
  101651. __pyx_L14_unpacking_done:;
  101652. }
  101653. __Pyx_XDECREF_SET(__pyx_v_r, __pyx_t_1);
  101654. __pyx_t_1 = 0;
  101655. __Pyx_XDECREF_SET(__pyx_v_w, __pyx_t_6);
  101656. __pyx_t_6 = 0;
  101657. /* "uvloop/handles/process.pyx":487
  101658. * if _stderr == subprocess_PIPE:
  101659. * r, w = self._file_outpipe()
  101660. * io[2] = w # <<<<<<<<<<<<<<
  101661. *
  101662. * self.stderr_proto = ReadSubprocessPipeProto(self, 2)
  101663. */
  101664. if (unlikely(__Pyx_SetItemInt(__pyx_v_io, 2, __pyx_v_w, long, 1, __Pyx_PyInt_From_long, 1, 0, 1) < 0)) __PYX_ERR(6, 487, __pyx_L1_error)
  101665. /* "uvloop/handles/process.pyx":489
  101666. * io[2] = w
  101667. *
  101668. * self.stderr_proto = ReadSubprocessPipeProto(self, 2) # <<<<<<<<<<<<<<
  101669. * waiter = self._loop._new_future()
  101670. * self._stderr = ReadUnixTransport.new(
  101671. */
  101672. __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_ReadSubprocessPipeProto); if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 489, __pyx_L1_error)
  101673. __Pyx_GOTREF(__pyx_t_6);
  101674. __pyx_t_1 = NULL;
  101675. __pyx_t_9 = 0;
  101676. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
  101677. __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
  101678. if (likely(__pyx_t_1)) {
  101679. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
  101680. __Pyx_INCREF(__pyx_t_1);
  101681. __Pyx_INCREF(function);
  101682. __Pyx_DECREF_SET(__pyx_t_6, function);
  101683. __pyx_t_9 = 1;
  101684. }
  101685. }
  101686. #if CYTHON_FAST_PYCALL
  101687. if (PyFunction_Check(__pyx_t_6)) {
  101688. PyObject *__pyx_temp[3] = {__pyx_t_1, ((PyObject *)__pyx_v_self), __pyx_int_2};
  101689. __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 489, __pyx_L1_error)
  101690. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  101691. __Pyx_GOTREF(__pyx_t_5);
  101692. } else
  101693. #endif
  101694. #if CYTHON_FAST_PYCCALL
  101695. if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
  101696. PyObject *__pyx_temp[3] = {__pyx_t_1, ((PyObject *)__pyx_v_self), __pyx_int_2};
  101697. __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 489, __pyx_L1_error)
  101698. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  101699. __Pyx_GOTREF(__pyx_t_5);
  101700. } else
  101701. #endif
  101702. {
  101703. __pyx_t_7 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(6, 489, __pyx_L1_error)
  101704. __Pyx_GOTREF(__pyx_t_7);
  101705. if (__pyx_t_1) {
  101706. __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1); __pyx_t_1 = NULL;
  101707. }
  101708. __Pyx_INCREF(((PyObject *)__pyx_v_self));
  101709. __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  101710. PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_9, ((PyObject *)__pyx_v_self));
  101711. __Pyx_INCREF(__pyx_int_2);
  101712. __Pyx_GIVEREF(__pyx_int_2);
  101713. PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_9, __pyx_int_2);
  101714. __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 489, __pyx_L1_error)
  101715. __Pyx_GOTREF(__pyx_t_5);
  101716. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  101717. }
  101718. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  101719. __Pyx_GIVEREF(__pyx_t_5);
  101720. __Pyx_GOTREF(__pyx_v_self->stderr_proto);
  101721. __Pyx_DECREF(__pyx_v_self->stderr_proto);
  101722. __pyx_v_self->stderr_proto = __pyx_t_5;
  101723. __pyx_t_5 = 0;
  101724. /* "uvloop/handles/process.pyx":490
  101725. *
  101726. * self.stderr_proto = ReadSubprocessPipeProto(self, 2)
  101727. * waiter = self._loop._new_future() # <<<<<<<<<<<<<<
  101728. * self._stderr = ReadUnixTransport.new(
  101729. * self._loop, self.stderr_proto, None, waiter)
  101730. */
  101731. __pyx_t_5 = __pyx_f_6uvloop_4loop_4Loop__new_future(__pyx_v_self->__pyx_base.__pyx_base._loop); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 490, __pyx_L1_error)
  101732. __Pyx_GOTREF(__pyx_t_5);
  101733. __Pyx_XDECREF_SET(__pyx_v_waiter, __pyx_t_5);
  101734. __pyx_t_5 = 0;
  101735. /* "uvloop/handles/process.pyx":492
  101736. * waiter = self._loop._new_future()
  101737. * self._stderr = ReadUnixTransport.new(
  101738. * self._loop, self.stderr_proto, None, waiter) # <<<<<<<<<<<<<<
  101739. * self._init_futs.append(waiter)
  101740. * self._stderr._open(r)
  101741. */
  101742. __pyx_t_5 = ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._loop);
  101743. __Pyx_INCREF(__pyx_t_5);
  101744. __pyx_t_6 = __pyx_v_self->stderr_proto;
  101745. __Pyx_INCREF(__pyx_t_6);
  101746. /* "uvloop/handles/process.pyx":491
  101747. * self.stderr_proto = ReadSubprocessPipeProto(self, 2)
  101748. * waiter = self._loop._new_future()
  101749. * self._stderr = ReadUnixTransport.new( # <<<<<<<<<<<<<<
  101750. * self._loop, self.stderr_proto, None, waiter)
  101751. * self._init_futs.append(waiter)
  101752. */
  101753. __pyx_t_7 = ((PyObject *)__pyx_f_6uvloop_4loop_17ReadUnixTransport_new(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_t_5), __pyx_t_6, ((struct __pyx_obj_6uvloop_4loop_Server *)Py_None), __pyx_v_waiter)); if (unlikely(!__pyx_t_7)) __PYX_ERR(6, 491, __pyx_L1_error)
  101754. __Pyx_GOTREF(__pyx_t_7);
  101755. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  101756. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  101757. __Pyx_GIVEREF(__pyx_t_7);
  101758. __Pyx_GOTREF(__pyx_v_self->_stderr);
  101759. __Pyx_DECREF(((PyObject *)__pyx_v_self->_stderr));
  101760. __pyx_v_self->_stderr = ((struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *)__pyx_t_7);
  101761. __pyx_t_7 = 0;
  101762. /* "uvloop/handles/process.pyx":493
  101763. * self._stderr = ReadUnixTransport.new(
  101764. * self._loop, self.stderr_proto, None, waiter)
  101765. * self._init_futs.append(waiter) # <<<<<<<<<<<<<<
  101766. * self._stderr._open(r)
  101767. * self._stderr._init_protocol()
  101768. */
  101769. if (unlikely(__pyx_v_self->_init_futs == Py_None)) {
  101770. PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append");
  101771. __PYX_ERR(6, 493, __pyx_L1_error)
  101772. }
  101773. __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_self->_init_futs, __pyx_v_waiter); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(6, 493, __pyx_L1_error)
  101774. /* "uvloop/handles/process.pyx":494
  101775. * self._loop, self.stderr_proto, None, waiter)
  101776. * self._init_futs.append(waiter)
  101777. * self._stderr._open(r) # <<<<<<<<<<<<<<
  101778. * self._stderr._init_protocol()
  101779. * elif _stderr == subprocess_STDOUT:
  101780. */
  101781. __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_v_r); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(6, 494, __pyx_L1_error)
  101782. __pyx_t_7 = ((struct __pyx_vtabstruct_6uvloop_4loop_ReadUnixTransport *)__pyx_v_self->_stderr->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._open(((struct __pyx_obj_6uvloop_4loop_UVSocketHandle *)__pyx_v_self->_stderr), __pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(6, 494, __pyx_L1_error)
  101783. __Pyx_GOTREF(__pyx_t_7);
  101784. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  101785. /* "uvloop/handles/process.pyx":495
  101786. * self._init_futs.append(waiter)
  101787. * self._stderr._open(r)
  101788. * self._stderr._init_protocol() # <<<<<<<<<<<<<<
  101789. * elif _stderr == subprocess_STDOUT:
  101790. * if io[1] is None:
  101791. */
  101792. __pyx_t_7 = ((struct __pyx_vtabstruct_6uvloop_4loop_ReadUnixTransport *)__pyx_v_self->_stderr->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._init_protocol(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_v_self->_stderr)); if (unlikely(!__pyx_t_7)) __PYX_ERR(6, 495, __pyx_L1_error)
  101793. __Pyx_GOTREF(__pyx_t_7);
  101794. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  101795. /* "uvloop/handles/process.pyx":485
  101796. *
  101797. * if _stderr is not None:
  101798. * if _stderr == subprocess_PIPE: # <<<<<<<<<<<<<<
  101799. * r, w = self._file_outpipe()
  101800. * io[2] = w
  101801. */
  101802. goto __pyx_L12;
  101803. }
  101804. /* "uvloop/handles/process.pyx":496
  101805. * self._stderr._open(r)
  101806. * self._stderr._init_protocol()
  101807. * elif _stderr == subprocess_STDOUT: # <<<<<<<<<<<<<<
  101808. * if io[1] is None:
  101809. * # shouldn't ever happen
  101810. */
  101811. __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_6uvloop_4loop_subprocess_STDOUT); if (unlikely(!__pyx_t_7)) __PYX_ERR(6, 496, __pyx_L1_error)
  101812. __Pyx_GOTREF(__pyx_t_7);
  101813. __pyx_t_6 = PyObject_RichCompare(__pyx_v__stderr, __pyx_t_7, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 496, __pyx_L1_error)
  101814. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  101815. __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(6, 496, __pyx_L1_error)
  101816. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  101817. if (__pyx_t_4) {
  101818. /* "uvloop/handles/process.pyx":497
  101819. * self._stderr._init_protocol()
  101820. * elif _stderr == subprocess_STDOUT:
  101821. * if io[1] is None: # <<<<<<<<<<<<<<
  101822. * # shouldn't ever happen
  101823. * raise RuntimeError('cannot apply subprocess.STDOUT')
  101824. */
  101825. __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_io, 1, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 497, __pyx_L1_error)
  101826. __Pyx_GOTREF(__pyx_t_6);
  101827. __pyx_t_4 = (__pyx_t_6 == Py_None);
  101828. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  101829. __pyx_t_3 = (__pyx_t_4 != 0);
  101830. if (unlikely(__pyx_t_3)) {
  101831. /* "uvloop/handles/process.pyx":499
  101832. * if io[1] is None:
  101833. * # shouldn't ever happen
  101834. * raise RuntimeError('cannot apply subprocess.STDOUT') # <<<<<<<<<<<<<<
  101835. *
  101836. * newfd = os_dup(io[1])
  101837. */
  101838. __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__177, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 499, __pyx_L1_error)
  101839. __Pyx_GOTREF(__pyx_t_6);
  101840. __Pyx_Raise(__pyx_t_6, 0, 0, 0);
  101841. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  101842. __PYX_ERR(6, 499, __pyx_L1_error)
  101843. /* "uvloop/handles/process.pyx":497
  101844. * self._stderr._init_protocol()
  101845. * elif _stderr == subprocess_STDOUT:
  101846. * if io[1] is None: # <<<<<<<<<<<<<<
  101847. * # shouldn't ever happen
  101848. * raise RuntimeError('cannot apply subprocess.STDOUT')
  101849. */
  101850. }
  101851. /* "uvloop/handles/process.pyx":501
  101852. * raise RuntimeError('cannot apply subprocess.STDOUT')
  101853. *
  101854. * newfd = os_dup(io[1]) # <<<<<<<<<<<<<<
  101855. * os_set_inheritable(newfd, True)
  101856. * self._close_after_spawn(newfd)
  101857. */
  101858. __pyx_t_7 = __Pyx_GetItemInt_List(__pyx_v_io, 1, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(6, 501, __pyx_L1_error)
  101859. __Pyx_GOTREF(__pyx_t_7);
  101860. __Pyx_INCREF(__pyx_v_6uvloop_4loop_os_dup);
  101861. __pyx_t_5 = __pyx_v_6uvloop_4loop_os_dup; __pyx_t_1 = NULL;
  101862. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
  101863. __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5);
  101864. if (likely(__pyx_t_1)) {
  101865. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
  101866. __Pyx_INCREF(__pyx_t_1);
  101867. __Pyx_INCREF(function);
  101868. __Pyx_DECREF_SET(__pyx_t_5, function);
  101869. }
  101870. }
  101871. __pyx_t_6 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_1, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7);
  101872. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  101873. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  101874. if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 501, __pyx_L1_error)
  101875. __Pyx_GOTREF(__pyx_t_6);
  101876. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  101877. __pyx_v_newfd = __pyx_t_6;
  101878. __pyx_t_6 = 0;
  101879. /* "uvloop/handles/process.pyx":502
  101880. *
  101881. * newfd = os_dup(io[1])
  101882. * os_set_inheritable(newfd, True) # <<<<<<<<<<<<<<
  101883. * self._close_after_spawn(newfd)
  101884. * io[2] = newfd
  101885. */
  101886. __Pyx_INCREF(__pyx_v_6uvloop_4loop_os_set_inheritable);
  101887. __pyx_t_5 = __pyx_v_6uvloop_4loop_os_set_inheritable; __pyx_t_7 = NULL;
  101888. __pyx_t_9 = 0;
  101889. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
  101890. __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
  101891. if (likely(__pyx_t_7)) {
  101892. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
  101893. __Pyx_INCREF(__pyx_t_7);
  101894. __Pyx_INCREF(function);
  101895. __Pyx_DECREF_SET(__pyx_t_5, function);
  101896. __pyx_t_9 = 1;
  101897. }
  101898. }
  101899. #if CYTHON_FAST_PYCALL
  101900. if (PyFunction_Check(__pyx_t_5)) {
  101901. PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_newfd, Py_True};
  101902. __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 502, __pyx_L1_error)
  101903. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  101904. __Pyx_GOTREF(__pyx_t_6);
  101905. } else
  101906. #endif
  101907. #if CYTHON_FAST_PYCCALL
  101908. if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
  101909. PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_newfd, Py_True};
  101910. __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 502, __pyx_L1_error)
  101911. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  101912. __Pyx_GOTREF(__pyx_t_6);
  101913. } else
  101914. #endif
  101915. {
  101916. __pyx_t_1 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 502, __pyx_L1_error)
  101917. __Pyx_GOTREF(__pyx_t_1);
  101918. if (__pyx_t_7) {
  101919. __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_7); __pyx_t_7 = NULL;
  101920. }
  101921. __Pyx_INCREF(__pyx_v_newfd);
  101922. __Pyx_GIVEREF(__pyx_v_newfd);
  101923. PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_9, __pyx_v_newfd);
  101924. __Pyx_INCREF(Py_True);
  101925. __Pyx_GIVEREF(Py_True);
  101926. PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_9, Py_True);
  101927. __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_1, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 502, __pyx_L1_error)
  101928. __Pyx_GOTREF(__pyx_t_6);
  101929. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  101930. }
  101931. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  101932. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  101933. /* "uvloop/handles/process.pyx":503
  101934. * newfd = os_dup(io[1])
  101935. * os_set_inheritable(newfd, True)
  101936. * self._close_after_spawn(newfd) # <<<<<<<<<<<<<<
  101937. * io[2] = newfd
  101938. * elif _stderr == subprocess_DEVNULL:
  101939. */
  101940. __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_v_newfd); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(6, 503, __pyx_L1_error)
  101941. __pyx_t_6 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcessTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._close_after_spawn(((struct __pyx_obj_6uvloop_4loop_UVProcess *)__pyx_v_self), __pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 503, __pyx_L1_error)
  101942. __Pyx_GOTREF(__pyx_t_6);
  101943. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  101944. /* "uvloop/handles/process.pyx":504
  101945. * os_set_inheritable(newfd, True)
  101946. * self._close_after_spawn(newfd)
  101947. * io[2] = newfd # <<<<<<<<<<<<<<
  101948. * elif _stderr == subprocess_DEVNULL:
  101949. * io[2] = self._file_devnull()
  101950. */
  101951. if (unlikely(__Pyx_SetItemInt(__pyx_v_io, 2, __pyx_v_newfd, long, 1, __Pyx_PyInt_From_long, 1, 0, 1) < 0)) __PYX_ERR(6, 504, __pyx_L1_error)
  101952. /* "uvloop/handles/process.pyx":496
  101953. * self._stderr._open(r)
  101954. * self._stderr._init_protocol()
  101955. * elif _stderr == subprocess_STDOUT: # <<<<<<<<<<<<<<
  101956. * if io[1] is None:
  101957. * # shouldn't ever happen
  101958. */
  101959. goto __pyx_L12;
  101960. }
  101961. /* "uvloop/handles/process.pyx":505
  101962. * self._close_after_spawn(newfd)
  101963. * io[2] = newfd
  101964. * elif _stderr == subprocess_DEVNULL: # <<<<<<<<<<<<<<
  101965. * io[2] = self._file_devnull()
  101966. * else:
  101967. */
  101968. __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_6uvloop_4loop_subprocess_DEVNULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 505, __pyx_L1_error)
  101969. __Pyx_GOTREF(__pyx_t_6);
  101970. __pyx_t_5 = PyObject_RichCompare(__pyx_v__stderr, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 505, __pyx_L1_error)
  101971. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  101972. __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(6, 505, __pyx_L1_error)
  101973. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  101974. if (__pyx_t_3) {
  101975. /* "uvloop/handles/process.pyx":506
  101976. * io[2] = newfd
  101977. * elif _stderr == subprocess_DEVNULL:
  101978. * io[2] = self._file_devnull() # <<<<<<<<<<<<<<
  101979. * else:
  101980. * io[2] = self._file_redirect_stdio(_stderr)
  101981. */
  101982. __pyx_t_5 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcessTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_file_devnull(__pyx_v_self); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 506, __pyx_L1_error)
  101983. __Pyx_GOTREF(__pyx_t_5);
  101984. if (unlikely(__Pyx_SetItemInt(__pyx_v_io, 2, __pyx_t_5, long, 1, __Pyx_PyInt_From_long, 1, 0, 1) < 0)) __PYX_ERR(6, 506, __pyx_L1_error)
  101985. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  101986. /* "uvloop/handles/process.pyx":505
  101987. * self._close_after_spawn(newfd)
  101988. * io[2] = newfd
  101989. * elif _stderr == subprocess_DEVNULL: # <<<<<<<<<<<<<<
  101990. * io[2] = self._file_devnull()
  101991. * else:
  101992. */
  101993. goto __pyx_L12;
  101994. }
  101995. /* "uvloop/handles/process.pyx":508
  101996. * io[2] = self._file_devnull()
  101997. * else:
  101998. * io[2] = self._file_redirect_stdio(_stderr) # <<<<<<<<<<<<<<
  101999. * else:
  102000. * io[2] = self._file_redirect_stdio(sys.stderr.fileno())
  102001. */
  102002. /*else*/ {
  102003. __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_v__stderr); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(6, 508, __pyx_L1_error)
  102004. __pyx_t_5 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcessTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_file_redirect_stdio(__pyx_v_self, __pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 508, __pyx_L1_error)
  102005. __Pyx_GOTREF(__pyx_t_5);
  102006. if (unlikely(__Pyx_SetItemInt(__pyx_v_io, 2, __pyx_t_5, long, 1, __Pyx_PyInt_From_long, 1, 0, 1) < 0)) __PYX_ERR(6, 508, __pyx_L1_error)
  102007. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  102008. }
  102009. __pyx_L12:;
  102010. /* "uvloop/handles/process.pyx":484
  102011. * io[1] = self._file_redirect_stdio(sys.stdout.fileno())
  102012. *
  102013. * if _stderr is not None: # <<<<<<<<<<<<<<
  102014. * if _stderr == subprocess_PIPE:
  102015. * r, w = self._file_outpipe()
  102016. */
  102017. goto __pyx_L11;
  102018. }
  102019. /* "uvloop/handles/process.pyx":510
  102020. * io[2] = self._file_redirect_stdio(_stderr)
  102021. * else:
  102022. * io[2] = self._file_redirect_stdio(sys.stderr.fileno()) # <<<<<<<<<<<<<<
  102023. *
  102024. * assert len(io) == 3
  102025. */
  102026. /*else*/ {
  102027. __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_sys); if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 510, __pyx_L1_error)
  102028. __Pyx_GOTREF(__pyx_t_6);
  102029. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_stderr); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 510, __pyx_L1_error)
  102030. __Pyx_GOTREF(__pyx_t_1);
  102031. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  102032. __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_fileno); if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 510, __pyx_L1_error)
  102033. __Pyx_GOTREF(__pyx_t_6);
  102034. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  102035. __pyx_t_1 = NULL;
  102036. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
  102037. __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
  102038. if (likely(__pyx_t_1)) {
  102039. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
  102040. __Pyx_INCREF(__pyx_t_1);
  102041. __Pyx_INCREF(function);
  102042. __Pyx_DECREF_SET(__pyx_t_6, function);
  102043. }
  102044. }
  102045. __pyx_t_5 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
  102046. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  102047. if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 510, __pyx_L1_error)
  102048. __Pyx_GOTREF(__pyx_t_5);
  102049. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  102050. __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(6, 510, __pyx_L1_error)
  102051. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  102052. __pyx_t_5 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcessTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_file_redirect_stdio(__pyx_v_self, __pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 510, __pyx_L1_error)
  102053. __Pyx_GOTREF(__pyx_t_5);
  102054. if (unlikely(__Pyx_SetItemInt(__pyx_v_io, 2, __pyx_t_5, long, 1, __Pyx_PyInt_From_long, 1, 0, 1) < 0)) __PYX_ERR(6, 510, __pyx_L1_error)
  102055. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  102056. }
  102057. __pyx_L11:;
  102058. /* "uvloop/handles/process.pyx":512
  102059. * io[2] = self._file_redirect_stdio(sys.stderr.fileno())
  102060. *
  102061. * assert len(io) == 3 # <<<<<<<<<<<<<<
  102062. * for idx in range(3):
  102063. * iocnt = &self.iocnt[idx]
  102064. */
  102065. #ifndef CYTHON_WITHOUT_ASSERTIONS
  102066. if (unlikely(!Py_OptimizeFlag)) {
  102067. __pyx_t_11 = PyList_GET_SIZE(__pyx_v_io); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(6, 512, __pyx_L1_error)
  102068. if (unlikely(!((__pyx_t_11 == 3) != 0))) {
  102069. PyErr_SetNone(PyExc_AssertionError);
  102070. __PYX_ERR(6, 512, __pyx_L1_error)
  102071. }
  102072. }
  102073. #endif
  102074. /* "uvloop/handles/process.pyx":513
  102075. *
  102076. * assert len(io) == 3
  102077. * for idx in range(3): # <<<<<<<<<<<<<<
  102078. * iocnt = &self.iocnt[idx]
  102079. * if io[idx] is not None:
  102080. */
  102081. for (__pyx_t_12 = 0; __pyx_t_12 < 3; __pyx_t_12+=1) {
  102082. __pyx_v_idx = __pyx_t_12;
  102083. /* "uvloop/handles/process.pyx":514
  102084. * assert len(io) == 3
  102085. * for idx in range(3):
  102086. * iocnt = &self.iocnt[idx] # <<<<<<<<<<<<<<
  102087. * if io[idx] is not None:
  102088. * iocnt.flags = uv.UV_INHERIT_FD
  102089. */
  102090. __pyx_v_iocnt = (&(__pyx_v_self->__pyx_base.iocnt[__pyx_v_idx]));
  102091. /* "uvloop/handles/process.pyx":515
  102092. * for idx in range(3):
  102093. * iocnt = &self.iocnt[idx]
  102094. * if io[idx] is not None: # <<<<<<<<<<<<<<
  102095. * iocnt.flags = uv.UV_INHERIT_FD
  102096. * iocnt.data.fd = io[idx]
  102097. */
  102098. __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_io, __pyx_v_idx, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 515, __pyx_L1_error)
  102099. __Pyx_GOTREF(__pyx_t_5);
  102100. __pyx_t_3 = (__pyx_t_5 != Py_None);
  102101. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  102102. __pyx_t_4 = (__pyx_t_3 != 0);
  102103. if (__pyx_t_4) {
  102104. /* "uvloop/handles/process.pyx":516
  102105. * iocnt = &self.iocnt[idx]
  102106. * if io[idx] is not None:
  102107. * iocnt.flags = uv.UV_INHERIT_FD # <<<<<<<<<<<<<<
  102108. * iocnt.data.fd = io[idx]
  102109. * else:
  102110. */
  102111. __pyx_v_iocnt->flags = UV_INHERIT_FD;
  102112. /* "uvloop/handles/process.pyx":517
  102113. * if io[idx] is not None:
  102114. * iocnt.flags = uv.UV_INHERIT_FD
  102115. * iocnt.data.fd = io[idx] # <<<<<<<<<<<<<<
  102116. * else:
  102117. * iocnt.flags = uv.UV_IGNORE
  102118. */
  102119. __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_io, __pyx_v_idx, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 517, __pyx_L1_error)
  102120. __Pyx_GOTREF(__pyx_t_5);
  102121. __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(6, 517, __pyx_L1_error)
  102122. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  102123. __pyx_v_iocnt->data.fd = __pyx_t_9;
  102124. /* "uvloop/handles/process.pyx":515
  102125. * for idx in range(3):
  102126. * iocnt = &self.iocnt[idx]
  102127. * if io[idx] is not None: # <<<<<<<<<<<<<<
  102128. * iocnt.flags = uv.UV_INHERIT_FD
  102129. * iocnt.data.fd = io[idx]
  102130. */
  102131. goto __pyx_L18;
  102132. }
  102133. /* "uvloop/handles/process.pyx":519
  102134. * iocnt.data.fd = io[idx]
  102135. * else:
  102136. * iocnt.flags = uv.UV_IGNORE # <<<<<<<<<<<<<<
  102137. *
  102138. * cdef _call_connection_made(self, waiter):
  102139. */
  102140. /*else*/ {
  102141. __pyx_v_iocnt->flags = UV_IGNORE;
  102142. }
  102143. __pyx_L18:;
  102144. }
  102145. /* "uvloop/handles/process.pyx":424
  102146. * return r, w
  102147. *
  102148. * cdef _init_files(self, _stdin, _stdout, _stderr): # <<<<<<<<<<<<<<
  102149. * cdef uv.uv_stdio_container_t *iocnt
  102150. *
  102151. */
  102152. /* function exit code */
  102153. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  102154. goto __pyx_L0;
  102155. __pyx_L1_error:;
  102156. __Pyx_XDECREF(__pyx_t_1);
  102157. __Pyx_XDECREF(__pyx_t_5);
  102158. __Pyx_XDECREF(__pyx_t_6);
  102159. __Pyx_XDECREF(__pyx_t_7);
  102160. __Pyx_AddTraceback("uvloop.loop.UVProcessTransport._init_files", __pyx_clineno, __pyx_lineno, __pyx_filename);
  102161. __pyx_r = 0;
  102162. __pyx_L0:;
  102163. __Pyx_XDECREF(__pyx_v_io);
  102164. __Pyx_XDECREF(__pyx_v_r);
  102165. __Pyx_XDECREF(__pyx_v_w);
  102166. __Pyx_XDECREF(__pyx_v_waiter);
  102167. __Pyx_XDECREF(__pyx_v_newfd);
  102168. __Pyx_XGIVEREF(__pyx_r);
  102169. __Pyx_RefNannyFinishContext();
  102170. return __pyx_r;
  102171. }
  102172. /* "uvloop/handles/process.pyx":521
  102173. * iocnt.flags = uv.UV_IGNORE
  102174. *
  102175. * cdef _call_connection_made(self, waiter): # <<<<<<<<<<<<<<
  102176. * try:
  102177. * self._protocol.connection_made(self)
  102178. */
  102179. static PyObject *__pyx_f_6uvloop_4loop_18UVProcessTransport__call_connection_made(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self, PyObject *__pyx_v_waiter) {
  102180. PyObject *__pyx_v_ex = NULL;
  102181. PyObject *__pyx_v_pending_calls = NULL;
  102182. PyObject *__pyx_v_type = NULL;
  102183. PyObject *__pyx_v_fd = NULL;
  102184. PyObject *__pyx_v_arg = NULL;
  102185. PyObject *__pyx_r = NULL;
  102186. __Pyx_RefNannyDeclarations
  102187. PyObject *__pyx_t_1 = NULL;
  102188. PyObject *__pyx_t_2 = NULL;
  102189. PyObject *__pyx_t_3 = NULL;
  102190. PyObject *__pyx_t_4 = NULL;
  102191. PyObject *__pyx_t_5 = NULL;
  102192. PyObject *__pyx_t_6 = NULL;
  102193. int __pyx_t_7;
  102194. int __pyx_t_8;
  102195. int __pyx_t_9;
  102196. int __pyx_t_10;
  102197. PyObject *__pyx_t_11 = NULL;
  102198. PyObject *__pyx_t_12 = NULL;
  102199. PyObject *__pyx_t_13 = NULL;
  102200. int __pyx_t_14;
  102201. char const *__pyx_t_15;
  102202. PyObject *__pyx_t_16 = NULL;
  102203. PyObject *__pyx_t_17 = NULL;
  102204. PyObject *__pyx_t_18 = NULL;
  102205. PyObject *__pyx_t_19 = NULL;
  102206. PyObject *__pyx_t_20 = NULL;
  102207. PyObject *__pyx_t_21 = NULL;
  102208. Py_ssize_t __pyx_t_22;
  102209. PyObject *(*__pyx_t_23)(PyObject *);
  102210. PyObject *(*__pyx_t_24)(PyObject *);
  102211. __Pyx_RefNannySetupContext("_call_connection_made", 0);
  102212. /* "uvloop/handles/process.pyx":522
  102213. *
  102214. * cdef _call_connection_made(self, waiter):
  102215. * try: # <<<<<<<<<<<<<<
  102216. * self._protocol.connection_made(self)
  102217. * except Exception as ex:
  102218. */
  102219. {
  102220. __Pyx_PyThreadState_declare
  102221. __Pyx_PyThreadState_assign
  102222. __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
  102223. __Pyx_XGOTREF(__pyx_t_1);
  102224. __Pyx_XGOTREF(__pyx_t_2);
  102225. __Pyx_XGOTREF(__pyx_t_3);
  102226. /*try:*/ {
  102227. /* "uvloop/handles/process.pyx":523
  102228. * cdef _call_connection_made(self, waiter):
  102229. * try:
  102230. * self._protocol.connection_made(self) # <<<<<<<<<<<<<<
  102231. * except Exception as ex:
  102232. * if waiter is not None and not waiter.cancelled():
  102233. */
  102234. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_protocol, __pyx_n_s_connection_made); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 523, __pyx_L3_error)
  102235. __Pyx_GOTREF(__pyx_t_5);
  102236. __pyx_t_6 = NULL;
  102237. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
  102238. __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
  102239. if (likely(__pyx_t_6)) {
  102240. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
  102241. __Pyx_INCREF(__pyx_t_6);
  102242. __Pyx_INCREF(function);
  102243. __Pyx_DECREF_SET(__pyx_t_5, function);
  102244. }
  102245. }
  102246. __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, ((PyObject *)__pyx_v_self)) : __Pyx_PyObject_CallOneArg(__pyx_t_5, ((PyObject *)__pyx_v_self));
  102247. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  102248. if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 523, __pyx_L3_error)
  102249. __Pyx_GOTREF(__pyx_t_4);
  102250. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  102251. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  102252. /* "uvloop/handles/process.pyx":522
  102253. *
  102254. * cdef _call_connection_made(self, waiter):
  102255. * try: # <<<<<<<<<<<<<<
  102256. * self._protocol.connection_made(self)
  102257. * except Exception as ex:
  102258. */
  102259. }
  102260. /* "uvloop/handles/process.pyx":530
  102261. * raise
  102262. * else:
  102263. * if waiter is not None and not waiter.cancelled(): # <<<<<<<<<<<<<<
  102264. * waiter.set_result(True)
  102265. *
  102266. */
  102267. /*else:*/ {
  102268. __pyx_t_8 = (__pyx_v_waiter != Py_None);
  102269. __pyx_t_9 = (__pyx_t_8 != 0);
  102270. if (__pyx_t_9) {
  102271. } else {
  102272. __pyx_t_7 = __pyx_t_9;
  102273. goto __pyx_L10_bool_binop_done;
  102274. }
  102275. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_waiter, __pyx_n_s_cancelled); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 530, __pyx_L5_except_error)
  102276. __Pyx_GOTREF(__pyx_t_5);
  102277. __pyx_t_6 = NULL;
  102278. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
  102279. __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
  102280. if (likely(__pyx_t_6)) {
  102281. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
  102282. __Pyx_INCREF(__pyx_t_6);
  102283. __Pyx_INCREF(function);
  102284. __Pyx_DECREF_SET(__pyx_t_5, function);
  102285. }
  102286. }
  102287. __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
  102288. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  102289. if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 530, __pyx_L5_except_error)
  102290. __Pyx_GOTREF(__pyx_t_4);
  102291. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  102292. __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(6, 530, __pyx_L5_except_error)
  102293. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  102294. __pyx_t_8 = ((!__pyx_t_9) != 0);
  102295. __pyx_t_7 = __pyx_t_8;
  102296. __pyx_L10_bool_binop_done:;
  102297. if (__pyx_t_7) {
  102298. /* "uvloop/handles/process.pyx":531
  102299. * else:
  102300. * if waiter is not None and not waiter.cancelled():
  102301. * waiter.set_result(True) # <<<<<<<<<<<<<<
  102302. *
  102303. * self._stdio_ready = 1
  102304. */
  102305. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_waiter, __pyx_n_s_set_result); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 531, __pyx_L5_except_error)
  102306. __Pyx_GOTREF(__pyx_t_5);
  102307. __pyx_t_6 = NULL;
  102308. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
  102309. __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
  102310. if (likely(__pyx_t_6)) {
  102311. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
  102312. __Pyx_INCREF(__pyx_t_6);
  102313. __Pyx_INCREF(function);
  102314. __Pyx_DECREF_SET(__pyx_t_5, function);
  102315. }
  102316. }
  102317. __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, Py_True) : __Pyx_PyObject_CallOneArg(__pyx_t_5, Py_True);
  102318. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  102319. if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 531, __pyx_L5_except_error)
  102320. __Pyx_GOTREF(__pyx_t_4);
  102321. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  102322. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  102323. /* "uvloop/handles/process.pyx":530
  102324. * raise
  102325. * else:
  102326. * if waiter is not None and not waiter.cancelled(): # <<<<<<<<<<<<<<
  102327. * waiter.set_result(True)
  102328. *
  102329. */
  102330. }
  102331. }
  102332. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  102333. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  102334. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  102335. goto __pyx_L8_try_end;
  102336. __pyx_L3_error:;
  102337. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  102338. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  102339. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  102340. /* "uvloop/handles/process.pyx":524
  102341. * try:
  102342. * self._protocol.connection_made(self)
  102343. * except Exception as ex: # <<<<<<<<<<<<<<
  102344. * if waiter is not None and not waiter.cancelled():
  102345. * waiter.set_exception(ex)
  102346. */
  102347. __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
  102348. if (__pyx_t_10) {
  102349. __Pyx_AddTraceback("uvloop.loop.UVProcessTransport._call_connection_made", __pyx_clineno, __pyx_lineno, __pyx_filename);
  102350. if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6) < 0) __PYX_ERR(6, 524, __pyx_L5_except_error)
  102351. __Pyx_GOTREF(__pyx_t_4);
  102352. __Pyx_GOTREF(__pyx_t_5);
  102353. __Pyx_GOTREF(__pyx_t_6);
  102354. __Pyx_INCREF(__pyx_t_5);
  102355. __pyx_v_ex = __pyx_t_5;
  102356. /*try:*/ {
  102357. /* "uvloop/handles/process.pyx":525
  102358. * self._protocol.connection_made(self)
  102359. * except Exception as ex:
  102360. * if waiter is not None and not waiter.cancelled(): # <<<<<<<<<<<<<<
  102361. * waiter.set_exception(ex)
  102362. * else:
  102363. */
  102364. __pyx_t_8 = (__pyx_v_waiter != Py_None);
  102365. __pyx_t_9 = (__pyx_t_8 != 0);
  102366. if (__pyx_t_9) {
  102367. } else {
  102368. __pyx_t_7 = __pyx_t_9;
  102369. goto __pyx_L20_bool_binop_done;
  102370. }
  102371. __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_waiter, __pyx_n_s_cancelled); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 525, __pyx_L17_error)
  102372. __Pyx_GOTREF(__pyx_t_12);
  102373. __pyx_t_13 = NULL;
  102374. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_12))) {
  102375. __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_12);
  102376. if (likely(__pyx_t_13)) {
  102377. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
  102378. __Pyx_INCREF(__pyx_t_13);
  102379. __Pyx_INCREF(function);
  102380. __Pyx_DECREF_SET(__pyx_t_12, function);
  102381. }
  102382. }
  102383. __pyx_t_11 = (__pyx_t_13) ? __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_13) : __Pyx_PyObject_CallNoArg(__pyx_t_12);
  102384. __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
  102385. if (unlikely(!__pyx_t_11)) __PYX_ERR(6, 525, __pyx_L17_error)
  102386. __Pyx_GOTREF(__pyx_t_11);
  102387. __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  102388. __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(6, 525, __pyx_L17_error)
  102389. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  102390. __pyx_t_8 = ((!__pyx_t_9) != 0);
  102391. __pyx_t_7 = __pyx_t_8;
  102392. __pyx_L20_bool_binop_done:;
  102393. if (likely(__pyx_t_7)) {
  102394. /* "uvloop/handles/process.pyx":526
  102395. * except Exception as ex:
  102396. * if waiter is not None and not waiter.cancelled():
  102397. * waiter.set_exception(ex) # <<<<<<<<<<<<<<
  102398. * else:
  102399. * raise
  102400. */
  102401. __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_waiter, __pyx_n_s_set_exception); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 526, __pyx_L17_error)
  102402. __Pyx_GOTREF(__pyx_t_12);
  102403. __pyx_t_13 = NULL;
  102404. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_12))) {
  102405. __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_12);
  102406. if (likely(__pyx_t_13)) {
  102407. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
  102408. __Pyx_INCREF(__pyx_t_13);
  102409. __Pyx_INCREF(function);
  102410. __Pyx_DECREF_SET(__pyx_t_12, function);
  102411. }
  102412. }
  102413. __pyx_t_11 = (__pyx_t_13) ? __Pyx_PyObject_Call2Args(__pyx_t_12, __pyx_t_13, __pyx_v_ex) : __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_v_ex);
  102414. __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
  102415. if (unlikely(!__pyx_t_11)) __PYX_ERR(6, 526, __pyx_L17_error)
  102416. __Pyx_GOTREF(__pyx_t_11);
  102417. __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  102418. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  102419. /* "uvloop/handles/process.pyx":525
  102420. * self._protocol.connection_made(self)
  102421. * except Exception as ex:
  102422. * if waiter is not None and not waiter.cancelled(): # <<<<<<<<<<<<<<
  102423. * waiter.set_exception(ex)
  102424. * else:
  102425. */
  102426. goto __pyx_L19;
  102427. }
  102428. /* "uvloop/handles/process.pyx":528
  102429. * waiter.set_exception(ex)
  102430. * else:
  102431. * raise # <<<<<<<<<<<<<<
  102432. * else:
  102433. * if waiter is not None and not waiter.cancelled():
  102434. */
  102435. /*else*/ {
  102436. __Pyx_GIVEREF(__pyx_t_4);
  102437. __Pyx_GIVEREF(__pyx_t_5);
  102438. __Pyx_XGIVEREF(__pyx_t_6);
  102439. __Pyx_ErrRestoreWithState(__pyx_t_4, __pyx_t_5, __pyx_t_6);
  102440. __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_6 = 0;
  102441. __PYX_ERR(6, 528, __pyx_L17_error)
  102442. }
  102443. __pyx_L19:;
  102444. }
  102445. /* "uvloop/handles/process.pyx":524
  102446. * try:
  102447. * self._protocol.connection_made(self)
  102448. * except Exception as ex: # <<<<<<<<<<<<<<
  102449. * if waiter is not None and not waiter.cancelled():
  102450. * waiter.set_exception(ex)
  102451. */
  102452. /*finally:*/ {
  102453. /*normal exit:*/{
  102454. __Pyx_DECREF(__pyx_v_ex);
  102455. __pyx_v_ex = NULL;
  102456. goto __pyx_L18;
  102457. }
  102458. __pyx_L17_error:;
  102459. /*exception exit:*/{
  102460. __Pyx_PyThreadState_declare
  102461. __Pyx_PyThreadState_assign
  102462. __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0;
  102463. __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
  102464. __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
  102465. __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
  102466. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21);
  102467. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18) < 0)) __Pyx_ErrFetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18);
  102468. __Pyx_XGOTREF(__pyx_t_16);
  102469. __Pyx_XGOTREF(__pyx_t_17);
  102470. __Pyx_XGOTREF(__pyx_t_18);
  102471. __Pyx_XGOTREF(__pyx_t_19);
  102472. __Pyx_XGOTREF(__pyx_t_20);
  102473. __Pyx_XGOTREF(__pyx_t_21);
  102474. __pyx_t_10 = __pyx_lineno; __pyx_t_14 = __pyx_clineno; __pyx_t_15 = __pyx_filename;
  102475. {
  102476. __Pyx_DECREF(__pyx_v_ex);
  102477. __pyx_v_ex = NULL;
  102478. }
  102479. if (PY_MAJOR_VERSION >= 3) {
  102480. __Pyx_XGIVEREF(__pyx_t_19);
  102481. __Pyx_XGIVEREF(__pyx_t_20);
  102482. __Pyx_XGIVEREF(__pyx_t_21);
  102483. __Pyx_ExceptionReset(__pyx_t_19, __pyx_t_20, __pyx_t_21);
  102484. }
  102485. __Pyx_XGIVEREF(__pyx_t_16);
  102486. __Pyx_XGIVEREF(__pyx_t_17);
  102487. __Pyx_XGIVEREF(__pyx_t_18);
  102488. __Pyx_ErrRestore(__pyx_t_16, __pyx_t_17, __pyx_t_18);
  102489. __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0;
  102490. __pyx_lineno = __pyx_t_10; __pyx_clineno = __pyx_t_14; __pyx_filename = __pyx_t_15;
  102491. goto __pyx_L5_except_error;
  102492. }
  102493. __pyx_L18:;
  102494. }
  102495. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  102496. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  102497. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  102498. goto __pyx_L4_exception_handled;
  102499. }
  102500. goto __pyx_L5_except_error;
  102501. __pyx_L5_except_error:;
  102502. /* "uvloop/handles/process.pyx":522
  102503. *
  102504. * cdef _call_connection_made(self, waiter):
  102505. * try: # <<<<<<<<<<<<<<
  102506. * self._protocol.connection_made(self)
  102507. * except Exception as ex:
  102508. */
  102509. __Pyx_XGIVEREF(__pyx_t_1);
  102510. __Pyx_XGIVEREF(__pyx_t_2);
  102511. __Pyx_XGIVEREF(__pyx_t_3);
  102512. __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
  102513. goto __pyx_L1_error;
  102514. __pyx_L4_exception_handled:;
  102515. __Pyx_XGIVEREF(__pyx_t_1);
  102516. __Pyx_XGIVEREF(__pyx_t_2);
  102517. __Pyx_XGIVEREF(__pyx_t_3);
  102518. __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
  102519. __pyx_L8_try_end:;
  102520. }
  102521. /* "uvloop/handles/process.pyx":533
  102522. * waiter.set_result(True)
  102523. *
  102524. * self._stdio_ready = 1 # <<<<<<<<<<<<<<
  102525. * if self._pending_calls:
  102526. * pending_calls = self._pending_calls.copy()
  102527. */
  102528. __pyx_v_self->_stdio_ready = 1;
  102529. /* "uvloop/handles/process.pyx":534
  102530. *
  102531. * self._stdio_ready = 1
  102532. * if self._pending_calls: # <<<<<<<<<<<<<<
  102533. * pending_calls = self._pending_calls.copy()
  102534. * self._pending_calls.clear()
  102535. */
  102536. __pyx_t_7 = (__pyx_v_self->_pending_calls != Py_None)&&(PyList_GET_SIZE(__pyx_v_self->_pending_calls) != 0);
  102537. if (__pyx_t_7) {
  102538. /* "uvloop/handles/process.pyx":535
  102539. * self._stdio_ready = 1
  102540. * if self._pending_calls:
  102541. * pending_calls = self._pending_calls.copy() # <<<<<<<<<<<<<<
  102542. * self._pending_calls.clear()
  102543. * for (type, fd, arg) in pending_calls:
  102544. */
  102545. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_pending_calls, __pyx_n_s_copy); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 535, __pyx_L1_error)
  102546. __Pyx_GOTREF(__pyx_t_5);
  102547. __pyx_t_4 = NULL;
  102548. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
  102549. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
  102550. if (likely(__pyx_t_4)) {
  102551. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
  102552. __Pyx_INCREF(__pyx_t_4);
  102553. __Pyx_INCREF(function);
  102554. __Pyx_DECREF_SET(__pyx_t_5, function);
  102555. }
  102556. }
  102557. __pyx_t_6 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
  102558. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  102559. if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 535, __pyx_L1_error)
  102560. __Pyx_GOTREF(__pyx_t_6);
  102561. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  102562. __pyx_v_pending_calls = __pyx_t_6;
  102563. __pyx_t_6 = 0;
  102564. /* "uvloop/handles/process.pyx":536
  102565. * if self._pending_calls:
  102566. * pending_calls = self._pending_calls.copy()
  102567. * self._pending_calls.clear() # <<<<<<<<<<<<<<
  102568. * for (type, fd, arg) in pending_calls:
  102569. * if type == _CALL_PIPE_CONNECTION_LOST:
  102570. */
  102571. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_pending_calls, __pyx_n_s_clear); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 536, __pyx_L1_error)
  102572. __Pyx_GOTREF(__pyx_t_5);
  102573. __pyx_t_4 = NULL;
  102574. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
  102575. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
  102576. if (likely(__pyx_t_4)) {
  102577. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
  102578. __Pyx_INCREF(__pyx_t_4);
  102579. __Pyx_INCREF(function);
  102580. __Pyx_DECREF_SET(__pyx_t_5, function);
  102581. }
  102582. }
  102583. __pyx_t_6 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
  102584. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  102585. if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 536, __pyx_L1_error)
  102586. __Pyx_GOTREF(__pyx_t_6);
  102587. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  102588. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  102589. /* "uvloop/handles/process.pyx":537
  102590. * pending_calls = self._pending_calls.copy()
  102591. * self._pending_calls.clear()
  102592. * for (type, fd, arg) in pending_calls: # <<<<<<<<<<<<<<
  102593. * if type == _CALL_PIPE_CONNECTION_LOST:
  102594. * self._pipe_connection_lost(fd, arg)
  102595. */
  102596. if (likely(PyList_CheckExact(__pyx_v_pending_calls)) || PyTuple_CheckExact(__pyx_v_pending_calls)) {
  102597. __pyx_t_6 = __pyx_v_pending_calls; __Pyx_INCREF(__pyx_t_6); __pyx_t_22 = 0;
  102598. __pyx_t_23 = NULL;
  102599. } else {
  102600. __pyx_t_22 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_v_pending_calls); if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 537, __pyx_L1_error)
  102601. __Pyx_GOTREF(__pyx_t_6);
  102602. __pyx_t_23 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_23)) __PYX_ERR(6, 537, __pyx_L1_error)
  102603. }
  102604. for (;;) {
  102605. if (likely(!__pyx_t_23)) {
  102606. if (likely(PyList_CheckExact(__pyx_t_6))) {
  102607. if (__pyx_t_22 >= PyList_GET_SIZE(__pyx_t_6)) break;
  102608. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  102609. __pyx_t_5 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_22); __Pyx_INCREF(__pyx_t_5); __pyx_t_22++; if (unlikely(0 < 0)) __PYX_ERR(6, 537, __pyx_L1_error)
  102610. #else
  102611. __pyx_t_5 = PySequence_ITEM(__pyx_t_6, __pyx_t_22); __pyx_t_22++; if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 537, __pyx_L1_error)
  102612. __Pyx_GOTREF(__pyx_t_5);
  102613. #endif
  102614. } else {
  102615. if (__pyx_t_22 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
  102616. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  102617. __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_22); __Pyx_INCREF(__pyx_t_5); __pyx_t_22++; if (unlikely(0 < 0)) __PYX_ERR(6, 537, __pyx_L1_error)
  102618. #else
  102619. __pyx_t_5 = PySequence_ITEM(__pyx_t_6, __pyx_t_22); __pyx_t_22++; if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 537, __pyx_L1_error)
  102620. __Pyx_GOTREF(__pyx_t_5);
  102621. #endif
  102622. }
  102623. } else {
  102624. __pyx_t_5 = __pyx_t_23(__pyx_t_6);
  102625. if (unlikely(!__pyx_t_5)) {
  102626. PyObject* exc_type = PyErr_Occurred();
  102627. if (exc_type) {
  102628. if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
  102629. else __PYX_ERR(6, 537, __pyx_L1_error)
  102630. }
  102631. break;
  102632. }
  102633. __Pyx_GOTREF(__pyx_t_5);
  102634. }
  102635. if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) {
  102636. PyObject* sequence = __pyx_t_5;
  102637. Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
  102638. if (unlikely(size != 3)) {
  102639. if (size > 3) __Pyx_RaiseTooManyValuesError(3);
  102640. else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
  102641. __PYX_ERR(6, 537, __pyx_L1_error)
  102642. }
  102643. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  102644. if (likely(PyTuple_CheckExact(sequence))) {
  102645. __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0);
  102646. __pyx_t_11 = PyTuple_GET_ITEM(sequence, 1);
  102647. __pyx_t_12 = PyTuple_GET_ITEM(sequence, 2);
  102648. } else {
  102649. __pyx_t_4 = PyList_GET_ITEM(sequence, 0);
  102650. __pyx_t_11 = PyList_GET_ITEM(sequence, 1);
  102651. __pyx_t_12 = PyList_GET_ITEM(sequence, 2);
  102652. }
  102653. __Pyx_INCREF(__pyx_t_4);
  102654. __Pyx_INCREF(__pyx_t_11);
  102655. __Pyx_INCREF(__pyx_t_12);
  102656. #else
  102657. __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 537, __pyx_L1_error)
  102658. __Pyx_GOTREF(__pyx_t_4);
  102659. __pyx_t_11 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(6, 537, __pyx_L1_error)
  102660. __Pyx_GOTREF(__pyx_t_11);
  102661. __pyx_t_12 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 537, __pyx_L1_error)
  102662. __Pyx_GOTREF(__pyx_t_12);
  102663. #endif
  102664. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  102665. } else {
  102666. Py_ssize_t index = -1;
  102667. __pyx_t_13 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_13)) __PYX_ERR(6, 537, __pyx_L1_error)
  102668. __Pyx_GOTREF(__pyx_t_13);
  102669. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  102670. __pyx_t_24 = Py_TYPE(__pyx_t_13)->tp_iternext;
  102671. index = 0; __pyx_t_4 = __pyx_t_24(__pyx_t_13); if (unlikely(!__pyx_t_4)) goto __pyx_L29_unpacking_failed;
  102672. __Pyx_GOTREF(__pyx_t_4);
  102673. index = 1; __pyx_t_11 = __pyx_t_24(__pyx_t_13); if (unlikely(!__pyx_t_11)) goto __pyx_L29_unpacking_failed;
  102674. __Pyx_GOTREF(__pyx_t_11);
  102675. index = 2; __pyx_t_12 = __pyx_t_24(__pyx_t_13); if (unlikely(!__pyx_t_12)) goto __pyx_L29_unpacking_failed;
  102676. __Pyx_GOTREF(__pyx_t_12);
  102677. if (__Pyx_IternextUnpackEndCheck(__pyx_t_24(__pyx_t_13), 3) < 0) __PYX_ERR(6, 537, __pyx_L1_error)
  102678. __pyx_t_24 = NULL;
  102679. __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  102680. goto __pyx_L30_unpacking_done;
  102681. __pyx_L29_unpacking_failed:;
  102682. __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  102683. __pyx_t_24 = NULL;
  102684. if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
  102685. __PYX_ERR(6, 537, __pyx_L1_error)
  102686. __pyx_L30_unpacking_done:;
  102687. }
  102688. __Pyx_XDECREF_SET(__pyx_v_type, __pyx_t_4);
  102689. __pyx_t_4 = 0;
  102690. __Pyx_XDECREF_SET(__pyx_v_fd, __pyx_t_11);
  102691. __pyx_t_11 = 0;
  102692. __Pyx_XDECREF_SET(__pyx_v_arg, __pyx_t_12);
  102693. __pyx_t_12 = 0;
  102694. /* "uvloop/handles/process.pyx":538
  102695. * self._pending_calls.clear()
  102696. * for (type, fd, arg) in pending_calls:
  102697. * if type == _CALL_PIPE_CONNECTION_LOST: # <<<<<<<<<<<<<<
  102698. * self._pipe_connection_lost(fd, arg)
  102699. * elif type == _CALL_PIPE_DATA_RECEIVED:
  102700. */
  102701. __pyx_t_5 = __Pyx_PyInt_EqObjC(__pyx_v_type, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 538, __pyx_L1_error)
  102702. __Pyx_GOTREF(__pyx_t_5);
  102703. __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(6, 538, __pyx_L1_error)
  102704. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  102705. if (__pyx_t_7) {
  102706. /* "uvloop/handles/process.pyx":539
  102707. * for (type, fd, arg) in pending_calls:
  102708. * if type == _CALL_PIPE_CONNECTION_LOST:
  102709. * self._pipe_connection_lost(fd, arg) # <<<<<<<<<<<<<<
  102710. * elif type == _CALL_PIPE_DATA_RECEIVED:
  102711. * self._pipe_data_received(fd, arg)
  102712. */
  102713. __pyx_t_14 = __Pyx_PyInt_As_int(__pyx_v_fd); if (unlikely((__pyx_t_14 == (int)-1) && PyErr_Occurred())) __PYX_ERR(6, 539, __pyx_L1_error)
  102714. __pyx_t_5 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcessTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_pipe_connection_lost(__pyx_v_self, __pyx_t_14, __pyx_v_arg); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 539, __pyx_L1_error)
  102715. __Pyx_GOTREF(__pyx_t_5);
  102716. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  102717. /* "uvloop/handles/process.pyx":538
  102718. * self._pending_calls.clear()
  102719. * for (type, fd, arg) in pending_calls:
  102720. * if type == _CALL_PIPE_CONNECTION_LOST: # <<<<<<<<<<<<<<
  102721. * self._pipe_connection_lost(fd, arg)
  102722. * elif type == _CALL_PIPE_DATA_RECEIVED:
  102723. */
  102724. goto __pyx_L31;
  102725. }
  102726. /* "uvloop/handles/process.pyx":540
  102727. * if type == _CALL_PIPE_CONNECTION_LOST:
  102728. * self._pipe_connection_lost(fd, arg)
  102729. * elif type == _CALL_PIPE_DATA_RECEIVED: # <<<<<<<<<<<<<<
  102730. * self._pipe_data_received(fd, arg)
  102731. * elif type == _CALL_PROCESS_EXITED:
  102732. */
  102733. __pyx_t_5 = __Pyx_PyInt_EqObjC(__pyx_v_type, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 540, __pyx_L1_error)
  102734. __Pyx_GOTREF(__pyx_t_5);
  102735. __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(6, 540, __pyx_L1_error)
  102736. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  102737. if (__pyx_t_7) {
  102738. /* "uvloop/handles/process.pyx":541
  102739. * self._pipe_connection_lost(fd, arg)
  102740. * elif type == _CALL_PIPE_DATA_RECEIVED:
  102741. * self._pipe_data_received(fd, arg) # <<<<<<<<<<<<<<
  102742. * elif type == _CALL_PROCESS_EXITED:
  102743. * self._loop.call_soon(self._protocol.process_exited)
  102744. */
  102745. __pyx_t_14 = __Pyx_PyInt_As_int(__pyx_v_fd); if (unlikely((__pyx_t_14 == (int)-1) && PyErr_Occurred())) __PYX_ERR(6, 541, __pyx_L1_error)
  102746. __pyx_t_5 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcessTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_pipe_data_received(__pyx_v_self, __pyx_t_14, __pyx_v_arg); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 541, __pyx_L1_error)
  102747. __Pyx_GOTREF(__pyx_t_5);
  102748. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  102749. /* "uvloop/handles/process.pyx":540
  102750. * if type == _CALL_PIPE_CONNECTION_LOST:
  102751. * self._pipe_connection_lost(fd, arg)
  102752. * elif type == _CALL_PIPE_DATA_RECEIVED: # <<<<<<<<<<<<<<
  102753. * self._pipe_data_received(fd, arg)
  102754. * elif type == _CALL_PROCESS_EXITED:
  102755. */
  102756. goto __pyx_L31;
  102757. }
  102758. /* "uvloop/handles/process.pyx":542
  102759. * elif type == _CALL_PIPE_DATA_RECEIVED:
  102760. * self._pipe_data_received(fd, arg)
  102761. * elif type == _CALL_PROCESS_EXITED: # <<<<<<<<<<<<<<
  102762. * self._loop.call_soon(self._protocol.process_exited)
  102763. * elif type == _CALL_CONNECTION_LOST:
  102764. */
  102765. __pyx_t_5 = __Pyx_PyInt_EqObjC(__pyx_v_type, __pyx_int_2, 2, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 542, __pyx_L1_error)
  102766. __Pyx_GOTREF(__pyx_t_5);
  102767. __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(6, 542, __pyx_L1_error)
  102768. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  102769. if (__pyx_t_7) {
  102770. /* "uvloop/handles/process.pyx":543
  102771. * self._pipe_data_received(fd, arg)
  102772. * elif type == _CALL_PROCESS_EXITED:
  102773. * self._loop.call_soon(self._protocol.process_exited) # <<<<<<<<<<<<<<
  102774. * elif type == _CALL_CONNECTION_LOST:
  102775. * self._loop.call_soon(self._protocol.connection_lost, None)
  102776. */
  102777. __pyx_t_12 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._loop), __pyx_n_s_call_soon); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 543, __pyx_L1_error)
  102778. __Pyx_GOTREF(__pyx_t_12);
  102779. __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_protocol, __pyx_n_s_process_exited); if (unlikely(!__pyx_t_11)) __PYX_ERR(6, 543, __pyx_L1_error)
  102780. __Pyx_GOTREF(__pyx_t_11);
  102781. __pyx_t_4 = NULL;
  102782. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_12))) {
  102783. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_12);
  102784. if (likely(__pyx_t_4)) {
  102785. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
  102786. __Pyx_INCREF(__pyx_t_4);
  102787. __Pyx_INCREF(function);
  102788. __Pyx_DECREF_SET(__pyx_t_12, function);
  102789. }
  102790. }
  102791. __pyx_t_5 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_12, __pyx_t_4, __pyx_t_11) : __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_11);
  102792. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  102793. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  102794. if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 543, __pyx_L1_error)
  102795. __Pyx_GOTREF(__pyx_t_5);
  102796. __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  102797. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  102798. /* "uvloop/handles/process.pyx":542
  102799. * elif type == _CALL_PIPE_DATA_RECEIVED:
  102800. * self._pipe_data_received(fd, arg)
  102801. * elif type == _CALL_PROCESS_EXITED: # <<<<<<<<<<<<<<
  102802. * self._loop.call_soon(self._protocol.process_exited)
  102803. * elif type == _CALL_CONNECTION_LOST:
  102804. */
  102805. goto __pyx_L31;
  102806. }
  102807. /* "uvloop/handles/process.pyx":544
  102808. * elif type == _CALL_PROCESS_EXITED:
  102809. * self._loop.call_soon(self._protocol.process_exited)
  102810. * elif type == _CALL_CONNECTION_LOST: # <<<<<<<<<<<<<<
  102811. * self._loop.call_soon(self._protocol.connection_lost, None)
  102812. *
  102813. */
  102814. __pyx_t_5 = __Pyx_PyInt_EqObjC(__pyx_v_type, __pyx_int_3, 3, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 544, __pyx_L1_error)
  102815. __Pyx_GOTREF(__pyx_t_5);
  102816. __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(6, 544, __pyx_L1_error)
  102817. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  102818. if (__pyx_t_7) {
  102819. /* "uvloop/handles/process.pyx":545
  102820. * self._loop.call_soon(self._protocol.process_exited)
  102821. * elif type == _CALL_CONNECTION_LOST:
  102822. * self._loop.call_soon(self._protocol.connection_lost, None) # <<<<<<<<<<<<<<
  102823. *
  102824. * cdef _try_finish(self):
  102825. */
  102826. __pyx_t_12 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._loop), __pyx_n_s_call_soon); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 545, __pyx_L1_error)
  102827. __Pyx_GOTREF(__pyx_t_12);
  102828. __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_protocol, __pyx_n_s_connection_lost); if (unlikely(!__pyx_t_11)) __PYX_ERR(6, 545, __pyx_L1_error)
  102829. __Pyx_GOTREF(__pyx_t_11);
  102830. __pyx_t_4 = NULL;
  102831. __pyx_t_14 = 0;
  102832. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_12))) {
  102833. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_12);
  102834. if (likely(__pyx_t_4)) {
  102835. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
  102836. __Pyx_INCREF(__pyx_t_4);
  102837. __Pyx_INCREF(function);
  102838. __Pyx_DECREF_SET(__pyx_t_12, function);
  102839. __pyx_t_14 = 1;
  102840. }
  102841. }
  102842. #if CYTHON_FAST_PYCALL
  102843. if (PyFunction_Check(__pyx_t_12)) {
  102844. PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_11, Py_None};
  102845. __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 545, __pyx_L1_error)
  102846. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  102847. __Pyx_GOTREF(__pyx_t_5);
  102848. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  102849. } else
  102850. #endif
  102851. #if CYTHON_FAST_PYCCALL
  102852. if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
  102853. PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_11, Py_None};
  102854. __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 545, __pyx_L1_error)
  102855. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  102856. __Pyx_GOTREF(__pyx_t_5);
  102857. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  102858. } else
  102859. #endif
  102860. {
  102861. __pyx_t_13 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_13)) __PYX_ERR(6, 545, __pyx_L1_error)
  102862. __Pyx_GOTREF(__pyx_t_13);
  102863. if (__pyx_t_4) {
  102864. __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_4); __pyx_t_4 = NULL;
  102865. }
  102866. __Pyx_GIVEREF(__pyx_t_11);
  102867. PyTuple_SET_ITEM(__pyx_t_13, 0+__pyx_t_14, __pyx_t_11);
  102868. __Pyx_INCREF(Py_None);
  102869. __Pyx_GIVEREF(Py_None);
  102870. PyTuple_SET_ITEM(__pyx_t_13, 1+__pyx_t_14, Py_None);
  102871. __pyx_t_11 = 0;
  102872. __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_13, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 545, __pyx_L1_error)
  102873. __Pyx_GOTREF(__pyx_t_5);
  102874. __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  102875. }
  102876. __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  102877. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  102878. /* "uvloop/handles/process.pyx":544
  102879. * elif type == _CALL_PROCESS_EXITED:
  102880. * self._loop.call_soon(self._protocol.process_exited)
  102881. * elif type == _CALL_CONNECTION_LOST: # <<<<<<<<<<<<<<
  102882. * self._loop.call_soon(self._protocol.connection_lost, None)
  102883. *
  102884. */
  102885. }
  102886. __pyx_L31:;
  102887. /* "uvloop/handles/process.pyx":537
  102888. * pending_calls = self._pending_calls.copy()
  102889. * self._pending_calls.clear()
  102890. * for (type, fd, arg) in pending_calls: # <<<<<<<<<<<<<<
  102891. * if type == _CALL_PIPE_CONNECTION_LOST:
  102892. * self._pipe_connection_lost(fd, arg)
  102893. */
  102894. }
  102895. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  102896. /* "uvloop/handles/process.pyx":534
  102897. *
  102898. * self._stdio_ready = 1
  102899. * if self._pending_calls: # <<<<<<<<<<<<<<
  102900. * pending_calls = self._pending_calls.copy()
  102901. * self._pending_calls.clear()
  102902. */
  102903. }
  102904. /* "uvloop/handles/process.pyx":521
  102905. * iocnt.flags = uv.UV_IGNORE
  102906. *
  102907. * cdef _call_connection_made(self, waiter): # <<<<<<<<<<<<<<
  102908. * try:
  102909. * self._protocol.connection_made(self)
  102910. */
  102911. /* function exit code */
  102912. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  102913. goto __pyx_L0;
  102914. __pyx_L1_error:;
  102915. __Pyx_XDECREF(__pyx_t_4);
  102916. __Pyx_XDECREF(__pyx_t_5);
  102917. __Pyx_XDECREF(__pyx_t_6);
  102918. __Pyx_XDECREF(__pyx_t_11);
  102919. __Pyx_XDECREF(__pyx_t_12);
  102920. __Pyx_XDECREF(__pyx_t_13);
  102921. __Pyx_AddTraceback("uvloop.loop.UVProcessTransport._call_connection_made", __pyx_clineno, __pyx_lineno, __pyx_filename);
  102922. __pyx_r = 0;
  102923. __pyx_L0:;
  102924. __Pyx_XDECREF(__pyx_v_ex);
  102925. __Pyx_XDECREF(__pyx_v_pending_calls);
  102926. __Pyx_XDECREF(__pyx_v_type);
  102927. __Pyx_XDECREF(__pyx_v_fd);
  102928. __Pyx_XDECREF(__pyx_v_arg);
  102929. __Pyx_XGIVEREF(__pyx_r);
  102930. __Pyx_RefNannyFinishContext();
  102931. return __pyx_r;
  102932. }
  102933. /* "uvloop/handles/process.pyx":547
  102934. * self._loop.call_soon(self._protocol.connection_lost, None)
  102935. *
  102936. * cdef _try_finish(self): # <<<<<<<<<<<<<<
  102937. * if self._returncode is None or self._finished:
  102938. * return
  102939. */
  102940. static PyObject *__pyx_f_6uvloop_4loop_18UVProcessTransport__try_finish(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self) {
  102941. PyObject *__pyx_r = NULL;
  102942. __Pyx_RefNannyDeclarations
  102943. int __pyx_t_1;
  102944. int __pyx_t_2;
  102945. int __pyx_t_3;
  102946. PyObject *__pyx_t_4 = NULL;
  102947. PyObject *__pyx_t_5 = NULL;
  102948. PyObject *__pyx_t_6 = NULL;
  102949. PyObject *__pyx_t_7 = NULL;
  102950. int __pyx_t_8;
  102951. PyObject *__pyx_t_9 = NULL;
  102952. int __pyx_t_10;
  102953. __Pyx_RefNannySetupContext("_try_finish", 0);
  102954. /* "uvloop/handles/process.pyx":548
  102955. *
  102956. * cdef _try_finish(self):
  102957. * if self._returncode is None or self._finished: # <<<<<<<<<<<<<<
  102958. * return
  102959. *
  102960. */
  102961. __pyx_t_2 = (__pyx_v_self->__pyx_base._returncode == Py_None);
  102962. __pyx_t_3 = (__pyx_t_2 != 0);
  102963. if (!__pyx_t_3) {
  102964. } else {
  102965. __pyx_t_1 = __pyx_t_3;
  102966. goto __pyx_L4_bool_binop_done;
  102967. }
  102968. __pyx_t_3 = (__pyx_v_self->_finished != 0);
  102969. __pyx_t_1 = __pyx_t_3;
  102970. __pyx_L4_bool_binop_done:;
  102971. if (__pyx_t_1) {
  102972. /* "uvloop/handles/process.pyx":549
  102973. * cdef _try_finish(self):
  102974. * if self._returncode is None or self._finished:
  102975. * return # <<<<<<<<<<<<<<
  102976. *
  102977. * if ((self.stdin_proto is None or self.stdin_proto.disconnected) and
  102978. */
  102979. __Pyx_XDECREF(__pyx_r);
  102980. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  102981. goto __pyx_L0;
  102982. /* "uvloop/handles/process.pyx":548
  102983. *
  102984. * cdef _try_finish(self):
  102985. * if self._returncode is None or self._finished: # <<<<<<<<<<<<<<
  102986. * return
  102987. *
  102988. */
  102989. }
  102990. /* "uvloop/handles/process.pyx":551
  102991. * return
  102992. *
  102993. * if ((self.stdin_proto is None or self.stdin_proto.disconnected) and # <<<<<<<<<<<<<<
  102994. * (self.stdout_proto is None or
  102995. * self.stdout_proto.disconnected) and
  102996. */
  102997. __pyx_t_3 = (__pyx_v_self->stdin_proto == Py_None);
  102998. __pyx_t_2 = (__pyx_t_3 != 0);
  102999. if (!__pyx_t_2) {
  103000. } else {
  103001. goto __pyx_L8_next_and;
  103002. }
  103003. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->stdin_proto, __pyx_n_s_disconnected); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 551, __pyx_L1_error)
  103004. __Pyx_GOTREF(__pyx_t_4);
  103005. __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(6, 551, __pyx_L1_error)
  103006. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  103007. if (__pyx_t_2) {
  103008. } else {
  103009. __pyx_t_1 = __pyx_t_2;
  103010. goto __pyx_L7_bool_binop_done;
  103011. }
  103012. __pyx_L8_next_and:;
  103013. /* "uvloop/handles/process.pyx":552
  103014. *
  103015. * if ((self.stdin_proto is None or self.stdin_proto.disconnected) and
  103016. * (self.stdout_proto is None or # <<<<<<<<<<<<<<
  103017. * self.stdout_proto.disconnected) and
  103018. * (self.stderr_proto is None or
  103019. */
  103020. __pyx_t_2 = (__pyx_v_self->stdout_proto == Py_None);
  103021. __pyx_t_3 = (__pyx_t_2 != 0);
  103022. if (!__pyx_t_3) {
  103023. } else {
  103024. goto __pyx_L10_next_and;
  103025. }
  103026. /* "uvloop/handles/process.pyx":553
  103027. * if ((self.stdin_proto is None or self.stdin_proto.disconnected) and
  103028. * (self.stdout_proto is None or
  103029. * self.stdout_proto.disconnected) and # <<<<<<<<<<<<<<
  103030. * (self.stderr_proto is None or
  103031. * self.stderr_proto.disconnected)):
  103032. */
  103033. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->stdout_proto, __pyx_n_s_disconnected); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 553, __pyx_L1_error)
  103034. __Pyx_GOTREF(__pyx_t_4);
  103035. __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(6, 553, __pyx_L1_error)
  103036. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  103037. if (__pyx_t_3) {
  103038. } else {
  103039. __pyx_t_1 = __pyx_t_3;
  103040. goto __pyx_L7_bool_binop_done;
  103041. }
  103042. __pyx_L10_next_and:;
  103043. /* "uvloop/handles/process.pyx":554
  103044. * (self.stdout_proto is None or
  103045. * self.stdout_proto.disconnected) and
  103046. * (self.stderr_proto is None or # <<<<<<<<<<<<<<
  103047. * self.stderr_proto.disconnected)):
  103048. *
  103049. */
  103050. __pyx_t_3 = (__pyx_v_self->stderr_proto == Py_None);
  103051. __pyx_t_2 = (__pyx_t_3 != 0);
  103052. if (!__pyx_t_2) {
  103053. } else {
  103054. __pyx_t_1 = __pyx_t_2;
  103055. goto __pyx_L7_bool_binop_done;
  103056. }
  103057. /* "uvloop/handles/process.pyx":555
  103058. * self.stdout_proto.disconnected) and
  103059. * (self.stderr_proto is None or
  103060. * self.stderr_proto.disconnected)): # <<<<<<<<<<<<<<
  103061. *
  103062. * self._finished = 1
  103063. */
  103064. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->stderr_proto, __pyx_n_s_disconnected); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 555, __pyx_L1_error)
  103065. __Pyx_GOTREF(__pyx_t_4);
  103066. __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(6, 555, __pyx_L1_error)
  103067. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  103068. __pyx_t_1 = __pyx_t_2;
  103069. __pyx_L7_bool_binop_done:;
  103070. /* "uvloop/handles/process.pyx":551
  103071. * return
  103072. *
  103073. * if ((self.stdin_proto is None or self.stdin_proto.disconnected) and # <<<<<<<<<<<<<<
  103074. * (self.stdout_proto is None or
  103075. * self.stdout_proto.disconnected) and
  103076. */
  103077. if (__pyx_t_1) {
  103078. /* "uvloop/handles/process.pyx":557
  103079. * self.stderr_proto.disconnected)):
  103080. *
  103081. * self._finished = 1 # <<<<<<<<<<<<<<
  103082. *
  103083. * if self._stdio_ready:
  103084. */
  103085. __pyx_v_self->_finished = 1;
  103086. /* "uvloop/handles/process.pyx":559
  103087. * self._finished = 1
  103088. *
  103089. * if self._stdio_ready: # <<<<<<<<<<<<<<
  103090. * self._loop.call_soon(self._protocol.connection_lost, None)
  103091. * else:
  103092. */
  103093. __pyx_t_1 = (__pyx_v_self->_stdio_ready != 0);
  103094. if (__pyx_t_1) {
  103095. /* "uvloop/handles/process.pyx":560
  103096. *
  103097. * if self._stdio_ready:
  103098. * self._loop.call_soon(self._protocol.connection_lost, None) # <<<<<<<<<<<<<<
  103099. * else:
  103100. * self._pending_calls.append((_CALL_CONNECTION_LOST, None, None))
  103101. */
  103102. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._loop), __pyx_n_s_call_soon); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 560, __pyx_L1_error)
  103103. __Pyx_GOTREF(__pyx_t_5);
  103104. __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_protocol, __pyx_n_s_connection_lost); if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 560, __pyx_L1_error)
  103105. __Pyx_GOTREF(__pyx_t_6);
  103106. __pyx_t_7 = NULL;
  103107. __pyx_t_8 = 0;
  103108. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
  103109. __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
  103110. if (likely(__pyx_t_7)) {
  103111. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
  103112. __Pyx_INCREF(__pyx_t_7);
  103113. __Pyx_INCREF(function);
  103114. __Pyx_DECREF_SET(__pyx_t_5, function);
  103115. __pyx_t_8 = 1;
  103116. }
  103117. }
  103118. #if CYTHON_FAST_PYCALL
  103119. if (PyFunction_Check(__pyx_t_5)) {
  103120. PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_6, Py_None};
  103121. __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 560, __pyx_L1_error)
  103122. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  103123. __Pyx_GOTREF(__pyx_t_4);
  103124. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  103125. } else
  103126. #endif
  103127. #if CYTHON_FAST_PYCCALL
  103128. if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
  103129. PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_6, Py_None};
  103130. __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 560, __pyx_L1_error)
  103131. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  103132. __Pyx_GOTREF(__pyx_t_4);
  103133. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  103134. } else
  103135. #endif
  103136. {
  103137. __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(6, 560, __pyx_L1_error)
  103138. __Pyx_GOTREF(__pyx_t_9);
  103139. if (__pyx_t_7) {
  103140. __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
  103141. }
  103142. __Pyx_GIVEREF(__pyx_t_6);
  103143. PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_6);
  103144. __Pyx_INCREF(Py_None);
  103145. __Pyx_GIVEREF(Py_None);
  103146. PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, Py_None);
  103147. __pyx_t_6 = 0;
  103148. __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 560, __pyx_L1_error)
  103149. __Pyx_GOTREF(__pyx_t_4);
  103150. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  103151. }
  103152. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  103153. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  103154. /* "uvloop/handles/process.pyx":559
  103155. * self._finished = 1
  103156. *
  103157. * if self._stdio_ready: # <<<<<<<<<<<<<<
  103158. * self._loop.call_soon(self._protocol.connection_lost, None)
  103159. * else:
  103160. */
  103161. goto __pyx_L13;
  103162. }
  103163. /* "uvloop/handles/process.pyx":562
  103164. * self._loop.call_soon(self._protocol.connection_lost, None)
  103165. * else:
  103166. * self._pending_calls.append((_CALL_CONNECTION_LOST, None, None)) # <<<<<<<<<<<<<<
  103167. *
  103168. * def __stdio_inited(self, waiter, stdio_fut):
  103169. */
  103170. /*else*/ {
  103171. if (unlikely(__pyx_v_self->_pending_calls == Py_None)) {
  103172. PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append");
  103173. __PYX_ERR(6, 562, __pyx_L1_error)
  103174. }
  103175. __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_self->_pending_calls, __pyx_tuple__178); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(6, 562, __pyx_L1_error)
  103176. }
  103177. __pyx_L13:;
  103178. /* "uvloop/handles/process.pyx":551
  103179. * return
  103180. *
  103181. * if ((self.stdin_proto is None or self.stdin_proto.disconnected) and # <<<<<<<<<<<<<<
  103182. * (self.stdout_proto is None or
  103183. * self.stdout_proto.disconnected) and
  103184. */
  103185. }
  103186. /* "uvloop/handles/process.pyx":547
  103187. * self._loop.call_soon(self._protocol.connection_lost, None)
  103188. *
  103189. * cdef _try_finish(self): # <<<<<<<<<<<<<<
  103190. * if self._returncode is None or self._finished:
  103191. * return
  103192. */
  103193. /* function exit code */
  103194. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  103195. goto __pyx_L0;
  103196. __pyx_L1_error:;
  103197. __Pyx_XDECREF(__pyx_t_4);
  103198. __Pyx_XDECREF(__pyx_t_5);
  103199. __Pyx_XDECREF(__pyx_t_6);
  103200. __Pyx_XDECREF(__pyx_t_7);
  103201. __Pyx_XDECREF(__pyx_t_9);
  103202. __Pyx_AddTraceback("uvloop.loop.UVProcessTransport._try_finish", __pyx_clineno, __pyx_lineno, __pyx_filename);
  103203. __pyx_r = 0;
  103204. __pyx_L0:;
  103205. __Pyx_XGIVEREF(__pyx_r);
  103206. __Pyx_RefNannyFinishContext();
  103207. return __pyx_r;
  103208. }
  103209. /* "uvloop/handles/process.pyx":564
  103210. * self._pending_calls.append((_CALL_CONNECTION_LOST, None, None))
  103211. *
  103212. * def __stdio_inited(self, waiter, stdio_fut): # <<<<<<<<<<<<<<
  103213. * exc = stdio_fut.exception()
  103214. * if exc is not None:
  103215. */
  103216. /* Python wrapper */
  103217. static PyObject *__pyx_pw_6uvloop_4loop_18UVProcessTransport_3__stdio_inited(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  103218. static char __pyx_doc_6uvloop_4loop_18UVProcessTransport_2__stdio_inited[] = "UVProcessTransport.__stdio_inited(self, waiter, stdio_fut)";
  103219. static PyObject *__pyx_pw_6uvloop_4loop_18UVProcessTransport_3__stdio_inited(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  103220. PyObject *__pyx_v_waiter = 0;
  103221. PyObject *__pyx_v_stdio_fut = 0;
  103222. PyObject *__pyx_r = 0;
  103223. __Pyx_RefNannyDeclarations
  103224. __Pyx_RefNannySetupContext("__stdio_inited (wrapper)", 0);
  103225. {
  103226. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_waiter,&__pyx_n_s_stdio_fut,0};
  103227. PyObject* values[2] = {0,0};
  103228. if (unlikely(__pyx_kwds)) {
  103229. Py_ssize_t kw_args;
  103230. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  103231. switch (pos_args) {
  103232. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  103233. CYTHON_FALLTHROUGH;
  103234. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  103235. CYTHON_FALLTHROUGH;
  103236. case 0: break;
  103237. default: goto __pyx_L5_argtuple_error;
  103238. }
  103239. kw_args = PyDict_Size(__pyx_kwds);
  103240. switch (pos_args) {
  103241. case 0:
  103242. if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_waiter)) != 0)) kw_args--;
  103243. else goto __pyx_L5_argtuple_error;
  103244. CYTHON_FALLTHROUGH;
  103245. case 1:
  103246. if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_stdio_fut)) != 0)) kw_args--;
  103247. else {
  103248. __Pyx_RaiseArgtupleInvalid("__stdio_inited", 1, 2, 2, 1); __PYX_ERR(6, 564, __pyx_L3_error)
  103249. }
  103250. }
  103251. if (unlikely(kw_args > 0)) {
  103252. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__stdio_inited") < 0)) __PYX_ERR(6, 564, __pyx_L3_error)
  103253. }
  103254. } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
  103255. goto __pyx_L5_argtuple_error;
  103256. } else {
  103257. values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  103258. values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  103259. }
  103260. __pyx_v_waiter = values[0];
  103261. __pyx_v_stdio_fut = values[1];
  103262. }
  103263. goto __pyx_L4_argument_unpacking_done;
  103264. __pyx_L5_argtuple_error:;
  103265. __Pyx_RaiseArgtupleInvalid("__stdio_inited", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(6, 564, __pyx_L3_error)
  103266. __pyx_L3_error:;
  103267. __Pyx_AddTraceback("uvloop.loop.UVProcessTransport.__stdio_inited", __pyx_clineno, __pyx_lineno, __pyx_filename);
  103268. __Pyx_RefNannyFinishContext();
  103269. return NULL;
  103270. __pyx_L4_argument_unpacking_done:;
  103271. __pyx_r = __pyx_pf_6uvloop_4loop_18UVProcessTransport_2__stdio_inited(((struct __pyx_obj_6uvloop_4loop_UVProcessTransport *)__pyx_v_self), __pyx_v_waiter, __pyx_v_stdio_fut);
  103272. /* function exit code */
  103273. __Pyx_RefNannyFinishContext();
  103274. return __pyx_r;
  103275. }
  103276. static PyObject *__pyx_pf_6uvloop_4loop_18UVProcessTransport_2__stdio_inited(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self, PyObject *__pyx_v_waiter, PyObject *__pyx_v_stdio_fut) {
  103277. PyObject *__pyx_v_exc = NULL;
  103278. PyObject *__pyx_r = NULL;
  103279. __Pyx_RefNannyDeclarations
  103280. PyObject *__pyx_t_1 = NULL;
  103281. PyObject *__pyx_t_2 = NULL;
  103282. PyObject *__pyx_t_3 = NULL;
  103283. int __pyx_t_4;
  103284. int __pyx_t_5;
  103285. __Pyx_RefNannySetupContext("__stdio_inited", 0);
  103286. /* "uvloop/handles/process.pyx":565
  103287. *
  103288. * def __stdio_inited(self, waiter, stdio_fut):
  103289. * exc = stdio_fut.exception() # <<<<<<<<<<<<<<
  103290. * if exc is not None:
  103291. * if waiter is None:
  103292. */
  103293. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_stdio_fut, __pyx_n_s_exception); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 565, __pyx_L1_error)
  103294. __Pyx_GOTREF(__pyx_t_2);
  103295. __pyx_t_3 = NULL;
  103296. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
  103297. __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
  103298. if (likely(__pyx_t_3)) {
  103299. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  103300. __Pyx_INCREF(__pyx_t_3);
  103301. __Pyx_INCREF(function);
  103302. __Pyx_DECREF_SET(__pyx_t_2, function);
  103303. }
  103304. }
  103305. __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  103306. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  103307. if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 565, __pyx_L1_error)
  103308. __Pyx_GOTREF(__pyx_t_1);
  103309. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  103310. __pyx_v_exc = __pyx_t_1;
  103311. __pyx_t_1 = 0;
  103312. /* "uvloop/handles/process.pyx":566
  103313. * def __stdio_inited(self, waiter, stdio_fut):
  103314. * exc = stdio_fut.exception()
  103315. * if exc is not None: # <<<<<<<<<<<<<<
  103316. * if waiter is None:
  103317. * raise exc
  103318. */
  103319. __pyx_t_4 = (__pyx_v_exc != Py_None);
  103320. __pyx_t_5 = (__pyx_t_4 != 0);
  103321. if (__pyx_t_5) {
  103322. /* "uvloop/handles/process.pyx":567
  103323. * exc = stdio_fut.exception()
  103324. * if exc is not None:
  103325. * if waiter is None: # <<<<<<<<<<<<<<
  103326. * raise exc
  103327. * else:
  103328. */
  103329. __pyx_t_5 = (__pyx_v_waiter == Py_None);
  103330. __pyx_t_4 = (__pyx_t_5 != 0);
  103331. if (unlikely(__pyx_t_4)) {
  103332. /* "uvloop/handles/process.pyx":568
  103333. * if exc is not None:
  103334. * if waiter is None:
  103335. * raise exc # <<<<<<<<<<<<<<
  103336. * else:
  103337. * waiter.set_exception(exc)
  103338. */
  103339. __Pyx_Raise(__pyx_v_exc, 0, 0, 0);
  103340. __PYX_ERR(6, 568, __pyx_L1_error)
  103341. /* "uvloop/handles/process.pyx":567
  103342. * exc = stdio_fut.exception()
  103343. * if exc is not None:
  103344. * if waiter is None: # <<<<<<<<<<<<<<
  103345. * raise exc
  103346. * else:
  103347. */
  103348. }
  103349. /* "uvloop/handles/process.pyx":570
  103350. * raise exc
  103351. * else:
  103352. * waiter.set_exception(exc) # <<<<<<<<<<<<<<
  103353. * else:
  103354. * self._loop._call_soon_handle(
  103355. */
  103356. /*else*/ {
  103357. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_waiter, __pyx_n_s_set_exception); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 570, __pyx_L1_error)
  103358. __Pyx_GOTREF(__pyx_t_2);
  103359. __pyx_t_3 = NULL;
  103360. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
  103361. __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
  103362. if (likely(__pyx_t_3)) {
  103363. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  103364. __Pyx_INCREF(__pyx_t_3);
  103365. __Pyx_INCREF(function);
  103366. __Pyx_DECREF_SET(__pyx_t_2, function);
  103367. }
  103368. }
  103369. __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_exc) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_exc);
  103370. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  103371. if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 570, __pyx_L1_error)
  103372. __Pyx_GOTREF(__pyx_t_1);
  103373. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  103374. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  103375. }
  103376. /* "uvloop/handles/process.pyx":566
  103377. * def __stdio_inited(self, waiter, stdio_fut):
  103378. * exc = stdio_fut.exception()
  103379. * if exc is not None: # <<<<<<<<<<<<<<
  103380. * if waiter is None:
  103381. * raise exc
  103382. */
  103383. goto __pyx_L3;
  103384. }
  103385. /* "uvloop/handles/process.pyx":572
  103386. * waiter.set_exception(exc)
  103387. * else:
  103388. * self._loop._call_soon_handle( # <<<<<<<<<<<<<<
  103389. * new_MethodHandle1(self._loop,
  103390. * "UVProcessTransport._call_connection_made",
  103391. */
  103392. /*else*/ {
  103393. /* "uvloop/handles/process.pyx":573
  103394. * else:
  103395. * self._loop._call_soon_handle(
  103396. * new_MethodHandle1(self._loop, # <<<<<<<<<<<<<<
  103397. * "UVProcessTransport._call_connection_made",
  103398. * <method1_t>self._call_connection_made,
  103399. */
  103400. __pyx_t_1 = ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._loop);
  103401. __Pyx_INCREF(__pyx_t_1);
  103402. /* "uvloop/handles/process.pyx":576
  103403. * "UVProcessTransport._call_connection_made",
  103404. * <method1_t>self._call_connection_made,
  103405. * self, waiter)) # <<<<<<<<<<<<<<
  103406. *
  103407. * @staticmethod
  103408. */
  103409. __pyx_t_2 = __pyx_f_6uvloop_4loop_new_MethodHandle1(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_t_1), __pyx_kp_u_UVProcessTransport__call_connect, ((__pyx_t_6uvloop_4loop_method1_t)((struct __pyx_vtabstruct_6uvloop_4loop_UVProcessTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_call_connection_made), ((PyObject *)__pyx_v_self), __pyx_v_waiter); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 573, __pyx_L1_error)
  103410. __Pyx_GOTREF(__pyx_t_2);
  103411. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  103412. /* "uvloop/handles/process.pyx":573
  103413. * else:
  103414. * self._loop._call_soon_handle(
  103415. * new_MethodHandle1(self._loop, # <<<<<<<<<<<<<<
  103416. * "UVProcessTransport._call_connection_made",
  103417. * <method1_t>self._call_connection_made,
  103418. */
  103419. if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_6uvloop_4loop_Handle))))) __PYX_ERR(6, 573, __pyx_L1_error)
  103420. /* "uvloop/handles/process.pyx":572
  103421. * waiter.set_exception(exc)
  103422. * else:
  103423. * self._loop._call_soon_handle( # <<<<<<<<<<<<<<
  103424. * new_MethodHandle1(self._loop,
  103425. * "UVProcessTransport._call_connection_made",
  103426. */
  103427. __pyx_t_1 = __pyx_f_6uvloop_4loop_4Loop__call_soon_handle(__pyx_v_self->__pyx_base.__pyx_base._loop, ((struct __pyx_obj_6uvloop_4loop_Handle *)__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 572, __pyx_L1_error)
  103428. __Pyx_GOTREF(__pyx_t_1);
  103429. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  103430. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  103431. }
  103432. __pyx_L3:;
  103433. /* "uvloop/handles/process.pyx":564
  103434. * self._pending_calls.append((_CALL_CONNECTION_LOST, None, None))
  103435. *
  103436. * def __stdio_inited(self, waiter, stdio_fut): # <<<<<<<<<<<<<<
  103437. * exc = stdio_fut.exception()
  103438. * if exc is not None:
  103439. */
  103440. /* function exit code */
  103441. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  103442. goto __pyx_L0;
  103443. __pyx_L1_error:;
  103444. __Pyx_XDECREF(__pyx_t_1);
  103445. __Pyx_XDECREF(__pyx_t_2);
  103446. __Pyx_XDECREF(__pyx_t_3);
  103447. __Pyx_AddTraceback("uvloop.loop.UVProcessTransport.__stdio_inited", __pyx_clineno, __pyx_lineno, __pyx_filename);
  103448. __pyx_r = NULL;
  103449. __pyx_L0:;
  103450. __Pyx_XDECREF(__pyx_v_exc);
  103451. __Pyx_XGIVEREF(__pyx_r);
  103452. __Pyx_RefNannyFinishContext();
  103453. return __pyx_r;
  103454. }
  103455. /* "uvloop/handles/process.pyx":579
  103456. *
  103457. * @staticmethod
  103458. * cdef UVProcessTransport new(Loop loop, protocol, args, env, # <<<<<<<<<<<<<<
  103459. * cwd, start_new_session,
  103460. * _stdin, _stdout, _stderr, pass_fds,
  103461. */
  103462. static struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_f_6uvloop_4loop_18UVProcessTransport_new(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, PyObject *__pyx_v_protocol, PyObject *__pyx_v_args, PyObject *__pyx_v_env, PyObject *__pyx_v_cwd, PyObject *__pyx_v_start_new_session, PyObject *__pyx_v__stdin, PyObject *__pyx_v__stdout, PyObject *__pyx_v__stderr, PyObject *__pyx_v_pass_fds, PyObject *__pyx_v_waiter, PyObject *__pyx_v_debug_flags, PyObject *__pyx_v_preexec_fn, PyObject *__pyx_v_restore_signals) {
  103463. struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_handle = 0;
  103464. PyObject *__pyx_v_init_fut = NULL;
  103465. struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_r = NULL;
  103466. __Pyx_RefNannyDeclarations
  103467. PyObject *__pyx_t_1 = NULL;
  103468. PyObject *__pyx_t_2 = NULL;
  103469. PyObject *__pyx_t_3 = NULL;
  103470. PyObject *__pyx_t_4 = NULL;
  103471. int __pyx_t_5;
  103472. PyObject *__pyx_t_6 = NULL;
  103473. PyObject *__pyx_t_7 = NULL;
  103474. int __pyx_t_8;
  103475. PyObject *__pyx_t_9 = NULL;
  103476. __Pyx_RefNannySetupContext("new", 0);
  103477. /* "uvloop/handles/process.pyx":588
  103478. *
  103479. * cdef UVProcessTransport handle
  103480. * handle = UVProcessTransport.__new__(UVProcessTransport) # <<<<<<<<<<<<<<
  103481. * handle._protocol = protocol
  103482. * handle._init(loop, args, env, cwd, start_new_session,
  103483. */
  103484. __pyx_t_1 = ((PyObject *)__pyx_tp_new_6uvloop_4loop_UVProcessTransport(((PyTypeObject *)__pyx_ptype_6uvloop_4loop_UVProcessTransport), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 588, __pyx_L1_error)
  103485. __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  103486. __pyx_v_handle = ((struct __pyx_obj_6uvloop_4loop_UVProcessTransport *)__pyx_t_1);
  103487. __pyx_t_1 = 0;
  103488. /* "uvloop/handles/process.pyx":589
  103489. * cdef UVProcessTransport handle
  103490. * handle = UVProcessTransport.__new__(UVProcessTransport)
  103491. * handle._protocol = protocol # <<<<<<<<<<<<<<
  103492. * handle._init(loop, args, env, cwd, start_new_session,
  103493. * __process_convert_fileno(_stdin),
  103494. */
  103495. __Pyx_INCREF(__pyx_v_protocol);
  103496. __Pyx_GIVEREF(__pyx_v_protocol);
  103497. __Pyx_GOTREF(__pyx_v_handle->_protocol);
  103498. __Pyx_DECREF(__pyx_v_handle->_protocol);
  103499. __pyx_v_handle->_protocol = __pyx_v_protocol;
  103500. /* "uvloop/handles/process.pyx":590
  103501. * handle = UVProcessTransport.__new__(UVProcessTransport)
  103502. * handle._protocol = protocol
  103503. * handle._init(loop, args, env, cwd, start_new_session, # <<<<<<<<<<<<<<
  103504. * __process_convert_fileno(_stdin),
  103505. * __process_convert_fileno(_stdout),
  103506. */
  103507. if (!(likely(PyList_CheckExact(__pyx_v_args))||((__pyx_v_args) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_args)->tp_name), 0))) __PYX_ERR(6, 590, __pyx_L1_error)
  103508. if (!(likely(PyDict_CheckExact(__pyx_v_env))||((__pyx_v_env) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_env)->tp_name), 0))) __PYX_ERR(6, 590, __pyx_L1_error)
  103509. /* "uvloop/handles/process.pyx":591
  103510. * handle._protocol = protocol
  103511. * handle._init(loop, args, env, cwd, start_new_session,
  103512. * __process_convert_fileno(_stdin), # <<<<<<<<<<<<<<
  103513. * __process_convert_fileno(_stdout),
  103514. * __process_convert_fileno(_stderr),
  103515. */
  103516. __pyx_t_1 = __pyx_f_6uvloop_4loop___process_convert_fileno(__pyx_v__stdin); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 591, __pyx_L1_error)
  103517. __Pyx_GOTREF(__pyx_t_1);
  103518. /* "uvloop/handles/process.pyx":592
  103519. * handle._init(loop, args, env, cwd, start_new_session,
  103520. * __process_convert_fileno(_stdin),
  103521. * __process_convert_fileno(_stdout), # <<<<<<<<<<<<<<
  103522. * __process_convert_fileno(_stderr),
  103523. * pass_fds,
  103524. */
  103525. __pyx_t_2 = __pyx_f_6uvloop_4loop___process_convert_fileno(__pyx_v__stdout); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 592, __pyx_L1_error)
  103526. __Pyx_GOTREF(__pyx_t_2);
  103527. /* "uvloop/handles/process.pyx":593
  103528. * __process_convert_fileno(_stdin),
  103529. * __process_convert_fileno(_stdout),
  103530. * __process_convert_fileno(_stderr), # <<<<<<<<<<<<<<
  103531. * pass_fds,
  103532. * debug_flags,
  103533. */
  103534. __pyx_t_3 = __pyx_f_6uvloop_4loop___process_convert_fileno(__pyx_v__stderr); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 593, __pyx_L1_error)
  103535. __Pyx_GOTREF(__pyx_t_3);
  103536. /* "uvloop/handles/process.pyx":590
  103537. * handle = UVProcessTransport.__new__(UVProcessTransport)
  103538. * handle._protocol = protocol
  103539. * handle._init(loop, args, env, cwd, start_new_session, # <<<<<<<<<<<<<<
  103540. * __process_convert_fileno(_stdin),
  103541. * __process_convert_fileno(_stdout),
  103542. */
  103543. __pyx_t_4 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcessTransport *)__pyx_v_handle->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._init(((struct __pyx_obj_6uvloop_4loop_UVProcess *)__pyx_v_handle), __pyx_v_loop, ((PyObject*)__pyx_v_args), ((PyObject*)__pyx_v_env), __pyx_v_cwd, __pyx_v_start_new_session, __pyx_t_1, __pyx_t_2, __pyx_t_3, __pyx_v_pass_fds, __pyx_v_debug_flags, __pyx_v_preexec_fn, __pyx_v_restore_signals); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 590, __pyx_L1_error)
  103544. __Pyx_GOTREF(__pyx_t_4);
  103545. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  103546. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  103547. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  103548. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  103549. /* "uvloop/handles/process.pyx":599
  103550. * restore_signals)
  103551. *
  103552. * if handle._init_futs: # <<<<<<<<<<<<<<
  103553. * handle._stdio_ready = 0
  103554. * init_fut = aio_gather(*handle._init_futs, loop=loop)
  103555. */
  103556. __pyx_t_5 = (__pyx_v_handle->_init_futs != Py_None)&&(PyList_GET_SIZE(__pyx_v_handle->_init_futs) != 0);
  103557. if (__pyx_t_5) {
  103558. /* "uvloop/handles/process.pyx":600
  103559. *
  103560. * if handle._init_futs:
  103561. * handle._stdio_ready = 0 # <<<<<<<<<<<<<<
  103562. * init_fut = aio_gather(*handle._init_futs, loop=loop)
  103563. * init_fut.add_done_callback(
  103564. */
  103565. __pyx_v_handle->_stdio_ready = 0;
  103566. /* "uvloop/handles/process.pyx":601
  103567. * if handle._init_futs:
  103568. * handle._stdio_ready = 0
  103569. * init_fut = aio_gather(*handle._init_futs, loop=loop) # <<<<<<<<<<<<<<
  103570. * init_fut.add_done_callback(
  103571. * ft_partial(handle.__stdio_inited, waiter))
  103572. */
  103573. __pyx_t_4 = PySequence_Tuple(__pyx_v_handle->_init_futs); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 601, __pyx_L1_error)
  103574. __Pyx_GOTREF(__pyx_t_4);
  103575. __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 601, __pyx_L1_error)
  103576. __Pyx_GOTREF(__pyx_t_3);
  103577. if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_loop, ((PyObject *)__pyx_v_loop)) < 0) __PYX_ERR(6, 601, __pyx_L1_error)
  103578. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_v_6uvloop_4loop_aio_gather, __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 601, __pyx_L1_error)
  103579. __Pyx_GOTREF(__pyx_t_2);
  103580. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  103581. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  103582. __pyx_v_init_fut = __pyx_t_2;
  103583. __pyx_t_2 = 0;
  103584. /* "uvloop/handles/process.pyx":602
  103585. * handle._stdio_ready = 0
  103586. * init_fut = aio_gather(*handle._init_futs, loop=loop)
  103587. * init_fut.add_done_callback( # <<<<<<<<<<<<<<
  103588. * ft_partial(handle.__stdio_inited, waiter))
  103589. * else:
  103590. */
  103591. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_init_fut, __pyx_n_s_add_done_callback); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 602, __pyx_L1_error)
  103592. __Pyx_GOTREF(__pyx_t_3);
  103593. /* "uvloop/handles/process.pyx":603
  103594. * init_fut = aio_gather(*handle._init_futs, loop=loop)
  103595. * init_fut.add_done_callback(
  103596. * ft_partial(handle.__stdio_inited, waiter)) # <<<<<<<<<<<<<<
  103597. * else:
  103598. * handle._stdio_ready = 1
  103599. */
  103600. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_handle), __pyx_n_s_stdio_inited); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 603, __pyx_L1_error)
  103601. __Pyx_GOTREF(__pyx_t_1);
  103602. __Pyx_INCREF(__pyx_v_6uvloop_4loop_ft_partial);
  103603. __pyx_t_6 = __pyx_v_6uvloop_4loop_ft_partial; __pyx_t_7 = NULL;
  103604. __pyx_t_8 = 0;
  103605. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
  103606. __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
  103607. if (likely(__pyx_t_7)) {
  103608. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
  103609. __Pyx_INCREF(__pyx_t_7);
  103610. __Pyx_INCREF(function);
  103611. __Pyx_DECREF_SET(__pyx_t_6, function);
  103612. __pyx_t_8 = 1;
  103613. }
  103614. }
  103615. #if CYTHON_FAST_PYCALL
  103616. if (PyFunction_Check(__pyx_t_6)) {
  103617. PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_1, __pyx_v_waiter};
  103618. __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 603, __pyx_L1_error)
  103619. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  103620. __Pyx_GOTREF(__pyx_t_4);
  103621. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  103622. } else
  103623. #endif
  103624. #if CYTHON_FAST_PYCCALL
  103625. if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
  103626. PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_1, __pyx_v_waiter};
  103627. __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 603, __pyx_L1_error)
  103628. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  103629. __Pyx_GOTREF(__pyx_t_4);
  103630. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  103631. } else
  103632. #endif
  103633. {
  103634. __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(6, 603, __pyx_L1_error)
  103635. __Pyx_GOTREF(__pyx_t_9);
  103636. if (__pyx_t_7) {
  103637. __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
  103638. }
  103639. __Pyx_GIVEREF(__pyx_t_1);
  103640. PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_1);
  103641. __Pyx_INCREF(__pyx_v_waiter);
  103642. __Pyx_GIVEREF(__pyx_v_waiter);
  103643. PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v_waiter);
  103644. __pyx_t_1 = 0;
  103645. __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 603, __pyx_L1_error)
  103646. __Pyx_GOTREF(__pyx_t_4);
  103647. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  103648. }
  103649. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  103650. __pyx_t_6 = NULL;
  103651. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
  103652. __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
  103653. if (likely(__pyx_t_6)) {
  103654. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  103655. __Pyx_INCREF(__pyx_t_6);
  103656. __Pyx_INCREF(function);
  103657. __Pyx_DECREF_SET(__pyx_t_3, function);
  103658. }
  103659. }
  103660. __pyx_t_2 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_6, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
  103661. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  103662. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  103663. if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 602, __pyx_L1_error)
  103664. __Pyx_GOTREF(__pyx_t_2);
  103665. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  103666. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  103667. /* "uvloop/handles/process.pyx":599
  103668. * restore_signals)
  103669. *
  103670. * if handle._init_futs: # <<<<<<<<<<<<<<
  103671. * handle._stdio_ready = 0
  103672. * init_fut = aio_gather(*handle._init_futs, loop=loop)
  103673. */
  103674. goto __pyx_L3;
  103675. }
  103676. /* "uvloop/handles/process.pyx":605
  103677. * ft_partial(handle.__stdio_inited, waiter))
  103678. * else:
  103679. * handle._stdio_ready = 1 # <<<<<<<<<<<<<<
  103680. * loop._call_soon_handle(
  103681. * new_MethodHandle1(loop,
  103682. */
  103683. /*else*/ {
  103684. __pyx_v_handle->_stdio_ready = 1;
  103685. /* "uvloop/handles/process.pyx":607
  103686. * handle._stdio_ready = 1
  103687. * loop._call_soon_handle(
  103688. * new_MethodHandle1(loop, # <<<<<<<<<<<<<<
  103689. * "UVProcessTransport._call_connection_made",
  103690. * <method1_t>handle._call_connection_made,
  103691. */
  103692. __pyx_t_2 = __pyx_f_6uvloop_4loop_new_MethodHandle1(__pyx_v_loop, __pyx_kp_u_UVProcessTransport__call_connect, ((__pyx_t_6uvloop_4loop_method1_t)((struct __pyx_vtabstruct_6uvloop_4loop_UVProcessTransport *)__pyx_v_handle->__pyx_base.__pyx_base.__pyx_vtab)->_call_connection_made), ((PyObject *)__pyx_v_handle), __pyx_v_waiter); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 607, __pyx_L1_error)
  103693. __Pyx_GOTREF(__pyx_t_2);
  103694. if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_6uvloop_4loop_Handle))))) __PYX_ERR(6, 607, __pyx_L1_error)
  103695. /* "uvloop/handles/process.pyx":606
  103696. * else:
  103697. * handle._stdio_ready = 1
  103698. * loop._call_soon_handle( # <<<<<<<<<<<<<<
  103699. * new_MethodHandle1(loop,
  103700. * "UVProcessTransport._call_connection_made",
  103701. */
  103702. __pyx_t_3 = __pyx_f_6uvloop_4loop_4Loop__call_soon_handle(__pyx_v_loop, ((struct __pyx_obj_6uvloop_4loop_Handle *)__pyx_t_2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 606, __pyx_L1_error)
  103703. __Pyx_GOTREF(__pyx_t_3);
  103704. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  103705. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  103706. }
  103707. __pyx_L3:;
  103708. /* "uvloop/handles/process.pyx":612
  103709. * handle, waiter))
  103710. *
  103711. * return handle # <<<<<<<<<<<<<<
  103712. *
  103713. * def get_protocol(self):
  103714. */
  103715. __Pyx_XDECREF(((PyObject *)__pyx_r));
  103716. __Pyx_INCREF(((PyObject *)__pyx_v_handle));
  103717. __pyx_r = __pyx_v_handle;
  103718. goto __pyx_L0;
  103719. /* "uvloop/handles/process.pyx":579
  103720. *
  103721. * @staticmethod
  103722. * cdef UVProcessTransport new(Loop loop, protocol, args, env, # <<<<<<<<<<<<<<
  103723. * cwd, start_new_session,
  103724. * _stdin, _stdout, _stderr, pass_fds,
  103725. */
  103726. /* function exit code */
  103727. __pyx_L1_error:;
  103728. __Pyx_XDECREF(__pyx_t_1);
  103729. __Pyx_XDECREF(__pyx_t_2);
  103730. __Pyx_XDECREF(__pyx_t_3);
  103731. __Pyx_XDECREF(__pyx_t_4);
  103732. __Pyx_XDECREF(__pyx_t_6);
  103733. __Pyx_XDECREF(__pyx_t_7);
  103734. __Pyx_XDECREF(__pyx_t_9);
  103735. __Pyx_AddTraceback("uvloop.loop.UVProcessTransport.new", __pyx_clineno, __pyx_lineno, __pyx_filename);
  103736. __pyx_r = 0;
  103737. __pyx_L0:;
  103738. __Pyx_XDECREF((PyObject *)__pyx_v_handle);
  103739. __Pyx_XDECREF(__pyx_v_init_fut);
  103740. __Pyx_XGIVEREF((PyObject *)__pyx_r);
  103741. __Pyx_RefNannyFinishContext();
  103742. return __pyx_r;
  103743. }
  103744. /* "uvloop/handles/process.pyx":614
  103745. * return handle
  103746. *
  103747. * def get_protocol(self): # <<<<<<<<<<<<<<
  103748. * return self._protocol
  103749. *
  103750. */
  103751. /* Python wrapper */
  103752. static PyObject *__pyx_pw_6uvloop_4loop_18UVProcessTransport_5get_protocol(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  103753. static char __pyx_doc_6uvloop_4loop_18UVProcessTransport_4get_protocol[] = "UVProcessTransport.get_protocol(self)";
  103754. static PyObject *__pyx_pw_6uvloop_4loop_18UVProcessTransport_5get_protocol(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  103755. PyObject *__pyx_r = 0;
  103756. __Pyx_RefNannyDeclarations
  103757. __Pyx_RefNannySetupContext("get_protocol (wrapper)", 0);
  103758. __pyx_r = __pyx_pf_6uvloop_4loop_18UVProcessTransport_4get_protocol(((struct __pyx_obj_6uvloop_4loop_UVProcessTransport *)__pyx_v_self));
  103759. /* function exit code */
  103760. __Pyx_RefNannyFinishContext();
  103761. return __pyx_r;
  103762. }
  103763. static PyObject *__pyx_pf_6uvloop_4loop_18UVProcessTransport_4get_protocol(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self) {
  103764. PyObject *__pyx_r = NULL;
  103765. __Pyx_RefNannyDeclarations
  103766. __Pyx_RefNannySetupContext("get_protocol", 0);
  103767. /* "uvloop/handles/process.pyx":615
  103768. *
  103769. * def get_protocol(self):
  103770. * return self._protocol # <<<<<<<<<<<<<<
  103771. *
  103772. * def set_protocol(self, protocol):
  103773. */
  103774. __Pyx_XDECREF(__pyx_r);
  103775. __Pyx_INCREF(__pyx_v_self->_protocol);
  103776. __pyx_r = __pyx_v_self->_protocol;
  103777. goto __pyx_L0;
  103778. /* "uvloop/handles/process.pyx":614
  103779. * return handle
  103780. *
  103781. * def get_protocol(self): # <<<<<<<<<<<<<<
  103782. * return self._protocol
  103783. *
  103784. */
  103785. /* function exit code */
  103786. __pyx_L0:;
  103787. __Pyx_XGIVEREF(__pyx_r);
  103788. __Pyx_RefNannyFinishContext();
  103789. return __pyx_r;
  103790. }
  103791. /* "uvloop/handles/process.pyx":617
  103792. * return self._protocol
  103793. *
  103794. * def set_protocol(self, protocol): # <<<<<<<<<<<<<<
  103795. * self._protocol = protocol
  103796. *
  103797. */
  103798. /* Python wrapper */
  103799. static PyObject *__pyx_pw_6uvloop_4loop_18UVProcessTransport_7set_protocol(PyObject *__pyx_v_self, PyObject *__pyx_v_protocol); /*proto*/
  103800. static char __pyx_doc_6uvloop_4loop_18UVProcessTransport_6set_protocol[] = "UVProcessTransport.set_protocol(self, protocol)";
  103801. static PyObject *__pyx_pw_6uvloop_4loop_18UVProcessTransport_7set_protocol(PyObject *__pyx_v_self, PyObject *__pyx_v_protocol) {
  103802. PyObject *__pyx_r = 0;
  103803. __Pyx_RefNannyDeclarations
  103804. __Pyx_RefNannySetupContext("set_protocol (wrapper)", 0);
  103805. __pyx_r = __pyx_pf_6uvloop_4loop_18UVProcessTransport_6set_protocol(((struct __pyx_obj_6uvloop_4loop_UVProcessTransport *)__pyx_v_self), ((PyObject *)__pyx_v_protocol));
  103806. /* function exit code */
  103807. __Pyx_RefNannyFinishContext();
  103808. return __pyx_r;
  103809. }
  103810. static PyObject *__pyx_pf_6uvloop_4loop_18UVProcessTransport_6set_protocol(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self, PyObject *__pyx_v_protocol) {
  103811. PyObject *__pyx_r = NULL;
  103812. __Pyx_RefNannyDeclarations
  103813. __Pyx_RefNannySetupContext("set_protocol", 0);
  103814. /* "uvloop/handles/process.pyx":618
  103815. *
  103816. * def set_protocol(self, protocol):
  103817. * self._protocol = protocol # <<<<<<<<<<<<<<
  103818. *
  103819. * def get_pid(self):
  103820. */
  103821. __Pyx_INCREF(__pyx_v_protocol);
  103822. __Pyx_GIVEREF(__pyx_v_protocol);
  103823. __Pyx_GOTREF(__pyx_v_self->_protocol);
  103824. __Pyx_DECREF(__pyx_v_self->_protocol);
  103825. __pyx_v_self->_protocol = __pyx_v_protocol;
  103826. /* "uvloop/handles/process.pyx":617
  103827. * return self._protocol
  103828. *
  103829. * def set_protocol(self, protocol): # <<<<<<<<<<<<<<
  103830. * self._protocol = protocol
  103831. *
  103832. */
  103833. /* function exit code */
  103834. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  103835. __Pyx_XGIVEREF(__pyx_r);
  103836. __Pyx_RefNannyFinishContext();
  103837. return __pyx_r;
  103838. }
  103839. /* "uvloop/handles/process.pyx":620
  103840. * self._protocol = protocol
  103841. *
  103842. * def get_pid(self): # <<<<<<<<<<<<<<
  103843. * return self._pid
  103844. *
  103845. */
  103846. /* Python wrapper */
  103847. static PyObject *__pyx_pw_6uvloop_4loop_18UVProcessTransport_9get_pid(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  103848. static char __pyx_doc_6uvloop_4loop_18UVProcessTransport_8get_pid[] = "UVProcessTransport.get_pid(self)";
  103849. static PyObject *__pyx_pw_6uvloop_4loop_18UVProcessTransport_9get_pid(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  103850. PyObject *__pyx_r = 0;
  103851. __Pyx_RefNannyDeclarations
  103852. __Pyx_RefNannySetupContext("get_pid (wrapper)", 0);
  103853. __pyx_r = __pyx_pf_6uvloop_4loop_18UVProcessTransport_8get_pid(((struct __pyx_obj_6uvloop_4loop_UVProcessTransport *)__pyx_v_self));
  103854. /* function exit code */
  103855. __Pyx_RefNannyFinishContext();
  103856. return __pyx_r;
  103857. }
  103858. static PyObject *__pyx_pf_6uvloop_4loop_18UVProcessTransport_8get_pid(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self) {
  103859. PyObject *__pyx_r = NULL;
  103860. __Pyx_RefNannyDeclarations
  103861. __Pyx_RefNannySetupContext("get_pid", 0);
  103862. /* "uvloop/handles/process.pyx":621
  103863. *
  103864. * def get_pid(self):
  103865. * return self._pid # <<<<<<<<<<<<<<
  103866. *
  103867. * def get_returncode(self):
  103868. */
  103869. __Pyx_XDECREF(__pyx_r);
  103870. __Pyx_INCREF(__pyx_v_self->__pyx_base._pid);
  103871. __pyx_r = __pyx_v_self->__pyx_base._pid;
  103872. goto __pyx_L0;
  103873. /* "uvloop/handles/process.pyx":620
  103874. * self._protocol = protocol
  103875. *
  103876. * def get_pid(self): # <<<<<<<<<<<<<<
  103877. * return self._pid
  103878. *
  103879. */
  103880. /* function exit code */
  103881. __pyx_L0:;
  103882. __Pyx_XGIVEREF(__pyx_r);
  103883. __Pyx_RefNannyFinishContext();
  103884. return __pyx_r;
  103885. }
  103886. /* "uvloop/handles/process.pyx":623
  103887. * return self._pid
  103888. *
  103889. * def get_returncode(self): # <<<<<<<<<<<<<<
  103890. * return self._returncode
  103891. *
  103892. */
  103893. /* Python wrapper */
  103894. static PyObject *__pyx_pw_6uvloop_4loop_18UVProcessTransport_11get_returncode(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  103895. static char __pyx_doc_6uvloop_4loop_18UVProcessTransport_10get_returncode[] = "UVProcessTransport.get_returncode(self)";
  103896. static PyObject *__pyx_pw_6uvloop_4loop_18UVProcessTransport_11get_returncode(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  103897. PyObject *__pyx_r = 0;
  103898. __Pyx_RefNannyDeclarations
  103899. __Pyx_RefNannySetupContext("get_returncode (wrapper)", 0);
  103900. __pyx_r = __pyx_pf_6uvloop_4loop_18UVProcessTransport_10get_returncode(((struct __pyx_obj_6uvloop_4loop_UVProcessTransport *)__pyx_v_self));
  103901. /* function exit code */
  103902. __Pyx_RefNannyFinishContext();
  103903. return __pyx_r;
  103904. }
  103905. static PyObject *__pyx_pf_6uvloop_4loop_18UVProcessTransport_10get_returncode(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self) {
  103906. PyObject *__pyx_r = NULL;
  103907. __Pyx_RefNannyDeclarations
  103908. __Pyx_RefNannySetupContext("get_returncode", 0);
  103909. /* "uvloop/handles/process.pyx":624
  103910. *
  103911. * def get_returncode(self):
  103912. * return self._returncode # <<<<<<<<<<<<<<
  103913. *
  103914. * def get_pipe_transport(self, fd):
  103915. */
  103916. __Pyx_XDECREF(__pyx_r);
  103917. __Pyx_INCREF(__pyx_v_self->__pyx_base._returncode);
  103918. __pyx_r = __pyx_v_self->__pyx_base._returncode;
  103919. goto __pyx_L0;
  103920. /* "uvloop/handles/process.pyx":623
  103921. * return self._pid
  103922. *
  103923. * def get_returncode(self): # <<<<<<<<<<<<<<
  103924. * return self._returncode
  103925. *
  103926. */
  103927. /* function exit code */
  103928. __pyx_L0:;
  103929. __Pyx_XGIVEREF(__pyx_r);
  103930. __Pyx_RefNannyFinishContext();
  103931. return __pyx_r;
  103932. }
  103933. /* "uvloop/handles/process.pyx":626
  103934. * return self._returncode
  103935. *
  103936. * def get_pipe_transport(self, fd): # <<<<<<<<<<<<<<
  103937. * if fd == 0:
  103938. * return self._stdin
  103939. */
  103940. /* Python wrapper */
  103941. static PyObject *__pyx_pw_6uvloop_4loop_18UVProcessTransport_13get_pipe_transport(PyObject *__pyx_v_self, PyObject *__pyx_v_fd); /*proto*/
  103942. static char __pyx_doc_6uvloop_4loop_18UVProcessTransport_12get_pipe_transport[] = "UVProcessTransport.get_pipe_transport(self, fd)";
  103943. static PyObject *__pyx_pw_6uvloop_4loop_18UVProcessTransport_13get_pipe_transport(PyObject *__pyx_v_self, PyObject *__pyx_v_fd) {
  103944. PyObject *__pyx_r = 0;
  103945. __Pyx_RefNannyDeclarations
  103946. __Pyx_RefNannySetupContext("get_pipe_transport (wrapper)", 0);
  103947. __pyx_r = __pyx_pf_6uvloop_4loop_18UVProcessTransport_12get_pipe_transport(((struct __pyx_obj_6uvloop_4loop_UVProcessTransport *)__pyx_v_self), ((PyObject *)__pyx_v_fd));
  103948. /* function exit code */
  103949. __Pyx_RefNannyFinishContext();
  103950. return __pyx_r;
  103951. }
  103952. static PyObject *__pyx_pf_6uvloop_4loop_18UVProcessTransport_12get_pipe_transport(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self, PyObject *__pyx_v_fd) {
  103953. PyObject *__pyx_r = NULL;
  103954. __Pyx_RefNannyDeclarations
  103955. PyObject *__pyx_t_1 = NULL;
  103956. int __pyx_t_2;
  103957. __Pyx_RefNannySetupContext("get_pipe_transport", 0);
  103958. /* "uvloop/handles/process.pyx":627
  103959. *
  103960. * def get_pipe_transport(self, fd):
  103961. * if fd == 0: # <<<<<<<<<<<<<<
  103962. * return self._stdin
  103963. * elif fd == 1:
  103964. */
  103965. __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_fd, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 627, __pyx_L1_error)
  103966. __Pyx_GOTREF(__pyx_t_1);
  103967. __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(6, 627, __pyx_L1_error)
  103968. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  103969. if (__pyx_t_2) {
  103970. /* "uvloop/handles/process.pyx":628
  103971. * def get_pipe_transport(self, fd):
  103972. * if fd == 0:
  103973. * return self._stdin # <<<<<<<<<<<<<<
  103974. * elif fd == 1:
  103975. * return self._stdout
  103976. */
  103977. __Pyx_XDECREF(__pyx_r);
  103978. __Pyx_INCREF(((PyObject *)__pyx_v_self->_stdin));
  103979. __pyx_r = ((PyObject *)__pyx_v_self->_stdin);
  103980. goto __pyx_L0;
  103981. /* "uvloop/handles/process.pyx":627
  103982. *
  103983. * def get_pipe_transport(self, fd):
  103984. * if fd == 0: # <<<<<<<<<<<<<<
  103985. * return self._stdin
  103986. * elif fd == 1:
  103987. */
  103988. }
  103989. /* "uvloop/handles/process.pyx":629
  103990. * if fd == 0:
  103991. * return self._stdin
  103992. * elif fd == 1: # <<<<<<<<<<<<<<
  103993. * return self._stdout
  103994. * elif fd == 2:
  103995. */
  103996. __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_fd, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 629, __pyx_L1_error)
  103997. __Pyx_GOTREF(__pyx_t_1);
  103998. __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(6, 629, __pyx_L1_error)
  103999. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  104000. if (__pyx_t_2) {
  104001. /* "uvloop/handles/process.pyx":630
  104002. * return self._stdin
  104003. * elif fd == 1:
  104004. * return self._stdout # <<<<<<<<<<<<<<
  104005. * elif fd == 2:
  104006. * return self._stderr
  104007. */
  104008. __Pyx_XDECREF(__pyx_r);
  104009. __Pyx_INCREF(((PyObject *)__pyx_v_self->_stdout));
  104010. __pyx_r = ((PyObject *)__pyx_v_self->_stdout);
  104011. goto __pyx_L0;
  104012. /* "uvloop/handles/process.pyx":629
  104013. * if fd == 0:
  104014. * return self._stdin
  104015. * elif fd == 1: # <<<<<<<<<<<<<<
  104016. * return self._stdout
  104017. * elif fd == 2:
  104018. */
  104019. }
  104020. /* "uvloop/handles/process.pyx":631
  104021. * elif fd == 1:
  104022. * return self._stdout
  104023. * elif fd == 2: # <<<<<<<<<<<<<<
  104024. * return self._stderr
  104025. *
  104026. */
  104027. __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_fd, __pyx_int_2, 2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 631, __pyx_L1_error)
  104028. __Pyx_GOTREF(__pyx_t_1);
  104029. __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(6, 631, __pyx_L1_error)
  104030. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  104031. if (__pyx_t_2) {
  104032. /* "uvloop/handles/process.pyx":632
  104033. * return self._stdout
  104034. * elif fd == 2:
  104035. * return self._stderr # <<<<<<<<<<<<<<
  104036. *
  104037. * def terminate(self):
  104038. */
  104039. __Pyx_XDECREF(__pyx_r);
  104040. __Pyx_INCREF(((PyObject *)__pyx_v_self->_stderr));
  104041. __pyx_r = ((PyObject *)__pyx_v_self->_stderr);
  104042. goto __pyx_L0;
  104043. /* "uvloop/handles/process.pyx":631
  104044. * elif fd == 1:
  104045. * return self._stdout
  104046. * elif fd == 2: # <<<<<<<<<<<<<<
  104047. * return self._stderr
  104048. *
  104049. */
  104050. }
  104051. /* "uvloop/handles/process.pyx":626
  104052. * return self._returncode
  104053. *
  104054. * def get_pipe_transport(self, fd): # <<<<<<<<<<<<<<
  104055. * if fd == 0:
  104056. * return self._stdin
  104057. */
  104058. /* function exit code */
  104059. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  104060. goto __pyx_L0;
  104061. __pyx_L1_error:;
  104062. __Pyx_XDECREF(__pyx_t_1);
  104063. __Pyx_AddTraceback("uvloop.loop.UVProcessTransport.get_pipe_transport", __pyx_clineno, __pyx_lineno, __pyx_filename);
  104064. __pyx_r = NULL;
  104065. __pyx_L0:;
  104066. __Pyx_XGIVEREF(__pyx_r);
  104067. __Pyx_RefNannyFinishContext();
  104068. return __pyx_r;
  104069. }
  104070. /* "uvloop/handles/process.pyx":634
  104071. * return self._stderr
  104072. *
  104073. * def terminate(self): # <<<<<<<<<<<<<<
  104074. * self._check_proc()
  104075. * self._kill(uv.SIGTERM)
  104076. */
  104077. /* Python wrapper */
  104078. static PyObject *__pyx_pw_6uvloop_4loop_18UVProcessTransport_15terminate(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  104079. static char __pyx_doc_6uvloop_4loop_18UVProcessTransport_14terminate[] = "UVProcessTransport.terminate(self)";
  104080. static PyObject *__pyx_pw_6uvloop_4loop_18UVProcessTransport_15terminate(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  104081. PyObject *__pyx_r = 0;
  104082. __Pyx_RefNannyDeclarations
  104083. __Pyx_RefNannySetupContext("terminate (wrapper)", 0);
  104084. __pyx_r = __pyx_pf_6uvloop_4loop_18UVProcessTransport_14terminate(((struct __pyx_obj_6uvloop_4loop_UVProcessTransport *)__pyx_v_self));
  104085. /* function exit code */
  104086. __Pyx_RefNannyFinishContext();
  104087. return __pyx_r;
  104088. }
  104089. static PyObject *__pyx_pf_6uvloop_4loop_18UVProcessTransport_14terminate(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self) {
  104090. PyObject *__pyx_r = NULL;
  104091. __Pyx_RefNannyDeclarations
  104092. PyObject *__pyx_t_1 = NULL;
  104093. __Pyx_RefNannySetupContext("terminate", 0);
  104094. /* "uvloop/handles/process.pyx":635
  104095. *
  104096. * def terminate(self):
  104097. * self._check_proc() # <<<<<<<<<<<<<<
  104098. * self._kill(uv.SIGTERM)
  104099. *
  104100. */
  104101. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcessTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_check_proc(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 635, __pyx_L1_error)
  104102. __Pyx_GOTREF(__pyx_t_1);
  104103. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  104104. /* "uvloop/handles/process.pyx":636
  104105. * def terminate(self):
  104106. * self._check_proc()
  104107. * self._kill(uv.SIGTERM) # <<<<<<<<<<<<<<
  104108. *
  104109. * def kill(self):
  104110. */
  104111. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcessTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._kill(((struct __pyx_obj_6uvloop_4loop_UVProcess *)__pyx_v_self), SIGTERM); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 636, __pyx_L1_error)
  104112. __Pyx_GOTREF(__pyx_t_1);
  104113. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  104114. /* "uvloop/handles/process.pyx":634
  104115. * return self._stderr
  104116. *
  104117. * def terminate(self): # <<<<<<<<<<<<<<
  104118. * self._check_proc()
  104119. * self._kill(uv.SIGTERM)
  104120. */
  104121. /* function exit code */
  104122. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  104123. goto __pyx_L0;
  104124. __pyx_L1_error:;
  104125. __Pyx_XDECREF(__pyx_t_1);
  104126. __Pyx_AddTraceback("uvloop.loop.UVProcessTransport.terminate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  104127. __pyx_r = NULL;
  104128. __pyx_L0:;
  104129. __Pyx_XGIVEREF(__pyx_r);
  104130. __Pyx_RefNannyFinishContext();
  104131. return __pyx_r;
  104132. }
  104133. /* "uvloop/handles/process.pyx":638
  104134. * self._kill(uv.SIGTERM)
  104135. *
  104136. * def kill(self): # <<<<<<<<<<<<<<
  104137. * self._check_proc()
  104138. * self._kill(uv.SIGKILL)
  104139. */
  104140. /* Python wrapper */
  104141. static PyObject *__pyx_pw_6uvloop_4loop_18UVProcessTransport_17kill(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  104142. static char __pyx_doc_6uvloop_4loop_18UVProcessTransport_16kill[] = "UVProcessTransport.kill(self)";
  104143. static PyObject *__pyx_pw_6uvloop_4loop_18UVProcessTransport_17kill(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  104144. PyObject *__pyx_r = 0;
  104145. __Pyx_RefNannyDeclarations
  104146. __Pyx_RefNannySetupContext("kill (wrapper)", 0);
  104147. __pyx_r = __pyx_pf_6uvloop_4loop_18UVProcessTransport_16kill(((struct __pyx_obj_6uvloop_4loop_UVProcessTransport *)__pyx_v_self));
  104148. /* function exit code */
  104149. __Pyx_RefNannyFinishContext();
  104150. return __pyx_r;
  104151. }
  104152. static PyObject *__pyx_pf_6uvloop_4loop_18UVProcessTransport_16kill(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self) {
  104153. PyObject *__pyx_r = NULL;
  104154. __Pyx_RefNannyDeclarations
  104155. PyObject *__pyx_t_1 = NULL;
  104156. __Pyx_RefNannySetupContext("kill", 0);
  104157. /* "uvloop/handles/process.pyx":639
  104158. *
  104159. * def kill(self):
  104160. * self._check_proc() # <<<<<<<<<<<<<<
  104161. * self._kill(uv.SIGKILL)
  104162. *
  104163. */
  104164. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcessTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_check_proc(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 639, __pyx_L1_error)
  104165. __Pyx_GOTREF(__pyx_t_1);
  104166. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  104167. /* "uvloop/handles/process.pyx":640
  104168. * def kill(self):
  104169. * self._check_proc()
  104170. * self._kill(uv.SIGKILL) # <<<<<<<<<<<<<<
  104171. *
  104172. * def send_signal(self, int signal):
  104173. */
  104174. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcessTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._kill(((struct __pyx_obj_6uvloop_4loop_UVProcess *)__pyx_v_self), SIGKILL); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 640, __pyx_L1_error)
  104175. __Pyx_GOTREF(__pyx_t_1);
  104176. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  104177. /* "uvloop/handles/process.pyx":638
  104178. * self._kill(uv.SIGTERM)
  104179. *
  104180. * def kill(self): # <<<<<<<<<<<<<<
  104181. * self._check_proc()
  104182. * self._kill(uv.SIGKILL)
  104183. */
  104184. /* function exit code */
  104185. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  104186. goto __pyx_L0;
  104187. __pyx_L1_error:;
  104188. __Pyx_XDECREF(__pyx_t_1);
  104189. __Pyx_AddTraceback("uvloop.loop.UVProcessTransport.kill", __pyx_clineno, __pyx_lineno, __pyx_filename);
  104190. __pyx_r = NULL;
  104191. __pyx_L0:;
  104192. __Pyx_XGIVEREF(__pyx_r);
  104193. __Pyx_RefNannyFinishContext();
  104194. return __pyx_r;
  104195. }
  104196. /* "uvloop/handles/process.pyx":642
  104197. * self._kill(uv.SIGKILL)
  104198. *
  104199. * def send_signal(self, int signal): # <<<<<<<<<<<<<<
  104200. * self._check_proc()
  104201. * self._kill(signal)
  104202. */
  104203. /* Python wrapper */
  104204. static PyObject *__pyx_pw_6uvloop_4loop_18UVProcessTransport_19send_signal(PyObject *__pyx_v_self, PyObject *__pyx_arg_signal); /*proto*/
  104205. static char __pyx_doc_6uvloop_4loop_18UVProcessTransport_18send_signal[] = "UVProcessTransport.send_signal(self, int signal)";
  104206. static PyObject *__pyx_pw_6uvloop_4loop_18UVProcessTransport_19send_signal(PyObject *__pyx_v_self, PyObject *__pyx_arg_signal) {
  104207. int __pyx_v_signal;
  104208. PyObject *__pyx_r = 0;
  104209. __Pyx_RefNannyDeclarations
  104210. __Pyx_RefNannySetupContext("send_signal (wrapper)", 0);
  104211. assert(__pyx_arg_signal); {
  104212. __pyx_v_signal = __Pyx_PyInt_As_int(__pyx_arg_signal); if (unlikely((__pyx_v_signal == (int)-1) && PyErr_Occurred())) __PYX_ERR(6, 642, __pyx_L3_error)
  104213. }
  104214. goto __pyx_L4_argument_unpacking_done;
  104215. __pyx_L3_error:;
  104216. __Pyx_AddTraceback("uvloop.loop.UVProcessTransport.send_signal", __pyx_clineno, __pyx_lineno, __pyx_filename);
  104217. __Pyx_RefNannyFinishContext();
  104218. return NULL;
  104219. __pyx_L4_argument_unpacking_done:;
  104220. __pyx_r = __pyx_pf_6uvloop_4loop_18UVProcessTransport_18send_signal(((struct __pyx_obj_6uvloop_4loop_UVProcessTransport *)__pyx_v_self), ((int)__pyx_v_signal));
  104221. /* function exit code */
  104222. __Pyx_RefNannyFinishContext();
  104223. return __pyx_r;
  104224. }
  104225. static PyObject *__pyx_pf_6uvloop_4loop_18UVProcessTransport_18send_signal(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self, int __pyx_v_signal) {
  104226. PyObject *__pyx_r = NULL;
  104227. __Pyx_RefNannyDeclarations
  104228. PyObject *__pyx_t_1 = NULL;
  104229. __Pyx_RefNannySetupContext("send_signal", 0);
  104230. /* "uvloop/handles/process.pyx":643
  104231. *
  104232. * def send_signal(self, int signal):
  104233. * self._check_proc() # <<<<<<<<<<<<<<
  104234. * self._kill(signal)
  104235. *
  104236. */
  104237. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcessTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_check_proc(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 643, __pyx_L1_error)
  104238. __Pyx_GOTREF(__pyx_t_1);
  104239. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  104240. /* "uvloop/handles/process.pyx":644
  104241. * def send_signal(self, int signal):
  104242. * self._check_proc()
  104243. * self._kill(signal) # <<<<<<<<<<<<<<
  104244. *
  104245. * def is_closing(self):
  104246. */
  104247. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcessTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._kill(((struct __pyx_obj_6uvloop_4loop_UVProcess *)__pyx_v_self), __pyx_v_signal); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 644, __pyx_L1_error)
  104248. __Pyx_GOTREF(__pyx_t_1);
  104249. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  104250. /* "uvloop/handles/process.pyx":642
  104251. * self._kill(uv.SIGKILL)
  104252. *
  104253. * def send_signal(self, int signal): # <<<<<<<<<<<<<<
  104254. * self._check_proc()
  104255. * self._kill(signal)
  104256. */
  104257. /* function exit code */
  104258. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  104259. goto __pyx_L0;
  104260. __pyx_L1_error:;
  104261. __Pyx_XDECREF(__pyx_t_1);
  104262. __Pyx_AddTraceback("uvloop.loop.UVProcessTransport.send_signal", __pyx_clineno, __pyx_lineno, __pyx_filename);
  104263. __pyx_r = NULL;
  104264. __pyx_L0:;
  104265. __Pyx_XGIVEREF(__pyx_r);
  104266. __Pyx_RefNannyFinishContext();
  104267. return __pyx_r;
  104268. }
  104269. /* "uvloop/handles/process.pyx":646
  104270. * self._kill(signal)
  104271. *
  104272. * def is_closing(self): # <<<<<<<<<<<<<<
  104273. * return self._closed
  104274. *
  104275. */
  104276. /* Python wrapper */
  104277. static PyObject *__pyx_pw_6uvloop_4loop_18UVProcessTransport_21is_closing(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  104278. static char __pyx_doc_6uvloop_4loop_18UVProcessTransport_20is_closing[] = "UVProcessTransport.is_closing(self)";
  104279. static PyObject *__pyx_pw_6uvloop_4loop_18UVProcessTransport_21is_closing(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  104280. PyObject *__pyx_r = 0;
  104281. __Pyx_RefNannyDeclarations
  104282. __Pyx_RefNannySetupContext("is_closing (wrapper)", 0);
  104283. __pyx_r = __pyx_pf_6uvloop_4loop_18UVProcessTransport_20is_closing(((struct __pyx_obj_6uvloop_4loop_UVProcessTransport *)__pyx_v_self));
  104284. /* function exit code */
  104285. __Pyx_RefNannyFinishContext();
  104286. return __pyx_r;
  104287. }
  104288. static PyObject *__pyx_pf_6uvloop_4loop_18UVProcessTransport_20is_closing(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self) {
  104289. PyObject *__pyx_r = NULL;
  104290. __Pyx_RefNannyDeclarations
  104291. PyObject *__pyx_t_1 = NULL;
  104292. __Pyx_RefNannySetupContext("is_closing", 0);
  104293. /* "uvloop/handles/process.pyx":647
  104294. *
  104295. * def is_closing(self):
  104296. * return self._closed # <<<<<<<<<<<<<<
  104297. *
  104298. * def close(self):
  104299. */
  104300. __Pyx_XDECREF(__pyx_r);
  104301. __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->__pyx_base.__pyx_base._closed); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 647, __pyx_L1_error)
  104302. __Pyx_GOTREF(__pyx_t_1);
  104303. __pyx_r = __pyx_t_1;
  104304. __pyx_t_1 = 0;
  104305. goto __pyx_L0;
  104306. /* "uvloop/handles/process.pyx":646
  104307. * self._kill(signal)
  104308. *
  104309. * def is_closing(self): # <<<<<<<<<<<<<<
  104310. * return self._closed
  104311. *
  104312. */
  104313. /* function exit code */
  104314. __pyx_L1_error:;
  104315. __Pyx_XDECREF(__pyx_t_1);
  104316. __Pyx_AddTraceback("uvloop.loop.UVProcessTransport.is_closing", __pyx_clineno, __pyx_lineno, __pyx_filename);
  104317. __pyx_r = NULL;
  104318. __pyx_L0:;
  104319. __Pyx_XGIVEREF(__pyx_r);
  104320. __Pyx_RefNannyFinishContext();
  104321. return __pyx_r;
  104322. }
  104323. /* "uvloop/handles/process.pyx":649
  104324. * return self._closed
  104325. *
  104326. * def close(self): # <<<<<<<<<<<<<<
  104327. * if self._returncode is None:
  104328. * self._kill(uv.SIGKILL)
  104329. */
  104330. /* Python wrapper */
  104331. static PyObject *__pyx_pw_6uvloop_4loop_18UVProcessTransport_23close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  104332. static char __pyx_doc_6uvloop_4loop_18UVProcessTransport_22close[] = "UVProcessTransport.close(self)";
  104333. static PyObject *__pyx_pw_6uvloop_4loop_18UVProcessTransport_23close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  104334. PyObject *__pyx_r = 0;
  104335. __Pyx_RefNannyDeclarations
  104336. __Pyx_RefNannySetupContext("close (wrapper)", 0);
  104337. __pyx_r = __pyx_pf_6uvloop_4loop_18UVProcessTransport_22close(((struct __pyx_obj_6uvloop_4loop_UVProcessTransport *)__pyx_v_self));
  104338. /* function exit code */
  104339. __Pyx_RefNannyFinishContext();
  104340. return __pyx_r;
  104341. }
  104342. static PyObject *__pyx_pf_6uvloop_4loop_18UVProcessTransport_22close(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self) {
  104343. PyObject *__pyx_r = NULL;
  104344. __Pyx_RefNannyDeclarations
  104345. int __pyx_t_1;
  104346. int __pyx_t_2;
  104347. PyObject *__pyx_t_3 = NULL;
  104348. PyObject *__pyx_t_4 = NULL;
  104349. PyObject *__pyx_t_5 = NULL;
  104350. __Pyx_RefNannySetupContext("close", 0);
  104351. /* "uvloop/handles/process.pyx":650
  104352. *
  104353. * def close(self):
  104354. * if self._returncode is None: # <<<<<<<<<<<<<<
  104355. * self._kill(uv.SIGKILL)
  104356. *
  104357. */
  104358. __pyx_t_1 = (__pyx_v_self->__pyx_base._returncode == Py_None);
  104359. __pyx_t_2 = (__pyx_t_1 != 0);
  104360. if (__pyx_t_2) {
  104361. /* "uvloop/handles/process.pyx":651
  104362. * def close(self):
  104363. * if self._returncode is None:
  104364. * self._kill(uv.SIGKILL) # <<<<<<<<<<<<<<
  104365. *
  104366. * if self._stdin is not None:
  104367. */
  104368. __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcessTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._kill(((struct __pyx_obj_6uvloop_4loop_UVProcess *)__pyx_v_self), SIGKILL); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 651, __pyx_L1_error)
  104369. __Pyx_GOTREF(__pyx_t_3);
  104370. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  104371. /* "uvloop/handles/process.pyx":650
  104372. *
  104373. * def close(self):
  104374. * if self._returncode is None: # <<<<<<<<<<<<<<
  104375. * self._kill(uv.SIGKILL)
  104376. *
  104377. */
  104378. }
  104379. /* "uvloop/handles/process.pyx":653
  104380. * self._kill(uv.SIGKILL)
  104381. *
  104382. * if self._stdin is not None: # <<<<<<<<<<<<<<
  104383. * self._stdin.close()
  104384. * if self._stdout is not None:
  104385. */
  104386. __pyx_t_2 = (((PyObject *)__pyx_v_self->_stdin) != Py_None);
  104387. __pyx_t_1 = (__pyx_t_2 != 0);
  104388. if (__pyx_t_1) {
  104389. /* "uvloop/handles/process.pyx":654
  104390. *
  104391. * if self._stdin is not None:
  104392. * self._stdin.close() # <<<<<<<<<<<<<<
  104393. * if self._stdout is not None:
  104394. * self._stdout.close()
  104395. */
  104396. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_stdin), __pyx_n_s_close); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 654, __pyx_L1_error)
  104397. __Pyx_GOTREF(__pyx_t_4);
  104398. __pyx_t_5 = NULL;
  104399. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
  104400. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
  104401. if (likely(__pyx_t_5)) {
  104402. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  104403. __Pyx_INCREF(__pyx_t_5);
  104404. __Pyx_INCREF(function);
  104405. __Pyx_DECREF_SET(__pyx_t_4, function);
  104406. }
  104407. }
  104408. __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
  104409. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  104410. if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 654, __pyx_L1_error)
  104411. __Pyx_GOTREF(__pyx_t_3);
  104412. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  104413. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  104414. /* "uvloop/handles/process.pyx":653
  104415. * self._kill(uv.SIGKILL)
  104416. *
  104417. * if self._stdin is not None: # <<<<<<<<<<<<<<
  104418. * self._stdin.close()
  104419. * if self._stdout is not None:
  104420. */
  104421. }
  104422. /* "uvloop/handles/process.pyx":655
  104423. * if self._stdin is not None:
  104424. * self._stdin.close()
  104425. * if self._stdout is not None: # <<<<<<<<<<<<<<
  104426. * self._stdout.close()
  104427. * if self._stderr is not None:
  104428. */
  104429. __pyx_t_1 = (((PyObject *)__pyx_v_self->_stdout) != Py_None);
  104430. __pyx_t_2 = (__pyx_t_1 != 0);
  104431. if (__pyx_t_2) {
  104432. /* "uvloop/handles/process.pyx":656
  104433. * self._stdin.close()
  104434. * if self._stdout is not None:
  104435. * self._stdout.close() # <<<<<<<<<<<<<<
  104436. * if self._stderr is not None:
  104437. * self._stderr.close()
  104438. */
  104439. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_stdout), __pyx_n_s_close); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 656, __pyx_L1_error)
  104440. __Pyx_GOTREF(__pyx_t_4);
  104441. __pyx_t_5 = NULL;
  104442. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
  104443. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
  104444. if (likely(__pyx_t_5)) {
  104445. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  104446. __Pyx_INCREF(__pyx_t_5);
  104447. __Pyx_INCREF(function);
  104448. __Pyx_DECREF_SET(__pyx_t_4, function);
  104449. }
  104450. }
  104451. __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
  104452. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  104453. if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 656, __pyx_L1_error)
  104454. __Pyx_GOTREF(__pyx_t_3);
  104455. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  104456. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  104457. /* "uvloop/handles/process.pyx":655
  104458. * if self._stdin is not None:
  104459. * self._stdin.close()
  104460. * if self._stdout is not None: # <<<<<<<<<<<<<<
  104461. * self._stdout.close()
  104462. * if self._stderr is not None:
  104463. */
  104464. }
  104465. /* "uvloop/handles/process.pyx":657
  104466. * if self._stdout is not None:
  104467. * self._stdout.close()
  104468. * if self._stderr is not None: # <<<<<<<<<<<<<<
  104469. * self._stderr.close()
  104470. *
  104471. */
  104472. __pyx_t_2 = (((PyObject *)__pyx_v_self->_stderr) != Py_None);
  104473. __pyx_t_1 = (__pyx_t_2 != 0);
  104474. if (__pyx_t_1) {
  104475. /* "uvloop/handles/process.pyx":658
  104476. * self._stdout.close()
  104477. * if self._stderr is not None:
  104478. * self._stderr.close() # <<<<<<<<<<<<<<
  104479. *
  104480. * if self._returncode is not None:
  104481. */
  104482. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_stderr), __pyx_n_s_close); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 658, __pyx_L1_error)
  104483. __Pyx_GOTREF(__pyx_t_4);
  104484. __pyx_t_5 = NULL;
  104485. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
  104486. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
  104487. if (likely(__pyx_t_5)) {
  104488. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  104489. __Pyx_INCREF(__pyx_t_5);
  104490. __Pyx_INCREF(function);
  104491. __Pyx_DECREF_SET(__pyx_t_4, function);
  104492. }
  104493. }
  104494. __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
  104495. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  104496. if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 658, __pyx_L1_error)
  104497. __Pyx_GOTREF(__pyx_t_3);
  104498. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  104499. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  104500. /* "uvloop/handles/process.pyx":657
  104501. * if self._stdout is not None:
  104502. * self._stdout.close()
  104503. * if self._stderr is not None: # <<<<<<<<<<<<<<
  104504. * self._stderr.close()
  104505. *
  104506. */
  104507. }
  104508. /* "uvloop/handles/process.pyx":660
  104509. * self._stderr.close()
  104510. *
  104511. * if self._returncode is not None: # <<<<<<<<<<<<<<
  104512. * # The process is dead, just close the UV handle.
  104513. * #
  104514. */
  104515. __pyx_t_1 = (__pyx_v_self->__pyx_base._returncode != Py_None);
  104516. __pyx_t_2 = (__pyx_t_1 != 0);
  104517. if (__pyx_t_2) {
  104518. /* "uvloop/handles/process.pyx":667
  104519. * # which the transport will be GC'ed and the uvhandle will be
  104520. * # closed in UVHandle.__dealloc__.)
  104521. * self._close() # <<<<<<<<<<<<<<
  104522. *
  104523. * def get_extra_info(self, name, default=None):
  104524. */
  104525. __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcessTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._close(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 667, __pyx_L1_error)
  104526. __Pyx_GOTREF(__pyx_t_3);
  104527. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  104528. /* "uvloop/handles/process.pyx":660
  104529. * self._stderr.close()
  104530. *
  104531. * if self._returncode is not None: # <<<<<<<<<<<<<<
  104532. * # The process is dead, just close the UV handle.
  104533. * #
  104534. */
  104535. }
  104536. /* "uvloop/handles/process.pyx":649
  104537. * return self._closed
  104538. *
  104539. * def close(self): # <<<<<<<<<<<<<<
  104540. * if self._returncode is None:
  104541. * self._kill(uv.SIGKILL)
  104542. */
  104543. /* function exit code */
  104544. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  104545. goto __pyx_L0;
  104546. __pyx_L1_error:;
  104547. __Pyx_XDECREF(__pyx_t_3);
  104548. __Pyx_XDECREF(__pyx_t_4);
  104549. __Pyx_XDECREF(__pyx_t_5);
  104550. __Pyx_AddTraceback("uvloop.loop.UVProcessTransport.close", __pyx_clineno, __pyx_lineno, __pyx_filename);
  104551. __pyx_r = NULL;
  104552. __pyx_L0:;
  104553. __Pyx_XGIVEREF(__pyx_r);
  104554. __Pyx_RefNannyFinishContext();
  104555. return __pyx_r;
  104556. }
  104557. /* "uvloop/handles/process.pyx":669
  104558. * self._close()
  104559. *
  104560. * def get_extra_info(self, name, default=None): # <<<<<<<<<<<<<<
  104561. * return default
  104562. *
  104563. */
  104564. /* Python wrapper */
  104565. static PyObject *__pyx_pw_6uvloop_4loop_18UVProcessTransport_25get_extra_info(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  104566. static char __pyx_doc_6uvloop_4loop_18UVProcessTransport_24get_extra_info[] = "UVProcessTransport.get_extra_info(self, name, default=None)";
  104567. static PyObject *__pyx_pw_6uvloop_4loop_18UVProcessTransport_25get_extra_info(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  104568. CYTHON_UNUSED PyObject *__pyx_v_name = 0;
  104569. PyObject *__pyx_v_default = 0;
  104570. PyObject *__pyx_r = 0;
  104571. __Pyx_RefNannyDeclarations
  104572. __Pyx_RefNannySetupContext("get_extra_info (wrapper)", 0);
  104573. {
  104574. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name_2,&__pyx_n_s_default,0};
  104575. PyObject* values[2] = {0,0};
  104576. values[1] = ((PyObject *)Py_None);
  104577. if (unlikely(__pyx_kwds)) {
  104578. Py_ssize_t kw_args;
  104579. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  104580. switch (pos_args) {
  104581. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  104582. CYTHON_FALLTHROUGH;
  104583. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  104584. CYTHON_FALLTHROUGH;
  104585. case 0: break;
  104586. default: goto __pyx_L5_argtuple_error;
  104587. }
  104588. kw_args = PyDict_Size(__pyx_kwds);
  104589. switch (pos_args) {
  104590. case 0:
  104591. if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name_2)) != 0)) kw_args--;
  104592. else goto __pyx_L5_argtuple_error;
  104593. CYTHON_FALLTHROUGH;
  104594. case 1:
  104595. if (kw_args > 0) {
  104596. PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_default);
  104597. if (value) { values[1] = value; kw_args--; }
  104598. }
  104599. }
  104600. if (unlikely(kw_args > 0)) {
  104601. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_extra_info") < 0)) __PYX_ERR(6, 669, __pyx_L3_error)
  104602. }
  104603. } else {
  104604. switch (PyTuple_GET_SIZE(__pyx_args)) {
  104605. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  104606. CYTHON_FALLTHROUGH;
  104607. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  104608. break;
  104609. default: goto __pyx_L5_argtuple_error;
  104610. }
  104611. }
  104612. __pyx_v_name = values[0];
  104613. __pyx_v_default = values[1];
  104614. }
  104615. goto __pyx_L4_argument_unpacking_done;
  104616. __pyx_L5_argtuple_error:;
  104617. __Pyx_RaiseArgtupleInvalid("get_extra_info", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(6, 669, __pyx_L3_error)
  104618. __pyx_L3_error:;
  104619. __Pyx_AddTraceback("uvloop.loop.UVProcessTransport.get_extra_info", __pyx_clineno, __pyx_lineno, __pyx_filename);
  104620. __Pyx_RefNannyFinishContext();
  104621. return NULL;
  104622. __pyx_L4_argument_unpacking_done:;
  104623. __pyx_r = __pyx_pf_6uvloop_4loop_18UVProcessTransport_24get_extra_info(((struct __pyx_obj_6uvloop_4loop_UVProcessTransport *)__pyx_v_self), __pyx_v_name, __pyx_v_default);
  104624. /* function exit code */
  104625. __Pyx_RefNannyFinishContext();
  104626. return __pyx_r;
  104627. }
  104628. static PyObject *__pyx_pf_6uvloop_4loop_18UVProcessTransport_24get_extra_info(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_name, PyObject *__pyx_v_default) {
  104629. PyObject *__pyx_r = NULL;
  104630. __Pyx_RefNannyDeclarations
  104631. __Pyx_RefNannySetupContext("get_extra_info", 0);
  104632. /* "uvloop/handles/process.pyx":670
  104633. *
  104634. * def get_extra_info(self, name, default=None):
  104635. * return default # <<<<<<<<<<<<<<
  104636. *
  104637. * def _wait(self):
  104638. */
  104639. __Pyx_XDECREF(__pyx_r);
  104640. __Pyx_INCREF(__pyx_v_default);
  104641. __pyx_r = __pyx_v_default;
  104642. goto __pyx_L0;
  104643. /* "uvloop/handles/process.pyx":669
  104644. * self._close()
  104645. *
  104646. * def get_extra_info(self, name, default=None): # <<<<<<<<<<<<<<
  104647. * return default
  104648. *
  104649. */
  104650. /* function exit code */
  104651. __pyx_L0:;
  104652. __Pyx_XGIVEREF(__pyx_r);
  104653. __Pyx_RefNannyFinishContext();
  104654. return __pyx_r;
  104655. }
  104656. /* "uvloop/handles/process.pyx":672
  104657. * return default
  104658. *
  104659. * def _wait(self): # <<<<<<<<<<<<<<
  104660. * fut = self._loop._new_future()
  104661. * if self._returncode is not None:
  104662. */
  104663. /* Python wrapper */
  104664. static PyObject *__pyx_pw_6uvloop_4loop_18UVProcessTransport_27_wait(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  104665. static char __pyx_doc_6uvloop_4loop_18UVProcessTransport_26_wait[] = "UVProcessTransport._wait(self)";
  104666. static PyObject *__pyx_pw_6uvloop_4loop_18UVProcessTransport_27_wait(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  104667. PyObject *__pyx_r = 0;
  104668. __Pyx_RefNannyDeclarations
  104669. __Pyx_RefNannySetupContext("_wait (wrapper)", 0);
  104670. __pyx_r = __pyx_pf_6uvloop_4loop_18UVProcessTransport_26_wait(((struct __pyx_obj_6uvloop_4loop_UVProcessTransport *)__pyx_v_self));
  104671. /* function exit code */
  104672. __Pyx_RefNannyFinishContext();
  104673. return __pyx_r;
  104674. }
  104675. static PyObject *__pyx_pf_6uvloop_4loop_18UVProcessTransport_26_wait(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self) {
  104676. PyObject *__pyx_v_fut = NULL;
  104677. PyObject *__pyx_r = NULL;
  104678. __Pyx_RefNannyDeclarations
  104679. PyObject *__pyx_t_1 = NULL;
  104680. int __pyx_t_2;
  104681. int __pyx_t_3;
  104682. PyObject *__pyx_t_4 = NULL;
  104683. PyObject *__pyx_t_5 = NULL;
  104684. int __pyx_t_6;
  104685. __Pyx_RefNannySetupContext("_wait", 0);
  104686. /* "uvloop/handles/process.pyx":673
  104687. *
  104688. * def _wait(self):
  104689. * fut = self._loop._new_future() # <<<<<<<<<<<<<<
  104690. * if self._returncode is not None:
  104691. * fut.set_result(self._returncode)
  104692. */
  104693. __pyx_t_1 = __pyx_f_6uvloop_4loop_4Loop__new_future(__pyx_v_self->__pyx_base.__pyx_base._loop); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 673, __pyx_L1_error)
  104694. __Pyx_GOTREF(__pyx_t_1);
  104695. __pyx_v_fut = __pyx_t_1;
  104696. __pyx_t_1 = 0;
  104697. /* "uvloop/handles/process.pyx":674
  104698. * def _wait(self):
  104699. * fut = self._loop._new_future()
  104700. * if self._returncode is not None: # <<<<<<<<<<<<<<
  104701. * fut.set_result(self._returncode)
  104702. * return fut
  104703. */
  104704. __pyx_t_2 = (__pyx_v_self->__pyx_base._returncode != Py_None);
  104705. __pyx_t_3 = (__pyx_t_2 != 0);
  104706. if (__pyx_t_3) {
  104707. /* "uvloop/handles/process.pyx":675
  104708. * fut = self._loop._new_future()
  104709. * if self._returncode is not None:
  104710. * fut.set_result(self._returncode) # <<<<<<<<<<<<<<
  104711. * return fut
  104712. *
  104713. */
  104714. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_fut, __pyx_n_s_set_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 675, __pyx_L1_error)
  104715. __Pyx_GOTREF(__pyx_t_4);
  104716. __pyx_t_5 = NULL;
  104717. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
  104718. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
  104719. if (likely(__pyx_t_5)) {
  104720. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  104721. __Pyx_INCREF(__pyx_t_5);
  104722. __Pyx_INCREF(function);
  104723. __Pyx_DECREF_SET(__pyx_t_4, function);
  104724. }
  104725. }
  104726. __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_self->__pyx_base._returncode) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_self->__pyx_base._returncode);
  104727. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  104728. if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 675, __pyx_L1_error)
  104729. __Pyx_GOTREF(__pyx_t_1);
  104730. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  104731. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  104732. /* "uvloop/handles/process.pyx":676
  104733. * if self._returncode is not None:
  104734. * fut.set_result(self._returncode)
  104735. * return fut # <<<<<<<<<<<<<<
  104736. *
  104737. * self._exit_waiters.append(fut)
  104738. */
  104739. __Pyx_XDECREF(__pyx_r);
  104740. __Pyx_INCREF(__pyx_v_fut);
  104741. __pyx_r = __pyx_v_fut;
  104742. goto __pyx_L0;
  104743. /* "uvloop/handles/process.pyx":674
  104744. * def _wait(self):
  104745. * fut = self._loop._new_future()
  104746. * if self._returncode is not None: # <<<<<<<<<<<<<<
  104747. * fut.set_result(self._returncode)
  104748. * return fut
  104749. */
  104750. }
  104751. /* "uvloop/handles/process.pyx":678
  104752. * return fut
  104753. *
  104754. * self._exit_waiters.append(fut) # <<<<<<<<<<<<<<
  104755. * return fut
  104756. *
  104757. */
  104758. if (unlikely(__pyx_v_self->_exit_waiters == Py_None)) {
  104759. PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append");
  104760. __PYX_ERR(6, 678, __pyx_L1_error)
  104761. }
  104762. __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_self->_exit_waiters, __pyx_v_fut); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(6, 678, __pyx_L1_error)
  104763. /* "uvloop/handles/process.pyx":679
  104764. *
  104765. * self._exit_waiters.append(fut)
  104766. * return fut # <<<<<<<<<<<<<<
  104767. *
  104768. *
  104769. */
  104770. __Pyx_XDECREF(__pyx_r);
  104771. __Pyx_INCREF(__pyx_v_fut);
  104772. __pyx_r = __pyx_v_fut;
  104773. goto __pyx_L0;
  104774. /* "uvloop/handles/process.pyx":672
  104775. * return default
  104776. *
  104777. * def _wait(self): # <<<<<<<<<<<<<<
  104778. * fut = self._loop._new_future()
  104779. * if self._returncode is not None:
  104780. */
  104781. /* function exit code */
  104782. __pyx_L1_error:;
  104783. __Pyx_XDECREF(__pyx_t_1);
  104784. __Pyx_XDECREF(__pyx_t_4);
  104785. __Pyx_XDECREF(__pyx_t_5);
  104786. __Pyx_AddTraceback("uvloop.loop.UVProcessTransport._wait", __pyx_clineno, __pyx_lineno, __pyx_filename);
  104787. __pyx_r = NULL;
  104788. __pyx_L0:;
  104789. __Pyx_XDECREF(__pyx_v_fut);
  104790. __Pyx_XGIVEREF(__pyx_r);
  104791. __Pyx_RefNannyFinishContext();
  104792. return __pyx_r;
  104793. }
  104794. /* "(tree fragment)":1
  104795. * def __reduce_cython__(self): # <<<<<<<<<<<<<<
  104796. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  104797. * def __setstate_cython__(self, __pyx_state):
  104798. */
  104799. /* Python wrapper */
  104800. static PyObject *__pyx_pw_6uvloop_4loop_18UVProcessTransport_29__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  104801. static char __pyx_doc_6uvloop_4loop_18UVProcessTransport_28__reduce_cython__[] = "UVProcessTransport.__reduce_cython__(self)";
  104802. static PyObject *__pyx_pw_6uvloop_4loop_18UVProcessTransport_29__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  104803. PyObject *__pyx_r = 0;
  104804. __Pyx_RefNannyDeclarations
  104805. __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  104806. __pyx_r = __pyx_pf_6uvloop_4loop_18UVProcessTransport_28__reduce_cython__(((struct __pyx_obj_6uvloop_4loop_UVProcessTransport *)__pyx_v_self));
  104807. /* function exit code */
  104808. __Pyx_RefNannyFinishContext();
  104809. return __pyx_r;
  104810. }
  104811. static PyObject *__pyx_pf_6uvloop_4loop_18UVProcessTransport_28__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self) {
  104812. PyObject *__pyx_r = NULL;
  104813. __Pyx_RefNannyDeclarations
  104814. PyObject *__pyx_t_1 = NULL;
  104815. __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  104816. /* "(tree fragment)":2
  104817. * def __reduce_cython__(self):
  104818. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  104819. * def __setstate_cython__(self, __pyx_state):
  104820. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  104821. */
  104822. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__179, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 2, __pyx_L1_error)
  104823. __Pyx_GOTREF(__pyx_t_1);
  104824. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  104825. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  104826. __PYX_ERR(9, 2, __pyx_L1_error)
  104827. /* "(tree fragment)":1
  104828. * def __reduce_cython__(self): # <<<<<<<<<<<<<<
  104829. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  104830. * def __setstate_cython__(self, __pyx_state):
  104831. */
  104832. /* function exit code */
  104833. __pyx_L1_error:;
  104834. __Pyx_XDECREF(__pyx_t_1);
  104835. __Pyx_AddTraceback("uvloop.loop.UVProcessTransport.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  104836. __pyx_r = NULL;
  104837. __Pyx_XGIVEREF(__pyx_r);
  104838. __Pyx_RefNannyFinishContext();
  104839. return __pyx_r;
  104840. }
  104841. /* "(tree fragment)":3
  104842. * def __reduce_cython__(self):
  104843. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  104844. * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
  104845. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  104846. */
  104847. /* Python wrapper */
  104848. static PyObject *__pyx_pw_6uvloop_4loop_18UVProcessTransport_31__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
  104849. static char __pyx_doc_6uvloop_4loop_18UVProcessTransport_30__setstate_cython__[] = "UVProcessTransport.__setstate_cython__(self, __pyx_state)";
  104850. static PyObject *__pyx_pw_6uvloop_4loop_18UVProcessTransport_31__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  104851. PyObject *__pyx_r = 0;
  104852. __Pyx_RefNannyDeclarations
  104853. __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  104854. __pyx_r = __pyx_pf_6uvloop_4loop_18UVProcessTransport_30__setstate_cython__(((struct __pyx_obj_6uvloop_4loop_UVProcessTransport *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
  104855. /* function exit code */
  104856. __Pyx_RefNannyFinishContext();
  104857. return __pyx_r;
  104858. }
  104859. static PyObject *__pyx_pf_6uvloop_4loop_18UVProcessTransport_30__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  104860. PyObject *__pyx_r = NULL;
  104861. __Pyx_RefNannyDeclarations
  104862. PyObject *__pyx_t_1 = NULL;
  104863. __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  104864. /* "(tree fragment)":4
  104865. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  104866. * def __setstate_cython__(self, __pyx_state):
  104867. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  104868. */
  104869. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__180, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 4, __pyx_L1_error)
  104870. __Pyx_GOTREF(__pyx_t_1);
  104871. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  104872. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  104873. __PYX_ERR(9, 4, __pyx_L1_error)
  104874. /* "(tree fragment)":3
  104875. * def __reduce_cython__(self):
  104876. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  104877. * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
  104878. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  104879. */
  104880. /* function exit code */
  104881. __pyx_L1_error:;
  104882. __Pyx_XDECREF(__pyx_t_1);
  104883. __Pyx_AddTraceback("uvloop.loop.UVProcessTransport.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  104884. __pyx_r = NULL;
  104885. __Pyx_XGIVEREF(__pyx_r);
  104886. __Pyx_RefNannyFinishContext();
  104887. return __pyx_r;
  104888. }
  104889. /* "uvloop/handles/process.pyx":684
  104890. * class WriteSubprocessPipeProto(aio_BaseProtocol):
  104891. *
  104892. * def __init__(self, proc, fd): # <<<<<<<<<<<<<<
  104893. * if UVLOOP_DEBUG:
  104894. * if type(proc) is not UVProcessTransport:
  104895. */
  104896. /* Python wrapper */
  104897. static PyObject *__pyx_pw_6uvloop_4loop_24WriteSubprocessPipeProto_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  104898. static char __pyx_doc_6uvloop_4loop_24WriteSubprocessPipeProto___init__[] = "WriteSubprocessPipeProto.__init__(self, proc, fd)";
  104899. static PyMethodDef __pyx_mdef_6uvloop_4loop_24WriteSubprocessPipeProto_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6uvloop_4loop_24WriteSubprocessPipeProto_1__init__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_24WriteSubprocessPipeProto___init__};
  104900. static PyObject *__pyx_pw_6uvloop_4loop_24WriteSubprocessPipeProto_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  104901. PyObject *__pyx_v_self = 0;
  104902. PyObject *__pyx_v_proc = 0;
  104903. PyObject *__pyx_v_fd = 0;
  104904. PyObject *__pyx_r = 0;
  104905. __Pyx_RefNannyDeclarations
  104906. __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  104907. {
  104908. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self_2,&__pyx_n_s_proc,&__pyx_n_s_fd,0};
  104909. PyObject* values[3] = {0,0,0};
  104910. if (unlikely(__pyx_kwds)) {
  104911. Py_ssize_t kw_args;
  104912. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  104913. switch (pos_args) {
  104914. case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
  104915. CYTHON_FALLTHROUGH;
  104916. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  104917. CYTHON_FALLTHROUGH;
  104918. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  104919. CYTHON_FALLTHROUGH;
  104920. case 0: break;
  104921. default: goto __pyx_L5_argtuple_error;
  104922. }
  104923. kw_args = PyDict_Size(__pyx_kwds);
  104924. switch (pos_args) {
  104925. case 0:
  104926. if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self_2)) != 0)) kw_args--;
  104927. else goto __pyx_L5_argtuple_error;
  104928. CYTHON_FALLTHROUGH;
  104929. case 1:
  104930. if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_proc)) != 0)) kw_args--;
  104931. else {
  104932. __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 1); __PYX_ERR(6, 684, __pyx_L3_error)
  104933. }
  104934. CYTHON_FALLTHROUGH;
  104935. case 2:
  104936. if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_fd)) != 0)) kw_args--;
  104937. else {
  104938. __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 2); __PYX_ERR(6, 684, __pyx_L3_error)
  104939. }
  104940. }
  104941. if (unlikely(kw_args > 0)) {
  104942. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(6, 684, __pyx_L3_error)
  104943. }
  104944. } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
  104945. goto __pyx_L5_argtuple_error;
  104946. } else {
  104947. values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  104948. values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  104949. values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
  104950. }
  104951. __pyx_v_self = values[0];
  104952. __pyx_v_proc = values[1];
  104953. __pyx_v_fd = values[2];
  104954. }
  104955. goto __pyx_L4_argument_unpacking_done;
  104956. __pyx_L5_argtuple_error:;
  104957. __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(6, 684, __pyx_L3_error)
  104958. __pyx_L3_error:;
  104959. __Pyx_AddTraceback("uvloop.loop.WriteSubprocessPipeProto.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  104960. __Pyx_RefNannyFinishContext();
  104961. return NULL;
  104962. __pyx_L4_argument_unpacking_done:;
  104963. __pyx_r = __pyx_pf_6uvloop_4loop_24WriteSubprocessPipeProto___init__(__pyx_self, __pyx_v_self, __pyx_v_proc, __pyx_v_fd);
  104964. /* function exit code */
  104965. __Pyx_RefNannyFinishContext();
  104966. return __pyx_r;
  104967. }
  104968. static PyObject *__pyx_pf_6uvloop_4loop_24WriteSubprocessPipeProto___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_proc, PyObject *__pyx_v_fd) {
  104969. PyObject *__pyx_r = NULL;
  104970. __Pyx_RefNannyDeclarations
  104971. int __pyx_t_1;
  104972. int __pyx_t_2;
  104973. __Pyx_RefNannySetupContext("__init__", 0);
  104974. /* "uvloop/handles/process.pyx":685
  104975. *
  104976. * def __init__(self, proc, fd):
  104977. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  104978. * if type(proc) is not UVProcessTransport:
  104979. * raise TypeError
  104980. */
  104981. __pyx_t_1 = (UVLOOP_DEBUG != 0);
  104982. if (__pyx_t_1) {
  104983. /* "uvloop/handles/process.pyx":686
  104984. * def __init__(self, proc, fd):
  104985. * if UVLOOP_DEBUG:
  104986. * if type(proc) is not UVProcessTransport: # <<<<<<<<<<<<<<
  104987. * raise TypeError
  104988. * if not isinstance(fd, int):
  104989. */
  104990. __pyx_t_1 = (((PyObject *)Py_TYPE(__pyx_v_proc)) != ((PyObject *)__pyx_ptype_6uvloop_4loop_UVProcessTransport));
  104991. __pyx_t_2 = (__pyx_t_1 != 0);
  104992. if (unlikely(__pyx_t_2)) {
  104993. /* "uvloop/handles/process.pyx":687
  104994. * if UVLOOP_DEBUG:
  104995. * if type(proc) is not UVProcessTransport:
  104996. * raise TypeError # <<<<<<<<<<<<<<
  104997. * if not isinstance(fd, int):
  104998. * raise TypeError
  104999. */
  105000. __Pyx_Raise(__pyx_builtin_TypeError, 0, 0, 0);
  105001. __PYX_ERR(6, 687, __pyx_L1_error)
  105002. /* "uvloop/handles/process.pyx":686
  105003. * def __init__(self, proc, fd):
  105004. * if UVLOOP_DEBUG:
  105005. * if type(proc) is not UVProcessTransport: # <<<<<<<<<<<<<<
  105006. * raise TypeError
  105007. * if not isinstance(fd, int):
  105008. */
  105009. }
  105010. /* "uvloop/handles/process.pyx":688
  105011. * if type(proc) is not UVProcessTransport:
  105012. * raise TypeError
  105013. * if not isinstance(fd, int): # <<<<<<<<<<<<<<
  105014. * raise TypeError
  105015. * self.proc = proc
  105016. */
  105017. __pyx_t_2 = PyInt_Check(__pyx_v_fd);
  105018. __pyx_t_1 = ((!(__pyx_t_2 != 0)) != 0);
  105019. if (unlikely(__pyx_t_1)) {
  105020. /* "uvloop/handles/process.pyx":689
  105021. * raise TypeError
  105022. * if not isinstance(fd, int):
  105023. * raise TypeError # <<<<<<<<<<<<<<
  105024. * self.proc = proc
  105025. * self.fd = fd
  105026. */
  105027. __Pyx_Raise(__pyx_builtin_TypeError, 0, 0, 0);
  105028. __PYX_ERR(6, 689, __pyx_L1_error)
  105029. /* "uvloop/handles/process.pyx":688
  105030. * if type(proc) is not UVProcessTransport:
  105031. * raise TypeError
  105032. * if not isinstance(fd, int): # <<<<<<<<<<<<<<
  105033. * raise TypeError
  105034. * self.proc = proc
  105035. */
  105036. }
  105037. /* "uvloop/handles/process.pyx":685
  105038. *
  105039. * def __init__(self, proc, fd):
  105040. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  105041. * if type(proc) is not UVProcessTransport:
  105042. * raise TypeError
  105043. */
  105044. }
  105045. /* "uvloop/handles/process.pyx":690
  105046. * if not isinstance(fd, int):
  105047. * raise TypeError
  105048. * self.proc = proc # <<<<<<<<<<<<<<
  105049. * self.fd = fd
  105050. * self.pipe = None
  105051. */
  105052. if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_proc, __pyx_v_proc) < 0) __PYX_ERR(6, 690, __pyx_L1_error)
  105053. /* "uvloop/handles/process.pyx":691
  105054. * raise TypeError
  105055. * self.proc = proc
  105056. * self.fd = fd # <<<<<<<<<<<<<<
  105057. * self.pipe = None
  105058. * self.disconnected = False
  105059. */
  105060. if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_fd, __pyx_v_fd) < 0) __PYX_ERR(6, 691, __pyx_L1_error)
  105061. /* "uvloop/handles/process.pyx":692
  105062. * self.proc = proc
  105063. * self.fd = fd
  105064. * self.pipe = None # <<<<<<<<<<<<<<
  105065. * self.disconnected = False
  105066. *
  105067. */
  105068. if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_pipe, Py_None) < 0) __PYX_ERR(6, 692, __pyx_L1_error)
  105069. /* "uvloop/handles/process.pyx":693
  105070. * self.fd = fd
  105071. * self.pipe = None
  105072. * self.disconnected = False # <<<<<<<<<<<<<<
  105073. *
  105074. * def connection_made(self, transport):
  105075. */
  105076. if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_disconnected, Py_False) < 0) __PYX_ERR(6, 693, __pyx_L1_error)
  105077. /* "uvloop/handles/process.pyx":684
  105078. * class WriteSubprocessPipeProto(aio_BaseProtocol):
  105079. *
  105080. * def __init__(self, proc, fd): # <<<<<<<<<<<<<<
  105081. * if UVLOOP_DEBUG:
  105082. * if type(proc) is not UVProcessTransport:
  105083. */
  105084. /* function exit code */
  105085. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  105086. goto __pyx_L0;
  105087. __pyx_L1_error:;
  105088. __Pyx_AddTraceback("uvloop.loop.WriteSubprocessPipeProto.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  105089. __pyx_r = NULL;
  105090. __pyx_L0:;
  105091. __Pyx_XGIVEREF(__pyx_r);
  105092. __Pyx_RefNannyFinishContext();
  105093. return __pyx_r;
  105094. }
  105095. /* "uvloop/handles/process.pyx":695
  105096. * self.disconnected = False
  105097. *
  105098. * def connection_made(self, transport): # <<<<<<<<<<<<<<
  105099. * self.pipe = transport
  105100. *
  105101. */
  105102. /* Python wrapper */
  105103. static PyObject *__pyx_pw_6uvloop_4loop_24WriteSubprocessPipeProto_3connection_made(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  105104. static char __pyx_doc_6uvloop_4loop_24WriteSubprocessPipeProto_2connection_made[] = "WriteSubprocessPipeProto.connection_made(self, transport)";
  105105. static PyMethodDef __pyx_mdef_6uvloop_4loop_24WriteSubprocessPipeProto_3connection_made = {"connection_made", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6uvloop_4loop_24WriteSubprocessPipeProto_3connection_made, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_24WriteSubprocessPipeProto_2connection_made};
  105106. static PyObject *__pyx_pw_6uvloop_4loop_24WriteSubprocessPipeProto_3connection_made(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  105107. PyObject *__pyx_v_self = 0;
  105108. PyObject *__pyx_v_transport = 0;
  105109. PyObject *__pyx_r = 0;
  105110. __Pyx_RefNannyDeclarations
  105111. __Pyx_RefNannySetupContext("connection_made (wrapper)", 0);
  105112. {
  105113. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self_2,&__pyx_n_s_transport,0};
  105114. PyObject* values[2] = {0,0};
  105115. if (unlikely(__pyx_kwds)) {
  105116. Py_ssize_t kw_args;
  105117. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  105118. switch (pos_args) {
  105119. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  105120. CYTHON_FALLTHROUGH;
  105121. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  105122. CYTHON_FALLTHROUGH;
  105123. case 0: break;
  105124. default: goto __pyx_L5_argtuple_error;
  105125. }
  105126. kw_args = PyDict_Size(__pyx_kwds);
  105127. switch (pos_args) {
  105128. case 0:
  105129. if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self_2)) != 0)) kw_args--;
  105130. else goto __pyx_L5_argtuple_error;
  105131. CYTHON_FALLTHROUGH;
  105132. case 1:
  105133. if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_transport)) != 0)) kw_args--;
  105134. else {
  105135. __Pyx_RaiseArgtupleInvalid("connection_made", 1, 2, 2, 1); __PYX_ERR(6, 695, __pyx_L3_error)
  105136. }
  105137. }
  105138. if (unlikely(kw_args > 0)) {
  105139. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "connection_made") < 0)) __PYX_ERR(6, 695, __pyx_L3_error)
  105140. }
  105141. } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
  105142. goto __pyx_L5_argtuple_error;
  105143. } else {
  105144. values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  105145. values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  105146. }
  105147. __pyx_v_self = values[0];
  105148. __pyx_v_transport = values[1];
  105149. }
  105150. goto __pyx_L4_argument_unpacking_done;
  105151. __pyx_L5_argtuple_error:;
  105152. __Pyx_RaiseArgtupleInvalid("connection_made", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(6, 695, __pyx_L3_error)
  105153. __pyx_L3_error:;
  105154. __Pyx_AddTraceback("uvloop.loop.WriteSubprocessPipeProto.connection_made", __pyx_clineno, __pyx_lineno, __pyx_filename);
  105155. __Pyx_RefNannyFinishContext();
  105156. return NULL;
  105157. __pyx_L4_argument_unpacking_done:;
  105158. __pyx_r = __pyx_pf_6uvloop_4loop_24WriteSubprocessPipeProto_2connection_made(__pyx_self, __pyx_v_self, __pyx_v_transport);
  105159. /* function exit code */
  105160. __Pyx_RefNannyFinishContext();
  105161. return __pyx_r;
  105162. }
  105163. static PyObject *__pyx_pf_6uvloop_4loop_24WriteSubprocessPipeProto_2connection_made(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_transport) {
  105164. PyObject *__pyx_r = NULL;
  105165. __Pyx_RefNannyDeclarations
  105166. __Pyx_RefNannySetupContext("connection_made", 0);
  105167. /* "uvloop/handles/process.pyx":696
  105168. *
  105169. * def connection_made(self, transport):
  105170. * self.pipe = transport # <<<<<<<<<<<<<<
  105171. *
  105172. * def __repr__(self):
  105173. */
  105174. if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_pipe, __pyx_v_transport) < 0) __PYX_ERR(6, 696, __pyx_L1_error)
  105175. /* "uvloop/handles/process.pyx":695
  105176. * self.disconnected = False
  105177. *
  105178. * def connection_made(self, transport): # <<<<<<<<<<<<<<
  105179. * self.pipe = transport
  105180. *
  105181. */
  105182. /* function exit code */
  105183. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  105184. goto __pyx_L0;
  105185. __pyx_L1_error:;
  105186. __Pyx_AddTraceback("uvloop.loop.WriteSubprocessPipeProto.connection_made", __pyx_clineno, __pyx_lineno, __pyx_filename);
  105187. __pyx_r = NULL;
  105188. __pyx_L0:;
  105189. __Pyx_XGIVEREF(__pyx_r);
  105190. __Pyx_RefNannyFinishContext();
  105191. return __pyx_r;
  105192. }
  105193. /* "uvloop/handles/process.pyx":698
  105194. * self.pipe = transport
  105195. *
  105196. * def __repr__(self): # <<<<<<<<<<<<<<
  105197. * return ('<%s fd=%s pipe=%r>'
  105198. * % (self.__class__.__name__, self.fd, self.pipe))
  105199. */
  105200. /* Python wrapper */
  105201. static PyObject *__pyx_pw_6uvloop_4loop_24WriteSubprocessPipeProto_5__repr__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
  105202. static char __pyx_doc_6uvloop_4loop_24WriteSubprocessPipeProto_4__repr__[] = "WriteSubprocessPipeProto.__repr__(self)";
  105203. static PyMethodDef __pyx_mdef_6uvloop_4loop_24WriteSubprocessPipeProto_5__repr__ = {"__repr__", (PyCFunction)__pyx_pw_6uvloop_4loop_24WriteSubprocessPipeProto_5__repr__, METH_O, __pyx_doc_6uvloop_4loop_24WriteSubprocessPipeProto_4__repr__};
  105204. static PyObject *__pyx_pw_6uvloop_4loop_24WriteSubprocessPipeProto_5__repr__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  105205. PyObject *__pyx_r = 0;
  105206. __Pyx_RefNannyDeclarations
  105207. __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  105208. __pyx_r = __pyx_pf_6uvloop_4loop_24WriteSubprocessPipeProto_4__repr__(__pyx_self, ((PyObject *)__pyx_v_self));
  105209. /* function exit code */
  105210. __Pyx_RefNannyFinishContext();
  105211. return __pyx_r;
  105212. }
  105213. static PyObject *__pyx_pf_6uvloop_4loop_24WriteSubprocessPipeProto_4__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  105214. PyObject *__pyx_r = NULL;
  105215. __Pyx_RefNannyDeclarations
  105216. PyObject *__pyx_t_1 = NULL;
  105217. Py_ssize_t __pyx_t_2;
  105218. Py_UCS4 __pyx_t_3;
  105219. PyObject *__pyx_t_4 = NULL;
  105220. PyObject *__pyx_t_5 = NULL;
  105221. __Pyx_RefNannySetupContext("__repr__", 0);
  105222. /* "uvloop/handles/process.pyx":699
  105223. *
  105224. * def __repr__(self):
  105225. * return ('<%s fd=%s pipe=%r>' # <<<<<<<<<<<<<<
  105226. * % (self.__class__.__name__, self.fd, self.pipe))
  105227. *
  105228. */
  105229. __Pyx_XDECREF(__pyx_r);
  105230. __pyx_t_1 = PyTuple_New(7); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 699, __pyx_L1_error)
  105231. __Pyx_GOTREF(__pyx_t_1);
  105232. __pyx_t_2 = 0;
  105233. __pyx_t_3 = 127;
  105234. __Pyx_INCREF(__pyx_kp_u__88);
  105235. __pyx_t_2 += 1;
  105236. __Pyx_GIVEREF(__pyx_kp_u__88);
  105237. PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u__88);
  105238. /* "uvloop/handles/process.pyx":700
  105239. * def __repr__(self):
  105240. * return ('<%s fd=%s pipe=%r>'
  105241. * % (self.__class__.__name__, self.fd, self.pipe)) # <<<<<<<<<<<<<<
  105242. *
  105243. * def connection_lost(self, exc):
  105244. */
  105245. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_class); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 700, __pyx_L1_error)
  105246. __Pyx_GOTREF(__pyx_t_4);
  105247. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 700, __pyx_L1_error)
  105248. __Pyx_GOTREF(__pyx_t_5);
  105249. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  105250. __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_5), __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 700, __pyx_L1_error)
  105251. __Pyx_GOTREF(__pyx_t_4);
  105252. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  105253. __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3;
  105254. __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
  105255. __Pyx_GIVEREF(__pyx_t_4);
  105256. PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_4);
  105257. __pyx_t_4 = 0;
  105258. __Pyx_INCREF(__pyx_kp_u_fd_2);
  105259. __pyx_t_2 += 4;
  105260. __Pyx_GIVEREF(__pyx_kp_u_fd_2);
  105261. PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u_fd_2);
  105262. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fd); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 700, __pyx_L1_error)
  105263. __Pyx_GOTREF(__pyx_t_4);
  105264. __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_4), __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 700, __pyx_L1_error)
  105265. __Pyx_GOTREF(__pyx_t_5);
  105266. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  105267. __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3;
  105268. __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
  105269. __Pyx_GIVEREF(__pyx_t_5);
  105270. PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_5);
  105271. __pyx_t_5 = 0;
  105272. __Pyx_INCREF(__pyx_kp_u_pipe_2);
  105273. __pyx_t_2 += 6;
  105274. __Pyx_GIVEREF(__pyx_kp_u_pipe_2);
  105275. PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_kp_u_pipe_2);
  105276. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_pipe); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 700, __pyx_L1_error)
  105277. __Pyx_GOTREF(__pyx_t_5);
  105278. __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_5), __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 700, __pyx_L1_error)
  105279. __Pyx_GOTREF(__pyx_t_4);
  105280. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  105281. __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3;
  105282. __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
  105283. __Pyx_GIVEREF(__pyx_t_4);
  105284. PyTuple_SET_ITEM(__pyx_t_1, 5, __pyx_t_4);
  105285. __pyx_t_4 = 0;
  105286. __Pyx_INCREF(__pyx_kp_u__90);
  105287. __pyx_t_2 += 1;
  105288. __Pyx_GIVEREF(__pyx_kp_u__90);
  105289. PyTuple_SET_ITEM(__pyx_t_1, 6, __pyx_kp_u__90);
  105290. /* "uvloop/handles/process.pyx":699
  105291. *
  105292. * def __repr__(self):
  105293. * return ('<%s fd=%s pipe=%r>' # <<<<<<<<<<<<<<
  105294. * % (self.__class__.__name__, self.fd, self.pipe))
  105295. *
  105296. */
  105297. __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_1, 7, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 699, __pyx_L1_error)
  105298. __Pyx_GOTREF(__pyx_t_4);
  105299. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  105300. __pyx_r = __pyx_t_4;
  105301. __pyx_t_4 = 0;
  105302. goto __pyx_L0;
  105303. /* "uvloop/handles/process.pyx":698
  105304. * self.pipe = transport
  105305. *
  105306. * def __repr__(self): # <<<<<<<<<<<<<<
  105307. * return ('<%s fd=%s pipe=%r>'
  105308. * % (self.__class__.__name__, self.fd, self.pipe))
  105309. */
  105310. /* function exit code */
  105311. __pyx_L1_error:;
  105312. __Pyx_XDECREF(__pyx_t_1);
  105313. __Pyx_XDECREF(__pyx_t_4);
  105314. __Pyx_XDECREF(__pyx_t_5);
  105315. __Pyx_AddTraceback("uvloop.loop.WriteSubprocessPipeProto.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  105316. __pyx_r = NULL;
  105317. __pyx_L0:;
  105318. __Pyx_XGIVEREF(__pyx_r);
  105319. __Pyx_RefNannyFinishContext();
  105320. return __pyx_r;
  105321. }
  105322. /* "uvloop/handles/process.pyx":702
  105323. * % (self.__class__.__name__, self.fd, self.pipe))
  105324. *
  105325. * def connection_lost(self, exc): # <<<<<<<<<<<<<<
  105326. * self.disconnected = True
  105327. * (<UVProcessTransport>self.proc)._pipe_connection_lost(self.fd, exc)
  105328. */
  105329. /* Python wrapper */
  105330. static PyObject *__pyx_pw_6uvloop_4loop_24WriteSubprocessPipeProto_7connection_lost(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  105331. static char __pyx_doc_6uvloop_4loop_24WriteSubprocessPipeProto_6connection_lost[] = "WriteSubprocessPipeProto.connection_lost(self, exc)";
  105332. static PyMethodDef __pyx_mdef_6uvloop_4loop_24WriteSubprocessPipeProto_7connection_lost = {"connection_lost", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6uvloop_4loop_24WriteSubprocessPipeProto_7connection_lost, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_24WriteSubprocessPipeProto_6connection_lost};
  105333. static PyObject *__pyx_pw_6uvloop_4loop_24WriteSubprocessPipeProto_7connection_lost(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  105334. PyObject *__pyx_v_self = 0;
  105335. PyObject *__pyx_v_exc = 0;
  105336. PyObject *__pyx_r = 0;
  105337. __Pyx_RefNannyDeclarations
  105338. __Pyx_RefNannySetupContext("connection_lost (wrapper)", 0);
  105339. {
  105340. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self_2,&__pyx_n_s_exc,0};
  105341. PyObject* values[2] = {0,0};
  105342. if (unlikely(__pyx_kwds)) {
  105343. Py_ssize_t kw_args;
  105344. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  105345. switch (pos_args) {
  105346. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  105347. CYTHON_FALLTHROUGH;
  105348. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  105349. CYTHON_FALLTHROUGH;
  105350. case 0: break;
  105351. default: goto __pyx_L5_argtuple_error;
  105352. }
  105353. kw_args = PyDict_Size(__pyx_kwds);
  105354. switch (pos_args) {
  105355. case 0:
  105356. if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self_2)) != 0)) kw_args--;
  105357. else goto __pyx_L5_argtuple_error;
  105358. CYTHON_FALLTHROUGH;
  105359. case 1:
  105360. if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_exc)) != 0)) kw_args--;
  105361. else {
  105362. __Pyx_RaiseArgtupleInvalid("connection_lost", 1, 2, 2, 1); __PYX_ERR(6, 702, __pyx_L3_error)
  105363. }
  105364. }
  105365. if (unlikely(kw_args > 0)) {
  105366. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "connection_lost") < 0)) __PYX_ERR(6, 702, __pyx_L3_error)
  105367. }
  105368. } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
  105369. goto __pyx_L5_argtuple_error;
  105370. } else {
  105371. values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  105372. values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  105373. }
  105374. __pyx_v_self = values[0];
  105375. __pyx_v_exc = values[1];
  105376. }
  105377. goto __pyx_L4_argument_unpacking_done;
  105378. __pyx_L5_argtuple_error:;
  105379. __Pyx_RaiseArgtupleInvalid("connection_lost", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(6, 702, __pyx_L3_error)
  105380. __pyx_L3_error:;
  105381. __Pyx_AddTraceback("uvloop.loop.WriteSubprocessPipeProto.connection_lost", __pyx_clineno, __pyx_lineno, __pyx_filename);
  105382. __Pyx_RefNannyFinishContext();
  105383. return NULL;
  105384. __pyx_L4_argument_unpacking_done:;
  105385. __pyx_r = __pyx_pf_6uvloop_4loop_24WriteSubprocessPipeProto_6connection_lost(__pyx_self, __pyx_v_self, __pyx_v_exc);
  105386. /* function exit code */
  105387. __Pyx_RefNannyFinishContext();
  105388. return __pyx_r;
  105389. }
  105390. static PyObject *__pyx_pf_6uvloop_4loop_24WriteSubprocessPipeProto_6connection_lost(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_exc) {
  105391. PyObject *__pyx_r = NULL;
  105392. __Pyx_RefNannyDeclarations
  105393. PyObject *__pyx_t_1 = NULL;
  105394. PyObject *__pyx_t_2 = NULL;
  105395. int __pyx_t_3;
  105396. __Pyx_RefNannySetupContext("connection_lost", 0);
  105397. /* "uvloop/handles/process.pyx":703
  105398. *
  105399. * def connection_lost(self, exc):
  105400. * self.disconnected = True # <<<<<<<<<<<<<<
  105401. * (<UVProcessTransport>self.proc)._pipe_connection_lost(self.fd, exc)
  105402. * self.proc = None
  105403. */
  105404. if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_disconnected, Py_True) < 0) __PYX_ERR(6, 703, __pyx_L1_error)
  105405. /* "uvloop/handles/process.pyx":704
  105406. * def connection_lost(self, exc):
  105407. * self.disconnected = True
  105408. * (<UVProcessTransport>self.proc)._pipe_connection_lost(self.fd, exc) # <<<<<<<<<<<<<<
  105409. * self.proc = None
  105410. *
  105411. */
  105412. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_proc); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 704, __pyx_L1_error)
  105413. __Pyx_GOTREF(__pyx_t_1);
  105414. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fd); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 704, __pyx_L1_error)
  105415. __Pyx_GOTREF(__pyx_t_2);
  105416. __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(6, 704, __pyx_L1_error)
  105417. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  105418. __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcessTransport *)((struct __pyx_obj_6uvloop_4loop_UVProcessTransport *)__pyx_t_1)->__pyx_base.__pyx_base.__pyx_vtab)->_pipe_connection_lost(((struct __pyx_obj_6uvloop_4loop_UVProcessTransport *)__pyx_t_1), __pyx_t_3, __pyx_v_exc); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 704, __pyx_L1_error)
  105419. __Pyx_GOTREF(__pyx_t_2);
  105420. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  105421. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  105422. /* "uvloop/handles/process.pyx":705
  105423. * self.disconnected = True
  105424. * (<UVProcessTransport>self.proc)._pipe_connection_lost(self.fd, exc)
  105425. * self.proc = None # <<<<<<<<<<<<<<
  105426. *
  105427. * def pause_writing(self):
  105428. */
  105429. if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_proc, Py_None) < 0) __PYX_ERR(6, 705, __pyx_L1_error)
  105430. /* "uvloop/handles/process.pyx":702
  105431. * % (self.__class__.__name__, self.fd, self.pipe))
  105432. *
  105433. * def connection_lost(self, exc): # <<<<<<<<<<<<<<
  105434. * self.disconnected = True
  105435. * (<UVProcessTransport>self.proc)._pipe_connection_lost(self.fd, exc)
  105436. */
  105437. /* function exit code */
  105438. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  105439. goto __pyx_L0;
  105440. __pyx_L1_error:;
  105441. __Pyx_XDECREF(__pyx_t_1);
  105442. __Pyx_XDECREF(__pyx_t_2);
  105443. __Pyx_AddTraceback("uvloop.loop.WriteSubprocessPipeProto.connection_lost", __pyx_clineno, __pyx_lineno, __pyx_filename);
  105444. __pyx_r = NULL;
  105445. __pyx_L0:;
  105446. __Pyx_XGIVEREF(__pyx_r);
  105447. __Pyx_RefNannyFinishContext();
  105448. return __pyx_r;
  105449. }
  105450. /* "uvloop/handles/process.pyx":707
  105451. * self.proc = None
  105452. *
  105453. * def pause_writing(self): # <<<<<<<<<<<<<<
  105454. * (<UVProcessTransport>self.proc)._protocol.pause_writing()
  105455. *
  105456. */
  105457. /* Python wrapper */
  105458. static PyObject *__pyx_pw_6uvloop_4loop_24WriteSubprocessPipeProto_9pause_writing(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
  105459. static char __pyx_doc_6uvloop_4loop_24WriteSubprocessPipeProto_8pause_writing[] = "WriteSubprocessPipeProto.pause_writing(self)";
  105460. static PyMethodDef __pyx_mdef_6uvloop_4loop_24WriteSubprocessPipeProto_9pause_writing = {"pause_writing", (PyCFunction)__pyx_pw_6uvloop_4loop_24WriteSubprocessPipeProto_9pause_writing, METH_O, __pyx_doc_6uvloop_4loop_24WriteSubprocessPipeProto_8pause_writing};
  105461. static PyObject *__pyx_pw_6uvloop_4loop_24WriteSubprocessPipeProto_9pause_writing(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  105462. PyObject *__pyx_r = 0;
  105463. __Pyx_RefNannyDeclarations
  105464. __Pyx_RefNannySetupContext("pause_writing (wrapper)", 0);
  105465. __pyx_r = __pyx_pf_6uvloop_4loop_24WriteSubprocessPipeProto_8pause_writing(__pyx_self, ((PyObject *)__pyx_v_self));
  105466. /* function exit code */
  105467. __Pyx_RefNannyFinishContext();
  105468. return __pyx_r;
  105469. }
  105470. static PyObject *__pyx_pf_6uvloop_4loop_24WriteSubprocessPipeProto_8pause_writing(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  105471. PyObject *__pyx_r = NULL;
  105472. __Pyx_RefNannyDeclarations
  105473. PyObject *__pyx_t_1 = NULL;
  105474. PyObject *__pyx_t_2 = NULL;
  105475. PyObject *__pyx_t_3 = NULL;
  105476. __Pyx_RefNannySetupContext("pause_writing", 0);
  105477. /* "uvloop/handles/process.pyx":708
  105478. *
  105479. * def pause_writing(self):
  105480. * (<UVProcessTransport>self.proc)._protocol.pause_writing() # <<<<<<<<<<<<<<
  105481. *
  105482. * def resume_writing(self):
  105483. */
  105484. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_proc); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 708, __pyx_L1_error)
  105485. __Pyx_GOTREF(__pyx_t_2);
  105486. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((struct __pyx_obj_6uvloop_4loop_UVProcessTransport *)__pyx_t_2)->_protocol, __pyx_n_s_pause_writing); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 708, __pyx_L1_error)
  105487. __Pyx_GOTREF(__pyx_t_3);
  105488. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  105489. __pyx_t_2 = NULL;
  105490. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
  105491. __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
  105492. if (likely(__pyx_t_2)) {
  105493. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  105494. __Pyx_INCREF(__pyx_t_2);
  105495. __Pyx_INCREF(function);
  105496. __Pyx_DECREF_SET(__pyx_t_3, function);
  105497. }
  105498. }
  105499. __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
  105500. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  105501. if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 708, __pyx_L1_error)
  105502. __Pyx_GOTREF(__pyx_t_1);
  105503. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  105504. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  105505. /* "uvloop/handles/process.pyx":707
  105506. * self.proc = None
  105507. *
  105508. * def pause_writing(self): # <<<<<<<<<<<<<<
  105509. * (<UVProcessTransport>self.proc)._protocol.pause_writing()
  105510. *
  105511. */
  105512. /* function exit code */
  105513. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  105514. goto __pyx_L0;
  105515. __pyx_L1_error:;
  105516. __Pyx_XDECREF(__pyx_t_1);
  105517. __Pyx_XDECREF(__pyx_t_2);
  105518. __Pyx_XDECREF(__pyx_t_3);
  105519. __Pyx_AddTraceback("uvloop.loop.WriteSubprocessPipeProto.pause_writing", __pyx_clineno, __pyx_lineno, __pyx_filename);
  105520. __pyx_r = NULL;
  105521. __pyx_L0:;
  105522. __Pyx_XGIVEREF(__pyx_r);
  105523. __Pyx_RefNannyFinishContext();
  105524. return __pyx_r;
  105525. }
  105526. /* "uvloop/handles/process.pyx":710
  105527. * (<UVProcessTransport>self.proc)._protocol.pause_writing()
  105528. *
  105529. * def resume_writing(self): # <<<<<<<<<<<<<<
  105530. * (<UVProcessTransport>self.proc)._protocol.resume_writing()
  105531. *
  105532. */
  105533. /* Python wrapper */
  105534. static PyObject *__pyx_pw_6uvloop_4loop_24WriteSubprocessPipeProto_11resume_writing(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
  105535. static char __pyx_doc_6uvloop_4loop_24WriteSubprocessPipeProto_10resume_writing[] = "WriteSubprocessPipeProto.resume_writing(self)";
  105536. static PyMethodDef __pyx_mdef_6uvloop_4loop_24WriteSubprocessPipeProto_11resume_writing = {"resume_writing", (PyCFunction)__pyx_pw_6uvloop_4loop_24WriteSubprocessPipeProto_11resume_writing, METH_O, __pyx_doc_6uvloop_4loop_24WriteSubprocessPipeProto_10resume_writing};
  105537. static PyObject *__pyx_pw_6uvloop_4loop_24WriteSubprocessPipeProto_11resume_writing(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  105538. PyObject *__pyx_r = 0;
  105539. __Pyx_RefNannyDeclarations
  105540. __Pyx_RefNannySetupContext("resume_writing (wrapper)", 0);
  105541. __pyx_r = __pyx_pf_6uvloop_4loop_24WriteSubprocessPipeProto_10resume_writing(__pyx_self, ((PyObject *)__pyx_v_self));
  105542. /* function exit code */
  105543. __Pyx_RefNannyFinishContext();
  105544. return __pyx_r;
  105545. }
  105546. static PyObject *__pyx_pf_6uvloop_4loop_24WriteSubprocessPipeProto_10resume_writing(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  105547. PyObject *__pyx_r = NULL;
  105548. __Pyx_RefNannyDeclarations
  105549. PyObject *__pyx_t_1 = NULL;
  105550. PyObject *__pyx_t_2 = NULL;
  105551. PyObject *__pyx_t_3 = NULL;
  105552. __Pyx_RefNannySetupContext("resume_writing", 0);
  105553. /* "uvloop/handles/process.pyx":711
  105554. *
  105555. * def resume_writing(self):
  105556. * (<UVProcessTransport>self.proc)._protocol.resume_writing() # <<<<<<<<<<<<<<
  105557. *
  105558. *
  105559. */
  105560. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_proc); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 711, __pyx_L1_error)
  105561. __Pyx_GOTREF(__pyx_t_2);
  105562. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((struct __pyx_obj_6uvloop_4loop_UVProcessTransport *)__pyx_t_2)->_protocol, __pyx_n_s_resume_writing); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 711, __pyx_L1_error)
  105563. __Pyx_GOTREF(__pyx_t_3);
  105564. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  105565. __pyx_t_2 = NULL;
  105566. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
  105567. __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
  105568. if (likely(__pyx_t_2)) {
  105569. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  105570. __Pyx_INCREF(__pyx_t_2);
  105571. __Pyx_INCREF(function);
  105572. __Pyx_DECREF_SET(__pyx_t_3, function);
  105573. }
  105574. }
  105575. __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
  105576. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  105577. if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 711, __pyx_L1_error)
  105578. __Pyx_GOTREF(__pyx_t_1);
  105579. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  105580. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  105581. /* "uvloop/handles/process.pyx":710
  105582. * (<UVProcessTransport>self.proc)._protocol.pause_writing()
  105583. *
  105584. * def resume_writing(self): # <<<<<<<<<<<<<<
  105585. * (<UVProcessTransport>self.proc)._protocol.resume_writing()
  105586. *
  105587. */
  105588. /* function exit code */
  105589. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  105590. goto __pyx_L0;
  105591. __pyx_L1_error:;
  105592. __Pyx_XDECREF(__pyx_t_1);
  105593. __Pyx_XDECREF(__pyx_t_2);
  105594. __Pyx_XDECREF(__pyx_t_3);
  105595. __Pyx_AddTraceback("uvloop.loop.WriteSubprocessPipeProto.resume_writing", __pyx_clineno, __pyx_lineno, __pyx_filename);
  105596. __pyx_r = NULL;
  105597. __pyx_L0:;
  105598. __Pyx_XGIVEREF(__pyx_r);
  105599. __Pyx_RefNannyFinishContext();
  105600. return __pyx_r;
  105601. }
  105602. /* "uvloop/handles/process.pyx":717
  105603. * aio_Protocol):
  105604. *
  105605. * def data_received(self, data): # <<<<<<<<<<<<<<
  105606. * (<UVProcessTransport>self.proc)._pipe_data_received(self.fd, data)
  105607. *
  105608. */
  105609. /* Python wrapper */
  105610. static PyObject *__pyx_pw_6uvloop_4loop_23ReadSubprocessPipeProto_1data_received(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  105611. static char __pyx_doc_6uvloop_4loop_23ReadSubprocessPipeProto_data_received[] = "ReadSubprocessPipeProto.data_received(self, data)";
  105612. static PyMethodDef __pyx_mdef_6uvloop_4loop_23ReadSubprocessPipeProto_1data_received = {"data_received", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6uvloop_4loop_23ReadSubprocessPipeProto_1data_received, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_23ReadSubprocessPipeProto_data_received};
  105613. static PyObject *__pyx_pw_6uvloop_4loop_23ReadSubprocessPipeProto_1data_received(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  105614. PyObject *__pyx_v_self = 0;
  105615. PyObject *__pyx_v_data = 0;
  105616. PyObject *__pyx_r = 0;
  105617. __Pyx_RefNannyDeclarations
  105618. __Pyx_RefNannySetupContext("data_received (wrapper)", 0);
  105619. {
  105620. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self_2,&__pyx_n_s_data,0};
  105621. PyObject* values[2] = {0,0};
  105622. if (unlikely(__pyx_kwds)) {
  105623. Py_ssize_t kw_args;
  105624. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  105625. switch (pos_args) {
  105626. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  105627. CYTHON_FALLTHROUGH;
  105628. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  105629. CYTHON_FALLTHROUGH;
  105630. case 0: break;
  105631. default: goto __pyx_L5_argtuple_error;
  105632. }
  105633. kw_args = PyDict_Size(__pyx_kwds);
  105634. switch (pos_args) {
  105635. case 0:
  105636. if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self_2)) != 0)) kw_args--;
  105637. else goto __pyx_L5_argtuple_error;
  105638. CYTHON_FALLTHROUGH;
  105639. case 1:
  105640. if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--;
  105641. else {
  105642. __Pyx_RaiseArgtupleInvalid("data_received", 1, 2, 2, 1); __PYX_ERR(6, 717, __pyx_L3_error)
  105643. }
  105644. }
  105645. if (unlikely(kw_args > 0)) {
  105646. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "data_received") < 0)) __PYX_ERR(6, 717, __pyx_L3_error)
  105647. }
  105648. } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
  105649. goto __pyx_L5_argtuple_error;
  105650. } else {
  105651. values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  105652. values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  105653. }
  105654. __pyx_v_self = values[0];
  105655. __pyx_v_data = values[1];
  105656. }
  105657. goto __pyx_L4_argument_unpacking_done;
  105658. __pyx_L5_argtuple_error:;
  105659. __Pyx_RaiseArgtupleInvalid("data_received", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(6, 717, __pyx_L3_error)
  105660. __pyx_L3_error:;
  105661. __Pyx_AddTraceback("uvloop.loop.ReadSubprocessPipeProto.data_received", __pyx_clineno, __pyx_lineno, __pyx_filename);
  105662. __Pyx_RefNannyFinishContext();
  105663. return NULL;
  105664. __pyx_L4_argument_unpacking_done:;
  105665. __pyx_r = __pyx_pf_6uvloop_4loop_23ReadSubprocessPipeProto_data_received(__pyx_self, __pyx_v_self, __pyx_v_data);
  105666. /* function exit code */
  105667. __Pyx_RefNannyFinishContext();
  105668. return __pyx_r;
  105669. }
  105670. static PyObject *__pyx_pf_6uvloop_4loop_23ReadSubprocessPipeProto_data_received(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_data) {
  105671. PyObject *__pyx_r = NULL;
  105672. __Pyx_RefNannyDeclarations
  105673. PyObject *__pyx_t_1 = NULL;
  105674. PyObject *__pyx_t_2 = NULL;
  105675. int __pyx_t_3;
  105676. __Pyx_RefNannySetupContext("data_received", 0);
  105677. /* "uvloop/handles/process.pyx":718
  105678. *
  105679. * def data_received(self, data):
  105680. * (<UVProcessTransport>self.proc)._pipe_data_received(self.fd, data) # <<<<<<<<<<<<<<
  105681. *
  105682. *
  105683. */
  105684. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_proc); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 718, __pyx_L1_error)
  105685. __Pyx_GOTREF(__pyx_t_1);
  105686. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fd); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 718, __pyx_L1_error)
  105687. __Pyx_GOTREF(__pyx_t_2);
  105688. __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(6, 718, __pyx_L1_error)
  105689. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  105690. __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcessTransport *)((struct __pyx_obj_6uvloop_4loop_UVProcessTransport *)__pyx_t_1)->__pyx_base.__pyx_base.__pyx_vtab)->_pipe_data_received(((struct __pyx_obj_6uvloop_4loop_UVProcessTransport *)__pyx_t_1), __pyx_t_3, __pyx_v_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 718, __pyx_L1_error)
  105691. __Pyx_GOTREF(__pyx_t_2);
  105692. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  105693. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  105694. /* "uvloop/handles/process.pyx":717
  105695. * aio_Protocol):
  105696. *
  105697. * def data_received(self, data): # <<<<<<<<<<<<<<
  105698. * (<UVProcessTransport>self.proc)._pipe_data_received(self.fd, data)
  105699. *
  105700. */
  105701. /* function exit code */
  105702. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  105703. goto __pyx_L0;
  105704. __pyx_L1_error:;
  105705. __Pyx_XDECREF(__pyx_t_1);
  105706. __Pyx_XDECREF(__pyx_t_2);
  105707. __Pyx_AddTraceback("uvloop.loop.ReadSubprocessPipeProto.data_received", __pyx_clineno, __pyx_lineno, __pyx_filename);
  105708. __pyx_r = NULL;
  105709. __pyx_L0:;
  105710. __Pyx_XGIVEREF(__pyx_r);
  105711. __Pyx_RefNannyFinishContext();
  105712. return __pyx_r;
  105713. }
  105714. /* "uvloop/handles/process.pyx":721
  105715. *
  105716. *
  105717. * cdef __process_convert_fileno(object obj): # <<<<<<<<<<<<<<
  105718. * if obj is None or isinstance(obj, int):
  105719. * return obj
  105720. */
  105721. static PyObject *__pyx_f_6uvloop_4loop___process_convert_fileno(PyObject *__pyx_v_obj) {
  105722. PyObject *__pyx_v_fileno = NULL;
  105723. PyObject *__pyx_r = NULL;
  105724. __Pyx_RefNannyDeclarations
  105725. int __pyx_t_1;
  105726. int __pyx_t_2;
  105727. int __pyx_t_3;
  105728. PyObject *__pyx_t_4 = NULL;
  105729. PyObject *__pyx_t_5 = NULL;
  105730. PyObject *__pyx_t_6 = NULL;
  105731. __Pyx_RefNannySetupContext("__process_convert_fileno", 0);
  105732. /* "uvloop/handles/process.pyx":722
  105733. *
  105734. * cdef __process_convert_fileno(object obj):
  105735. * if obj is None or isinstance(obj, int): # <<<<<<<<<<<<<<
  105736. * return obj
  105737. *
  105738. */
  105739. __pyx_t_2 = (__pyx_v_obj == Py_None);
  105740. __pyx_t_3 = (__pyx_t_2 != 0);
  105741. if (!__pyx_t_3) {
  105742. } else {
  105743. __pyx_t_1 = __pyx_t_3;
  105744. goto __pyx_L4_bool_binop_done;
  105745. }
  105746. __pyx_t_3 = PyInt_Check(__pyx_v_obj);
  105747. __pyx_t_2 = (__pyx_t_3 != 0);
  105748. __pyx_t_1 = __pyx_t_2;
  105749. __pyx_L4_bool_binop_done:;
  105750. if (__pyx_t_1) {
  105751. /* "uvloop/handles/process.pyx":723
  105752. * cdef __process_convert_fileno(object obj):
  105753. * if obj is None or isinstance(obj, int):
  105754. * return obj # <<<<<<<<<<<<<<
  105755. *
  105756. * fileno = obj.fileno()
  105757. */
  105758. __Pyx_XDECREF(__pyx_r);
  105759. __Pyx_INCREF(__pyx_v_obj);
  105760. __pyx_r = __pyx_v_obj;
  105761. goto __pyx_L0;
  105762. /* "uvloop/handles/process.pyx":722
  105763. *
  105764. * cdef __process_convert_fileno(object obj):
  105765. * if obj is None or isinstance(obj, int): # <<<<<<<<<<<<<<
  105766. * return obj
  105767. *
  105768. */
  105769. }
  105770. /* "uvloop/handles/process.pyx":725
  105771. * return obj
  105772. *
  105773. * fileno = obj.fileno() # <<<<<<<<<<<<<<
  105774. * if not isinstance(fileno, int):
  105775. * raise TypeError(
  105776. */
  105777. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_fileno); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 725, __pyx_L1_error)
  105778. __Pyx_GOTREF(__pyx_t_5);
  105779. __pyx_t_6 = NULL;
  105780. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
  105781. __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
  105782. if (likely(__pyx_t_6)) {
  105783. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
  105784. __Pyx_INCREF(__pyx_t_6);
  105785. __Pyx_INCREF(function);
  105786. __Pyx_DECREF_SET(__pyx_t_5, function);
  105787. }
  105788. }
  105789. __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
  105790. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  105791. if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 725, __pyx_L1_error)
  105792. __Pyx_GOTREF(__pyx_t_4);
  105793. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  105794. __pyx_v_fileno = __pyx_t_4;
  105795. __pyx_t_4 = 0;
  105796. /* "uvloop/handles/process.pyx":726
  105797. *
  105798. * fileno = obj.fileno()
  105799. * if not isinstance(fileno, int): # <<<<<<<<<<<<<<
  105800. * raise TypeError(
  105801. * '{!r}.fileno() returned non-integer'.format(obj))
  105802. */
  105803. __pyx_t_1 = PyInt_Check(__pyx_v_fileno);
  105804. __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
  105805. if (unlikely(__pyx_t_2)) {
  105806. /* "uvloop/handles/process.pyx":728
  105807. * if not isinstance(fileno, int):
  105808. * raise TypeError(
  105809. * '{!r}.fileno() returned non-integer'.format(obj)) # <<<<<<<<<<<<<<
  105810. * return fileno
  105811. *
  105812. */
  105813. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_r_fileno_returned_non_integer, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 728, __pyx_L1_error)
  105814. __Pyx_GOTREF(__pyx_t_5);
  105815. __pyx_t_6 = NULL;
  105816. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
  105817. __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
  105818. if (likely(__pyx_t_6)) {
  105819. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
  105820. __Pyx_INCREF(__pyx_t_6);
  105821. __Pyx_INCREF(function);
  105822. __Pyx_DECREF_SET(__pyx_t_5, function);
  105823. }
  105824. }
  105825. __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_v_obj) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_obj);
  105826. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  105827. if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 728, __pyx_L1_error)
  105828. __Pyx_GOTREF(__pyx_t_4);
  105829. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  105830. /* "uvloop/handles/process.pyx":727
  105831. * fileno = obj.fileno()
  105832. * if not isinstance(fileno, int):
  105833. * raise TypeError( # <<<<<<<<<<<<<<
  105834. * '{!r}.fileno() returned non-integer'.format(obj))
  105835. * return fileno
  105836. */
  105837. __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 727, __pyx_L1_error)
  105838. __Pyx_GOTREF(__pyx_t_5);
  105839. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  105840. __Pyx_Raise(__pyx_t_5, 0, 0, 0);
  105841. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  105842. __PYX_ERR(6, 727, __pyx_L1_error)
  105843. /* "uvloop/handles/process.pyx":726
  105844. *
  105845. * fileno = obj.fileno()
  105846. * if not isinstance(fileno, int): # <<<<<<<<<<<<<<
  105847. * raise TypeError(
  105848. * '{!r}.fileno() returned non-integer'.format(obj))
  105849. */
  105850. }
  105851. /* "uvloop/handles/process.pyx":729
  105852. * raise TypeError(
  105853. * '{!r}.fileno() returned non-integer'.format(obj))
  105854. * return fileno # <<<<<<<<<<<<<<
  105855. *
  105856. *
  105857. */
  105858. __Pyx_XDECREF(__pyx_r);
  105859. __Pyx_INCREF(__pyx_v_fileno);
  105860. __pyx_r = __pyx_v_fileno;
  105861. goto __pyx_L0;
  105862. /* "uvloop/handles/process.pyx":721
  105863. *
  105864. *
  105865. * cdef __process_convert_fileno(object obj): # <<<<<<<<<<<<<<
  105866. * if obj is None or isinstance(obj, int):
  105867. * return obj
  105868. */
  105869. /* function exit code */
  105870. __pyx_L1_error:;
  105871. __Pyx_XDECREF(__pyx_t_4);
  105872. __Pyx_XDECREF(__pyx_t_5);
  105873. __Pyx_XDECREF(__pyx_t_6);
  105874. __Pyx_AddTraceback("uvloop.loop.__process_convert_fileno", __pyx_clineno, __pyx_lineno, __pyx_filename);
  105875. __pyx_r = 0;
  105876. __pyx_L0:;
  105877. __Pyx_XDECREF(__pyx_v_fileno);
  105878. __Pyx_XGIVEREF(__pyx_r);
  105879. __Pyx_RefNannyFinishContext();
  105880. return __pyx_r;
  105881. }
  105882. /* "uvloop/handles/process.pyx":732
  105883. *
  105884. *
  105885. * cdef void __uvprocess_on_exit_callback(uv.uv_process_t *handle, # <<<<<<<<<<<<<<
  105886. * int64_t exit_status,
  105887. * int term_signal) with gil:
  105888. */
  105889. static void __pyx_f_6uvloop_4loop___uvprocess_on_exit_callback(uv_process_t *__pyx_v_handle, int64_t __pyx_v_exit_status, int __pyx_v_term_signal) {
  105890. struct __pyx_obj_6uvloop_4loop_UVProcess *__pyx_v_proc = 0;
  105891. PyObject *__pyx_v_ex = NULL;
  105892. __Pyx_RefNannyDeclarations
  105893. int __pyx_t_1;
  105894. PyObject *__pyx_t_2 = NULL;
  105895. PyObject *__pyx_t_3 = NULL;
  105896. PyObject *__pyx_t_4 = NULL;
  105897. PyObject *__pyx_t_5 = NULL;
  105898. int __pyx_t_6;
  105899. PyObject *__pyx_t_7 = NULL;
  105900. PyObject *__pyx_t_8 = NULL;
  105901. PyObject *__pyx_t_9 = NULL;
  105902. int __pyx_t_10;
  105903. char const *__pyx_t_11;
  105904. PyObject *__pyx_t_12 = NULL;
  105905. PyObject *__pyx_t_13 = NULL;
  105906. PyObject *__pyx_t_14 = NULL;
  105907. PyObject *__pyx_t_15 = NULL;
  105908. PyObject *__pyx_t_16 = NULL;
  105909. PyObject *__pyx_t_17 = NULL;
  105910. #ifdef WITH_THREAD
  105911. PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  105912. #endif
  105913. __Pyx_RefNannySetupContext("__uvprocess_on_exit_callback", 0);
  105914. /* "uvloop/handles/process.pyx":737
  105915. *
  105916. * if __ensure_handle_data(<uv.uv_handle_t*>handle,
  105917. * "UVProcess exit callback") == 0: # <<<<<<<<<<<<<<
  105918. * return
  105919. *
  105920. */
  105921. __pyx_t_1 = ((__pyx_f_6uvloop_4loop___ensure_handle_data(((uv_handle_t *)__pyx_v_handle), ((char const *)"UVProcess exit callback")) == 0) != 0);
  105922. /* "uvloop/handles/process.pyx":736
  105923. * int term_signal) with gil:
  105924. *
  105925. * if __ensure_handle_data(<uv.uv_handle_t*>handle, # <<<<<<<<<<<<<<
  105926. * "UVProcess exit callback") == 0:
  105927. * return
  105928. */
  105929. if (__pyx_t_1) {
  105930. /* "uvloop/handles/process.pyx":738
  105931. * if __ensure_handle_data(<uv.uv_handle_t*>handle,
  105932. * "UVProcess exit callback") == 0:
  105933. * return # <<<<<<<<<<<<<<
  105934. *
  105935. * cdef UVProcess proc = <UVProcess> handle.data
  105936. */
  105937. goto __pyx_L0;
  105938. /* "uvloop/handles/process.pyx":736
  105939. * int term_signal) with gil:
  105940. *
  105941. * if __ensure_handle_data(<uv.uv_handle_t*>handle, # <<<<<<<<<<<<<<
  105942. * "UVProcess exit callback") == 0:
  105943. * return
  105944. */
  105945. }
  105946. /* "uvloop/handles/process.pyx":740
  105947. * return
  105948. *
  105949. * cdef UVProcess proc = <UVProcess> handle.data # <<<<<<<<<<<<<<
  105950. * try:
  105951. * proc._on_exit(exit_status, term_signal)
  105952. */
  105953. __pyx_t_2 = ((PyObject *)__pyx_v_handle->data);
  105954. __Pyx_INCREF(__pyx_t_2);
  105955. __pyx_v_proc = ((struct __pyx_obj_6uvloop_4loop_UVProcess *)__pyx_t_2);
  105956. __pyx_t_2 = 0;
  105957. /* "uvloop/handles/process.pyx":741
  105958. *
  105959. * cdef UVProcess proc = <UVProcess> handle.data
  105960. * try: # <<<<<<<<<<<<<<
  105961. * proc._on_exit(exit_status, term_signal)
  105962. * except BaseException as ex:
  105963. */
  105964. {
  105965. __Pyx_PyThreadState_declare
  105966. __Pyx_PyThreadState_assign
  105967. __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
  105968. __Pyx_XGOTREF(__pyx_t_3);
  105969. __Pyx_XGOTREF(__pyx_t_4);
  105970. __Pyx_XGOTREF(__pyx_t_5);
  105971. /*try:*/ {
  105972. /* "uvloop/handles/process.pyx":742
  105973. * cdef UVProcess proc = <UVProcess> handle.data
  105974. * try:
  105975. * proc._on_exit(exit_status, term_signal) # <<<<<<<<<<<<<<
  105976. * except BaseException as ex:
  105977. * proc._error(ex, False)
  105978. */
  105979. __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcess *)__pyx_v_proc->__pyx_base.__pyx_vtab)->_on_exit(__pyx_v_proc, __pyx_v_exit_status, __pyx_v_term_signal); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 742, __pyx_L4_error)
  105980. __Pyx_GOTREF(__pyx_t_2);
  105981. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  105982. /* "uvloop/handles/process.pyx":741
  105983. *
  105984. * cdef UVProcess proc = <UVProcess> handle.data
  105985. * try: # <<<<<<<<<<<<<<
  105986. * proc._on_exit(exit_status, term_signal)
  105987. * except BaseException as ex:
  105988. */
  105989. }
  105990. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  105991. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  105992. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  105993. goto __pyx_L9_try_end;
  105994. __pyx_L4_error:;
  105995. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  105996. /* "uvloop/handles/process.pyx":743
  105997. * try:
  105998. * proc._on_exit(exit_status, term_signal)
  105999. * except BaseException as ex: # <<<<<<<<<<<<<<
  106000. * proc._error(ex, False)
  106001. *
  106002. */
  106003. __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_BaseException);
  106004. if (__pyx_t_6) {
  106005. __Pyx_AddTraceback("uvloop.loop.__uvprocess_on_exit_callback", __pyx_clineno, __pyx_lineno, __pyx_filename);
  106006. if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_7, &__pyx_t_8) < 0) __PYX_ERR(6, 743, __pyx_L6_except_error)
  106007. __Pyx_GOTREF(__pyx_t_2);
  106008. __Pyx_GOTREF(__pyx_t_7);
  106009. __Pyx_GOTREF(__pyx_t_8);
  106010. __Pyx_INCREF(__pyx_t_7);
  106011. __pyx_v_ex = __pyx_t_7;
  106012. /*try:*/ {
  106013. /* "uvloop/handles/process.pyx":744
  106014. * proc._on_exit(exit_status, term_signal)
  106015. * except BaseException as ex:
  106016. * proc._error(ex, False) # <<<<<<<<<<<<<<
  106017. *
  106018. *
  106019. */
  106020. __pyx_t_9 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcess *)__pyx_v_proc->__pyx_base.__pyx_vtab)->__pyx_base._error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_proc), __pyx_v_ex, Py_False); if (unlikely(!__pyx_t_9)) __PYX_ERR(6, 744, __pyx_L15_error)
  106021. __Pyx_GOTREF(__pyx_t_9);
  106022. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  106023. }
  106024. /* "uvloop/handles/process.pyx":743
  106025. * try:
  106026. * proc._on_exit(exit_status, term_signal)
  106027. * except BaseException as ex: # <<<<<<<<<<<<<<
  106028. * proc._error(ex, False)
  106029. *
  106030. */
  106031. /*finally:*/ {
  106032. /*normal exit:*/{
  106033. __Pyx_DECREF(__pyx_v_ex);
  106034. __pyx_v_ex = NULL;
  106035. goto __pyx_L16;
  106036. }
  106037. __pyx_L15_error:;
  106038. /*exception exit:*/{
  106039. __Pyx_PyThreadState_declare
  106040. __Pyx_PyThreadState_assign
  106041. __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0;
  106042. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  106043. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17);
  106044. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14) < 0)) __Pyx_ErrFetch(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
  106045. __Pyx_XGOTREF(__pyx_t_12);
  106046. __Pyx_XGOTREF(__pyx_t_13);
  106047. __Pyx_XGOTREF(__pyx_t_14);
  106048. __Pyx_XGOTREF(__pyx_t_15);
  106049. __Pyx_XGOTREF(__pyx_t_16);
  106050. __Pyx_XGOTREF(__pyx_t_17);
  106051. __pyx_t_6 = __pyx_lineno; __pyx_t_10 = __pyx_clineno; __pyx_t_11 = __pyx_filename;
  106052. {
  106053. __Pyx_DECREF(__pyx_v_ex);
  106054. __pyx_v_ex = NULL;
  106055. }
  106056. if (PY_MAJOR_VERSION >= 3) {
  106057. __Pyx_XGIVEREF(__pyx_t_15);
  106058. __Pyx_XGIVEREF(__pyx_t_16);
  106059. __Pyx_XGIVEREF(__pyx_t_17);
  106060. __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17);
  106061. }
  106062. __Pyx_XGIVEREF(__pyx_t_12);
  106063. __Pyx_XGIVEREF(__pyx_t_13);
  106064. __Pyx_XGIVEREF(__pyx_t_14);
  106065. __Pyx_ErrRestore(__pyx_t_12, __pyx_t_13, __pyx_t_14);
  106066. __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0;
  106067. __pyx_lineno = __pyx_t_6; __pyx_clineno = __pyx_t_10; __pyx_filename = __pyx_t_11;
  106068. goto __pyx_L6_except_error;
  106069. }
  106070. __pyx_L16:;
  106071. }
  106072. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  106073. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  106074. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  106075. goto __pyx_L5_exception_handled;
  106076. }
  106077. goto __pyx_L6_except_error;
  106078. __pyx_L6_except_error:;
  106079. /* "uvloop/handles/process.pyx":741
  106080. *
  106081. * cdef UVProcess proc = <UVProcess> handle.data
  106082. * try: # <<<<<<<<<<<<<<
  106083. * proc._on_exit(exit_status, term_signal)
  106084. * except BaseException as ex:
  106085. */
  106086. __Pyx_XGIVEREF(__pyx_t_3);
  106087. __Pyx_XGIVEREF(__pyx_t_4);
  106088. __Pyx_XGIVEREF(__pyx_t_5);
  106089. __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
  106090. goto __pyx_L1_error;
  106091. __pyx_L5_exception_handled:;
  106092. __Pyx_XGIVEREF(__pyx_t_3);
  106093. __Pyx_XGIVEREF(__pyx_t_4);
  106094. __Pyx_XGIVEREF(__pyx_t_5);
  106095. __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
  106096. __pyx_L9_try_end:;
  106097. }
  106098. /* "uvloop/handles/process.pyx":732
  106099. *
  106100. *
  106101. * cdef void __uvprocess_on_exit_callback(uv.uv_process_t *handle, # <<<<<<<<<<<<<<
  106102. * int64_t exit_status,
  106103. * int term_signal) with gil:
  106104. */
  106105. /* function exit code */
  106106. goto __pyx_L0;
  106107. __pyx_L1_error:;
  106108. __Pyx_XDECREF(__pyx_t_2);
  106109. __Pyx_XDECREF(__pyx_t_7);
  106110. __Pyx_XDECREF(__pyx_t_8);
  106111. __Pyx_XDECREF(__pyx_t_9);
  106112. __Pyx_WriteUnraisable("uvloop.loop.__uvprocess_on_exit_callback", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  106113. __pyx_L0:;
  106114. __Pyx_XDECREF((PyObject *)__pyx_v_proc);
  106115. __Pyx_XDECREF(__pyx_v_ex);
  106116. __Pyx_RefNannyFinishContext();
  106117. #ifdef WITH_THREAD
  106118. __Pyx_PyGILState_Release(__pyx_gilstate_save);
  106119. #endif
  106120. }
  106121. /* "uvloop/handles/process.pyx":747
  106122. *
  106123. *
  106124. * cdef __socketpair(): # <<<<<<<<<<<<<<
  106125. * cdef:
  106126. * int fds[2]
  106127. */
  106128. static PyObject *__pyx_f_6uvloop_4loop___socketpair(void) {
  106129. int __pyx_v_fds[2];
  106130. int __pyx_v_err;
  106131. PyObject *__pyx_v_exc = NULL;
  106132. PyObject *__pyx_r = NULL;
  106133. __Pyx_RefNannyDeclarations
  106134. int __pyx_t_1;
  106135. PyObject *__pyx_t_2 = NULL;
  106136. PyObject *__pyx_t_3 = NULL;
  106137. PyObject *__pyx_t_4 = NULL;
  106138. PyObject *__pyx_t_5 = NULL;
  106139. int __pyx_t_6;
  106140. PyObject *__pyx_t_7 = NULL;
  106141. __Pyx_RefNannySetupContext("__socketpair", 0);
  106142. /* "uvloop/handles/process.pyx":752
  106143. * int err
  106144. *
  106145. * err = system.socketpair(uv.AF_UNIX, uv.SOCK_STREAM, 0, fds) # <<<<<<<<<<<<<<
  106146. * if err:
  106147. * exc = convert_error(-err)
  106148. */
  106149. __pyx_v_err = socketpair(AF_UNIX, SOCK_STREAM, 0, __pyx_v_fds);
  106150. /* "uvloop/handles/process.pyx":753
  106151. *
  106152. * err = system.socketpair(uv.AF_UNIX, uv.SOCK_STREAM, 0, fds)
  106153. * if err: # <<<<<<<<<<<<<<
  106154. * exc = convert_error(-err)
  106155. * raise exc
  106156. */
  106157. __pyx_t_1 = (__pyx_v_err != 0);
  106158. if (unlikely(__pyx_t_1)) {
  106159. /* "uvloop/handles/process.pyx":754
  106160. * err = system.socketpair(uv.AF_UNIX, uv.SOCK_STREAM, 0, fds)
  106161. * if err:
  106162. * exc = convert_error(-err) # <<<<<<<<<<<<<<
  106163. * raise exc
  106164. *
  106165. */
  106166. __pyx_t_2 = __pyx_f_6uvloop_4loop_convert_error((-__pyx_v_err)); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 754, __pyx_L1_error)
  106167. __Pyx_GOTREF(__pyx_t_2);
  106168. __pyx_v_exc = __pyx_t_2;
  106169. __pyx_t_2 = 0;
  106170. /* "uvloop/handles/process.pyx":755
  106171. * if err:
  106172. * exc = convert_error(-err)
  106173. * raise exc # <<<<<<<<<<<<<<
  106174. *
  106175. * os_set_inheritable(fds[0], False)
  106176. */
  106177. __Pyx_Raise(__pyx_v_exc, 0, 0, 0);
  106178. __PYX_ERR(6, 755, __pyx_L1_error)
  106179. /* "uvloop/handles/process.pyx":753
  106180. *
  106181. * err = system.socketpair(uv.AF_UNIX, uv.SOCK_STREAM, 0, fds)
  106182. * if err: # <<<<<<<<<<<<<<
  106183. * exc = convert_error(-err)
  106184. * raise exc
  106185. */
  106186. }
  106187. /* "uvloop/handles/process.pyx":757
  106188. * raise exc
  106189. *
  106190. * os_set_inheritable(fds[0], False) # <<<<<<<<<<<<<<
  106191. * os_set_inheritable(fds[1], False)
  106192. *
  106193. */
  106194. __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_fds[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 757, __pyx_L1_error)
  106195. __Pyx_GOTREF(__pyx_t_3);
  106196. __Pyx_INCREF(__pyx_v_6uvloop_4loop_os_set_inheritable);
  106197. __pyx_t_4 = __pyx_v_6uvloop_4loop_os_set_inheritable; __pyx_t_5 = NULL;
  106198. __pyx_t_6 = 0;
  106199. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
  106200. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
  106201. if (likely(__pyx_t_5)) {
  106202. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  106203. __Pyx_INCREF(__pyx_t_5);
  106204. __Pyx_INCREF(function);
  106205. __Pyx_DECREF_SET(__pyx_t_4, function);
  106206. __pyx_t_6 = 1;
  106207. }
  106208. }
  106209. #if CYTHON_FAST_PYCALL
  106210. if (PyFunction_Check(__pyx_t_4)) {
  106211. PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_3, Py_False};
  106212. __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 757, __pyx_L1_error)
  106213. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  106214. __Pyx_GOTREF(__pyx_t_2);
  106215. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  106216. } else
  106217. #endif
  106218. #if CYTHON_FAST_PYCCALL
  106219. if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
  106220. PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_3, Py_False};
  106221. __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 757, __pyx_L1_error)
  106222. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  106223. __Pyx_GOTREF(__pyx_t_2);
  106224. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  106225. } else
  106226. #endif
  106227. {
  106228. __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(6, 757, __pyx_L1_error)
  106229. __Pyx_GOTREF(__pyx_t_7);
  106230. if (__pyx_t_5) {
  106231. __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
  106232. }
  106233. __Pyx_GIVEREF(__pyx_t_3);
  106234. PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_3);
  106235. __Pyx_INCREF(Py_False);
  106236. __Pyx_GIVEREF(Py_False);
  106237. PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, Py_False);
  106238. __pyx_t_3 = 0;
  106239. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 757, __pyx_L1_error)
  106240. __Pyx_GOTREF(__pyx_t_2);
  106241. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  106242. }
  106243. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  106244. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  106245. /* "uvloop/handles/process.pyx":758
  106246. *
  106247. * os_set_inheritable(fds[0], False)
  106248. * os_set_inheritable(fds[1], False) # <<<<<<<<<<<<<<
  106249. *
  106250. * return fds[0], fds[1]
  106251. */
  106252. __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_fds[1])); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 758, __pyx_L1_error)
  106253. __Pyx_GOTREF(__pyx_t_4);
  106254. __Pyx_INCREF(__pyx_v_6uvloop_4loop_os_set_inheritable);
  106255. __pyx_t_7 = __pyx_v_6uvloop_4loop_os_set_inheritable; __pyx_t_3 = NULL;
  106256. __pyx_t_6 = 0;
  106257. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
  106258. __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_7);
  106259. if (likely(__pyx_t_3)) {
  106260. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
  106261. __Pyx_INCREF(__pyx_t_3);
  106262. __Pyx_INCREF(function);
  106263. __Pyx_DECREF_SET(__pyx_t_7, function);
  106264. __pyx_t_6 = 1;
  106265. }
  106266. }
  106267. #if CYTHON_FAST_PYCALL
  106268. if (PyFunction_Check(__pyx_t_7)) {
  106269. PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_t_4, Py_False};
  106270. __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 758, __pyx_L1_error)
  106271. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  106272. __Pyx_GOTREF(__pyx_t_2);
  106273. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  106274. } else
  106275. #endif
  106276. #if CYTHON_FAST_PYCCALL
  106277. if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
  106278. PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_t_4, Py_False};
  106279. __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 758, __pyx_L1_error)
  106280. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  106281. __Pyx_GOTREF(__pyx_t_2);
  106282. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  106283. } else
  106284. #endif
  106285. {
  106286. __pyx_t_5 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 758, __pyx_L1_error)
  106287. __Pyx_GOTREF(__pyx_t_5);
  106288. if (__pyx_t_3) {
  106289. __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
  106290. }
  106291. __Pyx_GIVEREF(__pyx_t_4);
  106292. PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_6, __pyx_t_4);
  106293. __Pyx_INCREF(Py_False);
  106294. __Pyx_GIVEREF(Py_False);
  106295. PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_6, Py_False);
  106296. __pyx_t_4 = 0;
  106297. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 758, __pyx_L1_error)
  106298. __Pyx_GOTREF(__pyx_t_2);
  106299. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  106300. }
  106301. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  106302. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  106303. /* "uvloop/handles/process.pyx":760
  106304. * os_set_inheritable(fds[1], False)
  106305. *
  106306. * return fds[0], fds[1] # <<<<<<<<<<<<<<
  106307. *
  106308. *
  106309. */
  106310. __Pyx_XDECREF(__pyx_r);
  106311. __pyx_t_2 = __Pyx_PyInt_From_int((__pyx_v_fds[0])); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 760, __pyx_L1_error)
  106312. __Pyx_GOTREF(__pyx_t_2);
  106313. __pyx_t_7 = __Pyx_PyInt_From_int((__pyx_v_fds[1])); if (unlikely(!__pyx_t_7)) __PYX_ERR(6, 760, __pyx_L1_error)
  106314. __Pyx_GOTREF(__pyx_t_7);
  106315. __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 760, __pyx_L1_error)
  106316. __Pyx_GOTREF(__pyx_t_5);
  106317. __Pyx_GIVEREF(__pyx_t_2);
  106318. PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
  106319. __Pyx_GIVEREF(__pyx_t_7);
  106320. PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_7);
  106321. __pyx_t_2 = 0;
  106322. __pyx_t_7 = 0;
  106323. __pyx_r = __pyx_t_5;
  106324. __pyx_t_5 = 0;
  106325. goto __pyx_L0;
  106326. /* "uvloop/handles/process.pyx":747
  106327. *
  106328. *
  106329. * cdef __socketpair(): # <<<<<<<<<<<<<<
  106330. * cdef:
  106331. * int fds[2]
  106332. */
  106333. /* function exit code */
  106334. __pyx_L1_error:;
  106335. __Pyx_XDECREF(__pyx_t_2);
  106336. __Pyx_XDECREF(__pyx_t_3);
  106337. __Pyx_XDECREF(__pyx_t_4);
  106338. __Pyx_XDECREF(__pyx_t_5);
  106339. __Pyx_XDECREF(__pyx_t_7);
  106340. __Pyx_AddTraceback("uvloop.loop.__socketpair", __pyx_clineno, __pyx_lineno, __pyx_filename);
  106341. __pyx_r = 0;
  106342. __pyx_L0:;
  106343. __Pyx_XDECREF(__pyx_v_exc);
  106344. __Pyx_XGIVEREF(__pyx_r);
  106345. __Pyx_RefNannyFinishContext();
  106346. return __pyx_r;
  106347. }
  106348. /* "uvloop/handles/process.pyx":763
  106349. *
  106350. *
  106351. * cdef void __uv_close_process_handle_cb(uv.uv_handle_t* handle) with gil: # <<<<<<<<<<<<<<
  106352. * PyMem_RawFree(handle)
  106353. */
  106354. static void __pyx_f_6uvloop_4loop___uv_close_process_handle_cb(uv_handle_t *__pyx_v_handle) {
  106355. __Pyx_RefNannyDeclarations
  106356. #ifdef WITH_THREAD
  106357. PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  106358. #endif
  106359. __Pyx_RefNannySetupContext("__uv_close_process_handle_cb", 0);
  106360. /* "uvloop/handles/process.pyx":764
  106361. *
  106362. * cdef void __uv_close_process_handle_cb(uv.uv_handle_t* handle) with gil:
  106363. * PyMem_RawFree(handle) # <<<<<<<<<<<<<<
  106364. */
  106365. PyMem_RawFree(__pyx_v_handle);
  106366. /* "uvloop/handles/process.pyx":763
  106367. *
  106368. *
  106369. * cdef void __uv_close_process_handle_cb(uv.uv_handle_t* handle) with gil: # <<<<<<<<<<<<<<
  106370. * PyMem_RawFree(handle)
  106371. */
  106372. /* function exit code */
  106373. __Pyx_RefNannyFinishContext();
  106374. #ifdef WITH_THREAD
  106375. __Pyx_PyGILState_Release(__pyx_gilstate_save);
  106376. #endif
  106377. }
  106378. /* "uvloop/request.pyx":10
  106379. * """
  106380. *
  106381. * def __cinit__(self, Loop loop, *_): # <<<<<<<<<<<<<<
  106382. * self.request = NULL
  106383. * self.loop = loop
  106384. */
  106385. /* Python wrapper */
  106386. static int __pyx_pw_6uvloop_4loop_9UVRequest_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  106387. static int __pyx_pw_6uvloop_4loop_9UVRequest_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  106388. struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop = 0;
  106389. CYTHON_UNUSED PyObject *__pyx_v__ = 0;
  106390. int __pyx_r;
  106391. __Pyx_RefNannyDeclarations
  106392. __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  106393. if (PyTuple_GET_SIZE(__pyx_args) > 1) {
  106394. __pyx_v__ = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
  106395. if (unlikely(!__pyx_v__)) {
  106396. __Pyx_RefNannyFinishContext();
  106397. return -1;
  106398. }
  106399. __Pyx_GOTREF(__pyx_v__);
  106400. } else {
  106401. __pyx_v__ = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  106402. }
  106403. {
  106404. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_loop,0};
  106405. PyObject* values[1] = {0};
  106406. if (unlikely(__pyx_kwds)) {
  106407. Py_ssize_t kw_args;
  106408. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  106409. switch (pos_args) {
  106410. default:
  106411. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  106412. CYTHON_FALLTHROUGH;
  106413. case 0: break;
  106414. }
  106415. kw_args = PyDict_Size(__pyx_kwds);
  106416. switch (pos_args) {
  106417. case 0:
  106418. if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_loop)) != 0)) kw_args--;
  106419. else goto __pyx_L5_argtuple_error;
  106420. }
  106421. if (unlikely(kw_args > 0)) {
  106422. const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1;
  106423. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "__cinit__") < 0)) __PYX_ERR(21, 10, __pyx_L3_error)
  106424. }
  106425. } else if (PyTuple_GET_SIZE(__pyx_args) < 1) {
  106426. goto __pyx_L5_argtuple_error;
  106427. } else {
  106428. values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  106429. }
  106430. __pyx_v_loop = ((struct __pyx_obj_6uvloop_4loop_Loop *)values[0]);
  106431. }
  106432. goto __pyx_L4_argument_unpacking_done;
  106433. __pyx_L5_argtuple_error:;
  106434. __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(21, 10, __pyx_L3_error)
  106435. __pyx_L3_error:;
  106436. __Pyx_DECREF(__pyx_v__); __pyx_v__ = 0;
  106437. __Pyx_AddTraceback("uvloop.loop.UVRequest.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  106438. __Pyx_RefNannyFinishContext();
  106439. return -1;
  106440. __pyx_L4_argument_unpacking_done:;
  106441. if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_loop), __pyx_ptype_6uvloop_4loop_Loop, 1, "loop", 0))) __PYX_ERR(21, 10, __pyx_L1_error)
  106442. __pyx_r = __pyx_pf_6uvloop_4loop_9UVRequest___cinit__(((struct __pyx_obj_6uvloop_4loop_UVRequest *)__pyx_v_self), __pyx_v_loop, __pyx_v__);
  106443. /* function exit code */
  106444. goto __pyx_L0;
  106445. __pyx_L1_error:;
  106446. __pyx_r = -1;
  106447. __pyx_L0:;
  106448. __Pyx_XDECREF(__pyx_v__);
  106449. __Pyx_RefNannyFinishContext();
  106450. return __pyx_r;
  106451. }
  106452. static int __pyx_pf_6uvloop_4loop_9UVRequest___cinit__(struct __pyx_obj_6uvloop_4loop_UVRequest *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, CYTHON_UNUSED PyObject *__pyx_v__) {
  106453. int __pyx_r;
  106454. __Pyx_RefNannyDeclarations
  106455. __Pyx_RefNannySetupContext("__cinit__", 0);
  106456. /* "uvloop/request.pyx":11
  106457. *
  106458. * def __cinit__(self, Loop loop, *_):
  106459. * self.request = NULL # <<<<<<<<<<<<<<
  106460. * self.loop = loop
  106461. * self.done = 0
  106462. */
  106463. __pyx_v_self->request = NULL;
  106464. /* "uvloop/request.pyx":12
  106465. * def __cinit__(self, Loop loop, *_):
  106466. * self.request = NULL
  106467. * self.loop = loop # <<<<<<<<<<<<<<
  106468. * self.done = 0
  106469. * Py_INCREF(self)
  106470. */
  106471. __Pyx_INCREF(((PyObject *)__pyx_v_loop));
  106472. __Pyx_GIVEREF(((PyObject *)__pyx_v_loop));
  106473. __Pyx_GOTREF(__pyx_v_self->loop);
  106474. __Pyx_DECREF(((PyObject *)__pyx_v_self->loop));
  106475. __pyx_v_self->loop = __pyx_v_loop;
  106476. /* "uvloop/request.pyx":13
  106477. * self.request = NULL
  106478. * self.loop = loop
  106479. * self.done = 0 # <<<<<<<<<<<<<<
  106480. * Py_INCREF(self)
  106481. *
  106482. */
  106483. __pyx_v_self->done = 0;
  106484. /* "uvloop/request.pyx":14
  106485. * self.loop = loop
  106486. * self.done = 0
  106487. * Py_INCREF(self) # <<<<<<<<<<<<<<
  106488. *
  106489. * cdef on_done(self):
  106490. */
  106491. Py_INCREF(((PyObject *)__pyx_v_self));
  106492. /* "uvloop/request.pyx":10
  106493. * """
  106494. *
  106495. * def __cinit__(self, Loop loop, *_): # <<<<<<<<<<<<<<
  106496. * self.request = NULL
  106497. * self.loop = loop
  106498. */
  106499. /* function exit code */
  106500. __pyx_r = 0;
  106501. __Pyx_RefNannyFinishContext();
  106502. return __pyx_r;
  106503. }
  106504. /* "uvloop/request.pyx":16
  106505. * Py_INCREF(self)
  106506. *
  106507. * cdef on_done(self): # <<<<<<<<<<<<<<
  106508. * self.done = 1
  106509. * Py_DECREF(self)
  106510. */
  106511. static PyObject *__pyx_f_6uvloop_4loop_9UVRequest_on_done(struct __pyx_obj_6uvloop_4loop_UVRequest *__pyx_v_self) {
  106512. PyObject *__pyx_r = NULL;
  106513. __Pyx_RefNannyDeclarations
  106514. __Pyx_RefNannySetupContext("on_done", 0);
  106515. /* "uvloop/request.pyx":17
  106516. *
  106517. * cdef on_done(self):
  106518. * self.done = 1 # <<<<<<<<<<<<<<
  106519. * Py_DECREF(self)
  106520. *
  106521. */
  106522. __pyx_v_self->done = 1;
  106523. /* "uvloop/request.pyx":18
  106524. * cdef on_done(self):
  106525. * self.done = 1
  106526. * Py_DECREF(self) # <<<<<<<<<<<<<<
  106527. *
  106528. * cdef cancel(self):
  106529. */
  106530. Py_DECREF(((PyObject *)__pyx_v_self));
  106531. /* "uvloop/request.pyx":16
  106532. * Py_INCREF(self)
  106533. *
  106534. * cdef on_done(self): # <<<<<<<<<<<<<<
  106535. * self.done = 1
  106536. * Py_DECREF(self)
  106537. */
  106538. /* function exit code */
  106539. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  106540. __Pyx_XGIVEREF(__pyx_r);
  106541. __Pyx_RefNannyFinishContext();
  106542. return __pyx_r;
  106543. }
  106544. /* "uvloop/request.pyx":20
  106545. * Py_DECREF(self)
  106546. *
  106547. * cdef cancel(self): # <<<<<<<<<<<<<<
  106548. * # Most requests are implemented using a threadpool. It's only
  106549. * # possible to cancel a request when it's still in a threadpool's
  106550. */
  106551. static PyObject *__pyx_f_6uvloop_4loop_9UVRequest_cancel(struct __pyx_obj_6uvloop_4loop_UVRequest *__pyx_v_self) {
  106552. int __pyx_v_err;
  106553. PyObject *__pyx_v_ex = NULL;
  106554. PyObject *__pyx_r = NULL;
  106555. __Pyx_RefNannyDeclarations
  106556. int __pyx_t_1;
  106557. PyObject *__pyx_t_2 = NULL;
  106558. PyObject *__pyx_t_3 = NULL;
  106559. PyObject *__pyx_t_4 = NULL;
  106560. PyObject *__pyx_t_5 = NULL;
  106561. int __pyx_t_6;
  106562. __Pyx_RefNannySetupContext("cancel", 0);
  106563. /* "uvloop/request.pyx":29
  106564. * cdef int err
  106565. *
  106566. * if self.done == 1: # <<<<<<<<<<<<<<
  106567. * return
  106568. *
  106569. */
  106570. __pyx_t_1 = ((__pyx_v_self->done == 1) != 0);
  106571. if (__pyx_t_1) {
  106572. /* "uvloop/request.pyx":30
  106573. *
  106574. * if self.done == 1:
  106575. * return # <<<<<<<<<<<<<<
  106576. *
  106577. * if UVLOOP_DEBUG:
  106578. */
  106579. __Pyx_XDECREF(__pyx_r);
  106580. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  106581. goto __pyx_L0;
  106582. /* "uvloop/request.pyx":29
  106583. * cdef int err
  106584. *
  106585. * if self.done == 1: # <<<<<<<<<<<<<<
  106586. * return
  106587. *
  106588. */
  106589. }
  106590. /* "uvloop/request.pyx":32
  106591. * return
  106592. *
  106593. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  106594. * if self.request is NULL:
  106595. * raise RuntimeError(
  106596. */
  106597. __pyx_t_1 = (UVLOOP_DEBUG != 0);
  106598. if (__pyx_t_1) {
  106599. /* "uvloop/request.pyx":33
  106600. *
  106601. * if UVLOOP_DEBUG:
  106602. * if self.request is NULL: # <<<<<<<<<<<<<<
  106603. * raise RuntimeError(
  106604. * '{}.cancel: .request is NULL'.format(
  106605. */
  106606. __pyx_t_1 = ((__pyx_v_self->request == NULL) != 0);
  106607. if (unlikely(__pyx_t_1)) {
  106608. /* "uvloop/request.pyx":35
  106609. * if self.request is NULL:
  106610. * raise RuntimeError(
  106611. * '{}.cancel: .request is NULL'.format( # <<<<<<<<<<<<<<
  106612. * self.__class__.__name__))
  106613. *
  106614. */
  106615. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_cancel_request_is_NULL, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 35, __pyx_L1_error)
  106616. __Pyx_GOTREF(__pyx_t_3);
  106617. /* "uvloop/request.pyx":36
  106618. * raise RuntimeError(
  106619. * '{}.cancel: .request is NULL'.format(
  106620. * self.__class__.__name__)) # <<<<<<<<<<<<<<
  106621. *
  106622. * if self.request.data is NULL:
  106623. */
  106624. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_4)) __PYX_ERR(21, 36, __pyx_L1_error)
  106625. __Pyx_GOTREF(__pyx_t_4);
  106626. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(21, 36, __pyx_L1_error)
  106627. __Pyx_GOTREF(__pyx_t_5);
  106628. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  106629. __pyx_t_4 = NULL;
  106630. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
  106631. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
  106632. if (likely(__pyx_t_4)) {
  106633. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  106634. __Pyx_INCREF(__pyx_t_4);
  106635. __Pyx_INCREF(function);
  106636. __Pyx_DECREF_SET(__pyx_t_3, function);
  106637. }
  106638. }
  106639. __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5);
  106640. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  106641. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  106642. if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 35, __pyx_L1_error)
  106643. __Pyx_GOTREF(__pyx_t_2);
  106644. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  106645. /* "uvloop/request.pyx":34
  106646. * if UVLOOP_DEBUG:
  106647. * if self.request is NULL:
  106648. * raise RuntimeError( # <<<<<<<<<<<<<<
  106649. * '{}.cancel: .request is NULL'.format(
  106650. * self.__class__.__name__))
  106651. */
  106652. __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 34, __pyx_L1_error)
  106653. __Pyx_GOTREF(__pyx_t_3);
  106654. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  106655. __Pyx_Raise(__pyx_t_3, 0, 0, 0);
  106656. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  106657. __PYX_ERR(21, 34, __pyx_L1_error)
  106658. /* "uvloop/request.pyx":33
  106659. *
  106660. * if UVLOOP_DEBUG:
  106661. * if self.request is NULL: # <<<<<<<<<<<<<<
  106662. * raise RuntimeError(
  106663. * '{}.cancel: .request is NULL'.format(
  106664. */
  106665. }
  106666. /* "uvloop/request.pyx":38
  106667. * self.__class__.__name__))
  106668. *
  106669. * if self.request.data is NULL: # <<<<<<<<<<<<<<
  106670. * raise RuntimeError(
  106671. * '{}.cancel: .request.data is NULL'.format(
  106672. */
  106673. __pyx_t_1 = ((__pyx_v_self->request->data == NULL) != 0);
  106674. if (unlikely(__pyx_t_1)) {
  106675. /* "uvloop/request.pyx":40
  106676. * if self.request.data is NULL:
  106677. * raise RuntimeError(
  106678. * '{}.cancel: .request.data is NULL'.format( # <<<<<<<<<<<<<<
  106679. * self.__class__.__name__))
  106680. *
  106681. */
  106682. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_cancel_request_data_is_NULL, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 40, __pyx_L1_error)
  106683. __Pyx_GOTREF(__pyx_t_2);
  106684. /* "uvloop/request.pyx":41
  106685. * raise RuntimeError(
  106686. * '{}.cancel: .request.data is NULL'.format(
  106687. * self.__class__.__name__)) # <<<<<<<<<<<<<<
  106688. *
  106689. * if <UVRequest>self.request.data is not self:
  106690. */
  106691. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_5)) __PYX_ERR(21, 41, __pyx_L1_error)
  106692. __Pyx_GOTREF(__pyx_t_5);
  106693. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(21, 41, __pyx_L1_error)
  106694. __Pyx_GOTREF(__pyx_t_4);
  106695. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  106696. __pyx_t_5 = NULL;
  106697. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
  106698. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
  106699. if (likely(__pyx_t_5)) {
  106700. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  106701. __Pyx_INCREF(__pyx_t_5);
  106702. __Pyx_INCREF(function);
  106703. __Pyx_DECREF_SET(__pyx_t_2, function);
  106704. }
  106705. }
  106706. __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
  106707. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  106708. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  106709. if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 40, __pyx_L1_error)
  106710. __Pyx_GOTREF(__pyx_t_3);
  106711. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  106712. /* "uvloop/request.pyx":39
  106713. *
  106714. * if self.request.data is NULL:
  106715. * raise RuntimeError( # <<<<<<<<<<<<<<
  106716. * '{}.cancel: .request.data is NULL'.format(
  106717. * self.__class__.__name__))
  106718. */
  106719. __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 39, __pyx_L1_error)
  106720. __Pyx_GOTREF(__pyx_t_2);
  106721. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  106722. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  106723. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  106724. __PYX_ERR(21, 39, __pyx_L1_error)
  106725. /* "uvloop/request.pyx":38
  106726. * self.__class__.__name__))
  106727. *
  106728. * if self.request.data is NULL: # <<<<<<<<<<<<<<
  106729. * raise RuntimeError(
  106730. * '{}.cancel: .request.data is NULL'.format(
  106731. */
  106732. }
  106733. /* "uvloop/request.pyx":43
  106734. * self.__class__.__name__))
  106735. *
  106736. * if <UVRequest>self.request.data is not self: # <<<<<<<<<<<<<<
  106737. * raise RuntimeError(
  106738. * '{}.cancel: .request.data is not UVRequest'.format(
  106739. */
  106740. __pyx_t_1 = (((struct __pyx_obj_6uvloop_4loop_UVRequest *)__pyx_v_self->request->data) != __pyx_v_self);
  106741. __pyx_t_6 = (__pyx_t_1 != 0);
  106742. if (unlikely(__pyx_t_6)) {
  106743. /* "uvloop/request.pyx":45
  106744. * if <UVRequest>self.request.data is not self:
  106745. * raise RuntimeError(
  106746. * '{}.cancel: .request.data is not UVRequest'.format( # <<<<<<<<<<<<<<
  106747. * self.__class__.__name__))
  106748. *
  106749. */
  106750. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_cancel_request_data_is_not_UVRe, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 45, __pyx_L1_error)
  106751. __Pyx_GOTREF(__pyx_t_3);
  106752. /* "uvloop/request.pyx":46
  106753. * raise RuntimeError(
  106754. * '{}.cancel: .request.data is not UVRequest'.format(
  106755. * self.__class__.__name__)) # <<<<<<<<<<<<<<
  106756. *
  106757. * # We only can cancel pending requests. Let's try.
  106758. */
  106759. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_4)) __PYX_ERR(21, 46, __pyx_L1_error)
  106760. __Pyx_GOTREF(__pyx_t_4);
  106761. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(21, 46, __pyx_L1_error)
  106762. __Pyx_GOTREF(__pyx_t_5);
  106763. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  106764. __pyx_t_4 = NULL;
  106765. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
  106766. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
  106767. if (likely(__pyx_t_4)) {
  106768. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  106769. __Pyx_INCREF(__pyx_t_4);
  106770. __Pyx_INCREF(function);
  106771. __Pyx_DECREF_SET(__pyx_t_3, function);
  106772. }
  106773. }
  106774. __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5);
  106775. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  106776. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  106777. if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 45, __pyx_L1_error)
  106778. __Pyx_GOTREF(__pyx_t_2);
  106779. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  106780. /* "uvloop/request.pyx":44
  106781. *
  106782. * if <UVRequest>self.request.data is not self:
  106783. * raise RuntimeError( # <<<<<<<<<<<<<<
  106784. * '{}.cancel: .request.data is not UVRequest'.format(
  106785. * self.__class__.__name__))
  106786. */
  106787. __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 44, __pyx_L1_error)
  106788. __Pyx_GOTREF(__pyx_t_3);
  106789. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  106790. __Pyx_Raise(__pyx_t_3, 0, 0, 0);
  106791. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  106792. __PYX_ERR(21, 44, __pyx_L1_error)
  106793. /* "uvloop/request.pyx":43
  106794. * self.__class__.__name__))
  106795. *
  106796. * if <UVRequest>self.request.data is not self: # <<<<<<<<<<<<<<
  106797. * raise RuntimeError(
  106798. * '{}.cancel: .request.data is not UVRequest'.format(
  106799. */
  106800. }
  106801. /* "uvloop/request.pyx":32
  106802. * return
  106803. *
  106804. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  106805. * if self.request is NULL:
  106806. * raise RuntimeError(
  106807. */
  106808. }
  106809. /* "uvloop/request.pyx":49
  106810. *
  106811. * # We only can cancel pending requests. Let's try.
  106812. * err = uv.uv_cancel(self.request) # <<<<<<<<<<<<<<
  106813. * if err < 0:
  106814. * if err == uv.UV_EBUSY:
  106815. */
  106816. __pyx_v_err = uv_cancel(__pyx_v_self->request);
  106817. /* "uvloop/request.pyx":50
  106818. * # We only can cancel pending requests. Let's try.
  106819. * err = uv.uv_cancel(self.request)
  106820. * if err < 0: # <<<<<<<<<<<<<<
  106821. * if err == uv.UV_EBUSY:
  106822. * # Can't close the request -- it's executing (see the first
  106823. */
  106824. __pyx_t_6 = ((__pyx_v_err < 0) != 0);
  106825. if (__pyx_t_6) {
  106826. /* "uvloop/request.pyx":51
  106827. * err = uv.uv_cancel(self.request)
  106828. * if err < 0:
  106829. * if err == uv.UV_EBUSY: # <<<<<<<<<<<<<<
  106830. * # Can't close the request -- it's executing (see the first
  106831. * # comment). Loop will have to wait until the callback
  106832. */
  106833. __pyx_t_6 = ((__pyx_v_err == UV_EBUSY) != 0);
  106834. if (__pyx_t_6) {
  106835. goto __pyx_L9;
  106836. }
  106837. /* "uvloop/request.pyx":56
  106838. * # fires.
  106839. * pass
  106840. * elif err == uv.UV_EINVAL: # <<<<<<<<<<<<<<
  106841. * # From libuv docs:
  106842. * #
  106843. */
  106844. __pyx_t_6 = ((__pyx_v_err == UV_EINVAL) != 0);
  106845. if (__pyx_t_6) {
  106846. /* "uvloop/request.pyx":62
  106847. * # uv_getnameinfo_t and uv_work_t requests is currently
  106848. * # supported.
  106849. * return # <<<<<<<<<<<<<<
  106850. * else:
  106851. * ex = convert_error(err)
  106852. */
  106853. __Pyx_XDECREF(__pyx_r);
  106854. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  106855. goto __pyx_L0;
  106856. /* "uvloop/request.pyx":56
  106857. * # fires.
  106858. * pass
  106859. * elif err == uv.UV_EINVAL: # <<<<<<<<<<<<<<
  106860. * # From libuv docs:
  106861. * #
  106862. */
  106863. }
  106864. /* "uvloop/request.pyx":64
  106865. * return
  106866. * else:
  106867. * ex = convert_error(err) # <<<<<<<<<<<<<<
  106868. * self.loop._handle_exception(ex)
  106869. */
  106870. /*else*/ {
  106871. __pyx_t_3 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 64, __pyx_L1_error)
  106872. __Pyx_GOTREF(__pyx_t_3);
  106873. __pyx_v_ex = __pyx_t_3;
  106874. __pyx_t_3 = 0;
  106875. /* "uvloop/request.pyx":65
  106876. * else:
  106877. * ex = convert_error(err)
  106878. * self.loop._handle_exception(ex) # <<<<<<<<<<<<<<
  106879. */
  106880. ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->loop->__pyx_vtab)->_handle_exception(__pyx_v_self->loop, __pyx_v_ex);
  106881. }
  106882. __pyx_L9:;
  106883. /* "uvloop/request.pyx":50
  106884. * # We only can cancel pending requests. Let's try.
  106885. * err = uv.uv_cancel(self.request)
  106886. * if err < 0: # <<<<<<<<<<<<<<
  106887. * if err == uv.UV_EBUSY:
  106888. * # Can't close the request -- it's executing (see the first
  106889. */
  106890. }
  106891. /* "uvloop/request.pyx":20
  106892. * Py_DECREF(self)
  106893. *
  106894. * cdef cancel(self): # <<<<<<<<<<<<<<
  106895. * # Most requests are implemented using a threadpool. It's only
  106896. * # possible to cancel a request when it's still in a threadpool's
  106897. */
  106898. /* function exit code */
  106899. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  106900. goto __pyx_L0;
  106901. __pyx_L1_error:;
  106902. __Pyx_XDECREF(__pyx_t_2);
  106903. __Pyx_XDECREF(__pyx_t_3);
  106904. __Pyx_XDECREF(__pyx_t_4);
  106905. __Pyx_XDECREF(__pyx_t_5);
  106906. __Pyx_AddTraceback("uvloop.loop.UVRequest.cancel", __pyx_clineno, __pyx_lineno, __pyx_filename);
  106907. __pyx_r = 0;
  106908. __pyx_L0:;
  106909. __Pyx_XDECREF(__pyx_v_ex);
  106910. __Pyx_XGIVEREF(__pyx_r);
  106911. __Pyx_RefNannyFinishContext();
  106912. return __pyx_r;
  106913. }
  106914. /* "(tree fragment)":1
  106915. * def __reduce_cython__(self): # <<<<<<<<<<<<<<
  106916. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  106917. * def __setstate_cython__(self, __pyx_state):
  106918. */
  106919. /* Python wrapper */
  106920. static PyObject *__pyx_pw_6uvloop_4loop_9UVRequest_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  106921. static char __pyx_doc_6uvloop_4loop_9UVRequest_2__reduce_cython__[] = "UVRequest.__reduce_cython__(self)";
  106922. static PyObject *__pyx_pw_6uvloop_4loop_9UVRequest_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  106923. PyObject *__pyx_r = 0;
  106924. __Pyx_RefNannyDeclarations
  106925. __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  106926. __pyx_r = __pyx_pf_6uvloop_4loop_9UVRequest_2__reduce_cython__(((struct __pyx_obj_6uvloop_4loop_UVRequest *)__pyx_v_self));
  106927. /* function exit code */
  106928. __Pyx_RefNannyFinishContext();
  106929. return __pyx_r;
  106930. }
  106931. static PyObject *__pyx_pf_6uvloop_4loop_9UVRequest_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVRequest *__pyx_v_self) {
  106932. PyObject *__pyx_r = NULL;
  106933. __Pyx_RefNannyDeclarations
  106934. PyObject *__pyx_t_1 = NULL;
  106935. __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  106936. /* "(tree fragment)":2
  106937. * def __reduce_cython__(self):
  106938. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  106939. * def __setstate_cython__(self, __pyx_state):
  106940. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  106941. */
  106942. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__181, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 2, __pyx_L1_error)
  106943. __Pyx_GOTREF(__pyx_t_1);
  106944. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  106945. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  106946. __PYX_ERR(9, 2, __pyx_L1_error)
  106947. /* "(tree fragment)":1
  106948. * def __reduce_cython__(self): # <<<<<<<<<<<<<<
  106949. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  106950. * def __setstate_cython__(self, __pyx_state):
  106951. */
  106952. /* function exit code */
  106953. __pyx_L1_error:;
  106954. __Pyx_XDECREF(__pyx_t_1);
  106955. __Pyx_AddTraceback("uvloop.loop.UVRequest.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  106956. __pyx_r = NULL;
  106957. __Pyx_XGIVEREF(__pyx_r);
  106958. __Pyx_RefNannyFinishContext();
  106959. return __pyx_r;
  106960. }
  106961. /* "(tree fragment)":3
  106962. * def __reduce_cython__(self):
  106963. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  106964. * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
  106965. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  106966. */
  106967. /* Python wrapper */
  106968. static PyObject *__pyx_pw_6uvloop_4loop_9UVRequest_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
  106969. static char __pyx_doc_6uvloop_4loop_9UVRequest_4__setstate_cython__[] = "UVRequest.__setstate_cython__(self, __pyx_state)";
  106970. static PyObject *__pyx_pw_6uvloop_4loop_9UVRequest_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  106971. PyObject *__pyx_r = 0;
  106972. __Pyx_RefNannyDeclarations
  106973. __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  106974. __pyx_r = __pyx_pf_6uvloop_4loop_9UVRequest_4__setstate_cython__(((struct __pyx_obj_6uvloop_4loop_UVRequest *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
  106975. /* function exit code */
  106976. __Pyx_RefNannyFinishContext();
  106977. return __pyx_r;
  106978. }
  106979. static PyObject *__pyx_pf_6uvloop_4loop_9UVRequest_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVRequest *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  106980. PyObject *__pyx_r = NULL;
  106981. __Pyx_RefNannyDeclarations
  106982. PyObject *__pyx_t_1 = NULL;
  106983. __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  106984. /* "(tree fragment)":4
  106985. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  106986. * def __setstate_cython__(self, __pyx_state):
  106987. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  106988. */
  106989. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__182, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 4, __pyx_L1_error)
  106990. __Pyx_GOTREF(__pyx_t_1);
  106991. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  106992. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  106993. __PYX_ERR(9, 4, __pyx_L1_error)
  106994. /* "(tree fragment)":3
  106995. * def __reduce_cython__(self):
  106996. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  106997. * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
  106998. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  106999. */
  107000. /* function exit code */
  107001. __pyx_L1_error:;
  107002. __Pyx_XDECREF(__pyx_t_1);
  107003. __Pyx_AddTraceback("uvloop.loop.UVRequest.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  107004. __pyx_r = NULL;
  107005. __Pyx_XGIVEREF(__pyx_r);
  107006. __Pyx_RefNannyFinishContext();
  107007. return __pyx_r;
  107008. }
  107009. /* "uvloop/dns.pyx":1
  107010. * cdef __port_to_int(port, proto): # <<<<<<<<<<<<<<
  107011. * if type(port) is int:
  107012. * return port
  107013. */
  107014. static PyObject *__pyx_f_6uvloop_4loop___port_to_int(PyObject *__pyx_v_port, PyObject *__pyx_v_proto) {
  107015. PyObject *__pyx_r = NULL;
  107016. __Pyx_RefNannyDeclarations
  107017. int __pyx_t_1;
  107018. int __pyx_t_2;
  107019. int __pyx_t_3;
  107020. PyObject *__pyx_t_4 = NULL;
  107021. PyObject *__pyx_t_5 = NULL;
  107022. PyObject *__pyx_t_6 = NULL;
  107023. PyObject *__pyx_t_7 = NULL;
  107024. int __pyx_t_8;
  107025. PyObject *__pyx_t_9 = NULL;
  107026. PyObject *__pyx_t_10 = NULL;
  107027. PyObject *__pyx_t_11 = NULL;
  107028. __Pyx_RefNannySetupContext("__port_to_int", 0);
  107029. __Pyx_INCREF(__pyx_v_port);
  107030. /* "uvloop/dns.pyx":2
  107031. * cdef __port_to_int(port, proto):
  107032. * if type(port) is int: # <<<<<<<<<<<<<<
  107033. * return port
  107034. *
  107035. */
  107036. __pyx_t_1 = (((PyObject *)Py_TYPE(__pyx_v_port)) == ((PyObject *)(&PyInt_Type)));
  107037. __pyx_t_2 = (__pyx_t_1 != 0);
  107038. if (__pyx_t_2) {
  107039. /* "uvloop/dns.pyx":3
  107040. * cdef __port_to_int(port, proto):
  107041. * if type(port) is int:
  107042. * return port # <<<<<<<<<<<<<<
  107043. *
  107044. * if port is None or port == '' or port == b'':
  107045. */
  107046. __Pyx_XDECREF(__pyx_r);
  107047. __Pyx_INCREF(__pyx_v_port);
  107048. __pyx_r = __pyx_v_port;
  107049. goto __pyx_L0;
  107050. /* "uvloop/dns.pyx":2
  107051. * cdef __port_to_int(port, proto):
  107052. * if type(port) is int: # <<<<<<<<<<<<<<
  107053. * return port
  107054. *
  107055. */
  107056. }
  107057. /* "uvloop/dns.pyx":5
  107058. * return port
  107059. *
  107060. * if port is None or port == '' or port == b'': # <<<<<<<<<<<<<<
  107061. * return 0
  107062. *
  107063. */
  107064. __pyx_t_1 = (__pyx_v_port == Py_None);
  107065. __pyx_t_3 = (__pyx_t_1 != 0);
  107066. if (!__pyx_t_3) {
  107067. } else {
  107068. __pyx_t_2 = __pyx_t_3;
  107069. goto __pyx_L5_bool_binop_done;
  107070. }
  107071. __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_v_port, __pyx_kp_u__2, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(7, 5, __pyx_L1_error)
  107072. if (!__pyx_t_3) {
  107073. } else {
  107074. __pyx_t_2 = __pyx_t_3;
  107075. goto __pyx_L5_bool_binop_done;
  107076. }
  107077. __pyx_t_3 = (__Pyx_PyBytes_Equals(__pyx_v_port, __pyx_kp_b__2, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(7, 5, __pyx_L1_error)
  107078. __pyx_t_2 = __pyx_t_3;
  107079. __pyx_L5_bool_binop_done:;
  107080. if (__pyx_t_2) {
  107081. /* "uvloop/dns.pyx":6
  107082. *
  107083. * if port is None or port == '' or port == b'':
  107084. * return 0 # <<<<<<<<<<<<<<
  107085. *
  107086. * try:
  107087. */
  107088. __Pyx_XDECREF(__pyx_r);
  107089. __Pyx_INCREF(__pyx_int_0);
  107090. __pyx_r = __pyx_int_0;
  107091. goto __pyx_L0;
  107092. /* "uvloop/dns.pyx":5
  107093. * return port
  107094. *
  107095. * if port is None or port == '' or port == b'': # <<<<<<<<<<<<<<
  107096. * return 0
  107097. *
  107098. */
  107099. }
  107100. /* "uvloop/dns.pyx":8
  107101. * return 0
  107102. *
  107103. * try: # <<<<<<<<<<<<<<
  107104. * return int(port)
  107105. * except (ValueError, TypeError):
  107106. */
  107107. {
  107108. __Pyx_PyThreadState_declare
  107109. __Pyx_PyThreadState_assign
  107110. __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
  107111. __Pyx_XGOTREF(__pyx_t_4);
  107112. __Pyx_XGOTREF(__pyx_t_5);
  107113. __Pyx_XGOTREF(__pyx_t_6);
  107114. /*try:*/ {
  107115. /* "uvloop/dns.pyx":9
  107116. *
  107117. * try:
  107118. * return int(port) # <<<<<<<<<<<<<<
  107119. * except (ValueError, TypeError):
  107120. * pass
  107121. */
  107122. __Pyx_XDECREF(__pyx_r);
  107123. __pyx_t_7 = __Pyx_PyNumber_Int(__pyx_v_port); if (unlikely(!__pyx_t_7)) __PYX_ERR(7, 9, __pyx_L8_error)
  107124. __Pyx_GOTREF(__pyx_t_7);
  107125. __pyx_r = __pyx_t_7;
  107126. __pyx_t_7 = 0;
  107127. goto __pyx_L12_try_return;
  107128. /* "uvloop/dns.pyx":8
  107129. * return 0
  107130. *
  107131. * try: # <<<<<<<<<<<<<<
  107132. * return int(port)
  107133. * except (ValueError, TypeError):
  107134. */
  107135. }
  107136. __pyx_L8_error:;
  107137. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  107138. /* "uvloop/dns.pyx":10
  107139. * try:
  107140. * return int(port)
  107141. * except (ValueError, TypeError): # <<<<<<<<<<<<<<
  107142. * pass
  107143. *
  107144. */
  107145. __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError);
  107146. if (__pyx_t_8) {
  107147. __Pyx_ErrRestore(0,0,0);
  107148. goto __pyx_L9_exception_handled;
  107149. }
  107150. goto __pyx_L10_except_error;
  107151. __pyx_L10_except_error:;
  107152. /* "uvloop/dns.pyx":8
  107153. * return 0
  107154. *
  107155. * try: # <<<<<<<<<<<<<<
  107156. * return int(port)
  107157. * except (ValueError, TypeError):
  107158. */
  107159. __Pyx_XGIVEREF(__pyx_t_4);
  107160. __Pyx_XGIVEREF(__pyx_t_5);
  107161. __Pyx_XGIVEREF(__pyx_t_6);
  107162. __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
  107163. goto __pyx_L1_error;
  107164. __pyx_L12_try_return:;
  107165. __Pyx_XGIVEREF(__pyx_t_4);
  107166. __Pyx_XGIVEREF(__pyx_t_5);
  107167. __Pyx_XGIVEREF(__pyx_t_6);
  107168. __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
  107169. goto __pyx_L0;
  107170. __pyx_L9_exception_handled:;
  107171. __Pyx_XGIVEREF(__pyx_t_4);
  107172. __Pyx_XGIVEREF(__pyx_t_5);
  107173. __Pyx_XGIVEREF(__pyx_t_6);
  107174. __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
  107175. }
  107176. /* "uvloop/dns.pyx":13
  107177. * pass
  107178. *
  107179. * if isinstance(port, bytes): # <<<<<<<<<<<<<<
  107180. * port = port.decode()
  107181. *
  107182. */
  107183. __pyx_t_2 = PyBytes_Check(__pyx_v_port);
  107184. __pyx_t_3 = (__pyx_t_2 != 0);
  107185. if (__pyx_t_3) {
  107186. /* "uvloop/dns.pyx":14
  107187. *
  107188. * if isinstance(port, bytes):
  107189. * port = port.decode() # <<<<<<<<<<<<<<
  107190. *
  107191. * if isinstance(port, str) and proto is not None:
  107192. */
  107193. __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_port, __pyx_n_s_decode); if (unlikely(!__pyx_t_9)) __PYX_ERR(7, 14, __pyx_L1_error)
  107194. __Pyx_GOTREF(__pyx_t_9);
  107195. __pyx_t_10 = NULL;
  107196. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
  107197. __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
  107198. if (likely(__pyx_t_10)) {
  107199. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
  107200. __Pyx_INCREF(__pyx_t_10);
  107201. __Pyx_INCREF(function);
  107202. __Pyx_DECREF_SET(__pyx_t_9, function);
  107203. }
  107204. }
  107205. __pyx_t_7 = (__pyx_t_10) ? __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_10) : __Pyx_PyObject_CallNoArg(__pyx_t_9);
  107206. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  107207. if (unlikely(!__pyx_t_7)) __PYX_ERR(7, 14, __pyx_L1_error)
  107208. __Pyx_GOTREF(__pyx_t_7);
  107209. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  107210. __Pyx_DECREF_SET(__pyx_v_port, __pyx_t_7);
  107211. __pyx_t_7 = 0;
  107212. /* "uvloop/dns.pyx":13
  107213. * pass
  107214. *
  107215. * if isinstance(port, bytes): # <<<<<<<<<<<<<<
  107216. * port = port.decode()
  107217. *
  107218. */
  107219. }
  107220. /* "uvloop/dns.pyx":16
  107221. * port = port.decode()
  107222. *
  107223. * if isinstance(port, str) and proto is not None: # <<<<<<<<<<<<<<
  107224. * if proto == uv.IPPROTO_TCP:
  107225. * return socket_getservbyname(port, 'tcp')
  107226. */
  107227. __pyx_t_2 = PyUnicode_Check(__pyx_v_port);
  107228. __pyx_t_1 = (__pyx_t_2 != 0);
  107229. if (__pyx_t_1) {
  107230. } else {
  107231. __pyx_t_3 = __pyx_t_1;
  107232. goto __pyx_L16_bool_binop_done;
  107233. }
  107234. __pyx_t_1 = (__pyx_v_proto != Py_None);
  107235. __pyx_t_2 = (__pyx_t_1 != 0);
  107236. __pyx_t_3 = __pyx_t_2;
  107237. __pyx_L16_bool_binop_done:;
  107238. if (__pyx_t_3) {
  107239. /* "uvloop/dns.pyx":17
  107240. *
  107241. * if isinstance(port, str) and proto is not None:
  107242. * if proto == uv.IPPROTO_TCP: # <<<<<<<<<<<<<<
  107243. * return socket_getservbyname(port, 'tcp')
  107244. * elif proto == uv.IPPROTO_UDP:
  107245. */
  107246. __pyx_t_7 = __Pyx_PyInt_From_int(IPPROTO_TCP); if (unlikely(!__pyx_t_7)) __PYX_ERR(7, 17, __pyx_L1_error)
  107247. __Pyx_GOTREF(__pyx_t_7);
  107248. __pyx_t_9 = PyObject_RichCompare(__pyx_v_proto, __pyx_t_7, Py_EQ); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(7, 17, __pyx_L1_error)
  107249. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  107250. __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(7, 17, __pyx_L1_error)
  107251. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  107252. if (__pyx_t_3) {
  107253. /* "uvloop/dns.pyx":18
  107254. * if isinstance(port, str) and proto is not None:
  107255. * if proto == uv.IPPROTO_TCP:
  107256. * return socket_getservbyname(port, 'tcp') # <<<<<<<<<<<<<<
  107257. * elif proto == uv.IPPROTO_UDP:
  107258. * return socket_getservbyname(port, 'udp')
  107259. */
  107260. __Pyx_XDECREF(__pyx_r);
  107261. __Pyx_INCREF(__pyx_v_6uvloop_4loop_socket_getservbyname);
  107262. __pyx_t_7 = __pyx_v_6uvloop_4loop_socket_getservbyname; __pyx_t_10 = NULL;
  107263. __pyx_t_8 = 0;
  107264. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
  107265. __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_7);
  107266. if (likely(__pyx_t_10)) {
  107267. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
  107268. __Pyx_INCREF(__pyx_t_10);
  107269. __Pyx_INCREF(function);
  107270. __Pyx_DECREF_SET(__pyx_t_7, function);
  107271. __pyx_t_8 = 1;
  107272. }
  107273. }
  107274. #if CYTHON_FAST_PYCALL
  107275. if (PyFunction_Check(__pyx_t_7)) {
  107276. PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_port, __pyx_n_u_tcp};
  107277. __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(7, 18, __pyx_L1_error)
  107278. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  107279. __Pyx_GOTREF(__pyx_t_9);
  107280. } else
  107281. #endif
  107282. #if CYTHON_FAST_PYCCALL
  107283. if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
  107284. PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_port, __pyx_n_u_tcp};
  107285. __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(7, 18, __pyx_L1_error)
  107286. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  107287. __Pyx_GOTREF(__pyx_t_9);
  107288. } else
  107289. #endif
  107290. {
  107291. __pyx_t_11 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_11)) __PYX_ERR(7, 18, __pyx_L1_error)
  107292. __Pyx_GOTREF(__pyx_t_11);
  107293. if (__pyx_t_10) {
  107294. __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_10); __pyx_t_10 = NULL;
  107295. }
  107296. __Pyx_INCREF(__pyx_v_port);
  107297. __Pyx_GIVEREF(__pyx_v_port);
  107298. PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_8, __pyx_v_port);
  107299. __Pyx_INCREF(__pyx_n_u_tcp);
  107300. __Pyx_GIVEREF(__pyx_n_u_tcp);
  107301. PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_8, __pyx_n_u_tcp);
  107302. __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_11, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(7, 18, __pyx_L1_error)
  107303. __Pyx_GOTREF(__pyx_t_9);
  107304. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  107305. }
  107306. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  107307. __pyx_r = __pyx_t_9;
  107308. __pyx_t_9 = 0;
  107309. goto __pyx_L0;
  107310. /* "uvloop/dns.pyx":17
  107311. *
  107312. * if isinstance(port, str) and proto is not None:
  107313. * if proto == uv.IPPROTO_TCP: # <<<<<<<<<<<<<<
  107314. * return socket_getservbyname(port, 'tcp')
  107315. * elif proto == uv.IPPROTO_UDP:
  107316. */
  107317. }
  107318. /* "uvloop/dns.pyx":19
  107319. * if proto == uv.IPPROTO_TCP:
  107320. * return socket_getservbyname(port, 'tcp')
  107321. * elif proto == uv.IPPROTO_UDP: # <<<<<<<<<<<<<<
  107322. * return socket_getservbyname(port, 'udp')
  107323. *
  107324. */
  107325. __pyx_t_9 = __Pyx_PyInt_From_int(IPPROTO_UDP); if (unlikely(!__pyx_t_9)) __PYX_ERR(7, 19, __pyx_L1_error)
  107326. __Pyx_GOTREF(__pyx_t_9);
  107327. __pyx_t_7 = PyObject_RichCompare(__pyx_v_proto, __pyx_t_9, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(7, 19, __pyx_L1_error)
  107328. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  107329. __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(7, 19, __pyx_L1_error)
  107330. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  107331. if (__pyx_t_3) {
  107332. /* "uvloop/dns.pyx":20
  107333. * return socket_getservbyname(port, 'tcp')
  107334. * elif proto == uv.IPPROTO_UDP:
  107335. * return socket_getservbyname(port, 'udp') # <<<<<<<<<<<<<<
  107336. *
  107337. * raise OSError('service/proto not found')
  107338. */
  107339. __Pyx_XDECREF(__pyx_r);
  107340. __Pyx_INCREF(__pyx_v_6uvloop_4loop_socket_getservbyname);
  107341. __pyx_t_9 = __pyx_v_6uvloop_4loop_socket_getservbyname; __pyx_t_11 = NULL;
  107342. __pyx_t_8 = 0;
  107343. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
  107344. __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_9);
  107345. if (likely(__pyx_t_11)) {
  107346. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
  107347. __Pyx_INCREF(__pyx_t_11);
  107348. __Pyx_INCREF(function);
  107349. __Pyx_DECREF_SET(__pyx_t_9, function);
  107350. __pyx_t_8 = 1;
  107351. }
  107352. }
  107353. #if CYTHON_FAST_PYCALL
  107354. if (PyFunction_Check(__pyx_t_9)) {
  107355. PyObject *__pyx_temp[3] = {__pyx_t_11, __pyx_v_port, __pyx_n_u_udp};
  107356. __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(7, 20, __pyx_L1_error)
  107357. __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
  107358. __Pyx_GOTREF(__pyx_t_7);
  107359. } else
  107360. #endif
  107361. #if CYTHON_FAST_PYCCALL
  107362. if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
  107363. PyObject *__pyx_temp[3] = {__pyx_t_11, __pyx_v_port, __pyx_n_u_udp};
  107364. __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(7, 20, __pyx_L1_error)
  107365. __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
  107366. __Pyx_GOTREF(__pyx_t_7);
  107367. } else
  107368. #endif
  107369. {
  107370. __pyx_t_10 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_10)) __PYX_ERR(7, 20, __pyx_L1_error)
  107371. __Pyx_GOTREF(__pyx_t_10);
  107372. if (__pyx_t_11) {
  107373. __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_11); __pyx_t_11 = NULL;
  107374. }
  107375. __Pyx_INCREF(__pyx_v_port);
  107376. __Pyx_GIVEREF(__pyx_v_port);
  107377. PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_8, __pyx_v_port);
  107378. __Pyx_INCREF(__pyx_n_u_udp);
  107379. __Pyx_GIVEREF(__pyx_n_u_udp);
  107380. PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_8, __pyx_n_u_udp);
  107381. __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(7, 20, __pyx_L1_error)
  107382. __Pyx_GOTREF(__pyx_t_7);
  107383. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  107384. }
  107385. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  107386. __pyx_r = __pyx_t_7;
  107387. __pyx_t_7 = 0;
  107388. goto __pyx_L0;
  107389. /* "uvloop/dns.pyx":19
  107390. * if proto == uv.IPPROTO_TCP:
  107391. * return socket_getservbyname(port, 'tcp')
  107392. * elif proto == uv.IPPROTO_UDP: # <<<<<<<<<<<<<<
  107393. * return socket_getservbyname(port, 'udp')
  107394. *
  107395. */
  107396. }
  107397. /* "uvloop/dns.pyx":16
  107398. * port = port.decode()
  107399. *
  107400. * if isinstance(port, str) and proto is not None: # <<<<<<<<<<<<<<
  107401. * if proto == uv.IPPROTO_TCP:
  107402. * return socket_getservbyname(port, 'tcp')
  107403. */
  107404. }
  107405. /* "uvloop/dns.pyx":22
  107406. * return socket_getservbyname(port, 'udp')
  107407. *
  107408. * raise OSError('service/proto not found') # <<<<<<<<<<<<<<
  107409. *
  107410. *
  107411. */
  107412. __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_OSError, __pyx_tuple__183, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(7, 22, __pyx_L1_error)
  107413. __Pyx_GOTREF(__pyx_t_7);
  107414. __Pyx_Raise(__pyx_t_7, 0, 0, 0);
  107415. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  107416. __PYX_ERR(7, 22, __pyx_L1_error)
  107417. /* "uvloop/dns.pyx":1
  107418. * cdef __port_to_int(port, proto): # <<<<<<<<<<<<<<
  107419. * if type(port) is int:
  107420. * return port
  107421. */
  107422. /* function exit code */
  107423. __pyx_L1_error:;
  107424. __Pyx_XDECREF(__pyx_t_7);
  107425. __Pyx_XDECREF(__pyx_t_9);
  107426. __Pyx_XDECREF(__pyx_t_10);
  107427. __Pyx_XDECREF(__pyx_t_11);
  107428. __Pyx_AddTraceback("uvloop.loop.__port_to_int", __pyx_clineno, __pyx_lineno, __pyx_filename);
  107429. __pyx_r = 0;
  107430. __pyx_L0:;
  107431. __Pyx_XDECREF(__pyx_v_port);
  107432. __Pyx_XGIVEREF(__pyx_r);
  107433. __Pyx_RefNannyFinishContext();
  107434. return __pyx_r;
  107435. }
  107436. /* "uvloop/dns.pyx":25
  107437. *
  107438. *
  107439. * cdef __convert_sockaddr_to_pyaddr(const system.sockaddr* addr): # <<<<<<<<<<<<<<
  107440. * # Converts sockaddr structs into what Python socket
  107441. * # module can understand:
  107442. */
  107443. static PyObject *__pyx_f_6uvloop_4loop___convert_sockaddr_to_pyaddr(struct sockaddr const *__pyx_v_addr) {
  107444. char __pyx_v_buf[0x80];
  107445. int __pyx_v_err;
  107446. struct sockaddr_in *__pyx_v_addr4;
  107447. struct sockaddr_in6 *__pyx_v_addr6;
  107448. PyObject *__pyx_r = NULL;
  107449. __Pyx_RefNannyDeclarations
  107450. int __pyx_t_1;
  107451. PyObject *__pyx_t_2 = NULL;
  107452. PyObject *__pyx_t_3 = NULL;
  107453. PyObject *__pyx_t_4 = NULL;
  107454. PyObject *__pyx_t_5 = NULL;
  107455. PyObject *__pyx_t_6 = NULL;
  107456. __Pyx_RefNannySetupContext("__convert_sockaddr_to_pyaddr", 0);
  107457. /* "uvloop/dns.pyx":37
  107458. * system.sockaddr_in6 *addr6
  107459. *
  107460. * if addr.sa_family == uv.AF_INET: # <<<<<<<<<<<<<<
  107461. * addr4 = <system.sockaddr_in*>addr
  107462. *
  107463. */
  107464. __pyx_t_1 = ((__pyx_v_addr->sa_family == AF_INET) != 0);
  107465. if (__pyx_t_1) {
  107466. /* "uvloop/dns.pyx":38
  107467. *
  107468. * if addr.sa_family == uv.AF_INET:
  107469. * addr4 = <system.sockaddr_in*>addr # <<<<<<<<<<<<<<
  107470. *
  107471. * err = uv.uv_ip4_name(addr4, buf, sizeof(buf))
  107472. */
  107473. __pyx_v_addr4 = ((struct sockaddr_in *)__pyx_v_addr);
  107474. /* "uvloop/dns.pyx":40
  107475. * addr4 = <system.sockaddr_in*>addr
  107476. *
  107477. * err = uv.uv_ip4_name(addr4, buf, sizeof(buf)) # <<<<<<<<<<<<<<
  107478. * if err < 0:
  107479. * raise convert_error(err)
  107480. */
  107481. __pyx_v_err = uv_ip4_name(__pyx_v_addr4, __pyx_v_buf, (sizeof(__pyx_v_buf)));
  107482. /* "uvloop/dns.pyx":41
  107483. *
  107484. * err = uv.uv_ip4_name(addr4, buf, sizeof(buf))
  107485. * if err < 0: # <<<<<<<<<<<<<<
  107486. * raise convert_error(err)
  107487. *
  107488. */
  107489. __pyx_t_1 = ((__pyx_v_err < 0) != 0);
  107490. if (unlikely(__pyx_t_1)) {
  107491. /* "uvloop/dns.pyx":42
  107492. * err = uv.uv_ip4_name(addr4, buf, sizeof(buf))
  107493. * if err < 0:
  107494. * raise convert_error(err) # <<<<<<<<<<<<<<
  107495. *
  107496. * return (
  107497. */
  107498. __pyx_t_2 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 42, __pyx_L1_error)
  107499. __Pyx_GOTREF(__pyx_t_2);
  107500. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  107501. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  107502. __PYX_ERR(7, 42, __pyx_L1_error)
  107503. /* "uvloop/dns.pyx":41
  107504. *
  107505. * err = uv.uv_ip4_name(addr4, buf, sizeof(buf))
  107506. * if err < 0: # <<<<<<<<<<<<<<
  107507. * raise convert_error(err)
  107508. *
  107509. */
  107510. }
  107511. /* "uvloop/dns.pyx":44
  107512. * raise convert_error(err)
  107513. *
  107514. * return ( # <<<<<<<<<<<<<<
  107515. * PyUnicode_FromString(buf),
  107516. * system.ntohs(addr4.sin_port)
  107517. */
  107518. __Pyx_XDECREF(__pyx_r);
  107519. /* "uvloop/dns.pyx":45
  107520. *
  107521. * return (
  107522. * PyUnicode_FromString(buf), # <<<<<<<<<<<<<<
  107523. * system.ntohs(addr4.sin_port)
  107524. * )
  107525. */
  107526. __pyx_t_2 = PyUnicode_FromString(__pyx_v_buf); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 45, __pyx_L1_error)
  107527. __Pyx_GOTREF(__pyx_t_2);
  107528. /* "uvloop/dns.pyx":46
  107529. * return (
  107530. * PyUnicode_FromString(buf),
  107531. * system.ntohs(addr4.sin_port) # <<<<<<<<<<<<<<
  107532. * )
  107533. *
  107534. */
  107535. __pyx_t_3 = __Pyx_PyInt_From_int(ntohs(__pyx_v_addr4->sin_port)); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 46, __pyx_L1_error)
  107536. __Pyx_GOTREF(__pyx_t_3);
  107537. /* "uvloop/dns.pyx":45
  107538. *
  107539. * return (
  107540. * PyUnicode_FromString(buf), # <<<<<<<<<<<<<<
  107541. * system.ntohs(addr4.sin_port)
  107542. * )
  107543. */
  107544. __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 45, __pyx_L1_error)
  107545. __Pyx_GOTREF(__pyx_t_4);
  107546. __Pyx_GIVEREF(__pyx_t_2);
  107547. PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  107548. __Pyx_GIVEREF(__pyx_t_3);
  107549. PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
  107550. __pyx_t_2 = 0;
  107551. __pyx_t_3 = 0;
  107552. __pyx_r = __pyx_t_4;
  107553. __pyx_t_4 = 0;
  107554. goto __pyx_L0;
  107555. /* "uvloop/dns.pyx":37
  107556. * system.sockaddr_in6 *addr6
  107557. *
  107558. * if addr.sa_family == uv.AF_INET: # <<<<<<<<<<<<<<
  107559. * addr4 = <system.sockaddr_in*>addr
  107560. *
  107561. */
  107562. }
  107563. /* "uvloop/dns.pyx":49
  107564. * )
  107565. *
  107566. * elif addr.sa_family == uv.AF_INET6: # <<<<<<<<<<<<<<
  107567. * addr6 = <system.sockaddr_in6*>addr
  107568. *
  107569. */
  107570. __pyx_t_1 = ((__pyx_v_addr->sa_family == AF_INET6) != 0);
  107571. if (__pyx_t_1) {
  107572. /* "uvloop/dns.pyx":50
  107573. *
  107574. * elif addr.sa_family == uv.AF_INET6:
  107575. * addr6 = <system.sockaddr_in6*>addr # <<<<<<<<<<<<<<
  107576. *
  107577. * err = uv.uv_ip6_name(addr6, buf, sizeof(buf))
  107578. */
  107579. __pyx_v_addr6 = ((struct sockaddr_in6 *)__pyx_v_addr);
  107580. /* "uvloop/dns.pyx":52
  107581. * addr6 = <system.sockaddr_in6*>addr
  107582. *
  107583. * err = uv.uv_ip6_name(addr6, buf, sizeof(buf)) # <<<<<<<<<<<<<<
  107584. * if err < 0:
  107585. * raise convert_error(err)
  107586. */
  107587. __pyx_v_err = uv_ip6_name(__pyx_v_addr6, __pyx_v_buf, (sizeof(__pyx_v_buf)));
  107588. /* "uvloop/dns.pyx":53
  107589. *
  107590. * err = uv.uv_ip6_name(addr6, buf, sizeof(buf))
  107591. * if err < 0: # <<<<<<<<<<<<<<
  107592. * raise convert_error(err)
  107593. *
  107594. */
  107595. __pyx_t_1 = ((__pyx_v_err < 0) != 0);
  107596. if (unlikely(__pyx_t_1)) {
  107597. /* "uvloop/dns.pyx":54
  107598. * err = uv.uv_ip6_name(addr6, buf, sizeof(buf))
  107599. * if err < 0:
  107600. * raise convert_error(err) # <<<<<<<<<<<<<<
  107601. *
  107602. * return (
  107603. */
  107604. __pyx_t_4 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 54, __pyx_L1_error)
  107605. __Pyx_GOTREF(__pyx_t_4);
  107606. __Pyx_Raise(__pyx_t_4, 0, 0, 0);
  107607. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  107608. __PYX_ERR(7, 54, __pyx_L1_error)
  107609. /* "uvloop/dns.pyx":53
  107610. *
  107611. * err = uv.uv_ip6_name(addr6, buf, sizeof(buf))
  107612. * if err < 0: # <<<<<<<<<<<<<<
  107613. * raise convert_error(err)
  107614. *
  107615. */
  107616. }
  107617. /* "uvloop/dns.pyx":56
  107618. * raise convert_error(err)
  107619. *
  107620. * return ( # <<<<<<<<<<<<<<
  107621. * PyUnicode_FromString(buf),
  107622. * system.ntohs(addr6.sin6_port),
  107623. */
  107624. __Pyx_XDECREF(__pyx_r);
  107625. /* "uvloop/dns.pyx":57
  107626. *
  107627. * return (
  107628. * PyUnicode_FromString(buf), # <<<<<<<<<<<<<<
  107629. * system.ntohs(addr6.sin6_port),
  107630. * system.ntohl(addr6.sin6_flowinfo),
  107631. */
  107632. __pyx_t_4 = PyUnicode_FromString(__pyx_v_buf); if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 57, __pyx_L1_error)
  107633. __Pyx_GOTREF(__pyx_t_4);
  107634. /* "uvloop/dns.pyx":58
  107635. * return (
  107636. * PyUnicode_FromString(buf),
  107637. * system.ntohs(addr6.sin6_port), # <<<<<<<<<<<<<<
  107638. * system.ntohl(addr6.sin6_flowinfo),
  107639. * addr6.sin6_scope_id
  107640. */
  107641. __pyx_t_3 = __Pyx_PyInt_From_int(ntohs(__pyx_v_addr6->sin6_port)); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 58, __pyx_L1_error)
  107642. __Pyx_GOTREF(__pyx_t_3);
  107643. /* "uvloop/dns.pyx":59
  107644. * PyUnicode_FromString(buf),
  107645. * system.ntohs(addr6.sin6_port),
  107646. * system.ntohl(addr6.sin6_flowinfo), # <<<<<<<<<<<<<<
  107647. * addr6.sin6_scope_id
  107648. * )
  107649. */
  107650. __pyx_t_2 = __Pyx_PyInt_From_int(ntohl(__pyx_v_addr6->sin6_flowinfo)); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 59, __pyx_L1_error)
  107651. __Pyx_GOTREF(__pyx_t_2);
  107652. /* "uvloop/dns.pyx":60
  107653. * system.ntohs(addr6.sin6_port),
  107654. * system.ntohl(addr6.sin6_flowinfo),
  107655. * addr6.sin6_scope_id # <<<<<<<<<<<<<<
  107656. * )
  107657. *
  107658. */
  107659. __pyx_t_5 = __Pyx_PyInt_From_unsigned_long(__pyx_v_addr6->sin6_scope_id); if (unlikely(!__pyx_t_5)) __PYX_ERR(7, 60, __pyx_L1_error)
  107660. __Pyx_GOTREF(__pyx_t_5);
  107661. /* "uvloop/dns.pyx":57
  107662. *
  107663. * return (
  107664. * PyUnicode_FromString(buf), # <<<<<<<<<<<<<<
  107665. * system.ntohs(addr6.sin6_port),
  107666. * system.ntohl(addr6.sin6_flowinfo),
  107667. */
  107668. __pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(7, 57, __pyx_L1_error)
  107669. __Pyx_GOTREF(__pyx_t_6);
  107670. __Pyx_GIVEREF(__pyx_t_4);
  107671. PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
  107672. __Pyx_GIVEREF(__pyx_t_3);
  107673. PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_3);
  107674. __Pyx_GIVEREF(__pyx_t_2);
  107675. PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_2);
  107676. __Pyx_GIVEREF(__pyx_t_5);
  107677. PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_5);
  107678. __pyx_t_4 = 0;
  107679. __pyx_t_3 = 0;
  107680. __pyx_t_2 = 0;
  107681. __pyx_t_5 = 0;
  107682. __pyx_r = __pyx_t_6;
  107683. __pyx_t_6 = 0;
  107684. goto __pyx_L0;
  107685. /* "uvloop/dns.pyx":49
  107686. * )
  107687. *
  107688. * elif addr.sa_family == uv.AF_INET6: # <<<<<<<<<<<<<<
  107689. * addr6 = <system.sockaddr_in6*>addr
  107690. *
  107691. */
  107692. }
  107693. /* "uvloop/dns.pyx":63
  107694. * )
  107695. *
  107696. * raise RuntimeError("cannot convert sockaddr into Python object") # <<<<<<<<<<<<<<
  107697. *
  107698. *
  107699. */
  107700. __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__184, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(7, 63, __pyx_L1_error)
  107701. __Pyx_GOTREF(__pyx_t_6);
  107702. __Pyx_Raise(__pyx_t_6, 0, 0, 0);
  107703. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  107704. __PYX_ERR(7, 63, __pyx_L1_error)
  107705. /* "uvloop/dns.pyx":25
  107706. *
  107707. *
  107708. * cdef __convert_sockaddr_to_pyaddr(const system.sockaddr* addr): # <<<<<<<<<<<<<<
  107709. * # Converts sockaddr structs into what Python socket
  107710. * # module can understand:
  107711. */
  107712. /* function exit code */
  107713. __pyx_L1_error:;
  107714. __Pyx_XDECREF(__pyx_t_2);
  107715. __Pyx_XDECREF(__pyx_t_3);
  107716. __Pyx_XDECREF(__pyx_t_4);
  107717. __Pyx_XDECREF(__pyx_t_5);
  107718. __Pyx_XDECREF(__pyx_t_6);
  107719. __Pyx_AddTraceback("uvloop.loop.__convert_sockaddr_to_pyaddr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  107720. __pyx_r = 0;
  107721. __pyx_L0:;
  107722. __Pyx_XGIVEREF(__pyx_r);
  107723. __Pyx_RefNannyFinishContext();
  107724. return __pyx_r;
  107725. }
  107726. /* "(tree fragment)":1
  107727. * def __reduce_cython__(self): # <<<<<<<<<<<<<<
  107728. * raise TypeError("Pickling of struct members such as self.addr must be explicitly requested with @auto_pickle(True)")
  107729. * def __setstate_cython__(self, __pyx_state):
  107730. */
  107731. /* Python wrapper */
  107732. static PyObject *__pyx_pw_6uvloop_4loop_14SockAddrHolder_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  107733. static char __pyx_doc_6uvloop_4loop_14SockAddrHolder___reduce_cython__[] = "SockAddrHolder.__reduce_cython__(self)";
  107734. static PyObject *__pyx_pw_6uvloop_4loop_14SockAddrHolder_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  107735. PyObject *__pyx_r = 0;
  107736. __Pyx_RefNannyDeclarations
  107737. __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  107738. __pyx_r = __pyx_pf_6uvloop_4loop_14SockAddrHolder___reduce_cython__(((struct __pyx_obj_6uvloop_4loop_SockAddrHolder *)__pyx_v_self));
  107739. /* function exit code */
  107740. __Pyx_RefNannyFinishContext();
  107741. return __pyx_r;
  107742. }
  107743. static PyObject *__pyx_pf_6uvloop_4loop_14SockAddrHolder___reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_SockAddrHolder *__pyx_v_self) {
  107744. PyObject *__pyx_r = NULL;
  107745. __Pyx_RefNannyDeclarations
  107746. PyObject *__pyx_t_1 = NULL;
  107747. __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  107748. /* "(tree fragment)":2
  107749. * def __reduce_cython__(self):
  107750. * raise TypeError("Pickling of struct members such as self.addr must be explicitly requested with @auto_pickle(True)") # <<<<<<<<<<<<<<
  107751. * def __setstate_cython__(self, __pyx_state):
  107752. * raise TypeError("Pickling of struct members such as self.addr must be explicitly requested with @auto_pickle(True)")
  107753. */
  107754. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__185, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 2, __pyx_L1_error)
  107755. __Pyx_GOTREF(__pyx_t_1);
  107756. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  107757. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  107758. __PYX_ERR(9, 2, __pyx_L1_error)
  107759. /* "(tree fragment)":1
  107760. * def __reduce_cython__(self): # <<<<<<<<<<<<<<
  107761. * raise TypeError("Pickling of struct members such as self.addr must be explicitly requested with @auto_pickle(True)")
  107762. * def __setstate_cython__(self, __pyx_state):
  107763. */
  107764. /* function exit code */
  107765. __pyx_L1_error:;
  107766. __Pyx_XDECREF(__pyx_t_1);
  107767. __Pyx_AddTraceback("uvloop.loop.SockAddrHolder.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  107768. __pyx_r = NULL;
  107769. __Pyx_XGIVEREF(__pyx_r);
  107770. __Pyx_RefNannyFinishContext();
  107771. return __pyx_r;
  107772. }
  107773. /* "(tree fragment)":3
  107774. * def __reduce_cython__(self):
  107775. * raise TypeError("Pickling of struct members such as self.addr must be explicitly requested with @auto_pickle(True)")
  107776. * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
  107777. * raise TypeError("Pickling of struct members such as self.addr must be explicitly requested with @auto_pickle(True)")
  107778. */
  107779. /* Python wrapper */
  107780. static PyObject *__pyx_pw_6uvloop_4loop_14SockAddrHolder_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
  107781. static char __pyx_doc_6uvloop_4loop_14SockAddrHolder_2__setstate_cython__[] = "SockAddrHolder.__setstate_cython__(self, __pyx_state)";
  107782. static PyObject *__pyx_pw_6uvloop_4loop_14SockAddrHolder_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  107783. PyObject *__pyx_r = 0;
  107784. __Pyx_RefNannyDeclarations
  107785. __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  107786. __pyx_r = __pyx_pf_6uvloop_4loop_14SockAddrHolder_2__setstate_cython__(((struct __pyx_obj_6uvloop_4loop_SockAddrHolder *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
  107787. /* function exit code */
  107788. __Pyx_RefNannyFinishContext();
  107789. return __pyx_r;
  107790. }
  107791. static PyObject *__pyx_pf_6uvloop_4loop_14SockAddrHolder_2__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_SockAddrHolder *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  107792. PyObject *__pyx_r = NULL;
  107793. __Pyx_RefNannyDeclarations
  107794. PyObject *__pyx_t_1 = NULL;
  107795. __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  107796. /* "(tree fragment)":4
  107797. * raise TypeError("Pickling of struct members such as self.addr must be explicitly requested with @auto_pickle(True)")
  107798. * def __setstate_cython__(self, __pyx_state):
  107799. * raise TypeError("Pickling of struct members such as self.addr must be explicitly requested with @auto_pickle(True)") # <<<<<<<<<<<<<<
  107800. */
  107801. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__186, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 4, __pyx_L1_error)
  107802. __Pyx_GOTREF(__pyx_t_1);
  107803. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  107804. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  107805. __PYX_ERR(9, 4, __pyx_L1_error)
  107806. /* "(tree fragment)":3
  107807. * def __reduce_cython__(self):
  107808. * raise TypeError("Pickling of struct members such as self.addr must be explicitly requested with @auto_pickle(True)")
  107809. * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
  107810. * raise TypeError("Pickling of struct members such as self.addr must be explicitly requested with @auto_pickle(True)")
  107811. */
  107812. /* function exit code */
  107813. __pyx_L1_error:;
  107814. __Pyx_XDECREF(__pyx_t_1);
  107815. __Pyx_AddTraceback("uvloop.loop.SockAddrHolder.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  107816. __pyx_r = NULL;
  107817. __Pyx_XGIVEREF(__pyx_r);
  107818. __Pyx_RefNannyFinishContext();
  107819. return __pyx_r;
  107820. }
  107821. /* "uvloop/dns.pyx":77
  107822. *
  107823. *
  107824. * cdef __convert_pyaddr_to_sockaddr(int family, object addr, # <<<<<<<<<<<<<<
  107825. * system.sockaddr* res):
  107826. * cdef:
  107827. */
  107828. static PyObject *__pyx_f_6uvloop_4loop___convert_pyaddr_to_sockaddr(int __pyx_v_family, PyObject *__pyx_v_addr, struct sockaddr *__pyx_v_res) {
  107829. int __pyx_v_err;
  107830. int __pyx_v_addr_len;
  107831. int __pyx_v_scope_id;
  107832. int __pyx_v_flowinfo;
  107833. char *__pyx_v_buf;
  107834. Py_ssize_t __pyx_v_buflen;
  107835. struct __pyx_obj_6uvloop_4loop_SockAddrHolder *__pyx_v_ret = 0;
  107836. PyObject *__pyx_v_host = NULL;
  107837. PyObject *__pyx_v_port = NULL;
  107838. PyObject *__pyx_r = NULL;
  107839. __Pyx_RefNannyDeclarations
  107840. PyObject *__pyx_t_1 = NULL;
  107841. int __pyx_t_2;
  107842. int __pyx_t_3;
  107843. int __pyx_t_4;
  107844. Py_ssize_t __pyx_t_5;
  107845. PyObject *__pyx_t_6 = NULL;
  107846. PyObject *__pyx_t_7 = NULL;
  107847. PyObject *(*__pyx_t_8)(PyObject *);
  107848. PyObject *__pyx_t_9 = NULL;
  107849. PyObject *__pyx_t_10 = NULL;
  107850. PyObject *__pyx_t_11 = NULL;
  107851. int __pyx_t_12;
  107852. PyObject *__pyx_t_13 = NULL;
  107853. PyObject *__pyx_t_14 = NULL;
  107854. PyObject *__pyx_t_15 = NULL;
  107855. char const *__pyx_t_16;
  107856. char const *__pyx_t_17;
  107857. Py_UCS4 __pyx_t_18;
  107858. __Pyx_RefNannySetupContext("__convert_pyaddr_to_sockaddr", 0);
  107859. __Pyx_INCREF(__pyx_v_addr);
  107860. /* "uvloop/dns.pyx":82
  107861. * int err
  107862. * int addr_len
  107863. * int scope_id = 0 # <<<<<<<<<<<<<<
  107864. * int flowinfo = 0
  107865. * char *buf
  107866. */
  107867. __pyx_v_scope_id = 0;
  107868. /* "uvloop/dns.pyx":83
  107869. * int addr_len
  107870. * int scope_id = 0
  107871. * int flowinfo = 0 # <<<<<<<<<<<<<<
  107872. * char *buf
  107873. * Py_ssize_t buflen
  107874. */
  107875. __pyx_v_flowinfo = 0;
  107876. /* "uvloop/dns.pyx":88
  107877. * SockAddrHolder ret
  107878. *
  107879. * ret = sockaddrs.get(addr, None) # <<<<<<<<<<<<<<
  107880. * if ret is not None and ret.family == family:
  107881. * memcpy(res, &ret.addr, ret.addr_size)
  107882. */
  107883. __pyx_t_1 = __pyx_f_6uvloop_4loop_8LruCache_get(__pyx_v_6uvloop_4loop_sockaddrs, __pyx_v_addr, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 88, __pyx_L1_error)
  107884. __Pyx_GOTREF(__pyx_t_1);
  107885. if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6uvloop_4loop_SockAddrHolder))))) __PYX_ERR(7, 88, __pyx_L1_error)
  107886. __pyx_v_ret = ((struct __pyx_obj_6uvloop_4loop_SockAddrHolder *)__pyx_t_1);
  107887. __pyx_t_1 = 0;
  107888. /* "uvloop/dns.pyx":89
  107889. *
  107890. * ret = sockaddrs.get(addr, None)
  107891. * if ret is not None and ret.family == family: # <<<<<<<<<<<<<<
  107892. * memcpy(res, &ret.addr, ret.addr_size)
  107893. * return
  107894. */
  107895. __pyx_t_3 = (((PyObject *)__pyx_v_ret) != Py_None);
  107896. __pyx_t_4 = (__pyx_t_3 != 0);
  107897. if (__pyx_t_4) {
  107898. } else {
  107899. __pyx_t_2 = __pyx_t_4;
  107900. goto __pyx_L4_bool_binop_done;
  107901. }
  107902. __pyx_t_4 = ((__pyx_v_ret->family == __pyx_v_family) != 0);
  107903. __pyx_t_2 = __pyx_t_4;
  107904. __pyx_L4_bool_binop_done:;
  107905. if (__pyx_t_2) {
  107906. /* "uvloop/dns.pyx":90
  107907. * ret = sockaddrs.get(addr, None)
  107908. * if ret is not None and ret.family == family:
  107909. * memcpy(res, &ret.addr, ret.addr_size) # <<<<<<<<<<<<<<
  107910. * return
  107911. *
  107912. */
  107913. (void)(memcpy(__pyx_v_res, (&__pyx_v_ret->addr), __pyx_v_ret->addr_size));
  107914. /* "uvloop/dns.pyx":91
  107915. * if ret is not None and ret.family == family:
  107916. * memcpy(res, &ret.addr, ret.addr_size)
  107917. * return # <<<<<<<<<<<<<<
  107918. *
  107919. * ret = SockAddrHolder.__new__(SockAddrHolder)
  107920. */
  107921. __Pyx_XDECREF(__pyx_r);
  107922. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  107923. goto __pyx_L0;
  107924. /* "uvloop/dns.pyx":89
  107925. *
  107926. * ret = sockaddrs.get(addr, None)
  107927. * if ret is not None and ret.family == family: # <<<<<<<<<<<<<<
  107928. * memcpy(res, &ret.addr, ret.addr_size)
  107929. * return
  107930. */
  107931. }
  107932. /* "uvloop/dns.pyx":93
  107933. * return
  107934. *
  107935. * ret = SockAddrHolder.__new__(SockAddrHolder) # <<<<<<<<<<<<<<
  107936. * if family == uv.AF_INET:
  107937. * if not isinstance(addr, tuple):
  107938. */
  107939. __pyx_t_1 = ((PyObject *)__pyx_tp_new_6uvloop_4loop_SockAddrHolder(((PyTypeObject *)__pyx_ptype_6uvloop_4loop_SockAddrHolder), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 93, __pyx_L1_error)
  107940. __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  107941. __Pyx_DECREF_SET(__pyx_v_ret, ((struct __pyx_obj_6uvloop_4loop_SockAddrHolder *)__pyx_t_1));
  107942. __pyx_t_1 = 0;
  107943. /* "uvloop/dns.pyx":94
  107944. *
  107945. * ret = SockAddrHolder.__new__(SockAddrHolder)
  107946. * if family == uv.AF_INET: # <<<<<<<<<<<<<<
  107947. * if not isinstance(addr, tuple):
  107948. * raise TypeError('AF_INET address must be tuple')
  107949. */
  107950. __pyx_t_2 = ((__pyx_v_family == AF_INET) != 0);
  107951. if (__pyx_t_2) {
  107952. /* "uvloop/dns.pyx":95
  107953. * ret = SockAddrHolder.__new__(SockAddrHolder)
  107954. * if family == uv.AF_INET:
  107955. * if not isinstance(addr, tuple): # <<<<<<<<<<<<<<
  107956. * raise TypeError('AF_INET address must be tuple')
  107957. * if len(addr) != 2:
  107958. */
  107959. __pyx_t_2 = PyTuple_Check(__pyx_v_addr);
  107960. __pyx_t_4 = ((!(__pyx_t_2 != 0)) != 0);
  107961. if (unlikely(__pyx_t_4)) {
  107962. /* "uvloop/dns.pyx":96
  107963. * if family == uv.AF_INET:
  107964. * if not isinstance(addr, tuple):
  107965. * raise TypeError('AF_INET address must be tuple') # <<<<<<<<<<<<<<
  107966. * if len(addr) != 2:
  107967. * raise ValueError('AF_INET address must be tuple of (host, port)')
  107968. */
  107969. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__187, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 96, __pyx_L1_error)
  107970. __Pyx_GOTREF(__pyx_t_1);
  107971. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  107972. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  107973. __PYX_ERR(7, 96, __pyx_L1_error)
  107974. /* "uvloop/dns.pyx":95
  107975. * ret = SockAddrHolder.__new__(SockAddrHolder)
  107976. * if family == uv.AF_INET:
  107977. * if not isinstance(addr, tuple): # <<<<<<<<<<<<<<
  107978. * raise TypeError('AF_INET address must be tuple')
  107979. * if len(addr) != 2:
  107980. */
  107981. }
  107982. /* "uvloop/dns.pyx":97
  107983. * if not isinstance(addr, tuple):
  107984. * raise TypeError('AF_INET address must be tuple')
  107985. * if len(addr) != 2: # <<<<<<<<<<<<<<
  107986. * raise ValueError('AF_INET address must be tuple of (host, port)')
  107987. * host, port = addr
  107988. */
  107989. __pyx_t_5 = PyObject_Length(__pyx_v_addr); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(7, 97, __pyx_L1_error)
  107990. __pyx_t_4 = ((__pyx_t_5 != 2) != 0);
  107991. if (unlikely(__pyx_t_4)) {
  107992. /* "uvloop/dns.pyx":98
  107993. * raise TypeError('AF_INET address must be tuple')
  107994. * if len(addr) != 2:
  107995. * raise ValueError('AF_INET address must be tuple of (host, port)') # <<<<<<<<<<<<<<
  107996. * host, port = addr
  107997. * if isinstance(host, str):
  107998. */
  107999. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__188, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 98, __pyx_L1_error)
  108000. __Pyx_GOTREF(__pyx_t_1);
  108001. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  108002. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  108003. __PYX_ERR(7, 98, __pyx_L1_error)
  108004. /* "uvloop/dns.pyx":97
  108005. * if not isinstance(addr, tuple):
  108006. * raise TypeError('AF_INET address must be tuple')
  108007. * if len(addr) != 2: # <<<<<<<<<<<<<<
  108008. * raise ValueError('AF_INET address must be tuple of (host, port)')
  108009. * host, port = addr
  108010. */
  108011. }
  108012. /* "uvloop/dns.pyx":99
  108013. * if len(addr) != 2:
  108014. * raise ValueError('AF_INET address must be tuple of (host, port)')
  108015. * host, port = addr # <<<<<<<<<<<<<<
  108016. * if isinstance(host, str):
  108017. * try:
  108018. */
  108019. if ((likely(PyTuple_CheckExact(__pyx_v_addr))) || (PyList_CheckExact(__pyx_v_addr))) {
  108020. PyObject* sequence = __pyx_v_addr;
  108021. Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
  108022. if (unlikely(size != 2)) {
  108023. if (size > 2) __Pyx_RaiseTooManyValuesError(2);
  108024. else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
  108025. __PYX_ERR(7, 99, __pyx_L1_error)
  108026. }
  108027. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  108028. if (likely(PyTuple_CheckExact(sequence))) {
  108029. __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0);
  108030. __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1);
  108031. } else {
  108032. __pyx_t_1 = PyList_GET_ITEM(sequence, 0);
  108033. __pyx_t_6 = PyList_GET_ITEM(sequence, 1);
  108034. }
  108035. __Pyx_INCREF(__pyx_t_1);
  108036. __Pyx_INCREF(__pyx_t_6);
  108037. #else
  108038. __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 99, __pyx_L1_error)
  108039. __Pyx_GOTREF(__pyx_t_1);
  108040. __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(7, 99, __pyx_L1_error)
  108041. __Pyx_GOTREF(__pyx_t_6);
  108042. #endif
  108043. } else {
  108044. Py_ssize_t index = -1;
  108045. __pyx_t_7 = PyObject_GetIter(__pyx_v_addr); if (unlikely(!__pyx_t_7)) __PYX_ERR(7, 99, __pyx_L1_error)
  108046. __Pyx_GOTREF(__pyx_t_7);
  108047. __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext;
  108048. index = 0; __pyx_t_1 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_1)) goto __pyx_L9_unpacking_failed;
  108049. __Pyx_GOTREF(__pyx_t_1);
  108050. index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L9_unpacking_failed;
  108051. __Pyx_GOTREF(__pyx_t_6);
  108052. if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(7, 99, __pyx_L1_error)
  108053. __pyx_t_8 = NULL;
  108054. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  108055. goto __pyx_L10_unpacking_done;
  108056. __pyx_L9_unpacking_failed:;
  108057. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  108058. __pyx_t_8 = NULL;
  108059. if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
  108060. __PYX_ERR(7, 99, __pyx_L1_error)
  108061. __pyx_L10_unpacking_done:;
  108062. }
  108063. __pyx_v_host = __pyx_t_1;
  108064. __pyx_t_1 = 0;
  108065. __pyx_v_port = __pyx_t_6;
  108066. __pyx_t_6 = 0;
  108067. /* "uvloop/dns.pyx":100
  108068. * raise ValueError('AF_INET address must be tuple of (host, port)')
  108069. * host, port = addr
  108070. * if isinstance(host, str): # <<<<<<<<<<<<<<
  108071. * try:
  108072. * # idna codec is rather slow, so we try ascii first.
  108073. */
  108074. __pyx_t_4 = PyUnicode_Check(__pyx_v_host);
  108075. __pyx_t_2 = (__pyx_t_4 != 0);
  108076. if (__pyx_t_2) {
  108077. /* "uvloop/dns.pyx":101
  108078. * host, port = addr
  108079. * if isinstance(host, str):
  108080. * try: # <<<<<<<<<<<<<<
  108081. * # idna codec is rather slow, so we try ascii first.
  108082. * host = host.encode('ascii')
  108083. */
  108084. {
  108085. __Pyx_PyThreadState_declare
  108086. __Pyx_PyThreadState_assign
  108087. __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
  108088. __Pyx_XGOTREF(__pyx_t_9);
  108089. __Pyx_XGOTREF(__pyx_t_10);
  108090. __Pyx_XGOTREF(__pyx_t_11);
  108091. /*try:*/ {
  108092. /* "uvloop/dns.pyx":103
  108093. * try:
  108094. * # idna codec is rather slow, so we try ascii first.
  108095. * host = host.encode('ascii') # <<<<<<<<<<<<<<
  108096. * except UnicodeEncodeError:
  108097. * host = host.encode('idna')
  108098. */
  108099. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_host, __pyx_n_s_encode); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 103, __pyx_L12_error)
  108100. __Pyx_GOTREF(__pyx_t_1);
  108101. __pyx_t_7 = NULL;
  108102. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
  108103. __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1);
  108104. if (likely(__pyx_t_7)) {
  108105. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
  108106. __Pyx_INCREF(__pyx_t_7);
  108107. __Pyx_INCREF(function);
  108108. __Pyx_DECREF_SET(__pyx_t_1, function);
  108109. }
  108110. }
  108111. __pyx_t_6 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_7, __pyx_n_u_ascii) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_n_u_ascii);
  108112. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  108113. if (unlikely(!__pyx_t_6)) __PYX_ERR(7, 103, __pyx_L12_error)
  108114. __Pyx_GOTREF(__pyx_t_6);
  108115. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  108116. __Pyx_DECREF_SET(__pyx_v_host, __pyx_t_6);
  108117. __pyx_t_6 = 0;
  108118. /* "uvloop/dns.pyx":101
  108119. * host, port = addr
  108120. * if isinstance(host, str):
  108121. * try: # <<<<<<<<<<<<<<
  108122. * # idna codec is rather slow, so we try ascii first.
  108123. * host = host.encode('ascii')
  108124. */
  108125. }
  108126. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  108127. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  108128. __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
  108129. goto __pyx_L17_try_end;
  108130. __pyx_L12_error:;
  108131. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  108132. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  108133. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  108134. /* "uvloop/dns.pyx":104
  108135. * # idna codec is rather slow, so we try ascii first.
  108136. * host = host.encode('ascii')
  108137. * except UnicodeEncodeError: # <<<<<<<<<<<<<<
  108138. * host = host.encode('idna')
  108139. * if not isinstance(host, (bytes, bytearray)):
  108140. */
  108141. __pyx_t_12 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeEncodeError);
  108142. if (__pyx_t_12) {
  108143. __Pyx_AddTraceback("uvloop.loop.__convert_pyaddr_to_sockaddr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  108144. if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_1, &__pyx_t_7) < 0) __PYX_ERR(7, 104, __pyx_L14_except_error)
  108145. __Pyx_GOTREF(__pyx_t_6);
  108146. __Pyx_GOTREF(__pyx_t_1);
  108147. __Pyx_GOTREF(__pyx_t_7);
  108148. /* "uvloop/dns.pyx":105
  108149. * host = host.encode('ascii')
  108150. * except UnicodeEncodeError:
  108151. * host = host.encode('idna') # <<<<<<<<<<<<<<
  108152. * if not isinstance(host, (bytes, bytearray)):
  108153. * raise TypeError('host must be a string or bytes object')
  108154. */
  108155. __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_host, __pyx_n_s_encode); if (unlikely(!__pyx_t_14)) __PYX_ERR(7, 105, __pyx_L14_except_error)
  108156. __Pyx_GOTREF(__pyx_t_14);
  108157. __pyx_t_15 = NULL;
  108158. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_14))) {
  108159. __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_14);
  108160. if (likely(__pyx_t_15)) {
  108161. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14);
  108162. __Pyx_INCREF(__pyx_t_15);
  108163. __Pyx_INCREF(function);
  108164. __Pyx_DECREF_SET(__pyx_t_14, function);
  108165. }
  108166. }
  108167. __pyx_t_13 = (__pyx_t_15) ? __Pyx_PyObject_Call2Args(__pyx_t_14, __pyx_t_15, __pyx_n_u_idna) : __Pyx_PyObject_CallOneArg(__pyx_t_14, __pyx_n_u_idna);
  108168. __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
  108169. if (unlikely(!__pyx_t_13)) __PYX_ERR(7, 105, __pyx_L14_except_error)
  108170. __Pyx_GOTREF(__pyx_t_13);
  108171. __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  108172. __Pyx_DECREF_SET(__pyx_v_host, __pyx_t_13);
  108173. __pyx_t_13 = 0;
  108174. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  108175. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  108176. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  108177. goto __pyx_L13_exception_handled;
  108178. }
  108179. goto __pyx_L14_except_error;
  108180. __pyx_L14_except_error:;
  108181. /* "uvloop/dns.pyx":101
  108182. * host, port = addr
  108183. * if isinstance(host, str):
  108184. * try: # <<<<<<<<<<<<<<
  108185. * # idna codec is rather slow, so we try ascii first.
  108186. * host = host.encode('ascii')
  108187. */
  108188. __Pyx_XGIVEREF(__pyx_t_9);
  108189. __Pyx_XGIVEREF(__pyx_t_10);
  108190. __Pyx_XGIVEREF(__pyx_t_11);
  108191. __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11);
  108192. goto __pyx_L1_error;
  108193. __pyx_L13_exception_handled:;
  108194. __Pyx_XGIVEREF(__pyx_t_9);
  108195. __Pyx_XGIVEREF(__pyx_t_10);
  108196. __Pyx_XGIVEREF(__pyx_t_11);
  108197. __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11);
  108198. __pyx_L17_try_end:;
  108199. }
  108200. /* "uvloop/dns.pyx":100
  108201. * raise ValueError('AF_INET address must be tuple of (host, port)')
  108202. * host, port = addr
  108203. * if isinstance(host, str): # <<<<<<<<<<<<<<
  108204. * try:
  108205. * # idna codec is rather slow, so we try ascii first.
  108206. */
  108207. }
  108208. /* "uvloop/dns.pyx":106
  108209. * except UnicodeEncodeError:
  108210. * host = host.encode('idna')
  108211. * if not isinstance(host, (bytes, bytearray)): # <<<<<<<<<<<<<<
  108212. * raise TypeError('host must be a string or bytes object')
  108213. *
  108214. */
  108215. __pyx_t_4 = PyBytes_Check(__pyx_v_host);
  108216. __pyx_t_3 = (__pyx_t_4 != 0);
  108217. if (!__pyx_t_3) {
  108218. } else {
  108219. __pyx_t_2 = __pyx_t_3;
  108220. goto __pyx_L21_bool_binop_done;
  108221. }
  108222. __pyx_t_3 = PyByteArray_Check(__pyx_v_host);
  108223. __pyx_t_4 = (__pyx_t_3 != 0);
  108224. __pyx_t_2 = __pyx_t_4;
  108225. __pyx_L21_bool_binop_done:;
  108226. __pyx_t_4 = ((!(__pyx_t_2 != 0)) != 0);
  108227. if (unlikely(__pyx_t_4)) {
  108228. /* "uvloop/dns.pyx":107
  108229. * host = host.encode('idna')
  108230. * if not isinstance(host, (bytes, bytearray)):
  108231. * raise TypeError('host must be a string or bytes object') # <<<<<<<<<<<<<<
  108232. *
  108233. * port = __port_to_int(port, None)
  108234. */
  108235. __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__189, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(7, 107, __pyx_L1_error)
  108236. __Pyx_GOTREF(__pyx_t_7);
  108237. __Pyx_Raise(__pyx_t_7, 0, 0, 0);
  108238. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  108239. __PYX_ERR(7, 107, __pyx_L1_error)
  108240. /* "uvloop/dns.pyx":106
  108241. * except UnicodeEncodeError:
  108242. * host = host.encode('idna')
  108243. * if not isinstance(host, (bytes, bytearray)): # <<<<<<<<<<<<<<
  108244. * raise TypeError('host must be a string or bytes object')
  108245. *
  108246. */
  108247. }
  108248. /* "uvloop/dns.pyx":109
  108249. * raise TypeError('host must be a string or bytes object')
  108250. *
  108251. * port = __port_to_int(port, None) # <<<<<<<<<<<<<<
  108252. *
  108253. * ret.addr_size = sizeof(system.sockaddr_in)
  108254. */
  108255. __pyx_t_7 = __pyx_f_6uvloop_4loop___port_to_int(__pyx_v_port, Py_None); if (unlikely(!__pyx_t_7)) __PYX_ERR(7, 109, __pyx_L1_error)
  108256. __Pyx_GOTREF(__pyx_t_7);
  108257. __Pyx_DECREF_SET(__pyx_v_port, __pyx_t_7);
  108258. __pyx_t_7 = 0;
  108259. /* "uvloop/dns.pyx":111
  108260. * port = __port_to_int(port, None)
  108261. *
  108262. * ret.addr_size = sizeof(system.sockaddr_in) # <<<<<<<<<<<<<<
  108263. * err = uv.uv_ip4_addr(host, <int>port, <system.sockaddr_in*>&ret.addr)
  108264. * if err < 0:
  108265. */
  108266. __pyx_v_ret->addr_size = (sizeof(struct sockaddr_in));
  108267. /* "uvloop/dns.pyx":112
  108268. *
  108269. * ret.addr_size = sizeof(system.sockaddr_in)
  108270. * err = uv.uv_ip4_addr(host, <int>port, <system.sockaddr_in*>&ret.addr) # <<<<<<<<<<<<<<
  108271. * if err < 0:
  108272. * raise convert_error(err)
  108273. */
  108274. __pyx_t_16 = __Pyx_PyObject_AsString(__pyx_v_host); if (unlikely((!__pyx_t_16) && PyErr_Occurred())) __PYX_ERR(7, 112, __pyx_L1_error)
  108275. __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_v_port); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 112, __pyx_L1_error)
  108276. __pyx_v_err = uv_ip4_addr(__pyx_t_16, ((int)__pyx_t_12), ((struct sockaddr_in *)(&__pyx_v_ret->addr)));
  108277. /* "uvloop/dns.pyx":113
  108278. * ret.addr_size = sizeof(system.sockaddr_in)
  108279. * err = uv.uv_ip4_addr(host, <int>port, <system.sockaddr_in*>&ret.addr)
  108280. * if err < 0: # <<<<<<<<<<<<<<
  108281. * raise convert_error(err)
  108282. *
  108283. */
  108284. __pyx_t_4 = ((__pyx_v_err < 0) != 0);
  108285. if (unlikely(__pyx_t_4)) {
  108286. /* "uvloop/dns.pyx":114
  108287. * err = uv.uv_ip4_addr(host, <int>port, <system.sockaddr_in*>&ret.addr)
  108288. * if err < 0:
  108289. * raise convert_error(err) # <<<<<<<<<<<<<<
  108290. *
  108291. * elif family == uv.AF_INET6:
  108292. */
  108293. __pyx_t_7 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(7, 114, __pyx_L1_error)
  108294. __Pyx_GOTREF(__pyx_t_7);
  108295. __Pyx_Raise(__pyx_t_7, 0, 0, 0);
  108296. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  108297. __PYX_ERR(7, 114, __pyx_L1_error)
  108298. /* "uvloop/dns.pyx":113
  108299. * ret.addr_size = sizeof(system.sockaddr_in)
  108300. * err = uv.uv_ip4_addr(host, <int>port, <system.sockaddr_in*>&ret.addr)
  108301. * if err < 0: # <<<<<<<<<<<<<<
  108302. * raise convert_error(err)
  108303. *
  108304. */
  108305. }
  108306. /* "uvloop/dns.pyx":94
  108307. *
  108308. * ret = SockAddrHolder.__new__(SockAddrHolder)
  108309. * if family == uv.AF_INET: # <<<<<<<<<<<<<<
  108310. * if not isinstance(addr, tuple):
  108311. * raise TypeError('AF_INET address must be tuple')
  108312. */
  108313. goto __pyx_L6;
  108314. }
  108315. /* "uvloop/dns.pyx":116
  108316. * raise convert_error(err)
  108317. *
  108318. * elif family == uv.AF_INET6: # <<<<<<<<<<<<<<
  108319. * if not isinstance(addr, tuple):
  108320. * raise TypeError('AF_INET6 address must be tuple')
  108321. */
  108322. __pyx_t_4 = ((__pyx_v_family == AF_INET6) != 0);
  108323. if (__pyx_t_4) {
  108324. /* "uvloop/dns.pyx":117
  108325. *
  108326. * elif family == uv.AF_INET6:
  108327. * if not isinstance(addr, tuple): # <<<<<<<<<<<<<<
  108328. * raise TypeError('AF_INET6 address must be tuple')
  108329. *
  108330. */
  108331. __pyx_t_4 = PyTuple_Check(__pyx_v_addr);
  108332. __pyx_t_2 = ((!(__pyx_t_4 != 0)) != 0);
  108333. if (unlikely(__pyx_t_2)) {
  108334. /* "uvloop/dns.pyx":118
  108335. * elif family == uv.AF_INET6:
  108336. * if not isinstance(addr, tuple):
  108337. * raise TypeError('AF_INET6 address must be tuple') # <<<<<<<<<<<<<<
  108338. *
  108339. * addr_len = len(addr)
  108340. */
  108341. __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__190, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(7, 118, __pyx_L1_error)
  108342. __Pyx_GOTREF(__pyx_t_7);
  108343. __Pyx_Raise(__pyx_t_7, 0, 0, 0);
  108344. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  108345. __PYX_ERR(7, 118, __pyx_L1_error)
  108346. /* "uvloop/dns.pyx":117
  108347. *
  108348. * elif family == uv.AF_INET6:
  108349. * if not isinstance(addr, tuple): # <<<<<<<<<<<<<<
  108350. * raise TypeError('AF_INET6 address must be tuple')
  108351. *
  108352. */
  108353. }
  108354. /* "uvloop/dns.pyx":120
  108355. * raise TypeError('AF_INET6 address must be tuple')
  108356. *
  108357. * addr_len = len(addr) # <<<<<<<<<<<<<<
  108358. * if addr_len < 2 or addr_len > 4:
  108359. * raise ValueError(
  108360. */
  108361. __pyx_t_5 = PyObject_Length(__pyx_v_addr); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(7, 120, __pyx_L1_error)
  108362. __pyx_v_addr_len = __pyx_t_5;
  108363. /* "uvloop/dns.pyx":121
  108364. *
  108365. * addr_len = len(addr)
  108366. * if addr_len < 2 or addr_len > 4: # <<<<<<<<<<<<<<
  108367. * raise ValueError(
  108368. * 'AF_INET6 must be a tuple of 2-4 parameters: '
  108369. */
  108370. __pyx_t_4 = ((__pyx_v_addr_len < 2) != 0);
  108371. if (!__pyx_t_4) {
  108372. } else {
  108373. __pyx_t_2 = __pyx_t_4;
  108374. goto __pyx_L26_bool_binop_done;
  108375. }
  108376. __pyx_t_4 = ((__pyx_v_addr_len > 4) != 0);
  108377. __pyx_t_2 = __pyx_t_4;
  108378. __pyx_L26_bool_binop_done:;
  108379. if (unlikely(__pyx_t_2)) {
  108380. /* "uvloop/dns.pyx":122
  108381. * addr_len = len(addr)
  108382. * if addr_len < 2 or addr_len > 4:
  108383. * raise ValueError( # <<<<<<<<<<<<<<
  108384. * 'AF_INET6 must be a tuple of 2-4 parameters: '
  108385. * '(host, port, flowinfo?, scope_id?)')
  108386. */
  108387. __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__191, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(7, 122, __pyx_L1_error)
  108388. __Pyx_GOTREF(__pyx_t_7);
  108389. __Pyx_Raise(__pyx_t_7, 0, 0, 0);
  108390. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  108391. __PYX_ERR(7, 122, __pyx_L1_error)
  108392. /* "uvloop/dns.pyx":121
  108393. *
  108394. * addr_len = len(addr)
  108395. * if addr_len < 2 or addr_len > 4: # <<<<<<<<<<<<<<
  108396. * raise ValueError(
  108397. * 'AF_INET6 must be a tuple of 2-4 parameters: '
  108398. */
  108399. }
  108400. /* "uvloop/dns.pyx":126
  108401. * '(host, port, flowinfo?, scope_id?)')
  108402. *
  108403. * host = addr[0] # <<<<<<<<<<<<<<
  108404. * if isinstance(host, str):
  108405. * try:
  108406. */
  108407. __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_addr, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(7, 126, __pyx_L1_error)
  108408. __Pyx_GOTREF(__pyx_t_7);
  108409. __pyx_v_host = __pyx_t_7;
  108410. __pyx_t_7 = 0;
  108411. /* "uvloop/dns.pyx":127
  108412. *
  108413. * host = addr[0]
  108414. * if isinstance(host, str): # <<<<<<<<<<<<<<
  108415. * try:
  108416. * # idna codec is rather slow, so we try ascii first.
  108417. */
  108418. __pyx_t_2 = PyUnicode_Check(__pyx_v_host);
  108419. __pyx_t_4 = (__pyx_t_2 != 0);
  108420. if (__pyx_t_4) {
  108421. /* "uvloop/dns.pyx":128
  108422. * host = addr[0]
  108423. * if isinstance(host, str):
  108424. * try: # <<<<<<<<<<<<<<
  108425. * # idna codec is rather slow, so we try ascii first.
  108426. * host = host.encode('ascii')
  108427. */
  108428. {
  108429. __Pyx_PyThreadState_declare
  108430. __Pyx_PyThreadState_assign
  108431. __Pyx_ExceptionSave(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9);
  108432. __Pyx_XGOTREF(__pyx_t_11);
  108433. __Pyx_XGOTREF(__pyx_t_10);
  108434. __Pyx_XGOTREF(__pyx_t_9);
  108435. /*try:*/ {
  108436. /* "uvloop/dns.pyx":130
  108437. * try:
  108438. * # idna codec is rather slow, so we try ascii first.
  108439. * host = host.encode('ascii') # <<<<<<<<<<<<<<
  108440. * except UnicodeEncodeError:
  108441. * host = host.encode('idna')
  108442. */
  108443. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_host, __pyx_n_s_encode); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 130, __pyx_L29_error)
  108444. __Pyx_GOTREF(__pyx_t_1);
  108445. __pyx_t_6 = NULL;
  108446. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
  108447. __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
  108448. if (likely(__pyx_t_6)) {
  108449. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
  108450. __Pyx_INCREF(__pyx_t_6);
  108451. __Pyx_INCREF(function);
  108452. __Pyx_DECREF_SET(__pyx_t_1, function);
  108453. }
  108454. }
  108455. __pyx_t_7 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_6, __pyx_n_u_ascii) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_n_u_ascii);
  108456. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  108457. if (unlikely(!__pyx_t_7)) __PYX_ERR(7, 130, __pyx_L29_error)
  108458. __Pyx_GOTREF(__pyx_t_7);
  108459. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  108460. __Pyx_DECREF_SET(__pyx_v_host, __pyx_t_7);
  108461. __pyx_t_7 = 0;
  108462. /* "uvloop/dns.pyx":128
  108463. * host = addr[0]
  108464. * if isinstance(host, str):
  108465. * try: # <<<<<<<<<<<<<<
  108466. * # idna codec is rather slow, so we try ascii first.
  108467. * host = host.encode('ascii')
  108468. */
  108469. }
  108470. __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
  108471. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  108472. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  108473. goto __pyx_L34_try_end;
  108474. __pyx_L29_error:;
  108475. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  108476. __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
  108477. __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
  108478. __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
  108479. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  108480. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  108481. /* "uvloop/dns.pyx":131
  108482. * # idna codec is rather slow, so we try ascii first.
  108483. * host = host.encode('ascii')
  108484. * except UnicodeEncodeError: # <<<<<<<<<<<<<<
  108485. * host = host.encode('idna')
  108486. * if not isinstance(host, (bytes, bytearray)):
  108487. */
  108488. __pyx_t_12 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeEncodeError);
  108489. if (__pyx_t_12) {
  108490. __Pyx_AddTraceback("uvloop.loop.__convert_pyaddr_to_sockaddr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  108491. if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_1, &__pyx_t_6) < 0) __PYX_ERR(7, 131, __pyx_L31_except_error)
  108492. __Pyx_GOTREF(__pyx_t_7);
  108493. __Pyx_GOTREF(__pyx_t_1);
  108494. __Pyx_GOTREF(__pyx_t_6);
  108495. /* "uvloop/dns.pyx":132
  108496. * host = host.encode('ascii')
  108497. * except UnicodeEncodeError:
  108498. * host = host.encode('idna') # <<<<<<<<<<<<<<
  108499. * if not isinstance(host, (bytes, bytearray)):
  108500. * raise TypeError('host must be a string or bytes object')
  108501. */
  108502. __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_host, __pyx_n_s_encode); if (unlikely(!__pyx_t_14)) __PYX_ERR(7, 132, __pyx_L31_except_error)
  108503. __Pyx_GOTREF(__pyx_t_14);
  108504. __pyx_t_15 = NULL;
  108505. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_14))) {
  108506. __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_14);
  108507. if (likely(__pyx_t_15)) {
  108508. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14);
  108509. __Pyx_INCREF(__pyx_t_15);
  108510. __Pyx_INCREF(function);
  108511. __Pyx_DECREF_SET(__pyx_t_14, function);
  108512. }
  108513. }
  108514. __pyx_t_13 = (__pyx_t_15) ? __Pyx_PyObject_Call2Args(__pyx_t_14, __pyx_t_15, __pyx_n_u_idna) : __Pyx_PyObject_CallOneArg(__pyx_t_14, __pyx_n_u_idna);
  108515. __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
  108516. if (unlikely(!__pyx_t_13)) __PYX_ERR(7, 132, __pyx_L31_except_error)
  108517. __Pyx_GOTREF(__pyx_t_13);
  108518. __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  108519. __Pyx_DECREF_SET(__pyx_v_host, __pyx_t_13);
  108520. __pyx_t_13 = 0;
  108521. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  108522. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  108523. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  108524. goto __pyx_L30_exception_handled;
  108525. }
  108526. goto __pyx_L31_except_error;
  108527. __pyx_L31_except_error:;
  108528. /* "uvloop/dns.pyx":128
  108529. * host = addr[0]
  108530. * if isinstance(host, str):
  108531. * try: # <<<<<<<<<<<<<<
  108532. * # idna codec is rather slow, so we try ascii first.
  108533. * host = host.encode('ascii')
  108534. */
  108535. __Pyx_XGIVEREF(__pyx_t_11);
  108536. __Pyx_XGIVEREF(__pyx_t_10);
  108537. __Pyx_XGIVEREF(__pyx_t_9);
  108538. __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_10, __pyx_t_9);
  108539. goto __pyx_L1_error;
  108540. __pyx_L30_exception_handled:;
  108541. __Pyx_XGIVEREF(__pyx_t_11);
  108542. __Pyx_XGIVEREF(__pyx_t_10);
  108543. __Pyx_XGIVEREF(__pyx_t_9);
  108544. __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_10, __pyx_t_9);
  108545. __pyx_L34_try_end:;
  108546. }
  108547. /* "uvloop/dns.pyx":127
  108548. *
  108549. * host = addr[0]
  108550. * if isinstance(host, str): # <<<<<<<<<<<<<<
  108551. * try:
  108552. * # idna codec is rather slow, so we try ascii first.
  108553. */
  108554. }
  108555. /* "uvloop/dns.pyx":133
  108556. * except UnicodeEncodeError:
  108557. * host = host.encode('idna')
  108558. * if not isinstance(host, (bytes, bytearray)): # <<<<<<<<<<<<<<
  108559. * raise TypeError('host must be a string or bytes object')
  108560. *
  108561. */
  108562. __pyx_t_2 = PyBytes_Check(__pyx_v_host);
  108563. __pyx_t_3 = (__pyx_t_2 != 0);
  108564. if (!__pyx_t_3) {
  108565. } else {
  108566. __pyx_t_4 = __pyx_t_3;
  108567. goto __pyx_L38_bool_binop_done;
  108568. }
  108569. __pyx_t_3 = PyByteArray_Check(__pyx_v_host);
  108570. __pyx_t_2 = (__pyx_t_3 != 0);
  108571. __pyx_t_4 = __pyx_t_2;
  108572. __pyx_L38_bool_binop_done:;
  108573. __pyx_t_2 = ((!(__pyx_t_4 != 0)) != 0);
  108574. if (unlikely(__pyx_t_2)) {
  108575. /* "uvloop/dns.pyx":134
  108576. * host = host.encode('idna')
  108577. * if not isinstance(host, (bytes, bytearray)):
  108578. * raise TypeError('host must be a string or bytes object') # <<<<<<<<<<<<<<
  108579. *
  108580. * port = __port_to_int(addr[1], None)
  108581. */
  108582. __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__189, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(7, 134, __pyx_L1_error)
  108583. __Pyx_GOTREF(__pyx_t_6);
  108584. __Pyx_Raise(__pyx_t_6, 0, 0, 0);
  108585. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  108586. __PYX_ERR(7, 134, __pyx_L1_error)
  108587. /* "uvloop/dns.pyx":133
  108588. * except UnicodeEncodeError:
  108589. * host = host.encode('idna')
  108590. * if not isinstance(host, (bytes, bytearray)): # <<<<<<<<<<<<<<
  108591. * raise TypeError('host must be a string or bytes object')
  108592. *
  108593. */
  108594. }
  108595. /* "uvloop/dns.pyx":136
  108596. * raise TypeError('host must be a string or bytes object')
  108597. *
  108598. * port = __port_to_int(addr[1], None) # <<<<<<<<<<<<<<
  108599. *
  108600. * if addr_len > 2:
  108601. */
  108602. __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_addr, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(7, 136, __pyx_L1_error)
  108603. __Pyx_GOTREF(__pyx_t_6);
  108604. __pyx_t_1 = __pyx_f_6uvloop_4loop___port_to_int(__pyx_t_6, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 136, __pyx_L1_error)
  108605. __Pyx_GOTREF(__pyx_t_1);
  108606. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  108607. __pyx_v_port = __pyx_t_1;
  108608. __pyx_t_1 = 0;
  108609. /* "uvloop/dns.pyx":138
  108610. * port = __port_to_int(addr[1], None)
  108611. *
  108612. * if addr_len > 2: # <<<<<<<<<<<<<<
  108613. * flowinfo = addr[2]
  108614. * if addr_len > 3:
  108615. */
  108616. __pyx_t_2 = ((__pyx_v_addr_len > 2) != 0);
  108617. if (__pyx_t_2) {
  108618. /* "uvloop/dns.pyx":139
  108619. *
  108620. * if addr_len > 2:
  108621. * flowinfo = addr[2] # <<<<<<<<<<<<<<
  108622. * if addr_len > 3:
  108623. * scope_id = addr[3]
  108624. */
  108625. __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_addr, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 139, __pyx_L1_error)
  108626. __Pyx_GOTREF(__pyx_t_1);
  108627. __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 139, __pyx_L1_error)
  108628. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  108629. __pyx_v_flowinfo = __pyx_t_12;
  108630. /* "uvloop/dns.pyx":138
  108631. * port = __port_to_int(addr[1], None)
  108632. *
  108633. * if addr_len > 2: # <<<<<<<<<<<<<<
  108634. * flowinfo = addr[2]
  108635. * if addr_len > 3:
  108636. */
  108637. }
  108638. /* "uvloop/dns.pyx":140
  108639. * if addr_len > 2:
  108640. * flowinfo = addr[2]
  108641. * if addr_len > 3: # <<<<<<<<<<<<<<
  108642. * scope_id = addr[3]
  108643. *
  108644. */
  108645. __pyx_t_2 = ((__pyx_v_addr_len > 3) != 0);
  108646. if (__pyx_t_2) {
  108647. /* "uvloop/dns.pyx":141
  108648. * flowinfo = addr[2]
  108649. * if addr_len > 3:
  108650. * scope_id = addr[3] # <<<<<<<<<<<<<<
  108651. *
  108652. * ret.addr_size = sizeof(system.sockaddr_in6)
  108653. */
  108654. __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_addr, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 141, __pyx_L1_error)
  108655. __Pyx_GOTREF(__pyx_t_1);
  108656. __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 141, __pyx_L1_error)
  108657. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  108658. __pyx_v_scope_id = __pyx_t_12;
  108659. /* "uvloop/dns.pyx":140
  108660. * if addr_len > 2:
  108661. * flowinfo = addr[2]
  108662. * if addr_len > 3: # <<<<<<<<<<<<<<
  108663. * scope_id = addr[3]
  108664. *
  108665. */
  108666. }
  108667. /* "uvloop/dns.pyx":143
  108668. * scope_id = addr[3]
  108669. *
  108670. * ret.addr_size = sizeof(system.sockaddr_in6) # <<<<<<<<<<<<<<
  108671. *
  108672. * err = uv.uv_ip6_addr(host, port, <system.sockaddr_in6*>&ret.addr)
  108673. */
  108674. __pyx_v_ret->addr_size = (sizeof(struct sockaddr_in6));
  108675. /* "uvloop/dns.pyx":145
  108676. * ret.addr_size = sizeof(system.sockaddr_in6)
  108677. *
  108678. * err = uv.uv_ip6_addr(host, port, <system.sockaddr_in6*>&ret.addr) # <<<<<<<<<<<<<<
  108679. * if err < 0:
  108680. * raise convert_error(err)
  108681. */
  108682. __pyx_t_17 = __Pyx_PyObject_AsString(__pyx_v_host); if (unlikely((!__pyx_t_17) && PyErr_Occurred())) __PYX_ERR(7, 145, __pyx_L1_error)
  108683. __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_v_port); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 145, __pyx_L1_error)
  108684. __pyx_v_err = uv_ip6_addr(__pyx_t_17, __pyx_t_12, ((struct sockaddr_in6 *)(&__pyx_v_ret->addr)));
  108685. /* "uvloop/dns.pyx":146
  108686. *
  108687. * err = uv.uv_ip6_addr(host, port, <system.sockaddr_in6*>&ret.addr)
  108688. * if err < 0: # <<<<<<<<<<<<<<
  108689. * raise convert_error(err)
  108690. *
  108691. */
  108692. __pyx_t_2 = ((__pyx_v_err < 0) != 0);
  108693. if (unlikely(__pyx_t_2)) {
  108694. /* "uvloop/dns.pyx":147
  108695. * err = uv.uv_ip6_addr(host, port, <system.sockaddr_in6*>&ret.addr)
  108696. * if err < 0:
  108697. * raise convert_error(err) # <<<<<<<<<<<<<<
  108698. *
  108699. * (<system.sockaddr_in6*>&ret.addr).sin6_flowinfo = flowinfo
  108700. */
  108701. __pyx_t_1 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 147, __pyx_L1_error)
  108702. __Pyx_GOTREF(__pyx_t_1);
  108703. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  108704. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  108705. __PYX_ERR(7, 147, __pyx_L1_error)
  108706. /* "uvloop/dns.pyx":146
  108707. *
  108708. * err = uv.uv_ip6_addr(host, port, <system.sockaddr_in6*>&ret.addr)
  108709. * if err < 0: # <<<<<<<<<<<<<<
  108710. * raise convert_error(err)
  108711. *
  108712. */
  108713. }
  108714. /* "uvloop/dns.pyx":149
  108715. * raise convert_error(err)
  108716. *
  108717. * (<system.sockaddr_in6*>&ret.addr).sin6_flowinfo = flowinfo # <<<<<<<<<<<<<<
  108718. * (<system.sockaddr_in6*>&ret.addr).sin6_scope_id = scope_id
  108719. *
  108720. */
  108721. ((struct sockaddr_in6 *)(&__pyx_v_ret->addr))->sin6_flowinfo = __pyx_v_flowinfo;
  108722. /* "uvloop/dns.pyx":150
  108723. *
  108724. * (<system.sockaddr_in6*>&ret.addr).sin6_flowinfo = flowinfo
  108725. * (<system.sockaddr_in6*>&ret.addr).sin6_scope_id = scope_id # <<<<<<<<<<<<<<
  108726. *
  108727. * elif family == uv.AF_UNIX:
  108728. */
  108729. ((struct sockaddr_in6 *)(&__pyx_v_ret->addr))->sin6_scope_id = __pyx_v_scope_id;
  108730. /* "uvloop/dns.pyx":116
  108731. * raise convert_error(err)
  108732. *
  108733. * elif family == uv.AF_INET6: # <<<<<<<<<<<<<<
  108734. * if not isinstance(addr, tuple):
  108735. * raise TypeError('AF_INET6 address must be tuple')
  108736. */
  108737. goto __pyx_L6;
  108738. }
  108739. /* "uvloop/dns.pyx":152
  108740. * (<system.sockaddr_in6*>&ret.addr).sin6_scope_id = scope_id
  108741. *
  108742. * elif family == uv.AF_UNIX: # <<<<<<<<<<<<<<
  108743. * if isinstance(addr, str):
  108744. * addr = addr.encode(sys_getfilesystemencoding())
  108745. */
  108746. __pyx_t_2 = ((__pyx_v_family == AF_UNIX) != 0);
  108747. if (likely(__pyx_t_2)) {
  108748. /* "uvloop/dns.pyx":153
  108749. *
  108750. * elif family == uv.AF_UNIX:
  108751. * if isinstance(addr, str): # <<<<<<<<<<<<<<
  108752. * addr = addr.encode(sys_getfilesystemencoding())
  108753. * elif not isinstance(addr, bytes):
  108754. */
  108755. __pyx_t_2 = PyUnicode_Check(__pyx_v_addr);
  108756. __pyx_t_4 = (__pyx_t_2 != 0);
  108757. if (__pyx_t_4) {
  108758. /* "uvloop/dns.pyx":154
  108759. * elif family == uv.AF_UNIX:
  108760. * if isinstance(addr, str):
  108761. * addr = addr.encode(sys_getfilesystemencoding()) # <<<<<<<<<<<<<<
  108762. * elif not isinstance(addr, bytes):
  108763. * raise TypeError('AF_UNIX address must be a str or a bytes object')
  108764. */
  108765. __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_addr, __pyx_n_s_encode); if (unlikely(!__pyx_t_6)) __PYX_ERR(7, 154, __pyx_L1_error)
  108766. __Pyx_GOTREF(__pyx_t_6);
  108767. __Pyx_INCREF(__pyx_v_6uvloop_4loop_sys_getfilesystemencoding);
  108768. __pyx_t_13 = __pyx_v_6uvloop_4loop_sys_getfilesystemencoding; __pyx_t_14 = NULL;
  108769. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_13))) {
  108770. __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_13);
  108771. if (likely(__pyx_t_14)) {
  108772. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
  108773. __Pyx_INCREF(__pyx_t_14);
  108774. __Pyx_INCREF(function);
  108775. __Pyx_DECREF_SET(__pyx_t_13, function);
  108776. }
  108777. }
  108778. __pyx_t_7 = (__pyx_t_14) ? __Pyx_PyObject_CallOneArg(__pyx_t_13, __pyx_t_14) : __Pyx_PyObject_CallNoArg(__pyx_t_13);
  108779. __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
  108780. if (unlikely(!__pyx_t_7)) __PYX_ERR(7, 154, __pyx_L1_error)
  108781. __Pyx_GOTREF(__pyx_t_7);
  108782. __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  108783. __pyx_t_13 = NULL;
  108784. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
  108785. __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_6);
  108786. if (likely(__pyx_t_13)) {
  108787. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
  108788. __Pyx_INCREF(__pyx_t_13);
  108789. __Pyx_INCREF(function);
  108790. __Pyx_DECREF_SET(__pyx_t_6, function);
  108791. }
  108792. }
  108793. __pyx_t_1 = (__pyx_t_13) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_13, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7);
  108794. __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
  108795. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  108796. if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 154, __pyx_L1_error)
  108797. __Pyx_GOTREF(__pyx_t_1);
  108798. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  108799. __Pyx_DECREF_SET(__pyx_v_addr, __pyx_t_1);
  108800. __pyx_t_1 = 0;
  108801. /* "uvloop/dns.pyx":153
  108802. *
  108803. * elif family == uv.AF_UNIX:
  108804. * if isinstance(addr, str): # <<<<<<<<<<<<<<
  108805. * addr = addr.encode(sys_getfilesystemencoding())
  108806. * elif not isinstance(addr, bytes):
  108807. */
  108808. goto __pyx_L43;
  108809. }
  108810. /* "uvloop/dns.pyx":155
  108811. * if isinstance(addr, str):
  108812. * addr = addr.encode(sys_getfilesystemencoding())
  108813. * elif not isinstance(addr, bytes): # <<<<<<<<<<<<<<
  108814. * raise TypeError('AF_UNIX address must be a str or a bytes object')
  108815. *
  108816. */
  108817. __pyx_t_4 = PyBytes_Check(__pyx_v_addr);
  108818. __pyx_t_2 = ((!(__pyx_t_4 != 0)) != 0);
  108819. if (unlikely(__pyx_t_2)) {
  108820. /* "uvloop/dns.pyx":156
  108821. * addr = addr.encode(sys_getfilesystemencoding())
  108822. * elif not isinstance(addr, bytes):
  108823. * raise TypeError('AF_UNIX address must be a str or a bytes object') # <<<<<<<<<<<<<<
  108824. *
  108825. * PyBytes_AsStringAndSize(addr, &buf, &buflen)
  108826. */
  108827. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__192, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 156, __pyx_L1_error)
  108828. __Pyx_GOTREF(__pyx_t_1);
  108829. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  108830. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  108831. __PYX_ERR(7, 156, __pyx_L1_error)
  108832. /* "uvloop/dns.pyx":155
  108833. * if isinstance(addr, str):
  108834. * addr = addr.encode(sys_getfilesystemencoding())
  108835. * elif not isinstance(addr, bytes): # <<<<<<<<<<<<<<
  108836. * raise TypeError('AF_UNIX address must be a str or a bytes object')
  108837. *
  108838. */
  108839. }
  108840. __pyx_L43:;
  108841. /* "uvloop/dns.pyx":158
  108842. * raise TypeError('AF_UNIX address must be a str or a bytes object')
  108843. *
  108844. * PyBytes_AsStringAndSize(addr, &buf, &buflen) # <<<<<<<<<<<<<<
  108845. * if buflen > 107:
  108846. * raise ValueError(
  108847. */
  108848. __pyx_t_12 = PyBytes_AsStringAndSize(__pyx_v_addr, (&__pyx_v_buf), (&__pyx_v_buflen)); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(7, 158, __pyx_L1_error)
  108849. /* "uvloop/dns.pyx":159
  108850. *
  108851. * PyBytes_AsStringAndSize(addr, &buf, &buflen)
  108852. * if buflen > 107: # <<<<<<<<<<<<<<
  108853. * raise ValueError(
  108854. * f'unix socket path {addr!r} is longer than 107 characters')
  108855. */
  108856. __pyx_t_2 = ((__pyx_v_buflen > 0x6B) != 0);
  108857. if (unlikely(__pyx_t_2)) {
  108858. /* "uvloop/dns.pyx":161
  108859. * if buflen > 107:
  108860. * raise ValueError(
  108861. * f'unix socket path {addr!r} is longer than 107 characters') # <<<<<<<<<<<<<<
  108862. *
  108863. * ret.addr_size = sizeof(system.sockaddr_un)
  108864. */
  108865. __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 161, __pyx_L1_error)
  108866. __Pyx_GOTREF(__pyx_t_1);
  108867. __pyx_t_5 = 0;
  108868. __pyx_t_18 = 127;
  108869. __Pyx_INCREF(__pyx_kp_u_unix_socket_path);
  108870. __pyx_t_5 += 17;
  108871. __Pyx_GIVEREF(__pyx_kp_u_unix_socket_path);
  108872. PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_unix_socket_path);
  108873. __pyx_t_6 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_addr), __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(7, 161, __pyx_L1_error)
  108874. __Pyx_GOTREF(__pyx_t_6);
  108875. __pyx_t_18 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_18) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_18;
  108876. __pyx_t_5 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
  108877. __Pyx_GIVEREF(__pyx_t_6);
  108878. PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_6);
  108879. __pyx_t_6 = 0;
  108880. __Pyx_INCREF(__pyx_kp_u_is_longer_than_107_characters);
  108881. __pyx_t_5 += 30;
  108882. __Pyx_GIVEREF(__pyx_kp_u_is_longer_than_107_characters);
  108883. PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u_is_longer_than_107_characters);
  108884. __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_1, 3, __pyx_t_5, __pyx_t_18); if (unlikely(!__pyx_t_6)) __PYX_ERR(7, 161, __pyx_L1_error)
  108885. __Pyx_GOTREF(__pyx_t_6);
  108886. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  108887. /* "uvloop/dns.pyx":160
  108888. * PyBytes_AsStringAndSize(addr, &buf, &buflen)
  108889. * if buflen > 107:
  108890. * raise ValueError( # <<<<<<<<<<<<<<
  108891. * f'unix socket path {addr!r} is longer than 107 characters')
  108892. *
  108893. */
  108894. __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 160, __pyx_L1_error)
  108895. __Pyx_GOTREF(__pyx_t_1);
  108896. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  108897. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  108898. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  108899. __PYX_ERR(7, 160, __pyx_L1_error)
  108900. /* "uvloop/dns.pyx":159
  108901. *
  108902. * PyBytes_AsStringAndSize(addr, &buf, &buflen)
  108903. * if buflen > 107: # <<<<<<<<<<<<<<
  108904. * raise ValueError(
  108905. * f'unix socket path {addr!r} is longer than 107 characters')
  108906. */
  108907. }
  108908. /* "uvloop/dns.pyx":163
  108909. * f'unix socket path {addr!r} is longer than 107 characters')
  108910. *
  108911. * ret.addr_size = sizeof(system.sockaddr_un) # <<<<<<<<<<<<<<
  108912. * memset(&ret.addr, 0, sizeof(system.sockaddr_un))
  108913. * (<system.sockaddr_un*>&ret.addr).sun_family = uv.AF_UNIX
  108914. */
  108915. __pyx_v_ret->addr_size = (sizeof(struct sockaddr_un));
  108916. /* "uvloop/dns.pyx":164
  108917. *
  108918. * ret.addr_size = sizeof(system.sockaddr_un)
  108919. * memset(&ret.addr, 0, sizeof(system.sockaddr_un)) # <<<<<<<<<<<<<<
  108920. * (<system.sockaddr_un*>&ret.addr).sun_family = uv.AF_UNIX
  108921. * memcpy((<system.sockaddr_un*>&ret.addr).sun_path, buf, buflen)
  108922. */
  108923. (void)(memset((&__pyx_v_ret->addr), 0, (sizeof(struct sockaddr_un))));
  108924. /* "uvloop/dns.pyx":165
  108925. * ret.addr_size = sizeof(system.sockaddr_un)
  108926. * memset(&ret.addr, 0, sizeof(system.sockaddr_un))
  108927. * (<system.sockaddr_un*>&ret.addr).sun_family = uv.AF_UNIX # <<<<<<<<<<<<<<
  108928. * memcpy((<system.sockaddr_un*>&ret.addr).sun_path, buf, buflen)
  108929. *
  108930. */
  108931. ((struct sockaddr_un *)(&__pyx_v_ret->addr))->sun_family = AF_UNIX;
  108932. /* "uvloop/dns.pyx":166
  108933. * memset(&ret.addr, 0, sizeof(system.sockaddr_un))
  108934. * (<system.sockaddr_un*>&ret.addr).sun_family = uv.AF_UNIX
  108935. * memcpy((<system.sockaddr_un*>&ret.addr).sun_path, buf, buflen) # <<<<<<<<<<<<<<
  108936. *
  108937. * else:
  108938. */
  108939. (void)(memcpy(((struct sockaddr_un *)(&__pyx_v_ret->addr))->sun_path, __pyx_v_buf, __pyx_v_buflen));
  108940. /* "uvloop/dns.pyx":152
  108941. * (<system.sockaddr_in6*>&ret.addr).sin6_scope_id = scope_id
  108942. *
  108943. * elif family == uv.AF_UNIX: # <<<<<<<<<<<<<<
  108944. * if isinstance(addr, str):
  108945. * addr = addr.encode(sys_getfilesystemencoding())
  108946. */
  108947. goto __pyx_L6;
  108948. }
  108949. /* "uvloop/dns.pyx":169
  108950. *
  108951. * else:
  108952. * raise ValueError( # <<<<<<<<<<<<<<
  108953. * f'expected AF_INET, AF_INET6, or AF_UNIX family, got {family}')
  108954. *
  108955. */
  108956. /*else*/ {
  108957. /* "uvloop/dns.pyx":170
  108958. * else:
  108959. * raise ValueError(
  108960. * f'expected AF_INET, AF_INET6, or AF_UNIX family, got {family}') # <<<<<<<<<<<<<<
  108961. *
  108962. * ret.family = family
  108963. */
  108964. __pyx_t_1 = __Pyx_PyUnicode_From_int(__pyx_v_family, 0, ' ', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 170, __pyx_L1_error)
  108965. __Pyx_GOTREF(__pyx_t_1);
  108966. __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_kp_u_expected_AF_INET_AF_INET6_or_AF, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(7, 170, __pyx_L1_error)
  108967. __Pyx_GOTREF(__pyx_t_6);
  108968. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  108969. /* "uvloop/dns.pyx":169
  108970. *
  108971. * else:
  108972. * raise ValueError( # <<<<<<<<<<<<<<
  108973. * f'expected AF_INET, AF_INET6, or AF_UNIX family, got {family}')
  108974. *
  108975. */
  108976. __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 169, __pyx_L1_error)
  108977. __Pyx_GOTREF(__pyx_t_1);
  108978. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  108979. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  108980. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  108981. __PYX_ERR(7, 169, __pyx_L1_error)
  108982. }
  108983. __pyx_L6:;
  108984. /* "uvloop/dns.pyx":172
  108985. * f'expected AF_INET, AF_INET6, or AF_UNIX family, got {family}')
  108986. *
  108987. * ret.family = family # <<<<<<<<<<<<<<
  108988. * sockaddrs[addr] = ret
  108989. * memcpy(res, &ret.addr, ret.addr_size)
  108990. */
  108991. __pyx_v_ret->family = __pyx_v_family;
  108992. /* "uvloop/dns.pyx":173
  108993. *
  108994. * ret.family = family
  108995. * sockaddrs[addr] = ret # <<<<<<<<<<<<<<
  108996. * memcpy(res, &ret.addr, ret.addr_size)
  108997. *
  108998. */
  108999. if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_6uvloop_4loop_sockaddrs), __pyx_v_addr, ((PyObject *)__pyx_v_ret)) < 0)) __PYX_ERR(7, 173, __pyx_L1_error)
  109000. /* "uvloop/dns.pyx":174
  109001. * ret.family = family
  109002. * sockaddrs[addr] = ret
  109003. * memcpy(res, &ret.addr, ret.addr_size) # <<<<<<<<<<<<<<
  109004. *
  109005. *
  109006. */
  109007. (void)(memcpy(__pyx_v_res, (&__pyx_v_ret->addr), __pyx_v_ret->addr_size));
  109008. /* "uvloop/dns.pyx":77
  109009. *
  109010. *
  109011. * cdef __convert_pyaddr_to_sockaddr(int family, object addr, # <<<<<<<<<<<<<<
  109012. * system.sockaddr* res):
  109013. * cdef:
  109014. */
  109015. /* function exit code */
  109016. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  109017. goto __pyx_L0;
  109018. __pyx_L1_error:;
  109019. __Pyx_XDECREF(__pyx_t_1);
  109020. __Pyx_XDECREF(__pyx_t_6);
  109021. __Pyx_XDECREF(__pyx_t_7);
  109022. __Pyx_XDECREF(__pyx_t_13);
  109023. __Pyx_XDECREF(__pyx_t_14);
  109024. __Pyx_XDECREF(__pyx_t_15);
  109025. __Pyx_AddTraceback("uvloop.loop.__convert_pyaddr_to_sockaddr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  109026. __pyx_r = 0;
  109027. __pyx_L0:;
  109028. __Pyx_XDECREF((PyObject *)__pyx_v_ret);
  109029. __Pyx_XDECREF(__pyx_v_host);
  109030. __Pyx_XDECREF(__pyx_v_port);
  109031. __Pyx_XDECREF(__pyx_v_addr);
  109032. __Pyx_XGIVEREF(__pyx_r);
  109033. __Pyx_RefNannyFinishContext();
  109034. return __pyx_r;
  109035. }
  109036. /* "uvloop/dns.pyx":177
  109037. *
  109038. *
  109039. * cdef __static_getaddrinfo(object host, object port, # <<<<<<<<<<<<<<
  109040. * int family, int type,
  109041. * int proto,
  109042. */
  109043. static PyObject *__pyx_f_6uvloop_4loop___static_getaddrinfo(PyObject *__pyx_v_host, PyObject *__pyx_v_port, int __pyx_v_family, int __pyx_v_type, int __pyx_v_proto, struct sockaddr *__pyx_v_addr) {
  109044. PyObject *__pyx_v_hp = NULL;
  109045. PyObject *__pyx_r = NULL;
  109046. __Pyx_RefNannyDeclarations
  109047. int __pyx_t_1;
  109048. int __pyx_t_2;
  109049. int __pyx_t_3;
  109050. PyObject *__pyx_t_4 = NULL;
  109051. PyObject *__pyx_t_5 = NULL;
  109052. PyObject *__pyx_t_6 = NULL;
  109053. PyObject *__pyx_t_7 = NULL;
  109054. PyObject *__pyx_t_8 = NULL;
  109055. PyObject *__pyx_t_9 = NULL;
  109056. PyObject *__pyx_t_10 = NULL;
  109057. __Pyx_RefNannySetupContext("__static_getaddrinfo", 0);
  109058. __Pyx_INCREF(__pyx_v_port);
  109059. /* "uvloop/dns.pyx":182
  109060. * system.sockaddr *addr):
  109061. *
  109062. * if proto not in {0, uv.IPPROTO_TCP, uv.IPPROTO_UDP}: # <<<<<<<<<<<<<<
  109063. * return
  109064. *
  109065. */
  109066. __pyx_t_1 = __pyx_v_proto;
  109067. __pyx_t_3 = ((__pyx_t_1 != 0) != 0);
  109068. if (__pyx_t_3) {
  109069. } else {
  109070. __pyx_t_2 = __pyx_t_3;
  109071. goto __pyx_L4_bool_binop_done;
  109072. }
  109073. __pyx_t_3 = ((__pyx_t_1 != IPPROTO_TCP) != 0);
  109074. if (__pyx_t_3) {
  109075. } else {
  109076. __pyx_t_2 = __pyx_t_3;
  109077. goto __pyx_L4_bool_binop_done;
  109078. }
  109079. __pyx_t_3 = ((__pyx_t_1 != IPPROTO_UDP) != 0);
  109080. __pyx_t_2 = __pyx_t_3;
  109081. __pyx_L4_bool_binop_done:;
  109082. __pyx_t_3 = (__pyx_t_2 != 0);
  109083. if (__pyx_t_3) {
  109084. /* "uvloop/dns.pyx":183
  109085. *
  109086. * if proto not in {0, uv.IPPROTO_TCP, uv.IPPROTO_UDP}:
  109087. * return # <<<<<<<<<<<<<<
  109088. *
  109089. * if _is_sock_stream(type):
  109090. */
  109091. __Pyx_XDECREF(__pyx_r);
  109092. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  109093. goto __pyx_L0;
  109094. /* "uvloop/dns.pyx":182
  109095. * system.sockaddr *addr):
  109096. *
  109097. * if proto not in {0, uv.IPPROTO_TCP, uv.IPPROTO_UDP}: # <<<<<<<<<<<<<<
  109098. * return
  109099. *
  109100. */
  109101. }
  109102. /* "uvloop/dns.pyx":185
  109103. * return
  109104. *
  109105. * if _is_sock_stream(type): # <<<<<<<<<<<<<<
  109106. * proto = uv.IPPROTO_TCP
  109107. * elif _is_sock_dgram(type):
  109108. */
  109109. __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 185, __pyx_L1_error)
  109110. __Pyx_GOTREF(__pyx_t_4);
  109111. __pyx_t_5 = __pyx_f_6uvloop_4loop__is_sock_stream(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(7, 185, __pyx_L1_error)
  109112. __Pyx_GOTREF(__pyx_t_5);
  109113. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  109114. __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(7, 185, __pyx_L1_error)
  109115. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  109116. if (__pyx_t_3) {
  109117. /* "uvloop/dns.pyx":186
  109118. *
  109119. * if _is_sock_stream(type):
  109120. * proto = uv.IPPROTO_TCP # <<<<<<<<<<<<<<
  109121. * elif _is_sock_dgram(type):
  109122. * proto = uv.IPPROTO_UDP
  109123. */
  109124. __pyx_v_proto = IPPROTO_TCP;
  109125. /* "uvloop/dns.pyx":185
  109126. * return
  109127. *
  109128. * if _is_sock_stream(type): # <<<<<<<<<<<<<<
  109129. * proto = uv.IPPROTO_TCP
  109130. * elif _is_sock_dgram(type):
  109131. */
  109132. goto __pyx_L7;
  109133. }
  109134. /* "uvloop/dns.pyx":187
  109135. * if _is_sock_stream(type):
  109136. * proto = uv.IPPROTO_TCP
  109137. * elif _is_sock_dgram(type): # <<<<<<<<<<<<<<
  109138. * proto = uv.IPPROTO_UDP
  109139. * else:
  109140. */
  109141. __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_type); if (unlikely(!__pyx_t_5)) __PYX_ERR(7, 187, __pyx_L1_error)
  109142. __Pyx_GOTREF(__pyx_t_5);
  109143. __pyx_t_4 = __pyx_f_6uvloop_4loop__is_sock_dgram(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 187, __pyx_L1_error)
  109144. __Pyx_GOTREF(__pyx_t_4);
  109145. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  109146. __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(7, 187, __pyx_L1_error)
  109147. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  109148. if (__pyx_t_3) {
  109149. /* "uvloop/dns.pyx":188
  109150. * proto = uv.IPPROTO_TCP
  109151. * elif _is_sock_dgram(type):
  109152. * proto = uv.IPPROTO_UDP # <<<<<<<<<<<<<<
  109153. * else:
  109154. * return
  109155. */
  109156. __pyx_v_proto = IPPROTO_UDP;
  109157. /* "uvloop/dns.pyx":187
  109158. * if _is_sock_stream(type):
  109159. * proto = uv.IPPROTO_TCP
  109160. * elif _is_sock_dgram(type): # <<<<<<<<<<<<<<
  109161. * proto = uv.IPPROTO_UDP
  109162. * else:
  109163. */
  109164. goto __pyx_L7;
  109165. }
  109166. /* "uvloop/dns.pyx":190
  109167. * proto = uv.IPPROTO_UDP
  109168. * else:
  109169. * return # <<<<<<<<<<<<<<
  109170. *
  109171. * try:
  109172. */
  109173. /*else*/ {
  109174. __Pyx_XDECREF(__pyx_r);
  109175. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  109176. goto __pyx_L0;
  109177. }
  109178. __pyx_L7:;
  109179. /* "uvloop/dns.pyx":192
  109180. * return
  109181. *
  109182. * try: # <<<<<<<<<<<<<<
  109183. * port = __port_to_int(port, proto)
  109184. * except Exception:
  109185. */
  109186. {
  109187. __Pyx_PyThreadState_declare
  109188. __Pyx_PyThreadState_assign
  109189. __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
  109190. __Pyx_XGOTREF(__pyx_t_6);
  109191. __Pyx_XGOTREF(__pyx_t_7);
  109192. __Pyx_XGOTREF(__pyx_t_8);
  109193. /*try:*/ {
  109194. /* "uvloop/dns.pyx":193
  109195. *
  109196. * try:
  109197. * port = __port_to_int(port, proto) # <<<<<<<<<<<<<<
  109198. * except Exception:
  109199. * return
  109200. */
  109201. __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_proto); if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 193, __pyx_L8_error)
  109202. __Pyx_GOTREF(__pyx_t_4);
  109203. __pyx_t_5 = __pyx_f_6uvloop_4loop___port_to_int(__pyx_v_port, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(7, 193, __pyx_L8_error)
  109204. __Pyx_GOTREF(__pyx_t_5);
  109205. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  109206. __Pyx_DECREF_SET(__pyx_v_port, __pyx_t_5);
  109207. __pyx_t_5 = 0;
  109208. /* "uvloop/dns.pyx":192
  109209. * return
  109210. *
  109211. * try: # <<<<<<<<<<<<<<
  109212. * port = __port_to_int(port, proto)
  109213. * except Exception:
  109214. */
  109215. }
  109216. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  109217. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  109218. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  109219. goto __pyx_L13_try_end;
  109220. __pyx_L8_error:;
  109221. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  109222. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  109223. /* "uvloop/dns.pyx":194
  109224. * try:
  109225. * port = __port_to_int(port, proto)
  109226. * except Exception: # <<<<<<<<<<<<<<
  109227. * return
  109228. *
  109229. */
  109230. __pyx_t_1 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
  109231. if (__pyx_t_1) {
  109232. __Pyx_AddTraceback("uvloop.loop.__static_getaddrinfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
  109233. if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_9) < 0) __PYX_ERR(7, 194, __pyx_L10_except_error)
  109234. __Pyx_GOTREF(__pyx_t_5);
  109235. __Pyx_GOTREF(__pyx_t_4);
  109236. __Pyx_GOTREF(__pyx_t_9);
  109237. /* "uvloop/dns.pyx":195
  109238. * port = __port_to_int(port, proto)
  109239. * except Exception:
  109240. * return # <<<<<<<<<<<<<<
  109241. *
  109242. * hp = (host, port)
  109243. */
  109244. __Pyx_XDECREF(__pyx_r);
  109245. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  109246. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  109247. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  109248. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  109249. goto __pyx_L11_except_return;
  109250. }
  109251. goto __pyx_L10_except_error;
  109252. __pyx_L10_except_error:;
  109253. /* "uvloop/dns.pyx":192
  109254. * return
  109255. *
  109256. * try: # <<<<<<<<<<<<<<
  109257. * port = __port_to_int(port, proto)
  109258. * except Exception:
  109259. */
  109260. __Pyx_XGIVEREF(__pyx_t_6);
  109261. __Pyx_XGIVEREF(__pyx_t_7);
  109262. __Pyx_XGIVEREF(__pyx_t_8);
  109263. __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
  109264. goto __pyx_L1_error;
  109265. __pyx_L11_except_return:;
  109266. __Pyx_XGIVEREF(__pyx_t_6);
  109267. __Pyx_XGIVEREF(__pyx_t_7);
  109268. __Pyx_XGIVEREF(__pyx_t_8);
  109269. __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
  109270. goto __pyx_L0;
  109271. __pyx_L13_try_end:;
  109272. }
  109273. /* "uvloop/dns.pyx":197
  109274. * return
  109275. *
  109276. * hp = (host, port) # <<<<<<<<<<<<<<
  109277. * if family == uv.AF_UNSPEC:
  109278. * try:
  109279. */
  109280. __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(7, 197, __pyx_L1_error)
  109281. __Pyx_GOTREF(__pyx_t_9);
  109282. __Pyx_INCREF(__pyx_v_host);
  109283. __Pyx_GIVEREF(__pyx_v_host);
  109284. PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_host);
  109285. __Pyx_INCREF(__pyx_v_port);
  109286. __Pyx_GIVEREF(__pyx_v_port);
  109287. PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_v_port);
  109288. __pyx_v_hp = ((PyObject*)__pyx_t_9);
  109289. __pyx_t_9 = 0;
  109290. /* "uvloop/dns.pyx":198
  109291. *
  109292. * hp = (host, port)
  109293. * if family == uv.AF_UNSPEC: # <<<<<<<<<<<<<<
  109294. * try:
  109295. * __convert_pyaddr_to_sockaddr(uv.AF_INET, hp, addr)
  109296. */
  109297. __pyx_t_3 = ((__pyx_v_family == AF_UNSPEC) != 0);
  109298. if (__pyx_t_3) {
  109299. /* "uvloop/dns.pyx":199
  109300. * hp = (host, port)
  109301. * if family == uv.AF_UNSPEC:
  109302. * try: # <<<<<<<<<<<<<<
  109303. * __convert_pyaddr_to_sockaddr(uv.AF_INET, hp, addr)
  109304. * except Exception:
  109305. */
  109306. {
  109307. __Pyx_PyThreadState_declare
  109308. __Pyx_PyThreadState_assign
  109309. __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_7, &__pyx_t_6);
  109310. __Pyx_XGOTREF(__pyx_t_8);
  109311. __Pyx_XGOTREF(__pyx_t_7);
  109312. __Pyx_XGOTREF(__pyx_t_6);
  109313. /*try:*/ {
  109314. /* "uvloop/dns.pyx":200
  109315. * if family == uv.AF_UNSPEC:
  109316. * try:
  109317. * __convert_pyaddr_to_sockaddr(uv.AF_INET, hp, addr) # <<<<<<<<<<<<<<
  109318. * except Exception:
  109319. * pass
  109320. */
  109321. __pyx_t_9 = __pyx_f_6uvloop_4loop___convert_pyaddr_to_sockaddr(AF_INET, __pyx_v_hp, __pyx_v_addr); if (unlikely(!__pyx_t_9)) __PYX_ERR(7, 200, __pyx_L17_error)
  109322. __Pyx_GOTREF(__pyx_t_9);
  109323. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  109324. /* "uvloop/dns.pyx":199
  109325. * hp = (host, port)
  109326. * if family == uv.AF_UNSPEC:
  109327. * try: # <<<<<<<<<<<<<<
  109328. * __convert_pyaddr_to_sockaddr(uv.AF_INET, hp, addr)
  109329. * except Exception:
  109330. */
  109331. }
  109332. /* "uvloop/dns.pyx":204
  109333. * pass
  109334. * else:
  109335. * return (uv.AF_INET, type, proto) # <<<<<<<<<<<<<<
  109336. *
  109337. * try:
  109338. */
  109339. /*else:*/ {
  109340. __Pyx_XDECREF(__pyx_r);
  109341. __pyx_t_9 = __Pyx_PyInt_From_int(AF_INET); if (unlikely(!__pyx_t_9)) __PYX_ERR(7, 204, __pyx_L19_except_error)
  109342. __Pyx_GOTREF(__pyx_t_9);
  109343. __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 204, __pyx_L19_except_error)
  109344. __Pyx_GOTREF(__pyx_t_4);
  109345. __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_proto); if (unlikely(!__pyx_t_5)) __PYX_ERR(7, 204, __pyx_L19_except_error)
  109346. __Pyx_GOTREF(__pyx_t_5);
  109347. __pyx_t_10 = PyTuple_New(3); if (unlikely(!__pyx_t_10)) __PYX_ERR(7, 204, __pyx_L19_except_error)
  109348. __Pyx_GOTREF(__pyx_t_10);
  109349. __Pyx_GIVEREF(__pyx_t_9);
  109350. PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9);
  109351. __Pyx_GIVEREF(__pyx_t_4);
  109352. PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_4);
  109353. __Pyx_GIVEREF(__pyx_t_5);
  109354. PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_t_5);
  109355. __pyx_t_9 = 0;
  109356. __pyx_t_4 = 0;
  109357. __pyx_t_5 = 0;
  109358. __pyx_r = __pyx_t_10;
  109359. __pyx_t_10 = 0;
  109360. goto __pyx_L20_except_return;
  109361. }
  109362. __pyx_L17_error:;
  109363. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  109364. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  109365. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  109366. /* "uvloop/dns.pyx":201
  109367. * try:
  109368. * __convert_pyaddr_to_sockaddr(uv.AF_INET, hp, addr)
  109369. * except Exception: # <<<<<<<<<<<<<<
  109370. * pass
  109371. * else:
  109372. */
  109373. __pyx_t_1 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
  109374. if (__pyx_t_1) {
  109375. __Pyx_ErrRestore(0,0,0);
  109376. goto __pyx_L18_exception_handled;
  109377. }
  109378. goto __pyx_L19_except_error;
  109379. __pyx_L19_except_error:;
  109380. /* "uvloop/dns.pyx":199
  109381. * hp = (host, port)
  109382. * if family == uv.AF_UNSPEC:
  109383. * try: # <<<<<<<<<<<<<<
  109384. * __convert_pyaddr_to_sockaddr(uv.AF_INET, hp, addr)
  109385. * except Exception:
  109386. */
  109387. __Pyx_XGIVEREF(__pyx_t_8);
  109388. __Pyx_XGIVEREF(__pyx_t_7);
  109389. __Pyx_XGIVEREF(__pyx_t_6);
  109390. __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_7, __pyx_t_6);
  109391. goto __pyx_L1_error;
  109392. __pyx_L20_except_return:;
  109393. __Pyx_XGIVEREF(__pyx_t_8);
  109394. __Pyx_XGIVEREF(__pyx_t_7);
  109395. __Pyx_XGIVEREF(__pyx_t_6);
  109396. __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_7, __pyx_t_6);
  109397. goto __pyx_L0;
  109398. __pyx_L18_exception_handled:;
  109399. __Pyx_XGIVEREF(__pyx_t_8);
  109400. __Pyx_XGIVEREF(__pyx_t_7);
  109401. __Pyx_XGIVEREF(__pyx_t_6);
  109402. __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_7, __pyx_t_6);
  109403. }
  109404. /* "uvloop/dns.pyx":206
  109405. * return (uv.AF_INET, type, proto)
  109406. *
  109407. * try: # <<<<<<<<<<<<<<
  109408. * __convert_pyaddr_to_sockaddr(uv.AF_INET6, hp, addr)
  109409. * except Exception:
  109410. */
  109411. {
  109412. __Pyx_PyThreadState_declare
  109413. __Pyx_PyThreadState_assign
  109414. __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
  109415. __Pyx_XGOTREF(__pyx_t_6);
  109416. __Pyx_XGOTREF(__pyx_t_7);
  109417. __Pyx_XGOTREF(__pyx_t_8);
  109418. /*try:*/ {
  109419. /* "uvloop/dns.pyx":207
  109420. *
  109421. * try:
  109422. * __convert_pyaddr_to_sockaddr(uv.AF_INET6, hp, addr) # <<<<<<<<<<<<<<
  109423. * except Exception:
  109424. * pass
  109425. */
  109426. __pyx_t_10 = __pyx_f_6uvloop_4loop___convert_pyaddr_to_sockaddr(AF_INET6, __pyx_v_hp, __pyx_v_addr); if (unlikely(!__pyx_t_10)) __PYX_ERR(7, 207, __pyx_L23_error)
  109427. __Pyx_GOTREF(__pyx_t_10);
  109428. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  109429. /* "uvloop/dns.pyx":206
  109430. * return (uv.AF_INET, type, proto)
  109431. *
  109432. * try: # <<<<<<<<<<<<<<
  109433. * __convert_pyaddr_to_sockaddr(uv.AF_INET6, hp, addr)
  109434. * except Exception:
  109435. */
  109436. }
  109437. /* "uvloop/dns.pyx":211
  109438. * pass
  109439. * else:
  109440. * return (uv.AF_INET6, type, proto) # <<<<<<<<<<<<<<
  109441. *
  109442. * else:
  109443. */
  109444. /*else:*/ {
  109445. __Pyx_XDECREF(__pyx_r);
  109446. __pyx_t_10 = __Pyx_PyInt_From_int(AF_INET6); if (unlikely(!__pyx_t_10)) __PYX_ERR(7, 211, __pyx_L25_except_error)
  109447. __Pyx_GOTREF(__pyx_t_10);
  109448. __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_type); if (unlikely(!__pyx_t_5)) __PYX_ERR(7, 211, __pyx_L25_except_error)
  109449. __Pyx_GOTREF(__pyx_t_5);
  109450. __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_proto); if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 211, __pyx_L25_except_error)
  109451. __Pyx_GOTREF(__pyx_t_4);
  109452. __pyx_t_9 = PyTuple_New(3); if (unlikely(!__pyx_t_9)) __PYX_ERR(7, 211, __pyx_L25_except_error)
  109453. __Pyx_GOTREF(__pyx_t_9);
  109454. __Pyx_GIVEREF(__pyx_t_10);
  109455. PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_10);
  109456. __Pyx_GIVEREF(__pyx_t_5);
  109457. PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_5);
  109458. __Pyx_GIVEREF(__pyx_t_4);
  109459. PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_t_4);
  109460. __pyx_t_10 = 0;
  109461. __pyx_t_5 = 0;
  109462. __pyx_t_4 = 0;
  109463. __pyx_r = __pyx_t_9;
  109464. __pyx_t_9 = 0;
  109465. goto __pyx_L26_except_return;
  109466. }
  109467. __pyx_L23_error:;
  109468. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  109469. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  109470. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  109471. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  109472. /* "uvloop/dns.pyx":208
  109473. * try:
  109474. * __convert_pyaddr_to_sockaddr(uv.AF_INET6, hp, addr)
  109475. * except Exception: # <<<<<<<<<<<<<<
  109476. * pass
  109477. * else:
  109478. */
  109479. __pyx_t_1 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
  109480. if (__pyx_t_1) {
  109481. __Pyx_ErrRestore(0,0,0);
  109482. goto __pyx_L24_exception_handled;
  109483. }
  109484. goto __pyx_L25_except_error;
  109485. __pyx_L25_except_error:;
  109486. /* "uvloop/dns.pyx":206
  109487. * return (uv.AF_INET, type, proto)
  109488. *
  109489. * try: # <<<<<<<<<<<<<<
  109490. * __convert_pyaddr_to_sockaddr(uv.AF_INET6, hp, addr)
  109491. * except Exception:
  109492. */
  109493. __Pyx_XGIVEREF(__pyx_t_6);
  109494. __Pyx_XGIVEREF(__pyx_t_7);
  109495. __Pyx_XGIVEREF(__pyx_t_8);
  109496. __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
  109497. goto __pyx_L1_error;
  109498. __pyx_L26_except_return:;
  109499. __Pyx_XGIVEREF(__pyx_t_6);
  109500. __Pyx_XGIVEREF(__pyx_t_7);
  109501. __Pyx_XGIVEREF(__pyx_t_8);
  109502. __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
  109503. goto __pyx_L0;
  109504. __pyx_L24_exception_handled:;
  109505. __Pyx_XGIVEREF(__pyx_t_6);
  109506. __Pyx_XGIVEREF(__pyx_t_7);
  109507. __Pyx_XGIVEREF(__pyx_t_8);
  109508. __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
  109509. }
  109510. /* "uvloop/dns.pyx":198
  109511. *
  109512. * hp = (host, port)
  109513. * if family == uv.AF_UNSPEC: # <<<<<<<<<<<<<<
  109514. * try:
  109515. * __convert_pyaddr_to_sockaddr(uv.AF_INET, hp, addr)
  109516. */
  109517. goto __pyx_L16;
  109518. }
  109519. /* "uvloop/dns.pyx":214
  109520. *
  109521. * else:
  109522. * try: # <<<<<<<<<<<<<<
  109523. * __convert_pyaddr_to_sockaddr(family, hp, addr)
  109524. * except Exception:
  109525. */
  109526. /*else*/ {
  109527. {
  109528. __Pyx_PyThreadState_declare
  109529. __Pyx_PyThreadState_assign
  109530. __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_7, &__pyx_t_6);
  109531. __Pyx_XGOTREF(__pyx_t_8);
  109532. __Pyx_XGOTREF(__pyx_t_7);
  109533. __Pyx_XGOTREF(__pyx_t_6);
  109534. /*try:*/ {
  109535. /* "uvloop/dns.pyx":215
  109536. * else:
  109537. * try:
  109538. * __convert_pyaddr_to_sockaddr(family, hp, addr) # <<<<<<<<<<<<<<
  109539. * except Exception:
  109540. * pass
  109541. */
  109542. __pyx_t_9 = __pyx_f_6uvloop_4loop___convert_pyaddr_to_sockaddr(__pyx_v_family, __pyx_v_hp, __pyx_v_addr); if (unlikely(!__pyx_t_9)) __PYX_ERR(7, 215, __pyx_L29_error)
  109543. __Pyx_GOTREF(__pyx_t_9);
  109544. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  109545. /* "uvloop/dns.pyx":214
  109546. *
  109547. * else:
  109548. * try: # <<<<<<<<<<<<<<
  109549. * __convert_pyaddr_to_sockaddr(family, hp, addr)
  109550. * except Exception:
  109551. */
  109552. }
  109553. /* "uvloop/dns.pyx":219
  109554. * pass
  109555. * else:
  109556. * return (family, type, proto) # <<<<<<<<<<<<<<
  109557. *
  109558. *
  109559. */
  109560. /*else:*/ {
  109561. __Pyx_XDECREF(__pyx_r);
  109562. __pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_family); if (unlikely(!__pyx_t_9)) __PYX_ERR(7, 219, __pyx_L31_except_error)
  109563. __Pyx_GOTREF(__pyx_t_9);
  109564. __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 219, __pyx_L31_except_error)
  109565. __Pyx_GOTREF(__pyx_t_4);
  109566. __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_proto); if (unlikely(!__pyx_t_5)) __PYX_ERR(7, 219, __pyx_L31_except_error)
  109567. __Pyx_GOTREF(__pyx_t_5);
  109568. __pyx_t_10 = PyTuple_New(3); if (unlikely(!__pyx_t_10)) __PYX_ERR(7, 219, __pyx_L31_except_error)
  109569. __Pyx_GOTREF(__pyx_t_10);
  109570. __Pyx_GIVEREF(__pyx_t_9);
  109571. PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9);
  109572. __Pyx_GIVEREF(__pyx_t_4);
  109573. PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_4);
  109574. __Pyx_GIVEREF(__pyx_t_5);
  109575. PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_t_5);
  109576. __pyx_t_9 = 0;
  109577. __pyx_t_4 = 0;
  109578. __pyx_t_5 = 0;
  109579. __pyx_r = __pyx_t_10;
  109580. __pyx_t_10 = 0;
  109581. goto __pyx_L32_except_return;
  109582. }
  109583. __pyx_L29_error:;
  109584. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  109585. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  109586. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  109587. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  109588. /* "uvloop/dns.pyx":216
  109589. * try:
  109590. * __convert_pyaddr_to_sockaddr(family, hp, addr)
  109591. * except Exception: # <<<<<<<<<<<<<<
  109592. * pass
  109593. * else:
  109594. */
  109595. __pyx_t_1 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
  109596. if (__pyx_t_1) {
  109597. __Pyx_ErrRestore(0,0,0);
  109598. goto __pyx_L30_exception_handled;
  109599. }
  109600. goto __pyx_L31_except_error;
  109601. __pyx_L31_except_error:;
  109602. /* "uvloop/dns.pyx":214
  109603. *
  109604. * else:
  109605. * try: # <<<<<<<<<<<<<<
  109606. * __convert_pyaddr_to_sockaddr(family, hp, addr)
  109607. * except Exception:
  109608. */
  109609. __Pyx_XGIVEREF(__pyx_t_8);
  109610. __Pyx_XGIVEREF(__pyx_t_7);
  109611. __Pyx_XGIVEREF(__pyx_t_6);
  109612. __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_7, __pyx_t_6);
  109613. goto __pyx_L1_error;
  109614. __pyx_L32_except_return:;
  109615. __Pyx_XGIVEREF(__pyx_t_8);
  109616. __Pyx_XGIVEREF(__pyx_t_7);
  109617. __Pyx_XGIVEREF(__pyx_t_6);
  109618. __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_7, __pyx_t_6);
  109619. goto __pyx_L0;
  109620. __pyx_L30_exception_handled:;
  109621. __Pyx_XGIVEREF(__pyx_t_8);
  109622. __Pyx_XGIVEREF(__pyx_t_7);
  109623. __Pyx_XGIVEREF(__pyx_t_6);
  109624. __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_7, __pyx_t_6);
  109625. }
  109626. }
  109627. __pyx_L16:;
  109628. /* "uvloop/dns.pyx":177
  109629. *
  109630. *
  109631. * cdef __static_getaddrinfo(object host, object port, # <<<<<<<<<<<<<<
  109632. * int family, int type,
  109633. * int proto,
  109634. */
  109635. /* function exit code */
  109636. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  109637. goto __pyx_L0;
  109638. __pyx_L1_error:;
  109639. __Pyx_XDECREF(__pyx_t_4);
  109640. __Pyx_XDECREF(__pyx_t_5);
  109641. __Pyx_XDECREF(__pyx_t_9);
  109642. __Pyx_XDECREF(__pyx_t_10);
  109643. __Pyx_AddTraceback("uvloop.loop.__static_getaddrinfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
  109644. __pyx_r = 0;
  109645. __pyx_L0:;
  109646. __Pyx_XDECREF(__pyx_v_hp);
  109647. __Pyx_XDECREF(__pyx_v_port);
  109648. __Pyx_XGIVEREF(__pyx_r);
  109649. __Pyx_RefNannyFinishContext();
  109650. return __pyx_r;
  109651. }
  109652. /* "uvloop/dns.pyx":222
  109653. *
  109654. *
  109655. * cdef __static_getaddrinfo_pyaddr(object host, object port, # <<<<<<<<<<<<<<
  109656. * int family, int type,
  109657. * int proto, int flags):
  109658. */
  109659. static PyObject *__pyx_f_6uvloop_4loop___static_getaddrinfo_pyaddr(PyObject *__pyx_v_host, PyObject *__pyx_v_port, int __pyx_v_family, int __pyx_v_type, int __pyx_v_proto, CYTHON_UNUSED int __pyx_v_flags) {
  109660. struct sockaddr_storage __pyx_v_addr;
  109661. PyObject *__pyx_v_triplet = 0;
  109662. PyObject *__pyx_v_af = NULL;
  109663. PyObject *__pyx_v_pyaddr = NULL;
  109664. PyObject *__pyx_r = NULL;
  109665. __Pyx_RefNannyDeclarations
  109666. PyObject *__pyx_t_1 = NULL;
  109667. int __pyx_t_2;
  109668. int __pyx_t_3;
  109669. PyObject *__pyx_t_4 = NULL;
  109670. PyObject *__pyx_t_5 = NULL;
  109671. PyObject *__pyx_t_6 = NULL;
  109672. PyObject *(*__pyx_t_7)(PyObject *);
  109673. int __pyx_t_8;
  109674. int __pyx_t_9;
  109675. PyObject *__pyx_t_10 = NULL;
  109676. PyObject *__pyx_t_11 = NULL;
  109677. PyObject *__pyx_t_12 = NULL;
  109678. __Pyx_RefNannySetupContext("__static_getaddrinfo_pyaddr", 0);
  109679. /* "uvloop/dns.pyx":230
  109680. * object triplet
  109681. *
  109682. * triplet = __static_getaddrinfo( # <<<<<<<<<<<<<<
  109683. * host, port, family, type,
  109684. * proto, <system.sockaddr*>&addr)
  109685. */
  109686. __pyx_t_1 = __pyx_f_6uvloop_4loop___static_getaddrinfo(__pyx_v_host, __pyx_v_port, __pyx_v_family, __pyx_v_type, __pyx_v_proto, ((struct sockaddr *)(&__pyx_v_addr))); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 230, __pyx_L1_error)
  109687. __Pyx_GOTREF(__pyx_t_1);
  109688. __pyx_v_triplet = __pyx_t_1;
  109689. __pyx_t_1 = 0;
  109690. /* "uvloop/dns.pyx":233
  109691. * host, port, family, type,
  109692. * proto, <system.sockaddr*>&addr)
  109693. * if triplet is None: # <<<<<<<<<<<<<<
  109694. * return
  109695. *
  109696. */
  109697. __pyx_t_2 = (__pyx_v_triplet == Py_None);
  109698. __pyx_t_3 = (__pyx_t_2 != 0);
  109699. if (__pyx_t_3) {
  109700. /* "uvloop/dns.pyx":234
  109701. * proto, <system.sockaddr*>&addr)
  109702. * if triplet is None:
  109703. * return # <<<<<<<<<<<<<<
  109704. *
  109705. * af, type, proto = triplet
  109706. */
  109707. __Pyx_XDECREF(__pyx_r);
  109708. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  109709. goto __pyx_L0;
  109710. /* "uvloop/dns.pyx":233
  109711. * host, port, family, type,
  109712. * proto, <system.sockaddr*>&addr)
  109713. * if triplet is None: # <<<<<<<<<<<<<<
  109714. * return
  109715. *
  109716. */
  109717. }
  109718. /* "uvloop/dns.pyx":236
  109719. * return
  109720. *
  109721. * af, type, proto = triplet # <<<<<<<<<<<<<<
  109722. *
  109723. * try:
  109724. */
  109725. if ((likely(PyTuple_CheckExact(__pyx_v_triplet))) || (PyList_CheckExact(__pyx_v_triplet))) {
  109726. PyObject* sequence = __pyx_v_triplet;
  109727. Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
  109728. if (unlikely(size != 3)) {
  109729. if (size > 3) __Pyx_RaiseTooManyValuesError(3);
  109730. else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
  109731. __PYX_ERR(7, 236, __pyx_L1_error)
  109732. }
  109733. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  109734. if (likely(PyTuple_CheckExact(sequence))) {
  109735. __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0);
  109736. __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1);
  109737. __pyx_t_5 = PyTuple_GET_ITEM(sequence, 2);
  109738. } else {
  109739. __pyx_t_1 = PyList_GET_ITEM(sequence, 0);
  109740. __pyx_t_4 = PyList_GET_ITEM(sequence, 1);
  109741. __pyx_t_5 = PyList_GET_ITEM(sequence, 2);
  109742. }
  109743. __Pyx_INCREF(__pyx_t_1);
  109744. __Pyx_INCREF(__pyx_t_4);
  109745. __Pyx_INCREF(__pyx_t_5);
  109746. #else
  109747. __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 236, __pyx_L1_error)
  109748. __Pyx_GOTREF(__pyx_t_1);
  109749. __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 236, __pyx_L1_error)
  109750. __Pyx_GOTREF(__pyx_t_4);
  109751. __pyx_t_5 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_5)) __PYX_ERR(7, 236, __pyx_L1_error)
  109752. __Pyx_GOTREF(__pyx_t_5);
  109753. #endif
  109754. } else {
  109755. Py_ssize_t index = -1;
  109756. __pyx_t_6 = PyObject_GetIter(__pyx_v_triplet); if (unlikely(!__pyx_t_6)) __PYX_ERR(7, 236, __pyx_L1_error)
  109757. __Pyx_GOTREF(__pyx_t_6);
  109758. __pyx_t_7 = Py_TYPE(__pyx_t_6)->tp_iternext;
  109759. index = 0; __pyx_t_1 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_1)) goto __pyx_L4_unpacking_failed;
  109760. __Pyx_GOTREF(__pyx_t_1);
  109761. index = 1; __pyx_t_4 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_4)) goto __pyx_L4_unpacking_failed;
  109762. __Pyx_GOTREF(__pyx_t_4);
  109763. index = 2; __pyx_t_5 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_5)) goto __pyx_L4_unpacking_failed;
  109764. __Pyx_GOTREF(__pyx_t_5);
  109765. if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 3) < 0) __PYX_ERR(7, 236, __pyx_L1_error)
  109766. __pyx_t_7 = NULL;
  109767. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  109768. goto __pyx_L5_unpacking_done;
  109769. __pyx_L4_unpacking_failed:;
  109770. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  109771. __pyx_t_7 = NULL;
  109772. if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
  109773. __PYX_ERR(7, 236, __pyx_L1_error)
  109774. __pyx_L5_unpacking_done:;
  109775. }
  109776. __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 236, __pyx_L1_error)
  109777. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  109778. __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 236, __pyx_L1_error)
  109779. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  109780. __pyx_v_af = __pyx_t_1;
  109781. __pyx_t_1 = 0;
  109782. __pyx_v_type = __pyx_t_8;
  109783. __pyx_v_proto = __pyx_t_9;
  109784. /* "uvloop/dns.pyx":238
  109785. * af, type, proto = triplet
  109786. *
  109787. * try: # <<<<<<<<<<<<<<
  109788. * pyaddr = __convert_sockaddr_to_pyaddr(<system.sockaddr*>&addr)
  109789. * except Exception:
  109790. */
  109791. {
  109792. __Pyx_PyThreadState_declare
  109793. __Pyx_PyThreadState_assign
  109794. __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
  109795. __Pyx_XGOTREF(__pyx_t_10);
  109796. __Pyx_XGOTREF(__pyx_t_11);
  109797. __Pyx_XGOTREF(__pyx_t_12);
  109798. /*try:*/ {
  109799. /* "uvloop/dns.pyx":239
  109800. *
  109801. * try:
  109802. * pyaddr = __convert_sockaddr_to_pyaddr(<system.sockaddr*>&addr) # <<<<<<<<<<<<<<
  109803. * except Exception:
  109804. * return
  109805. */
  109806. __pyx_t_5 = __pyx_f_6uvloop_4loop___convert_sockaddr_to_pyaddr(((struct sockaddr *)(&__pyx_v_addr))); if (unlikely(!__pyx_t_5)) __PYX_ERR(7, 239, __pyx_L6_error)
  109807. __Pyx_GOTREF(__pyx_t_5);
  109808. __pyx_v_pyaddr = __pyx_t_5;
  109809. __pyx_t_5 = 0;
  109810. /* "uvloop/dns.pyx":238
  109811. * af, type, proto = triplet
  109812. *
  109813. * try: # <<<<<<<<<<<<<<
  109814. * pyaddr = __convert_sockaddr_to_pyaddr(<system.sockaddr*>&addr)
  109815. * except Exception:
  109816. */
  109817. }
  109818. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  109819. __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
  109820. __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
  109821. goto __pyx_L11_try_end;
  109822. __pyx_L6_error:;
  109823. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  109824. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  109825. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  109826. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  109827. /* "uvloop/dns.pyx":240
  109828. * try:
  109829. * pyaddr = __convert_sockaddr_to_pyaddr(<system.sockaddr*>&addr)
  109830. * except Exception: # <<<<<<<<<<<<<<
  109831. * return
  109832. *
  109833. */
  109834. __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
  109835. if (__pyx_t_9) {
  109836. __Pyx_AddTraceback("uvloop.loop.__static_getaddrinfo_pyaddr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  109837. if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_1) < 0) __PYX_ERR(7, 240, __pyx_L8_except_error)
  109838. __Pyx_GOTREF(__pyx_t_5);
  109839. __Pyx_GOTREF(__pyx_t_4);
  109840. __Pyx_GOTREF(__pyx_t_1);
  109841. /* "uvloop/dns.pyx":241
  109842. * pyaddr = __convert_sockaddr_to_pyaddr(<system.sockaddr*>&addr)
  109843. * except Exception:
  109844. * return # <<<<<<<<<<<<<<
  109845. *
  109846. * return af, type, proto, '', pyaddr
  109847. */
  109848. __Pyx_XDECREF(__pyx_r);
  109849. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  109850. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  109851. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  109852. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  109853. goto __pyx_L9_except_return;
  109854. }
  109855. goto __pyx_L8_except_error;
  109856. __pyx_L8_except_error:;
  109857. /* "uvloop/dns.pyx":238
  109858. * af, type, proto = triplet
  109859. *
  109860. * try: # <<<<<<<<<<<<<<
  109861. * pyaddr = __convert_sockaddr_to_pyaddr(<system.sockaddr*>&addr)
  109862. * except Exception:
  109863. */
  109864. __Pyx_XGIVEREF(__pyx_t_10);
  109865. __Pyx_XGIVEREF(__pyx_t_11);
  109866. __Pyx_XGIVEREF(__pyx_t_12);
  109867. __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
  109868. goto __pyx_L1_error;
  109869. __pyx_L9_except_return:;
  109870. __Pyx_XGIVEREF(__pyx_t_10);
  109871. __Pyx_XGIVEREF(__pyx_t_11);
  109872. __Pyx_XGIVEREF(__pyx_t_12);
  109873. __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
  109874. goto __pyx_L0;
  109875. __pyx_L11_try_end:;
  109876. }
  109877. /* "uvloop/dns.pyx":243
  109878. * return
  109879. *
  109880. * return af, type, proto, '', pyaddr # <<<<<<<<<<<<<<
  109881. *
  109882. *
  109883. */
  109884. __Pyx_XDECREF(__pyx_r);
  109885. __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 243, __pyx_L1_error)
  109886. __Pyx_GOTREF(__pyx_t_1);
  109887. __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_proto); if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 243, __pyx_L1_error)
  109888. __Pyx_GOTREF(__pyx_t_4);
  109889. __pyx_t_5 = PyTuple_New(5); if (unlikely(!__pyx_t_5)) __PYX_ERR(7, 243, __pyx_L1_error)
  109890. __Pyx_GOTREF(__pyx_t_5);
  109891. __Pyx_INCREF(__pyx_v_af);
  109892. __Pyx_GIVEREF(__pyx_v_af);
  109893. PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_af);
  109894. __Pyx_GIVEREF(__pyx_t_1);
  109895. PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1);
  109896. __Pyx_GIVEREF(__pyx_t_4);
  109897. PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_4);
  109898. __Pyx_INCREF(__pyx_kp_u__2);
  109899. __Pyx_GIVEREF(__pyx_kp_u__2);
  109900. PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_kp_u__2);
  109901. __Pyx_INCREF(__pyx_v_pyaddr);
  109902. __Pyx_GIVEREF(__pyx_v_pyaddr);
  109903. PyTuple_SET_ITEM(__pyx_t_5, 4, __pyx_v_pyaddr);
  109904. __pyx_t_1 = 0;
  109905. __pyx_t_4 = 0;
  109906. __pyx_r = __pyx_t_5;
  109907. __pyx_t_5 = 0;
  109908. goto __pyx_L0;
  109909. /* "uvloop/dns.pyx":222
  109910. *
  109911. *
  109912. * cdef __static_getaddrinfo_pyaddr(object host, object port, # <<<<<<<<<<<<<<
  109913. * int family, int type,
  109914. * int proto, int flags):
  109915. */
  109916. /* function exit code */
  109917. __pyx_L1_error:;
  109918. __Pyx_XDECREF(__pyx_t_1);
  109919. __Pyx_XDECREF(__pyx_t_4);
  109920. __Pyx_XDECREF(__pyx_t_5);
  109921. __Pyx_XDECREF(__pyx_t_6);
  109922. __Pyx_AddTraceback("uvloop.loop.__static_getaddrinfo_pyaddr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  109923. __pyx_r = 0;
  109924. __pyx_L0:;
  109925. __Pyx_XDECREF(__pyx_v_triplet);
  109926. __Pyx_XDECREF(__pyx_v_af);
  109927. __Pyx_XDECREF(__pyx_v_pyaddr);
  109928. __Pyx_XGIVEREF(__pyx_r);
  109929. __Pyx_RefNannyFinishContext();
  109930. return __pyx_r;
  109931. }
  109932. /* "uvloop/dns.pyx":251
  109933. * system.addrinfo *data
  109934. *
  109935. * def __cinit__(self): # <<<<<<<<<<<<<<
  109936. * self.data = NULL
  109937. *
  109938. */
  109939. /* Python wrapper */
  109940. static int __pyx_pw_6uvloop_4loop_8AddrInfo_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  109941. static int __pyx_pw_6uvloop_4loop_8AddrInfo_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  109942. int __pyx_r;
  109943. __Pyx_RefNannyDeclarations
  109944. __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  109945. if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
  109946. __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  109947. if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
  109948. __pyx_r = __pyx_pf_6uvloop_4loop_8AddrInfo___cinit__(((struct __pyx_obj_6uvloop_4loop_AddrInfo *)__pyx_v_self));
  109949. /* function exit code */
  109950. __Pyx_RefNannyFinishContext();
  109951. return __pyx_r;
  109952. }
  109953. static int __pyx_pf_6uvloop_4loop_8AddrInfo___cinit__(struct __pyx_obj_6uvloop_4loop_AddrInfo *__pyx_v_self) {
  109954. int __pyx_r;
  109955. __Pyx_RefNannyDeclarations
  109956. __Pyx_RefNannySetupContext("__cinit__", 0);
  109957. /* "uvloop/dns.pyx":252
  109958. *
  109959. * def __cinit__(self):
  109960. * self.data = NULL # <<<<<<<<<<<<<<
  109961. *
  109962. * def __dealloc__(self):
  109963. */
  109964. __pyx_v_self->data = NULL;
  109965. /* "uvloop/dns.pyx":251
  109966. * system.addrinfo *data
  109967. *
  109968. * def __cinit__(self): # <<<<<<<<<<<<<<
  109969. * self.data = NULL
  109970. *
  109971. */
  109972. /* function exit code */
  109973. __pyx_r = 0;
  109974. __Pyx_RefNannyFinishContext();
  109975. return __pyx_r;
  109976. }
  109977. /* "uvloop/dns.pyx":254
  109978. * self.data = NULL
  109979. *
  109980. * def __dealloc__(self): # <<<<<<<<<<<<<<
  109981. * if self.data is not NULL:
  109982. * uv.uv_freeaddrinfo(self.data) # returns void
  109983. */
  109984. /* Python wrapper */
  109985. static void __pyx_pw_6uvloop_4loop_8AddrInfo_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
  109986. static void __pyx_pw_6uvloop_4loop_8AddrInfo_3__dealloc__(PyObject *__pyx_v_self) {
  109987. __Pyx_RefNannyDeclarations
  109988. __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  109989. __pyx_pf_6uvloop_4loop_8AddrInfo_2__dealloc__(((struct __pyx_obj_6uvloop_4loop_AddrInfo *)__pyx_v_self));
  109990. /* function exit code */
  109991. __Pyx_RefNannyFinishContext();
  109992. }
  109993. static void __pyx_pf_6uvloop_4loop_8AddrInfo_2__dealloc__(struct __pyx_obj_6uvloop_4loop_AddrInfo *__pyx_v_self) {
  109994. __Pyx_RefNannyDeclarations
  109995. int __pyx_t_1;
  109996. __Pyx_RefNannySetupContext("__dealloc__", 0);
  109997. /* "uvloop/dns.pyx":255
  109998. *
  109999. * def __dealloc__(self):
  110000. * if self.data is not NULL: # <<<<<<<<<<<<<<
  110001. * uv.uv_freeaddrinfo(self.data) # returns void
  110002. * self.data = NULL
  110003. */
  110004. __pyx_t_1 = ((__pyx_v_self->data != NULL) != 0);
  110005. if (__pyx_t_1) {
  110006. /* "uvloop/dns.pyx":256
  110007. * def __dealloc__(self):
  110008. * if self.data is not NULL:
  110009. * uv.uv_freeaddrinfo(self.data) # returns void # <<<<<<<<<<<<<<
  110010. * self.data = NULL
  110011. *
  110012. */
  110013. uv_freeaddrinfo(__pyx_v_self->data);
  110014. /* "uvloop/dns.pyx":257
  110015. * if self.data is not NULL:
  110016. * uv.uv_freeaddrinfo(self.data) # returns void
  110017. * self.data = NULL # <<<<<<<<<<<<<<
  110018. *
  110019. * cdef void set_data(self, system.addrinfo *data):
  110020. */
  110021. __pyx_v_self->data = NULL;
  110022. /* "uvloop/dns.pyx":255
  110023. *
  110024. * def __dealloc__(self):
  110025. * if self.data is not NULL: # <<<<<<<<<<<<<<
  110026. * uv.uv_freeaddrinfo(self.data) # returns void
  110027. * self.data = NULL
  110028. */
  110029. }
  110030. /* "uvloop/dns.pyx":254
  110031. * self.data = NULL
  110032. *
  110033. * def __dealloc__(self): # <<<<<<<<<<<<<<
  110034. * if self.data is not NULL:
  110035. * uv.uv_freeaddrinfo(self.data) # returns void
  110036. */
  110037. /* function exit code */
  110038. __Pyx_RefNannyFinishContext();
  110039. }
  110040. /* "uvloop/dns.pyx":259
  110041. * self.data = NULL
  110042. *
  110043. * cdef void set_data(self, system.addrinfo *data): # <<<<<<<<<<<<<<
  110044. * self.data = data
  110045. *
  110046. */
  110047. static void __pyx_f_6uvloop_4loop_8AddrInfo_set_data(struct __pyx_obj_6uvloop_4loop_AddrInfo *__pyx_v_self, struct addrinfo *__pyx_v_data) {
  110048. __Pyx_RefNannyDeclarations
  110049. __Pyx_RefNannySetupContext("set_data", 0);
  110050. /* "uvloop/dns.pyx":260
  110051. *
  110052. * cdef void set_data(self, system.addrinfo *data):
  110053. * self.data = data # <<<<<<<<<<<<<<
  110054. *
  110055. * cdef unpack(self):
  110056. */
  110057. __pyx_v_self->data = __pyx_v_data;
  110058. /* "uvloop/dns.pyx":259
  110059. * self.data = NULL
  110060. *
  110061. * cdef void set_data(self, system.addrinfo *data): # <<<<<<<<<<<<<<
  110062. * self.data = data
  110063. *
  110064. */
  110065. /* function exit code */
  110066. __Pyx_RefNannyFinishContext();
  110067. }
  110068. /* "uvloop/dns.pyx":262
  110069. * self.data = data
  110070. *
  110071. * cdef unpack(self): # <<<<<<<<<<<<<<
  110072. * cdef:
  110073. * list result = []
  110074. */
  110075. static PyObject *__pyx_f_6uvloop_4loop_8AddrInfo_unpack(struct __pyx_obj_6uvloop_4loop_AddrInfo *__pyx_v_self) {
  110076. PyObject *__pyx_v_result = 0;
  110077. struct addrinfo *__pyx_v_ptr;
  110078. PyObject *__pyx_r = NULL;
  110079. __Pyx_RefNannyDeclarations
  110080. PyObject *__pyx_t_1 = NULL;
  110081. int __pyx_t_2;
  110082. struct addrinfo *__pyx_t_3;
  110083. unsigned short __pyx_t_4;
  110084. int __pyx_t_5;
  110085. PyObject *__pyx_t_6 = NULL;
  110086. PyObject *__pyx_t_7 = NULL;
  110087. PyObject *__pyx_t_8 = NULL;
  110088. PyObject *__pyx_t_9 = NULL;
  110089. PyObject *__pyx_t_10 = NULL;
  110090. int __pyx_t_11;
  110091. __Pyx_RefNannySetupContext("unpack", 0);
  110092. /* "uvloop/dns.pyx":264
  110093. * cdef unpack(self):
  110094. * cdef:
  110095. * list result = [] # <<<<<<<<<<<<<<
  110096. * system.addrinfo *ptr
  110097. *
  110098. */
  110099. __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 264, __pyx_L1_error)
  110100. __Pyx_GOTREF(__pyx_t_1);
  110101. __pyx_v_result = ((PyObject*)__pyx_t_1);
  110102. __pyx_t_1 = 0;
  110103. /* "uvloop/dns.pyx":267
  110104. * system.addrinfo *ptr
  110105. *
  110106. * if self.data is NULL: # <<<<<<<<<<<<<<
  110107. * raise RuntimeError('AddrInfo.data is NULL')
  110108. *
  110109. */
  110110. __pyx_t_2 = ((__pyx_v_self->data == NULL) != 0);
  110111. if (unlikely(__pyx_t_2)) {
  110112. /* "uvloop/dns.pyx":268
  110113. *
  110114. * if self.data is NULL:
  110115. * raise RuntimeError('AddrInfo.data is NULL') # <<<<<<<<<<<<<<
  110116. *
  110117. * ptr = self.data
  110118. */
  110119. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__193, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 268, __pyx_L1_error)
  110120. __Pyx_GOTREF(__pyx_t_1);
  110121. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  110122. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  110123. __PYX_ERR(7, 268, __pyx_L1_error)
  110124. /* "uvloop/dns.pyx":267
  110125. * system.addrinfo *ptr
  110126. *
  110127. * if self.data is NULL: # <<<<<<<<<<<<<<
  110128. * raise RuntimeError('AddrInfo.data is NULL')
  110129. *
  110130. */
  110131. }
  110132. /* "uvloop/dns.pyx":270
  110133. * raise RuntimeError('AddrInfo.data is NULL')
  110134. *
  110135. * ptr = self.data # <<<<<<<<<<<<<<
  110136. * while ptr != NULL:
  110137. * if ptr.ai_addr.sa_family in (uv.AF_INET, uv.AF_INET6):
  110138. */
  110139. __pyx_t_3 = __pyx_v_self->data;
  110140. __pyx_v_ptr = __pyx_t_3;
  110141. /* "uvloop/dns.pyx":271
  110142. *
  110143. * ptr = self.data
  110144. * while ptr != NULL: # <<<<<<<<<<<<<<
  110145. * if ptr.ai_addr.sa_family in (uv.AF_INET, uv.AF_INET6):
  110146. * result.append((
  110147. */
  110148. while (1) {
  110149. __pyx_t_2 = ((__pyx_v_ptr != NULL) != 0);
  110150. if (!__pyx_t_2) break;
  110151. /* "uvloop/dns.pyx":272
  110152. * ptr = self.data
  110153. * while ptr != NULL:
  110154. * if ptr.ai_addr.sa_family in (uv.AF_INET, uv.AF_INET6): # <<<<<<<<<<<<<<
  110155. * result.append((
  110156. * ptr.ai_family,
  110157. */
  110158. __pyx_t_4 = __pyx_v_ptr->ai_addr->sa_family;
  110159. __pyx_t_5 = ((__pyx_t_4 == AF_INET) != 0);
  110160. if (!__pyx_t_5) {
  110161. } else {
  110162. __pyx_t_2 = __pyx_t_5;
  110163. goto __pyx_L7_bool_binop_done;
  110164. }
  110165. __pyx_t_5 = ((__pyx_t_4 == AF_INET6) != 0);
  110166. __pyx_t_2 = __pyx_t_5;
  110167. __pyx_L7_bool_binop_done:;
  110168. __pyx_t_5 = (__pyx_t_2 != 0);
  110169. if (__pyx_t_5) {
  110170. /* "uvloop/dns.pyx":274
  110171. * if ptr.ai_addr.sa_family in (uv.AF_INET, uv.AF_INET6):
  110172. * result.append((
  110173. * ptr.ai_family, # <<<<<<<<<<<<<<
  110174. * ptr.ai_socktype,
  110175. * ptr.ai_protocol,
  110176. */
  110177. __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_ptr->ai_family); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 274, __pyx_L1_error)
  110178. __Pyx_GOTREF(__pyx_t_1);
  110179. /* "uvloop/dns.pyx":275
  110180. * result.append((
  110181. * ptr.ai_family,
  110182. * ptr.ai_socktype, # <<<<<<<<<<<<<<
  110183. * ptr.ai_protocol,
  110184. * ('' if ptr.ai_canonname is NULL else
  110185. */
  110186. __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_ptr->ai_socktype); if (unlikely(!__pyx_t_6)) __PYX_ERR(7, 275, __pyx_L1_error)
  110187. __Pyx_GOTREF(__pyx_t_6);
  110188. /* "uvloop/dns.pyx":276
  110189. * ptr.ai_family,
  110190. * ptr.ai_socktype,
  110191. * ptr.ai_protocol, # <<<<<<<<<<<<<<
  110192. * ('' if ptr.ai_canonname is NULL else
  110193. * (<bytes>ptr.ai_canonname).decode()),
  110194. */
  110195. __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_ptr->ai_protocol); if (unlikely(!__pyx_t_7)) __PYX_ERR(7, 276, __pyx_L1_error)
  110196. __Pyx_GOTREF(__pyx_t_7);
  110197. /* "uvloop/dns.pyx":277
  110198. * ptr.ai_socktype,
  110199. * ptr.ai_protocol,
  110200. * ('' if ptr.ai_canonname is NULL else # <<<<<<<<<<<<<<
  110201. * (<bytes>ptr.ai_canonname).decode()),
  110202. * __convert_sockaddr_to_pyaddr(ptr.ai_addr)
  110203. */
  110204. if (((__pyx_v_ptr->ai_canonname == NULL) != 0)) {
  110205. __Pyx_INCREF(__pyx_kp_u__2);
  110206. __pyx_t_8 = __pyx_kp_u__2;
  110207. } else {
  110208. /* "uvloop/dns.pyx":278
  110209. * ptr.ai_protocol,
  110210. * ('' if ptr.ai_canonname is NULL else
  110211. * (<bytes>ptr.ai_canonname).decode()), # <<<<<<<<<<<<<<
  110212. * __convert_sockaddr_to_pyaddr(ptr.ai_addr)
  110213. * ))
  110214. */
  110215. __pyx_t_9 = __Pyx_PyBytes_FromString(__pyx_v_ptr->ai_canonname); if (unlikely(!__pyx_t_9)) __PYX_ERR(7, 278, __pyx_L1_error)
  110216. __Pyx_GOTREF(__pyx_t_9);
  110217. if (unlikely(__pyx_t_9 == Py_None)) {
  110218. PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode");
  110219. __PYX_ERR(7, 278, __pyx_L1_error)
  110220. }
  110221. __pyx_t_10 = __Pyx_decode_bytes(((PyObject*)__pyx_t_9), 0, PY_SSIZE_T_MAX, NULL, NULL, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(7, 278, __pyx_L1_error)
  110222. __Pyx_GOTREF(__pyx_t_10);
  110223. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  110224. __pyx_t_8 = __pyx_t_10;
  110225. __pyx_t_10 = 0;
  110226. }
  110227. /* "uvloop/dns.pyx":279
  110228. * ('' if ptr.ai_canonname is NULL else
  110229. * (<bytes>ptr.ai_canonname).decode()),
  110230. * __convert_sockaddr_to_pyaddr(ptr.ai_addr) # <<<<<<<<<<<<<<
  110231. * ))
  110232. *
  110233. */
  110234. __pyx_t_10 = __pyx_f_6uvloop_4loop___convert_sockaddr_to_pyaddr(__pyx_v_ptr->ai_addr); if (unlikely(!__pyx_t_10)) __PYX_ERR(7, 279, __pyx_L1_error)
  110235. __Pyx_GOTREF(__pyx_t_10);
  110236. /* "uvloop/dns.pyx":274
  110237. * if ptr.ai_addr.sa_family in (uv.AF_INET, uv.AF_INET6):
  110238. * result.append((
  110239. * ptr.ai_family, # <<<<<<<<<<<<<<
  110240. * ptr.ai_socktype,
  110241. * ptr.ai_protocol,
  110242. */
  110243. __pyx_t_9 = PyTuple_New(5); if (unlikely(!__pyx_t_9)) __PYX_ERR(7, 274, __pyx_L1_error)
  110244. __Pyx_GOTREF(__pyx_t_9);
  110245. __Pyx_GIVEREF(__pyx_t_1);
  110246. PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_1);
  110247. __Pyx_GIVEREF(__pyx_t_6);
  110248. PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_6);
  110249. __Pyx_GIVEREF(__pyx_t_7);
  110250. PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_t_7);
  110251. __Pyx_GIVEREF(__pyx_t_8);
  110252. PyTuple_SET_ITEM(__pyx_t_9, 3, __pyx_t_8);
  110253. __Pyx_GIVEREF(__pyx_t_10);
  110254. PyTuple_SET_ITEM(__pyx_t_9, 4, __pyx_t_10);
  110255. __pyx_t_1 = 0;
  110256. __pyx_t_6 = 0;
  110257. __pyx_t_7 = 0;
  110258. __pyx_t_8 = 0;
  110259. __pyx_t_10 = 0;
  110260. /* "uvloop/dns.pyx":273
  110261. * while ptr != NULL:
  110262. * if ptr.ai_addr.sa_family in (uv.AF_INET, uv.AF_INET6):
  110263. * result.append(( # <<<<<<<<<<<<<<
  110264. * ptr.ai_family,
  110265. * ptr.ai_socktype,
  110266. */
  110267. __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_result, __pyx_t_9); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(7, 273, __pyx_L1_error)
  110268. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  110269. /* "uvloop/dns.pyx":272
  110270. * ptr = self.data
  110271. * while ptr != NULL:
  110272. * if ptr.ai_addr.sa_family in (uv.AF_INET, uv.AF_INET6): # <<<<<<<<<<<<<<
  110273. * result.append((
  110274. * ptr.ai_family,
  110275. */
  110276. }
  110277. /* "uvloop/dns.pyx":282
  110278. * ))
  110279. *
  110280. * ptr = ptr.ai_next # <<<<<<<<<<<<<<
  110281. *
  110282. * return result
  110283. */
  110284. __pyx_t_3 = __pyx_v_ptr->ai_next;
  110285. __pyx_v_ptr = __pyx_t_3;
  110286. }
  110287. /* "uvloop/dns.pyx":284
  110288. * ptr = ptr.ai_next
  110289. *
  110290. * return result # <<<<<<<<<<<<<<
  110291. *
  110292. * @staticmethod
  110293. */
  110294. __Pyx_XDECREF(__pyx_r);
  110295. __Pyx_INCREF(__pyx_v_result);
  110296. __pyx_r = __pyx_v_result;
  110297. goto __pyx_L0;
  110298. /* "uvloop/dns.pyx":262
  110299. * self.data = data
  110300. *
  110301. * cdef unpack(self): # <<<<<<<<<<<<<<
  110302. * cdef:
  110303. * list result = []
  110304. */
  110305. /* function exit code */
  110306. __pyx_L1_error:;
  110307. __Pyx_XDECREF(__pyx_t_1);
  110308. __Pyx_XDECREF(__pyx_t_6);
  110309. __Pyx_XDECREF(__pyx_t_7);
  110310. __Pyx_XDECREF(__pyx_t_8);
  110311. __Pyx_XDECREF(__pyx_t_9);
  110312. __Pyx_XDECREF(__pyx_t_10);
  110313. __Pyx_AddTraceback("uvloop.loop.AddrInfo.unpack", __pyx_clineno, __pyx_lineno, __pyx_filename);
  110314. __pyx_r = 0;
  110315. __pyx_L0:;
  110316. __Pyx_XDECREF(__pyx_v_result);
  110317. __Pyx_XGIVEREF(__pyx_r);
  110318. __Pyx_RefNannyFinishContext();
  110319. return __pyx_r;
  110320. }
  110321. /* "uvloop/dns.pyx":287
  110322. *
  110323. * @staticmethod
  110324. * cdef int isinstance(object other): # <<<<<<<<<<<<<<
  110325. * return type(other) is AddrInfo
  110326. *
  110327. */
  110328. static int __pyx_f_6uvloop_4loop_8AddrInfo_isinstance(PyObject *__pyx_v_other) {
  110329. int __pyx_r;
  110330. __Pyx_RefNannyDeclarations
  110331. int __pyx_t_1;
  110332. __Pyx_RefNannySetupContext("isinstance", 0);
  110333. /* "uvloop/dns.pyx":288
  110334. * @staticmethod
  110335. * cdef int isinstance(object other):
  110336. * return type(other) is AddrInfo # <<<<<<<<<<<<<<
  110337. *
  110338. *
  110339. */
  110340. __pyx_t_1 = (((PyObject *)Py_TYPE(__pyx_v_other)) == ((PyObject *)__pyx_ptype_6uvloop_4loop_AddrInfo));
  110341. __pyx_r = __pyx_t_1;
  110342. goto __pyx_L0;
  110343. /* "uvloop/dns.pyx":287
  110344. *
  110345. * @staticmethod
  110346. * cdef int isinstance(object other): # <<<<<<<<<<<<<<
  110347. * return type(other) is AddrInfo
  110348. *
  110349. */
  110350. /* function exit code */
  110351. __pyx_L0:;
  110352. __Pyx_RefNannyFinishContext();
  110353. return __pyx_r;
  110354. }
  110355. /* "(tree fragment)":1
  110356. * def __reduce_cython__(self): # <<<<<<<<<<<<<<
  110357. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  110358. * def __setstate_cython__(self, __pyx_state):
  110359. */
  110360. /* Python wrapper */
  110361. static PyObject *__pyx_pw_6uvloop_4loop_8AddrInfo_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  110362. static char __pyx_doc_6uvloop_4loop_8AddrInfo_4__reduce_cython__[] = "AddrInfo.__reduce_cython__(self)";
  110363. static PyObject *__pyx_pw_6uvloop_4loop_8AddrInfo_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  110364. PyObject *__pyx_r = 0;
  110365. __Pyx_RefNannyDeclarations
  110366. __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  110367. __pyx_r = __pyx_pf_6uvloop_4loop_8AddrInfo_4__reduce_cython__(((struct __pyx_obj_6uvloop_4loop_AddrInfo *)__pyx_v_self));
  110368. /* function exit code */
  110369. __Pyx_RefNannyFinishContext();
  110370. return __pyx_r;
  110371. }
  110372. static PyObject *__pyx_pf_6uvloop_4loop_8AddrInfo_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_AddrInfo *__pyx_v_self) {
  110373. PyObject *__pyx_r = NULL;
  110374. __Pyx_RefNannyDeclarations
  110375. PyObject *__pyx_t_1 = NULL;
  110376. __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  110377. /* "(tree fragment)":2
  110378. * def __reduce_cython__(self):
  110379. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  110380. * def __setstate_cython__(self, __pyx_state):
  110381. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  110382. */
  110383. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__194, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 2, __pyx_L1_error)
  110384. __Pyx_GOTREF(__pyx_t_1);
  110385. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  110386. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  110387. __PYX_ERR(9, 2, __pyx_L1_error)
  110388. /* "(tree fragment)":1
  110389. * def __reduce_cython__(self): # <<<<<<<<<<<<<<
  110390. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  110391. * def __setstate_cython__(self, __pyx_state):
  110392. */
  110393. /* function exit code */
  110394. __pyx_L1_error:;
  110395. __Pyx_XDECREF(__pyx_t_1);
  110396. __Pyx_AddTraceback("uvloop.loop.AddrInfo.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  110397. __pyx_r = NULL;
  110398. __Pyx_XGIVEREF(__pyx_r);
  110399. __Pyx_RefNannyFinishContext();
  110400. return __pyx_r;
  110401. }
  110402. /* "(tree fragment)":3
  110403. * def __reduce_cython__(self):
  110404. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  110405. * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
  110406. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  110407. */
  110408. /* Python wrapper */
  110409. static PyObject *__pyx_pw_6uvloop_4loop_8AddrInfo_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
  110410. static char __pyx_doc_6uvloop_4loop_8AddrInfo_6__setstate_cython__[] = "AddrInfo.__setstate_cython__(self, __pyx_state)";
  110411. static PyObject *__pyx_pw_6uvloop_4loop_8AddrInfo_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  110412. PyObject *__pyx_r = 0;
  110413. __Pyx_RefNannyDeclarations
  110414. __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  110415. __pyx_r = __pyx_pf_6uvloop_4loop_8AddrInfo_6__setstate_cython__(((struct __pyx_obj_6uvloop_4loop_AddrInfo *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
  110416. /* function exit code */
  110417. __Pyx_RefNannyFinishContext();
  110418. return __pyx_r;
  110419. }
  110420. static PyObject *__pyx_pf_6uvloop_4loop_8AddrInfo_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_AddrInfo *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  110421. PyObject *__pyx_r = NULL;
  110422. __Pyx_RefNannyDeclarations
  110423. PyObject *__pyx_t_1 = NULL;
  110424. __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  110425. /* "(tree fragment)":4
  110426. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  110427. * def __setstate_cython__(self, __pyx_state):
  110428. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  110429. */
  110430. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__195, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 4, __pyx_L1_error)
  110431. __Pyx_GOTREF(__pyx_t_1);
  110432. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  110433. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  110434. __PYX_ERR(9, 4, __pyx_L1_error)
  110435. /* "(tree fragment)":3
  110436. * def __reduce_cython__(self):
  110437. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  110438. * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
  110439. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  110440. */
  110441. /* function exit code */
  110442. __pyx_L1_error:;
  110443. __Pyx_XDECREF(__pyx_t_1);
  110444. __Pyx_AddTraceback("uvloop.loop.AddrInfo.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  110445. __pyx_r = NULL;
  110446. __Pyx_XGIVEREF(__pyx_r);
  110447. __Pyx_RefNannyFinishContext();
  110448. return __pyx_r;
  110449. }
  110450. /* "uvloop/dns.pyx":297
  110451. * uv.uv_getaddrinfo_t _req_data
  110452. *
  110453. * def __cinit__(self, Loop loop, # <<<<<<<<<<<<<<
  110454. * bytes host, bytes port,
  110455. * int family, int type, int proto, int flags,
  110456. */
  110457. /* Python wrapper */
  110458. static int __pyx_pw_6uvloop_4loop_15AddrInfoRequest_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  110459. static int __pyx_pw_6uvloop_4loop_15AddrInfoRequest_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  110460. struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop = 0;
  110461. PyObject *__pyx_v_host = 0;
  110462. PyObject *__pyx_v_port = 0;
  110463. int __pyx_v_family;
  110464. int __pyx_v_type;
  110465. int __pyx_v_proto;
  110466. int __pyx_v_flags;
  110467. PyObject *__pyx_v_callback = 0;
  110468. int __pyx_r;
  110469. __Pyx_RefNannyDeclarations
  110470. __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  110471. {
  110472. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_loop,&__pyx_n_s_host,&__pyx_n_s_port,&__pyx_n_s_family,&__pyx_n_s_type,&__pyx_n_s_proto,&__pyx_n_s_flags,&__pyx_n_s_callback,0};
  110473. PyObject* values[8] = {0,0,0,0,0,0,0,0};
  110474. if (unlikely(__pyx_kwds)) {
  110475. Py_ssize_t kw_args;
  110476. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  110477. switch (pos_args) {
  110478. case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
  110479. CYTHON_FALLTHROUGH;
  110480. case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
  110481. CYTHON_FALLTHROUGH;
  110482. case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
  110483. CYTHON_FALLTHROUGH;
  110484. case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
  110485. CYTHON_FALLTHROUGH;
  110486. case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
  110487. CYTHON_FALLTHROUGH;
  110488. case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
  110489. CYTHON_FALLTHROUGH;
  110490. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  110491. CYTHON_FALLTHROUGH;
  110492. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  110493. CYTHON_FALLTHROUGH;
  110494. case 0: break;
  110495. default: goto __pyx_L5_argtuple_error;
  110496. }
  110497. kw_args = PyDict_Size(__pyx_kwds);
  110498. switch (pos_args) {
  110499. case 0:
  110500. if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_loop)) != 0)) kw_args--;
  110501. else goto __pyx_L5_argtuple_error;
  110502. CYTHON_FALLTHROUGH;
  110503. case 1:
  110504. if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_host)) != 0)) kw_args--;
  110505. else {
  110506. __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 8, 8, 1); __PYX_ERR(7, 297, __pyx_L3_error)
  110507. }
  110508. CYTHON_FALLTHROUGH;
  110509. case 2:
  110510. if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_port)) != 0)) kw_args--;
  110511. else {
  110512. __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 8, 8, 2); __PYX_ERR(7, 297, __pyx_L3_error)
  110513. }
  110514. CYTHON_FALLTHROUGH;
  110515. case 3:
  110516. if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_family)) != 0)) kw_args--;
  110517. else {
  110518. __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 8, 8, 3); __PYX_ERR(7, 297, __pyx_L3_error)
  110519. }
  110520. CYTHON_FALLTHROUGH;
  110521. case 4:
  110522. if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_type)) != 0)) kw_args--;
  110523. else {
  110524. __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 8, 8, 4); __PYX_ERR(7, 297, __pyx_L3_error)
  110525. }
  110526. CYTHON_FALLTHROUGH;
  110527. case 5:
  110528. if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_proto)) != 0)) kw_args--;
  110529. else {
  110530. __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 8, 8, 5); __PYX_ERR(7, 297, __pyx_L3_error)
  110531. }
  110532. CYTHON_FALLTHROUGH;
  110533. case 6:
  110534. if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_flags)) != 0)) kw_args--;
  110535. else {
  110536. __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 8, 8, 6); __PYX_ERR(7, 297, __pyx_L3_error)
  110537. }
  110538. CYTHON_FALLTHROUGH;
  110539. case 7:
  110540. if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_callback)) != 0)) kw_args--;
  110541. else {
  110542. __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 8, 8, 7); __PYX_ERR(7, 297, __pyx_L3_error)
  110543. }
  110544. }
  110545. if (unlikely(kw_args > 0)) {
  110546. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(7, 297, __pyx_L3_error)
  110547. }
  110548. } else if (PyTuple_GET_SIZE(__pyx_args) != 8) {
  110549. goto __pyx_L5_argtuple_error;
  110550. } else {
  110551. values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  110552. values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  110553. values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
  110554. values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
  110555. values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
  110556. values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
  110557. values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
  110558. values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
  110559. }
  110560. __pyx_v_loop = ((struct __pyx_obj_6uvloop_4loop_Loop *)values[0]);
  110561. __pyx_v_host = ((PyObject*)values[1]);
  110562. __pyx_v_port = ((PyObject*)values[2]);
  110563. __pyx_v_family = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_family == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 299, __pyx_L3_error)
  110564. __pyx_v_type = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_type == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 299, __pyx_L3_error)
  110565. __pyx_v_proto = __Pyx_PyInt_As_int(values[5]); if (unlikely((__pyx_v_proto == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 299, __pyx_L3_error)
  110566. __pyx_v_flags = __Pyx_PyInt_As_int(values[6]); if (unlikely((__pyx_v_flags == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 299, __pyx_L3_error)
  110567. __pyx_v_callback = values[7];
  110568. }
  110569. goto __pyx_L4_argument_unpacking_done;
  110570. __pyx_L5_argtuple_error:;
  110571. __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 8, 8, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 297, __pyx_L3_error)
  110572. __pyx_L3_error:;
  110573. __Pyx_AddTraceback("uvloop.loop.AddrInfoRequest.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  110574. __Pyx_RefNannyFinishContext();
  110575. return -1;
  110576. __pyx_L4_argument_unpacking_done:;
  110577. if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_loop), __pyx_ptype_6uvloop_4loop_Loop, 1, "loop", 0))) __PYX_ERR(7, 297, __pyx_L1_error)
  110578. if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_host), (&PyBytes_Type), 1, "host", 1))) __PYX_ERR(7, 298, __pyx_L1_error)
  110579. if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_port), (&PyBytes_Type), 1, "port", 1))) __PYX_ERR(7, 298, __pyx_L1_error)
  110580. __pyx_r = __pyx_pf_6uvloop_4loop_15AddrInfoRequest___cinit__(((struct __pyx_obj_6uvloop_4loop_AddrInfoRequest *)__pyx_v_self), __pyx_v_loop, __pyx_v_host, __pyx_v_port, __pyx_v_family, __pyx_v_type, __pyx_v_proto, __pyx_v_flags, __pyx_v_callback);
  110581. /* function exit code */
  110582. goto __pyx_L0;
  110583. __pyx_L1_error:;
  110584. __pyx_r = -1;
  110585. __pyx_L0:;
  110586. __Pyx_RefNannyFinishContext();
  110587. return __pyx_r;
  110588. }
  110589. static int __pyx_pf_6uvloop_4loop_15AddrInfoRequest___cinit__(struct __pyx_obj_6uvloop_4loop_AddrInfoRequest *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, PyObject *__pyx_v_host, PyObject *__pyx_v_port, int __pyx_v_family, int __pyx_v_type, int __pyx_v_proto, int __pyx_v_flags, PyObject *__pyx_v_callback) {
  110590. int __pyx_v_err;
  110591. char *__pyx_v_chost;
  110592. char *__pyx_v_cport;
  110593. PyObject *__pyx_v_msg = NULL;
  110594. PyObject *__pyx_v_ex = NULL;
  110595. int __pyx_r;
  110596. __Pyx_RefNannyDeclarations
  110597. int __pyx_t_1;
  110598. int __pyx_t_2;
  110599. char *__pyx_t_3;
  110600. PyObject *__pyx_t_4 = NULL;
  110601. char const *__pyx_t_5;
  110602. PyObject *__pyx_t_6 = NULL;
  110603. PyObject *__pyx_t_7 = NULL;
  110604. PyObject *__pyx_t_8 = NULL;
  110605. int __pyx_t_9;
  110606. PyObject *__pyx_t_10 = NULL;
  110607. __Pyx_RefNannySetupContext("__cinit__", 0);
  110608. /* "uvloop/dns.pyx":307
  110609. * char *cport
  110610. *
  110611. * if host is None: # <<<<<<<<<<<<<<
  110612. * chost = NULL
  110613. * else:
  110614. */
  110615. __pyx_t_1 = (__pyx_v_host == ((PyObject*)Py_None));
  110616. __pyx_t_2 = (__pyx_t_1 != 0);
  110617. if (__pyx_t_2) {
  110618. /* "uvloop/dns.pyx":308
  110619. *
  110620. * if host is None:
  110621. * chost = NULL # <<<<<<<<<<<<<<
  110622. * else:
  110623. * chost = <char*>host
  110624. */
  110625. __pyx_v_chost = NULL;
  110626. /* "uvloop/dns.pyx":307
  110627. * char *cport
  110628. *
  110629. * if host is None: # <<<<<<<<<<<<<<
  110630. * chost = NULL
  110631. * else:
  110632. */
  110633. goto __pyx_L3;
  110634. }
  110635. /* "uvloop/dns.pyx":310
  110636. * chost = NULL
  110637. * else:
  110638. * chost = <char*>host # <<<<<<<<<<<<<<
  110639. *
  110640. * if port is None:
  110641. */
  110642. /*else*/ {
  110643. if (unlikely(__pyx_v_host == Py_None)) {
  110644. PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
  110645. __PYX_ERR(7, 310, __pyx_L1_error)
  110646. }
  110647. __pyx_t_3 = __Pyx_PyBytes_AsWritableString(__pyx_v_host); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(7, 310, __pyx_L1_error)
  110648. __pyx_v_chost = ((char *)__pyx_t_3);
  110649. }
  110650. __pyx_L3:;
  110651. /* "uvloop/dns.pyx":312
  110652. * chost = <char*>host
  110653. *
  110654. * if port is None: # <<<<<<<<<<<<<<
  110655. * cport = NULL
  110656. * else:
  110657. */
  110658. __pyx_t_2 = (__pyx_v_port == ((PyObject*)Py_None));
  110659. __pyx_t_1 = (__pyx_t_2 != 0);
  110660. if (__pyx_t_1) {
  110661. /* "uvloop/dns.pyx":313
  110662. *
  110663. * if port is None:
  110664. * cport = NULL # <<<<<<<<<<<<<<
  110665. * else:
  110666. * cport = <char*>port
  110667. */
  110668. __pyx_v_cport = NULL;
  110669. /* "uvloop/dns.pyx":312
  110670. * chost = <char*>host
  110671. *
  110672. * if port is None: # <<<<<<<<<<<<<<
  110673. * cport = NULL
  110674. * else:
  110675. */
  110676. goto __pyx_L4;
  110677. }
  110678. /* "uvloop/dns.pyx":315
  110679. * cport = NULL
  110680. * else:
  110681. * cport = <char*>port # <<<<<<<<<<<<<<
  110682. *
  110683. * if cport is NULL and chost is NULL:
  110684. */
  110685. /*else*/ {
  110686. if (unlikely(__pyx_v_port == Py_None)) {
  110687. PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
  110688. __PYX_ERR(7, 315, __pyx_L1_error)
  110689. }
  110690. __pyx_t_3 = __Pyx_PyBytes_AsWritableString(__pyx_v_port); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(7, 315, __pyx_L1_error)
  110691. __pyx_v_cport = ((char *)__pyx_t_3);
  110692. }
  110693. __pyx_L4:;
  110694. /* "uvloop/dns.pyx":317
  110695. * cport = <char*>port
  110696. *
  110697. * if cport is NULL and chost is NULL: # <<<<<<<<<<<<<<
  110698. * self.on_done()
  110699. * msg = system.gai_strerror(socket_EAI_NONAME).decode('utf-8')
  110700. */
  110701. __pyx_t_2 = ((__pyx_v_cport == NULL) != 0);
  110702. if (__pyx_t_2) {
  110703. } else {
  110704. __pyx_t_1 = __pyx_t_2;
  110705. goto __pyx_L6_bool_binop_done;
  110706. }
  110707. __pyx_t_2 = ((__pyx_v_chost == NULL) != 0);
  110708. __pyx_t_1 = __pyx_t_2;
  110709. __pyx_L6_bool_binop_done:;
  110710. if (__pyx_t_1) {
  110711. /* "uvloop/dns.pyx":318
  110712. *
  110713. * if cport is NULL and chost is NULL:
  110714. * self.on_done() # <<<<<<<<<<<<<<
  110715. * msg = system.gai_strerror(socket_EAI_NONAME).decode('utf-8')
  110716. * ex = socket_gaierror(socket_EAI_NONAME, msg)
  110717. */
  110718. __pyx_t_4 = ((struct __pyx_vtabstruct_6uvloop_4loop_AddrInfoRequest *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.on_done(((struct __pyx_obj_6uvloop_4loop_UVRequest *)__pyx_v_self)); if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 318, __pyx_L1_error)
  110719. __Pyx_GOTREF(__pyx_t_4);
  110720. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  110721. /* "uvloop/dns.pyx":319
  110722. * if cport is NULL and chost is NULL:
  110723. * self.on_done()
  110724. * msg = system.gai_strerror(socket_EAI_NONAME).decode('utf-8') # <<<<<<<<<<<<<<
  110725. * ex = socket_gaierror(socket_EAI_NONAME, msg)
  110726. * callback(ex)
  110727. */
  110728. __pyx_t_5 = gai_strerror(__pyx_v_6uvloop_4loop_socket_EAI_NONAME);
  110729. __pyx_t_4 = __Pyx_decode_c_string(__pyx_t_5, 0, strlen(__pyx_t_5), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 319, __pyx_L1_error)
  110730. __Pyx_GOTREF(__pyx_t_4);
  110731. __Pyx_INCREF(__pyx_t_4);
  110732. __pyx_v_msg = __pyx_t_4;
  110733. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  110734. /* "uvloop/dns.pyx":320
  110735. * self.on_done()
  110736. * msg = system.gai_strerror(socket_EAI_NONAME).decode('utf-8')
  110737. * ex = socket_gaierror(socket_EAI_NONAME, msg) # <<<<<<<<<<<<<<
  110738. * callback(ex)
  110739. * return
  110740. */
  110741. __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_6uvloop_4loop_socket_EAI_NONAME); if (unlikely(!__pyx_t_6)) __PYX_ERR(7, 320, __pyx_L1_error)
  110742. __Pyx_GOTREF(__pyx_t_6);
  110743. __Pyx_INCREF(__pyx_v_6uvloop_4loop_socket_gaierror);
  110744. __pyx_t_7 = __pyx_v_6uvloop_4loop_socket_gaierror; __pyx_t_8 = NULL;
  110745. __pyx_t_9 = 0;
  110746. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
  110747. __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
  110748. if (likely(__pyx_t_8)) {
  110749. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
  110750. __Pyx_INCREF(__pyx_t_8);
  110751. __Pyx_INCREF(function);
  110752. __Pyx_DECREF_SET(__pyx_t_7, function);
  110753. __pyx_t_9 = 1;
  110754. }
  110755. }
  110756. #if CYTHON_FAST_PYCALL
  110757. if (PyFunction_Check(__pyx_t_7)) {
  110758. PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_6, __pyx_v_msg};
  110759. __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 320, __pyx_L1_error)
  110760. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  110761. __Pyx_GOTREF(__pyx_t_4);
  110762. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  110763. } else
  110764. #endif
  110765. #if CYTHON_FAST_PYCCALL
  110766. if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
  110767. PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_6, __pyx_v_msg};
  110768. __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 320, __pyx_L1_error)
  110769. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  110770. __Pyx_GOTREF(__pyx_t_4);
  110771. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  110772. } else
  110773. #endif
  110774. {
  110775. __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(7, 320, __pyx_L1_error)
  110776. __Pyx_GOTREF(__pyx_t_10);
  110777. if (__pyx_t_8) {
  110778. __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL;
  110779. }
  110780. __Pyx_GIVEREF(__pyx_t_6);
  110781. PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_t_6);
  110782. __Pyx_INCREF(__pyx_v_msg);
  110783. __Pyx_GIVEREF(__pyx_v_msg);
  110784. PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_v_msg);
  110785. __pyx_t_6 = 0;
  110786. __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 320, __pyx_L1_error)
  110787. __Pyx_GOTREF(__pyx_t_4);
  110788. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  110789. }
  110790. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  110791. __pyx_v_ex = __pyx_t_4;
  110792. __pyx_t_4 = 0;
  110793. /* "uvloop/dns.pyx":321
  110794. * msg = system.gai_strerror(socket_EAI_NONAME).decode('utf-8')
  110795. * ex = socket_gaierror(socket_EAI_NONAME, msg)
  110796. * callback(ex) # <<<<<<<<<<<<<<
  110797. * return
  110798. *
  110799. */
  110800. __Pyx_INCREF(__pyx_v_callback);
  110801. __pyx_t_7 = __pyx_v_callback; __pyx_t_10 = NULL;
  110802. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
  110803. __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_7);
  110804. if (likely(__pyx_t_10)) {
  110805. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
  110806. __Pyx_INCREF(__pyx_t_10);
  110807. __Pyx_INCREF(function);
  110808. __Pyx_DECREF_SET(__pyx_t_7, function);
  110809. }
  110810. }
  110811. __pyx_t_4 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_10, __pyx_v_ex) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_ex);
  110812. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  110813. if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 321, __pyx_L1_error)
  110814. __Pyx_GOTREF(__pyx_t_4);
  110815. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  110816. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  110817. /* "uvloop/dns.pyx":322
  110818. * ex = socket_gaierror(socket_EAI_NONAME, msg)
  110819. * callback(ex)
  110820. * return # <<<<<<<<<<<<<<
  110821. *
  110822. * memset(&self.hints, 0, sizeof(system.addrinfo))
  110823. */
  110824. __pyx_r = 0;
  110825. goto __pyx_L0;
  110826. /* "uvloop/dns.pyx":317
  110827. * cport = <char*>port
  110828. *
  110829. * if cport is NULL and chost is NULL: # <<<<<<<<<<<<<<
  110830. * self.on_done()
  110831. * msg = system.gai_strerror(socket_EAI_NONAME).decode('utf-8')
  110832. */
  110833. }
  110834. /* "uvloop/dns.pyx":324
  110835. * return
  110836. *
  110837. * memset(&self.hints, 0, sizeof(system.addrinfo)) # <<<<<<<<<<<<<<
  110838. * self.hints.ai_flags = flags
  110839. * self.hints.ai_family = family
  110840. */
  110841. (void)(memset((&__pyx_v_self->hints), 0, (sizeof(struct addrinfo))));
  110842. /* "uvloop/dns.pyx":325
  110843. *
  110844. * memset(&self.hints, 0, sizeof(system.addrinfo))
  110845. * self.hints.ai_flags = flags # <<<<<<<<<<<<<<
  110846. * self.hints.ai_family = family
  110847. * self.hints.ai_socktype = type
  110848. */
  110849. __pyx_v_self->hints.ai_flags = __pyx_v_flags;
  110850. /* "uvloop/dns.pyx":326
  110851. * memset(&self.hints, 0, sizeof(system.addrinfo))
  110852. * self.hints.ai_flags = flags
  110853. * self.hints.ai_family = family # <<<<<<<<<<<<<<
  110854. * self.hints.ai_socktype = type
  110855. * self.hints.ai_protocol = proto
  110856. */
  110857. __pyx_v_self->hints.ai_family = __pyx_v_family;
  110858. /* "uvloop/dns.pyx":327
  110859. * self.hints.ai_flags = flags
  110860. * self.hints.ai_family = family
  110861. * self.hints.ai_socktype = type # <<<<<<<<<<<<<<
  110862. * self.hints.ai_protocol = proto
  110863. *
  110864. */
  110865. __pyx_v_self->hints.ai_socktype = __pyx_v_type;
  110866. /* "uvloop/dns.pyx":328
  110867. * self.hints.ai_family = family
  110868. * self.hints.ai_socktype = type
  110869. * self.hints.ai_protocol = proto # <<<<<<<<<<<<<<
  110870. *
  110871. * self.request = <uv.uv_req_t*> &self._req_data
  110872. */
  110873. __pyx_v_self->hints.ai_protocol = __pyx_v_proto;
  110874. /* "uvloop/dns.pyx":330
  110875. * self.hints.ai_protocol = proto
  110876. *
  110877. * self.request = <uv.uv_req_t*> &self._req_data # <<<<<<<<<<<<<<
  110878. * self.callback = callback
  110879. * self.request.data = <void*>self
  110880. */
  110881. __pyx_v_self->__pyx_base.request = ((uv_req_t *)(&__pyx_v_self->_req_data));
  110882. /* "uvloop/dns.pyx":331
  110883. *
  110884. * self.request = <uv.uv_req_t*> &self._req_data
  110885. * self.callback = callback # <<<<<<<<<<<<<<
  110886. * self.request.data = <void*>self
  110887. *
  110888. */
  110889. __Pyx_INCREF(__pyx_v_callback);
  110890. __Pyx_GIVEREF(__pyx_v_callback);
  110891. __Pyx_GOTREF(__pyx_v_self->callback);
  110892. __Pyx_DECREF(__pyx_v_self->callback);
  110893. __pyx_v_self->callback = __pyx_v_callback;
  110894. /* "uvloop/dns.pyx":332
  110895. * self.request = <uv.uv_req_t*> &self._req_data
  110896. * self.callback = callback
  110897. * self.request.data = <void*>self # <<<<<<<<<<<<<<
  110898. *
  110899. * err = uv.uv_getaddrinfo(loop.uvloop,
  110900. */
  110901. __pyx_v_self->__pyx_base.request->data = ((void *)__pyx_v_self);
  110902. /* "uvloop/dns.pyx":334
  110903. * self.request.data = <void*>self
  110904. *
  110905. * err = uv.uv_getaddrinfo(loop.uvloop, # <<<<<<<<<<<<<<
  110906. * <uv.uv_getaddrinfo_t*>self.request,
  110907. * __on_addrinfo_resolved,
  110908. */
  110909. __pyx_v_err = uv_getaddrinfo(__pyx_v_loop->uvloop, ((uv_getaddrinfo_t *)__pyx_v_self->__pyx_base.request), __pyx_f_6uvloop_4loop___on_addrinfo_resolved, __pyx_v_chost, __pyx_v_cport, (&__pyx_v_self->hints));
  110910. /* "uvloop/dns.pyx":341
  110911. * &self.hints)
  110912. *
  110913. * if err < 0: # <<<<<<<<<<<<<<
  110914. * self.on_done()
  110915. * callback(convert_error(err))
  110916. */
  110917. __pyx_t_1 = ((__pyx_v_err < 0) != 0);
  110918. if (__pyx_t_1) {
  110919. /* "uvloop/dns.pyx":342
  110920. *
  110921. * if err < 0:
  110922. * self.on_done() # <<<<<<<<<<<<<<
  110923. * callback(convert_error(err))
  110924. *
  110925. */
  110926. __pyx_t_4 = ((struct __pyx_vtabstruct_6uvloop_4loop_AddrInfoRequest *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.on_done(((struct __pyx_obj_6uvloop_4loop_UVRequest *)__pyx_v_self)); if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 342, __pyx_L1_error)
  110927. __Pyx_GOTREF(__pyx_t_4);
  110928. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  110929. /* "uvloop/dns.pyx":343
  110930. * if err < 0:
  110931. * self.on_done()
  110932. * callback(convert_error(err)) # <<<<<<<<<<<<<<
  110933. *
  110934. *
  110935. */
  110936. __pyx_t_7 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(7, 343, __pyx_L1_error)
  110937. __Pyx_GOTREF(__pyx_t_7);
  110938. __Pyx_INCREF(__pyx_v_callback);
  110939. __pyx_t_10 = __pyx_v_callback; __pyx_t_6 = NULL;
  110940. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
  110941. __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_10);
  110942. if (likely(__pyx_t_6)) {
  110943. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
  110944. __Pyx_INCREF(__pyx_t_6);
  110945. __Pyx_INCREF(function);
  110946. __Pyx_DECREF_SET(__pyx_t_10, function);
  110947. }
  110948. }
  110949. __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_10, __pyx_t_6, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_7);
  110950. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  110951. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  110952. if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 343, __pyx_L1_error)
  110953. __Pyx_GOTREF(__pyx_t_4);
  110954. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  110955. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  110956. /* "uvloop/dns.pyx":341
  110957. * &self.hints)
  110958. *
  110959. * if err < 0: # <<<<<<<<<<<<<<
  110960. * self.on_done()
  110961. * callback(convert_error(err))
  110962. */
  110963. }
  110964. /* "uvloop/dns.pyx":297
  110965. * uv.uv_getaddrinfo_t _req_data
  110966. *
  110967. * def __cinit__(self, Loop loop, # <<<<<<<<<<<<<<
  110968. * bytes host, bytes port,
  110969. * int family, int type, int proto, int flags,
  110970. */
  110971. /* function exit code */
  110972. __pyx_r = 0;
  110973. goto __pyx_L0;
  110974. __pyx_L1_error:;
  110975. __Pyx_XDECREF(__pyx_t_4);
  110976. __Pyx_XDECREF(__pyx_t_6);
  110977. __Pyx_XDECREF(__pyx_t_7);
  110978. __Pyx_XDECREF(__pyx_t_8);
  110979. __Pyx_XDECREF(__pyx_t_10);
  110980. __Pyx_AddTraceback("uvloop.loop.AddrInfoRequest.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  110981. __pyx_r = -1;
  110982. __pyx_L0:;
  110983. __Pyx_XDECREF(__pyx_v_msg);
  110984. __Pyx_XDECREF(__pyx_v_ex);
  110985. __Pyx_RefNannyFinishContext();
  110986. return __pyx_r;
  110987. }
  110988. /* "(tree fragment)":1
  110989. * def __reduce_cython__(self): # <<<<<<<<<<<<<<
  110990. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  110991. * def __setstate_cython__(self, __pyx_state):
  110992. */
  110993. /* Python wrapper */
  110994. static PyObject *__pyx_pw_6uvloop_4loop_15AddrInfoRequest_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  110995. static char __pyx_doc_6uvloop_4loop_15AddrInfoRequest_2__reduce_cython__[] = "AddrInfoRequest.__reduce_cython__(self)";
  110996. static PyObject *__pyx_pw_6uvloop_4loop_15AddrInfoRequest_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  110997. PyObject *__pyx_r = 0;
  110998. __Pyx_RefNannyDeclarations
  110999. __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  111000. __pyx_r = __pyx_pf_6uvloop_4loop_15AddrInfoRequest_2__reduce_cython__(((struct __pyx_obj_6uvloop_4loop_AddrInfoRequest *)__pyx_v_self));
  111001. /* function exit code */
  111002. __Pyx_RefNannyFinishContext();
  111003. return __pyx_r;
  111004. }
  111005. static PyObject *__pyx_pf_6uvloop_4loop_15AddrInfoRequest_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_AddrInfoRequest *__pyx_v_self) {
  111006. PyObject *__pyx_r = NULL;
  111007. __Pyx_RefNannyDeclarations
  111008. PyObject *__pyx_t_1 = NULL;
  111009. __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  111010. /* "(tree fragment)":2
  111011. * def __reduce_cython__(self):
  111012. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  111013. * def __setstate_cython__(self, __pyx_state):
  111014. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  111015. */
  111016. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__196, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 2, __pyx_L1_error)
  111017. __Pyx_GOTREF(__pyx_t_1);
  111018. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  111019. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  111020. __PYX_ERR(9, 2, __pyx_L1_error)
  111021. /* "(tree fragment)":1
  111022. * def __reduce_cython__(self): # <<<<<<<<<<<<<<
  111023. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  111024. * def __setstate_cython__(self, __pyx_state):
  111025. */
  111026. /* function exit code */
  111027. __pyx_L1_error:;
  111028. __Pyx_XDECREF(__pyx_t_1);
  111029. __Pyx_AddTraceback("uvloop.loop.AddrInfoRequest.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  111030. __pyx_r = NULL;
  111031. __Pyx_XGIVEREF(__pyx_r);
  111032. __Pyx_RefNannyFinishContext();
  111033. return __pyx_r;
  111034. }
  111035. /* "(tree fragment)":3
  111036. * def __reduce_cython__(self):
  111037. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  111038. * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
  111039. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  111040. */
  111041. /* Python wrapper */
  111042. static PyObject *__pyx_pw_6uvloop_4loop_15AddrInfoRequest_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
  111043. static char __pyx_doc_6uvloop_4loop_15AddrInfoRequest_4__setstate_cython__[] = "AddrInfoRequest.__setstate_cython__(self, __pyx_state)";
  111044. static PyObject *__pyx_pw_6uvloop_4loop_15AddrInfoRequest_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  111045. PyObject *__pyx_r = 0;
  111046. __Pyx_RefNannyDeclarations
  111047. __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  111048. __pyx_r = __pyx_pf_6uvloop_4loop_15AddrInfoRequest_4__setstate_cython__(((struct __pyx_obj_6uvloop_4loop_AddrInfoRequest *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
  111049. /* function exit code */
  111050. __Pyx_RefNannyFinishContext();
  111051. return __pyx_r;
  111052. }
  111053. static PyObject *__pyx_pf_6uvloop_4loop_15AddrInfoRequest_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_AddrInfoRequest *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  111054. PyObject *__pyx_r = NULL;
  111055. __Pyx_RefNannyDeclarations
  111056. PyObject *__pyx_t_1 = NULL;
  111057. __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  111058. /* "(tree fragment)":4
  111059. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  111060. * def __setstate_cython__(self, __pyx_state):
  111061. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  111062. */
  111063. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__197, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 4, __pyx_L1_error)
  111064. __Pyx_GOTREF(__pyx_t_1);
  111065. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  111066. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  111067. __PYX_ERR(9, 4, __pyx_L1_error)
  111068. /* "(tree fragment)":3
  111069. * def __reduce_cython__(self):
  111070. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  111071. * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
  111072. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  111073. */
  111074. /* function exit code */
  111075. __pyx_L1_error:;
  111076. __Pyx_XDECREF(__pyx_t_1);
  111077. __Pyx_AddTraceback("uvloop.loop.AddrInfoRequest.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  111078. __pyx_r = NULL;
  111079. __Pyx_XGIVEREF(__pyx_r);
  111080. __Pyx_RefNannyFinishContext();
  111081. return __pyx_r;
  111082. }
  111083. /* "uvloop/dns.pyx":351
  111084. * uv.uv_getnameinfo_t _req_data
  111085. *
  111086. * def __cinit__(self, Loop loop, callback): # <<<<<<<<<<<<<<
  111087. * self.request = <uv.uv_req_t*> &self._req_data
  111088. * self.callback = callback
  111089. */
  111090. /* Python wrapper */
  111091. static int __pyx_pw_6uvloop_4loop_15NameInfoRequest_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  111092. static int __pyx_pw_6uvloop_4loop_15NameInfoRequest_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  111093. CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop = 0;
  111094. PyObject *__pyx_v_callback = 0;
  111095. int __pyx_r;
  111096. __Pyx_RefNannyDeclarations
  111097. __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  111098. {
  111099. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_loop,&__pyx_n_s_callback,0};
  111100. PyObject* values[2] = {0,0};
  111101. if (unlikely(__pyx_kwds)) {
  111102. Py_ssize_t kw_args;
  111103. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  111104. switch (pos_args) {
  111105. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  111106. CYTHON_FALLTHROUGH;
  111107. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  111108. CYTHON_FALLTHROUGH;
  111109. case 0: break;
  111110. default: goto __pyx_L5_argtuple_error;
  111111. }
  111112. kw_args = PyDict_Size(__pyx_kwds);
  111113. switch (pos_args) {
  111114. case 0:
  111115. if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_loop)) != 0)) kw_args--;
  111116. else goto __pyx_L5_argtuple_error;
  111117. CYTHON_FALLTHROUGH;
  111118. case 1:
  111119. if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_callback)) != 0)) kw_args--;
  111120. else {
  111121. __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, 1); __PYX_ERR(7, 351, __pyx_L3_error)
  111122. }
  111123. }
  111124. if (unlikely(kw_args > 0)) {
  111125. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(7, 351, __pyx_L3_error)
  111126. }
  111127. } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
  111128. goto __pyx_L5_argtuple_error;
  111129. } else {
  111130. values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  111131. values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  111132. }
  111133. __pyx_v_loop = ((struct __pyx_obj_6uvloop_4loop_Loop *)values[0]);
  111134. __pyx_v_callback = values[1];
  111135. }
  111136. goto __pyx_L4_argument_unpacking_done;
  111137. __pyx_L5_argtuple_error:;
  111138. __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 351, __pyx_L3_error)
  111139. __pyx_L3_error:;
  111140. __Pyx_AddTraceback("uvloop.loop.NameInfoRequest.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  111141. __Pyx_RefNannyFinishContext();
  111142. return -1;
  111143. __pyx_L4_argument_unpacking_done:;
  111144. if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_loop), __pyx_ptype_6uvloop_4loop_Loop, 1, "loop", 0))) __PYX_ERR(7, 351, __pyx_L1_error)
  111145. __pyx_r = __pyx_pf_6uvloop_4loop_15NameInfoRequest___cinit__(((struct __pyx_obj_6uvloop_4loop_NameInfoRequest *)__pyx_v_self), __pyx_v_loop, __pyx_v_callback);
  111146. /* function exit code */
  111147. goto __pyx_L0;
  111148. __pyx_L1_error:;
  111149. __pyx_r = -1;
  111150. __pyx_L0:;
  111151. __Pyx_RefNannyFinishContext();
  111152. return __pyx_r;
  111153. }
  111154. static int __pyx_pf_6uvloop_4loop_15NameInfoRequest___cinit__(struct __pyx_obj_6uvloop_4loop_NameInfoRequest *__pyx_v_self, CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, PyObject *__pyx_v_callback) {
  111155. int __pyx_r;
  111156. __Pyx_RefNannyDeclarations
  111157. __Pyx_RefNannySetupContext("__cinit__", 0);
  111158. /* "uvloop/dns.pyx":352
  111159. *
  111160. * def __cinit__(self, Loop loop, callback):
  111161. * self.request = <uv.uv_req_t*> &self._req_data # <<<<<<<<<<<<<<
  111162. * self.callback = callback
  111163. * self.request.data = <void*>self
  111164. */
  111165. __pyx_v_self->__pyx_base.request = ((uv_req_t *)(&__pyx_v_self->_req_data));
  111166. /* "uvloop/dns.pyx":353
  111167. * def __cinit__(self, Loop loop, callback):
  111168. * self.request = <uv.uv_req_t*> &self._req_data
  111169. * self.callback = callback # <<<<<<<<<<<<<<
  111170. * self.request.data = <void*>self
  111171. *
  111172. */
  111173. __Pyx_INCREF(__pyx_v_callback);
  111174. __Pyx_GIVEREF(__pyx_v_callback);
  111175. __Pyx_GOTREF(__pyx_v_self->callback);
  111176. __Pyx_DECREF(__pyx_v_self->callback);
  111177. __pyx_v_self->callback = __pyx_v_callback;
  111178. /* "uvloop/dns.pyx":354
  111179. * self.request = <uv.uv_req_t*> &self._req_data
  111180. * self.callback = callback
  111181. * self.request.data = <void*>self # <<<<<<<<<<<<<<
  111182. *
  111183. * cdef query(self, system.sockaddr *addr, int flags):
  111184. */
  111185. __pyx_v_self->__pyx_base.request->data = ((void *)__pyx_v_self);
  111186. /* "uvloop/dns.pyx":351
  111187. * uv.uv_getnameinfo_t _req_data
  111188. *
  111189. * def __cinit__(self, Loop loop, callback): # <<<<<<<<<<<<<<
  111190. * self.request = <uv.uv_req_t*> &self._req_data
  111191. * self.callback = callback
  111192. */
  111193. /* function exit code */
  111194. __pyx_r = 0;
  111195. __Pyx_RefNannyFinishContext();
  111196. return __pyx_r;
  111197. }
  111198. /* "uvloop/dns.pyx":356
  111199. * self.request.data = <void*>self
  111200. *
  111201. * cdef query(self, system.sockaddr *addr, int flags): # <<<<<<<<<<<<<<
  111202. * cdef int err
  111203. * err = uv.uv_getnameinfo(self.loop.uvloop,
  111204. */
  111205. static PyObject *__pyx_f_6uvloop_4loop_15NameInfoRequest_query(struct __pyx_obj_6uvloop_4loop_NameInfoRequest *__pyx_v_self, struct sockaddr *__pyx_v_addr, int __pyx_v_flags) {
  111206. int __pyx_v_err;
  111207. PyObject *__pyx_r = NULL;
  111208. __Pyx_RefNannyDeclarations
  111209. int __pyx_t_1;
  111210. PyObject *__pyx_t_2 = NULL;
  111211. PyObject *__pyx_t_3 = NULL;
  111212. PyObject *__pyx_t_4 = NULL;
  111213. PyObject *__pyx_t_5 = NULL;
  111214. __Pyx_RefNannySetupContext("query", 0);
  111215. /* "uvloop/dns.pyx":358
  111216. * cdef query(self, system.sockaddr *addr, int flags):
  111217. * cdef int err
  111218. * err = uv.uv_getnameinfo(self.loop.uvloop, # <<<<<<<<<<<<<<
  111219. * <uv.uv_getnameinfo_t*>self.request,
  111220. * __on_nameinfo_resolved,
  111221. */
  111222. __pyx_v_err = uv_getnameinfo(__pyx_v_self->__pyx_base.loop->uvloop, ((uv_getnameinfo_t *)__pyx_v_self->__pyx_base.request), __pyx_f_6uvloop_4loop___on_nameinfo_resolved, __pyx_v_addr, __pyx_v_flags);
  111223. /* "uvloop/dns.pyx":363
  111224. * addr,
  111225. * flags)
  111226. * if err < 0: # <<<<<<<<<<<<<<
  111227. * self.on_done()
  111228. * self.callback(convert_error(err))
  111229. */
  111230. __pyx_t_1 = ((__pyx_v_err < 0) != 0);
  111231. if (__pyx_t_1) {
  111232. /* "uvloop/dns.pyx":364
  111233. * flags)
  111234. * if err < 0:
  111235. * self.on_done() # <<<<<<<<<<<<<<
  111236. * self.callback(convert_error(err))
  111237. *
  111238. */
  111239. __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_NameInfoRequest *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.on_done(((struct __pyx_obj_6uvloop_4loop_UVRequest *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 364, __pyx_L1_error)
  111240. __Pyx_GOTREF(__pyx_t_2);
  111241. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  111242. /* "uvloop/dns.pyx":365
  111243. * if err < 0:
  111244. * self.on_done()
  111245. * self.callback(convert_error(err)) # <<<<<<<<<<<<<<
  111246. *
  111247. *
  111248. */
  111249. __pyx_t_3 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 365, __pyx_L1_error)
  111250. __Pyx_GOTREF(__pyx_t_3);
  111251. __Pyx_INCREF(__pyx_v_self->callback);
  111252. __pyx_t_4 = __pyx_v_self->callback; __pyx_t_5 = NULL;
  111253. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
  111254. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
  111255. if (likely(__pyx_t_5)) {
  111256. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  111257. __Pyx_INCREF(__pyx_t_5);
  111258. __Pyx_INCREF(function);
  111259. __Pyx_DECREF_SET(__pyx_t_4, function);
  111260. }
  111261. }
  111262. __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3);
  111263. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  111264. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  111265. if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 365, __pyx_L1_error)
  111266. __Pyx_GOTREF(__pyx_t_2);
  111267. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  111268. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  111269. /* "uvloop/dns.pyx":363
  111270. * addr,
  111271. * flags)
  111272. * if err < 0: # <<<<<<<<<<<<<<
  111273. * self.on_done()
  111274. * self.callback(convert_error(err))
  111275. */
  111276. }
  111277. /* "uvloop/dns.pyx":356
  111278. * self.request.data = <void*>self
  111279. *
  111280. * cdef query(self, system.sockaddr *addr, int flags): # <<<<<<<<<<<<<<
  111281. * cdef int err
  111282. * err = uv.uv_getnameinfo(self.loop.uvloop,
  111283. */
  111284. /* function exit code */
  111285. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  111286. goto __pyx_L0;
  111287. __pyx_L1_error:;
  111288. __Pyx_XDECREF(__pyx_t_2);
  111289. __Pyx_XDECREF(__pyx_t_3);
  111290. __Pyx_XDECREF(__pyx_t_4);
  111291. __Pyx_XDECREF(__pyx_t_5);
  111292. __Pyx_AddTraceback("uvloop.loop.NameInfoRequest.query", __pyx_clineno, __pyx_lineno, __pyx_filename);
  111293. __pyx_r = 0;
  111294. __pyx_L0:;
  111295. __Pyx_XGIVEREF(__pyx_r);
  111296. __Pyx_RefNannyFinishContext();
  111297. return __pyx_r;
  111298. }
  111299. /* "(tree fragment)":1
  111300. * def __reduce_cython__(self): # <<<<<<<<<<<<<<
  111301. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  111302. * def __setstate_cython__(self, __pyx_state):
  111303. */
  111304. /* Python wrapper */
  111305. static PyObject *__pyx_pw_6uvloop_4loop_15NameInfoRequest_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  111306. static char __pyx_doc_6uvloop_4loop_15NameInfoRequest_2__reduce_cython__[] = "NameInfoRequest.__reduce_cython__(self)";
  111307. static PyObject *__pyx_pw_6uvloop_4loop_15NameInfoRequest_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  111308. PyObject *__pyx_r = 0;
  111309. __Pyx_RefNannyDeclarations
  111310. __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  111311. __pyx_r = __pyx_pf_6uvloop_4loop_15NameInfoRequest_2__reduce_cython__(((struct __pyx_obj_6uvloop_4loop_NameInfoRequest *)__pyx_v_self));
  111312. /* function exit code */
  111313. __Pyx_RefNannyFinishContext();
  111314. return __pyx_r;
  111315. }
  111316. static PyObject *__pyx_pf_6uvloop_4loop_15NameInfoRequest_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_NameInfoRequest *__pyx_v_self) {
  111317. PyObject *__pyx_r = NULL;
  111318. __Pyx_RefNannyDeclarations
  111319. PyObject *__pyx_t_1 = NULL;
  111320. __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  111321. /* "(tree fragment)":2
  111322. * def __reduce_cython__(self):
  111323. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  111324. * def __setstate_cython__(self, __pyx_state):
  111325. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  111326. */
  111327. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__198, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 2, __pyx_L1_error)
  111328. __Pyx_GOTREF(__pyx_t_1);
  111329. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  111330. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  111331. __PYX_ERR(9, 2, __pyx_L1_error)
  111332. /* "(tree fragment)":1
  111333. * def __reduce_cython__(self): # <<<<<<<<<<<<<<
  111334. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  111335. * def __setstate_cython__(self, __pyx_state):
  111336. */
  111337. /* function exit code */
  111338. __pyx_L1_error:;
  111339. __Pyx_XDECREF(__pyx_t_1);
  111340. __Pyx_AddTraceback("uvloop.loop.NameInfoRequest.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  111341. __pyx_r = NULL;
  111342. __Pyx_XGIVEREF(__pyx_r);
  111343. __Pyx_RefNannyFinishContext();
  111344. return __pyx_r;
  111345. }
  111346. /* "(tree fragment)":3
  111347. * def __reduce_cython__(self):
  111348. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  111349. * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
  111350. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  111351. */
  111352. /* Python wrapper */
  111353. static PyObject *__pyx_pw_6uvloop_4loop_15NameInfoRequest_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
  111354. static char __pyx_doc_6uvloop_4loop_15NameInfoRequest_4__setstate_cython__[] = "NameInfoRequest.__setstate_cython__(self, __pyx_state)";
  111355. static PyObject *__pyx_pw_6uvloop_4loop_15NameInfoRequest_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  111356. PyObject *__pyx_r = 0;
  111357. __Pyx_RefNannyDeclarations
  111358. __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  111359. __pyx_r = __pyx_pf_6uvloop_4loop_15NameInfoRequest_4__setstate_cython__(((struct __pyx_obj_6uvloop_4loop_NameInfoRequest *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
  111360. /* function exit code */
  111361. __Pyx_RefNannyFinishContext();
  111362. return __pyx_r;
  111363. }
  111364. static PyObject *__pyx_pf_6uvloop_4loop_15NameInfoRequest_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_NameInfoRequest *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  111365. PyObject *__pyx_r = NULL;
  111366. __Pyx_RefNannyDeclarations
  111367. PyObject *__pyx_t_1 = NULL;
  111368. __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  111369. /* "(tree fragment)":4
  111370. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  111371. * def __setstate_cython__(self, __pyx_state):
  111372. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  111373. */
  111374. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__199, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 4, __pyx_L1_error)
  111375. __Pyx_GOTREF(__pyx_t_1);
  111376. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  111377. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  111378. __PYX_ERR(9, 4, __pyx_L1_error)
  111379. /* "(tree fragment)":3
  111380. * def __reduce_cython__(self):
  111381. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  111382. * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
  111383. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  111384. */
  111385. /* function exit code */
  111386. __pyx_L1_error:;
  111387. __Pyx_XDECREF(__pyx_t_1);
  111388. __Pyx_AddTraceback("uvloop.loop.NameInfoRequest.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  111389. __pyx_r = NULL;
  111390. __Pyx_XGIVEREF(__pyx_r);
  111391. __Pyx_RefNannyFinishContext();
  111392. return __pyx_r;
  111393. }
  111394. /* "uvloop/dns.pyx":368
  111395. *
  111396. *
  111397. * cdef void __on_addrinfo_resolved(uv.uv_getaddrinfo_t *resolver, # <<<<<<<<<<<<<<
  111398. * int status, system.addrinfo *res) with gil:
  111399. *
  111400. */
  111401. static void __pyx_f_6uvloop_4loop___on_addrinfo_resolved(uv_getaddrinfo_t *__pyx_v_resolver, int __pyx_v_status, struct addrinfo *__pyx_v_res) {
  111402. struct __pyx_obj_6uvloop_4loop_AddrInfoRequest *__pyx_v_request = 0;
  111403. struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop = 0;
  111404. PyObject *__pyx_v_callback = 0;
  111405. struct __pyx_obj_6uvloop_4loop_AddrInfo *__pyx_v_ai = 0;
  111406. PyObject *__pyx_v_ex = NULL;
  111407. __Pyx_RefNannyDeclarations
  111408. int __pyx_t_1;
  111409. PyObject *__pyx_t_2 = NULL;
  111410. PyObject *__pyx_t_3 = NULL;
  111411. PyObject *__pyx_t_4 = NULL;
  111412. PyObject *__pyx_t_5 = NULL;
  111413. PyObject *__pyx_t_6 = NULL;
  111414. PyObject *__pyx_t_7 = NULL;
  111415. PyObject *__pyx_t_8 = NULL;
  111416. int __pyx_t_9;
  111417. int __pyx_t_10;
  111418. char const *__pyx_t_11;
  111419. PyObject *__pyx_t_12 = NULL;
  111420. PyObject *__pyx_t_13 = NULL;
  111421. PyObject *__pyx_t_14 = NULL;
  111422. #ifdef WITH_THREAD
  111423. PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  111424. #endif
  111425. __Pyx_RefNannySetupContext("__on_addrinfo_resolved", 0);
  111426. /* "uvloop/dns.pyx":371
  111427. * int status, system.addrinfo *res) with gil:
  111428. *
  111429. * if resolver.data is NULL: # <<<<<<<<<<<<<<
  111430. * aio_logger.error(
  111431. * 'AddrInfoRequest callback called with NULL resolver.data')
  111432. */
  111433. __pyx_t_1 = ((__pyx_v_resolver->data == NULL) != 0);
  111434. if (__pyx_t_1) {
  111435. /* "uvloop/dns.pyx":372
  111436. *
  111437. * if resolver.data is NULL:
  111438. * aio_logger.error( # <<<<<<<<<<<<<<
  111439. * 'AddrInfoRequest callback called with NULL resolver.data')
  111440. * return
  111441. */
  111442. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_6uvloop_4loop_aio_logger, __pyx_n_s_error); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 372, __pyx_L1_error)
  111443. __Pyx_GOTREF(__pyx_t_3);
  111444. __pyx_t_4 = NULL;
  111445. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
  111446. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
  111447. if (likely(__pyx_t_4)) {
  111448. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  111449. __Pyx_INCREF(__pyx_t_4);
  111450. __Pyx_INCREF(function);
  111451. __Pyx_DECREF_SET(__pyx_t_3, function);
  111452. }
  111453. }
  111454. __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_kp_u_AddrInfoRequest_callback_called) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_u_AddrInfoRequest_callback_called);
  111455. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  111456. if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 372, __pyx_L1_error)
  111457. __Pyx_GOTREF(__pyx_t_2);
  111458. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  111459. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  111460. /* "uvloop/dns.pyx":374
  111461. * aio_logger.error(
  111462. * 'AddrInfoRequest callback called with NULL resolver.data')
  111463. * return # <<<<<<<<<<<<<<
  111464. *
  111465. * cdef:
  111466. */
  111467. goto __pyx_L0;
  111468. /* "uvloop/dns.pyx":371
  111469. * int status, system.addrinfo *res) with gil:
  111470. *
  111471. * if resolver.data is NULL: # <<<<<<<<<<<<<<
  111472. * aio_logger.error(
  111473. * 'AddrInfoRequest callback called with NULL resolver.data')
  111474. */
  111475. }
  111476. /* "uvloop/dns.pyx":377
  111477. *
  111478. * cdef:
  111479. * AddrInfoRequest request = <AddrInfoRequest> resolver.data # <<<<<<<<<<<<<<
  111480. * Loop loop = request.loop
  111481. * object callback = request.callback
  111482. */
  111483. __pyx_t_2 = ((PyObject *)__pyx_v_resolver->data);
  111484. __Pyx_INCREF(__pyx_t_2);
  111485. __pyx_v_request = ((struct __pyx_obj_6uvloop_4loop_AddrInfoRequest *)__pyx_t_2);
  111486. __pyx_t_2 = 0;
  111487. /* "uvloop/dns.pyx":378
  111488. * cdef:
  111489. * AddrInfoRequest request = <AddrInfoRequest> resolver.data
  111490. * Loop loop = request.loop # <<<<<<<<<<<<<<
  111491. * object callback = request.callback
  111492. * AddrInfo ai
  111493. */
  111494. __pyx_t_2 = ((PyObject *)__pyx_v_request->__pyx_base.loop);
  111495. __Pyx_INCREF(__pyx_t_2);
  111496. __pyx_v_loop = ((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_t_2);
  111497. __pyx_t_2 = 0;
  111498. /* "uvloop/dns.pyx":379
  111499. * AddrInfoRequest request = <AddrInfoRequest> resolver.data
  111500. * Loop loop = request.loop
  111501. * object callback = request.callback # <<<<<<<<<<<<<<
  111502. * AddrInfo ai
  111503. *
  111504. */
  111505. __pyx_t_2 = __pyx_v_request->callback;
  111506. __Pyx_INCREF(__pyx_t_2);
  111507. __pyx_v_callback = __pyx_t_2;
  111508. __pyx_t_2 = 0;
  111509. /* "uvloop/dns.pyx":382
  111510. * AddrInfo ai
  111511. *
  111512. * try: # <<<<<<<<<<<<<<
  111513. * if status < 0:
  111514. * callback(convert_error(status))
  111515. */
  111516. /*try:*/ {
  111517. {
  111518. __Pyx_PyThreadState_declare
  111519. __Pyx_PyThreadState_assign
  111520. __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7);
  111521. __Pyx_XGOTREF(__pyx_t_5);
  111522. __Pyx_XGOTREF(__pyx_t_6);
  111523. __Pyx_XGOTREF(__pyx_t_7);
  111524. /*try:*/ {
  111525. /* "uvloop/dns.pyx":383
  111526. *
  111527. * try:
  111528. * if status < 0: # <<<<<<<<<<<<<<
  111529. * callback(convert_error(status))
  111530. * else:
  111531. */
  111532. __pyx_t_1 = ((__pyx_v_status < 0) != 0);
  111533. if (__pyx_t_1) {
  111534. /* "uvloop/dns.pyx":384
  111535. * try:
  111536. * if status < 0:
  111537. * callback(convert_error(status)) # <<<<<<<<<<<<<<
  111538. * else:
  111539. * ai = AddrInfo()
  111540. */
  111541. __pyx_t_3 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_status); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 384, __pyx_L7_error)
  111542. __Pyx_GOTREF(__pyx_t_3);
  111543. __Pyx_INCREF(__pyx_v_callback);
  111544. __pyx_t_4 = __pyx_v_callback; __pyx_t_8 = NULL;
  111545. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
  111546. __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
  111547. if (likely(__pyx_t_8)) {
  111548. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  111549. __Pyx_INCREF(__pyx_t_8);
  111550. __Pyx_INCREF(function);
  111551. __Pyx_DECREF_SET(__pyx_t_4, function);
  111552. }
  111553. }
  111554. __pyx_t_2 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_8, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3);
  111555. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  111556. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  111557. if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 384, __pyx_L7_error)
  111558. __Pyx_GOTREF(__pyx_t_2);
  111559. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  111560. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  111561. /* "uvloop/dns.pyx":383
  111562. *
  111563. * try:
  111564. * if status < 0: # <<<<<<<<<<<<<<
  111565. * callback(convert_error(status))
  111566. * else:
  111567. */
  111568. goto __pyx_L13;
  111569. }
  111570. /* "uvloop/dns.pyx":386
  111571. * callback(convert_error(status))
  111572. * else:
  111573. * ai = AddrInfo() # <<<<<<<<<<<<<<
  111574. * ai.set_data(res)
  111575. * callback(ai)
  111576. */
  111577. /*else*/ {
  111578. __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_6uvloop_4loop_AddrInfo)); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 386, __pyx_L7_error)
  111579. __Pyx_GOTREF(__pyx_t_2);
  111580. __pyx_v_ai = ((struct __pyx_obj_6uvloop_4loop_AddrInfo *)__pyx_t_2);
  111581. __pyx_t_2 = 0;
  111582. /* "uvloop/dns.pyx":387
  111583. * else:
  111584. * ai = AddrInfo()
  111585. * ai.set_data(res) # <<<<<<<<<<<<<<
  111586. * callback(ai)
  111587. * except Exception as ex:
  111588. */
  111589. ((struct __pyx_vtabstruct_6uvloop_4loop_AddrInfo *)__pyx_v_ai->__pyx_vtab)->set_data(__pyx_v_ai, __pyx_v_res);
  111590. /* "uvloop/dns.pyx":388
  111591. * ai = AddrInfo()
  111592. * ai.set_data(res)
  111593. * callback(ai) # <<<<<<<<<<<<<<
  111594. * except Exception as ex:
  111595. * loop._handle_exception(ex)
  111596. */
  111597. __Pyx_INCREF(__pyx_v_callback);
  111598. __pyx_t_4 = __pyx_v_callback; __pyx_t_3 = NULL;
  111599. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
  111600. __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
  111601. if (likely(__pyx_t_3)) {
  111602. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  111603. __Pyx_INCREF(__pyx_t_3);
  111604. __Pyx_INCREF(function);
  111605. __Pyx_DECREF_SET(__pyx_t_4, function);
  111606. }
  111607. }
  111608. __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_3, ((PyObject *)__pyx_v_ai)) : __Pyx_PyObject_CallOneArg(__pyx_t_4, ((PyObject *)__pyx_v_ai));
  111609. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  111610. if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 388, __pyx_L7_error)
  111611. __Pyx_GOTREF(__pyx_t_2);
  111612. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  111613. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  111614. }
  111615. __pyx_L13:;
  111616. /* "uvloop/dns.pyx":382
  111617. * AddrInfo ai
  111618. *
  111619. * try: # <<<<<<<<<<<<<<
  111620. * if status < 0:
  111621. * callback(convert_error(status))
  111622. */
  111623. }
  111624. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  111625. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  111626. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  111627. goto __pyx_L12_try_end;
  111628. __pyx_L7_error:;
  111629. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  111630. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  111631. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  111632. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  111633. /* "uvloop/dns.pyx":389
  111634. * ai.set_data(res)
  111635. * callback(ai)
  111636. * except Exception as ex: # <<<<<<<<<<<<<<
  111637. * loop._handle_exception(ex)
  111638. * finally:
  111639. */
  111640. __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
  111641. if (__pyx_t_9) {
  111642. __Pyx_AddTraceback("uvloop.loop.__on_addrinfo_resolved", __pyx_clineno, __pyx_lineno, __pyx_filename);
  111643. if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_4, &__pyx_t_3) < 0) __PYX_ERR(7, 389, __pyx_L9_except_error)
  111644. __Pyx_GOTREF(__pyx_t_2);
  111645. __Pyx_GOTREF(__pyx_t_4);
  111646. __Pyx_GOTREF(__pyx_t_3);
  111647. __Pyx_INCREF(__pyx_t_4);
  111648. __pyx_v_ex = __pyx_t_4;
  111649. /*try:*/ {
  111650. /* "uvloop/dns.pyx":390
  111651. * callback(ai)
  111652. * except Exception as ex:
  111653. * loop._handle_exception(ex) # <<<<<<<<<<<<<<
  111654. * finally:
  111655. * request.on_done()
  111656. */
  111657. ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_loop->__pyx_vtab)->_handle_exception(__pyx_v_loop, __pyx_v_ex);
  111658. }
  111659. /* "uvloop/dns.pyx":389
  111660. * ai.set_data(res)
  111661. * callback(ai)
  111662. * except Exception as ex: # <<<<<<<<<<<<<<
  111663. * loop._handle_exception(ex)
  111664. * finally:
  111665. */
  111666. /*finally:*/ {
  111667. /*normal exit:*/{
  111668. __Pyx_DECREF(__pyx_v_ex);
  111669. __pyx_v_ex = NULL;
  111670. goto __pyx_L20;
  111671. }
  111672. __pyx_L20:;
  111673. }
  111674. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  111675. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  111676. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  111677. goto __pyx_L8_exception_handled;
  111678. }
  111679. goto __pyx_L9_except_error;
  111680. __pyx_L9_except_error:;
  111681. /* "uvloop/dns.pyx":382
  111682. * AddrInfo ai
  111683. *
  111684. * try: # <<<<<<<<<<<<<<
  111685. * if status < 0:
  111686. * callback(convert_error(status))
  111687. */
  111688. __Pyx_XGIVEREF(__pyx_t_5);
  111689. __Pyx_XGIVEREF(__pyx_t_6);
  111690. __Pyx_XGIVEREF(__pyx_t_7);
  111691. __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
  111692. goto __pyx_L5_error;
  111693. __pyx_L8_exception_handled:;
  111694. __Pyx_XGIVEREF(__pyx_t_5);
  111695. __Pyx_XGIVEREF(__pyx_t_6);
  111696. __Pyx_XGIVEREF(__pyx_t_7);
  111697. __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
  111698. __pyx_L12_try_end:;
  111699. }
  111700. }
  111701. /* "uvloop/dns.pyx":392
  111702. * loop._handle_exception(ex)
  111703. * finally:
  111704. * request.on_done() # <<<<<<<<<<<<<<
  111705. *
  111706. *
  111707. */
  111708. /*finally:*/ {
  111709. /*normal exit:*/{
  111710. __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_AddrInfoRequest *)__pyx_v_request->__pyx_base.__pyx_vtab)->__pyx_base.on_done(((struct __pyx_obj_6uvloop_4loop_UVRequest *)__pyx_v_request)); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 392, __pyx_L1_error)
  111711. __Pyx_GOTREF(__pyx_t_3);
  111712. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  111713. goto __pyx_L6;
  111714. }
  111715. __pyx_L5_error:;
  111716. /*exception exit:*/{
  111717. __Pyx_PyThreadState_declare
  111718. __Pyx_PyThreadState_assign
  111719. __pyx_t_7 = 0; __pyx_t_6 = 0; __pyx_t_5 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0;
  111720. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  111721. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  111722. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  111723. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  111724. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
  111725. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_7, &__pyx_t_6, &__pyx_t_5) < 0)) __Pyx_ErrFetch(&__pyx_t_7, &__pyx_t_6, &__pyx_t_5);
  111726. __Pyx_XGOTREF(__pyx_t_7);
  111727. __Pyx_XGOTREF(__pyx_t_6);
  111728. __Pyx_XGOTREF(__pyx_t_5);
  111729. __Pyx_XGOTREF(__pyx_t_12);
  111730. __Pyx_XGOTREF(__pyx_t_13);
  111731. __Pyx_XGOTREF(__pyx_t_14);
  111732. __pyx_t_9 = __pyx_lineno; __pyx_t_10 = __pyx_clineno; __pyx_t_11 = __pyx_filename;
  111733. {
  111734. __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_AddrInfoRequest *)__pyx_v_request->__pyx_base.__pyx_vtab)->__pyx_base.on_done(((struct __pyx_obj_6uvloop_4loop_UVRequest *)__pyx_v_request)); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 392, __pyx_L22_error)
  111735. __Pyx_GOTREF(__pyx_t_3);
  111736. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  111737. }
  111738. if (PY_MAJOR_VERSION >= 3) {
  111739. __Pyx_XGIVEREF(__pyx_t_12);
  111740. __Pyx_XGIVEREF(__pyx_t_13);
  111741. __Pyx_XGIVEREF(__pyx_t_14);
  111742. __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
  111743. }
  111744. __Pyx_XGIVEREF(__pyx_t_7);
  111745. __Pyx_XGIVEREF(__pyx_t_6);
  111746. __Pyx_XGIVEREF(__pyx_t_5);
  111747. __Pyx_ErrRestore(__pyx_t_7, __pyx_t_6, __pyx_t_5);
  111748. __pyx_t_7 = 0; __pyx_t_6 = 0; __pyx_t_5 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0;
  111749. __pyx_lineno = __pyx_t_9; __pyx_clineno = __pyx_t_10; __pyx_filename = __pyx_t_11;
  111750. goto __pyx_L1_error;
  111751. __pyx_L22_error:;
  111752. if (PY_MAJOR_VERSION >= 3) {
  111753. __Pyx_XGIVEREF(__pyx_t_12);
  111754. __Pyx_XGIVEREF(__pyx_t_13);
  111755. __Pyx_XGIVEREF(__pyx_t_14);
  111756. __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
  111757. }
  111758. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  111759. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  111760. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  111761. __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0;
  111762. goto __pyx_L1_error;
  111763. }
  111764. __pyx_L6:;
  111765. }
  111766. /* "uvloop/dns.pyx":368
  111767. *
  111768. *
  111769. * cdef void __on_addrinfo_resolved(uv.uv_getaddrinfo_t *resolver, # <<<<<<<<<<<<<<
  111770. * int status, system.addrinfo *res) with gil:
  111771. *
  111772. */
  111773. /* function exit code */
  111774. goto __pyx_L0;
  111775. __pyx_L1_error:;
  111776. __Pyx_XDECREF(__pyx_t_2);
  111777. __Pyx_XDECREF(__pyx_t_3);
  111778. __Pyx_XDECREF(__pyx_t_4);
  111779. __Pyx_XDECREF(__pyx_t_8);
  111780. __Pyx_WriteUnraisable("uvloop.loop.__on_addrinfo_resolved", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  111781. __pyx_L0:;
  111782. __Pyx_XDECREF((PyObject *)__pyx_v_request);
  111783. __Pyx_XDECREF((PyObject *)__pyx_v_loop);
  111784. __Pyx_XDECREF(__pyx_v_callback);
  111785. __Pyx_XDECREF((PyObject *)__pyx_v_ai);
  111786. __Pyx_XDECREF(__pyx_v_ex);
  111787. __Pyx_RefNannyFinishContext();
  111788. #ifdef WITH_THREAD
  111789. __Pyx_PyGILState_Release(__pyx_gilstate_save);
  111790. #endif
  111791. }
  111792. /* "uvloop/dns.pyx":395
  111793. *
  111794. *
  111795. * cdef void __on_nameinfo_resolved(uv.uv_getnameinfo_t* req, # <<<<<<<<<<<<<<
  111796. * int status,
  111797. * const char* hostname,
  111798. */
  111799. static void __pyx_f_6uvloop_4loop___on_nameinfo_resolved(uv_getnameinfo_t *__pyx_v_req, int __pyx_v_status, char const *__pyx_v_hostname, char const *__pyx_v_service) {
  111800. struct __pyx_obj_6uvloop_4loop_NameInfoRequest *__pyx_v_request = 0;
  111801. struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop = 0;
  111802. PyObject *__pyx_v_callback = 0;
  111803. PyObject *__pyx_v_ex = NULL;
  111804. __Pyx_RefNannyDeclarations
  111805. PyObject *__pyx_t_1 = NULL;
  111806. PyObject *__pyx_t_2 = NULL;
  111807. PyObject *__pyx_t_3 = NULL;
  111808. PyObject *__pyx_t_4 = NULL;
  111809. int __pyx_t_5;
  111810. PyObject *__pyx_t_6 = NULL;
  111811. PyObject *__pyx_t_7 = NULL;
  111812. PyObject *__pyx_t_8 = NULL;
  111813. int __pyx_t_9;
  111814. int __pyx_t_10;
  111815. char const *__pyx_t_11;
  111816. PyObject *__pyx_t_12 = NULL;
  111817. PyObject *__pyx_t_13 = NULL;
  111818. PyObject *__pyx_t_14 = NULL;
  111819. #ifdef WITH_THREAD
  111820. PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  111821. #endif
  111822. __Pyx_RefNannySetupContext("__on_nameinfo_resolved", 0);
  111823. /* "uvloop/dns.pyx":400
  111824. * const char* service) with gil:
  111825. * cdef:
  111826. * NameInfoRequest request = <NameInfoRequest> req.data # <<<<<<<<<<<<<<
  111827. * Loop loop = request.loop
  111828. * object callback = request.callback
  111829. */
  111830. __pyx_t_1 = ((PyObject *)__pyx_v_req->data);
  111831. __Pyx_INCREF(__pyx_t_1);
  111832. __pyx_v_request = ((struct __pyx_obj_6uvloop_4loop_NameInfoRequest *)__pyx_t_1);
  111833. __pyx_t_1 = 0;
  111834. /* "uvloop/dns.pyx":401
  111835. * cdef:
  111836. * NameInfoRequest request = <NameInfoRequest> req.data
  111837. * Loop loop = request.loop # <<<<<<<<<<<<<<
  111838. * object callback = request.callback
  111839. *
  111840. */
  111841. __pyx_t_1 = ((PyObject *)__pyx_v_request->__pyx_base.loop);
  111842. __Pyx_INCREF(__pyx_t_1);
  111843. __pyx_v_loop = ((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_t_1);
  111844. __pyx_t_1 = 0;
  111845. /* "uvloop/dns.pyx":402
  111846. * NameInfoRequest request = <NameInfoRequest> req.data
  111847. * Loop loop = request.loop
  111848. * object callback = request.callback # <<<<<<<<<<<<<<
  111849. *
  111850. * try:
  111851. */
  111852. __pyx_t_1 = __pyx_v_request->callback;
  111853. __Pyx_INCREF(__pyx_t_1);
  111854. __pyx_v_callback = __pyx_t_1;
  111855. __pyx_t_1 = 0;
  111856. /* "uvloop/dns.pyx":404
  111857. * object callback = request.callback
  111858. *
  111859. * try: # <<<<<<<<<<<<<<
  111860. * if status < 0:
  111861. * callback(convert_error(status))
  111862. */
  111863. /*try:*/ {
  111864. {
  111865. __Pyx_PyThreadState_declare
  111866. __Pyx_PyThreadState_assign
  111867. __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
  111868. __Pyx_XGOTREF(__pyx_t_2);
  111869. __Pyx_XGOTREF(__pyx_t_3);
  111870. __Pyx_XGOTREF(__pyx_t_4);
  111871. /*try:*/ {
  111872. /* "uvloop/dns.pyx":405
  111873. *
  111874. * try:
  111875. * if status < 0: # <<<<<<<<<<<<<<
  111876. * callback(convert_error(status))
  111877. * else:
  111878. */
  111879. __pyx_t_5 = ((__pyx_v_status < 0) != 0);
  111880. if (__pyx_t_5) {
  111881. /* "uvloop/dns.pyx":406
  111882. * try:
  111883. * if status < 0:
  111884. * callback(convert_error(status)) # <<<<<<<<<<<<<<
  111885. * else:
  111886. * callback(((<bytes>hostname).decode(),
  111887. */
  111888. __pyx_t_6 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_status); if (unlikely(!__pyx_t_6)) __PYX_ERR(7, 406, __pyx_L6_error)
  111889. __Pyx_GOTREF(__pyx_t_6);
  111890. __Pyx_INCREF(__pyx_v_callback);
  111891. __pyx_t_7 = __pyx_v_callback; __pyx_t_8 = NULL;
  111892. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
  111893. __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
  111894. if (likely(__pyx_t_8)) {
  111895. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
  111896. __Pyx_INCREF(__pyx_t_8);
  111897. __Pyx_INCREF(function);
  111898. __Pyx_DECREF_SET(__pyx_t_7, function);
  111899. }
  111900. }
  111901. __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
  111902. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  111903. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  111904. if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 406, __pyx_L6_error)
  111905. __Pyx_GOTREF(__pyx_t_1);
  111906. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  111907. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  111908. /* "uvloop/dns.pyx":405
  111909. *
  111910. * try:
  111911. * if status < 0: # <<<<<<<<<<<<<<
  111912. * callback(convert_error(status))
  111913. * else:
  111914. */
  111915. goto __pyx_L12;
  111916. }
  111917. /* "uvloop/dns.pyx":408
  111918. * callback(convert_error(status))
  111919. * else:
  111920. * callback(((<bytes>hostname).decode(), # <<<<<<<<<<<<<<
  111921. * (<bytes>service).decode()))
  111922. * except Exception as ex:
  111923. */
  111924. /*else*/ {
  111925. __pyx_t_7 = __Pyx_PyBytes_FromString(__pyx_v_hostname); if (unlikely(!__pyx_t_7)) __PYX_ERR(7, 408, __pyx_L6_error)
  111926. __Pyx_GOTREF(__pyx_t_7);
  111927. if (unlikely(__pyx_t_7 == Py_None)) {
  111928. PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode");
  111929. __PYX_ERR(7, 408, __pyx_L6_error)
  111930. }
  111931. __pyx_t_6 = __Pyx_decode_bytes(((PyObject*)__pyx_t_7), 0, PY_SSIZE_T_MAX, NULL, NULL, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(7, 408, __pyx_L6_error)
  111932. __Pyx_GOTREF(__pyx_t_6);
  111933. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  111934. /* "uvloop/dns.pyx":409
  111935. * else:
  111936. * callback(((<bytes>hostname).decode(),
  111937. * (<bytes>service).decode())) # <<<<<<<<<<<<<<
  111938. * except Exception as ex:
  111939. * loop._handle_exception(ex)
  111940. */
  111941. __pyx_t_7 = __Pyx_PyBytes_FromString(__pyx_v_service); if (unlikely(!__pyx_t_7)) __PYX_ERR(7, 409, __pyx_L6_error)
  111942. __Pyx_GOTREF(__pyx_t_7);
  111943. if (unlikely(__pyx_t_7 == Py_None)) {
  111944. PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode");
  111945. __PYX_ERR(7, 409, __pyx_L6_error)
  111946. }
  111947. __pyx_t_8 = __Pyx_decode_bytes(((PyObject*)__pyx_t_7), 0, PY_SSIZE_T_MAX, NULL, NULL, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(7, 409, __pyx_L6_error)
  111948. __Pyx_GOTREF(__pyx_t_8);
  111949. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  111950. /* "uvloop/dns.pyx":408
  111951. * callback(convert_error(status))
  111952. * else:
  111953. * callback(((<bytes>hostname).decode(), # <<<<<<<<<<<<<<
  111954. * (<bytes>service).decode()))
  111955. * except Exception as ex:
  111956. */
  111957. __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(7, 408, __pyx_L6_error)
  111958. __Pyx_GOTREF(__pyx_t_7);
  111959. __Pyx_GIVEREF(__pyx_t_6);
  111960. PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6);
  111961. __Pyx_GIVEREF(__pyx_t_8);
  111962. PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_8);
  111963. __pyx_t_6 = 0;
  111964. __pyx_t_8 = 0;
  111965. __Pyx_INCREF(__pyx_v_callback);
  111966. __pyx_t_8 = __pyx_v_callback; __pyx_t_6 = NULL;
  111967. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
  111968. __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8);
  111969. if (likely(__pyx_t_6)) {
  111970. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
  111971. __Pyx_INCREF(__pyx_t_6);
  111972. __Pyx_INCREF(function);
  111973. __Pyx_DECREF_SET(__pyx_t_8, function);
  111974. }
  111975. }
  111976. __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_6, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7);
  111977. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  111978. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  111979. if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 408, __pyx_L6_error)
  111980. __Pyx_GOTREF(__pyx_t_1);
  111981. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  111982. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  111983. }
  111984. __pyx_L12:;
  111985. /* "uvloop/dns.pyx":404
  111986. * object callback = request.callback
  111987. *
  111988. * try: # <<<<<<<<<<<<<<
  111989. * if status < 0:
  111990. * callback(convert_error(status))
  111991. */
  111992. }
  111993. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  111994. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  111995. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  111996. goto __pyx_L11_try_end;
  111997. __pyx_L6_error:;
  111998. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  111999. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  112000. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  112001. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  112002. /* "uvloop/dns.pyx":410
  112003. * callback(((<bytes>hostname).decode(),
  112004. * (<bytes>service).decode()))
  112005. * except Exception as ex: # <<<<<<<<<<<<<<
  112006. * loop._handle_exception(ex)
  112007. * finally:
  112008. */
  112009. __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
  112010. if (__pyx_t_9) {
  112011. __Pyx_AddTraceback("uvloop.loop.__on_nameinfo_resolved", __pyx_clineno, __pyx_lineno, __pyx_filename);
  112012. if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_8, &__pyx_t_7) < 0) __PYX_ERR(7, 410, __pyx_L8_except_error)
  112013. __Pyx_GOTREF(__pyx_t_1);
  112014. __Pyx_GOTREF(__pyx_t_8);
  112015. __Pyx_GOTREF(__pyx_t_7);
  112016. __Pyx_INCREF(__pyx_t_8);
  112017. __pyx_v_ex = __pyx_t_8;
  112018. /*try:*/ {
  112019. /* "uvloop/dns.pyx":411
  112020. * (<bytes>service).decode()))
  112021. * except Exception as ex:
  112022. * loop._handle_exception(ex) # <<<<<<<<<<<<<<
  112023. * finally:
  112024. * request.on_done()
  112025. */
  112026. ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_loop->__pyx_vtab)->_handle_exception(__pyx_v_loop, __pyx_v_ex);
  112027. }
  112028. /* "uvloop/dns.pyx":410
  112029. * callback(((<bytes>hostname).decode(),
  112030. * (<bytes>service).decode()))
  112031. * except Exception as ex: # <<<<<<<<<<<<<<
  112032. * loop._handle_exception(ex)
  112033. * finally:
  112034. */
  112035. /*finally:*/ {
  112036. /*normal exit:*/{
  112037. __Pyx_DECREF(__pyx_v_ex);
  112038. __pyx_v_ex = NULL;
  112039. goto __pyx_L19;
  112040. }
  112041. __pyx_L19:;
  112042. }
  112043. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  112044. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  112045. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  112046. goto __pyx_L7_exception_handled;
  112047. }
  112048. goto __pyx_L8_except_error;
  112049. __pyx_L8_except_error:;
  112050. /* "uvloop/dns.pyx":404
  112051. * object callback = request.callback
  112052. *
  112053. * try: # <<<<<<<<<<<<<<
  112054. * if status < 0:
  112055. * callback(convert_error(status))
  112056. */
  112057. __Pyx_XGIVEREF(__pyx_t_2);
  112058. __Pyx_XGIVEREF(__pyx_t_3);
  112059. __Pyx_XGIVEREF(__pyx_t_4);
  112060. __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
  112061. goto __pyx_L4_error;
  112062. __pyx_L7_exception_handled:;
  112063. __Pyx_XGIVEREF(__pyx_t_2);
  112064. __Pyx_XGIVEREF(__pyx_t_3);
  112065. __Pyx_XGIVEREF(__pyx_t_4);
  112066. __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
  112067. __pyx_L11_try_end:;
  112068. }
  112069. }
  112070. /* "uvloop/dns.pyx":413
  112071. * loop._handle_exception(ex)
  112072. * finally:
  112073. * request.on_done() # <<<<<<<<<<<<<<
  112074. */
  112075. /*finally:*/ {
  112076. /*normal exit:*/{
  112077. __pyx_t_7 = ((struct __pyx_vtabstruct_6uvloop_4loop_NameInfoRequest *)__pyx_v_request->__pyx_base.__pyx_vtab)->__pyx_base.on_done(((struct __pyx_obj_6uvloop_4loop_UVRequest *)__pyx_v_request)); if (unlikely(!__pyx_t_7)) __PYX_ERR(7, 413, __pyx_L1_error)
  112078. __Pyx_GOTREF(__pyx_t_7);
  112079. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  112080. goto __pyx_L5;
  112081. }
  112082. __pyx_L4_error:;
  112083. /*exception exit:*/{
  112084. __Pyx_PyThreadState_declare
  112085. __Pyx_PyThreadState_assign
  112086. __pyx_t_4 = 0; __pyx_t_3 = 0; __pyx_t_2 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0;
  112087. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  112088. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  112089. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  112090. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  112091. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
  112092. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2) < 0)) __Pyx_ErrFetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2);
  112093. __Pyx_XGOTREF(__pyx_t_4);
  112094. __Pyx_XGOTREF(__pyx_t_3);
  112095. __Pyx_XGOTREF(__pyx_t_2);
  112096. __Pyx_XGOTREF(__pyx_t_12);
  112097. __Pyx_XGOTREF(__pyx_t_13);
  112098. __Pyx_XGOTREF(__pyx_t_14);
  112099. __pyx_t_9 = __pyx_lineno; __pyx_t_10 = __pyx_clineno; __pyx_t_11 = __pyx_filename;
  112100. {
  112101. __pyx_t_7 = ((struct __pyx_vtabstruct_6uvloop_4loop_NameInfoRequest *)__pyx_v_request->__pyx_base.__pyx_vtab)->__pyx_base.on_done(((struct __pyx_obj_6uvloop_4loop_UVRequest *)__pyx_v_request)); if (unlikely(!__pyx_t_7)) __PYX_ERR(7, 413, __pyx_L21_error)
  112102. __Pyx_GOTREF(__pyx_t_7);
  112103. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  112104. }
  112105. if (PY_MAJOR_VERSION >= 3) {
  112106. __Pyx_XGIVEREF(__pyx_t_12);
  112107. __Pyx_XGIVEREF(__pyx_t_13);
  112108. __Pyx_XGIVEREF(__pyx_t_14);
  112109. __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
  112110. }
  112111. __Pyx_XGIVEREF(__pyx_t_4);
  112112. __Pyx_XGIVEREF(__pyx_t_3);
  112113. __Pyx_XGIVEREF(__pyx_t_2);
  112114. __Pyx_ErrRestore(__pyx_t_4, __pyx_t_3, __pyx_t_2);
  112115. __pyx_t_4 = 0; __pyx_t_3 = 0; __pyx_t_2 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0;
  112116. __pyx_lineno = __pyx_t_9; __pyx_clineno = __pyx_t_10; __pyx_filename = __pyx_t_11;
  112117. goto __pyx_L1_error;
  112118. __pyx_L21_error:;
  112119. if (PY_MAJOR_VERSION >= 3) {
  112120. __Pyx_XGIVEREF(__pyx_t_12);
  112121. __Pyx_XGIVEREF(__pyx_t_13);
  112122. __Pyx_XGIVEREF(__pyx_t_14);
  112123. __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
  112124. }
  112125. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  112126. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  112127. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  112128. __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0;
  112129. goto __pyx_L1_error;
  112130. }
  112131. __pyx_L5:;
  112132. }
  112133. /* "uvloop/dns.pyx":395
  112134. *
  112135. *
  112136. * cdef void __on_nameinfo_resolved(uv.uv_getnameinfo_t* req, # <<<<<<<<<<<<<<
  112137. * int status,
  112138. * const char* hostname,
  112139. */
  112140. /* function exit code */
  112141. goto __pyx_L0;
  112142. __pyx_L1_error:;
  112143. __Pyx_XDECREF(__pyx_t_1);
  112144. __Pyx_XDECREF(__pyx_t_6);
  112145. __Pyx_XDECREF(__pyx_t_7);
  112146. __Pyx_XDECREF(__pyx_t_8);
  112147. __Pyx_WriteUnraisable("uvloop.loop.__on_nameinfo_resolved", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  112148. __pyx_L0:;
  112149. __Pyx_XDECREF((PyObject *)__pyx_v_request);
  112150. __Pyx_XDECREF((PyObject *)__pyx_v_loop);
  112151. __Pyx_XDECREF(__pyx_v_callback);
  112152. __Pyx_XDECREF(__pyx_v_ex);
  112153. __Pyx_RefNannyFinishContext();
  112154. #ifdef WITH_THREAD
  112155. __Pyx_PyGILState_Release(__pyx_gilstate_save);
  112156. #endif
  112157. }
  112158. /* "uvloop/sslproto.pyx":1
  112159. * cdef _create_transport_context(server_side, server_hostname): # <<<<<<<<<<<<<<
  112160. * if server_side:
  112161. * raise ValueError('Server side SSL needs a valid SSLContext')
  112162. */
  112163. static PyObject *__pyx_f_6uvloop_4loop__create_transport_context(PyObject *__pyx_v_server_side, PyObject *__pyx_v_server_hostname) {
  112164. PyObject *__pyx_v_sslcontext = NULL;
  112165. PyObject *__pyx_r = NULL;
  112166. __Pyx_RefNannyDeclarations
  112167. int __pyx_t_1;
  112168. PyObject *__pyx_t_2 = NULL;
  112169. PyObject *__pyx_t_3 = NULL;
  112170. PyObject *__pyx_t_4 = NULL;
  112171. int __pyx_t_5;
  112172. __Pyx_RefNannySetupContext("_create_transport_context", 0);
  112173. /* "uvloop/sslproto.pyx":2
  112174. * cdef _create_transport_context(server_side, server_hostname):
  112175. * if server_side: # <<<<<<<<<<<<<<
  112176. * raise ValueError('Server side SSL needs a valid SSLContext')
  112177. *
  112178. */
  112179. __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_server_side); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(22, 2, __pyx_L1_error)
  112180. if (unlikely(__pyx_t_1)) {
  112181. /* "uvloop/sslproto.pyx":3
  112182. * cdef _create_transport_context(server_side, server_hostname):
  112183. * if server_side:
  112184. * raise ValueError('Server side SSL needs a valid SSLContext') # <<<<<<<<<<<<<<
  112185. *
  112186. * # Client side may pass ssl=True to use a default
  112187. */
  112188. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__200, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 3, __pyx_L1_error)
  112189. __Pyx_GOTREF(__pyx_t_2);
  112190. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  112191. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  112192. __PYX_ERR(22, 3, __pyx_L1_error)
  112193. /* "uvloop/sslproto.pyx":2
  112194. * cdef _create_transport_context(server_side, server_hostname):
  112195. * if server_side: # <<<<<<<<<<<<<<
  112196. * raise ValueError('Server side SSL needs a valid SSLContext')
  112197. *
  112198. */
  112199. }
  112200. /* "uvloop/sslproto.pyx":9
  112201. * # The default is secure for client connections.
  112202. * # Python 3.4+: use up-to-date strong settings.
  112203. * sslcontext = ssl_create_default_context() # <<<<<<<<<<<<<<
  112204. * if not server_hostname:
  112205. * sslcontext.check_hostname = False
  112206. */
  112207. __Pyx_INCREF(__pyx_v_6uvloop_4loop_ssl_create_default_context);
  112208. __pyx_t_3 = __pyx_v_6uvloop_4loop_ssl_create_default_context; __pyx_t_4 = NULL;
  112209. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
  112210. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
  112211. if (likely(__pyx_t_4)) {
  112212. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  112213. __Pyx_INCREF(__pyx_t_4);
  112214. __Pyx_INCREF(function);
  112215. __Pyx_DECREF_SET(__pyx_t_3, function);
  112216. }
  112217. }
  112218. __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
  112219. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  112220. if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 9, __pyx_L1_error)
  112221. __Pyx_GOTREF(__pyx_t_2);
  112222. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  112223. __pyx_v_sslcontext = __pyx_t_2;
  112224. __pyx_t_2 = 0;
  112225. /* "uvloop/sslproto.pyx":10
  112226. * # Python 3.4+: use up-to-date strong settings.
  112227. * sslcontext = ssl_create_default_context()
  112228. * if not server_hostname: # <<<<<<<<<<<<<<
  112229. * sslcontext.check_hostname = False
  112230. * return sslcontext
  112231. */
  112232. __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_server_hostname); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(22, 10, __pyx_L1_error)
  112233. __pyx_t_5 = ((!__pyx_t_1) != 0);
  112234. if (__pyx_t_5) {
  112235. /* "uvloop/sslproto.pyx":11
  112236. * sslcontext = ssl_create_default_context()
  112237. * if not server_hostname:
  112238. * sslcontext.check_hostname = False # <<<<<<<<<<<<<<
  112239. * return sslcontext
  112240. *
  112241. */
  112242. if (__Pyx_PyObject_SetAttrStr(__pyx_v_sslcontext, __pyx_n_s_check_hostname, Py_False) < 0) __PYX_ERR(22, 11, __pyx_L1_error)
  112243. /* "uvloop/sslproto.pyx":10
  112244. * # Python 3.4+: use up-to-date strong settings.
  112245. * sslcontext = ssl_create_default_context()
  112246. * if not server_hostname: # <<<<<<<<<<<<<<
  112247. * sslcontext.check_hostname = False
  112248. * return sslcontext
  112249. */
  112250. }
  112251. /* "uvloop/sslproto.pyx":12
  112252. * if not server_hostname:
  112253. * sslcontext.check_hostname = False
  112254. * return sslcontext # <<<<<<<<<<<<<<
  112255. *
  112256. *
  112257. */
  112258. __Pyx_XDECREF(__pyx_r);
  112259. __Pyx_INCREF(__pyx_v_sslcontext);
  112260. __pyx_r = __pyx_v_sslcontext;
  112261. goto __pyx_L0;
  112262. /* "uvloop/sslproto.pyx":1
  112263. * cdef _create_transport_context(server_side, server_hostname): # <<<<<<<<<<<<<<
  112264. * if server_side:
  112265. * raise ValueError('Server side SSL needs a valid SSLContext')
  112266. */
  112267. /* function exit code */
  112268. __pyx_L1_error:;
  112269. __Pyx_XDECREF(__pyx_t_2);
  112270. __Pyx_XDECREF(__pyx_t_3);
  112271. __Pyx_XDECREF(__pyx_t_4);
  112272. __Pyx_AddTraceback("uvloop.loop._create_transport_context", __pyx_clineno, __pyx_lineno, __pyx_filename);
  112273. __pyx_r = 0;
  112274. __pyx_L0:;
  112275. __Pyx_XDECREF(__pyx_v_sslcontext);
  112276. __Pyx_XGIVEREF(__pyx_r);
  112277. __Pyx_RefNannyFinishContext();
  112278. return __pyx_r;
  112279. }
  112280. /* "uvloop/sslproto.pyx":20
  112281. * # _sendfile_compatible = constants._SendfileMode.FALLBACK
  112282. *
  112283. * def __cinit__(self, loop, ssl_protocol): # <<<<<<<<<<<<<<
  112284. * self._loop = loop
  112285. * # SSLProtocol instance
  112286. */
  112287. /* Python wrapper */
  112288. static int __pyx_pw_6uvloop_4loop_21_SSLProtocolTransport_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  112289. static int __pyx_pw_6uvloop_4loop_21_SSLProtocolTransport_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  112290. PyObject *__pyx_v_loop = 0;
  112291. PyObject *__pyx_v_ssl_protocol = 0;
  112292. int __pyx_r;
  112293. __Pyx_RefNannyDeclarations
  112294. __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  112295. {
  112296. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_loop,&__pyx_n_s_ssl_protocol,0};
  112297. PyObject* values[2] = {0,0};
  112298. if (unlikely(__pyx_kwds)) {
  112299. Py_ssize_t kw_args;
  112300. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  112301. switch (pos_args) {
  112302. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  112303. CYTHON_FALLTHROUGH;
  112304. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  112305. CYTHON_FALLTHROUGH;
  112306. case 0: break;
  112307. default: goto __pyx_L5_argtuple_error;
  112308. }
  112309. kw_args = PyDict_Size(__pyx_kwds);
  112310. switch (pos_args) {
  112311. case 0:
  112312. if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_loop)) != 0)) kw_args--;
  112313. else goto __pyx_L5_argtuple_error;
  112314. CYTHON_FALLTHROUGH;
  112315. case 1:
  112316. if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ssl_protocol)) != 0)) kw_args--;
  112317. else {
  112318. __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, 1); __PYX_ERR(22, 20, __pyx_L3_error)
  112319. }
  112320. }
  112321. if (unlikely(kw_args > 0)) {
  112322. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(22, 20, __pyx_L3_error)
  112323. }
  112324. } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
  112325. goto __pyx_L5_argtuple_error;
  112326. } else {
  112327. values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  112328. values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  112329. }
  112330. __pyx_v_loop = values[0];
  112331. __pyx_v_ssl_protocol = values[1];
  112332. }
  112333. goto __pyx_L4_argument_unpacking_done;
  112334. __pyx_L5_argtuple_error:;
  112335. __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(22, 20, __pyx_L3_error)
  112336. __pyx_L3_error:;
  112337. __Pyx_AddTraceback("uvloop.loop._SSLProtocolTransport.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  112338. __Pyx_RefNannyFinishContext();
  112339. return -1;
  112340. __pyx_L4_argument_unpacking_done:;
  112341. __pyx_r = __pyx_pf_6uvloop_4loop_21_SSLProtocolTransport___cinit__(((struct __pyx_obj_6uvloop_4loop__SSLProtocolTransport *)__pyx_v_self), __pyx_v_loop, __pyx_v_ssl_protocol);
  112342. /* function exit code */
  112343. __Pyx_RefNannyFinishContext();
  112344. return __pyx_r;
  112345. }
  112346. static int __pyx_pf_6uvloop_4loop_21_SSLProtocolTransport___cinit__(struct __pyx_obj_6uvloop_4loop__SSLProtocolTransport *__pyx_v_self, PyObject *__pyx_v_loop, PyObject *__pyx_v_ssl_protocol) {
  112347. int __pyx_r;
  112348. __Pyx_RefNannyDeclarations
  112349. PyObject *__pyx_t_1 = NULL;
  112350. __Pyx_RefNannySetupContext("__cinit__", 0);
  112351. /* "uvloop/sslproto.pyx":21
  112352. *
  112353. * def __cinit__(self, loop, ssl_protocol):
  112354. * self._loop = loop # <<<<<<<<<<<<<<
  112355. * # SSLProtocol instance
  112356. * self._ssl_protocol = ssl_protocol
  112357. */
  112358. __Pyx_INCREF(__pyx_v_loop);
  112359. __Pyx_GIVEREF(__pyx_v_loop);
  112360. __Pyx_GOTREF(__pyx_v_self->_loop);
  112361. __Pyx_DECREF(__pyx_v_self->_loop);
  112362. __pyx_v_self->_loop = __pyx_v_loop;
  112363. /* "uvloop/sslproto.pyx":23
  112364. * self._loop = loop
  112365. * # SSLProtocol instance
  112366. * self._ssl_protocol = ssl_protocol # <<<<<<<<<<<<<<
  112367. * self._closed = False
  112368. *
  112369. */
  112370. if (!(likely(((__pyx_v_ssl_protocol) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_ssl_protocol, __pyx_ptype_6uvloop_4loop_SSLProtocol))))) __PYX_ERR(22, 23, __pyx_L1_error)
  112371. __pyx_t_1 = __pyx_v_ssl_protocol;
  112372. __Pyx_INCREF(__pyx_t_1);
  112373. __Pyx_GIVEREF(__pyx_t_1);
  112374. __Pyx_GOTREF(__pyx_v_self->_ssl_protocol);
  112375. __Pyx_DECREF(((PyObject *)__pyx_v_self->_ssl_protocol));
  112376. __pyx_v_self->_ssl_protocol = ((struct __pyx_obj_6uvloop_4loop_SSLProtocol *)__pyx_t_1);
  112377. __pyx_t_1 = 0;
  112378. /* "uvloop/sslproto.pyx":24
  112379. * # SSLProtocol instance
  112380. * self._ssl_protocol = ssl_protocol
  112381. * self._closed = False # <<<<<<<<<<<<<<
  112382. *
  112383. * def get_extra_info(self, name, default=None):
  112384. */
  112385. __pyx_v_self->_closed = 0;
  112386. /* "uvloop/sslproto.pyx":20
  112387. * # _sendfile_compatible = constants._SendfileMode.FALLBACK
  112388. *
  112389. * def __cinit__(self, loop, ssl_protocol): # <<<<<<<<<<<<<<
  112390. * self._loop = loop
  112391. * # SSLProtocol instance
  112392. */
  112393. /* function exit code */
  112394. __pyx_r = 0;
  112395. goto __pyx_L0;
  112396. __pyx_L1_error:;
  112397. __Pyx_XDECREF(__pyx_t_1);
  112398. __Pyx_AddTraceback("uvloop.loop._SSLProtocolTransport.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  112399. __pyx_r = -1;
  112400. __pyx_L0:;
  112401. __Pyx_RefNannyFinishContext();
  112402. return __pyx_r;
  112403. }
  112404. /* "uvloop/sslproto.pyx":26
  112405. * self._closed = False
  112406. *
  112407. * def get_extra_info(self, name, default=None): # <<<<<<<<<<<<<<
  112408. * """Get optional transport information."""
  112409. * return self._ssl_protocol._get_extra_info(name, default)
  112410. */
  112411. /* Python wrapper */
  112412. static PyObject *__pyx_pw_6uvloop_4loop_21_SSLProtocolTransport_3get_extra_info(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  112413. static char __pyx_doc_6uvloop_4loop_21_SSLProtocolTransport_2get_extra_info[] = "_SSLProtocolTransport.get_extra_info(self, name, default=None)\nGet optional transport information.";
  112414. static PyObject *__pyx_pw_6uvloop_4loop_21_SSLProtocolTransport_3get_extra_info(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  112415. PyObject *__pyx_v_name = 0;
  112416. PyObject *__pyx_v_default = 0;
  112417. PyObject *__pyx_r = 0;
  112418. __Pyx_RefNannyDeclarations
  112419. __Pyx_RefNannySetupContext("get_extra_info (wrapper)", 0);
  112420. {
  112421. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name_2,&__pyx_n_s_default,0};
  112422. PyObject* values[2] = {0,0};
  112423. values[1] = ((PyObject *)Py_None);
  112424. if (unlikely(__pyx_kwds)) {
  112425. Py_ssize_t kw_args;
  112426. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  112427. switch (pos_args) {
  112428. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  112429. CYTHON_FALLTHROUGH;
  112430. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  112431. CYTHON_FALLTHROUGH;
  112432. case 0: break;
  112433. default: goto __pyx_L5_argtuple_error;
  112434. }
  112435. kw_args = PyDict_Size(__pyx_kwds);
  112436. switch (pos_args) {
  112437. case 0:
  112438. if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name_2)) != 0)) kw_args--;
  112439. else goto __pyx_L5_argtuple_error;
  112440. CYTHON_FALLTHROUGH;
  112441. case 1:
  112442. if (kw_args > 0) {
  112443. PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_default);
  112444. if (value) { values[1] = value; kw_args--; }
  112445. }
  112446. }
  112447. if (unlikely(kw_args > 0)) {
  112448. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_extra_info") < 0)) __PYX_ERR(22, 26, __pyx_L3_error)
  112449. }
  112450. } else {
  112451. switch (PyTuple_GET_SIZE(__pyx_args)) {
  112452. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  112453. CYTHON_FALLTHROUGH;
  112454. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  112455. break;
  112456. default: goto __pyx_L5_argtuple_error;
  112457. }
  112458. }
  112459. __pyx_v_name = values[0];
  112460. __pyx_v_default = values[1];
  112461. }
  112462. goto __pyx_L4_argument_unpacking_done;
  112463. __pyx_L5_argtuple_error:;
  112464. __Pyx_RaiseArgtupleInvalid("get_extra_info", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(22, 26, __pyx_L3_error)
  112465. __pyx_L3_error:;
  112466. __Pyx_AddTraceback("uvloop.loop._SSLProtocolTransport.get_extra_info", __pyx_clineno, __pyx_lineno, __pyx_filename);
  112467. __Pyx_RefNannyFinishContext();
  112468. return NULL;
  112469. __pyx_L4_argument_unpacking_done:;
  112470. __pyx_r = __pyx_pf_6uvloop_4loop_21_SSLProtocolTransport_2get_extra_info(((struct __pyx_obj_6uvloop_4loop__SSLProtocolTransport *)__pyx_v_self), __pyx_v_name, __pyx_v_default);
  112471. /* function exit code */
  112472. __Pyx_RefNannyFinishContext();
  112473. return __pyx_r;
  112474. }
  112475. static PyObject *__pyx_pf_6uvloop_4loop_21_SSLProtocolTransport_2get_extra_info(struct __pyx_obj_6uvloop_4loop__SSLProtocolTransport *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_default) {
  112476. PyObject *__pyx_r = NULL;
  112477. __Pyx_RefNannyDeclarations
  112478. PyObject *__pyx_t_1 = NULL;
  112479. struct __pyx_opt_args_6uvloop_4loop_11SSLProtocol__get_extra_info __pyx_t_2;
  112480. __Pyx_RefNannySetupContext("get_extra_info", 0);
  112481. /* "uvloop/sslproto.pyx":28
  112482. * def get_extra_info(self, name, default=None):
  112483. * """Get optional transport information."""
  112484. * return self._ssl_protocol._get_extra_info(name, default) # <<<<<<<<<<<<<<
  112485. *
  112486. * def set_protocol(self, protocol):
  112487. */
  112488. __Pyx_XDECREF(__pyx_r);
  112489. __pyx_t_2.__pyx_n = 1;
  112490. __pyx_t_2.__pyx_default = __pyx_v_default;
  112491. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_SSLProtocol *)__pyx_v_self->_ssl_protocol->__pyx_vtab)->_get_extra_info(__pyx_v_self->_ssl_protocol, __pyx_v_name, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 28, __pyx_L1_error)
  112492. __Pyx_GOTREF(__pyx_t_1);
  112493. __pyx_r = __pyx_t_1;
  112494. __pyx_t_1 = 0;
  112495. goto __pyx_L0;
  112496. /* "uvloop/sslproto.pyx":26
  112497. * self._closed = False
  112498. *
  112499. * def get_extra_info(self, name, default=None): # <<<<<<<<<<<<<<
  112500. * """Get optional transport information."""
  112501. * return self._ssl_protocol._get_extra_info(name, default)
  112502. */
  112503. /* function exit code */
  112504. __pyx_L1_error:;
  112505. __Pyx_XDECREF(__pyx_t_1);
  112506. __Pyx_AddTraceback("uvloop.loop._SSLProtocolTransport.get_extra_info", __pyx_clineno, __pyx_lineno, __pyx_filename);
  112507. __pyx_r = NULL;
  112508. __pyx_L0:;
  112509. __Pyx_XGIVEREF(__pyx_r);
  112510. __Pyx_RefNannyFinishContext();
  112511. return __pyx_r;
  112512. }
  112513. /* "uvloop/sslproto.pyx":30
  112514. * return self._ssl_protocol._get_extra_info(name, default)
  112515. *
  112516. * def set_protocol(self, protocol): # <<<<<<<<<<<<<<
  112517. * self._ssl_protocol._set_app_protocol(protocol)
  112518. *
  112519. */
  112520. /* Python wrapper */
  112521. static PyObject *__pyx_pw_6uvloop_4loop_21_SSLProtocolTransport_5set_protocol(PyObject *__pyx_v_self, PyObject *__pyx_v_protocol); /*proto*/
  112522. static char __pyx_doc_6uvloop_4loop_21_SSLProtocolTransport_4set_protocol[] = "_SSLProtocolTransport.set_protocol(self, protocol)";
  112523. static PyObject *__pyx_pw_6uvloop_4loop_21_SSLProtocolTransport_5set_protocol(PyObject *__pyx_v_self, PyObject *__pyx_v_protocol) {
  112524. PyObject *__pyx_r = 0;
  112525. __Pyx_RefNannyDeclarations
  112526. __Pyx_RefNannySetupContext("set_protocol (wrapper)", 0);
  112527. __pyx_r = __pyx_pf_6uvloop_4loop_21_SSLProtocolTransport_4set_protocol(((struct __pyx_obj_6uvloop_4loop__SSLProtocolTransport *)__pyx_v_self), ((PyObject *)__pyx_v_protocol));
  112528. /* function exit code */
  112529. __Pyx_RefNannyFinishContext();
  112530. return __pyx_r;
  112531. }
  112532. static PyObject *__pyx_pf_6uvloop_4loop_21_SSLProtocolTransport_4set_protocol(struct __pyx_obj_6uvloop_4loop__SSLProtocolTransport *__pyx_v_self, PyObject *__pyx_v_protocol) {
  112533. PyObject *__pyx_r = NULL;
  112534. __Pyx_RefNannyDeclarations
  112535. PyObject *__pyx_t_1 = NULL;
  112536. __Pyx_RefNannySetupContext("set_protocol", 0);
  112537. /* "uvloop/sslproto.pyx":31
  112538. *
  112539. * def set_protocol(self, protocol):
  112540. * self._ssl_protocol._set_app_protocol(protocol) # <<<<<<<<<<<<<<
  112541. *
  112542. * def get_protocol(self):
  112543. */
  112544. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_SSLProtocol *)__pyx_v_self->_ssl_protocol->__pyx_vtab)->_set_app_protocol(__pyx_v_self->_ssl_protocol, __pyx_v_protocol); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 31, __pyx_L1_error)
  112545. __Pyx_GOTREF(__pyx_t_1);
  112546. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  112547. /* "uvloop/sslproto.pyx":30
  112548. * return self._ssl_protocol._get_extra_info(name, default)
  112549. *
  112550. * def set_protocol(self, protocol): # <<<<<<<<<<<<<<
  112551. * self._ssl_protocol._set_app_protocol(protocol)
  112552. *
  112553. */
  112554. /* function exit code */
  112555. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  112556. goto __pyx_L0;
  112557. __pyx_L1_error:;
  112558. __Pyx_XDECREF(__pyx_t_1);
  112559. __Pyx_AddTraceback("uvloop.loop._SSLProtocolTransport.set_protocol", __pyx_clineno, __pyx_lineno, __pyx_filename);
  112560. __pyx_r = NULL;
  112561. __pyx_L0:;
  112562. __Pyx_XGIVEREF(__pyx_r);
  112563. __Pyx_RefNannyFinishContext();
  112564. return __pyx_r;
  112565. }
  112566. /* "uvloop/sslproto.pyx":33
  112567. * self._ssl_protocol._set_app_protocol(protocol)
  112568. *
  112569. * def get_protocol(self): # <<<<<<<<<<<<<<
  112570. * return self._ssl_protocol._app_protocol
  112571. *
  112572. */
  112573. /* Python wrapper */
  112574. static PyObject *__pyx_pw_6uvloop_4loop_21_SSLProtocolTransport_7get_protocol(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  112575. static char __pyx_doc_6uvloop_4loop_21_SSLProtocolTransport_6get_protocol[] = "_SSLProtocolTransport.get_protocol(self)";
  112576. static PyObject *__pyx_pw_6uvloop_4loop_21_SSLProtocolTransport_7get_protocol(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  112577. PyObject *__pyx_r = 0;
  112578. __Pyx_RefNannyDeclarations
  112579. __Pyx_RefNannySetupContext("get_protocol (wrapper)", 0);
  112580. __pyx_r = __pyx_pf_6uvloop_4loop_21_SSLProtocolTransport_6get_protocol(((struct __pyx_obj_6uvloop_4loop__SSLProtocolTransport *)__pyx_v_self));
  112581. /* function exit code */
  112582. __Pyx_RefNannyFinishContext();
  112583. return __pyx_r;
  112584. }
  112585. static PyObject *__pyx_pf_6uvloop_4loop_21_SSLProtocolTransport_6get_protocol(struct __pyx_obj_6uvloop_4loop__SSLProtocolTransport *__pyx_v_self) {
  112586. PyObject *__pyx_r = NULL;
  112587. __Pyx_RefNannyDeclarations
  112588. __Pyx_RefNannySetupContext("get_protocol", 0);
  112589. /* "uvloop/sslproto.pyx":34
  112590. *
  112591. * def get_protocol(self):
  112592. * return self._ssl_protocol._app_protocol # <<<<<<<<<<<<<<
  112593. *
  112594. * def is_closing(self):
  112595. */
  112596. __Pyx_XDECREF(__pyx_r);
  112597. __Pyx_INCREF(__pyx_v_self->_ssl_protocol->_app_protocol);
  112598. __pyx_r = __pyx_v_self->_ssl_protocol->_app_protocol;
  112599. goto __pyx_L0;
  112600. /* "uvloop/sslproto.pyx":33
  112601. * self._ssl_protocol._set_app_protocol(protocol)
  112602. *
  112603. * def get_protocol(self): # <<<<<<<<<<<<<<
  112604. * return self._ssl_protocol._app_protocol
  112605. *
  112606. */
  112607. /* function exit code */
  112608. __pyx_L0:;
  112609. __Pyx_XGIVEREF(__pyx_r);
  112610. __Pyx_RefNannyFinishContext();
  112611. return __pyx_r;
  112612. }
  112613. /* "uvloop/sslproto.pyx":36
  112614. * return self._ssl_protocol._app_protocol
  112615. *
  112616. * def is_closing(self): # <<<<<<<<<<<<<<
  112617. * return self._closed
  112618. *
  112619. */
  112620. /* Python wrapper */
  112621. static PyObject *__pyx_pw_6uvloop_4loop_21_SSLProtocolTransport_9is_closing(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  112622. static char __pyx_doc_6uvloop_4loop_21_SSLProtocolTransport_8is_closing[] = "_SSLProtocolTransport.is_closing(self)";
  112623. static PyObject *__pyx_pw_6uvloop_4loop_21_SSLProtocolTransport_9is_closing(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  112624. PyObject *__pyx_r = 0;
  112625. __Pyx_RefNannyDeclarations
  112626. __Pyx_RefNannySetupContext("is_closing (wrapper)", 0);
  112627. __pyx_r = __pyx_pf_6uvloop_4loop_21_SSLProtocolTransport_8is_closing(((struct __pyx_obj_6uvloop_4loop__SSLProtocolTransport *)__pyx_v_self));
  112628. /* function exit code */
  112629. __Pyx_RefNannyFinishContext();
  112630. return __pyx_r;
  112631. }
  112632. static PyObject *__pyx_pf_6uvloop_4loop_21_SSLProtocolTransport_8is_closing(struct __pyx_obj_6uvloop_4loop__SSLProtocolTransport *__pyx_v_self) {
  112633. PyObject *__pyx_r = NULL;
  112634. __Pyx_RefNannyDeclarations
  112635. PyObject *__pyx_t_1 = NULL;
  112636. __Pyx_RefNannySetupContext("is_closing", 0);
  112637. /* "uvloop/sslproto.pyx":37
  112638. *
  112639. * def is_closing(self):
  112640. * return self._closed # <<<<<<<<<<<<<<
  112641. *
  112642. * def close(self):
  112643. */
  112644. __Pyx_XDECREF(__pyx_r);
  112645. __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->_closed); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 37, __pyx_L1_error)
  112646. __Pyx_GOTREF(__pyx_t_1);
  112647. __pyx_r = __pyx_t_1;
  112648. __pyx_t_1 = 0;
  112649. goto __pyx_L0;
  112650. /* "uvloop/sslproto.pyx":36
  112651. * return self._ssl_protocol._app_protocol
  112652. *
  112653. * def is_closing(self): # <<<<<<<<<<<<<<
  112654. * return self._closed
  112655. *
  112656. */
  112657. /* function exit code */
  112658. __pyx_L1_error:;
  112659. __Pyx_XDECREF(__pyx_t_1);
  112660. __Pyx_AddTraceback("uvloop.loop._SSLProtocolTransport.is_closing", __pyx_clineno, __pyx_lineno, __pyx_filename);
  112661. __pyx_r = NULL;
  112662. __pyx_L0:;
  112663. __Pyx_XGIVEREF(__pyx_r);
  112664. __Pyx_RefNannyFinishContext();
  112665. return __pyx_r;
  112666. }
  112667. /* "uvloop/sslproto.pyx":39
  112668. * return self._closed
  112669. *
  112670. * def close(self): # <<<<<<<<<<<<<<
  112671. * """Close the transport.
  112672. *
  112673. */
  112674. /* Python wrapper */
  112675. static PyObject *__pyx_pw_6uvloop_4loop_21_SSLProtocolTransport_11close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  112676. static char __pyx_doc_6uvloop_4loop_21_SSLProtocolTransport_10close[] = "_SSLProtocolTransport.close(self)\nClose the transport.\n\n Buffered data will be flushed asynchronously. No more data\n will be received. After all buffered data is flushed, the\n protocol's connection_lost() method will (eventually) called\n with None as its argument.\n ";
  112677. static PyObject *__pyx_pw_6uvloop_4loop_21_SSLProtocolTransport_11close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  112678. PyObject *__pyx_r = 0;
  112679. __Pyx_RefNannyDeclarations
  112680. __Pyx_RefNannySetupContext("close (wrapper)", 0);
  112681. __pyx_r = __pyx_pf_6uvloop_4loop_21_SSLProtocolTransport_10close(((struct __pyx_obj_6uvloop_4loop__SSLProtocolTransport *)__pyx_v_self));
  112682. /* function exit code */
  112683. __Pyx_RefNannyFinishContext();
  112684. return __pyx_r;
  112685. }
  112686. static PyObject *__pyx_pf_6uvloop_4loop_21_SSLProtocolTransport_10close(struct __pyx_obj_6uvloop_4loop__SSLProtocolTransport *__pyx_v_self) {
  112687. PyObject *__pyx_r = NULL;
  112688. __Pyx_RefNannyDeclarations
  112689. PyObject *__pyx_t_1 = NULL;
  112690. __Pyx_RefNannySetupContext("close", 0);
  112691. /* "uvloop/sslproto.pyx":47
  112692. * with None as its argument.
  112693. * """
  112694. * self._closed = True # <<<<<<<<<<<<<<
  112695. * self._ssl_protocol._start_shutdown()
  112696. *
  112697. */
  112698. __pyx_v_self->_closed = 1;
  112699. /* "uvloop/sslproto.pyx":48
  112700. * """
  112701. * self._closed = True
  112702. * self._ssl_protocol._start_shutdown() # <<<<<<<<<<<<<<
  112703. *
  112704. * def __dealloc__(self):
  112705. */
  112706. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_SSLProtocol *)__pyx_v_self->_ssl_protocol->__pyx_vtab)->_start_shutdown(__pyx_v_self->_ssl_protocol); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 48, __pyx_L1_error)
  112707. __Pyx_GOTREF(__pyx_t_1);
  112708. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  112709. /* "uvloop/sslproto.pyx":39
  112710. * return self._closed
  112711. *
  112712. * def close(self): # <<<<<<<<<<<<<<
  112713. * """Close the transport.
  112714. *
  112715. */
  112716. /* function exit code */
  112717. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  112718. goto __pyx_L0;
  112719. __pyx_L1_error:;
  112720. __Pyx_XDECREF(__pyx_t_1);
  112721. __Pyx_AddTraceback("uvloop.loop._SSLProtocolTransport.close", __pyx_clineno, __pyx_lineno, __pyx_filename);
  112722. __pyx_r = NULL;
  112723. __pyx_L0:;
  112724. __Pyx_XGIVEREF(__pyx_r);
  112725. __Pyx_RefNannyFinishContext();
  112726. return __pyx_r;
  112727. }
  112728. /* "uvloop/sslproto.pyx":50
  112729. * self._ssl_protocol._start_shutdown()
  112730. *
  112731. * def __dealloc__(self): # <<<<<<<<<<<<<<
  112732. * if not self._closed:
  112733. * self._closed = True
  112734. */
  112735. /* Python wrapper */
  112736. static void __pyx_pw_6uvloop_4loop_21_SSLProtocolTransport_13__dealloc__(PyObject *__pyx_v_self); /*proto*/
  112737. static void __pyx_pw_6uvloop_4loop_21_SSLProtocolTransport_13__dealloc__(PyObject *__pyx_v_self) {
  112738. __Pyx_RefNannyDeclarations
  112739. __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  112740. __pyx_pf_6uvloop_4loop_21_SSLProtocolTransport_12__dealloc__(((struct __pyx_obj_6uvloop_4loop__SSLProtocolTransport *)__pyx_v_self));
  112741. /* function exit code */
  112742. __Pyx_RefNannyFinishContext();
  112743. }
  112744. static void __pyx_pf_6uvloop_4loop_21_SSLProtocolTransport_12__dealloc__(struct __pyx_obj_6uvloop_4loop__SSLProtocolTransport *__pyx_v_self) {
  112745. __Pyx_RefNannyDeclarations
  112746. int __pyx_t_1;
  112747. PyObject *__pyx_t_2 = NULL;
  112748. PyObject *__pyx_t_3 = NULL;
  112749. PyObject *__pyx_t_4 = NULL;
  112750. PyObject *__pyx_t_5 = NULL;
  112751. int __pyx_t_6;
  112752. PyObject *__pyx_t_7 = NULL;
  112753. __Pyx_RefNannySetupContext("__dealloc__", 0);
  112754. /* "uvloop/sslproto.pyx":51
  112755. *
  112756. * def __dealloc__(self):
  112757. * if not self._closed: # <<<<<<<<<<<<<<
  112758. * self._closed = True
  112759. * warnings_warn(
  112760. */
  112761. __pyx_t_1 = ((!(__pyx_v_self->_closed != 0)) != 0);
  112762. if (__pyx_t_1) {
  112763. /* "uvloop/sslproto.pyx":52
  112764. * def __dealloc__(self):
  112765. * if not self._closed:
  112766. * self._closed = True # <<<<<<<<<<<<<<
  112767. * warnings_warn(
  112768. * "unclosed transport <uvloop.loop._SSLProtocolTransport "
  112769. */
  112770. __pyx_v_self->_closed = 1;
  112771. /* "uvloop/sslproto.pyx":55
  112772. * warnings_warn(
  112773. * "unclosed transport <uvloop.loop._SSLProtocolTransport "
  112774. * "object>", ResourceWarning) # <<<<<<<<<<<<<<
  112775. *
  112776. * def is_reading(self):
  112777. */
  112778. __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ResourceWarning); if (unlikely(!__pyx_t_3)) __PYX_ERR(22, 55, __pyx_L1_error)
  112779. __Pyx_GOTREF(__pyx_t_3);
  112780. __Pyx_INCREF(__pyx_v_6uvloop_4loop_warnings_warn);
  112781. __pyx_t_4 = __pyx_v_6uvloop_4loop_warnings_warn; __pyx_t_5 = NULL;
  112782. __pyx_t_6 = 0;
  112783. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
  112784. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
  112785. if (likely(__pyx_t_5)) {
  112786. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  112787. __Pyx_INCREF(__pyx_t_5);
  112788. __Pyx_INCREF(function);
  112789. __Pyx_DECREF_SET(__pyx_t_4, function);
  112790. __pyx_t_6 = 1;
  112791. }
  112792. }
  112793. #if CYTHON_FAST_PYCALL
  112794. if (PyFunction_Check(__pyx_t_4)) {
  112795. PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_kp_u_unclosed_transport_uvloop_loop, __pyx_t_3};
  112796. __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 53, __pyx_L1_error)
  112797. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  112798. __Pyx_GOTREF(__pyx_t_2);
  112799. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  112800. } else
  112801. #endif
  112802. #if CYTHON_FAST_PYCCALL
  112803. if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
  112804. PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_kp_u_unclosed_transport_uvloop_loop, __pyx_t_3};
  112805. __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 53, __pyx_L1_error)
  112806. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  112807. __Pyx_GOTREF(__pyx_t_2);
  112808. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  112809. } else
  112810. #endif
  112811. {
  112812. __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(22, 53, __pyx_L1_error)
  112813. __Pyx_GOTREF(__pyx_t_7);
  112814. if (__pyx_t_5) {
  112815. __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
  112816. }
  112817. __Pyx_INCREF(__pyx_kp_u_unclosed_transport_uvloop_loop);
  112818. __Pyx_GIVEREF(__pyx_kp_u_unclosed_transport_uvloop_loop);
  112819. PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_kp_u_unclosed_transport_uvloop_loop);
  112820. __Pyx_GIVEREF(__pyx_t_3);
  112821. PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_3);
  112822. __pyx_t_3 = 0;
  112823. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 53, __pyx_L1_error)
  112824. __Pyx_GOTREF(__pyx_t_2);
  112825. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  112826. }
  112827. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  112828. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  112829. /* "uvloop/sslproto.pyx":51
  112830. *
  112831. * def __dealloc__(self):
  112832. * if not self._closed: # <<<<<<<<<<<<<<
  112833. * self._closed = True
  112834. * warnings_warn(
  112835. */
  112836. }
  112837. /* "uvloop/sslproto.pyx":50
  112838. * self._ssl_protocol._start_shutdown()
  112839. *
  112840. * def __dealloc__(self): # <<<<<<<<<<<<<<
  112841. * if not self._closed:
  112842. * self._closed = True
  112843. */
  112844. /* function exit code */
  112845. goto __pyx_L0;
  112846. __pyx_L1_error:;
  112847. __Pyx_XDECREF(__pyx_t_2);
  112848. __Pyx_XDECREF(__pyx_t_3);
  112849. __Pyx_XDECREF(__pyx_t_4);
  112850. __Pyx_XDECREF(__pyx_t_5);
  112851. __Pyx_XDECREF(__pyx_t_7);
  112852. __Pyx_WriteUnraisable("uvloop.loop._SSLProtocolTransport.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  112853. __pyx_L0:;
  112854. __Pyx_RefNannyFinishContext();
  112855. }
  112856. /* "uvloop/sslproto.pyx":57
  112857. * "object>", ResourceWarning)
  112858. *
  112859. * def is_reading(self): # <<<<<<<<<<<<<<
  112860. * return not self._ssl_protocol._app_reading_paused
  112861. *
  112862. */
  112863. /* Python wrapper */
  112864. static PyObject *__pyx_pw_6uvloop_4loop_21_SSLProtocolTransport_15is_reading(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  112865. static char __pyx_doc_6uvloop_4loop_21_SSLProtocolTransport_14is_reading[] = "_SSLProtocolTransport.is_reading(self)";
  112866. static PyObject *__pyx_pw_6uvloop_4loop_21_SSLProtocolTransport_15is_reading(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  112867. PyObject *__pyx_r = 0;
  112868. __Pyx_RefNannyDeclarations
  112869. __Pyx_RefNannySetupContext("is_reading (wrapper)", 0);
  112870. __pyx_r = __pyx_pf_6uvloop_4loop_21_SSLProtocolTransport_14is_reading(((struct __pyx_obj_6uvloop_4loop__SSLProtocolTransport *)__pyx_v_self));
  112871. /* function exit code */
  112872. __Pyx_RefNannyFinishContext();
  112873. return __pyx_r;
  112874. }
  112875. static PyObject *__pyx_pf_6uvloop_4loop_21_SSLProtocolTransport_14is_reading(struct __pyx_obj_6uvloop_4loop__SSLProtocolTransport *__pyx_v_self) {
  112876. PyObject *__pyx_r = NULL;
  112877. __Pyx_RefNannyDeclarations
  112878. PyObject *__pyx_t_1 = NULL;
  112879. __Pyx_RefNannySetupContext("is_reading", 0);
  112880. /* "uvloop/sslproto.pyx":58
  112881. *
  112882. * def is_reading(self):
  112883. * return not self._ssl_protocol._app_reading_paused # <<<<<<<<<<<<<<
  112884. *
  112885. * def pause_reading(self):
  112886. */
  112887. __Pyx_XDECREF(__pyx_r);
  112888. __pyx_t_1 = __Pyx_PyBool_FromLong((!(__pyx_v_self->_ssl_protocol->_app_reading_paused != 0))); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 58, __pyx_L1_error)
  112889. __Pyx_GOTREF(__pyx_t_1);
  112890. __pyx_r = __pyx_t_1;
  112891. __pyx_t_1 = 0;
  112892. goto __pyx_L0;
  112893. /* "uvloop/sslproto.pyx":57
  112894. * "object>", ResourceWarning)
  112895. *
  112896. * def is_reading(self): # <<<<<<<<<<<<<<
  112897. * return not self._ssl_protocol._app_reading_paused
  112898. *
  112899. */
  112900. /* function exit code */
  112901. __pyx_L1_error:;
  112902. __Pyx_XDECREF(__pyx_t_1);
  112903. __Pyx_AddTraceback("uvloop.loop._SSLProtocolTransport.is_reading", __pyx_clineno, __pyx_lineno, __pyx_filename);
  112904. __pyx_r = NULL;
  112905. __pyx_L0:;
  112906. __Pyx_XGIVEREF(__pyx_r);
  112907. __Pyx_RefNannyFinishContext();
  112908. return __pyx_r;
  112909. }
  112910. /* "uvloop/sslproto.pyx":60
  112911. * return not self._ssl_protocol._app_reading_paused
  112912. *
  112913. * def pause_reading(self): # <<<<<<<<<<<<<<
  112914. * """Pause the receiving end.
  112915. *
  112916. */
  112917. /* Python wrapper */
  112918. static PyObject *__pyx_pw_6uvloop_4loop_21_SSLProtocolTransport_17pause_reading(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  112919. static char __pyx_doc_6uvloop_4loop_21_SSLProtocolTransport_16pause_reading[] = "_SSLProtocolTransport.pause_reading(self)\nPause the receiving end.\n\n No data will be passed to the protocol's data_received()\n method until resume_reading() is called.\n ";
  112920. static PyObject *__pyx_pw_6uvloop_4loop_21_SSLProtocolTransport_17pause_reading(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  112921. PyObject *__pyx_r = 0;
  112922. __Pyx_RefNannyDeclarations
  112923. __Pyx_RefNannySetupContext("pause_reading (wrapper)", 0);
  112924. __pyx_r = __pyx_pf_6uvloop_4loop_21_SSLProtocolTransport_16pause_reading(((struct __pyx_obj_6uvloop_4loop__SSLProtocolTransport *)__pyx_v_self));
  112925. /* function exit code */
  112926. __Pyx_RefNannyFinishContext();
  112927. return __pyx_r;
  112928. }
  112929. static PyObject *__pyx_pf_6uvloop_4loop_21_SSLProtocolTransport_16pause_reading(struct __pyx_obj_6uvloop_4loop__SSLProtocolTransport *__pyx_v_self) {
  112930. PyObject *__pyx_r = NULL;
  112931. __Pyx_RefNannyDeclarations
  112932. PyObject *__pyx_t_1 = NULL;
  112933. __Pyx_RefNannySetupContext("pause_reading", 0);
  112934. /* "uvloop/sslproto.pyx":66
  112935. * method until resume_reading() is called.
  112936. * """
  112937. * self._ssl_protocol._pause_reading() # <<<<<<<<<<<<<<
  112938. *
  112939. * def resume_reading(self):
  112940. */
  112941. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_SSLProtocol *)__pyx_v_self->_ssl_protocol->__pyx_vtab)->_pause_reading(__pyx_v_self->_ssl_protocol); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 66, __pyx_L1_error)
  112942. __Pyx_GOTREF(__pyx_t_1);
  112943. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  112944. /* "uvloop/sslproto.pyx":60
  112945. * return not self._ssl_protocol._app_reading_paused
  112946. *
  112947. * def pause_reading(self): # <<<<<<<<<<<<<<
  112948. * """Pause the receiving end.
  112949. *
  112950. */
  112951. /* function exit code */
  112952. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  112953. goto __pyx_L0;
  112954. __pyx_L1_error:;
  112955. __Pyx_XDECREF(__pyx_t_1);
  112956. __Pyx_AddTraceback("uvloop.loop._SSLProtocolTransport.pause_reading", __pyx_clineno, __pyx_lineno, __pyx_filename);
  112957. __pyx_r = NULL;
  112958. __pyx_L0:;
  112959. __Pyx_XGIVEREF(__pyx_r);
  112960. __Pyx_RefNannyFinishContext();
  112961. return __pyx_r;
  112962. }
  112963. /* "uvloop/sslproto.pyx":68
  112964. * self._ssl_protocol._pause_reading()
  112965. *
  112966. * def resume_reading(self): # <<<<<<<<<<<<<<
  112967. * """Resume the receiving end.
  112968. *
  112969. */
  112970. /* Python wrapper */
  112971. static PyObject *__pyx_pw_6uvloop_4loop_21_SSLProtocolTransport_19resume_reading(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  112972. static char __pyx_doc_6uvloop_4loop_21_SSLProtocolTransport_18resume_reading[] = "_SSLProtocolTransport.resume_reading(self)\nResume the receiving end.\n\n Data received will once again be passed to the protocol's\n data_received() method.\n ";
  112973. static PyObject *__pyx_pw_6uvloop_4loop_21_SSLProtocolTransport_19resume_reading(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  112974. PyObject *__pyx_r = 0;
  112975. __Pyx_RefNannyDeclarations
  112976. __Pyx_RefNannySetupContext("resume_reading (wrapper)", 0);
  112977. __pyx_r = __pyx_pf_6uvloop_4loop_21_SSLProtocolTransport_18resume_reading(((struct __pyx_obj_6uvloop_4loop__SSLProtocolTransport *)__pyx_v_self));
  112978. /* function exit code */
  112979. __Pyx_RefNannyFinishContext();
  112980. return __pyx_r;
  112981. }
  112982. static PyObject *__pyx_pf_6uvloop_4loop_21_SSLProtocolTransport_18resume_reading(struct __pyx_obj_6uvloop_4loop__SSLProtocolTransport *__pyx_v_self) {
  112983. PyObject *__pyx_r = NULL;
  112984. __Pyx_RefNannyDeclarations
  112985. PyObject *__pyx_t_1 = NULL;
  112986. __Pyx_RefNannySetupContext("resume_reading", 0);
  112987. /* "uvloop/sslproto.pyx":74
  112988. * data_received() method.
  112989. * """
  112990. * self._ssl_protocol._resume_reading() # <<<<<<<<<<<<<<
  112991. *
  112992. * def set_write_buffer_limits(self, high=None, low=None):
  112993. */
  112994. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_SSLProtocol *)__pyx_v_self->_ssl_protocol->__pyx_vtab)->_resume_reading(__pyx_v_self->_ssl_protocol); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 74, __pyx_L1_error)
  112995. __Pyx_GOTREF(__pyx_t_1);
  112996. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  112997. /* "uvloop/sslproto.pyx":68
  112998. * self._ssl_protocol._pause_reading()
  112999. *
  113000. * def resume_reading(self): # <<<<<<<<<<<<<<
  113001. * """Resume the receiving end.
  113002. *
  113003. */
  113004. /* function exit code */
  113005. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  113006. goto __pyx_L0;
  113007. __pyx_L1_error:;
  113008. __Pyx_XDECREF(__pyx_t_1);
  113009. __Pyx_AddTraceback("uvloop.loop._SSLProtocolTransport.resume_reading", __pyx_clineno, __pyx_lineno, __pyx_filename);
  113010. __pyx_r = NULL;
  113011. __pyx_L0:;
  113012. __Pyx_XGIVEREF(__pyx_r);
  113013. __Pyx_RefNannyFinishContext();
  113014. return __pyx_r;
  113015. }
  113016. /* "uvloop/sslproto.pyx":76
  113017. * self._ssl_protocol._resume_reading()
  113018. *
  113019. * def set_write_buffer_limits(self, high=None, low=None): # <<<<<<<<<<<<<<
  113020. * """Set the high- and low-water limits for write flow control.
  113021. *
  113022. */
  113023. /* Python wrapper */
  113024. static PyObject *__pyx_pw_6uvloop_4loop_21_SSLProtocolTransport_21set_write_buffer_limits(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  113025. static char __pyx_doc_6uvloop_4loop_21_SSLProtocolTransport_20set_write_buffer_limits[] = "_SSLProtocolTransport.set_write_buffer_limits(self, high=None, low=None)\nSet the high- and low-water limits for write flow control.\n\n These two values control when to call the protocol's\n pause_writing() and resume_writing() methods. If specified,\n the low-water limit must be less than or equal to the\n high-water limit. Neither value can be negative.\n\n The defaults are implementation-specific. If only the\n high-water limit is given, the low-water limit defaults to an\n implementation-specific value less than or equal to the\n high-water limit. Setting high to zero forces low to zero as\n well, and causes pause_writing() to be called whenever the\n buffer becomes non-empty. Setting low to zero causes\n resume_writing() to be called only once the buffer is empty.\n Use of zero for either limit is generally sub-optimal as it\n reduces opportunities for doing I/O and computation\n concurrently.\n ";
  113026. static PyObject *__pyx_pw_6uvloop_4loop_21_SSLProtocolTransport_21set_write_buffer_limits(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  113027. PyObject *__pyx_v_high = 0;
  113028. PyObject *__pyx_v_low = 0;
  113029. PyObject *__pyx_r = 0;
  113030. __Pyx_RefNannyDeclarations
  113031. __Pyx_RefNannySetupContext("set_write_buffer_limits (wrapper)", 0);
  113032. {
  113033. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_high,&__pyx_n_s_low,0};
  113034. PyObject* values[2] = {0,0};
  113035. values[0] = ((PyObject *)Py_None);
  113036. values[1] = ((PyObject *)Py_None);
  113037. if (unlikely(__pyx_kwds)) {
  113038. Py_ssize_t kw_args;
  113039. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  113040. switch (pos_args) {
  113041. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  113042. CYTHON_FALLTHROUGH;
  113043. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  113044. CYTHON_FALLTHROUGH;
  113045. case 0: break;
  113046. default: goto __pyx_L5_argtuple_error;
  113047. }
  113048. kw_args = PyDict_Size(__pyx_kwds);
  113049. switch (pos_args) {
  113050. case 0:
  113051. if (kw_args > 0) {
  113052. PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_high);
  113053. if (value) { values[0] = value; kw_args--; }
  113054. }
  113055. CYTHON_FALLTHROUGH;
  113056. case 1:
  113057. if (kw_args > 0) {
  113058. PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_low);
  113059. if (value) { values[1] = value; kw_args--; }
  113060. }
  113061. }
  113062. if (unlikely(kw_args > 0)) {
  113063. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_write_buffer_limits") < 0)) __PYX_ERR(22, 76, __pyx_L3_error)
  113064. }
  113065. } else {
  113066. switch (PyTuple_GET_SIZE(__pyx_args)) {
  113067. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  113068. CYTHON_FALLTHROUGH;
  113069. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  113070. CYTHON_FALLTHROUGH;
  113071. case 0: break;
  113072. default: goto __pyx_L5_argtuple_error;
  113073. }
  113074. }
  113075. __pyx_v_high = values[0];
  113076. __pyx_v_low = values[1];
  113077. }
  113078. goto __pyx_L4_argument_unpacking_done;
  113079. __pyx_L5_argtuple_error:;
  113080. __Pyx_RaiseArgtupleInvalid("set_write_buffer_limits", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(22, 76, __pyx_L3_error)
  113081. __pyx_L3_error:;
  113082. __Pyx_AddTraceback("uvloop.loop._SSLProtocolTransport.set_write_buffer_limits", __pyx_clineno, __pyx_lineno, __pyx_filename);
  113083. __Pyx_RefNannyFinishContext();
  113084. return NULL;
  113085. __pyx_L4_argument_unpacking_done:;
  113086. __pyx_r = __pyx_pf_6uvloop_4loop_21_SSLProtocolTransport_20set_write_buffer_limits(((struct __pyx_obj_6uvloop_4loop__SSLProtocolTransport *)__pyx_v_self), __pyx_v_high, __pyx_v_low);
  113087. /* function exit code */
  113088. __Pyx_RefNannyFinishContext();
  113089. return __pyx_r;
  113090. }
  113091. static PyObject *__pyx_pf_6uvloop_4loop_21_SSLProtocolTransport_20set_write_buffer_limits(struct __pyx_obj_6uvloop_4loop__SSLProtocolTransport *__pyx_v_self, PyObject *__pyx_v_high, PyObject *__pyx_v_low) {
  113092. PyObject *__pyx_r = NULL;
  113093. __Pyx_RefNannyDeclarations
  113094. PyObject *__pyx_t_1 = NULL;
  113095. struct __pyx_opt_args_6uvloop_4loop_11SSLProtocol__set_write_buffer_limits __pyx_t_2;
  113096. __Pyx_RefNannySetupContext("set_write_buffer_limits", 0);
  113097. /* "uvloop/sslproto.pyx":95
  113098. * concurrently.
  113099. * """
  113100. * self._ssl_protocol._set_write_buffer_limits(high, low) # <<<<<<<<<<<<<<
  113101. * self._ssl_protocol._control_app_writing()
  113102. *
  113103. */
  113104. __pyx_t_2.__pyx_n = 2;
  113105. __pyx_t_2.high = __pyx_v_high;
  113106. __pyx_t_2.low = __pyx_v_low;
  113107. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_SSLProtocol *)__pyx_v_self->_ssl_protocol->__pyx_vtab)->_set_write_buffer_limits(__pyx_v_self->_ssl_protocol, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 95, __pyx_L1_error)
  113108. __Pyx_GOTREF(__pyx_t_1);
  113109. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  113110. /* "uvloop/sslproto.pyx":96
  113111. * """
  113112. * self._ssl_protocol._set_write_buffer_limits(high, low)
  113113. * self._ssl_protocol._control_app_writing() # <<<<<<<<<<<<<<
  113114. *
  113115. * def get_write_buffer_limits(self):
  113116. */
  113117. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_SSLProtocol *)__pyx_v_self->_ssl_protocol->__pyx_vtab)->_control_app_writing(__pyx_v_self->_ssl_protocol); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 96, __pyx_L1_error)
  113118. __Pyx_GOTREF(__pyx_t_1);
  113119. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  113120. /* "uvloop/sslproto.pyx":76
  113121. * self._ssl_protocol._resume_reading()
  113122. *
  113123. * def set_write_buffer_limits(self, high=None, low=None): # <<<<<<<<<<<<<<
  113124. * """Set the high- and low-water limits for write flow control.
  113125. *
  113126. */
  113127. /* function exit code */
  113128. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  113129. goto __pyx_L0;
  113130. __pyx_L1_error:;
  113131. __Pyx_XDECREF(__pyx_t_1);
  113132. __Pyx_AddTraceback("uvloop.loop._SSLProtocolTransport.set_write_buffer_limits", __pyx_clineno, __pyx_lineno, __pyx_filename);
  113133. __pyx_r = NULL;
  113134. __pyx_L0:;
  113135. __Pyx_XGIVEREF(__pyx_r);
  113136. __Pyx_RefNannyFinishContext();
  113137. return __pyx_r;
  113138. }
  113139. /* "uvloop/sslproto.pyx":98
  113140. * self._ssl_protocol._control_app_writing()
  113141. *
  113142. * def get_write_buffer_limits(self): # <<<<<<<<<<<<<<
  113143. * return (self._ssl_protocol._outgoing_low_water,
  113144. * self._ssl_protocol._outgoing_high_water)
  113145. */
  113146. /* Python wrapper */
  113147. static PyObject *__pyx_pw_6uvloop_4loop_21_SSLProtocolTransport_23get_write_buffer_limits(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  113148. static char __pyx_doc_6uvloop_4loop_21_SSLProtocolTransport_22get_write_buffer_limits[] = "_SSLProtocolTransport.get_write_buffer_limits(self)";
  113149. static PyObject *__pyx_pw_6uvloop_4loop_21_SSLProtocolTransport_23get_write_buffer_limits(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  113150. PyObject *__pyx_r = 0;
  113151. __Pyx_RefNannyDeclarations
  113152. __Pyx_RefNannySetupContext("get_write_buffer_limits (wrapper)", 0);
  113153. __pyx_r = __pyx_pf_6uvloop_4loop_21_SSLProtocolTransport_22get_write_buffer_limits(((struct __pyx_obj_6uvloop_4loop__SSLProtocolTransport *)__pyx_v_self));
  113154. /* function exit code */
  113155. __Pyx_RefNannyFinishContext();
  113156. return __pyx_r;
  113157. }
  113158. static PyObject *__pyx_pf_6uvloop_4loop_21_SSLProtocolTransport_22get_write_buffer_limits(struct __pyx_obj_6uvloop_4loop__SSLProtocolTransport *__pyx_v_self) {
  113159. PyObject *__pyx_r = NULL;
  113160. __Pyx_RefNannyDeclarations
  113161. PyObject *__pyx_t_1 = NULL;
  113162. PyObject *__pyx_t_2 = NULL;
  113163. PyObject *__pyx_t_3 = NULL;
  113164. __Pyx_RefNannySetupContext("get_write_buffer_limits", 0);
  113165. /* "uvloop/sslproto.pyx":99
  113166. *
  113167. * def get_write_buffer_limits(self):
  113168. * return (self._ssl_protocol._outgoing_low_water, # <<<<<<<<<<<<<<
  113169. * self._ssl_protocol._outgoing_high_water)
  113170. *
  113171. */
  113172. __Pyx_XDECREF(__pyx_r);
  113173. __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_self->_ssl_protocol->_outgoing_low_water); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 99, __pyx_L1_error)
  113174. __Pyx_GOTREF(__pyx_t_1);
  113175. /* "uvloop/sslproto.pyx":100
  113176. * def get_write_buffer_limits(self):
  113177. * return (self._ssl_protocol._outgoing_low_water,
  113178. * self._ssl_protocol._outgoing_high_water) # <<<<<<<<<<<<<<
  113179. *
  113180. * def get_write_buffer_size(self):
  113181. */
  113182. __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_v_self->_ssl_protocol->_outgoing_high_water); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 100, __pyx_L1_error)
  113183. __Pyx_GOTREF(__pyx_t_2);
  113184. /* "uvloop/sslproto.pyx":99
  113185. *
  113186. * def get_write_buffer_limits(self):
  113187. * return (self._ssl_protocol._outgoing_low_water, # <<<<<<<<<<<<<<
  113188. * self._ssl_protocol._outgoing_high_water)
  113189. *
  113190. */
  113191. __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(22, 99, __pyx_L1_error)
  113192. __Pyx_GOTREF(__pyx_t_3);
  113193. __Pyx_GIVEREF(__pyx_t_1);
  113194. PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  113195. __Pyx_GIVEREF(__pyx_t_2);
  113196. PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  113197. __pyx_t_1 = 0;
  113198. __pyx_t_2 = 0;
  113199. __pyx_r = __pyx_t_3;
  113200. __pyx_t_3 = 0;
  113201. goto __pyx_L0;
  113202. /* "uvloop/sslproto.pyx":98
  113203. * self._ssl_protocol._control_app_writing()
  113204. *
  113205. * def get_write_buffer_limits(self): # <<<<<<<<<<<<<<
  113206. * return (self._ssl_protocol._outgoing_low_water,
  113207. * self._ssl_protocol._outgoing_high_water)
  113208. */
  113209. /* function exit code */
  113210. __pyx_L1_error:;
  113211. __Pyx_XDECREF(__pyx_t_1);
  113212. __Pyx_XDECREF(__pyx_t_2);
  113213. __Pyx_XDECREF(__pyx_t_3);
  113214. __Pyx_AddTraceback("uvloop.loop._SSLProtocolTransport.get_write_buffer_limits", __pyx_clineno, __pyx_lineno, __pyx_filename);
  113215. __pyx_r = NULL;
  113216. __pyx_L0:;
  113217. __Pyx_XGIVEREF(__pyx_r);
  113218. __Pyx_RefNannyFinishContext();
  113219. return __pyx_r;
  113220. }
  113221. /* "uvloop/sslproto.pyx":102
  113222. * self._ssl_protocol._outgoing_high_water)
  113223. *
  113224. * def get_write_buffer_size(self): # <<<<<<<<<<<<<<
  113225. * """Return the current size of the write buffers."""
  113226. * return self._ssl_protocol._get_write_buffer_size()
  113227. */
  113228. /* Python wrapper */
  113229. static PyObject *__pyx_pw_6uvloop_4loop_21_SSLProtocolTransport_25get_write_buffer_size(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  113230. static char __pyx_doc_6uvloop_4loop_21_SSLProtocolTransport_24get_write_buffer_size[] = "_SSLProtocolTransport.get_write_buffer_size(self)\nReturn the current size of the write buffers.";
  113231. static PyObject *__pyx_pw_6uvloop_4loop_21_SSLProtocolTransport_25get_write_buffer_size(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  113232. PyObject *__pyx_r = 0;
  113233. __Pyx_RefNannyDeclarations
  113234. __Pyx_RefNannySetupContext("get_write_buffer_size (wrapper)", 0);
  113235. __pyx_r = __pyx_pf_6uvloop_4loop_21_SSLProtocolTransport_24get_write_buffer_size(((struct __pyx_obj_6uvloop_4loop__SSLProtocolTransport *)__pyx_v_self));
  113236. /* function exit code */
  113237. __Pyx_RefNannyFinishContext();
  113238. return __pyx_r;
  113239. }
  113240. static PyObject *__pyx_pf_6uvloop_4loop_21_SSLProtocolTransport_24get_write_buffer_size(struct __pyx_obj_6uvloop_4loop__SSLProtocolTransport *__pyx_v_self) {
  113241. PyObject *__pyx_r = NULL;
  113242. __Pyx_RefNannyDeclarations
  113243. PyObject *__pyx_t_1 = NULL;
  113244. __Pyx_RefNannySetupContext("get_write_buffer_size", 0);
  113245. /* "uvloop/sslproto.pyx":104
  113246. * def get_write_buffer_size(self):
  113247. * """Return the current size of the write buffers."""
  113248. * return self._ssl_protocol._get_write_buffer_size() # <<<<<<<<<<<<<<
  113249. *
  113250. * def set_read_buffer_limits(self, high=None, low=None):
  113251. */
  113252. __Pyx_XDECREF(__pyx_r);
  113253. __pyx_t_1 = __Pyx_PyInt_FromSize_t(((struct __pyx_vtabstruct_6uvloop_4loop_SSLProtocol *)__pyx_v_self->_ssl_protocol->__pyx_vtab)->_get_write_buffer_size(__pyx_v_self->_ssl_protocol)); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 104, __pyx_L1_error)
  113254. __Pyx_GOTREF(__pyx_t_1);
  113255. __pyx_r = __pyx_t_1;
  113256. __pyx_t_1 = 0;
  113257. goto __pyx_L0;
  113258. /* "uvloop/sslproto.pyx":102
  113259. * self._ssl_protocol._outgoing_high_water)
  113260. *
  113261. * def get_write_buffer_size(self): # <<<<<<<<<<<<<<
  113262. * """Return the current size of the write buffers."""
  113263. * return self._ssl_protocol._get_write_buffer_size()
  113264. */
  113265. /* function exit code */
  113266. __pyx_L1_error:;
  113267. __Pyx_XDECREF(__pyx_t_1);
  113268. __Pyx_AddTraceback("uvloop.loop._SSLProtocolTransport.get_write_buffer_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
  113269. __pyx_r = NULL;
  113270. __pyx_L0:;
  113271. __Pyx_XGIVEREF(__pyx_r);
  113272. __Pyx_RefNannyFinishContext();
  113273. return __pyx_r;
  113274. }
  113275. /* "uvloop/sslproto.pyx":106
  113276. * return self._ssl_protocol._get_write_buffer_size()
  113277. *
  113278. * def set_read_buffer_limits(self, high=None, low=None): # <<<<<<<<<<<<<<
  113279. * """Set the high- and low-water limits for read flow control.
  113280. *
  113281. */
  113282. /* Python wrapper */
  113283. static PyObject *__pyx_pw_6uvloop_4loop_21_SSLProtocolTransport_27set_read_buffer_limits(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  113284. static char __pyx_doc_6uvloop_4loop_21_SSLProtocolTransport_26set_read_buffer_limits[] = "_SSLProtocolTransport.set_read_buffer_limits(self, high=None, low=None)\nSet the high- and low-water limits for read flow control.\n\n These two values control when to call the upstream transport's\n pause_reading() and resume_reading() methods. If specified,\n the low-water limit must be less than or equal to the\n high-water limit. Neither value can be negative.\n\n The defaults are implementation-specific. If only the\n high-water limit is given, the low-water limit defaults to an\n implementation-specific value less than or equal to the\n high-water limit. Setting high to zero forces low to zero as\n well, and causes pause_reading() to be called whenever the\n buffer becomes non-empty. Setting low to zero causes\n resume_reading() to be called only once the buffer is empty.\n Use of zero for either limit is generally sub-optimal as it\n reduces opportunities for doing I/O and computation\n concurrently.\n ";
  113285. static PyObject *__pyx_pw_6uvloop_4loop_21_SSLProtocolTransport_27set_read_buffer_limits(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  113286. PyObject *__pyx_v_high = 0;
  113287. PyObject *__pyx_v_low = 0;
  113288. PyObject *__pyx_r = 0;
  113289. __Pyx_RefNannyDeclarations
  113290. __Pyx_RefNannySetupContext("set_read_buffer_limits (wrapper)", 0);
  113291. {
  113292. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_high,&__pyx_n_s_low,0};
  113293. PyObject* values[2] = {0,0};
  113294. values[0] = ((PyObject *)Py_None);
  113295. values[1] = ((PyObject *)Py_None);
  113296. if (unlikely(__pyx_kwds)) {
  113297. Py_ssize_t kw_args;
  113298. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  113299. switch (pos_args) {
  113300. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  113301. CYTHON_FALLTHROUGH;
  113302. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  113303. CYTHON_FALLTHROUGH;
  113304. case 0: break;
  113305. default: goto __pyx_L5_argtuple_error;
  113306. }
  113307. kw_args = PyDict_Size(__pyx_kwds);
  113308. switch (pos_args) {
  113309. case 0:
  113310. if (kw_args > 0) {
  113311. PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_high);
  113312. if (value) { values[0] = value; kw_args--; }
  113313. }
  113314. CYTHON_FALLTHROUGH;
  113315. case 1:
  113316. if (kw_args > 0) {
  113317. PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_low);
  113318. if (value) { values[1] = value; kw_args--; }
  113319. }
  113320. }
  113321. if (unlikely(kw_args > 0)) {
  113322. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_read_buffer_limits") < 0)) __PYX_ERR(22, 106, __pyx_L3_error)
  113323. }
  113324. } else {
  113325. switch (PyTuple_GET_SIZE(__pyx_args)) {
  113326. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  113327. CYTHON_FALLTHROUGH;
  113328. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  113329. CYTHON_FALLTHROUGH;
  113330. case 0: break;
  113331. default: goto __pyx_L5_argtuple_error;
  113332. }
  113333. }
  113334. __pyx_v_high = values[0];
  113335. __pyx_v_low = values[1];
  113336. }
  113337. goto __pyx_L4_argument_unpacking_done;
  113338. __pyx_L5_argtuple_error:;
  113339. __Pyx_RaiseArgtupleInvalid("set_read_buffer_limits", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(22, 106, __pyx_L3_error)
  113340. __pyx_L3_error:;
  113341. __Pyx_AddTraceback("uvloop.loop._SSLProtocolTransport.set_read_buffer_limits", __pyx_clineno, __pyx_lineno, __pyx_filename);
  113342. __Pyx_RefNannyFinishContext();
  113343. return NULL;
  113344. __pyx_L4_argument_unpacking_done:;
  113345. __pyx_r = __pyx_pf_6uvloop_4loop_21_SSLProtocolTransport_26set_read_buffer_limits(((struct __pyx_obj_6uvloop_4loop__SSLProtocolTransport *)__pyx_v_self), __pyx_v_high, __pyx_v_low);
  113346. /* function exit code */
  113347. __Pyx_RefNannyFinishContext();
  113348. return __pyx_r;
  113349. }
  113350. static PyObject *__pyx_pf_6uvloop_4loop_21_SSLProtocolTransport_26set_read_buffer_limits(struct __pyx_obj_6uvloop_4loop__SSLProtocolTransport *__pyx_v_self, PyObject *__pyx_v_high, PyObject *__pyx_v_low) {
  113351. PyObject *__pyx_r = NULL;
  113352. __Pyx_RefNannyDeclarations
  113353. PyObject *__pyx_t_1 = NULL;
  113354. struct __pyx_opt_args_6uvloop_4loop_11SSLProtocol__set_read_buffer_limits __pyx_t_2;
  113355. __Pyx_RefNannySetupContext("set_read_buffer_limits", 0);
  113356. /* "uvloop/sslproto.pyx":125
  113357. * concurrently.
  113358. * """
  113359. * self._ssl_protocol._set_read_buffer_limits(high, low) # <<<<<<<<<<<<<<
  113360. * self._ssl_protocol._control_ssl_reading()
  113361. *
  113362. */
  113363. __pyx_t_2.__pyx_n = 2;
  113364. __pyx_t_2.high = __pyx_v_high;
  113365. __pyx_t_2.low = __pyx_v_low;
  113366. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_SSLProtocol *)__pyx_v_self->_ssl_protocol->__pyx_vtab)->_set_read_buffer_limits(__pyx_v_self->_ssl_protocol, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 125, __pyx_L1_error)
  113367. __Pyx_GOTREF(__pyx_t_1);
  113368. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  113369. /* "uvloop/sslproto.pyx":126
  113370. * """
  113371. * self._ssl_protocol._set_read_buffer_limits(high, low)
  113372. * self._ssl_protocol._control_ssl_reading() # <<<<<<<<<<<<<<
  113373. *
  113374. * def get_read_buffer_limits(self):
  113375. */
  113376. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_SSLProtocol *)__pyx_v_self->_ssl_protocol->__pyx_vtab)->_control_ssl_reading(__pyx_v_self->_ssl_protocol); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 126, __pyx_L1_error)
  113377. __Pyx_GOTREF(__pyx_t_1);
  113378. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  113379. /* "uvloop/sslproto.pyx":106
  113380. * return self._ssl_protocol._get_write_buffer_size()
  113381. *
  113382. * def set_read_buffer_limits(self, high=None, low=None): # <<<<<<<<<<<<<<
  113383. * """Set the high- and low-water limits for read flow control.
  113384. *
  113385. */
  113386. /* function exit code */
  113387. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  113388. goto __pyx_L0;
  113389. __pyx_L1_error:;
  113390. __Pyx_XDECREF(__pyx_t_1);
  113391. __Pyx_AddTraceback("uvloop.loop._SSLProtocolTransport.set_read_buffer_limits", __pyx_clineno, __pyx_lineno, __pyx_filename);
  113392. __pyx_r = NULL;
  113393. __pyx_L0:;
  113394. __Pyx_XGIVEREF(__pyx_r);
  113395. __Pyx_RefNannyFinishContext();
  113396. return __pyx_r;
  113397. }
  113398. /* "uvloop/sslproto.pyx":128
  113399. * self._ssl_protocol._control_ssl_reading()
  113400. *
  113401. * def get_read_buffer_limits(self): # <<<<<<<<<<<<<<
  113402. * return (self._ssl_protocol._incoming_low_water,
  113403. * self._ssl_protocol._incoming_high_water)
  113404. */
  113405. /* Python wrapper */
  113406. static PyObject *__pyx_pw_6uvloop_4loop_21_SSLProtocolTransport_29get_read_buffer_limits(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  113407. static char __pyx_doc_6uvloop_4loop_21_SSLProtocolTransport_28get_read_buffer_limits[] = "_SSLProtocolTransport.get_read_buffer_limits(self)";
  113408. static PyObject *__pyx_pw_6uvloop_4loop_21_SSLProtocolTransport_29get_read_buffer_limits(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  113409. PyObject *__pyx_r = 0;
  113410. __Pyx_RefNannyDeclarations
  113411. __Pyx_RefNannySetupContext("get_read_buffer_limits (wrapper)", 0);
  113412. __pyx_r = __pyx_pf_6uvloop_4loop_21_SSLProtocolTransport_28get_read_buffer_limits(((struct __pyx_obj_6uvloop_4loop__SSLProtocolTransport *)__pyx_v_self));
  113413. /* function exit code */
  113414. __Pyx_RefNannyFinishContext();
  113415. return __pyx_r;
  113416. }
  113417. static PyObject *__pyx_pf_6uvloop_4loop_21_SSLProtocolTransport_28get_read_buffer_limits(struct __pyx_obj_6uvloop_4loop__SSLProtocolTransport *__pyx_v_self) {
  113418. PyObject *__pyx_r = NULL;
  113419. __Pyx_RefNannyDeclarations
  113420. PyObject *__pyx_t_1 = NULL;
  113421. PyObject *__pyx_t_2 = NULL;
  113422. PyObject *__pyx_t_3 = NULL;
  113423. __Pyx_RefNannySetupContext("get_read_buffer_limits", 0);
  113424. /* "uvloop/sslproto.pyx":129
  113425. *
  113426. * def get_read_buffer_limits(self):
  113427. * return (self._ssl_protocol._incoming_low_water, # <<<<<<<<<<<<<<
  113428. * self._ssl_protocol._incoming_high_water)
  113429. *
  113430. */
  113431. __Pyx_XDECREF(__pyx_r);
  113432. __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_self->_ssl_protocol->_incoming_low_water); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 129, __pyx_L1_error)
  113433. __Pyx_GOTREF(__pyx_t_1);
  113434. /* "uvloop/sslproto.pyx":130
  113435. * def get_read_buffer_limits(self):
  113436. * return (self._ssl_protocol._incoming_low_water,
  113437. * self._ssl_protocol._incoming_high_water) # <<<<<<<<<<<<<<
  113438. *
  113439. * def get_read_buffer_size(self):
  113440. */
  113441. __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_v_self->_ssl_protocol->_incoming_high_water); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 130, __pyx_L1_error)
  113442. __Pyx_GOTREF(__pyx_t_2);
  113443. /* "uvloop/sslproto.pyx":129
  113444. *
  113445. * def get_read_buffer_limits(self):
  113446. * return (self._ssl_protocol._incoming_low_water, # <<<<<<<<<<<<<<
  113447. * self._ssl_protocol._incoming_high_water)
  113448. *
  113449. */
  113450. __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(22, 129, __pyx_L1_error)
  113451. __Pyx_GOTREF(__pyx_t_3);
  113452. __Pyx_GIVEREF(__pyx_t_1);
  113453. PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  113454. __Pyx_GIVEREF(__pyx_t_2);
  113455. PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  113456. __pyx_t_1 = 0;
  113457. __pyx_t_2 = 0;
  113458. __pyx_r = __pyx_t_3;
  113459. __pyx_t_3 = 0;
  113460. goto __pyx_L0;
  113461. /* "uvloop/sslproto.pyx":128
  113462. * self._ssl_protocol._control_ssl_reading()
  113463. *
  113464. * def get_read_buffer_limits(self): # <<<<<<<<<<<<<<
  113465. * return (self._ssl_protocol._incoming_low_water,
  113466. * self._ssl_protocol._incoming_high_water)
  113467. */
  113468. /* function exit code */
  113469. __pyx_L1_error:;
  113470. __Pyx_XDECREF(__pyx_t_1);
  113471. __Pyx_XDECREF(__pyx_t_2);
  113472. __Pyx_XDECREF(__pyx_t_3);
  113473. __Pyx_AddTraceback("uvloop.loop._SSLProtocolTransport.get_read_buffer_limits", __pyx_clineno, __pyx_lineno, __pyx_filename);
  113474. __pyx_r = NULL;
  113475. __pyx_L0:;
  113476. __Pyx_XGIVEREF(__pyx_r);
  113477. __Pyx_RefNannyFinishContext();
  113478. return __pyx_r;
  113479. }
  113480. /* "uvloop/sslproto.pyx":132
  113481. * self._ssl_protocol._incoming_high_water)
  113482. *
  113483. * def get_read_buffer_size(self): # <<<<<<<<<<<<<<
  113484. * """Return the current size of the read buffer."""
  113485. * return self._ssl_protocol._get_read_buffer_size()
  113486. */
  113487. /* Python wrapper */
  113488. static PyObject *__pyx_pw_6uvloop_4loop_21_SSLProtocolTransport_31get_read_buffer_size(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  113489. static char __pyx_doc_6uvloop_4loop_21_SSLProtocolTransport_30get_read_buffer_size[] = "_SSLProtocolTransport.get_read_buffer_size(self)\nReturn the current size of the read buffer.";
  113490. static PyObject *__pyx_pw_6uvloop_4loop_21_SSLProtocolTransport_31get_read_buffer_size(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  113491. PyObject *__pyx_r = 0;
  113492. __Pyx_RefNannyDeclarations
  113493. __Pyx_RefNannySetupContext("get_read_buffer_size (wrapper)", 0);
  113494. __pyx_r = __pyx_pf_6uvloop_4loop_21_SSLProtocolTransport_30get_read_buffer_size(((struct __pyx_obj_6uvloop_4loop__SSLProtocolTransport *)__pyx_v_self));
  113495. /* function exit code */
  113496. __Pyx_RefNannyFinishContext();
  113497. return __pyx_r;
  113498. }
  113499. static PyObject *__pyx_pf_6uvloop_4loop_21_SSLProtocolTransport_30get_read_buffer_size(struct __pyx_obj_6uvloop_4loop__SSLProtocolTransport *__pyx_v_self) {
  113500. PyObject *__pyx_r = NULL;
  113501. __Pyx_RefNannyDeclarations
  113502. PyObject *__pyx_t_1 = NULL;
  113503. __Pyx_RefNannySetupContext("get_read_buffer_size", 0);
  113504. /* "uvloop/sslproto.pyx":134
  113505. * def get_read_buffer_size(self):
  113506. * """Return the current size of the read buffer."""
  113507. * return self._ssl_protocol._get_read_buffer_size() # <<<<<<<<<<<<<<
  113508. *
  113509. * @property
  113510. */
  113511. __Pyx_XDECREF(__pyx_r);
  113512. __pyx_t_1 = __Pyx_PyInt_FromSize_t(((struct __pyx_vtabstruct_6uvloop_4loop_SSLProtocol *)__pyx_v_self->_ssl_protocol->__pyx_vtab)->_get_read_buffer_size(__pyx_v_self->_ssl_protocol)); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 134, __pyx_L1_error)
  113513. __Pyx_GOTREF(__pyx_t_1);
  113514. __pyx_r = __pyx_t_1;
  113515. __pyx_t_1 = 0;
  113516. goto __pyx_L0;
  113517. /* "uvloop/sslproto.pyx":132
  113518. * self._ssl_protocol._incoming_high_water)
  113519. *
  113520. * def get_read_buffer_size(self): # <<<<<<<<<<<<<<
  113521. * """Return the current size of the read buffer."""
  113522. * return self._ssl_protocol._get_read_buffer_size()
  113523. */
  113524. /* function exit code */
  113525. __pyx_L1_error:;
  113526. __Pyx_XDECREF(__pyx_t_1);
  113527. __Pyx_AddTraceback("uvloop.loop._SSLProtocolTransport.get_read_buffer_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
  113528. __pyx_r = NULL;
  113529. __pyx_L0:;
  113530. __Pyx_XGIVEREF(__pyx_r);
  113531. __Pyx_RefNannyFinishContext();
  113532. return __pyx_r;
  113533. }
  113534. /* "uvloop/sslproto.pyx":137
  113535. *
  113536. * @property
  113537. * def _protocol_paused(self): # <<<<<<<<<<<<<<
  113538. * # Required for sendfile fallback pause_writing/resume_writing logic
  113539. * return self._ssl_protocol._app_writing_paused
  113540. */
  113541. /* Python wrapper */
  113542. static PyObject *__pyx_pw_6uvloop_4loop_21_SSLProtocolTransport_16_protocol_paused_1__get__(PyObject *__pyx_v_self); /*proto*/
  113543. static PyObject *__pyx_pw_6uvloop_4loop_21_SSLProtocolTransport_16_protocol_paused_1__get__(PyObject *__pyx_v_self) {
  113544. PyObject *__pyx_r = 0;
  113545. __Pyx_RefNannyDeclarations
  113546. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  113547. __pyx_r = __pyx_pf_6uvloop_4loop_21_SSLProtocolTransport_16_protocol_paused___get__(((struct __pyx_obj_6uvloop_4loop__SSLProtocolTransport *)__pyx_v_self));
  113548. /* function exit code */
  113549. __Pyx_RefNannyFinishContext();
  113550. return __pyx_r;
  113551. }
  113552. static PyObject *__pyx_pf_6uvloop_4loop_21_SSLProtocolTransport_16_protocol_paused___get__(struct __pyx_obj_6uvloop_4loop__SSLProtocolTransport *__pyx_v_self) {
  113553. PyObject *__pyx_r = NULL;
  113554. __Pyx_RefNannyDeclarations
  113555. PyObject *__pyx_t_1 = NULL;
  113556. __Pyx_RefNannySetupContext("__get__", 0);
  113557. /* "uvloop/sslproto.pyx":139
  113558. * def _protocol_paused(self):
  113559. * # Required for sendfile fallback pause_writing/resume_writing logic
  113560. * return self._ssl_protocol._app_writing_paused # <<<<<<<<<<<<<<
  113561. *
  113562. * def write(self, data):
  113563. */
  113564. __Pyx_XDECREF(__pyx_r);
  113565. __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->_ssl_protocol->_app_writing_paused); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 139, __pyx_L1_error)
  113566. __Pyx_GOTREF(__pyx_t_1);
  113567. __pyx_r = __pyx_t_1;
  113568. __pyx_t_1 = 0;
  113569. goto __pyx_L0;
  113570. /* "uvloop/sslproto.pyx":137
  113571. *
  113572. * @property
  113573. * def _protocol_paused(self): # <<<<<<<<<<<<<<
  113574. * # Required for sendfile fallback pause_writing/resume_writing logic
  113575. * return self._ssl_protocol._app_writing_paused
  113576. */
  113577. /* function exit code */
  113578. __pyx_L1_error:;
  113579. __Pyx_XDECREF(__pyx_t_1);
  113580. __Pyx_AddTraceback("uvloop.loop._SSLProtocolTransport._protocol_paused.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  113581. __pyx_r = NULL;
  113582. __pyx_L0:;
  113583. __Pyx_XGIVEREF(__pyx_r);
  113584. __Pyx_RefNannyFinishContext();
  113585. return __pyx_r;
  113586. }
  113587. /* "uvloop/sslproto.pyx":141
  113588. * return self._ssl_protocol._app_writing_paused
  113589. *
  113590. * def write(self, data): # <<<<<<<<<<<<<<
  113591. * """Write some data bytes to the transport.
  113592. *
  113593. */
  113594. /* Python wrapper */
  113595. static PyObject *__pyx_pw_6uvloop_4loop_21_SSLProtocolTransport_33write(PyObject *__pyx_v_self, PyObject *__pyx_v_data); /*proto*/
  113596. static char __pyx_doc_6uvloop_4loop_21_SSLProtocolTransport_32write[] = "_SSLProtocolTransport.write(self, data)\nWrite some data bytes to the transport.\n\n This does not block; it buffers the data and arranges for it\n to be sent out asynchronously.\n ";
  113597. static PyObject *__pyx_pw_6uvloop_4loop_21_SSLProtocolTransport_33write(PyObject *__pyx_v_self, PyObject *__pyx_v_data) {
  113598. PyObject *__pyx_r = 0;
  113599. __Pyx_RefNannyDeclarations
  113600. __Pyx_RefNannySetupContext("write (wrapper)", 0);
  113601. __pyx_r = __pyx_pf_6uvloop_4loop_21_SSLProtocolTransport_32write(((struct __pyx_obj_6uvloop_4loop__SSLProtocolTransport *)__pyx_v_self), ((PyObject *)__pyx_v_data));
  113602. /* function exit code */
  113603. __Pyx_RefNannyFinishContext();
  113604. return __pyx_r;
  113605. }
  113606. static PyObject *__pyx_pf_6uvloop_4loop_21_SSLProtocolTransport_32write(struct __pyx_obj_6uvloop_4loop__SSLProtocolTransport *__pyx_v_self, PyObject *__pyx_v_data) {
  113607. PyObject *__pyx_r = NULL;
  113608. __Pyx_RefNannyDeclarations
  113609. PyObject *__pyx_t_1 = NULL;
  113610. int __pyx_t_2;
  113611. int __pyx_t_3;
  113612. int __pyx_t_4;
  113613. PyObject *__pyx_t_5 = NULL;
  113614. __Pyx_RefNannySetupContext("write", 0);
  113615. /* "uvloop/sslproto.pyx":147
  113616. * to be sent out asynchronously.
  113617. * """
  113618. * if not isinstance(data, (bytes, bytearray, memoryview)): # <<<<<<<<<<<<<<
  113619. * raise TypeError(f"data: expecting a bytes-like instance, "
  113620. * f"got {type(data).__name__}")
  113621. */
  113622. __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_memoryview); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 147, __pyx_L1_error)
  113623. __Pyx_GOTREF(__pyx_t_1);
  113624. __pyx_t_3 = PyBytes_Check(__pyx_v_data);
  113625. __pyx_t_4 = (__pyx_t_3 != 0);
  113626. if (!__pyx_t_4) {
  113627. } else {
  113628. __pyx_t_2 = __pyx_t_4;
  113629. goto __pyx_L4_bool_binop_done;
  113630. }
  113631. __pyx_t_4 = PyByteArray_Check(__pyx_v_data);
  113632. __pyx_t_3 = (__pyx_t_4 != 0);
  113633. if (!__pyx_t_3) {
  113634. } else {
  113635. __pyx_t_2 = __pyx_t_3;
  113636. goto __pyx_L4_bool_binop_done;
  113637. }
  113638. __pyx_t_3 = PyObject_IsInstance(__pyx_v_data, __pyx_t_1);
  113639. __pyx_t_4 = (__pyx_t_3 != 0);
  113640. __pyx_t_2 = __pyx_t_4;
  113641. __pyx_L4_bool_binop_done:;
  113642. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  113643. __pyx_t_4 = ((!(__pyx_t_2 != 0)) != 0);
  113644. if (unlikely(__pyx_t_4)) {
  113645. /* "uvloop/sslproto.pyx":149
  113646. * if not isinstance(data, (bytes, bytearray, memoryview)):
  113647. * raise TypeError(f"data: expecting a bytes-like instance, "
  113648. * f"got {type(data).__name__}") # <<<<<<<<<<<<<<
  113649. * if not data:
  113650. * return
  113651. */
  113652. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(__pyx_v_data)), __pyx_n_s_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 149, __pyx_L1_error)
  113653. __Pyx_GOTREF(__pyx_t_1);
  113654. __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_1, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(22, 149, __pyx_L1_error)
  113655. __Pyx_GOTREF(__pyx_t_5);
  113656. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  113657. /* "uvloop/sslproto.pyx":148
  113658. * """
  113659. * if not isinstance(data, (bytes, bytearray, memoryview)):
  113660. * raise TypeError(f"data: expecting a bytes-like instance, " # <<<<<<<<<<<<<<
  113661. * f"got {type(data).__name__}")
  113662. * if not data:
  113663. */
  113664. __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_kp_u_data_expecting_a_bytes_like_inst, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 148, __pyx_L1_error)
  113665. __Pyx_GOTREF(__pyx_t_1);
  113666. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  113667. __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(22, 148, __pyx_L1_error)
  113668. __Pyx_GOTREF(__pyx_t_5);
  113669. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  113670. __Pyx_Raise(__pyx_t_5, 0, 0, 0);
  113671. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  113672. __PYX_ERR(22, 148, __pyx_L1_error)
  113673. /* "uvloop/sslproto.pyx":147
  113674. * to be sent out asynchronously.
  113675. * """
  113676. * if not isinstance(data, (bytes, bytearray, memoryview)): # <<<<<<<<<<<<<<
  113677. * raise TypeError(f"data: expecting a bytes-like instance, "
  113678. * f"got {type(data).__name__}")
  113679. */
  113680. }
  113681. /* "uvloop/sslproto.pyx":150
  113682. * raise TypeError(f"data: expecting a bytes-like instance, "
  113683. * f"got {type(data).__name__}")
  113684. * if not data: # <<<<<<<<<<<<<<
  113685. * return
  113686. * self._ssl_protocol._write_appdata((data,))
  113687. */
  113688. __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_data); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(22, 150, __pyx_L1_error)
  113689. __pyx_t_2 = ((!__pyx_t_4) != 0);
  113690. if (__pyx_t_2) {
  113691. /* "uvloop/sslproto.pyx":151
  113692. * f"got {type(data).__name__}")
  113693. * if not data:
  113694. * return # <<<<<<<<<<<<<<
  113695. * self._ssl_protocol._write_appdata((data,))
  113696. *
  113697. */
  113698. __Pyx_XDECREF(__pyx_r);
  113699. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  113700. goto __pyx_L0;
  113701. /* "uvloop/sslproto.pyx":150
  113702. * raise TypeError(f"data: expecting a bytes-like instance, "
  113703. * f"got {type(data).__name__}")
  113704. * if not data: # <<<<<<<<<<<<<<
  113705. * return
  113706. * self._ssl_protocol._write_appdata((data,))
  113707. */
  113708. }
  113709. /* "uvloop/sslproto.pyx":152
  113710. * if not data:
  113711. * return
  113712. * self._ssl_protocol._write_appdata((data,)) # <<<<<<<<<<<<<<
  113713. *
  113714. * def writelines(self, list_of_data):
  113715. */
  113716. __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(22, 152, __pyx_L1_error)
  113717. __Pyx_GOTREF(__pyx_t_5);
  113718. __Pyx_INCREF(__pyx_v_data);
  113719. __Pyx_GIVEREF(__pyx_v_data);
  113720. PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_data);
  113721. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_SSLProtocol *)__pyx_v_self->_ssl_protocol->__pyx_vtab)->_write_appdata(__pyx_v_self->_ssl_protocol, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 152, __pyx_L1_error)
  113722. __Pyx_GOTREF(__pyx_t_1);
  113723. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  113724. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  113725. /* "uvloop/sslproto.pyx":141
  113726. * return self._ssl_protocol._app_writing_paused
  113727. *
  113728. * def write(self, data): # <<<<<<<<<<<<<<
  113729. * """Write some data bytes to the transport.
  113730. *
  113731. */
  113732. /* function exit code */
  113733. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  113734. goto __pyx_L0;
  113735. __pyx_L1_error:;
  113736. __Pyx_XDECREF(__pyx_t_1);
  113737. __Pyx_XDECREF(__pyx_t_5);
  113738. __Pyx_AddTraceback("uvloop.loop._SSLProtocolTransport.write", __pyx_clineno, __pyx_lineno, __pyx_filename);
  113739. __pyx_r = NULL;
  113740. __pyx_L0:;
  113741. __Pyx_XGIVEREF(__pyx_r);
  113742. __Pyx_RefNannyFinishContext();
  113743. return __pyx_r;
  113744. }
  113745. /* "uvloop/sslproto.pyx":154
  113746. * self._ssl_protocol._write_appdata((data,))
  113747. *
  113748. * def writelines(self, list_of_data): # <<<<<<<<<<<<<<
  113749. * """Write a list (or any iterable) of data bytes to the transport.
  113750. *
  113751. */
  113752. /* Python wrapper */
  113753. static PyObject *__pyx_pw_6uvloop_4loop_21_SSLProtocolTransport_35writelines(PyObject *__pyx_v_self, PyObject *__pyx_v_list_of_data); /*proto*/
  113754. static char __pyx_doc_6uvloop_4loop_21_SSLProtocolTransport_34writelines[] = "_SSLProtocolTransport.writelines(self, list_of_data)\nWrite a list (or any iterable) of data bytes to the transport.\n\n The default implementation concatenates the arguments and\n calls write() on the result.\n ";
  113755. static PyObject *__pyx_pw_6uvloop_4loop_21_SSLProtocolTransport_35writelines(PyObject *__pyx_v_self, PyObject *__pyx_v_list_of_data) {
  113756. PyObject *__pyx_r = 0;
  113757. __Pyx_RefNannyDeclarations
  113758. __Pyx_RefNannySetupContext("writelines (wrapper)", 0);
  113759. __pyx_r = __pyx_pf_6uvloop_4loop_21_SSLProtocolTransport_34writelines(((struct __pyx_obj_6uvloop_4loop__SSLProtocolTransport *)__pyx_v_self), ((PyObject *)__pyx_v_list_of_data));
  113760. /* function exit code */
  113761. __Pyx_RefNannyFinishContext();
  113762. return __pyx_r;
  113763. }
  113764. static PyObject *__pyx_pf_6uvloop_4loop_21_SSLProtocolTransport_34writelines(struct __pyx_obj_6uvloop_4loop__SSLProtocolTransport *__pyx_v_self, PyObject *__pyx_v_list_of_data) {
  113765. PyObject *__pyx_r = NULL;
  113766. __Pyx_RefNannyDeclarations
  113767. PyObject *__pyx_t_1 = NULL;
  113768. __Pyx_RefNannySetupContext("writelines", 0);
  113769. /* "uvloop/sslproto.pyx":160
  113770. * calls write() on the result.
  113771. * """
  113772. * self._ssl_protocol._write_appdata(list_of_data) # <<<<<<<<<<<<<<
  113773. *
  113774. * def write_eof(self):
  113775. */
  113776. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_SSLProtocol *)__pyx_v_self->_ssl_protocol->__pyx_vtab)->_write_appdata(__pyx_v_self->_ssl_protocol, __pyx_v_list_of_data); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 160, __pyx_L1_error)
  113777. __Pyx_GOTREF(__pyx_t_1);
  113778. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  113779. /* "uvloop/sslproto.pyx":154
  113780. * self._ssl_protocol._write_appdata((data,))
  113781. *
  113782. * def writelines(self, list_of_data): # <<<<<<<<<<<<<<
  113783. * """Write a list (or any iterable) of data bytes to the transport.
  113784. *
  113785. */
  113786. /* function exit code */
  113787. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  113788. goto __pyx_L0;
  113789. __pyx_L1_error:;
  113790. __Pyx_XDECREF(__pyx_t_1);
  113791. __Pyx_AddTraceback("uvloop.loop._SSLProtocolTransport.writelines", __pyx_clineno, __pyx_lineno, __pyx_filename);
  113792. __pyx_r = NULL;
  113793. __pyx_L0:;
  113794. __Pyx_XGIVEREF(__pyx_r);
  113795. __Pyx_RefNannyFinishContext();
  113796. return __pyx_r;
  113797. }
  113798. /* "uvloop/sslproto.pyx":162
  113799. * self._ssl_protocol._write_appdata(list_of_data)
  113800. *
  113801. * def write_eof(self): # <<<<<<<<<<<<<<
  113802. * """Close the write end after flushing buffered data.
  113803. *
  113804. */
  113805. /* Python wrapper */
  113806. static PyObject *__pyx_pw_6uvloop_4loop_21_SSLProtocolTransport_37write_eof(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  113807. static char __pyx_doc_6uvloop_4loop_21_SSLProtocolTransport_36write_eof[] = "_SSLProtocolTransport.write_eof(self)\nClose the write end after flushing buffered data.\n\n This raises :exc:`NotImplementedError` right now.\n ";
  113808. static PyObject *__pyx_pw_6uvloop_4loop_21_SSLProtocolTransport_37write_eof(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  113809. PyObject *__pyx_r = 0;
  113810. __Pyx_RefNannyDeclarations
  113811. __Pyx_RefNannySetupContext("write_eof (wrapper)", 0);
  113812. __pyx_r = __pyx_pf_6uvloop_4loop_21_SSLProtocolTransport_36write_eof(((struct __pyx_obj_6uvloop_4loop__SSLProtocolTransport *)__pyx_v_self));
  113813. /* function exit code */
  113814. __Pyx_RefNannyFinishContext();
  113815. return __pyx_r;
  113816. }
  113817. static PyObject *__pyx_pf_6uvloop_4loop_21_SSLProtocolTransport_36write_eof(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop__SSLProtocolTransport *__pyx_v_self) {
  113818. PyObject *__pyx_r = NULL;
  113819. __Pyx_RefNannyDeclarations
  113820. __Pyx_RefNannySetupContext("write_eof", 0);
  113821. /* "uvloop/sslproto.pyx":167
  113822. * This raises :exc:`NotImplementedError` right now.
  113823. * """
  113824. * raise NotImplementedError # <<<<<<<<<<<<<<
  113825. *
  113826. * def can_write_eof(self):
  113827. */
  113828. __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0);
  113829. __PYX_ERR(22, 167, __pyx_L1_error)
  113830. /* "uvloop/sslproto.pyx":162
  113831. * self._ssl_protocol._write_appdata(list_of_data)
  113832. *
  113833. * def write_eof(self): # <<<<<<<<<<<<<<
  113834. * """Close the write end after flushing buffered data.
  113835. *
  113836. */
  113837. /* function exit code */
  113838. __pyx_L1_error:;
  113839. __Pyx_AddTraceback("uvloop.loop._SSLProtocolTransport.write_eof", __pyx_clineno, __pyx_lineno, __pyx_filename);
  113840. __pyx_r = NULL;
  113841. __Pyx_XGIVEREF(__pyx_r);
  113842. __Pyx_RefNannyFinishContext();
  113843. return __pyx_r;
  113844. }
  113845. /* "uvloop/sslproto.pyx":169
  113846. * raise NotImplementedError
  113847. *
  113848. * def can_write_eof(self): # <<<<<<<<<<<<<<
  113849. * """Return True if this transport supports write_eof(), False if not."""
  113850. * return False
  113851. */
  113852. /* Python wrapper */
  113853. static PyObject *__pyx_pw_6uvloop_4loop_21_SSLProtocolTransport_39can_write_eof(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  113854. static char __pyx_doc_6uvloop_4loop_21_SSLProtocolTransport_38can_write_eof[] = "_SSLProtocolTransport.can_write_eof(self)\nReturn True if this transport supports write_eof(), False if not.";
  113855. static PyObject *__pyx_pw_6uvloop_4loop_21_SSLProtocolTransport_39can_write_eof(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  113856. PyObject *__pyx_r = 0;
  113857. __Pyx_RefNannyDeclarations
  113858. __Pyx_RefNannySetupContext("can_write_eof (wrapper)", 0);
  113859. __pyx_r = __pyx_pf_6uvloop_4loop_21_SSLProtocolTransport_38can_write_eof(((struct __pyx_obj_6uvloop_4loop__SSLProtocolTransport *)__pyx_v_self));
  113860. /* function exit code */
  113861. __Pyx_RefNannyFinishContext();
  113862. return __pyx_r;
  113863. }
  113864. static PyObject *__pyx_pf_6uvloop_4loop_21_SSLProtocolTransport_38can_write_eof(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop__SSLProtocolTransport *__pyx_v_self) {
  113865. PyObject *__pyx_r = NULL;
  113866. __Pyx_RefNannyDeclarations
  113867. __Pyx_RefNannySetupContext("can_write_eof", 0);
  113868. /* "uvloop/sslproto.pyx":171
  113869. * def can_write_eof(self):
  113870. * """Return True if this transport supports write_eof(), False if not."""
  113871. * return False # <<<<<<<<<<<<<<
  113872. *
  113873. * def abort(self):
  113874. */
  113875. __Pyx_XDECREF(__pyx_r);
  113876. __Pyx_INCREF(Py_False);
  113877. __pyx_r = Py_False;
  113878. goto __pyx_L0;
  113879. /* "uvloop/sslproto.pyx":169
  113880. * raise NotImplementedError
  113881. *
  113882. * def can_write_eof(self): # <<<<<<<<<<<<<<
  113883. * """Return True if this transport supports write_eof(), False if not."""
  113884. * return False
  113885. */
  113886. /* function exit code */
  113887. __pyx_L0:;
  113888. __Pyx_XGIVEREF(__pyx_r);
  113889. __Pyx_RefNannyFinishContext();
  113890. return __pyx_r;
  113891. }
  113892. /* "uvloop/sslproto.pyx":173
  113893. * return False
  113894. *
  113895. * def abort(self): # <<<<<<<<<<<<<<
  113896. * """Close the transport immediately.
  113897. *
  113898. */
  113899. /* Python wrapper */
  113900. static PyObject *__pyx_pw_6uvloop_4loop_21_SSLProtocolTransport_41abort(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  113901. static char __pyx_doc_6uvloop_4loop_21_SSLProtocolTransport_40abort[] = "_SSLProtocolTransport.abort(self)\nClose the transport immediately.\n\n Buffered data will be lost. No more data will be received.\n The protocol's connection_lost() method will (eventually) be\n called with None as its argument.\n ";
  113902. static PyObject *__pyx_pw_6uvloop_4loop_21_SSLProtocolTransport_41abort(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  113903. PyObject *__pyx_r = 0;
  113904. __Pyx_RefNannyDeclarations
  113905. __Pyx_RefNannySetupContext("abort (wrapper)", 0);
  113906. __pyx_r = __pyx_pf_6uvloop_4loop_21_SSLProtocolTransport_40abort(((struct __pyx_obj_6uvloop_4loop__SSLProtocolTransport *)__pyx_v_self));
  113907. /* function exit code */
  113908. __Pyx_RefNannyFinishContext();
  113909. return __pyx_r;
  113910. }
  113911. static PyObject *__pyx_pf_6uvloop_4loop_21_SSLProtocolTransport_40abort(struct __pyx_obj_6uvloop_4loop__SSLProtocolTransport *__pyx_v_self) {
  113912. PyObject *__pyx_r = NULL;
  113913. __Pyx_RefNannyDeclarations
  113914. PyObject *__pyx_t_1 = NULL;
  113915. PyObject *__pyx_t_2 = NULL;
  113916. PyObject *__pyx_t_3 = NULL;
  113917. __Pyx_RefNannySetupContext("abort", 0);
  113918. /* "uvloop/sslproto.pyx":180
  113919. * called with None as its argument.
  113920. * """
  113921. * self._force_close(None) # <<<<<<<<<<<<<<
  113922. *
  113923. * def _force_close(self, exc):
  113924. */
  113925. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_force_close); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 180, __pyx_L1_error)
  113926. __Pyx_GOTREF(__pyx_t_2);
  113927. __pyx_t_3 = NULL;
  113928. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
  113929. __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
  113930. if (likely(__pyx_t_3)) {
  113931. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  113932. __Pyx_INCREF(__pyx_t_3);
  113933. __Pyx_INCREF(function);
  113934. __Pyx_DECREF_SET(__pyx_t_2, function);
  113935. }
  113936. }
  113937. __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, Py_None) : __Pyx_PyObject_CallOneArg(__pyx_t_2, Py_None);
  113938. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  113939. if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 180, __pyx_L1_error)
  113940. __Pyx_GOTREF(__pyx_t_1);
  113941. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  113942. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  113943. /* "uvloop/sslproto.pyx":173
  113944. * return False
  113945. *
  113946. * def abort(self): # <<<<<<<<<<<<<<
  113947. * """Close the transport immediately.
  113948. *
  113949. */
  113950. /* function exit code */
  113951. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  113952. goto __pyx_L0;
  113953. __pyx_L1_error:;
  113954. __Pyx_XDECREF(__pyx_t_1);
  113955. __Pyx_XDECREF(__pyx_t_2);
  113956. __Pyx_XDECREF(__pyx_t_3);
  113957. __Pyx_AddTraceback("uvloop.loop._SSLProtocolTransport.abort", __pyx_clineno, __pyx_lineno, __pyx_filename);
  113958. __pyx_r = NULL;
  113959. __pyx_L0:;
  113960. __Pyx_XGIVEREF(__pyx_r);
  113961. __Pyx_RefNannyFinishContext();
  113962. return __pyx_r;
  113963. }
  113964. /* "uvloop/sslproto.pyx":182
  113965. * self._force_close(None)
  113966. *
  113967. * def _force_close(self, exc): # <<<<<<<<<<<<<<
  113968. * self._closed = True
  113969. * self._ssl_protocol._abort(exc)
  113970. */
  113971. /* Python wrapper */
  113972. static PyObject *__pyx_pw_6uvloop_4loop_21_SSLProtocolTransport_43_force_close(PyObject *__pyx_v_self, PyObject *__pyx_v_exc); /*proto*/
  113973. static char __pyx_doc_6uvloop_4loop_21_SSLProtocolTransport_42_force_close[] = "_SSLProtocolTransport._force_close(self, exc)";
  113974. static PyObject *__pyx_pw_6uvloop_4loop_21_SSLProtocolTransport_43_force_close(PyObject *__pyx_v_self, PyObject *__pyx_v_exc) {
  113975. PyObject *__pyx_r = 0;
  113976. __Pyx_RefNannyDeclarations
  113977. __Pyx_RefNannySetupContext("_force_close (wrapper)", 0);
  113978. __pyx_r = __pyx_pf_6uvloop_4loop_21_SSLProtocolTransport_42_force_close(((struct __pyx_obj_6uvloop_4loop__SSLProtocolTransport *)__pyx_v_self), ((PyObject *)__pyx_v_exc));
  113979. /* function exit code */
  113980. __Pyx_RefNannyFinishContext();
  113981. return __pyx_r;
  113982. }
  113983. static PyObject *__pyx_pf_6uvloop_4loop_21_SSLProtocolTransport_42_force_close(struct __pyx_obj_6uvloop_4loop__SSLProtocolTransport *__pyx_v_self, PyObject *__pyx_v_exc) {
  113984. PyObject *__pyx_r = NULL;
  113985. __Pyx_RefNannyDeclarations
  113986. PyObject *__pyx_t_1 = NULL;
  113987. __Pyx_RefNannySetupContext("_force_close", 0);
  113988. /* "uvloop/sslproto.pyx":183
  113989. *
  113990. * def _force_close(self, exc):
  113991. * self._closed = True # <<<<<<<<<<<<<<
  113992. * self._ssl_protocol._abort(exc)
  113993. *
  113994. */
  113995. __pyx_v_self->_closed = 1;
  113996. /* "uvloop/sslproto.pyx":184
  113997. * def _force_close(self, exc):
  113998. * self._closed = True
  113999. * self._ssl_protocol._abort(exc) # <<<<<<<<<<<<<<
  114000. *
  114001. * def _test__append_write_backlog(self, data):
  114002. */
  114003. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_SSLProtocol *)__pyx_v_self->_ssl_protocol->__pyx_vtab)->_abort(__pyx_v_self->_ssl_protocol, __pyx_v_exc); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 184, __pyx_L1_error)
  114004. __Pyx_GOTREF(__pyx_t_1);
  114005. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  114006. /* "uvloop/sslproto.pyx":182
  114007. * self._force_close(None)
  114008. *
  114009. * def _force_close(self, exc): # <<<<<<<<<<<<<<
  114010. * self._closed = True
  114011. * self._ssl_protocol._abort(exc)
  114012. */
  114013. /* function exit code */
  114014. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  114015. goto __pyx_L0;
  114016. __pyx_L1_error:;
  114017. __Pyx_XDECREF(__pyx_t_1);
  114018. __Pyx_AddTraceback("uvloop.loop._SSLProtocolTransport._force_close", __pyx_clineno, __pyx_lineno, __pyx_filename);
  114019. __pyx_r = NULL;
  114020. __pyx_L0:;
  114021. __Pyx_XGIVEREF(__pyx_r);
  114022. __Pyx_RefNannyFinishContext();
  114023. return __pyx_r;
  114024. }
  114025. /* "uvloop/sslproto.pyx":186
  114026. * self._ssl_protocol._abort(exc)
  114027. *
  114028. * def _test__append_write_backlog(self, data): # <<<<<<<<<<<<<<
  114029. * # for test only
  114030. * self._ssl_protocol._write_backlog.append(data)
  114031. */
  114032. /* Python wrapper */
  114033. static PyObject *__pyx_pw_6uvloop_4loop_21_SSLProtocolTransport_45_test__append_write_backlog(PyObject *__pyx_v_self, PyObject *__pyx_v_data); /*proto*/
  114034. static char __pyx_doc_6uvloop_4loop_21_SSLProtocolTransport_44_test__append_write_backlog[] = "_SSLProtocolTransport._test__append_write_backlog(self, data)";
  114035. static PyObject *__pyx_pw_6uvloop_4loop_21_SSLProtocolTransport_45_test__append_write_backlog(PyObject *__pyx_v_self, PyObject *__pyx_v_data) {
  114036. PyObject *__pyx_r = 0;
  114037. __Pyx_RefNannyDeclarations
  114038. __Pyx_RefNannySetupContext("_test__append_write_backlog (wrapper)", 0);
  114039. __pyx_r = __pyx_pf_6uvloop_4loop_21_SSLProtocolTransport_44_test__append_write_backlog(((struct __pyx_obj_6uvloop_4loop__SSLProtocolTransport *)__pyx_v_self), ((PyObject *)__pyx_v_data));
  114040. /* function exit code */
  114041. __Pyx_RefNannyFinishContext();
  114042. return __pyx_r;
  114043. }
  114044. static PyObject *__pyx_pf_6uvloop_4loop_21_SSLProtocolTransport_44_test__append_write_backlog(struct __pyx_obj_6uvloop_4loop__SSLProtocolTransport *__pyx_v_self, PyObject *__pyx_v_data) {
  114045. PyObject *__pyx_r = NULL;
  114046. __Pyx_RefNannyDeclarations
  114047. int __pyx_t_1;
  114048. struct __pyx_obj_6uvloop_4loop_SSLProtocol *__pyx_t_2 = NULL;
  114049. Py_ssize_t __pyx_t_3;
  114050. __Pyx_RefNannySetupContext("_test__append_write_backlog", 0);
  114051. /* "uvloop/sslproto.pyx":188
  114052. * def _test__append_write_backlog(self, data):
  114053. * # for test only
  114054. * self._ssl_protocol._write_backlog.append(data) # <<<<<<<<<<<<<<
  114055. * self._ssl_protocol._write_buffer_size += len(data)
  114056. *
  114057. */
  114058. __pyx_t_1 = __Pyx_PyObject_Append(__pyx_v_self->_ssl_protocol->_write_backlog, __pyx_v_data); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(22, 188, __pyx_L1_error)
  114059. /* "uvloop/sslproto.pyx":189
  114060. * # for test only
  114061. * self._ssl_protocol._write_backlog.append(data)
  114062. * self._ssl_protocol._write_buffer_size += len(data) # <<<<<<<<<<<<<<
  114063. *
  114064. *
  114065. */
  114066. __Pyx_INCREF(((PyObject *)__pyx_v_self->_ssl_protocol));
  114067. __pyx_t_2 = __pyx_v_self->_ssl_protocol;
  114068. __pyx_t_3 = PyObject_Length(__pyx_v_data); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(22, 189, __pyx_L1_error)
  114069. __pyx_t_2->_write_buffer_size = (__pyx_t_2->_write_buffer_size + __pyx_t_3);
  114070. __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  114071. /* "uvloop/sslproto.pyx":186
  114072. * self._ssl_protocol._abort(exc)
  114073. *
  114074. * def _test__append_write_backlog(self, data): # <<<<<<<<<<<<<<
  114075. * # for test only
  114076. * self._ssl_protocol._write_backlog.append(data)
  114077. */
  114078. /* function exit code */
  114079. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  114080. goto __pyx_L0;
  114081. __pyx_L1_error:;
  114082. __Pyx_XDECREF(((PyObject *)__pyx_t_2));
  114083. __Pyx_AddTraceback("uvloop.loop._SSLProtocolTransport._test__append_write_backlog", __pyx_clineno, __pyx_lineno, __pyx_filename);
  114084. __pyx_r = NULL;
  114085. __pyx_L0:;
  114086. __Pyx_XGIVEREF(__pyx_r);
  114087. __Pyx_RefNannyFinishContext();
  114088. return __pyx_r;
  114089. }
  114090. /* "(tree fragment)":1
  114091. * def __reduce_cython__(self): # <<<<<<<<<<<<<<
  114092. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  114093. * def __setstate_cython__(self, __pyx_state):
  114094. */
  114095. /* Python wrapper */
  114096. static PyObject *__pyx_pw_6uvloop_4loop_21_SSLProtocolTransport_47__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  114097. static char __pyx_doc_6uvloop_4loop_21_SSLProtocolTransport_46__reduce_cython__[] = "_SSLProtocolTransport.__reduce_cython__(self)";
  114098. static PyObject *__pyx_pw_6uvloop_4loop_21_SSLProtocolTransport_47__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  114099. PyObject *__pyx_r = 0;
  114100. __Pyx_RefNannyDeclarations
  114101. __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  114102. __pyx_r = __pyx_pf_6uvloop_4loop_21_SSLProtocolTransport_46__reduce_cython__(((struct __pyx_obj_6uvloop_4loop__SSLProtocolTransport *)__pyx_v_self));
  114103. /* function exit code */
  114104. __Pyx_RefNannyFinishContext();
  114105. return __pyx_r;
  114106. }
  114107. static PyObject *__pyx_pf_6uvloop_4loop_21_SSLProtocolTransport_46__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop__SSLProtocolTransport *__pyx_v_self) {
  114108. PyObject *__pyx_r = NULL;
  114109. __Pyx_RefNannyDeclarations
  114110. PyObject *__pyx_t_1 = NULL;
  114111. __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  114112. /* "(tree fragment)":2
  114113. * def __reduce_cython__(self):
  114114. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  114115. * def __setstate_cython__(self, __pyx_state):
  114116. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  114117. */
  114118. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__201, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 2, __pyx_L1_error)
  114119. __Pyx_GOTREF(__pyx_t_1);
  114120. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  114121. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  114122. __PYX_ERR(9, 2, __pyx_L1_error)
  114123. /* "(tree fragment)":1
  114124. * def __reduce_cython__(self): # <<<<<<<<<<<<<<
  114125. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  114126. * def __setstate_cython__(self, __pyx_state):
  114127. */
  114128. /* function exit code */
  114129. __pyx_L1_error:;
  114130. __Pyx_XDECREF(__pyx_t_1);
  114131. __Pyx_AddTraceback("uvloop.loop._SSLProtocolTransport.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  114132. __pyx_r = NULL;
  114133. __Pyx_XGIVEREF(__pyx_r);
  114134. __Pyx_RefNannyFinishContext();
  114135. return __pyx_r;
  114136. }
  114137. /* "(tree fragment)":3
  114138. * def __reduce_cython__(self):
  114139. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  114140. * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
  114141. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  114142. */
  114143. /* Python wrapper */
  114144. static PyObject *__pyx_pw_6uvloop_4loop_21_SSLProtocolTransport_49__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
  114145. static char __pyx_doc_6uvloop_4loop_21_SSLProtocolTransport_48__setstate_cython__[] = "_SSLProtocolTransport.__setstate_cython__(self, __pyx_state)";
  114146. static PyObject *__pyx_pw_6uvloop_4loop_21_SSLProtocolTransport_49__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  114147. PyObject *__pyx_r = 0;
  114148. __Pyx_RefNannyDeclarations
  114149. __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  114150. __pyx_r = __pyx_pf_6uvloop_4loop_21_SSLProtocolTransport_48__setstate_cython__(((struct __pyx_obj_6uvloop_4loop__SSLProtocolTransport *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
  114151. /* function exit code */
  114152. __Pyx_RefNannyFinishContext();
  114153. return __pyx_r;
  114154. }
  114155. static PyObject *__pyx_pf_6uvloop_4loop_21_SSLProtocolTransport_48__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop__SSLProtocolTransport *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  114156. PyObject *__pyx_r = NULL;
  114157. __Pyx_RefNannyDeclarations
  114158. PyObject *__pyx_t_1 = NULL;
  114159. __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  114160. /* "(tree fragment)":4
  114161. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  114162. * def __setstate_cython__(self, __pyx_state):
  114163. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  114164. */
  114165. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__202, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 4, __pyx_L1_error)
  114166. __Pyx_GOTREF(__pyx_t_1);
  114167. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  114168. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  114169. __PYX_ERR(9, 4, __pyx_L1_error)
  114170. /* "(tree fragment)":3
  114171. * def __reduce_cython__(self):
  114172. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  114173. * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
  114174. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  114175. */
  114176. /* function exit code */
  114177. __pyx_L1_error:;
  114178. __Pyx_XDECREF(__pyx_t_1);
  114179. __Pyx_AddTraceback("uvloop.loop._SSLProtocolTransport.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  114180. __pyx_r = NULL;
  114181. __Pyx_XGIVEREF(__pyx_r);
  114182. __Pyx_RefNannyFinishContext();
  114183. return __pyx_r;
  114184. }
  114185. /* "uvloop/sslproto.pyx":199
  114186. * """
  114187. *
  114188. * def __cinit__(self, *args, **kwargs): # <<<<<<<<<<<<<<
  114189. * self._ssl_buffer_len = SSL_READ_MAX_SIZE
  114190. * self._ssl_buffer = <char*>PyMem_RawMalloc(self._ssl_buffer_len)
  114191. */
  114192. /* Python wrapper */
  114193. static int __pyx_pw_6uvloop_4loop_11SSLProtocol_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  114194. static int __pyx_pw_6uvloop_4loop_11SSLProtocol_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  114195. CYTHON_UNUSED PyObject *__pyx_v_args = 0;
  114196. CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
  114197. int __pyx_r;
  114198. __Pyx_RefNannyDeclarations
  114199. __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  114200. if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 1))) return -1;
  114201. __Pyx_INCREF(__pyx_args);
  114202. __pyx_v_args = __pyx_args;
  114203. __pyx_r = __pyx_pf_6uvloop_4loop_11SSLProtocol___cinit__(((struct __pyx_obj_6uvloop_4loop_SSLProtocol *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);
  114204. /* function exit code */
  114205. __Pyx_XDECREF(__pyx_v_args);
  114206. __Pyx_XDECREF(__pyx_v_kwargs);
  114207. __Pyx_RefNannyFinishContext();
  114208. return __pyx_r;
  114209. }
  114210. static int __pyx_pf_6uvloop_4loop_11SSLProtocol___cinit__(struct __pyx_obj_6uvloop_4loop_SSLProtocol *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
  114211. int __pyx_r;
  114212. __Pyx_RefNannyDeclarations
  114213. int __pyx_t_1;
  114214. PyObject *__pyx_t_2 = NULL;
  114215. __Pyx_RefNannySetupContext("__cinit__", 0);
  114216. /* "uvloop/sslproto.pyx":200
  114217. *
  114218. * def __cinit__(self, *args, **kwargs):
  114219. * self._ssl_buffer_len = SSL_READ_MAX_SIZE # <<<<<<<<<<<<<<
  114220. * self._ssl_buffer = <char*>PyMem_RawMalloc(self._ssl_buffer_len)
  114221. * if not self._ssl_buffer:
  114222. */
  114223. __pyx_v_self->_ssl_buffer_len = 0x40000;
  114224. /* "uvloop/sslproto.pyx":201
  114225. * def __cinit__(self, *args, **kwargs):
  114226. * self._ssl_buffer_len = SSL_READ_MAX_SIZE
  114227. * self._ssl_buffer = <char*>PyMem_RawMalloc(self._ssl_buffer_len) # <<<<<<<<<<<<<<
  114228. * if not self._ssl_buffer:
  114229. * raise MemoryError()
  114230. */
  114231. __pyx_v_self->_ssl_buffer = ((char *)PyMem_RawMalloc(__pyx_v_self->_ssl_buffer_len));
  114232. /* "uvloop/sslproto.pyx":202
  114233. * self._ssl_buffer_len = SSL_READ_MAX_SIZE
  114234. * self._ssl_buffer = <char*>PyMem_RawMalloc(self._ssl_buffer_len)
  114235. * if not self._ssl_buffer: # <<<<<<<<<<<<<<
  114236. * raise MemoryError()
  114237. * self._ssl_buffer_view = PyMemoryView_FromMemory(
  114238. */
  114239. __pyx_t_1 = ((!(__pyx_v_self->_ssl_buffer != 0)) != 0);
  114240. if (unlikely(__pyx_t_1)) {
  114241. /* "uvloop/sslproto.pyx":203
  114242. * self._ssl_buffer = <char*>PyMem_RawMalloc(self._ssl_buffer_len)
  114243. * if not self._ssl_buffer:
  114244. * raise MemoryError() # <<<<<<<<<<<<<<
  114245. * self._ssl_buffer_view = PyMemoryView_FromMemory(
  114246. * self._ssl_buffer, self._ssl_buffer_len, PyBUF_WRITE)
  114247. */
  114248. PyErr_NoMemory(); __PYX_ERR(22, 203, __pyx_L1_error)
  114249. /* "uvloop/sslproto.pyx":202
  114250. * self._ssl_buffer_len = SSL_READ_MAX_SIZE
  114251. * self._ssl_buffer = <char*>PyMem_RawMalloc(self._ssl_buffer_len)
  114252. * if not self._ssl_buffer: # <<<<<<<<<<<<<<
  114253. * raise MemoryError()
  114254. * self._ssl_buffer_view = PyMemoryView_FromMemory(
  114255. */
  114256. }
  114257. /* "uvloop/sslproto.pyx":204
  114258. * if not self._ssl_buffer:
  114259. * raise MemoryError()
  114260. * self._ssl_buffer_view = PyMemoryView_FromMemory( # <<<<<<<<<<<<<<
  114261. * self._ssl_buffer, self._ssl_buffer_len, PyBUF_WRITE)
  114262. *
  114263. */
  114264. __pyx_t_2 = PyMemoryView_FromMemory(__pyx_v_self->_ssl_buffer, __pyx_v_self->_ssl_buffer_len, PyBUF_WRITE); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 204, __pyx_L1_error)
  114265. __Pyx_GOTREF(__pyx_t_2);
  114266. __Pyx_GIVEREF(__pyx_t_2);
  114267. __Pyx_GOTREF(__pyx_v_self->_ssl_buffer_view);
  114268. __Pyx_DECREF(__pyx_v_self->_ssl_buffer_view);
  114269. __pyx_v_self->_ssl_buffer_view = __pyx_t_2;
  114270. __pyx_t_2 = 0;
  114271. /* "uvloop/sslproto.pyx":199
  114272. * """
  114273. *
  114274. * def __cinit__(self, *args, **kwargs): # <<<<<<<<<<<<<<
  114275. * self._ssl_buffer_len = SSL_READ_MAX_SIZE
  114276. * self._ssl_buffer = <char*>PyMem_RawMalloc(self._ssl_buffer_len)
  114277. */
  114278. /* function exit code */
  114279. __pyx_r = 0;
  114280. goto __pyx_L0;
  114281. __pyx_L1_error:;
  114282. __Pyx_XDECREF(__pyx_t_2);
  114283. __Pyx_AddTraceback("uvloop.loop.SSLProtocol.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  114284. __pyx_r = -1;
  114285. __pyx_L0:;
  114286. __Pyx_RefNannyFinishContext();
  114287. return __pyx_r;
  114288. }
  114289. /* "uvloop/sslproto.pyx":207
  114290. * self._ssl_buffer, self._ssl_buffer_len, PyBUF_WRITE)
  114291. *
  114292. * def __dealloc__(self): # <<<<<<<<<<<<<<
  114293. * self._ssl_buffer_view = None
  114294. * PyMem_RawFree(self._ssl_buffer)
  114295. */
  114296. /* Python wrapper */
  114297. static void __pyx_pw_6uvloop_4loop_11SSLProtocol_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
  114298. static void __pyx_pw_6uvloop_4loop_11SSLProtocol_3__dealloc__(PyObject *__pyx_v_self) {
  114299. __Pyx_RefNannyDeclarations
  114300. __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  114301. __pyx_pf_6uvloop_4loop_11SSLProtocol_2__dealloc__(((struct __pyx_obj_6uvloop_4loop_SSLProtocol *)__pyx_v_self));
  114302. /* function exit code */
  114303. __Pyx_RefNannyFinishContext();
  114304. }
  114305. static void __pyx_pf_6uvloop_4loop_11SSLProtocol_2__dealloc__(struct __pyx_obj_6uvloop_4loop_SSLProtocol *__pyx_v_self) {
  114306. __Pyx_RefNannyDeclarations
  114307. __Pyx_RefNannySetupContext("__dealloc__", 0);
  114308. /* "uvloop/sslproto.pyx":208
  114309. *
  114310. * def __dealloc__(self):
  114311. * self._ssl_buffer_view = None # <<<<<<<<<<<<<<
  114312. * PyMem_RawFree(self._ssl_buffer)
  114313. * self._ssl_buffer = NULL
  114314. */
  114315. __Pyx_INCREF(Py_None);
  114316. __Pyx_GIVEREF(Py_None);
  114317. __Pyx_GOTREF(__pyx_v_self->_ssl_buffer_view);
  114318. __Pyx_DECREF(__pyx_v_self->_ssl_buffer_view);
  114319. __pyx_v_self->_ssl_buffer_view = Py_None;
  114320. /* "uvloop/sslproto.pyx":209
  114321. * def __dealloc__(self):
  114322. * self._ssl_buffer_view = None
  114323. * PyMem_RawFree(self._ssl_buffer) # <<<<<<<<<<<<<<
  114324. * self._ssl_buffer = NULL
  114325. * self._ssl_buffer_len = 0
  114326. */
  114327. PyMem_RawFree(__pyx_v_self->_ssl_buffer);
  114328. /* "uvloop/sslproto.pyx":210
  114329. * self._ssl_buffer_view = None
  114330. * PyMem_RawFree(self._ssl_buffer)
  114331. * self._ssl_buffer = NULL # <<<<<<<<<<<<<<
  114332. * self._ssl_buffer_len = 0
  114333. *
  114334. */
  114335. __pyx_v_self->_ssl_buffer = NULL;
  114336. /* "uvloop/sslproto.pyx":211
  114337. * PyMem_RawFree(self._ssl_buffer)
  114338. * self._ssl_buffer = NULL
  114339. * self._ssl_buffer_len = 0 # <<<<<<<<<<<<<<
  114340. *
  114341. * def __init__(self, loop, app_protocol, sslcontext, waiter,
  114342. */
  114343. __pyx_v_self->_ssl_buffer_len = 0;
  114344. /* "uvloop/sslproto.pyx":207
  114345. * self._ssl_buffer, self._ssl_buffer_len, PyBUF_WRITE)
  114346. *
  114347. * def __dealloc__(self): # <<<<<<<<<<<<<<
  114348. * self._ssl_buffer_view = None
  114349. * PyMem_RawFree(self._ssl_buffer)
  114350. */
  114351. /* function exit code */
  114352. __Pyx_RefNannyFinishContext();
  114353. }
  114354. /* "uvloop/sslproto.pyx":213
  114355. * self._ssl_buffer_len = 0
  114356. *
  114357. * def __init__(self, loop, app_protocol, sslcontext, waiter, # <<<<<<<<<<<<<<
  114358. * server_side=False, server_hostname=None,
  114359. * call_connection_made=True,
  114360. */
  114361. /* Python wrapper */
  114362. static int __pyx_pw_6uvloop_4loop_11SSLProtocol_5__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  114363. static int __pyx_pw_6uvloop_4loop_11SSLProtocol_5__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  114364. PyObject *__pyx_v_loop = 0;
  114365. PyObject *__pyx_v_app_protocol = 0;
  114366. PyObject *__pyx_v_sslcontext = 0;
  114367. PyObject *__pyx_v_waiter = 0;
  114368. PyObject *__pyx_v_server_side = 0;
  114369. PyObject *__pyx_v_server_hostname = 0;
  114370. PyObject *__pyx_v_call_connection_made = 0;
  114371. PyObject *__pyx_v_ssl_handshake_timeout = 0;
  114372. PyObject *__pyx_v_ssl_shutdown_timeout = 0;
  114373. int __pyx_r;
  114374. __Pyx_RefNannyDeclarations
  114375. __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  114376. {
  114377. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_loop,&__pyx_n_s_app_protocol,&__pyx_n_s_sslcontext,&__pyx_n_s_waiter,&__pyx_n_s_server_side,&__pyx_n_s_server_hostname,&__pyx_n_s_call_connection_made,&__pyx_n_s_ssl_handshake_timeout,&__pyx_n_s_ssl_shutdown_timeout,0};
  114378. PyObject* values[9] = {0,0,0,0,0,0,0,0,0};
  114379. /* "uvloop/sslproto.pyx":214
  114380. *
  114381. * def __init__(self, loop, app_protocol, sslcontext, waiter,
  114382. * server_side=False, server_hostname=None, # <<<<<<<<<<<<<<
  114383. * call_connection_made=True,
  114384. * ssl_handshake_timeout=None,
  114385. */
  114386. values[4] = ((PyObject *)Py_False);
  114387. values[5] = ((PyObject *)Py_None);
  114388. /* "uvloop/sslproto.pyx":215
  114389. * def __init__(self, loop, app_protocol, sslcontext, waiter,
  114390. * server_side=False, server_hostname=None,
  114391. * call_connection_made=True, # <<<<<<<<<<<<<<
  114392. * ssl_handshake_timeout=None,
  114393. * ssl_shutdown_timeout=None):
  114394. */
  114395. values[6] = ((PyObject *)Py_True);
  114396. /* "uvloop/sslproto.pyx":216
  114397. * server_side=False, server_hostname=None,
  114398. * call_connection_made=True,
  114399. * ssl_handshake_timeout=None, # <<<<<<<<<<<<<<
  114400. * ssl_shutdown_timeout=None):
  114401. * if ssl_handshake_timeout is None:
  114402. */
  114403. values[7] = ((PyObject *)Py_None);
  114404. /* "uvloop/sslproto.pyx":217
  114405. * call_connection_made=True,
  114406. * ssl_handshake_timeout=None,
  114407. * ssl_shutdown_timeout=None): # <<<<<<<<<<<<<<
  114408. * if ssl_handshake_timeout is None:
  114409. * ssl_handshake_timeout = SSL_HANDSHAKE_TIMEOUT
  114410. */
  114411. values[8] = ((PyObject *)Py_None);
  114412. if (unlikely(__pyx_kwds)) {
  114413. Py_ssize_t kw_args;
  114414. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  114415. switch (pos_args) {
  114416. case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
  114417. CYTHON_FALLTHROUGH;
  114418. case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
  114419. CYTHON_FALLTHROUGH;
  114420. case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
  114421. CYTHON_FALLTHROUGH;
  114422. case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
  114423. CYTHON_FALLTHROUGH;
  114424. case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
  114425. CYTHON_FALLTHROUGH;
  114426. case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
  114427. CYTHON_FALLTHROUGH;
  114428. case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
  114429. CYTHON_FALLTHROUGH;
  114430. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  114431. CYTHON_FALLTHROUGH;
  114432. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  114433. CYTHON_FALLTHROUGH;
  114434. case 0: break;
  114435. default: goto __pyx_L5_argtuple_error;
  114436. }
  114437. kw_args = PyDict_Size(__pyx_kwds);
  114438. switch (pos_args) {
  114439. case 0:
  114440. if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_loop)) != 0)) kw_args--;
  114441. else goto __pyx_L5_argtuple_error;
  114442. CYTHON_FALLTHROUGH;
  114443. case 1:
  114444. if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_app_protocol)) != 0)) kw_args--;
  114445. else {
  114446. __Pyx_RaiseArgtupleInvalid("__init__", 0, 4, 9, 1); __PYX_ERR(22, 213, __pyx_L3_error)
  114447. }
  114448. CYTHON_FALLTHROUGH;
  114449. case 2:
  114450. if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sslcontext)) != 0)) kw_args--;
  114451. else {
  114452. __Pyx_RaiseArgtupleInvalid("__init__", 0, 4, 9, 2); __PYX_ERR(22, 213, __pyx_L3_error)
  114453. }
  114454. CYTHON_FALLTHROUGH;
  114455. case 3:
  114456. if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_waiter)) != 0)) kw_args--;
  114457. else {
  114458. __Pyx_RaiseArgtupleInvalid("__init__", 0, 4, 9, 3); __PYX_ERR(22, 213, __pyx_L3_error)
  114459. }
  114460. CYTHON_FALLTHROUGH;
  114461. case 4:
  114462. if (kw_args > 0) {
  114463. PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_server_side);
  114464. if (value) { values[4] = value; kw_args--; }
  114465. }
  114466. CYTHON_FALLTHROUGH;
  114467. case 5:
  114468. if (kw_args > 0) {
  114469. PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_server_hostname);
  114470. if (value) { values[5] = value; kw_args--; }
  114471. }
  114472. CYTHON_FALLTHROUGH;
  114473. case 6:
  114474. if (kw_args > 0) {
  114475. PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_call_connection_made);
  114476. if (value) { values[6] = value; kw_args--; }
  114477. }
  114478. CYTHON_FALLTHROUGH;
  114479. case 7:
  114480. if (kw_args > 0) {
  114481. PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ssl_handshake_timeout);
  114482. if (value) { values[7] = value; kw_args--; }
  114483. }
  114484. CYTHON_FALLTHROUGH;
  114485. case 8:
  114486. if (kw_args > 0) {
  114487. PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ssl_shutdown_timeout);
  114488. if (value) { values[8] = value; kw_args--; }
  114489. }
  114490. }
  114491. if (unlikely(kw_args > 0)) {
  114492. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(22, 213, __pyx_L3_error)
  114493. }
  114494. } else {
  114495. switch (PyTuple_GET_SIZE(__pyx_args)) {
  114496. case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
  114497. CYTHON_FALLTHROUGH;
  114498. case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
  114499. CYTHON_FALLTHROUGH;
  114500. case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
  114501. CYTHON_FALLTHROUGH;
  114502. case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
  114503. CYTHON_FALLTHROUGH;
  114504. case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
  114505. CYTHON_FALLTHROUGH;
  114506. case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
  114507. values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
  114508. values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  114509. values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  114510. break;
  114511. default: goto __pyx_L5_argtuple_error;
  114512. }
  114513. }
  114514. __pyx_v_loop = values[0];
  114515. __pyx_v_app_protocol = values[1];
  114516. __pyx_v_sslcontext = values[2];
  114517. __pyx_v_waiter = values[3];
  114518. __pyx_v_server_side = values[4];
  114519. __pyx_v_server_hostname = values[5];
  114520. __pyx_v_call_connection_made = values[6];
  114521. __pyx_v_ssl_handshake_timeout = values[7];
  114522. __pyx_v_ssl_shutdown_timeout = values[8];
  114523. }
  114524. goto __pyx_L4_argument_unpacking_done;
  114525. __pyx_L5_argtuple_error:;
  114526. __Pyx_RaiseArgtupleInvalid("__init__", 0, 4, 9, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(22, 213, __pyx_L3_error)
  114527. __pyx_L3_error:;
  114528. __Pyx_AddTraceback("uvloop.loop.SSLProtocol.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  114529. __Pyx_RefNannyFinishContext();
  114530. return -1;
  114531. __pyx_L4_argument_unpacking_done:;
  114532. __pyx_r = __pyx_pf_6uvloop_4loop_11SSLProtocol_4__init__(((struct __pyx_obj_6uvloop_4loop_SSLProtocol *)__pyx_v_self), __pyx_v_loop, __pyx_v_app_protocol, __pyx_v_sslcontext, __pyx_v_waiter, __pyx_v_server_side, __pyx_v_server_hostname, __pyx_v_call_connection_made, __pyx_v_ssl_handshake_timeout, __pyx_v_ssl_shutdown_timeout);
  114533. /* "uvloop/sslproto.pyx":213
  114534. * self._ssl_buffer_len = 0
  114535. *
  114536. * def __init__(self, loop, app_protocol, sslcontext, waiter, # <<<<<<<<<<<<<<
  114537. * server_side=False, server_hostname=None,
  114538. * call_connection_made=True,
  114539. */
  114540. /* function exit code */
  114541. __Pyx_RefNannyFinishContext();
  114542. return __pyx_r;
  114543. }
  114544. static int __pyx_pf_6uvloop_4loop_11SSLProtocol_4__init__(struct __pyx_obj_6uvloop_4loop_SSLProtocol *__pyx_v_self, PyObject *__pyx_v_loop, PyObject *__pyx_v_app_protocol, PyObject *__pyx_v_sslcontext, PyObject *__pyx_v_waiter, PyObject *__pyx_v_server_side, PyObject *__pyx_v_server_hostname, PyObject *__pyx_v_call_connection_made, PyObject *__pyx_v_ssl_handshake_timeout, PyObject *__pyx_v_ssl_shutdown_timeout) {
  114545. int __pyx_r;
  114546. __Pyx_RefNannyDeclarations
  114547. int __pyx_t_1;
  114548. int __pyx_t_2;
  114549. PyObject *__pyx_t_3 = NULL;
  114550. PyObject *__pyx_t_4 = NULL;
  114551. int __pyx_t_5;
  114552. PyObject *__pyx_t_6 = NULL;
  114553. __Pyx_RefNannySetupContext("__init__", 0);
  114554. __Pyx_INCREF(__pyx_v_sslcontext);
  114555. __Pyx_INCREF(__pyx_v_ssl_handshake_timeout);
  114556. __Pyx_INCREF(__pyx_v_ssl_shutdown_timeout);
  114557. /* "uvloop/sslproto.pyx":218
  114558. * ssl_handshake_timeout=None,
  114559. * ssl_shutdown_timeout=None):
  114560. * if ssl_handshake_timeout is None: # <<<<<<<<<<<<<<
  114561. * ssl_handshake_timeout = SSL_HANDSHAKE_TIMEOUT
  114562. * elif ssl_handshake_timeout <= 0:
  114563. */
  114564. __pyx_t_1 = (__pyx_v_ssl_handshake_timeout == Py_None);
  114565. __pyx_t_2 = (__pyx_t_1 != 0);
  114566. if (__pyx_t_2) {
  114567. /* "uvloop/sslproto.pyx":219
  114568. * ssl_shutdown_timeout=None):
  114569. * if ssl_handshake_timeout is None:
  114570. * ssl_handshake_timeout = SSL_HANDSHAKE_TIMEOUT # <<<<<<<<<<<<<<
  114571. * elif ssl_handshake_timeout <= 0:
  114572. * raise ValueError(
  114573. */
  114574. __Pyx_INCREF(__pyx_float_60_0);
  114575. __Pyx_DECREF_SET(__pyx_v_ssl_handshake_timeout, __pyx_float_60_0);
  114576. /* "uvloop/sslproto.pyx":218
  114577. * ssl_handshake_timeout=None,
  114578. * ssl_shutdown_timeout=None):
  114579. * if ssl_handshake_timeout is None: # <<<<<<<<<<<<<<
  114580. * ssl_handshake_timeout = SSL_HANDSHAKE_TIMEOUT
  114581. * elif ssl_handshake_timeout <= 0:
  114582. */
  114583. goto __pyx_L3;
  114584. }
  114585. /* "uvloop/sslproto.pyx":220
  114586. * if ssl_handshake_timeout is None:
  114587. * ssl_handshake_timeout = SSL_HANDSHAKE_TIMEOUT
  114588. * elif ssl_handshake_timeout <= 0: # <<<<<<<<<<<<<<
  114589. * raise ValueError(
  114590. * f"ssl_handshake_timeout should be a positive number, "
  114591. */
  114592. __pyx_t_3 = PyObject_RichCompare(__pyx_v_ssl_handshake_timeout, __pyx_int_0, Py_LE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(22, 220, __pyx_L1_error)
  114593. __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(22, 220, __pyx_L1_error)
  114594. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  114595. if (unlikely(__pyx_t_2)) {
  114596. /* "uvloop/sslproto.pyx":223
  114597. * raise ValueError(
  114598. * f"ssl_handshake_timeout should be a positive number, "
  114599. * f"got {ssl_handshake_timeout}") # <<<<<<<<<<<<<<
  114600. * if ssl_shutdown_timeout is None:
  114601. * ssl_shutdown_timeout = SSL_SHUTDOWN_TIMEOUT
  114602. */
  114603. __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_v_ssl_handshake_timeout, __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(22, 223, __pyx_L1_error)
  114604. __Pyx_GOTREF(__pyx_t_3);
  114605. /* "uvloop/sslproto.pyx":222
  114606. * elif ssl_handshake_timeout <= 0:
  114607. * raise ValueError(
  114608. * f"ssl_handshake_timeout should be a positive number, " # <<<<<<<<<<<<<<
  114609. * f"got {ssl_handshake_timeout}")
  114610. * if ssl_shutdown_timeout is None:
  114611. */
  114612. __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_ssl_handshake_timeout_should_be, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(22, 222, __pyx_L1_error)
  114613. __Pyx_GOTREF(__pyx_t_4);
  114614. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  114615. /* "uvloop/sslproto.pyx":221
  114616. * ssl_handshake_timeout = SSL_HANDSHAKE_TIMEOUT
  114617. * elif ssl_handshake_timeout <= 0:
  114618. * raise ValueError( # <<<<<<<<<<<<<<
  114619. * f"ssl_handshake_timeout should be a positive number, "
  114620. * f"got {ssl_handshake_timeout}")
  114621. */
  114622. __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(22, 221, __pyx_L1_error)
  114623. __Pyx_GOTREF(__pyx_t_3);
  114624. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  114625. __Pyx_Raise(__pyx_t_3, 0, 0, 0);
  114626. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  114627. __PYX_ERR(22, 221, __pyx_L1_error)
  114628. /* "uvloop/sslproto.pyx":220
  114629. * if ssl_handshake_timeout is None:
  114630. * ssl_handshake_timeout = SSL_HANDSHAKE_TIMEOUT
  114631. * elif ssl_handshake_timeout <= 0: # <<<<<<<<<<<<<<
  114632. * raise ValueError(
  114633. * f"ssl_handshake_timeout should be a positive number, "
  114634. */
  114635. }
  114636. __pyx_L3:;
  114637. /* "uvloop/sslproto.pyx":224
  114638. * f"ssl_handshake_timeout should be a positive number, "
  114639. * f"got {ssl_handshake_timeout}")
  114640. * if ssl_shutdown_timeout is None: # <<<<<<<<<<<<<<
  114641. * ssl_shutdown_timeout = SSL_SHUTDOWN_TIMEOUT
  114642. * elif ssl_shutdown_timeout <= 0:
  114643. */
  114644. __pyx_t_2 = (__pyx_v_ssl_shutdown_timeout == Py_None);
  114645. __pyx_t_1 = (__pyx_t_2 != 0);
  114646. if (__pyx_t_1) {
  114647. /* "uvloop/sslproto.pyx":225
  114648. * f"got {ssl_handshake_timeout}")
  114649. * if ssl_shutdown_timeout is None:
  114650. * ssl_shutdown_timeout = SSL_SHUTDOWN_TIMEOUT # <<<<<<<<<<<<<<
  114651. * elif ssl_shutdown_timeout <= 0:
  114652. * raise ValueError(
  114653. */
  114654. __Pyx_INCREF(__pyx_float_30_0);
  114655. __Pyx_DECREF_SET(__pyx_v_ssl_shutdown_timeout, __pyx_float_30_0);
  114656. /* "uvloop/sslproto.pyx":224
  114657. * f"ssl_handshake_timeout should be a positive number, "
  114658. * f"got {ssl_handshake_timeout}")
  114659. * if ssl_shutdown_timeout is None: # <<<<<<<<<<<<<<
  114660. * ssl_shutdown_timeout = SSL_SHUTDOWN_TIMEOUT
  114661. * elif ssl_shutdown_timeout <= 0:
  114662. */
  114663. goto __pyx_L4;
  114664. }
  114665. /* "uvloop/sslproto.pyx":226
  114666. * if ssl_shutdown_timeout is None:
  114667. * ssl_shutdown_timeout = SSL_SHUTDOWN_TIMEOUT
  114668. * elif ssl_shutdown_timeout <= 0: # <<<<<<<<<<<<<<
  114669. * raise ValueError(
  114670. * f"ssl_shutdown_timeout should be a positive number, "
  114671. */
  114672. __pyx_t_3 = PyObject_RichCompare(__pyx_v_ssl_shutdown_timeout, __pyx_int_0, Py_LE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(22, 226, __pyx_L1_error)
  114673. __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(22, 226, __pyx_L1_error)
  114674. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  114675. if (unlikely(__pyx_t_1)) {
  114676. /* "uvloop/sslproto.pyx":229
  114677. * raise ValueError(
  114678. * f"ssl_shutdown_timeout should be a positive number, "
  114679. * f"got {ssl_shutdown_timeout}") # <<<<<<<<<<<<<<
  114680. *
  114681. * if not sslcontext:
  114682. */
  114683. __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_v_ssl_shutdown_timeout, __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(22, 229, __pyx_L1_error)
  114684. __Pyx_GOTREF(__pyx_t_3);
  114685. /* "uvloop/sslproto.pyx":228
  114686. * elif ssl_shutdown_timeout <= 0:
  114687. * raise ValueError(
  114688. * f"ssl_shutdown_timeout should be a positive number, " # <<<<<<<<<<<<<<
  114689. * f"got {ssl_shutdown_timeout}")
  114690. *
  114691. */
  114692. __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_ssl_shutdown_timeout_should_be_a, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(22, 228, __pyx_L1_error)
  114693. __Pyx_GOTREF(__pyx_t_4);
  114694. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  114695. /* "uvloop/sslproto.pyx":227
  114696. * ssl_shutdown_timeout = SSL_SHUTDOWN_TIMEOUT
  114697. * elif ssl_shutdown_timeout <= 0:
  114698. * raise ValueError( # <<<<<<<<<<<<<<
  114699. * f"ssl_shutdown_timeout should be a positive number, "
  114700. * f"got {ssl_shutdown_timeout}")
  114701. */
  114702. __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(22, 227, __pyx_L1_error)
  114703. __Pyx_GOTREF(__pyx_t_3);
  114704. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  114705. __Pyx_Raise(__pyx_t_3, 0, 0, 0);
  114706. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  114707. __PYX_ERR(22, 227, __pyx_L1_error)
  114708. /* "uvloop/sslproto.pyx":226
  114709. * if ssl_shutdown_timeout is None:
  114710. * ssl_shutdown_timeout = SSL_SHUTDOWN_TIMEOUT
  114711. * elif ssl_shutdown_timeout <= 0: # <<<<<<<<<<<<<<
  114712. * raise ValueError(
  114713. * f"ssl_shutdown_timeout should be a positive number, "
  114714. */
  114715. }
  114716. __pyx_L4:;
  114717. /* "uvloop/sslproto.pyx":231
  114718. * f"got {ssl_shutdown_timeout}")
  114719. *
  114720. * if not sslcontext: # <<<<<<<<<<<<<<
  114721. * sslcontext = _create_transport_context(
  114722. * server_side, server_hostname)
  114723. */
  114724. __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_sslcontext); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(22, 231, __pyx_L1_error)
  114725. __pyx_t_2 = ((!__pyx_t_1) != 0);
  114726. if (__pyx_t_2) {
  114727. /* "uvloop/sslproto.pyx":232
  114728. *
  114729. * if not sslcontext:
  114730. * sslcontext = _create_transport_context( # <<<<<<<<<<<<<<
  114731. * server_side, server_hostname)
  114732. *
  114733. */
  114734. __pyx_t_3 = __pyx_f_6uvloop_4loop__create_transport_context(__pyx_v_server_side, __pyx_v_server_hostname); if (unlikely(!__pyx_t_3)) __PYX_ERR(22, 232, __pyx_L1_error)
  114735. __Pyx_GOTREF(__pyx_t_3);
  114736. __Pyx_DECREF_SET(__pyx_v_sslcontext, __pyx_t_3);
  114737. __pyx_t_3 = 0;
  114738. /* "uvloop/sslproto.pyx":231
  114739. * f"got {ssl_shutdown_timeout}")
  114740. *
  114741. * if not sslcontext: # <<<<<<<<<<<<<<
  114742. * sslcontext = _create_transport_context(
  114743. * server_side, server_hostname)
  114744. */
  114745. }
  114746. /* "uvloop/sslproto.pyx":235
  114747. * server_side, server_hostname)
  114748. *
  114749. * self._server_side = server_side # <<<<<<<<<<<<<<
  114750. * if server_hostname and not server_side:
  114751. * self._server_hostname = server_hostname
  114752. */
  114753. __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_server_side); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(22, 235, __pyx_L1_error)
  114754. __pyx_v_self->_server_side = __pyx_t_2;
  114755. /* "uvloop/sslproto.pyx":236
  114756. *
  114757. * self._server_side = server_side
  114758. * if server_hostname and not server_side: # <<<<<<<<<<<<<<
  114759. * self._server_hostname = server_hostname
  114760. * else:
  114761. */
  114762. __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_server_hostname); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(22, 236, __pyx_L1_error)
  114763. if (__pyx_t_1) {
  114764. } else {
  114765. __pyx_t_2 = __pyx_t_1;
  114766. goto __pyx_L7_bool_binop_done;
  114767. }
  114768. __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_server_side); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(22, 236, __pyx_L1_error)
  114769. __pyx_t_5 = ((!__pyx_t_1) != 0);
  114770. __pyx_t_2 = __pyx_t_5;
  114771. __pyx_L7_bool_binop_done:;
  114772. if (__pyx_t_2) {
  114773. /* "uvloop/sslproto.pyx":237
  114774. * self._server_side = server_side
  114775. * if server_hostname and not server_side:
  114776. * self._server_hostname = server_hostname # <<<<<<<<<<<<<<
  114777. * else:
  114778. * self._server_hostname = None
  114779. */
  114780. if (!(likely(PyUnicode_CheckExact(__pyx_v_server_hostname))||((__pyx_v_server_hostname) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_server_hostname)->tp_name), 0))) __PYX_ERR(22, 237, __pyx_L1_error)
  114781. __pyx_t_3 = __pyx_v_server_hostname;
  114782. __Pyx_INCREF(__pyx_t_3);
  114783. __Pyx_GIVEREF(__pyx_t_3);
  114784. __Pyx_GOTREF(__pyx_v_self->_server_hostname);
  114785. __Pyx_DECREF(__pyx_v_self->_server_hostname);
  114786. __pyx_v_self->_server_hostname = ((PyObject*)__pyx_t_3);
  114787. __pyx_t_3 = 0;
  114788. /* "uvloop/sslproto.pyx":236
  114789. *
  114790. * self._server_side = server_side
  114791. * if server_hostname and not server_side: # <<<<<<<<<<<<<<
  114792. * self._server_hostname = server_hostname
  114793. * else:
  114794. */
  114795. goto __pyx_L6;
  114796. }
  114797. /* "uvloop/sslproto.pyx":239
  114798. * self._server_hostname = server_hostname
  114799. * else:
  114800. * self._server_hostname = None # <<<<<<<<<<<<<<
  114801. * self._sslcontext = sslcontext
  114802. * # SSL-specific extra info. More info are set when the handshake
  114803. */
  114804. /*else*/ {
  114805. __Pyx_INCREF(Py_None);
  114806. __Pyx_GIVEREF(Py_None);
  114807. __Pyx_GOTREF(__pyx_v_self->_server_hostname);
  114808. __Pyx_DECREF(__pyx_v_self->_server_hostname);
  114809. __pyx_v_self->_server_hostname = ((PyObject*)Py_None);
  114810. }
  114811. __pyx_L6:;
  114812. /* "uvloop/sslproto.pyx":240
  114813. * else:
  114814. * self._server_hostname = None
  114815. * self._sslcontext = sslcontext # <<<<<<<<<<<<<<
  114816. * # SSL-specific extra info. More info are set when the handshake
  114817. * # completes.
  114818. */
  114819. __Pyx_INCREF(__pyx_v_sslcontext);
  114820. __Pyx_GIVEREF(__pyx_v_sslcontext);
  114821. __Pyx_GOTREF(__pyx_v_self->_sslcontext);
  114822. __Pyx_DECREF(__pyx_v_self->_sslcontext);
  114823. __pyx_v_self->_sslcontext = __pyx_v_sslcontext;
  114824. /* "uvloop/sslproto.pyx":243
  114825. * # SSL-specific extra info. More info are set when the handshake
  114826. * # completes.
  114827. * self._extra = dict(sslcontext=sslcontext) # <<<<<<<<<<<<<<
  114828. *
  114829. * # App data write buffering
  114830. */
  114831. __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(22, 243, __pyx_L1_error)
  114832. __Pyx_GOTREF(__pyx_t_3);
  114833. if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_sslcontext, __pyx_v_sslcontext) < 0) __PYX_ERR(22, 243, __pyx_L1_error)
  114834. __Pyx_GIVEREF(__pyx_t_3);
  114835. __Pyx_GOTREF(__pyx_v_self->_extra);
  114836. __Pyx_DECREF(__pyx_v_self->_extra);
  114837. __pyx_v_self->_extra = __pyx_t_3;
  114838. __pyx_t_3 = 0;
  114839. /* "uvloop/sslproto.pyx":246
  114840. *
  114841. * # App data write buffering
  114842. * self._write_backlog = col_deque() # <<<<<<<<<<<<<<
  114843. * self._write_buffer_size = 0
  114844. *
  114845. */
  114846. __Pyx_INCREF(__pyx_v_6uvloop_4loop_col_deque);
  114847. __pyx_t_4 = __pyx_v_6uvloop_4loop_col_deque; __pyx_t_6 = NULL;
  114848. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
  114849. __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
  114850. if (likely(__pyx_t_6)) {
  114851. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  114852. __Pyx_INCREF(__pyx_t_6);
  114853. __Pyx_INCREF(function);
  114854. __Pyx_DECREF_SET(__pyx_t_4, function);
  114855. }
  114856. }
  114857. __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
  114858. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  114859. if (unlikely(!__pyx_t_3)) __PYX_ERR(22, 246, __pyx_L1_error)
  114860. __Pyx_GOTREF(__pyx_t_3);
  114861. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  114862. __Pyx_GIVEREF(__pyx_t_3);
  114863. __Pyx_GOTREF(__pyx_v_self->_write_backlog);
  114864. __Pyx_DECREF(__pyx_v_self->_write_backlog);
  114865. __pyx_v_self->_write_backlog = __pyx_t_3;
  114866. __pyx_t_3 = 0;
  114867. /* "uvloop/sslproto.pyx":247
  114868. * # App data write buffering
  114869. * self._write_backlog = col_deque()
  114870. * self._write_buffer_size = 0 # <<<<<<<<<<<<<<
  114871. *
  114872. * self._waiter = waiter
  114873. */
  114874. __pyx_v_self->_write_buffer_size = 0;
  114875. /* "uvloop/sslproto.pyx":249
  114876. * self._write_buffer_size = 0
  114877. *
  114878. * self._waiter = waiter # <<<<<<<<<<<<<<
  114879. * self._loop = loop
  114880. * self._set_app_protocol(app_protocol)
  114881. */
  114882. __Pyx_INCREF(__pyx_v_waiter);
  114883. __Pyx_GIVEREF(__pyx_v_waiter);
  114884. __Pyx_GOTREF(__pyx_v_self->_waiter);
  114885. __Pyx_DECREF(__pyx_v_self->_waiter);
  114886. __pyx_v_self->_waiter = __pyx_v_waiter;
  114887. /* "uvloop/sslproto.pyx":250
  114888. *
  114889. * self._waiter = waiter
  114890. * self._loop = loop # <<<<<<<<<<<<<<
  114891. * self._set_app_protocol(app_protocol)
  114892. * self._app_transport = None
  114893. */
  114894. __Pyx_INCREF(__pyx_v_loop);
  114895. __Pyx_GIVEREF(__pyx_v_loop);
  114896. __Pyx_GOTREF(__pyx_v_self->_loop);
  114897. __Pyx_DECREF(__pyx_v_self->_loop);
  114898. __pyx_v_self->_loop = __pyx_v_loop;
  114899. /* "uvloop/sslproto.pyx":251
  114900. * self._waiter = waiter
  114901. * self._loop = loop
  114902. * self._set_app_protocol(app_protocol) # <<<<<<<<<<<<<<
  114903. * self._app_transport = None
  114904. * self._app_transport_created = False
  114905. */
  114906. __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_SSLProtocol *)__pyx_v_self->__pyx_vtab)->_set_app_protocol(__pyx_v_self, __pyx_v_app_protocol); if (unlikely(!__pyx_t_3)) __PYX_ERR(22, 251, __pyx_L1_error)
  114907. __Pyx_GOTREF(__pyx_t_3);
  114908. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  114909. /* "uvloop/sslproto.pyx":252
  114910. * self._loop = loop
  114911. * self._set_app_protocol(app_protocol)
  114912. * self._app_transport = None # <<<<<<<<<<<<<<
  114913. * self._app_transport_created = False
  114914. * # transport, ex: SelectorSocketTransport
  114915. */
  114916. __Pyx_INCREF(Py_None);
  114917. __Pyx_GIVEREF(Py_None);
  114918. __Pyx_GOTREF(__pyx_v_self->_app_transport);
  114919. __Pyx_DECREF(((PyObject *)__pyx_v_self->_app_transport));
  114920. __pyx_v_self->_app_transport = ((struct __pyx_obj_6uvloop_4loop__SSLProtocolTransport *)Py_None);
  114921. /* "uvloop/sslproto.pyx":253
  114922. * self._set_app_protocol(app_protocol)
  114923. * self._app_transport = None
  114924. * self._app_transport_created = False # <<<<<<<<<<<<<<
  114925. * # transport, ex: SelectorSocketTransport
  114926. * self._transport = None
  114927. */
  114928. __pyx_v_self->_app_transport_created = 0;
  114929. /* "uvloop/sslproto.pyx":255
  114930. * self._app_transport_created = False
  114931. * # transport, ex: SelectorSocketTransport
  114932. * self._transport = None # <<<<<<<<<<<<<<
  114933. * self._call_connection_made = call_connection_made
  114934. * self._ssl_handshake_timeout = ssl_handshake_timeout
  114935. */
  114936. __Pyx_INCREF(Py_None);
  114937. __Pyx_GIVEREF(Py_None);
  114938. __Pyx_GOTREF(__pyx_v_self->_transport);
  114939. __Pyx_DECREF(__pyx_v_self->_transport);
  114940. __pyx_v_self->_transport = Py_None;
  114941. /* "uvloop/sslproto.pyx":256
  114942. * # transport, ex: SelectorSocketTransport
  114943. * self._transport = None
  114944. * self._call_connection_made = call_connection_made # <<<<<<<<<<<<<<
  114945. * self._ssl_handshake_timeout = ssl_handshake_timeout
  114946. * self._ssl_shutdown_timeout = ssl_shutdown_timeout
  114947. */
  114948. __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_call_connection_made); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(22, 256, __pyx_L1_error)
  114949. __pyx_v_self->_call_connection_made = __pyx_t_2;
  114950. /* "uvloop/sslproto.pyx":257
  114951. * self._transport = None
  114952. * self._call_connection_made = call_connection_made
  114953. * self._ssl_handshake_timeout = ssl_handshake_timeout # <<<<<<<<<<<<<<
  114954. * self._ssl_shutdown_timeout = ssl_shutdown_timeout
  114955. * # SSL and state machine
  114956. */
  114957. __Pyx_INCREF(__pyx_v_ssl_handshake_timeout);
  114958. __Pyx_GIVEREF(__pyx_v_ssl_handshake_timeout);
  114959. __Pyx_GOTREF(__pyx_v_self->_ssl_handshake_timeout);
  114960. __Pyx_DECREF(__pyx_v_self->_ssl_handshake_timeout);
  114961. __pyx_v_self->_ssl_handshake_timeout = __pyx_v_ssl_handshake_timeout;
  114962. /* "uvloop/sslproto.pyx":258
  114963. * self._call_connection_made = call_connection_made
  114964. * self._ssl_handshake_timeout = ssl_handshake_timeout
  114965. * self._ssl_shutdown_timeout = ssl_shutdown_timeout # <<<<<<<<<<<<<<
  114966. * # SSL and state machine
  114967. * self._sslobj = None
  114968. */
  114969. __Pyx_INCREF(__pyx_v_ssl_shutdown_timeout);
  114970. __Pyx_GIVEREF(__pyx_v_ssl_shutdown_timeout);
  114971. __Pyx_GOTREF(__pyx_v_self->_ssl_shutdown_timeout);
  114972. __Pyx_DECREF(__pyx_v_self->_ssl_shutdown_timeout);
  114973. __pyx_v_self->_ssl_shutdown_timeout = __pyx_v_ssl_shutdown_timeout;
  114974. /* "uvloop/sslproto.pyx":260
  114975. * self._ssl_shutdown_timeout = ssl_shutdown_timeout
  114976. * # SSL and state machine
  114977. * self._sslobj = None # <<<<<<<<<<<<<<
  114978. * self._incoming = ssl_MemoryBIO()
  114979. * self._incoming_write = self._incoming.write
  114980. */
  114981. __Pyx_INCREF(Py_None);
  114982. __Pyx_GIVEREF(Py_None);
  114983. __Pyx_GOTREF(__pyx_v_self->_sslobj);
  114984. __Pyx_DECREF(__pyx_v_self->_sslobj);
  114985. __pyx_v_self->_sslobj = Py_None;
  114986. /* "uvloop/sslproto.pyx":261
  114987. * # SSL and state machine
  114988. * self._sslobj = None
  114989. * self._incoming = ssl_MemoryBIO() # <<<<<<<<<<<<<<
  114990. * self._incoming_write = self._incoming.write
  114991. * self._outgoing = ssl_MemoryBIO()
  114992. */
  114993. __Pyx_INCREF(__pyx_v_6uvloop_4loop_ssl_MemoryBIO);
  114994. __pyx_t_4 = __pyx_v_6uvloop_4loop_ssl_MemoryBIO; __pyx_t_6 = NULL;
  114995. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
  114996. __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
  114997. if (likely(__pyx_t_6)) {
  114998. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  114999. __Pyx_INCREF(__pyx_t_6);
  115000. __Pyx_INCREF(function);
  115001. __Pyx_DECREF_SET(__pyx_t_4, function);
  115002. }
  115003. }
  115004. __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
  115005. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  115006. if (unlikely(!__pyx_t_3)) __PYX_ERR(22, 261, __pyx_L1_error)
  115007. __Pyx_GOTREF(__pyx_t_3);
  115008. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  115009. __Pyx_GIVEREF(__pyx_t_3);
  115010. __Pyx_GOTREF(__pyx_v_self->_incoming);
  115011. __Pyx_DECREF(__pyx_v_self->_incoming);
  115012. __pyx_v_self->_incoming = __pyx_t_3;
  115013. __pyx_t_3 = 0;
  115014. /* "uvloop/sslproto.pyx":262
  115015. * self._sslobj = None
  115016. * self._incoming = ssl_MemoryBIO()
  115017. * self._incoming_write = self._incoming.write # <<<<<<<<<<<<<<
  115018. * self._outgoing = ssl_MemoryBIO()
  115019. * self._outgoing_read = self._outgoing.read
  115020. */
  115021. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_incoming, __pyx_n_s_write); if (unlikely(!__pyx_t_3)) __PYX_ERR(22, 262, __pyx_L1_error)
  115022. __Pyx_GOTREF(__pyx_t_3);
  115023. __Pyx_GIVEREF(__pyx_t_3);
  115024. __Pyx_GOTREF(__pyx_v_self->_incoming_write);
  115025. __Pyx_DECREF(__pyx_v_self->_incoming_write);
  115026. __pyx_v_self->_incoming_write = __pyx_t_3;
  115027. __pyx_t_3 = 0;
  115028. /* "uvloop/sslproto.pyx":263
  115029. * self._incoming = ssl_MemoryBIO()
  115030. * self._incoming_write = self._incoming.write
  115031. * self._outgoing = ssl_MemoryBIO() # <<<<<<<<<<<<<<
  115032. * self._outgoing_read = self._outgoing.read
  115033. * self._state = UNWRAPPED
  115034. */
  115035. __Pyx_INCREF(__pyx_v_6uvloop_4loop_ssl_MemoryBIO);
  115036. __pyx_t_4 = __pyx_v_6uvloop_4loop_ssl_MemoryBIO; __pyx_t_6 = NULL;
  115037. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
  115038. __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
  115039. if (likely(__pyx_t_6)) {
  115040. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  115041. __Pyx_INCREF(__pyx_t_6);
  115042. __Pyx_INCREF(function);
  115043. __Pyx_DECREF_SET(__pyx_t_4, function);
  115044. }
  115045. }
  115046. __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
  115047. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  115048. if (unlikely(!__pyx_t_3)) __PYX_ERR(22, 263, __pyx_L1_error)
  115049. __Pyx_GOTREF(__pyx_t_3);
  115050. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  115051. __Pyx_GIVEREF(__pyx_t_3);
  115052. __Pyx_GOTREF(__pyx_v_self->_outgoing);
  115053. __Pyx_DECREF(__pyx_v_self->_outgoing);
  115054. __pyx_v_self->_outgoing = __pyx_t_3;
  115055. __pyx_t_3 = 0;
  115056. /* "uvloop/sslproto.pyx":264
  115057. * self._incoming_write = self._incoming.write
  115058. * self._outgoing = ssl_MemoryBIO()
  115059. * self._outgoing_read = self._outgoing.read # <<<<<<<<<<<<<<
  115060. * self._state = UNWRAPPED
  115061. * self._conn_lost = 0 # Set when connection_lost called
  115062. */
  115063. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_outgoing, __pyx_n_s_read); if (unlikely(!__pyx_t_3)) __PYX_ERR(22, 264, __pyx_L1_error)
  115064. __Pyx_GOTREF(__pyx_t_3);
  115065. __Pyx_GIVEREF(__pyx_t_3);
  115066. __Pyx_GOTREF(__pyx_v_self->_outgoing_read);
  115067. __Pyx_DECREF(__pyx_v_self->_outgoing_read);
  115068. __pyx_v_self->_outgoing_read = __pyx_t_3;
  115069. __pyx_t_3 = 0;
  115070. /* "uvloop/sslproto.pyx":265
  115071. * self._outgoing = ssl_MemoryBIO()
  115072. * self._outgoing_read = self._outgoing.read
  115073. * self._state = UNWRAPPED # <<<<<<<<<<<<<<
  115074. * self._conn_lost = 0 # Set when connection_lost called
  115075. * self._eof_received = False
  115076. */
  115077. __pyx_v_self->_state = __pyx_e_6uvloop_4loop_UNWRAPPED;
  115078. /* "uvloop/sslproto.pyx":266
  115079. * self._outgoing_read = self._outgoing.read
  115080. * self._state = UNWRAPPED
  115081. * self._conn_lost = 0 # Set when connection_lost called # <<<<<<<<<<<<<<
  115082. * self._eof_received = False
  115083. *
  115084. */
  115085. __pyx_v_self->_conn_lost = 0;
  115086. /* "uvloop/sslproto.pyx":267
  115087. * self._state = UNWRAPPED
  115088. * self._conn_lost = 0 # Set when connection_lost called
  115089. * self._eof_received = False # <<<<<<<<<<<<<<
  115090. *
  115091. * # Flow Control
  115092. */
  115093. __pyx_v_self->_eof_received = 0;
  115094. /* "uvloop/sslproto.pyx":271
  115095. * # Flow Control
  115096. *
  115097. * self._ssl_writing_paused = False # <<<<<<<<<<<<<<
  115098. *
  115099. * self._app_reading_paused = False
  115100. */
  115101. __pyx_v_self->_ssl_writing_paused = 0;
  115102. /* "uvloop/sslproto.pyx":273
  115103. * self._ssl_writing_paused = False
  115104. *
  115105. * self._app_reading_paused = False # <<<<<<<<<<<<<<
  115106. *
  115107. * self._ssl_reading_paused = False
  115108. */
  115109. __pyx_v_self->_app_reading_paused = 0;
  115110. /* "uvloop/sslproto.pyx":275
  115111. * self._app_reading_paused = False
  115112. *
  115113. * self._ssl_reading_paused = False # <<<<<<<<<<<<<<
  115114. * self._incoming_high_water = 0
  115115. * self._incoming_low_water = 0
  115116. */
  115117. __pyx_v_self->_ssl_reading_paused = 0;
  115118. /* "uvloop/sslproto.pyx":276
  115119. *
  115120. * self._ssl_reading_paused = False
  115121. * self._incoming_high_water = 0 # <<<<<<<<<<<<<<
  115122. * self._incoming_low_water = 0
  115123. * self._set_read_buffer_limits()
  115124. */
  115125. __pyx_v_self->_incoming_high_water = 0;
  115126. /* "uvloop/sslproto.pyx":277
  115127. * self._ssl_reading_paused = False
  115128. * self._incoming_high_water = 0
  115129. * self._incoming_low_water = 0 # <<<<<<<<<<<<<<
  115130. * self._set_read_buffer_limits()
  115131. *
  115132. */
  115133. __pyx_v_self->_incoming_low_water = 0;
  115134. /* "uvloop/sslproto.pyx":278
  115135. * self._incoming_high_water = 0
  115136. * self._incoming_low_water = 0
  115137. * self._set_read_buffer_limits() # <<<<<<<<<<<<<<
  115138. *
  115139. * self._app_writing_paused = False
  115140. */
  115141. __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_SSLProtocol *)__pyx_v_self->__pyx_vtab)->_set_read_buffer_limits(__pyx_v_self, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(22, 278, __pyx_L1_error)
  115142. __Pyx_GOTREF(__pyx_t_3);
  115143. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  115144. /* "uvloop/sslproto.pyx":280
  115145. * self._set_read_buffer_limits()
  115146. *
  115147. * self._app_writing_paused = False # <<<<<<<<<<<<<<
  115148. * self._outgoing_high_water = 0
  115149. * self._outgoing_low_water = 0
  115150. */
  115151. __pyx_v_self->_app_writing_paused = 0;
  115152. /* "uvloop/sslproto.pyx":281
  115153. *
  115154. * self._app_writing_paused = False
  115155. * self._outgoing_high_water = 0 # <<<<<<<<<<<<<<
  115156. * self._outgoing_low_water = 0
  115157. * self._set_write_buffer_limits()
  115158. */
  115159. __pyx_v_self->_outgoing_high_water = 0;
  115160. /* "uvloop/sslproto.pyx":282
  115161. * self._app_writing_paused = False
  115162. * self._outgoing_high_water = 0
  115163. * self._outgoing_low_water = 0 # <<<<<<<<<<<<<<
  115164. * self._set_write_buffer_limits()
  115165. *
  115166. */
  115167. __pyx_v_self->_outgoing_low_water = 0;
  115168. /* "uvloop/sslproto.pyx":283
  115169. * self._outgoing_high_water = 0
  115170. * self._outgoing_low_water = 0
  115171. * self._set_write_buffer_limits() # <<<<<<<<<<<<<<
  115172. *
  115173. * cdef _set_app_protocol(self, app_protocol):
  115174. */
  115175. __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_SSLProtocol *)__pyx_v_self->__pyx_vtab)->_set_write_buffer_limits(__pyx_v_self, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(22, 283, __pyx_L1_error)
  115176. __Pyx_GOTREF(__pyx_t_3);
  115177. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  115178. /* "uvloop/sslproto.pyx":213
  115179. * self._ssl_buffer_len = 0
  115180. *
  115181. * def __init__(self, loop, app_protocol, sslcontext, waiter, # <<<<<<<<<<<<<<
  115182. * server_side=False, server_hostname=None,
  115183. * call_connection_made=True,
  115184. */
  115185. /* function exit code */
  115186. __pyx_r = 0;
  115187. goto __pyx_L0;
  115188. __pyx_L1_error:;
  115189. __Pyx_XDECREF(__pyx_t_3);
  115190. __Pyx_XDECREF(__pyx_t_4);
  115191. __Pyx_XDECREF(__pyx_t_6);
  115192. __Pyx_AddTraceback("uvloop.loop.SSLProtocol.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  115193. __pyx_r = -1;
  115194. __pyx_L0:;
  115195. __Pyx_XDECREF(__pyx_v_sslcontext);
  115196. __Pyx_XDECREF(__pyx_v_ssl_handshake_timeout);
  115197. __Pyx_XDECREF(__pyx_v_ssl_shutdown_timeout);
  115198. __Pyx_RefNannyFinishContext();
  115199. return __pyx_r;
  115200. }
  115201. /* "uvloop/sslproto.pyx":285
  115202. * self._set_write_buffer_limits()
  115203. *
  115204. * cdef _set_app_protocol(self, app_protocol): # <<<<<<<<<<<<<<
  115205. * self._app_protocol = app_protocol
  115206. * if (hasattr(app_protocol, 'get_buffer') and
  115207. */
  115208. static PyObject *__pyx_f_6uvloop_4loop_11SSLProtocol__set_app_protocol(struct __pyx_obj_6uvloop_4loop_SSLProtocol *__pyx_v_self, PyObject *__pyx_v_app_protocol) {
  115209. PyObject *__pyx_r = NULL;
  115210. __Pyx_RefNannyDeclarations
  115211. int __pyx_t_1;
  115212. int __pyx_t_2;
  115213. int __pyx_t_3;
  115214. PyObject *__pyx_t_4 = NULL;
  115215. __Pyx_RefNannySetupContext("_set_app_protocol", 0);
  115216. /* "uvloop/sslproto.pyx":286
  115217. *
  115218. * cdef _set_app_protocol(self, app_protocol):
  115219. * self._app_protocol = app_protocol # <<<<<<<<<<<<<<
  115220. * if (hasattr(app_protocol, 'get_buffer') and
  115221. * not isinstance(app_protocol, aio_Protocol)):
  115222. */
  115223. __Pyx_INCREF(__pyx_v_app_protocol);
  115224. __Pyx_GIVEREF(__pyx_v_app_protocol);
  115225. __Pyx_GOTREF(__pyx_v_self->_app_protocol);
  115226. __Pyx_DECREF(__pyx_v_self->_app_protocol);
  115227. __pyx_v_self->_app_protocol = __pyx_v_app_protocol;
  115228. /* "uvloop/sslproto.pyx":287
  115229. * cdef _set_app_protocol(self, app_protocol):
  115230. * self._app_protocol = app_protocol
  115231. * if (hasattr(app_protocol, 'get_buffer') and # <<<<<<<<<<<<<<
  115232. * not isinstance(app_protocol, aio_Protocol)):
  115233. * self._app_protocol_get_buffer = app_protocol.get_buffer
  115234. */
  115235. __pyx_t_2 = __Pyx_HasAttr(__pyx_v_app_protocol, __pyx_n_u_get_buffer); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 287, __pyx_L1_error)
  115236. __pyx_t_3 = (__pyx_t_2 != 0);
  115237. if (__pyx_t_3) {
  115238. } else {
  115239. __pyx_t_1 = __pyx_t_3;
  115240. goto __pyx_L4_bool_binop_done;
  115241. }
  115242. /* "uvloop/sslproto.pyx":288
  115243. * self._app_protocol = app_protocol
  115244. * if (hasattr(app_protocol, 'get_buffer') and
  115245. * not isinstance(app_protocol, aio_Protocol)): # <<<<<<<<<<<<<<
  115246. * self._app_protocol_get_buffer = app_protocol.get_buffer
  115247. * self._app_protocol_buffer_updated = app_protocol.buffer_updated
  115248. */
  115249. __pyx_t_4 = __pyx_v_6uvloop_4loop_aio_Protocol;
  115250. __Pyx_INCREF(__pyx_t_4);
  115251. __pyx_t_3 = PyObject_IsInstance(__pyx_v_app_protocol, __pyx_t_4); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(22, 288, __pyx_L1_error)
  115252. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  115253. __pyx_t_2 = ((!(__pyx_t_3 != 0)) != 0);
  115254. __pyx_t_1 = __pyx_t_2;
  115255. __pyx_L4_bool_binop_done:;
  115256. /* "uvloop/sslproto.pyx":287
  115257. * cdef _set_app_protocol(self, app_protocol):
  115258. * self._app_protocol = app_protocol
  115259. * if (hasattr(app_protocol, 'get_buffer') and # <<<<<<<<<<<<<<
  115260. * not isinstance(app_protocol, aio_Protocol)):
  115261. * self._app_protocol_get_buffer = app_protocol.get_buffer
  115262. */
  115263. if (__pyx_t_1) {
  115264. /* "uvloop/sslproto.pyx":289
  115265. * if (hasattr(app_protocol, 'get_buffer') and
  115266. * not isinstance(app_protocol, aio_Protocol)):
  115267. * self._app_protocol_get_buffer = app_protocol.get_buffer # <<<<<<<<<<<<<<
  115268. * self._app_protocol_buffer_updated = app_protocol.buffer_updated
  115269. * self._app_protocol_is_buffer = True
  115270. */
  115271. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_app_protocol, __pyx_n_s_get_buffer); if (unlikely(!__pyx_t_4)) __PYX_ERR(22, 289, __pyx_L1_error)
  115272. __Pyx_GOTREF(__pyx_t_4);
  115273. __Pyx_GIVEREF(__pyx_t_4);
  115274. __Pyx_GOTREF(__pyx_v_self->_app_protocol_get_buffer);
  115275. __Pyx_DECREF(__pyx_v_self->_app_protocol_get_buffer);
  115276. __pyx_v_self->_app_protocol_get_buffer = __pyx_t_4;
  115277. __pyx_t_4 = 0;
  115278. /* "uvloop/sslproto.pyx":290
  115279. * not isinstance(app_protocol, aio_Protocol)):
  115280. * self._app_protocol_get_buffer = app_protocol.get_buffer
  115281. * self._app_protocol_buffer_updated = app_protocol.buffer_updated # <<<<<<<<<<<<<<
  115282. * self._app_protocol_is_buffer = True
  115283. * else:
  115284. */
  115285. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_app_protocol, __pyx_n_s_buffer_updated); if (unlikely(!__pyx_t_4)) __PYX_ERR(22, 290, __pyx_L1_error)
  115286. __Pyx_GOTREF(__pyx_t_4);
  115287. __Pyx_GIVEREF(__pyx_t_4);
  115288. __Pyx_GOTREF(__pyx_v_self->_app_protocol_buffer_updated);
  115289. __Pyx_DECREF(__pyx_v_self->_app_protocol_buffer_updated);
  115290. __pyx_v_self->_app_protocol_buffer_updated = __pyx_t_4;
  115291. __pyx_t_4 = 0;
  115292. /* "uvloop/sslproto.pyx":291
  115293. * self._app_protocol_get_buffer = app_protocol.get_buffer
  115294. * self._app_protocol_buffer_updated = app_protocol.buffer_updated
  115295. * self._app_protocol_is_buffer = True # <<<<<<<<<<<<<<
  115296. * else:
  115297. * self._app_protocol_is_buffer = False
  115298. */
  115299. __pyx_v_self->_app_protocol_is_buffer = 1;
  115300. /* "uvloop/sslproto.pyx":287
  115301. * cdef _set_app_protocol(self, app_protocol):
  115302. * self._app_protocol = app_protocol
  115303. * if (hasattr(app_protocol, 'get_buffer') and # <<<<<<<<<<<<<<
  115304. * not isinstance(app_protocol, aio_Protocol)):
  115305. * self._app_protocol_get_buffer = app_protocol.get_buffer
  115306. */
  115307. goto __pyx_L3;
  115308. }
  115309. /* "uvloop/sslproto.pyx":293
  115310. * self._app_protocol_is_buffer = True
  115311. * else:
  115312. * self._app_protocol_is_buffer = False # <<<<<<<<<<<<<<
  115313. *
  115314. * cdef _wakeup_waiter(self, exc=None):
  115315. */
  115316. /*else*/ {
  115317. __pyx_v_self->_app_protocol_is_buffer = 0;
  115318. }
  115319. __pyx_L3:;
  115320. /* "uvloop/sslproto.pyx":285
  115321. * self._set_write_buffer_limits()
  115322. *
  115323. * cdef _set_app_protocol(self, app_protocol): # <<<<<<<<<<<<<<
  115324. * self._app_protocol = app_protocol
  115325. * if (hasattr(app_protocol, 'get_buffer') and
  115326. */
  115327. /* function exit code */
  115328. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  115329. goto __pyx_L0;
  115330. __pyx_L1_error:;
  115331. __Pyx_XDECREF(__pyx_t_4);
  115332. __Pyx_AddTraceback("uvloop.loop.SSLProtocol._set_app_protocol", __pyx_clineno, __pyx_lineno, __pyx_filename);
  115333. __pyx_r = 0;
  115334. __pyx_L0:;
  115335. __Pyx_XGIVEREF(__pyx_r);
  115336. __Pyx_RefNannyFinishContext();
  115337. return __pyx_r;
  115338. }
  115339. /* "uvloop/sslproto.pyx":295
  115340. * self._app_protocol_is_buffer = False
  115341. *
  115342. * cdef _wakeup_waiter(self, exc=None): # <<<<<<<<<<<<<<
  115343. * if self._waiter is None:
  115344. * return
  115345. */
  115346. static PyObject *__pyx_f_6uvloop_4loop_11SSLProtocol__wakeup_waiter(struct __pyx_obj_6uvloop_4loop_SSLProtocol *__pyx_v_self, struct __pyx_opt_args_6uvloop_4loop_11SSLProtocol__wakeup_waiter *__pyx_optional_args) {
  115347. PyObject *__pyx_v_exc = ((PyObject *)Py_None);
  115348. PyObject *__pyx_r = NULL;
  115349. __Pyx_RefNannyDeclarations
  115350. int __pyx_t_1;
  115351. int __pyx_t_2;
  115352. PyObject *__pyx_t_3 = NULL;
  115353. PyObject *__pyx_t_4 = NULL;
  115354. PyObject *__pyx_t_5 = NULL;
  115355. __Pyx_RefNannySetupContext("_wakeup_waiter", 0);
  115356. if (__pyx_optional_args) {
  115357. if (__pyx_optional_args->__pyx_n > 0) {
  115358. __pyx_v_exc = __pyx_optional_args->exc;
  115359. }
  115360. }
  115361. /* "uvloop/sslproto.pyx":296
  115362. *
  115363. * cdef _wakeup_waiter(self, exc=None):
  115364. * if self._waiter is None: # <<<<<<<<<<<<<<
  115365. * return
  115366. * if not self._waiter.cancelled():
  115367. */
  115368. __pyx_t_1 = (__pyx_v_self->_waiter == Py_None);
  115369. __pyx_t_2 = (__pyx_t_1 != 0);
  115370. if (__pyx_t_2) {
  115371. /* "uvloop/sslproto.pyx":297
  115372. * cdef _wakeup_waiter(self, exc=None):
  115373. * if self._waiter is None:
  115374. * return # <<<<<<<<<<<<<<
  115375. * if not self._waiter.cancelled():
  115376. * if exc is not None:
  115377. */
  115378. __Pyx_XDECREF(__pyx_r);
  115379. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  115380. goto __pyx_L0;
  115381. /* "uvloop/sslproto.pyx":296
  115382. *
  115383. * cdef _wakeup_waiter(self, exc=None):
  115384. * if self._waiter is None: # <<<<<<<<<<<<<<
  115385. * return
  115386. * if not self._waiter.cancelled():
  115387. */
  115388. }
  115389. /* "uvloop/sslproto.pyx":298
  115390. * if self._waiter is None:
  115391. * return
  115392. * if not self._waiter.cancelled(): # <<<<<<<<<<<<<<
  115393. * if exc is not None:
  115394. * self._waiter.set_exception(exc)
  115395. */
  115396. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_waiter, __pyx_n_s_cancelled); if (unlikely(!__pyx_t_4)) __PYX_ERR(22, 298, __pyx_L1_error)
  115397. __Pyx_GOTREF(__pyx_t_4);
  115398. __pyx_t_5 = NULL;
  115399. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
  115400. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
  115401. if (likely(__pyx_t_5)) {
  115402. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  115403. __Pyx_INCREF(__pyx_t_5);
  115404. __Pyx_INCREF(function);
  115405. __Pyx_DECREF_SET(__pyx_t_4, function);
  115406. }
  115407. }
  115408. __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
  115409. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  115410. if (unlikely(!__pyx_t_3)) __PYX_ERR(22, 298, __pyx_L1_error)
  115411. __Pyx_GOTREF(__pyx_t_3);
  115412. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  115413. __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(22, 298, __pyx_L1_error)
  115414. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  115415. __pyx_t_1 = ((!__pyx_t_2) != 0);
  115416. if (__pyx_t_1) {
  115417. /* "uvloop/sslproto.pyx":299
  115418. * return
  115419. * if not self._waiter.cancelled():
  115420. * if exc is not None: # <<<<<<<<<<<<<<
  115421. * self._waiter.set_exception(exc)
  115422. * else:
  115423. */
  115424. __pyx_t_1 = (__pyx_v_exc != Py_None);
  115425. __pyx_t_2 = (__pyx_t_1 != 0);
  115426. if (__pyx_t_2) {
  115427. /* "uvloop/sslproto.pyx":300
  115428. * if not self._waiter.cancelled():
  115429. * if exc is not None:
  115430. * self._waiter.set_exception(exc) # <<<<<<<<<<<<<<
  115431. * else:
  115432. * self._waiter.set_result(None)
  115433. */
  115434. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_waiter, __pyx_n_s_set_exception); if (unlikely(!__pyx_t_4)) __PYX_ERR(22, 300, __pyx_L1_error)
  115435. __Pyx_GOTREF(__pyx_t_4);
  115436. __pyx_t_5 = NULL;
  115437. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
  115438. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
  115439. if (likely(__pyx_t_5)) {
  115440. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  115441. __Pyx_INCREF(__pyx_t_5);
  115442. __Pyx_INCREF(function);
  115443. __Pyx_DECREF_SET(__pyx_t_4, function);
  115444. }
  115445. }
  115446. __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_exc) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_exc);
  115447. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  115448. if (unlikely(!__pyx_t_3)) __PYX_ERR(22, 300, __pyx_L1_error)
  115449. __Pyx_GOTREF(__pyx_t_3);
  115450. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  115451. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  115452. /* "uvloop/sslproto.pyx":299
  115453. * return
  115454. * if not self._waiter.cancelled():
  115455. * if exc is not None: # <<<<<<<<<<<<<<
  115456. * self._waiter.set_exception(exc)
  115457. * else:
  115458. */
  115459. goto __pyx_L5;
  115460. }
  115461. /* "uvloop/sslproto.pyx":302
  115462. * self._waiter.set_exception(exc)
  115463. * else:
  115464. * self._waiter.set_result(None) # <<<<<<<<<<<<<<
  115465. * self._waiter = None
  115466. *
  115467. */
  115468. /*else*/ {
  115469. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_waiter, __pyx_n_s_set_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(22, 302, __pyx_L1_error)
  115470. __Pyx_GOTREF(__pyx_t_4);
  115471. __pyx_t_5 = NULL;
  115472. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
  115473. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
  115474. if (likely(__pyx_t_5)) {
  115475. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  115476. __Pyx_INCREF(__pyx_t_5);
  115477. __Pyx_INCREF(function);
  115478. __Pyx_DECREF_SET(__pyx_t_4, function);
  115479. }
  115480. }
  115481. __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, Py_None) : __Pyx_PyObject_CallOneArg(__pyx_t_4, Py_None);
  115482. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  115483. if (unlikely(!__pyx_t_3)) __PYX_ERR(22, 302, __pyx_L1_error)
  115484. __Pyx_GOTREF(__pyx_t_3);
  115485. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  115486. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  115487. }
  115488. __pyx_L5:;
  115489. /* "uvloop/sslproto.pyx":298
  115490. * if self._waiter is None:
  115491. * return
  115492. * if not self._waiter.cancelled(): # <<<<<<<<<<<<<<
  115493. * if exc is not None:
  115494. * self._waiter.set_exception(exc)
  115495. */
  115496. }
  115497. /* "uvloop/sslproto.pyx":303
  115498. * else:
  115499. * self._waiter.set_result(None)
  115500. * self._waiter = None # <<<<<<<<<<<<<<
  115501. *
  115502. * def _get_app_transport(self):
  115503. */
  115504. __Pyx_INCREF(Py_None);
  115505. __Pyx_GIVEREF(Py_None);
  115506. __Pyx_GOTREF(__pyx_v_self->_waiter);
  115507. __Pyx_DECREF(__pyx_v_self->_waiter);
  115508. __pyx_v_self->_waiter = Py_None;
  115509. /* "uvloop/sslproto.pyx":295
  115510. * self._app_protocol_is_buffer = False
  115511. *
  115512. * cdef _wakeup_waiter(self, exc=None): # <<<<<<<<<<<<<<
  115513. * if self._waiter is None:
  115514. * return
  115515. */
  115516. /* function exit code */
  115517. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  115518. goto __pyx_L0;
  115519. __pyx_L1_error:;
  115520. __Pyx_XDECREF(__pyx_t_3);
  115521. __Pyx_XDECREF(__pyx_t_4);
  115522. __Pyx_XDECREF(__pyx_t_5);
  115523. __Pyx_AddTraceback("uvloop.loop.SSLProtocol._wakeup_waiter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  115524. __pyx_r = 0;
  115525. __pyx_L0:;
  115526. __Pyx_XGIVEREF(__pyx_r);
  115527. __Pyx_RefNannyFinishContext();
  115528. return __pyx_r;
  115529. }
  115530. /* "uvloop/sslproto.pyx":305
  115531. * self._waiter = None
  115532. *
  115533. * def _get_app_transport(self): # <<<<<<<<<<<<<<
  115534. * if self._app_transport is None:
  115535. * if self._app_transport_created:
  115536. */
  115537. /* Python wrapper */
  115538. static PyObject *__pyx_pw_6uvloop_4loop_11SSLProtocol_7_get_app_transport(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  115539. static char __pyx_doc_6uvloop_4loop_11SSLProtocol_6_get_app_transport[] = "SSLProtocol._get_app_transport(self)";
  115540. static PyObject *__pyx_pw_6uvloop_4loop_11SSLProtocol_7_get_app_transport(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  115541. PyObject *__pyx_r = 0;
  115542. __Pyx_RefNannyDeclarations
  115543. __Pyx_RefNannySetupContext("_get_app_transport (wrapper)", 0);
  115544. __pyx_r = __pyx_pf_6uvloop_4loop_11SSLProtocol_6_get_app_transport(((struct __pyx_obj_6uvloop_4loop_SSLProtocol *)__pyx_v_self));
  115545. /* function exit code */
  115546. __Pyx_RefNannyFinishContext();
  115547. return __pyx_r;
  115548. }
  115549. static PyObject *__pyx_pf_6uvloop_4loop_11SSLProtocol_6_get_app_transport(struct __pyx_obj_6uvloop_4loop_SSLProtocol *__pyx_v_self) {
  115550. PyObject *__pyx_r = NULL;
  115551. __Pyx_RefNannyDeclarations
  115552. int __pyx_t_1;
  115553. int __pyx_t_2;
  115554. PyObject *__pyx_t_3 = NULL;
  115555. PyObject *__pyx_t_4 = NULL;
  115556. __Pyx_RefNannySetupContext("_get_app_transport", 0);
  115557. /* "uvloop/sslproto.pyx":306
  115558. *
  115559. * def _get_app_transport(self):
  115560. * if self._app_transport is None: # <<<<<<<<<<<<<<
  115561. * if self._app_transport_created:
  115562. * raise RuntimeError('Creating _SSLProtocolTransport twice')
  115563. */
  115564. __pyx_t_1 = (((PyObject *)__pyx_v_self->_app_transport) == Py_None);
  115565. __pyx_t_2 = (__pyx_t_1 != 0);
  115566. if (__pyx_t_2) {
  115567. /* "uvloop/sslproto.pyx":307
  115568. * def _get_app_transport(self):
  115569. * if self._app_transport is None:
  115570. * if self._app_transport_created: # <<<<<<<<<<<<<<
  115571. * raise RuntimeError('Creating _SSLProtocolTransport twice')
  115572. * self._app_transport = _SSLProtocolTransport(self._loop, self)
  115573. */
  115574. __pyx_t_2 = (__pyx_v_self->_app_transport_created != 0);
  115575. if (unlikely(__pyx_t_2)) {
  115576. /* "uvloop/sslproto.pyx":308
  115577. * if self._app_transport is None:
  115578. * if self._app_transport_created:
  115579. * raise RuntimeError('Creating _SSLProtocolTransport twice') # <<<<<<<<<<<<<<
  115580. * self._app_transport = _SSLProtocolTransport(self._loop, self)
  115581. * self._app_transport_created = True
  115582. */
  115583. __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__203, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(22, 308, __pyx_L1_error)
  115584. __Pyx_GOTREF(__pyx_t_3);
  115585. __Pyx_Raise(__pyx_t_3, 0, 0, 0);
  115586. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  115587. __PYX_ERR(22, 308, __pyx_L1_error)
  115588. /* "uvloop/sslproto.pyx":307
  115589. * def _get_app_transport(self):
  115590. * if self._app_transport is None:
  115591. * if self._app_transport_created: # <<<<<<<<<<<<<<
  115592. * raise RuntimeError('Creating _SSLProtocolTransport twice')
  115593. * self._app_transport = _SSLProtocolTransport(self._loop, self)
  115594. */
  115595. }
  115596. /* "uvloop/sslproto.pyx":309
  115597. * if self._app_transport_created:
  115598. * raise RuntimeError('Creating _SSLProtocolTransport twice')
  115599. * self._app_transport = _SSLProtocolTransport(self._loop, self) # <<<<<<<<<<<<<<
  115600. * self._app_transport_created = True
  115601. * return self._app_transport
  115602. */
  115603. __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(22, 309, __pyx_L1_error)
  115604. __Pyx_GOTREF(__pyx_t_3);
  115605. __Pyx_INCREF(__pyx_v_self->_loop);
  115606. __Pyx_GIVEREF(__pyx_v_self->_loop);
  115607. PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self->_loop);
  115608. __Pyx_INCREF(((PyObject *)__pyx_v_self));
  115609. __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  115610. PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_self));
  115611. __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6uvloop_4loop__SSLProtocolTransport), __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(22, 309, __pyx_L1_error)
  115612. __Pyx_GOTREF(__pyx_t_4);
  115613. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  115614. __Pyx_GIVEREF(__pyx_t_4);
  115615. __Pyx_GOTREF(__pyx_v_self->_app_transport);
  115616. __Pyx_DECREF(((PyObject *)__pyx_v_self->_app_transport));
  115617. __pyx_v_self->_app_transport = ((struct __pyx_obj_6uvloop_4loop__SSLProtocolTransport *)__pyx_t_4);
  115618. __pyx_t_4 = 0;
  115619. /* "uvloop/sslproto.pyx":310
  115620. * raise RuntimeError('Creating _SSLProtocolTransport twice')
  115621. * self._app_transport = _SSLProtocolTransport(self._loop, self)
  115622. * self._app_transport_created = True # <<<<<<<<<<<<<<
  115623. * return self._app_transport
  115624. *
  115625. */
  115626. __pyx_v_self->_app_transport_created = 1;
  115627. /* "uvloop/sslproto.pyx":306
  115628. *
  115629. * def _get_app_transport(self):
  115630. * if self._app_transport is None: # <<<<<<<<<<<<<<
  115631. * if self._app_transport_created:
  115632. * raise RuntimeError('Creating _SSLProtocolTransport twice')
  115633. */
  115634. }
  115635. /* "uvloop/sslproto.pyx":311
  115636. * self._app_transport = _SSLProtocolTransport(self._loop, self)
  115637. * self._app_transport_created = True
  115638. * return self._app_transport # <<<<<<<<<<<<<<
  115639. *
  115640. * def connection_made(self, transport):
  115641. */
  115642. __Pyx_XDECREF(__pyx_r);
  115643. __Pyx_INCREF(((PyObject *)__pyx_v_self->_app_transport));
  115644. __pyx_r = ((PyObject *)__pyx_v_self->_app_transport);
  115645. goto __pyx_L0;
  115646. /* "uvloop/sslproto.pyx":305
  115647. * self._waiter = None
  115648. *
  115649. * def _get_app_transport(self): # <<<<<<<<<<<<<<
  115650. * if self._app_transport is None:
  115651. * if self._app_transport_created:
  115652. */
  115653. /* function exit code */
  115654. __pyx_L1_error:;
  115655. __Pyx_XDECREF(__pyx_t_3);
  115656. __Pyx_XDECREF(__pyx_t_4);
  115657. __Pyx_AddTraceback("uvloop.loop.SSLProtocol._get_app_transport", __pyx_clineno, __pyx_lineno, __pyx_filename);
  115658. __pyx_r = NULL;
  115659. __pyx_L0:;
  115660. __Pyx_XGIVEREF(__pyx_r);
  115661. __Pyx_RefNannyFinishContext();
  115662. return __pyx_r;
  115663. }
  115664. /* "uvloop/sslproto.pyx":313
  115665. * return self._app_transport
  115666. *
  115667. * def connection_made(self, transport): # <<<<<<<<<<<<<<
  115668. * """Called when the low-level connection is made.
  115669. *
  115670. */
  115671. /* Python wrapper */
  115672. static PyObject *__pyx_pw_6uvloop_4loop_11SSLProtocol_9connection_made(PyObject *__pyx_v_self, PyObject *__pyx_v_transport); /*proto*/
  115673. static char __pyx_doc_6uvloop_4loop_11SSLProtocol_8connection_made[] = "SSLProtocol.connection_made(self, transport)\nCalled when the low-level connection is made.\n\n Start the SSL handshake.\n ";
  115674. static PyObject *__pyx_pw_6uvloop_4loop_11SSLProtocol_9connection_made(PyObject *__pyx_v_self, PyObject *__pyx_v_transport) {
  115675. PyObject *__pyx_r = 0;
  115676. __Pyx_RefNannyDeclarations
  115677. __Pyx_RefNannySetupContext("connection_made (wrapper)", 0);
  115678. __pyx_r = __pyx_pf_6uvloop_4loop_11SSLProtocol_8connection_made(((struct __pyx_obj_6uvloop_4loop_SSLProtocol *)__pyx_v_self), ((PyObject *)__pyx_v_transport));
  115679. /* function exit code */
  115680. __Pyx_RefNannyFinishContext();
  115681. return __pyx_r;
  115682. }
  115683. static PyObject *__pyx_pf_6uvloop_4loop_11SSLProtocol_8connection_made(struct __pyx_obj_6uvloop_4loop_SSLProtocol *__pyx_v_self, PyObject *__pyx_v_transport) {
  115684. PyObject *__pyx_r = NULL;
  115685. __Pyx_RefNannyDeclarations
  115686. PyObject *__pyx_t_1 = NULL;
  115687. __Pyx_RefNannySetupContext("connection_made", 0);
  115688. /* "uvloop/sslproto.pyx":318
  115689. * Start the SSL handshake.
  115690. * """
  115691. * self._transport = transport # <<<<<<<<<<<<<<
  115692. * self._start_handshake()
  115693. *
  115694. */
  115695. __Pyx_INCREF(__pyx_v_transport);
  115696. __Pyx_GIVEREF(__pyx_v_transport);
  115697. __Pyx_GOTREF(__pyx_v_self->_transport);
  115698. __Pyx_DECREF(__pyx_v_self->_transport);
  115699. __pyx_v_self->_transport = __pyx_v_transport;
  115700. /* "uvloop/sslproto.pyx":319
  115701. * """
  115702. * self._transport = transport
  115703. * self._start_handshake() # <<<<<<<<<<<<<<
  115704. *
  115705. * def connection_lost(self, exc):
  115706. */
  115707. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_SSLProtocol *)__pyx_v_self->__pyx_vtab)->_start_handshake(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 319, __pyx_L1_error)
  115708. __Pyx_GOTREF(__pyx_t_1);
  115709. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  115710. /* "uvloop/sslproto.pyx":313
  115711. * return self._app_transport
  115712. *
  115713. * def connection_made(self, transport): # <<<<<<<<<<<<<<
  115714. * """Called when the low-level connection is made.
  115715. *
  115716. */
  115717. /* function exit code */
  115718. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  115719. goto __pyx_L0;
  115720. __pyx_L1_error:;
  115721. __Pyx_XDECREF(__pyx_t_1);
  115722. __Pyx_AddTraceback("uvloop.loop.SSLProtocol.connection_made", __pyx_clineno, __pyx_lineno, __pyx_filename);
  115723. __pyx_r = NULL;
  115724. __pyx_L0:;
  115725. __Pyx_XGIVEREF(__pyx_r);
  115726. __Pyx_RefNannyFinishContext();
  115727. return __pyx_r;
  115728. }
  115729. /* "uvloop/sslproto.pyx":321
  115730. * self._start_handshake()
  115731. *
  115732. * def connection_lost(self, exc): # <<<<<<<<<<<<<<
  115733. * """Called when the low-level connection is lost or closed.
  115734. *
  115735. */
  115736. /* Python wrapper */
  115737. static PyObject *__pyx_pw_6uvloop_4loop_11SSLProtocol_11connection_lost(PyObject *__pyx_v_self, PyObject *__pyx_v_exc); /*proto*/
  115738. static char __pyx_doc_6uvloop_4loop_11SSLProtocol_10connection_lost[] = "SSLProtocol.connection_lost(self, exc)\nCalled when the low-level connection is lost or closed.\n\n The argument is an exception object or None (the latter\n meaning a regular EOF is received or the connection was\n aborted or closed).\n ";
  115739. static PyObject *__pyx_pw_6uvloop_4loop_11SSLProtocol_11connection_lost(PyObject *__pyx_v_self, PyObject *__pyx_v_exc) {
  115740. PyObject *__pyx_r = 0;
  115741. __Pyx_RefNannyDeclarations
  115742. __Pyx_RefNannySetupContext("connection_lost (wrapper)", 0);
  115743. __pyx_r = __pyx_pf_6uvloop_4loop_11SSLProtocol_10connection_lost(((struct __pyx_obj_6uvloop_4loop_SSLProtocol *)__pyx_v_self), ((PyObject *)__pyx_v_exc));
  115744. /* function exit code */
  115745. __Pyx_RefNannyFinishContext();
  115746. return __pyx_r;
  115747. }
  115748. static PyObject *__pyx_pf_6uvloop_4loop_11SSLProtocol_10connection_lost(struct __pyx_obj_6uvloop_4loop_SSLProtocol *__pyx_v_self, PyObject *__pyx_v_exc) {
  115749. PyObject *__pyx_r = NULL;
  115750. __Pyx_RefNannyDeclarations
  115751. PyObject *__pyx_t_1 = NULL;
  115752. PyObject *__pyx_t_2 = NULL;
  115753. PyObject *__pyx_t_3 = NULL;
  115754. int __pyx_t_4;
  115755. int __pyx_t_5;
  115756. PyObject *__pyx_t_6 = NULL;
  115757. int __pyx_t_7;
  115758. PyObject *__pyx_t_8 = NULL;
  115759. struct __pyx_opt_args_6uvloop_4loop_11SSLProtocol__wakeup_waiter __pyx_t_9;
  115760. __Pyx_RefNannySetupContext("connection_lost", 0);
  115761. /* "uvloop/sslproto.pyx":328
  115762. * aborted or closed).
  115763. * """
  115764. * self._write_backlog.clear() # <<<<<<<<<<<<<<
  115765. * self._outgoing_read()
  115766. * self._conn_lost += 1
  115767. */
  115768. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_write_backlog, __pyx_n_s_clear); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 328, __pyx_L1_error)
  115769. __Pyx_GOTREF(__pyx_t_2);
  115770. __pyx_t_3 = NULL;
  115771. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
  115772. __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
  115773. if (likely(__pyx_t_3)) {
  115774. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  115775. __Pyx_INCREF(__pyx_t_3);
  115776. __Pyx_INCREF(function);
  115777. __Pyx_DECREF_SET(__pyx_t_2, function);
  115778. }
  115779. }
  115780. __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  115781. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  115782. if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 328, __pyx_L1_error)
  115783. __Pyx_GOTREF(__pyx_t_1);
  115784. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  115785. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  115786. /* "uvloop/sslproto.pyx":329
  115787. * """
  115788. * self._write_backlog.clear()
  115789. * self._outgoing_read() # <<<<<<<<<<<<<<
  115790. * self._conn_lost += 1
  115791. *
  115792. */
  115793. __Pyx_INCREF(__pyx_v_self->_outgoing_read);
  115794. __pyx_t_2 = __pyx_v_self->_outgoing_read; __pyx_t_3 = NULL;
  115795. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
  115796. __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
  115797. if (likely(__pyx_t_3)) {
  115798. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  115799. __Pyx_INCREF(__pyx_t_3);
  115800. __Pyx_INCREF(function);
  115801. __Pyx_DECREF_SET(__pyx_t_2, function);
  115802. }
  115803. }
  115804. __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  115805. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  115806. if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 329, __pyx_L1_error)
  115807. __Pyx_GOTREF(__pyx_t_1);
  115808. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  115809. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  115810. /* "uvloop/sslproto.pyx":330
  115811. * self._write_backlog.clear()
  115812. * self._outgoing_read()
  115813. * self._conn_lost += 1 # <<<<<<<<<<<<<<
  115814. *
  115815. * # Just mark the app transport as closed so that its __dealloc__
  115816. */
  115817. __pyx_v_self->_conn_lost = (__pyx_v_self->_conn_lost + 1);
  115818. /* "uvloop/sslproto.pyx":334
  115819. * # Just mark the app transport as closed so that its __dealloc__
  115820. * # doesn't complain.
  115821. * if self._app_transport is not None: # <<<<<<<<<<<<<<
  115822. * self._app_transport._closed = True
  115823. *
  115824. */
  115825. __pyx_t_4 = (((PyObject *)__pyx_v_self->_app_transport) != Py_None);
  115826. __pyx_t_5 = (__pyx_t_4 != 0);
  115827. if (__pyx_t_5) {
  115828. /* "uvloop/sslproto.pyx":335
  115829. * # doesn't complain.
  115830. * if self._app_transport is not None:
  115831. * self._app_transport._closed = True # <<<<<<<<<<<<<<
  115832. *
  115833. * if self._state != DO_HANDSHAKE:
  115834. */
  115835. __pyx_v_self->_app_transport->_closed = 1;
  115836. /* "uvloop/sslproto.pyx":334
  115837. * # Just mark the app transport as closed so that its __dealloc__
  115838. * # doesn't complain.
  115839. * if self._app_transport is not None: # <<<<<<<<<<<<<<
  115840. * self._app_transport._closed = True
  115841. *
  115842. */
  115843. }
  115844. /* "uvloop/sslproto.pyx":337
  115845. * self._app_transport._closed = True
  115846. *
  115847. * if self._state != DO_HANDSHAKE: # <<<<<<<<<<<<<<
  115848. * self._loop.call_soon(self._app_protocol.connection_lost, exc)
  115849. * self._set_state(UNWRAPPED)
  115850. */
  115851. __pyx_t_5 = ((__pyx_v_self->_state != __pyx_e_6uvloop_4loop_DO_HANDSHAKE) != 0);
  115852. if (__pyx_t_5) {
  115853. /* "uvloop/sslproto.pyx":338
  115854. *
  115855. * if self._state != DO_HANDSHAKE:
  115856. * self._loop.call_soon(self._app_protocol.connection_lost, exc) # <<<<<<<<<<<<<<
  115857. * self._set_state(UNWRAPPED)
  115858. * self._transport = None
  115859. */
  115860. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_loop, __pyx_n_s_call_soon); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 338, __pyx_L1_error)
  115861. __Pyx_GOTREF(__pyx_t_2);
  115862. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_app_protocol, __pyx_n_s_connection_lost); if (unlikely(!__pyx_t_3)) __PYX_ERR(22, 338, __pyx_L1_error)
  115863. __Pyx_GOTREF(__pyx_t_3);
  115864. __pyx_t_6 = NULL;
  115865. __pyx_t_7 = 0;
  115866. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
  115867. __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
  115868. if (likely(__pyx_t_6)) {
  115869. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  115870. __Pyx_INCREF(__pyx_t_6);
  115871. __Pyx_INCREF(function);
  115872. __Pyx_DECREF_SET(__pyx_t_2, function);
  115873. __pyx_t_7 = 1;
  115874. }
  115875. }
  115876. #if CYTHON_FAST_PYCALL
  115877. if (PyFunction_Check(__pyx_t_2)) {
  115878. PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_3, __pyx_v_exc};
  115879. __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 338, __pyx_L1_error)
  115880. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  115881. __Pyx_GOTREF(__pyx_t_1);
  115882. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  115883. } else
  115884. #endif
  115885. #if CYTHON_FAST_PYCCALL
  115886. if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
  115887. PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_3, __pyx_v_exc};
  115888. __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 338, __pyx_L1_error)
  115889. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  115890. __Pyx_GOTREF(__pyx_t_1);
  115891. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  115892. } else
  115893. #endif
  115894. {
  115895. __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(22, 338, __pyx_L1_error)
  115896. __Pyx_GOTREF(__pyx_t_8);
  115897. if (__pyx_t_6) {
  115898. __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
  115899. }
  115900. __Pyx_GIVEREF(__pyx_t_3);
  115901. PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_3);
  115902. __Pyx_INCREF(__pyx_v_exc);
  115903. __Pyx_GIVEREF(__pyx_v_exc);
  115904. PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_exc);
  115905. __pyx_t_3 = 0;
  115906. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 338, __pyx_L1_error)
  115907. __Pyx_GOTREF(__pyx_t_1);
  115908. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  115909. }
  115910. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  115911. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  115912. /* "uvloop/sslproto.pyx":337
  115913. * self._app_transport._closed = True
  115914. *
  115915. * if self._state != DO_HANDSHAKE: # <<<<<<<<<<<<<<
  115916. * self._loop.call_soon(self._app_protocol.connection_lost, exc)
  115917. * self._set_state(UNWRAPPED)
  115918. */
  115919. }
  115920. /* "uvloop/sslproto.pyx":339
  115921. * if self._state != DO_HANDSHAKE:
  115922. * self._loop.call_soon(self._app_protocol.connection_lost, exc)
  115923. * self._set_state(UNWRAPPED) # <<<<<<<<<<<<<<
  115924. * self._transport = None
  115925. * self._app_transport = None
  115926. */
  115927. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_SSLProtocol *)__pyx_v_self->__pyx_vtab)->_set_state(__pyx_v_self, __pyx_e_6uvloop_4loop_UNWRAPPED); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 339, __pyx_L1_error)
  115928. __Pyx_GOTREF(__pyx_t_1);
  115929. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  115930. /* "uvloop/sslproto.pyx":340
  115931. * self._loop.call_soon(self._app_protocol.connection_lost, exc)
  115932. * self._set_state(UNWRAPPED)
  115933. * self._transport = None # <<<<<<<<<<<<<<
  115934. * self._app_transport = None
  115935. * self._app_protocol = None
  115936. */
  115937. __Pyx_INCREF(Py_None);
  115938. __Pyx_GIVEREF(Py_None);
  115939. __Pyx_GOTREF(__pyx_v_self->_transport);
  115940. __Pyx_DECREF(__pyx_v_self->_transport);
  115941. __pyx_v_self->_transport = Py_None;
  115942. /* "uvloop/sslproto.pyx":341
  115943. * self._set_state(UNWRAPPED)
  115944. * self._transport = None
  115945. * self._app_transport = None # <<<<<<<<<<<<<<
  115946. * self._app_protocol = None
  115947. * self._wakeup_waiter(exc)
  115948. */
  115949. __Pyx_INCREF(Py_None);
  115950. __Pyx_GIVEREF(Py_None);
  115951. __Pyx_GOTREF(__pyx_v_self->_app_transport);
  115952. __Pyx_DECREF(((PyObject *)__pyx_v_self->_app_transport));
  115953. __pyx_v_self->_app_transport = ((struct __pyx_obj_6uvloop_4loop__SSLProtocolTransport *)Py_None);
  115954. /* "uvloop/sslproto.pyx":342
  115955. * self._transport = None
  115956. * self._app_transport = None
  115957. * self._app_protocol = None # <<<<<<<<<<<<<<
  115958. * self._wakeup_waiter(exc)
  115959. *
  115960. */
  115961. __Pyx_INCREF(Py_None);
  115962. __Pyx_GIVEREF(Py_None);
  115963. __Pyx_GOTREF(__pyx_v_self->_app_protocol);
  115964. __Pyx_DECREF(__pyx_v_self->_app_protocol);
  115965. __pyx_v_self->_app_protocol = Py_None;
  115966. /* "uvloop/sslproto.pyx":343
  115967. * self._app_transport = None
  115968. * self._app_protocol = None
  115969. * self._wakeup_waiter(exc) # <<<<<<<<<<<<<<
  115970. *
  115971. * if self._shutdown_timeout_handle:
  115972. */
  115973. __pyx_t_9.__pyx_n = 1;
  115974. __pyx_t_9.exc = __pyx_v_exc;
  115975. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_SSLProtocol *)__pyx_v_self->__pyx_vtab)->_wakeup_waiter(__pyx_v_self, &__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 343, __pyx_L1_error)
  115976. __Pyx_GOTREF(__pyx_t_1);
  115977. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  115978. /* "uvloop/sslproto.pyx":345
  115979. * self._wakeup_waiter(exc)
  115980. *
  115981. * if self._shutdown_timeout_handle: # <<<<<<<<<<<<<<
  115982. * self._shutdown_timeout_handle.cancel()
  115983. * if self._handshake_timeout_handle:
  115984. */
  115985. __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_self->_shutdown_timeout_handle); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(22, 345, __pyx_L1_error)
  115986. if (__pyx_t_5) {
  115987. /* "uvloop/sslproto.pyx":346
  115988. *
  115989. * if self._shutdown_timeout_handle:
  115990. * self._shutdown_timeout_handle.cancel() # <<<<<<<<<<<<<<
  115991. * if self._handshake_timeout_handle:
  115992. * self._handshake_timeout_handle.cancel()
  115993. */
  115994. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_shutdown_timeout_handle, __pyx_n_s_cancel); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 346, __pyx_L1_error)
  115995. __Pyx_GOTREF(__pyx_t_2);
  115996. __pyx_t_8 = NULL;
  115997. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
  115998. __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2);
  115999. if (likely(__pyx_t_8)) {
  116000. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  116001. __Pyx_INCREF(__pyx_t_8);
  116002. __Pyx_INCREF(function);
  116003. __Pyx_DECREF_SET(__pyx_t_2, function);
  116004. }
  116005. }
  116006. __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  116007. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  116008. if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 346, __pyx_L1_error)
  116009. __Pyx_GOTREF(__pyx_t_1);
  116010. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  116011. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  116012. /* "uvloop/sslproto.pyx":345
  116013. * self._wakeup_waiter(exc)
  116014. *
  116015. * if self._shutdown_timeout_handle: # <<<<<<<<<<<<<<
  116016. * self._shutdown_timeout_handle.cancel()
  116017. * if self._handshake_timeout_handle:
  116018. */
  116019. }
  116020. /* "uvloop/sslproto.pyx":347
  116021. * if self._shutdown_timeout_handle:
  116022. * self._shutdown_timeout_handle.cancel()
  116023. * if self._handshake_timeout_handle: # <<<<<<<<<<<<<<
  116024. * self._handshake_timeout_handle.cancel()
  116025. *
  116026. */
  116027. __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_self->_handshake_timeout_handle); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(22, 347, __pyx_L1_error)
  116028. if (__pyx_t_5) {
  116029. /* "uvloop/sslproto.pyx":348
  116030. * self._shutdown_timeout_handle.cancel()
  116031. * if self._handshake_timeout_handle:
  116032. * self._handshake_timeout_handle.cancel() # <<<<<<<<<<<<<<
  116033. *
  116034. * def get_buffer(self, n):
  116035. */
  116036. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_handshake_timeout_handle, __pyx_n_s_cancel); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 348, __pyx_L1_error)
  116037. __Pyx_GOTREF(__pyx_t_2);
  116038. __pyx_t_8 = NULL;
  116039. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
  116040. __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2);
  116041. if (likely(__pyx_t_8)) {
  116042. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  116043. __Pyx_INCREF(__pyx_t_8);
  116044. __Pyx_INCREF(function);
  116045. __Pyx_DECREF_SET(__pyx_t_2, function);
  116046. }
  116047. }
  116048. __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  116049. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  116050. if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 348, __pyx_L1_error)
  116051. __Pyx_GOTREF(__pyx_t_1);
  116052. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  116053. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  116054. /* "uvloop/sslproto.pyx":347
  116055. * if self._shutdown_timeout_handle:
  116056. * self._shutdown_timeout_handle.cancel()
  116057. * if self._handshake_timeout_handle: # <<<<<<<<<<<<<<
  116058. * self._handshake_timeout_handle.cancel()
  116059. *
  116060. */
  116061. }
  116062. /* "uvloop/sslproto.pyx":321
  116063. * self._start_handshake()
  116064. *
  116065. * def connection_lost(self, exc): # <<<<<<<<<<<<<<
  116066. * """Called when the low-level connection is lost or closed.
  116067. *
  116068. */
  116069. /* function exit code */
  116070. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  116071. goto __pyx_L0;
  116072. __pyx_L1_error:;
  116073. __Pyx_XDECREF(__pyx_t_1);
  116074. __Pyx_XDECREF(__pyx_t_2);
  116075. __Pyx_XDECREF(__pyx_t_3);
  116076. __Pyx_XDECREF(__pyx_t_6);
  116077. __Pyx_XDECREF(__pyx_t_8);
  116078. __Pyx_AddTraceback("uvloop.loop.SSLProtocol.connection_lost", __pyx_clineno, __pyx_lineno, __pyx_filename);
  116079. __pyx_r = NULL;
  116080. __pyx_L0:;
  116081. __Pyx_XGIVEREF(__pyx_r);
  116082. __Pyx_RefNannyFinishContext();
  116083. return __pyx_r;
  116084. }
  116085. /* "uvloop/sslproto.pyx":350
  116086. * self._handshake_timeout_handle.cancel()
  116087. *
  116088. * def get_buffer(self, n): # <<<<<<<<<<<<<<
  116089. * cdef size_t want = n
  116090. * if want > SSL_READ_MAX_SIZE:
  116091. */
  116092. /* Python wrapper */
  116093. static PyObject *__pyx_pw_6uvloop_4loop_11SSLProtocol_13get_buffer(PyObject *__pyx_v_self, PyObject *__pyx_v_n); /*proto*/
  116094. static char __pyx_doc_6uvloop_4loop_11SSLProtocol_12get_buffer[] = "SSLProtocol.get_buffer(self, n)";
  116095. static PyObject *__pyx_pw_6uvloop_4loop_11SSLProtocol_13get_buffer(PyObject *__pyx_v_self, PyObject *__pyx_v_n) {
  116096. PyObject *__pyx_r = 0;
  116097. __Pyx_RefNannyDeclarations
  116098. __Pyx_RefNannySetupContext("get_buffer (wrapper)", 0);
  116099. __pyx_r = __pyx_pf_6uvloop_4loop_11SSLProtocol_12get_buffer(((struct __pyx_obj_6uvloop_4loop_SSLProtocol *)__pyx_v_self), ((PyObject *)__pyx_v_n));
  116100. /* function exit code */
  116101. __Pyx_RefNannyFinishContext();
  116102. return __pyx_r;
  116103. }
  116104. static PyObject *__pyx_pf_6uvloop_4loop_11SSLProtocol_12get_buffer(struct __pyx_obj_6uvloop_4loop_SSLProtocol *__pyx_v_self, PyObject *__pyx_v_n) {
  116105. size_t __pyx_v_want;
  116106. PyObject *__pyx_r = NULL;
  116107. __Pyx_RefNannyDeclarations
  116108. size_t __pyx_t_1;
  116109. int __pyx_t_2;
  116110. PyObject *__pyx_t_3 = NULL;
  116111. __Pyx_RefNannySetupContext("get_buffer", 0);
  116112. /* "uvloop/sslproto.pyx":351
  116113. *
  116114. * def get_buffer(self, n):
  116115. * cdef size_t want = n # <<<<<<<<<<<<<<
  116116. * if want > SSL_READ_MAX_SIZE:
  116117. * want = SSL_READ_MAX_SIZE
  116118. */
  116119. __pyx_t_1 = __Pyx_PyInt_As_size_t(__pyx_v_n); if (unlikely((__pyx_t_1 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(22, 351, __pyx_L1_error)
  116120. __pyx_v_want = __pyx_t_1;
  116121. /* "uvloop/sslproto.pyx":352
  116122. * def get_buffer(self, n):
  116123. * cdef size_t want = n
  116124. * if want > SSL_READ_MAX_SIZE: # <<<<<<<<<<<<<<
  116125. * want = SSL_READ_MAX_SIZE
  116126. * if self._ssl_buffer_len < want:
  116127. */
  116128. __pyx_t_2 = ((__pyx_v_want > 0x40000) != 0);
  116129. if (__pyx_t_2) {
  116130. /* "uvloop/sslproto.pyx":353
  116131. * cdef size_t want = n
  116132. * if want > SSL_READ_MAX_SIZE:
  116133. * want = SSL_READ_MAX_SIZE # <<<<<<<<<<<<<<
  116134. * if self._ssl_buffer_len < want:
  116135. * self._ssl_buffer = <char*>PyMem_RawRealloc(self._ssl_buffer, want)
  116136. */
  116137. __pyx_v_want = 0x40000;
  116138. /* "uvloop/sslproto.pyx":352
  116139. * def get_buffer(self, n):
  116140. * cdef size_t want = n
  116141. * if want > SSL_READ_MAX_SIZE: # <<<<<<<<<<<<<<
  116142. * want = SSL_READ_MAX_SIZE
  116143. * if self._ssl_buffer_len < want:
  116144. */
  116145. }
  116146. /* "uvloop/sslproto.pyx":354
  116147. * if want > SSL_READ_MAX_SIZE:
  116148. * want = SSL_READ_MAX_SIZE
  116149. * if self._ssl_buffer_len < want: # <<<<<<<<<<<<<<
  116150. * self._ssl_buffer = <char*>PyMem_RawRealloc(self._ssl_buffer, want)
  116151. * if not self._ssl_buffer:
  116152. */
  116153. __pyx_t_2 = ((__pyx_v_self->_ssl_buffer_len < __pyx_v_want) != 0);
  116154. if (__pyx_t_2) {
  116155. /* "uvloop/sslproto.pyx":355
  116156. * want = SSL_READ_MAX_SIZE
  116157. * if self._ssl_buffer_len < want:
  116158. * self._ssl_buffer = <char*>PyMem_RawRealloc(self._ssl_buffer, want) # <<<<<<<<<<<<<<
  116159. * if not self._ssl_buffer:
  116160. * raise MemoryError()
  116161. */
  116162. __pyx_v_self->_ssl_buffer = ((char *)PyMem_RawRealloc(__pyx_v_self->_ssl_buffer, __pyx_v_want));
  116163. /* "uvloop/sslproto.pyx":356
  116164. * if self._ssl_buffer_len < want:
  116165. * self._ssl_buffer = <char*>PyMem_RawRealloc(self._ssl_buffer, want)
  116166. * if not self._ssl_buffer: # <<<<<<<<<<<<<<
  116167. * raise MemoryError()
  116168. * self._ssl_buffer_len = want
  116169. */
  116170. __pyx_t_2 = ((!(__pyx_v_self->_ssl_buffer != 0)) != 0);
  116171. if (unlikely(__pyx_t_2)) {
  116172. /* "uvloop/sslproto.pyx":357
  116173. * self._ssl_buffer = <char*>PyMem_RawRealloc(self._ssl_buffer, want)
  116174. * if not self._ssl_buffer:
  116175. * raise MemoryError() # <<<<<<<<<<<<<<
  116176. * self._ssl_buffer_len = want
  116177. * self._ssl_buffer_view = PyMemoryView_FromMemory(
  116178. */
  116179. PyErr_NoMemory(); __PYX_ERR(22, 357, __pyx_L1_error)
  116180. /* "uvloop/sslproto.pyx":356
  116181. * if self._ssl_buffer_len < want:
  116182. * self._ssl_buffer = <char*>PyMem_RawRealloc(self._ssl_buffer, want)
  116183. * if not self._ssl_buffer: # <<<<<<<<<<<<<<
  116184. * raise MemoryError()
  116185. * self._ssl_buffer_len = want
  116186. */
  116187. }
  116188. /* "uvloop/sslproto.pyx":358
  116189. * if not self._ssl_buffer:
  116190. * raise MemoryError()
  116191. * self._ssl_buffer_len = want # <<<<<<<<<<<<<<
  116192. * self._ssl_buffer_view = PyMemoryView_FromMemory(
  116193. * self._ssl_buffer, want, PyBUF_WRITE)
  116194. */
  116195. __pyx_v_self->_ssl_buffer_len = __pyx_v_want;
  116196. /* "uvloop/sslproto.pyx":359
  116197. * raise MemoryError()
  116198. * self._ssl_buffer_len = want
  116199. * self._ssl_buffer_view = PyMemoryView_FromMemory( # <<<<<<<<<<<<<<
  116200. * self._ssl_buffer, want, PyBUF_WRITE)
  116201. * return self._ssl_buffer_view
  116202. */
  116203. __pyx_t_3 = PyMemoryView_FromMemory(__pyx_v_self->_ssl_buffer, __pyx_v_want, PyBUF_WRITE); if (unlikely(!__pyx_t_3)) __PYX_ERR(22, 359, __pyx_L1_error)
  116204. __Pyx_GOTREF(__pyx_t_3);
  116205. __Pyx_GIVEREF(__pyx_t_3);
  116206. __Pyx_GOTREF(__pyx_v_self->_ssl_buffer_view);
  116207. __Pyx_DECREF(__pyx_v_self->_ssl_buffer_view);
  116208. __pyx_v_self->_ssl_buffer_view = __pyx_t_3;
  116209. __pyx_t_3 = 0;
  116210. /* "uvloop/sslproto.pyx":354
  116211. * if want > SSL_READ_MAX_SIZE:
  116212. * want = SSL_READ_MAX_SIZE
  116213. * if self._ssl_buffer_len < want: # <<<<<<<<<<<<<<
  116214. * self._ssl_buffer = <char*>PyMem_RawRealloc(self._ssl_buffer, want)
  116215. * if not self._ssl_buffer:
  116216. */
  116217. }
  116218. /* "uvloop/sslproto.pyx":361
  116219. * self._ssl_buffer_view = PyMemoryView_FromMemory(
  116220. * self._ssl_buffer, want, PyBUF_WRITE)
  116221. * return self._ssl_buffer_view # <<<<<<<<<<<<<<
  116222. *
  116223. * def buffer_updated(self, nbytes):
  116224. */
  116225. __Pyx_XDECREF(__pyx_r);
  116226. __Pyx_INCREF(__pyx_v_self->_ssl_buffer_view);
  116227. __pyx_r = __pyx_v_self->_ssl_buffer_view;
  116228. goto __pyx_L0;
  116229. /* "uvloop/sslproto.pyx":350
  116230. * self._handshake_timeout_handle.cancel()
  116231. *
  116232. * def get_buffer(self, n): # <<<<<<<<<<<<<<
  116233. * cdef size_t want = n
  116234. * if want > SSL_READ_MAX_SIZE:
  116235. */
  116236. /* function exit code */
  116237. __pyx_L1_error:;
  116238. __Pyx_XDECREF(__pyx_t_3);
  116239. __Pyx_AddTraceback("uvloop.loop.SSLProtocol.get_buffer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  116240. __pyx_r = NULL;
  116241. __pyx_L0:;
  116242. __Pyx_XGIVEREF(__pyx_r);
  116243. __Pyx_RefNannyFinishContext();
  116244. return __pyx_r;
  116245. }
  116246. /* "uvloop/sslproto.pyx":363
  116247. * return self._ssl_buffer_view
  116248. *
  116249. * def buffer_updated(self, nbytes): # <<<<<<<<<<<<<<
  116250. * self._incoming_write(PyMemoryView_FromMemory(
  116251. * self._ssl_buffer, nbytes, PyBUF_WRITE))
  116252. */
  116253. /* Python wrapper */
  116254. static PyObject *__pyx_pw_6uvloop_4loop_11SSLProtocol_15buffer_updated(PyObject *__pyx_v_self, PyObject *__pyx_v_nbytes); /*proto*/
  116255. static char __pyx_doc_6uvloop_4loop_11SSLProtocol_14buffer_updated[] = "SSLProtocol.buffer_updated(self, nbytes)";
  116256. static PyObject *__pyx_pw_6uvloop_4loop_11SSLProtocol_15buffer_updated(PyObject *__pyx_v_self, PyObject *__pyx_v_nbytes) {
  116257. PyObject *__pyx_r = 0;
  116258. __Pyx_RefNannyDeclarations
  116259. __Pyx_RefNannySetupContext("buffer_updated (wrapper)", 0);
  116260. __pyx_r = __pyx_pf_6uvloop_4loop_11SSLProtocol_14buffer_updated(((struct __pyx_obj_6uvloop_4loop_SSLProtocol *)__pyx_v_self), ((PyObject *)__pyx_v_nbytes));
  116261. /* function exit code */
  116262. __Pyx_RefNannyFinishContext();
  116263. return __pyx_r;
  116264. }
  116265. static PyObject *__pyx_pf_6uvloop_4loop_11SSLProtocol_14buffer_updated(struct __pyx_obj_6uvloop_4loop_SSLProtocol *__pyx_v_self, PyObject *__pyx_v_nbytes) {
  116266. PyObject *__pyx_r = NULL;
  116267. __Pyx_RefNannyDeclarations
  116268. PyObject *__pyx_t_1 = NULL;
  116269. Py_ssize_t __pyx_t_2;
  116270. PyObject *__pyx_t_3 = NULL;
  116271. PyObject *__pyx_t_4 = NULL;
  116272. PyObject *__pyx_t_5 = NULL;
  116273. __Pyx_RefNannySetupContext("buffer_updated", 0);
  116274. /* "uvloop/sslproto.pyx":365
  116275. * def buffer_updated(self, nbytes):
  116276. * self._incoming_write(PyMemoryView_FromMemory(
  116277. * self._ssl_buffer, nbytes, PyBUF_WRITE)) # <<<<<<<<<<<<<<
  116278. *
  116279. * if self._state == DO_HANDSHAKE:
  116280. */
  116281. __pyx_t_2 = PyInt_AsSsize_t(__pyx_v_nbytes); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(22, 365, __pyx_L1_error)
  116282. /* "uvloop/sslproto.pyx":364
  116283. *
  116284. * def buffer_updated(self, nbytes):
  116285. * self._incoming_write(PyMemoryView_FromMemory( # <<<<<<<<<<<<<<
  116286. * self._ssl_buffer, nbytes, PyBUF_WRITE))
  116287. *
  116288. */
  116289. __pyx_t_3 = PyMemoryView_FromMemory(__pyx_v_self->_ssl_buffer, __pyx_t_2, PyBUF_WRITE); if (unlikely(!__pyx_t_3)) __PYX_ERR(22, 364, __pyx_L1_error)
  116290. __Pyx_GOTREF(__pyx_t_3);
  116291. __Pyx_INCREF(__pyx_v_self->_incoming_write);
  116292. __pyx_t_4 = __pyx_v_self->_incoming_write; __pyx_t_5 = NULL;
  116293. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
  116294. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
  116295. if (likely(__pyx_t_5)) {
  116296. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  116297. __Pyx_INCREF(__pyx_t_5);
  116298. __Pyx_INCREF(function);
  116299. __Pyx_DECREF_SET(__pyx_t_4, function);
  116300. }
  116301. }
  116302. __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3);
  116303. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  116304. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  116305. if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 364, __pyx_L1_error)
  116306. __Pyx_GOTREF(__pyx_t_1);
  116307. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  116308. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  116309. /* "uvloop/sslproto.pyx":367
  116310. * self._ssl_buffer, nbytes, PyBUF_WRITE))
  116311. *
  116312. * if self._state == DO_HANDSHAKE: # <<<<<<<<<<<<<<
  116313. * self._do_handshake()
  116314. *
  116315. */
  116316. switch (__pyx_v_self->_state) {
  116317. case __pyx_e_6uvloop_4loop_DO_HANDSHAKE:
  116318. /* "uvloop/sslproto.pyx":368
  116319. *
  116320. * if self._state == DO_HANDSHAKE:
  116321. * self._do_handshake() # <<<<<<<<<<<<<<
  116322. *
  116323. * elif self._state == WRAPPED:
  116324. */
  116325. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_SSLProtocol *)__pyx_v_self->__pyx_vtab)->_do_handshake(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 368, __pyx_L1_error)
  116326. __Pyx_GOTREF(__pyx_t_1);
  116327. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  116328. /* "uvloop/sslproto.pyx":367
  116329. * self._ssl_buffer, nbytes, PyBUF_WRITE))
  116330. *
  116331. * if self._state == DO_HANDSHAKE: # <<<<<<<<<<<<<<
  116332. * self._do_handshake()
  116333. *
  116334. */
  116335. break;
  116336. case __pyx_e_6uvloop_4loop_WRAPPED:
  116337. /* "uvloop/sslproto.pyx":371
  116338. *
  116339. * elif self._state == WRAPPED:
  116340. * self._do_read() # <<<<<<<<<<<<<<
  116341. *
  116342. * elif self._state == FLUSHING:
  116343. */
  116344. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_SSLProtocol *)__pyx_v_self->__pyx_vtab)->_do_read(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 371, __pyx_L1_error)
  116345. __Pyx_GOTREF(__pyx_t_1);
  116346. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  116347. /* "uvloop/sslproto.pyx":370
  116348. * self._do_handshake()
  116349. *
  116350. * elif self._state == WRAPPED: # <<<<<<<<<<<<<<
  116351. * self._do_read()
  116352. *
  116353. */
  116354. break;
  116355. case __pyx_e_6uvloop_4loop_FLUSHING:
  116356. /* "uvloop/sslproto.pyx":374
  116357. *
  116358. * elif self._state == FLUSHING:
  116359. * self._do_flush() # <<<<<<<<<<<<<<
  116360. *
  116361. * elif self._state == SHUTDOWN:
  116362. */
  116363. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_SSLProtocol *)__pyx_v_self->__pyx_vtab)->_do_flush(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 374, __pyx_L1_error)
  116364. __Pyx_GOTREF(__pyx_t_1);
  116365. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  116366. /* "uvloop/sslproto.pyx":373
  116367. * self._do_read()
  116368. *
  116369. * elif self._state == FLUSHING: # <<<<<<<<<<<<<<
  116370. * self._do_flush()
  116371. *
  116372. */
  116373. break;
  116374. case __pyx_e_6uvloop_4loop_SHUTDOWN:
  116375. /* "uvloop/sslproto.pyx":377
  116376. *
  116377. * elif self._state == SHUTDOWN:
  116378. * self._do_shutdown() # <<<<<<<<<<<<<<
  116379. *
  116380. * def eof_received(self):
  116381. */
  116382. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_SSLProtocol *)__pyx_v_self->__pyx_vtab)->_do_shutdown(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 377, __pyx_L1_error)
  116383. __Pyx_GOTREF(__pyx_t_1);
  116384. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  116385. /* "uvloop/sslproto.pyx":376
  116386. * self._do_flush()
  116387. *
  116388. * elif self._state == SHUTDOWN: # <<<<<<<<<<<<<<
  116389. * self._do_shutdown()
  116390. *
  116391. */
  116392. break;
  116393. default: break;
  116394. }
  116395. /* "uvloop/sslproto.pyx":363
  116396. * return self._ssl_buffer_view
  116397. *
  116398. * def buffer_updated(self, nbytes): # <<<<<<<<<<<<<<
  116399. * self._incoming_write(PyMemoryView_FromMemory(
  116400. * self._ssl_buffer, nbytes, PyBUF_WRITE))
  116401. */
  116402. /* function exit code */
  116403. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  116404. goto __pyx_L0;
  116405. __pyx_L1_error:;
  116406. __Pyx_XDECREF(__pyx_t_1);
  116407. __Pyx_XDECREF(__pyx_t_3);
  116408. __Pyx_XDECREF(__pyx_t_4);
  116409. __Pyx_XDECREF(__pyx_t_5);
  116410. __Pyx_AddTraceback("uvloop.loop.SSLProtocol.buffer_updated", __pyx_clineno, __pyx_lineno, __pyx_filename);
  116411. __pyx_r = NULL;
  116412. __pyx_L0:;
  116413. __Pyx_XGIVEREF(__pyx_r);
  116414. __Pyx_RefNannyFinishContext();
  116415. return __pyx_r;
  116416. }
  116417. /* "uvloop/sslproto.pyx":379
  116418. * self._do_shutdown()
  116419. *
  116420. * def eof_received(self): # <<<<<<<<<<<<<<
  116421. * """Called when the other end of the low-level stream
  116422. * is half-closed.
  116423. */
  116424. /* Python wrapper */
  116425. static PyObject *__pyx_pw_6uvloop_4loop_11SSLProtocol_17eof_received(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  116426. static char __pyx_doc_6uvloop_4loop_11SSLProtocol_16eof_received[] = "SSLProtocol.eof_received(self)\nCalled when the other end of the low-level stream\n is half-closed.\n\n If this returns a false value (including None), the transport\n will close itself. If it returns a true value, closing the\n transport is up to the protocol.\n ";
  116427. static PyObject *__pyx_pw_6uvloop_4loop_11SSLProtocol_17eof_received(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  116428. PyObject *__pyx_r = 0;
  116429. __Pyx_RefNannyDeclarations
  116430. __Pyx_RefNannySetupContext("eof_received (wrapper)", 0);
  116431. __pyx_r = __pyx_pf_6uvloop_4loop_11SSLProtocol_16eof_received(((struct __pyx_obj_6uvloop_4loop_SSLProtocol *)__pyx_v_self));
  116432. /* function exit code */
  116433. __Pyx_RefNannyFinishContext();
  116434. return __pyx_r;
  116435. }
  116436. static PyObject *__pyx_pf_6uvloop_4loop_11SSLProtocol_16eof_received(struct __pyx_obj_6uvloop_4loop_SSLProtocol *__pyx_v_self) {
  116437. PyObject *__pyx_r = NULL;
  116438. __Pyx_RefNannyDeclarations
  116439. PyObject *__pyx_t_1 = NULL;
  116440. PyObject *__pyx_t_2 = NULL;
  116441. PyObject *__pyx_t_3 = NULL;
  116442. int __pyx_t_4;
  116443. int __pyx_t_5;
  116444. PyObject *__pyx_t_6 = NULL;
  116445. int __pyx_t_7;
  116446. char const *__pyx_t_8;
  116447. PyObject *__pyx_t_9 = NULL;
  116448. PyObject *__pyx_t_10 = NULL;
  116449. PyObject *__pyx_t_11 = NULL;
  116450. PyObject *__pyx_t_12 = NULL;
  116451. PyObject *__pyx_t_13 = NULL;
  116452. PyObject *__pyx_t_14 = NULL;
  116453. __Pyx_RefNannySetupContext("eof_received", 0);
  116454. /* "uvloop/sslproto.pyx":387
  116455. * transport is up to the protocol.
  116456. * """
  116457. * try: # <<<<<<<<<<<<<<
  116458. * if self._loop.get_debug():
  116459. * aio_logger.debug("%r received EOF", self)
  116460. */
  116461. /*try:*/ {
  116462. /* "uvloop/sslproto.pyx":388
  116463. * """
  116464. * try:
  116465. * if self._loop.get_debug(): # <<<<<<<<<<<<<<
  116466. * aio_logger.debug("%r received EOF", self)
  116467. *
  116468. */
  116469. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_loop, __pyx_n_s_get_debug); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 388, __pyx_L4_error)
  116470. __Pyx_GOTREF(__pyx_t_2);
  116471. __pyx_t_3 = NULL;
  116472. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
  116473. __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
  116474. if (likely(__pyx_t_3)) {
  116475. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  116476. __Pyx_INCREF(__pyx_t_3);
  116477. __Pyx_INCREF(function);
  116478. __Pyx_DECREF_SET(__pyx_t_2, function);
  116479. }
  116480. }
  116481. __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  116482. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  116483. if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 388, __pyx_L4_error)
  116484. __Pyx_GOTREF(__pyx_t_1);
  116485. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  116486. __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(22, 388, __pyx_L4_error)
  116487. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  116488. if (__pyx_t_4) {
  116489. /* "uvloop/sslproto.pyx":389
  116490. * try:
  116491. * if self._loop.get_debug():
  116492. * aio_logger.debug("%r received EOF", self) # <<<<<<<<<<<<<<
  116493. *
  116494. * if self._state == DO_HANDSHAKE:
  116495. */
  116496. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_6uvloop_4loop_aio_logger, __pyx_n_s_debug); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 389, __pyx_L4_error)
  116497. __Pyx_GOTREF(__pyx_t_2);
  116498. __pyx_t_3 = NULL;
  116499. __pyx_t_5 = 0;
  116500. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
  116501. __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
  116502. if (likely(__pyx_t_3)) {
  116503. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  116504. __Pyx_INCREF(__pyx_t_3);
  116505. __Pyx_INCREF(function);
  116506. __Pyx_DECREF_SET(__pyx_t_2, function);
  116507. __pyx_t_5 = 1;
  116508. }
  116509. }
  116510. #if CYTHON_FAST_PYCALL
  116511. if (PyFunction_Check(__pyx_t_2)) {
  116512. PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_kp_u_r_received_EOF, ((PyObject *)__pyx_v_self)};
  116513. __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 389, __pyx_L4_error)
  116514. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  116515. __Pyx_GOTREF(__pyx_t_1);
  116516. } else
  116517. #endif
  116518. #if CYTHON_FAST_PYCCALL
  116519. if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
  116520. PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_kp_u_r_received_EOF, ((PyObject *)__pyx_v_self)};
  116521. __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 389, __pyx_L4_error)
  116522. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  116523. __Pyx_GOTREF(__pyx_t_1);
  116524. } else
  116525. #endif
  116526. {
  116527. __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(22, 389, __pyx_L4_error)
  116528. __Pyx_GOTREF(__pyx_t_6);
  116529. if (__pyx_t_3) {
  116530. __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __pyx_t_3 = NULL;
  116531. }
  116532. __Pyx_INCREF(__pyx_kp_u_r_received_EOF);
  116533. __Pyx_GIVEREF(__pyx_kp_u_r_received_EOF);
  116534. PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_kp_u_r_received_EOF);
  116535. __Pyx_INCREF(((PyObject *)__pyx_v_self));
  116536. __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  116537. PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, ((PyObject *)__pyx_v_self));
  116538. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 389, __pyx_L4_error)
  116539. __Pyx_GOTREF(__pyx_t_1);
  116540. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  116541. }
  116542. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  116543. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  116544. /* "uvloop/sslproto.pyx":388
  116545. * """
  116546. * try:
  116547. * if self._loop.get_debug(): # <<<<<<<<<<<<<<
  116548. * aio_logger.debug("%r received EOF", self)
  116549. *
  116550. */
  116551. }
  116552. /* "uvloop/sslproto.pyx":391
  116553. * aio_logger.debug("%r received EOF", self)
  116554. *
  116555. * if self._state == DO_HANDSHAKE: # <<<<<<<<<<<<<<
  116556. * self._on_handshake_complete(ConnectionResetError)
  116557. *
  116558. */
  116559. switch (__pyx_v_self->_state) {
  116560. case __pyx_e_6uvloop_4loop_DO_HANDSHAKE:
  116561. /* "uvloop/sslproto.pyx":392
  116562. *
  116563. * if self._state == DO_HANDSHAKE:
  116564. * self._on_handshake_complete(ConnectionResetError) # <<<<<<<<<<<<<<
  116565. *
  116566. * elif self._state == WRAPPED:
  116567. */
  116568. __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ConnectionResetError); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 392, __pyx_L4_error)
  116569. __Pyx_GOTREF(__pyx_t_1);
  116570. __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_SSLProtocol *)__pyx_v_self->__pyx_vtab)->_on_handshake_complete(__pyx_v_self, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 392, __pyx_L4_error)
  116571. __Pyx_GOTREF(__pyx_t_2);
  116572. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  116573. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  116574. /* "uvloop/sslproto.pyx":391
  116575. * aio_logger.debug("%r received EOF", self)
  116576. *
  116577. * if self._state == DO_HANDSHAKE: # <<<<<<<<<<<<<<
  116578. * self._on_handshake_complete(ConnectionResetError)
  116579. *
  116580. */
  116581. break;
  116582. case __pyx_e_6uvloop_4loop_WRAPPED:
  116583. /* "uvloop/sslproto.pyx":395
  116584. *
  116585. * elif self._state == WRAPPED:
  116586. * self._set_state(FLUSHING) # <<<<<<<<<<<<<<
  116587. * self._do_write()
  116588. * self._set_state(SHUTDOWN)
  116589. */
  116590. __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_SSLProtocol *)__pyx_v_self->__pyx_vtab)->_set_state(__pyx_v_self, __pyx_e_6uvloop_4loop_FLUSHING); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 395, __pyx_L4_error)
  116591. __Pyx_GOTREF(__pyx_t_2);
  116592. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  116593. /* "uvloop/sslproto.pyx":396
  116594. * elif self._state == WRAPPED:
  116595. * self._set_state(FLUSHING)
  116596. * self._do_write() # <<<<<<<<<<<<<<
  116597. * self._set_state(SHUTDOWN)
  116598. * self._do_shutdown()
  116599. */
  116600. __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_SSLProtocol *)__pyx_v_self->__pyx_vtab)->_do_write(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 396, __pyx_L4_error)
  116601. __Pyx_GOTREF(__pyx_t_2);
  116602. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  116603. /* "uvloop/sslproto.pyx":397
  116604. * self._set_state(FLUSHING)
  116605. * self._do_write()
  116606. * self._set_state(SHUTDOWN) # <<<<<<<<<<<<<<
  116607. * self._do_shutdown()
  116608. *
  116609. */
  116610. __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_SSLProtocol *)__pyx_v_self->__pyx_vtab)->_set_state(__pyx_v_self, __pyx_e_6uvloop_4loop_SHUTDOWN); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 397, __pyx_L4_error)
  116611. __Pyx_GOTREF(__pyx_t_2);
  116612. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  116613. /* "uvloop/sslproto.pyx":398
  116614. * self._do_write()
  116615. * self._set_state(SHUTDOWN)
  116616. * self._do_shutdown() # <<<<<<<<<<<<<<
  116617. *
  116618. * elif self._state == FLUSHING:
  116619. */
  116620. __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_SSLProtocol *)__pyx_v_self->__pyx_vtab)->_do_shutdown(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 398, __pyx_L4_error)
  116621. __Pyx_GOTREF(__pyx_t_2);
  116622. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  116623. /* "uvloop/sslproto.pyx":394
  116624. * self._on_handshake_complete(ConnectionResetError)
  116625. *
  116626. * elif self._state == WRAPPED: # <<<<<<<<<<<<<<
  116627. * self._set_state(FLUSHING)
  116628. * self._do_write()
  116629. */
  116630. break;
  116631. case __pyx_e_6uvloop_4loop_FLUSHING:
  116632. /* "uvloop/sslproto.pyx":401
  116633. *
  116634. * elif self._state == FLUSHING:
  116635. * self._do_write() # <<<<<<<<<<<<<<
  116636. * self._set_state(SHUTDOWN)
  116637. * self._do_shutdown()
  116638. */
  116639. __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_SSLProtocol *)__pyx_v_self->__pyx_vtab)->_do_write(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 401, __pyx_L4_error)
  116640. __Pyx_GOTREF(__pyx_t_2);
  116641. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  116642. /* "uvloop/sslproto.pyx":402
  116643. * elif self._state == FLUSHING:
  116644. * self._do_write()
  116645. * self._set_state(SHUTDOWN) # <<<<<<<<<<<<<<
  116646. * self._do_shutdown()
  116647. *
  116648. */
  116649. __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_SSLProtocol *)__pyx_v_self->__pyx_vtab)->_set_state(__pyx_v_self, __pyx_e_6uvloop_4loop_SHUTDOWN); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 402, __pyx_L4_error)
  116650. __Pyx_GOTREF(__pyx_t_2);
  116651. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  116652. /* "uvloop/sslproto.pyx":403
  116653. * self._do_write()
  116654. * self._set_state(SHUTDOWN)
  116655. * self._do_shutdown() # <<<<<<<<<<<<<<
  116656. *
  116657. * elif self._state == SHUTDOWN:
  116658. */
  116659. __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_SSLProtocol *)__pyx_v_self->__pyx_vtab)->_do_shutdown(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 403, __pyx_L4_error)
  116660. __Pyx_GOTREF(__pyx_t_2);
  116661. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  116662. /* "uvloop/sslproto.pyx":400
  116663. * self._do_shutdown()
  116664. *
  116665. * elif self._state == FLUSHING: # <<<<<<<<<<<<<<
  116666. * self._do_write()
  116667. * self._set_state(SHUTDOWN)
  116668. */
  116669. break;
  116670. case __pyx_e_6uvloop_4loop_SHUTDOWN:
  116671. /* "uvloop/sslproto.pyx":406
  116672. *
  116673. * elif self._state == SHUTDOWN:
  116674. * self._do_shutdown() # <<<<<<<<<<<<<<
  116675. *
  116676. * finally:
  116677. */
  116678. __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_SSLProtocol *)__pyx_v_self->__pyx_vtab)->_do_shutdown(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 406, __pyx_L4_error)
  116679. __Pyx_GOTREF(__pyx_t_2);
  116680. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  116681. /* "uvloop/sslproto.pyx":405
  116682. * self._do_shutdown()
  116683. *
  116684. * elif self._state == SHUTDOWN: # <<<<<<<<<<<<<<
  116685. * self._do_shutdown()
  116686. *
  116687. */
  116688. break;
  116689. default: break;
  116690. }
  116691. }
  116692. /* "uvloop/sslproto.pyx":409
  116693. *
  116694. * finally:
  116695. * self._transport.close() # <<<<<<<<<<<<<<
  116696. *
  116697. * cdef _get_extra_info(self, name, default=None):
  116698. */
  116699. /*finally:*/ {
  116700. /*normal exit:*/{
  116701. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_transport, __pyx_n_s_close); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 409, __pyx_L1_error)
  116702. __Pyx_GOTREF(__pyx_t_1);
  116703. __pyx_t_6 = NULL;
  116704. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
  116705. __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
  116706. if (likely(__pyx_t_6)) {
  116707. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
  116708. __Pyx_INCREF(__pyx_t_6);
  116709. __Pyx_INCREF(function);
  116710. __Pyx_DECREF_SET(__pyx_t_1, function);
  116711. }
  116712. }
  116713. __pyx_t_2 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
  116714. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  116715. if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 409, __pyx_L1_error)
  116716. __Pyx_GOTREF(__pyx_t_2);
  116717. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  116718. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  116719. goto __pyx_L5;
  116720. }
  116721. __pyx_L4_error:;
  116722. /*exception exit:*/{
  116723. __Pyx_PyThreadState_declare
  116724. __Pyx_PyThreadState_assign
  116725. __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0;
  116726. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  116727. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  116728. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  116729. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  116730. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
  116731. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11) < 0)) __Pyx_ErrFetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
  116732. __Pyx_XGOTREF(__pyx_t_9);
  116733. __Pyx_XGOTREF(__pyx_t_10);
  116734. __Pyx_XGOTREF(__pyx_t_11);
  116735. __Pyx_XGOTREF(__pyx_t_12);
  116736. __Pyx_XGOTREF(__pyx_t_13);
  116737. __Pyx_XGOTREF(__pyx_t_14);
  116738. __pyx_t_5 = __pyx_lineno; __pyx_t_7 = __pyx_clineno; __pyx_t_8 = __pyx_filename;
  116739. {
  116740. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_transport, __pyx_n_s_close); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 409, __pyx_L8_error)
  116741. __Pyx_GOTREF(__pyx_t_1);
  116742. __pyx_t_6 = NULL;
  116743. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
  116744. __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
  116745. if (likely(__pyx_t_6)) {
  116746. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
  116747. __Pyx_INCREF(__pyx_t_6);
  116748. __Pyx_INCREF(function);
  116749. __Pyx_DECREF_SET(__pyx_t_1, function);
  116750. }
  116751. }
  116752. __pyx_t_2 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
  116753. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  116754. if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 409, __pyx_L8_error)
  116755. __Pyx_GOTREF(__pyx_t_2);
  116756. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  116757. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  116758. }
  116759. if (PY_MAJOR_VERSION >= 3) {
  116760. __Pyx_XGIVEREF(__pyx_t_12);
  116761. __Pyx_XGIVEREF(__pyx_t_13);
  116762. __Pyx_XGIVEREF(__pyx_t_14);
  116763. __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
  116764. }
  116765. __Pyx_XGIVEREF(__pyx_t_9);
  116766. __Pyx_XGIVEREF(__pyx_t_10);
  116767. __Pyx_XGIVEREF(__pyx_t_11);
  116768. __Pyx_ErrRestore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
  116769. __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0;
  116770. __pyx_lineno = __pyx_t_5; __pyx_clineno = __pyx_t_7; __pyx_filename = __pyx_t_8;
  116771. goto __pyx_L1_error;
  116772. __pyx_L8_error:;
  116773. if (PY_MAJOR_VERSION >= 3) {
  116774. __Pyx_XGIVEREF(__pyx_t_12);
  116775. __Pyx_XGIVEREF(__pyx_t_13);
  116776. __Pyx_XGIVEREF(__pyx_t_14);
  116777. __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
  116778. }
  116779. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  116780. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  116781. __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
  116782. __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0;
  116783. goto __pyx_L1_error;
  116784. }
  116785. __pyx_L5:;
  116786. }
  116787. /* "uvloop/sslproto.pyx":379
  116788. * self._do_shutdown()
  116789. *
  116790. * def eof_received(self): # <<<<<<<<<<<<<<
  116791. * """Called when the other end of the low-level stream
  116792. * is half-closed.
  116793. */
  116794. /* function exit code */
  116795. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  116796. goto __pyx_L0;
  116797. __pyx_L1_error:;
  116798. __Pyx_XDECREF(__pyx_t_1);
  116799. __Pyx_XDECREF(__pyx_t_2);
  116800. __Pyx_XDECREF(__pyx_t_3);
  116801. __Pyx_XDECREF(__pyx_t_6);
  116802. __Pyx_AddTraceback("uvloop.loop.SSLProtocol.eof_received", __pyx_clineno, __pyx_lineno, __pyx_filename);
  116803. __pyx_r = NULL;
  116804. __pyx_L0:;
  116805. __Pyx_XGIVEREF(__pyx_r);
  116806. __Pyx_RefNannyFinishContext();
  116807. return __pyx_r;
  116808. }
  116809. /* "uvloop/sslproto.pyx":411
  116810. * self._transport.close()
  116811. *
  116812. * cdef _get_extra_info(self, name, default=None): # <<<<<<<<<<<<<<
  116813. * if name in self._extra:
  116814. * return self._extra[name]
  116815. */
  116816. static PyObject *__pyx_f_6uvloop_4loop_11SSLProtocol__get_extra_info(struct __pyx_obj_6uvloop_4loop_SSLProtocol *__pyx_v_self, PyObject *__pyx_v_name, struct __pyx_opt_args_6uvloop_4loop_11SSLProtocol__get_extra_info *__pyx_optional_args) {
  116817. PyObject *__pyx_v_default = ((PyObject *)Py_None);
  116818. PyObject *__pyx_r = NULL;
  116819. __Pyx_RefNannyDeclarations
  116820. int __pyx_t_1;
  116821. int __pyx_t_2;
  116822. PyObject *__pyx_t_3 = NULL;
  116823. PyObject *__pyx_t_4 = NULL;
  116824. PyObject *__pyx_t_5 = NULL;
  116825. int __pyx_t_6;
  116826. PyObject *__pyx_t_7 = NULL;
  116827. __Pyx_RefNannySetupContext("_get_extra_info", 0);
  116828. if (__pyx_optional_args) {
  116829. if (__pyx_optional_args->__pyx_n > 0) {
  116830. __pyx_v_default = __pyx_optional_args->__pyx_default;
  116831. }
  116832. }
  116833. /* "uvloop/sslproto.pyx":412
  116834. *
  116835. * cdef _get_extra_info(self, name, default=None):
  116836. * if name in self._extra: # <<<<<<<<<<<<<<
  116837. * return self._extra[name]
  116838. * elif self._transport is not None:
  116839. */
  116840. __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_v_name, __pyx_v_self->_extra, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(22, 412, __pyx_L1_error)
  116841. __pyx_t_2 = (__pyx_t_1 != 0);
  116842. if (__pyx_t_2) {
  116843. /* "uvloop/sslproto.pyx":413
  116844. * cdef _get_extra_info(self, name, default=None):
  116845. * if name in self._extra:
  116846. * return self._extra[name] # <<<<<<<<<<<<<<
  116847. * elif self._transport is not None:
  116848. * return self._transport.get_extra_info(name, default)
  116849. */
  116850. __Pyx_XDECREF(__pyx_r);
  116851. __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_self->_extra, __pyx_v_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(22, 413, __pyx_L1_error)
  116852. __Pyx_GOTREF(__pyx_t_3);
  116853. __pyx_r = __pyx_t_3;
  116854. __pyx_t_3 = 0;
  116855. goto __pyx_L0;
  116856. /* "uvloop/sslproto.pyx":412
  116857. *
  116858. * cdef _get_extra_info(self, name, default=None):
  116859. * if name in self._extra: # <<<<<<<<<<<<<<
  116860. * return self._extra[name]
  116861. * elif self._transport is not None:
  116862. */
  116863. }
  116864. /* "uvloop/sslproto.pyx":414
  116865. * if name in self._extra:
  116866. * return self._extra[name]
  116867. * elif self._transport is not None: # <<<<<<<<<<<<<<
  116868. * return self._transport.get_extra_info(name, default)
  116869. * else:
  116870. */
  116871. __pyx_t_2 = (__pyx_v_self->_transport != Py_None);
  116872. __pyx_t_1 = (__pyx_t_2 != 0);
  116873. if (__pyx_t_1) {
  116874. /* "uvloop/sslproto.pyx":415
  116875. * return self._extra[name]
  116876. * elif self._transport is not None:
  116877. * return self._transport.get_extra_info(name, default) # <<<<<<<<<<<<<<
  116878. * else:
  116879. * return default
  116880. */
  116881. __Pyx_XDECREF(__pyx_r);
  116882. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_transport, __pyx_n_s_get_extra_info); if (unlikely(!__pyx_t_4)) __PYX_ERR(22, 415, __pyx_L1_error)
  116883. __Pyx_GOTREF(__pyx_t_4);
  116884. __pyx_t_5 = NULL;
  116885. __pyx_t_6 = 0;
  116886. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
  116887. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
  116888. if (likely(__pyx_t_5)) {
  116889. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  116890. __Pyx_INCREF(__pyx_t_5);
  116891. __Pyx_INCREF(function);
  116892. __Pyx_DECREF_SET(__pyx_t_4, function);
  116893. __pyx_t_6 = 1;
  116894. }
  116895. }
  116896. #if CYTHON_FAST_PYCALL
  116897. if (PyFunction_Check(__pyx_t_4)) {
  116898. PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_name, __pyx_v_default};
  116899. __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(22, 415, __pyx_L1_error)
  116900. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  116901. __Pyx_GOTREF(__pyx_t_3);
  116902. } else
  116903. #endif
  116904. #if CYTHON_FAST_PYCCALL
  116905. if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
  116906. PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_name, __pyx_v_default};
  116907. __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(22, 415, __pyx_L1_error)
  116908. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  116909. __Pyx_GOTREF(__pyx_t_3);
  116910. } else
  116911. #endif
  116912. {
  116913. __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(22, 415, __pyx_L1_error)
  116914. __Pyx_GOTREF(__pyx_t_7);
  116915. if (__pyx_t_5) {
  116916. __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
  116917. }
  116918. __Pyx_INCREF(__pyx_v_name);
  116919. __Pyx_GIVEREF(__pyx_v_name);
  116920. PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_name);
  116921. __Pyx_INCREF(__pyx_v_default);
  116922. __Pyx_GIVEREF(__pyx_v_default);
  116923. PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_v_default);
  116924. __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(22, 415, __pyx_L1_error)
  116925. __Pyx_GOTREF(__pyx_t_3);
  116926. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  116927. }
  116928. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  116929. __pyx_r = __pyx_t_3;
  116930. __pyx_t_3 = 0;
  116931. goto __pyx_L0;
  116932. /* "uvloop/sslproto.pyx":414
  116933. * if name in self._extra:
  116934. * return self._extra[name]
  116935. * elif self._transport is not None: # <<<<<<<<<<<<<<
  116936. * return self._transport.get_extra_info(name, default)
  116937. * else:
  116938. */
  116939. }
  116940. /* "uvloop/sslproto.pyx":417
  116941. * return self._transport.get_extra_info(name, default)
  116942. * else:
  116943. * return default # <<<<<<<<<<<<<<
  116944. *
  116945. * cdef _set_state(self, SSLProtocolState new_state):
  116946. */
  116947. /*else*/ {
  116948. __Pyx_XDECREF(__pyx_r);
  116949. __Pyx_INCREF(__pyx_v_default);
  116950. __pyx_r = __pyx_v_default;
  116951. goto __pyx_L0;
  116952. }
  116953. /* "uvloop/sslproto.pyx":411
  116954. * self._transport.close()
  116955. *
  116956. * cdef _get_extra_info(self, name, default=None): # <<<<<<<<<<<<<<
  116957. * if name in self._extra:
  116958. * return self._extra[name]
  116959. */
  116960. /* function exit code */
  116961. __pyx_L1_error:;
  116962. __Pyx_XDECREF(__pyx_t_3);
  116963. __Pyx_XDECREF(__pyx_t_4);
  116964. __Pyx_XDECREF(__pyx_t_5);
  116965. __Pyx_XDECREF(__pyx_t_7);
  116966. __Pyx_AddTraceback("uvloop.loop.SSLProtocol._get_extra_info", __pyx_clineno, __pyx_lineno, __pyx_filename);
  116967. __pyx_r = 0;
  116968. __pyx_L0:;
  116969. __Pyx_XGIVEREF(__pyx_r);
  116970. __Pyx_RefNannyFinishContext();
  116971. return __pyx_r;
  116972. }
  116973. /* "uvloop/sslproto.pyx":419
  116974. * return default
  116975. *
  116976. * cdef _set_state(self, SSLProtocolState new_state): # <<<<<<<<<<<<<<
  116977. * cdef bint allowed = False
  116978. *
  116979. */
  116980. static PyObject *__pyx_f_6uvloop_4loop_11SSLProtocol__set_state(struct __pyx_obj_6uvloop_4loop_SSLProtocol *__pyx_v_self, enum __pyx_t_6uvloop_4loop_SSLProtocolState __pyx_v_new_state) {
  116981. int __pyx_v_allowed;
  116982. PyObject *__pyx_r = NULL;
  116983. __Pyx_RefNannyDeclarations
  116984. int __pyx_t_1;
  116985. int __pyx_t_2;
  116986. PyObject *__pyx_t_3 = NULL;
  116987. PyObject *__pyx_t_4 = NULL;
  116988. PyObject *__pyx_t_5 = NULL;
  116989. PyObject *__pyx_t_6 = NULL;
  116990. PyObject *__pyx_t_7 = NULL;
  116991. int __pyx_t_8;
  116992. PyObject *__pyx_t_9 = NULL;
  116993. __Pyx_RefNannySetupContext("_set_state", 0);
  116994. /* "uvloop/sslproto.pyx":420
  116995. *
  116996. * cdef _set_state(self, SSLProtocolState new_state):
  116997. * cdef bint allowed = False # <<<<<<<<<<<<<<
  116998. *
  116999. * if new_state == UNWRAPPED:
  117000. */
  117001. __pyx_v_allowed = 0;
  117002. /* "uvloop/sslproto.pyx":422
  117003. * cdef bint allowed = False
  117004. *
  117005. * if new_state == UNWRAPPED: # <<<<<<<<<<<<<<
  117006. * allowed = True
  117007. *
  117008. */
  117009. __pyx_t_1 = ((__pyx_v_new_state == __pyx_e_6uvloop_4loop_UNWRAPPED) != 0);
  117010. if (__pyx_t_1) {
  117011. /* "uvloop/sslproto.pyx":423
  117012. *
  117013. * if new_state == UNWRAPPED:
  117014. * allowed = True # <<<<<<<<<<<<<<
  117015. *
  117016. * elif self._state == UNWRAPPED and new_state == DO_HANDSHAKE:
  117017. */
  117018. __pyx_v_allowed = 1;
  117019. /* "uvloop/sslproto.pyx":422
  117020. * cdef bint allowed = False
  117021. *
  117022. * if new_state == UNWRAPPED: # <<<<<<<<<<<<<<
  117023. * allowed = True
  117024. *
  117025. */
  117026. goto __pyx_L3;
  117027. }
  117028. /* "uvloop/sslproto.pyx":425
  117029. * allowed = True
  117030. *
  117031. * elif self._state == UNWRAPPED and new_state == DO_HANDSHAKE: # <<<<<<<<<<<<<<
  117032. * allowed = True
  117033. *
  117034. */
  117035. __pyx_t_2 = ((__pyx_v_self->_state == __pyx_e_6uvloop_4loop_UNWRAPPED) != 0);
  117036. if (__pyx_t_2) {
  117037. } else {
  117038. __pyx_t_1 = __pyx_t_2;
  117039. goto __pyx_L4_bool_binop_done;
  117040. }
  117041. __pyx_t_2 = ((__pyx_v_new_state == __pyx_e_6uvloop_4loop_DO_HANDSHAKE) != 0);
  117042. __pyx_t_1 = __pyx_t_2;
  117043. __pyx_L4_bool_binop_done:;
  117044. if (__pyx_t_1) {
  117045. /* "uvloop/sslproto.pyx":426
  117046. *
  117047. * elif self._state == UNWRAPPED and new_state == DO_HANDSHAKE:
  117048. * allowed = True # <<<<<<<<<<<<<<
  117049. *
  117050. * elif self._state == DO_HANDSHAKE and new_state == WRAPPED:
  117051. */
  117052. __pyx_v_allowed = 1;
  117053. /* "uvloop/sslproto.pyx":425
  117054. * allowed = True
  117055. *
  117056. * elif self._state == UNWRAPPED and new_state == DO_HANDSHAKE: # <<<<<<<<<<<<<<
  117057. * allowed = True
  117058. *
  117059. */
  117060. goto __pyx_L3;
  117061. }
  117062. /* "uvloop/sslproto.pyx":428
  117063. * allowed = True
  117064. *
  117065. * elif self._state == DO_HANDSHAKE and new_state == WRAPPED: # <<<<<<<<<<<<<<
  117066. * allowed = True
  117067. *
  117068. */
  117069. __pyx_t_2 = ((__pyx_v_self->_state == __pyx_e_6uvloop_4loop_DO_HANDSHAKE) != 0);
  117070. if (__pyx_t_2) {
  117071. } else {
  117072. __pyx_t_1 = __pyx_t_2;
  117073. goto __pyx_L6_bool_binop_done;
  117074. }
  117075. __pyx_t_2 = ((__pyx_v_new_state == __pyx_e_6uvloop_4loop_WRAPPED) != 0);
  117076. __pyx_t_1 = __pyx_t_2;
  117077. __pyx_L6_bool_binop_done:;
  117078. if (__pyx_t_1) {
  117079. /* "uvloop/sslproto.pyx":429
  117080. *
  117081. * elif self._state == DO_HANDSHAKE and new_state == WRAPPED:
  117082. * allowed = True # <<<<<<<<<<<<<<
  117083. *
  117084. * elif self._state == WRAPPED and new_state == FLUSHING:
  117085. */
  117086. __pyx_v_allowed = 1;
  117087. /* "uvloop/sslproto.pyx":428
  117088. * allowed = True
  117089. *
  117090. * elif self._state == DO_HANDSHAKE and new_state == WRAPPED: # <<<<<<<<<<<<<<
  117091. * allowed = True
  117092. *
  117093. */
  117094. goto __pyx_L3;
  117095. }
  117096. /* "uvloop/sslproto.pyx":431
  117097. * allowed = True
  117098. *
  117099. * elif self._state == WRAPPED and new_state == FLUSHING: # <<<<<<<<<<<<<<
  117100. * allowed = True
  117101. *
  117102. */
  117103. __pyx_t_2 = ((__pyx_v_self->_state == __pyx_e_6uvloop_4loop_WRAPPED) != 0);
  117104. if (__pyx_t_2) {
  117105. } else {
  117106. __pyx_t_1 = __pyx_t_2;
  117107. goto __pyx_L8_bool_binop_done;
  117108. }
  117109. __pyx_t_2 = ((__pyx_v_new_state == __pyx_e_6uvloop_4loop_FLUSHING) != 0);
  117110. __pyx_t_1 = __pyx_t_2;
  117111. __pyx_L8_bool_binop_done:;
  117112. if (__pyx_t_1) {
  117113. /* "uvloop/sslproto.pyx":432
  117114. *
  117115. * elif self._state == WRAPPED and new_state == FLUSHING:
  117116. * allowed = True # <<<<<<<<<<<<<<
  117117. *
  117118. * elif self._state == FLUSHING and new_state == SHUTDOWN:
  117119. */
  117120. __pyx_v_allowed = 1;
  117121. /* "uvloop/sslproto.pyx":431
  117122. * allowed = True
  117123. *
  117124. * elif self._state == WRAPPED and new_state == FLUSHING: # <<<<<<<<<<<<<<
  117125. * allowed = True
  117126. *
  117127. */
  117128. goto __pyx_L3;
  117129. }
  117130. /* "uvloop/sslproto.pyx":434
  117131. * allowed = True
  117132. *
  117133. * elif self._state == FLUSHING and new_state == SHUTDOWN: # <<<<<<<<<<<<<<
  117134. * allowed = True
  117135. *
  117136. */
  117137. __pyx_t_2 = ((__pyx_v_self->_state == __pyx_e_6uvloop_4loop_FLUSHING) != 0);
  117138. if (__pyx_t_2) {
  117139. } else {
  117140. __pyx_t_1 = __pyx_t_2;
  117141. goto __pyx_L10_bool_binop_done;
  117142. }
  117143. __pyx_t_2 = ((__pyx_v_new_state == __pyx_e_6uvloop_4loop_SHUTDOWN) != 0);
  117144. __pyx_t_1 = __pyx_t_2;
  117145. __pyx_L10_bool_binop_done:;
  117146. if (__pyx_t_1) {
  117147. /* "uvloop/sslproto.pyx":435
  117148. *
  117149. * elif self._state == FLUSHING and new_state == SHUTDOWN:
  117150. * allowed = True # <<<<<<<<<<<<<<
  117151. *
  117152. * if allowed:
  117153. */
  117154. __pyx_v_allowed = 1;
  117155. /* "uvloop/sslproto.pyx":434
  117156. * allowed = True
  117157. *
  117158. * elif self._state == FLUSHING and new_state == SHUTDOWN: # <<<<<<<<<<<<<<
  117159. * allowed = True
  117160. *
  117161. */
  117162. }
  117163. __pyx_L3:;
  117164. /* "uvloop/sslproto.pyx":437
  117165. * allowed = True
  117166. *
  117167. * if allowed: # <<<<<<<<<<<<<<
  117168. * self._state = new_state
  117169. *
  117170. */
  117171. __pyx_t_1 = (__pyx_v_allowed != 0);
  117172. if (likely(__pyx_t_1)) {
  117173. /* "uvloop/sslproto.pyx":438
  117174. *
  117175. * if allowed:
  117176. * self._state = new_state # <<<<<<<<<<<<<<
  117177. *
  117178. * else:
  117179. */
  117180. __pyx_v_self->_state = __pyx_v_new_state;
  117181. /* "uvloop/sslproto.pyx":437
  117182. * allowed = True
  117183. *
  117184. * if allowed: # <<<<<<<<<<<<<<
  117185. * self._state = new_state
  117186. *
  117187. */
  117188. goto __pyx_L12;
  117189. }
  117190. /* "uvloop/sslproto.pyx":441
  117191. *
  117192. * else:
  117193. * raise RuntimeError( # <<<<<<<<<<<<<<
  117194. * 'cannot switch state from {} to {}'.format(
  117195. * self._state, new_state))
  117196. */
  117197. /*else*/ {
  117198. /* "uvloop/sslproto.pyx":442
  117199. * else:
  117200. * raise RuntimeError(
  117201. * 'cannot switch state from {} to {}'.format( # <<<<<<<<<<<<<<
  117202. * self._state, new_state))
  117203. *
  117204. */
  117205. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_cannot_switch_state_from_to, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(22, 442, __pyx_L1_error)
  117206. __Pyx_GOTREF(__pyx_t_4);
  117207. /* "uvloop/sslproto.pyx":443
  117208. * raise RuntimeError(
  117209. * 'cannot switch state from {} to {}'.format(
  117210. * self._state, new_state)) # <<<<<<<<<<<<<<
  117211. *
  117212. * # Handshake flow
  117213. */
  117214. __pyx_t_5 = __Pyx_PyInt_From_enum____pyx_t_6uvloop_4loop_SSLProtocolState(__pyx_v_self->_state); if (unlikely(!__pyx_t_5)) __PYX_ERR(22, 443, __pyx_L1_error)
  117215. __Pyx_GOTREF(__pyx_t_5);
  117216. __pyx_t_6 = __Pyx_PyInt_From_enum____pyx_t_6uvloop_4loop_SSLProtocolState(__pyx_v_new_state); if (unlikely(!__pyx_t_6)) __PYX_ERR(22, 443, __pyx_L1_error)
  117217. __Pyx_GOTREF(__pyx_t_6);
  117218. __pyx_t_7 = NULL;
  117219. __pyx_t_8 = 0;
  117220. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
  117221. __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
  117222. if (likely(__pyx_t_7)) {
  117223. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  117224. __Pyx_INCREF(__pyx_t_7);
  117225. __Pyx_INCREF(function);
  117226. __Pyx_DECREF_SET(__pyx_t_4, function);
  117227. __pyx_t_8 = 1;
  117228. }
  117229. }
  117230. #if CYTHON_FAST_PYCALL
  117231. if (PyFunction_Check(__pyx_t_4)) {
  117232. PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_5, __pyx_t_6};
  117233. __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(22, 442, __pyx_L1_error)
  117234. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  117235. __Pyx_GOTREF(__pyx_t_3);
  117236. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  117237. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  117238. } else
  117239. #endif
  117240. #if CYTHON_FAST_PYCCALL
  117241. if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
  117242. PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_5, __pyx_t_6};
  117243. __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(22, 442, __pyx_L1_error)
  117244. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  117245. __Pyx_GOTREF(__pyx_t_3);
  117246. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  117247. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  117248. } else
  117249. #endif
  117250. {
  117251. __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(22, 442, __pyx_L1_error)
  117252. __Pyx_GOTREF(__pyx_t_9);
  117253. if (__pyx_t_7) {
  117254. __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
  117255. }
  117256. __Pyx_GIVEREF(__pyx_t_5);
  117257. PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_5);
  117258. __Pyx_GIVEREF(__pyx_t_6);
  117259. PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_6);
  117260. __pyx_t_5 = 0;
  117261. __pyx_t_6 = 0;
  117262. __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_9, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(22, 442, __pyx_L1_error)
  117263. __Pyx_GOTREF(__pyx_t_3);
  117264. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  117265. }
  117266. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  117267. /* "uvloop/sslproto.pyx":441
  117268. *
  117269. * else:
  117270. * raise RuntimeError( # <<<<<<<<<<<<<<
  117271. * 'cannot switch state from {} to {}'.format(
  117272. * self._state, new_state))
  117273. */
  117274. __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(22, 441, __pyx_L1_error)
  117275. __Pyx_GOTREF(__pyx_t_4);
  117276. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  117277. __Pyx_Raise(__pyx_t_4, 0, 0, 0);
  117278. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  117279. __PYX_ERR(22, 441, __pyx_L1_error)
  117280. }
  117281. __pyx_L12:;
  117282. /* "uvloop/sslproto.pyx":419
  117283. * return default
  117284. *
  117285. * cdef _set_state(self, SSLProtocolState new_state): # <<<<<<<<<<<<<<
  117286. * cdef bint allowed = False
  117287. *
  117288. */
  117289. /* function exit code */
  117290. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  117291. goto __pyx_L0;
  117292. __pyx_L1_error:;
  117293. __Pyx_XDECREF(__pyx_t_3);
  117294. __Pyx_XDECREF(__pyx_t_4);
  117295. __Pyx_XDECREF(__pyx_t_5);
  117296. __Pyx_XDECREF(__pyx_t_6);
  117297. __Pyx_XDECREF(__pyx_t_7);
  117298. __Pyx_XDECREF(__pyx_t_9);
  117299. __Pyx_AddTraceback("uvloop.loop.SSLProtocol._set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  117300. __pyx_r = 0;
  117301. __pyx_L0:;
  117302. __Pyx_XGIVEREF(__pyx_r);
  117303. __Pyx_RefNannyFinishContext();
  117304. return __pyx_r;
  117305. }
  117306. /* "uvloop/sslproto.pyx":459
  117307. * self._handshake_timeout_handle = \
  117308. * self._loop.call_later(self._ssl_handshake_timeout,
  117309. * lambda: self._check_handshake_timeout()) # <<<<<<<<<<<<<<
  117310. *
  117311. * try:
  117312. */
  117313. /* Python wrapper */
  117314. static PyObject *__pyx_pw_6uvloop_4loop_11SSLProtocol_16_start_handshake_lambda6(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  117315. static PyMethodDef __pyx_mdef_6uvloop_4loop_11SSLProtocol_16_start_handshake_lambda6 = {"lambda6", (PyCFunction)__pyx_pw_6uvloop_4loop_11SSLProtocol_16_start_handshake_lambda6, METH_NOARGS, 0};
  117316. static PyObject *__pyx_pw_6uvloop_4loop_11SSLProtocol_16_start_handshake_lambda6(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  117317. PyObject *__pyx_r = 0;
  117318. __Pyx_RefNannyDeclarations
  117319. __Pyx_RefNannySetupContext("lambda6 (wrapper)", 0);
  117320. __pyx_r = __pyx_lambda_funcdef_lambda6(__pyx_self);
  117321. /* function exit code */
  117322. __Pyx_RefNannyFinishContext();
  117323. return __pyx_r;
  117324. }
  117325. static PyObject *__pyx_lambda_funcdef_lambda6(PyObject *__pyx_self) {
  117326. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_28__start_handshake *__pyx_cur_scope;
  117327. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_28__start_handshake *__pyx_outer_scope;
  117328. PyObject *__pyx_r = NULL;
  117329. __Pyx_RefNannyDeclarations
  117330. PyObject *__pyx_t_1 = NULL;
  117331. __Pyx_RefNannySetupContext("lambda6", 0);
  117332. __pyx_outer_scope = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_28__start_handshake *) __Pyx_CyFunction_GetClosure(__pyx_self);
  117333. __pyx_cur_scope = __pyx_outer_scope;
  117334. __Pyx_XDECREF(__pyx_r);
  117335. if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(22, 459, __pyx_L1_error) }
  117336. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_SSLProtocol *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->_check_handshake_timeout(__pyx_cur_scope->__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 459, __pyx_L1_error)
  117337. __Pyx_GOTREF(__pyx_t_1);
  117338. __pyx_r = __pyx_t_1;
  117339. __pyx_t_1 = 0;
  117340. goto __pyx_L0;
  117341. /* function exit code */
  117342. __pyx_L1_error:;
  117343. __Pyx_XDECREF(__pyx_t_1);
  117344. __Pyx_AddTraceback("uvloop.loop.SSLProtocol._start_handshake.lambda6", __pyx_clineno, __pyx_lineno, __pyx_filename);
  117345. __pyx_r = NULL;
  117346. __pyx_L0:;
  117347. __Pyx_XGIVEREF(__pyx_r);
  117348. __Pyx_RefNannyFinishContext();
  117349. return __pyx_r;
  117350. }
  117351. /* "uvloop/sslproto.pyx":447
  117352. * # Handshake flow
  117353. *
  117354. * cdef _start_handshake(self): # <<<<<<<<<<<<<<
  117355. * if self._loop.get_debug():
  117356. * aio_logger.debug("%r starts SSL handshake", self)
  117357. */
  117358. static PyObject *__pyx_f_6uvloop_4loop_11SSLProtocol__start_handshake(struct __pyx_obj_6uvloop_4loop_SSLProtocol *__pyx_v_self) {
  117359. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_28__start_handshake *__pyx_cur_scope;
  117360. PyObject *__pyx_v_ex = NULL;
  117361. PyObject *__pyx_r = NULL;
  117362. __Pyx_RefNannyDeclarations
  117363. PyObject *__pyx_t_1 = NULL;
  117364. PyObject *__pyx_t_2 = NULL;
  117365. PyObject *__pyx_t_3 = NULL;
  117366. int __pyx_t_4;
  117367. int __pyx_t_5;
  117368. PyObject *__pyx_t_6 = NULL;
  117369. PyObject *__pyx_t_7 = NULL;
  117370. PyObject *__pyx_t_8 = NULL;
  117371. PyObject *__pyx_t_9 = NULL;
  117372. PyObject *__pyx_t_10 = NULL;
  117373. int __pyx_t_11;
  117374. char const *__pyx_t_12;
  117375. PyObject *__pyx_t_13 = NULL;
  117376. PyObject *__pyx_t_14 = NULL;
  117377. PyObject *__pyx_t_15 = NULL;
  117378. PyObject *__pyx_t_16 = NULL;
  117379. PyObject *__pyx_t_17 = NULL;
  117380. PyObject *__pyx_t_18 = NULL;
  117381. __Pyx_RefNannySetupContext("_start_handshake", 0);
  117382. __pyx_cur_scope = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_28__start_handshake *)__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_28__start_handshake(__pyx_ptype_6uvloop_4loop___pyx_scope_struct_28__start_handshake, __pyx_empty_tuple, NULL);
  117383. if (unlikely(!__pyx_cur_scope)) {
  117384. __pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_28__start_handshake *)Py_None);
  117385. __Pyx_INCREF(Py_None);
  117386. __PYX_ERR(22, 447, __pyx_L1_error)
  117387. } else {
  117388. __Pyx_GOTREF(__pyx_cur_scope);
  117389. }
  117390. __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  117391. __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  117392. __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  117393. /* "uvloop/sslproto.pyx":448
  117394. *
  117395. * cdef _start_handshake(self):
  117396. * if self._loop.get_debug(): # <<<<<<<<<<<<<<
  117397. * aio_logger.debug("%r starts SSL handshake", self)
  117398. * self._handshake_start_time = self._loop.time()
  117399. */
  117400. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self->_loop, __pyx_n_s_get_debug); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 448, __pyx_L1_error)
  117401. __Pyx_GOTREF(__pyx_t_2);
  117402. __pyx_t_3 = NULL;
  117403. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
  117404. __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
  117405. if (likely(__pyx_t_3)) {
  117406. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  117407. __Pyx_INCREF(__pyx_t_3);
  117408. __Pyx_INCREF(function);
  117409. __Pyx_DECREF_SET(__pyx_t_2, function);
  117410. }
  117411. }
  117412. __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  117413. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  117414. if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 448, __pyx_L1_error)
  117415. __Pyx_GOTREF(__pyx_t_1);
  117416. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  117417. __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(22, 448, __pyx_L1_error)
  117418. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  117419. if (__pyx_t_4) {
  117420. /* "uvloop/sslproto.pyx":449
  117421. * cdef _start_handshake(self):
  117422. * if self._loop.get_debug():
  117423. * aio_logger.debug("%r starts SSL handshake", self) # <<<<<<<<<<<<<<
  117424. * self._handshake_start_time = self._loop.time()
  117425. * else:
  117426. */
  117427. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_6uvloop_4loop_aio_logger, __pyx_n_s_debug); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 449, __pyx_L1_error)
  117428. __Pyx_GOTREF(__pyx_t_2);
  117429. __pyx_t_3 = NULL;
  117430. __pyx_t_5 = 0;
  117431. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
  117432. __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
  117433. if (likely(__pyx_t_3)) {
  117434. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  117435. __Pyx_INCREF(__pyx_t_3);
  117436. __Pyx_INCREF(function);
  117437. __Pyx_DECREF_SET(__pyx_t_2, function);
  117438. __pyx_t_5 = 1;
  117439. }
  117440. }
  117441. #if CYTHON_FAST_PYCALL
  117442. if (PyFunction_Check(__pyx_t_2)) {
  117443. PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_kp_u_r_starts_SSL_handshake, ((PyObject *)__pyx_cur_scope->__pyx_v_self)};
  117444. __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 449, __pyx_L1_error)
  117445. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  117446. __Pyx_GOTREF(__pyx_t_1);
  117447. } else
  117448. #endif
  117449. #if CYTHON_FAST_PYCCALL
  117450. if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
  117451. PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_kp_u_r_starts_SSL_handshake, ((PyObject *)__pyx_cur_scope->__pyx_v_self)};
  117452. __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 449, __pyx_L1_error)
  117453. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  117454. __Pyx_GOTREF(__pyx_t_1);
  117455. } else
  117456. #endif
  117457. {
  117458. __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(22, 449, __pyx_L1_error)
  117459. __Pyx_GOTREF(__pyx_t_6);
  117460. if (__pyx_t_3) {
  117461. __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __pyx_t_3 = NULL;
  117462. }
  117463. __Pyx_INCREF(__pyx_kp_u_r_starts_SSL_handshake);
  117464. __Pyx_GIVEREF(__pyx_kp_u_r_starts_SSL_handshake);
  117465. PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_kp_u_r_starts_SSL_handshake);
  117466. __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_self));
  117467. __Pyx_GIVEREF(((PyObject *)__pyx_cur_scope->__pyx_v_self));
  117468. PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, ((PyObject *)__pyx_cur_scope->__pyx_v_self));
  117469. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 449, __pyx_L1_error)
  117470. __Pyx_GOTREF(__pyx_t_1);
  117471. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  117472. }
  117473. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  117474. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  117475. /* "uvloop/sslproto.pyx":450
  117476. * if self._loop.get_debug():
  117477. * aio_logger.debug("%r starts SSL handshake", self)
  117478. * self._handshake_start_time = self._loop.time() # <<<<<<<<<<<<<<
  117479. * else:
  117480. * self._handshake_start_time = None
  117481. */
  117482. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self->_loop, __pyx_n_s_time); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 450, __pyx_L1_error)
  117483. __Pyx_GOTREF(__pyx_t_2);
  117484. __pyx_t_6 = NULL;
  117485. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
  117486. __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
  117487. if (likely(__pyx_t_6)) {
  117488. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  117489. __Pyx_INCREF(__pyx_t_6);
  117490. __Pyx_INCREF(function);
  117491. __Pyx_DECREF_SET(__pyx_t_2, function);
  117492. }
  117493. }
  117494. __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  117495. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  117496. if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 450, __pyx_L1_error)
  117497. __Pyx_GOTREF(__pyx_t_1);
  117498. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  117499. __Pyx_GIVEREF(__pyx_t_1);
  117500. __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_self->_handshake_start_time);
  117501. __Pyx_DECREF(__pyx_cur_scope->__pyx_v_self->_handshake_start_time);
  117502. __pyx_cur_scope->__pyx_v_self->_handshake_start_time = __pyx_t_1;
  117503. __pyx_t_1 = 0;
  117504. /* "uvloop/sslproto.pyx":448
  117505. *
  117506. * cdef _start_handshake(self):
  117507. * if self._loop.get_debug(): # <<<<<<<<<<<<<<
  117508. * aio_logger.debug("%r starts SSL handshake", self)
  117509. * self._handshake_start_time = self._loop.time()
  117510. */
  117511. goto __pyx_L3;
  117512. }
  117513. /* "uvloop/sslproto.pyx":452
  117514. * self._handshake_start_time = self._loop.time()
  117515. * else:
  117516. * self._handshake_start_time = None # <<<<<<<<<<<<<<
  117517. *
  117518. * self._set_state(DO_HANDSHAKE)
  117519. */
  117520. /*else*/ {
  117521. __Pyx_INCREF(Py_None);
  117522. __Pyx_GIVEREF(Py_None);
  117523. __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_self->_handshake_start_time);
  117524. __Pyx_DECREF(__pyx_cur_scope->__pyx_v_self->_handshake_start_time);
  117525. __pyx_cur_scope->__pyx_v_self->_handshake_start_time = Py_None;
  117526. }
  117527. __pyx_L3:;
  117528. /* "uvloop/sslproto.pyx":454
  117529. * self._handshake_start_time = None
  117530. *
  117531. * self._set_state(DO_HANDSHAKE) # <<<<<<<<<<<<<<
  117532. *
  117533. * # start handshake timeout count down
  117534. */
  117535. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_SSLProtocol *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->_set_state(__pyx_cur_scope->__pyx_v_self, __pyx_e_6uvloop_4loop_DO_HANDSHAKE); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 454, __pyx_L1_error)
  117536. __Pyx_GOTREF(__pyx_t_1);
  117537. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  117538. /* "uvloop/sslproto.pyx":458
  117539. * # start handshake timeout count down
  117540. * self._handshake_timeout_handle = \
  117541. * self._loop.call_later(self._ssl_handshake_timeout, # <<<<<<<<<<<<<<
  117542. * lambda: self._check_handshake_timeout())
  117543. *
  117544. */
  117545. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self->_loop, __pyx_n_s_call_later); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 458, __pyx_L1_error)
  117546. __Pyx_GOTREF(__pyx_t_2);
  117547. /* "uvloop/sslproto.pyx":459
  117548. * self._handshake_timeout_handle = \
  117549. * self._loop.call_later(self._ssl_handshake_timeout,
  117550. * lambda: self._check_handshake_timeout()) # <<<<<<<<<<<<<<
  117551. *
  117552. * try:
  117553. */
  117554. __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6uvloop_4loop_11SSLProtocol_16_start_handshake_lambda6, 0, __pyx_n_s_SSLProtocol__start_handshake_loc, ((PyObject*)__pyx_cur_scope), __pyx_n_s_uvloop_loop, __pyx_d, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(22, 459, __pyx_L1_error)
  117555. __Pyx_GOTREF(__pyx_t_6);
  117556. __pyx_t_3 = NULL;
  117557. __pyx_t_5 = 0;
  117558. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
  117559. __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
  117560. if (likely(__pyx_t_3)) {
  117561. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  117562. __Pyx_INCREF(__pyx_t_3);
  117563. __Pyx_INCREF(function);
  117564. __Pyx_DECREF_SET(__pyx_t_2, function);
  117565. __pyx_t_5 = 1;
  117566. }
  117567. }
  117568. #if CYTHON_FAST_PYCALL
  117569. if (PyFunction_Check(__pyx_t_2)) {
  117570. PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_cur_scope->__pyx_v_self->_ssl_handshake_timeout, __pyx_t_6};
  117571. __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 458, __pyx_L1_error)
  117572. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  117573. __Pyx_GOTREF(__pyx_t_1);
  117574. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  117575. } else
  117576. #endif
  117577. #if CYTHON_FAST_PYCCALL
  117578. if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
  117579. PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_cur_scope->__pyx_v_self->_ssl_handshake_timeout, __pyx_t_6};
  117580. __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 458, __pyx_L1_error)
  117581. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  117582. __Pyx_GOTREF(__pyx_t_1);
  117583. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  117584. } else
  117585. #endif
  117586. {
  117587. __pyx_t_7 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(22, 458, __pyx_L1_error)
  117588. __Pyx_GOTREF(__pyx_t_7);
  117589. if (__pyx_t_3) {
  117590. __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3); __pyx_t_3 = NULL;
  117591. }
  117592. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_self->_ssl_handshake_timeout);
  117593. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_self->_ssl_handshake_timeout);
  117594. PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_5, __pyx_cur_scope->__pyx_v_self->_ssl_handshake_timeout);
  117595. __Pyx_GIVEREF(__pyx_t_6);
  117596. PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_5, __pyx_t_6);
  117597. __pyx_t_6 = 0;
  117598. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 458, __pyx_L1_error)
  117599. __Pyx_GOTREF(__pyx_t_1);
  117600. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  117601. }
  117602. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  117603. /* "uvloop/sslproto.pyx":457
  117604. *
  117605. * # start handshake timeout count down
  117606. * self._handshake_timeout_handle = \ # <<<<<<<<<<<<<<
  117607. * self._loop.call_later(self._ssl_handshake_timeout,
  117608. * lambda: self._check_handshake_timeout())
  117609. */
  117610. __Pyx_GIVEREF(__pyx_t_1);
  117611. __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_self->_handshake_timeout_handle);
  117612. __Pyx_DECREF(__pyx_cur_scope->__pyx_v_self->_handshake_timeout_handle);
  117613. __pyx_cur_scope->__pyx_v_self->_handshake_timeout_handle = __pyx_t_1;
  117614. __pyx_t_1 = 0;
  117615. /* "uvloop/sslproto.pyx":461
  117616. * lambda: self._check_handshake_timeout())
  117617. *
  117618. * try: # <<<<<<<<<<<<<<
  117619. * self._sslobj = self._sslcontext.wrap_bio(
  117620. * self._incoming, self._outgoing,
  117621. */
  117622. {
  117623. __Pyx_PyThreadState_declare
  117624. __Pyx_PyThreadState_assign
  117625. __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
  117626. __Pyx_XGOTREF(__pyx_t_8);
  117627. __Pyx_XGOTREF(__pyx_t_9);
  117628. __Pyx_XGOTREF(__pyx_t_10);
  117629. /*try:*/ {
  117630. /* "uvloop/sslproto.pyx":462
  117631. *
  117632. * try:
  117633. * self._sslobj = self._sslcontext.wrap_bio( # <<<<<<<<<<<<<<
  117634. * self._incoming, self._outgoing,
  117635. * server_side=self._server_side,
  117636. */
  117637. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self->_sslcontext, __pyx_n_s_wrap_bio); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 462, __pyx_L4_error)
  117638. __Pyx_GOTREF(__pyx_t_1);
  117639. /* "uvloop/sslproto.pyx":463
  117640. * try:
  117641. * self._sslobj = self._sslcontext.wrap_bio(
  117642. * self._incoming, self._outgoing, # <<<<<<<<<<<<<<
  117643. * server_side=self._server_side,
  117644. * server_hostname=self._server_hostname)
  117645. */
  117646. __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 462, __pyx_L4_error)
  117647. __Pyx_GOTREF(__pyx_t_2);
  117648. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_self->_incoming);
  117649. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_self->_incoming);
  117650. PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_cur_scope->__pyx_v_self->_incoming);
  117651. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_self->_outgoing);
  117652. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_self->_outgoing);
  117653. PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_cur_scope->__pyx_v_self->_outgoing);
  117654. /* "uvloop/sslproto.pyx":464
  117655. * self._sslobj = self._sslcontext.wrap_bio(
  117656. * self._incoming, self._outgoing,
  117657. * server_side=self._server_side, # <<<<<<<<<<<<<<
  117658. * server_hostname=self._server_hostname)
  117659. * self._sslobj_read = self._sslobj.read
  117660. */
  117661. __pyx_t_7 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(22, 464, __pyx_L4_error)
  117662. __Pyx_GOTREF(__pyx_t_7);
  117663. __pyx_t_6 = __Pyx_PyBool_FromLong(__pyx_cur_scope->__pyx_v_self->_server_side); if (unlikely(!__pyx_t_6)) __PYX_ERR(22, 464, __pyx_L4_error)
  117664. __Pyx_GOTREF(__pyx_t_6);
  117665. if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_server_side, __pyx_t_6) < 0) __PYX_ERR(22, 464, __pyx_L4_error)
  117666. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  117667. /* "uvloop/sslproto.pyx":465
  117668. * self._incoming, self._outgoing,
  117669. * server_side=self._server_side,
  117670. * server_hostname=self._server_hostname) # <<<<<<<<<<<<<<
  117671. * self._sslobj_read = self._sslobj.read
  117672. * self._sslobj_write = self._sslobj.write
  117673. */
  117674. if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_server_hostname, __pyx_cur_scope->__pyx_v_self->_server_hostname) < 0) __PYX_ERR(22, 464, __pyx_L4_error)
  117675. /* "uvloop/sslproto.pyx":462
  117676. *
  117677. * try:
  117678. * self._sslobj = self._sslcontext.wrap_bio( # <<<<<<<<<<<<<<
  117679. * self._incoming, self._outgoing,
  117680. * server_side=self._server_side,
  117681. */
  117682. __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(22, 462, __pyx_L4_error)
  117683. __Pyx_GOTREF(__pyx_t_6);
  117684. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  117685. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  117686. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  117687. __Pyx_GIVEREF(__pyx_t_6);
  117688. __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_self->_sslobj);
  117689. __Pyx_DECREF(__pyx_cur_scope->__pyx_v_self->_sslobj);
  117690. __pyx_cur_scope->__pyx_v_self->_sslobj = __pyx_t_6;
  117691. __pyx_t_6 = 0;
  117692. /* "uvloop/sslproto.pyx":466
  117693. * server_side=self._server_side,
  117694. * server_hostname=self._server_hostname)
  117695. * self._sslobj_read = self._sslobj.read # <<<<<<<<<<<<<<
  117696. * self._sslobj_write = self._sslobj.write
  117697. * except Exception as ex:
  117698. */
  117699. __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self->_sslobj, __pyx_n_s_read); if (unlikely(!__pyx_t_6)) __PYX_ERR(22, 466, __pyx_L4_error)
  117700. __Pyx_GOTREF(__pyx_t_6);
  117701. __Pyx_GIVEREF(__pyx_t_6);
  117702. __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_self->_sslobj_read);
  117703. __Pyx_DECREF(__pyx_cur_scope->__pyx_v_self->_sslobj_read);
  117704. __pyx_cur_scope->__pyx_v_self->_sslobj_read = __pyx_t_6;
  117705. __pyx_t_6 = 0;
  117706. /* "uvloop/sslproto.pyx":467
  117707. * server_hostname=self._server_hostname)
  117708. * self._sslobj_read = self._sslobj.read
  117709. * self._sslobj_write = self._sslobj.write # <<<<<<<<<<<<<<
  117710. * except Exception as ex:
  117711. * self._on_handshake_complete(ex)
  117712. */
  117713. __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self->_sslobj, __pyx_n_s_write); if (unlikely(!__pyx_t_6)) __PYX_ERR(22, 467, __pyx_L4_error)
  117714. __Pyx_GOTREF(__pyx_t_6);
  117715. __Pyx_GIVEREF(__pyx_t_6);
  117716. __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_self->_sslobj_write);
  117717. __Pyx_DECREF(__pyx_cur_scope->__pyx_v_self->_sslobj_write);
  117718. __pyx_cur_scope->__pyx_v_self->_sslobj_write = __pyx_t_6;
  117719. __pyx_t_6 = 0;
  117720. /* "uvloop/sslproto.pyx":461
  117721. * lambda: self._check_handshake_timeout())
  117722. *
  117723. * try: # <<<<<<<<<<<<<<
  117724. * self._sslobj = self._sslcontext.wrap_bio(
  117725. * self._incoming, self._outgoing,
  117726. */
  117727. }
  117728. /* "uvloop/sslproto.pyx":471
  117729. * self._on_handshake_complete(ex)
  117730. * else:
  117731. * self._do_handshake() # <<<<<<<<<<<<<<
  117732. *
  117733. * cdef _check_handshake_timeout(self):
  117734. */
  117735. /*else:*/ {
  117736. __pyx_t_6 = ((struct __pyx_vtabstruct_6uvloop_4loop_SSLProtocol *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->_do_handshake(__pyx_cur_scope->__pyx_v_self); if (unlikely(!__pyx_t_6)) __PYX_ERR(22, 471, __pyx_L6_except_error)
  117737. __Pyx_GOTREF(__pyx_t_6);
  117738. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  117739. }
  117740. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  117741. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  117742. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  117743. goto __pyx_L9_try_end;
  117744. __pyx_L4_error:;
  117745. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  117746. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  117747. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  117748. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  117749. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  117750. /* "uvloop/sslproto.pyx":468
  117751. * self._sslobj_read = self._sslobj.read
  117752. * self._sslobj_write = self._sslobj.write
  117753. * except Exception as ex: # <<<<<<<<<<<<<<
  117754. * self._on_handshake_complete(ex)
  117755. * else:
  117756. */
  117757. __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
  117758. if (__pyx_t_5) {
  117759. __Pyx_AddTraceback("uvloop.loop.SSLProtocol._start_handshake", __pyx_clineno, __pyx_lineno, __pyx_filename);
  117760. if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_7, &__pyx_t_2) < 0) __PYX_ERR(22, 468, __pyx_L6_except_error)
  117761. __Pyx_GOTREF(__pyx_t_6);
  117762. __Pyx_GOTREF(__pyx_t_7);
  117763. __Pyx_GOTREF(__pyx_t_2);
  117764. __Pyx_INCREF(__pyx_t_7);
  117765. __pyx_v_ex = __pyx_t_7;
  117766. /*try:*/ {
  117767. /* "uvloop/sslproto.pyx":469
  117768. * self._sslobj_write = self._sslobj.write
  117769. * except Exception as ex:
  117770. * self._on_handshake_complete(ex) # <<<<<<<<<<<<<<
  117771. * else:
  117772. * self._do_handshake()
  117773. */
  117774. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_SSLProtocol *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->_on_handshake_complete(__pyx_cur_scope->__pyx_v_self, __pyx_v_ex); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 469, __pyx_L15_error)
  117775. __Pyx_GOTREF(__pyx_t_1);
  117776. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  117777. }
  117778. /* "uvloop/sslproto.pyx":468
  117779. * self._sslobj_read = self._sslobj.read
  117780. * self._sslobj_write = self._sslobj.write
  117781. * except Exception as ex: # <<<<<<<<<<<<<<
  117782. * self._on_handshake_complete(ex)
  117783. * else:
  117784. */
  117785. /*finally:*/ {
  117786. /*normal exit:*/{
  117787. __Pyx_DECREF(__pyx_v_ex);
  117788. __pyx_v_ex = NULL;
  117789. goto __pyx_L16;
  117790. }
  117791. __pyx_L15_error:;
  117792. /*exception exit:*/{
  117793. __Pyx_PyThreadState_declare
  117794. __Pyx_PyThreadState_assign
  117795. __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0;
  117796. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  117797. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  117798. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18);
  117799. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15) < 0)) __Pyx_ErrFetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
  117800. __Pyx_XGOTREF(__pyx_t_13);
  117801. __Pyx_XGOTREF(__pyx_t_14);
  117802. __Pyx_XGOTREF(__pyx_t_15);
  117803. __Pyx_XGOTREF(__pyx_t_16);
  117804. __Pyx_XGOTREF(__pyx_t_17);
  117805. __Pyx_XGOTREF(__pyx_t_18);
  117806. __pyx_t_5 = __pyx_lineno; __pyx_t_11 = __pyx_clineno; __pyx_t_12 = __pyx_filename;
  117807. {
  117808. __Pyx_DECREF(__pyx_v_ex);
  117809. __pyx_v_ex = NULL;
  117810. }
  117811. if (PY_MAJOR_VERSION >= 3) {
  117812. __Pyx_XGIVEREF(__pyx_t_16);
  117813. __Pyx_XGIVEREF(__pyx_t_17);
  117814. __Pyx_XGIVEREF(__pyx_t_18);
  117815. __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18);
  117816. }
  117817. __Pyx_XGIVEREF(__pyx_t_13);
  117818. __Pyx_XGIVEREF(__pyx_t_14);
  117819. __Pyx_XGIVEREF(__pyx_t_15);
  117820. __Pyx_ErrRestore(__pyx_t_13, __pyx_t_14, __pyx_t_15);
  117821. __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0;
  117822. __pyx_lineno = __pyx_t_5; __pyx_clineno = __pyx_t_11; __pyx_filename = __pyx_t_12;
  117823. goto __pyx_L6_except_error;
  117824. }
  117825. __pyx_L16:;
  117826. }
  117827. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  117828. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  117829. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  117830. goto __pyx_L5_exception_handled;
  117831. }
  117832. goto __pyx_L6_except_error;
  117833. __pyx_L6_except_error:;
  117834. /* "uvloop/sslproto.pyx":461
  117835. * lambda: self._check_handshake_timeout())
  117836. *
  117837. * try: # <<<<<<<<<<<<<<
  117838. * self._sslobj = self._sslcontext.wrap_bio(
  117839. * self._incoming, self._outgoing,
  117840. */
  117841. __Pyx_XGIVEREF(__pyx_t_8);
  117842. __Pyx_XGIVEREF(__pyx_t_9);
  117843. __Pyx_XGIVEREF(__pyx_t_10);
  117844. __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
  117845. goto __pyx_L1_error;
  117846. __pyx_L5_exception_handled:;
  117847. __Pyx_XGIVEREF(__pyx_t_8);
  117848. __Pyx_XGIVEREF(__pyx_t_9);
  117849. __Pyx_XGIVEREF(__pyx_t_10);
  117850. __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
  117851. __pyx_L9_try_end:;
  117852. }
  117853. /* "uvloop/sslproto.pyx":447
  117854. * # Handshake flow
  117855. *
  117856. * cdef _start_handshake(self): # <<<<<<<<<<<<<<
  117857. * if self._loop.get_debug():
  117858. * aio_logger.debug("%r starts SSL handshake", self)
  117859. */
  117860. /* function exit code */
  117861. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  117862. goto __pyx_L0;
  117863. __pyx_L1_error:;
  117864. __Pyx_XDECREF(__pyx_t_1);
  117865. __Pyx_XDECREF(__pyx_t_2);
  117866. __Pyx_XDECREF(__pyx_t_3);
  117867. __Pyx_XDECREF(__pyx_t_6);
  117868. __Pyx_XDECREF(__pyx_t_7);
  117869. __Pyx_AddTraceback("uvloop.loop.SSLProtocol._start_handshake", __pyx_clineno, __pyx_lineno, __pyx_filename);
  117870. __pyx_r = 0;
  117871. __pyx_L0:;
  117872. __Pyx_XDECREF(__pyx_v_ex);
  117873. __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  117874. __Pyx_XGIVEREF(__pyx_r);
  117875. __Pyx_RefNannyFinishContext();
  117876. return __pyx_r;
  117877. }
  117878. /* "uvloop/sslproto.pyx":473
  117879. * self._do_handshake()
  117880. *
  117881. * cdef _check_handshake_timeout(self): # <<<<<<<<<<<<<<
  117882. * if self._state == DO_HANDSHAKE:
  117883. * msg = (
  117884. */
  117885. static PyObject *__pyx_f_6uvloop_4loop_11SSLProtocol__check_handshake_timeout(struct __pyx_obj_6uvloop_4loop_SSLProtocol *__pyx_v_self) {
  117886. PyObject *__pyx_v_msg = NULL;
  117887. PyObject *__pyx_r = NULL;
  117888. __Pyx_RefNannyDeclarations
  117889. int __pyx_t_1;
  117890. PyObject *__pyx_t_2 = NULL;
  117891. Py_ssize_t __pyx_t_3;
  117892. Py_UCS4 __pyx_t_4;
  117893. PyObject *__pyx_t_5 = NULL;
  117894. __Pyx_RefNannySetupContext("_check_handshake_timeout", 0);
  117895. /* "uvloop/sslproto.pyx":474
  117896. *
  117897. * cdef _check_handshake_timeout(self):
  117898. * if self._state == DO_HANDSHAKE: # <<<<<<<<<<<<<<
  117899. * msg = (
  117900. * f"SSL handshake is taking longer than "
  117901. */
  117902. __pyx_t_1 = ((__pyx_v_self->_state == __pyx_e_6uvloop_4loop_DO_HANDSHAKE) != 0);
  117903. if (__pyx_t_1) {
  117904. /* "uvloop/sslproto.pyx":476
  117905. * if self._state == DO_HANDSHAKE:
  117906. * msg = (
  117907. * f"SSL handshake is taking longer than " # <<<<<<<<<<<<<<
  117908. * f"{self._ssl_handshake_timeout} seconds: "
  117909. * f"aborting the connection"
  117910. */
  117911. __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 476, __pyx_L1_error)
  117912. __Pyx_GOTREF(__pyx_t_2);
  117913. __pyx_t_3 = 0;
  117914. __pyx_t_4 = 127;
  117915. __Pyx_INCREF(__pyx_kp_u_SSL_handshake_is_taking_longer_t);
  117916. __pyx_t_3 += 36;
  117917. __Pyx_GIVEREF(__pyx_kp_u_SSL_handshake_is_taking_longer_t);
  117918. PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_SSL_handshake_is_taking_longer_t);
  117919. /* "uvloop/sslproto.pyx":477
  117920. * msg = (
  117921. * f"SSL handshake is taking longer than "
  117922. * f"{self._ssl_handshake_timeout} seconds: " # <<<<<<<<<<<<<<
  117923. * f"aborting the connection"
  117924. * )
  117925. */
  117926. __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_v_self->_ssl_handshake_timeout, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(22, 477, __pyx_L1_error)
  117927. __Pyx_GOTREF(__pyx_t_5);
  117928. __pyx_t_4 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_4) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_4;
  117929. __pyx_t_3 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
  117930. __Pyx_GIVEREF(__pyx_t_5);
  117931. PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_5);
  117932. __pyx_t_5 = 0;
  117933. __Pyx_INCREF(__pyx_kp_u_seconds_aborting_the_connection);
  117934. __pyx_t_3 += 33;
  117935. __Pyx_GIVEREF(__pyx_kp_u_seconds_aborting_the_connection);
  117936. PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_kp_u_seconds_aborting_the_connection);
  117937. /* "uvloop/sslproto.pyx":476
  117938. * if self._state == DO_HANDSHAKE:
  117939. * msg = (
  117940. * f"SSL handshake is taking longer than " # <<<<<<<<<<<<<<
  117941. * f"{self._ssl_handshake_timeout} seconds: "
  117942. * f"aborting the connection"
  117943. */
  117944. __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_2, 3, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(22, 476, __pyx_L1_error)
  117945. __Pyx_GOTREF(__pyx_t_5);
  117946. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  117947. __pyx_v_msg = ((PyObject*)__pyx_t_5);
  117948. __pyx_t_5 = 0;
  117949. /* "uvloop/sslproto.pyx":480
  117950. * f"aborting the connection"
  117951. * )
  117952. * self._fatal_error(ConnectionAbortedError(msg)) # <<<<<<<<<<<<<<
  117953. *
  117954. * cdef _do_handshake(self):
  117955. */
  117956. __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_ConnectionAbortedError); if (unlikely(!__pyx_t_5)) __PYX_ERR(22, 480, __pyx_L1_error)
  117957. __Pyx_GOTREF(__pyx_t_5);
  117958. __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_msg); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 480, __pyx_L1_error)
  117959. __Pyx_GOTREF(__pyx_t_2);
  117960. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  117961. __pyx_t_5 = ((struct __pyx_vtabstruct_6uvloop_4loop_SSLProtocol *)__pyx_v_self->__pyx_vtab)->_fatal_error(__pyx_v_self, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(22, 480, __pyx_L1_error)
  117962. __Pyx_GOTREF(__pyx_t_5);
  117963. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  117964. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  117965. /* "uvloop/sslproto.pyx":474
  117966. *
  117967. * cdef _check_handshake_timeout(self):
  117968. * if self._state == DO_HANDSHAKE: # <<<<<<<<<<<<<<
  117969. * msg = (
  117970. * f"SSL handshake is taking longer than "
  117971. */
  117972. }
  117973. /* "uvloop/sslproto.pyx":473
  117974. * self._do_handshake()
  117975. *
  117976. * cdef _check_handshake_timeout(self): # <<<<<<<<<<<<<<
  117977. * if self._state == DO_HANDSHAKE:
  117978. * msg = (
  117979. */
  117980. /* function exit code */
  117981. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  117982. goto __pyx_L0;
  117983. __pyx_L1_error:;
  117984. __Pyx_XDECREF(__pyx_t_2);
  117985. __Pyx_XDECREF(__pyx_t_5);
  117986. __Pyx_AddTraceback("uvloop.loop.SSLProtocol._check_handshake_timeout", __pyx_clineno, __pyx_lineno, __pyx_filename);
  117987. __pyx_r = 0;
  117988. __pyx_L0:;
  117989. __Pyx_XDECREF(__pyx_v_msg);
  117990. __Pyx_XGIVEREF(__pyx_r);
  117991. __Pyx_RefNannyFinishContext();
  117992. return __pyx_r;
  117993. }
  117994. /* "uvloop/sslproto.pyx":482
  117995. * self._fatal_error(ConnectionAbortedError(msg))
  117996. *
  117997. * cdef _do_handshake(self): # <<<<<<<<<<<<<<
  117998. * try:
  117999. * self._sslobj.do_handshake()
  118000. */
  118001. static PyObject *__pyx_f_6uvloop_4loop_11SSLProtocol__do_handshake(struct __pyx_obj_6uvloop_4loop_SSLProtocol *__pyx_v_self) {
  118002. PyObject *__pyx_v_exc = NULL;
  118003. PyObject *__pyx_r = NULL;
  118004. __Pyx_RefNannyDeclarations
  118005. PyObject *__pyx_t_1 = NULL;
  118006. PyObject *__pyx_t_2 = NULL;
  118007. PyObject *__pyx_t_3 = NULL;
  118008. PyObject *__pyx_t_4 = NULL;
  118009. PyObject *__pyx_t_5 = NULL;
  118010. PyObject *__pyx_t_6 = NULL;
  118011. int __pyx_t_7;
  118012. PyObject *__pyx_t_8 = NULL;
  118013. int __pyx_t_9;
  118014. char const *__pyx_t_10;
  118015. PyObject *__pyx_t_11 = NULL;
  118016. PyObject *__pyx_t_12 = NULL;
  118017. PyObject *__pyx_t_13 = NULL;
  118018. PyObject *__pyx_t_14 = NULL;
  118019. PyObject *__pyx_t_15 = NULL;
  118020. PyObject *__pyx_t_16 = NULL;
  118021. char const *__pyx_t_17;
  118022. __Pyx_RefNannySetupContext("_do_handshake", 0);
  118023. /* "uvloop/sslproto.pyx":483
  118024. *
  118025. * cdef _do_handshake(self):
  118026. * try: # <<<<<<<<<<<<<<
  118027. * self._sslobj.do_handshake()
  118028. * except ssl_SSLAgainErrors as exc:
  118029. */
  118030. {
  118031. __Pyx_PyThreadState_declare
  118032. __Pyx_PyThreadState_assign
  118033. __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
  118034. __Pyx_XGOTREF(__pyx_t_1);
  118035. __Pyx_XGOTREF(__pyx_t_2);
  118036. __Pyx_XGOTREF(__pyx_t_3);
  118037. /*try:*/ {
  118038. /* "uvloop/sslproto.pyx":484
  118039. * cdef _do_handshake(self):
  118040. * try:
  118041. * self._sslobj.do_handshake() # <<<<<<<<<<<<<<
  118042. * except ssl_SSLAgainErrors as exc:
  118043. * self._process_outgoing()
  118044. */
  118045. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_sslobj, __pyx_n_s_do_handshake); if (unlikely(!__pyx_t_5)) __PYX_ERR(22, 484, __pyx_L3_error)
  118046. __Pyx_GOTREF(__pyx_t_5);
  118047. __pyx_t_6 = NULL;
  118048. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
  118049. __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
  118050. if (likely(__pyx_t_6)) {
  118051. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
  118052. __Pyx_INCREF(__pyx_t_6);
  118053. __Pyx_INCREF(function);
  118054. __Pyx_DECREF_SET(__pyx_t_5, function);
  118055. }
  118056. }
  118057. __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
  118058. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  118059. if (unlikely(!__pyx_t_4)) __PYX_ERR(22, 484, __pyx_L3_error)
  118060. __Pyx_GOTREF(__pyx_t_4);
  118061. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  118062. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  118063. /* "uvloop/sslproto.pyx":483
  118064. *
  118065. * cdef _do_handshake(self):
  118066. * try: # <<<<<<<<<<<<<<
  118067. * self._sslobj.do_handshake()
  118068. * except ssl_SSLAgainErrors as exc:
  118069. */
  118070. }
  118071. /* "uvloop/sslproto.pyx":490
  118072. * self._on_handshake_complete(exc)
  118073. * else:
  118074. * self._on_handshake_complete(None) # <<<<<<<<<<<<<<
  118075. *
  118076. * cdef _on_handshake_complete(self, handshake_exc):
  118077. */
  118078. /*else:*/ {
  118079. __pyx_t_4 = ((struct __pyx_vtabstruct_6uvloop_4loop_SSLProtocol *)__pyx_v_self->__pyx_vtab)->_on_handshake_complete(__pyx_v_self, Py_None); if (unlikely(!__pyx_t_4)) __PYX_ERR(22, 490, __pyx_L5_except_error)
  118080. __Pyx_GOTREF(__pyx_t_4);
  118081. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  118082. }
  118083. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  118084. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  118085. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  118086. goto __pyx_L8_try_end;
  118087. __pyx_L3_error:;
  118088. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  118089. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  118090. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  118091. /* "uvloop/sslproto.pyx":485
  118092. * try:
  118093. * self._sslobj.do_handshake()
  118094. * except ssl_SSLAgainErrors as exc: # <<<<<<<<<<<<<<
  118095. * self._process_outgoing()
  118096. * except ssl_SSLError as exc:
  118097. */
  118098. __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_v_6uvloop_4loop_ssl_SSLAgainErrors);
  118099. if (__pyx_t_7) {
  118100. __Pyx_AddTraceback("uvloop.loop.SSLProtocol._do_handshake", __pyx_clineno, __pyx_lineno, __pyx_filename);
  118101. if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6) < 0) __PYX_ERR(22, 485, __pyx_L5_except_error)
  118102. __Pyx_GOTREF(__pyx_t_4);
  118103. __Pyx_GOTREF(__pyx_t_5);
  118104. __Pyx_GOTREF(__pyx_t_6);
  118105. __Pyx_INCREF(__pyx_t_5);
  118106. __pyx_v_exc = __pyx_t_5;
  118107. /*try:*/ {
  118108. /* "uvloop/sslproto.pyx":486
  118109. * self._sslobj.do_handshake()
  118110. * except ssl_SSLAgainErrors as exc:
  118111. * self._process_outgoing() # <<<<<<<<<<<<<<
  118112. * except ssl_SSLError as exc:
  118113. * self._on_handshake_complete(exc)
  118114. */
  118115. __pyx_t_8 = ((struct __pyx_vtabstruct_6uvloop_4loop_SSLProtocol *)__pyx_v_self->__pyx_vtab)->_process_outgoing(__pyx_v_self); if (unlikely(!__pyx_t_8)) __PYX_ERR(22, 486, __pyx_L14_error)
  118116. __Pyx_GOTREF(__pyx_t_8);
  118117. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  118118. }
  118119. /* "uvloop/sslproto.pyx":485
  118120. * try:
  118121. * self._sslobj.do_handshake()
  118122. * except ssl_SSLAgainErrors as exc: # <<<<<<<<<<<<<<
  118123. * self._process_outgoing()
  118124. * except ssl_SSLError as exc:
  118125. */
  118126. /*finally:*/ {
  118127. /*normal exit:*/{
  118128. __Pyx_DECREF(__pyx_v_exc);
  118129. __pyx_v_exc = NULL;
  118130. goto __pyx_L15;
  118131. }
  118132. __pyx_L14_error:;
  118133. /*exception exit:*/{
  118134. __Pyx_PyThreadState_declare
  118135. __Pyx_PyThreadState_assign
  118136. __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0;
  118137. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  118138. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16);
  118139. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13) < 0)) __Pyx_ErrFetch(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
  118140. __Pyx_XGOTREF(__pyx_t_11);
  118141. __Pyx_XGOTREF(__pyx_t_12);
  118142. __Pyx_XGOTREF(__pyx_t_13);
  118143. __Pyx_XGOTREF(__pyx_t_14);
  118144. __Pyx_XGOTREF(__pyx_t_15);
  118145. __Pyx_XGOTREF(__pyx_t_16);
  118146. __pyx_t_7 = __pyx_lineno; __pyx_t_9 = __pyx_clineno; __pyx_t_10 = __pyx_filename;
  118147. {
  118148. __Pyx_DECREF(__pyx_v_exc);
  118149. __pyx_v_exc = NULL;
  118150. }
  118151. if (PY_MAJOR_VERSION >= 3) {
  118152. __Pyx_XGIVEREF(__pyx_t_14);
  118153. __Pyx_XGIVEREF(__pyx_t_15);
  118154. __Pyx_XGIVEREF(__pyx_t_16);
  118155. __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_15, __pyx_t_16);
  118156. }
  118157. __Pyx_XGIVEREF(__pyx_t_11);
  118158. __Pyx_XGIVEREF(__pyx_t_12);
  118159. __Pyx_XGIVEREF(__pyx_t_13);
  118160. __Pyx_ErrRestore(__pyx_t_11, __pyx_t_12, __pyx_t_13);
  118161. __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0;
  118162. __pyx_lineno = __pyx_t_7; __pyx_clineno = __pyx_t_9; __pyx_filename = __pyx_t_10;
  118163. goto __pyx_L5_except_error;
  118164. }
  118165. __pyx_L15:;
  118166. }
  118167. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  118168. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  118169. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  118170. goto __pyx_L4_exception_handled;
  118171. }
  118172. /* "uvloop/sslproto.pyx":487
  118173. * except ssl_SSLAgainErrors as exc:
  118174. * self._process_outgoing()
  118175. * except ssl_SSLError as exc: # <<<<<<<<<<<<<<
  118176. * self._on_handshake_complete(exc)
  118177. * else:
  118178. */
  118179. __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_v_6uvloop_4loop_ssl_SSLError);
  118180. if (__pyx_t_9) {
  118181. __Pyx_AddTraceback("uvloop.loop.SSLProtocol._do_handshake", __pyx_clineno, __pyx_lineno, __pyx_filename);
  118182. if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4) < 0) __PYX_ERR(22, 487, __pyx_L5_except_error)
  118183. __Pyx_GOTREF(__pyx_t_6);
  118184. __Pyx_GOTREF(__pyx_t_5);
  118185. __Pyx_GOTREF(__pyx_t_4);
  118186. __Pyx_INCREF(__pyx_t_5);
  118187. __pyx_v_exc = __pyx_t_5;
  118188. /*try:*/ {
  118189. /* "uvloop/sslproto.pyx":488
  118190. * self._process_outgoing()
  118191. * except ssl_SSLError as exc:
  118192. * self._on_handshake_complete(exc) # <<<<<<<<<<<<<<
  118193. * else:
  118194. * self._on_handshake_complete(None)
  118195. */
  118196. __pyx_t_8 = ((struct __pyx_vtabstruct_6uvloop_4loop_SSLProtocol *)__pyx_v_self->__pyx_vtab)->_on_handshake_complete(__pyx_v_self, __pyx_v_exc); if (unlikely(!__pyx_t_8)) __PYX_ERR(22, 488, __pyx_L25_error)
  118197. __Pyx_GOTREF(__pyx_t_8);
  118198. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  118199. }
  118200. /* "uvloop/sslproto.pyx":487
  118201. * except ssl_SSLAgainErrors as exc:
  118202. * self._process_outgoing()
  118203. * except ssl_SSLError as exc: # <<<<<<<<<<<<<<
  118204. * self._on_handshake_complete(exc)
  118205. * else:
  118206. */
  118207. /*finally:*/ {
  118208. /*normal exit:*/{
  118209. __Pyx_DECREF(__pyx_v_exc);
  118210. __pyx_v_exc = NULL;
  118211. goto __pyx_L26;
  118212. }
  118213. __pyx_L25_error:;
  118214. /*exception exit:*/{
  118215. __Pyx_PyThreadState_declare
  118216. __Pyx_PyThreadState_assign
  118217. __pyx_t_16 = 0; __pyx_t_15 = 0; __pyx_t_14 = 0; __pyx_t_13 = 0; __pyx_t_12 = 0; __pyx_t_11 = 0;
  118218. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  118219. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_13, &__pyx_t_12, &__pyx_t_11);
  118220. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_16, &__pyx_t_15, &__pyx_t_14) < 0)) __Pyx_ErrFetch(&__pyx_t_16, &__pyx_t_15, &__pyx_t_14);
  118221. __Pyx_XGOTREF(__pyx_t_16);
  118222. __Pyx_XGOTREF(__pyx_t_15);
  118223. __Pyx_XGOTREF(__pyx_t_14);
  118224. __Pyx_XGOTREF(__pyx_t_13);
  118225. __Pyx_XGOTREF(__pyx_t_12);
  118226. __Pyx_XGOTREF(__pyx_t_11);
  118227. __pyx_t_9 = __pyx_lineno; __pyx_t_7 = __pyx_clineno; __pyx_t_17 = __pyx_filename;
  118228. {
  118229. __Pyx_DECREF(__pyx_v_exc);
  118230. __pyx_v_exc = NULL;
  118231. }
  118232. if (PY_MAJOR_VERSION >= 3) {
  118233. __Pyx_XGIVEREF(__pyx_t_13);
  118234. __Pyx_XGIVEREF(__pyx_t_12);
  118235. __Pyx_XGIVEREF(__pyx_t_11);
  118236. __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_12, __pyx_t_11);
  118237. }
  118238. __Pyx_XGIVEREF(__pyx_t_16);
  118239. __Pyx_XGIVEREF(__pyx_t_15);
  118240. __Pyx_XGIVEREF(__pyx_t_14);
  118241. __Pyx_ErrRestore(__pyx_t_16, __pyx_t_15, __pyx_t_14);
  118242. __pyx_t_16 = 0; __pyx_t_15 = 0; __pyx_t_14 = 0; __pyx_t_13 = 0; __pyx_t_12 = 0; __pyx_t_11 = 0;
  118243. __pyx_lineno = __pyx_t_9; __pyx_clineno = __pyx_t_7; __pyx_filename = __pyx_t_17;
  118244. goto __pyx_L5_except_error;
  118245. }
  118246. __pyx_L26:;
  118247. }
  118248. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  118249. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  118250. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  118251. goto __pyx_L4_exception_handled;
  118252. }
  118253. goto __pyx_L5_except_error;
  118254. __pyx_L5_except_error:;
  118255. /* "uvloop/sslproto.pyx":483
  118256. *
  118257. * cdef _do_handshake(self):
  118258. * try: # <<<<<<<<<<<<<<
  118259. * self._sslobj.do_handshake()
  118260. * except ssl_SSLAgainErrors as exc:
  118261. */
  118262. __Pyx_XGIVEREF(__pyx_t_1);
  118263. __Pyx_XGIVEREF(__pyx_t_2);
  118264. __Pyx_XGIVEREF(__pyx_t_3);
  118265. __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
  118266. goto __pyx_L1_error;
  118267. __pyx_L4_exception_handled:;
  118268. __Pyx_XGIVEREF(__pyx_t_1);
  118269. __Pyx_XGIVEREF(__pyx_t_2);
  118270. __Pyx_XGIVEREF(__pyx_t_3);
  118271. __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
  118272. __pyx_L8_try_end:;
  118273. }
  118274. /* "uvloop/sslproto.pyx":482
  118275. * self._fatal_error(ConnectionAbortedError(msg))
  118276. *
  118277. * cdef _do_handshake(self): # <<<<<<<<<<<<<<
  118278. * try:
  118279. * self._sslobj.do_handshake()
  118280. */
  118281. /* function exit code */
  118282. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  118283. goto __pyx_L0;
  118284. __pyx_L1_error:;
  118285. __Pyx_XDECREF(__pyx_t_4);
  118286. __Pyx_XDECREF(__pyx_t_5);
  118287. __Pyx_XDECREF(__pyx_t_6);
  118288. __Pyx_XDECREF(__pyx_t_8);
  118289. __Pyx_AddTraceback("uvloop.loop.SSLProtocol._do_handshake", __pyx_clineno, __pyx_lineno, __pyx_filename);
  118290. __pyx_r = 0;
  118291. __pyx_L0:;
  118292. __Pyx_XDECREF(__pyx_v_exc);
  118293. __Pyx_XGIVEREF(__pyx_r);
  118294. __Pyx_RefNannyFinishContext();
  118295. return __pyx_r;
  118296. }
  118297. /* "uvloop/sslproto.pyx":492
  118298. * self._on_handshake_complete(None)
  118299. *
  118300. * cdef _on_handshake_complete(self, handshake_exc): # <<<<<<<<<<<<<<
  118301. * self._handshake_timeout_handle.cancel()
  118302. *
  118303. */
  118304. static PyObject *__pyx_f_6uvloop_4loop_11SSLProtocol__on_handshake_complete(struct __pyx_obj_6uvloop_4loop_SSLProtocol *__pyx_v_self, PyObject *__pyx_v_handshake_exc) {
  118305. PyObject *__pyx_v_sslobj = NULL;
  118306. PyObject *__pyx_v_peercert = NULL;
  118307. PyObject *__pyx_v_exc = NULL;
  118308. PyObject *__pyx_v_msg = NULL;
  118309. PyObject *__pyx_v_dt = NULL;
  118310. PyObject *__pyx_r = NULL;
  118311. __Pyx_RefNannyDeclarations
  118312. PyObject *__pyx_t_1 = NULL;
  118313. PyObject *__pyx_t_2 = NULL;
  118314. PyObject *__pyx_t_3 = NULL;
  118315. PyObject *__pyx_t_4 = NULL;
  118316. PyObject *__pyx_t_5 = NULL;
  118317. PyObject *__pyx_t_6 = NULL;
  118318. int __pyx_t_7;
  118319. int __pyx_t_8;
  118320. int __pyx_t_9;
  118321. PyObject *__pyx_t_10 = NULL;
  118322. struct __pyx_opt_args_6uvloop_4loop_11SSLProtocol__fatal_error __pyx_t_11;
  118323. int __pyx_t_12;
  118324. char const *__pyx_t_13;
  118325. PyObject *__pyx_t_14 = NULL;
  118326. PyObject *__pyx_t_15 = NULL;
  118327. PyObject *__pyx_t_16 = NULL;
  118328. PyObject *__pyx_t_17 = NULL;
  118329. PyObject *__pyx_t_18 = NULL;
  118330. PyObject *__pyx_t_19 = NULL;
  118331. PyObject *__pyx_t_20 = NULL;
  118332. __Pyx_RefNannySetupContext("_on_handshake_complete", 0);
  118333. /* "uvloop/sslproto.pyx":493
  118334. *
  118335. * cdef _on_handshake_complete(self, handshake_exc):
  118336. * self._handshake_timeout_handle.cancel() # <<<<<<<<<<<<<<
  118337. *
  118338. * sslobj = self._sslobj
  118339. */
  118340. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_handshake_timeout_handle, __pyx_n_s_cancel); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 493, __pyx_L1_error)
  118341. __Pyx_GOTREF(__pyx_t_2);
  118342. __pyx_t_3 = NULL;
  118343. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
  118344. __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
  118345. if (likely(__pyx_t_3)) {
  118346. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  118347. __Pyx_INCREF(__pyx_t_3);
  118348. __Pyx_INCREF(function);
  118349. __Pyx_DECREF_SET(__pyx_t_2, function);
  118350. }
  118351. }
  118352. __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  118353. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  118354. if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 493, __pyx_L1_error)
  118355. __Pyx_GOTREF(__pyx_t_1);
  118356. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  118357. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  118358. /* "uvloop/sslproto.pyx":495
  118359. * self._handshake_timeout_handle.cancel()
  118360. *
  118361. * sslobj = self._sslobj # <<<<<<<<<<<<<<
  118362. * try:
  118363. * if handshake_exc is None:
  118364. */
  118365. __pyx_t_1 = __pyx_v_self->_sslobj;
  118366. __Pyx_INCREF(__pyx_t_1);
  118367. __pyx_v_sslobj = __pyx_t_1;
  118368. __pyx_t_1 = 0;
  118369. /* "uvloop/sslproto.pyx":496
  118370. *
  118371. * sslobj = self._sslobj
  118372. * try: # <<<<<<<<<<<<<<
  118373. * if handshake_exc is None:
  118374. * self._set_state(WRAPPED)
  118375. */
  118376. {
  118377. __Pyx_PyThreadState_declare
  118378. __Pyx_PyThreadState_assign
  118379. __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
  118380. __Pyx_XGOTREF(__pyx_t_4);
  118381. __Pyx_XGOTREF(__pyx_t_5);
  118382. __Pyx_XGOTREF(__pyx_t_6);
  118383. /*try:*/ {
  118384. /* "uvloop/sslproto.pyx":497
  118385. * sslobj = self._sslobj
  118386. * try:
  118387. * if handshake_exc is None: # <<<<<<<<<<<<<<
  118388. * self._set_state(WRAPPED)
  118389. * else:
  118390. */
  118391. __pyx_t_7 = (__pyx_v_handshake_exc == Py_None);
  118392. __pyx_t_8 = (__pyx_t_7 != 0);
  118393. if (likely(__pyx_t_8)) {
  118394. /* "uvloop/sslproto.pyx":498
  118395. * try:
  118396. * if handshake_exc is None:
  118397. * self._set_state(WRAPPED) # <<<<<<<<<<<<<<
  118398. * else:
  118399. * raise handshake_exc
  118400. */
  118401. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_SSLProtocol *)__pyx_v_self->__pyx_vtab)->_set_state(__pyx_v_self, __pyx_e_6uvloop_4loop_WRAPPED); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 498, __pyx_L3_error)
  118402. __Pyx_GOTREF(__pyx_t_1);
  118403. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  118404. /* "uvloop/sslproto.pyx":497
  118405. * sslobj = self._sslobj
  118406. * try:
  118407. * if handshake_exc is None: # <<<<<<<<<<<<<<
  118408. * self._set_state(WRAPPED)
  118409. * else:
  118410. */
  118411. goto __pyx_L9;
  118412. }
  118413. /* "uvloop/sslproto.pyx":500
  118414. * self._set_state(WRAPPED)
  118415. * else:
  118416. * raise handshake_exc # <<<<<<<<<<<<<<
  118417. *
  118418. * peercert = sslobj.getpeercert()
  118419. */
  118420. /*else*/ {
  118421. __Pyx_Raise(__pyx_v_handshake_exc, 0, 0, 0);
  118422. __PYX_ERR(22, 500, __pyx_L3_error)
  118423. }
  118424. __pyx_L9:;
  118425. /* "uvloop/sslproto.pyx":502
  118426. * raise handshake_exc
  118427. *
  118428. * peercert = sslobj.getpeercert() # <<<<<<<<<<<<<<
  118429. * except Exception as exc:
  118430. * self._set_state(UNWRAPPED)
  118431. */
  118432. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_sslobj, __pyx_n_s_getpeercert); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 502, __pyx_L3_error)
  118433. __Pyx_GOTREF(__pyx_t_2);
  118434. __pyx_t_3 = NULL;
  118435. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
  118436. __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
  118437. if (likely(__pyx_t_3)) {
  118438. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  118439. __Pyx_INCREF(__pyx_t_3);
  118440. __Pyx_INCREF(function);
  118441. __Pyx_DECREF_SET(__pyx_t_2, function);
  118442. }
  118443. }
  118444. __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  118445. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  118446. if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 502, __pyx_L3_error)
  118447. __Pyx_GOTREF(__pyx_t_1);
  118448. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  118449. __pyx_v_peercert = __pyx_t_1;
  118450. __pyx_t_1 = 0;
  118451. /* "uvloop/sslproto.pyx":496
  118452. *
  118453. * sslobj = self._sslobj
  118454. * try: # <<<<<<<<<<<<<<
  118455. * if handshake_exc is None:
  118456. * self._set_state(WRAPPED)
  118457. */
  118458. }
  118459. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  118460. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  118461. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  118462. goto __pyx_L8_try_end;
  118463. __pyx_L3_error:;
  118464. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  118465. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  118466. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  118467. /* "uvloop/sslproto.pyx":503
  118468. *
  118469. * peercert = sslobj.getpeercert()
  118470. * except Exception as exc: # <<<<<<<<<<<<<<
  118471. * self._set_state(UNWRAPPED)
  118472. * if isinstance(exc, ssl_CertificateError):
  118473. */
  118474. __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
  118475. if (__pyx_t_9) {
  118476. __Pyx_AddTraceback("uvloop.loop.SSLProtocol._on_handshake_complete", __pyx_clineno, __pyx_lineno, __pyx_filename);
  118477. if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3) < 0) __PYX_ERR(22, 503, __pyx_L5_except_error)
  118478. __Pyx_GOTREF(__pyx_t_1);
  118479. __Pyx_GOTREF(__pyx_t_2);
  118480. __Pyx_GOTREF(__pyx_t_3);
  118481. __Pyx_INCREF(__pyx_t_2);
  118482. __pyx_v_exc = __pyx_t_2;
  118483. /*try:*/ {
  118484. /* "uvloop/sslproto.pyx":504
  118485. * peercert = sslobj.getpeercert()
  118486. * except Exception as exc:
  118487. * self._set_state(UNWRAPPED) # <<<<<<<<<<<<<<
  118488. * if isinstance(exc, ssl_CertificateError):
  118489. * msg = 'SSL handshake failed on verifying the certificate'
  118490. */
  118491. __pyx_t_10 = ((struct __pyx_vtabstruct_6uvloop_4loop_SSLProtocol *)__pyx_v_self->__pyx_vtab)->_set_state(__pyx_v_self, __pyx_e_6uvloop_4loop_UNWRAPPED); if (unlikely(!__pyx_t_10)) __PYX_ERR(22, 504, __pyx_L15_error)
  118492. __Pyx_GOTREF(__pyx_t_10);
  118493. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  118494. /* "uvloop/sslproto.pyx":505
  118495. * except Exception as exc:
  118496. * self._set_state(UNWRAPPED)
  118497. * if isinstance(exc, ssl_CertificateError): # <<<<<<<<<<<<<<
  118498. * msg = 'SSL handshake failed on verifying the certificate'
  118499. * else:
  118500. */
  118501. __pyx_t_10 = __pyx_v_6uvloop_4loop_ssl_CertificateError;
  118502. __Pyx_INCREF(__pyx_t_10);
  118503. __pyx_t_8 = PyObject_IsInstance(__pyx_v_exc, __pyx_t_10); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(22, 505, __pyx_L15_error)
  118504. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  118505. __pyx_t_7 = (__pyx_t_8 != 0);
  118506. if (__pyx_t_7) {
  118507. /* "uvloop/sslproto.pyx":506
  118508. * self._set_state(UNWRAPPED)
  118509. * if isinstance(exc, ssl_CertificateError):
  118510. * msg = 'SSL handshake failed on verifying the certificate' # <<<<<<<<<<<<<<
  118511. * else:
  118512. * msg = 'SSL handshake failed'
  118513. */
  118514. __Pyx_INCREF(__pyx_kp_u_SSL_handshake_failed_on_verifyin);
  118515. __pyx_v_msg = __pyx_kp_u_SSL_handshake_failed_on_verifyin;
  118516. /* "uvloop/sslproto.pyx":505
  118517. * except Exception as exc:
  118518. * self._set_state(UNWRAPPED)
  118519. * if isinstance(exc, ssl_CertificateError): # <<<<<<<<<<<<<<
  118520. * msg = 'SSL handshake failed on verifying the certificate'
  118521. * else:
  118522. */
  118523. goto __pyx_L17;
  118524. }
  118525. /* "uvloop/sslproto.pyx":508
  118526. * msg = 'SSL handshake failed on verifying the certificate'
  118527. * else:
  118528. * msg = 'SSL handshake failed' # <<<<<<<<<<<<<<
  118529. * self._fatal_error(exc, msg)
  118530. * return
  118531. */
  118532. /*else*/ {
  118533. __Pyx_INCREF(__pyx_kp_u_SSL_handshake_failed);
  118534. __pyx_v_msg = __pyx_kp_u_SSL_handshake_failed;
  118535. }
  118536. __pyx_L17:;
  118537. /* "uvloop/sslproto.pyx":509
  118538. * else:
  118539. * msg = 'SSL handshake failed'
  118540. * self._fatal_error(exc, msg) # <<<<<<<<<<<<<<
  118541. * return
  118542. *
  118543. */
  118544. __pyx_t_11.__pyx_n = 1;
  118545. __pyx_t_11.message = __pyx_v_msg;
  118546. __pyx_t_10 = ((struct __pyx_vtabstruct_6uvloop_4loop_SSLProtocol *)__pyx_v_self->__pyx_vtab)->_fatal_error(__pyx_v_self, __pyx_v_exc, &__pyx_t_11); if (unlikely(!__pyx_t_10)) __PYX_ERR(22, 509, __pyx_L15_error)
  118547. __Pyx_GOTREF(__pyx_t_10);
  118548. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  118549. /* "uvloop/sslproto.pyx":510
  118550. * msg = 'SSL handshake failed'
  118551. * self._fatal_error(exc, msg)
  118552. * return # <<<<<<<<<<<<<<
  118553. *
  118554. * if self._loop.get_debug():
  118555. */
  118556. __Pyx_XDECREF(__pyx_r);
  118557. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  118558. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  118559. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  118560. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  118561. goto __pyx_L14_return;
  118562. }
  118563. /* "uvloop/sslproto.pyx":503
  118564. *
  118565. * peercert = sslobj.getpeercert()
  118566. * except Exception as exc: # <<<<<<<<<<<<<<
  118567. * self._set_state(UNWRAPPED)
  118568. * if isinstance(exc, ssl_CertificateError):
  118569. */
  118570. /*finally:*/ {
  118571. __pyx_L15_error:;
  118572. /*exception exit:*/{
  118573. __Pyx_PyThreadState_declare
  118574. __Pyx_PyThreadState_assign
  118575. __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0;
  118576. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  118577. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19);
  118578. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16) < 0)) __Pyx_ErrFetch(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16);
  118579. __Pyx_XGOTREF(__pyx_t_14);
  118580. __Pyx_XGOTREF(__pyx_t_15);
  118581. __Pyx_XGOTREF(__pyx_t_16);
  118582. __Pyx_XGOTREF(__pyx_t_17);
  118583. __Pyx_XGOTREF(__pyx_t_18);
  118584. __Pyx_XGOTREF(__pyx_t_19);
  118585. __pyx_t_9 = __pyx_lineno; __pyx_t_12 = __pyx_clineno; __pyx_t_13 = __pyx_filename;
  118586. {
  118587. __Pyx_DECREF(__pyx_v_exc);
  118588. __pyx_v_exc = NULL;
  118589. }
  118590. if (PY_MAJOR_VERSION >= 3) {
  118591. __Pyx_XGIVEREF(__pyx_t_17);
  118592. __Pyx_XGIVEREF(__pyx_t_18);
  118593. __Pyx_XGIVEREF(__pyx_t_19);
  118594. __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_18, __pyx_t_19);
  118595. }
  118596. __Pyx_XGIVEREF(__pyx_t_14);
  118597. __Pyx_XGIVEREF(__pyx_t_15);
  118598. __Pyx_XGIVEREF(__pyx_t_16);
  118599. __Pyx_ErrRestore(__pyx_t_14, __pyx_t_15, __pyx_t_16);
  118600. __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0;
  118601. __pyx_lineno = __pyx_t_9; __pyx_clineno = __pyx_t_12; __pyx_filename = __pyx_t_13;
  118602. goto __pyx_L5_except_error;
  118603. }
  118604. __pyx_L14_return: {
  118605. __pyx_t_19 = __pyx_r;
  118606. __pyx_r = 0;
  118607. __Pyx_DECREF(__pyx_v_exc);
  118608. __pyx_v_exc = NULL;
  118609. __pyx_r = __pyx_t_19;
  118610. __pyx_t_19 = 0;
  118611. goto __pyx_L6_except_return;
  118612. }
  118613. }
  118614. }
  118615. goto __pyx_L5_except_error;
  118616. __pyx_L5_except_error:;
  118617. /* "uvloop/sslproto.pyx":496
  118618. *
  118619. * sslobj = self._sslobj
  118620. * try: # <<<<<<<<<<<<<<
  118621. * if handshake_exc is None:
  118622. * self._set_state(WRAPPED)
  118623. */
  118624. __Pyx_XGIVEREF(__pyx_t_4);
  118625. __Pyx_XGIVEREF(__pyx_t_5);
  118626. __Pyx_XGIVEREF(__pyx_t_6);
  118627. __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
  118628. goto __pyx_L1_error;
  118629. __pyx_L6_except_return:;
  118630. __Pyx_XGIVEREF(__pyx_t_4);
  118631. __Pyx_XGIVEREF(__pyx_t_5);
  118632. __Pyx_XGIVEREF(__pyx_t_6);
  118633. __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
  118634. goto __pyx_L0;
  118635. __pyx_L8_try_end:;
  118636. }
  118637. /* "uvloop/sslproto.pyx":512
  118638. * return
  118639. *
  118640. * if self._loop.get_debug(): # <<<<<<<<<<<<<<
  118641. * dt = self._loop.time() - self._handshake_start_time
  118642. * aio_logger.debug("%r: SSL handshake took %.1f ms", self, dt * 1e3)
  118643. */
  118644. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_loop, __pyx_n_s_get_debug); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 512, __pyx_L1_error)
  118645. __Pyx_GOTREF(__pyx_t_2);
  118646. __pyx_t_1 = NULL;
  118647. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
  118648. __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
  118649. if (likely(__pyx_t_1)) {
  118650. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  118651. __Pyx_INCREF(__pyx_t_1);
  118652. __Pyx_INCREF(function);
  118653. __Pyx_DECREF_SET(__pyx_t_2, function);
  118654. }
  118655. }
  118656. __pyx_t_3 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  118657. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  118658. if (unlikely(!__pyx_t_3)) __PYX_ERR(22, 512, __pyx_L1_error)
  118659. __Pyx_GOTREF(__pyx_t_3);
  118660. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  118661. __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(22, 512, __pyx_L1_error)
  118662. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  118663. if (__pyx_t_7) {
  118664. /* "uvloop/sslproto.pyx":513
  118665. *
  118666. * if self._loop.get_debug():
  118667. * dt = self._loop.time() - self._handshake_start_time # <<<<<<<<<<<<<<
  118668. * aio_logger.debug("%r: SSL handshake took %.1f ms", self, dt * 1e3)
  118669. *
  118670. */
  118671. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_loop, __pyx_n_s_time); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 513, __pyx_L1_error)
  118672. __Pyx_GOTREF(__pyx_t_2);
  118673. __pyx_t_1 = NULL;
  118674. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
  118675. __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
  118676. if (likely(__pyx_t_1)) {
  118677. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  118678. __Pyx_INCREF(__pyx_t_1);
  118679. __Pyx_INCREF(function);
  118680. __Pyx_DECREF_SET(__pyx_t_2, function);
  118681. }
  118682. }
  118683. __pyx_t_3 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  118684. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  118685. if (unlikely(!__pyx_t_3)) __PYX_ERR(22, 513, __pyx_L1_error)
  118686. __Pyx_GOTREF(__pyx_t_3);
  118687. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  118688. __pyx_t_2 = PyNumber_Subtract(__pyx_t_3, __pyx_v_self->_handshake_start_time); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 513, __pyx_L1_error)
  118689. __Pyx_GOTREF(__pyx_t_2);
  118690. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  118691. __pyx_v_dt = __pyx_t_2;
  118692. __pyx_t_2 = 0;
  118693. /* "uvloop/sslproto.pyx":514
  118694. * if self._loop.get_debug():
  118695. * dt = self._loop.time() - self._handshake_start_time
  118696. * aio_logger.debug("%r: SSL handshake took %.1f ms", self, dt * 1e3) # <<<<<<<<<<<<<<
  118697. *
  118698. * # Add extra info that becomes available after handshake.
  118699. */
  118700. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_6uvloop_4loop_aio_logger, __pyx_n_s_debug); if (unlikely(!__pyx_t_3)) __PYX_ERR(22, 514, __pyx_L1_error)
  118701. __Pyx_GOTREF(__pyx_t_3);
  118702. __pyx_t_1 = PyNumber_Multiply(__pyx_v_dt, __pyx_float_1e3); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 514, __pyx_L1_error)
  118703. __Pyx_GOTREF(__pyx_t_1);
  118704. __pyx_t_10 = NULL;
  118705. __pyx_t_12 = 0;
  118706. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
  118707. __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
  118708. if (likely(__pyx_t_10)) {
  118709. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  118710. __Pyx_INCREF(__pyx_t_10);
  118711. __Pyx_INCREF(function);
  118712. __Pyx_DECREF_SET(__pyx_t_3, function);
  118713. __pyx_t_12 = 1;
  118714. }
  118715. }
  118716. #if CYTHON_FAST_PYCALL
  118717. if (PyFunction_Check(__pyx_t_3)) {
  118718. PyObject *__pyx_temp[4] = {__pyx_t_10, __pyx_kp_u_r_SSL_handshake_took_1f_ms, ((PyObject *)__pyx_v_self), __pyx_t_1};
  118719. __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 514, __pyx_L1_error)
  118720. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  118721. __Pyx_GOTREF(__pyx_t_2);
  118722. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  118723. } else
  118724. #endif
  118725. #if CYTHON_FAST_PYCCALL
  118726. if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
  118727. PyObject *__pyx_temp[4] = {__pyx_t_10, __pyx_kp_u_r_SSL_handshake_took_1f_ms, ((PyObject *)__pyx_v_self), __pyx_t_1};
  118728. __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 514, __pyx_L1_error)
  118729. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  118730. __Pyx_GOTREF(__pyx_t_2);
  118731. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  118732. } else
  118733. #endif
  118734. {
  118735. __pyx_t_20 = PyTuple_New(3+__pyx_t_12); if (unlikely(!__pyx_t_20)) __PYX_ERR(22, 514, __pyx_L1_error)
  118736. __Pyx_GOTREF(__pyx_t_20);
  118737. if (__pyx_t_10) {
  118738. __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_20, 0, __pyx_t_10); __pyx_t_10 = NULL;
  118739. }
  118740. __Pyx_INCREF(__pyx_kp_u_r_SSL_handshake_took_1f_ms);
  118741. __Pyx_GIVEREF(__pyx_kp_u_r_SSL_handshake_took_1f_ms);
  118742. PyTuple_SET_ITEM(__pyx_t_20, 0+__pyx_t_12, __pyx_kp_u_r_SSL_handshake_took_1f_ms);
  118743. __Pyx_INCREF(((PyObject *)__pyx_v_self));
  118744. __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  118745. PyTuple_SET_ITEM(__pyx_t_20, 1+__pyx_t_12, ((PyObject *)__pyx_v_self));
  118746. __Pyx_GIVEREF(__pyx_t_1);
  118747. PyTuple_SET_ITEM(__pyx_t_20, 2+__pyx_t_12, __pyx_t_1);
  118748. __pyx_t_1 = 0;
  118749. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_20, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 514, __pyx_L1_error)
  118750. __Pyx_GOTREF(__pyx_t_2);
  118751. __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
  118752. }
  118753. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  118754. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  118755. /* "uvloop/sslproto.pyx":512
  118756. * return
  118757. *
  118758. * if self._loop.get_debug(): # <<<<<<<<<<<<<<
  118759. * dt = self._loop.time() - self._handshake_start_time
  118760. * aio_logger.debug("%r: SSL handshake took %.1f ms", self, dt * 1e3)
  118761. */
  118762. }
  118763. /* "uvloop/sslproto.pyx":517
  118764. *
  118765. * # Add extra info that becomes available after handshake.
  118766. * self._extra.update(peercert=peercert, # <<<<<<<<<<<<<<
  118767. * cipher=sslobj.cipher(),
  118768. * compression=sslobj.compression(),
  118769. */
  118770. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_extra, __pyx_n_s_update); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 517, __pyx_L1_error)
  118771. __Pyx_GOTREF(__pyx_t_2);
  118772. __pyx_t_3 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(22, 517, __pyx_L1_error)
  118773. __Pyx_GOTREF(__pyx_t_3);
  118774. if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_peercert, __pyx_v_peercert) < 0) __PYX_ERR(22, 517, __pyx_L1_error)
  118775. /* "uvloop/sslproto.pyx":518
  118776. * # Add extra info that becomes available after handshake.
  118777. * self._extra.update(peercert=peercert,
  118778. * cipher=sslobj.cipher(), # <<<<<<<<<<<<<<
  118779. * compression=sslobj.compression(),
  118780. * ssl_object=sslobj)
  118781. */
  118782. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sslobj, __pyx_n_s_cipher); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 518, __pyx_L1_error)
  118783. __Pyx_GOTREF(__pyx_t_1);
  118784. __pyx_t_10 = NULL;
  118785. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
  118786. __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_1);
  118787. if (likely(__pyx_t_10)) {
  118788. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
  118789. __Pyx_INCREF(__pyx_t_10);
  118790. __Pyx_INCREF(function);
  118791. __Pyx_DECREF_SET(__pyx_t_1, function);
  118792. }
  118793. }
  118794. __pyx_t_20 = (__pyx_t_10) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_10) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
  118795. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  118796. if (unlikely(!__pyx_t_20)) __PYX_ERR(22, 518, __pyx_L1_error)
  118797. __Pyx_GOTREF(__pyx_t_20);
  118798. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  118799. if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_cipher, __pyx_t_20) < 0) __PYX_ERR(22, 517, __pyx_L1_error)
  118800. __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
  118801. /* "uvloop/sslproto.pyx":519
  118802. * self._extra.update(peercert=peercert,
  118803. * cipher=sslobj.cipher(),
  118804. * compression=sslobj.compression(), # <<<<<<<<<<<<<<
  118805. * ssl_object=sslobj)
  118806. * if self._call_connection_made:
  118807. */
  118808. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sslobj, __pyx_n_s_compression); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 519, __pyx_L1_error)
  118809. __Pyx_GOTREF(__pyx_t_1);
  118810. __pyx_t_10 = NULL;
  118811. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
  118812. __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_1);
  118813. if (likely(__pyx_t_10)) {
  118814. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
  118815. __Pyx_INCREF(__pyx_t_10);
  118816. __Pyx_INCREF(function);
  118817. __Pyx_DECREF_SET(__pyx_t_1, function);
  118818. }
  118819. }
  118820. __pyx_t_20 = (__pyx_t_10) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_10) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
  118821. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  118822. if (unlikely(!__pyx_t_20)) __PYX_ERR(22, 519, __pyx_L1_error)
  118823. __Pyx_GOTREF(__pyx_t_20);
  118824. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  118825. if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_compression, __pyx_t_20) < 0) __PYX_ERR(22, 517, __pyx_L1_error)
  118826. __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
  118827. /* "uvloop/sslproto.pyx":520
  118828. * cipher=sslobj.cipher(),
  118829. * compression=sslobj.compression(),
  118830. * ssl_object=sslobj) # <<<<<<<<<<<<<<
  118831. * if self._call_connection_made:
  118832. * self._app_protocol.connection_made(self._get_app_transport())
  118833. */
  118834. if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_ssl_object, __pyx_v_sslobj) < 0) __PYX_ERR(22, 517, __pyx_L1_error)
  118835. /* "uvloop/sslproto.pyx":517
  118836. *
  118837. * # Add extra info that becomes available after handshake.
  118838. * self._extra.update(peercert=peercert, # <<<<<<<<<<<<<<
  118839. * cipher=sslobj.cipher(),
  118840. * compression=sslobj.compression(),
  118841. */
  118842. __pyx_t_20 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_20)) __PYX_ERR(22, 517, __pyx_L1_error)
  118843. __Pyx_GOTREF(__pyx_t_20);
  118844. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  118845. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  118846. __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
  118847. /* "uvloop/sslproto.pyx":521
  118848. * compression=sslobj.compression(),
  118849. * ssl_object=sslobj)
  118850. * if self._call_connection_made: # <<<<<<<<<<<<<<
  118851. * self._app_protocol.connection_made(self._get_app_transport())
  118852. * self._wakeup_waiter()
  118853. */
  118854. __pyx_t_7 = (__pyx_v_self->_call_connection_made != 0);
  118855. if (__pyx_t_7) {
  118856. /* "uvloop/sslproto.pyx":522
  118857. * ssl_object=sslobj)
  118858. * if self._call_connection_made:
  118859. * self._app_protocol.connection_made(self._get_app_transport()) # <<<<<<<<<<<<<<
  118860. * self._wakeup_waiter()
  118861. * self._do_read()
  118862. */
  118863. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_app_protocol, __pyx_n_s_connection_made); if (unlikely(!__pyx_t_3)) __PYX_ERR(22, 522, __pyx_L1_error)
  118864. __Pyx_GOTREF(__pyx_t_3);
  118865. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_app_transport); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 522, __pyx_L1_error)
  118866. __Pyx_GOTREF(__pyx_t_1);
  118867. __pyx_t_10 = NULL;
  118868. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
  118869. __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_1);
  118870. if (likely(__pyx_t_10)) {
  118871. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
  118872. __Pyx_INCREF(__pyx_t_10);
  118873. __Pyx_INCREF(function);
  118874. __Pyx_DECREF_SET(__pyx_t_1, function);
  118875. }
  118876. }
  118877. __pyx_t_2 = (__pyx_t_10) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_10) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
  118878. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  118879. if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 522, __pyx_L1_error)
  118880. __Pyx_GOTREF(__pyx_t_2);
  118881. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  118882. __pyx_t_1 = NULL;
  118883. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
  118884. __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
  118885. if (likely(__pyx_t_1)) {
  118886. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  118887. __Pyx_INCREF(__pyx_t_1);
  118888. __Pyx_INCREF(function);
  118889. __Pyx_DECREF_SET(__pyx_t_3, function);
  118890. }
  118891. }
  118892. __pyx_t_20 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_1, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2);
  118893. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  118894. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  118895. if (unlikely(!__pyx_t_20)) __PYX_ERR(22, 522, __pyx_L1_error)
  118896. __Pyx_GOTREF(__pyx_t_20);
  118897. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  118898. __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
  118899. /* "uvloop/sslproto.pyx":521
  118900. * compression=sslobj.compression(),
  118901. * ssl_object=sslobj)
  118902. * if self._call_connection_made: # <<<<<<<<<<<<<<
  118903. * self._app_protocol.connection_made(self._get_app_transport())
  118904. * self._wakeup_waiter()
  118905. */
  118906. }
  118907. /* "uvloop/sslproto.pyx":523
  118908. * if self._call_connection_made:
  118909. * self._app_protocol.connection_made(self._get_app_transport())
  118910. * self._wakeup_waiter() # <<<<<<<<<<<<<<
  118911. * self._do_read()
  118912. *
  118913. */
  118914. __pyx_t_20 = ((struct __pyx_vtabstruct_6uvloop_4loop_SSLProtocol *)__pyx_v_self->__pyx_vtab)->_wakeup_waiter(__pyx_v_self, NULL); if (unlikely(!__pyx_t_20)) __PYX_ERR(22, 523, __pyx_L1_error)
  118915. __Pyx_GOTREF(__pyx_t_20);
  118916. __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
  118917. /* "uvloop/sslproto.pyx":524
  118918. * self._app_protocol.connection_made(self._get_app_transport())
  118919. * self._wakeup_waiter()
  118920. * self._do_read() # <<<<<<<<<<<<<<
  118921. *
  118922. * # Shutdown flow
  118923. */
  118924. __pyx_t_20 = ((struct __pyx_vtabstruct_6uvloop_4loop_SSLProtocol *)__pyx_v_self->__pyx_vtab)->_do_read(__pyx_v_self); if (unlikely(!__pyx_t_20)) __PYX_ERR(22, 524, __pyx_L1_error)
  118925. __Pyx_GOTREF(__pyx_t_20);
  118926. __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
  118927. /* "uvloop/sslproto.pyx":492
  118928. * self._on_handshake_complete(None)
  118929. *
  118930. * cdef _on_handshake_complete(self, handshake_exc): # <<<<<<<<<<<<<<
  118931. * self._handshake_timeout_handle.cancel()
  118932. *
  118933. */
  118934. /* function exit code */
  118935. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  118936. goto __pyx_L0;
  118937. __pyx_L1_error:;
  118938. __Pyx_XDECREF(__pyx_t_1);
  118939. __Pyx_XDECREF(__pyx_t_2);
  118940. __Pyx_XDECREF(__pyx_t_3);
  118941. __Pyx_XDECREF(__pyx_t_10);
  118942. __Pyx_XDECREF(__pyx_t_20);
  118943. __Pyx_AddTraceback("uvloop.loop.SSLProtocol._on_handshake_complete", __pyx_clineno, __pyx_lineno, __pyx_filename);
  118944. __pyx_r = 0;
  118945. __pyx_L0:;
  118946. __Pyx_XDECREF(__pyx_v_sslobj);
  118947. __Pyx_XDECREF(__pyx_v_peercert);
  118948. __Pyx_XDECREF(__pyx_v_exc);
  118949. __Pyx_XDECREF(__pyx_v_msg);
  118950. __Pyx_XDECREF(__pyx_v_dt);
  118951. __Pyx_XGIVEREF(__pyx_r);
  118952. __Pyx_RefNannyFinishContext();
  118953. return __pyx_r;
  118954. }
  118955. /* "uvloop/sslproto.pyx":539
  118956. * self._shutdown_timeout_handle = \
  118957. * self._loop.call_later(self._ssl_shutdown_timeout,
  118958. * lambda: self._check_shutdown_timeout()) # <<<<<<<<<<<<<<
  118959. * self._do_flush()
  118960. *
  118961. */
  118962. /* Python wrapper */
  118963. static PyObject *__pyx_pw_6uvloop_4loop_11SSLProtocol_15_start_shutdown_lambda7(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  118964. static PyMethodDef __pyx_mdef_6uvloop_4loop_11SSLProtocol_15_start_shutdown_lambda7 = {"lambda7", (PyCFunction)__pyx_pw_6uvloop_4loop_11SSLProtocol_15_start_shutdown_lambda7, METH_NOARGS, 0};
  118965. static PyObject *__pyx_pw_6uvloop_4loop_11SSLProtocol_15_start_shutdown_lambda7(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  118966. PyObject *__pyx_r = 0;
  118967. __Pyx_RefNannyDeclarations
  118968. __Pyx_RefNannySetupContext("lambda7 (wrapper)", 0);
  118969. __pyx_r = __pyx_lambda_funcdef_lambda7(__pyx_self);
  118970. /* function exit code */
  118971. __Pyx_RefNannyFinishContext();
  118972. return __pyx_r;
  118973. }
  118974. static PyObject *__pyx_lambda_funcdef_lambda7(PyObject *__pyx_self) {
  118975. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_29__start_shutdown *__pyx_cur_scope;
  118976. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_29__start_shutdown *__pyx_outer_scope;
  118977. PyObject *__pyx_r = NULL;
  118978. __Pyx_RefNannyDeclarations
  118979. PyObject *__pyx_t_1 = NULL;
  118980. __Pyx_RefNannySetupContext("lambda7", 0);
  118981. __pyx_outer_scope = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_29__start_shutdown *) __Pyx_CyFunction_GetClosure(__pyx_self);
  118982. __pyx_cur_scope = __pyx_outer_scope;
  118983. __Pyx_XDECREF(__pyx_r);
  118984. if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(22, 539, __pyx_L1_error) }
  118985. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_SSLProtocol *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->_check_shutdown_timeout(__pyx_cur_scope->__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 539, __pyx_L1_error)
  118986. __Pyx_GOTREF(__pyx_t_1);
  118987. __pyx_r = __pyx_t_1;
  118988. __pyx_t_1 = 0;
  118989. goto __pyx_L0;
  118990. /* function exit code */
  118991. __pyx_L1_error:;
  118992. __Pyx_XDECREF(__pyx_t_1);
  118993. __Pyx_AddTraceback("uvloop.loop.SSLProtocol._start_shutdown.lambda7", __pyx_clineno, __pyx_lineno, __pyx_filename);
  118994. __pyx_r = NULL;
  118995. __pyx_L0:;
  118996. __Pyx_XGIVEREF(__pyx_r);
  118997. __Pyx_RefNannyFinishContext();
  118998. return __pyx_r;
  118999. }
  119000. /* "uvloop/sslproto.pyx":528
  119001. * # Shutdown flow
  119002. *
  119003. * cdef _start_shutdown(self): # <<<<<<<<<<<<<<
  119004. * if self._state in (FLUSHING, SHUTDOWN, UNWRAPPED):
  119005. * return
  119006. */
  119007. static PyObject *__pyx_f_6uvloop_4loop_11SSLProtocol__start_shutdown(struct __pyx_obj_6uvloop_4loop_SSLProtocol *__pyx_v_self) {
  119008. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_29__start_shutdown *__pyx_cur_scope;
  119009. PyObject *__pyx_r = NULL;
  119010. __Pyx_RefNannyDeclarations
  119011. int __pyx_t_1;
  119012. int __pyx_t_2;
  119013. PyObject *__pyx_t_3 = NULL;
  119014. PyObject *__pyx_t_4 = NULL;
  119015. PyObject *__pyx_t_5 = NULL;
  119016. PyObject *__pyx_t_6 = NULL;
  119017. int __pyx_t_7;
  119018. PyObject *__pyx_t_8 = NULL;
  119019. __Pyx_RefNannySetupContext("_start_shutdown", 0);
  119020. __pyx_cur_scope = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_29__start_shutdown *)__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_29__start_shutdown(__pyx_ptype_6uvloop_4loop___pyx_scope_struct_29__start_shutdown, __pyx_empty_tuple, NULL);
  119021. if (unlikely(!__pyx_cur_scope)) {
  119022. __pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_29__start_shutdown *)Py_None);
  119023. __Pyx_INCREF(Py_None);
  119024. __PYX_ERR(22, 528, __pyx_L1_error)
  119025. } else {
  119026. __Pyx_GOTREF(__pyx_cur_scope);
  119027. }
  119028. __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  119029. __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  119030. __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  119031. /* "uvloop/sslproto.pyx":529
  119032. *
  119033. * cdef _start_shutdown(self):
  119034. * if self._state in (FLUSHING, SHUTDOWN, UNWRAPPED): # <<<<<<<<<<<<<<
  119035. * return
  119036. * if self._app_transport is not None:
  119037. */
  119038. switch (__pyx_cur_scope->__pyx_v_self->_state) {
  119039. case __pyx_e_6uvloop_4loop_FLUSHING:
  119040. case __pyx_e_6uvloop_4loop_SHUTDOWN:
  119041. case __pyx_e_6uvloop_4loop_UNWRAPPED:
  119042. /* "uvloop/sslproto.pyx":530
  119043. * cdef _start_shutdown(self):
  119044. * if self._state in (FLUSHING, SHUTDOWN, UNWRAPPED):
  119045. * return # <<<<<<<<<<<<<<
  119046. * if self._app_transport is not None:
  119047. * self._app_transport._closed = True
  119048. */
  119049. __Pyx_XDECREF(__pyx_r);
  119050. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  119051. goto __pyx_L0;
  119052. /* "uvloop/sslproto.pyx":529
  119053. *
  119054. * cdef _start_shutdown(self):
  119055. * if self._state in (FLUSHING, SHUTDOWN, UNWRAPPED): # <<<<<<<<<<<<<<
  119056. * return
  119057. * if self._app_transport is not None:
  119058. */
  119059. break;
  119060. default: break;
  119061. }
  119062. /* "uvloop/sslproto.pyx":531
  119063. * if self._state in (FLUSHING, SHUTDOWN, UNWRAPPED):
  119064. * return
  119065. * if self._app_transport is not None: # <<<<<<<<<<<<<<
  119066. * self._app_transport._closed = True
  119067. * if self._state == DO_HANDSHAKE:
  119068. */
  119069. __pyx_t_1 = (((PyObject *)__pyx_cur_scope->__pyx_v_self->_app_transport) != Py_None);
  119070. __pyx_t_2 = (__pyx_t_1 != 0);
  119071. if (__pyx_t_2) {
  119072. /* "uvloop/sslproto.pyx":532
  119073. * return
  119074. * if self._app_transport is not None:
  119075. * self._app_transport._closed = True # <<<<<<<<<<<<<<
  119076. * if self._state == DO_HANDSHAKE:
  119077. * self._abort(None)
  119078. */
  119079. __pyx_cur_scope->__pyx_v_self->_app_transport->_closed = 1;
  119080. /* "uvloop/sslproto.pyx":531
  119081. * if self._state in (FLUSHING, SHUTDOWN, UNWRAPPED):
  119082. * return
  119083. * if self._app_transport is not None: # <<<<<<<<<<<<<<
  119084. * self._app_transport._closed = True
  119085. * if self._state == DO_HANDSHAKE:
  119086. */
  119087. }
  119088. /* "uvloop/sslproto.pyx":533
  119089. * if self._app_transport is not None:
  119090. * self._app_transport._closed = True
  119091. * if self._state == DO_HANDSHAKE: # <<<<<<<<<<<<<<
  119092. * self._abort(None)
  119093. * else:
  119094. */
  119095. __pyx_t_2 = ((__pyx_cur_scope->__pyx_v_self->_state == __pyx_e_6uvloop_4loop_DO_HANDSHAKE) != 0);
  119096. if (__pyx_t_2) {
  119097. /* "uvloop/sslproto.pyx":534
  119098. * self._app_transport._closed = True
  119099. * if self._state == DO_HANDSHAKE:
  119100. * self._abort(None) # <<<<<<<<<<<<<<
  119101. * else:
  119102. * self._set_state(FLUSHING)
  119103. */
  119104. __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_SSLProtocol *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->_abort(__pyx_cur_scope->__pyx_v_self, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(22, 534, __pyx_L1_error)
  119105. __Pyx_GOTREF(__pyx_t_3);
  119106. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  119107. /* "uvloop/sslproto.pyx":533
  119108. * if self._app_transport is not None:
  119109. * self._app_transport._closed = True
  119110. * if self._state == DO_HANDSHAKE: # <<<<<<<<<<<<<<
  119111. * self._abort(None)
  119112. * else:
  119113. */
  119114. goto __pyx_L4;
  119115. }
  119116. /* "uvloop/sslproto.pyx":536
  119117. * self._abort(None)
  119118. * else:
  119119. * self._set_state(FLUSHING) # <<<<<<<<<<<<<<
  119120. * self._shutdown_timeout_handle = \
  119121. * self._loop.call_later(self._ssl_shutdown_timeout,
  119122. */
  119123. /*else*/ {
  119124. __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_SSLProtocol *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->_set_state(__pyx_cur_scope->__pyx_v_self, __pyx_e_6uvloop_4loop_FLUSHING); if (unlikely(!__pyx_t_3)) __PYX_ERR(22, 536, __pyx_L1_error)
  119125. __Pyx_GOTREF(__pyx_t_3);
  119126. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  119127. /* "uvloop/sslproto.pyx":538
  119128. * self._set_state(FLUSHING)
  119129. * self._shutdown_timeout_handle = \
  119130. * self._loop.call_later(self._ssl_shutdown_timeout, # <<<<<<<<<<<<<<
  119131. * lambda: self._check_shutdown_timeout())
  119132. * self._do_flush()
  119133. */
  119134. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self->_loop, __pyx_n_s_call_later); if (unlikely(!__pyx_t_4)) __PYX_ERR(22, 538, __pyx_L1_error)
  119135. __Pyx_GOTREF(__pyx_t_4);
  119136. /* "uvloop/sslproto.pyx":539
  119137. * self._shutdown_timeout_handle = \
  119138. * self._loop.call_later(self._ssl_shutdown_timeout,
  119139. * lambda: self._check_shutdown_timeout()) # <<<<<<<<<<<<<<
  119140. * self._do_flush()
  119141. *
  119142. */
  119143. __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6uvloop_4loop_11SSLProtocol_15_start_shutdown_lambda7, 0, __pyx_n_s_SSLProtocol__start_shutdown_loca, ((PyObject*)__pyx_cur_scope), __pyx_n_s_uvloop_loop, __pyx_d, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(22, 539, __pyx_L1_error)
  119144. __Pyx_GOTREF(__pyx_t_5);
  119145. __pyx_t_6 = NULL;
  119146. __pyx_t_7 = 0;
  119147. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
  119148. __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
  119149. if (likely(__pyx_t_6)) {
  119150. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  119151. __Pyx_INCREF(__pyx_t_6);
  119152. __Pyx_INCREF(function);
  119153. __Pyx_DECREF_SET(__pyx_t_4, function);
  119154. __pyx_t_7 = 1;
  119155. }
  119156. }
  119157. #if CYTHON_FAST_PYCALL
  119158. if (PyFunction_Check(__pyx_t_4)) {
  119159. PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_cur_scope->__pyx_v_self->_ssl_shutdown_timeout, __pyx_t_5};
  119160. __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(22, 538, __pyx_L1_error)
  119161. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  119162. __Pyx_GOTREF(__pyx_t_3);
  119163. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  119164. } else
  119165. #endif
  119166. #if CYTHON_FAST_PYCCALL
  119167. if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
  119168. PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_cur_scope->__pyx_v_self->_ssl_shutdown_timeout, __pyx_t_5};
  119169. __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(22, 538, __pyx_L1_error)
  119170. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  119171. __Pyx_GOTREF(__pyx_t_3);
  119172. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  119173. } else
  119174. #endif
  119175. {
  119176. __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(22, 538, __pyx_L1_error)
  119177. __Pyx_GOTREF(__pyx_t_8);
  119178. if (__pyx_t_6) {
  119179. __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
  119180. }
  119181. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_self->_ssl_shutdown_timeout);
  119182. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_self->_ssl_shutdown_timeout);
  119183. PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_cur_scope->__pyx_v_self->_ssl_shutdown_timeout);
  119184. __Pyx_GIVEREF(__pyx_t_5);
  119185. PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_5);
  119186. __pyx_t_5 = 0;
  119187. __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(22, 538, __pyx_L1_error)
  119188. __Pyx_GOTREF(__pyx_t_3);
  119189. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  119190. }
  119191. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  119192. /* "uvloop/sslproto.pyx":537
  119193. * else:
  119194. * self._set_state(FLUSHING)
  119195. * self._shutdown_timeout_handle = \ # <<<<<<<<<<<<<<
  119196. * self._loop.call_later(self._ssl_shutdown_timeout,
  119197. * lambda: self._check_shutdown_timeout())
  119198. */
  119199. __Pyx_GIVEREF(__pyx_t_3);
  119200. __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_self->_shutdown_timeout_handle);
  119201. __Pyx_DECREF(__pyx_cur_scope->__pyx_v_self->_shutdown_timeout_handle);
  119202. __pyx_cur_scope->__pyx_v_self->_shutdown_timeout_handle = __pyx_t_3;
  119203. __pyx_t_3 = 0;
  119204. /* "uvloop/sslproto.pyx":540
  119205. * self._loop.call_later(self._ssl_shutdown_timeout,
  119206. * lambda: self._check_shutdown_timeout())
  119207. * self._do_flush() # <<<<<<<<<<<<<<
  119208. *
  119209. * cdef _check_shutdown_timeout(self):
  119210. */
  119211. __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_SSLProtocol *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->_do_flush(__pyx_cur_scope->__pyx_v_self); if (unlikely(!__pyx_t_3)) __PYX_ERR(22, 540, __pyx_L1_error)
  119212. __Pyx_GOTREF(__pyx_t_3);
  119213. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  119214. }
  119215. __pyx_L4:;
  119216. /* "uvloop/sslproto.pyx":528
  119217. * # Shutdown flow
  119218. *
  119219. * cdef _start_shutdown(self): # <<<<<<<<<<<<<<
  119220. * if self._state in (FLUSHING, SHUTDOWN, UNWRAPPED):
  119221. * return
  119222. */
  119223. /* function exit code */
  119224. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  119225. goto __pyx_L0;
  119226. __pyx_L1_error:;
  119227. __Pyx_XDECREF(__pyx_t_3);
  119228. __Pyx_XDECREF(__pyx_t_4);
  119229. __Pyx_XDECREF(__pyx_t_5);
  119230. __Pyx_XDECREF(__pyx_t_6);
  119231. __Pyx_XDECREF(__pyx_t_8);
  119232. __Pyx_AddTraceback("uvloop.loop.SSLProtocol._start_shutdown", __pyx_clineno, __pyx_lineno, __pyx_filename);
  119233. __pyx_r = 0;
  119234. __pyx_L0:;
  119235. __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  119236. __Pyx_XGIVEREF(__pyx_r);
  119237. __Pyx_RefNannyFinishContext();
  119238. return __pyx_r;
  119239. }
  119240. /* "uvloop/sslproto.pyx":542
  119241. * self._do_flush()
  119242. *
  119243. * cdef _check_shutdown_timeout(self): # <<<<<<<<<<<<<<
  119244. * if self._state in (FLUSHING, SHUTDOWN):
  119245. * self._transport._force_close(
  119246. */
  119247. static PyObject *__pyx_f_6uvloop_4loop_11SSLProtocol__check_shutdown_timeout(struct __pyx_obj_6uvloop_4loop_SSLProtocol *__pyx_v_self) {
  119248. PyObject *__pyx_r = NULL;
  119249. __Pyx_RefNannyDeclarations
  119250. PyObject *__pyx_t_1 = NULL;
  119251. PyObject *__pyx_t_2 = NULL;
  119252. PyObject *__pyx_t_3 = NULL;
  119253. PyObject *__pyx_t_4 = NULL;
  119254. PyObject *__pyx_t_5 = NULL;
  119255. __Pyx_RefNannySetupContext("_check_shutdown_timeout", 0);
  119256. /* "uvloop/sslproto.pyx":543
  119257. *
  119258. * cdef _check_shutdown_timeout(self):
  119259. * if self._state in (FLUSHING, SHUTDOWN): # <<<<<<<<<<<<<<
  119260. * self._transport._force_close(
  119261. * aio_TimeoutError('SSL shutdown timed out'))
  119262. */
  119263. switch (__pyx_v_self->_state) {
  119264. case __pyx_e_6uvloop_4loop_FLUSHING:
  119265. case __pyx_e_6uvloop_4loop_SHUTDOWN:
  119266. /* "uvloop/sslproto.pyx":544
  119267. * cdef _check_shutdown_timeout(self):
  119268. * if self._state in (FLUSHING, SHUTDOWN):
  119269. * self._transport._force_close( # <<<<<<<<<<<<<<
  119270. * aio_TimeoutError('SSL shutdown timed out'))
  119271. *
  119272. */
  119273. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_transport, __pyx_n_s_force_close); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 544, __pyx_L1_error)
  119274. __Pyx_GOTREF(__pyx_t_2);
  119275. /* "uvloop/sslproto.pyx":545
  119276. * if self._state in (FLUSHING, SHUTDOWN):
  119277. * self._transport._force_close(
  119278. * aio_TimeoutError('SSL shutdown timed out')) # <<<<<<<<<<<<<<
  119279. *
  119280. * cdef _do_flush(self):
  119281. */
  119282. __Pyx_INCREF(__pyx_v_6uvloop_4loop_aio_TimeoutError);
  119283. __pyx_t_4 = __pyx_v_6uvloop_4loop_aio_TimeoutError; __pyx_t_5 = NULL;
  119284. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
  119285. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
  119286. if (likely(__pyx_t_5)) {
  119287. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  119288. __Pyx_INCREF(__pyx_t_5);
  119289. __Pyx_INCREF(function);
  119290. __Pyx_DECREF_SET(__pyx_t_4, function);
  119291. }
  119292. }
  119293. __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_kp_u_SSL_shutdown_timed_out) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_u_SSL_shutdown_timed_out);
  119294. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  119295. if (unlikely(!__pyx_t_3)) __PYX_ERR(22, 545, __pyx_L1_error)
  119296. __Pyx_GOTREF(__pyx_t_3);
  119297. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  119298. __pyx_t_4 = NULL;
  119299. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
  119300. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
  119301. if (likely(__pyx_t_4)) {
  119302. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  119303. __Pyx_INCREF(__pyx_t_4);
  119304. __Pyx_INCREF(function);
  119305. __Pyx_DECREF_SET(__pyx_t_2, function);
  119306. }
  119307. }
  119308. __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
  119309. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  119310. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  119311. if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 544, __pyx_L1_error)
  119312. __Pyx_GOTREF(__pyx_t_1);
  119313. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  119314. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  119315. /* "uvloop/sslproto.pyx":543
  119316. *
  119317. * cdef _check_shutdown_timeout(self):
  119318. * if self._state in (FLUSHING, SHUTDOWN): # <<<<<<<<<<<<<<
  119319. * self._transport._force_close(
  119320. * aio_TimeoutError('SSL shutdown timed out'))
  119321. */
  119322. break;
  119323. default: break;
  119324. }
  119325. /* "uvloop/sslproto.pyx":542
  119326. * self._do_flush()
  119327. *
  119328. * cdef _check_shutdown_timeout(self): # <<<<<<<<<<<<<<
  119329. * if self._state in (FLUSHING, SHUTDOWN):
  119330. * self._transport._force_close(
  119331. */
  119332. /* function exit code */
  119333. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  119334. goto __pyx_L0;
  119335. __pyx_L1_error:;
  119336. __Pyx_XDECREF(__pyx_t_1);
  119337. __Pyx_XDECREF(__pyx_t_2);
  119338. __Pyx_XDECREF(__pyx_t_3);
  119339. __Pyx_XDECREF(__pyx_t_4);
  119340. __Pyx_XDECREF(__pyx_t_5);
  119341. __Pyx_AddTraceback("uvloop.loop.SSLProtocol._check_shutdown_timeout", __pyx_clineno, __pyx_lineno, __pyx_filename);
  119342. __pyx_r = 0;
  119343. __pyx_L0:;
  119344. __Pyx_XGIVEREF(__pyx_r);
  119345. __Pyx_RefNannyFinishContext();
  119346. return __pyx_r;
  119347. }
  119348. /* "uvloop/sslproto.pyx":547
  119349. * aio_TimeoutError('SSL shutdown timed out'))
  119350. *
  119351. * cdef _do_flush(self): # <<<<<<<<<<<<<<
  119352. * if self._write_backlog:
  119353. * try:
  119354. */
  119355. static PyObject *__pyx_f_6uvloop_4loop_11SSLProtocol__do_flush(struct __pyx_obj_6uvloop_4loop_SSLProtocol *__pyx_v_self) {
  119356. Py_ssize_t __pyx_v_chunk_size;
  119357. PyObject *__pyx_v_exc = NULL;
  119358. PyObject *__pyx_r = NULL;
  119359. __Pyx_RefNannyDeclarations
  119360. int __pyx_t_1;
  119361. PyObject *__pyx_t_2 = NULL;
  119362. PyObject *__pyx_t_3 = NULL;
  119363. PyObject *__pyx_t_4 = NULL;
  119364. PyObject *__pyx_t_5 = NULL;
  119365. PyObject *__pyx_t_6 = NULL;
  119366. PyObject *__pyx_t_7 = NULL;
  119367. Py_ssize_t __pyx_t_8;
  119368. int __pyx_t_9;
  119369. PyObject *__pyx_t_10 = NULL;
  119370. int __pyx_t_11;
  119371. char const *__pyx_t_12;
  119372. PyObject *__pyx_t_13 = NULL;
  119373. PyObject *__pyx_t_14 = NULL;
  119374. PyObject *__pyx_t_15 = NULL;
  119375. PyObject *__pyx_t_16 = NULL;
  119376. PyObject *__pyx_t_17 = NULL;
  119377. PyObject *__pyx_t_18 = NULL;
  119378. char const *__pyx_t_19;
  119379. int __pyx_t_20;
  119380. __Pyx_RefNannySetupContext("_do_flush", 0);
  119381. /* "uvloop/sslproto.pyx":548
  119382. *
  119383. * cdef _do_flush(self):
  119384. * if self._write_backlog: # <<<<<<<<<<<<<<
  119385. * try:
  119386. * while True:
  119387. */
  119388. __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->_write_backlog); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(22, 548, __pyx_L1_error)
  119389. if (__pyx_t_1) {
  119390. /* "uvloop/sslproto.pyx":549
  119391. * cdef _do_flush(self):
  119392. * if self._write_backlog:
  119393. * try: # <<<<<<<<<<<<<<
  119394. * while True:
  119395. * # data is discarded when FLUSHING
  119396. */
  119397. {
  119398. __Pyx_PyThreadState_declare
  119399. __Pyx_PyThreadState_assign
  119400. __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
  119401. __Pyx_XGOTREF(__pyx_t_2);
  119402. __Pyx_XGOTREF(__pyx_t_3);
  119403. __Pyx_XGOTREF(__pyx_t_4);
  119404. /*try:*/ {
  119405. /* "uvloop/sslproto.pyx":550
  119406. * if self._write_backlog:
  119407. * try:
  119408. * while True: # <<<<<<<<<<<<<<
  119409. * # data is discarded when FLUSHING
  119410. * chunk_size = len(self._sslobj_read(SSL_READ_MAX_SIZE))
  119411. */
  119412. while (1) {
  119413. /* "uvloop/sslproto.pyx":552
  119414. * while True:
  119415. * # data is discarded when FLUSHING
  119416. * chunk_size = len(self._sslobj_read(SSL_READ_MAX_SIZE)) # <<<<<<<<<<<<<<
  119417. * if not chunk_size:
  119418. * # close_notify
  119419. */
  119420. __Pyx_INCREF(__pyx_v_self->_sslobj_read);
  119421. __pyx_t_6 = __pyx_v_self->_sslobj_read; __pyx_t_7 = NULL;
  119422. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
  119423. __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
  119424. if (likely(__pyx_t_7)) {
  119425. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
  119426. __Pyx_INCREF(__pyx_t_7);
  119427. __Pyx_INCREF(function);
  119428. __Pyx_DECREF_SET(__pyx_t_6, function);
  119429. }
  119430. }
  119431. __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_int_262144) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_int_262144);
  119432. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  119433. if (unlikely(!__pyx_t_5)) __PYX_ERR(22, 552, __pyx_L4_error)
  119434. __Pyx_GOTREF(__pyx_t_5);
  119435. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  119436. __pyx_t_8 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(22, 552, __pyx_L4_error)
  119437. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  119438. __pyx_v_chunk_size = __pyx_t_8;
  119439. /* "uvloop/sslproto.pyx":553
  119440. * # data is discarded when FLUSHING
  119441. * chunk_size = len(self._sslobj_read(SSL_READ_MAX_SIZE))
  119442. * if not chunk_size: # <<<<<<<<<<<<<<
  119443. * # close_notify
  119444. * break
  119445. */
  119446. __pyx_t_1 = ((!(__pyx_v_chunk_size != 0)) != 0);
  119447. if (__pyx_t_1) {
  119448. /* "uvloop/sslproto.pyx":555
  119449. * if not chunk_size:
  119450. * # close_notify
  119451. * break # <<<<<<<<<<<<<<
  119452. * except ssl_SSLAgainErrors as exc:
  119453. * pass
  119454. */
  119455. goto __pyx_L11_break;
  119456. /* "uvloop/sslproto.pyx":553
  119457. * # data is discarded when FLUSHING
  119458. * chunk_size = len(self._sslobj_read(SSL_READ_MAX_SIZE))
  119459. * if not chunk_size: # <<<<<<<<<<<<<<
  119460. * # close_notify
  119461. * break
  119462. */
  119463. }
  119464. }
  119465. __pyx_L11_break:;
  119466. /* "uvloop/sslproto.pyx":549
  119467. * cdef _do_flush(self):
  119468. * if self._write_backlog:
  119469. * try: # <<<<<<<<<<<<<<
  119470. * while True:
  119471. * # data is discarded when FLUSHING
  119472. */
  119473. }
  119474. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  119475. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  119476. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  119477. goto __pyx_L9_try_end;
  119478. __pyx_L4_error:;
  119479. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  119480. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  119481. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  119482. /* "uvloop/sslproto.pyx":556
  119483. * # close_notify
  119484. * break
  119485. * except ssl_SSLAgainErrors as exc: # <<<<<<<<<<<<<<
  119486. * pass
  119487. * except ssl_SSLError as exc:
  119488. */
  119489. __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_v_6uvloop_4loop_ssl_SSLAgainErrors);
  119490. if (__pyx_t_9) {
  119491. __Pyx_AddTraceback("uvloop.loop.SSLProtocol._do_flush", __pyx_clineno, __pyx_lineno, __pyx_filename);
  119492. if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(22, 556, __pyx_L6_except_error)
  119493. __Pyx_GOTREF(__pyx_t_5);
  119494. __Pyx_GOTREF(__pyx_t_6);
  119495. __Pyx_GOTREF(__pyx_t_7);
  119496. __Pyx_INCREF(__pyx_t_6);
  119497. __pyx_v_exc = __pyx_t_6;
  119498. /*try:*/ {
  119499. }
  119500. /*finally:*/ {
  119501. /*normal exit:*/{
  119502. __Pyx_DECREF(__pyx_v_exc);
  119503. __pyx_v_exc = NULL;
  119504. goto __pyx_L19;
  119505. }
  119506. __pyx_L19:;
  119507. }
  119508. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  119509. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  119510. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  119511. goto __pyx_L5_exception_handled;
  119512. }
  119513. /* "uvloop/sslproto.pyx":558
  119514. * except ssl_SSLAgainErrors as exc:
  119515. * pass
  119516. * except ssl_SSLError as exc: # <<<<<<<<<<<<<<
  119517. * self._on_shutdown_complete(exc)
  119518. * return
  119519. */
  119520. __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_v_6uvloop_4loop_ssl_SSLError);
  119521. if (__pyx_t_9) {
  119522. __Pyx_AddTraceback("uvloop.loop.SSLProtocol._do_flush", __pyx_clineno, __pyx_lineno, __pyx_filename);
  119523. if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_6, &__pyx_t_5) < 0) __PYX_ERR(22, 558, __pyx_L6_except_error)
  119524. __Pyx_GOTREF(__pyx_t_7);
  119525. __Pyx_GOTREF(__pyx_t_6);
  119526. __Pyx_GOTREF(__pyx_t_5);
  119527. __Pyx_INCREF(__pyx_t_6);
  119528. __pyx_v_exc = __pyx_t_6;
  119529. /*try:*/ {
  119530. /* "uvloop/sslproto.pyx":559
  119531. * pass
  119532. * except ssl_SSLError as exc:
  119533. * self._on_shutdown_complete(exc) # <<<<<<<<<<<<<<
  119534. * return
  119535. *
  119536. */
  119537. __pyx_t_10 = ((struct __pyx_vtabstruct_6uvloop_4loop_SSLProtocol *)__pyx_v_self->__pyx_vtab)->_on_shutdown_complete(__pyx_v_self, __pyx_v_exc); if (unlikely(!__pyx_t_10)) __PYX_ERR(22, 559, __pyx_L25_error)
  119538. __Pyx_GOTREF(__pyx_t_10);
  119539. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  119540. /* "uvloop/sslproto.pyx":560
  119541. * except ssl_SSLError as exc:
  119542. * self._on_shutdown_complete(exc)
  119543. * return # <<<<<<<<<<<<<<
  119544. *
  119545. * try:
  119546. */
  119547. __Pyx_XDECREF(__pyx_r);
  119548. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  119549. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  119550. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  119551. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  119552. goto __pyx_L24_return;
  119553. }
  119554. /* "uvloop/sslproto.pyx":558
  119555. * except ssl_SSLAgainErrors as exc:
  119556. * pass
  119557. * except ssl_SSLError as exc: # <<<<<<<<<<<<<<
  119558. * self._on_shutdown_complete(exc)
  119559. * return
  119560. */
  119561. /*finally:*/ {
  119562. __pyx_L25_error:;
  119563. /*exception exit:*/{
  119564. __Pyx_PyThreadState_declare
  119565. __Pyx_PyThreadState_assign
  119566. __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0;
  119567. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  119568. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18);
  119569. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15) < 0)) __Pyx_ErrFetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
  119570. __Pyx_XGOTREF(__pyx_t_13);
  119571. __Pyx_XGOTREF(__pyx_t_14);
  119572. __Pyx_XGOTREF(__pyx_t_15);
  119573. __Pyx_XGOTREF(__pyx_t_16);
  119574. __Pyx_XGOTREF(__pyx_t_17);
  119575. __Pyx_XGOTREF(__pyx_t_18);
  119576. __pyx_t_9 = __pyx_lineno; __pyx_t_11 = __pyx_clineno; __pyx_t_12 = __pyx_filename;
  119577. {
  119578. __Pyx_DECREF(__pyx_v_exc);
  119579. __pyx_v_exc = NULL;
  119580. }
  119581. if (PY_MAJOR_VERSION >= 3) {
  119582. __Pyx_XGIVEREF(__pyx_t_16);
  119583. __Pyx_XGIVEREF(__pyx_t_17);
  119584. __Pyx_XGIVEREF(__pyx_t_18);
  119585. __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18);
  119586. }
  119587. __Pyx_XGIVEREF(__pyx_t_13);
  119588. __Pyx_XGIVEREF(__pyx_t_14);
  119589. __Pyx_XGIVEREF(__pyx_t_15);
  119590. __Pyx_ErrRestore(__pyx_t_13, __pyx_t_14, __pyx_t_15);
  119591. __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0;
  119592. __pyx_lineno = __pyx_t_9; __pyx_clineno = __pyx_t_11; __pyx_filename = __pyx_t_12;
  119593. goto __pyx_L6_except_error;
  119594. }
  119595. __pyx_L24_return: {
  119596. __pyx_t_18 = __pyx_r;
  119597. __pyx_r = 0;
  119598. __Pyx_DECREF(__pyx_v_exc);
  119599. __pyx_v_exc = NULL;
  119600. __pyx_r = __pyx_t_18;
  119601. __pyx_t_18 = 0;
  119602. goto __pyx_L7_except_return;
  119603. }
  119604. }
  119605. }
  119606. goto __pyx_L6_except_error;
  119607. __pyx_L6_except_error:;
  119608. /* "uvloop/sslproto.pyx":549
  119609. * cdef _do_flush(self):
  119610. * if self._write_backlog:
  119611. * try: # <<<<<<<<<<<<<<
  119612. * while True:
  119613. * # data is discarded when FLUSHING
  119614. */
  119615. __Pyx_XGIVEREF(__pyx_t_2);
  119616. __Pyx_XGIVEREF(__pyx_t_3);
  119617. __Pyx_XGIVEREF(__pyx_t_4);
  119618. __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
  119619. goto __pyx_L1_error;
  119620. __pyx_L7_except_return:;
  119621. __Pyx_XGIVEREF(__pyx_t_2);
  119622. __Pyx_XGIVEREF(__pyx_t_3);
  119623. __Pyx_XGIVEREF(__pyx_t_4);
  119624. __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
  119625. goto __pyx_L0;
  119626. __pyx_L5_exception_handled:;
  119627. __Pyx_XGIVEREF(__pyx_t_2);
  119628. __Pyx_XGIVEREF(__pyx_t_3);
  119629. __Pyx_XGIVEREF(__pyx_t_4);
  119630. __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
  119631. __pyx_L9_try_end:;
  119632. }
  119633. /* "uvloop/sslproto.pyx":562
  119634. * return
  119635. *
  119636. * try: # <<<<<<<<<<<<<<
  119637. * self._do_write()
  119638. * except Exception as exc:
  119639. */
  119640. {
  119641. __Pyx_PyThreadState_declare
  119642. __Pyx_PyThreadState_assign
  119643. __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2);
  119644. __Pyx_XGOTREF(__pyx_t_4);
  119645. __Pyx_XGOTREF(__pyx_t_3);
  119646. __Pyx_XGOTREF(__pyx_t_2);
  119647. /*try:*/ {
  119648. /* "uvloop/sslproto.pyx":563
  119649. *
  119650. * try:
  119651. * self._do_write() # <<<<<<<<<<<<<<
  119652. * except Exception as exc:
  119653. * self._on_shutdown_complete(exc)
  119654. */
  119655. __pyx_t_5 = ((struct __pyx_vtabstruct_6uvloop_4loop_SSLProtocol *)__pyx_v_self->__pyx_vtab)->_do_write(__pyx_v_self); if (unlikely(!__pyx_t_5)) __PYX_ERR(22, 563, __pyx_L31_error)
  119656. __Pyx_GOTREF(__pyx_t_5);
  119657. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  119658. /* "uvloop/sslproto.pyx":562
  119659. * return
  119660. *
  119661. * try: # <<<<<<<<<<<<<<
  119662. * self._do_write()
  119663. * except Exception as exc:
  119664. */
  119665. }
  119666. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  119667. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  119668. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  119669. goto __pyx_L36_try_end;
  119670. __pyx_L31_error:;
  119671. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  119672. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  119673. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  119674. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  119675. /* "uvloop/sslproto.pyx":564
  119676. * try:
  119677. * self._do_write()
  119678. * except Exception as exc: # <<<<<<<<<<<<<<
  119679. * self._on_shutdown_complete(exc)
  119680. * return
  119681. */
  119682. __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
  119683. if (__pyx_t_11) {
  119684. __Pyx_AddTraceback("uvloop.loop.SSLProtocol._do_flush", __pyx_clineno, __pyx_lineno, __pyx_filename);
  119685. if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(22, 564, __pyx_L33_except_error)
  119686. __Pyx_GOTREF(__pyx_t_5);
  119687. __Pyx_GOTREF(__pyx_t_6);
  119688. __Pyx_GOTREF(__pyx_t_7);
  119689. __Pyx_INCREF(__pyx_t_6);
  119690. __pyx_v_exc = __pyx_t_6;
  119691. /*try:*/ {
  119692. /* "uvloop/sslproto.pyx":565
  119693. * self._do_write()
  119694. * except Exception as exc:
  119695. * self._on_shutdown_complete(exc) # <<<<<<<<<<<<<<
  119696. * return
  119697. *
  119698. */
  119699. __pyx_t_10 = ((struct __pyx_vtabstruct_6uvloop_4loop_SSLProtocol *)__pyx_v_self->__pyx_vtab)->_on_shutdown_complete(__pyx_v_self, __pyx_v_exc); if (unlikely(!__pyx_t_10)) __PYX_ERR(22, 565, __pyx_L42_error)
  119700. __Pyx_GOTREF(__pyx_t_10);
  119701. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  119702. /* "uvloop/sslproto.pyx":566
  119703. * except Exception as exc:
  119704. * self._on_shutdown_complete(exc)
  119705. * return # <<<<<<<<<<<<<<
  119706. *
  119707. * if not self._write_backlog:
  119708. */
  119709. __Pyx_XDECREF(__pyx_r);
  119710. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  119711. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  119712. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  119713. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  119714. goto __pyx_L41_return;
  119715. }
  119716. /* "uvloop/sslproto.pyx":564
  119717. * try:
  119718. * self._do_write()
  119719. * except Exception as exc: # <<<<<<<<<<<<<<
  119720. * self._on_shutdown_complete(exc)
  119721. * return
  119722. */
  119723. /*finally:*/ {
  119724. __pyx_L42_error:;
  119725. /*exception exit:*/{
  119726. __Pyx_PyThreadState_declare
  119727. __Pyx_PyThreadState_assign
  119728. __pyx_t_18 = 0; __pyx_t_17 = 0; __pyx_t_16 = 0; __pyx_t_15 = 0; __pyx_t_14 = 0; __pyx_t_13 = 0;
  119729. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  119730. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13);
  119731. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_18, &__pyx_t_17, &__pyx_t_16) < 0)) __Pyx_ErrFetch(&__pyx_t_18, &__pyx_t_17, &__pyx_t_16);
  119732. __Pyx_XGOTREF(__pyx_t_18);
  119733. __Pyx_XGOTREF(__pyx_t_17);
  119734. __Pyx_XGOTREF(__pyx_t_16);
  119735. __Pyx_XGOTREF(__pyx_t_15);
  119736. __Pyx_XGOTREF(__pyx_t_14);
  119737. __Pyx_XGOTREF(__pyx_t_13);
  119738. __pyx_t_11 = __pyx_lineno; __pyx_t_9 = __pyx_clineno; __pyx_t_19 = __pyx_filename;
  119739. {
  119740. __Pyx_DECREF(__pyx_v_exc);
  119741. __pyx_v_exc = NULL;
  119742. }
  119743. if (PY_MAJOR_VERSION >= 3) {
  119744. __Pyx_XGIVEREF(__pyx_t_15);
  119745. __Pyx_XGIVEREF(__pyx_t_14);
  119746. __Pyx_XGIVEREF(__pyx_t_13);
  119747. __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_14, __pyx_t_13);
  119748. }
  119749. __Pyx_XGIVEREF(__pyx_t_18);
  119750. __Pyx_XGIVEREF(__pyx_t_17);
  119751. __Pyx_XGIVEREF(__pyx_t_16);
  119752. __Pyx_ErrRestore(__pyx_t_18, __pyx_t_17, __pyx_t_16);
  119753. __pyx_t_18 = 0; __pyx_t_17 = 0; __pyx_t_16 = 0; __pyx_t_15 = 0; __pyx_t_14 = 0; __pyx_t_13 = 0;
  119754. __pyx_lineno = __pyx_t_11; __pyx_clineno = __pyx_t_9; __pyx_filename = __pyx_t_19;
  119755. goto __pyx_L33_except_error;
  119756. }
  119757. __pyx_L41_return: {
  119758. __pyx_t_13 = __pyx_r;
  119759. __pyx_r = 0;
  119760. __Pyx_DECREF(__pyx_v_exc);
  119761. __pyx_v_exc = NULL;
  119762. __pyx_r = __pyx_t_13;
  119763. __pyx_t_13 = 0;
  119764. goto __pyx_L34_except_return;
  119765. }
  119766. }
  119767. }
  119768. goto __pyx_L33_except_error;
  119769. __pyx_L33_except_error:;
  119770. /* "uvloop/sslproto.pyx":562
  119771. * return
  119772. *
  119773. * try: # <<<<<<<<<<<<<<
  119774. * self._do_write()
  119775. * except Exception as exc:
  119776. */
  119777. __Pyx_XGIVEREF(__pyx_t_4);
  119778. __Pyx_XGIVEREF(__pyx_t_3);
  119779. __Pyx_XGIVEREF(__pyx_t_2);
  119780. __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_3, __pyx_t_2);
  119781. goto __pyx_L1_error;
  119782. __pyx_L34_except_return:;
  119783. __Pyx_XGIVEREF(__pyx_t_4);
  119784. __Pyx_XGIVEREF(__pyx_t_3);
  119785. __Pyx_XGIVEREF(__pyx_t_2);
  119786. __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_3, __pyx_t_2);
  119787. goto __pyx_L0;
  119788. __pyx_L36_try_end:;
  119789. }
  119790. /* "uvloop/sslproto.pyx":548
  119791. *
  119792. * cdef _do_flush(self):
  119793. * if self._write_backlog: # <<<<<<<<<<<<<<
  119794. * try:
  119795. * while True:
  119796. */
  119797. }
  119798. /* "uvloop/sslproto.pyx":568
  119799. * return
  119800. *
  119801. * if not self._write_backlog: # <<<<<<<<<<<<<<
  119802. * self._set_state(SHUTDOWN)
  119803. * self._do_shutdown()
  119804. */
  119805. __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->_write_backlog); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(22, 568, __pyx_L1_error)
  119806. __pyx_t_20 = ((!__pyx_t_1) != 0);
  119807. if (__pyx_t_20) {
  119808. /* "uvloop/sslproto.pyx":569
  119809. *
  119810. * if not self._write_backlog:
  119811. * self._set_state(SHUTDOWN) # <<<<<<<<<<<<<<
  119812. * self._do_shutdown()
  119813. *
  119814. */
  119815. __pyx_t_7 = ((struct __pyx_vtabstruct_6uvloop_4loop_SSLProtocol *)__pyx_v_self->__pyx_vtab)->_set_state(__pyx_v_self, __pyx_e_6uvloop_4loop_SHUTDOWN); if (unlikely(!__pyx_t_7)) __PYX_ERR(22, 569, __pyx_L1_error)
  119816. __Pyx_GOTREF(__pyx_t_7);
  119817. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  119818. /* "uvloop/sslproto.pyx":570
  119819. * if not self._write_backlog:
  119820. * self._set_state(SHUTDOWN)
  119821. * self._do_shutdown() # <<<<<<<<<<<<<<
  119822. *
  119823. * cdef _do_shutdown(self):
  119824. */
  119825. __pyx_t_7 = ((struct __pyx_vtabstruct_6uvloop_4loop_SSLProtocol *)__pyx_v_self->__pyx_vtab)->_do_shutdown(__pyx_v_self); if (unlikely(!__pyx_t_7)) __PYX_ERR(22, 570, __pyx_L1_error)
  119826. __Pyx_GOTREF(__pyx_t_7);
  119827. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  119828. /* "uvloop/sslproto.pyx":568
  119829. * return
  119830. *
  119831. * if not self._write_backlog: # <<<<<<<<<<<<<<
  119832. * self._set_state(SHUTDOWN)
  119833. * self._do_shutdown()
  119834. */
  119835. }
  119836. /* "uvloop/sslproto.pyx":547
  119837. * aio_TimeoutError('SSL shutdown timed out'))
  119838. *
  119839. * cdef _do_flush(self): # <<<<<<<<<<<<<<
  119840. * if self._write_backlog:
  119841. * try:
  119842. */
  119843. /* function exit code */
  119844. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  119845. goto __pyx_L0;
  119846. __pyx_L1_error:;
  119847. __Pyx_XDECREF(__pyx_t_5);
  119848. __Pyx_XDECREF(__pyx_t_6);
  119849. __Pyx_XDECREF(__pyx_t_7);
  119850. __Pyx_XDECREF(__pyx_t_10);
  119851. __Pyx_AddTraceback("uvloop.loop.SSLProtocol._do_flush", __pyx_clineno, __pyx_lineno, __pyx_filename);
  119852. __pyx_r = 0;
  119853. __pyx_L0:;
  119854. __Pyx_XDECREF(__pyx_v_exc);
  119855. __Pyx_XGIVEREF(__pyx_r);
  119856. __Pyx_RefNannyFinishContext();
  119857. return __pyx_r;
  119858. }
  119859. /* "uvloop/sslproto.pyx":572
  119860. * self._do_shutdown()
  119861. *
  119862. * cdef _do_shutdown(self): # <<<<<<<<<<<<<<
  119863. * try:
  119864. * self._sslobj.unwrap()
  119865. */
  119866. static PyObject *__pyx_f_6uvloop_4loop_11SSLProtocol__do_shutdown(struct __pyx_obj_6uvloop_4loop_SSLProtocol *__pyx_v_self) {
  119867. PyObject *__pyx_v_exc = NULL;
  119868. PyObject *__pyx_r = NULL;
  119869. __Pyx_RefNannyDeclarations
  119870. PyObject *__pyx_t_1 = NULL;
  119871. PyObject *__pyx_t_2 = NULL;
  119872. PyObject *__pyx_t_3 = NULL;
  119873. PyObject *__pyx_t_4 = NULL;
  119874. PyObject *__pyx_t_5 = NULL;
  119875. PyObject *__pyx_t_6 = NULL;
  119876. int __pyx_t_7;
  119877. PyObject *__pyx_t_8 = NULL;
  119878. int __pyx_t_9;
  119879. char const *__pyx_t_10;
  119880. PyObject *__pyx_t_11 = NULL;
  119881. PyObject *__pyx_t_12 = NULL;
  119882. PyObject *__pyx_t_13 = NULL;
  119883. PyObject *__pyx_t_14 = NULL;
  119884. PyObject *__pyx_t_15 = NULL;
  119885. PyObject *__pyx_t_16 = NULL;
  119886. char const *__pyx_t_17;
  119887. __Pyx_RefNannySetupContext("_do_shutdown", 0);
  119888. /* "uvloop/sslproto.pyx":573
  119889. *
  119890. * cdef _do_shutdown(self):
  119891. * try: # <<<<<<<<<<<<<<
  119892. * self._sslobj.unwrap()
  119893. * except ssl_SSLAgainErrors as exc:
  119894. */
  119895. {
  119896. __Pyx_PyThreadState_declare
  119897. __Pyx_PyThreadState_assign
  119898. __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
  119899. __Pyx_XGOTREF(__pyx_t_1);
  119900. __Pyx_XGOTREF(__pyx_t_2);
  119901. __Pyx_XGOTREF(__pyx_t_3);
  119902. /*try:*/ {
  119903. /* "uvloop/sslproto.pyx":574
  119904. * cdef _do_shutdown(self):
  119905. * try:
  119906. * self._sslobj.unwrap() # <<<<<<<<<<<<<<
  119907. * except ssl_SSLAgainErrors as exc:
  119908. * self._process_outgoing()
  119909. */
  119910. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_sslobj, __pyx_n_s_unwrap); if (unlikely(!__pyx_t_5)) __PYX_ERR(22, 574, __pyx_L3_error)
  119911. __Pyx_GOTREF(__pyx_t_5);
  119912. __pyx_t_6 = NULL;
  119913. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
  119914. __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
  119915. if (likely(__pyx_t_6)) {
  119916. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
  119917. __Pyx_INCREF(__pyx_t_6);
  119918. __Pyx_INCREF(function);
  119919. __Pyx_DECREF_SET(__pyx_t_5, function);
  119920. }
  119921. }
  119922. __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
  119923. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  119924. if (unlikely(!__pyx_t_4)) __PYX_ERR(22, 574, __pyx_L3_error)
  119925. __Pyx_GOTREF(__pyx_t_4);
  119926. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  119927. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  119928. /* "uvloop/sslproto.pyx":573
  119929. *
  119930. * cdef _do_shutdown(self):
  119931. * try: # <<<<<<<<<<<<<<
  119932. * self._sslobj.unwrap()
  119933. * except ssl_SSLAgainErrors as exc:
  119934. */
  119935. }
  119936. /* "uvloop/sslproto.pyx":580
  119937. * self._on_shutdown_complete(exc)
  119938. * else:
  119939. * self._process_outgoing() # <<<<<<<<<<<<<<
  119940. * self._call_eof_received()
  119941. * self._on_shutdown_complete(None)
  119942. */
  119943. /*else:*/ {
  119944. __pyx_t_4 = ((struct __pyx_vtabstruct_6uvloop_4loop_SSLProtocol *)__pyx_v_self->__pyx_vtab)->_process_outgoing(__pyx_v_self); if (unlikely(!__pyx_t_4)) __PYX_ERR(22, 580, __pyx_L5_except_error)
  119945. __Pyx_GOTREF(__pyx_t_4);
  119946. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  119947. /* "uvloop/sslproto.pyx":581
  119948. * else:
  119949. * self._process_outgoing()
  119950. * self._call_eof_received() # <<<<<<<<<<<<<<
  119951. * self._on_shutdown_complete(None)
  119952. *
  119953. */
  119954. __pyx_t_4 = ((struct __pyx_vtabstruct_6uvloop_4loop_SSLProtocol *)__pyx_v_self->__pyx_vtab)->_call_eof_received(__pyx_v_self); if (unlikely(!__pyx_t_4)) __PYX_ERR(22, 581, __pyx_L5_except_error)
  119955. __Pyx_GOTREF(__pyx_t_4);
  119956. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  119957. /* "uvloop/sslproto.pyx":582
  119958. * self._process_outgoing()
  119959. * self._call_eof_received()
  119960. * self._on_shutdown_complete(None) # <<<<<<<<<<<<<<
  119961. *
  119962. * cdef _on_shutdown_complete(self, shutdown_exc):
  119963. */
  119964. __pyx_t_4 = ((struct __pyx_vtabstruct_6uvloop_4loop_SSLProtocol *)__pyx_v_self->__pyx_vtab)->_on_shutdown_complete(__pyx_v_self, Py_None); if (unlikely(!__pyx_t_4)) __PYX_ERR(22, 582, __pyx_L5_except_error)
  119965. __Pyx_GOTREF(__pyx_t_4);
  119966. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  119967. }
  119968. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  119969. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  119970. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  119971. goto __pyx_L8_try_end;
  119972. __pyx_L3_error:;
  119973. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  119974. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  119975. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  119976. /* "uvloop/sslproto.pyx":575
  119977. * try:
  119978. * self._sslobj.unwrap()
  119979. * except ssl_SSLAgainErrors as exc: # <<<<<<<<<<<<<<
  119980. * self._process_outgoing()
  119981. * except ssl_SSLError as exc:
  119982. */
  119983. __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_v_6uvloop_4loop_ssl_SSLAgainErrors);
  119984. if (__pyx_t_7) {
  119985. __Pyx_AddTraceback("uvloop.loop.SSLProtocol._do_shutdown", __pyx_clineno, __pyx_lineno, __pyx_filename);
  119986. if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6) < 0) __PYX_ERR(22, 575, __pyx_L5_except_error)
  119987. __Pyx_GOTREF(__pyx_t_4);
  119988. __Pyx_GOTREF(__pyx_t_5);
  119989. __Pyx_GOTREF(__pyx_t_6);
  119990. __Pyx_INCREF(__pyx_t_5);
  119991. __pyx_v_exc = __pyx_t_5;
  119992. /*try:*/ {
  119993. /* "uvloop/sslproto.pyx":576
  119994. * self._sslobj.unwrap()
  119995. * except ssl_SSLAgainErrors as exc:
  119996. * self._process_outgoing() # <<<<<<<<<<<<<<
  119997. * except ssl_SSLError as exc:
  119998. * self._on_shutdown_complete(exc)
  119999. */
  120000. __pyx_t_8 = ((struct __pyx_vtabstruct_6uvloop_4loop_SSLProtocol *)__pyx_v_self->__pyx_vtab)->_process_outgoing(__pyx_v_self); if (unlikely(!__pyx_t_8)) __PYX_ERR(22, 576, __pyx_L14_error)
  120001. __Pyx_GOTREF(__pyx_t_8);
  120002. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  120003. }
  120004. /* "uvloop/sslproto.pyx":575
  120005. * try:
  120006. * self._sslobj.unwrap()
  120007. * except ssl_SSLAgainErrors as exc: # <<<<<<<<<<<<<<
  120008. * self._process_outgoing()
  120009. * except ssl_SSLError as exc:
  120010. */
  120011. /*finally:*/ {
  120012. /*normal exit:*/{
  120013. __Pyx_DECREF(__pyx_v_exc);
  120014. __pyx_v_exc = NULL;
  120015. goto __pyx_L15;
  120016. }
  120017. __pyx_L14_error:;
  120018. /*exception exit:*/{
  120019. __Pyx_PyThreadState_declare
  120020. __Pyx_PyThreadState_assign
  120021. __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0;
  120022. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  120023. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16);
  120024. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13) < 0)) __Pyx_ErrFetch(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
  120025. __Pyx_XGOTREF(__pyx_t_11);
  120026. __Pyx_XGOTREF(__pyx_t_12);
  120027. __Pyx_XGOTREF(__pyx_t_13);
  120028. __Pyx_XGOTREF(__pyx_t_14);
  120029. __Pyx_XGOTREF(__pyx_t_15);
  120030. __Pyx_XGOTREF(__pyx_t_16);
  120031. __pyx_t_7 = __pyx_lineno; __pyx_t_9 = __pyx_clineno; __pyx_t_10 = __pyx_filename;
  120032. {
  120033. __Pyx_DECREF(__pyx_v_exc);
  120034. __pyx_v_exc = NULL;
  120035. }
  120036. if (PY_MAJOR_VERSION >= 3) {
  120037. __Pyx_XGIVEREF(__pyx_t_14);
  120038. __Pyx_XGIVEREF(__pyx_t_15);
  120039. __Pyx_XGIVEREF(__pyx_t_16);
  120040. __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_15, __pyx_t_16);
  120041. }
  120042. __Pyx_XGIVEREF(__pyx_t_11);
  120043. __Pyx_XGIVEREF(__pyx_t_12);
  120044. __Pyx_XGIVEREF(__pyx_t_13);
  120045. __Pyx_ErrRestore(__pyx_t_11, __pyx_t_12, __pyx_t_13);
  120046. __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0;
  120047. __pyx_lineno = __pyx_t_7; __pyx_clineno = __pyx_t_9; __pyx_filename = __pyx_t_10;
  120048. goto __pyx_L5_except_error;
  120049. }
  120050. __pyx_L15:;
  120051. }
  120052. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  120053. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  120054. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  120055. goto __pyx_L4_exception_handled;
  120056. }
  120057. /* "uvloop/sslproto.pyx":577
  120058. * except ssl_SSLAgainErrors as exc:
  120059. * self._process_outgoing()
  120060. * except ssl_SSLError as exc: # <<<<<<<<<<<<<<
  120061. * self._on_shutdown_complete(exc)
  120062. * else:
  120063. */
  120064. __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_v_6uvloop_4loop_ssl_SSLError);
  120065. if (__pyx_t_9) {
  120066. __Pyx_AddTraceback("uvloop.loop.SSLProtocol._do_shutdown", __pyx_clineno, __pyx_lineno, __pyx_filename);
  120067. if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4) < 0) __PYX_ERR(22, 577, __pyx_L5_except_error)
  120068. __Pyx_GOTREF(__pyx_t_6);
  120069. __Pyx_GOTREF(__pyx_t_5);
  120070. __Pyx_GOTREF(__pyx_t_4);
  120071. __Pyx_INCREF(__pyx_t_5);
  120072. __pyx_v_exc = __pyx_t_5;
  120073. /*try:*/ {
  120074. /* "uvloop/sslproto.pyx":578
  120075. * self._process_outgoing()
  120076. * except ssl_SSLError as exc:
  120077. * self._on_shutdown_complete(exc) # <<<<<<<<<<<<<<
  120078. * else:
  120079. * self._process_outgoing()
  120080. */
  120081. __pyx_t_8 = ((struct __pyx_vtabstruct_6uvloop_4loop_SSLProtocol *)__pyx_v_self->__pyx_vtab)->_on_shutdown_complete(__pyx_v_self, __pyx_v_exc); if (unlikely(!__pyx_t_8)) __PYX_ERR(22, 578, __pyx_L25_error)
  120082. __Pyx_GOTREF(__pyx_t_8);
  120083. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  120084. }
  120085. /* "uvloop/sslproto.pyx":577
  120086. * except ssl_SSLAgainErrors as exc:
  120087. * self._process_outgoing()
  120088. * except ssl_SSLError as exc: # <<<<<<<<<<<<<<
  120089. * self._on_shutdown_complete(exc)
  120090. * else:
  120091. */
  120092. /*finally:*/ {
  120093. /*normal exit:*/{
  120094. __Pyx_DECREF(__pyx_v_exc);
  120095. __pyx_v_exc = NULL;
  120096. goto __pyx_L26;
  120097. }
  120098. __pyx_L25_error:;
  120099. /*exception exit:*/{
  120100. __Pyx_PyThreadState_declare
  120101. __Pyx_PyThreadState_assign
  120102. __pyx_t_16 = 0; __pyx_t_15 = 0; __pyx_t_14 = 0; __pyx_t_13 = 0; __pyx_t_12 = 0; __pyx_t_11 = 0;
  120103. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  120104. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_13, &__pyx_t_12, &__pyx_t_11);
  120105. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_16, &__pyx_t_15, &__pyx_t_14) < 0)) __Pyx_ErrFetch(&__pyx_t_16, &__pyx_t_15, &__pyx_t_14);
  120106. __Pyx_XGOTREF(__pyx_t_16);
  120107. __Pyx_XGOTREF(__pyx_t_15);
  120108. __Pyx_XGOTREF(__pyx_t_14);
  120109. __Pyx_XGOTREF(__pyx_t_13);
  120110. __Pyx_XGOTREF(__pyx_t_12);
  120111. __Pyx_XGOTREF(__pyx_t_11);
  120112. __pyx_t_9 = __pyx_lineno; __pyx_t_7 = __pyx_clineno; __pyx_t_17 = __pyx_filename;
  120113. {
  120114. __Pyx_DECREF(__pyx_v_exc);
  120115. __pyx_v_exc = NULL;
  120116. }
  120117. if (PY_MAJOR_VERSION >= 3) {
  120118. __Pyx_XGIVEREF(__pyx_t_13);
  120119. __Pyx_XGIVEREF(__pyx_t_12);
  120120. __Pyx_XGIVEREF(__pyx_t_11);
  120121. __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_12, __pyx_t_11);
  120122. }
  120123. __Pyx_XGIVEREF(__pyx_t_16);
  120124. __Pyx_XGIVEREF(__pyx_t_15);
  120125. __Pyx_XGIVEREF(__pyx_t_14);
  120126. __Pyx_ErrRestore(__pyx_t_16, __pyx_t_15, __pyx_t_14);
  120127. __pyx_t_16 = 0; __pyx_t_15 = 0; __pyx_t_14 = 0; __pyx_t_13 = 0; __pyx_t_12 = 0; __pyx_t_11 = 0;
  120128. __pyx_lineno = __pyx_t_9; __pyx_clineno = __pyx_t_7; __pyx_filename = __pyx_t_17;
  120129. goto __pyx_L5_except_error;
  120130. }
  120131. __pyx_L26:;
  120132. }
  120133. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  120134. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  120135. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  120136. goto __pyx_L4_exception_handled;
  120137. }
  120138. goto __pyx_L5_except_error;
  120139. __pyx_L5_except_error:;
  120140. /* "uvloop/sslproto.pyx":573
  120141. *
  120142. * cdef _do_shutdown(self):
  120143. * try: # <<<<<<<<<<<<<<
  120144. * self._sslobj.unwrap()
  120145. * except ssl_SSLAgainErrors as exc:
  120146. */
  120147. __Pyx_XGIVEREF(__pyx_t_1);
  120148. __Pyx_XGIVEREF(__pyx_t_2);
  120149. __Pyx_XGIVEREF(__pyx_t_3);
  120150. __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
  120151. goto __pyx_L1_error;
  120152. __pyx_L4_exception_handled:;
  120153. __Pyx_XGIVEREF(__pyx_t_1);
  120154. __Pyx_XGIVEREF(__pyx_t_2);
  120155. __Pyx_XGIVEREF(__pyx_t_3);
  120156. __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
  120157. __pyx_L8_try_end:;
  120158. }
  120159. /* "uvloop/sslproto.pyx":572
  120160. * self._do_shutdown()
  120161. *
  120162. * cdef _do_shutdown(self): # <<<<<<<<<<<<<<
  120163. * try:
  120164. * self._sslobj.unwrap()
  120165. */
  120166. /* function exit code */
  120167. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  120168. goto __pyx_L0;
  120169. __pyx_L1_error:;
  120170. __Pyx_XDECREF(__pyx_t_4);
  120171. __Pyx_XDECREF(__pyx_t_5);
  120172. __Pyx_XDECREF(__pyx_t_6);
  120173. __Pyx_XDECREF(__pyx_t_8);
  120174. __Pyx_AddTraceback("uvloop.loop.SSLProtocol._do_shutdown", __pyx_clineno, __pyx_lineno, __pyx_filename);
  120175. __pyx_r = 0;
  120176. __pyx_L0:;
  120177. __Pyx_XDECREF(__pyx_v_exc);
  120178. __Pyx_XGIVEREF(__pyx_r);
  120179. __Pyx_RefNannyFinishContext();
  120180. return __pyx_r;
  120181. }
  120182. /* "uvloop/sslproto.pyx":584
  120183. * self._on_shutdown_complete(None)
  120184. *
  120185. * cdef _on_shutdown_complete(self, shutdown_exc): # <<<<<<<<<<<<<<
  120186. * self._shutdown_timeout_handle.cancel()
  120187. *
  120188. */
  120189. static PyObject *__pyx_f_6uvloop_4loop_11SSLProtocol__on_shutdown_complete(struct __pyx_obj_6uvloop_4loop_SSLProtocol *__pyx_v_self, PyObject *__pyx_v_shutdown_exc) {
  120190. PyObject *__pyx_r = NULL;
  120191. __Pyx_RefNannyDeclarations
  120192. PyObject *__pyx_t_1 = NULL;
  120193. PyObject *__pyx_t_2 = NULL;
  120194. PyObject *__pyx_t_3 = NULL;
  120195. int __pyx_t_4;
  120196. PyObject *__pyx_t_5 = NULL;
  120197. __Pyx_RefNannySetupContext("_on_shutdown_complete", 0);
  120198. /* "uvloop/sslproto.pyx":585
  120199. *
  120200. * cdef _on_shutdown_complete(self, shutdown_exc):
  120201. * self._shutdown_timeout_handle.cancel() # <<<<<<<<<<<<<<
  120202. *
  120203. * if shutdown_exc:
  120204. */
  120205. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_shutdown_timeout_handle, __pyx_n_s_cancel); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 585, __pyx_L1_error)
  120206. __Pyx_GOTREF(__pyx_t_2);
  120207. __pyx_t_3 = NULL;
  120208. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
  120209. __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
  120210. if (likely(__pyx_t_3)) {
  120211. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  120212. __Pyx_INCREF(__pyx_t_3);
  120213. __Pyx_INCREF(function);
  120214. __Pyx_DECREF_SET(__pyx_t_2, function);
  120215. }
  120216. }
  120217. __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  120218. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  120219. if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 585, __pyx_L1_error)
  120220. __Pyx_GOTREF(__pyx_t_1);
  120221. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  120222. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  120223. /* "uvloop/sslproto.pyx":587
  120224. * self._shutdown_timeout_handle.cancel()
  120225. *
  120226. * if shutdown_exc: # <<<<<<<<<<<<<<
  120227. * self._fatal_error(shutdown_exc)
  120228. * else:
  120229. */
  120230. __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_shutdown_exc); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(22, 587, __pyx_L1_error)
  120231. if (__pyx_t_4) {
  120232. /* "uvloop/sslproto.pyx":588
  120233. *
  120234. * if shutdown_exc:
  120235. * self._fatal_error(shutdown_exc) # <<<<<<<<<<<<<<
  120236. * else:
  120237. * self._loop.call_soon(self._transport.close)
  120238. */
  120239. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_SSLProtocol *)__pyx_v_self->__pyx_vtab)->_fatal_error(__pyx_v_self, __pyx_v_shutdown_exc, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 588, __pyx_L1_error)
  120240. __Pyx_GOTREF(__pyx_t_1);
  120241. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  120242. /* "uvloop/sslproto.pyx":587
  120243. * self._shutdown_timeout_handle.cancel()
  120244. *
  120245. * if shutdown_exc: # <<<<<<<<<<<<<<
  120246. * self._fatal_error(shutdown_exc)
  120247. * else:
  120248. */
  120249. goto __pyx_L3;
  120250. }
  120251. /* "uvloop/sslproto.pyx":590
  120252. * self._fatal_error(shutdown_exc)
  120253. * else:
  120254. * self._loop.call_soon(self._transport.close) # <<<<<<<<<<<<<<
  120255. *
  120256. * cdef _abort(self, exc):
  120257. */
  120258. /*else*/ {
  120259. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_loop, __pyx_n_s_call_soon); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 590, __pyx_L1_error)
  120260. __Pyx_GOTREF(__pyx_t_2);
  120261. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_transport, __pyx_n_s_close); if (unlikely(!__pyx_t_3)) __PYX_ERR(22, 590, __pyx_L1_error)
  120262. __Pyx_GOTREF(__pyx_t_3);
  120263. __pyx_t_5 = NULL;
  120264. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
  120265. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
  120266. if (likely(__pyx_t_5)) {
  120267. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  120268. __Pyx_INCREF(__pyx_t_5);
  120269. __Pyx_INCREF(function);
  120270. __Pyx_DECREF_SET(__pyx_t_2, function);
  120271. }
  120272. }
  120273. __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
  120274. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  120275. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  120276. if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 590, __pyx_L1_error)
  120277. __Pyx_GOTREF(__pyx_t_1);
  120278. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  120279. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  120280. }
  120281. __pyx_L3:;
  120282. /* "uvloop/sslproto.pyx":584
  120283. * self._on_shutdown_complete(None)
  120284. *
  120285. * cdef _on_shutdown_complete(self, shutdown_exc): # <<<<<<<<<<<<<<
  120286. * self._shutdown_timeout_handle.cancel()
  120287. *
  120288. */
  120289. /* function exit code */
  120290. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  120291. goto __pyx_L0;
  120292. __pyx_L1_error:;
  120293. __Pyx_XDECREF(__pyx_t_1);
  120294. __Pyx_XDECREF(__pyx_t_2);
  120295. __Pyx_XDECREF(__pyx_t_3);
  120296. __Pyx_XDECREF(__pyx_t_5);
  120297. __Pyx_AddTraceback("uvloop.loop.SSLProtocol._on_shutdown_complete", __pyx_clineno, __pyx_lineno, __pyx_filename);
  120298. __pyx_r = 0;
  120299. __pyx_L0:;
  120300. __Pyx_XGIVEREF(__pyx_r);
  120301. __Pyx_RefNannyFinishContext();
  120302. return __pyx_r;
  120303. }
  120304. /* "uvloop/sslproto.pyx":592
  120305. * self._loop.call_soon(self._transport.close)
  120306. *
  120307. * cdef _abort(self, exc): # <<<<<<<<<<<<<<
  120308. * self._set_state(UNWRAPPED)
  120309. * if self._transport is not None:
  120310. */
  120311. static PyObject *__pyx_f_6uvloop_4loop_11SSLProtocol__abort(struct __pyx_obj_6uvloop_4loop_SSLProtocol *__pyx_v_self, PyObject *__pyx_v_exc) {
  120312. PyObject *__pyx_r = NULL;
  120313. __Pyx_RefNannyDeclarations
  120314. PyObject *__pyx_t_1 = NULL;
  120315. int __pyx_t_2;
  120316. int __pyx_t_3;
  120317. PyObject *__pyx_t_4 = NULL;
  120318. PyObject *__pyx_t_5 = NULL;
  120319. __Pyx_RefNannySetupContext("_abort", 0);
  120320. /* "uvloop/sslproto.pyx":593
  120321. *
  120322. * cdef _abort(self, exc):
  120323. * self._set_state(UNWRAPPED) # <<<<<<<<<<<<<<
  120324. * if self._transport is not None:
  120325. * self._transport._force_close(exc)
  120326. */
  120327. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_SSLProtocol *)__pyx_v_self->__pyx_vtab)->_set_state(__pyx_v_self, __pyx_e_6uvloop_4loop_UNWRAPPED); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 593, __pyx_L1_error)
  120328. __Pyx_GOTREF(__pyx_t_1);
  120329. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  120330. /* "uvloop/sslproto.pyx":594
  120331. * cdef _abort(self, exc):
  120332. * self._set_state(UNWRAPPED)
  120333. * if self._transport is not None: # <<<<<<<<<<<<<<
  120334. * self._transport._force_close(exc)
  120335. *
  120336. */
  120337. __pyx_t_2 = (__pyx_v_self->_transport != Py_None);
  120338. __pyx_t_3 = (__pyx_t_2 != 0);
  120339. if (__pyx_t_3) {
  120340. /* "uvloop/sslproto.pyx":595
  120341. * self._set_state(UNWRAPPED)
  120342. * if self._transport is not None:
  120343. * self._transport._force_close(exc) # <<<<<<<<<<<<<<
  120344. *
  120345. * # Outgoing flow
  120346. */
  120347. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_transport, __pyx_n_s_force_close); if (unlikely(!__pyx_t_4)) __PYX_ERR(22, 595, __pyx_L1_error)
  120348. __Pyx_GOTREF(__pyx_t_4);
  120349. __pyx_t_5 = NULL;
  120350. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
  120351. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
  120352. if (likely(__pyx_t_5)) {
  120353. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  120354. __Pyx_INCREF(__pyx_t_5);
  120355. __Pyx_INCREF(function);
  120356. __Pyx_DECREF_SET(__pyx_t_4, function);
  120357. }
  120358. }
  120359. __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_exc) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_exc);
  120360. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  120361. if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 595, __pyx_L1_error)
  120362. __Pyx_GOTREF(__pyx_t_1);
  120363. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  120364. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  120365. /* "uvloop/sslproto.pyx":594
  120366. * cdef _abort(self, exc):
  120367. * self._set_state(UNWRAPPED)
  120368. * if self._transport is not None: # <<<<<<<<<<<<<<
  120369. * self._transport._force_close(exc)
  120370. *
  120371. */
  120372. }
  120373. /* "uvloop/sslproto.pyx":592
  120374. * self._loop.call_soon(self._transport.close)
  120375. *
  120376. * cdef _abort(self, exc): # <<<<<<<<<<<<<<
  120377. * self._set_state(UNWRAPPED)
  120378. * if self._transport is not None:
  120379. */
  120380. /* function exit code */
  120381. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  120382. goto __pyx_L0;
  120383. __pyx_L1_error:;
  120384. __Pyx_XDECREF(__pyx_t_1);
  120385. __Pyx_XDECREF(__pyx_t_4);
  120386. __Pyx_XDECREF(__pyx_t_5);
  120387. __Pyx_AddTraceback("uvloop.loop.SSLProtocol._abort", __pyx_clineno, __pyx_lineno, __pyx_filename);
  120388. __pyx_r = 0;
  120389. __pyx_L0:;
  120390. __Pyx_XGIVEREF(__pyx_r);
  120391. __Pyx_RefNannyFinishContext();
  120392. return __pyx_r;
  120393. }
  120394. /* "uvloop/sslproto.pyx":599
  120395. * # Outgoing flow
  120396. *
  120397. * cdef _write_appdata(self, list_of_data): # <<<<<<<<<<<<<<
  120398. * if self._state in (FLUSHING, SHUTDOWN, UNWRAPPED):
  120399. * if self._conn_lost >= LOG_THRESHOLD_FOR_CONNLOST_WRITES:
  120400. */
  120401. static PyObject *__pyx_f_6uvloop_4loop_11SSLProtocol__write_appdata(struct __pyx_obj_6uvloop_4loop_SSLProtocol *__pyx_v_self, PyObject *__pyx_v_list_of_data) {
  120402. PyObject *__pyx_v_data = NULL;
  120403. PyObject *__pyx_v_ex = NULL;
  120404. PyObject *__pyx_r = NULL;
  120405. __Pyx_RefNannyDeclarations
  120406. int __pyx_t_1;
  120407. PyObject *__pyx_t_2 = NULL;
  120408. PyObject *__pyx_t_3 = NULL;
  120409. PyObject *__pyx_t_4 = NULL;
  120410. Py_ssize_t __pyx_t_5;
  120411. PyObject *(*__pyx_t_6)(PyObject *);
  120412. int __pyx_t_7;
  120413. Py_ssize_t __pyx_t_8;
  120414. PyObject *__pyx_t_9 = NULL;
  120415. PyObject *__pyx_t_10 = NULL;
  120416. PyObject *__pyx_t_11 = NULL;
  120417. int __pyx_t_12;
  120418. PyObject *__pyx_t_13 = NULL;
  120419. struct __pyx_opt_args_6uvloop_4loop_11SSLProtocol__fatal_error __pyx_t_14;
  120420. int __pyx_t_15;
  120421. char const *__pyx_t_16;
  120422. PyObject *__pyx_t_17 = NULL;
  120423. PyObject *__pyx_t_18 = NULL;
  120424. PyObject *__pyx_t_19 = NULL;
  120425. PyObject *__pyx_t_20 = NULL;
  120426. PyObject *__pyx_t_21 = NULL;
  120427. PyObject *__pyx_t_22 = NULL;
  120428. __Pyx_RefNannySetupContext("_write_appdata", 0);
  120429. /* "uvloop/sslproto.pyx":600
  120430. *
  120431. * cdef _write_appdata(self, list_of_data):
  120432. * if self._state in (FLUSHING, SHUTDOWN, UNWRAPPED): # <<<<<<<<<<<<<<
  120433. * if self._conn_lost >= LOG_THRESHOLD_FOR_CONNLOST_WRITES:
  120434. * aio_logger.warning('SSL connection is closed')
  120435. */
  120436. switch (__pyx_v_self->_state) {
  120437. case __pyx_e_6uvloop_4loop_FLUSHING:
  120438. case __pyx_e_6uvloop_4loop_SHUTDOWN:
  120439. case __pyx_e_6uvloop_4loop_UNWRAPPED:
  120440. /* "uvloop/sslproto.pyx":601
  120441. * cdef _write_appdata(self, list_of_data):
  120442. * if self._state in (FLUSHING, SHUTDOWN, UNWRAPPED):
  120443. * if self._conn_lost >= LOG_THRESHOLD_FOR_CONNLOST_WRITES: # <<<<<<<<<<<<<<
  120444. * aio_logger.warning('SSL connection is closed')
  120445. * self._conn_lost += 1
  120446. */
  120447. __pyx_t_1 = ((__pyx_v_self->_conn_lost >= 5) != 0);
  120448. if (__pyx_t_1) {
  120449. /* "uvloop/sslproto.pyx":602
  120450. * if self._state in (FLUSHING, SHUTDOWN, UNWRAPPED):
  120451. * if self._conn_lost >= LOG_THRESHOLD_FOR_CONNLOST_WRITES:
  120452. * aio_logger.warning('SSL connection is closed') # <<<<<<<<<<<<<<
  120453. * self._conn_lost += 1
  120454. * return
  120455. */
  120456. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_6uvloop_4loop_aio_logger, __pyx_n_s_warning); if (unlikely(!__pyx_t_3)) __PYX_ERR(22, 602, __pyx_L1_error)
  120457. __Pyx_GOTREF(__pyx_t_3);
  120458. __pyx_t_4 = NULL;
  120459. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
  120460. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
  120461. if (likely(__pyx_t_4)) {
  120462. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  120463. __Pyx_INCREF(__pyx_t_4);
  120464. __Pyx_INCREF(function);
  120465. __Pyx_DECREF_SET(__pyx_t_3, function);
  120466. }
  120467. }
  120468. __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_kp_u_SSL_connection_is_closed) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_u_SSL_connection_is_closed);
  120469. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  120470. if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 602, __pyx_L1_error)
  120471. __Pyx_GOTREF(__pyx_t_2);
  120472. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  120473. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  120474. /* "uvloop/sslproto.pyx":601
  120475. * cdef _write_appdata(self, list_of_data):
  120476. * if self._state in (FLUSHING, SHUTDOWN, UNWRAPPED):
  120477. * if self._conn_lost >= LOG_THRESHOLD_FOR_CONNLOST_WRITES: # <<<<<<<<<<<<<<
  120478. * aio_logger.warning('SSL connection is closed')
  120479. * self._conn_lost += 1
  120480. */
  120481. }
  120482. /* "uvloop/sslproto.pyx":603
  120483. * if self._conn_lost >= LOG_THRESHOLD_FOR_CONNLOST_WRITES:
  120484. * aio_logger.warning('SSL connection is closed')
  120485. * self._conn_lost += 1 # <<<<<<<<<<<<<<
  120486. * return
  120487. *
  120488. */
  120489. __pyx_v_self->_conn_lost = (__pyx_v_self->_conn_lost + 1);
  120490. /* "uvloop/sslproto.pyx":604
  120491. * aio_logger.warning('SSL connection is closed')
  120492. * self._conn_lost += 1
  120493. * return # <<<<<<<<<<<<<<
  120494. *
  120495. * for data in list_of_data:
  120496. */
  120497. __Pyx_XDECREF(__pyx_r);
  120498. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  120499. goto __pyx_L0;
  120500. /* "uvloop/sslproto.pyx":600
  120501. *
  120502. * cdef _write_appdata(self, list_of_data):
  120503. * if self._state in (FLUSHING, SHUTDOWN, UNWRAPPED): # <<<<<<<<<<<<<<
  120504. * if self._conn_lost >= LOG_THRESHOLD_FOR_CONNLOST_WRITES:
  120505. * aio_logger.warning('SSL connection is closed')
  120506. */
  120507. break;
  120508. default: break;
  120509. }
  120510. /* "uvloop/sslproto.pyx":606
  120511. * return
  120512. *
  120513. * for data in list_of_data: # <<<<<<<<<<<<<<
  120514. * self._write_backlog.append(data)
  120515. * self._write_buffer_size += len(data)
  120516. */
  120517. if (likely(PyList_CheckExact(__pyx_v_list_of_data)) || PyTuple_CheckExact(__pyx_v_list_of_data)) {
  120518. __pyx_t_2 = __pyx_v_list_of_data; __Pyx_INCREF(__pyx_t_2); __pyx_t_5 = 0;
  120519. __pyx_t_6 = NULL;
  120520. } else {
  120521. __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_list_of_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 606, __pyx_L1_error)
  120522. __Pyx_GOTREF(__pyx_t_2);
  120523. __pyx_t_6 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(22, 606, __pyx_L1_error)
  120524. }
  120525. for (;;) {
  120526. if (likely(!__pyx_t_6)) {
  120527. if (likely(PyList_CheckExact(__pyx_t_2))) {
  120528. if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_2)) break;
  120529. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  120530. __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(22, 606, __pyx_L1_error)
  120531. #else
  120532. __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(22, 606, __pyx_L1_error)
  120533. __Pyx_GOTREF(__pyx_t_3);
  120534. #endif
  120535. } else {
  120536. if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
  120537. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  120538. __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(22, 606, __pyx_L1_error)
  120539. #else
  120540. __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(22, 606, __pyx_L1_error)
  120541. __Pyx_GOTREF(__pyx_t_3);
  120542. #endif
  120543. }
  120544. } else {
  120545. __pyx_t_3 = __pyx_t_6(__pyx_t_2);
  120546. if (unlikely(!__pyx_t_3)) {
  120547. PyObject* exc_type = PyErr_Occurred();
  120548. if (exc_type) {
  120549. if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
  120550. else __PYX_ERR(22, 606, __pyx_L1_error)
  120551. }
  120552. break;
  120553. }
  120554. __Pyx_GOTREF(__pyx_t_3);
  120555. }
  120556. __Pyx_XDECREF_SET(__pyx_v_data, __pyx_t_3);
  120557. __pyx_t_3 = 0;
  120558. /* "uvloop/sslproto.pyx":607
  120559. *
  120560. * for data in list_of_data:
  120561. * self._write_backlog.append(data) # <<<<<<<<<<<<<<
  120562. * self._write_buffer_size += len(data)
  120563. *
  120564. */
  120565. __pyx_t_7 = __Pyx_PyObject_Append(__pyx_v_self->_write_backlog, __pyx_v_data); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(22, 607, __pyx_L1_error)
  120566. /* "uvloop/sslproto.pyx":608
  120567. * for data in list_of_data:
  120568. * self._write_backlog.append(data)
  120569. * self._write_buffer_size += len(data) # <<<<<<<<<<<<<<
  120570. *
  120571. * try:
  120572. */
  120573. __pyx_t_8 = PyObject_Length(__pyx_v_data); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(22, 608, __pyx_L1_error)
  120574. __pyx_v_self->_write_buffer_size = (__pyx_v_self->_write_buffer_size + __pyx_t_8);
  120575. /* "uvloop/sslproto.pyx":606
  120576. * return
  120577. *
  120578. * for data in list_of_data: # <<<<<<<<<<<<<<
  120579. * self._write_backlog.append(data)
  120580. * self._write_buffer_size += len(data)
  120581. */
  120582. }
  120583. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  120584. /* "uvloop/sslproto.pyx":610
  120585. * self._write_buffer_size += len(data)
  120586. *
  120587. * try: # <<<<<<<<<<<<<<
  120588. * if self._state == WRAPPED:
  120589. * self._do_write()
  120590. */
  120591. {
  120592. __Pyx_PyThreadState_declare
  120593. __Pyx_PyThreadState_assign
  120594. __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
  120595. __Pyx_XGOTREF(__pyx_t_9);
  120596. __Pyx_XGOTREF(__pyx_t_10);
  120597. __Pyx_XGOTREF(__pyx_t_11);
  120598. /*try:*/ {
  120599. /* "uvloop/sslproto.pyx":611
  120600. *
  120601. * try:
  120602. * if self._state == WRAPPED: # <<<<<<<<<<<<<<
  120603. * self._do_write()
  120604. *
  120605. */
  120606. __pyx_t_1 = ((__pyx_v_self->_state == __pyx_e_6uvloop_4loop_WRAPPED) != 0);
  120607. if (__pyx_t_1) {
  120608. /* "uvloop/sslproto.pyx":612
  120609. * try:
  120610. * if self._state == WRAPPED:
  120611. * self._do_write() # <<<<<<<<<<<<<<
  120612. *
  120613. * except Exception as ex:
  120614. */
  120615. __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_SSLProtocol *)__pyx_v_self->__pyx_vtab)->_do_write(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 612, __pyx_L6_error)
  120616. __Pyx_GOTREF(__pyx_t_2);
  120617. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  120618. /* "uvloop/sslproto.pyx":611
  120619. *
  120620. * try:
  120621. * if self._state == WRAPPED: # <<<<<<<<<<<<<<
  120622. * self._do_write()
  120623. *
  120624. */
  120625. }
  120626. /* "uvloop/sslproto.pyx":610
  120627. * self._write_buffer_size += len(data)
  120628. *
  120629. * try: # <<<<<<<<<<<<<<
  120630. * if self._state == WRAPPED:
  120631. * self._do_write()
  120632. */
  120633. }
  120634. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  120635. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  120636. __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
  120637. goto __pyx_L11_try_end;
  120638. __pyx_L6_error:;
  120639. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  120640. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  120641. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  120642. /* "uvloop/sslproto.pyx":614
  120643. * self._do_write()
  120644. *
  120645. * except Exception as ex: # <<<<<<<<<<<<<<
  120646. * self._fatal_error(ex, 'Fatal error on SSL protocol')
  120647. *
  120648. */
  120649. __pyx_t_12 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
  120650. if (__pyx_t_12) {
  120651. __Pyx_AddTraceback("uvloop.loop.SSLProtocol._write_appdata", __pyx_clineno, __pyx_lineno, __pyx_filename);
  120652. if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4) < 0) __PYX_ERR(22, 614, __pyx_L8_except_error)
  120653. __Pyx_GOTREF(__pyx_t_2);
  120654. __Pyx_GOTREF(__pyx_t_3);
  120655. __Pyx_GOTREF(__pyx_t_4);
  120656. __Pyx_INCREF(__pyx_t_3);
  120657. __pyx_v_ex = __pyx_t_3;
  120658. /*try:*/ {
  120659. /* "uvloop/sslproto.pyx":615
  120660. *
  120661. * except Exception as ex:
  120662. * self._fatal_error(ex, 'Fatal error on SSL protocol') # <<<<<<<<<<<<<<
  120663. *
  120664. * cdef _do_write(self):
  120665. */
  120666. __pyx_t_14.__pyx_n = 1;
  120667. __pyx_t_14.message = __pyx_kp_u_Fatal_error_on_SSL_protocol;
  120668. __pyx_t_13 = ((struct __pyx_vtabstruct_6uvloop_4loop_SSLProtocol *)__pyx_v_self->__pyx_vtab)->_fatal_error(__pyx_v_self, __pyx_v_ex, &__pyx_t_14); if (unlikely(!__pyx_t_13)) __PYX_ERR(22, 615, __pyx_L18_error)
  120669. __Pyx_GOTREF(__pyx_t_13);
  120670. __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  120671. }
  120672. /* "uvloop/sslproto.pyx":614
  120673. * self._do_write()
  120674. *
  120675. * except Exception as ex: # <<<<<<<<<<<<<<
  120676. * self._fatal_error(ex, 'Fatal error on SSL protocol')
  120677. *
  120678. */
  120679. /*finally:*/ {
  120680. /*normal exit:*/{
  120681. __Pyx_DECREF(__pyx_v_ex);
  120682. __pyx_v_ex = NULL;
  120683. goto __pyx_L19;
  120684. }
  120685. __pyx_L18_error:;
  120686. /*exception exit:*/{
  120687. __Pyx_PyThreadState_declare
  120688. __Pyx_PyThreadState_assign
  120689. __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
  120690. __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
  120691. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22);
  120692. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19) < 0)) __Pyx_ErrFetch(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19);
  120693. __Pyx_XGOTREF(__pyx_t_17);
  120694. __Pyx_XGOTREF(__pyx_t_18);
  120695. __Pyx_XGOTREF(__pyx_t_19);
  120696. __Pyx_XGOTREF(__pyx_t_20);
  120697. __Pyx_XGOTREF(__pyx_t_21);
  120698. __Pyx_XGOTREF(__pyx_t_22);
  120699. __pyx_t_12 = __pyx_lineno; __pyx_t_15 = __pyx_clineno; __pyx_t_16 = __pyx_filename;
  120700. {
  120701. __Pyx_DECREF(__pyx_v_ex);
  120702. __pyx_v_ex = NULL;
  120703. }
  120704. if (PY_MAJOR_VERSION >= 3) {
  120705. __Pyx_XGIVEREF(__pyx_t_20);
  120706. __Pyx_XGIVEREF(__pyx_t_21);
  120707. __Pyx_XGIVEREF(__pyx_t_22);
  120708. __Pyx_ExceptionReset(__pyx_t_20, __pyx_t_21, __pyx_t_22);
  120709. }
  120710. __Pyx_XGIVEREF(__pyx_t_17);
  120711. __Pyx_XGIVEREF(__pyx_t_18);
  120712. __Pyx_XGIVEREF(__pyx_t_19);
  120713. __Pyx_ErrRestore(__pyx_t_17, __pyx_t_18, __pyx_t_19);
  120714. __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
  120715. __pyx_lineno = __pyx_t_12; __pyx_clineno = __pyx_t_15; __pyx_filename = __pyx_t_16;
  120716. goto __pyx_L8_except_error;
  120717. }
  120718. __pyx_L19:;
  120719. }
  120720. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  120721. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  120722. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  120723. goto __pyx_L7_exception_handled;
  120724. }
  120725. goto __pyx_L8_except_error;
  120726. __pyx_L8_except_error:;
  120727. /* "uvloop/sslproto.pyx":610
  120728. * self._write_buffer_size += len(data)
  120729. *
  120730. * try: # <<<<<<<<<<<<<<
  120731. * if self._state == WRAPPED:
  120732. * self._do_write()
  120733. */
  120734. __Pyx_XGIVEREF(__pyx_t_9);
  120735. __Pyx_XGIVEREF(__pyx_t_10);
  120736. __Pyx_XGIVEREF(__pyx_t_11);
  120737. __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11);
  120738. goto __pyx_L1_error;
  120739. __pyx_L7_exception_handled:;
  120740. __Pyx_XGIVEREF(__pyx_t_9);
  120741. __Pyx_XGIVEREF(__pyx_t_10);
  120742. __Pyx_XGIVEREF(__pyx_t_11);
  120743. __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11);
  120744. __pyx_L11_try_end:;
  120745. }
  120746. /* "uvloop/sslproto.pyx":599
  120747. * # Outgoing flow
  120748. *
  120749. * cdef _write_appdata(self, list_of_data): # <<<<<<<<<<<<<<
  120750. * if self._state in (FLUSHING, SHUTDOWN, UNWRAPPED):
  120751. * if self._conn_lost >= LOG_THRESHOLD_FOR_CONNLOST_WRITES:
  120752. */
  120753. /* function exit code */
  120754. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  120755. goto __pyx_L0;
  120756. __pyx_L1_error:;
  120757. __Pyx_XDECREF(__pyx_t_2);
  120758. __Pyx_XDECREF(__pyx_t_3);
  120759. __Pyx_XDECREF(__pyx_t_4);
  120760. __Pyx_XDECREF(__pyx_t_13);
  120761. __Pyx_AddTraceback("uvloop.loop.SSLProtocol._write_appdata", __pyx_clineno, __pyx_lineno, __pyx_filename);
  120762. __pyx_r = 0;
  120763. __pyx_L0:;
  120764. __Pyx_XDECREF(__pyx_v_data);
  120765. __Pyx_XDECREF(__pyx_v_ex);
  120766. __Pyx_XGIVEREF(__pyx_r);
  120767. __Pyx_RefNannyFinishContext();
  120768. return __pyx_r;
  120769. }
  120770. /* "uvloop/sslproto.pyx":617
  120771. * self._fatal_error(ex, 'Fatal error on SSL protocol')
  120772. *
  120773. * cdef _do_write(self): # <<<<<<<<<<<<<<
  120774. * cdef size_t data_len, count
  120775. * try:
  120776. */
  120777. static PyObject *__pyx_f_6uvloop_4loop_11SSLProtocol__do_write(struct __pyx_obj_6uvloop_4loop_SSLProtocol *__pyx_v_self) {
  120778. size_t __pyx_v_data_len;
  120779. size_t __pyx_v_count;
  120780. PyObject *__pyx_v_data = NULL;
  120781. CYTHON_UNUSED PyObject *__pyx_v_exc = NULL;
  120782. PyObject *__pyx_r = NULL;
  120783. __Pyx_RefNannyDeclarations
  120784. PyObject *__pyx_t_1 = NULL;
  120785. PyObject *__pyx_t_2 = NULL;
  120786. PyObject *__pyx_t_3 = NULL;
  120787. int __pyx_t_4;
  120788. PyObject *__pyx_t_5 = NULL;
  120789. PyObject *__pyx_t_6 = NULL;
  120790. PyObject *__pyx_t_7 = NULL;
  120791. size_t __pyx_t_8;
  120792. Py_ssize_t __pyx_t_9;
  120793. int __pyx_t_10;
  120794. __Pyx_RefNannySetupContext("_do_write", 0);
  120795. /* "uvloop/sslproto.pyx":619
  120796. * cdef _do_write(self):
  120797. * cdef size_t data_len, count
  120798. * try: # <<<<<<<<<<<<<<
  120799. * while self._write_backlog:
  120800. * data = self._write_backlog[0]
  120801. */
  120802. {
  120803. __Pyx_PyThreadState_declare
  120804. __Pyx_PyThreadState_assign
  120805. __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
  120806. __Pyx_XGOTREF(__pyx_t_1);
  120807. __Pyx_XGOTREF(__pyx_t_2);
  120808. __Pyx_XGOTREF(__pyx_t_3);
  120809. /*try:*/ {
  120810. /* "uvloop/sslproto.pyx":620
  120811. * cdef size_t data_len, count
  120812. * try:
  120813. * while self._write_backlog: # <<<<<<<<<<<<<<
  120814. * data = self._write_backlog[0]
  120815. * count = self._sslobj_write(data)
  120816. */
  120817. while (1) {
  120818. __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_self->_write_backlog); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(22, 620, __pyx_L3_error)
  120819. if (!__pyx_t_4) break;
  120820. /* "uvloop/sslproto.pyx":621
  120821. * try:
  120822. * while self._write_backlog:
  120823. * data = self._write_backlog[0] # <<<<<<<<<<<<<<
  120824. * count = self._sslobj_write(data)
  120825. * data_len = len(data)
  120826. */
  120827. __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_self->_write_backlog, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(22, 621, __pyx_L3_error)
  120828. __Pyx_GOTREF(__pyx_t_5);
  120829. __Pyx_XDECREF_SET(__pyx_v_data, __pyx_t_5);
  120830. __pyx_t_5 = 0;
  120831. /* "uvloop/sslproto.pyx":622
  120832. * while self._write_backlog:
  120833. * data = self._write_backlog[0]
  120834. * count = self._sslobj_write(data) # <<<<<<<<<<<<<<
  120835. * data_len = len(data)
  120836. * if count < data_len:
  120837. */
  120838. __Pyx_INCREF(__pyx_v_self->_sslobj_write);
  120839. __pyx_t_6 = __pyx_v_self->_sslobj_write; __pyx_t_7 = NULL;
  120840. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
  120841. __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
  120842. if (likely(__pyx_t_7)) {
  120843. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
  120844. __Pyx_INCREF(__pyx_t_7);
  120845. __Pyx_INCREF(function);
  120846. __Pyx_DECREF_SET(__pyx_t_6, function);
  120847. }
  120848. }
  120849. __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_v_data) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_data);
  120850. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  120851. if (unlikely(!__pyx_t_5)) __PYX_ERR(22, 622, __pyx_L3_error)
  120852. __Pyx_GOTREF(__pyx_t_5);
  120853. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  120854. __pyx_t_8 = __Pyx_PyInt_As_size_t(__pyx_t_5); if (unlikely((__pyx_t_8 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(22, 622, __pyx_L3_error)
  120855. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  120856. __pyx_v_count = __pyx_t_8;
  120857. /* "uvloop/sslproto.pyx":623
  120858. * data = self._write_backlog[0]
  120859. * count = self._sslobj_write(data)
  120860. * data_len = len(data) # <<<<<<<<<<<<<<
  120861. * if count < data_len:
  120862. * if not PyMemoryView_Check(data):
  120863. */
  120864. __pyx_t_9 = PyObject_Length(__pyx_v_data); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(22, 623, __pyx_L3_error)
  120865. __pyx_v_data_len = __pyx_t_9;
  120866. /* "uvloop/sslproto.pyx":624
  120867. * count = self._sslobj_write(data)
  120868. * data_len = len(data)
  120869. * if count < data_len: # <<<<<<<<<<<<<<
  120870. * if not PyMemoryView_Check(data):
  120871. * data = PyMemoryView_FromObject(data)
  120872. */
  120873. __pyx_t_4 = ((__pyx_v_count < __pyx_v_data_len) != 0);
  120874. if (__pyx_t_4) {
  120875. /* "uvloop/sslproto.pyx":625
  120876. * data_len = len(data)
  120877. * if count < data_len:
  120878. * if not PyMemoryView_Check(data): # <<<<<<<<<<<<<<
  120879. * data = PyMemoryView_FromObject(data)
  120880. * self._write_backlog[0] = data[count:]
  120881. */
  120882. __pyx_t_4 = ((!(PyMemoryView_Check(__pyx_v_data) != 0)) != 0);
  120883. if (__pyx_t_4) {
  120884. /* "uvloop/sslproto.pyx":626
  120885. * if count < data_len:
  120886. * if not PyMemoryView_Check(data):
  120887. * data = PyMemoryView_FromObject(data) # <<<<<<<<<<<<<<
  120888. * self._write_backlog[0] = data[count:]
  120889. * self._write_buffer_size -= count
  120890. */
  120891. __pyx_t_5 = PyMemoryView_FromObject(__pyx_v_data); if (unlikely(!__pyx_t_5)) __PYX_ERR(22, 626, __pyx_L3_error)
  120892. __Pyx_GOTREF(__pyx_t_5);
  120893. __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_5);
  120894. __pyx_t_5 = 0;
  120895. /* "uvloop/sslproto.pyx":625
  120896. * data_len = len(data)
  120897. * if count < data_len:
  120898. * if not PyMemoryView_Check(data): # <<<<<<<<<<<<<<
  120899. * data = PyMemoryView_FromObject(data)
  120900. * self._write_backlog[0] = data[count:]
  120901. */
  120902. }
  120903. /* "uvloop/sslproto.pyx":627
  120904. * if not PyMemoryView_Check(data):
  120905. * data = PyMemoryView_FromObject(data)
  120906. * self._write_backlog[0] = data[count:] # <<<<<<<<<<<<<<
  120907. * self._write_buffer_size -= count
  120908. * else:
  120909. */
  120910. __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_v_data, __pyx_v_count, 0, NULL, NULL, NULL, 1, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(22, 627, __pyx_L3_error)
  120911. __Pyx_GOTREF(__pyx_t_5);
  120912. if (unlikely(__Pyx_SetItemInt(__pyx_v_self->_write_backlog, 0, __pyx_t_5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1) < 0)) __PYX_ERR(22, 627, __pyx_L3_error)
  120913. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  120914. /* "uvloop/sslproto.pyx":628
  120915. * data = PyMemoryView_FromObject(data)
  120916. * self._write_backlog[0] = data[count:]
  120917. * self._write_buffer_size -= count # <<<<<<<<<<<<<<
  120918. * else:
  120919. * del self._write_backlog[0]
  120920. */
  120921. __pyx_v_self->_write_buffer_size = (__pyx_v_self->_write_buffer_size - __pyx_v_count);
  120922. /* "uvloop/sslproto.pyx":624
  120923. * count = self._sslobj_write(data)
  120924. * data_len = len(data)
  120925. * if count < data_len: # <<<<<<<<<<<<<<
  120926. * if not PyMemoryView_Check(data):
  120927. * data = PyMemoryView_FromObject(data)
  120928. */
  120929. goto __pyx_L11;
  120930. }
  120931. /* "uvloop/sslproto.pyx":630
  120932. * self._write_buffer_size -= count
  120933. * else:
  120934. * del self._write_backlog[0] # <<<<<<<<<<<<<<
  120935. * self._write_buffer_size -= data_len
  120936. * except ssl_SSLAgainErrors as exc:
  120937. */
  120938. /*else*/ {
  120939. if (unlikely(__Pyx_DelItemInt(__pyx_v_self->_write_backlog, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1) < 0)) __PYX_ERR(22, 630, __pyx_L3_error)
  120940. /* "uvloop/sslproto.pyx":631
  120941. * else:
  120942. * del self._write_backlog[0]
  120943. * self._write_buffer_size -= data_len # <<<<<<<<<<<<<<
  120944. * except ssl_SSLAgainErrors as exc:
  120945. * pass
  120946. */
  120947. __pyx_v_self->_write_buffer_size = (__pyx_v_self->_write_buffer_size - __pyx_v_data_len);
  120948. }
  120949. __pyx_L11:;
  120950. }
  120951. /* "uvloop/sslproto.pyx":619
  120952. * cdef _do_write(self):
  120953. * cdef size_t data_len, count
  120954. * try: # <<<<<<<<<<<<<<
  120955. * while self._write_backlog:
  120956. * data = self._write_backlog[0]
  120957. */
  120958. }
  120959. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  120960. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  120961. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  120962. goto __pyx_L8_try_end;
  120963. __pyx_L3_error:;
  120964. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  120965. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  120966. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  120967. /* "uvloop/sslproto.pyx":632
  120968. * del self._write_backlog[0]
  120969. * self._write_buffer_size -= data_len
  120970. * except ssl_SSLAgainErrors as exc: # <<<<<<<<<<<<<<
  120971. * pass
  120972. * self._process_outgoing()
  120973. */
  120974. __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(__pyx_v_6uvloop_4loop_ssl_SSLAgainErrors);
  120975. if (__pyx_t_10) {
  120976. __Pyx_AddTraceback("uvloop.loop.SSLProtocol._do_write", __pyx_clineno, __pyx_lineno, __pyx_filename);
  120977. if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(22, 632, __pyx_L5_except_error)
  120978. __Pyx_GOTREF(__pyx_t_5);
  120979. __Pyx_GOTREF(__pyx_t_6);
  120980. __Pyx_GOTREF(__pyx_t_7);
  120981. __Pyx_INCREF(__pyx_t_6);
  120982. __pyx_v_exc = __pyx_t_6;
  120983. /*try:*/ {
  120984. }
  120985. /*finally:*/ {
  120986. /*normal exit:*/{
  120987. __Pyx_DECREF(__pyx_v_exc);
  120988. __pyx_v_exc = NULL;
  120989. goto __pyx_L19;
  120990. }
  120991. __pyx_L19:;
  120992. }
  120993. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  120994. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  120995. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  120996. goto __pyx_L4_exception_handled;
  120997. }
  120998. goto __pyx_L5_except_error;
  120999. __pyx_L5_except_error:;
  121000. /* "uvloop/sslproto.pyx":619
  121001. * cdef _do_write(self):
  121002. * cdef size_t data_len, count
  121003. * try: # <<<<<<<<<<<<<<
  121004. * while self._write_backlog:
  121005. * data = self._write_backlog[0]
  121006. */
  121007. __Pyx_XGIVEREF(__pyx_t_1);
  121008. __Pyx_XGIVEREF(__pyx_t_2);
  121009. __Pyx_XGIVEREF(__pyx_t_3);
  121010. __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
  121011. goto __pyx_L1_error;
  121012. __pyx_L4_exception_handled:;
  121013. __Pyx_XGIVEREF(__pyx_t_1);
  121014. __Pyx_XGIVEREF(__pyx_t_2);
  121015. __Pyx_XGIVEREF(__pyx_t_3);
  121016. __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
  121017. __pyx_L8_try_end:;
  121018. }
  121019. /* "uvloop/sslproto.pyx":634
  121020. * except ssl_SSLAgainErrors as exc:
  121021. * pass
  121022. * self._process_outgoing() # <<<<<<<<<<<<<<
  121023. *
  121024. * cdef _process_outgoing(self):
  121025. */
  121026. __pyx_t_7 = ((struct __pyx_vtabstruct_6uvloop_4loop_SSLProtocol *)__pyx_v_self->__pyx_vtab)->_process_outgoing(__pyx_v_self); if (unlikely(!__pyx_t_7)) __PYX_ERR(22, 634, __pyx_L1_error)
  121027. __Pyx_GOTREF(__pyx_t_7);
  121028. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  121029. /* "uvloop/sslproto.pyx":617
  121030. * self._fatal_error(ex, 'Fatal error on SSL protocol')
  121031. *
  121032. * cdef _do_write(self): # <<<<<<<<<<<<<<
  121033. * cdef size_t data_len, count
  121034. * try:
  121035. */
  121036. /* function exit code */
  121037. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  121038. goto __pyx_L0;
  121039. __pyx_L1_error:;
  121040. __Pyx_XDECREF(__pyx_t_5);
  121041. __Pyx_XDECREF(__pyx_t_6);
  121042. __Pyx_XDECREF(__pyx_t_7);
  121043. __Pyx_AddTraceback("uvloop.loop.SSLProtocol._do_write", __pyx_clineno, __pyx_lineno, __pyx_filename);
  121044. __pyx_r = 0;
  121045. __pyx_L0:;
  121046. __Pyx_XDECREF(__pyx_v_data);
  121047. __Pyx_XDECREF(__pyx_v_exc);
  121048. __Pyx_XGIVEREF(__pyx_r);
  121049. __Pyx_RefNannyFinishContext();
  121050. return __pyx_r;
  121051. }
  121052. /* "uvloop/sslproto.pyx":636
  121053. * self._process_outgoing()
  121054. *
  121055. * cdef _process_outgoing(self): # <<<<<<<<<<<<<<
  121056. * if not self._ssl_writing_paused:
  121057. * data = self._outgoing_read()
  121058. */
  121059. static PyObject *__pyx_f_6uvloop_4loop_11SSLProtocol__process_outgoing(struct __pyx_obj_6uvloop_4loop_SSLProtocol *__pyx_v_self) {
  121060. PyObject *__pyx_v_data = NULL;
  121061. PyObject *__pyx_r = NULL;
  121062. __Pyx_RefNannyDeclarations
  121063. int __pyx_t_1;
  121064. PyObject *__pyx_t_2 = NULL;
  121065. PyObject *__pyx_t_3 = NULL;
  121066. PyObject *__pyx_t_4 = NULL;
  121067. Py_ssize_t __pyx_t_5;
  121068. __Pyx_RefNannySetupContext("_process_outgoing", 0);
  121069. /* "uvloop/sslproto.pyx":637
  121070. *
  121071. * cdef _process_outgoing(self):
  121072. * if not self._ssl_writing_paused: # <<<<<<<<<<<<<<
  121073. * data = self._outgoing_read()
  121074. * if len(data):
  121075. */
  121076. __pyx_t_1 = ((!(__pyx_v_self->_ssl_writing_paused != 0)) != 0);
  121077. if (__pyx_t_1) {
  121078. /* "uvloop/sslproto.pyx":638
  121079. * cdef _process_outgoing(self):
  121080. * if not self._ssl_writing_paused:
  121081. * data = self._outgoing_read() # <<<<<<<<<<<<<<
  121082. * if len(data):
  121083. * self._transport.write(data)
  121084. */
  121085. __Pyx_INCREF(__pyx_v_self->_outgoing_read);
  121086. __pyx_t_3 = __pyx_v_self->_outgoing_read; __pyx_t_4 = NULL;
  121087. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
  121088. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
  121089. if (likely(__pyx_t_4)) {
  121090. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  121091. __Pyx_INCREF(__pyx_t_4);
  121092. __Pyx_INCREF(function);
  121093. __Pyx_DECREF_SET(__pyx_t_3, function);
  121094. }
  121095. }
  121096. __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
  121097. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  121098. if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 638, __pyx_L1_error)
  121099. __Pyx_GOTREF(__pyx_t_2);
  121100. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  121101. __pyx_v_data = __pyx_t_2;
  121102. __pyx_t_2 = 0;
  121103. /* "uvloop/sslproto.pyx":639
  121104. * if not self._ssl_writing_paused:
  121105. * data = self._outgoing_read()
  121106. * if len(data): # <<<<<<<<<<<<<<
  121107. * self._transport.write(data)
  121108. * self._control_app_writing()
  121109. */
  121110. __pyx_t_5 = PyObject_Length(__pyx_v_data); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(22, 639, __pyx_L1_error)
  121111. __pyx_t_1 = (__pyx_t_5 != 0);
  121112. if (__pyx_t_1) {
  121113. /* "uvloop/sslproto.pyx":640
  121114. * data = self._outgoing_read()
  121115. * if len(data):
  121116. * self._transport.write(data) # <<<<<<<<<<<<<<
  121117. * self._control_app_writing()
  121118. *
  121119. */
  121120. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_transport, __pyx_n_s_write); if (unlikely(!__pyx_t_3)) __PYX_ERR(22, 640, __pyx_L1_error)
  121121. __Pyx_GOTREF(__pyx_t_3);
  121122. __pyx_t_4 = NULL;
  121123. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
  121124. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
  121125. if (likely(__pyx_t_4)) {
  121126. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  121127. __Pyx_INCREF(__pyx_t_4);
  121128. __Pyx_INCREF(function);
  121129. __Pyx_DECREF_SET(__pyx_t_3, function);
  121130. }
  121131. }
  121132. __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_data) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_data);
  121133. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  121134. if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 640, __pyx_L1_error)
  121135. __Pyx_GOTREF(__pyx_t_2);
  121136. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  121137. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  121138. /* "uvloop/sslproto.pyx":639
  121139. * if not self._ssl_writing_paused:
  121140. * data = self._outgoing_read()
  121141. * if len(data): # <<<<<<<<<<<<<<
  121142. * self._transport.write(data)
  121143. * self._control_app_writing()
  121144. */
  121145. }
  121146. /* "uvloop/sslproto.pyx":637
  121147. *
  121148. * cdef _process_outgoing(self):
  121149. * if not self._ssl_writing_paused: # <<<<<<<<<<<<<<
  121150. * data = self._outgoing_read()
  121151. * if len(data):
  121152. */
  121153. }
  121154. /* "uvloop/sslproto.pyx":641
  121155. * if len(data):
  121156. * self._transport.write(data)
  121157. * self._control_app_writing() # <<<<<<<<<<<<<<
  121158. *
  121159. * # Incoming flow
  121160. */
  121161. __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_SSLProtocol *)__pyx_v_self->__pyx_vtab)->_control_app_writing(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 641, __pyx_L1_error)
  121162. __Pyx_GOTREF(__pyx_t_2);
  121163. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  121164. /* "uvloop/sslproto.pyx":636
  121165. * self._process_outgoing()
  121166. *
  121167. * cdef _process_outgoing(self): # <<<<<<<<<<<<<<
  121168. * if not self._ssl_writing_paused:
  121169. * data = self._outgoing_read()
  121170. */
  121171. /* function exit code */
  121172. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  121173. goto __pyx_L0;
  121174. __pyx_L1_error:;
  121175. __Pyx_XDECREF(__pyx_t_2);
  121176. __Pyx_XDECREF(__pyx_t_3);
  121177. __Pyx_XDECREF(__pyx_t_4);
  121178. __Pyx_AddTraceback("uvloop.loop.SSLProtocol._process_outgoing", __pyx_clineno, __pyx_lineno, __pyx_filename);
  121179. __pyx_r = 0;
  121180. __pyx_L0:;
  121181. __Pyx_XDECREF(__pyx_v_data);
  121182. __Pyx_XGIVEREF(__pyx_r);
  121183. __Pyx_RefNannyFinishContext();
  121184. return __pyx_r;
  121185. }
  121186. /* "uvloop/sslproto.pyx":645
  121187. * # Incoming flow
  121188. *
  121189. * cdef _do_read(self): # <<<<<<<<<<<<<<
  121190. * if self._state != WRAPPED:
  121191. * return
  121192. */
  121193. static PyObject *__pyx_f_6uvloop_4loop_11SSLProtocol__do_read(struct __pyx_obj_6uvloop_4loop_SSLProtocol *__pyx_v_self) {
  121194. PyObject *__pyx_v_ex = NULL;
  121195. PyObject *__pyx_r = NULL;
  121196. __Pyx_RefNannyDeclarations
  121197. int __pyx_t_1;
  121198. PyObject *__pyx_t_2 = NULL;
  121199. PyObject *__pyx_t_3 = NULL;
  121200. PyObject *__pyx_t_4 = NULL;
  121201. PyObject *__pyx_t_5 = NULL;
  121202. int __pyx_t_6;
  121203. PyObject *__pyx_t_7 = NULL;
  121204. PyObject *__pyx_t_8 = NULL;
  121205. PyObject *__pyx_t_9 = NULL;
  121206. struct __pyx_opt_args_6uvloop_4loop_11SSLProtocol__fatal_error __pyx_t_10;
  121207. int __pyx_t_11;
  121208. char const *__pyx_t_12;
  121209. PyObject *__pyx_t_13 = NULL;
  121210. PyObject *__pyx_t_14 = NULL;
  121211. PyObject *__pyx_t_15 = NULL;
  121212. PyObject *__pyx_t_16 = NULL;
  121213. PyObject *__pyx_t_17 = NULL;
  121214. PyObject *__pyx_t_18 = NULL;
  121215. __Pyx_RefNannySetupContext("_do_read", 0);
  121216. /* "uvloop/sslproto.pyx":646
  121217. *
  121218. * cdef _do_read(self):
  121219. * if self._state != WRAPPED: # <<<<<<<<<<<<<<
  121220. * return
  121221. * try:
  121222. */
  121223. __pyx_t_1 = ((__pyx_v_self->_state != __pyx_e_6uvloop_4loop_WRAPPED) != 0);
  121224. if (__pyx_t_1) {
  121225. /* "uvloop/sslproto.pyx":647
  121226. * cdef _do_read(self):
  121227. * if self._state != WRAPPED:
  121228. * return # <<<<<<<<<<<<<<
  121229. * try:
  121230. * if not self._app_reading_paused:
  121231. */
  121232. __Pyx_XDECREF(__pyx_r);
  121233. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  121234. goto __pyx_L0;
  121235. /* "uvloop/sslproto.pyx":646
  121236. *
  121237. * cdef _do_read(self):
  121238. * if self._state != WRAPPED: # <<<<<<<<<<<<<<
  121239. * return
  121240. * try:
  121241. */
  121242. }
  121243. /* "uvloop/sslproto.pyx":648
  121244. * if self._state != WRAPPED:
  121245. * return
  121246. * try: # <<<<<<<<<<<<<<
  121247. * if not self._app_reading_paused:
  121248. * if self._app_protocol_is_buffer:
  121249. */
  121250. {
  121251. __Pyx_PyThreadState_declare
  121252. __Pyx_PyThreadState_assign
  121253. __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
  121254. __Pyx_XGOTREF(__pyx_t_2);
  121255. __Pyx_XGOTREF(__pyx_t_3);
  121256. __Pyx_XGOTREF(__pyx_t_4);
  121257. /*try:*/ {
  121258. /* "uvloop/sslproto.pyx":649
  121259. * return
  121260. * try:
  121261. * if not self._app_reading_paused: # <<<<<<<<<<<<<<
  121262. * if self._app_protocol_is_buffer:
  121263. * self._do_read__buffered()
  121264. */
  121265. __pyx_t_1 = ((!(__pyx_v_self->_app_reading_paused != 0)) != 0);
  121266. if (__pyx_t_1) {
  121267. /* "uvloop/sslproto.pyx":650
  121268. * try:
  121269. * if not self._app_reading_paused:
  121270. * if self._app_protocol_is_buffer: # <<<<<<<<<<<<<<
  121271. * self._do_read__buffered()
  121272. * else:
  121273. */
  121274. __pyx_t_1 = (__pyx_v_self->_app_protocol_is_buffer != 0);
  121275. if (__pyx_t_1) {
  121276. /* "uvloop/sslproto.pyx":651
  121277. * if not self._app_reading_paused:
  121278. * if self._app_protocol_is_buffer:
  121279. * self._do_read__buffered() # <<<<<<<<<<<<<<
  121280. * else:
  121281. * self._do_read__copied()
  121282. */
  121283. __pyx_t_5 = ((struct __pyx_vtabstruct_6uvloop_4loop_SSLProtocol *)__pyx_v_self->__pyx_vtab)->_do_read__buffered(__pyx_v_self); if (unlikely(!__pyx_t_5)) __PYX_ERR(22, 651, __pyx_L4_error)
  121284. __Pyx_GOTREF(__pyx_t_5);
  121285. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  121286. /* "uvloop/sslproto.pyx":650
  121287. * try:
  121288. * if not self._app_reading_paused:
  121289. * if self._app_protocol_is_buffer: # <<<<<<<<<<<<<<
  121290. * self._do_read__buffered()
  121291. * else:
  121292. */
  121293. goto __pyx_L11;
  121294. }
  121295. /* "uvloop/sslproto.pyx":653
  121296. * self._do_read__buffered()
  121297. * else:
  121298. * self._do_read__copied() # <<<<<<<<<<<<<<
  121299. * if self._write_backlog:
  121300. * self._do_write()
  121301. */
  121302. /*else*/ {
  121303. __pyx_t_5 = ((struct __pyx_vtabstruct_6uvloop_4loop_SSLProtocol *)__pyx_v_self->__pyx_vtab)->_do_read__copied(__pyx_v_self); if (unlikely(!__pyx_t_5)) __PYX_ERR(22, 653, __pyx_L4_error)
  121304. __Pyx_GOTREF(__pyx_t_5);
  121305. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  121306. }
  121307. __pyx_L11:;
  121308. /* "uvloop/sslproto.pyx":654
  121309. * else:
  121310. * self._do_read__copied()
  121311. * if self._write_backlog: # <<<<<<<<<<<<<<
  121312. * self._do_write()
  121313. * else:
  121314. */
  121315. __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->_write_backlog); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(22, 654, __pyx_L4_error)
  121316. if (__pyx_t_1) {
  121317. /* "uvloop/sslproto.pyx":655
  121318. * self._do_read__copied()
  121319. * if self._write_backlog:
  121320. * self._do_write() # <<<<<<<<<<<<<<
  121321. * else:
  121322. * self._process_outgoing()
  121323. */
  121324. __pyx_t_5 = ((struct __pyx_vtabstruct_6uvloop_4loop_SSLProtocol *)__pyx_v_self->__pyx_vtab)->_do_write(__pyx_v_self); if (unlikely(!__pyx_t_5)) __PYX_ERR(22, 655, __pyx_L4_error)
  121325. __Pyx_GOTREF(__pyx_t_5);
  121326. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  121327. /* "uvloop/sslproto.pyx":654
  121328. * else:
  121329. * self._do_read__copied()
  121330. * if self._write_backlog: # <<<<<<<<<<<<<<
  121331. * self._do_write()
  121332. * else:
  121333. */
  121334. goto __pyx_L12;
  121335. }
  121336. /* "uvloop/sslproto.pyx":657
  121337. * self._do_write()
  121338. * else:
  121339. * self._process_outgoing() # <<<<<<<<<<<<<<
  121340. * self._control_ssl_reading()
  121341. * except Exception as ex:
  121342. */
  121343. /*else*/ {
  121344. __pyx_t_5 = ((struct __pyx_vtabstruct_6uvloop_4loop_SSLProtocol *)__pyx_v_self->__pyx_vtab)->_process_outgoing(__pyx_v_self); if (unlikely(!__pyx_t_5)) __PYX_ERR(22, 657, __pyx_L4_error)
  121345. __Pyx_GOTREF(__pyx_t_5);
  121346. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  121347. }
  121348. __pyx_L12:;
  121349. /* "uvloop/sslproto.pyx":649
  121350. * return
  121351. * try:
  121352. * if not self._app_reading_paused: # <<<<<<<<<<<<<<
  121353. * if self._app_protocol_is_buffer:
  121354. * self._do_read__buffered()
  121355. */
  121356. }
  121357. /* "uvloop/sslproto.pyx":658
  121358. * else:
  121359. * self._process_outgoing()
  121360. * self._control_ssl_reading() # <<<<<<<<<<<<<<
  121361. * except Exception as ex:
  121362. * self._fatal_error(ex, 'Fatal error on SSL protocol')
  121363. */
  121364. __pyx_t_5 = ((struct __pyx_vtabstruct_6uvloop_4loop_SSLProtocol *)__pyx_v_self->__pyx_vtab)->_control_ssl_reading(__pyx_v_self); if (unlikely(!__pyx_t_5)) __PYX_ERR(22, 658, __pyx_L4_error)
  121365. __Pyx_GOTREF(__pyx_t_5);
  121366. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  121367. /* "uvloop/sslproto.pyx":648
  121368. * if self._state != WRAPPED:
  121369. * return
  121370. * try: # <<<<<<<<<<<<<<
  121371. * if not self._app_reading_paused:
  121372. * if self._app_protocol_is_buffer:
  121373. */
  121374. }
  121375. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  121376. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  121377. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  121378. goto __pyx_L9_try_end;
  121379. __pyx_L4_error:;
  121380. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  121381. /* "uvloop/sslproto.pyx":659
  121382. * self._process_outgoing()
  121383. * self._control_ssl_reading()
  121384. * except Exception as ex: # <<<<<<<<<<<<<<
  121385. * self._fatal_error(ex, 'Fatal error on SSL protocol')
  121386. *
  121387. */
  121388. __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
  121389. if (__pyx_t_6) {
  121390. __Pyx_AddTraceback("uvloop.loop.SSLProtocol._do_read", __pyx_clineno, __pyx_lineno, __pyx_filename);
  121391. if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_7, &__pyx_t_8) < 0) __PYX_ERR(22, 659, __pyx_L6_except_error)
  121392. __Pyx_GOTREF(__pyx_t_5);
  121393. __Pyx_GOTREF(__pyx_t_7);
  121394. __Pyx_GOTREF(__pyx_t_8);
  121395. __Pyx_INCREF(__pyx_t_7);
  121396. __pyx_v_ex = __pyx_t_7;
  121397. /*try:*/ {
  121398. /* "uvloop/sslproto.pyx":660
  121399. * self._control_ssl_reading()
  121400. * except Exception as ex:
  121401. * self._fatal_error(ex, 'Fatal error on SSL protocol') # <<<<<<<<<<<<<<
  121402. *
  121403. * cdef _do_read__buffered(self):
  121404. */
  121405. __pyx_t_10.__pyx_n = 1;
  121406. __pyx_t_10.message = __pyx_kp_u_Fatal_error_on_SSL_protocol;
  121407. __pyx_t_9 = ((struct __pyx_vtabstruct_6uvloop_4loop_SSLProtocol *)__pyx_v_self->__pyx_vtab)->_fatal_error(__pyx_v_self, __pyx_v_ex, &__pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(22, 660, __pyx_L18_error)
  121408. __Pyx_GOTREF(__pyx_t_9);
  121409. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  121410. }
  121411. /* "uvloop/sslproto.pyx":659
  121412. * self._process_outgoing()
  121413. * self._control_ssl_reading()
  121414. * except Exception as ex: # <<<<<<<<<<<<<<
  121415. * self._fatal_error(ex, 'Fatal error on SSL protocol')
  121416. *
  121417. */
  121418. /*finally:*/ {
  121419. /*normal exit:*/{
  121420. __Pyx_DECREF(__pyx_v_ex);
  121421. __pyx_v_ex = NULL;
  121422. goto __pyx_L19;
  121423. }
  121424. __pyx_L18_error:;
  121425. /*exception exit:*/{
  121426. __Pyx_PyThreadState_declare
  121427. __Pyx_PyThreadState_assign
  121428. __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0;
  121429. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  121430. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18);
  121431. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15) < 0)) __Pyx_ErrFetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
  121432. __Pyx_XGOTREF(__pyx_t_13);
  121433. __Pyx_XGOTREF(__pyx_t_14);
  121434. __Pyx_XGOTREF(__pyx_t_15);
  121435. __Pyx_XGOTREF(__pyx_t_16);
  121436. __Pyx_XGOTREF(__pyx_t_17);
  121437. __Pyx_XGOTREF(__pyx_t_18);
  121438. __pyx_t_6 = __pyx_lineno; __pyx_t_11 = __pyx_clineno; __pyx_t_12 = __pyx_filename;
  121439. {
  121440. __Pyx_DECREF(__pyx_v_ex);
  121441. __pyx_v_ex = NULL;
  121442. }
  121443. if (PY_MAJOR_VERSION >= 3) {
  121444. __Pyx_XGIVEREF(__pyx_t_16);
  121445. __Pyx_XGIVEREF(__pyx_t_17);
  121446. __Pyx_XGIVEREF(__pyx_t_18);
  121447. __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18);
  121448. }
  121449. __Pyx_XGIVEREF(__pyx_t_13);
  121450. __Pyx_XGIVEREF(__pyx_t_14);
  121451. __Pyx_XGIVEREF(__pyx_t_15);
  121452. __Pyx_ErrRestore(__pyx_t_13, __pyx_t_14, __pyx_t_15);
  121453. __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0;
  121454. __pyx_lineno = __pyx_t_6; __pyx_clineno = __pyx_t_11; __pyx_filename = __pyx_t_12;
  121455. goto __pyx_L6_except_error;
  121456. }
  121457. __pyx_L19:;
  121458. }
  121459. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  121460. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  121461. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  121462. goto __pyx_L5_exception_handled;
  121463. }
  121464. goto __pyx_L6_except_error;
  121465. __pyx_L6_except_error:;
  121466. /* "uvloop/sslproto.pyx":648
  121467. * if self._state != WRAPPED:
  121468. * return
  121469. * try: # <<<<<<<<<<<<<<
  121470. * if not self._app_reading_paused:
  121471. * if self._app_protocol_is_buffer:
  121472. */
  121473. __Pyx_XGIVEREF(__pyx_t_2);
  121474. __Pyx_XGIVEREF(__pyx_t_3);
  121475. __Pyx_XGIVEREF(__pyx_t_4);
  121476. __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
  121477. goto __pyx_L1_error;
  121478. __pyx_L5_exception_handled:;
  121479. __Pyx_XGIVEREF(__pyx_t_2);
  121480. __Pyx_XGIVEREF(__pyx_t_3);
  121481. __Pyx_XGIVEREF(__pyx_t_4);
  121482. __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
  121483. __pyx_L9_try_end:;
  121484. }
  121485. /* "uvloop/sslproto.pyx":645
  121486. * # Incoming flow
  121487. *
  121488. * cdef _do_read(self): # <<<<<<<<<<<<<<
  121489. * if self._state != WRAPPED:
  121490. * return
  121491. */
  121492. /* function exit code */
  121493. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  121494. goto __pyx_L0;
  121495. __pyx_L1_error:;
  121496. __Pyx_XDECREF(__pyx_t_5);
  121497. __Pyx_XDECREF(__pyx_t_7);
  121498. __Pyx_XDECREF(__pyx_t_8);
  121499. __Pyx_XDECREF(__pyx_t_9);
  121500. __Pyx_AddTraceback("uvloop.loop.SSLProtocol._do_read", __pyx_clineno, __pyx_lineno, __pyx_filename);
  121501. __pyx_r = 0;
  121502. __pyx_L0:;
  121503. __Pyx_XDECREF(__pyx_v_ex);
  121504. __Pyx_XGIVEREF(__pyx_r);
  121505. __Pyx_RefNannyFinishContext();
  121506. return __pyx_r;
  121507. }
  121508. /* "uvloop/sslproto.pyx":692
  121509. * break
  121510. * else:
  121511. * self._loop.call_soon(lambda: self._do_read()) # <<<<<<<<<<<<<<
  121512. * except ssl_SSLAgainErrors as exc:
  121513. * pass
  121514. */
  121515. /* Python wrapper */
  121516. static PyObject *__pyx_pw_6uvloop_4loop_11SSLProtocol_18_do_read__buffered_lambda8(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  121517. static PyMethodDef __pyx_mdef_6uvloop_4loop_11SSLProtocol_18_do_read__buffered_lambda8 = {"lambda8", (PyCFunction)__pyx_pw_6uvloop_4loop_11SSLProtocol_18_do_read__buffered_lambda8, METH_NOARGS, 0};
  121518. static PyObject *__pyx_pw_6uvloop_4loop_11SSLProtocol_18_do_read__buffered_lambda8(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  121519. PyObject *__pyx_r = 0;
  121520. __Pyx_RefNannyDeclarations
  121521. __Pyx_RefNannySetupContext("lambda8 (wrapper)", 0);
  121522. __pyx_r = __pyx_lambda_funcdef_lambda8(__pyx_self);
  121523. /* function exit code */
  121524. __Pyx_RefNannyFinishContext();
  121525. return __pyx_r;
  121526. }
  121527. static PyObject *__pyx_lambda_funcdef_lambda8(PyObject *__pyx_self) {
  121528. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_30__do_read__buffered *__pyx_cur_scope;
  121529. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_30__do_read__buffered *__pyx_outer_scope;
  121530. PyObject *__pyx_r = NULL;
  121531. __Pyx_RefNannyDeclarations
  121532. PyObject *__pyx_t_1 = NULL;
  121533. __Pyx_RefNannySetupContext("lambda8", 0);
  121534. __pyx_outer_scope = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_30__do_read__buffered *) __Pyx_CyFunction_GetClosure(__pyx_self);
  121535. __pyx_cur_scope = __pyx_outer_scope;
  121536. __Pyx_XDECREF(__pyx_r);
  121537. if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(22, 692, __pyx_L1_error) }
  121538. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_SSLProtocol *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->_do_read(__pyx_cur_scope->__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 692, __pyx_L1_error)
  121539. __Pyx_GOTREF(__pyx_t_1);
  121540. __pyx_r = __pyx_t_1;
  121541. __pyx_t_1 = 0;
  121542. goto __pyx_L0;
  121543. /* function exit code */
  121544. __pyx_L1_error:;
  121545. __Pyx_XDECREF(__pyx_t_1);
  121546. __Pyx_AddTraceback("uvloop.loop.SSLProtocol._do_read__buffered.lambda8", __pyx_clineno, __pyx_lineno, __pyx_filename);
  121547. __pyx_r = NULL;
  121548. __pyx_L0:;
  121549. __Pyx_XGIVEREF(__pyx_r);
  121550. __Pyx_RefNannyFinishContext();
  121551. return __pyx_r;
  121552. }
  121553. /* "uvloop/sslproto.pyx":662
  121554. * self._fatal_error(ex, 'Fatal error on SSL protocol')
  121555. *
  121556. * cdef _do_read__buffered(self): # <<<<<<<<<<<<<<
  121557. * cdef:
  121558. * Py_buffer pybuf
  121559. */
  121560. static PyObject *__pyx_f_6uvloop_4loop_11SSLProtocol__do_read__buffered(struct __pyx_obj_6uvloop_4loop_SSLProtocol *__pyx_v_self) {
  121561. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_30__do_read__buffered *__pyx_cur_scope;
  121562. Py_buffer __pyx_v_pybuf;
  121563. int __pyx_v_pybuf_inited;
  121564. size_t __pyx_v_wants;
  121565. size_t __pyx_v_offset;
  121566. int __pyx_v_count;
  121567. PyObject *__pyx_v_buf = 0;
  121568. CYTHON_UNUSED PyObject *__pyx_v_exc = NULL;
  121569. PyObject *__pyx_r = NULL;
  121570. __Pyx_RefNannyDeclarations
  121571. PyObject *__pyx_t_1 = NULL;
  121572. PyObject *__pyx_t_2 = NULL;
  121573. PyObject *__pyx_t_3 = NULL;
  121574. PyObject *__pyx_t_4 = NULL;
  121575. Py_ssize_t __pyx_t_5;
  121576. PyObject *__pyx_t_6 = NULL;
  121577. PyObject *__pyx_t_7 = NULL;
  121578. PyObject *__pyx_t_8 = NULL;
  121579. int __pyx_t_9;
  121580. PyObject *__pyx_t_10 = NULL;
  121581. int __pyx_t_11;
  121582. int __pyx_t_12;
  121583. char const *__pyx_t_13;
  121584. PyObject *__pyx_t_14 = NULL;
  121585. PyObject *__pyx_t_15 = NULL;
  121586. PyObject *__pyx_t_16 = NULL;
  121587. __Pyx_RefNannySetupContext("_do_read__buffered", 0);
  121588. __pyx_cur_scope = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_30__do_read__buffered *)__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_30__do_read__buffered(__pyx_ptype_6uvloop_4loop___pyx_scope_struct_30__do_read__buffered, __pyx_empty_tuple, NULL);
  121589. if (unlikely(!__pyx_cur_scope)) {
  121590. __pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_30__do_read__buffered *)Py_None);
  121591. __Pyx_INCREF(Py_None);
  121592. __PYX_ERR(22, 662, __pyx_L1_error)
  121593. } else {
  121594. __Pyx_GOTREF(__pyx_cur_scope);
  121595. }
  121596. __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  121597. __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  121598. __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  121599. /* "uvloop/sslproto.pyx":665
  121600. * cdef:
  121601. * Py_buffer pybuf
  121602. * bint pybuf_inited = False # <<<<<<<<<<<<<<
  121603. * size_t wants, offset = 0
  121604. * int count = 1
  121605. */
  121606. __pyx_v_pybuf_inited = 0;
  121607. /* "uvloop/sslproto.pyx":666
  121608. * Py_buffer pybuf
  121609. * bint pybuf_inited = False
  121610. * size_t wants, offset = 0 # <<<<<<<<<<<<<<
  121611. * int count = 1
  121612. * object buf
  121613. */
  121614. __pyx_v_offset = 0;
  121615. /* "uvloop/sslproto.pyx":667
  121616. * bint pybuf_inited = False
  121617. * size_t wants, offset = 0
  121618. * int count = 1 # <<<<<<<<<<<<<<
  121619. * object buf
  121620. *
  121621. */
  121622. __pyx_v_count = 1;
  121623. /* "uvloop/sslproto.pyx":670
  121624. * object buf
  121625. *
  121626. * buf = self._app_protocol_get_buffer(self._get_read_buffer_size()) # <<<<<<<<<<<<<<
  121627. * wants = len(buf)
  121628. *
  121629. */
  121630. __pyx_t_2 = __Pyx_PyInt_FromSize_t(((struct __pyx_vtabstruct_6uvloop_4loop_SSLProtocol *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->_get_read_buffer_size(__pyx_cur_scope->__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 670, __pyx_L1_error)
  121631. __Pyx_GOTREF(__pyx_t_2);
  121632. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_self->_app_protocol_get_buffer);
  121633. __pyx_t_3 = __pyx_cur_scope->__pyx_v_self->_app_protocol_get_buffer; __pyx_t_4 = NULL;
  121634. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
  121635. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
  121636. if (likely(__pyx_t_4)) {
  121637. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  121638. __Pyx_INCREF(__pyx_t_4);
  121639. __Pyx_INCREF(function);
  121640. __Pyx_DECREF_SET(__pyx_t_3, function);
  121641. }
  121642. }
  121643. __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2);
  121644. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  121645. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  121646. if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 670, __pyx_L1_error)
  121647. __Pyx_GOTREF(__pyx_t_1);
  121648. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  121649. __pyx_v_buf = __pyx_t_1;
  121650. __pyx_t_1 = 0;
  121651. /* "uvloop/sslproto.pyx":671
  121652. *
  121653. * buf = self._app_protocol_get_buffer(self._get_read_buffer_size())
  121654. * wants = len(buf) # <<<<<<<<<<<<<<
  121655. *
  121656. * try:
  121657. */
  121658. __pyx_t_5 = PyObject_Length(__pyx_v_buf); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(22, 671, __pyx_L1_error)
  121659. __pyx_v_wants = __pyx_t_5;
  121660. /* "uvloop/sslproto.pyx":673
  121661. * wants = len(buf)
  121662. *
  121663. * try: # <<<<<<<<<<<<<<
  121664. * count = self._sslobj_read(wants, buf)
  121665. *
  121666. */
  121667. /*try:*/ {
  121668. {
  121669. __Pyx_PyThreadState_declare
  121670. __Pyx_PyThreadState_assign
  121671. __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
  121672. __Pyx_XGOTREF(__pyx_t_6);
  121673. __Pyx_XGOTREF(__pyx_t_7);
  121674. __Pyx_XGOTREF(__pyx_t_8);
  121675. /*try:*/ {
  121676. /* "uvloop/sslproto.pyx":674
  121677. *
  121678. * try:
  121679. * count = self._sslobj_read(wants, buf) # <<<<<<<<<<<<<<
  121680. *
  121681. * if count > 0:
  121682. */
  121683. __pyx_t_3 = __Pyx_PyInt_FromSize_t(__pyx_v_wants); if (unlikely(!__pyx_t_3)) __PYX_ERR(22, 674, __pyx_L6_error)
  121684. __Pyx_GOTREF(__pyx_t_3);
  121685. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_self->_sslobj_read);
  121686. __pyx_t_2 = __pyx_cur_scope->__pyx_v_self->_sslobj_read; __pyx_t_4 = NULL;
  121687. __pyx_t_9 = 0;
  121688. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
  121689. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
  121690. if (likely(__pyx_t_4)) {
  121691. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  121692. __Pyx_INCREF(__pyx_t_4);
  121693. __Pyx_INCREF(function);
  121694. __Pyx_DECREF_SET(__pyx_t_2, function);
  121695. __pyx_t_9 = 1;
  121696. }
  121697. }
  121698. #if CYTHON_FAST_PYCALL
  121699. if (PyFunction_Check(__pyx_t_2)) {
  121700. PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_3, __pyx_v_buf};
  121701. __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 674, __pyx_L6_error)
  121702. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  121703. __Pyx_GOTREF(__pyx_t_1);
  121704. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  121705. } else
  121706. #endif
  121707. #if CYTHON_FAST_PYCCALL
  121708. if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
  121709. PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_3, __pyx_v_buf};
  121710. __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 674, __pyx_L6_error)
  121711. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  121712. __Pyx_GOTREF(__pyx_t_1);
  121713. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  121714. } else
  121715. #endif
  121716. {
  121717. __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(22, 674, __pyx_L6_error)
  121718. __Pyx_GOTREF(__pyx_t_10);
  121719. if (__pyx_t_4) {
  121720. __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_4); __pyx_t_4 = NULL;
  121721. }
  121722. __Pyx_GIVEREF(__pyx_t_3);
  121723. PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_t_3);
  121724. __Pyx_INCREF(__pyx_v_buf);
  121725. __Pyx_GIVEREF(__pyx_v_buf);
  121726. PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_v_buf);
  121727. __pyx_t_3 = 0;
  121728. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 674, __pyx_L6_error)
  121729. __Pyx_GOTREF(__pyx_t_1);
  121730. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  121731. }
  121732. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  121733. __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(22, 674, __pyx_L6_error)
  121734. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  121735. __pyx_v_count = __pyx_t_9;
  121736. /* "uvloop/sslproto.pyx":676
  121737. * count = self._sslobj_read(wants, buf)
  121738. *
  121739. * if count > 0: # <<<<<<<<<<<<<<
  121740. * offset = count
  121741. * if offset < wants:
  121742. */
  121743. __pyx_t_11 = ((__pyx_v_count > 0) != 0);
  121744. if (__pyx_t_11) {
  121745. /* "uvloop/sslproto.pyx":677
  121746. *
  121747. * if count > 0:
  121748. * offset = count # <<<<<<<<<<<<<<
  121749. * if offset < wants:
  121750. * PyObject_GetBuffer(buf, &pybuf, PyBUF_WRITABLE)
  121751. */
  121752. __pyx_v_offset = __pyx_v_count;
  121753. /* "uvloop/sslproto.pyx":678
  121754. * if count > 0:
  121755. * offset = count
  121756. * if offset < wants: # <<<<<<<<<<<<<<
  121757. * PyObject_GetBuffer(buf, &pybuf, PyBUF_WRITABLE)
  121758. * pybuf_inited = True
  121759. */
  121760. __pyx_t_11 = ((__pyx_v_offset < __pyx_v_wants) != 0);
  121761. if (__pyx_t_11) {
  121762. /* "uvloop/sslproto.pyx":679
  121763. * offset = count
  121764. * if offset < wants:
  121765. * PyObject_GetBuffer(buf, &pybuf, PyBUF_WRITABLE) # <<<<<<<<<<<<<<
  121766. * pybuf_inited = True
  121767. * while offset < wants:
  121768. */
  121769. __pyx_t_9 = PyObject_GetBuffer(__pyx_v_buf, (&__pyx_v_pybuf), PyBUF_WRITABLE); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(22, 679, __pyx_L6_error)
  121770. /* "uvloop/sslproto.pyx":680
  121771. * if offset < wants:
  121772. * PyObject_GetBuffer(buf, &pybuf, PyBUF_WRITABLE)
  121773. * pybuf_inited = True # <<<<<<<<<<<<<<
  121774. * while offset < wants:
  121775. * buf = PyMemoryView_FromMemory(
  121776. */
  121777. __pyx_v_pybuf_inited = 1;
  121778. /* "uvloop/sslproto.pyx":678
  121779. * if count > 0:
  121780. * offset = count
  121781. * if offset < wants: # <<<<<<<<<<<<<<
  121782. * PyObject_GetBuffer(buf, &pybuf, PyBUF_WRITABLE)
  121783. * pybuf_inited = True
  121784. */
  121785. }
  121786. /* "uvloop/sslproto.pyx":681
  121787. * PyObject_GetBuffer(buf, &pybuf, PyBUF_WRITABLE)
  121788. * pybuf_inited = True
  121789. * while offset < wants: # <<<<<<<<<<<<<<
  121790. * buf = PyMemoryView_FromMemory(
  121791. * (<char*>pybuf.buf) + offset,
  121792. */
  121793. while (1) {
  121794. __pyx_t_11 = ((__pyx_v_offset < __pyx_v_wants) != 0);
  121795. if (!__pyx_t_11) break;
  121796. /* "uvloop/sslproto.pyx":682
  121797. * pybuf_inited = True
  121798. * while offset < wants:
  121799. * buf = PyMemoryView_FromMemory( # <<<<<<<<<<<<<<
  121800. * (<char*>pybuf.buf) + offset,
  121801. * wants - offset,
  121802. */
  121803. __pyx_t_1 = PyMemoryView_FromMemory((((char *)__pyx_v_pybuf.buf) + __pyx_v_offset), (__pyx_v_wants - __pyx_v_offset), PyBUF_WRITE); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 682, __pyx_L6_error)
  121804. __Pyx_GOTREF(__pyx_t_1);
  121805. __Pyx_DECREF_SET(__pyx_v_buf, __pyx_t_1);
  121806. __pyx_t_1 = 0;
  121807. /* "uvloop/sslproto.pyx":686
  121808. * wants - offset,
  121809. * PyBUF_WRITE)
  121810. * count = self._sslobj_read(wants - offset, buf) # <<<<<<<<<<<<<<
  121811. * if count > 0:
  121812. * offset += count
  121813. */
  121814. __pyx_t_2 = __Pyx_PyInt_FromSize_t((__pyx_v_wants - __pyx_v_offset)); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 686, __pyx_L6_error)
  121815. __Pyx_GOTREF(__pyx_t_2);
  121816. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_self->_sslobj_read);
  121817. __pyx_t_10 = __pyx_cur_scope->__pyx_v_self->_sslobj_read; __pyx_t_3 = NULL;
  121818. __pyx_t_9 = 0;
  121819. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) {
  121820. __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_10);
  121821. if (likely(__pyx_t_3)) {
  121822. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
  121823. __Pyx_INCREF(__pyx_t_3);
  121824. __Pyx_INCREF(function);
  121825. __Pyx_DECREF_SET(__pyx_t_10, function);
  121826. __pyx_t_9 = 1;
  121827. }
  121828. }
  121829. #if CYTHON_FAST_PYCALL
  121830. if (PyFunction_Check(__pyx_t_10)) {
  121831. PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_t_2, __pyx_v_buf};
  121832. __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 686, __pyx_L6_error)
  121833. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  121834. __Pyx_GOTREF(__pyx_t_1);
  121835. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  121836. } else
  121837. #endif
  121838. #if CYTHON_FAST_PYCCALL
  121839. if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
  121840. PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_t_2, __pyx_v_buf};
  121841. __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 686, __pyx_L6_error)
  121842. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  121843. __Pyx_GOTREF(__pyx_t_1);
  121844. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  121845. } else
  121846. #endif
  121847. {
  121848. __pyx_t_4 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(22, 686, __pyx_L6_error)
  121849. __Pyx_GOTREF(__pyx_t_4);
  121850. if (__pyx_t_3) {
  121851. __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL;
  121852. }
  121853. __Pyx_GIVEREF(__pyx_t_2);
  121854. PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_9, __pyx_t_2);
  121855. __Pyx_INCREF(__pyx_v_buf);
  121856. __Pyx_GIVEREF(__pyx_v_buf);
  121857. PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_9, __pyx_v_buf);
  121858. __pyx_t_2 = 0;
  121859. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 686, __pyx_L6_error)
  121860. __Pyx_GOTREF(__pyx_t_1);
  121861. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  121862. }
  121863. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  121864. __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(22, 686, __pyx_L6_error)
  121865. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  121866. __pyx_v_count = __pyx_t_9;
  121867. /* "uvloop/sslproto.pyx":687
  121868. * PyBUF_WRITE)
  121869. * count = self._sslobj_read(wants - offset, buf)
  121870. * if count > 0: # <<<<<<<<<<<<<<
  121871. * offset += count
  121872. * else:
  121873. */
  121874. __pyx_t_11 = ((__pyx_v_count > 0) != 0);
  121875. if (__pyx_t_11) {
  121876. /* "uvloop/sslproto.pyx":688
  121877. * count = self._sslobj_read(wants - offset, buf)
  121878. * if count > 0:
  121879. * offset += count # <<<<<<<<<<<<<<
  121880. * else:
  121881. * break
  121882. */
  121883. __pyx_v_offset = (__pyx_v_offset + __pyx_v_count);
  121884. /* "uvloop/sslproto.pyx":687
  121885. * PyBUF_WRITE)
  121886. * count = self._sslobj_read(wants - offset, buf)
  121887. * if count > 0: # <<<<<<<<<<<<<<
  121888. * offset += count
  121889. * else:
  121890. */
  121891. goto __pyx_L16;
  121892. }
  121893. /* "uvloop/sslproto.pyx":690
  121894. * offset += count
  121895. * else:
  121896. * break # <<<<<<<<<<<<<<
  121897. * else:
  121898. * self._loop.call_soon(lambda: self._do_read())
  121899. */
  121900. /*else*/ {
  121901. goto __pyx_L15_break;
  121902. }
  121903. __pyx_L16:;
  121904. }
  121905. /* "uvloop/sslproto.pyx":692
  121906. * break
  121907. * else:
  121908. * self._loop.call_soon(lambda: self._do_read()) # <<<<<<<<<<<<<<
  121909. * except ssl_SSLAgainErrors as exc:
  121910. * pass
  121911. */
  121912. /*else*/ {
  121913. __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self->_loop, __pyx_n_s_call_soon); if (unlikely(!__pyx_t_10)) __PYX_ERR(22, 692, __pyx_L6_error)
  121914. __Pyx_GOTREF(__pyx_t_10);
  121915. __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6uvloop_4loop_11SSLProtocol_18_do_read__buffered_lambda8, 0, __pyx_n_s_SSLProtocol__do_read__buffered_l, ((PyObject*)__pyx_cur_scope), __pyx_n_s_uvloop_loop, __pyx_d, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(22, 692, __pyx_L6_error)
  121916. __Pyx_GOTREF(__pyx_t_4);
  121917. __pyx_t_2 = NULL;
  121918. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) {
  121919. __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_10);
  121920. if (likely(__pyx_t_2)) {
  121921. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
  121922. __Pyx_INCREF(__pyx_t_2);
  121923. __Pyx_INCREF(function);
  121924. __Pyx_DECREF_SET(__pyx_t_10, function);
  121925. }
  121926. }
  121927. __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_10, __pyx_t_2, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_4);
  121928. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  121929. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  121930. if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 692, __pyx_L6_error)
  121931. __Pyx_GOTREF(__pyx_t_1);
  121932. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  121933. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  121934. }
  121935. __pyx_L15_break:;
  121936. /* "uvloop/sslproto.pyx":676
  121937. * count = self._sslobj_read(wants, buf)
  121938. *
  121939. * if count > 0: # <<<<<<<<<<<<<<
  121940. * offset = count
  121941. * if offset < wants:
  121942. */
  121943. }
  121944. /* "uvloop/sslproto.pyx":673
  121945. * wants = len(buf)
  121946. *
  121947. * try: # <<<<<<<<<<<<<<
  121948. * count = self._sslobj_read(wants, buf)
  121949. *
  121950. */
  121951. }
  121952. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  121953. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  121954. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  121955. goto __pyx_L11_try_end;
  121956. __pyx_L6_error:;
  121957. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  121958. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  121959. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  121960. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  121961. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  121962. /* "uvloop/sslproto.pyx":693
  121963. * else:
  121964. * self._loop.call_soon(lambda: self._do_read())
  121965. * except ssl_SSLAgainErrors as exc: # <<<<<<<<<<<<<<
  121966. * pass
  121967. * finally:
  121968. */
  121969. __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_v_6uvloop_4loop_ssl_SSLAgainErrors);
  121970. if (__pyx_t_9) {
  121971. __Pyx_AddTraceback("uvloop.loop.SSLProtocol._do_read__buffered", __pyx_clineno, __pyx_lineno, __pyx_filename);
  121972. if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_10, &__pyx_t_4) < 0) __PYX_ERR(22, 693, __pyx_L8_except_error)
  121973. __Pyx_GOTREF(__pyx_t_1);
  121974. __Pyx_GOTREF(__pyx_t_10);
  121975. __Pyx_GOTREF(__pyx_t_4);
  121976. __Pyx_INCREF(__pyx_t_10);
  121977. __pyx_v_exc = __pyx_t_10;
  121978. /*try:*/ {
  121979. }
  121980. /*finally:*/ {
  121981. /*normal exit:*/{
  121982. __Pyx_DECREF(__pyx_v_exc);
  121983. __pyx_v_exc = NULL;
  121984. goto __pyx_L23;
  121985. }
  121986. __pyx_L23:;
  121987. }
  121988. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  121989. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  121990. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  121991. goto __pyx_L7_exception_handled;
  121992. }
  121993. goto __pyx_L8_except_error;
  121994. __pyx_L8_except_error:;
  121995. /* "uvloop/sslproto.pyx":673
  121996. * wants = len(buf)
  121997. *
  121998. * try: # <<<<<<<<<<<<<<
  121999. * count = self._sslobj_read(wants, buf)
  122000. *
  122001. */
  122002. __Pyx_XGIVEREF(__pyx_t_6);
  122003. __Pyx_XGIVEREF(__pyx_t_7);
  122004. __Pyx_XGIVEREF(__pyx_t_8);
  122005. __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
  122006. goto __pyx_L4_error;
  122007. __pyx_L7_exception_handled:;
  122008. __Pyx_XGIVEREF(__pyx_t_6);
  122009. __Pyx_XGIVEREF(__pyx_t_7);
  122010. __Pyx_XGIVEREF(__pyx_t_8);
  122011. __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
  122012. __pyx_L11_try_end:;
  122013. }
  122014. }
  122015. /* "uvloop/sslproto.pyx":696
  122016. * pass
  122017. * finally:
  122018. * if pybuf_inited: # <<<<<<<<<<<<<<
  122019. * PyBuffer_Release(&pybuf)
  122020. * if offset > 0:
  122021. */
  122022. /*finally:*/ {
  122023. /*normal exit:*/{
  122024. __pyx_t_11 = (__pyx_v_pybuf_inited != 0);
  122025. if (__pyx_t_11) {
  122026. /* "uvloop/sslproto.pyx":697
  122027. * finally:
  122028. * if pybuf_inited:
  122029. * PyBuffer_Release(&pybuf) # <<<<<<<<<<<<<<
  122030. * if offset > 0:
  122031. * self._app_protocol_buffer_updated(offset)
  122032. */
  122033. PyBuffer_Release((&__pyx_v_pybuf));
  122034. /* "uvloop/sslproto.pyx":696
  122035. * pass
  122036. * finally:
  122037. * if pybuf_inited: # <<<<<<<<<<<<<<
  122038. * PyBuffer_Release(&pybuf)
  122039. * if offset > 0:
  122040. */
  122041. }
  122042. goto __pyx_L5;
  122043. }
  122044. __pyx_L4_error:;
  122045. /*exception exit:*/{
  122046. __Pyx_PyThreadState_declare
  122047. __Pyx_PyThreadState_assign
  122048. __pyx_t_8 = 0; __pyx_t_7 = 0; __pyx_t_6 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0;
  122049. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  122050. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  122051. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  122052. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  122053. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  122054. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16);
  122055. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_6) < 0)) __Pyx_ErrFetch(&__pyx_t_8, &__pyx_t_7, &__pyx_t_6);
  122056. __Pyx_XGOTREF(__pyx_t_8);
  122057. __Pyx_XGOTREF(__pyx_t_7);
  122058. __Pyx_XGOTREF(__pyx_t_6);
  122059. __Pyx_XGOTREF(__pyx_t_14);
  122060. __Pyx_XGOTREF(__pyx_t_15);
  122061. __Pyx_XGOTREF(__pyx_t_16);
  122062. __pyx_t_9 = __pyx_lineno; __pyx_t_12 = __pyx_clineno; __pyx_t_13 = __pyx_filename;
  122063. {
  122064. __pyx_t_11 = (__pyx_v_pybuf_inited != 0);
  122065. if (__pyx_t_11) {
  122066. /* "uvloop/sslproto.pyx":697
  122067. * finally:
  122068. * if pybuf_inited:
  122069. * PyBuffer_Release(&pybuf) # <<<<<<<<<<<<<<
  122070. * if offset > 0:
  122071. * self._app_protocol_buffer_updated(offset)
  122072. */
  122073. PyBuffer_Release((&__pyx_v_pybuf));
  122074. /* "uvloop/sslproto.pyx":696
  122075. * pass
  122076. * finally:
  122077. * if pybuf_inited: # <<<<<<<<<<<<<<
  122078. * PyBuffer_Release(&pybuf)
  122079. * if offset > 0:
  122080. */
  122081. }
  122082. }
  122083. if (PY_MAJOR_VERSION >= 3) {
  122084. __Pyx_XGIVEREF(__pyx_t_14);
  122085. __Pyx_XGIVEREF(__pyx_t_15);
  122086. __Pyx_XGIVEREF(__pyx_t_16);
  122087. __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_15, __pyx_t_16);
  122088. }
  122089. __Pyx_XGIVEREF(__pyx_t_8);
  122090. __Pyx_XGIVEREF(__pyx_t_7);
  122091. __Pyx_XGIVEREF(__pyx_t_6);
  122092. __Pyx_ErrRestore(__pyx_t_8, __pyx_t_7, __pyx_t_6);
  122093. __pyx_t_8 = 0; __pyx_t_7 = 0; __pyx_t_6 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0;
  122094. __pyx_lineno = __pyx_t_9; __pyx_clineno = __pyx_t_12; __pyx_filename = __pyx_t_13;
  122095. goto __pyx_L1_error;
  122096. }
  122097. __pyx_L5:;
  122098. }
  122099. /* "uvloop/sslproto.pyx":698
  122100. * if pybuf_inited:
  122101. * PyBuffer_Release(&pybuf)
  122102. * if offset > 0: # <<<<<<<<<<<<<<
  122103. * self._app_protocol_buffer_updated(offset)
  122104. * if not count:
  122105. */
  122106. __pyx_t_11 = ((__pyx_v_offset > 0) != 0);
  122107. if (__pyx_t_11) {
  122108. /* "uvloop/sslproto.pyx":699
  122109. * PyBuffer_Release(&pybuf)
  122110. * if offset > 0:
  122111. * self._app_protocol_buffer_updated(offset) # <<<<<<<<<<<<<<
  122112. * if not count:
  122113. * # close_notify
  122114. */
  122115. __pyx_t_10 = __Pyx_PyInt_FromSize_t(__pyx_v_offset); if (unlikely(!__pyx_t_10)) __PYX_ERR(22, 699, __pyx_L1_error)
  122116. __Pyx_GOTREF(__pyx_t_10);
  122117. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_self->_app_protocol_buffer_updated);
  122118. __pyx_t_1 = __pyx_cur_scope->__pyx_v_self->_app_protocol_buffer_updated; __pyx_t_2 = NULL;
  122119. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
  122120. __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
  122121. if (likely(__pyx_t_2)) {
  122122. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
  122123. __Pyx_INCREF(__pyx_t_2);
  122124. __Pyx_INCREF(function);
  122125. __Pyx_DECREF_SET(__pyx_t_1, function);
  122126. }
  122127. }
  122128. __pyx_t_4 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_2, __pyx_t_10) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_10);
  122129. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  122130. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  122131. if (unlikely(!__pyx_t_4)) __PYX_ERR(22, 699, __pyx_L1_error)
  122132. __Pyx_GOTREF(__pyx_t_4);
  122133. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  122134. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  122135. /* "uvloop/sslproto.pyx":698
  122136. * if pybuf_inited:
  122137. * PyBuffer_Release(&pybuf)
  122138. * if offset > 0: # <<<<<<<<<<<<<<
  122139. * self._app_protocol_buffer_updated(offset)
  122140. * if not count:
  122141. */
  122142. }
  122143. /* "uvloop/sslproto.pyx":700
  122144. * if offset > 0:
  122145. * self._app_protocol_buffer_updated(offset)
  122146. * if not count: # <<<<<<<<<<<<<<
  122147. * # close_notify
  122148. * self._call_eof_received()
  122149. */
  122150. __pyx_t_11 = ((!(__pyx_v_count != 0)) != 0);
  122151. if (__pyx_t_11) {
  122152. /* "uvloop/sslproto.pyx":702
  122153. * if not count:
  122154. * # close_notify
  122155. * self._call_eof_received() # <<<<<<<<<<<<<<
  122156. * self._start_shutdown()
  122157. *
  122158. */
  122159. __pyx_t_4 = ((struct __pyx_vtabstruct_6uvloop_4loop_SSLProtocol *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->_call_eof_received(__pyx_cur_scope->__pyx_v_self); if (unlikely(!__pyx_t_4)) __PYX_ERR(22, 702, __pyx_L1_error)
  122160. __Pyx_GOTREF(__pyx_t_4);
  122161. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  122162. /* "uvloop/sslproto.pyx":703
  122163. * # close_notify
  122164. * self._call_eof_received()
  122165. * self._start_shutdown() # <<<<<<<<<<<<<<
  122166. *
  122167. * cdef _do_read__copied(self):
  122168. */
  122169. __pyx_t_4 = ((struct __pyx_vtabstruct_6uvloop_4loop_SSLProtocol *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->_start_shutdown(__pyx_cur_scope->__pyx_v_self); if (unlikely(!__pyx_t_4)) __PYX_ERR(22, 703, __pyx_L1_error)
  122170. __Pyx_GOTREF(__pyx_t_4);
  122171. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  122172. /* "uvloop/sslproto.pyx":700
  122173. * if offset > 0:
  122174. * self._app_protocol_buffer_updated(offset)
  122175. * if not count: # <<<<<<<<<<<<<<
  122176. * # close_notify
  122177. * self._call_eof_received()
  122178. */
  122179. }
  122180. /* "uvloop/sslproto.pyx":662
  122181. * self._fatal_error(ex, 'Fatal error on SSL protocol')
  122182. *
  122183. * cdef _do_read__buffered(self): # <<<<<<<<<<<<<<
  122184. * cdef:
  122185. * Py_buffer pybuf
  122186. */
  122187. /* function exit code */
  122188. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  122189. goto __pyx_L0;
  122190. __pyx_L1_error:;
  122191. __Pyx_XDECREF(__pyx_t_1);
  122192. __Pyx_XDECREF(__pyx_t_2);
  122193. __Pyx_XDECREF(__pyx_t_3);
  122194. __Pyx_XDECREF(__pyx_t_4);
  122195. __Pyx_XDECREF(__pyx_t_10);
  122196. __Pyx_AddTraceback("uvloop.loop.SSLProtocol._do_read__buffered", __pyx_clineno, __pyx_lineno, __pyx_filename);
  122197. __pyx_r = 0;
  122198. __pyx_L0:;
  122199. __Pyx_XDECREF(__pyx_v_buf);
  122200. __Pyx_XDECREF(__pyx_v_exc);
  122201. __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  122202. __Pyx_XGIVEREF(__pyx_r);
  122203. __Pyx_RefNannyFinishContext();
  122204. return __pyx_r;
  122205. }
  122206. /* "uvloop/sslproto.pyx":705
  122207. * self._start_shutdown()
  122208. *
  122209. * cdef _do_read__copied(self): # <<<<<<<<<<<<<<
  122210. * cdef:
  122211. * list data
  122212. */
  122213. static PyObject *__pyx_f_6uvloop_4loop_11SSLProtocol__do_read__copied(struct __pyx_obj_6uvloop_4loop_SSLProtocol *__pyx_v_self) {
  122214. PyObject *__pyx_v_data = 0;
  122215. PyObject *__pyx_v_first = 0;
  122216. PyObject *__pyx_v_chunk = 0;
  122217. int __pyx_v_zero;
  122218. int __pyx_v_one;
  122219. CYTHON_UNUSED PyObject *__pyx_v_exc = NULL;
  122220. PyObject *__pyx_r = NULL;
  122221. __Pyx_RefNannyDeclarations
  122222. PyObject *__pyx_t_1 = NULL;
  122223. PyObject *__pyx_t_2 = NULL;
  122224. PyObject *__pyx_t_3 = NULL;
  122225. PyObject *__pyx_t_4 = NULL;
  122226. PyObject *__pyx_t_5 = NULL;
  122227. PyObject *__pyx_t_6 = NULL;
  122228. int __pyx_t_7;
  122229. int __pyx_t_8;
  122230. int __pyx_t_9;
  122231. int __pyx_t_10;
  122232. PyObject *__pyx_t_11 = NULL;
  122233. __Pyx_RefNannySetupContext("_do_read__copied", 0);
  122234. /* "uvloop/sslproto.pyx":708
  122235. * cdef:
  122236. * list data
  122237. * bytes first, chunk = b'1' # <<<<<<<<<<<<<<
  122238. * bint zero = True, one = False
  122239. *
  122240. */
  122241. __Pyx_INCREF(__pyx_kp_b_1);
  122242. __pyx_v_chunk = __pyx_kp_b_1;
  122243. /* "uvloop/sslproto.pyx":709
  122244. * list data
  122245. * bytes first, chunk = b'1'
  122246. * bint zero = True, one = False # <<<<<<<<<<<<<<
  122247. *
  122248. * try:
  122249. */
  122250. __pyx_v_zero = 1;
  122251. __pyx_v_one = 0;
  122252. /* "uvloop/sslproto.pyx":711
  122253. * bint zero = True, one = False
  122254. *
  122255. * try: # <<<<<<<<<<<<<<
  122256. * while True:
  122257. * chunk = self._sslobj_read(SSL_READ_MAX_SIZE)
  122258. */
  122259. {
  122260. __Pyx_PyThreadState_declare
  122261. __Pyx_PyThreadState_assign
  122262. __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
  122263. __Pyx_XGOTREF(__pyx_t_1);
  122264. __Pyx_XGOTREF(__pyx_t_2);
  122265. __Pyx_XGOTREF(__pyx_t_3);
  122266. /*try:*/ {
  122267. /* "uvloop/sslproto.pyx":712
  122268. *
  122269. * try:
  122270. * while True: # <<<<<<<<<<<<<<
  122271. * chunk = self._sslobj_read(SSL_READ_MAX_SIZE)
  122272. * if not chunk:
  122273. */
  122274. while (1) {
  122275. /* "uvloop/sslproto.pyx":713
  122276. * try:
  122277. * while True:
  122278. * chunk = self._sslobj_read(SSL_READ_MAX_SIZE) # <<<<<<<<<<<<<<
  122279. * if not chunk:
  122280. * break
  122281. */
  122282. __Pyx_INCREF(__pyx_v_self->_sslobj_read);
  122283. __pyx_t_5 = __pyx_v_self->_sslobj_read; __pyx_t_6 = NULL;
  122284. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
  122285. __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
  122286. if (likely(__pyx_t_6)) {
  122287. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
  122288. __Pyx_INCREF(__pyx_t_6);
  122289. __Pyx_INCREF(function);
  122290. __Pyx_DECREF_SET(__pyx_t_5, function);
  122291. }
  122292. }
  122293. __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_int_262144) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_int_262144);
  122294. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  122295. if (unlikely(!__pyx_t_4)) __PYX_ERR(22, 713, __pyx_L3_error)
  122296. __Pyx_GOTREF(__pyx_t_4);
  122297. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  122298. if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_4)->tp_name), 0))) __PYX_ERR(22, 713, __pyx_L3_error)
  122299. __Pyx_DECREF_SET(__pyx_v_chunk, ((PyObject*)__pyx_t_4));
  122300. __pyx_t_4 = 0;
  122301. /* "uvloop/sslproto.pyx":714
  122302. * while True:
  122303. * chunk = self._sslobj_read(SSL_READ_MAX_SIZE)
  122304. * if not chunk: # <<<<<<<<<<<<<<
  122305. * break
  122306. * if zero:
  122307. */
  122308. __pyx_t_7 = (__pyx_v_chunk != Py_None)&&(PyBytes_GET_SIZE(__pyx_v_chunk) != 0);
  122309. __pyx_t_8 = ((!__pyx_t_7) != 0);
  122310. if (__pyx_t_8) {
  122311. /* "uvloop/sslproto.pyx":715
  122312. * chunk = self._sslobj_read(SSL_READ_MAX_SIZE)
  122313. * if not chunk:
  122314. * break # <<<<<<<<<<<<<<
  122315. * if zero:
  122316. * zero = False
  122317. */
  122318. goto __pyx_L10_break;
  122319. /* "uvloop/sslproto.pyx":714
  122320. * while True:
  122321. * chunk = self._sslobj_read(SSL_READ_MAX_SIZE)
  122322. * if not chunk: # <<<<<<<<<<<<<<
  122323. * break
  122324. * if zero:
  122325. */
  122326. }
  122327. /* "uvloop/sslproto.pyx":716
  122328. * if not chunk:
  122329. * break
  122330. * if zero: # <<<<<<<<<<<<<<
  122331. * zero = False
  122332. * one = True
  122333. */
  122334. __pyx_t_8 = (__pyx_v_zero != 0);
  122335. if (__pyx_t_8) {
  122336. /* "uvloop/sslproto.pyx":717
  122337. * break
  122338. * if zero:
  122339. * zero = False # <<<<<<<<<<<<<<
  122340. * one = True
  122341. * first = chunk
  122342. */
  122343. __pyx_v_zero = 0;
  122344. /* "uvloop/sslproto.pyx":718
  122345. * if zero:
  122346. * zero = False
  122347. * one = True # <<<<<<<<<<<<<<
  122348. * first = chunk
  122349. * elif one:
  122350. */
  122351. __pyx_v_one = 1;
  122352. /* "uvloop/sslproto.pyx":719
  122353. * zero = False
  122354. * one = True
  122355. * first = chunk # <<<<<<<<<<<<<<
  122356. * elif one:
  122357. * one = False
  122358. */
  122359. __Pyx_INCREF(__pyx_v_chunk);
  122360. __Pyx_XDECREF_SET(__pyx_v_first, __pyx_v_chunk);
  122361. /* "uvloop/sslproto.pyx":716
  122362. * if not chunk:
  122363. * break
  122364. * if zero: # <<<<<<<<<<<<<<
  122365. * zero = False
  122366. * one = True
  122367. */
  122368. goto __pyx_L12;
  122369. }
  122370. /* "uvloop/sslproto.pyx":720
  122371. * one = True
  122372. * first = chunk
  122373. * elif one: # <<<<<<<<<<<<<<
  122374. * one = False
  122375. * data = [first, chunk]
  122376. */
  122377. __pyx_t_8 = (__pyx_v_one != 0);
  122378. if (__pyx_t_8) {
  122379. /* "uvloop/sslproto.pyx":721
  122380. * first = chunk
  122381. * elif one:
  122382. * one = False # <<<<<<<<<<<<<<
  122383. * data = [first, chunk]
  122384. * else:
  122385. */
  122386. __pyx_v_one = 0;
  122387. /* "uvloop/sslproto.pyx":722
  122388. * elif one:
  122389. * one = False
  122390. * data = [first, chunk] # <<<<<<<<<<<<<<
  122391. * else:
  122392. * data.append(chunk)
  122393. */
  122394. if (unlikely(!__pyx_v_first)) { __Pyx_RaiseUnboundLocalError("first"); __PYX_ERR(22, 722, __pyx_L3_error) }
  122395. __pyx_t_4 = PyList_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(22, 722, __pyx_L3_error)
  122396. __Pyx_GOTREF(__pyx_t_4);
  122397. __Pyx_INCREF(__pyx_v_first);
  122398. __Pyx_GIVEREF(__pyx_v_first);
  122399. PyList_SET_ITEM(__pyx_t_4, 0, __pyx_v_first);
  122400. __Pyx_INCREF(__pyx_v_chunk);
  122401. __Pyx_GIVEREF(__pyx_v_chunk);
  122402. PyList_SET_ITEM(__pyx_t_4, 1, __pyx_v_chunk);
  122403. __Pyx_XDECREF_SET(__pyx_v_data, ((PyObject*)__pyx_t_4));
  122404. __pyx_t_4 = 0;
  122405. /* "uvloop/sslproto.pyx":720
  122406. * one = True
  122407. * first = chunk
  122408. * elif one: # <<<<<<<<<<<<<<
  122409. * one = False
  122410. * data = [first, chunk]
  122411. */
  122412. goto __pyx_L12;
  122413. }
  122414. /* "uvloop/sslproto.pyx":724
  122415. * data = [first, chunk]
  122416. * else:
  122417. * data.append(chunk) # <<<<<<<<<<<<<<
  122418. * except ssl_SSLAgainErrors as exc:
  122419. * pass
  122420. */
  122421. /*else*/ {
  122422. if (unlikely(!__pyx_v_data)) { __Pyx_RaiseUnboundLocalError("data"); __PYX_ERR(22, 724, __pyx_L3_error) }
  122423. __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_data, __pyx_v_chunk); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(22, 724, __pyx_L3_error)
  122424. }
  122425. __pyx_L12:;
  122426. }
  122427. __pyx_L10_break:;
  122428. /* "uvloop/sslproto.pyx":711
  122429. * bint zero = True, one = False
  122430. *
  122431. * try: # <<<<<<<<<<<<<<
  122432. * while True:
  122433. * chunk = self._sslobj_read(SSL_READ_MAX_SIZE)
  122434. */
  122435. }
  122436. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  122437. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  122438. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  122439. goto __pyx_L8_try_end;
  122440. __pyx_L3_error:;
  122441. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  122442. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  122443. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  122444. /* "uvloop/sslproto.pyx":725
  122445. * else:
  122446. * data.append(chunk)
  122447. * except ssl_SSLAgainErrors as exc: # <<<<<<<<<<<<<<
  122448. * pass
  122449. * if one:
  122450. */
  122451. __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(__pyx_v_6uvloop_4loop_ssl_SSLAgainErrors);
  122452. if (__pyx_t_10) {
  122453. __Pyx_AddTraceback("uvloop.loop.SSLProtocol._do_read__copied", __pyx_clineno, __pyx_lineno, __pyx_filename);
  122454. if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6) < 0) __PYX_ERR(22, 725, __pyx_L5_except_error)
  122455. __Pyx_GOTREF(__pyx_t_4);
  122456. __Pyx_GOTREF(__pyx_t_5);
  122457. __Pyx_GOTREF(__pyx_t_6);
  122458. __Pyx_INCREF(__pyx_t_5);
  122459. __pyx_v_exc = __pyx_t_5;
  122460. /*try:*/ {
  122461. }
  122462. /*finally:*/ {
  122463. /*normal exit:*/{
  122464. __Pyx_DECREF(__pyx_v_exc);
  122465. __pyx_v_exc = NULL;
  122466. goto __pyx_L19;
  122467. }
  122468. __pyx_L19:;
  122469. }
  122470. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  122471. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  122472. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  122473. goto __pyx_L4_exception_handled;
  122474. }
  122475. goto __pyx_L5_except_error;
  122476. __pyx_L5_except_error:;
  122477. /* "uvloop/sslproto.pyx":711
  122478. * bint zero = True, one = False
  122479. *
  122480. * try: # <<<<<<<<<<<<<<
  122481. * while True:
  122482. * chunk = self._sslobj_read(SSL_READ_MAX_SIZE)
  122483. */
  122484. __Pyx_XGIVEREF(__pyx_t_1);
  122485. __Pyx_XGIVEREF(__pyx_t_2);
  122486. __Pyx_XGIVEREF(__pyx_t_3);
  122487. __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
  122488. goto __pyx_L1_error;
  122489. __pyx_L4_exception_handled:;
  122490. __Pyx_XGIVEREF(__pyx_t_1);
  122491. __Pyx_XGIVEREF(__pyx_t_2);
  122492. __Pyx_XGIVEREF(__pyx_t_3);
  122493. __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
  122494. __pyx_L8_try_end:;
  122495. }
  122496. /* "uvloop/sslproto.pyx":727
  122497. * except ssl_SSLAgainErrors as exc:
  122498. * pass
  122499. * if one: # <<<<<<<<<<<<<<
  122500. * self._app_protocol.data_received(first)
  122501. * elif not zero:
  122502. */
  122503. __pyx_t_8 = (__pyx_v_one != 0);
  122504. if (__pyx_t_8) {
  122505. /* "uvloop/sslproto.pyx":728
  122506. * pass
  122507. * if one:
  122508. * self._app_protocol.data_received(first) # <<<<<<<<<<<<<<
  122509. * elif not zero:
  122510. * self._app_protocol.data_received(b''.join(data))
  122511. */
  122512. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_app_protocol, __pyx_n_s_data_received); if (unlikely(!__pyx_t_5)) __PYX_ERR(22, 728, __pyx_L1_error)
  122513. __Pyx_GOTREF(__pyx_t_5);
  122514. if (unlikely(!__pyx_v_first)) { __Pyx_RaiseUnboundLocalError("first"); __PYX_ERR(22, 728, __pyx_L1_error) }
  122515. __pyx_t_4 = NULL;
  122516. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
  122517. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
  122518. if (likely(__pyx_t_4)) {
  122519. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
  122520. __Pyx_INCREF(__pyx_t_4);
  122521. __Pyx_INCREF(function);
  122522. __Pyx_DECREF_SET(__pyx_t_5, function);
  122523. }
  122524. }
  122525. __pyx_t_6 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_4, __pyx_v_first) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_first);
  122526. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  122527. if (unlikely(!__pyx_t_6)) __PYX_ERR(22, 728, __pyx_L1_error)
  122528. __Pyx_GOTREF(__pyx_t_6);
  122529. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  122530. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  122531. /* "uvloop/sslproto.pyx":727
  122532. * except ssl_SSLAgainErrors as exc:
  122533. * pass
  122534. * if one: # <<<<<<<<<<<<<<
  122535. * self._app_protocol.data_received(first)
  122536. * elif not zero:
  122537. */
  122538. goto __pyx_L20;
  122539. }
  122540. /* "uvloop/sslproto.pyx":729
  122541. * if one:
  122542. * self._app_protocol.data_received(first)
  122543. * elif not zero: # <<<<<<<<<<<<<<
  122544. * self._app_protocol.data_received(b''.join(data))
  122545. * if not chunk:
  122546. */
  122547. __pyx_t_8 = ((!(__pyx_v_zero != 0)) != 0);
  122548. if (__pyx_t_8) {
  122549. /* "uvloop/sslproto.pyx":730
  122550. * self._app_protocol.data_received(first)
  122551. * elif not zero:
  122552. * self._app_protocol.data_received(b''.join(data)) # <<<<<<<<<<<<<<
  122553. * if not chunk:
  122554. * # close_notify
  122555. */
  122556. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_app_protocol, __pyx_n_s_data_received); if (unlikely(!__pyx_t_5)) __PYX_ERR(22, 730, __pyx_L1_error)
  122557. __Pyx_GOTREF(__pyx_t_5);
  122558. if (unlikely(!__pyx_v_data)) { __Pyx_RaiseUnboundLocalError("data"); __PYX_ERR(22, 730, __pyx_L1_error) }
  122559. __pyx_t_4 = __Pyx_PyBytes_Join(__pyx_kp_b__2, __pyx_v_data); if (unlikely(!__pyx_t_4)) __PYX_ERR(22, 730, __pyx_L1_error)
  122560. __Pyx_GOTREF(__pyx_t_4);
  122561. __pyx_t_11 = NULL;
  122562. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
  122563. __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_5);
  122564. if (likely(__pyx_t_11)) {
  122565. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
  122566. __Pyx_INCREF(__pyx_t_11);
  122567. __Pyx_INCREF(function);
  122568. __Pyx_DECREF_SET(__pyx_t_5, function);
  122569. }
  122570. }
  122571. __pyx_t_6 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_11, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4);
  122572. __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
  122573. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  122574. if (unlikely(!__pyx_t_6)) __PYX_ERR(22, 730, __pyx_L1_error)
  122575. __Pyx_GOTREF(__pyx_t_6);
  122576. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  122577. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  122578. /* "uvloop/sslproto.pyx":729
  122579. * if one:
  122580. * self._app_protocol.data_received(first)
  122581. * elif not zero: # <<<<<<<<<<<<<<
  122582. * self._app_protocol.data_received(b''.join(data))
  122583. * if not chunk:
  122584. */
  122585. }
  122586. __pyx_L20:;
  122587. /* "uvloop/sslproto.pyx":731
  122588. * elif not zero:
  122589. * self._app_protocol.data_received(b''.join(data))
  122590. * if not chunk: # <<<<<<<<<<<<<<
  122591. * # close_notify
  122592. * self._call_eof_received()
  122593. */
  122594. __pyx_t_8 = (__pyx_v_chunk != Py_None)&&(PyBytes_GET_SIZE(__pyx_v_chunk) != 0);
  122595. __pyx_t_7 = ((!__pyx_t_8) != 0);
  122596. if (__pyx_t_7) {
  122597. /* "uvloop/sslproto.pyx":733
  122598. * if not chunk:
  122599. * # close_notify
  122600. * self._call_eof_received() # <<<<<<<<<<<<<<
  122601. * self._start_shutdown()
  122602. *
  122603. */
  122604. __pyx_t_6 = ((struct __pyx_vtabstruct_6uvloop_4loop_SSLProtocol *)__pyx_v_self->__pyx_vtab)->_call_eof_received(__pyx_v_self); if (unlikely(!__pyx_t_6)) __PYX_ERR(22, 733, __pyx_L1_error)
  122605. __Pyx_GOTREF(__pyx_t_6);
  122606. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  122607. /* "uvloop/sslproto.pyx":734
  122608. * # close_notify
  122609. * self._call_eof_received()
  122610. * self._start_shutdown() # <<<<<<<<<<<<<<
  122611. *
  122612. * cdef _call_eof_received(self):
  122613. */
  122614. __pyx_t_6 = ((struct __pyx_vtabstruct_6uvloop_4loop_SSLProtocol *)__pyx_v_self->__pyx_vtab)->_start_shutdown(__pyx_v_self); if (unlikely(!__pyx_t_6)) __PYX_ERR(22, 734, __pyx_L1_error)
  122615. __Pyx_GOTREF(__pyx_t_6);
  122616. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  122617. /* "uvloop/sslproto.pyx":731
  122618. * elif not zero:
  122619. * self._app_protocol.data_received(b''.join(data))
  122620. * if not chunk: # <<<<<<<<<<<<<<
  122621. * # close_notify
  122622. * self._call_eof_received()
  122623. */
  122624. }
  122625. /* "uvloop/sslproto.pyx":705
  122626. * self._start_shutdown()
  122627. *
  122628. * cdef _do_read__copied(self): # <<<<<<<<<<<<<<
  122629. * cdef:
  122630. * list data
  122631. */
  122632. /* function exit code */
  122633. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  122634. goto __pyx_L0;
  122635. __pyx_L1_error:;
  122636. __Pyx_XDECREF(__pyx_t_4);
  122637. __Pyx_XDECREF(__pyx_t_5);
  122638. __Pyx_XDECREF(__pyx_t_6);
  122639. __Pyx_XDECREF(__pyx_t_11);
  122640. __Pyx_AddTraceback("uvloop.loop.SSLProtocol._do_read__copied", __pyx_clineno, __pyx_lineno, __pyx_filename);
  122641. __pyx_r = 0;
  122642. __pyx_L0:;
  122643. __Pyx_XDECREF(__pyx_v_data);
  122644. __Pyx_XDECREF(__pyx_v_first);
  122645. __Pyx_XDECREF(__pyx_v_chunk);
  122646. __Pyx_XDECREF(__pyx_v_exc);
  122647. __Pyx_XGIVEREF(__pyx_r);
  122648. __Pyx_RefNannyFinishContext();
  122649. return __pyx_r;
  122650. }
  122651. /* "uvloop/sslproto.pyx":736
  122652. * self._start_shutdown()
  122653. *
  122654. * cdef _call_eof_received(self): # <<<<<<<<<<<<<<
  122655. * try:
  122656. * if not self._eof_received:
  122657. */
  122658. static PyObject *__pyx_f_6uvloop_4loop_11SSLProtocol__call_eof_received(struct __pyx_obj_6uvloop_4loop_SSLProtocol *__pyx_v_self) {
  122659. PyObject *__pyx_v_keep_open = NULL;
  122660. PyObject *__pyx_v_ex = NULL;
  122661. PyObject *__pyx_r = NULL;
  122662. __Pyx_RefNannyDeclarations
  122663. PyObject *__pyx_t_1 = NULL;
  122664. PyObject *__pyx_t_2 = NULL;
  122665. PyObject *__pyx_t_3 = NULL;
  122666. int __pyx_t_4;
  122667. PyObject *__pyx_t_5 = NULL;
  122668. PyObject *__pyx_t_6 = NULL;
  122669. PyObject *__pyx_t_7 = NULL;
  122670. int __pyx_t_8;
  122671. PyObject *__pyx_t_9 = NULL;
  122672. struct __pyx_opt_args_6uvloop_4loop_11SSLProtocol__fatal_error __pyx_t_10;
  122673. int __pyx_t_11;
  122674. char const *__pyx_t_12;
  122675. PyObject *__pyx_t_13 = NULL;
  122676. PyObject *__pyx_t_14 = NULL;
  122677. PyObject *__pyx_t_15 = NULL;
  122678. PyObject *__pyx_t_16 = NULL;
  122679. PyObject *__pyx_t_17 = NULL;
  122680. PyObject *__pyx_t_18 = NULL;
  122681. __Pyx_RefNannySetupContext("_call_eof_received", 0);
  122682. /* "uvloop/sslproto.pyx":737
  122683. *
  122684. * cdef _call_eof_received(self):
  122685. * try: # <<<<<<<<<<<<<<
  122686. * if not self._eof_received:
  122687. * self._eof_received = True
  122688. */
  122689. {
  122690. __Pyx_PyThreadState_declare
  122691. __Pyx_PyThreadState_assign
  122692. __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
  122693. __Pyx_XGOTREF(__pyx_t_1);
  122694. __Pyx_XGOTREF(__pyx_t_2);
  122695. __Pyx_XGOTREF(__pyx_t_3);
  122696. /*try:*/ {
  122697. /* "uvloop/sslproto.pyx":738
  122698. * cdef _call_eof_received(self):
  122699. * try:
  122700. * if not self._eof_received: # <<<<<<<<<<<<<<
  122701. * self._eof_received = True
  122702. * keep_open = self._app_protocol.eof_received()
  122703. */
  122704. __pyx_t_4 = ((!(__pyx_v_self->_eof_received != 0)) != 0);
  122705. if (__pyx_t_4) {
  122706. /* "uvloop/sslproto.pyx":739
  122707. * try:
  122708. * if not self._eof_received:
  122709. * self._eof_received = True # <<<<<<<<<<<<<<
  122710. * keep_open = self._app_protocol.eof_received()
  122711. * if keep_open:
  122712. */
  122713. __pyx_v_self->_eof_received = 1;
  122714. /* "uvloop/sslproto.pyx":740
  122715. * if not self._eof_received:
  122716. * self._eof_received = True
  122717. * keep_open = self._app_protocol.eof_received() # <<<<<<<<<<<<<<
  122718. * if keep_open:
  122719. * aio_logger.warning('returning true from eof_received() '
  122720. */
  122721. __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_app_protocol, __pyx_n_s_eof_received); if (unlikely(!__pyx_t_6)) __PYX_ERR(22, 740, __pyx_L3_error)
  122722. __Pyx_GOTREF(__pyx_t_6);
  122723. __pyx_t_7 = NULL;
  122724. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
  122725. __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
  122726. if (likely(__pyx_t_7)) {
  122727. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
  122728. __Pyx_INCREF(__pyx_t_7);
  122729. __Pyx_INCREF(function);
  122730. __Pyx_DECREF_SET(__pyx_t_6, function);
  122731. }
  122732. }
  122733. __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
  122734. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  122735. if (unlikely(!__pyx_t_5)) __PYX_ERR(22, 740, __pyx_L3_error)
  122736. __Pyx_GOTREF(__pyx_t_5);
  122737. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  122738. __pyx_v_keep_open = __pyx_t_5;
  122739. __pyx_t_5 = 0;
  122740. /* "uvloop/sslproto.pyx":741
  122741. * self._eof_received = True
  122742. * keep_open = self._app_protocol.eof_received()
  122743. * if keep_open: # <<<<<<<<<<<<<<
  122744. * aio_logger.warning('returning true from eof_received() '
  122745. * 'has no effect when using ssl')
  122746. */
  122747. __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_keep_open); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(22, 741, __pyx_L3_error)
  122748. if (__pyx_t_4) {
  122749. /* "uvloop/sslproto.pyx":742
  122750. * keep_open = self._app_protocol.eof_received()
  122751. * if keep_open:
  122752. * aio_logger.warning('returning true from eof_received() ' # <<<<<<<<<<<<<<
  122753. * 'has no effect when using ssl')
  122754. * except Exception as ex:
  122755. */
  122756. __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_6uvloop_4loop_aio_logger, __pyx_n_s_warning); if (unlikely(!__pyx_t_6)) __PYX_ERR(22, 742, __pyx_L3_error)
  122757. __Pyx_GOTREF(__pyx_t_6);
  122758. __pyx_t_7 = NULL;
  122759. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
  122760. __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
  122761. if (likely(__pyx_t_7)) {
  122762. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
  122763. __Pyx_INCREF(__pyx_t_7);
  122764. __Pyx_INCREF(function);
  122765. __Pyx_DECREF_SET(__pyx_t_6, function);
  122766. }
  122767. }
  122768. __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_kp_u_returning_true_from_eof_received) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_kp_u_returning_true_from_eof_received);
  122769. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  122770. if (unlikely(!__pyx_t_5)) __PYX_ERR(22, 742, __pyx_L3_error)
  122771. __Pyx_GOTREF(__pyx_t_5);
  122772. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  122773. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  122774. /* "uvloop/sslproto.pyx":741
  122775. * self._eof_received = True
  122776. * keep_open = self._app_protocol.eof_received()
  122777. * if keep_open: # <<<<<<<<<<<<<<
  122778. * aio_logger.warning('returning true from eof_received() '
  122779. * 'has no effect when using ssl')
  122780. */
  122781. }
  122782. /* "uvloop/sslproto.pyx":738
  122783. * cdef _call_eof_received(self):
  122784. * try:
  122785. * if not self._eof_received: # <<<<<<<<<<<<<<
  122786. * self._eof_received = True
  122787. * keep_open = self._app_protocol.eof_received()
  122788. */
  122789. }
  122790. /* "uvloop/sslproto.pyx":737
  122791. *
  122792. * cdef _call_eof_received(self):
  122793. * try: # <<<<<<<<<<<<<<
  122794. * if not self._eof_received:
  122795. * self._eof_received = True
  122796. */
  122797. }
  122798. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  122799. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  122800. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  122801. goto __pyx_L8_try_end;
  122802. __pyx_L3_error:;
  122803. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  122804. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  122805. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  122806. /* "uvloop/sslproto.pyx":744
  122807. * aio_logger.warning('returning true from eof_received() '
  122808. * 'has no effect when using ssl')
  122809. * except Exception as ex: # <<<<<<<<<<<<<<
  122810. * self._fatal_error(ex, 'Error calling eof_received()')
  122811. *
  122812. */
  122813. __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
  122814. if (__pyx_t_8) {
  122815. __Pyx_AddTraceback("uvloop.loop.SSLProtocol._call_eof_received", __pyx_clineno, __pyx_lineno, __pyx_filename);
  122816. if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(22, 744, __pyx_L5_except_error)
  122817. __Pyx_GOTREF(__pyx_t_5);
  122818. __Pyx_GOTREF(__pyx_t_6);
  122819. __Pyx_GOTREF(__pyx_t_7);
  122820. __Pyx_INCREF(__pyx_t_6);
  122821. __pyx_v_ex = __pyx_t_6;
  122822. /*try:*/ {
  122823. /* "uvloop/sslproto.pyx":745
  122824. * 'has no effect when using ssl')
  122825. * except Exception as ex:
  122826. * self._fatal_error(ex, 'Error calling eof_received()') # <<<<<<<<<<<<<<
  122827. *
  122828. * # Flow control for writes from APP socket
  122829. */
  122830. __pyx_t_10.__pyx_n = 1;
  122831. __pyx_t_10.message = __pyx_kp_u_Error_calling_eof_received;
  122832. __pyx_t_9 = ((struct __pyx_vtabstruct_6uvloop_4loop_SSLProtocol *)__pyx_v_self->__pyx_vtab)->_fatal_error(__pyx_v_self, __pyx_v_ex, &__pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(22, 745, __pyx_L16_error)
  122833. __Pyx_GOTREF(__pyx_t_9);
  122834. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  122835. }
  122836. /* "uvloop/sslproto.pyx":744
  122837. * aio_logger.warning('returning true from eof_received() '
  122838. * 'has no effect when using ssl')
  122839. * except Exception as ex: # <<<<<<<<<<<<<<
  122840. * self._fatal_error(ex, 'Error calling eof_received()')
  122841. *
  122842. */
  122843. /*finally:*/ {
  122844. /*normal exit:*/{
  122845. __Pyx_DECREF(__pyx_v_ex);
  122846. __pyx_v_ex = NULL;
  122847. goto __pyx_L17;
  122848. }
  122849. __pyx_L16_error:;
  122850. /*exception exit:*/{
  122851. __Pyx_PyThreadState_declare
  122852. __Pyx_PyThreadState_assign
  122853. __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0;
  122854. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  122855. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18);
  122856. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15) < 0)) __Pyx_ErrFetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
  122857. __Pyx_XGOTREF(__pyx_t_13);
  122858. __Pyx_XGOTREF(__pyx_t_14);
  122859. __Pyx_XGOTREF(__pyx_t_15);
  122860. __Pyx_XGOTREF(__pyx_t_16);
  122861. __Pyx_XGOTREF(__pyx_t_17);
  122862. __Pyx_XGOTREF(__pyx_t_18);
  122863. __pyx_t_8 = __pyx_lineno; __pyx_t_11 = __pyx_clineno; __pyx_t_12 = __pyx_filename;
  122864. {
  122865. __Pyx_DECREF(__pyx_v_ex);
  122866. __pyx_v_ex = NULL;
  122867. }
  122868. if (PY_MAJOR_VERSION >= 3) {
  122869. __Pyx_XGIVEREF(__pyx_t_16);
  122870. __Pyx_XGIVEREF(__pyx_t_17);
  122871. __Pyx_XGIVEREF(__pyx_t_18);
  122872. __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18);
  122873. }
  122874. __Pyx_XGIVEREF(__pyx_t_13);
  122875. __Pyx_XGIVEREF(__pyx_t_14);
  122876. __Pyx_XGIVEREF(__pyx_t_15);
  122877. __Pyx_ErrRestore(__pyx_t_13, __pyx_t_14, __pyx_t_15);
  122878. __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0;
  122879. __pyx_lineno = __pyx_t_8; __pyx_clineno = __pyx_t_11; __pyx_filename = __pyx_t_12;
  122880. goto __pyx_L5_except_error;
  122881. }
  122882. __pyx_L17:;
  122883. }
  122884. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  122885. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  122886. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  122887. goto __pyx_L4_exception_handled;
  122888. }
  122889. goto __pyx_L5_except_error;
  122890. __pyx_L5_except_error:;
  122891. /* "uvloop/sslproto.pyx":737
  122892. *
  122893. * cdef _call_eof_received(self):
  122894. * try: # <<<<<<<<<<<<<<
  122895. * if not self._eof_received:
  122896. * self._eof_received = True
  122897. */
  122898. __Pyx_XGIVEREF(__pyx_t_1);
  122899. __Pyx_XGIVEREF(__pyx_t_2);
  122900. __Pyx_XGIVEREF(__pyx_t_3);
  122901. __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
  122902. goto __pyx_L1_error;
  122903. __pyx_L4_exception_handled:;
  122904. __Pyx_XGIVEREF(__pyx_t_1);
  122905. __Pyx_XGIVEREF(__pyx_t_2);
  122906. __Pyx_XGIVEREF(__pyx_t_3);
  122907. __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
  122908. __pyx_L8_try_end:;
  122909. }
  122910. /* "uvloop/sslproto.pyx":736
  122911. * self._start_shutdown()
  122912. *
  122913. * cdef _call_eof_received(self): # <<<<<<<<<<<<<<
  122914. * try:
  122915. * if not self._eof_received:
  122916. */
  122917. /* function exit code */
  122918. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  122919. goto __pyx_L0;
  122920. __pyx_L1_error:;
  122921. __Pyx_XDECREF(__pyx_t_5);
  122922. __Pyx_XDECREF(__pyx_t_6);
  122923. __Pyx_XDECREF(__pyx_t_7);
  122924. __Pyx_XDECREF(__pyx_t_9);
  122925. __Pyx_AddTraceback("uvloop.loop.SSLProtocol._call_eof_received", __pyx_clineno, __pyx_lineno, __pyx_filename);
  122926. __pyx_r = 0;
  122927. __pyx_L0:;
  122928. __Pyx_XDECREF(__pyx_v_keep_open);
  122929. __Pyx_XDECREF(__pyx_v_ex);
  122930. __Pyx_XGIVEREF(__pyx_r);
  122931. __Pyx_RefNannyFinishContext();
  122932. return __pyx_r;
  122933. }
  122934. /* "uvloop/sslproto.pyx":749
  122935. * # Flow control for writes from APP socket
  122936. *
  122937. * cdef _control_app_writing(self): # <<<<<<<<<<<<<<
  122938. * cdef size_t size = self._get_write_buffer_size()
  122939. * if size >= self._outgoing_high_water and not self._app_writing_paused:
  122940. */
  122941. static PyObject *__pyx_f_6uvloop_4loop_11SSLProtocol__control_app_writing(struct __pyx_obj_6uvloop_4loop_SSLProtocol *__pyx_v_self) {
  122942. size_t __pyx_v_size;
  122943. PyObject *__pyx_v_exc = NULL;
  122944. PyObject *__pyx_r = NULL;
  122945. __Pyx_RefNannyDeclarations
  122946. int __pyx_t_1;
  122947. int __pyx_t_2;
  122948. PyObject *__pyx_t_3 = NULL;
  122949. PyObject *__pyx_t_4 = NULL;
  122950. PyObject *__pyx_t_5 = NULL;
  122951. PyObject *__pyx_t_6 = NULL;
  122952. PyObject *__pyx_t_7 = NULL;
  122953. PyObject *__pyx_t_8 = NULL;
  122954. int __pyx_t_9;
  122955. PyObject *__pyx_t_10 = NULL;
  122956. PyObject *__pyx_t_11 = NULL;
  122957. PyObject *__pyx_t_12 = NULL;
  122958. PyObject *__pyx_t_13 = NULL;
  122959. int __pyx_t_14;
  122960. char const *__pyx_t_15;
  122961. PyObject *__pyx_t_16 = NULL;
  122962. PyObject *__pyx_t_17 = NULL;
  122963. PyObject *__pyx_t_18 = NULL;
  122964. PyObject *__pyx_t_19 = NULL;
  122965. PyObject *__pyx_t_20 = NULL;
  122966. PyObject *__pyx_t_21 = NULL;
  122967. char const *__pyx_t_22;
  122968. __Pyx_RefNannySetupContext("_control_app_writing", 0);
  122969. /* "uvloop/sslproto.pyx":750
  122970. *
  122971. * cdef _control_app_writing(self):
  122972. * cdef size_t size = self._get_write_buffer_size() # <<<<<<<<<<<<<<
  122973. * if size >= self._outgoing_high_water and not self._app_writing_paused:
  122974. * self._app_writing_paused = True
  122975. */
  122976. __pyx_v_size = ((struct __pyx_vtabstruct_6uvloop_4loop_SSLProtocol *)__pyx_v_self->__pyx_vtab)->_get_write_buffer_size(__pyx_v_self);
  122977. /* "uvloop/sslproto.pyx":751
  122978. * cdef _control_app_writing(self):
  122979. * cdef size_t size = self._get_write_buffer_size()
  122980. * if size >= self._outgoing_high_water and not self._app_writing_paused: # <<<<<<<<<<<<<<
  122981. * self._app_writing_paused = True
  122982. * try:
  122983. */
  122984. __pyx_t_2 = ((__pyx_v_size >= __pyx_v_self->_outgoing_high_water) != 0);
  122985. if (__pyx_t_2) {
  122986. } else {
  122987. __pyx_t_1 = __pyx_t_2;
  122988. goto __pyx_L4_bool_binop_done;
  122989. }
  122990. __pyx_t_2 = ((!(__pyx_v_self->_app_writing_paused != 0)) != 0);
  122991. __pyx_t_1 = __pyx_t_2;
  122992. __pyx_L4_bool_binop_done:;
  122993. if (__pyx_t_1) {
  122994. /* "uvloop/sslproto.pyx":752
  122995. * cdef size_t size = self._get_write_buffer_size()
  122996. * if size >= self._outgoing_high_water and not self._app_writing_paused:
  122997. * self._app_writing_paused = True # <<<<<<<<<<<<<<
  122998. * try:
  122999. * self._app_protocol.pause_writing()
  123000. */
  123001. __pyx_v_self->_app_writing_paused = 1;
  123002. /* "uvloop/sslproto.pyx":753
  123003. * if size >= self._outgoing_high_water and not self._app_writing_paused:
  123004. * self._app_writing_paused = True
  123005. * try: # <<<<<<<<<<<<<<
  123006. * self._app_protocol.pause_writing()
  123007. * except Exception as exc:
  123008. */
  123009. {
  123010. __Pyx_PyThreadState_declare
  123011. __Pyx_PyThreadState_assign
  123012. __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
  123013. __Pyx_XGOTREF(__pyx_t_3);
  123014. __Pyx_XGOTREF(__pyx_t_4);
  123015. __Pyx_XGOTREF(__pyx_t_5);
  123016. /*try:*/ {
  123017. /* "uvloop/sslproto.pyx":754
  123018. * self._app_writing_paused = True
  123019. * try:
  123020. * self._app_protocol.pause_writing() # <<<<<<<<<<<<<<
  123021. * except Exception as exc:
  123022. * self._loop.call_exception_handler({
  123023. */
  123024. __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_app_protocol, __pyx_n_s_pause_writing); if (unlikely(!__pyx_t_7)) __PYX_ERR(22, 754, __pyx_L6_error)
  123025. __Pyx_GOTREF(__pyx_t_7);
  123026. __pyx_t_8 = NULL;
  123027. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
  123028. __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
  123029. if (likely(__pyx_t_8)) {
  123030. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
  123031. __Pyx_INCREF(__pyx_t_8);
  123032. __Pyx_INCREF(function);
  123033. __Pyx_DECREF_SET(__pyx_t_7, function);
  123034. }
  123035. }
  123036. __pyx_t_6 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_7);
  123037. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  123038. if (unlikely(!__pyx_t_6)) __PYX_ERR(22, 754, __pyx_L6_error)
  123039. __Pyx_GOTREF(__pyx_t_6);
  123040. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  123041. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  123042. /* "uvloop/sslproto.pyx":753
  123043. * if size >= self._outgoing_high_water and not self._app_writing_paused:
  123044. * self._app_writing_paused = True
  123045. * try: # <<<<<<<<<<<<<<
  123046. * self._app_protocol.pause_writing()
  123047. * except Exception as exc:
  123048. */
  123049. }
  123050. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  123051. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  123052. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  123053. goto __pyx_L11_try_end;
  123054. __pyx_L6_error:;
  123055. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  123056. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  123057. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  123058. /* "uvloop/sslproto.pyx":755
  123059. * try:
  123060. * self._app_protocol.pause_writing()
  123061. * except Exception as exc: # <<<<<<<<<<<<<<
  123062. * self._loop.call_exception_handler({
  123063. * 'message': 'protocol.pause_writing() failed',
  123064. */
  123065. __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
  123066. if (__pyx_t_9) {
  123067. __Pyx_AddTraceback("uvloop.loop.SSLProtocol._control_app_writing", __pyx_clineno, __pyx_lineno, __pyx_filename);
  123068. if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8) < 0) __PYX_ERR(22, 755, __pyx_L8_except_error)
  123069. __Pyx_GOTREF(__pyx_t_6);
  123070. __Pyx_GOTREF(__pyx_t_7);
  123071. __Pyx_GOTREF(__pyx_t_8);
  123072. __Pyx_INCREF(__pyx_t_7);
  123073. __pyx_v_exc = __pyx_t_7;
  123074. /*try:*/ {
  123075. /* "uvloop/sslproto.pyx":756
  123076. * self._app_protocol.pause_writing()
  123077. * except Exception as exc:
  123078. * self._loop.call_exception_handler({ # <<<<<<<<<<<<<<
  123079. * 'message': 'protocol.pause_writing() failed',
  123080. * 'exception': exc,
  123081. */
  123082. __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_loop, __pyx_n_s_call_exception_handler); if (unlikely(!__pyx_t_11)) __PYX_ERR(22, 756, __pyx_L17_error)
  123083. __Pyx_GOTREF(__pyx_t_11);
  123084. /* "uvloop/sslproto.pyx":757
  123085. * except Exception as exc:
  123086. * self._loop.call_exception_handler({
  123087. * 'message': 'protocol.pause_writing() failed', # <<<<<<<<<<<<<<
  123088. * 'exception': exc,
  123089. * 'transport': self._app_transport,
  123090. */
  123091. __pyx_t_12 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_12)) __PYX_ERR(22, 757, __pyx_L17_error)
  123092. __Pyx_GOTREF(__pyx_t_12);
  123093. if (PyDict_SetItem(__pyx_t_12, __pyx_n_u_message, __pyx_kp_u_protocol_pause_writing_failed) < 0) __PYX_ERR(22, 757, __pyx_L17_error)
  123094. /* "uvloop/sslproto.pyx":758
  123095. * self._loop.call_exception_handler({
  123096. * 'message': 'protocol.pause_writing() failed',
  123097. * 'exception': exc, # <<<<<<<<<<<<<<
  123098. * 'transport': self._app_transport,
  123099. * 'protocol': self,
  123100. */
  123101. if (PyDict_SetItem(__pyx_t_12, __pyx_n_u_exception, __pyx_v_exc) < 0) __PYX_ERR(22, 757, __pyx_L17_error)
  123102. /* "uvloop/sslproto.pyx":759
  123103. * 'message': 'protocol.pause_writing() failed',
  123104. * 'exception': exc,
  123105. * 'transport': self._app_transport, # <<<<<<<<<<<<<<
  123106. * 'protocol': self,
  123107. * })
  123108. */
  123109. if (PyDict_SetItem(__pyx_t_12, __pyx_n_u_transport, ((PyObject *)__pyx_v_self->_app_transport)) < 0) __PYX_ERR(22, 757, __pyx_L17_error)
  123110. /* "uvloop/sslproto.pyx":760
  123111. * 'exception': exc,
  123112. * 'transport': self._app_transport,
  123113. * 'protocol': self, # <<<<<<<<<<<<<<
  123114. * })
  123115. * elif size <= self._outgoing_low_water and self._app_writing_paused:
  123116. */
  123117. if (PyDict_SetItem(__pyx_t_12, __pyx_n_u_protocol, ((PyObject *)__pyx_v_self)) < 0) __PYX_ERR(22, 757, __pyx_L17_error)
  123118. __pyx_t_13 = NULL;
  123119. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) {
  123120. __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_11);
  123121. if (likely(__pyx_t_13)) {
  123122. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
  123123. __Pyx_INCREF(__pyx_t_13);
  123124. __Pyx_INCREF(function);
  123125. __Pyx_DECREF_SET(__pyx_t_11, function);
  123126. }
  123127. }
  123128. __pyx_t_10 = (__pyx_t_13) ? __Pyx_PyObject_Call2Args(__pyx_t_11, __pyx_t_13, __pyx_t_12) : __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_12);
  123129. __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
  123130. __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  123131. if (unlikely(!__pyx_t_10)) __PYX_ERR(22, 756, __pyx_L17_error)
  123132. __Pyx_GOTREF(__pyx_t_10);
  123133. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  123134. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  123135. }
  123136. /* "uvloop/sslproto.pyx":755
  123137. * try:
  123138. * self._app_protocol.pause_writing()
  123139. * except Exception as exc: # <<<<<<<<<<<<<<
  123140. * self._loop.call_exception_handler({
  123141. * 'message': 'protocol.pause_writing() failed',
  123142. */
  123143. /*finally:*/ {
  123144. /*normal exit:*/{
  123145. __Pyx_DECREF(__pyx_v_exc);
  123146. __pyx_v_exc = NULL;
  123147. goto __pyx_L18;
  123148. }
  123149. __pyx_L17_error:;
  123150. /*exception exit:*/{
  123151. __Pyx_PyThreadState_declare
  123152. __Pyx_PyThreadState_assign
  123153. __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0;
  123154. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  123155. __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
  123156. __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
  123157. __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
  123158. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21);
  123159. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18) < 0)) __Pyx_ErrFetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18);
  123160. __Pyx_XGOTREF(__pyx_t_16);
  123161. __Pyx_XGOTREF(__pyx_t_17);
  123162. __Pyx_XGOTREF(__pyx_t_18);
  123163. __Pyx_XGOTREF(__pyx_t_19);
  123164. __Pyx_XGOTREF(__pyx_t_20);
  123165. __Pyx_XGOTREF(__pyx_t_21);
  123166. __pyx_t_9 = __pyx_lineno; __pyx_t_14 = __pyx_clineno; __pyx_t_15 = __pyx_filename;
  123167. {
  123168. __Pyx_DECREF(__pyx_v_exc);
  123169. __pyx_v_exc = NULL;
  123170. }
  123171. if (PY_MAJOR_VERSION >= 3) {
  123172. __Pyx_XGIVEREF(__pyx_t_19);
  123173. __Pyx_XGIVEREF(__pyx_t_20);
  123174. __Pyx_XGIVEREF(__pyx_t_21);
  123175. __Pyx_ExceptionReset(__pyx_t_19, __pyx_t_20, __pyx_t_21);
  123176. }
  123177. __Pyx_XGIVEREF(__pyx_t_16);
  123178. __Pyx_XGIVEREF(__pyx_t_17);
  123179. __Pyx_XGIVEREF(__pyx_t_18);
  123180. __Pyx_ErrRestore(__pyx_t_16, __pyx_t_17, __pyx_t_18);
  123181. __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0;
  123182. __pyx_lineno = __pyx_t_9; __pyx_clineno = __pyx_t_14; __pyx_filename = __pyx_t_15;
  123183. goto __pyx_L8_except_error;
  123184. }
  123185. __pyx_L18:;
  123186. }
  123187. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  123188. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  123189. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  123190. goto __pyx_L7_exception_handled;
  123191. }
  123192. goto __pyx_L8_except_error;
  123193. __pyx_L8_except_error:;
  123194. /* "uvloop/sslproto.pyx":753
  123195. * if size >= self._outgoing_high_water and not self._app_writing_paused:
  123196. * self._app_writing_paused = True
  123197. * try: # <<<<<<<<<<<<<<
  123198. * self._app_protocol.pause_writing()
  123199. * except Exception as exc:
  123200. */
  123201. __Pyx_XGIVEREF(__pyx_t_3);
  123202. __Pyx_XGIVEREF(__pyx_t_4);
  123203. __Pyx_XGIVEREF(__pyx_t_5);
  123204. __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
  123205. goto __pyx_L1_error;
  123206. __pyx_L7_exception_handled:;
  123207. __Pyx_XGIVEREF(__pyx_t_3);
  123208. __Pyx_XGIVEREF(__pyx_t_4);
  123209. __Pyx_XGIVEREF(__pyx_t_5);
  123210. __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
  123211. __pyx_L11_try_end:;
  123212. }
  123213. /* "uvloop/sslproto.pyx":751
  123214. * cdef _control_app_writing(self):
  123215. * cdef size_t size = self._get_write_buffer_size()
  123216. * if size >= self._outgoing_high_water and not self._app_writing_paused: # <<<<<<<<<<<<<<
  123217. * self._app_writing_paused = True
  123218. * try:
  123219. */
  123220. goto __pyx_L3;
  123221. }
  123222. /* "uvloop/sslproto.pyx":762
  123223. * 'protocol': self,
  123224. * })
  123225. * elif size <= self._outgoing_low_water and self._app_writing_paused: # <<<<<<<<<<<<<<
  123226. * self._app_writing_paused = False
  123227. * try:
  123228. */
  123229. __pyx_t_2 = ((__pyx_v_size <= __pyx_v_self->_outgoing_low_water) != 0);
  123230. if (__pyx_t_2) {
  123231. } else {
  123232. __pyx_t_1 = __pyx_t_2;
  123233. goto __pyx_L23_bool_binop_done;
  123234. }
  123235. __pyx_t_2 = (__pyx_v_self->_app_writing_paused != 0);
  123236. __pyx_t_1 = __pyx_t_2;
  123237. __pyx_L23_bool_binop_done:;
  123238. if (__pyx_t_1) {
  123239. /* "uvloop/sslproto.pyx":763
  123240. * })
  123241. * elif size <= self._outgoing_low_water and self._app_writing_paused:
  123242. * self._app_writing_paused = False # <<<<<<<<<<<<<<
  123243. * try:
  123244. * self._app_protocol.resume_writing()
  123245. */
  123246. __pyx_v_self->_app_writing_paused = 0;
  123247. /* "uvloop/sslproto.pyx":764
  123248. * elif size <= self._outgoing_low_water and self._app_writing_paused:
  123249. * self._app_writing_paused = False
  123250. * try: # <<<<<<<<<<<<<<
  123251. * self._app_protocol.resume_writing()
  123252. * except Exception as exc:
  123253. */
  123254. {
  123255. __Pyx_PyThreadState_declare
  123256. __Pyx_PyThreadState_assign
  123257. __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_4, &__pyx_t_3);
  123258. __Pyx_XGOTREF(__pyx_t_5);
  123259. __Pyx_XGOTREF(__pyx_t_4);
  123260. __Pyx_XGOTREF(__pyx_t_3);
  123261. /*try:*/ {
  123262. /* "uvloop/sslproto.pyx":765
  123263. * self._app_writing_paused = False
  123264. * try:
  123265. * self._app_protocol.resume_writing() # <<<<<<<<<<<<<<
  123266. * except Exception as exc:
  123267. * self._loop.call_exception_handler({
  123268. */
  123269. __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_app_protocol, __pyx_n_s_resume_writing); if (unlikely(!__pyx_t_7)) __PYX_ERR(22, 765, __pyx_L25_error)
  123270. __Pyx_GOTREF(__pyx_t_7);
  123271. __pyx_t_6 = NULL;
  123272. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
  123273. __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
  123274. if (likely(__pyx_t_6)) {
  123275. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
  123276. __Pyx_INCREF(__pyx_t_6);
  123277. __Pyx_INCREF(function);
  123278. __Pyx_DECREF_SET(__pyx_t_7, function);
  123279. }
  123280. }
  123281. __pyx_t_8 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_7);
  123282. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  123283. if (unlikely(!__pyx_t_8)) __PYX_ERR(22, 765, __pyx_L25_error)
  123284. __Pyx_GOTREF(__pyx_t_8);
  123285. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  123286. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  123287. /* "uvloop/sslproto.pyx":764
  123288. * elif size <= self._outgoing_low_water and self._app_writing_paused:
  123289. * self._app_writing_paused = False
  123290. * try: # <<<<<<<<<<<<<<
  123291. * self._app_protocol.resume_writing()
  123292. * except Exception as exc:
  123293. */
  123294. }
  123295. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  123296. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  123297. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  123298. goto __pyx_L30_try_end;
  123299. __pyx_L25_error:;
  123300. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  123301. __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
  123302. __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
  123303. __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
  123304. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  123305. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  123306. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  123307. /* "uvloop/sslproto.pyx":766
  123308. * try:
  123309. * self._app_protocol.resume_writing()
  123310. * except Exception as exc: # <<<<<<<<<<<<<<
  123311. * self._loop.call_exception_handler({
  123312. * 'message': 'protocol.resume_writing() failed',
  123313. */
  123314. __pyx_t_14 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
  123315. if (__pyx_t_14) {
  123316. __Pyx_AddTraceback("uvloop.loop.SSLProtocol._control_app_writing", __pyx_clineno, __pyx_lineno, __pyx_filename);
  123317. if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_6) < 0) __PYX_ERR(22, 766, __pyx_L27_except_error)
  123318. __Pyx_GOTREF(__pyx_t_8);
  123319. __Pyx_GOTREF(__pyx_t_7);
  123320. __Pyx_GOTREF(__pyx_t_6);
  123321. __Pyx_INCREF(__pyx_t_7);
  123322. __pyx_v_exc = __pyx_t_7;
  123323. /*try:*/ {
  123324. /* "uvloop/sslproto.pyx":767
  123325. * self._app_protocol.resume_writing()
  123326. * except Exception as exc:
  123327. * self._loop.call_exception_handler({ # <<<<<<<<<<<<<<
  123328. * 'message': 'protocol.resume_writing() failed',
  123329. * 'exception': exc,
  123330. */
  123331. __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_loop, __pyx_n_s_call_exception_handler); if (unlikely(!__pyx_t_11)) __PYX_ERR(22, 767, __pyx_L36_error)
  123332. __Pyx_GOTREF(__pyx_t_11);
  123333. /* "uvloop/sslproto.pyx":768
  123334. * except Exception as exc:
  123335. * self._loop.call_exception_handler({
  123336. * 'message': 'protocol.resume_writing() failed', # <<<<<<<<<<<<<<
  123337. * 'exception': exc,
  123338. * 'transport': self._app_transport,
  123339. */
  123340. __pyx_t_12 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_12)) __PYX_ERR(22, 768, __pyx_L36_error)
  123341. __Pyx_GOTREF(__pyx_t_12);
  123342. if (PyDict_SetItem(__pyx_t_12, __pyx_n_u_message, __pyx_kp_u_protocol_resume_writing_failed) < 0) __PYX_ERR(22, 768, __pyx_L36_error)
  123343. /* "uvloop/sslproto.pyx":769
  123344. * self._loop.call_exception_handler({
  123345. * 'message': 'protocol.resume_writing() failed',
  123346. * 'exception': exc, # <<<<<<<<<<<<<<
  123347. * 'transport': self._app_transport,
  123348. * 'protocol': self,
  123349. */
  123350. if (PyDict_SetItem(__pyx_t_12, __pyx_n_u_exception, __pyx_v_exc) < 0) __PYX_ERR(22, 768, __pyx_L36_error)
  123351. /* "uvloop/sslproto.pyx":770
  123352. * 'message': 'protocol.resume_writing() failed',
  123353. * 'exception': exc,
  123354. * 'transport': self._app_transport, # <<<<<<<<<<<<<<
  123355. * 'protocol': self,
  123356. * })
  123357. */
  123358. if (PyDict_SetItem(__pyx_t_12, __pyx_n_u_transport, ((PyObject *)__pyx_v_self->_app_transport)) < 0) __PYX_ERR(22, 768, __pyx_L36_error)
  123359. /* "uvloop/sslproto.pyx":771
  123360. * 'exception': exc,
  123361. * 'transport': self._app_transport,
  123362. * 'protocol': self, # <<<<<<<<<<<<<<
  123363. * })
  123364. *
  123365. */
  123366. if (PyDict_SetItem(__pyx_t_12, __pyx_n_u_protocol, ((PyObject *)__pyx_v_self)) < 0) __PYX_ERR(22, 768, __pyx_L36_error)
  123367. __pyx_t_13 = NULL;
  123368. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) {
  123369. __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_11);
  123370. if (likely(__pyx_t_13)) {
  123371. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
  123372. __Pyx_INCREF(__pyx_t_13);
  123373. __Pyx_INCREF(function);
  123374. __Pyx_DECREF_SET(__pyx_t_11, function);
  123375. }
  123376. }
  123377. __pyx_t_10 = (__pyx_t_13) ? __Pyx_PyObject_Call2Args(__pyx_t_11, __pyx_t_13, __pyx_t_12) : __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_12);
  123378. __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
  123379. __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  123380. if (unlikely(!__pyx_t_10)) __PYX_ERR(22, 767, __pyx_L36_error)
  123381. __Pyx_GOTREF(__pyx_t_10);
  123382. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  123383. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  123384. }
  123385. /* "uvloop/sslproto.pyx":766
  123386. * try:
  123387. * self._app_protocol.resume_writing()
  123388. * except Exception as exc: # <<<<<<<<<<<<<<
  123389. * self._loop.call_exception_handler({
  123390. * 'message': 'protocol.resume_writing() failed',
  123391. */
  123392. /*finally:*/ {
  123393. /*normal exit:*/{
  123394. __Pyx_DECREF(__pyx_v_exc);
  123395. __pyx_v_exc = NULL;
  123396. goto __pyx_L37;
  123397. }
  123398. __pyx_L36_error:;
  123399. /*exception exit:*/{
  123400. __Pyx_PyThreadState_declare
  123401. __Pyx_PyThreadState_assign
  123402. __pyx_t_21 = 0; __pyx_t_20 = 0; __pyx_t_19 = 0; __pyx_t_18 = 0; __pyx_t_17 = 0; __pyx_t_16 = 0;
  123403. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  123404. __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
  123405. __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
  123406. __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
  123407. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_18, &__pyx_t_17, &__pyx_t_16);
  123408. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_21, &__pyx_t_20, &__pyx_t_19) < 0)) __Pyx_ErrFetch(&__pyx_t_21, &__pyx_t_20, &__pyx_t_19);
  123409. __Pyx_XGOTREF(__pyx_t_21);
  123410. __Pyx_XGOTREF(__pyx_t_20);
  123411. __Pyx_XGOTREF(__pyx_t_19);
  123412. __Pyx_XGOTREF(__pyx_t_18);
  123413. __Pyx_XGOTREF(__pyx_t_17);
  123414. __Pyx_XGOTREF(__pyx_t_16);
  123415. __pyx_t_14 = __pyx_lineno; __pyx_t_9 = __pyx_clineno; __pyx_t_22 = __pyx_filename;
  123416. {
  123417. __Pyx_DECREF(__pyx_v_exc);
  123418. __pyx_v_exc = NULL;
  123419. }
  123420. if (PY_MAJOR_VERSION >= 3) {
  123421. __Pyx_XGIVEREF(__pyx_t_18);
  123422. __Pyx_XGIVEREF(__pyx_t_17);
  123423. __Pyx_XGIVEREF(__pyx_t_16);
  123424. __Pyx_ExceptionReset(__pyx_t_18, __pyx_t_17, __pyx_t_16);
  123425. }
  123426. __Pyx_XGIVEREF(__pyx_t_21);
  123427. __Pyx_XGIVEREF(__pyx_t_20);
  123428. __Pyx_XGIVEREF(__pyx_t_19);
  123429. __Pyx_ErrRestore(__pyx_t_21, __pyx_t_20, __pyx_t_19);
  123430. __pyx_t_21 = 0; __pyx_t_20 = 0; __pyx_t_19 = 0; __pyx_t_18 = 0; __pyx_t_17 = 0; __pyx_t_16 = 0;
  123431. __pyx_lineno = __pyx_t_14; __pyx_clineno = __pyx_t_9; __pyx_filename = __pyx_t_22;
  123432. goto __pyx_L27_except_error;
  123433. }
  123434. __pyx_L37:;
  123435. }
  123436. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  123437. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  123438. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  123439. goto __pyx_L26_exception_handled;
  123440. }
  123441. goto __pyx_L27_except_error;
  123442. __pyx_L27_except_error:;
  123443. /* "uvloop/sslproto.pyx":764
  123444. * elif size <= self._outgoing_low_water and self._app_writing_paused:
  123445. * self._app_writing_paused = False
  123446. * try: # <<<<<<<<<<<<<<
  123447. * self._app_protocol.resume_writing()
  123448. * except Exception as exc:
  123449. */
  123450. __Pyx_XGIVEREF(__pyx_t_5);
  123451. __Pyx_XGIVEREF(__pyx_t_4);
  123452. __Pyx_XGIVEREF(__pyx_t_3);
  123453. __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_4, __pyx_t_3);
  123454. goto __pyx_L1_error;
  123455. __pyx_L26_exception_handled:;
  123456. __Pyx_XGIVEREF(__pyx_t_5);
  123457. __Pyx_XGIVEREF(__pyx_t_4);
  123458. __Pyx_XGIVEREF(__pyx_t_3);
  123459. __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_4, __pyx_t_3);
  123460. __pyx_L30_try_end:;
  123461. }
  123462. /* "uvloop/sslproto.pyx":762
  123463. * 'protocol': self,
  123464. * })
  123465. * elif size <= self._outgoing_low_water and self._app_writing_paused: # <<<<<<<<<<<<<<
  123466. * self._app_writing_paused = False
  123467. * try:
  123468. */
  123469. }
  123470. __pyx_L3:;
  123471. /* "uvloop/sslproto.pyx":749
  123472. * # Flow control for writes from APP socket
  123473. *
  123474. * cdef _control_app_writing(self): # <<<<<<<<<<<<<<
  123475. * cdef size_t size = self._get_write_buffer_size()
  123476. * if size >= self._outgoing_high_water and not self._app_writing_paused:
  123477. */
  123478. /* function exit code */
  123479. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  123480. goto __pyx_L0;
  123481. __pyx_L1_error:;
  123482. __Pyx_XDECREF(__pyx_t_6);
  123483. __Pyx_XDECREF(__pyx_t_7);
  123484. __Pyx_XDECREF(__pyx_t_8);
  123485. __Pyx_XDECREF(__pyx_t_10);
  123486. __Pyx_XDECREF(__pyx_t_11);
  123487. __Pyx_XDECREF(__pyx_t_12);
  123488. __Pyx_XDECREF(__pyx_t_13);
  123489. __Pyx_AddTraceback("uvloop.loop.SSLProtocol._control_app_writing", __pyx_clineno, __pyx_lineno, __pyx_filename);
  123490. __pyx_r = 0;
  123491. __pyx_L0:;
  123492. __Pyx_XDECREF(__pyx_v_exc);
  123493. __Pyx_XGIVEREF(__pyx_r);
  123494. __Pyx_RefNannyFinishContext();
  123495. return __pyx_r;
  123496. }
  123497. /* "uvloop/sslproto.pyx":774
  123498. * })
  123499. *
  123500. * cdef size_t _get_write_buffer_size(self): # <<<<<<<<<<<<<<
  123501. * return self._outgoing.pending + self._write_buffer_size
  123502. *
  123503. */
  123504. static size_t __pyx_f_6uvloop_4loop_11SSLProtocol__get_write_buffer_size(struct __pyx_obj_6uvloop_4loop_SSLProtocol *__pyx_v_self) {
  123505. size_t __pyx_r;
  123506. __Pyx_RefNannyDeclarations
  123507. PyObject *__pyx_t_1 = NULL;
  123508. PyObject *__pyx_t_2 = NULL;
  123509. PyObject *__pyx_t_3 = NULL;
  123510. size_t __pyx_t_4;
  123511. __Pyx_RefNannySetupContext("_get_write_buffer_size", 0);
  123512. /* "uvloop/sslproto.pyx":775
  123513. *
  123514. * cdef size_t _get_write_buffer_size(self):
  123515. * return self._outgoing.pending + self._write_buffer_size # <<<<<<<<<<<<<<
  123516. *
  123517. * cdef _set_write_buffer_limits(self, high=None, low=None):
  123518. */
  123519. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_outgoing, __pyx_n_s_pending); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 775, __pyx_L1_error)
  123520. __Pyx_GOTREF(__pyx_t_1);
  123521. __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_v_self->_write_buffer_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 775, __pyx_L1_error)
  123522. __Pyx_GOTREF(__pyx_t_2);
  123523. __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(22, 775, __pyx_L1_error)
  123524. __Pyx_GOTREF(__pyx_t_3);
  123525. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  123526. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  123527. __pyx_t_4 = __Pyx_PyInt_As_size_t(__pyx_t_3); if (unlikely((__pyx_t_4 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(22, 775, __pyx_L1_error)
  123528. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  123529. __pyx_r = __pyx_t_4;
  123530. goto __pyx_L0;
  123531. /* "uvloop/sslproto.pyx":774
  123532. * })
  123533. *
  123534. * cdef size_t _get_write_buffer_size(self): # <<<<<<<<<<<<<<
  123535. * return self._outgoing.pending + self._write_buffer_size
  123536. *
  123537. */
  123538. /* function exit code */
  123539. __pyx_L1_error:;
  123540. __Pyx_XDECREF(__pyx_t_1);
  123541. __Pyx_XDECREF(__pyx_t_2);
  123542. __Pyx_XDECREF(__pyx_t_3);
  123543. __Pyx_WriteUnraisable("uvloop.loop.SSLProtocol._get_write_buffer_size", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  123544. __pyx_r = 0;
  123545. __pyx_L0:;
  123546. __Pyx_RefNannyFinishContext();
  123547. return __pyx_r;
  123548. }
  123549. /* "uvloop/sslproto.pyx":777
  123550. * return self._outgoing.pending + self._write_buffer_size
  123551. *
  123552. * cdef _set_write_buffer_limits(self, high=None, low=None): # <<<<<<<<<<<<<<
  123553. * high, low = add_flowcontrol_defaults(
  123554. * high, low, FLOW_CONTROL_HIGH_WATER_SSL_WRITE)
  123555. */
  123556. static PyObject *__pyx_f_6uvloop_4loop_11SSLProtocol__set_write_buffer_limits(struct __pyx_obj_6uvloop_4loop_SSLProtocol *__pyx_v_self, struct __pyx_opt_args_6uvloop_4loop_11SSLProtocol__set_write_buffer_limits *__pyx_optional_args) {
  123557. PyObject *__pyx_v_high = ((PyObject *)Py_None);
  123558. PyObject *__pyx_v_low = ((PyObject *)Py_None);
  123559. PyObject *__pyx_r = NULL;
  123560. __Pyx_RefNannyDeclarations
  123561. PyObject *__pyx_t_1 = NULL;
  123562. PyObject *__pyx_t_2 = NULL;
  123563. PyObject *__pyx_t_3 = NULL;
  123564. PyObject *__pyx_t_4 = NULL;
  123565. PyObject *(*__pyx_t_5)(PyObject *);
  123566. size_t __pyx_t_6;
  123567. __Pyx_RefNannySetupContext("_set_write_buffer_limits", 0);
  123568. if (__pyx_optional_args) {
  123569. if (__pyx_optional_args->__pyx_n > 0) {
  123570. __pyx_v_high = __pyx_optional_args->high;
  123571. if (__pyx_optional_args->__pyx_n > 1) {
  123572. __pyx_v_low = __pyx_optional_args->low;
  123573. }
  123574. }
  123575. }
  123576. __Pyx_INCREF(__pyx_v_high);
  123577. __Pyx_INCREF(__pyx_v_low);
  123578. /* "uvloop/sslproto.pyx":778
  123579. *
  123580. * cdef _set_write_buffer_limits(self, high=None, low=None):
  123581. * high, low = add_flowcontrol_defaults( # <<<<<<<<<<<<<<
  123582. * high, low, FLOW_CONTROL_HIGH_WATER_SSL_WRITE)
  123583. * self._outgoing_high_water = high
  123584. */
  123585. __pyx_t_1 = __pyx_f_6uvloop_8includes_11flowcontrol_add_flowcontrol_defaults(__pyx_v_high, __pyx_v_low, 0x200); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 778, __pyx_L1_error)
  123586. __Pyx_GOTREF(__pyx_t_1);
  123587. if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
  123588. PyObject* sequence = __pyx_t_1;
  123589. Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
  123590. if (unlikely(size != 2)) {
  123591. if (size > 2) __Pyx_RaiseTooManyValuesError(2);
  123592. else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
  123593. __PYX_ERR(22, 778, __pyx_L1_error)
  123594. }
  123595. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  123596. if (likely(PyTuple_CheckExact(sequence))) {
  123597. __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0);
  123598. __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1);
  123599. } else {
  123600. __pyx_t_2 = PyList_GET_ITEM(sequence, 0);
  123601. __pyx_t_3 = PyList_GET_ITEM(sequence, 1);
  123602. }
  123603. __Pyx_INCREF(__pyx_t_2);
  123604. __Pyx_INCREF(__pyx_t_3);
  123605. #else
  123606. __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 778, __pyx_L1_error)
  123607. __Pyx_GOTREF(__pyx_t_2);
  123608. __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(22, 778, __pyx_L1_error)
  123609. __Pyx_GOTREF(__pyx_t_3);
  123610. #endif
  123611. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  123612. } else {
  123613. Py_ssize_t index = -1;
  123614. __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(22, 778, __pyx_L1_error)
  123615. __Pyx_GOTREF(__pyx_t_4);
  123616. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  123617. __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext;
  123618. index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
  123619. __Pyx_GOTREF(__pyx_t_2);
  123620. index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
  123621. __Pyx_GOTREF(__pyx_t_3);
  123622. if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) __PYX_ERR(22, 778, __pyx_L1_error)
  123623. __pyx_t_5 = NULL;
  123624. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  123625. goto __pyx_L4_unpacking_done;
  123626. __pyx_L3_unpacking_failed:;
  123627. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  123628. __pyx_t_5 = NULL;
  123629. if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
  123630. __PYX_ERR(22, 778, __pyx_L1_error)
  123631. __pyx_L4_unpacking_done:;
  123632. }
  123633. __Pyx_DECREF_SET(__pyx_v_high, __pyx_t_2);
  123634. __pyx_t_2 = 0;
  123635. __Pyx_DECREF_SET(__pyx_v_low, __pyx_t_3);
  123636. __pyx_t_3 = 0;
  123637. /* "uvloop/sslproto.pyx":780
  123638. * high, low = add_flowcontrol_defaults(
  123639. * high, low, FLOW_CONTROL_HIGH_WATER_SSL_WRITE)
  123640. * self._outgoing_high_water = high # <<<<<<<<<<<<<<
  123641. * self._outgoing_low_water = low
  123642. *
  123643. */
  123644. __pyx_t_6 = __Pyx_PyInt_As_size_t(__pyx_v_high); if (unlikely((__pyx_t_6 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(22, 780, __pyx_L1_error)
  123645. __pyx_v_self->_outgoing_high_water = __pyx_t_6;
  123646. /* "uvloop/sslproto.pyx":781
  123647. * high, low, FLOW_CONTROL_HIGH_WATER_SSL_WRITE)
  123648. * self._outgoing_high_water = high
  123649. * self._outgoing_low_water = low # <<<<<<<<<<<<<<
  123650. *
  123651. * # Flow control for reads to APP socket
  123652. */
  123653. __pyx_t_6 = __Pyx_PyInt_As_size_t(__pyx_v_low); if (unlikely((__pyx_t_6 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(22, 781, __pyx_L1_error)
  123654. __pyx_v_self->_outgoing_low_water = __pyx_t_6;
  123655. /* "uvloop/sslproto.pyx":777
  123656. * return self._outgoing.pending + self._write_buffer_size
  123657. *
  123658. * cdef _set_write_buffer_limits(self, high=None, low=None): # <<<<<<<<<<<<<<
  123659. * high, low = add_flowcontrol_defaults(
  123660. * high, low, FLOW_CONTROL_HIGH_WATER_SSL_WRITE)
  123661. */
  123662. /* function exit code */
  123663. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  123664. goto __pyx_L0;
  123665. __pyx_L1_error:;
  123666. __Pyx_XDECREF(__pyx_t_1);
  123667. __Pyx_XDECREF(__pyx_t_2);
  123668. __Pyx_XDECREF(__pyx_t_3);
  123669. __Pyx_XDECREF(__pyx_t_4);
  123670. __Pyx_AddTraceback("uvloop.loop.SSLProtocol._set_write_buffer_limits", __pyx_clineno, __pyx_lineno, __pyx_filename);
  123671. __pyx_r = 0;
  123672. __pyx_L0:;
  123673. __Pyx_XDECREF(__pyx_v_high);
  123674. __Pyx_XDECREF(__pyx_v_low);
  123675. __Pyx_XGIVEREF(__pyx_r);
  123676. __Pyx_RefNannyFinishContext();
  123677. return __pyx_r;
  123678. }
  123679. /* "uvloop/sslproto.pyx":785
  123680. * # Flow control for reads to APP socket
  123681. *
  123682. * cdef _pause_reading(self): # <<<<<<<<<<<<<<
  123683. * self._app_reading_paused = True
  123684. *
  123685. */
  123686. static PyObject *__pyx_f_6uvloop_4loop_11SSLProtocol__pause_reading(struct __pyx_obj_6uvloop_4loop_SSLProtocol *__pyx_v_self) {
  123687. PyObject *__pyx_r = NULL;
  123688. __Pyx_RefNannyDeclarations
  123689. __Pyx_RefNannySetupContext("_pause_reading", 0);
  123690. /* "uvloop/sslproto.pyx":786
  123691. *
  123692. * cdef _pause_reading(self):
  123693. * self._app_reading_paused = True # <<<<<<<<<<<<<<
  123694. *
  123695. * cdef _resume_reading(self):
  123696. */
  123697. __pyx_v_self->_app_reading_paused = 1;
  123698. /* "uvloop/sslproto.pyx":785
  123699. * # Flow control for reads to APP socket
  123700. *
  123701. * cdef _pause_reading(self): # <<<<<<<<<<<<<<
  123702. * self._app_reading_paused = True
  123703. *
  123704. */
  123705. /* function exit code */
  123706. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  123707. __Pyx_XGIVEREF(__pyx_r);
  123708. __Pyx_RefNannyFinishContext();
  123709. return __pyx_r;
  123710. }
  123711. /* "uvloop/sslproto.pyx":792
  123712. * self._app_reading_paused = False
  123713. *
  123714. * def resume(): # <<<<<<<<<<<<<<
  123715. * if self._state == WRAPPED:
  123716. * self._do_read()
  123717. */
  123718. /* Python wrapper */
  123719. static PyObject *__pyx_pw_6uvloop_4loop_11SSLProtocol_15_resume_reading_1resume(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  123720. static PyMethodDef __pyx_mdef_6uvloop_4loop_11SSLProtocol_15_resume_reading_1resume = {"resume", (PyCFunction)__pyx_pw_6uvloop_4loop_11SSLProtocol_15_resume_reading_1resume, METH_NOARGS, 0};
  123721. static PyObject *__pyx_pw_6uvloop_4loop_11SSLProtocol_15_resume_reading_1resume(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  123722. PyObject *__pyx_r = 0;
  123723. __Pyx_RefNannyDeclarations
  123724. __Pyx_RefNannySetupContext("resume (wrapper)", 0);
  123725. __pyx_r = __pyx_pf_6uvloop_4loop_11SSLProtocol_15_resume_reading_resume(__pyx_self);
  123726. /* function exit code */
  123727. __Pyx_RefNannyFinishContext();
  123728. return __pyx_r;
  123729. }
  123730. static PyObject *__pyx_pf_6uvloop_4loop_11SSLProtocol_15_resume_reading_resume(PyObject *__pyx_self) {
  123731. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_31__resume_reading *__pyx_cur_scope;
  123732. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_31__resume_reading *__pyx_outer_scope;
  123733. PyObject *__pyx_r = NULL;
  123734. __Pyx_RefNannyDeclarations
  123735. PyObject *__pyx_t_1 = NULL;
  123736. __Pyx_RefNannySetupContext("resume", 0);
  123737. __pyx_outer_scope = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_31__resume_reading *) __Pyx_CyFunction_GetClosure(__pyx_self);
  123738. __pyx_cur_scope = __pyx_outer_scope;
  123739. /* "uvloop/sslproto.pyx":797
  123740. * elif self._state == FLUSHING:
  123741. * self._do_flush()
  123742. * elif self._state == SHUTDOWN: # <<<<<<<<<<<<<<
  123743. * self._do_shutdown()
  123744. * self._loop.call_soon(resume)
  123745. */
  123746. if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(22, 797, __pyx_L1_error) }
  123747. /* "uvloop/sslproto.pyx":793
  123748. *
  123749. * def resume():
  123750. * if self._state == WRAPPED: # <<<<<<<<<<<<<<
  123751. * self._do_read()
  123752. * elif self._state == FLUSHING:
  123753. */
  123754. switch (__pyx_cur_scope->__pyx_v_self->_state) {
  123755. case __pyx_e_6uvloop_4loop_WRAPPED:
  123756. /* "uvloop/sslproto.pyx":794
  123757. * def resume():
  123758. * if self._state == WRAPPED:
  123759. * self._do_read() # <<<<<<<<<<<<<<
  123760. * elif self._state == FLUSHING:
  123761. * self._do_flush()
  123762. */
  123763. if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(22, 794, __pyx_L1_error) }
  123764. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_SSLProtocol *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->_do_read(__pyx_cur_scope->__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 794, __pyx_L1_error)
  123765. __Pyx_GOTREF(__pyx_t_1);
  123766. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  123767. /* "uvloop/sslproto.pyx":793
  123768. *
  123769. * def resume():
  123770. * if self._state == WRAPPED: # <<<<<<<<<<<<<<
  123771. * self._do_read()
  123772. * elif self._state == FLUSHING:
  123773. */
  123774. break;
  123775. case __pyx_e_6uvloop_4loop_FLUSHING:
  123776. /* "uvloop/sslproto.pyx":796
  123777. * self._do_read()
  123778. * elif self._state == FLUSHING:
  123779. * self._do_flush() # <<<<<<<<<<<<<<
  123780. * elif self._state == SHUTDOWN:
  123781. * self._do_shutdown()
  123782. */
  123783. if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(22, 796, __pyx_L1_error) }
  123784. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_SSLProtocol *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->_do_flush(__pyx_cur_scope->__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 796, __pyx_L1_error)
  123785. __Pyx_GOTREF(__pyx_t_1);
  123786. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  123787. /* "uvloop/sslproto.pyx":795
  123788. * if self._state == WRAPPED:
  123789. * self._do_read()
  123790. * elif self._state == FLUSHING: # <<<<<<<<<<<<<<
  123791. * self._do_flush()
  123792. * elif self._state == SHUTDOWN:
  123793. */
  123794. break;
  123795. case __pyx_e_6uvloop_4loop_SHUTDOWN:
  123796. /* "uvloop/sslproto.pyx":798
  123797. * self._do_flush()
  123798. * elif self._state == SHUTDOWN:
  123799. * self._do_shutdown() # <<<<<<<<<<<<<<
  123800. * self._loop.call_soon(resume)
  123801. *
  123802. */
  123803. if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(22, 798, __pyx_L1_error) }
  123804. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_SSLProtocol *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->_do_shutdown(__pyx_cur_scope->__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 798, __pyx_L1_error)
  123805. __Pyx_GOTREF(__pyx_t_1);
  123806. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  123807. /* "uvloop/sslproto.pyx":797
  123808. * elif self._state == FLUSHING:
  123809. * self._do_flush()
  123810. * elif self._state == SHUTDOWN: # <<<<<<<<<<<<<<
  123811. * self._do_shutdown()
  123812. * self._loop.call_soon(resume)
  123813. */
  123814. break;
  123815. default: break;
  123816. }
  123817. /* "uvloop/sslproto.pyx":792
  123818. * self._app_reading_paused = False
  123819. *
  123820. * def resume(): # <<<<<<<<<<<<<<
  123821. * if self._state == WRAPPED:
  123822. * self._do_read()
  123823. */
  123824. /* function exit code */
  123825. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  123826. goto __pyx_L0;
  123827. __pyx_L1_error:;
  123828. __Pyx_XDECREF(__pyx_t_1);
  123829. __Pyx_AddTraceback("uvloop.loop.SSLProtocol._resume_reading.resume", __pyx_clineno, __pyx_lineno, __pyx_filename);
  123830. __pyx_r = NULL;
  123831. __pyx_L0:;
  123832. __Pyx_XGIVEREF(__pyx_r);
  123833. __Pyx_RefNannyFinishContext();
  123834. return __pyx_r;
  123835. }
  123836. /* "uvloop/sslproto.pyx":788
  123837. * self._app_reading_paused = True
  123838. *
  123839. * cdef _resume_reading(self): # <<<<<<<<<<<<<<
  123840. * if self._app_reading_paused:
  123841. * self._app_reading_paused = False
  123842. */
  123843. static PyObject *__pyx_f_6uvloop_4loop_11SSLProtocol__resume_reading(struct __pyx_obj_6uvloop_4loop_SSLProtocol *__pyx_v_self) {
  123844. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_31__resume_reading *__pyx_cur_scope;
  123845. PyObject *__pyx_v_resume = 0;
  123846. PyObject *__pyx_r = NULL;
  123847. __Pyx_RefNannyDeclarations
  123848. int __pyx_t_1;
  123849. PyObject *__pyx_t_2 = NULL;
  123850. PyObject *__pyx_t_3 = NULL;
  123851. PyObject *__pyx_t_4 = NULL;
  123852. __Pyx_RefNannySetupContext("_resume_reading", 0);
  123853. __pyx_cur_scope = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_31__resume_reading *)__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_31__resume_reading(__pyx_ptype_6uvloop_4loop___pyx_scope_struct_31__resume_reading, __pyx_empty_tuple, NULL);
  123854. if (unlikely(!__pyx_cur_scope)) {
  123855. __pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_31__resume_reading *)Py_None);
  123856. __Pyx_INCREF(Py_None);
  123857. __PYX_ERR(22, 788, __pyx_L1_error)
  123858. } else {
  123859. __Pyx_GOTREF(__pyx_cur_scope);
  123860. }
  123861. __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  123862. __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  123863. __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  123864. /* "uvloop/sslproto.pyx":789
  123865. *
  123866. * cdef _resume_reading(self):
  123867. * if self._app_reading_paused: # <<<<<<<<<<<<<<
  123868. * self._app_reading_paused = False
  123869. *
  123870. */
  123871. __pyx_t_1 = (__pyx_cur_scope->__pyx_v_self->_app_reading_paused != 0);
  123872. if (__pyx_t_1) {
  123873. /* "uvloop/sslproto.pyx":790
  123874. * cdef _resume_reading(self):
  123875. * if self._app_reading_paused:
  123876. * self._app_reading_paused = False # <<<<<<<<<<<<<<
  123877. *
  123878. * def resume():
  123879. */
  123880. __pyx_cur_scope->__pyx_v_self->_app_reading_paused = 0;
  123881. /* "uvloop/sslproto.pyx":792
  123882. * self._app_reading_paused = False
  123883. *
  123884. * def resume(): # <<<<<<<<<<<<<<
  123885. * if self._state == WRAPPED:
  123886. * self._do_read()
  123887. */
  123888. __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6uvloop_4loop_11SSLProtocol_15_resume_reading_1resume, 0, __pyx_n_s_SSLProtocol__resume_reading_loca, ((PyObject*)__pyx_cur_scope), __pyx_n_s_uvloop_loop, __pyx_d, ((PyObject *)__pyx_codeobj__204)); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 792, __pyx_L1_error)
  123889. __Pyx_GOTREF(__pyx_t_2);
  123890. __pyx_v_resume = __pyx_t_2;
  123891. __pyx_t_2 = 0;
  123892. /* "uvloop/sslproto.pyx":799
  123893. * elif self._state == SHUTDOWN:
  123894. * self._do_shutdown()
  123895. * self._loop.call_soon(resume) # <<<<<<<<<<<<<<
  123896. *
  123897. * # Flow control for reads from SSL socket
  123898. */
  123899. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self->_loop, __pyx_n_s_call_soon); if (unlikely(!__pyx_t_3)) __PYX_ERR(22, 799, __pyx_L1_error)
  123900. __Pyx_GOTREF(__pyx_t_3);
  123901. __pyx_t_4 = NULL;
  123902. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
  123903. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
  123904. if (likely(__pyx_t_4)) {
  123905. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  123906. __Pyx_INCREF(__pyx_t_4);
  123907. __Pyx_INCREF(function);
  123908. __Pyx_DECREF_SET(__pyx_t_3, function);
  123909. }
  123910. }
  123911. __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_resume) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_resume);
  123912. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  123913. if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 799, __pyx_L1_error)
  123914. __Pyx_GOTREF(__pyx_t_2);
  123915. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  123916. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  123917. /* "uvloop/sslproto.pyx":789
  123918. *
  123919. * cdef _resume_reading(self):
  123920. * if self._app_reading_paused: # <<<<<<<<<<<<<<
  123921. * self._app_reading_paused = False
  123922. *
  123923. */
  123924. }
  123925. /* "uvloop/sslproto.pyx":788
  123926. * self._app_reading_paused = True
  123927. *
  123928. * cdef _resume_reading(self): # <<<<<<<<<<<<<<
  123929. * if self._app_reading_paused:
  123930. * self._app_reading_paused = False
  123931. */
  123932. /* function exit code */
  123933. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  123934. goto __pyx_L0;
  123935. __pyx_L1_error:;
  123936. __Pyx_XDECREF(__pyx_t_2);
  123937. __Pyx_XDECREF(__pyx_t_3);
  123938. __Pyx_XDECREF(__pyx_t_4);
  123939. __Pyx_AddTraceback("uvloop.loop.SSLProtocol._resume_reading", __pyx_clineno, __pyx_lineno, __pyx_filename);
  123940. __pyx_r = 0;
  123941. __pyx_L0:;
  123942. __Pyx_XDECREF(__pyx_v_resume);
  123943. __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  123944. __Pyx_XGIVEREF(__pyx_r);
  123945. __Pyx_RefNannyFinishContext();
  123946. return __pyx_r;
  123947. }
  123948. /* "uvloop/sslproto.pyx":803
  123949. * # Flow control for reads from SSL socket
  123950. *
  123951. * cdef _control_ssl_reading(self): # <<<<<<<<<<<<<<
  123952. * cdef size_t size = self._get_read_buffer_size()
  123953. * if size >= self._incoming_high_water and not self._ssl_reading_paused:
  123954. */
  123955. static PyObject *__pyx_f_6uvloop_4loop_11SSLProtocol__control_ssl_reading(struct __pyx_obj_6uvloop_4loop_SSLProtocol *__pyx_v_self) {
  123956. size_t __pyx_v_size;
  123957. PyObject *__pyx_r = NULL;
  123958. __Pyx_RefNannyDeclarations
  123959. int __pyx_t_1;
  123960. int __pyx_t_2;
  123961. PyObject *__pyx_t_3 = NULL;
  123962. PyObject *__pyx_t_4 = NULL;
  123963. PyObject *__pyx_t_5 = NULL;
  123964. __Pyx_RefNannySetupContext("_control_ssl_reading", 0);
  123965. /* "uvloop/sslproto.pyx":804
  123966. *
  123967. * cdef _control_ssl_reading(self):
  123968. * cdef size_t size = self._get_read_buffer_size() # <<<<<<<<<<<<<<
  123969. * if size >= self._incoming_high_water and not self._ssl_reading_paused:
  123970. * self._ssl_reading_paused = True
  123971. */
  123972. __pyx_v_size = ((struct __pyx_vtabstruct_6uvloop_4loop_SSLProtocol *)__pyx_v_self->__pyx_vtab)->_get_read_buffer_size(__pyx_v_self);
  123973. /* "uvloop/sslproto.pyx":805
  123974. * cdef _control_ssl_reading(self):
  123975. * cdef size_t size = self._get_read_buffer_size()
  123976. * if size >= self._incoming_high_water and not self._ssl_reading_paused: # <<<<<<<<<<<<<<
  123977. * self._ssl_reading_paused = True
  123978. * self._transport.pause_reading()
  123979. */
  123980. __pyx_t_2 = ((__pyx_v_size >= __pyx_v_self->_incoming_high_water) != 0);
  123981. if (__pyx_t_2) {
  123982. } else {
  123983. __pyx_t_1 = __pyx_t_2;
  123984. goto __pyx_L4_bool_binop_done;
  123985. }
  123986. __pyx_t_2 = ((!(__pyx_v_self->_ssl_reading_paused != 0)) != 0);
  123987. __pyx_t_1 = __pyx_t_2;
  123988. __pyx_L4_bool_binop_done:;
  123989. if (__pyx_t_1) {
  123990. /* "uvloop/sslproto.pyx":806
  123991. * cdef size_t size = self._get_read_buffer_size()
  123992. * if size >= self._incoming_high_water and not self._ssl_reading_paused:
  123993. * self._ssl_reading_paused = True # <<<<<<<<<<<<<<
  123994. * self._transport.pause_reading()
  123995. * elif size <= self._incoming_low_water and self._ssl_reading_paused:
  123996. */
  123997. __pyx_v_self->_ssl_reading_paused = 1;
  123998. /* "uvloop/sslproto.pyx":807
  123999. * if size >= self._incoming_high_water and not self._ssl_reading_paused:
  124000. * self._ssl_reading_paused = True
  124001. * self._transport.pause_reading() # <<<<<<<<<<<<<<
  124002. * elif size <= self._incoming_low_water and self._ssl_reading_paused:
  124003. * self._ssl_reading_paused = False
  124004. */
  124005. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_transport, __pyx_n_s_pause_reading); if (unlikely(!__pyx_t_4)) __PYX_ERR(22, 807, __pyx_L1_error)
  124006. __Pyx_GOTREF(__pyx_t_4);
  124007. __pyx_t_5 = NULL;
  124008. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
  124009. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
  124010. if (likely(__pyx_t_5)) {
  124011. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  124012. __Pyx_INCREF(__pyx_t_5);
  124013. __Pyx_INCREF(function);
  124014. __Pyx_DECREF_SET(__pyx_t_4, function);
  124015. }
  124016. }
  124017. __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
  124018. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  124019. if (unlikely(!__pyx_t_3)) __PYX_ERR(22, 807, __pyx_L1_error)
  124020. __Pyx_GOTREF(__pyx_t_3);
  124021. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  124022. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  124023. /* "uvloop/sslproto.pyx":805
  124024. * cdef _control_ssl_reading(self):
  124025. * cdef size_t size = self._get_read_buffer_size()
  124026. * if size >= self._incoming_high_water and not self._ssl_reading_paused: # <<<<<<<<<<<<<<
  124027. * self._ssl_reading_paused = True
  124028. * self._transport.pause_reading()
  124029. */
  124030. goto __pyx_L3;
  124031. }
  124032. /* "uvloop/sslproto.pyx":808
  124033. * self._ssl_reading_paused = True
  124034. * self._transport.pause_reading()
  124035. * elif size <= self._incoming_low_water and self._ssl_reading_paused: # <<<<<<<<<<<<<<
  124036. * self._ssl_reading_paused = False
  124037. * self._transport.resume_reading()
  124038. */
  124039. __pyx_t_2 = ((__pyx_v_size <= __pyx_v_self->_incoming_low_water) != 0);
  124040. if (__pyx_t_2) {
  124041. } else {
  124042. __pyx_t_1 = __pyx_t_2;
  124043. goto __pyx_L6_bool_binop_done;
  124044. }
  124045. __pyx_t_2 = (__pyx_v_self->_ssl_reading_paused != 0);
  124046. __pyx_t_1 = __pyx_t_2;
  124047. __pyx_L6_bool_binop_done:;
  124048. if (__pyx_t_1) {
  124049. /* "uvloop/sslproto.pyx":809
  124050. * self._transport.pause_reading()
  124051. * elif size <= self._incoming_low_water and self._ssl_reading_paused:
  124052. * self._ssl_reading_paused = False # <<<<<<<<<<<<<<
  124053. * self._transport.resume_reading()
  124054. *
  124055. */
  124056. __pyx_v_self->_ssl_reading_paused = 0;
  124057. /* "uvloop/sslproto.pyx":810
  124058. * elif size <= self._incoming_low_water and self._ssl_reading_paused:
  124059. * self._ssl_reading_paused = False
  124060. * self._transport.resume_reading() # <<<<<<<<<<<<<<
  124061. *
  124062. * cdef _set_read_buffer_limits(self, high=None, low=None):
  124063. */
  124064. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_transport, __pyx_n_s_resume_reading); if (unlikely(!__pyx_t_4)) __PYX_ERR(22, 810, __pyx_L1_error)
  124065. __Pyx_GOTREF(__pyx_t_4);
  124066. __pyx_t_5 = NULL;
  124067. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
  124068. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
  124069. if (likely(__pyx_t_5)) {
  124070. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  124071. __Pyx_INCREF(__pyx_t_5);
  124072. __Pyx_INCREF(function);
  124073. __Pyx_DECREF_SET(__pyx_t_4, function);
  124074. }
  124075. }
  124076. __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
  124077. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  124078. if (unlikely(!__pyx_t_3)) __PYX_ERR(22, 810, __pyx_L1_error)
  124079. __Pyx_GOTREF(__pyx_t_3);
  124080. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  124081. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  124082. /* "uvloop/sslproto.pyx":808
  124083. * self._ssl_reading_paused = True
  124084. * self._transport.pause_reading()
  124085. * elif size <= self._incoming_low_water and self._ssl_reading_paused: # <<<<<<<<<<<<<<
  124086. * self._ssl_reading_paused = False
  124087. * self._transport.resume_reading()
  124088. */
  124089. }
  124090. __pyx_L3:;
  124091. /* "uvloop/sslproto.pyx":803
  124092. * # Flow control for reads from SSL socket
  124093. *
  124094. * cdef _control_ssl_reading(self): # <<<<<<<<<<<<<<
  124095. * cdef size_t size = self._get_read_buffer_size()
  124096. * if size >= self._incoming_high_water and not self._ssl_reading_paused:
  124097. */
  124098. /* function exit code */
  124099. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  124100. goto __pyx_L0;
  124101. __pyx_L1_error:;
  124102. __Pyx_XDECREF(__pyx_t_3);
  124103. __Pyx_XDECREF(__pyx_t_4);
  124104. __Pyx_XDECREF(__pyx_t_5);
  124105. __Pyx_AddTraceback("uvloop.loop.SSLProtocol._control_ssl_reading", __pyx_clineno, __pyx_lineno, __pyx_filename);
  124106. __pyx_r = 0;
  124107. __pyx_L0:;
  124108. __Pyx_XGIVEREF(__pyx_r);
  124109. __Pyx_RefNannyFinishContext();
  124110. return __pyx_r;
  124111. }
  124112. /* "uvloop/sslproto.pyx":812
  124113. * self._transport.resume_reading()
  124114. *
  124115. * cdef _set_read_buffer_limits(self, high=None, low=None): # <<<<<<<<<<<<<<
  124116. * high, low = add_flowcontrol_defaults(
  124117. * high, low, FLOW_CONTROL_HIGH_WATER_SSL_READ)
  124118. */
  124119. static PyObject *__pyx_f_6uvloop_4loop_11SSLProtocol__set_read_buffer_limits(struct __pyx_obj_6uvloop_4loop_SSLProtocol *__pyx_v_self, struct __pyx_opt_args_6uvloop_4loop_11SSLProtocol__set_read_buffer_limits *__pyx_optional_args) {
  124120. PyObject *__pyx_v_high = ((PyObject *)Py_None);
  124121. PyObject *__pyx_v_low = ((PyObject *)Py_None);
  124122. PyObject *__pyx_r = NULL;
  124123. __Pyx_RefNannyDeclarations
  124124. PyObject *__pyx_t_1 = NULL;
  124125. PyObject *__pyx_t_2 = NULL;
  124126. PyObject *__pyx_t_3 = NULL;
  124127. PyObject *__pyx_t_4 = NULL;
  124128. PyObject *(*__pyx_t_5)(PyObject *);
  124129. size_t __pyx_t_6;
  124130. __Pyx_RefNannySetupContext("_set_read_buffer_limits", 0);
  124131. if (__pyx_optional_args) {
  124132. if (__pyx_optional_args->__pyx_n > 0) {
  124133. __pyx_v_high = __pyx_optional_args->high;
  124134. if (__pyx_optional_args->__pyx_n > 1) {
  124135. __pyx_v_low = __pyx_optional_args->low;
  124136. }
  124137. }
  124138. }
  124139. __Pyx_INCREF(__pyx_v_high);
  124140. __Pyx_INCREF(__pyx_v_low);
  124141. /* "uvloop/sslproto.pyx":813
  124142. *
  124143. * cdef _set_read_buffer_limits(self, high=None, low=None):
  124144. * high, low = add_flowcontrol_defaults( # <<<<<<<<<<<<<<
  124145. * high, low, FLOW_CONTROL_HIGH_WATER_SSL_READ)
  124146. * self._incoming_high_water = high
  124147. */
  124148. __pyx_t_1 = __pyx_f_6uvloop_8includes_11flowcontrol_add_flowcontrol_defaults(__pyx_v_high, __pyx_v_low, 0x100); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 813, __pyx_L1_error)
  124149. __Pyx_GOTREF(__pyx_t_1);
  124150. if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
  124151. PyObject* sequence = __pyx_t_1;
  124152. Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
  124153. if (unlikely(size != 2)) {
  124154. if (size > 2) __Pyx_RaiseTooManyValuesError(2);
  124155. else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
  124156. __PYX_ERR(22, 813, __pyx_L1_error)
  124157. }
  124158. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  124159. if (likely(PyTuple_CheckExact(sequence))) {
  124160. __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0);
  124161. __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1);
  124162. } else {
  124163. __pyx_t_2 = PyList_GET_ITEM(sequence, 0);
  124164. __pyx_t_3 = PyList_GET_ITEM(sequence, 1);
  124165. }
  124166. __Pyx_INCREF(__pyx_t_2);
  124167. __Pyx_INCREF(__pyx_t_3);
  124168. #else
  124169. __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 813, __pyx_L1_error)
  124170. __Pyx_GOTREF(__pyx_t_2);
  124171. __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(22, 813, __pyx_L1_error)
  124172. __Pyx_GOTREF(__pyx_t_3);
  124173. #endif
  124174. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  124175. } else {
  124176. Py_ssize_t index = -1;
  124177. __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(22, 813, __pyx_L1_error)
  124178. __Pyx_GOTREF(__pyx_t_4);
  124179. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  124180. __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext;
  124181. index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
  124182. __Pyx_GOTREF(__pyx_t_2);
  124183. index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
  124184. __Pyx_GOTREF(__pyx_t_3);
  124185. if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) __PYX_ERR(22, 813, __pyx_L1_error)
  124186. __pyx_t_5 = NULL;
  124187. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  124188. goto __pyx_L4_unpacking_done;
  124189. __pyx_L3_unpacking_failed:;
  124190. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  124191. __pyx_t_5 = NULL;
  124192. if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
  124193. __PYX_ERR(22, 813, __pyx_L1_error)
  124194. __pyx_L4_unpacking_done:;
  124195. }
  124196. __Pyx_DECREF_SET(__pyx_v_high, __pyx_t_2);
  124197. __pyx_t_2 = 0;
  124198. __Pyx_DECREF_SET(__pyx_v_low, __pyx_t_3);
  124199. __pyx_t_3 = 0;
  124200. /* "uvloop/sslproto.pyx":815
  124201. * high, low = add_flowcontrol_defaults(
  124202. * high, low, FLOW_CONTROL_HIGH_WATER_SSL_READ)
  124203. * self._incoming_high_water = high # <<<<<<<<<<<<<<
  124204. * self._incoming_low_water = low
  124205. *
  124206. */
  124207. __pyx_t_6 = __Pyx_PyInt_As_size_t(__pyx_v_high); if (unlikely((__pyx_t_6 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(22, 815, __pyx_L1_error)
  124208. __pyx_v_self->_incoming_high_water = __pyx_t_6;
  124209. /* "uvloop/sslproto.pyx":816
  124210. * high, low, FLOW_CONTROL_HIGH_WATER_SSL_READ)
  124211. * self._incoming_high_water = high
  124212. * self._incoming_low_water = low # <<<<<<<<<<<<<<
  124213. *
  124214. * cdef size_t _get_read_buffer_size(self):
  124215. */
  124216. __pyx_t_6 = __Pyx_PyInt_As_size_t(__pyx_v_low); if (unlikely((__pyx_t_6 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(22, 816, __pyx_L1_error)
  124217. __pyx_v_self->_incoming_low_water = __pyx_t_6;
  124218. /* "uvloop/sslproto.pyx":812
  124219. * self._transport.resume_reading()
  124220. *
  124221. * cdef _set_read_buffer_limits(self, high=None, low=None): # <<<<<<<<<<<<<<
  124222. * high, low = add_flowcontrol_defaults(
  124223. * high, low, FLOW_CONTROL_HIGH_WATER_SSL_READ)
  124224. */
  124225. /* function exit code */
  124226. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  124227. goto __pyx_L0;
  124228. __pyx_L1_error:;
  124229. __Pyx_XDECREF(__pyx_t_1);
  124230. __Pyx_XDECREF(__pyx_t_2);
  124231. __Pyx_XDECREF(__pyx_t_3);
  124232. __Pyx_XDECREF(__pyx_t_4);
  124233. __Pyx_AddTraceback("uvloop.loop.SSLProtocol._set_read_buffer_limits", __pyx_clineno, __pyx_lineno, __pyx_filename);
  124234. __pyx_r = 0;
  124235. __pyx_L0:;
  124236. __Pyx_XDECREF(__pyx_v_high);
  124237. __Pyx_XDECREF(__pyx_v_low);
  124238. __Pyx_XGIVEREF(__pyx_r);
  124239. __Pyx_RefNannyFinishContext();
  124240. return __pyx_r;
  124241. }
  124242. /* "uvloop/sslproto.pyx":818
  124243. * self._incoming_low_water = low
  124244. *
  124245. * cdef size_t _get_read_buffer_size(self): # <<<<<<<<<<<<<<
  124246. * return self._incoming.pending
  124247. *
  124248. */
  124249. static size_t __pyx_f_6uvloop_4loop_11SSLProtocol__get_read_buffer_size(struct __pyx_obj_6uvloop_4loop_SSLProtocol *__pyx_v_self) {
  124250. size_t __pyx_r;
  124251. __Pyx_RefNannyDeclarations
  124252. PyObject *__pyx_t_1 = NULL;
  124253. size_t __pyx_t_2;
  124254. __Pyx_RefNannySetupContext("_get_read_buffer_size", 0);
  124255. /* "uvloop/sslproto.pyx":819
  124256. *
  124257. * cdef size_t _get_read_buffer_size(self):
  124258. * return self._incoming.pending # <<<<<<<<<<<<<<
  124259. *
  124260. * # Flow control for writes to SSL socket
  124261. */
  124262. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_incoming, __pyx_n_s_pending); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 819, __pyx_L1_error)
  124263. __Pyx_GOTREF(__pyx_t_1);
  124264. __pyx_t_2 = __Pyx_PyInt_As_size_t(__pyx_t_1); if (unlikely((__pyx_t_2 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(22, 819, __pyx_L1_error)
  124265. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  124266. __pyx_r = __pyx_t_2;
  124267. goto __pyx_L0;
  124268. /* "uvloop/sslproto.pyx":818
  124269. * self._incoming_low_water = low
  124270. *
  124271. * cdef size_t _get_read_buffer_size(self): # <<<<<<<<<<<<<<
  124272. * return self._incoming.pending
  124273. *
  124274. */
  124275. /* function exit code */
  124276. __pyx_L1_error:;
  124277. __Pyx_XDECREF(__pyx_t_1);
  124278. __Pyx_WriteUnraisable("uvloop.loop.SSLProtocol._get_read_buffer_size", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  124279. __pyx_r = 0;
  124280. __pyx_L0:;
  124281. __Pyx_RefNannyFinishContext();
  124282. return __pyx_r;
  124283. }
  124284. /* "uvloop/sslproto.pyx":823
  124285. * # Flow control for writes to SSL socket
  124286. *
  124287. * def pause_writing(self): # <<<<<<<<<<<<<<
  124288. * """Called when the low-level transport's buffer goes over
  124289. * the high-water mark.
  124290. */
  124291. /* Python wrapper */
  124292. static PyObject *__pyx_pw_6uvloop_4loop_11SSLProtocol_19pause_writing(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  124293. static char __pyx_doc_6uvloop_4loop_11SSLProtocol_18pause_writing[] = "SSLProtocol.pause_writing(self)\nCalled when the low-level transport's buffer goes over\n the high-water mark.\n ";
  124294. static PyObject *__pyx_pw_6uvloop_4loop_11SSLProtocol_19pause_writing(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  124295. PyObject *__pyx_r = 0;
  124296. __Pyx_RefNannyDeclarations
  124297. __Pyx_RefNannySetupContext("pause_writing (wrapper)", 0);
  124298. __pyx_r = __pyx_pf_6uvloop_4loop_11SSLProtocol_18pause_writing(((struct __pyx_obj_6uvloop_4loop_SSLProtocol *)__pyx_v_self));
  124299. /* function exit code */
  124300. __Pyx_RefNannyFinishContext();
  124301. return __pyx_r;
  124302. }
  124303. static PyObject *__pyx_pf_6uvloop_4loop_11SSLProtocol_18pause_writing(struct __pyx_obj_6uvloop_4loop_SSLProtocol *__pyx_v_self) {
  124304. PyObject *__pyx_r = NULL;
  124305. __Pyx_RefNannyDeclarations
  124306. __Pyx_RefNannySetupContext("pause_writing", 0);
  124307. /* "uvloop/sslproto.pyx":827
  124308. * the high-water mark.
  124309. * """
  124310. * assert not self._ssl_writing_paused # <<<<<<<<<<<<<<
  124311. * self._ssl_writing_paused = True
  124312. *
  124313. */
  124314. #ifndef CYTHON_WITHOUT_ASSERTIONS
  124315. if (unlikely(!Py_OptimizeFlag)) {
  124316. if (unlikely(!((!(__pyx_v_self->_ssl_writing_paused != 0)) != 0))) {
  124317. PyErr_SetNone(PyExc_AssertionError);
  124318. __PYX_ERR(22, 827, __pyx_L1_error)
  124319. }
  124320. }
  124321. #endif
  124322. /* "uvloop/sslproto.pyx":828
  124323. * """
  124324. * assert not self._ssl_writing_paused
  124325. * self._ssl_writing_paused = True # <<<<<<<<<<<<<<
  124326. *
  124327. * def resume_writing(self):
  124328. */
  124329. __pyx_v_self->_ssl_writing_paused = 1;
  124330. /* "uvloop/sslproto.pyx":823
  124331. * # Flow control for writes to SSL socket
  124332. *
  124333. * def pause_writing(self): # <<<<<<<<<<<<<<
  124334. * """Called when the low-level transport's buffer goes over
  124335. * the high-water mark.
  124336. */
  124337. /* function exit code */
  124338. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  124339. goto __pyx_L0;
  124340. __pyx_L1_error:;
  124341. __Pyx_AddTraceback("uvloop.loop.SSLProtocol.pause_writing", __pyx_clineno, __pyx_lineno, __pyx_filename);
  124342. __pyx_r = NULL;
  124343. __pyx_L0:;
  124344. __Pyx_XGIVEREF(__pyx_r);
  124345. __Pyx_RefNannyFinishContext();
  124346. return __pyx_r;
  124347. }
  124348. /* "uvloop/sslproto.pyx":830
  124349. * self._ssl_writing_paused = True
  124350. *
  124351. * def resume_writing(self): # <<<<<<<<<<<<<<
  124352. * """Called when the low-level transport's buffer drains below
  124353. * the low-water mark.
  124354. */
  124355. /* Python wrapper */
  124356. static PyObject *__pyx_pw_6uvloop_4loop_11SSLProtocol_21resume_writing(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  124357. static char __pyx_doc_6uvloop_4loop_11SSLProtocol_20resume_writing[] = "SSLProtocol.resume_writing(self)\nCalled when the low-level transport's buffer drains below\n the low-water mark.\n ";
  124358. static PyObject *__pyx_pw_6uvloop_4loop_11SSLProtocol_21resume_writing(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  124359. PyObject *__pyx_r = 0;
  124360. __Pyx_RefNannyDeclarations
  124361. __Pyx_RefNannySetupContext("resume_writing (wrapper)", 0);
  124362. __pyx_r = __pyx_pf_6uvloop_4loop_11SSLProtocol_20resume_writing(((struct __pyx_obj_6uvloop_4loop_SSLProtocol *)__pyx_v_self));
  124363. /* function exit code */
  124364. __Pyx_RefNannyFinishContext();
  124365. return __pyx_r;
  124366. }
  124367. static PyObject *__pyx_pf_6uvloop_4loop_11SSLProtocol_20resume_writing(struct __pyx_obj_6uvloop_4loop_SSLProtocol *__pyx_v_self) {
  124368. PyObject *__pyx_r = NULL;
  124369. __Pyx_RefNannyDeclarations
  124370. PyObject *__pyx_t_1 = NULL;
  124371. __Pyx_RefNannySetupContext("resume_writing", 0);
  124372. /* "uvloop/sslproto.pyx":834
  124373. * the low-water mark.
  124374. * """
  124375. * assert self._ssl_writing_paused # <<<<<<<<<<<<<<
  124376. * self._ssl_writing_paused = False
  124377. * self._process_outgoing()
  124378. */
  124379. #ifndef CYTHON_WITHOUT_ASSERTIONS
  124380. if (unlikely(!Py_OptimizeFlag)) {
  124381. if (unlikely(!(__pyx_v_self->_ssl_writing_paused != 0))) {
  124382. PyErr_SetNone(PyExc_AssertionError);
  124383. __PYX_ERR(22, 834, __pyx_L1_error)
  124384. }
  124385. }
  124386. #endif
  124387. /* "uvloop/sslproto.pyx":835
  124388. * """
  124389. * assert self._ssl_writing_paused
  124390. * self._ssl_writing_paused = False # <<<<<<<<<<<<<<
  124391. * self._process_outgoing()
  124392. *
  124393. */
  124394. __pyx_v_self->_ssl_writing_paused = 0;
  124395. /* "uvloop/sslproto.pyx":836
  124396. * assert self._ssl_writing_paused
  124397. * self._ssl_writing_paused = False
  124398. * self._process_outgoing() # <<<<<<<<<<<<<<
  124399. *
  124400. * cdef _fatal_error(self, exc, message='Fatal error on transport'):
  124401. */
  124402. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_SSLProtocol *)__pyx_v_self->__pyx_vtab)->_process_outgoing(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 836, __pyx_L1_error)
  124403. __Pyx_GOTREF(__pyx_t_1);
  124404. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  124405. /* "uvloop/sslproto.pyx":830
  124406. * self._ssl_writing_paused = True
  124407. *
  124408. * def resume_writing(self): # <<<<<<<<<<<<<<
  124409. * """Called when the low-level transport's buffer drains below
  124410. * the low-water mark.
  124411. */
  124412. /* function exit code */
  124413. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  124414. goto __pyx_L0;
  124415. __pyx_L1_error:;
  124416. __Pyx_XDECREF(__pyx_t_1);
  124417. __Pyx_AddTraceback("uvloop.loop.SSLProtocol.resume_writing", __pyx_clineno, __pyx_lineno, __pyx_filename);
  124418. __pyx_r = NULL;
  124419. __pyx_L0:;
  124420. __Pyx_XGIVEREF(__pyx_r);
  124421. __Pyx_RefNannyFinishContext();
  124422. return __pyx_r;
  124423. }
  124424. /* "uvloop/sslproto.pyx":838
  124425. * self._process_outgoing()
  124426. *
  124427. * cdef _fatal_error(self, exc, message='Fatal error on transport'): # <<<<<<<<<<<<<<
  124428. * if self._transport:
  124429. * self._transport._force_close(exc)
  124430. */
  124431. static PyObject *__pyx_f_6uvloop_4loop_11SSLProtocol__fatal_error(struct __pyx_obj_6uvloop_4loop_SSLProtocol *__pyx_v_self, PyObject *__pyx_v_exc, struct __pyx_opt_args_6uvloop_4loop_11SSLProtocol__fatal_error *__pyx_optional_args) {
  124432. PyObject *__pyx_v_message = ((PyObject *)__pyx_kp_u_Fatal_error_on_transport_2);
  124433. PyObject *__pyx_r = NULL;
  124434. __Pyx_RefNannyDeclarations
  124435. int __pyx_t_1;
  124436. PyObject *__pyx_t_2 = NULL;
  124437. PyObject *__pyx_t_3 = NULL;
  124438. PyObject *__pyx_t_4 = NULL;
  124439. int __pyx_t_5;
  124440. PyObject *__pyx_t_6 = NULL;
  124441. __Pyx_RefNannySetupContext("_fatal_error", 0);
  124442. if (__pyx_optional_args) {
  124443. if (__pyx_optional_args->__pyx_n > 0) {
  124444. __pyx_v_message = __pyx_optional_args->message;
  124445. }
  124446. }
  124447. /* "uvloop/sslproto.pyx":839
  124448. *
  124449. * cdef _fatal_error(self, exc, message='Fatal error on transport'):
  124450. * if self._transport: # <<<<<<<<<<<<<<
  124451. * self._transport._force_close(exc)
  124452. *
  124453. */
  124454. __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->_transport); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(22, 839, __pyx_L1_error)
  124455. if (__pyx_t_1) {
  124456. /* "uvloop/sslproto.pyx":840
  124457. * cdef _fatal_error(self, exc, message='Fatal error on transport'):
  124458. * if self._transport:
  124459. * self._transport._force_close(exc) # <<<<<<<<<<<<<<
  124460. *
  124461. * if isinstance(exc, OSError):
  124462. */
  124463. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_transport, __pyx_n_s_force_close); if (unlikely(!__pyx_t_3)) __PYX_ERR(22, 840, __pyx_L1_error)
  124464. __Pyx_GOTREF(__pyx_t_3);
  124465. __pyx_t_4 = NULL;
  124466. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
  124467. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
  124468. if (likely(__pyx_t_4)) {
  124469. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  124470. __Pyx_INCREF(__pyx_t_4);
  124471. __Pyx_INCREF(function);
  124472. __Pyx_DECREF_SET(__pyx_t_3, function);
  124473. }
  124474. }
  124475. __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_exc) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_exc);
  124476. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  124477. if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 840, __pyx_L1_error)
  124478. __Pyx_GOTREF(__pyx_t_2);
  124479. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  124480. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  124481. /* "uvloop/sslproto.pyx":839
  124482. *
  124483. * cdef _fatal_error(self, exc, message='Fatal error on transport'):
  124484. * if self._transport: # <<<<<<<<<<<<<<
  124485. * self._transport._force_close(exc)
  124486. *
  124487. */
  124488. }
  124489. /* "uvloop/sslproto.pyx":842
  124490. * self._transport._force_close(exc)
  124491. *
  124492. * if isinstance(exc, OSError): # <<<<<<<<<<<<<<
  124493. * if self._loop.get_debug():
  124494. * aio_logger.debug("%r: %s", self, message, exc_info=True)
  124495. */
  124496. __pyx_t_1 = PyObject_IsInstance(__pyx_v_exc, __pyx_builtin_OSError); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(22, 842, __pyx_L1_error)
  124497. __pyx_t_5 = (__pyx_t_1 != 0);
  124498. if (__pyx_t_5) {
  124499. /* "uvloop/sslproto.pyx":843
  124500. *
  124501. * if isinstance(exc, OSError):
  124502. * if self._loop.get_debug(): # <<<<<<<<<<<<<<
  124503. * aio_logger.debug("%r: %s", self, message, exc_info=True)
  124504. * elif not isinstance(exc, aio_CancelledError):
  124505. */
  124506. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_loop, __pyx_n_s_get_debug); if (unlikely(!__pyx_t_3)) __PYX_ERR(22, 843, __pyx_L1_error)
  124507. __Pyx_GOTREF(__pyx_t_3);
  124508. __pyx_t_4 = NULL;
  124509. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
  124510. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
  124511. if (likely(__pyx_t_4)) {
  124512. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  124513. __Pyx_INCREF(__pyx_t_4);
  124514. __Pyx_INCREF(function);
  124515. __Pyx_DECREF_SET(__pyx_t_3, function);
  124516. }
  124517. }
  124518. __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
  124519. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  124520. if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 843, __pyx_L1_error)
  124521. __Pyx_GOTREF(__pyx_t_2);
  124522. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  124523. __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(22, 843, __pyx_L1_error)
  124524. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  124525. if (__pyx_t_5) {
  124526. /* "uvloop/sslproto.pyx":844
  124527. * if isinstance(exc, OSError):
  124528. * if self._loop.get_debug():
  124529. * aio_logger.debug("%r: %s", self, message, exc_info=True) # <<<<<<<<<<<<<<
  124530. * elif not isinstance(exc, aio_CancelledError):
  124531. * self._loop.call_exception_handler({
  124532. */
  124533. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_6uvloop_4loop_aio_logger, __pyx_n_s_debug); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 844, __pyx_L1_error)
  124534. __Pyx_GOTREF(__pyx_t_2);
  124535. __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(22, 844, __pyx_L1_error)
  124536. __Pyx_GOTREF(__pyx_t_3);
  124537. __Pyx_INCREF(__pyx_kp_u_r_s);
  124538. __Pyx_GIVEREF(__pyx_kp_u_r_s);
  124539. PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_r_s);
  124540. __Pyx_INCREF(((PyObject *)__pyx_v_self));
  124541. __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  124542. PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_self));
  124543. __Pyx_INCREF(__pyx_v_message);
  124544. __Pyx_GIVEREF(__pyx_v_message);
  124545. PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_message);
  124546. __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(22, 844, __pyx_L1_error)
  124547. __Pyx_GOTREF(__pyx_t_4);
  124548. if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_exc_info, Py_True) < 0) __PYX_ERR(22, 844, __pyx_L1_error)
  124549. __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(22, 844, __pyx_L1_error)
  124550. __Pyx_GOTREF(__pyx_t_6);
  124551. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  124552. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  124553. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  124554. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  124555. /* "uvloop/sslproto.pyx":843
  124556. *
  124557. * if isinstance(exc, OSError):
  124558. * if self._loop.get_debug(): # <<<<<<<<<<<<<<
  124559. * aio_logger.debug("%r: %s", self, message, exc_info=True)
  124560. * elif not isinstance(exc, aio_CancelledError):
  124561. */
  124562. }
  124563. /* "uvloop/sslproto.pyx":842
  124564. * self._transport._force_close(exc)
  124565. *
  124566. * if isinstance(exc, OSError): # <<<<<<<<<<<<<<
  124567. * if self._loop.get_debug():
  124568. * aio_logger.debug("%r: %s", self, message, exc_info=True)
  124569. */
  124570. goto __pyx_L4;
  124571. }
  124572. /* "uvloop/sslproto.pyx":845
  124573. * if self._loop.get_debug():
  124574. * aio_logger.debug("%r: %s", self, message, exc_info=True)
  124575. * elif not isinstance(exc, aio_CancelledError): # <<<<<<<<<<<<<<
  124576. * self._loop.call_exception_handler({
  124577. * 'message': message,
  124578. */
  124579. __pyx_t_6 = __pyx_v_6uvloop_4loop_aio_CancelledError;
  124580. __Pyx_INCREF(__pyx_t_6);
  124581. __pyx_t_5 = PyObject_IsInstance(__pyx_v_exc, __pyx_t_6); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(22, 845, __pyx_L1_error)
  124582. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  124583. __pyx_t_1 = ((!(__pyx_t_5 != 0)) != 0);
  124584. if (__pyx_t_1) {
  124585. /* "uvloop/sslproto.pyx":846
  124586. * aio_logger.debug("%r: %s", self, message, exc_info=True)
  124587. * elif not isinstance(exc, aio_CancelledError):
  124588. * self._loop.call_exception_handler({ # <<<<<<<<<<<<<<
  124589. * 'message': message,
  124590. * 'exception': exc,
  124591. */
  124592. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_loop, __pyx_n_s_call_exception_handler); if (unlikely(!__pyx_t_4)) __PYX_ERR(22, 846, __pyx_L1_error)
  124593. __Pyx_GOTREF(__pyx_t_4);
  124594. /* "uvloop/sslproto.pyx":847
  124595. * elif not isinstance(exc, aio_CancelledError):
  124596. * self._loop.call_exception_handler({
  124597. * 'message': message, # <<<<<<<<<<<<<<
  124598. * 'exception': exc,
  124599. * 'transport': self._transport,
  124600. */
  124601. __pyx_t_3 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(22, 847, __pyx_L1_error)
  124602. __Pyx_GOTREF(__pyx_t_3);
  124603. if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_message, __pyx_v_message) < 0) __PYX_ERR(22, 847, __pyx_L1_error)
  124604. /* "uvloop/sslproto.pyx":848
  124605. * self._loop.call_exception_handler({
  124606. * 'message': message,
  124607. * 'exception': exc, # <<<<<<<<<<<<<<
  124608. * 'transport': self._transport,
  124609. * 'protocol': self,
  124610. */
  124611. if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_exception, __pyx_v_exc) < 0) __PYX_ERR(22, 847, __pyx_L1_error)
  124612. /* "uvloop/sslproto.pyx":849
  124613. * 'message': message,
  124614. * 'exception': exc,
  124615. * 'transport': self._transport, # <<<<<<<<<<<<<<
  124616. * 'protocol': self,
  124617. * })
  124618. */
  124619. if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_transport, __pyx_v_self->_transport) < 0) __PYX_ERR(22, 847, __pyx_L1_error)
  124620. /* "uvloop/sslproto.pyx":850
  124621. * 'exception': exc,
  124622. * 'transport': self._transport,
  124623. * 'protocol': self, # <<<<<<<<<<<<<<
  124624. * })
  124625. */
  124626. if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_protocol, ((PyObject *)__pyx_v_self)) < 0) __PYX_ERR(22, 847, __pyx_L1_error)
  124627. __pyx_t_2 = NULL;
  124628. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
  124629. __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
  124630. if (likely(__pyx_t_2)) {
  124631. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  124632. __Pyx_INCREF(__pyx_t_2);
  124633. __Pyx_INCREF(function);
  124634. __Pyx_DECREF_SET(__pyx_t_4, function);
  124635. }
  124636. }
  124637. __pyx_t_6 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3);
  124638. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  124639. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  124640. if (unlikely(!__pyx_t_6)) __PYX_ERR(22, 846, __pyx_L1_error)
  124641. __Pyx_GOTREF(__pyx_t_6);
  124642. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  124643. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  124644. /* "uvloop/sslproto.pyx":845
  124645. * if self._loop.get_debug():
  124646. * aio_logger.debug("%r: %s", self, message, exc_info=True)
  124647. * elif not isinstance(exc, aio_CancelledError): # <<<<<<<<<<<<<<
  124648. * self._loop.call_exception_handler({
  124649. * 'message': message,
  124650. */
  124651. }
  124652. __pyx_L4:;
  124653. /* "uvloop/sslproto.pyx":838
  124654. * self._process_outgoing()
  124655. *
  124656. * cdef _fatal_error(self, exc, message='Fatal error on transport'): # <<<<<<<<<<<<<<
  124657. * if self._transport:
  124658. * self._transport._force_close(exc)
  124659. */
  124660. /* function exit code */
  124661. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  124662. goto __pyx_L0;
  124663. __pyx_L1_error:;
  124664. __Pyx_XDECREF(__pyx_t_2);
  124665. __Pyx_XDECREF(__pyx_t_3);
  124666. __Pyx_XDECREF(__pyx_t_4);
  124667. __Pyx_XDECREF(__pyx_t_6);
  124668. __Pyx_AddTraceback("uvloop.loop.SSLProtocol._fatal_error", __pyx_clineno, __pyx_lineno, __pyx_filename);
  124669. __pyx_r = 0;
  124670. __pyx_L0:;
  124671. __Pyx_XGIVEREF(__pyx_r);
  124672. __Pyx_RefNannyFinishContext();
  124673. return __pyx_r;
  124674. }
  124675. /* "(tree fragment)":1
  124676. * def __reduce_cython__(self): # <<<<<<<<<<<<<<
  124677. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  124678. * def __setstate_cython__(self, __pyx_state):
  124679. */
  124680. /* Python wrapper */
  124681. static PyObject *__pyx_pw_6uvloop_4loop_11SSLProtocol_23__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  124682. static char __pyx_doc_6uvloop_4loop_11SSLProtocol_22__reduce_cython__[] = "SSLProtocol.__reduce_cython__(self)";
  124683. static PyObject *__pyx_pw_6uvloop_4loop_11SSLProtocol_23__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  124684. PyObject *__pyx_r = 0;
  124685. __Pyx_RefNannyDeclarations
  124686. __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  124687. __pyx_r = __pyx_pf_6uvloop_4loop_11SSLProtocol_22__reduce_cython__(((struct __pyx_obj_6uvloop_4loop_SSLProtocol *)__pyx_v_self));
  124688. /* function exit code */
  124689. __Pyx_RefNannyFinishContext();
  124690. return __pyx_r;
  124691. }
  124692. static PyObject *__pyx_pf_6uvloop_4loop_11SSLProtocol_22__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_SSLProtocol *__pyx_v_self) {
  124693. PyObject *__pyx_r = NULL;
  124694. __Pyx_RefNannyDeclarations
  124695. PyObject *__pyx_t_1 = NULL;
  124696. __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  124697. /* "(tree fragment)":2
  124698. * def __reduce_cython__(self):
  124699. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  124700. * def __setstate_cython__(self, __pyx_state):
  124701. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  124702. */
  124703. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__205, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 2, __pyx_L1_error)
  124704. __Pyx_GOTREF(__pyx_t_1);
  124705. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  124706. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  124707. __PYX_ERR(9, 2, __pyx_L1_error)
  124708. /* "(tree fragment)":1
  124709. * def __reduce_cython__(self): # <<<<<<<<<<<<<<
  124710. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  124711. * def __setstate_cython__(self, __pyx_state):
  124712. */
  124713. /* function exit code */
  124714. __pyx_L1_error:;
  124715. __Pyx_XDECREF(__pyx_t_1);
  124716. __Pyx_AddTraceback("uvloop.loop.SSLProtocol.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  124717. __pyx_r = NULL;
  124718. __Pyx_XGIVEREF(__pyx_r);
  124719. __Pyx_RefNannyFinishContext();
  124720. return __pyx_r;
  124721. }
  124722. /* "(tree fragment)":3
  124723. * def __reduce_cython__(self):
  124724. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  124725. * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
  124726. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  124727. */
  124728. /* Python wrapper */
  124729. static PyObject *__pyx_pw_6uvloop_4loop_11SSLProtocol_25__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
  124730. static char __pyx_doc_6uvloop_4loop_11SSLProtocol_24__setstate_cython__[] = "SSLProtocol.__setstate_cython__(self, __pyx_state)";
  124731. static PyObject *__pyx_pw_6uvloop_4loop_11SSLProtocol_25__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  124732. PyObject *__pyx_r = 0;
  124733. __Pyx_RefNannyDeclarations
  124734. __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  124735. __pyx_r = __pyx_pf_6uvloop_4loop_11SSLProtocol_24__setstate_cython__(((struct __pyx_obj_6uvloop_4loop_SSLProtocol *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
  124736. /* function exit code */
  124737. __Pyx_RefNannyFinishContext();
  124738. return __pyx_r;
  124739. }
  124740. static PyObject *__pyx_pf_6uvloop_4loop_11SSLProtocol_24__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_SSLProtocol *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  124741. PyObject *__pyx_r = NULL;
  124742. __Pyx_RefNannyDeclarations
  124743. PyObject *__pyx_t_1 = NULL;
  124744. __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  124745. /* "(tree fragment)":4
  124746. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  124747. * def __setstate_cython__(self, __pyx_state):
  124748. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  124749. */
  124750. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__206, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 4, __pyx_L1_error)
  124751. __Pyx_GOTREF(__pyx_t_1);
  124752. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  124753. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  124754. __PYX_ERR(9, 4, __pyx_L1_error)
  124755. /* "(tree fragment)":3
  124756. * def __reduce_cython__(self):
  124757. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  124758. * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
  124759. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  124760. */
  124761. /* function exit code */
  124762. __pyx_L1_error:;
  124763. __Pyx_XDECREF(__pyx_t_1);
  124764. __Pyx_AddTraceback("uvloop.loop.SSLProtocol.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  124765. __pyx_r = NULL;
  124766. __Pyx_XGIVEREF(__pyx_r);
  124767. __Pyx_RefNannyFinishContext();
  124768. return __pyx_r;
  124769. }
  124770. /* "uvloop/handles/udp.pyx":16
  124771. * bint closed
  124772. *
  124773. * cdef close(self): # <<<<<<<<<<<<<<
  124774. * if self.closed:
  124775. * return
  124776. */
  124777. static PyObject *__pyx_f_6uvloop_4loop_15_UDPSendContext_close(struct __pyx_obj_6uvloop_4loop__UDPSendContext *__pyx_v_self) {
  124778. PyObject *__pyx_r = NULL;
  124779. __Pyx_RefNannyDeclarations
  124780. int __pyx_t_1;
  124781. __Pyx_RefNannySetupContext("close", 0);
  124782. /* "uvloop/handles/udp.pyx":17
  124783. *
  124784. * cdef close(self):
  124785. * if self.closed: # <<<<<<<<<<<<<<
  124786. * return
  124787. *
  124788. */
  124789. __pyx_t_1 = (__pyx_v_self->closed != 0);
  124790. if (__pyx_t_1) {
  124791. /* "uvloop/handles/udp.pyx":18
  124792. * cdef close(self):
  124793. * if self.closed:
  124794. * return # <<<<<<<<<<<<<<
  124795. *
  124796. * self.closed = 1
  124797. */
  124798. __Pyx_XDECREF(__pyx_r);
  124799. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  124800. goto __pyx_L0;
  124801. /* "uvloop/handles/udp.pyx":17
  124802. *
  124803. * cdef close(self):
  124804. * if self.closed: # <<<<<<<<<<<<<<
  124805. * return
  124806. *
  124807. */
  124808. }
  124809. /* "uvloop/handles/udp.pyx":20
  124810. * return
  124811. *
  124812. * self.closed = 1 # <<<<<<<<<<<<<<
  124813. * PyBuffer_Release(&self.py_buf) # void
  124814. * self.req.data = NULL
  124815. */
  124816. __pyx_v_self->closed = 1;
  124817. /* "uvloop/handles/udp.pyx":21
  124818. *
  124819. * self.closed = 1
  124820. * PyBuffer_Release(&self.py_buf) # void # <<<<<<<<<<<<<<
  124821. * self.req.data = NULL
  124822. * self.uv_buf.base = NULL
  124823. */
  124824. PyBuffer_Release((&__pyx_v_self->py_buf));
  124825. /* "uvloop/handles/udp.pyx":22
  124826. * self.closed = 1
  124827. * PyBuffer_Release(&self.py_buf) # void
  124828. * self.req.data = NULL # <<<<<<<<<<<<<<
  124829. * self.uv_buf.base = NULL
  124830. * Py_DECREF(self)
  124831. */
  124832. __pyx_v_self->req.data = NULL;
  124833. /* "uvloop/handles/udp.pyx":23
  124834. * PyBuffer_Release(&self.py_buf) # void
  124835. * self.req.data = NULL
  124836. * self.uv_buf.base = NULL # <<<<<<<<<<<<<<
  124837. * Py_DECREF(self)
  124838. * self.udp = None
  124839. */
  124840. __pyx_v_self->uv_buf.base = NULL;
  124841. /* "uvloop/handles/udp.pyx":24
  124842. * self.req.data = NULL
  124843. * self.uv_buf.base = NULL
  124844. * Py_DECREF(self) # <<<<<<<<<<<<<<
  124845. * self.udp = None
  124846. *
  124847. */
  124848. Py_DECREF(((PyObject *)__pyx_v_self));
  124849. /* "uvloop/handles/udp.pyx":25
  124850. * self.uv_buf.base = NULL
  124851. * Py_DECREF(self)
  124852. * self.udp = None # <<<<<<<<<<<<<<
  124853. *
  124854. * @staticmethod
  124855. */
  124856. __Pyx_INCREF(Py_None);
  124857. __Pyx_GIVEREF(Py_None);
  124858. __Pyx_GOTREF(__pyx_v_self->udp);
  124859. __Pyx_DECREF(((PyObject *)__pyx_v_self->udp));
  124860. __pyx_v_self->udp = ((struct __pyx_obj_6uvloop_4loop_UDPTransport *)Py_None);
  124861. /* "uvloop/handles/udp.pyx":16
  124862. * bint closed
  124863. *
  124864. * cdef close(self): # <<<<<<<<<<<<<<
  124865. * if self.closed:
  124866. * return
  124867. */
  124868. /* function exit code */
  124869. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  124870. __pyx_L0:;
  124871. __Pyx_XGIVEREF(__pyx_r);
  124872. __Pyx_RefNannyFinishContext();
  124873. return __pyx_r;
  124874. }
  124875. /* "uvloop/handles/udp.pyx":28
  124876. *
  124877. * @staticmethod
  124878. * cdef _UDPSendContext new(UDPTransport udp, object data): # <<<<<<<<<<<<<<
  124879. * cdef _UDPSendContext ctx
  124880. * ctx = _UDPSendContext.__new__(_UDPSendContext)
  124881. */
  124882. static struct __pyx_obj_6uvloop_4loop__UDPSendContext *__pyx_f_6uvloop_4loop_15_UDPSendContext_new(struct __pyx_obj_6uvloop_4loop_UDPTransport *__pyx_v_udp, PyObject *__pyx_v_data) {
  124883. struct __pyx_obj_6uvloop_4loop__UDPSendContext *__pyx_v_ctx = 0;
  124884. struct __pyx_obj_6uvloop_4loop__UDPSendContext *__pyx_r = NULL;
  124885. __Pyx_RefNannyDeclarations
  124886. PyObject *__pyx_t_1 = NULL;
  124887. int __pyx_t_2;
  124888. Py_ssize_t __pyx_t_3;
  124889. __Pyx_RefNannySetupContext("new", 0);
  124890. /* "uvloop/handles/udp.pyx":30
  124891. * cdef _UDPSendContext new(UDPTransport udp, object data):
  124892. * cdef _UDPSendContext ctx
  124893. * ctx = _UDPSendContext.__new__(_UDPSendContext) # <<<<<<<<<<<<<<
  124894. * ctx.udp = None
  124895. * ctx.closed = 1
  124896. */
  124897. __pyx_t_1 = ((PyObject *)__pyx_tp_new_6uvloop_4loop__UDPSendContext(((PyTypeObject *)__pyx_ptype_6uvloop_4loop__UDPSendContext), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(23, 30, __pyx_L1_error)
  124898. __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  124899. __pyx_v_ctx = ((struct __pyx_obj_6uvloop_4loop__UDPSendContext *)__pyx_t_1);
  124900. __pyx_t_1 = 0;
  124901. /* "uvloop/handles/udp.pyx":31
  124902. * cdef _UDPSendContext ctx
  124903. * ctx = _UDPSendContext.__new__(_UDPSendContext)
  124904. * ctx.udp = None # <<<<<<<<<<<<<<
  124905. * ctx.closed = 1
  124906. *
  124907. */
  124908. __Pyx_INCREF(Py_None);
  124909. __Pyx_GIVEREF(Py_None);
  124910. __Pyx_GOTREF(__pyx_v_ctx->udp);
  124911. __Pyx_DECREF(((PyObject *)__pyx_v_ctx->udp));
  124912. __pyx_v_ctx->udp = ((struct __pyx_obj_6uvloop_4loop_UDPTransport *)Py_None);
  124913. /* "uvloop/handles/udp.pyx":32
  124914. * ctx = _UDPSendContext.__new__(_UDPSendContext)
  124915. * ctx.udp = None
  124916. * ctx.closed = 1 # <<<<<<<<<<<<<<
  124917. *
  124918. * ctx.req.data = <void*> ctx
  124919. */
  124920. __pyx_v_ctx->closed = 1;
  124921. /* "uvloop/handles/udp.pyx":34
  124922. * ctx.closed = 1
  124923. *
  124924. * ctx.req.data = <void*> ctx # <<<<<<<<<<<<<<
  124925. * Py_INCREF(ctx)
  124926. *
  124927. */
  124928. __pyx_v_ctx->req.data = ((void *)__pyx_v_ctx);
  124929. /* "uvloop/handles/udp.pyx":35
  124930. *
  124931. * ctx.req.data = <void*> ctx
  124932. * Py_INCREF(ctx) # <<<<<<<<<<<<<<
  124933. *
  124934. * PyObject_GetBuffer(data, &ctx.py_buf, PyBUF_SIMPLE)
  124935. */
  124936. Py_INCREF(((PyObject *)__pyx_v_ctx));
  124937. /* "uvloop/handles/udp.pyx":37
  124938. * Py_INCREF(ctx)
  124939. *
  124940. * PyObject_GetBuffer(data, &ctx.py_buf, PyBUF_SIMPLE) # <<<<<<<<<<<<<<
  124941. * ctx.uv_buf.base = <char*>ctx.py_buf.buf
  124942. * ctx.uv_buf.len = ctx.py_buf.len
  124943. */
  124944. __pyx_t_2 = PyObject_GetBuffer(__pyx_v_data, (&__pyx_v_ctx->py_buf), PyBUF_SIMPLE); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(23, 37, __pyx_L1_error)
  124945. /* "uvloop/handles/udp.pyx":38
  124946. *
  124947. * PyObject_GetBuffer(data, &ctx.py_buf, PyBUF_SIMPLE)
  124948. * ctx.uv_buf.base = <char*>ctx.py_buf.buf # <<<<<<<<<<<<<<
  124949. * ctx.uv_buf.len = ctx.py_buf.len
  124950. * ctx.udp = udp
  124951. */
  124952. __pyx_v_ctx->uv_buf.base = ((char *)__pyx_v_ctx->py_buf.buf);
  124953. /* "uvloop/handles/udp.pyx":39
  124954. * PyObject_GetBuffer(data, &ctx.py_buf, PyBUF_SIMPLE)
  124955. * ctx.uv_buf.base = <char*>ctx.py_buf.buf
  124956. * ctx.uv_buf.len = ctx.py_buf.len # <<<<<<<<<<<<<<
  124957. * ctx.udp = udp
  124958. *
  124959. */
  124960. __pyx_t_3 = __pyx_v_ctx->py_buf.len;
  124961. __pyx_v_ctx->uv_buf.len = __pyx_t_3;
  124962. /* "uvloop/handles/udp.pyx":40
  124963. * ctx.uv_buf.base = <char*>ctx.py_buf.buf
  124964. * ctx.uv_buf.len = ctx.py_buf.len
  124965. * ctx.udp = udp # <<<<<<<<<<<<<<
  124966. *
  124967. * ctx.closed = 0
  124968. */
  124969. __Pyx_INCREF(((PyObject *)__pyx_v_udp));
  124970. __Pyx_GIVEREF(((PyObject *)__pyx_v_udp));
  124971. __Pyx_GOTREF(__pyx_v_ctx->udp);
  124972. __Pyx_DECREF(((PyObject *)__pyx_v_ctx->udp));
  124973. __pyx_v_ctx->udp = __pyx_v_udp;
  124974. /* "uvloop/handles/udp.pyx":42
  124975. * ctx.udp = udp
  124976. *
  124977. * ctx.closed = 0 # <<<<<<<<<<<<<<
  124978. * return ctx
  124979. *
  124980. */
  124981. __pyx_v_ctx->closed = 0;
  124982. /* "uvloop/handles/udp.pyx":43
  124983. *
  124984. * ctx.closed = 0
  124985. * return ctx # <<<<<<<<<<<<<<
  124986. *
  124987. * def __dealloc__(self):
  124988. */
  124989. __Pyx_XDECREF(((PyObject *)__pyx_r));
  124990. __Pyx_INCREF(((PyObject *)__pyx_v_ctx));
  124991. __pyx_r = __pyx_v_ctx;
  124992. goto __pyx_L0;
  124993. /* "uvloop/handles/udp.pyx":28
  124994. *
  124995. * @staticmethod
  124996. * cdef _UDPSendContext new(UDPTransport udp, object data): # <<<<<<<<<<<<<<
  124997. * cdef _UDPSendContext ctx
  124998. * ctx = _UDPSendContext.__new__(_UDPSendContext)
  124999. */
  125000. /* function exit code */
  125001. __pyx_L1_error:;
  125002. __Pyx_XDECREF(__pyx_t_1);
  125003. __Pyx_AddTraceback("uvloop.loop._UDPSendContext.new", __pyx_clineno, __pyx_lineno, __pyx_filename);
  125004. __pyx_r = 0;
  125005. __pyx_L0:;
  125006. __Pyx_XDECREF((PyObject *)__pyx_v_ctx);
  125007. __Pyx_XGIVEREF((PyObject *)__pyx_r);
  125008. __Pyx_RefNannyFinishContext();
  125009. return __pyx_r;
  125010. }
  125011. /* "uvloop/handles/udp.pyx":45
  125012. * return ctx
  125013. *
  125014. * def __dealloc__(self): # <<<<<<<<<<<<<<
  125015. * if UVLOOP_DEBUG:
  125016. * if not self.closed:
  125017. */
  125018. /* Python wrapper */
  125019. static void __pyx_pw_6uvloop_4loop_15_UDPSendContext_1__dealloc__(PyObject *__pyx_v_self); /*proto*/
  125020. static void __pyx_pw_6uvloop_4loop_15_UDPSendContext_1__dealloc__(PyObject *__pyx_v_self) {
  125021. __Pyx_RefNannyDeclarations
  125022. __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  125023. __pyx_pf_6uvloop_4loop_15_UDPSendContext___dealloc__(((struct __pyx_obj_6uvloop_4loop__UDPSendContext *)__pyx_v_self));
  125024. /* function exit code */
  125025. __Pyx_RefNannyFinishContext();
  125026. }
  125027. static void __pyx_pf_6uvloop_4loop_15_UDPSendContext___dealloc__(struct __pyx_obj_6uvloop_4loop__UDPSendContext *__pyx_v_self) {
  125028. __Pyx_RefNannyDeclarations
  125029. int __pyx_t_1;
  125030. PyObject *__pyx_t_2 = NULL;
  125031. __Pyx_RefNannySetupContext("__dealloc__", 0);
  125032. /* "uvloop/handles/udp.pyx":46
  125033. *
  125034. * def __dealloc__(self):
  125035. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  125036. * if not self.closed:
  125037. * raise RuntimeError(
  125038. */
  125039. __pyx_t_1 = (UVLOOP_DEBUG != 0);
  125040. if (__pyx_t_1) {
  125041. /* "uvloop/handles/udp.pyx":47
  125042. * def __dealloc__(self):
  125043. * if UVLOOP_DEBUG:
  125044. * if not self.closed: # <<<<<<<<<<<<<<
  125045. * raise RuntimeError(
  125046. * 'open _UDPSendContext is being deallocated')
  125047. */
  125048. __pyx_t_1 = ((!(__pyx_v_self->closed != 0)) != 0);
  125049. if (unlikely(__pyx_t_1)) {
  125050. /* "uvloop/handles/udp.pyx":48
  125051. * if UVLOOP_DEBUG:
  125052. * if not self.closed:
  125053. * raise RuntimeError( # <<<<<<<<<<<<<<
  125054. * 'open _UDPSendContext is being deallocated')
  125055. * self.udp = None
  125056. */
  125057. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__207, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(23, 48, __pyx_L1_error)
  125058. __Pyx_GOTREF(__pyx_t_2);
  125059. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  125060. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  125061. __PYX_ERR(23, 48, __pyx_L1_error)
  125062. /* "uvloop/handles/udp.pyx":47
  125063. * def __dealloc__(self):
  125064. * if UVLOOP_DEBUG:
  125065. * if not self.closed: # <<<<<<<<<<<<<<
  125066. * raise RuntimeError(
  125067. * 'open _UDPSendContext is being deallocated')
  125068. */
  125069. }
  125070. /* "uvloop/handles/udp.pyx":46
  125071. *
  125072. * def __dealloc__(self):
  125073. * if UVLOOP_DEBUG: # <<<<<<<<<<<<<<
  125074. * if not self.closed:
  125075. * raise RuntimeError(
  125076. */
  125077. }
  125078. /* "uvloop/handles/udp.pyx":50
  125079. * raise RuntimeError(
  125080. * 'open _UDPSendContext is being deallocated')
  125081. * self.udp = None # <<<<<<<<<<<<<<
  125082. *
  125083. *
  125084. */
  125085. __Pyx_INCREF(Py_None);
  125086. __Pyx_GIVEREF(Py_None);
  125087. __Pyx_GOTREF(__pyx_v_self->udp);
  125088. __Pyx_DECREF(((PyObject *)__pyx_v_self->udp));
  125089. __pyx_v_self->udp = ((struct __pyx_obj_6uvloop_4loop_UDPTransport *)Py_None);
  125090. /* "uvloop/handles/udp.pyx":45
  125091. * return ctx
  125092. *
  125093. * def __dealloc__(self): # <<<<<<<<<<<<<<
  125094. * if UVLOOP_DEBUG:
  125095. * if not self.closed:
  125096. */
  125097. /* function exit code */
  125098. goto __pyx_L0;
  125099. __pyx_L1_error:;
  125100. __Pyx_XDECREF(__pyx_t_2);
  125101. __Pyx_WriteUnraisable("uvloop.loop._UDPSendContext.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  125102. __pyx_L0:;
  125103. __Pyx_RefNannyFinishContext();
  125104. }
  125105. /* "(tree fragment)":1
  125106. * def __reduce_cython__(self): # <<<<<<<<<<<<<<
  125107. * raise TypeError("self.py_buf,self.req cannot be converted to a Python object for pickling")
  125108. * def __setstate_cython__(self, __pyx_state):
  125109. */
  125110. /* Python wrapper */
  125111. static PyObject *__pyx_pw_6uvloop_4loop_15_UDPSendContext_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  125112. static char __pyx_doc_6uvloop_4loop_15_UDPSendContext_2__reduce_cython__[] = "_UDPSendContext.__reduce_cython__(self)";
  125113. static PyObject *__pyx_pw_6uvloop_4loop_15_UDPSendContext_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  125114. PyObject *__pyx_r = 0;
  125115. __Pyx_RefNannyDeclarations
  125116. __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  125117. __pyx_r = __pyx_pf_6uvloop_4loop_15_UDPSendContext_2__reduce_cython__(((struct __pyx_obj_6uvloop_4loop__UDPSendContext *)__pyx_v_self));
  125118. /* function exit code */
  125119. __Pyx_RefNannyFinishContext();
  125120. return __pyx_r;
  125121. }
  125122. static PyObject *__pyx_pf_6uvloop_4loop_15_UDPSendContext_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop__UDPSendContext *__pyx_v_self) {
  125123. PyObject *__pyx_r = NULL;
  125124. __Pyx_RefNannyDeclarations
  125125. PyObject *__pyx_t_1 = NULL;
  125126. __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  125127. /* "(tree fragment)":2
  125128. * def __reduce_cython__(self):
  125129. * raise TypeError("self.py_buf,self.req cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
  125130. * def __setstate_cython__(self, __pyx_state):
  125131. * raise TypeError("self.py_buf,self.req cannot be converted to a Python object for pickling")
  125132. */
  125133. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__208, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 2, __pyx_L1_error)
  125134. __Pyx_GOTREF(__pyx_t_1);
  125135. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  125136. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  125137. __PYX_ERR(9, 2, __pyx_L1_error)
  125138. /* "(tree fragment)":1
  125139. * def __reduce_cython__(self): # <<<<<<<<<<<<<<
  125140. * raise TypeError("self.py_buf,self.req cannot be converted to a Python object for pickling")
  125141. * def __setstate_cython__(self, __pyx_state):
  125142. */
  125143. /* function exit code */
  125144. __pyx_L1_error:;
  125145. __Pyx_XDECREF(__pyx_t_1);
  125146. __Pyx_AddTraceback("uvloop.loop._UDPSendContext.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  125147. __pyx_r = NULL;
  125148. __Pyx_XGIVEREF(__pyx_r);
  125149. __Pyx_RefNannyFinishContext();
  125150. return __pyx_r;
  125151. }
  125152. /* "(tree fragment)":3
  125153. * def __reduce_cython__(self):
  125154. * raise TypeError("self.py_buf,self.req cannot be converted to a Python object for pickling")
  125155. * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
  125156. * raise TypeError("self.py_buf,self.req cannot be converted to a Python object for pickling")
  125157. */
  125158. /* Python wrapper */
  125159. static PyObject *__pyx_pw_6uvloop_4loop_15_UDPSendContext_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
  125160. static char __pyx_doc_6uvloop_4loop_15_UDPSendContext_4__setstate_cython__[] = "_UDPSendContext.__setstate_cython__(self, __pyx_state)";
  125161. static PyObject *__pyx_pw_6uvloop_4loop_15_UDPSendContext_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  125162. PyObject *__pyx_r = 0;
  125163. __Pyx_RefNannyDeclarations
  125164. __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  125165. __pyx_r = __pyx_pf_6uvloop_4loop_15_UDPSendContext_4__setstate_cython__(((struct __pyx_obj_6uvloop_4loop__UDPSendContext *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
  125166. /* function exit code */
  125167. __Pyx_RefNannyFinishContext();
  125168. return __pyx_r;
  125169. }
  125170. static PyObject *__pyx_pf_6uvloop_4loop_15_UDPSendContext_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop__UDPSendContext *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  125171. PyObject *__pyx_r = NULL;
  125172. __Pyx_RefNannyDeclarations
  125173. PyObject *__pyx_t_1 = NULL;
  125174. __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  125175. /* "(tree fragment)":4
  125176. * raise TypeError("self.py_buf,self.req cannot be converted to a Python object for pickling")
  125177. * def __setstate_cython__(self, __pyx_state):
  125178. * raise TypeError("self.py_buf,self.req cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
  125179. */
  125180. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__209, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 4, __pyx_L1_error)
  125181. __Pyx_GOTREF(__pyx_t_1);
  125182. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  125183. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  125184. __PYX_ERR(9, 4, __pyx_L1_error)
  125185. /* "(tree fragment)":3
  125186. * def __reduce_cython__(self):
  125187. * raise TypeError("self.py_buf,self.req cannot be converted to a Python object for pickling")
  125188. * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
  125189. * raise TypeError("self.py_buf,self.req cannot be converted to a Python object for pickling")
  125190. */
  125191. /* function exit code */
  125192. __pyx_L1_error:;
  125193. __Pyx_XDECREF(__pyx_t_1);
  125194. __Pyx_AddTraceback("uvloop.loop._UDPSendContext.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  125195. __pyx_r = NULL;
  125196. __Pyx_XGIVEREF(__pyx_r);
  125197. __Pyx_RefNannyFinishContext();
  125198. return __pyx_r;
  125199. }
  125200. /* "uvloop/handles/udp.pyx":55
  125201. * @cython.no_gc_clear
  125202. * cdef class UDPTransport(UVBaseTransport):
  125203. * def __cinit__(self): # <<<<<<<<<<<<<<
  125204. * self._family = uv.AF_UNSPEC
  125205. * self.__receiving = 0
  125206. */
  125207. /* Python wrapper */
  125208. static int __pyx_pw_6uvloop_4loop_12UDPTransport_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  125209. static int __pyx_pw_6uvloop_4loop_12UDPTransport_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  125210. int __pyx_r;
  125211. __Pyx_RefNannyDeclarations
  125212. __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  125213. if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
  125214. __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  125215. if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
  125216. __pyx_r = __pyx_pf_6uvloop_4loop_12UDPTransport___cinit__(((struct __pyx_obj_6uvloop_4loop_UDPTransport *)__pyx_v_self));
  125217. /* function exit code */
  125218. __Pyx_RefNannyFinishContext();
  125219. return __pyx_r;
  125220. }
  125221. static int __pyx_pf_6uvloop_4loop_12UDPTransport___cinit__(struct __pyx_obj_6uvloop_4loop_UDPTransport *__pyx_v_self) {
  125222. int __pyx_r;
  125223. __Pyx_RefNannyDeclarations
  125224. __Pyx_RefNannySetupContext("__cinit__", 0);
  125225. /* "uvloop/handles/udp.pyx":56
  125226. * cdef class UDPTransport(UVBaseTransport):
  125227. * def __cinit__(self):
  125228. * self._family = uv.AF_UNSPEC # <<<<<<<<<<<<<<
  125229. * self.__receiving = 0
  125230. *
  125231. */
  125232. __pyx_v_self->_family = AF_UNSPEC;
  125233. /* "uvloop/handles/udp.pyx":57
  125234. * def __cinit__(self):
  125235. * self._family = uv.AF_UNSPEC
  125236. * self.__receiving = 0 # <<<<<<<<<<<<<<
  125237. *
  125238. * cdef _init(self, Loop loop, unsigned int family):
  125239. */
  125240. __pyx_v_self->__pyx___receiving = 0;
  125241. /* "uvloop/handles/udp.pyx":55
  125242. * @cython.no_gc_clear
  125243. * cdef class UDPTransport(UVBaseTransport):
  125244. * def __cinit__(self): # <<<<<<<<<<<<<<
  125245. * self._family = uv.AF_UNSPEC
  125246. * self.__receiving = 0
  125247. */
  125248. /* function exit code */
  125249. __pyx_r = 0;
  125250. __Pyx_RefNannyFinishContext();
  125251. return __pyx_r;
  125252. }
  125253. /* "uvloop/handles/udp.pyx":59
  125254. * self.__receiving = 0
  125255. *
  125256. * cdef _init(self, Loop loop, unsigned int family): # <<<<<<<<<<<<<<
  125257. * cdef int err
  125258. *
  125259. */
  125260. static PyObject *__pyx_f_6uvloop_4loop_12UDPTransport__init(struct __pyx_obj_6uvloop_4loop_UDPTransport *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, unsigned int __pyx_v_family) {
  125261. int __pyx_v_err;
  125262. PyObject *__pyx_r = NULL;
  125263. __Pyx_RefNannyDeclarations
  125264. PyObject *__pyx_t_1 = NULL;
  125265. int __pyx_t_2;
  125266. unsigned int __pyx_t_3;
  125267. int __pyx_t_4;
  125268. __Pyx_RefNannySetupContext("_init", 0);
  125269. /* "uvloop/handles/udp.pyx":62
  125270. * cdef int err
  125271. *
  125272. * self._start_init(loop) # <<<<<<<<<<<<<<
  125273. *
  125274. * self._handle = <uv.uv_handle_t*>PyMem_RawMalloc(sizeof(uv.uv_udp_t))
  125275. */
  125276. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UDPTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._start_init(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self), __pyx_v_loop); if (unlikely(!__pyx_t_1)) __PYX_ERR(23, 62, __pyx_L1_error)
  125277. __Pyx_GOTREF(__pyx_t_1);
  125278. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  125279. /* "uvloop/handles/udp.pyx":64
  125280. * self._start_init(loop)
  125281. *
  125282. * self._handle = <uv.uv_handle_t*>PyMem_RawMalloc(sizeof(uv.uv_udp_t)) # <<<<<<<<<<<<<<
  125283. * if self._handle is NULL:
  125284. * self._abort_init()
  125285. */
  125286. __pyx_v_self->__pyx_base.__pyx_base.__pyx_base._handle = ((uv_handle_t *)PyMem_RawMalloc((sizeof(uv_udp_t))));
  125287. /* "uvloop/handles/udp.pyx":65
  125288. *
  125289. * self._handle = <uv.uv_handle_t*>PyMem_RawMalloc(sizeof(uv.uv_udp_t))
  125290. * if self._handle is NULL: # <<<<<<<<<<<<<<
  125291. * self._abort_init()
  125292. * raise MemoryError()
  125293. */
  125294. __pyx_t_2 = ((__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._handle == NULL) != 0);
  125295. if (unlikely(__pyx_t_2)) {
  125296. /* "uvloop/handles/udp.pyx":66
  125297. * self._handle = <uv.uv_handle_t*>PyMem_RawMalloc(sizeof(uv.uv_udp_t))
  125298. * if self._handle is NULL:
  125299. * self._abort_init() # <<<<<<<<<<<<<<
  125300. * raise MemoryError()
  125301. *
  125302. */
  125303. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UDPTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._abort_init(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(23, 66, __pyx_L1_error)
  125304. __Pyx_GOTREF(__pyx_t_1);
  125305. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  125306. /* "uvloop/handles/udp.pyx":67
  125307. * if self._handle is NULL:
  125308. * self._abort_init()
  125309. * raise MemoryError() # <<<<<<<<<<<<<<
  125310. *
  125311. * err = uv.uv_udp_init_ex(loop.uvloop,
  125312. */
  125313. PyErr_NoMemory(); __PYX_ERR(23, 67, __pyx_L1_error)
  125314. /* "uvloop/handles/udp.pyx":65
  125315. *
  125316. * self._handle = <uv.uv_handle_t*>PyMem_RawMalloc(sizeof(uv.uv_udp_t))
  125317. * if self._handle is NULL: # <<<<<<<<<<<<<<
  125318. * self._abort_init()
  125319. * raise MemoryError()
  125320. */
  125321. }
  125322. /* "uvloop/handles/udp.pyx":69
  125323. * raise MemoryError()
  125324. *
  125325. * err = uv.uv_udp_init_ex(loop.uvloop, # <<<<<<<<<<<<<<
  125326. * <uv.uv_udp_t*>self._handle,
  125327. * family)
  125328. */
  125329. __pyx_v_err = uv_udp_init_ex(__pyx_v_loop->uvloop, ((uv_udp_t *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._handle), __pyx_v_family);
  125330. /* "uvloop/handles/udp.pyx":72
  125331. * <uv.uv_udp_t*>self._handle,
  125332. * family)
  125333. * if err < 0: # <<<<<<<<<<<<<<
  125334. * self._abort_init()
  125335. * raise convert_error(err)
  125336. */
  125337. __pyx_t_2 = ((__pyx_v_err < 0) != 0);
  125338. if (unlikely(__pyx_t_2)) {
  125339. /* "uvloop/handles/udp.pyx":73
  125340. * family)
  125341. * if err < 0:
  125342. * self._abort_init() # <<<<<<<<<<<<<<
  125343. * raise convert_error(err)
  125344. *
  125345. */
  125346. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UDPTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._abort_init(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(23, 73, __pyx_L1_error)
  125347. __Pyx_GOTREF(__pyx_t_1);
  125348. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  125349. /* "uvloop/handles/udp.pyx":74
  125350. * if err < 0:
  125351. * self._abort_init()
  125352. * raise convert_error(err) # <<<<<<<<<<<<<<
  125353. *
  125354. * if family in (uv.AF_INET, uv.AF_INET6):
  125355. */
  125356. __pyx_t_1 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(23, 74, __pyx_L1_error)
  125357. __Pyx_GOTREF(__pyx_t_1);
  125358. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  125359. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  125360. __PYX_ERR(23, 74, __pyx_L1_error)
  125361. /* "uvloop/handles/udp.pyx":72
  125362. * <uv.uv_udp_t*>self._handle,
  125363. * family)
  125364. * if err < 0: # <<<<<<<<<<<<<<
  125365. * self._abort_init()
  125366. * raise convert_error(err)
  125367. */
  125368. }
  125369. /* "uvloop/handles/udp.pyx":76
  125370. * raise convert_error(err)
  125371. *
  125372. * if family in (uv.AF_INET, uv.AF_INET6): # <<<<<<<<<<<<<<
  125373. * self._family = family
  125374. *
  125375. */
  125376. __pyx_t_3 = __pyx_v_family;
  125377. __pyx_t_4 = ((__pyx_t_3 == AF_INET) != 0);
  125378. if (!__pyx_t_4) {
  125379. } else {
  125380. __pyx_t_2 = __pyx_t_4;
  125381. goto __pyx_L6_bool_binop_done;
  125382. }
  125383. __pyx_t_4 = ((__pyx_t_3 == AF_INET6) != 0);
  125384. __pyx_t_2 = __pyx_t_4;
  125385. __pyx_L6_bool_binop_done:;
  125386. __pyx_t_4 = (__pyx_t_2 != 0);
  125387. if (__pyx_t_4) {
  125388. /* "uvloop/handles/udp.pyx":77
  125389. *
  125390. * if family in (uv.AF_INET, uv.AF_INET6):
  125391. * self._family = family # <<<<<<<<<<<<<<
  125392. *
  125393. * self._finish_init()
  125394. */
  125395. __pyx_v_self->_family = __pyx_v_family;
  125396. /* "uvloop/handles/udp.pyx":76
  125397. * raise convert_error(err)
  125398. *
  125399. * if family in (uv.AF_INET, uv.AF_INET6): # <<<<<<<<<<<<<<
  125400. * self._family = family
  125401. *
  125402. */
  125403. }
  125404. /* "uvloop/handles/udp.pyx":79
  125405. * self._family = family
  125406. *
  125407. * self._finish_init() # <<<<<<<<<<<<<<
  125408. *
  125409. * cdef _connect(self, system.sockaddr* addr, size_t addr_len):
  125410. */
  125411. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UDPTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._finish_init(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(23, 79, __pyx_L1_error)
  125412. __Pyx_GOTREF(__pyx_t_1);
  125413. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  125414. /* "uvloop/handles/udp.pyx":59
  125415. * self.__receiving = 0
  125416. *
  125417. * cdef _init(self, Loop loop, unsigned int family): # <<<<<<<<<<<<<<
  125418. * cdef int err
  125419. *
  125420. */
  125421. /* function exit code */
  125422. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  125423. goto __pyx_L0;
  125424. __pyx_L1_error:;
  125425. __Pyx_XDECREF(__pyx_t_1);
  125426. __Pyx_AddTraceback("uvloop.loop.UDPTransport._init", __pyx_clineno, __pyx_lineno, __pyx_filename);
  125427. __pyx_r = 0;
  125428. __pyx_L0:;
  125429. __Pyx_XGIVEREF(__pyx_r);
  125430. __Pyx_RefNannyFinishContext();
  125431. return __pyx_r;
  125432. }
  125433. /* "uvloop/handles/udp.pyx":81
  125434. * self._finish_init()
  125435. *
  125436. * cdef _connect(self, system.sockaddr* addr, size_t addr_len): # <<<<<<<<<<<<<<
  125437. * cdef int err
  125438. * err = uv.uv_udp_connect(<uv.uv_udp_t*>self._handle, addr)
  125439. */
  125440. static PyObject *__pyx_f_6uvloop_4loop_12UDPTransport__connect(struct __pyx_obj_6uvloop_4loop_UDPTransport *__pyx_v_self, struct sockaddr *__pyx_v_addr, CYTHON_UNUSED size_t __pyx_v_addr_len) {
  125441. int __pyx_v_err;
  125442. PyObject *__pyx_v_exc = NULL;
  125443. PyObject *__pyx_r = NULL;
  125444. __Pyx_RefNannyDeclarations
  125445. int __pyx_t_1;
  125446. PyObject *__pyx_t_2 = NULL;
  125447. __Pyx_RefNannySetupContext("_connect", 0);
  125448. /* "uvloop/handles/udp.pyx":83
  125449. * cdef _connect(self, system.sockaddr* addr, size_t addr_len):
  125450. * cdef int err
  125451. * err = uv.uv_udp_connect(<uv.uv_udp_t*>self._handle, addr) # <<<<<<<<<<<<<<
  125452. * if err < 0:
  125453. * exc = convert_error(err)
  125454. */
  125455. __pyx_v_err = uv_udp_connect(((uv_udp_t *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._handle), __pyx_v_addr);
  125456. /* "uvloop/handles/udp.pyx":84
  125457. * cdef int err
  125458. * err = uv.uv_udp_connect(<uv.uv_udp_t*>self._handle, addr)
  125459. * if err < 0: # <<<<<<<<<<<<<<
  125460. * exc = convert_error(err)
  125461. * raise exc
  125462. */
  125463. __pyx_t_1 = ((__pyx_v_err < 0) != 0);
  125464. if (unlikely(__pyx_t_1)) {
  125465. /* "uvloop/handles/udp.pyx":85
  125466. * err = uv.uv_udp_connect(<uv.uv_udp_t*>self._handle, addr)
  125467. * if err < 0:
  125468. * exc = convert_error(err) # <<<<<<<<<<<<<<
  125469. * raise exc
  125470. *
  125471. */
  125472. __pyx_t_2 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(23, 85, __pyx_L1_error)
  125473. __Pyx_GOTREF(__pyx_t_2);
  125474. __pyx_v_exc = __pyx_t_2;
  125475. __pyx_t_2 = 0;
  125476. /* "uvloop/handles/udp.pyx":86
  125477. * if err < 0:
  125478. * exc = convert_error(err)
  125479. * raise exc # <<<<<<<<<<<<<<
  125480. *
  125481. * cdef open(self, int family, int sockfd):
  125482. */
  125483. __Pyx_Raise(__pyx_v_exc, 0, 0, 0);
  125484. __PYX_ERR(23, 86, __pyx_L1_error)
  125485. /* "uvloop/handles/udp.pyx":84
  125486. * cdef int err
  125487. * err = uv.uv_udp_connect(<uv.uv_udp_t*>self._handle, addr)
  125488. * if err < 0: # <<<<<<<<<<<<<<
  125489. * exc = convert_error(err)
  125490. * raise exc
  125491. */
  125492. }
  125493. /* "uvloop/handles/udp.pyx":81
  125494. * self._finish_init()
  125495. *
  125496. * cdef _connect(self, system.sockaddr* addr, size_t addr_len): # <<<<<<<<<<<<<<
  125497. * cdef int err
  125498. * err = uv.uv_udp_connect(<uv.uv_udp_t*>self._handle, addr)
  125499. */
  125500. /* function exit code */
  125501. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  125502. goto __pyx_L0;
  125503. __pyx_L1_error:;
  125504. __Pyx_XDECREF(__pyx_t_2);
  125505. __Pyx_AddTraceback("uvloop.loop.UDPTransport._connect", __pyx_clineno, __pyx_lineno, __pyx_filename);
  125506. __pyx_r = 0;
  125507. __pyx_L0:;
  125508. __Pyx_XDECREF(__pyx_v_exc);
  125509. __Pyx_XGIVEREF(__pyx_r);
  125510. __Pyx_RefNannyFinishContext();
  125511. return __pyx_r;
  125512. }
  125513. /* "uvloop/handles/udp.pyx":88
  125514. * raise exc
  125515. *
  125516. * cdef open(self, int family, int sockfd): # <<<<<<<<<<<<<<
  125517. * if family in (uv.AF_INET, uv.AF_INET6, uv.AF_UNIX):
  125518. * self._family = family
  125519. */
  125520. static PyObject *__pyx_f_6uvloop_4loop_12UDPTransport_open(struct __pyx_obj_6uvloop_4loop_UDPTransport *__pyx_v_self, int __pyx_v_family, int __pyx_v_sockfd) {
  125521. int __pyx_v_err;
  125522. PyObject *__pyx_v_exc = NULL;
  125523. PyObject *__pyx_r = NULL;
  125524. __Pyx_RefNannyDeclarations
  125525. int __pyx_t_1;
  125526. int __pyx_t_2;
  125527. int __pyx_t_3;
  125528. PyObject *__pyx_t_4 = NULL;
  125529. PyObject *__pyx_t_5 = NULL;
  125530. PyObject *__pyx_t_6 = NULL;
  125531. PyObject *__pyx_t_7 = NULL;
  125532. __Pyx_RefNannySetupContext("open", 0);
  125533. /* "uvloop/handles/udp.pyx":89
  125534. *
  125535. * cdef open(self, int family, int sockfd):
  125536. * if family in (uv.AF_INET, uv.AF_INET6, uv.AF_UNIX): # <<<<<<<<<<<<<<
  125537. * self._family = family
  125538. * else:
  125539. */
  125540. __pyx_t_1 = __pyx_v_family;
  125541. __pyx_t_3 = ((__pyx_t_1 == AF_INET) != 0);
  125542. if (!__pyx_t_3) {
  125543. } else {
  125544. __pyx_t_2 = __pyx_t_3;
  125545. goto __pyx_L4_bool_binop_done;
  125546. }
  125547. __pyx_t_3 = ((__pyx_t_1 == AF_INET6) != 0);
  125548. if (!__pyx_t_3) {
  125549. } else {
  125550. __pyx_t_2 = __pyx_t_3;
  125551. goto __pyx_L4_bool_binop_done;
  125552. }
  125553. __pyx_t_3 = ((__pyx_t_1 == AF_UNIX) != 0);
  125554. __pyx_t_2 = __pyx_t_3;
  125555. __pyx_L4_bool_binop_done:;
  125556. __pyx_t_3 = (__pyx_t_2 != 0);
  125557. if (likely(__pyx_t_3)) {
  125558. /* "uvloop/handles/udp.pyx":90
  125559. * cdef open(self, int family, int sockfd):
  125560. * if family in (uv.AF_INET, uv.AF_INET6, uv.AF_UNIX):
  125561. * self._family = family # <<<<<<<<<<<<<<
  125562. * else:
  125563. * raise ValueError(
  125564. */
  125565. __pyx_v_self->_family = __pyx_v_family;
  125566. /* "uvloop/handles/udp.pyx":89
  125567. *
  125568. * cdef open(self, int family, int sockfd):
  125569. * if family in (uv.AF_INET, uv.AF_INET6, uv.AF_UNIX): # <<<<<<<<<<<<<<
  125570. * self._family = family
  125571. * else:
  125572. */
  125573. goto __pyx_L3;
  125574. }
  125575. /* "uvloop/handles/udp.pyx":92
  125576. * self._family = family
  125577. * else:
  125578. * raise ValueError( # <<<<<<<<<<<<<<
  125579. * 'cannot open a UDP handle, invalid family {}'.format(family))
  125580. *
  125581. */
  125582. /*else*/ {
  125583. /* "uvloop/handles/udp.pyx":93
  125584. * else:
  125585. * raise ValueError(
  125586. * 'cannot open a UDP handle, invalid family {}'.format(family)) # <<<<<<<<<<<<<<
  125587. *
  125588. * cdef int err
  125589. */
  125590. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_cannot_open_a_UDP_handle_invalid, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(23, 93, __pyx_L1_error)
  125591. __Pyx_GOTREF(__pyx_t_5);
  125592. __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_family); if (unlikely(!__pyx_t_6)) __PYX_ERR(23, 93, __pyx_L1_error)
  125593. __Pyx_GOTREF(__pyx_t_6);
  125594. __pyx_t_7 = NULL;
  125595. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
  125596. __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
  125597. if (likely(__pyx_t_7)) {
  125598. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
  125599. __Pyx_INCREF(__pyx_t_7);
  125600. __Pyx_INCREF(function);
  125601. __Pyx_DECREF_SET(__pyx_t_5, function);
  125602. }
  125603. }
  125604. __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6);
  125605. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  125606. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  125607. if (unlikely(!__pyx_t_4)) __PYX_ERR(23, 93, __pyx_L1_error)
  125608. __Pyx_GOTREF(__pyx_t_4);
  125609. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  125610. /* "uvloop/handles/udp.pyx":92
  125611. * self._family = family
  125612. * else:
  125613. * raise ValueError( # <<<<<<<<<<<<<<
  125614. * 'cannot open a UDP handle, invalid family {}'.format(family))
  125615. *
  125616. */
  125617. __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(23, 92, __pyx_L1_error)
  125618. __Pyx_GOTREF(__pyx_t_5);
  125619. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  125620. __Pyx_Raise(__pyx_t_5, 0, 0, 0);
  125621. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  125622. __PYX_ERR(23, 92, __pyx_L1_error)
  125623. }
  125624. __pyx_L3:;
  125625. /* "uvloop/handles/udp.pyx":96
  125626. *
  125627. * cdef int err
  125628. * err = uv.uv_udp_open(<uv.uv_udp_t*>self._handle, # <<<<<<<<<<<<<<
  125629. * <uv.uv_os_sock_t>sockfd)
  125630. *
  125631. */
  125632. __pyx_v_err = uv_udp_open(((uv_udp_t *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._handle), ((uv_os_sock_t)__pyx_v_sockfd));
  125633. /* "uvloop/handles/udp.pyx":99
  125634. * <uv.uv_os_sock_t>sockfd)
  125635. *
  125636. * if err < 0: # <<<<<<<<<<<<<<
  125637. * exc = convert_error(err)
  125638. * raise exc
  125639. */
  125640. __pyx_t_3 = ((__pyx_v_err < 0) != 0);
  125641. if (unlikely(__pyx_t_3)) {
  125642. /* "uvloop/handles/udp.pyx":100
  125643. *
  125644. * if err < 0:
  125645. * exc = convert_error(err) # <<<<<<<<<<<<<<
  125646. * raise exc
  125647. *
  125648. */
  125649. __pyx_t_5 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_5)) __PYX_ERR(23, 100, __pyx_L1_error)
  125650. __Pyx_GOTREF(__pyx_t_5);
  125651. __pyx_v_exc = __pyx_t_5;
  125652. __pyx_t_5 = 0;
  125653. /* "uvloop/handles/udp.pyx":101
  125654. * if err < 0:
  125655. * exc = convert_error(err)
  125656. * raise exc # <<<<<<<<<<<<<<
  125657. *
  125658. * cdef _bind(self, system.sockaddr* addr, bint reuse_addr):
  125659. */
  125660. __Pyx_Raise(__pyx_v_exc, 0, 0, 0);
  125661. __PYX_ERR(23, 101, __pyx_L1_error)
  125662. /* "uvloop/handles/udp.pyx":99
  125663. * <uv.uv_os_sock_t>sockfd)
  125664. *
  125665. * if err < 0: # <<<<<<<<<<<<<<
  125666. * exc = convert_error(err)
  125667. * raise exc
  125668. */
  125669. }
  125670. /* "uvloop/handles/udp.pyx":88
  125671. * raise exc
  125672. *
  125673. * cdef open(self, int family, int sockfd): # <<<<<<<<<<<<<<
  125674. * if family in (uv.AF_INET, uv.AF_INET6, uv.AF_UNIX):
  125675. * self._family = family
  125676. */
  125677. /* function exit code */
  125678. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  125679. goto __pyx_L0;
  125680. __pyx_L1_error:;
  125681. __Pyx_XDECREF(__pyx_t_4);
  125682. __Pyx_XDECREF(__pyx_t_5);
  125683. __Pyx_XDECREF(__pyx_t_6);
  125684. __Pyx_XDECREF(__pyx_t_7);
  125685. __Pyx_AddTraceback("uvloop.loop.UDPTransport.open", __pyx_clineno, __pyx_lineno, __pyx_filename);
  125686. __pyx_r = 0;
  125687. __pyx_L0:;
  125688. __Pyx_XDECREF(__pyx_v_exc);
  125689. __Pyx_XGIVEREF(__pyx_r);
  125690. __Pyx_RefNannyFinishContext();
  125691. return __pyx_r;
  125692. }
  125693. /* "uvloop/handles/udp.pyx":103
  125694. * raise exc
  125695. *
  125696. * cdef _bind(self, system.sockaddr* addr, bint reuse_addr): # <<<<<<<<<<<<<<
  125697. * cdef:
  125698. * int err
  125699. */
  125700. static PyObject *__pyx_f_6uvloop_4loop_12UDPTransport__bind(struct __pyx_obj_6uvloop_4loop_UDPTransport *__pyx_v_self, struct sockaddr *__pyx_v_addr, int __pyx_v_reuse_addr) {
  125701. int __pyx_v_err;
  125702. int __pyx_v_flags;
  125703. PyObject *__pyx_v_exc = NULL;
  125704. PyObject *__pyx_r = NULL;
  125705. __Pyx_RefNannyDeclarations
  125706. PyObject *__pyx_t_1 = NULL;
  125707. int __pyx_t_2;
  125708. __Pyx_RefNannySetupContext("_bind", 0);
  125709. /* "uvloop/handles/udp.pyx":106
  125710. * cdef:
  125711. * int err
  125712. * int flags = 0 # <<<<<<<<<<<<<<
  125713. *
  125714. * self._ensure_alive()
  125715. */
  125716. __pyx_v_flags = 0;
  125717. /* "uvloop/handles/udp.pyx":108
  125718. * int flags = 0
  125719. *
  125720. * self._ensure_alive() # <<<<<<<<<<<<<<
  125721. *
  125722. * if reuse_addr:
  125723. */
  125724. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UDPTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._ensure_alive(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(23, 108, __pyx_L1_error)
  125725. __Pyx_GOTREF(__pyx_t_1);
  125726. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  125727. /* "uvloop/handles/udp.pyx":110
  125728. * self._ensure_alive()
  125729. *
  125730. * if reuse_addr: # <<<<<<<<<<<<<<
  125731. * flags |= uv.UV_UDP_REUSEADDR
  125732. *
  125733. */
  125734. __pyx_t_2 = (__pyx_v_reuse_addr != 0);
  125735. if (__pyx_t_2) {
  125736. /* "uvloop/handles/udp.pyx":111
  125737. *
  125738. * if reuse_addr:
  125739. * flags |= uv.UV_UDP_REUSEADDR # <<<<<<<<<<<<<<
  125740. *
  125741. * err = uv.uv_udp_bind(<uv.uv_udp_t*>self._handle, addr, flags)
  125742. */
  125743. __pyx_v_flags = (__pyx_v_flags | UV_UDP_REUSEADDR);
  125744. /* "uvloop/handles/udp.pyx":110
  125745. * self._ensure_alive()
  125746. *
  125747. * if reuse_addr: # <<<<<<<<<<<<<<
  125748. * flags |= uv.UV_UDP_REUSEADDR
  125749. *
  125750. */
  125751. }
  125752. /* "uvloop/handles/udp.pyx":113
  125753. * flags |= uv.UV_UDP_REUSEADDR
  125754. *
  125755. * err = uv.uv_udp_bind(<uv.uv_udp_t*>self._handle, addr, flags) # <<<<<<<<<<<<<<
  125756. * if err < 0:
  125757. * exc = convert_error(err)
  125758. */
  125759. __pyx_v_err = uv_udp_bind(((uv_udp_t *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._handle), __pyx_v_addr, __pyx_v_flags);
  125760. /* "uvloop/handles/udp.pyx":114
  125761. *
  125762. * err = uv.uv_udp_bind(<uv.uv_udp_t*>self._handle, addr, flags)
  125763. * if err < 0: # <<<<<<<<<<<<<<
  125764. * exc = convert_error(err)
  125765. * raise exc
  125766. */
  125767. __pyx_t_2 = ((__pyx_v_err < 0) != 0);
  125768. if (unlikely(__pyx_t_2)) {
  125769. /* "uvloop/handles/udp.pyx":115
  125770. * err = uv.uv_udp_bind(<uv.uv_udp_t*>self._handle, addr, flags)
  125771. * if err < 0:
  125772. * exc = convert_error(err) # <<<<<<<<<<<<<<
  125773. * raise exc
  125774. *
  125775. */
  125776. __pyx_t_1 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(23, 115, __pyx_L1_error)
  125777. __Pyx_GOTREF(__pyx_t_1);
  125778. __pyx_v_exc = __pyx_t_1;
  125779. __pyx_t_1 = 0;
  125780. /* "uvloop/handles/udp.pyx":116
  125781. * if err < 0:
  125782. * exc = convert_error(err)
  125783. * raise exc # <<<<<<<<<<<<<<
  125784. *
  125785. * cdef _set_broadcast(self, bint on):
  125786. */
  125787. __Pyx_Raise(__pyx_v_exc, 0, 0, 0);
  125788. __PYX_ERR(23, 116, __pyx_L1_error)
  125789. /* "uvloop/handles/udp.pyx":114
  125790. *
  125791. * err = uv.uv_udp_bind(<uv.uv_udp_t*>self._handle, addr, flags)
  125792. * if err < 0: # <<<<<<<<<<<<<<
  125793. * exc = convert_error(err)
  125794. * raise exc
  125795. */
  125796. }
  125797. /* "uvloop/handles/udp.pyx":103
  125798. * raise exc
  125799. *
  125800. * cdef _bind(self, system.sockaddr* addr, bint reuse_addr): # <<<<<<<<<<<<<<
  125801. * cdef:
  125802. * int err
  125803. */
  125804. /* function exit code */
  125805. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  125806. goto __pyx_L0;
  125807. __pyx_L1_error:;
  125808. __Pyx_XDECREF(__pyx_t_1);
  125809. __Pyx_AddTraceback("uvloop.loop.UDPTransport._bind", __pyx_clineno, __pyx_lineno, __pyx_filename);
  125810. __pyx_r = 0;
  125811. __pyx_L0:;
  125812. __Pyx_XDECREF(__pyx_v_exc);
  125813. __Pyx_XGIVEREF(__pyx_r);
  125814. __Pyx_RefNannyFinishContext();
  125815. return __pyx_r;
  125816. }
  125817. /* "uvloop/handles/udp.pyx":118
  125818. * raise exc
  125819. *
  125820. * cdef _set_broadcast(self, bint on): # <<<<<<<<<<<<<<
  125821. * cdef int err
  125822. *
  125823. */
  125824. static PyObject *__pyx_f_6uvloop_4loop_12UDPTransport__set_broadcast(struct __pyx_obj_6uvloop_4loop_UDPTransport *__pyx_v_self, int __pyx_v_on) {
  125825. int __pyx_v_err;
  125826. PyObject *__pyx_v_exc = NULL;
  125827. PyObject *__pyx_r = NULL;
  125828. __Pyx_RefNannyDeclarations
  125829. PyObject *__pyx_t_1 = NULL;
  125830. int __pyx_t_2;
  125831. __Pyx_RefNannySetupContext("_set_broadcast", 0);
  125832. /* "uvloop/handles/udp.pyx":121
  125833. * cdef int err
  125834. *
  125835. * self._ensure_alive() # <<<<<<<<<<<<<<
  125836. *
  125837. * err = uv.uv_udp_set_broadcast(<uv.uv_udp_t*>self._handle, on)
  125838. */
  125839. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UDPTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._ensure_alive(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(23, 121, __pyx_L1_error)
  125840. __Pyx_GOTREF(__pyx_t_1);
  125841. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  125842. /* "uvloop/handles/udp.pyx":123
  125843. * self._ensure_alive()
  125844. *
  125845. * err = uv.uv_udp_set_broadcast(<uv.uv_udp_t*>self._handle, on) # <<<<<<<<<<<<<<
  125846. * if err < 0:
  125847. * exc = convert_error(err)
  125848. */
  125849. __pyx_v_err = uv_udp_set_broadcast(((uv_udp_t *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._handle), __pyx_v_on);
  125850. /* "uvloop/handles/udp.pyx":124
  125851. *
  125852. * err = uv.uv_udp_set_broadcast(<uv.uv_udp_t*>self._handle, on)
  125853. * if err < 0: # <<<<<<<<<<<<<<
  125854. * exc = convert_error(err)
  125855. * raise exc
  125856. */
  125857. __pyx_t_2 = ((__pyx_v_err < 0) != 0);
  125858. if (unlikely(__pyx_t_2)) {
  125859. /* "uvloop/handles/udp.pyx":125
  125860. * err = uv.uv_udp_set_broadcast(<uv.uv_udp_t*>self._handle, on)
  125861. * if err < 0:
  125862. * exc = convert_error(err) # <<<<<<<<<<<<<<
  125863. * raise exc
  125864. *
  125865. */
  125866. __pyx_t_1 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(23, 125, __pyx_L1_error)
  125867. __Pyx_GOTREF(__pyx_t_1);
  125868. __pyx_v_exc = __pyx_t_1;
  125869. __pyx_t_1 = 0;
  125870. /* "uvloop/handles/udp.pyx":126
  125871. * if err < 0:
  125872. * exc = convert_error(err)
  125873. * raise exc # <<<<<<<<<<<<<<
  125874. *
  125875. * cdef size_t _get_write_buffer_size(self):
  125876. */
  125877. __Pyx_Raise(__pyx_v_exc, 0, 0, 0);
  125878. __PYX_ERR(23, 126, __pyx_L1_error)
  125879. /* "uvloop/handles/udp.pyx":124
  125880. *
  125881. * err = uv.uv_udp_set_broadcast(<uv.uv_udp_t*>self._handle, on)
  125882. * if err < 0: # <<<<<<<<<<<<<<
  125883. * exc = convert_error(err)
  125884. * raise exc
  125885. */
  125886. }
  125887. /* "uvloop/handles/udp.pyx":118
  125888. * raise exc
  125889. *
  125890. * cdef _set_broadcast(self, bint on): # <<<<<<<<<<<<<<
  125891. * cdef int err
  125892. *
  125893. */
  125894. /* function exit code */
  125895. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  125896. goto __pyx_L0;
  125897. __pyx_L1_error:;
  125898. __Pyx_XDECREF(__pyx_t_1);
  125899. __Pyx_AddTraceback("uvloop.loop.UDPTransport._set_broadcast", __pyx_clineno, __pyx_lineno, __pyx_filename);
  125900. __pyx_r = 0;
  125901. __pyx_L0:;
  125902. __Pyx_XDECREF(__pyx_v_exc);
  125903. __Pyx_XGIVEREF(__pyx_r);
  125904. __Pyx_RefNannyFinishContext();
  125905. return __pyx_r;
  125906. }
  125907. /* "uvloop/handles/udp.pyx":128
  125908. * raise exc
  125909. *
  125910. * cdef size_t _get_write_buffer_size(self): # <<<<<<<<<<<<<<
  125911. * if self._handle is NULL:
  125912. * return 0
  125913. */
  125914. static size_t __pyx_f_6uvloop_4loop_12UDPTransport__get_write_buffer_size(struct __pyx_obj_6uvloop_4loop_UDPTransport *__pyx_v_self) {
  125915. size_t __pyx_r;
  125916. __Pyx_RefNannyDeclarations
  125917. int __pyx_t_1;
  125918. __Pyx_RefNannySetupContext("_get_write_buffer_size", 0);
  125919. /* "uvloop/handles/udp.pyx":129
  125920. *
  125921. * cdef size_t _get_write_buffer_size(self):
  125922. * if self._handle is NULL: # <<<<<<<<<<<<<<
  125923. * return 0
  125924. * return (<uv.uv_udp_t*>self._handle).send_queue_size
  125925. */
  125926. __pyx_t_1 = ((__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._handle == NULL) != 0);
  125927. if (__pyx_t_1) {
  125928. /* "uvloop/handles/udp.pyx":130
  125929. * cdef size_t _get_write_buffer_size(self):
  125930. * if self._handle is NULL:
  125931. * return 0 # <<<<<<<<<<<<<<
  125932. * return (<uv.uv_udp_t*>self._handle).send_queue_size
  125933. *
  125934. */
  125935. __pyx_r = 0;
  125936. goto __pyx_L0;
  125937. /* "uvloop/handles/udp.pyx":129
  125938. *
  125939. * cdef size_t _get_write_buffer_size(self):
  125940. * if self._handle is NULL: # <<<<<<<<<<<<<<
  125941. * return 0
  125942. * return (<uv.uv_udp_t*>self._handle).send_queue_size
  125943. */
  125944. }
  125945. /* "uvloop/handles/udp.pyx":131
  125946. * if self._handle is NULL:
  125947. * return 0
  125948. * return (<uv.uv_udp_t*>self._handle).send_queue_size # <<<<<<<<<<<<<<
  125949. *
  125950. * cdef bint _is_reading(self):
  125951. */
  125952. __pyx_r = ((uv_udp_t *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._handle)->send_queue_size;
  125953. goto __pyx_L0;
  125954. /* "uvloop/handles/udp.pyx":128
  125955. * raise exc
  125956. *
  125957. * cdef size_t _get_write_buffer_size(self): # <<<<<<<<<<<<<<
  125958. * if self._handle is NULL:
  125959. * return 0
  125960. */
  125961. /* function exit code */
  125962. __pyx_L0:;
  125963. __Pyx_RefNannyFinishContext();
  125964. return __pyx_r;
  125965. }
  125966. /* "uvloop/handles/udp.pyx":133
  125967. * return (<uv.uv_udp_t*>self._handle).send_queue_size
  125968. *
  125969. * cdef bint _is_reading(self): # <<<<<<<<<<<<<<
  125970. * return self.__receiving
  125971. *
  125972. */
  125973. static int __pyx_f_6uvloop_4loop_12UDPTransport__is_reading(struct __pyx_obj_6uvloop_4loop_UDPTransport *__pyx_v_self) {
  125974. int __pyx_r;
  125975. __Pyx_RefNannyDeclarations
  125976. __Pyx_RefNannySetupContext("_is_reading", 0);
  125977. /* "uvloop/handles/udp.pyx":134
  125978. *
  125979. * cdef bint _is_reading(self):
  125980. * return self.__receiving # <<<<<<<<<<<<<<
  125981. *
  125982. * cdef _start_reading(self):
  125983. */
  125984. __pyx_r = __pyx_v_self->__pyx___receiving;
  125985. goto __pyx_L0;
  125986. /* "uvloop/handles/udp.pyx":133
  125987. * return (<uv.uv_udp_t*>self._handle).send_queue_size
  125988. *
  125989. * cdef bint _is_reading(self): # <<<<<<<<<<<<<<
  125990. * return self.__receiving
  125991. *
  125992. */
  125993. /* function exit code */
  125994. __pyx_L0:;
  125995. __Pyx_RefNannyFinishContext();
  125996. return __pyx_r;
  125997. }
  125998. /* "uvloop/handles/udp.pyx":136
  125999. * return self.__receiving
  126000. *
  126001. * cdef _start_reading(self): # <<<<<<<<<<<<<<
  126002. * cdef int err
  126003. *
  126004. */
  126005. static PyObject *__pyx_f_6uvloop_4loop_12UDPTransport__start_reading(struct __pyx_obj_6uvloop_4loop_UDPTransport *__pyx_v_self) {
  126006. int __pyx_v_err;
  126007. PyObject *__pyx_v_exc = NULL;
  126008. PyObject *__pyx_r = NULL;
  126009. __Pyx_RefNannyDeclarations
  126010. int __pyx_t_1;
  126011. PyObject *__pyx_t_2 = NULL;
  126012. __Pyx_RefNannySetupContext("_start_reading", 0);
  126013. /* "uvloop/handles/udp.pyx":139
  126014. * cdef int err
  126015. *
  126016. * if self.__receiving: # <<<<<<<<<<<<<<
  126017. * return
  126018. *
  126019. */
  126020. __pyx_t_1 = (__pyx_v_self->__pyx___receiving != 0);
  126021. if (__pyx_t_1) {
  126022. /* "uvloop/handles/udp.pyx":140
  126023. *
  126024. * if self.__receiving:
  126025. * return # <<<<<<<<<<<<<<
  126026. *
  126027. * self._ensure_alive()
  126028. */
  126029. __Pyx_XDECREF(__pyx_r);
  126030. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  126031. goto __pyx_L0;
  126032. /* "uvloop/handles/udp.pyx":139
  126033. * cdef int err
  126034. *
  126035. * if self.__receiving: # <<<<<<<<<<<<<<
  126036. * return
  126037. *
  126038. */
  126039. }
  126040. /* "uvloop/handles/udp.pyx":142
  126041. * return
  126042. *
  126043. * self._ensure_alive() # <<<<<<<<<<<<<<
  126044. *
  126045. * err = uv.uv_udp_recv_start(<uv.uv_udp_t*>self._handle,
  126046. */
  126047. __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_UDPTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._ensure_alive(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(23, 142, __pyx_L1_error)
  126048. __Pyx_GOTREF(__pyx_t_2);
  126049. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  126050. /* "uvloop/handles/udp.pyx":144
  126051. * self._ensure_alive()
  126052. *
  126053. * err = uv.uv_udp_recv_start(<uv.uv_udp_t*>self._handle, # <<<<<<<<<<<<<<
  126054. * __loop_alloc_buffer,
  126055. * __uv_udp_on_receive)
  126056. */
  126057. __pyx_v_err = uv_udp_recv_start(((uv_udp_t *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._handle), __pyx_f_6uvloop_4loop___loop_alloc_buffer, __pyx_f_6uvloop_4loop___uv_udp_on_receive);
  126058. /* "uvloop/handles/udp.pyx":148
  126059. * __uv_udp_on_receive)
  126060. *
  126061. * if err < 0: # <<<<<<<<<<<<<<
  126062. * exc = convert_error(err)
  126063. * self._fatal_error(exc, True)
  126064. */
  126065. __pyx_t_1 = ((__pyx_v_err < 0) != 0);
  126066. if (__pyx_t_1) {
  126067. /* "uvloop/handles/udp.pyx":149
  126068. *
  126069. * if err < 0:
  126070. * exc = convert_error(err) # <<<<<<<<<<<<<<
  126071. * self._fatal_error(exc, True)
  126072. * return
  126073. */
  126074. __pyx_t_2 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(23, 149, __pyx_L1_error)
  126075. __Pyx_GOTREF(__pyx_t_2);
  126076. __pyx_v_exc = __pyx_t_2;
  126077. __pyx_t_2 = 0;
  126078. /* "uvloop/handles/udp.pyx":150
  126079. * if err < 0:
  126080. * exc = convert_error(err)
  126081. * self._fatal_error(exc, True) # <<<<<<<<<<<<<<
  126082. * return
  126083. * else:
  126084. */
  126085. __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_UDPTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._fatal_error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self), __pyx_v_exc, Py_True, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(23, 150, __pyx_L1_error)
  126086. __Pyx_GOTREF(__pyx_t_2);
  126087. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  126088. /* "uvloop/handles/udp.pyx":151
  126089. * exc = convert_error(err)
  126090. * self._fatal_error(exc, True)
  126091. * return # <<<<<<<<<<<<<<
  126092. * else:
  126093. * # UDPTransport must live until the read callback is called
  126094. */
  126095. __Pyx_XDECREF(__pyx_r);
  126096. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  126097. goto __pyx_L0;
  126098. /* "uvloop/handles/udp.pyx":148
  126099. * __uv_udp_on_receive)
  126100. *
  126101. * if err < 0: # <<<<<<<<<<<<<<
  126102. * exc = convert_error(err)
  126103. * self._fatal_error(exc, True)
  126104. */
  126105. }
  126106. /* "uvloop/handles/udp.pyx":154
  126107. * else:
  126108. * # UDPTransport must live until the read callback is called
  126109. * self.__receiving_started() # <<<<<<<<<<<<<<
  126110. *
  126111. * cdef _stop_reading(self):
  126112. */
  126113. /*else*/ {
  126114. __pyx_t_2 = __pyx_f_6uvloop_4loop_12UDPTransport___receiving_started(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(23, 154, __pyx_L1_error)
  126115. __Pyx_GOTREF(__pyx_t_2);
  126116. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  126117. }
  126118. /* "uvloop/handles/udp.pyx":136
  126119. * return self.__receiving
  126120. *
  126121. * cdef _start_reading(self): # <<<<<<<<<<<<<<
  126122. * cdef int err
  126123. *
  126124. */
  126125. /* function exit code */
  126126. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  126127. goto __pyx_L0;
  126128. __pyx_L1_error:;
  126129. __Pyx_XDECREF(__pyx_t_2);
  126130. __Pyx_AddTraceback("uvloop.loop.UDPTransport._start_reading", __pyx_clineno, __pyx_lineno, __pyx_filename);
  126131. __pyx_r = 0;
  126132. __pyx_L0:;
  126133. __Pyx_XDECREF(__pyx_v_exc);
  126134. __Pyx_XGIVEREF(__pyx_r);
  126135. __Pyx_RefNannyFinishContext();
  126136. return __pyx_r;
  126137. }
  126138. /* "uvloop/handles/udp.pyx":156
  126139. * self.__receiving_started()
  126140. *
  126141. * cdef _stop_reading(self): # <<<<<<<<<<<<<<
  126142. * cdef int err
  126143. *
  126144. */
  126145. static PyObject *__pyx_f_6uvloop_4loop_12UDPTransport__stop_reading(struct __pyx_obj_6uvloop_4loop_UDPTransport *__pyx_v_self) {
  126146. int __pyx_v_err;
  126147. PyObject *__pyx_v_exc = NULL;
  126148. PyObject *__pyx_r = NULL;
  126149. __Pyx_RefNannyDeclarations
  126150. int __pyx_t_1;
  126151. PyObject *__pyx_t_2 = NULL;
  126152. __Pyx_RefNannySetupContext("_stop_reading", 0);
  126153. /* "uvloop/handles/udp.pyx":159
  126154. * cdef int err
  126155. *
  126156. * if not self.__receiving: # <<<<<<<<<<<<<<
  126157. * return
  126158. *
  126159. */
  126160. __pyx_t_1 = ((!(__pyx_v_self->__pyx___receiving != 0)) != 0);
  126161. if (__pyx_t_1) {
  126162. /* "uvloop/handles/udp.pyx":160
  126163. *
  126164. * if not self.__receiving:
  126165. * return # <<<<<<<<<<<<<<
  126166. *
  126167. * self._ensure_alive()
  126168. */
  126169. __Pyx_XDECREF(__pyx_r);
  126170. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  126171. goto __pyx_L0;
  126172. /* "uvloop/handles/udp.pyx":159
  126173. * cdef int err
  126174. *
  126175. * if not self.__receiving: # <<<<<<<<<<<<<<
  126176. * return
  126177. *
  126178. */
  126179. }
  126180. /* "uvloop/handles/udp.pyx":162
  126181. * return
  126182. *
  126183. * self._ensure_alive() # <<<<<<<<<<<<<<
  126184. *
  126185. * err = uv.uv_udp_recv_stop(<uv.uv_udp_t*>self._handle)
  126186. */
  126187. __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_UDPTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._ensure_alive(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(23, 162, __pyx_L1_error)
  126188. __Pyx_GOTREF(__pyx_t_2);
  126189. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  126190. /* "uvloop/handles/udp.pyx":164
  126191. * self._ensure_alive()
  126192. *
  126193. * err = uv.uv_udp_recv_stop(<uv.uv_udp_t*>self._handle) # <<<<<<<<<<<<<<
  126194. * if err < 0:
  126195. * exc = convert_error(err)
  126196. */
  126197. __pyx_v_err = uv_udp_recv_stop(((uv_udp_t *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._handle));
  126198. /* "uvloop/handles/udp.pyx":165
  126199. *
  126200. * err = uv.uv_udp_recv_stop(<uv.uv_udp_t*>self._handle)
  126201. * if err < 0: # <<<<<<<<<<<<<<
  126202. * exc = convert_error(err)
  126203. * self._fatal_error(exc, True)
  126204. */
  126205. __pyx_t_1 = ((__pyx_v_err < 0) != 0);
  126206. if (__pyx_t_1) {
  126207. /* "uvloop/handles/udp.pyx":166
  126208. * err = uv.uv_udp_recv_stop(<uv.uv_udp_t*>self._handle)
  126209. * if err < 0:
  126210. * exc = convert_error(err) # <<<<<<<<<<<<<<
  126211. * self._fatal_error(exc, True)
  126212. * return
  126213. */
  126214. __pyx_t_2 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(23, 166, __pyx_L1_error)
  126215. __Pyx_GOTREF(__pyx_t_2);
  126216. __pyx_v_exc = __pyx_t_2;
  126217. __pyx_t_2 = 0;
  126218. /* "uvloop/handles/udp.pyx":167
  126219. * if err < 0:
  126220. * exc = convert_error(err)
  126221. * self._fatal_error(exc, True) # <<<<<<<<<<<<<<
  126222. * return
  126223. * else:
  126224. */
  126225. __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_UDPTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._fatal_error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self), __pyx_v_exc, Py_True, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(23, 167, __pyx_L1_error)
  126226. __Pyx_GOTREF(__pyx_t_2);
  126227. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  126228. /* "uvloop/handles/udp.pyx":168
  126229. * exc = convert_error(err)
  126230. * self._fatal_error(exc, True)
  126231. * return # <<<<<<<<<<<<<<
  126232. * else:
  126233. * self.__receiving_stopped()
  126234. */
  126235. __Pyx_XDECREF(__pyx_r);
  126236. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  126237. goto __pyx_L0;
  126238. /* "uvloop/handles/udp.pyx":165
  126239. *
  126240. * err = uv.uv_udp_recv_stop(<uv.uv_udp_t*>self._handle)
  126241. * if err < 0: # <<<<<<<<<<<<<<
  126242. * exc = convert_error(err)
  126243. * self._fatal_error(exc, True)
  126244. */
  126245. }
  126246. /* "uvloop/handles/udp.pyx":170
  126247. * return
  126248. * else:
  126249. * self.__receiving_stopped() # <<<<<<<<<<<<<<
  126250. *
  126251. * cdef inline __receiving_started(self):
  126252. */
  126253. /*else*/ {
  126254. __pyx_t_2 = __pyx_f_6uvloop_4loop_12UDPTransport___receiving_stopped(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(23, 170, __pyx_L1_error)
  126255. __Pyx_GOTREF(__pyx_t_2);
  126256. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  126257. }
  126258. /* "uvloop/handles/udp.pyx":156
  126259. * self.__receiving_started()
  126260. *
  126261. * cdef _stop_reading(self): # <<<<<<<<<<<<<<
  126262. * cdef int err
  126263. *
  126264. */
  126265. /* function exit code */
  126266. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  126267. goto __pyx_L0;
  126268. __pyx_L1_error:;
  126269. __Pyx_XDECREF(__pyx_t_2);
  126270. __Pyx_AddTraceback("uvloop.loop.UDPTransport._stop_reading", __pyx_clineno, __pyx_lineno, __pyx_filename);
  126271. __pyx_r = 0;
  126272. __pyx_L0:;
  126273. __Pyx_XDECREF(__pyx_v_exc);
  126274. __Pyx_XGIVEREF(__pyx_r);
  126275. __Pyx_RefNannyFinishContext();
  126276. return __pyx_r;
  126277. }
  126278. /* "uvloop/handles/udp.pyx":172
  126279. * self.__receiving_stopped()
  126280. *
  126281. * cdef inline __receiving_started(self): # <<<<<<<<<<<<<<
  126282. * if self.__receiving:
  126283. * return
  126284. */
  126285. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_12UDPTransport___receiving_started(struct __pyx_obj_6uvloop_4loop_UDPTransport *__pyx_v_self) {
  126286. PyObject *__pyx_r = NULL;
  126287. __Pyx_RefNannyDeclarations
  126288. int __pyx_t_1;
  126289. __Pyx_RefNannySetupContext("__receiving_started", 0);
  126290. /* "uvloop/handles/udp.pyx":173
  126291. *
  126292. * cdef inline __receiving_started(self):
  126293. * if self.__receiving: # <<<<<<<<<<<<<<
  126294. * return
  126295. * self.__receiving = 1
  126296. */
  126297. __pyx_t_1 = (__pyx_v_self->__pyx___receiving != 0);
  126298. if (__pyx_t_1) {
  126299. /* "uvloop/handles/udp.pyx":174
  126300. * cdef inline __receiving_started(self):
  126301. * if self.__receiving:
  126302. * return # <<<<<<<<<<<<<<
  126303. * self.__receiving = 1
  126304. * Py_INCREF(self)
  126305. */
  126306. __Pyx_XDECREF(__pyx_r);
  126307. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  126308. goto __pyx_L0;
  126309. /* "uvloop/handles/udp.pyx":173
  126310. *
  126311. * cdef inline __receiving_started(self):
  126312. * if self.__receiving: # <<<<<<<<<<<<<<
  126313. * return
  126314. * self.__receiving = 1
  126315. */
  126316. }
  126317. /* "uvloop/handles/udp.pyx":175
  126318. * if self.__receiving:
  126319. * return
  126320. * self.__receiving = 1 # <<<<<<<<<<<<<<
  126321. * Py_INCREF(self)
  126322. *
  126323. */
  126324. __pyx_v_self->__pyx___receiving = 1;
  126325. /* "uvloop/handles/udp.pyx":176
  126326. * return
  126327. * self.__receiving = 1
  126328. * Py_INCREF(self) # <<<<<<<<<<<<<<
  126329. *
  126330. * cdef inline __receiving_stopped(self):
  126331. */
  126332. Py_INCREF(((PyObject *)__pyx_v_self));
  126333. /* "uvloop/handles/udp.pyx":172
  126334. * self.__receiving_stopped()
  126335. *
  126336. * cdef inline __receiving_started(self): # <<<<<<<<<<<<<<
  126337. * if self.__receiving:
  126338. * return
  126339. */
  126340. /* function exit code */
  126341. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  126342. __pyx_L0:;
  126343. __Pyx_XGIVEREF(__pyx_r);
  126344. __Pyx_RefNannyFinishContext();
  126345. return __pyx_r;
  126346. }
  126347. /* "uvloop/handles/udp.pyx":178
  126348. * Py_INCREF(self)
  126349. *
  126350. * cdef inline __receiving_stopped(self): # <<<<<<<<<<<<<<
  126351. * if not self.__receiving:
  126352. * return
  126353. */
  126354. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_12UDPTransport___receiving_stopped(struct __pyx_obj_6uvloop_4loop_UDPTransport *__pyx_v_self) {
  126355. PyObject *__pyx_r = NULL;
  126356. __Pyx_RefNannyDeclarations
  126357. int __pyx_t_1;
  126358. __Pyx_RefNannySetupContext("__receiving_stopped", 0);
  126359. /* "uvloop/handles/udp.pyx":179
  126360. *
  126361. * cdef inline __receiving_stopped(self):
  126362. * if not self.__receiving: # <<<<<<<<<<<<<<
  126363. * return
  126364. * self.__receiving = 0
  126365. */
  126366. __pyx_t_1 = ((!(__pyx_v_self->__pyx___receiving != 0)) != 0);
  126367. if (__pyx_t_1) {
  126368. /* "uvloop/handles/udp.pyx":180
  126369. * cdef inline __receiving_stopped(self):
  126370. * if not self.__receiving:
  126371. * return # <<<<<<<<<<<<<<
  126372. * self.__receiving = 0
  126373. * Py_DECREF(self)
  126374. */
  126375. __Pyx_XDECREF(__pyx_r);
  126376. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  126377. goto __pyx_L0;
  126378. /* "uvloop/handles/udp.pyx":179
  126379. *
  126380. * cdef inline __receiving_stopped(self):
  126381. * if not self.__receiving: # <<<<<<<<<<<<<<
  126382. * return
  126383. * self.__receiving = 0
  126384. */
  126385. }
  126386. /* "uvloop/handles/udp.pyx":181
  126387. * if not self.__receiving:
  126388. * return
  126389. * self.__receiving = 0 # <<<<<<<<<<<<<<
  126390. * Py_DECREF(self)
  126391. *
  126392. */
  126393. __pyx_v_self->__pyx___receiving = 0;
  126394. /* "uvloop/handles/udp.pyx":182
  126395. * return
  126396. * self.__receiving = 0
  126397. * Py_DECREF(self) # <<<<<<<<<<<<<<
  126398. *
  126399. * cdef _new_socket(self):
  126400. */
  126401. Py_DECREF(((PyObject *)__pyx_v_self));
  126402. /* "uvloop/handles/udp.pyx":178
  126403. * Py_INCREF(self)
  126404. *
  126405. * cdef inline __receiving_stopped(self): # <<<<<<<<<<<<<<
  126406. * if not self.__receiving:
  126407. * return
  126408. */
  126409. /* function exit code */
  126410. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  126411. __pyx_L0:;
  126412. __Pyx_XGIVEREF(__pyx_r);
  126413. __Pyx_RefNannyFinishContext();
  126414. return __pyx_r;
  126415. }
  126416. /* "uvloop/handles/udp.pyx":184
  126417. * Py_DECREF(self)
  126418. *
  126419. * cdef _new_socket(self): # <<<<<<<<<<<<<<
  126420. * if self._family not in (uv.AF_INET, uv.AF_INET6, uv.AF_UNIX):
  126421. * raise RuntimeError(
  126422. */
  126423. static PyObject *__pyx_f_6uvloop_4loop_12UDPTransport__new_socket(struct __pyx_obj_6uvloop_4loop_UDPTransport *__pyx_v_self) {
  126424. PyObject *__pyx_v_fileno = NULL;
  126425. PyObject *__pyx_r = NULL;
  126426. __Pyx_RefNannyDeclarations
  126427. int __pyx_t_1;
  126428. int __pyx_t_2;
  126429. int __pyx_t_3;
  126430. PyObject *__pyx_t_4 = NULL;
  126431. PyObject *__pyx_t_5 = NULL;
  126432. PyObject *__pyx_t_6 = NULL;
  126433. __Pyx_RefNannySetupContext("_new_socket", 0);
  126434. /* "uvloop/handles/udp.pyx":185
  126435. *
  126436. * cdef _new_socket(self):
  126437. * if self._family not in (uv.AF_INET, uv.AF_INET6, uv.AF_UNIX): # <<<<<<<<<<<<<<
  126438. * raise RuntimeError(
  126439. * 'UDPTransport.family is undefined; '
  126440. */
  126441. __pyx_t_1 = __pyx_v_self->_family;
  126442. __pyx_t_3 = ((__pyx_t_1 != AF_INET) != 0);
  126443. if (__pyx_t_3) {
  126444. } else {
  126445. __pyx_t_2 = __pyx_t_3;
  126446. goto __pyx_L4_bool_binop_done;
  126447. }
  126448. __pyx_t_3 = ((__pyx_t_1 != AF_INET6) != 0);
  126449. if (__pyx_t_3) {
  126450. } else {
  126451. __pyx_t_2 = __pyx_t_3;
  126452. goto __pyx_L4_bool_binop_done;
  126453. }
  126454. __pyx_t_3 = ((__pyx_t_1 != AF_UNIX) != 0);
  126455. __pyx_t_2 = __pyx_t_3;
  126456. __pyx_L4_bool_binop_done:;
  126457. __pyx_t_3 = (__pyx_t_2 != 0);
  126458. if (unlikely(__pyx_t_3)) {
  126459. /* "uvloop/handles/udp.pyx":186
  126460. * cdef _new_socket(self):
  126461. * if self._family not in (uv.AF_INET, uv.AF_INET6, uv.AF_UNIX):
  126462. * raise RuntimeError( # <<<<<<<<<<<<<<
  126463. * 'UDPTransport.family is undefined; '
  126464. * 'cannot create python socket')
  126465. */
  126466. __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__210, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(23, 186, __pyx_L1_error)
  126467. __Pyx_GOTREF(__pyx_t_4);
  126468. __Pyx_Raise(__pyx_t_4, 0, 0, 0);
  126469. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  126470. __PYX_ERR(23, 186, __pyx_L1_error)
  126471. /* "uvloop/handles/udp.pyx":185
  126472. *
  126473. * cdef _new_socket(self):
  126474. * if self._family not in (uv.AF_INET, uv.AF_INET6, uv.AF_UNIX): # <<<<<<<<<<<<<<
  126475. * raise RuntimeError(
  126476. * 'UDPTransport.family is undefined; '
  126477. */
  126478. }
  126479. /* "uvloop/handles/udp.pyx":190
  126480. * 'cannot create python socket')
  126481. *
  126482. * fileno = self._fileno() # <<<<<<<<<<<<<<
  126483. * return PseudoSocket(self._family, uv.SOCK_DGRAM, 0, fileno)
  126484. *
  126485. */
  126486. __pyx_t_4 = ((struct __pyx_vtabstruct_6uvloop_4loop_UDPTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._fileno(((struct __pyx_obj_6uvloop_4loop_UVSocketHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_4)) __PYX_ERR(23, 190, __pyx_L1_error)
  126487. __Pyx_GOTREF(__pyx_t_4);
  126488. __pyx_v_fileno = __pyx_t_4;
  126489. __pyx_t_4 = 0;
  126490. /* "uvloop/handles/udp.pyx":191
  126491. *
  126492. * fileno = self._fileno()
  126493. * return PseudoSocket(self._family, uv.SOCK_DGRAM, 0, fileno) # <<<<<<<<<<<<<<
  126494. *
  126495. * cdef _send(self, object data, object addr):
  126496. */
  126497. __Pyx_XDECREF(__pyx_r);
  126498. __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_self->_family); if (unlikely(!__pyx_t_4)) __PYX_ERR(23, 191, __pyx_L1_error)
  126499. __Pyx_GOTREF(__pyx_t_4);
  126500. __pyx_t_5 = __Pyx_PyInt_From_int(SOCK_DGRAM); if (unlikely(!__pyx_t_5)) __PYX_ERR(23, 191, __pyx_L1_error)
  126501. __Pyx_GOTREF(__pyx_t_5);
  126502. __pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(23, 191, __pyx_L1_error)
  126503. __Pyx_GOTREF(__pyx_t_6);
  126504. __Pyx_GIVEREF(__pyx_t_4);
  126505. PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
  126506. __Pyx_GIVEREF(__pyx_t_5);
  126507. PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5);
  126508. __Pyx_INCREF(__pyx_int_0);
  126509. __Pyx_GIVEREF(__pyx_int_0);
  126510. PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_int_0);
  126511. __Pyx_INCREF(__pyx_v_fileno);
  126512. __Pyx_GIVEREF(__pyx_v_fileno);
  126513. PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_v_fileno);
  126514. __pyx_t_4 = 0;
  126515. __pyx_t_5 = 0;
  126516. __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6uvloop_4loop_PseudoSocket), __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(23, 191, __pyx_L1_error)
  126517. __Pyx_GOTREF(__pyx_t_5);
  126518. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  126519. __pyx_r = __pyx_t_5;
  126520. __pyx_t_5 = 0;
  126521. goto __pyx_L0;
  126522. /* "uvloop/handles/udp.pyx":184
  126523. * Py_DECREF(self)
  126524. *
  126525. * cdef _new_socket(self): # <<<<<<<<<<<<<<
  126526. * if self._family not in (uv.AF_INET, uv.AF_INET6, uv.AF_UNIX):
  126527. * raise RuntimeError(
  126528. */
  126529. /* function exit code */
  126530. __pyx_L1_error:;
  126531. __Pyx_XDECREF(__pyx_t_4);
  126532. __Pyx_XDECREF(__pyx_t_5);
  126533. __Pyx_XDECREF(__pyx_t_6);
  126534. __Pyx_AddTraceback("uvloop.loop.UDPTransport._new_socket", __pyx_clineno, __pyx_lineno, __pyx_filename);
  126535. __pyx_r = 0;
  126536. __pyx_L0:;
  126537. __Pyx_XDECREF(__pyx_v_fileno);
  126538. __Pyx_XGIVEREF(__pyx_r);
  126539. __Pyx_RefNannyFinishContext();
  126540. return __pyx_r;
  126541. }
  126542. /* "uvloop/handles/udp.pyx":193
  126543. * return PseudoSocket(self._family, uv.SOCK_DGRAM, 0, fileno)
  126544. *
  126545. * cdef _send(self, object data, object addr): # <<<<<<<<<<<<<<
  126546. * cdef:
  126547. * _UDPSendContext ctx
  126548. */
  126549. static PyObject *__pyx_f_6uvloop_4loop_12UDPTransport__send(struct __pyx_obj_6uvloop_4loop_UDPTransport *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_addr) {
  126550. struct __pyx_obj_6uvloop_4loop__UDPSendContext *__pyx_v_ctx = 0;
  126551. struct sockaddr_storage __pyx_v_saddr_st;
  126552. struct sockaddr *__pyx_v_saddr;
  126553. Py_buffer __pyx_v_try_pybuf;
  126554. uv_buf_t __pyx_v_try_uvbuf;
  126555. int __pyx_v_err;
  126556. PyObject *__pyx_v_exc = NULL;
  126557. PyObject *__pyx_r = NULL;
  126558. __Pyx_RefNannyDeclarations
  126559. PyObject *__pyx_t_1 = NULL;
  126560. int __pyx_t_2;
  126561. int __pyx_t_3;
  126562. int __pyx_t_4;
  126563. PyObject *__pyx_t_5 = NULL;
  126564. PyObject *__pyx_t_6 = NULL;
  126565. PyObject *__pyx_t_7 = NULL;
  126566. PyObject *__pyx_t_8 = NULL;
  126567. PyObject *__pyx_t_9 = NULL;
  126568. PyObject *__pyx_t_10 = NULL;
  126569. PyObject *__pyx_t_11 = NULL;
  126570. Py_ssize_t __pyx_t_12;
  126571. __Pyx_RefNannySetupContext("_send", 0);
  126572. /* "uvloop/handles/udp.pyx":201
  126573. * uv.uv_buf_t try_uvbuf
  126574. *
  126575. * self._ensure_alive() # <<<<<<<<<<<<<<
  126576. *
  126577. * if self._family not in (uv.AF_INET, uv.AF_INET6, uv.AF_UNIX):
  126578. */
  126579. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UDPTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._ensure_alive(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(23, 201, __pyx_L1_error)
  126580. __Pyx_GOTREF(__pyx_t_1);
  126581. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  126582. /* "uvloop/handles/udp.pyx":203
  126583. * self._ensure_alive()
  126584. *
  126585. * if self._family not in (uv.AF_INET, uv.AF_INET6, uv.AF_UNIX): # <<<<<<<<<<<<<<
  126586. * raise RuntimeError('UDPTransport.family is undefined; cannot send')
  126587. *
  126588. */
  126589. __pyx_t_2 = __pyx_v_self->_family;
  126590. __pyx_t_4 = ((__pyx_t_2 != AF_INET) != 0);
  126591. if (__pyx_t_4) {
  126592. } else {
  126593. __pyx_t_3 = __pyx_t_4;
  126594. goto __pyx_L4_bool_binop_done;
  126595. }
  126596. __pyx_t_4 = ((__pyx_t_2 != AF_INET6) != 0);
  126597. if (__pyx_t_4) {
  126598. } else {
  126599. __pyx_t_3 = __pyx_t_4;
  126600. goto __pyx_L4_bool_binop_done;
  126601. }
  126602. __pyx_t_4 = ((__pyx_t_2 != AF_UNIX) != 0);
  126603. __pyx_t_3 = __pyx_t_4;
  126604. __pyx_L4_bool_binop_done:;
  126605. __pyx_t_4 = (__pyx_t_3 != 0);
  126606. if (unlikely(__pyx_t_4)) {
  126607. /* "uvloop/handles/udp.pyx":204
  126608. *
  126609. * if self._family not in (uv.AF_INET, uv.AF_INET6, uv.AF_UNIX):
  126610. * raise RuntimeError('UDPTransport.family is undefined; cannot send') # <<<<<<<<<<<<<<
  126611. *
  126612. * if addr is None:
  126613. */
  126614. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__211, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(23, 204, __pyx_L1_error)
  126615. __Pyx_GOTREF(__pyx_t_1);
  126616. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  126617. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  126618. __PYX_ERR(23, 204, __pyx_L1_error)
  126619. /* "uvloop/handles/udp.pyx":203
  126620. * self._ensure_alive()
  126621. *
  126622. * if self._family not in (uv.AF_INET, uv.AF_INET6, uv.AF_UNIX): # <<<<<<<<<<<<<<
  126623. * raise RuntimeError('UDPTransport.family is undefined; cannot send')
  126624. *
  126625. */
  126626. }
  126627. /* "uvloop/handles/udp.pyx":206
  126628. * raise RuntimeError('UDPTransport.family is undefined; cannot send')
  126629. *
  126630. * if addr is None: # <<<<<<<<<<<<<<
  126631. * saddr = NULL
  126632. * else:
  126633. */
  126634. __pyx_t_4 = (__pyx_v_addr == Py_None);
  126635. __pyx_t_3 = (__pyx_t_4 != 0);
  126636. if (__pyx_t_3) {
  126637. /* "uvloop/handles/udp.pyx":207
  126638. *
  126639. * if addr is None:
  126640. * saddr = NULL # <<<<<<<<<<<<<<
  126641. * else:
  126642. * try:
  126643. */
  126644. __pyx_v_saddr = NULL;
  126645. /* "uvloop/handles/udp.pyx":206
  126646. * raise RuntimeError('UDPTransport.family is undefined; cannot send')
  126647. *
  126648. * if addr is None: # <<<<<<<<<<<<<<
  126649. * saddr = NULL
  126650. * else:
  126651. */
  126652. goto __pyx_L7;
  126653. }
  126654. /* "uvloop/handles/udp.pyx":209
  126655. * saddr = NULL
  126656. * else:
  126657. * try: # <<<<<<<<<<<<<<
  126658. * __convert_pyaddr_to_sockaddr(self._family, addr,
  126659. * <system.sockaddr*>&saddr_st)
  126660. */
  126661. /*else*/ {
  126662. {
  126663. __Pyx_PyThreadState_declare
  126664. __Pyx_PyThreadState_assign
  126665. __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7);
  126666. __Pyx_XGOTREF(__pyx_t_5);
  126667. __Pyx_XGOTREF(__pyx_t_6);
  126668. __Pyx_XGOTREF(__pyx_t_7);
  126669. /*try:*/ {
  126670. /* "uvloop/handles/udp.pyx":210
  126671. * else:
  126672. * try:
  126673. * __convert_pyaddr_to_sockaddr(self._family, addr, # <<<<<<<<<<<<<<
  126674. * <system.sockaddr*>&saddr_st)
  126675. * except (ValueError, TypeError):
  126676. */
  126677. __pyx_t_1 = __pyx_f_6uvloop_4loop___convert_pyaddr_to_sockaddr(__pyx_v_self->_family, __pyx_v_addr, ((struct sockaddr *)(&__pyx_v_saddr_st))); if (unlikely(!__pyx_t_1)) __PYX_ERR(23, 210, __pyx_L8_error)
  126678. __Pyx_GOTREF(__pyx_t_1);
  126679. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  126680. /* "uvloop/handles/udp.pyx":209
  126681. * saddr = NULL
  126682. * else:
  126683. * try: # <<<<<<<<<<<<<<
  126684. * __convert_pyaddr_to_sockaddr(self._family, addr,
  126685. * <system.sockaddr*>&saddr_st)
  126686. */
  126687. }
  126688. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  126689. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  126690. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  126691. goto __pyx_L13_try_end;
  126692. __pyx_L8_error:;
  126693. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  126694. /* "uvloop/handles/udp.pyx":212
  126695. * __convert_pyaddr_to_sockaddr(self._family, addr,
  126696. * <system.sockaddr*>&saddr_st)
  126697. * except (ValueError, TypeError): # <<<<<<<<<<<<<<
  126698. * raise
  126699. * except Exception:
  126700. */
  126701. __pyx_t_2 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError);
  126702. if (__pyx_t_2) {
  126703. __Pyx_AddTraceback("uvloop.loop.UDPTransport._send", __pyx_clineno, __pyx_lineno, __pyx_filename);
  126704. if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_8, &__pyx_t_9) < 0) __PYX_ERR(23, 212, __pyx_L10_except_error)
  126705. __Pyx_GOTREF(__pyx_t_1);
  126706. __Pyx_GOTREF(__pyx_t_8);
  126707. __Pyx_GOTREF(__pyx_t_9);
  126708. /* "uvloop/handles/udp.pyx":213
  126709. * <system.sockaddr*>&saddr_st)
  126710. * except (ValueError, TypeError):
  126711. * raise # <<<<<<<<<<<<<<
  126712. * except Exception:
  126713. * raise ValueError(
  126714. */
  126715. __Pyx_GIVEREF(__pyx_t_1);
  126716. __Pyx_GIVEREF(__pyx_t_8);
  126717. __Pyx_XGIVEREF(__pyx_t_9);
  126718. __Pyx_ErrRestoreWithState(__pyx_t_1, __pyx_t_8, __pyx_t_9);
  126719. __pyx_t_1 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0;
  126720. __PYX_ERR(23, 213, __pyx_L10_except_error)
  126721. }
  126722. /* "uvloop/handles/udp.pyx":214
  126723. * except (ValueError, TypeError):
  126724. * raise
  126725. * except Exception: # <<<<<<<<<<<<<<
  126726. * raise ValueError(
  126727. * f'{addr!r}: socket family mismatch or '
  126728. */
  126729. __pyx_t_2 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
  126730. if (__pyx_t_2) {
  126731. __Pyx_AddTraceback("uvloop.loop.UDPTransport._send", __pyx_clineno, __pyx_lineno, __pyx_filename);
  126732. if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_8, &__pyx_t_1) < 0) __PYX_ERR(23, 214, __pyx_L10_except_error)
  126733. __Pyx_GOTREF(__pyx_t_9);
  126734. __Pyx_GOTREF(__pyx_t_8);
  126735. __Pyx_GOTREF(__pyx_t_1);
  126736. /* "uvloop/handles/udp.pyx":216
  126737. * except Exception:
  126738. * raise ValueError(
  126739. * f'{addr!r}: socket family mismatch or ' # <<<<<<<<<<<<<<
  126740. * f'a DNS lookup is required')
  126741. * saddr = <system.sockaddr*>(&saddr_st)
  126742. */
  126743. __pyx_t_10 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_addr), __pyx_empty_unicode); if (unlikely(!__pyx_t_10)) __PYX_ERR(23, 216, __pyx_L10_except_error)
  126744. __Pyx_GOTREF(__pyx_t_10);
  126745. __pyx_t_11 = __Pyx_PyUnicode_Concat(__pyx_t_10, __pyx_kp_u_socket_family_mismatch_or_a_DNS); if (unlikely(!__pyx_t_11)) __PYX_ERR(23, 216, __pyx_L10_except_error)
  126746. __Pyx_GOTREF(__pyx_t_11);
  126747. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  126748. /* "uvloop/handles/udp.pyx":215
  126749. * raise
  126750. * except Exception:
  126751. * raise ValueError( # <<<<<<<<<<<<<<
  126752. * f'{addr!r}: socket family mismatch or '
  126753. * f'a DNS lookup is required')
  126754. */
  126755. __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_11); if (unlikely(!__pyx_t_10)) __PYX_ERR(23, 215, __pyx_L10_except_error)
  126756. __Pyx_GOTREF(__pyx_t_10);
  126757. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  126758. __Pyx_Raise(__pyx_t_10, 0, 0, 0);
  126759. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  126760. __PYX_ERR(23, 215, __pyx_L10_except_error)
  126761. }
  126762. goto __pyx_L10_except_error;
  126763. __pyx_L10_except_error:;
  126764. /* "uvloop/handles/udp.pyx":209
  126765. * saddr = NULL
  126766. * else:
  126767. * try: # <<<<<<<<<<<<<<
  126768. * __convert_pyaddr_to_sockaddr(self._family, addr,
  126769. * <system.sockaddr*>&saddr_st)
  126770. */
  126771. __Pyx_XGIVEREF(__pyx_t_5);
  126772. __Pyx_XGIVEREF(__pyx_t_6);
  126773. __Pyx_XGIVEREF(__pyx_t_7);
  126774. __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
  126775. goto __pyx_L1_error;
  126776. __pyx_L13_try_end:;
  126777. }
  126778. /* "uvloop/handles/udp.pyx":218
  126779. * f'{addr!r}: socket family mismatch or '
  126780. * f'a DNS lookup is required')
  126781. * saddr = <system.sockaddr*>(&saddr_st) # <<<<<<<<<<<<<<
  126782. *
  126783. * if self._get_write_buffer_size() == 0:
  126784. */
  126785. __pyx_v_saddr = ((struct sockaddr *)(&__pyx_v_saddr_st));
  126786. }
  126787. __pyx_L7:;
  126788. /* "uvloop/handles/udp.pyx":220
  126789. * saddr = <system.sockaddr*>(&saddr_st)
  126790. *
  126791. * if self._get_write_buffer_size() == 0: # <<<<<<<<<<<<<<
  126792. * PyObject_GetBuffer(data, &try_pybuf, PyBUF_SIMPLE)
  126793. * try_uvbuf.base = <char*>try_pybuf.buf
  126794. */
  126795. __pyx_t_3 = ((((struct __pyx_vtabstruct_6uvloop_4loop_UDPTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._get_write_buffer_size(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_v_self)) == 0) != 0);
  126796. if (__pyx_t_3) {
  126797. /* "uvloop/handles/udp.pyx":221
  126798. *
  126799. * if self._get_write_buffer_size() == 0:
  126800. * PyObject_GetBuffer(data, &try_pybuf, PyBUF_SIMPLE) # <<<<<<<<<<<<<<
  126801. * try_uvbuf.base = <char*>try_pybuf.buf
  126802. * try_uvbuf.len = try_pybuf.len
  126803. */
  126804. __pyx_t_2 = PyObject_GetBuffer(__pyx_v_data, (&__pyx_v_try_pybuf), PyBUF_SIMPLE); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(23, 221, __pyx_L1_error)
  126805. /* "uvloop/handles/udp.pyx":222
  126806. * if self._get_write_buffer_size() == 0:
  126807. * PyObject_GetBuffer(data, &try_pybuf, PyBUF_SIMPLE)
  126808. * try_uvbuf.base = <char*>try_pybuf.buf # <<<<<<<<<<<<<<
  126809. * try_uvbuf.len = try_pybuf.len
  126810. * err = uv.uv_udp_try_send(<uv.uv_udp_t*>self._handle,
  126811. */
  126812. __pyx_v_try_uvbuf.base = ((char *)__pyx_v_try_pybuf.buf);
  126813. /* "uvloop/handles/udp.pyx":223
  126814. * PyObject_GetBuffer(data, &try_pybuf, PyBUF_SIMPLE)
  126815. * try_uvbuf.base = <char*>try_pybuf.buf
  126816. * try_uvbuf.len = try_pybuf.len # <<<<<<<<<<<<<<
  126817. * err = uv.uv_udp_try_send(<uv.uv_udp_t*>self._handle,
  126818. * &try_uvbuf,
  126819. */
  126820. __pyx_t_12 = __pyx_v_try_pybuf.len;
  126821. __pyx_v_try_uvbuf.len = __pyx_t_12;
  126822. /* "uvloop/handles/udp.pyx":224
  126823. * try_uvbuf.base = <char*>try_pybuf.buf
  126824. * try_uvbuf.len = try_pybuf.len
  126825. * err = uv.uv_udp_try_send(<uv.uv_udp_t*>self._handle, # <<<<<<<<<<<<<<
  126826. * &try_uvbuf,
  126827. * 1,
  126828. */
  126829. __pyx_v_err = uv_udp_try_send(((uv_udp_t *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._handle), (&__pyx_v_try_uvbuf), 1, __pyx_v_saddr);
  126830. /* "uvloop/handles/udp.pyx":228
  126831. * 1,
  126832. * saddr)
  126833. * PyBuffer_Release(&try_pybuf) # <<<<<<<<<<<<<<
  126834. * else:
  126835. * err = uv.UV_EAGAIN
  126836. */
  126837. PyBuffer_Release((&__pyx_v_try_pybuf));
  126838. /* "uvloop/handles/udp.pyx":220
  126839. * saddr = <system.sockaddr*>(&saddr_st)
  126840. *
  126841. * if self._get_write_buffer_size() == 0: # <<<<<<<<<<<<<<
  126842. * PyObject_GetBuffer(data, &try_pybuf, PyBUF_SIMPLE)
  126843. * try_uvbuf.base = <char*>try_pybuf.buf
  126844. */
  126845. goto __pyx_L18;
  126846. }
  126847. /* "uvloop/handles/udp.pyx":230
  126848. * PyBuffer_Release(&try_pybuf)
  126849. * else:
  126850. * err = uv.UV_EAGAIN # <<<<<<<<<<<<<<
  126851. *
  126852. * if err == uv.UV_EAGAIN:
  126853. */
  126854. /*else*/ {
  126855. __pyx_v_err = UV_EAGAIN;
  126856. }
  126857. __pyx_L18:;
  126858. /* "uvloop/handles/udp.pyx":232
  126859. * err = uv.UV_EAGAIN
  126860. *
  126861. * if err == uv.UV_EAGAIN: # <<<<<<<<<<<<<<
  126862. * ctx = _UDPSendContext.new(self, data)
  126863. * err = uv.uv_udp_send(&ctx.req,
  126864. */
  126865. __pyx_t_3 = ((__pyx_v_err == UV_EAGAIN) != 0);
  126866. if (__pyx_t_3) {
  126867. /* "uvloop/handles/udp.pyx":233
  126868. *
  126869. * if err == uv.UV_EAGAIN:
  126870. * ctx = _UDPSendContext.new(self, data) # <<<<<<<<<<<<<<
  126871. * err = uv.uv_udp_send(&ctx.req,
  126872. * <uv.uv_udp_t*>self._handle,
  126873. */
  126874. __pyx_t_1 = ((PyObject *)__pyx_f_6uvloop_4loop_15_UDPSendContext_new(__pyx_v_self, __pyx_v_data)); if (unlikely(!__pyx_t_1)) __PYX_ERR(23, 233, __pyx_L1_error)
  126875. __Pyx_GOTREF(__pyx_t_1);
  126876. __pyx_v_ctx = ((struct __pyx_obj_6uvloop_4loop__UDPSendContext *)__pyx_t_1);
  126877. __pyx_t_1 = 0;
  126878. /* "uvloop/handles/udp.pyx":234
  126879. * if err == uv.UV_EAGAIN:
  126880. * ctx = _UDPSendContext.new(self, data)
  126881. * err = uv.uv_udp_send(&ctx.req, # <<<<<<<<<<<<<<
  126882. * <uv.uv_udp_t*>self._handle,
  126883. * &ctx.uv_buf,
  126884. */
  126885. __pyx_v_err = uv_udp_send((&__pyx_v_ctx->req), ((uv_udp_t *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._handle), (&__pyx_v_ctx->uv_buf), 1, __pyx_v_saddr, __pyx_f_6uvloop_4loop___uv_udp_on_send);
  126886. /* "uvloop/handles/udp.pyx":241
  126887. * __uv_udp_on_send)
  126888. *
  126889. * if err < 0: # <<<<<<<<<<<<<<
  126890. * ctx.close()
  126891. *
  126892. */
  126893. __pyx_t_3 = ((__pyx_v_err < 0) != 0);
  126894. if (__pyx_t_3) {
  126895. /* "uvloop/handles/udp.pyx":242
  126896. *
  126897. * if err < 0:
  126898. * ctx.close() # <<<<<<<<<<<<<<
  126899. *
  126900. * exc = convert_error(err)
  126901. */
  126902. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop__UDPSendContext *)__pyx_v_ctx->__pyx_vtab)->close(__pyx_v_ctx); if (unlikely(!__pyx_t_1)) __PYX_ERR(23, 242, __pyx_L1_error)
  126903. __Pyx_GOTREF(__pyx_t_1);
  126904. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  126905. /* "uvloop/handles/udp.pyx":244
  126906. * ctx.close()
  126907. *
  126908. * exc = convert_error(err) # <<<<<<<<<<<<<<
  126909. * self._fatal_error(exc, True)
  126910. * else:
  126911. */
  126912. __pyx_t_1 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(23, 244, __pyx_L1_error)
  126913. __Pyx_GOTREF(__pyx_t_1);
  126914. __pyx_v_exc = __pyx_t_1;
  126915. __pyx_t_1 = 0;
  126916. /* "uvloop/handles/udp.pyx":245
  126917. *
  126918. * exc = convert_error(err)
  126919. * self._fatal_error(exc, True) # <<<<<<<<<<<<<<
  126920. * else:
  126921. * self._maybe_pause_protocol()
  126922. */
  126923. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UDPTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._fatal_error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self), __pyx_v_exc, Py_True, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(23, 245, __pyx_L1_error)
  126924. __Pyx_GOTREF(__pyx_t_1);
  126925. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  126926. /* "uvloop/handles/udp.pyx":241
  126927. * __uv_udp_on_send)
  126928. *
  126929. * if err < 0: # <<<<<<<<<<<<<<
  126930. * ctx.close()
  126931. *
  126932. */
  126933. goto __pyx_L20;
  126934. }
  126935. /* "uvloop/handles/udp.pyx":247
  126936. * self._fatal_error(exc, True)
  126937. * else:
  126938. * self._maybe_pause_protocol() # <<<<<<<<<<<<<<
  126939. *
  126940. * else:
  126941. */
  126942. /*else*/ {
  126943. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UDPTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._maybe_pause_protocol(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(23, 247, __pyx_L1_error)
  126944. __Pyx_GOTREF(__pyx_t_1);
  126945. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  126946. }
  126947. __pyx_L20:;
  126948. /* "uvloop/handles/udp.pyx":232
  126949. * err = uv.UV_EAGAIN
  126950. *
  126951. * if err == uv.UV_EAGAIN: # <<<<<<<<<<<<<<
  126952. * ctx = _UDPSendContext.new(self, data)
  126953. * err = uv.uv_udp_send(&ctx.req,
  126954. */
  126955. goto __pyx_L19;
  126956. }
  126957. /* "uvloop/handles/udp.pyx":250
  126958. *
  126959. * else:
  126960. * if err < 0: # <<<<<<<<<<<<<<
  126961. * exc = convert_error(err)
  126962. * self._fatal_error(exc, True)
  126963. */
  126964. /*else*/ {
  126965. __pyx_t_3 = ((__pyx_v_err < 0) != 0);
  126966. if (__pyx_t_3) {
  126967. /* "uvloop/handles/udp.pyx":251
  126968. * else:
  126969. * if err < 0:
  126970. * exc = convert_error(err) # <<<<<<<<<<<<<<
  126971. * self._fatal_error(exc, True)
  126972. * else:
  126973. */
  126974. __pyx_t_1 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(23, 251, __pyx_L1_error)
  126975. __Pyx_GOTREF(__pyx_t_1);
  126976. __pyx_v_exc = __pyx_t_1;
  126977. __pyx_t_1 = 0;
  126978. /* "uvloop/handles/udp.pyx":252
  126979. * if err < 0:
  126980. * exc = convert_error(err)
  126981. * self._fatal_error(exc, True) # <<<<<<<<<<<<<<
  126982. * else:
  126983. * self._on_sent(None)
  126984. */
  126985. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UDPTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._fatal_error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self), __pyx_v_exc, Py_True, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(23, 252, __pyx_L1_error)
  126986. __Pyx_GOTREF(__pyx_t_1);
  126987. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  126988. /* "uvloop/handles/udp.pyx":250
  126989. *
  126990. * else:
  126991. * if err < 0: # <<<<<<<<<<<<<<
  126992. * exc = convert_error(err)
  126993. * self._fatal_error(exc, True)
  126994. */
  126995. goto __pyx_L21;
  126996. }
  126997. /* "uvloop/handles/udp.pyx":254
  126998. * self._fatal_error(exc, True)
  126999. * else:
  127000. * self._on_sent(None) # <<<<<<<<<<<<<<
  127001. *
  127002. * cdef _on_receive(self, bytes data, object exc, object addr):
  127003. */
  127004. /*else*/ {
  127005. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UDPTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->_on_sent(__pyx_v_self, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(23, 254, __pyx_L1_error)
  127006. __Pyx_GOTREF(__pyx_t_1);
  127007. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  127008. }
  127009. __pyx_L21:;
  127010. }
  127011. __pyx_L19:;
  127012. /* "uvloop/handles/udp.pyx":193
  127013. * return PseudoSocket(self._family, uv.SOCK_DGRAM, 0, fileno)
  127014. *
  127015. * cdef _send(self, object data, object addr): # <<<<<<<<<<<<<<
  127016. * cdef:
  127017. * _UDPSendContext ctx
  127018. */
  127019. /* function exit code */
  127020. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  127021. goto __pyx_L0;
  127022. __pyx_L1_error:;
  127023. __Pyx_XDECREF(__pyx_t_1);
  127024. __Pyx_XDECREF(__pyx_t_8);
  127025. __Pyx_XDECREF(__pyx_t_9);
  127026. __Pyx_XDECREF(__pyx_t_10);
  127027. __Pyx_XDECREF(__pyx_t_11);
  127028. __Pyx_AddTraceback("uvloop.loop.UDPTransport._send", __pyx_clineno, __pyx_lineno, __pyx_filename);
  127029. __pyx_r = 0;
  127030. __pyx_L0:;
  127031. __Pyx_XDECREF((PyObject *)__pyx_v_ctx);
  127032. __Pyx_XDECREF(__pyx_v_exc);
  127033. __Pyx_XGIVEREF(__pyx_r);
  127034. __Pyx_RefNannyFinishContext();
  127035. return __pyx_r;
  127036. }
  127037. /* "uvloop/handles/udp.pyx":256
  127038. * self._on_sent(None)
  127039. *
  127040. * cdef _on_receive(self, bytes data, object exc, object addr): # <<<<<<<<<<<<<<
  127041. * if exc is None:
  127042. * self._protocol.datagram_received(data, addr)
  127043. */
  127044. static PyObject *__pyx_f_6uvloop_4loop_12UDPTransport__on_receive(struct __pyx_obj_6uvloop_4loop_UDPTransport *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_exc, PyObject *__pyx_v_addr) {
  127045. PyObject *__pyx_r = NULL;
  127046. __Pyx_RefNannyDeclarations
  127047. int __pyx_t_1;
  127048. int __pyx_t_2;
  127049. PyObject *__pyx_t_3 = NULL;
  127050. PyObject *__pyx_t_4 = NULL;
  127051. PyObject *__pyx_t_5 = NULL;
  127052. int __pyx_t_6;
  127053. PyObject *__pyx_t_7 = NULL;
  127054. __Pyx_RefNannySetupContext("_on_receive", 0);
  127055. /* "uvloop/handles/udp.pyx":257
  127056. *
  127057. * cdef _on_receive(self, bytes data, object exc, object addr):
  127058. * if exc is None: # <<<<<<<<<<<<<<
  127059. * self._protocol.datagram_received(data, addr)
  127060. * else:
  127061. */
  127062. __pyx_t_1 = (__pyx_v_exc == Py_None);
  127063. __pyx_t_2 = (__pyx_t_1 != 0);
  127064. if (__pyx_t_2) {
  127065. /* "uvloop/handles/udp.pyx":258
  127066. * cdef _on_receive(self, bytes data, object exc, object addr):
  127067. * if exc is None:
  127068. * self._protocol.datagram_received(data, addr) # <<<<<<<<<<<<<<
  127069. * else:
  127070. * self._protocol.error_received(exc)
  127071. */
  127072. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base._protocol, __pyx_n_s_datagram_received); if (unlikely(!__pyx_t_4)) __PYX_ERR(23, 258, __pyx_L1_error)
  127073. __Pyx_GOTREF(__pyx_t_4);
  127074. __pyx_t_5 = NULL;
  127075. __pyx_t_6 = 0;
  127076. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
  127077. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
  127078. if (likely(__pyx_t_5)) {
  127079. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  127080. __Pyx_INCREF(__pyx_t_5);
  127081. __Pyx_INCREF(function);
  127082. __Pyx_DECREF_SET(__pyx_t_4, function);
  127083. __pyx_t_6 = 1;
  127084. }
  127085. }
  127086. #if CYTHON_FAST_PYCALL
  127087. if (PyFunction_Check(__pyx_t_4)) {
  127088. PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_data, __pyx_v_addr};
  127089. __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(23, 258, __pyx_L1_error)
  127090. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  127091. __Pyx_GOTREF(__pyx_t_3);
  127092. } else
  127093. #endif
  127094. #if CYTHON_FAST_PYCCALL
  127095. if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
  127096. PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_data, __pyx_v_addr};
  127097. __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(23, 258, __pyx_L1_error)
  127098. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  127099. __Pyx_GOTREF(__pyx_t_3);
  127100. } else
  127101. #endif
  127102. {
  127103. __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(23, 258, __pyx_L1_error)
  127104. __Pyx_GOTREF(__pyx_t_7);
  127105. if (__pyx_t_5) {
  127106. __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
  127107. }
  127108. __Pyx_INCREF(__pyx_v_data);
  127109. __Pyx_GIVEREF(__pyx_v_data);
  127110. PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_data);
  127111. __Pyx_INCREF(__pyx_v_addr);
  127112. __Pyx_GIVEREF(__pyx_v_addr);
  127113. PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_v_addr);
  127114. __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(23, 258, __pyx_L1_error)
  127115. __Pyx_GOTREF(__pyx_t_3);
  127116. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  127117. }
  127118. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  127119. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  127120. /* "uvloop/handles/udp.pyx":257
  127121. *
  127122. * cdef _on_receive(self, bytes data, object exc, object addr):
  127123. * if exc is None: # <<<<<<<<<<<<<<
  127124. * self._protocol.datagram_received(data, addr)
  127125. * else:
  127126. */
  127127. goto __pyx_L3;
  127128. }
  127129. /* "uvloop/handles/udp.pyx":260
  127130. * self._protocol.datagram_received(data, addr)
  127131. * else:
  127132. * self._protocol.error_received(exc) # <<<<<<<<<<<<<<
  127133. *
  127134. * cdef _on_sent(self, object exc):
  127135. */
  127136. /*else*/ {
  127137. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base._protocol, __pyx_n_s_error_received); if (unlikely(!__pyx_t_4)) __PYX_ERR(23, 260, __pyx_L1_error)
  127138. __Pyx_GOTREF(__pyx_t_4);
  127139. __pyx_t_7 = NULL;
  127140. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
  127141. __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
  127142. if (likely(__pyx_t_7)) {
  127143. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  127144. __Pyx_INCREF(__pyx_t_7);
  127145. __Pyx_INCREF(function);
  127146. __Pyx_DECREF_SET(__pyx_t_4, function);
  127147. }
  127148. }
  127149. __pyx_t_3 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_7, __pyx_v_exc) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_exc);
  127150. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  127151. if (unlikely(!__pyx_t_3)) __PYX_ERR(23, 260, __pyx_L1_error)
  127152. __Pyx_GOTREF(__pyx_t_3);
  127153. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  127154. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  127155. }
  127156. __pyx_L3:;
  127157. /* "uvloop/handles/udp.pyx":256
  127158. * self._on_sent(None)
  127159. *
  127160. * cdef _on_receive(self, bytes data, object exc, object addr): # <<<<<<<<<<<<<<
  127161. * if exc is None:
  127162. * self._protocol.datagram_received(data, addr)
  127163. */
  127164. /* function exit code */
  127165. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  127166. goto __pyx_L0;
  127167. __pyx_L1_error:;
  127168. __Pyx_XDECREF(__pyx_t_3);
  127169. __Pyx_XDECREF(__pyx_t_4);
  127170. __Pyx_XDECREF(__pyx_t_5);
  127171. __Pyx_XDECREF(__pyx_t_7);
  127172. __Pyx_AddTraceback("uvloop.loop.UDPTransport._on_receive", __pyx_clineno, __pyx_lineno, __pyx_filename);
  127173. __pyx_r = 0;
  127174. __pyx_L0:;
  127175. __Pyx_XGIVEREF(__pyx_r);
  127176. __Pyx_RefNannyFinishContext();
  127177. return __pyx_r;
  127178. }
  127179. /* "uvloop/handles/udp.pyx":262
  127180. * self._protocol.error_received(exc)
  127181. *
  127182. * cdef _on_sent(self, object exc): # <<<<<<<<<<<<<<
  127183. * if exc is not None:
  127184. * if isinstance(exc, OSError):
  127185. */
  127186. static PyObject *__pyx_f_6uvloop_4loop_12UDPTransport__on_sent(struct __pyx_obj_6uvloop_4loop_UDPTransport *__pyx_v_self, PyObject *__pyx_v_exc) {
  127187. PyObject *__pyx_r = NULL;
  127188. __Pyx_RefNannyDeclarations
  127189. int __pyx_t_1;
  127190. int __pyx_t_2;
  127191. PyObject *__pyx_t_3 = NULL;
  127192. PyObject *__pyx_t_4 = NULL;
  127193. PyObject *__pyx_t_5 = NULL;
  127194. struct __pyx_opt_args_6uvloop_4loop_8UVHandle__fatal_error __pyx_t_6;
  127195. __Pyx_RefNannySetupContext("_on_sent", 0);
  127196. /* "uvloop/handles/udp.pyx":263
  127197. *
  127198. * cdef _on_sent(self, object exc):
  127199. * if exc is not None: # <<<<<<<<<<<<<<
  127200. * if isinstance(exc, OSError):
  127201. * self._protocol.error_received(exc)
  127202. */
  127203. __pyx_t_1 = (__pyx_v_exc != Py_None);
  127204. __pyx_t_2 = (__pyx_t_1 != 0);
  127205. if (__pyx_t_2) {
  127206. /* "uvloop/handles/udp.pyx":264
  127207. * cdef _on_sent(self, object exc):
  127208. * if exc is not None:
  127209. * if isinstance(exc, OSError): # <<<<<<<<<<<<<<
  127210. * self._protocol.error_received(exc)
  127211. * else:
  127212. */
  127213. __pyx_t_2 = PyObject_IsInstance(__pyx_v_exc, __pyx_builtin_OSError); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(23, 264, __pyx_L1_error)
  127214. __pyx_t_1 = (__pyx_t_2 != 0);
  127215. if (__pyx_t_1) {
  127216. /* "uvloop/handles/udp.pyx":265
  127217. * if exc is not None:
  127218. * if isinstance(exc, OSError):
  127219. * self._protocol.error_received(exc) # <<<<<<<<<<<<<<
  127220. * else:
  127221. * self._fatal_error(
  127222. */
  127223. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base._protocol, __pyx_n_s_error_received); if (unlikely(!__pyx_t_4)) __PYX_ERR(23, 265, __pyx_L1_error)
  127224. __Pyx_GOTREF(__pyx_t_4);
  127225. __pyx_t_5 = NULL;
  127226. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
  127227. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
  127228. if (likely(__pyx_t_5)) {
  127229. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  127230. __Pyx_INCREF(__pyx_t_5);
  127231. __Pyx_INCREF(function);
  127232. __Pyx_DECREF_SET(__pyx_t_4, function);
  127233. }
  127234. }
  127235. __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_exc) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_exc);
  127236. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  127237. if (unlikely(!__pyx_t_3)) __PYX_ERR(23, 265, __pyx_L1_error)
  127238. __Pyx_GOTREF(__pyx_t_3);
  127239. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  127240. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  127241. /* "uvloop/handles/udp.pyx":264
  127242. * cdef _on_sent(self, object exc):
  127243. * if exc is not None:
  127244. * if isinstance(exc, OSError): # <<<<<<<<<<<<<<
  127245. * self._protocol.error_received(exc)
  127246. * else:
  127247. */
  127248. goto __pyx_L4;
  127249. }
  127250. /* "uvloop/handles/udp.pyx":267
  127251. * self._protocol.error_received(exc)
  127252. * else:
  127253. * self._fatal_error( # <<<<<<<<<<<<<<
  127254. * exc, False, 'Fatal write error on datagram transport')
  127255. *
  127256. */
  127257. /*else*/ {
  127258. /* "uvloop/handles/udp.pyx":268
  127259. * else:
  127260. * self._fatal_error(
  127261. * exc, False, 'Fatal write error on datagram transport') # <<<<<<<<<<<<<<
  127262. *
  127263. * self._maybe_resume_protocol()
  127264. */
  127265. __pyx_t_6.__pyx_n = 1;
  127266. __pyx_t_6.reason = __pyx_kp_u_Fatal_write_error_on_datagram_tr;
  127267. __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_UDPTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._fatal_error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self), __pyx_v_exc, Py_False, &__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(23, 267, __pyx_L1_error)
  127268. __Pyx_GOTREF(__pyx_t_3);
  127269. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  127270. }
  127271. __pyx_L4:;
  127272. /* "uvloop/handles/udp.pyx":263
  127273. *
  127274. * cdef _on_sent(self, object exc):
  127275. * if exc is not None: # <<<<<<<<<<<<<<
  127276. * if isinstance(exc, OSError):
  127277. * self._protocol.error_received(exc)
  127278. */
  127279. }
  127280. /* "uvloop/handles/udp.pyx":270
  127281. * exc, False, 'Fatal write error on datagram transport')
  127282. *
  127283. * self._maybe_resume_protocol() # <<<<<<<<<<<<<<
  127284. * if not self._get_write_buffer_size():
  127285. * if self._closing:
  127286. */
  127287. __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_UDPTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._maybe_resume_protocol(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(23, 270, __pyx_L1_error)
  127288. __Pyx_GOTREF(__pyx_t_3);
  127289. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  127290. /* "uvloop/handles/udp.pyx":271
  127291. *
  127292. * self._maybe_resume_protocol()
  127293. * if not self._get_write_buffer_size(): # <<<<<<<<<<<<<<
  127294. * if self._closing:
  127295. * self._schedule_call_connection_lost(None)
  127296. */
  127297. __pyx_t_1 = ((!(((struct __pyx_vtabstruct_6uvloop_4loop_UDPTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._get_write_buffer_size(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_v_self)) != 0)) != 0);
  127298. if (__pyx_t_1) {
  127299. /* "uvloop/handles/udp.pyx":272
  127300. * self._maybe_resume_protocol()
  127301. * if not self._get_write_buffer_size():
  127302. * if self._closing: # <<<<<<<<<<<<<<
  127303. * self._schedule_call_connection_lost(None)
  127304. *
  127305. */
  127306. __pyx_t_1 = (__pyx_v_self->__pyx_base._closing != 0);
  127307. if (__pyx_t_1) {
  127308. /* "uvloop/handles/udp.pyx":273
  127309. * if not self._get_write_buffer_size():
  127310. * if self._closing:
  127311. * self._schedule_call_connection_lost(None) # <<<<<<<<<<<<<<
  127312. *
  127313. * # === Public API ===
  127314. */
  127315. __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_UDPTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._schedule_call_connection_lost(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_v_self), Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(23, 273, __pyx_L1_error)
  127316. __Pyx_GOTREF(__pyx_t_3);
  127317. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  127318. /* "uvloop/handles/udp.pyx":272
  127319. * self._maybe_resume_protocol()
  127320. * if not self._get_write_buffer_size():
  127321. * if self._closing: # <<<<<<<<<<<<<<
  127322. * self._schedule_call_connection_lost(None)
  127323. *
  127324. */
  127325. }
  127326. /* "uvloop/handles/udp.pyx":271
  127327. *
  127328. * self._maybe_resume_protocol()
  127329. * if not self._get_write_buffer_size(): # <<<<<<<<<<<<<<
  127330. * if self._closing:
  127331. * self._schedule_call_connection_lost(None)
  127332. */
  127333. }
  127334. /* "uvloop/handles/udp.pyx":262
  127335. * self._protocol.error_received(exc)
  127336. *
  127337. * cdef _on_sent(self, object exc): # <<<<<<<<<<<<<<
  127338. * if exc is not None:
  127339. * if isinstance(exc, OSError):
  127340. */
  127341. /* function exit code */
  127342. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  127343. goto __pyx_L0;
  127344. __pyx_L1_error:;
  127345. __Pyx_XDECREF(__pyx_t_3);
  127346. __Pyx_XDECREF(__pyx_t_4);
  127347. __Pyx_XDECREF(__pyx_t_5);
  127348. __Pyx_AddTraceback("uvloop.loop.UDPTransport._on_sent", __pyx_clineno, __pyx_lineno, __pyx_filename);
  127349. __pyx_r = 0;
  127350. __pyx_L0:;
  127351. __Pyx_XGIVEREF(__pyx_r);
  127352. __Pyx_RefNannyFinishContext();
  127353. return __pyx_r;
  127354. }
  127355. /* "uvloop/handles/udp.pyx":277
  127356. * # === Public API ===
  127357. *
  127358. * def sendto(self, data, addr=None): # <<<<<<<<<<<<<<
  127359. * if not data:
  127360. * # Replicating asyncio logic here.
  127361. */
  127362. /* Python wrapper */
  127363. static PyObject *__pyx_pw_6uvloop_4loop_12UDPTransport_3sendto(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  127364. static char __pyx_doc_6uvloop_4loop_12UDPTransport_2sendto[] = "UDPTransport.sendto(self, data, addr=None)";
  127365. static PyObject *__pyx_pw_6uvloop_4loop_12UDPTransport_3sendto(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  127366. PyObject *__pyx_v_data = 0;
  127367. PyObject *__pyx_v_addr = 0;
  127368. PyObject *__pyx_r = 0;
  127369. __Pyx_RefNannyDeclarations
  127370. __Pyx_RefNannySetupContext("sendto (wrapper)", 0);
  127371. {
  127372. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,&__pyx_n_s_addr,0};
  127373. PyObject* values[2] = {0,0};
  127374. values[1] = ((PyObject *)Py_None);
  127375. if (unlikely(__pyx_kwds)) {
  127376. Py_ssize_t kw_args;
  127377. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  127378. switch (pos_args) {
  127379. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  127380. CYTHON_FALLTHROUGH;
  127381. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  127382. CYTHON_FALLTHROUGH;
  127383. case 0: break;
  127384. default: goto __pyx_L5_argtuple_error;
  127385. }
  127386. kw_args = PyDict_Size(__pyx_kwds);
  127387. switch (pos_args) {
  127388. case 0:
  127389. if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--;
  127390. else goto __pyx_L5_argtuple_error;
  127391. CYTHON_FALLTHROUGH;
  127392. case 1:
  127393. if (kw_args > 0) {
  127394. PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_addr);
  127395. if (value) { values[1] = value; kw_args--; }
  127396. }
  127397. }
  127398. if (unlikely(kw_args > 0)) {
  127399. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sendto") < 0)) __PYX_ERR(23, 277, __pyx_L3_error)
  127400. }
  127401. } else {
  127402. switch (PyTuple_GET_SIZE(__pyx_args)) {
  127403. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  127404. CYTHON_FALLTHROUGH;
  127405. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  127406. break;
  127407. default: goto __pyx_L5_argtuple_error;
  127408. }
  127409. }
  127410. __pyx_v_data = values[0];
  127411. __pyx_v_addr = values[1];
  127412. }
  127413. goto __pyx_L4_argument_unpacking_done;
  127414. __pyx_L5_argtuple_error:;
  127415. __Pyx_RaiseArgtupleInvalid("sendto", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(23, 277, __pyx_L3_error)
  127416. __pyx_L3_error:;
  127417. __Pyx_AddTraceback("uvloop.loop.UDPTransport.sendto", __pyx_clineno, __pyx_lineno, __pyx_filename);
  127418. __Pyx_RefNannyFinishContext();
  127419. return NULL;
  127420. __pyx_L4_argument_unpacking_done:;
  127421. __pyx_r = __pyx_pf_6uvloop_4loop_12UDPTransport_2sendto(((struct __pyx_obj_6uvloop_4loop_UDPTransport *)__pyx_v_self), __pyx_v_data, __pyx_v_addr);
  127422. /* function exit code */
  127423. __Pyx_RefNannyFinishContext();
  127424. return __pyx_r;
  127425. }
  127426. static PyObject *__pyx_pf_6uvloop_4loop_12UDPTransport_2sendto(struct __pyx_obj_6uvloop_4loop_UDPTransport *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_addr) {
  127427. PyObject *__pyx_r = NULL;
  127428. __Pyx_RefNannyDeclarations
  127429. int __pyx_t_1;
  127430. int __pyx_t_2;
  127431. PyObject *__pyx_t_3 = NULL;
  127432. PyObject *__pyx_t_4 = NULL;
  127433. PyObject *__pyx_t_5 = NULL;
  127434. __Pyx_RefNannySetupContext("sendto", 0);
  127435. /* "uvloop/handles/udp.pyx":278
  127436. *
  127437. * def sendto(self, data, addr=None):
  127438. * if not data: # <<<<<<<<<<<<<<
  127439. * # Replicating asyncio logic here.
  127440. * return
  127441. */
  127442. __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_data); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(23, 278, __pyx_L1_error)
  127443. __pyx_t_2 = ((!__pyx_t_1) != 0);
  127444. if (__pyx_t_2) {
  127445. /* "uvloop/handles/udp.pyx":280
  127446. * if not data:
  127447. * # Replicating asyncio logic here.
  127448. * return # <<<<<<<<<<<<<<
  127449. *
  127450. * if self._conn_lost:
  127451. */
  127452. __Pyx_XDECREF(__pyx_r);
  127453. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  127454. goto __pyx_L0;
  127455. /* "uvloop/handles/udp.pyx":278
  127456. *
  127457. * def sendto(self, data, addr=None):
  127458. * if not data: # <<<<<<<<<<<<<<
  127459. * # Replicating asyncio logic here.
  127460. * return
  127461. */
  127462. }
  127463. /* "uvloop/handles/udp.pyx":282
  127464. * return
  127465. *
  127466. * if self._conn_lost: # <<<<<<<<<<<<<<
  127467. * # Replicating asyncio logic here.
  127468. * if self._conn_lost >= LOG_THRESHOLD_FOR_CONNLOST_WRITES:
  127469. */
  127470. __pyx_t_2 = (__pyx_v_self->__pyx_base._conn_lost != 0);
  127471. if (__pyx_t_2) {
  127472. /* "uvloop/handles/udp.pyx":284
  127473. * if self._conn_lost:
  127474. * # Replicating asyncio logic here.
  127475. * if self._conn_lost >= LOG_THRESHOLD_FOR_CONNLOST_WRITES: # <<<<<<<<<<<<<<
  127476. * aio_logger.warning('socket.send() raised exception.')
  127477. * self._conn_lost += 1
  127478. */
  127479. __pyx_t_2 = ((__pyx_v_self->__pyx_base._conn_lost >= 5) != 0);
  127480. if (__pyx_t_2) {
  127481. /* "uvloop/handles/udp.pyx":285
  127482. * # Replicating asyncio logic here.
  127483. * if self._conn_lost >= LOG_THRESHOLD_FOR_CONNLOST_WRITES:
  127484. * aio_logger.warning('socket.send() raised exception.') # <<<<<<<<<<<<<<
  127485. * self._conn_lost += 1
  127486. * return
  127487. */
  127488. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_6uvloop_4loop_aio_logger, __pyx_n_s_warning); if (unlikely(!__pyx_t_4)) __PYX_ERR(23, 285, __pyx_L1_error)
  127489. __Pyx_GOTREF(__pyx_t_4);
  127490. __pyx_t_5 = NULL;
  127491. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
  127492. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
  127493. if (likely(__pyx_t_5)) {
  127494. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  127495. __Pyx_INCREF(__pyx_t_5);
  127496. __Pyx_INCREF(function);
  127497. __Pyx_DECREF_SET(__pyx_t_4, function);
  127498. }
  127499. }
  127500. __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_kp_u_socket_send_raised_exception) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_u_socket_send_raised_exception);
  127501. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  127502. if (unlikely(!__pyx_t_3)) __PYX_ERR(23, 285, __pyx_L1_error)
  127503. __Pyx_GOTREF(__pyx_t_3);
  127504. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  127505. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  127506. /* "uvloop/handles/udp.pyx":284
  127507. * if self._conn_lost:
  127508. * # Replicating asyncio logic here.
  127509. * if self._conn_lost >= LOG_THRESHOLD_FOR_CONNLOST_WRITES: # <<<<<<<<<<<<<<
  127510. * aio_logger.warning('socket.send() raised exception.')
  127511. * self._conn_lost += 1
  127512. */
  127513. }
  127514. /* "uvloop/handles/udp.pyx":286
  127515. * if self._conn_lost >= LOG_THRESHOLD_FOR_CONNLOST_WRITES:
  127516. * aio_logger.warning('socket.send() raised exception.')
  127517. * self._conn_lost += 1 # <<<<<<<<<<<<<<
  127518. * return
  127519. *
  127520. */
  127521. __pyx_v_self->__pyx_base._conn_lost = (__pyx_v_self->__pyx_base._conn_lost + 1);
  127522. /* "uvloop/handles/udp.pyx":287
  127523. * aio_logger.warning('socket.send() raised exception.')
  127524. * self._conn_lost += 1
  127525. * return # <<<<<<<<<<<<<<
  127526. *
  127527. * self._send(data, addr)
  127528. */
  127529. __Pyx_XDECREF(__pyx_r);
  127530. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  127531. goto __pyx_L0;
  127532. /* "uvloop/handles/udp.pyx":282
  127533. * return
  127534. *
  127535. * if self._conn_lost: # <<<<<<<<<<<<<<
  127536. * # Replicating asyncio logic here.
  127537. * if self._conn_lost >= LOG_THRESHOLD_FOR_CONNLOST_WRITES:
  127538. */
  127539. }
  127540. /* "uvloop/handles/udp.pyx":289
  127541. * return
  127542. *
  127543. * self._send(data, addr) # <<<<<<<<<<<<<<
  127544. *
  127545. *
  127546. */
  127547. __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_UDPTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->_send(__pyx_v_self, __pyx_v_data, __pyx_v_addr); if (unlikely(!__pyx_t_3)) __PYX_ERR(23, 289, __pyx_L1_error)
  127548. __Pyx_GOTREF(__pyx_t_3);
  127549. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  127550. /* "uvloop/handles/udp.pyx":277
  127551. * # === Public API ===
  127552. *
  127553. * def sendto(self, data, addr=None): # <<<<<<<<<<<<<<
  127554. * if not data:
  127555. * # Replicating asyncio logic here.
  127556. */
  127557. /* function exit code */
  127558. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  127559. goto __pyx_L0;
  127560. __pyx_L1_error:;
  127561. __Pyx_XDECREF(__pyx_t_3);
  127562. __Pyx_XDECREF(__pyx_t_4);
  127563. __Pyx_XDECREF(__pyx_t_5);
  127564. __Pyx_AddTraceback("uvloop.loop.UDPTransport.sendto", __pyx_clineno, __pyx_lineno, __pyx_filename);
  127565. __pyx_r = NULL;
  127566. __pyx_L0:;
  127567. __Pyx_XGIVEREF(__pyx_r);
  127568. __Pyx_RefNannyFinishContext();
  127569. return __pyx_r;
  127570. }
  127571. /* "(tree fragment)":1
  127572. * def __reduce_cython__(self): # <<<<<<<<<<<<<<
  127573. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  127574. * def __setstate_cython__(self, __pyx_state):
  127575. */
  127576. /* Python wrapper */
  127577. static PyObject *__pyx_pw_6uvloop_4loop_12UDPTransport_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  127578. static char __pyx_doc_6uvloop_4loop_12UDPTransport_4__reduce_cython__[] = "UDPTransport.__reduce_cython__(self)";
  127579. static PyObject *__pyx_pw_6uvloop_4loop_12UDPTransport_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  127580. PyObject *__pyx_r = 0;
  127581. __Pyx_RefNannyDeclarations
  127582. __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  127583. __pyx_r = __pyx_pf_6uvloop_4loop_12UDPTransport_4__reduce_cython__(((struct __pyx_obj_6uvloop_4loop_UDPTransport *)__pyx_v_self));
  127584. /* function exit code */
  127585. __Pyx_RefNannyFinishContext();
  127586. return __pyx_r;
  127587. }
  127588. static PyObject *__pyx_pf_6uvloop_4loop_12UDPTransport_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UDPTransport *__pyx_v_self) {
  127589. PyObject *__pyx_r = NULL;
  127590. __Pyx_RefNannyDeclarations
  127591. PyObject *__pyx_t_1 = NULL;
  127592. __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  127593. /* "(tree fragment)":2
  127594. * def __reduce_cython__(self):
  127595. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  127596. * def __setstate_cython__(self, __pyx_state):
  127597. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  127598. */
  127599. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__212, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 2, __pyx_L1_error)
  127600. __Pyx_GOTREF(__pyx_t_1);
  127601. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  127602. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  127603. __PYX_ERR(9, 2, __pyx_L1_error)
  127604. /* "(tree fragment)":1
  127605. * def __reduce_cython__(self): # <<<<<<<<<<<<<<
  127606. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  127607. * def __setstate_cython__(self, __pyx_state):
  127608. */
  127609. /* function exit code */
  127610. __pyx_L1_error:;
  127611. __Pyx_XDECREF(__pyx_t_1);
  127612. __Pyx_AddTraceback("uvloop.loop.UDPTransport.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  127613. __pyx_r = NULL;
  127614. __Pyx_XGIVEREF(__pyx_r);
  127615. __Pyx_RefNannyFinishContext();
  127616. return __pyx_r;
  127617. }
  127618. /* "(tree fragment)":3
  127619. * def __reduce_cython__(self):
  127620. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  127621. * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
  127622. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  127623. */
  127624. /* Python wrapper */
  127625. static PyObject *__pyx_pw_6uvloop_4loop_12UDPTransport_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
  127626. static char __pyx_doc_6uvloop_4loop_12UDPTransport_6__setstate_cython__[] = "UDPTransport.__setstate_cython__(self, __pyx_state)";
  127627. static PyObject *__pyx_pw_6uvloop_4loop_12UDPTransport_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  127628. PyObject *__pyx_r = 0;
  127629. __Pyx_RefNannyDeclarations
  127630. __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  127631. __pyx_r = __pyx_pf_6uvloop_4loop_12UDPTransport_6__setstate_cython__(((struct __pyx_obj_6uvloop_4loop_UDPTransport *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
  127632. /* function exit code */
  127633. __Pyx_RefNannyFinishContext();
  127634. return __pyx_r;
  127635. }
  127636. static PyObject *__pyx_pf_6uvloop_4loop_12UDPTransport_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UDPTransport *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  127637. PyObject *__pyx_r = NULL;
  127638. __Pyx_RefNannyDeclarations
  127639. PyObject *__pyx_t_1 = NULL;
  127640. __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  127641. /* "(tree fragment)":4
  127642. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  127643. * def __setstate_cython__(self, __pyx_state):
  127644. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  127645. */
  127646. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__213, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 4, __pyx_L1_error)
  127647. __Pyx_GOTREF(__pyx_t_1);
  127648. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  127649. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  127650. __PYX_ERR(9, 4, __pyx_L1_error)
  127651. /* "(tree fragment)":3
  127652. * def __reduce_cython__(self):
  127653. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  127654. * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
  127655. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  127656. */
  127657. /* function exit code */
  127658. __pyx_L1_error:;
  127659. __Pyx_XDECREF(__pyx_t_1);
  127660. __Pyx_AddTraceback("uvloop.loop.UDPTransport.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  127661. __pyx_r = NULL;
  127662. __Pyx_XGIVEREF(__pyx_r);
  127663. __Pyx_RefNannyFinishContext();
  127664. return __pyx_r;
  127665. }
  127666. /* "uvloop/handles/udp.pyx":292
  127667. *
  127668. *
  127669. * cdef void __uv_udp_on_receive(uv.uv_udp_t* handle, # <<<<<<<<<<<<<<
  127670. * ssize_t nread,
  127671. * const uv.uv_buf_t* buf,
  127672. */
  127673. static void __pyx_f_6uvloop_4loop___uv_udp_on_receive(uv_udp_t *__pyx_v_handle, Py_ssize_t __pyx_v_nread, CYTHON_UNUSED uv_buf_t const *__pyx_v_buf, struct sockaddr const *__pyx_v_addr, CYTHON_UNUSED unsigned int __pyx_v_flags) {
  127674. struct __pyx_obj_6uvloop_4loop_UDPTransport *__pyx_v_udp = 0;
  127675. struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop = 0;
  127676. PyObject *__pyx_v_data = 0;
  127677. PyObject *__pyx_v_pyaddr = 0;
  127678. PyObject *__pyx_v_exc = NULL;
  127679. __Pyx_RefNannyDeclarations
  127680. int __pyx_t_1;
  127681. PyObject *__pyx_t_2 = NULL;
  127682. int __pyx_t_3;
  127683. PyObject *__pyx_t_4 = NULL;
  127684. PyObject *__pyx_t_5 = NULL;
  127685. PyObject *__pyx_t_6 = NULL;
  127686. int __pyx_t_7;
  127687. PyObject *__pyx_t_8 = NULL;
  127688. PyObject *__pyx_t_9 = NULL;
  127689. PyObject *__pyx_t_10 = NULL;
  127690. int __pyx_t_11;
  127691. char const *__pyx_t_12;
  127692. PyObject *__pyx_t_13 = NULL;
  127693. PyObject *__pyx_t_14 = NULL;
  127694. PyObject *__pyx_t_15 = NULL;
  127695. PyObject *__pyx_t_16 = NULL;
  127696. PyObject *__pyx_t_17 = NULL;
  127697. PyObject *__pyx_t_18 = NULL;
  127698. char const *__pyx_t_19;
  127699. #ifdef WITH_THREAD
  127700. PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  127701. #endif
  127702. __Pyx_RefNannySetupContext("__uv_udp_on_receive", 0);
  127703. /* "uvloop/handles/udp.pyx":299
  127704. *
  127705. * if __ensure_handle_data(<uv.uv_handle_t*>handle,
  127706. * "UDPTransport receive callback") == 0: # <<<<<<<<<<<<<<
  127707. * return
  127708. *
  127709. */
  127710. __pyx_t_1 = ((__pyx_f_6uvloop_4loop___ensure_handle_data(((uv_handle_t *)__pyx_v_handle), ((char const *)"UDPTransport receive callback")) == 0) != 0);
  127711. /* "uvloop/handles/udp.pyx":298
  127712. * unsigned flags) with gil:
  127713. *
  127714. * if __ensure_handle_data(<uv.uv_handle_t*>handle, # <<<<<<<<<<<<<<
  127715. * "UDPTransport receive callback") == 0:
  127716. * return
  127717. */
  127718. if (__pyx_t_1) {
  127719. /* "uvloop/handles/udp.pyx":300
  127720. * if __ensure_handle_data(<uv.uv_handle_t*>handle,
  127721. * "UDPTransport receive callback") == 0:
  127722. * return # <<<<<<<<<<<<<<
  127723. *
  127724. * cdef:
  127725. */
  127726. goto __pyx_L0;
  127727. /* "uvloop/handles/udp.pyx":298
  127728. * unsigned flags) with gil:
  127729. *
  127730. * if __ensure_handle_data(<uv.uv_handle_t*>handle, # <<<<<<<<<<<<<<
  127731. * "UDPTransport receive callback") == 0:
  127732. * return
  127733. */
  127734. }
  127735. /* "uvloop/handles/udp.pyx":303
  127736. *
  127737. * cdef:
  127738. * UDPTransport udp = <UDPTransport>handle.data # <<<<<<<<<<<<<<
  127739. * Loop loop = udp._loop
  127740. * bytes data
  127741. */
  127742. __pyx_t_2 = ((PyObject *)__pyx_v_handle->data);
  127743. __Pyx_INCREF(__pyx_t_2);
  127744. __pyx_v_udp = ((struct __pyx_obj_6uvloop_4loop_UDPTransport *)__pyx_t_2);
  127745. __pyx_t_2 = 0;
  127746. /* "uvloop/handles/udp.pyx":304
  127747. * cdef:
  127748. * UDPTransport udp = <UDPTransport>handle.data
  127749. * Loop loop = udp._loop # <<<<<<<<<<<<<<
  127750. * bytes data
  127751. * object pyaddr
  127752. */
  127753. __pyx_t_2 = ((PyObject *)__pyx_v_udp->__pyx_base.__pyx_base.__pyx_base._loop);
  127754. __Pyx_INCREF(__pyx_t_2);
  127755. __pyx_v_loop = ((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_t_2);
  127756. __pyx_t_2 = 0;
  127757. /* "uvloop/handles/udp.pyx":310
  127758. * # It's OK to free the buffer early, since nothing will
  127759. * # be able to touch it until this method is done.
  127760. * __loop_free_buffer(loop) # <<<<<<<<<<<<<<
  127761. *
  127762. * if udp._closed:
  127763. */
  127764. __pyx_f_6uvloop_4loop___loop_free_buffer(__pyx_v_loop);
  127765. /* "uvloop/handles/udp.pyx":312
  127766. * __loop_free_buffer(loop)
  127767. *
  127768. * if udp._closed: # <<<<<<<<<<<<<<
  127769. * # The handle was closed, there is no reason to
  127770. * # do any work now.
  127771. */
  127772. __pyx_t_1 = (__pyx_v_udp->__pyx_base.__pyx_base.__pyx_base._closed != 0);
  127773. if (__pyx_t_1) {
  127774. /* "uvloop/handles/udp.pyx":315
  127775. * # The handle was closed, there is no reason to
  127776. * # do any work now.
  127777. * udp.__receiving_stopped() # Just in case. # <<<<<<<<<<<<<<
  127778. * return
  127779. *
  127780. */
  127781. __pyx_t_2 = __pyx_f_6uvloop_4loop_12UDPTransport___receiving_stopped(__pyx_v_udp); if (unlikely(!__pyx_t_2)) __PYX_ERR(23, 315, __pyx_L1_error)
  127782. __Pyx_GOTREF(__pyx_t_2);
  127783. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  127784. /* "uvloop/handles/udp.pyx":316
  127785. * # do any work now.
  127786. * udp.__receiving_stopped() # Just in case.
  127787. * return # <<<<<<<<<<<<<<
  127788. *
  127789. * if addr is NULL and nread == 0:
  127790. */
  127791. goto __pyx_L0;
  127792. /* "uvloop/handles/udp.pyx":312
  127793. * __loop_free_buffer(loop)
  127794. *
  127795. * if udp._closed: # <<<<<<<<<<<<<<
  127796. * # The handle was closed, there is no reason to
  127797. * # do any work now.
  127798. */
  127799. }
  127800. /* "uvloop/handles/udp.pyx":318
  127801. * return
  127802. *
  127803. * if addr is NULL and nread == 0: # <<<<<<<<<<<<<<
  127804. * # From libuv docs:
  127805. * # addr: struct sockaddr* containing the address
  127806. */
  127807. __pyx_t_3 = ((__pyx_v_addr == NULL) != 0);
  127808. if (__pyx_t_3) {
  127809. } else {
  127810. __pyx_t_1 = __pyx_t_3;
  127811. goto __pyx_L6_bool_binop_done;
  127812. }
  127813. __pyx_t_3 = ((__pyx_v_nread == 0) != 0);
  127814. __pyx_t_1 = __pyx_t_3;
  127815. __pyx_L6_bool_binop_done:;
  127816. if (__pyx_t_1) {
  127817. /* "uvloop/handles/udp.pyx":329
  127818. * # addr != NULL when an empty UDP packet is
  127819. * # received.
  127820. * return # <<<<<<<<<<<<<<
  127821. *
  127822. * if addr is NULL:
  127823. */
  127824. goto __pyx_L0;
  127825. /* "uvloop/handles/udp.pyx":318
  127826. * return
  127827. *
  127828. * if addr is NULL and nread == 0: # <<<<<<<<<<<<<<
  127829. * # From libuv docs:
  127830. * # addr: struct sockaddr* containing the address
  127831. */
  127832. }
  127833. /* "uvloop/handles/udp.pyx":331
  127834. * return
  127835. *
  127836. * if addr is NULL: # <<<<<<<<<<<<<<
  127837. * pyaddr = None
  127838. * else:
  127839. */
  127840. __pyx_t_1 = ((__pyx_v_addr == NULL) != 0);
  127841. if (__pyx_t_1) {
  127842. /* "uvloop/handles/udp.pyx":332
  127843. *
  127844. * if addr is NULL:
  127845. * pyaddr = None # <<<<<<<<<<<<<<
  127846. * else:
  127847. * try:
  127848. */
  127849. __Pyx_INCREF(Py_None);
  127850. __pyx_v_pyaddr = Py_None;
  127851. /* "uvloop/handles/udp.pyx":331
  127852. * return
  127853. *
  127854. * if addr is NULL: # <<<<<<<<<<<<<<
  127855. * pyaddr = None
  127856. * else:
  127857. */
  127858. goto __pyx_L8;
  127859. }
  127860. /* "uvloop/handles/udp.pyx":334
  127861. * pyaddr = None
  127862. * else:
  127863. * try: # <<<<<<<<<<<<<<
  127864. * pyaddr = __convert_sockaddr_to_pyaddr(addr)
  127865. * except BaseException as exc:
  127866. */
  127867. /*else*/ {
  127868. {
  127869. __Pyx_PyThreadState_declare
  127870. __Pyx_PyThreadState_assign
  127871. __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
  127872. __Pyx_XGOTREF(__pyx_t_4);
  127873. __Pyx_XGOTREF(__pyx_t_5);
  127874. __Pyx_XGOTREF(__pyx_t_6);
  127875. /*try:*/ {
  127876. /* "uvloop/handles/udp.pyx":335
  127877. * else:
  127878. * try:
  127879. * pyaddr = __convert_sockaddr_to_pyaddr(addr) # <<<<<<<<<<<<<<
  127880. * except BaseException as exc:
  127881. * udp._error(exc, False)
  127882. */
  127883. __pyx_t_2 = __pyx_f_6uvloop_4loop___convert_sockaddr_to_pyaddr(__pyx_v_addr); if (unlikely(!__pyx_t_2)) __PYX_ERR(23, 335, __pyx_L9_error)
  127884. __Pyx_GOTREF(__pyx_t_2);
  127885. __pyx_v_pyaddr = __pyx_t_2;
  127886. __pyx_t_2 = 0;
  127887. /* "uvloop/handles/udp.pyx":334
  127888. * pyaddr = None
  127889. * else:
  127890. * try: # <<<<<<<<<<<<<<
  127891. * pyaddr = __convert_sockaddr_to_pyaddr(addr)
  127892. * except BaseException as exc:
  127893. */
  127894. }
  127895. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  127896. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  127897. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  127898. goto __pyx_L14_try_end;
  127899. __pyx_L9_error:;
  127900. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  127901. /* "uvloop/handles/udp.pyx":336
  127902. * try:
  127903. * pyaddr = __convert_sockaddr_to_pyaddr(addr)
  127904. * except BaseException as exc: # <<<<<<<<<<<<<<
  127905. * udp._error(exc, False)
  127906. * return
  127907. */
  127908. __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_BaseException);
  127909. if (__pyx_t_7) {
  127910. __Pyx_AddTraceback("uvloop.loop.__uv_udp_on_receive", __pyx_clineno, __pyx_lineno, __pyx_filename);
  127911. if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_8, &__pyx_t_9) < 0) __PYX_ERR(23, 336, __pyx_L11_except_error)
  127912. __Pyx_GOTREF(__pyx_t_2);
  127913. __Pyx_GOTREF(__pyx_t_8);
  127914. __Pyx_GOTREF(__pyx_t_9);
  127915. __Pyx_INCREF(__pyx_t_8);
  127916. __pyx_v_exc = __pyx_t_8;
  127917. /*try:*/ {
  127918. /* "uvloop/handles/udp.pyx":337
  127919. * pyaddr = __convert_sockaddr_to_pyaddr(addr)
  127920. * except BaseException as exc:
  127921. * udp._error(exc, False) # <<<<<<<<<<<<<<
  127922. * return
  127923. *
  127924. */
  127925. __pyx_t_10 = ((struct __pyx_vtabstruct_6uvloop_4loop_UDPTransport *)__pyx_v_udp->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_udp), __pyx_v_exc, Py_False); if (unlikely(!__pyx_t_10)) __PYX_ERR(23, 337, __pyx_L20_error)
  127926. __Pyx_GOTREF(__pyx_t_10);
  127927. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  127928. /* "uvloop/handles/udp.pyx":338
  127929. * except BaseException as exc:
  127930. * udp._error(exc, False)
  127931. * return # <<<<<<<<<<<<<<
  127932. *
  127933. * if nread < 0:
  127934. */
  127935. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  127936. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  127937. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  127938. goto __pyx_L19_return;
  127939. }
  127940. /* "uvloop/handles/udp.pyx":336
  127941. * try:
  127942. * pyaddr = __convert_sockaddr_to_pyaddr(addr)
  127943. * except BaseException as exc: # <<<<<<<<<<<<<<
  127944. * udp._error(exc, False)
  127945. * return
  127946. */
  127947. /*finally:*/ {
  127948. __pyx_L20_error:;
  127949. /*exception exit:*/{
  127950. __Pyx_PyThreadState_declare
  127951. __Pyx_PyThreadState_assign
  127952. __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0;
  127953. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  127954. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18);
  127955. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15) < 0)) __Pyx_ErrFetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
  127956. __Pyx_XGOTREF(__pyx_t_13);
  127957. __Pyx_XGOTREF(__pyx_t_14);
  127958. __Pyx_XGOTREF(__pyx_t_15);
  127959. __Pyx_XGOTREF(__pyx_t_16);
  127960. __Pyx_XGOTREF(__pyx_t_17);
  127961. __Pyx_XGOTREF(__pyx_t_18);
  127962. __pyx_t_7 = __pyx_lineno; __pyx_t_11 = __pyx_clineno; __pyx_t_12 = __pyx_filename;
  127963. {
  127964. __Pyx_DECREF(__pyx_v_exc);
  127965. __pyx_v_exc = NULL;
  127966. }
  127967. if (PY_MAJOR_VERSION >= 3) {
  127968. __Pyx_XGIVEREF(__pyx_t_16);
  127969. __Pyx_XGIVEREF(__pyx_t_17);
  127970. __Pyx_XGIVEREF(__pyx_t_18);
  127971. __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18);
  127972. }
  127973. __Pyx_XGIVEREF(__pyx_t_13);
  127974. __Pyx_XGIVEREF(__pyx_t_14);
  127975. __Pyx_XGIVEREF(__pyx_t_15);
  127976. __Pyx_ErrRestore(__pyx_t_13, __pyx_t_14, __pyx_t_15);
  127977. __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0;
  127978. __pyx_lineno = __pyx_t_7; __pyx_clineno = __pyx_t_11; __pyx_filename = __pyx_t_12;
  127979. goto __pyx_L11_except_error;
  127980. }
  127981. __pyx_L19_return: {
  127982. __Pyx_DECREF(__pyx_v_exc);
  127983. __pyx_v_exc = NULL;
  127984. goto __pyx_L12_except_return;
  127985. }
  127986. }
  127987. }
  127988. goto __pyx_L11_except_error;
  127989. __pyx_L11_except_error:;
  127990. /* "uvloop/handles/udp.pyx":334
  127991. * pyaddr = None
  127992. * else:
  127993. * try: # <<<<<<<<<<<<<<
  127994. * pyaddr = __convert_sockaddr_to_pyaddr(addr)
  127995. * except BaseException as exc:
  127996. */
  127997. __Pyx_XGIVEREF(__pyx_t_4);
  127998. __Pyx_XGIVEREF(__pyx_t_5);
  127999. __Pyx_XGIVEREF(__pyx_t_6);
  128000. __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
  128001. goto __pyx_L1_error;
  128002. __pyx_L12_except_return:;
  128003. __Pyx_XGIVEREF(__pyx_t_4);
  128004. __Pyx_XGIVEREF(__pyx_t_5);
  128005. __Pyx_XGIVEREF(__pyx_t_6);
  128006. __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
  128007. goto __pyx_L0;
  128008. __pyx_L14_try_end:;
  128009. }
  128010. }
  128011. __pyx_L8:;
  128012. /* "uvloop/handles/udp.pyx":340
  128013. * return
  128014. *
  128015. * if nread < 0: # <<<<<<<<<<<<<<
  128016. * exc = convert_error(nread)
  128017. * udp._on_receive(None, exc, pyaddr)
  128018. */
  128019. __pyx_t_1 = ((__pyx_v_nread < 0) != 0);
  128020. if (__pyx_t_1) {
  128021. /* "uvloop/handles/udp.pyx":341
  128022. *
  128023. * if nread < 0:
  128024. * exc = convert_error(nread) # <<<<<<<<<<<<<<
  128025. * udp._on_receive(None, exc, pyaddr)
  128026. * return
  128027. */
  128028. __pyx_t_9 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_nread); if (unlikely(!__pyx_t_9)) __PYX_ERR(23, 341, __pyx_L1_error)
  128029. __Pyx_GOTREF(__pyx_t_9);
  128030. __pyx_v_exc = __pyx_t_9;
  128031. __pyx_t_9 = 0;
  128032. /* "uvloop/handles/udp.pyx":342
  128033. * if nread < 0:
  128034. * exc = convert_error(nread)
  128035. * udp._on_receive(None, exc, pyaddr) # <<<<<<<<<<<<<<
  128036. * return
  128037. *
  128038. */
  128039. __pyx_t_9 = ((struct __pyx_vtabstruct_6uvloop_4loop_UDPTransport *)__pyx_v_udp->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->_on_receive(__pyx_v_udp, ((PyObject*)Py_None), __pyx_v_exc, __pyx_v_pyaddr); if (unlikely(!__pyx_t_9)) __PYX_ERR(23, 342, __pyx_L1_error)
  128040. __Pyx_GOTREF(__pyx_t_9);
  128041. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  128042. /* "uvloop/handles/udp.pyx":343
  128043. * exc = convert_error(nread)
  128044. * udp._on_receive(None, exc, pyaddr)
  128045. * return # <<<<<<<<<<<<<<
  128046. *
  128047. * if pyaddr is None:
  128048. */
  128049. goto __pyx_L0;
  128050. /* "uvloop/handles/udp.pyx":340
  128051. * return
  128052. *
  128053. * if nread < 0: # <<<<<<<<<<<<<<
  128054. * exc = convert_error(nread)
  128055. * udp._on_receive(None, exc, pyaddr)
  128056. */
  128057. }
  128058. /* "uvloop/handles/udp.pyx":345
  128059. * return
  128060. *
  128061. * if pyaddr is None: # <<<<<<<<<<<<<<
  128062. * udp._fatal_error(
  128063. * RuntimeError(
  128064. */
  128065. __pyx_t_1 = (__pyx_v_pyaddr == Py_None);
  128066. __pyx_t_3 = (__pyx_t_1 != 0);
  128067. if (__pyx_t_3) {
  128068. /* "uvloop/handles/udp.pyx":347
  128069. * if pyaddr is None:
  128070. * udp._fatal_error(
  128071. * RuntimeError( # <<<<<<<<<<<<<<
  128072. * 'uv_udp.receive callback: addr is NULL and nread >= 0'),
  128073. * False)
  128074. */
  128075. __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__214, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(23, 347, __pyx_L1_error)
  128076. __Pyx_GOTREF(__pyx_t_9);
  128077. /* "uvloop/handles/udp.pyx":346
  128078. *
  128079. * if pyaddr is None:
  128080. * udp._fatal_error( # <<<<<<<<<<<<<<
  128081. * RuntimeError(
  128082. * 'uv_udp.receive callback: addr is NULL and nread >= 0'),
  128083. */
  128084. __pyx_t_8 = ((struct __pyx_vtabstruct_6uvloop_4loop_UDPTransport *)__pyx_v_udp->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._fatal_error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_udp), __pyx_t_9, Py_False, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(23, 346, __pyx_L1_error)
  128085. __Pyx_GOTREF(__pyx_t_8);
  128086. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  128087. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  128088. /* "uvloop/handles/udp.pyx":350
  128089. * 'uv_udp.receive callback: addr is NULL and nread >= 0'),
  128090. * False)
  128091. * return # <<<<<<<<<<<<<<
  128092. *
  128093. * if nread == 0:
  128094. */
  128095. goto __pyx_L0;
  128096. /* "uvloop/handles/udp.pyx":345
  128097. * return
  128098. *
  128099. * if pyaddr is None: # <<<<<<<<<<<<<<
  128100. * udp._fatal_error(
  128101. * RuntimeError(
  128102. */
  128103. }
  128104. /* "uvloop/handles/udp.pyx":352
  128105. * return
  128106. *
  128107. * if nread == 0: # <<<<<<<<<<<<<<
  128108. * data = b''
  128109. * else:
  128110. */
  128111. __pyx_t_3 = ((__pyx_v_nread == 0) != 0);
  128112. if (__pyx_t_3) {
  128113. /* "uvloop/handles/udp.pyx":353
  128114. *
  128115. * if nread == 0:
  128116. * data = b'' # <<<<<<<<<<<<<<
  128117. * else:
  128118. * data = loop._recv_buffer[:nread]
  128119. */
  128120. __Pyx_INCREF(__pyx_kp_b__2);
  128121. __pyx_v_data = __pyx_kp_b__2;
  128122. /* "uvloop/handles/udp.pyx":352
  128123. * return
  128124. *
  128125. * if nread == 0: # <<<<<<<<<<<<<<
  128126. * data = b''
  128127. * else:
  128128. */
  128129. goto __pyx_L28;
  128130. }
  128131. /* "uvloop/handles/udp.pyx":355
  128132. * data = b''
  128133. * else:
  128134. * data = loop._recv_buffer[:nread] # <<<<<<<<<<<<<<
  128135. *
  128136. * try:
  128137. */
  128138. /*else*/ {
  128139. __pyx_t_8 = __Pyx_PyBytes_FromStringAndSize(((const char*)__pyx_v_loop->_recv_buffer) + 0, __pyx_v_nread - 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(23, 355, __pyx_L1_error)
  128140. __Pyx_GOTREF(__pyx_t_8);
  128141. __pyx_v_data = ((PyObject*)__pyx_t_8);
  128142. __pyx_t_8 = 0;
  128143. }
  128144. __pyx_L28:;
  128145. /* "uvloop/handles/udp.pyx":357
  128146. * data = loop._recv_buffer[:nread]
  128147. *
  128148. * try: # <<<<<<<<<<<<<<
  128149. * udp._on_receive(data, None, pyaddr)
  128150. * except BaseException as exc:
  128151. */
  128152. {
  128153. __Pyx_PyThreadState_declare
  128154. __Pyx_PyThreadState_assign
  128155. __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4);
  128156. __Pyx_XGOTREF(__pyx_t_6);
  128157. __Pyx_XGOTREF(__pyx_t_5);
  128158. __Pyx_XGOTREF(__pyx_t_4);
  128159. /*try:*/ {
  128160. /* "uvloop/handles/udp.pyx":358
  128161. *
  128162. * try:
  128163. * udp._on_receive(data, None, pyaddr) # <<<<<<<<<<<<<<
  128164. * except BaseException as exc:
  128165. * udp._error(exc, False)
  128166. */
  128167. __pyx_t_8 = ((struct __pyx_vtabstruct_6uvloop_4loop_UDPTransport *)__pyx_v_udp->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->_on_receive(__pyx_v_udp, __pyx_v_data, Py_None, __pyx_v_pyaddr); if (unlikely(!__pyx_t_8)) __PYX_ERR(23, 358, __pyx_L29_error)
  128168. __Pyx_GOTREF(__pyx_t_8);
  128169. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  128170. /* "uvloop/handles/udp.pyx":357
  128171. * data = loop._recv_buffer[:nread]
  128172. *
  128173. * try: # <<<<<<<<<<<<<<
  128174. * udp._on_receive(data, None, pyaddr)
  128175. * except BaseException as exc:
  128176. */
  128177. }
  128178. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  128179. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  128180. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  128181. goto __pyx_L34_try_end;
  128182. __pyx_L29_error:;
  128183. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  128184. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  128185. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  128186. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  128187. /* "uvloop/handles/udp.pyx":359
  128188. * try:
  128189. * udp._on_receive(data, None, pyaddr)
  128190. * except BaseException as exc: # <<<<<<<<<<<<<<
  128191. * udp._error(exc, False)
  128192. *
  128193. */
  128194. __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_BaseException);
  128195. if (__pyx_t_11) {
  128196. __Pyx_AddTraceback("uvloop.loop.__uv_udp_on_receive", __pyx_clineno, __pyx_lineno, __pyx_filename);
  128197. if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_9, &__pyx_t_2) < 0) __PYX_ERR(23, 359, __pyx_L31_except_error)
  128198. __Pyx_GOTREF(__pyx_t_8);
  128199. __Pyx_GOTREF(__pyx_t_9);
  128200. __Pyx_GOTREF(__pyx_t_2);
  128201. __Pyx_INCREF(__pyx_t_9);
  128202. __pyx_v_exc = __pyx_t_9;
  128203. /*try:*/ {
  128204. /* "uvloop/handles/udp.pyx":360
  128205. * udp._on_receive(data, None, pyaddr)
  128206. * except BaseException as exc:
  128207. * udp._error(exc, False) # <<<<<<<<<<<<<<
  128208. *
  128209. *
  128210. */
  128211. __pyx_t_10 = ((struct __pyx_vtabstruct_6uvloop_4loop_UDPTransport *)__pyx_v_udp->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_udp), __pyx_v_exc, Py_False); if (unlikely(!__pyx_t_10)) __PYX_ERR(23, 360, __pyx_L40_error)
  128212. __Pyx_GOTREF(__pyx_t_10);
  128213. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  128214. }
  128215. /* "uvloop/handles/udp.pyx":359
  128216. * try:
  128217. * udp._on_receive(data, None, pyaddr)
  128218. * except BaseException as exc: # <<<<<<<<<<<<<<
  128219. * udp._error(exc, False)
  128220. *
  128221. */
  128222. /*finally:*/ {
  128223. /*normal exit:*/{
  128224. __Pyx_DECREF(__pyx_v_exc);
  128225. __pyx_v_exc = NULL;
  128226. goto __pyx_L41;
  128227. }
  128228. __pyx_L40_error:;
  128229. /*exception exit:*/{
  128230. __Pyx_PyThreadState_declare
  128231. __Pyx_PyThreadState_assign
  128232. __pyx_t_18 = 0; __pyx_t_17 = 0; __pyx_t_16 = 0; __pyx_t_15 = 0; __pyx_t_14 = 0; __pyx_t_13 = 0;
  128233. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  128234. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13);
  128235. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_18, &__pyx_t_17, &__pyx_t_16) < 0)) __Pyx_ErrFetch(&__pyx_t_18, &__pyx_t_17, &__pyx_t_16);
  128236. __Pyx_XGOTREF(__pyx_t_18);
  128237. __Pyx_XGOTREF(__pyx_t_17);
  128238. __Pyx_XGOTREF(__pyx_t_16);
  128239. __Pyx_XGOTREF(__pyx_t_15);
  128240. __Pyx_XGOTREF(__pyx_t_14);
  128241. __Pyx_XGOTREF(__pyx_t_13);
  128242. __pyx_t_11 = __pyx_lineno; __pyx_t_7 = __pyx_clineno; __pyx_t_19 = __pyx_filename;
  128243. {
  128244. __Pyx_DECREF(__pyx_v_exc);
  128245. __pyx_v_exc = NULL;
  128246. }
  128247. if (PY_MAJOR_VERSION >= 3) {
  128248. __Pyx_XGIVEREF(__pyx_t_15);
  128249. __Pyx_XGIVEREF(__pyx_t_14);
  128250. __Pyx_XGIVEREF(__pyx_t_13);
  128251. __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_14, __pyx_t_13);
  128252. }
  128253. __Pyx_XGIVEREF(__pyx_t_18);
  128254. __Pyx_XGIVEREF(__pyx_t_17);
  128255. __Pyx_XGIVEREF(__pyx_t_16);
  128256. __Pyx_ErrRestore(__pyx_t_18, __pyx_t_17, __pyx_t_16);
  128257. __pyx_t_18 = 0; __pyx_t_17 = 0; __pyx_t_16 = 0; __pyx_t_15 = 0; __pyx_t_14 = 0; __pyx_t_13 = 0;
  128258. __pyx_lineno = __pyx_t_11; __pyx_clineno = __pyx_t_7; __pyx_filename = __pyx_t_19;
  128259. goto __pyx_L31_except_error;
  128260. }
  128261. __pyx_L41:;
  128262. }
  128263. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  128264. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  128265. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  128266. goto __pyx_L30_exception_handled;
  128267. }
  128268. goto __pyx_L31_except_error;
  128269. __pyx_L31_except_error:;
  128270. /* "uvloop/handles/udp.pyx":357
  128271. * data = loop._recv_buffer[:nread]
  128272. *
  128273. * try: # <<<<<<<<<<<<<<
  128274. * udp._on_receive(data, None, pyaddr)
  128275. * except BaseException as exc:
  128276. */
  128277. __Pyx_XGIVEREF(__pyx_t_6);
  128278. __Pyx_XGIVEREF(__pyx_t_5);
  128279. __Pyx_XGIVEREF(__pyx_t_4);
  128280. __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_5, __pyx_t_4);
  128281. goto __pyx_L1_error;
  128282. __pyx_L30_exception_handled:;
  128283. __Pyx_XGIVEREF(__pyx_t_6);
  128284. __Pyx_XGIVEREF(__pyx_t_5);
  128285. __Pyx_XGIVEREF(__pyx_t_4);
  128286. __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_5, __pyx_t_4);
  128287. __pyx_L34_try_end:;
  128288. }
  128289. /* "uvloop/handles/udp.pyx":292
  128290. *
  128291. *
  128292. * cdef void __uv_udp_on_receive(uv.uv_udp_t* handle, # <<<<<<<<<<<<<<
  128293. * ssize_t nread,
  128294. * const uv.uv_buf_t* buf,
  128295. */
  128296. /* function exit code */
  128297. goto __pyx_L0;
  128298. __pyx_L1_error:;
  128299. __Pyx_XDECREF(__pyx_t_2);
  128300. __Pyx_XDECREF(__pyx_t_8);
  128301. __Pyx_XDECREF(__pyx_t_9);
  128302. __Pyx_XDECREF(__pyx_t_10);
  128303. __Pyx_WriteUnraisable("uvloop.loop.__uv_udp_on_receive", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  128304. __pyx_L0:;
  128305. __Pyx_XDECREF((PyObject *)__pyx_v_udp);
  128306. __Pyx_XDECREF((PyObject *)__pyx_v_loop);
  128307. __Pyx_XDECREF(__pyx_v_data);
  128308. __Pyx_XDECREF(__pyx_v_pyaddr);
  128309. __Pyx_XDECREF(__pyx_v_exc);
  128310. __Pyx_RefNannyFinishContext();
  128311. #ifdef WITH_THREAD
  128312. __Pyx_PyGILState_Release(__pyx_gilstate_save);
  128313. #endif
  128314. }
  128315. /* "uvloop/handles/udp.pyx":363
  128316. *
  128317. *
  128318. * cdef void __uv_udp_on_send(uv.uv_udp_send_t* req, int status) with gil: # <<<<<<<<<<<<<<
  128319. *
  128320. * if req.data is NULL:
  128321. */
  128322. static void __pyx_f_6uvloop_4loop___uv_udp_on_send(uv_udp_send_t *__pyx_v_req, int __pyx_v_status) {
  128323. struct __pyx_obj_6uvloop_4loop__UDPSendContext *__pyx_v_ctx = 0;
  128324. struct __pyx_obj_6uvloop_4loop_UDPTransport *__pyx_v_udp = 0;
  128325. PyObject *__pyx_v_exc = NULL;
  128326. __Pyx_RefNannyDeclarations
  128327. int __pyx_t_1;
  128328. PyObject *__pyx_t_2 = NULL;
  128329. PyObject *__pyx_t_3 = NULL;
  128330. PyObject *__pyx_t_4 = NULL;
  128331. PyObject *__pyx_t_5 = NULL;
  128332. int __pyx_t_6;
  128333. PyObject *__pyx_t_7 = NULL;
  128334. PyObject *__pyx_t_8 = NULL;
  128335. PyObject *__pyx_t_9 = NULL;
  128336. PyObject *__pyx_t_10 = NULL;
  128337. int __pyx_t_11;
  128338. char const *__pyx_t_12;
  128339. PyObject *__pyx_t_13 = NULL;
  128340. PyObject *__pyx_t_14 = NULL;
  128341. PyObject *__pyx_t_15 = NULL;
  128342. PyObject *__pyx_t_16 = NULL;
  128343. PyObject *__pyx_t_17 = NULL;
  128344. PyObject *__pyx_t_18 = NULL;
  128345. #ifdef WITH_THREAD
  128346. PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  128347. #endif
  128348. __Pyx_RefNannySetupContext("__uv_udp_on_send", 0);
  128349. /* "uvloop/handles/udp.pyx":365
  128350. * cdef void __uv_udp_on_send(uv.uv_udp_send_t* req, int status) with gil:
  128351. *
  128352. * if req.data is NULL: # <<<<<<<<<<<<<<
  128353. * # Shouldn't happen as:
  128354. * # - _UDPSendContext does an extra INCREF in its 'init()'
  128355. */
  128356. __pyx_t_1 = ((__pyx_v_req->data == NULL) != 0);
  128357. if (__pyx_t_1) {
  128358. /* "uvloop/handles/udp.pyx":369
  128359. * # - _UDPSendContext does an extra INCREF in its 'init()'
  128360. * # - _UDPSendContext holds a ref to the relevant UDPTransport
  128361. * aio_logger.error( # <<<<<<<<<<<<<<
  128362. * 'UVStream.write callback called with NULL req.data, status=%r',
  128363. * status)
  128364. */
  128365. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_6uvloop_4loop_aio_logger, __pyx_n_s_error); if (unlikely(!__pyx_t_3)) __PYX_ERR(23, 369, __pyx_L1_error)
  128366. __Pyx_GOTREF(__pyx_t_3);
  128367. /* "uvloop/handles/udp.pyx":371
  128368. * aio_logger.error(
  128369. * 'UVStream.write callback called with NULL req.data, status=%r',
  128370. * status) # <<<<<<<<<<<<<<
  128371. * return
  128372. *
  128373. */
  128374. __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_4)) __PYX_ERR(23, 371, __pyx_L1_error)
  128375. __Pyx_GOTREF(__pyx_t_4);
  128376. __pyx_t_5 = NULL;
  128377. __pyx_t_6 = 0;
  128378. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
  128379. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
  128380. if (likely(__pyx_t_5)) {
  128381. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  128382. __Pyx_INCREF(__pyx_t_5);
  128383. __Pyx_INCREF(function);
  128384. __Pyx_DECREF_SET(__pyx_t_3, function);
  128385. __pyx_t_6 = 1;
  128386. }
  128387. }
  128388. #if CYTHON_FAST_PYCALL
  128389. if (PyFunction_Check(__pyx_t_3)) {
  128390. PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_kp_u_UVStream_write_callback_called_w, __pyx_t_4};
  128391. __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(23, 369, __pyx_L1_error)
  128392. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  128393. __Pyx_GOTREF(__pyx_t_2);
  128394. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  128395. } else
  128396. #endif
  128397. #if CYTHON_FAST_PYCCALL
  128398. if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
  128399. PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_kp_u_UVStream_write_callback_called_w, __pyx_t_4};
  128400. __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(23, 369, __pyx_L1_error)
  128401. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  128402. __Pyx_GOTREF(__pyx_t_2);
  128403. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  128404. } else
  128405. #endif
  128406. {
  128407. __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(23, 369, __pyx_L1_error)
  128408. __Pyx_GOTREF(__pyx_t_7);
  128409. if (__pyx_t_5) {
  128410. __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
  128411. }
  128412. __Pyx_INCREF(__pyx_kp_u_UVStream_write_callback_called_w);
  128413. __Pyx_GIVEREF(__pyx_kp_u_UVStream_write_callback_called_w);
  128414. PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_kp_u_UVStream_write_callback_called_w);
  128415. __Pyx_GIVEREF(__pyx_t_4);
  128416. PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_4);
  128417. __pyx_t_4 = 0;
  128418. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(23, 369, __pyx_L1_error)
  128419. __Pyx_GOTREF(__pyx_t_2);
  128420. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  128421. }
  128422. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  128423. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  128424. /* "uvloop/handles/udp.pyx":372
  128425. * 'UVStream.write callback called with NULL req.data, status=%r',
  128426. * status)
  128427. * return # <<<<<<<<<<<<<<
  128428. *
  128429. * cdef:
  128430. */
  128431. goto __pyx_L0;
  128432. /* "uvloop/handles/udp.pyx":365
  128433. * cdef void __uv_udp_on_send(uv.uv_udp_send_t* req, int status) with gil:
  128434. *
  128435. * if req.data is NULL: # <<<<<<<<<<<<<<
  128436. * # Shouldn't happen as:
  128437. * # - _UDPSendContext does an extra INCREF in its 'init()'
  128438. */
  128439. }
  128440. /* "uvloop/handles/udp.pyx":375
  128441. *
  128442. * cdef:
  128443. * _UDPSendContext ctx = <_UDPSendContext> req.data # <<<<<<<<<<<<<<
  128444. * UDPTransport udp = <UDPTransport>ctx.udp
  128445. *
  128446. */
  128447. __pyx_t_2 = ((PyObject *)__pyx_v_req->data);
  128448. __Pyx_INCREF(__pyx_t_2);
  128449. __pyx_v_ctx = ((struct __pyx_obj_6uvloop_4loop__UDPSendContext *)__pyx_t_2);
  128450. __pyx_t_2 = 0;
  128451. /* "uvloop/handles/udp.pyx":376
  128452. * cdef:
  128453. * _UDPSendContext ctx = <_UDPSendContext> req.data
  128454. * UDPTransport udp = <UDPTransport>ctx.udp # <<<<<<<<<<<<<<
  128455. *
  128456. * ctx.close()
  128457. */
  128458. __pyx_t_2 = ((PyObject *)__pyx_v_ctx->udp);
  128459. __Pyx_INCREF(__pyx_t_2);
  128460. __pyx_v_udp = ((struct __pyx_obj_6uvloop_4loop_UDPTransport *)__pyx_t_2);
  128461. __pyx_t_2 = 0;
  128462. /* "uvloop/handles/udp.pyx":378
  128463. * UDPTransport udp = <UDPTransport>ctx.udp
  128464. *
  128465. * ctx.close() # <<<<<<<<<<<<<<
  128466. *
  128467. * if status < 0:
  128468. */
  128469. __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop__UDPSendContext *)__pyx_v_ctx->__pyx_vtab)->close(__pyx_v_ctx); if (unlikely(!__pyx_t_2)) __PYX_ERR(23, 378, __pyx_L1_error)
  128470. __Pyx_GOTREF(__pyx_t_2);
  128471. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  128472. /* "uvloop/handles/udp.pyx":380
  128473. * ctx.close()
  128474. *
  128475. * if status < 0: # <<<<<<<<<<<<<<
  128476. * exc = convert_error(status)
  128477. * print(exc)
  128478. */
  128479. __pyx_t_1 = ((__pyx_v_status < 0) != 0);
  128480. if (__pyx_t_1) {
  128481. /* "uvloop/handles/udp.pyx":381
  128482. *
  128483. * if status < 0:
  128484. * exc = convert_error(status) # <<<<<<<<<<<<<<
  128485. * print(exc)
  128486. * else:
  128487. */
  128488. __pyx_t_2 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_status); if (unlikely(!__pyx_t_2)) __PYX_ERR(23, 381, __pyx_L1_error)
  128489. __Pyx_GOTREF(__pyx_t_2);
  128490. __pyx_v_exc = __pyx_t_2;
  128491. __pyx_t_2 = 0;
  128492. /* "uvloop/handles/udp.pyx":382
  128493. * if status < 0:
  128494. * exc = convert_error(status)
  128495. * print(exc) # <<<<<<<<<<<<<<
  128496. * else:
  128497. * exc = None
  128498. */
  128499. __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_v_exc); if (unlikely(!__pyx_t_2)) __PYX_ERR(23, 382, __pyx_L1_error)
  128500. __Pyx_GOTREF(__pyx_t_2);
  128501. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  128502. /* "uvloop/handles/udp.pyx":380
  128503. * ctx.close()
  128504. *
  128505. * if status < 0: # <<<<<<<<<<<<<<
  128506. * exc = convert_error(status)
  128507. * print(exc)
  128508. */
  128509. goto __pyx_L4;
  128510. }
  128511. /* "uvloop/handles/udp.pyx":384
  128512. * print(exc)
  128513. * else:
  128514. * exc = None # <<<<<<<<<<<<<<
  128515. *
  128516. * try:
  128517. */
  128518. /*else*/ {
  128519. __Pyx_INCREF(Py_None);
  128520. __pyx_v_exc = Py_None;
  128521. }
  128522. __pyx_L4:;
  128523. /* "uvloop/handles/udp.pyx":386
  128524. * exc = None
  128525. *
  128526. * try: # <<<<<<<<<<<<<<
  128527. * udp._on_sent(exc)
  128528. * except BaseException as exc:
  128529. */
  128530. {
  128531. __Pyx_PyThreadState_declare
  128532. __Pyx_PyThreadState_assign
  128533. __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
  128534. __Pyx_XGOTREF(__pyx_t_8);
  128535. __Pyx_XGOTREF(__pyx_t_9);
  128536. __Pyx_XGOTREF(__pyx_t_10);
  128537. /*try:*/ {
  128538. /* "uvloop/handles/udp.pyx":387
  128539. *
  128540. * try:
  128541. * udp._on_sent(exc) # <<<<<<<<<<<<<<
  128542. * except BaseException as exc:
  128543. * udp._error(exc, False)
  128544. */
  128545. __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_UDPTransport *)__pyx_v_udp->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->_on_sent(__pyx_v_udp, __pyx_v_exc); if (unlikely(!__pyx_t_2)) __PYX_ERR(23, 387, __pyx_L5_error)
  128546. __Pyx_GOTREF(__pyx_t_2);
  128547. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  128548. /* "uvloop/handles/udp.pyx":386
  128549. * exc = None
  128550. *
  128551. * try: # <<<<<<<<<<<<<<
  128552. * udp._on_sent(exc)
  128553. * except BaseException as exc:
  128554. */
  128555. }
  128556. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  128557. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  128558. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  128559. goto __pyx_L10_try_end;
  128560. __pyx_L5_error:;
  128561. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  128562. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  128563. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  128564. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  128565. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  128566. /* "uvloop/handles/udp.pyx":388
  128567. * try:
  128568. * udp._on_sent(exc)
  128569. * except BaseException as exc: # <<<<<<<<<<<<<<
  128570. * udp._error(exc, False)
  128571. */
  128572. __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_BaseException);
  128573. if (__pyx_t_6) {
  128574. __Pyx_AddTraceback("uvloop.loop.__uv_udp_on_send", __pyx_clineno, __pyx_lineno, __pyx_filename);
  128575. if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_3, &__pyx_t_7) < 0) __PYX_ERR(23, 388, __pyx_L7_except_error)
  128576. __Pyx_GOTREF(__pyx_t_2);
  128577. __Pyx_GOTREF(__pyx_t_3);
  128578. __Pyx_GOTREF(__pyx_t_7);
  128579. __Pyx_INCREF(__pyx_t_3);
  128580. __Pyx_DECREF_SET(__pyx_v_exc, __pyx_t_3);
  128581. /*try:*/ {
  128582. /* "uvloop/handles/udp.pyx":389
  128583. * udp._on_sent(exc)
  128584. * except BaseException as exc:
  128585. * udp._error(exc, False) # <<<<<<<<<<<<<<
  128586. */
  128587. __pyx_t_4 = ((struct __pyx_vtabstruct_6uvloop_4loop_UDPTransport *)__pyx_v_udp->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_udp), __pyx_v_exc, Py_False); if (unlikely(!__pyx_t_4)) __PYX_ERR(23, 389, __pyx_L16_error)
  128588. __Pyx_GOTREF(__pyx_t_4);
  128589. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  128590. }
  128591. /* "uvloop/handles/udp.pyx":388
  128592. * try:
  128593. * udp._on_sent(exc)
  128594. * except BaseException as exc: # <<<<<<<<<<<<<<
  128595. * udp._error(exc, False)
  128596. */
  128597. /*finally:*/ {
  128598. /*normal exit:*/{
  128599. __Pyx_DECREF(__pyx_v_exc);
  128600. __pyx_v_exc = NULL;
  128601. goto __pyx_L17;
  128602. }
  128603. __pyx_L16_error:;
  128604. /*exception exit:*/{
  128605. __Pyx_PyThreadState_declare
  128606. __Pyx_PyThreadState_assign
  128607. __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0;
  128608. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  128609. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  128610. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18);
  128611. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15) < 0)) __Pyx_ErrFetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
  128612. __Pyx_XGOTREF(__pyx_t_13);
  128613. __Pyx_XGOTREF(__pyx_t_14);
  128614. __Pyx_XGOTREF(__pyx_t_15);
  128615. __Pyx_XGOTREF(__pyx_t_16);
  128616. __Pyx_XGOTREF(__pyx_t_17);
  128617. __Pyx_XGOTREF(__pyx_t_18);
  128618. __pyx_t_6 = __pyx_lineno; __pyx_t_11 = __pyx_clineno; __pyx_t_12 = __pyx_filename;
  128619. {
  128620. __Pyx_DECREF(__pyx_v_exc);
  128621. __pyx_v_exc = NULL;
  128622. }
  128623. if (PY_MAJOR_VERSION >= 3) {
  128624. __Pyx_XGIVEREF(__pyx_t_16);
  128625. __Pyx_XGIVEREF(__pyx_t_17);
  128626. __Pyx_XGIVEREF(__pyx_t_18);
  128627. __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18);
  128628. }
  128629. __Pyx_XGIVEREF(__pyx_t_13);
  128630. __Pyx_XGIVEREF(__pyx_t_14);
  128631. __Pyx_XGIVEREF(__pyx_t_15);
  128632. __Pyx_ErrRestore(__pyx_t_13, __pyx_t_14, __pyx_t_15);
  128633. __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0;
  128634. __pyx_lineno = __pyx_t_6; __pyx_clineno = __pyx_t_11; __pyx_filename = __pyx_t_12;
  128635. goto __pyx_L7_except_error;
  128636. }
  128637. __pyx_L17:;
  128638. }
  128639. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  128640. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  128641. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  128642. goto __pyx_L6_exception_handled;
  128643. }
  128644. goto __pyx_L7_except_error;
  128645. __pyx_L7_except_error:;
  128646. /* "uvloop/handles/udp.pyx":386
  128647. * exc = None
  128648. *
  128649. * try: # <<<<<<<<<<<<<<
  128650. * udp._on_sent(exc)
  128651. * except BaseException as exc:
  128652. */
  128653. __Pyx_XGIVEREF(__pyx_t_8);
  128654. __Pyx_XGIVEREF(__pyx_t_9);
  128655. __Pyx_XGIVEREF(__pyx_t_10);
  128656. __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
  128657. goto __pyx_L1_error;
  128658. __pyx_L6_exception_handled:;
  128659. __Pyx_XGIVEREF(__pyx_t_8);
  128660. __Pyx_XGIVEREF(__pyx_t_9);
  128661. __Pyx_XGIVEREF(__pyx_t_10);
  128662. __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
  128663. __pyx_L10_try_end:;
  128664. }
  128665. /* "uvloop/handles/udp.pyx":363
  128666. *
  128667. *
  128668. * cdef void __uv_udp_on_send(uv.uv_udp_send_t* req, int status) with gil: # <<<<<<<<<<<<<<
  128669. *
  128670. * if req.data is NULL:
  128671. */
  128672. /* function exit code */
  128673. goto __pyx_L0;
  128674. __pyx_L1_error:;
  128675. __Pyx_XDECREF(__pyx_t_2);
  128676. __Pyx_XDECREF(__pyx_t_3);
  128677. __Pyx_XDECREF(__pyx_t_4);
  128678. __Pyx_XDECREF(__pyx_t_5);
  128679. __Pyx_XDECREF(__pyx_t_7);
  128680. __Pyx_WriteUnraisable("uvloop.loop.__uv_udp_on_send", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  128681. __pyx_L0:;
  128682. __Pyx_XDECREF((PyObject *)__pyx_v_ctx);
  128683. __Pyx_XDECREF((PyObject *)__pyx_v_udp);
  128684. __Pyx_XDECREF(__pyx_v_exc);
  128685. __Pyx_RefNannyFinishContext();
  128686. #ifdef WITH_THREAD
  128687. __Pyx_PyGILState_Release(__pyx_gilstate_save);
  128688. #endif
  128689. }
  128690. /* "uvloop/server.pyx":5
  128691. *
  128692. * cdef class Server:
  128693. * def __cinit__(self, Loop loop): # <<<<<<<<<<<<<<
  128694. * self._loop = loop
  128695. * self._servers = []
  128696. */
  128697. /* Python wrapper */
  128698. static int __pyx_pw_6uvloop_4loop_6Server_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  128699. static int __pyx_pw_6uvloop_4loop_6Server_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  128700. struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop = 0;
  128701. int __pyx_r;
  128702. __Pyx_RefNannyDeclarations
  128703. __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  128704. {
  128705. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_loop,0};
  128706. PyObject* values[1] = {0};
  128707. if (unlikely(__pyx_kwds)) {
  128708. Py_ssize_t kw_args;
  128709. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  128710. switch (pos_args) {
  128711. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  128712. CYTHON_FALLTHROUGH;
  128713. case 0: break;
  128714. default: goto __pyx_L5_argtuple_error;
  128715. }
  128716. kw_args = PyDict_Size(__pyx_kwds);
  128717. switch (pos_args) {
  128718. case 0:
  128719. if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_loop)) != 0)) kw_args--;
  128720. else goto __pyx_L5_argtuple_error;
  128721. }
  128722. if (unlikely(kw_args > 0)) {
  128723. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(24, 5, __pyx_L3_error)
  128724. }
  128725. } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
  128726. goto __pyx_L5_argtuple_error;
  128727. } else {
  128728. values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  128729. }
  128730. __pyx_v_loop = ((struct __pyx_obj_6uvloop_4loop_Loop *)values[0]);
  128731. }
  128732. goto __pyx_L4_argument_unpacking_done;
  128733. __pyx_L5_argtuple_error:;
  128734. __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(24, 5, __pyx_L3_error)
  128735. __pyx_L3_error:;
  128736. __Pyx_AddTraceback("uvloop.loop.Server.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  128737. __Pyx_RefNannyFinishContext();
  128738. return -1;
  128739. __pyx_L4_argument_unpacking_done:;
  128740. if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_loop), __pyx_ptype_6uvloop_4loop_Loop, 1, "loop", 0))) __PYX_ERR(24, 5, __pyx_L1_error)
  128741. __pyx_r = __pyx_pf_6uvloop_4loop_6Server___cinit__(((struct __pyx_obj_6uvloop_4loop_Server *)__pyx_v_self), __pyx_v_loop);
  128742. /* function exit code */
  128743. goto __pyx_L0;
  128744. __pyx_L1_error:;
  128745. __pyx_r = -1;
  128746. __pyx_L0:;
  128747. __Pyx_RefNannyFinishContext();
  128748. return __pyx_r;
  128749. }
  128750. static int __pyx_pf_6uvloop_4loop_6Server___cinit__(struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop) {
  128751. int __pyx_r;
  128752. __Pyx_RefNannyDeclarations
  128753. PyObject *__pyx_t_1 = NULL;
  128754. __Pyx_RefNannySetupContext("__cinit__", 0);
  128755. /* "uvloop/server.pyx":6
  128756. * cdef class Server:
  128757. * def __cinit__(self, Loop loop):
  128758. * self._loop = loop # <<<<<<<<<<<<<<
  128759. * self._servers = []
  128760. * self._waiters = []
  128761. */
  128762. __Pyx_INCREF(((PyObject *)__pyx_v_loop));
  128763. __Pyx_GIVEREF(((PyObject *)__pyx_v_loop));
  128764. __Pyx_GOTREF(__pyx_v_self->_loop);
  128765. __Pyx_DECREF(((PyObject *)__pyx_v_self->_loop));
  128766. __pyx_v_self->_loop = __pyx_v_loop;
  128767. /* "uvloop/server.pyx":7
  128768. * def __cinit__(self, Loop loop):
  128769. * self._loop = loop
  128770. * self._servers = [] # <<<<<<<<<<<<<<
  128771. * self._waiters = []
  128772. * self._active_count = 0
  128773. */
  128774. __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(24, 7, __pyx_L1_error)
  128775. __Pyx_GOTREF(__pyx_t_1);
  128776. __Pyx_GIVEREF(__pyx_t_1);
  128777. __Pyx_GOTREF(__pyx_v_self->_servers);
  128778. __Pyx_DECREF(__pyx_v_self->_servers);
  128779. __pyx_v_self->_servers = ((PyObject*)__pyx_t_1);
  128780. __pyx_t_1 = 0;
  128781. /* "uvloop/server.pyx":8
  128782. * self._loop = loop
  128783. * self._servers = []
  128784. * self._waiters = [] # <<<<<<<<<<<<<<
  128785. * self._active_count = 0
  128786. * self._serving_forever_fut = None
  128787. */
  128788. __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(24, 8, __pyx_L1_error)
  128789. __Pyx_GOTREF(__pyx_t_1);
  128790. __Pyx_GIVEREF(__pyx_t_1);
  128791. __Pyx_GOTREF(__pyx_v_self->_waiters);
  128792. __Pyx_DECREF(__pyx_v_self->_waiters);
  128793. __pyx_v_self->_waiters = ((PyObject*)__pyx_t_1);
  128794. __pyx_t_1 = 0;
  128795. /* "uvloop/server.pyx":9
  128796. * self._servers = []
  128797. * self._waiters = []
  128798. * self._active_count = 0 # <<<<<<<<<<<<<<
  128799. * self._serving_forever_fut = None
  128800. *
  128801. */
  128802. __pyx_v_self->_active_count = 0;
  128803. /* "uvloop/server.pyx":10
  128804. * self._waiters = []
  128805. * self._active_count = 0
  128806. * self._serving_forever_fut = None # <<<<<<<<<<<<<<
  128807. *
  128808. * cdef _add_server(self, UVStreamServer srv):
  128809. */
  128810. __Pyx_INCREF(Py_None);
  128811. __Pyx_GIVEREF(Py_None);
  128812. __Pyx_GOTREF(__pyx_v_self->_serving_forever_fut);
  128813. __Pyx_DECREF(__pyx_v_self->_serving_forever_fut);
  128814. __pyx_v_self->_serving_forever_fut = Py_None;
  128815. /* "uvloop/server.pyx":5
  128816. *
  128817. * cdef class Server:
  128818. * def __cinit__(self, Loop loop): # <<<<<<<<<<<<<<
  128819. * self._loop = loop
  128820. * self._servers = []
  128821. */
  128822. /* function exit code */
  128823. __pyx_r = 0;
  128824. goto __pyx_L0;
  128825. __pyx_L1_error:;
  128826. __Pyx_XDECREF(__pyx_t_1);
  128827. __Pyx_AddTraceback("uvloop.loop.Server.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  128828. __pyx_r = -1;
  128829. __pyx_L0:;
  128830. __Pyx_RefNannyFinishContext();
  128831. return __pyx_r;
  128832. }
  128833. /* "uvloop/server.pyx":12
  128834. * self._serving_forever_fut = None
  128835. *
  128836. * cdef _add_server(self, UVStreamServer srv): # <<<<<<<<<<<<<<
  128837. * self._servers.append(srv)
  128838. *
  128839. */
  128840. static PyObject *__pyx_f_6uvloop_4loop_6Server__add_server(struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_UVStreamServer *__pyx_v_srv) {
  128841. PyObject *__pyx_r = NULL;
  128842. __Pyx_RefNannyDeclarations
  128843. int __pyx_t_1;
  128844. __Pyx_RefNannySetupContext("_add_server", 0);
  128845. /* "uvloop/server.pyx":13
  128846. *
  128847. * cdef _add_server(self, UVStreamServer srv):
  128848. * self._servers.append(srv) # <<<<<<<<<<<<<<
  128849. *
  128850. * cdef _start_serving(self):
  128851. */
  128852. if (unlikely(__pyx_v_self->_servers == Py_None)) {
  128853. PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append");
  128854. __PYX_ERR(24, 13, __pyx_L1_error)
  128855. }
  128856. __pyx_t_1 = __Pyx_PyList_Append(__pyx_v_self->_servers, ((PyObject *)__pyx_v_srv)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(24, 13, __pyx_L1_error)
  128857. /* "uvloop/server.pyx":12
  128858. * self._serving_forever_fut = None
  128859. *
  128860. * cdef _add_server(self, UVStreamServer srv): # <<<<<<<<<<<<<<
  128861. * self._servers.append(srv)
  128862. *
  128863. */
  128864. /* function exit code */
  128865. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  128866. goto __pyx_L0;
  128867. __pyx_L1_error:;
  128868. __Pyx_AddTraceback("uvloop.loop.Server._add_server", __pyx_clineno, __pyx_lineno, __pyx_filename);
  128869. __pyx_r = 0;
  128870. __pyx_L0:;
  128871. __Pyx_XGIVEREF(__pyx_r);
  128872. __Pyx_RefNannyFinishContext();
  128873. return __pyx_r;
  128874. }
  128875. /* "uvloop/server.pyx":15
  128876. * self._servers.append(srv)
  128877. *
  128878. * cdef _start_serving(self): # <<<<<<<<<<<<<<
  128879. * if self._serving:
  128880. * return
  128881. */
  128882. static PyObject *__pyx_f_6uvloop_4loop_6Server__start_serving(struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_self) {
  128883. PyObject *__pyx_v_server = NULL;
  128884. PyObject *__pyx_r = NULL;
  128885. __Pyx_RefNannyDeclarations
  128886. int __pyx_t_1;
  128887. PyObject *__pyx_t_2 = NULL;
  128888. Py_ssize_t __pyx_t_3;
  128889. PyObject *__pyx_t_4 = NULL;
  128890. __Pyx_RefNannySetupContext("_start_serving", 0);
  128891. /* "uvloop/server.pyx":16
  128892. *
  128893. * cdef _start_serving(self):
  128894. * if self._serving: # <<<<<<<<<<<<<<
  128895. * return
  128896. *
  128897. */
  128898. __pyx_t_1 = (__pyx_v_self->_serving != 0);
  128899. if (__pyx_t_1) {
  128900. /* "uvloop/server.pyx":17
  128901. * cdef _start_serving(self):
  128902. * if self._serving:
  128903. * return # <<<<<<<<<<<<<<
  128904. *
  128905. * self._serving = 1
  128906. */
  128907. __Pyx_XDECREF(__pyx_r);
  128908. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  128909. goto __pyx_L0;
  128910. /* "uvloop/server.pyx":16
  128911. *
  128912. * cdef _start_serving(self):
  128913. * if self._serving: # <<<<<<<<<<<<<<
  128914. * return
  128915. *
  128916. */
  128917. }
  128918. /* "uvloop/server.pyx":19
  128919. * return
  128920. *
  128921. * self._serving = 1 # <<<<<<<<<<<<<<
  128922. * for server in self._servers:
  128923. * (<UVStreamServer>server).listen()
  128924. */
  128925. __pyx_v_self->_serving = 1;
  128926. /* "uvloop/server.pyx":20
  128927. *
  128928. * self._serving = 1
  128929. * for server in self._servers: # <<<<<<<<<<<<<<
  128930. * (<UVStreamServer>server).listen()
  128931. *
  128932. */
  128933. if (unlikely(__pyx_v_self->_servers == Py_None)) {
  128934. PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
  128935. __PYX_ERR(24, 20, __pyx_L1_error)
  128936. }
  128937. __pyx_t_2 = __pyx_v_self->_servers; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
  128938. for (;;) {
  128939. if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
  128940. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  128941. __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(24, 20, __pyx_L1_error)
  128942. #else
  128943. __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) __PYX_ERR(24, 20, __pyx_L1_error)
  128944. __Pyx_GOTREF(__pyx_t_4);
  128945. #endif
  128946. __Pyx_XDECREF_SET(__pyx_v_server, __pyx_t_4);
  128947. __pyx_t_4 = 0;
  128948. /* "uvloop/server.pyx":21
  128949. * self._serving = 1
  128950. * for server in self._servers:
  128951. * (<UVStreamServer>server).listen() # <<<<<<<<<<<<<<
  128952. *
  128953. * cdef _wakeup(self):
  128954. */
  128955. __pyx_t_4 = __pyx_f_6uvloop_4loop_14UVStreamServer_listen(((struct __pyx_obj_6uvloop_4loop_UVStreamServer *)__pyx_v_server)); if (unlikely(!__pyx_t_4)) __PYX_ERR(24, 21, __pyx_L1_error)
  128956. __Pyx_GOTREF(__pyx_t_4);
  128957. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  128958. /* "uvloop/server.pyx":20
  128959. *
  128960. * self._serving = 1
  128961. * for server in self._servers: # <<<<<<<<<<<<<<
  128962. * (<UVStreamServer>server).listen()
  128963. *
  128964. */
  128965. }
  128966. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  128967. /* "uvloop/server.pyx":15
  128968. * self._servers.append(srv)
  128969. *
  128970. * cdef _start_serving(self): # <<<<<<<<<<<<<<
  128971. * if self._serving:
  128972. * return
  128973. */
  128974. /* function exit code */
  128975. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  128976. goto __pyx_L0;
  128977. __pyx_L1_error:;
  128978. __Pyx_XDECREF(__pyx_t_2);
  128979. __Pyx_XDECREF(__pyx_t_4);
  128980. __Pyx_AddTraceback("uvloop.loop.Server._start_serving", __pyx_clineno, __pyx_lineno, __pyx_filename);
  128981. __pyx_r = 0;
  128982. __pyx_L0:;
  128983. __Pyx_XDECREF(__pyx_v_server);
  128984. __Pyx_XGIVEREF(__pyx_r);
  128985. __Pyx_RefNannyFinishContext();
  128986. return __pyx_r;
  128987. }
  128988. /* "uvloop/server.pyx":23
  128989. * (<UVStreamServer>server).listen()
  128990. *
  128991. * cdef _wakeup(self): # <<<<<<<<<<<<<<
  128992. * cdef list waiters
  128993. *
  128994. */
  128995. static PyObject *__pyx_f_6uvloop_4loop_6Server__wakeup(struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_self) {
  128996. PyObject *__pyx_v_waiters = 0;
  128997. PyObject *__pyx_v_waiter = NULL;
  128998. PyObject *__pyx_r = NULL;
  128999. __Pyx_RefNannyDeclarations
  129000. PyObject *__pyx_t_1 = NULL;
  129001. Py_ssize_t __pyx_t_2;
  129002. PyObject *__pyx_t_3 = NULL;
  129003. PyObject *__pyx_t_4 = NULL;
  129004. PyObject *__pyx_t_5 = NULL;
  129005. int __pyx_t_6;
  129006. int __pyx_t_7;
  129007. __Pyx_RefNannySetupContext("_wakeup", 0);
  129008. /* "uvloop/server.pyx":26
  129009. * cdef list waiters
  129010. *
  129011. * waiters = self._waiters # <<<<<<<<<<<<<<
  129012. * self._waiters = None
  129013. * for waiter in waiters:
  129014. */
  129015. __pyx_t_1 = __pyx_v_self->_waiters;
  129016. __Pyx_INCREF(__pyx_t_1);
  129017. __pyx_v_waiters = ((PyObject*)__pyx_t_1);
  129018. __pyx_t_1 = 0;
  129019. /* "uvloop/server.pyx":27
  129020. *
  129021. * waiters = self._waiters
  129022. * self._waiters = None # <<<<<<<<<<<<<<
  129023. * for waiter in waiters:
  129024. * if not waiter.done():
  129025. */
  129026. __Pyx_INCREF(Py_None);
  129027. __Pyx_GIVEREF(Py_None);
  129028. __Pyx_GOTREF(__pyx_v_self->_waiters);
  129029. __Pyx_DECREF(__pyx_v_self->_waiters);
  129030. __pyx_v_self->_waiters = ((PyObject*)Py_None);
  129031. /* "uvloop/server.pyx":28
  129032. * waiters = self._waiters
  129033. * self._waiters = None
  129034. * for waiter in waiters: # <<<<<<<<<<<<<<
  129035. * if not waiter.done():
  129036. * waiter.set_result(waiter)
  129037. */
  129038. if (unlikely(__pyx_v_waiters == Py_None)) {
  129039. PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
  129040. __PYX_ERR(24, 28, __pyx_L1_error)
  129041. }
  129042. __pyx_t_1 = __pyx_v_waiters; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
  129043. for (;;) {
  129044. if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
  129045. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  129046. __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(24, 28, __pyx_L1_error)
  129047. #else
  129048. __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(24, 28, __pyx_L1_error)
  129049. __Pyx_GOTREF(__pyx_t_3);
  129050. #endif
  129051. __Pyx_XDECREF_SET(__pyx_v_waiter, __pyx_t_3);
  129052. __pyx_t_3 = 0;
  129053. /* "uvloop/server.pyx":29
  129054. * self._waiters = None
  129055. * for waiter in waiters:
  129056. * if not waiter.done(): # <<<<<<<<<<<<<<
  129057. * waiter.set_result(waiter)
  129058. *
  129059. */
  129060. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_waiter, __pyx_n_s_done); if (unlikely(!__pyx_t_4)) __PYX_ERR(24, 29, __pyx_L1_error)
  129061. __Pyx_GOTREF(__pyx_t_4);
  129062. __pyx_t_5 = NULL;
  129063. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
  129064. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
  129065. if (likely(__pyx_t_5)) {
  129066. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  129067. __Pyx_INCREF(__pyx_t_5);
  129068. __Pyx_INCREF(function);
  129069. __Pyx_DECREF_SET(__pyx_t_4, function);
  129070. }
  129071. }
  129072. __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
  129073. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  129074. if (unlikely(!__pyx_t_3)) __PYX_ERR(24, 29, __pyx_L1_error)
  129075. __Pyx_GOTREF(__pyx_t_3);
  129076. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  129077. __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(24, 29, __pyx_L1_error)
  129078. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  129079. __pyx_t_7 = ((!__pyx_t_6) != 0);
  129080. if (__pyx_t_7) {
  129081. /* "uvloop/server.pyx":30
  129082. * for waiter in waiters:
  129083. * if not waiter.done():
  129084. * waiter.set_result(waiter) # <<<<<<<<<<<<<<
  129085. *
  129086. * cdef _attach(self):
  129087. */
  129088. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_waiter, __pyx_n_s_set_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(24, 30, __pyx_L1_error)
  129089. __Pyx_GOTREF(__pyx_t_4);
  129090. __pyx_t_5 = NULL;
  129091. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
  129092. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
  129093. if (likely(__pyx_t_5)) {
  129094. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  129095. __Pyx_INCREF(__pyx_t_5);
  129096. __Pyx_INCREF(function);
  129097. __Pyx_DECREF_SET(__pyx_t_4, function);
  129098. }
  129099. }
  129100. __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_waiter) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_waiter);
  129101. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  129102. if (unlikely(!__pyx_t_3)) __PYX_ERR(24, 30, __pyx_L1_error)
  129103. __Pyx_GOTREF(__pyx_t_3);
  129104. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  129105. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  129106. /* "uvloop/server.pyx":29
  129107. * self._waiters = None
  129108. * for waiter in waiters:
  129109. * if not waiter.done(): # <<<<<<<<<<<<<<
  129110. * waiter.set_result(waiter)
  129111. *
  129112. */
  129113. }
  129114. /* "uvloop/server.pyx":28
  129115. * waiters = self._waiters
  129116. * self._waiters = None
  129117. * for waiter in waiters: # <<<<<<<<<<<<<<
  129118. * if not waiter.done():
  129119. * waiter.set_result(waiter)
  129120. */
  129121. }
  129122. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  129123. /* "uvloop/server.pyx":23
  129124. * (<UVStreamServer>server).listen()
  129125. *
  129126. * cdef _wakeup(self): # <<<<<<<<<<<<<<
  129127. * cdef list waiters
  129128. *
  129129. */
  129130. /* function exit code */
  129131. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  129132. goto __pyx_L0;
  129133. __pyx_L1_error:;
  129134. __Pyx_XDECREF(__pyx_t_1);
  129135. __Pyx_XDECREF(__pyx_t_3);
  129136. __Pyx_XDECREF(__pyx_t_4);
  129137. __Pyx_XDECREF(__pyx_t_5);
  129138. __Pyx_AddTraceback("uvloop.loop.Server._wakeup", __pyx_clineno, __pyx_lineno, __pyx_filename);
  129139. __pyx_r = 0;
  129140. __pyx_L0:;
  129141. __Pyx_XDECREF(__pyx_v_waiters);
  129142. __Pyx_XDECREF(__pyx_v_waiter);
  129143. __Pyx_XGIVEREF(__pyx_r);
  129144. __Pyx_RefNannyFinishContext();
  129145. return __pyx_r;
  129146. }
  129147. /* "uvloop/server.pyx":32
  129148. * waiter.set_result(waiter)
  129149. *
  129150. * cdef _attach(self): # <<<<<<<<<<<<<<
  129151. * assert self._servers is not None
  129152. * self._active_count += 1
  129153. */
  129154. static PyObject *__pyx_f_6uvloop_4loop_6Server__attach(struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_self) {
  129155. PyObject *__pyx_r = NULL;
  129156. __Pyx_RefNannyDeclarations
  129157. int __pyx_t_1;
  129158. __Pyx_RefNannySetupContext("_attach", 0);
  129159. /* "uvloop/server.pyx":33
  129160. *
  129161. * cdef _attach(self):
  129162. * assert self._servers is not None # <<<<<<<<<<<<<<
  129163. * self._active_count += 1
  129164. *
  129165. */
  129166. #ifndef CYTHON_WITHOUT_ASSERTIONS
  129167. if (unlikely(!Py_OptimizeFlag)) {
  129168. __pyx_t_1 = (__pyx_v_self->_servers != ((PyObject*)Py_None));
  129169. if (unlikely(!(__pyx_t_1 != 0))) {
  129170. PyErr_SetNone(PyExc_AssertionError);
  129171. __PYX_ERR(24, 33, __pyx_L1_error)
  129172. }
  129173. }
  129174. #endif
  129175. /* "uvloop/server.pyx":34
  129176. * cdef _attach(self):
  129177. * assert self._servers is not None
  129178. * self._active_count += 1 # <<<<<<<<<<<<<<
  129179. *
  129180. * cdef _detach(self):
  129181. */
  129182. __pyx_v_self->_active_count = (__pyx_v_self->_active_count + 1);
  129183. /* "uvloop/server.pyx":32
  129184. * waiter.set_result(waiter)
  129185. *
  129186. * cdef _attach(self): # <<<<<<<<<<<<<<
  129187. * assert self._servers is not None
  129188. * self._active_count += 1
  129189. */
  129190. /* function exit code */
  129191. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  129192. goto __pyx_L0;
  129193. __pyx_L1_error:;
  129194. __Pyx_AddTraceback("uvloop.loop.Server._attach", __pyx_clineno, __pyx_lineno, __pyx_filename);
  129195. __pyx_r = 0;
  129196. __pyx_L0:;
  129197. __Pyx_XGIVEREF(__pyx_r);
  129198. __Pyx_RefNannyFinishContext();
  129199. return __pyx_r;
  129200. }
  129201. /* "uvloop/server.pyx":36
  129202. * self._active_count += 1
  129203. *
  129204. * cdef _detach(self): # <<<<<<<<<<<<<<
  129205. * assert self._active_count > 0
  129206. * self._active_count -= 1
  129207. */
  129208. static PyObject *__pyx_f_6uvloop_4loop_6Server__detach(struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_self) {
  129209. PyObject *__pyx_r = NULL;
  129210. __Pyx_RefNannyDeclarations
  129211. int __pyx_t_1;
  129212. int __pyx_t_2;
  129213. int __pyx_t_3;
  129214. PyObject *__pyx_t_4 = NULL;
  129215. __Pyx_RefNannySetupContext("_detach", 0);
  129216. /* "uvloop/server.pyx":37
  129217. *
  129218. * cdef _detach(self):
  129219. * assert self._active_count > 0 # <<<<<<<<<<<<<<
  129220. * self._active_count -= 1
  129221. * if self._active_count == 0 and self._servers is None:
  129222. */
  129223. #ifndef CYTHON_WITHOUT_ASSERTIONS
  129224. if (unlikely(!Py_OptimizeFlag)) {
  129225. if (unlikely(!((__pyx_v_self->_active_count > 0) != 0))) {
  129226. PyErr_SetNone(PyExc_AssertionError);
  129227. __PYX_ERR(24, 37, __pyx_L1_error)
  129228. }
  129229. }
  129230. #endif
  129231. /* "uvloop/server.pyx":38
  129232. * cdef _detach(self):
  129233. * assert self._active_count > 0
  129234. * self._active_count -= 1 # <<<<<<<<<<<<<<
  129235. * if self._active_count == 0 and self._servers is None:
  129236. * self._wakeup()
  129237. */
  129238. __pyx_v_self->_active_count = (__pyx_v_self->_active_count - 1);
  129239. /* "uvloop/server.pyx":39
  129240. * assert self._active_count > 0
  129241. * self._active_count -= 1
  129242. * if self._active_count == 0 and self._servers is None: # <<<<<<<<<<<<<<
  129243. * self._wakeup()
  129244. *
  129245. */
  129246. __pyx_t_2 = ((__pyx_v_self->_active_count == 0) != 0);
  129247. if (__pyx_t_2) {
  129248. } else {
  129249. __pyx_t_1 = __pyx_t_2;
  129250. goto __pyx_L4_bool_binop_done;
  129251. }
  129252. __pyx_t_2 = (__pyx_v_self->_servers == ((PyObject*)Py_None));
  129253. __pyx_t_3 = (__pyx_t_2 != 0);
  129254. __pyx_t_1 = __pyx_t_3;
  129255. __pyx_L4_bool_binop_done:;
  129256. if (__pyx_t_1) {
  129257. /* "uvloop/server.pyx":40
  129258. * self._active_count -= 1
  129259. * if self._active_count == 0 and self._servers is None:
  129260. * self._wakeup() # <<<<<<<<<<<<<<
  129261. *
  129262. * cdef _ref(self):
  129263. */
  129264. __pyx_t_4 = ((struct __pyx_vtabstruct_6uvloop_4loop_Server *)__pyx_v_self->__pyx_vtab)->_wakeup(__pyx_v_self); if (unlikely(!__pyx_t_4)) __PYX_ERR(24, 40, __pyx_L1_error)
  129265. __Pyx_GOTREF(__pyx_t_4);
  129266. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  129267. /* "uvloop/server.pyx":39
  129268. * assert self._active_count > 0
  129269. * self._active_count -= 1
  129270. * if self._active_count == 0 and self._servers is None: # <<<<<<<<<<<<<<
  129271. * self._wakeup()
  129272. *
  129273. */
  129274. }
  129275. /* "uvloop/server.pyx":36
  129276. * self._active_count += 1
  129277. *
  129278. * cdef _detach(self): # <<<<<<<<<<<<<<
  129279. * assert self._active_count > 0
  129280. * self._active_count -= 1
  129281. */
  129282. /* function exit code */
  129283. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  129284. goto __pyx_L0;
  129285. __pyx_L1_error:;
  129286. __Pyx_XDECREF(__pyx_t_4);
  129287. __Pyx_AddTraceback("uvloop.loop.Server._detach", __pyx_clineno, __pyx_lineno, __pyx_filename);
  129288. __pyx_r = 0;
  129289. __pyx_L0:;
  129290. __Pyx_XGIVEREF(__pyx_r);
  129291. __Pyx_RefNannyFinishContext();
  129292. return __pyx_r;
  129293. }
  129294. /* "uvloop/server.pyx":42
  129295. * self._wakeup()
  129296. *
  129297. * cdef _ref(self): # <<<<<<<<<<<<<<
  129298. * # Keep the server object alive while it's not explicitly closed.
  129299. * self._loop._servers.add(self)
  129300. */
  129301. static PyObject *__pyx_f_6uvloop_4loop_6Server__ref(struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_self) {
  129302. PyObject *__pyx_r = NULL;
  129303. __Pyx_RefNannyDeclarations
  129304. int __pyx_t_1;
  129305. __Pyx_RefNannySetupContext("_ref", 0);
  129306. /* "uvloop/server.pyx":44
  129307. * cdef _ref(self):
  129308. * # Keep the server object alive while it's not explicitly closed.
  129309. * self._loop._servers.add(self) # <<<<<<<<<<<<<<
  129310. *
  129311. * cdef _unref(self):
  129312. */
  129313. if (unlikely(__pyx_v_self->_loop->_servers == Py_None)) {
  129314. PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "add");
  129315. __PYX_ERR(24, 44, __pyx_L1_error)
  129316. }
  129317. __pyx_t_1 = PySet_Add(__pyx_v_self->_loop->_servers, ((PyObject *)__pyx_v_self)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(24, 44, __pyx_L1_error)
  129318. /* "uvloop/server.pyx":42
  129319. * self._wakeup()
  129320. *
  129321. * cdef _ref(self): # <<<<<<<<<<<<<<
  129322. * # Keep the server object alive while it's not explicitly closed.
  129323. * self._loop._servers.add(self)
  129324. */
  129325. /* function exit code */
  129326. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  129327. goto __pyx_L0;
  129328. __pyx_L1_error:;
  129329. __Pyx_AddTraceback("uvloop.loop.Server._ref", __pyx_clineno, __pyx_lineno, __pyx_filename);
  129330. __pyx_r = 0;
  129331. __pyx_L0:;
  129332. __Pyx_XGIVEREF(__pyx_r);
  129333. __Pyx_RefNannyFinishContext();
  129334. return __pyx_r;
  129335. }
  129336. /* "uvloop/server.pyx":46
  129337. * self._loop._servers.add(self)
  129338. *
  129339. * cdef _unref(self): # <<<<<<<<<<<<<<
  129340. * self._loop._servers.discard(self)
  129341. *
  129342. */
  129343. static PyObject *__pyx_f_6uvloop_4loop_6Server__unref(struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_self) {
  129344. PyObject *__pyx_r = NULL;
  129345. __Pyx_RefNannyDeclarations
  129346. int __pyx_t_1;
  129347. __Pyx_RefNannySetupContext("_unref", 0);
  129348. /* "uvloop/server.pyx":47
  129349. *
  129350. * cdef _unref(self):
  129351. * self._loop._servers.discard(self) # <<<<<<<<<<<<<<
  129352. *
  129353. * # Public API
  129354. */
  129355. if (unlikely(__pyx_v_self->_loop->_servers == Py_None)) {
  129356. PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "discard");
  129357. __PYX_ERR(24, 47, __pyx_L1_error)
  129358. }
  129359. __pyx_t_1 = __Pyx_PySet_Discard(__pyx_v_self->_loop->_servers, ((PyObject *)__pyx_v_self)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(24, 47, __pyx_L1_error)
  129360. /* "uvloop/server.pyx":46
  129361. * self._loop._servers.add(self)
  129362. *
  129363. * cdef _unref(self): # <<<<<<<<<<<<<<
  129364. * self._loop._servers.discard(self)
  129365. *
  129366. */
  129367. /* function exit code */
  129368. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  129369. goto __pyx_L0;
  129370. __pyx_L1_error:;
  129371. __Pyx_AddTraceback("uvloop.loop.Server._unref", __pyx_clineno, __pyx_lineno, __pyx_filename);
  129372. __pyx_r = 0;
  129373. __pyx_L0:;
  129374. __Pyx_XGIVEREF(__pyx_r);
  129375. __Pyx_RefNannyFinishContext();
  129376. return __pyx_r;
  129377. }
  129378. static PyObject *__pyx_gb_6uvloop_4loop_6Server_4generator20(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
  129379. /* "uvloop/server.pyx":52
  129380. *
  129381. * @cython.iterable_coroutine
  129382. * async def __aenter__(self): # <<<<<<<<<<<<<<
  129383. * return self
  129384. *
  129385. */
  129386. /* Python wrapper */
  129387. static PyObject *__pyx_pw_6uvloop_4loop_6Server_3__aenter__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  129388. static char __pyx_doc_6uvloop_4loop_6Server_2__aenter__[] = "Server.__aenter__(self)";
  129389. static PyObject *__pyx_pw_6uvloop_4loop_6Server_3__aenter__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  129390. PyObject *__pyx_r = 0;
  129391. __Pyx_RefNannyDeclarations
  129392. __Pyx_RefNannySetupContext("__aenter__ (wrapper)", 0);
  129393. __pyx_r = __pyx_pf_6uvloop_4loop_6Server_2__aenter__(((struct __pyx_obj_6uvloop_4loop_Server *)__pyx_v_self));
  129394. /* function exit code */
  129395. __Pyx_RefNannyFinishContext();
  129396. return __pyx_r;
  129397. }
  129398. static PyObject *__pyx_pf_6uvloop_4loop_6Server_2__aenter__(struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_self) {
  129399. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_32___aenter__ *__pyx_cur_scope;
  129400. PyObject *__pyx_r = NULL;
  129401. __Pyx_RefNannyDeclarations
  129402. __Pyx_RefNannySetupContext("__aenter__", 0);
  129403. __pyx_cur_scope = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_32___aenter__ *)__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_32___aenter__(__pyx_ptype_6uvloop_4loop___pyx_scope_struct_32___aenter__, __pyx_empty_tuple, NULL);
  129404. if (unlikely(!__pyx_cur_scope)) {
  129405. __pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_32___aenter__ *)Py_None);
  129406. __Pyx_INCREF(Py_None);
  129407. __PYX_ERR(24, 52, __pyx_L1_error)
  129408. } else {
  129409. __Pyx_GOTREF(__pyx_cur_scope);
  129410. }
  129411. __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  129412. __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  129413. __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  129414. {
  129415. __pyx_CoroutineObject *gen = __Pyx_IterableCoroutine_New((__pyx_coroutine_body_t) __pyx_gb_6uvloop_4loop_6Server_4generator20, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_aenter, __pyx_n_s_Server___aenter, __pyx_n_s_uvloop_loop); if (unlikely(!gen)) __PYX_ERR(24, 52, __pyx_L1_error)
  129416. __Pyx_DECREF(__pyx_cur_scope);
  129417. __Pyx_RefNannyFinishContext();
  129418. return (PyObject *) gen;
  129419. }
  129420. /* function exit code */
  129421. __pyx_L1_error:;
  129422. __Pyx_AddTraceback("uvloop.loop.Server.__aenter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  129423. __pyx_r = NULL;
  129424. __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  129425. __Pyx_XGIVEREF(__pyx_r);
  129426. __Pyx_RefNannyFinishContext();
  129427. return __pyx_r;
  129428. }
  129429. static PyObject *__pyx_gb_6uvloop_4loop_6Server_4generator20(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
  129430. {
  129431. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_32___aenter__ *__pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_32___aenter__ *)__pyx_generator->closure);
  129432. PyObject *__pyx_r = NULL;
  129433. __Pyx_RefNannyDeclarations
  129434. __Pyx_RefNannySetupContext("__aenter__", 0);
  129435. switch (__pyx_generator->resume_label) {
  129436. case 0: goto __pyx_L3_first_run;
  129437. default: /* CPython raises the right error here */
  129438. __Pyx_RefNannyFinishContext();
  129439. return NULL;
  129440. }
  129441. __pyx_L3_first_run:;
  129442. if (unlikely(!__pyx_sent_value)) __PYX_ERR(24, 52, __pyx_L1_error)
  129443. /* "uvloop/server.pyx":53
  129444. * @cython.iterable_coroutine
  129445. * async def __aenter__(self):
  129446. * return self # <<<<<<<<<<<<<<
  129447. *
  129448. * @cython.iterable_coroutine
  129449. */
  129450. __Pyx_XDECREF(__pyx_r);
  129451. __pyx_r = NULL; __Pyx_ReturnWithStopIteration(((PyObject *)__pyx_cur_scope->__pyx_v_self));
  129452. goto __pyx_L0;
  129453. CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
  129454. /* "uvloop/server.pyx":52
  129455. *
  129456. * @cython.iterable_coroutine
  129457. * async def __aenter__(self): # <<<<<<<<<<<<<<
  129458. * return self
  129459. *
  129460. */
  129461. /* function exit code */
  129462. __pyx_L1_error:;
  129463. __Pyx_AddTraceback("__aenter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  129464. __pyx_L0:;
  129465. __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  129466. #if !CYTHON_USE_EXC_INFO_STACK
  129467. __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  129468. #endif
  129469. __pyx_generator->resume_label = -1;
  129470. __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  129471. __Pyx_RefNannyFinishContext();
  129472. return __pyx_r;
  129473. }
  129474. static PyObject *__pyx_gb_6uvloop_4loop_6Server_7generator21(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
  129475. /* "uvloop/server.pyx":56
  129476. *
  129477. * @cython.iterable_coroutine
  129478. * async def __aexit__(self, *exc): # <<<<<<<<<<<<<<
  129479. * self.close()
  129480. * await self.wait_closed()
  129481. */
  129482. /* Python wrapper */
  129483. static PyObject *__pyx_pw_6uvloop_4loop_6Server_6__aexit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  129484. static char __pyx_doc_6uvloop_4loop_6Server_5__aexit__[] = "Server.__aexit__(self, *exc)";
  129485. static PyObject *__pyx_pw_6uvloop_4loop_6Server_6__aexit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  129486. CYTHON_UNUSED PyObject *__pyx_v_exc = 0;
  129487. PyObject *__pyx_r = 0;
  129488. __Pyx_RefNannyDeclarations
  129489. __Pyx_RefNannySetupContext("__aexit__ (wrapper)", 0);
  129490. if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__aexit__", 0))) return NULL;
  129491. __Pyx_INCREF(__pyx_args);
  129492. __pyx_v_exc = __pyx_args;
  129493. __pyx_r = __pyx_pf_6uvloop_4loop_6Server_5__aexit__(((struct __pyx_obj_6uvloop_4loop_Server *)__pyx_v_self), __pyx_v_exc);
  129494. /* function exit code */
  129495. __Pyx_XDECREF(__pyx_v_exc);
  129496. __Pyx_RefNannyFinishContext();
  129497. return __pyx_r;
  129498. }
  129499. static PyObject *__pyx_pf_6uvloop_4loop_6Server_5__aexit__(struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_exc) {
  129500. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_33___aexit__ *__pyx_cur_scope;
  129501. PyObject *__pyx_r = NULL;
  129502. __Pyx_RefNannyDeclarations
  129503. __Pyx_RefNannySetupContext("__aexit__", 0);
  129504. __pyx_cur_scope = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_33___aexit__ *)__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_33___aexit__(__pyx_ptype_6uvloop_4loop___pyx_scope_struct_33___aexit__, __pyx_empty_tuple, NULL);
  129505. if (unlikely(!__pyx_cur_scope)) {
  129506. __pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_33___aexit__ *)Py_None);
  129507. __Pyx_INCREF(Py_None);
  129508. __PYX_ERR(24, 56, __pyx_L1_error)
  129509. } else {
  129510. __Pyx_GOTREF(__pyx_cur_scope);
  129511. }
  129512. __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  129513. __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  129514. __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  129515. __pyx_cur_scope->__pyx_v_exc = __pyx_v_exc;
  129516. __Pyx_INCREF(__pyx_cur_scope->__pyx_v_exc);
  129517. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_exc);
  129518. {
  129519. __pyx_CoroutineObject *gen = __Pyx_IterableCoroutine_New((__pyx_coroutine_body_t) __pyx_gb_6uvloop_4loop_6Server_7generator21, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_aexit, __pyx_n_s_Server___aexit, __pyx_n_s_uvloop_loop); if (unlikely(!gen)) __PYX_ERR(24, 56, __pyx_L1_error)
  129520. __Pyx_DECREF(__pyx_cur_scope);
  129521. __Pyx_RefNannyFinishContext();
  129522. return (PyObject *) gen;
  129523. }
  129524. /* function exit code */
  129525. __pyx_L1_error:;
  129526. __Pyx_AddTraceback("uvloop.loop.Server.__aexit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  129527. __pyx_r = NULL;
  129528. __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  129529. __Pyx_XGIVEREF(__pyx_r);
  129530. __Pyx_RefNannyFinishContext();
  129531. return __pyx_r;
  129532. }
  129533. static PyObject *__pyx_gb_6uvloop_4loop_6Server_7generator21(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
  129534. {
  129535. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_33___aexit__ *__pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_33___aexit__ *)__pyx_generator->closure);
  129536. PyObject *__pyx_r = NULL;
  129537. PyObject *__pyx_t_1 = NULL;
  129538. PyObject *__pyx_t_2 = NULL;
  129539. PyObject *__pyx_t_3 = NULL;
  129540. __Pyx_RefNannyDeclarations
  129541. __Pyx_RefNannySetupContext("__aexit__", 0);
  129542. switch (__pyx_generator->resume_label) {
  129543. case 0: goto __pyx_L3_first_run;
  129544. case 1: goto __pyx_L4_resume_from_await;
  129545. default: /* CPython raises the right error here */
  129546. __Pyx_RefNannyFinishContext();
  129547. return NULL;
  129548. }
  129549. __pyx_L3_first_run:;
  129550. if (unlikely(!__pyx_sent_value)) __PYX_ERR(24, 56, __pyx_L1_error)
  129551. /* "uvloop/server.pyx":57
  129552. * @cython.iterable_coroutine
  129553. * async def __aexit__(self, *exc):
  129554. * self.close() # <<<<<<<<<<<<<<
  129555. * await self.wait_closed()
  129556. *
  129557. */
  129558. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_close); if (unlikely(!__pyx_t_2)) __PYX_ERR(24, 57, __pyx_L1_error)
  129559. __Pyx_GOTREF(__pyx_t_2);
  129560. __pyx_t_3 = NULL;
  129561. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
  129562. __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
  129563. if (likely(__pyx_t_3)) {
  129564. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  129565. __Pyx_INCREF(__pyx_t_3);
  129566. __Pyx_INCREF(function);
  129567. __Pyx_DECREF_SET(__pyx_t_2, function);
  129568. }
  129569. }
  129570. __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  129571. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  129572. if (unlikely(!__pyx_t_1)) __PYX_ERR(24, 57, __pyx_L1_error)
  129573. __Pyx_GOTREF(__pyx_t_1);
  129574. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  129575. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  129576. /* "uvloop/server.pyx":58
  129577. * async def __aexit__(self, *exc):
  129578. * self.close()
  129579. * await self.wait_closed() # <<<<<<<<<<<<<<
  129580. *
  129581. * def __repr__(self):
  129582. */
  129583. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_wait_closed); if (unlikely(!__pyx_t_2)) __PYX_ERR(24, 58, __pyx_L1_error)
  129584. __Pyx_GOTREF(__pyx_t_2);
  129585. __pyx_t_3 = NULL;
  129586. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
  129587. __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
  129588. if (likely(__pyx_t_3)) {
  129589. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  129590. __Pyx_INCREF(__pyx_t_3);
  129591. __Pyx_INCREF(function);
  129592. __Pyx_DECREF_SET(__pyx_t_2, function);
  129593. }
  129594. }
  129595. __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  129596. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  129597. if (unlikely(!__pyx_t_1)) __PYX_ERR(24, 58, __pyx_L1_error)
  129598. __Pyx_GOTREF(__pyx_t_1);
  129599. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  129600. __pyx_r = __Pyx_Coroutine_Yield_From(__pyx_generator, __pyx_t_1);
  129601. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  129602. __Pyx_XGOTREF(__pyx_r);
  129603. if (likely(__pyx_r)) {
  129604. __Pyx_XGIVEREF(__pyx_r);
  129605. __Pyx_RefNannyFinishContext();
  129606. __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  129607. /* return from generator, awaiting value */
  129608. __pyx_generator->resume_label = 1;
  129609. return __pyx_r;
  129610. __pyx_L4_resume_from_await:;
  129611. if (unlikely(!__pyx_sent_value)) __PYX_ERR(24, 58, __pyx_L1_error)
  129612. } else {
  129613. PyObject* exc_type = __Pyx_PyErr_Occurred();
  129614. if (exc_type) {
  129615. if (likely(exc_type == PyExc_StopIteration || (exc_type != PyExc_GeneratorExit && __Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)))) PyErr_Clear();
  129616. else __PYX_ERR(24, 58, __pyx_L1_error)
  129617. }
  129618. }
  129619. CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
  129620. /* "uvloop/server.pyx":56
  129621. *
  129622. * @cython.iterable_coroutine
  129623. * async def __aexit__(self, *exc): # <<<<<<<<<<<<<<
  129624. * self.close()
  129625. * await self.wait_closed()
  129626. */
  129627. /* function exit code */
  129628. PyErr_SetNone(PyExc_StopIteration);
  129629. goto __pyx_L0;
  129630. __pyx_L1_error:;
  129631. __Pyx_XDECREF(__pyx_t_1);
  129632. __Pyx_XDECREF(__pyx_t_2);
  129633. __Pyx_XDECREF(__pyx_t_3);
  129634. __Pyx_AddTraceback("__aexit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  129635. __pyx_L0:;
  129636. __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  129637. #if !CYTHON_USE_EXC_INFO_STACK
  129638. __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  129639. #endif
  129640. __pyx_generator->resume_label = -1;
  129641. __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  129642. __Pyx_RefNannyFinishContext();
  129643. return __pyx_r;
  129644. }
  129645. /* "uvloop/server.pyx":60
  129646. * await self.wait_closed()
  129647. *
  129648. * def __repr__(self): # <<<<<<<<<<<<<<
  129649. * return '<%s sockets=%r>' % (self.__class__.__name__, self.sockets)
  129650. *
  129651. */
  129652. /* Python wrapper */
  129653. static PyObject *__pyx_pw_6uvloop_4loop_6Server_9__repr__(PyObject *__pyx_v_self); /*proto*/
  129654. static PyObject *__pyx_pw_6uvloop_4loop_6Server_9__repr__(PyObject *__pyx_v_self) {
  129655. PyObject *__pyx_r = 0;
  129656. __Pyx_RefNannyDeclarations
  129657. __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  129658. __pyx_r = __pyx_pf_6uvloop_4loop_6Server_8__repr__(((struct __pyx_obj_6uvloop_4loop_Server *)__pyx_v_self));
  129659. /* function exit code */
  129660. __Pyx_RefNannyFinishContext();
  129661. return __pyx_r;
  129662. }
  129663. static PyObject *__pyx_pf_6uvloop_4loop_6Server_8__repr__(struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_self) {
  129664. PyObject *__pyx_r = NULL;
  129665. __Pyx_RefNannyDeclarations
  129666. PyObject *__pyx_t_1 = NULL;
  129667. Py_ssize_t __pyx_t_2;
  129668. Py_UCS4 __pyx_t_3;
  129669. PyObject *__pyx_t_4 = NULL;
  129670. PyObject *__pyx_t_5 = NULL;
  129671. __Pyx_RefNannySetupContext("__repr__", 0);
  129672. /* "uvloop/server.pyx":61
  129673. *
  129674. * def __repr__(self):
  129675. * return '<%s sockets=%r>' % (self.__class__.__name__, self.sockets) # <<<<<<<<<<<<<<
  129676. *
  129677. * def get_loop(self):
  129678. */
  129679. __Pyx_XDECREF(__pyx_r);
  129680. __pyx_t_1 = PyTuple_New(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(24, 61, __pyx_L1_error)
  129681. __Pyx_GOTREF(__pyx_t_1);
  129682. __pyx_t_2 = 0;
  129683. __pyx_t_3 = 127;
  129684. __Pyx_INCREF(__pyx_kp_u__88);
  129685. __pyx_t_2 += 1;
  129686. __Pyx_GIVEREF(__pyx_kp_u__88);
  129687. PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u__88);
  129688. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_4)) __PYX_ERR(24, 61, __pyx_L1_error)
  129689. __Pyx_GOTREF(__pyx_t_4);
  129690. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(24, 61, __pyx_L1_error)
  129691. __Pyx_GOTREF(__pyx_t_5);
  129692. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  129693. __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_5), __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(24, 61, __pyx_L1_error)
  129694. __Pyx_GOTREF(__pyx_t_4);
  129695. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  129696. __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3;
  129697. __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
  129698. __Pyx_GIVEREF(__pyx_t_4);
  129699. PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_4);
  129700. __pyx_t_4 = 0;
  129701. __Pyx_INCREF(__pyx_kp_u_sockets);
  129702. __pyx_t_2 += 9;
  129703. __Pyx_GIVEREF(__pyx_kp_u_sockets);
  129704. PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u_sockets);
  129705. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_sockets_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(24, 61, __pyx_L1_error)
  129706. __Pyx_GOTREF(__pyx_t_4);
  129707. __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_4), __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(24, 61, __pyx_L1_error)
  129708. __Pyx_GOTREF(__pyx_t_5);
  129709. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  129710. __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3;
  129711. __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
  129712. __Pyx_GIVEREF(__pyx_t_5);
  129713. PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_5);
  129714. __pyx_t_5 = 0;
  129715. __Pyx_INCREF(__pyx_kp_u__90);
  129716. __pyx_t_2 += 1;
  129717. __Pyx_GIVEREF(__pyx_kp_u__90);
  129718. PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_kp_u__90);
  129719. __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 5, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(24, 61, __pyx_L1_error)
  129720. __Pyx_GOTREF(__pyx_t_5);
  129721. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  129722. __pyx_r = __pyx_t_5;
  129723. __pyx_t_5 = 0;
  129724. goto __pyx_L0;
  129725. /* "uvloop/server.pyx":60
  129726. * await self.wait_closed()
  129727. *
  129728. * def __repr__(self): # <<<<<<<<<<<<<<
  129729. * return '<%s sockets=%r>' % (self.__class__.__name__, self.sockets)
  129730. *
  129731. */
  129732. /* function exit code */
  129733. __pyx_L1_error:;
  129734. __Pyx_XDECREF(__pyx_t_1);
  129735. __Pyx_XDECREF(__pyx_t_4);
  129736. __Pyx_XDECREF(__pyx_t_5);
  129737. __Pyx_AddTraceback("uvloop.loop.Server.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  129738. __pyx_r = NULL;
  129739. __pyx_L0:;
  129740. __Pyx_XGIVEREF(__pyx_r);
  129741. __Pyx_RefNannyFinishContext();
  129742. return __pyx_r;
  129743. }
  129744. /* "uvloop/server.pyx":63
  129745. * return '<%s sockets=%r>' % (self.__class__.__name__, self.sockets)
  129746. *
  129747. * def get_loop(self): # <<<<<<<<<<<<<<
  129748. * return self._loop
  129749. *
  129750. */
  129751. /* Python wrapper */
  129752. static PyObject *__pyx_pw_6uvloop_4loop_6Server_11get_loop(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  129753. static char __pyx_doc_6uvloop_4loop_6Server_10get_loop[] = "Server.get_loop(self)";
  129754. static PyObject *__pyx_pw_6uvloop_4loop_6Server_11get_loop(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  129755. PyObject *__pyx_r = 0;
  129756. __Pyx_RefNannyDeclarations
  129757. __Pyx_RefNannySetupContext("get_loop (wrapper)", 0);
  129758. __pyx_r = __pyx_pf_6uvloop_4loop_6Server_10get_loop(((struct __pyx_obj_6uvloop_4loop_Server *)__pyx_v_self));
  129759. /* function exit code */
  129760. __Pyx_RefNannyFinishContext();
  129761. return __pyx_r;
  129762. }
  129763. static PyObject *__pyx_pf_6uvloop_4loop_6Server_10get_loop(struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_self) {
  129764. PyObject *__pyx_r = NULL;
  129765. __Pyx_RefNannyDeclarations
  129766. __Pyx_RefNannySetupContext("get_loop", 0);
  129767. /* "uvloop/server.pyx":64
  129768. *
  129769. * def get_loop(self):
  129770. * return self._loop # <<<<<<<<<<<<<<
  129771. *
  129772. * @cython.iterable_coroutine
  129773. */
  129774. __Pyx_XDECREF(__pyx_r);
  129775. __Pyx_INCREF(((PyObject *)__pyx_v_self->_loop));
  129776. __pyx_r = ((PyObject *)__pyx_v_self->_loop);
  129777. goto __pyx_L0;
  129778. /* "uvloop/server.pyx":63
  129779. * return '<%s sockets=%r>' % (self.__class__.__name__, self.sockets)
  129780. *
  129781. * def get_loop(self): # <<<<<<<<<<<<<<
  129782. * return self._loop
  129783. *
  129784. */
  129785. /* function exit code */
  129786. __pyx_L0:;
  129787. __Pyx_XGIVEREF(__pyx_r);
  129788. __Pyx_RefNannyFinishContext();
  129789. return __pyx_r;
  129790. }
  129791. static PyObject *__pyx_gb_6uvloop_4loop_6Server_14generator22(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
  129792. /* "uvloop/server.pyx":67
  129793. *
  129794. * @cython.iterable_coroutine
  129795. * async def wait_closed(self): # <<<<<<<<<<<<<<
  129796. * # Do not remove `self._servers is None` below
  129797. * # because close() method only closes server sockets
  129798. */
  129799. /* Python wrapper */
  129800. static PyObject *__pyx_pw_6uvloop_4loop_6Server_13wait_closed(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  129801. static char __pyx_doc_6uvloop_4loop_6Server_12wait_closed[] = "Server.wait_closed(self)";
  129802. static PyObject *__pyx_pw_6uvloop_4loop_6Server_13wait_closed(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  129803. PyObject *__pyx_r = 0;
  129804. __Pyx_RefNannyDeclarations
  129805. __Pyx_RefNannySetupContext("wait_closed (wrapper)", 0);
  129806. __pyx_r = __pyx_pf_6uvloop_4loop_6Server_12wait_closed(((struct __pyx_obj_6uvloop_4loop_Server *)__pyx_v_self));
  129807. /* function exit code */
  129808. __Pyx_RefNannyFinishContext();
  129809. return __pyx_r;
  129810. }
  129811. static PyObject *__pyx_pf_6uvloop_4loop_6Server_12wait_closed(struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_self) {
  129812. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_34_wait_closed *__pyx_cur_scope;
  129813. PyObject *__pyx_r = NULL;
  129814. __Pyx_RefNannyDeclarations
  129815. __Pyx_RefNannySetupContext("wait_closed", 0);
  129816. __pyx_cur_scope = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_34_wait_closed *)__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_34_wait_closed(__pyx_ptype_6uvloop_4loop___pyx_scope_struct_34_wait_closed, __pyx_empty_tuple, NULL);
  129817. if (unlikely(!__pyx_cur_scope)) {
  129818. __pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_34_wait_closed *)Py_None);
  129819. __Pyx_INCREF(Py_None);
  129820. __PYX_ERR(24, 67, __pyx_L1_error)
  129821. } else {
  129822. __Pyx_GOTREF(__pyx_cur_scope);
  129823. }
  129824. __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  129825. __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  129826. __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  129827. {
  129828. __pyx_CoroutineObject *gen = __Pyx_IterableCoroutine_New((__pyx_coroutine_body_t) __pyx_gb_6uvloop_4loop_6Server_14generator22, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_wait_closed, __pyx_n_s_Server_wait_closed, __pyx_n_s_uvloop_loop); if (unlikely(!gen)) __PYX_ERR(24, 67, __pyx_L1_error)
  129829. __Pyx_DECREF(__pyx_cur_scope);
  129830. __Pyx_RefNannyFinishContext();
  129831. return (PyObject *) gen;
  129832. }
  129833. /* function exit code */
  129834. __pyx_L1_error:;
  129835. __Pyx_AddTraceback("uvloop.loop.Server.wait_closed", __pyx_clineno, __pyx_lineno, __pyx_filename);
  129836. __pyx_r = NULL;
  129837. __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  129838. __Pyx_XGIVEREF(__pyx_r);
  129839. __Pyx_RefNannyFinishContext();
  129840. return __pyx_r;
  129841. }
  129842. static PyObject *__pyx_gb_6uvloop_4loop_6Server_14generator22(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
  129843. {
  129844. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_34_wait_closed *__pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_34_wait_closed *)__pyx_generator->closure);
  129845. PyObject *__pyx_r = NULL;
  129846. int __pyx_t_1;
  129847. int __pyx_t_2;
  129848. int __pyx_t_3;
  129849. PyObject *__pyx_t_4 = NULL;
  129850. int __pyx_t_5;
  129851. __Pyx_RefNannyDeclarations
  129852. __Pyx_RefNannySetupContext("wait_closed", 0);
  129853. switch (__pyx_generator->resume_label) {
  129854. case 0: goto __pyx_L3_first_run;
  129855. case 1: goto __pyx_L7_resume_from_await;
  129856. default: /* CPython raises the right error here */
  129857. __Pyx_RefNannyFinishContext();
  129858. return NULL;
  129859. }
  129860. __pyx_L3_first_run:;
  129861. if (unlikely(!__pyx_sent_value)) __PYX_ERR(24, 67, __pyx_L1_error)
  129862. /* "uvloop/server.pyx":71
  129863. * # because close() method only closes server sockets
  129864. * # and existing client connections are left open.
  129865. * if self._servers is None or self._waiters is None: # <<<<<<<<<<<<<<
  129866. * return
  129867. * waiter = self._loop._new_future()
  129868. */
  129869. __pyx_t_2 = (__pyx_cur_scope->__pyx_v_self->_servers == ((PyObject*)Py_None));
  129870. __pyx_t_3 = (__pyx_t_2 != 0);
  129871. if (!__pyx_t_3) {
  129872. } else {
  129873. __pyx_t_1 = __pyx_t_3;
  129874. goto __pyx_L5_bool_binop_done;
  129875. }
  129876. __pyx_t_3 = (__pyx_cur_scope->__pyx_v_self->_waiters == ((PyObject*)Py_None));
  129877. __pyx_t_2 = (__pyx_t_3 != 0);
  129878. __pyx_t_1 = __pyx_t_2;
  129879. __pyx_L5_bool_binop_done:;
  129880. if (__pyx_t_1) {
  129881. /* "uvloop/server.pyx":72
  129882. * # and existing client connections are left open.
  129883. * if self._servers is None or self._waiters is None:
  129884. * return # <<<<<<<<<<<<<<
  129885. * waiter = self._loop._new_future()
  129886. * self._waiters.append(waiter)
  129887. */
  129888. __Pyx_XDECREF(__pyx_r);
  129889. __pyx_r = NULL;
  129890. goto __pyx_L0;
  129891. /* "uvloop/server.pyx":71
  129892. * # because close() method only closes server sockets
  129893. * # and existing client connections are left open.
  129894. * if self._servers is None or self._waiters is None: # <<<<<<<<<<<<<<
  129895. * return
  129896. * waiter = self._loop._new_future()
  129897. */
  129898. }
  129899. /* "uvloop/server.pyx":73
  129900. * if self._servers is None or self._waiters is None:
  129901. * return
  129902. * waiter = self._loop._new_future() # <<<<<<<<<<<<<<
  129903. * self._waiters.append(waiter)
  129904. * await waiter
  129905. */
  129906. __pyx_t_4 = __pyx_f_6uvloop_4loop_4Loop__new_future(__pyx_cur_scope->__pyx_v_self->_loop); if (unlikely(!__pyx_t_4)) __PYX_ERR(24, 73, __pyx_L1_error)
  129907. __Pyx_GOTREF(__pyx_t_4);
  129908. __Pyx_GIVEREF(__pyx_t_4);
  129909. __pyx_cur_scope->__pyx_v_waiter = __pyx_t_4;
  129910. __pyx_t_4 = 0;
  129911. /* "uvloop/server.pyx":74
  129912. * return
  129913. * waiter = self._loop._new_future()
  129914. * self._waiters.append(waiter) # <<<<<<<<<<<<<<
  129915. * await waiter
  129916. *
  129917. */
  129918. if (unlikely(__pyx_cur_scope->__pyx_v_self->_waiters == Py_None)) {
  129919. PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append");
  129920. __PYX_ERR(24, 74, __pyx_L1_error)
  129921. }
  129922. __pyx_t_5 = __Pyx_PyList_Append(__pyx_cur_scope->__pyx_v_self->_waiters, __pyx_cur_scope->__pyx_v_waiter); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(24, 74, __pyx_L1_error)
  129923. /* "uvloop/server.pyx":75
  129924. * waiter = self._loop._new_future()
  129925. * self._waiters.append(waiter)
  129926. * await waiter # <<<<<<<<<<<<<<
  129927. *
  129928. * def close(self):
  129929. */
  129930. __pyx_r = __Pyx_Coroutine_Yield_From(__pyx_generator, __pyx_cur_scope->__pyx_v_waiter);
  129931. __Pyx_XGOTREF(__pyx_r);
  129932. if (likely(__pyx_r)) {
  129933. __Pyx_XGIVEREF(__pyx_r);
  129934. __Pyx_RefNannyFinishContext();
  129935. __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  129936. /* return from generator, awaiting value */
  129937. __pyx_generator->resume_label = 1;
  129938. return __pyx_r;
  129939. __pyx_L7_resume_from_await:;
  129940. if (unlikely(!__pyx_sent_value)) __PYX_ERR(24, 75, __pyx_L1_error)
  129941. } else {
  129942. PyObject* exc_type = __Pyx_PyErr_Occurred();
  129943. if (exc_type) {
  129944. if (likely(exc_type == PyExc_StopIteration || (exc_type != PyExc_GeneratorExit && __Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)))) PyErr_Clear();
  129945. else __PYX_ERR(24, 75, __pyx_L1_error)
  129946. }
  129947. }
  129948. CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
  129949. /* "uvloop/server.pyx":67
  129950. *
  129951. * @cython.iterable_coroutine
  129952. * async def wait_closed(self): # <<<<<<<<<<<<<<
  129953. * # Do not remove `self._servers is None` below
  129954. * # because close() method only closes server sockets
  129955. */
  129956. /* function exit code */
  129957. PyErr_SetNone(PyExc_StopIteration);
  129958. goto __pyx_L0;
  129959. __pyx_L1_error:;
  129960. __Pyx_XDECREF(__pyx_t_4);
  129961. __Pyx_AddTraceback("wait_closed", __pyx_clineno, __pyx_lineno, __pyx_filename);
  129962. __pyx_L0:;
  129963. __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  129964. #if !CYTHON_USE_EXC_INFO_STACK
  129965. __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  129966. #endif
  129967. __pyx_generator->resume_label = -1;
  129968. __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  129969. __Pyx_RefNannyFinishContext();
  129970. return __pyx_r;
  129971. }
  129972. /* "uvloop/server.pyx":77
  129973. * await waiter
  129974. *
  129975. * def close(self): # <<<<<<<<<<<<<<
  129976. * cdef list servers
  129977. *
  129978. */
  129979. /* Python wrapper */
  129980. static PyObject *__pyx_pw_6uvloop_4loop_6Server_16close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  129981. static char __pyx_doc_6uvloop_4loop_6Server_15close[] = "Server.close(self)";
  129982. static PyObject *__pyx_pw_6uvloop_4loop_6Server_16close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  129983. PyObject *__pyx_r = 0;
  129984. __Pyx_RefNannyDeclarations
  129985. __Pyx_RefNannySetupContext("close (wrapper)", 0);
  129986. __pyx_r = __pyx_pf_6uvloop_4loop_6Server_15close(((struct __pyx_obj_6uvloop_4loop_Server *)__pyx_v_self));
  129987. /* function exit code */
  129988. __Pyx_RefNannyFinishContext();
  129989. return __pyx_r;
  129990. }
  129991. static PyObject *__pyx_pf_6uvloop_4loop_6Server_15close(struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_self) {
  129992. PyObject *__pyx_v_servers = 0;
  129993. PyObject *__pyx_v_server = NULL;
  129994. PyObject *__pyx_r = NULL;
  129995. __Pyx_RefNannyDeclarations
  129996. int __pyx_t_1;
  129997. int __pyx_t_2;
  129998. PyObject *__pyx_t_3 = NULL;
  129999. Py_ssize_t __pyx_t_4;
  130000. PyObject *__pyx_t_5 = NULL;
  130001. int __pyx_t_6;
  130002. int __pyx_t_7;
  130003. char const *__pyx_t_8;
  130004. PyObject *__pyx_t_9 = NULL;
  130005. PyObject *__pyx_t_10 = NULL;
  130006. PyObject *__pyx_t_11 = NULL;
  130007. PyObject *__pyx_t_12 = NULL;
  130008. PyObject *__pyx_t_13 = NULL;
  130009. PyObject *__pyx_t_14 = NULL;
  130010. __Pyx_RefNannySetupContext("close", 0);
  130011. /* "uvloop/server.pyx":80
  130012. * cdef list servers
  130013. *
  130014. * if self._servers is None: # <<<<<<<<<<<<<<
  130015. * return
  130016. *
  130017. */
  130018. __pyx_t_1 = (__pyx_v_self->_servers == ((PyObject*)Py_None));
  130019. __pyx_t_2 = (__pyx_t_1 != 0);
  130020. if (__pyx_t_2) {
  130021. /* "uvloop/server.pyx":81
  130022. *
  130023. * if self._servers is None:
  130024. * return # <<<<<<<<<<<<<<
  130025. *
  130026. * try:
  130027. */
  130028. __Pyx_XDECREF(__pyx_r);
  130029. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  130030. goto __pyx_L0;
  130031. /* "uvloop/server.pyx":80
  130032. * cdef list servers
  130033. *
  130034. * if self._servers is None: # <<<<<<<<<<<<<<
  130035. * return
  130036. *
  130037. */
  130038. }
  130039. /* "uvloop/server.pyx":83
  130040. * return
  130041. *
  130042. * try: # <<<<<<<<<<<<<<
  130043. * servers = self._servers
  130044. * self._servers = None
  130045. */
  130046. /*try:*/ {
  130047. /* "uvloop/server.pyx":84
  130048. *
  130049. * try:
  130050. * servers = self._servers # <<<<<<<<<<<<<<
  130051. * self._servers = None
  130052. * self._serving = 0
  130053. */
  130054. __pyx_t_3 = __pyx_v_self->_servers;
  130055. __Pyx_INCREF(__pyx_t_3);
  130056. __pyx_v_servers = ((PyObject*)__pyx_t_3);
  130057. __pyx_t_3 = 0;
  130058. /* "uvloop/server.pyx":85
  130059. * try:
  130060. * servers = self._servers
  130061. * self._servers = None # <<<<<<<<<<<<<<
  130062. * self._serving = 0
  130063. *
  130064. */
  130065. __Pyx_INCREF(Py_None);
  130066. __Pyx_GIVEREF(Py_None);
  130067. __Pyx_GOTREF(__pyx_v_self->_servers);
  130068. __Pyx_DECREF(__pyx_v_self->_servers);
  130069. __pyx_v_self->_servers = ((PyObject*)Py_None);
  130070. /* "uvloop/server.pyx":86
  130071. * servers = self._servers
  130072. * self._servers = None
  130073. * self._serving = 0 # <<<<<<<<<<<<<<
  130074. *
  130075. * for server in servers:
  130076. */
  130077. __pyx_v_self->_serving = 0;
  130078. /* "uvloop/server.pyx":88
  130079. * self._serving = 0
  130080. *
  130081. * for server in servers: # <<<<<<<<<<<<<<
  130082. * (<UVStreamServer>server)._close()
  130083. *
  130084. */
  130085. if (unlikely(__pyx_v_servers == Py_None)) {
  130086. PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
  130087. __PYX_ERR(24, 88, __pyx_L5_error)
  130088. }
  130089. __pyx_t_3 = __pyx_v_servers; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
  130090. for (;;) {
  130091. if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
  130092. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  130093. __pyx_t_5 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_5); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(24, 88, __pyx_L5_error)
  130094. #else
  130095. __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_5)) __PYX_ERR(24, 88, __pyx_L5_error)
  130096. __Pyx_GOTREF(__pyx_t_5);
  130097. #endif
  130098. __Pyx_XDECREF_SET(__pyx_v_server, __pyx_t_5);
  130099. __pyx_t_5 = 0;
  130100. /* "uvloop/server.pyx":89
  130101. *
  130102. * for server in servers:
  130103. * (<UVStreamServer>server)._close() # <<<<<<<<<<<<<<
  130104. *
  130105. * if self._active_count == 0:
  130106. */
  130107. __pyx_t_5 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStreamServer *)((struct __pyx_obj_6uvloop_4loop_UVStreamServer *)__pyx_v_server)->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._close(((struct __pyx_obj_6uvloop_4loop_UVHandle *)((struct __pyx_obj_6uvloop_4loop_UVStreamServer *)__pyx_v_server))); if (unlikely(!__pyx_t_5)) __PYX_ERR(24, 89, __pyx_L5_error)
  130108. __Pyx_GOTREF(__pyx_t_5);
  130109. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  130110. /* "uvloop/server.pyx":88
  130111. * self._serving = 0
  130112. *
  130113. * for server in servers: # <<<<<<<<<<<<<<
  130114. * (<UVStreamServer>server)._close()
  130115. *
  130116. */
  130117. }
  130118. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  130119. /* "uvloop/server.pyx":91
  130120. * (<UVStreamServer>server)._close()
  130121. *
  130122. * if self._active_count == 0: # <<<<<<<<<<<<<<
  130123. * self._wakeup()
  130124. * finally:
  130125. */
  130126. __pyx_t_2 = ((__pyx_v_self->_active_count == 0) != 0);
  130127. if (__pyx_t_2) {
  130128. /* "uvloop/server.pyx":92
  130129. *
  130130. * if self._active_count == 0:
  130131. * self._wakeup() # <<<<<<<<<<<<<<
  130132. * finally:
  130133. * self._unref()
  130134. */
  130135. __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_Server *)__pyx_v_self->__pyx_vtab)->_wakeup(__pyx_v_self); if (unlikely(!__pyx_t_3)) __PYX_ERR(24, 92, __pyx_L5_error)
  130136. __Pyx_GOTREF(__pyx_t_3);
  130137. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  130138. /* "uvloop/server.pyx":91
  130139. * (<UVStreamServer>server)._close()
  130140. *
  130141. * if self._active_count == 0: # <<<<<<<<<<<<<<
  130142. * self._wakeup()
  130143. * finally:
  130144. */
  130145. }
  130146. }
  130147. /* "uvloop/server.pyx":94
  130148. * self._wakeup()
  130149. * finally:
  130150. * self._unref() # <<<<<<<<<<<<<<
  130151. *
  130152. * def is_serving(self):
  130153. */
  130154. /*finally:*/ {
  130155. /*normal exit:*/{
  130156. __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_Server *)__pyx_v_self->__pyx_vtab)->_unref(__pyx_v_self); if (unlikely(!__pyx_t_3)) __PYX_ERR(24, 94, __pyx_L1_error)
  130157. __Pyx_GOTREF(__pyx_t_3);
  130158. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  130159. goto __pyx_L6;
  130160. }
  130161. __pyx_L5_error:;
  130162. /*exception exit:*/{
  130163. __Pyx_PyThreadState_declare
  130164. __Pyx_PyThreadState_assign
  130165. __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0;
  130166. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  130167. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  130168. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
  130169. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11) < 0)) __Pyx_ErrFetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
  130170. __Pyx_XGOTREF(__pyx_t_9);
  130171. __Pyx_XGOTREF(__pyx_t_10);
  130172. __Pyx_XGOTREF(__pyx_t_11);
  130173. __Pyx_XGOTREF(__pyx_t_12);
  130174. __Pyx_XGOTREF(__pyx_t_13);
  130175. __Pyx_XGOTREF(__pyx_t_14);
  130176. __pyx_t_6 = __pyx_lineno; __pyx_t_7 = __pyx_clineno; __pyx_t_8 = __pyx_filename;
  130177. {
  130178. __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_Server *)__pyx_v_self->__pyx_vtab)->_unref(__pyx_v_self); if (unlikely(!__pyx_t_3)) __PYX_ERR(24, 94, __pyx_L11_error)
  130179. __Pyx_GOTREF(__pyx_t_3);
  130180. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  130181. }
  130182. if (PY_MAJOR_VERSION >= 3) {
  130183. __Pyx_XGIVEREF(__pyx_t_12);
  130184. __Pyx_XGIVEREF(__pyx_t_13);
  130185. __Pyx_XGIVEREF(__pyx_t_14);
  130186. __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
  130187. }
  130188. __Pyx_XGIVEREF(__pyx_t_9);
  130189. __Pyx_XGIVEREF(__pyx_t_10);
  130190. __Pyx_XGIVEREF(__pyx_t_11);
  130191. __Pyx_ErrRestore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
  130192. __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0;
  130193. __pyx_lineno = __pyx_t_6; __pyx_clineno = __pyx_t_7; __pyx_filename = __pyx_t_8;
  130194. goto __pyx_L1_error;
  130195. __pyx_L11_error:;
  130196. if (PY_MAJOR_VERSION >= 3) {
  130197. __Pyx_XGIVEREF(__pyx_t_12);
  130198. __Pyx_XGIVEREF(__pyx_t_13);
  130199. __Pyx_XGIVEREF(__pyx_t_14);
  130200. __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
  130201. }
  130202. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  130203. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  130204. __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
  130205. __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0;
  130206. goto __pyx_L1_error;
  130207. }
  130208. __pyx_L6:;
  130209. }
  130210. /* "uvloop/server.pyx":77
  130211. * await waiter
  130212. *
  130213. * def close(self): # <<<<<<<<<<<<<<
  130214. * cdef list servers
  130215. *
  130216. */
  130217. /* function exit code */
  130218. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  130219. goto __pyx_L0;
  130220. __pyx_L1_error:;
  130221. __Pyx_XDECREF(__pyx_t_3);
  130222. __Pyx_XDECREF(__pyx_t_5);
  130223. __Pyx_AddTraceback("uvloop.loop.Server.close", __pyx_clineno, __pyx_lineno, __pyx_filename);
  130224. __pyx_r = NULL;
  130225. __pyx_L0:;
  130226. __Pyx_XDECREF(__pyx_v_servers);
  130227. __Pyx_XDECREF(__pyx_v_server);
  130228. __Pyx_XGIVEREF(__pyx_r);
  130229. __Pyx_RefNannyFinishContext();
  130230. return __pyx_r;
  130231. }
  130232. /* "uvloop/server.pyx":96
  130233. * self._unref()
  130234. *
  130235. * def is_serving(self): # <<<<<<<<<<<<<<
  130236. * return self._serving
  130237. *
  130238. */
  130239. /* Python wrapper */
  130240. static PyObject *__pyx_pw_6uvloop_4loop_6Server_18is_serving(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  130241. static char __pyx_doc_6uvloop_4loop_6Server_17is_serving[] = "Server.is_serving(self)";
  130242. static PyObject *__pyx_pw_6uvloop_4loop_6Server_18is_serving(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  130243. PyObject *__pyx_r = 0;
  130244. __Pyx_RefNannyDeclarations
  130245. __Pyx_RefNannySetupContext("is_serving (wrapper)", 0);
  130246. __pyx_r = __pyx_pf_6uvloop_4loop_6Server_17is_serving(((struct __pyx_obj_6uvloop_4loop_Server *)__pyx_v_self));
  130247. /* function exit code */
  130248. __Pyx_RefNannyFinishContext();
  130249. return __pyx_r;
  130250. }
  130251. static PyObject *__pyx_pf_6uvloop_4loop_6Server_17is_serving(struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_self) {
  130252. PyObject *__pyx_r = NULL;
  130253. __Pyx_RefNannyDeclarations
  130254. PyObject *__pyx_t_1 = NULL;
  130255. __Pyx_RefNannySetupContext("is_serving", 0);
  130256. /* "uvloop/server.pyx":97
  130257. *
  130258. * def is_serving(self):
  130259. * return self._serving # <<<<<<<<<<<<<<
  130260. *
  130261. * @cython.iterable_coroutine
  130262. */
  130263. __Pyx_XDECREF(__pyx_r);
  130264. __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->_serving); if (unlikely(!__pyx_t_1)) __PYX_ERR(24, 97, __pyx_L1_error)
  130265. __Pyx_GOTREF(__pyx_t_1);
  130266. __pyx_r = __pyx_t_1;
  130267. __pyx_t_1 = 0;
  130268. goto __pyx_L0;
  130269. /* "uvloop/server.pyx":96
  130270. * self._unref()
  130271. *
  130272. * def is_serving(self): # <<<<<<<<<<<<<<
  130273. * return self._serving
  130274. *
  130275. */
  130276. /* function exit code */
  130277. __pyx_L1_error:;
  130278. __Pyx_XDECREF(__pyx_t_1);
  130279. __Pyx_AddTraceback("uvloop.loop.Server.is_serving", __pyx_clineno, __pyx_lineno, __pyx_filename);
  130280. __pyx_r = NULL;
  130281. __pyx_L0:;
  130282. __Pyx_XGIVEREF(__pyx_r);
  130283. __Pyx_RefNannyFinishContext();
  130284. return __pyx_r;
  130285. }
  130286. static PyObject *__pyx_gb_6uvloop_4loop_6Server_21generator23(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
  130287. /* "uvloop/server.pyx":100
  130288. *
  130289. * @cython.iterable_coroutine
  130290. * async def start_serving(self): # <<<<<<<<<<<<<<
  130291. * self._start_serving()
  130292. *
  130293. */
  130294. /* Python wrapper */
  130295. static PyObject *__pyx_pw_6uvloop_4loop_6Server_20start_serving(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  130296. static char __pyx_doc_6uvloop_4loop_6Server_19start_serving[] = "Server.start_serving(self)";
  130297. static PyObject *__pyx_pw_6uvloop_4loop_6Server_20start_serving(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  130298. PyObject *__pyx_r = 0;
  130299. __Pyx_RefNannyDeclarations
  130300. __Pyx_RefNannySetupContext("start_serving (wrapper)", 0);
  130301. __pyx_r = __pyx_pf_6uvloop_4loop_6Server_19start_serving(((struct __pyx_obj_6uvloop_4loop_Server *)__pyx_v_self));
  130302. /* function exit code */
  130303. __Pyx_RefNannyFinishContext();
  130304. return __pyx_r;
  130305. }
  130306. static PyObject *__pyx_pf_6uvloop_4loop_6Server_19start_serving(struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_self) {
  130307. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_35_start_serving *__pyx_cur_scope;
  130308. PyObject *__pyx_r = NULL;
  130309. __Pyx_RefNannyDeclarations
  130310. __Pyx_RefNannySetupContext("start_serving", 0);
  130311. __pyx_cur_scope = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_35_start_serving *)__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_35_start_serving(__pyx_ptype_6uvloop_4loop___pyx_scope_struct_35_start_serving, __pyx_empty_tuple, NULL);
  130312. if (unlikely(!__pyx_cur_scope)) {
  130313. __pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_35_start_serving *)Py_None);
  130314. __Pyx_INCREF(Py_None);
  130315. __PYX_ERR(24, 100, __pyx_L1_error)
  130316. } else {
  130317. __Pyx_GOTREF(__pyx_cur_scope);
  130318. }
  130319. __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  130320. __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  130321. __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  130322. {
  130323. __pyx_CoroutineObject *gen = __Pyx_IterableCoroutine_New((__pyx_coroutine_body_t) __pyx_gb_6uvloop_4loop_6Server_21generator23, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_start_serving, __pyx_n_s_Server_start_serving, __pyx_n_s_uvloop_loop); if (unlikely(!gen)) __PYX_ERR(24, 100, __pyx_L1_error)
  130324. __Pyx_DECREF(__pyx_cur_scope);
  130325. __Pyx_RefNannyFinishContext();
  130326. return (PyObject *) gen;
  130327. }
  130328. /* function exit code */
  130329. __pyx_L1_error:;
  130330. __Pyx_AddTraceback("uvloop.loop.Server.start_serving", __pyx_clineno, __pyx_lineno, __pyx_filename);
  130331. __pyx_r = NULL;
  130332. __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  130333. __Pyx_XGIVEREF(__pyx_r);
  130334. __Pyx_RefNannyFinishContext();
  130335. return __pyx_r;
  130336. }
  130337. static PyObject *__pyx_gb_6uvloop_4loop_6Server_21generator23(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
  130338. {
  130339. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_35_start_serving *__pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_35_start_serving *)__pyx_generator->closure);
  130340. PyObject *__pyx_r = NULL;
  130341. PyObject *__pyx_t_1 = NULL;
  130342. __Pyx_RefNannyDeclarations
  130343. __Pyx_RefNannySetupContext("start_serving", 0);
  130344. switch (__pyx_generator->resume_label) {
  130345. case 0: goto __pyx_L3_first_run;
  130346. default: /* CPython raises the right error here */
  130347. __Pyx_RefNannyFinishContext();
  130348. return NULL;
  130349. }
  130350. __pyx_L3_first_run:;
  130351. if (unlikely(!__pyx_sent_value)) __PYX_ERR(24, 100, __pyx_L1_error)
  130352. /* "uvloop/server.pyx":101
  130353. * @cython.iterable_coroutine
  130354. * async def start_serving(self):
  130355. * self._start_serving() # <<<<<<<<<<<<<<
  130356. *
  130357. * @cython.iterable_coroutine
  130358. */
  130359. __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_Server *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->_start_serving(__pyx_cur_scope->__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(24, 101, __pyx_L1_error)
  130360. __Pyx_GOTREF(__pyx_t_1);
  130361. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  130362. CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
  130363. /* "uvloop/server.pyx":100
  130364. *
  130365. * @cython.iterable_coroutine
  130366. * async def start_serving(self): # <<<<<<<<<<<<<<
  130367. * self._start_serving()
  130368. *
  130369. */
  130370. /* function exit code */
  130371. PyErr_SetNone(PyExc_StopIteration);
  130372. goto __pyx_L0;
  130373. __pyx_L1_error:;
  130374. __Pyx_XDECREF(__pyx_t_1);
  130375. __Pyx_AddTraceback("start_serving", __pyx_clineno, __pyx_lineno, __pyx_filename);
  130376. __pyx_L0:;
  130377. __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  130378. #if !CYTHON_USE_EXC_INFO_STACK
  130379. __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  130380. #endif
  130381. __pyx_generator->resume_label = -1;
  130382. __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  130383. __Pyx_RefNannyFinishContext();
  130384. return __pyx_r;
  130385. }
  130386. static PyObject *__pyx_gb_6uvloop_4loop_6Server_24generator24(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
  130387. /* "uvloop/server.pyx":104
  130388. *
  130389. * @cython.iterable_coroutine
  130390. * async def serve_forever(self): # <<<<<<<<<<<<<<
  130391. * if self._serving_forever_fut is not None:
  130392. * raise RuntimeError(
  130393. */
  130394. /* Python wrapper */
  130395. static PyObject *__pyx_pw_6uvloop_4loop_6Server_23serve_forever(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  130396. static char __pyx_doc_6uvloop_4loop_6Server_22serve_forever[] = "Server.serve_forever(self)";
  130397. static PyObject *__pyx_pw_6uvloop_4loop_6Server_23serve_forever(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  130398. PyObject *__pyx_r = 0;
  130399. __Pyx_RefNannyDeclarations
  130400. __Pyx_RefNannySetupContext("serve_forever (wrapper)", 0);
  130401. __pyx_r = __pyx_pf_6uvloop_4loop_6Server_22serve_forever(((struct __pyx_obj_6uvloop_4loop_Server *)__pyx_v_self));
  130402. /* function exit code */
  130403. __Pyx_RefNannyFinishContext();
  130404. return __pyx_r;
  130405. }
  130406. static PyObject *__pyx_pf_6uvloop_4loop_6Server_22serve_forever(struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_self) {
  130407. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_36_serve_forever *__pyx_cur_scope;
  130408. PyObject *__pyx_r = NULL;
  130409. __Pyx_RefNannyDeclarations
  130410. __Pyx_RefNannySetupContext("serve_forever", 0);
  130411. __pyx_cur_scope = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_36_serve_forever *)__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_36_serve_forever(__pyx_ptype_6uvloop_4loop___pyx_scope_struct_36_serve_forever, __pyx_empty_tuple, NULL);
  130412. if (unlikely(!__pyx_cur_scope)) {
  130413. __pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_36_serve_forever *)Py_None);
  130414. __Pyx_INCREF(Py_None);
  130415. __PYX_ERR(24, 104, __pyx_L1_error)
  130416. } else {
  130417. __Pyx_GOTREF(__pyx_cur_scope);
  130418. }
  130419. __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  130420. __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  130421. __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  130422. {
  130423. __pyx_CoroutineObject *gen = __Pyx_IterableCoroutine_New((__pyx_coroutine_body_t) __pyx_gb_6uvloop_4loop_6Server_24generator24, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_serve_forever, __pyx_n_s_Server_serve_forever, __pyx_n_s_uvloop_loop); if (unlikely(!gen)) __PYX_ERR(24, 104, __pyx_L1_error)
  130424. __Pyx_DECREF(__pyx_cur_scope);
  130425. __Pyx_RefNannyFinishContext();
  130426. return (PyObject *) gen;
  130427. }
  130428. /* function exit code */
  130429. __pyx_L1_error:;
  130430. __Pyx_AddTraceback("uvloop.loop.Server.serve_forever", __pyx_clineno, __pyx_lineno, __pyx_filename);
  130431. __pyx_r = NULL;
  130432. __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  130433. __Pyx_XGIVEREF(__pyx_r);
  130434. __Pyx_RefNannyFinishContext();
  130435. return __pyx_r;
  130436. }
  130437. static PyObject *__pyx_gb_6uvloop_4loop_6Server_24generator24(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
  130438. {
  130439. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_36_serve_forever *__pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_36_serve_forever *)__pyx_generator->closure);
  130440. PyObject *__pyx_r = NULL;
  130441. int __pyx_t_1;
  130442. int __pyx_t_2;
  130443. PyObject *__pyx_t_3 = NULL;
  130444. Py_ssize_t __pyx_t_4;
  130445. Py_UCS4 __pyx_t_5;
  130446. PyObject *__pyx_t_6 = NULL;
  130447. PyObject *__pyx_t_7 = NULL;
  130448. PyObject *__pyx_t_8 = NULL;
  130449. PyObject *__pyx_t_9 = NULL;
  130450. PyObject *__pyx_t_10 = NULL;
  130451. PyObject *__pyx_t_11 = NULL;
  130452. PyObject *__pyx_t_12 = NULL;
  130453. int __pyx_t_13;
  130454. PyObject *__pyx_t_14 = NULL;
  130455. PyObject *__pyx_t_15 = NULL;
  130456. PyObject *__pyx_t_16 = NULL;
  130457. PyObject *__pyx_t_17 = NULL;
  130458. PyObject *__pyx_t_18 = NULL;
  130459. PyObject *__pyx_t_19 = NULL;
  130460. PyObject *__pyx_t_20 = NULL;
  130461. int __pyx_t_21;
  130462. char const *__pyx_t_22;
  130463. __Pyx_RefNannyDeclarations
  130464. __Pyx_RefNannySetupContext("serve_forever", 0);
  130465. switch (__pyx_generator->resume_label) {
  130466. case 0: goto __pyx_L3_first_run;
  130467. case 1: goto __pyx_L15_resume_from_await;
  130468. case 2: goto __pyx_L23_resume_from_await;
  130469. default: /* CPython raises the right error here */
  130470. __Pyx_RefNannyFinishContext();
  130471. return NULL;
  130472. }
  130473. __pyx_L3_first_run:;
  130474. if (unlikely(!__pyx_sent_value)) __PYX_ERR(24, 104, __pyx_L1_error)
  130475. /* "uvloop/server.pyx":105
  130476. * @cython.iterable_coroutine
  130477. * async def serve_forever(self):
  130478. * if self._serving_forever_fut is not None: # <<<<<<<<<<<<<<
  130479. * raise RuntimeError(
  130480. * f'server {self!r} is already being awaited on serve_forever()')
  130481. */
  130482. __pyx_t_1 = (__pyx_cur_scope->__pyx_v_self->_serving_forever_fut != Py_None);
  130483. __pyx_t_2 = (__pyx_t_1 != 0);
  130484. if (unlikely(__pyx_t_2)) {
  130485. /* "uvloop/server.pyx":107
  130486. * if self._serving_forever_fut is not None:
  130487. * raise RuntimeError(
  130488. * f'server {self!r} is already being awaited on serve_forever()') # <<<<<<<<<<<<<<
  130489. * if self._servers is None:
  130490. * raise RuntimeError(f'server {self!r} is closed')
  130491. */
  130492. __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(24, 107, __pyx_L1_error)
  130493. __Pyx_GOTREF(__pyx_t_3);
  130494. __pyx_t_4 = 0;
  130495. __pyx_t_5 = 127;
  130496. __Pyx_INCREF(__pyx_kp_u_server);
  130497. __pyx_t_4 += 7;
  130498. __Pyx_GIVEREF(__pyx_kp_u_server);
  130499. PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_server);
  130500. __pyx_t_6 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(((PyObject *)__pyx_cur_scope->__pyx_v_self)), __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(24, 107, __pyx_L1_error)
  130501. __Pyx_GOTREF(__pyx_t_6);
  130502. __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_5;
  130503. __pyx_t_4 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
  130504. __Pyx_GIVEREF(__pyx_t_6);
  130505. PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_6);
  130506. __pyx_t_6 = 0;
  130507. __Pyx_INCREF(__pyx_kp_u_is_already_being_awaited_on_ser);
  130508. __pyx_t_4 += 44;
  130509. __Pyx_GIVEREF(__pyx_kp_u_is_already_being_awaited_on_ser);
  130510. PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u_is_already_being_awaited_on_ser);
  130511. __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_3, 3, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(24, 107, __pyx_L1_error)
  130512. __Pyx_GOTREF(__pyx_t_6);
  130513. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  130514. /* "uvloop/server.pyx":106
  130515. * async def serve_forever(self):
  130516. * if self._serving_forever_fut is not None:
  130517. * raise RuntimeError( # <<<<<<<<<<<<<<
  130518. * f'server {self!r} is already being awaited on serve_forever()')
  130519. * if self._servers is None:
  130520. */
  130521. __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(24, 106, __pyx_L1_error)
  130522. __Pyx_GOTREF(__pyx_t_3);
  130523. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  130524. __Pyx_Raise(__pyx_t_3, 0, 0, 0);
  130525. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  130526. __PYX_ERR(24, 106, __pyx_L1_error)
  130527. /* "uvloop/server.pyx":105
  130528. * @cython.iterable_coroutine
  130529. * async def serve_forever(self):
  130530. * if self._serving_forever_fut is not None: # <<<<<<<<<<<<<<
  130531. * raise RuntimeError(
  130532. * f'server {self!r} is already being awaited on serve_forever()')
  130533. */
  130534. }
  130535. /* "uvloop/server.pyx":108
  130536. * raise RuntimeError(
  130537. * f'server {self!r} is already being awaited on serve_forever()')
  130538. * if self._servers is None: # <<<<<<<<<<<<<<
  130539. * raise RuntimeError(f'server {self!r} is closed')
  130540. *
  130541. */
  130542. __pyx_t_2 = (__pyx_cur_scope->__pyx_v_self->_servers == ((PyObject*)Py_None));
  130543. __pyx_t_1 = (__pyx_t_2 != 0);
  130544. if (unlikely(__pyx_t_1)) {
  130545. /* "uvloop/server.pyx":109
  130546. * f'server {self!r} is already being awaited on serve_forever()')
  130547. * if self._servers is None:
  130548. * raise RuntimeError(f'server {self!r} is closed') # <<<<<<<<<<<<<<
  130549. *
  130550. * self._start_serving()
  130551. */
  130552. __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(24, 109, __pyx_L1_error)
  130553. __Pyx_GOTREF(__pyx_t_3);
  130554. __pyx_t_4 = 0;
  130555. __pyx_t_5 = 127;
  130556. __Pyx_INCREF(__pyx_kp_u_server);
  130557. __pyx_t_4 += 7;
  130558. __Pyx_GIVEREF(__pyx_kp_u_server);
  130559. PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_server);
  130560. __pyx_t_6 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(((PyObject *)__pyx_cur_scope->__pyx_v_self)), __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(24, 109, __pyx_L1_error)
  130561. __Pyx_GOTREF(__pyx_t_6);
  130562. __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_5;
  130563. __pyx_t_4 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
  130564. __Pyx_GIVEREF(__pyx_t_6);
  130565. PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_6);
  130566. __pyx_t_6 = 0;
  130567. __Pyx_INCREF(__pyx_kp_u_is_closed_2);
  130568. __pyx_t_4 += 10;
  130569. __Pyx_GIVEREF(__pyx_kp_u_is_closed_2);
  130570. PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u_is_closed_2);
  130571. __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_3, 3, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(24, 109, __pyx_L1_error)
  130572. __Pyx_GOTREF(__pyx_t_6);
  130573. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  130574. __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(24, 109, __pyx_L1_error)
  130575. __Pyx_GOTREF(__pyx_t_3);
  130576. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  130577. __Pyx_Raise(__pyx_t_3, 0, 0, 0);
  130578. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  130579. __PYX_ERR(24, 109, __pyx_L1_error)
  130580. /* "uvloop/server.pyx":108
  130581. * raise RuntimeError(
  130582. * f'server {self!r} is already being awaited on serve_forever()')
  130583. * if self._servers is None: # <<<<<<<<<<<<<<
  130584. * raise RuntimeError(f'server {self!r} is closed')
  130585. *
  130586. */
  130587. }
  130588. /* "uvloop/server.pyx":111
  130589. * raise RuntimeError(f'server {self!r} is closed')
  130590. *
  130591. * self._start_serving() # <<<<<<<<<<<<<<
  130592. * self._serving_forever_fut = self._loop.create_future()
  130593. *
  130594. */
  130595. __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_Server *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->_start_serving(__pyx_cur_scope->__pyx_v_self); if (unlikely(!__pyx_t_3)) __PYX_ERR(24, 111, __pyx_L1_error)
  130596. __Pyx_GOTREF(__pyx_t_3);
  130597. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  130598. /* "uvloop/server.pyx":112
  130599. *
  130600. * self._start_serving()
  130601. * self._serving_forever_fut = self._loop.create_future() # <<<<<<<<<<<<<<
  130602. *
  130603. * try:
  130604. */
  130605. __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self->_loop), __pyx_n_s_create_future); if (unlikely(!__pyx_t_6)) __PYX_ERR(24, 112, __pyx_L1_error)
  130606. __Pyx_GOTREF(__pyx_t_6);
  130607. __pyx_t_7 = NULL;
  130608. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
  130609. __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
  130610. if (likely(__pyx_t_7)) {
  130611. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
  130612. __Pyx_INCREF(__pyx_t_7);
  130613. __Pyx_INCREF(function);
  130614. __Pyx_DECREF_SET(__pyx_t_6, function);
  130615. }
  130616. }
  130617. __pyx_t_3 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
  130618. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  130619. if (unlikely(!__pyx_t_3)) __PYX_ERR(24, 112, __pyx_L1_error)
  130620. __Pyx_GOTREF(__pyx_t_3);
  130621. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  130622. __Pyx_GIVEREF(__pyx_t_3);
  130623. __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_self->_serving_forever_fut);
  130624. __Pyx_DECREF(__pyx_cur_scope->__pyx_v_self->_serving_forever_fut);
  130625. __pyx_cur_scope->__pyx_v_self->_serving_forever_fut = __pyx_t_3;
  130626. __pyx_t_3 = 0;
  130627. /* "uvloop/server.pyx":114
  130628. * self._serving_forever_fut = self._loop.create_future()
  130629. *
  130630. * try: # <<<<<<<<<<<<<<
  130631. * await self._serving_forever_fut
  130632. * except asyncio.CancelledError:
  130633. */
  130634. /*try:*/ {
  130635. {
  130636. __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
  130637. __Pyx_XGOTREF(__pyx_t_8);
  130638. __Pyx_XGOTREF(__pyx_t_9);
  130639. __Pyx_XGOTREF(__pyx_t_10);
  130640. /*try:*/ {
  130641. /* "uvloop/server.pyx":115
  130642. *
  130643. * try:
  130644. * await self._serving_forever_fut # <<<<<<<<<<<<<<
  130645. * except asyncio.CancelledError:
  130646. * try:
  130647. */
  130648. __pyx_r = __Pyx_Coroutine_Yield_From(__pyx_generator, __pyx_cur_scope->__pyx_v_self->_serving_forever_fut);
  130649. __Pyx_XGOTREF(__pyx_r);
  130650. if (likely(__pyx_r)) {
  130651. __Pyx_XGIVEREF(__pyx_t_8);
  130652. __pyx_cur_scope->__pyx_t_0 = __pyx_t_8;
  130653. __Pyx_XGIVEREF(__pyx_t_9);
  130654. __pyx_cur_scope->__pyx_t_1 = __pyx_t_9;
  130655. __Pyx_XGIVEREF(__pyx_t_10);
  130656. __pyx_cur_scope->__pyx_t_2 = __pyx_t_10;
  130657. __Pyx_XGIVEREF(__pyx_r);
  130658. __Pyx_RefNannyFinishContext();
  130659. __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  130660. /* return from generator, awaiting value */
  130661. __pyx_generator->resume_label = 1;
  130662. return __pyx_r;
  130663. __pyx_L15_resume_from_await:;
  130664. __pyx_t_8 = __pyx_cur_scope->__pyx_t_0;
  130665. __pyx_cur_scope->__pyx_t_0 = 0;
  130666. __Pyx_XGOTREF(__pyx_t_8);
  130667. __pyx_t_9 = __pyx_cur_scope->__pyx_t_1;
  130668. __pyx_cur_scope->__pyx_t_1 = 0;
  130669. __Pyx_XGOTREF(__pyx_t_9);
  130670. __pyx_t_10 = __pyx_cur_scope->__pyx_t_2;
  130671. __pyx_cur_scope->__pyx_t_2 = 0;
  130672. __Pyx_XGOTREF(__pyx_t_10);
  130673. if (unlikely(!__pyx_sent_value)) __PYX_ERR(24, 115, __pyx_L9_error)
  130674. } else {
  130675. PyObject* exc_type = __Pyx_PyErr_Occurred();
  130676. if (exc_type) {
  130677. if (likely(exc_type == PyExc_StopIteration || (exc_type != PyExc_GeneratorExit && __Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)))) PyErr_Clear();
  130678. else __PYX_ERR(24, 115, __pyx_L9_error)
  130679. }
  130680. }
  130681. /* "uvloop/server.pyx":114
  130682. * self._serving_forever_fut = self._loop.create_future()
  130683. *
  130684. * try: # <<<<<<<<<<<<<<
  130685. * await self._serving_forever_fut
  130686. * except asyncio.CancelledError:
  130687. */
  130688. }
  130689. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  130690. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  130691. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  130692. goto __pyx_L14_try_end;
  130693. __pyx_L9_error:;
  130694. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  130695. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  130696. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  130697. /* "uvloop/server.pyx":116
  130698. * try:
  130699. * await self._serving_forever_fut
  130700. * except asyncio.CancelledError: # <<<<<<<<<<<<<<
  130701. * try:
  130702. * self.close()
  130703. */
  130704. __Pyx_ErrFetch(&__pyx_t_3, &__pyx_t_6, &__pyx_t_7);
  130705. __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_11)) __PYX_ERR(24, 116, __pyx_L11_except_error)
  130706. __Pyx_GOTREF(__pyx_t_11);
  130707. __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_CancelledError); if (unlikely(!__pyx_t_12)) __PYX_ERR(24, 116, __pyx_L11_except_error)
  130708. __Pyx_GOTREF(__pyx_t_12);
  130709. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  130710. __pyx_t_13 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_3, __pyx_t_12);
  130711. __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  130712. __Pyx_ErrRestore(__pyx_t_3, __pyx_t_6, __pyx_t_7);
  130713. __pyx_t_3 = 0; __pyx_t_6 = 0; __pyx_t_7 = 0;
  130714. if (__pyx_t_13) {
  130715. __Pyx_AddTraceback("uvloop.loop.Server.serve_forever", __pyx_clineno, __pyx_lineno, __pyx_filename);
  130716. if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_6, &__pyx_t_3) < 0) __PYX_ERR(24, 116, __pyx_L11_except_error)
  130717. __Pyx_GOTREF(__pyx_t_7);
  130718. __Pyx_GOTREF(__pyx_t_6);
  130719. __Pyx_GOTREF(__pyx_t_3);
  130720. /* "uvloop/server.pyx":117
  130721. * await self._serving_forever_fut
  130722. * except asyncio.CancelledError:
  130723. * try: # <<<<<<<<<<<<<<
  130724. * self.close()
  130725. * await self.wait_closed()
  130726. */
  130727. /*try:*/ {
  130728. /* "uvloop/server.pyx":118
  130729. * except asyncio.CancelledError:
  130730. * try:
  130731. * self.close() # <<<<<<<<<<<<<<
  130732. * await self.wait_closed()
  130733. * finally:
  130734. */
  130735. __pyx_t_11 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_close); if (unlikely(!__pyx_t_11)) __PYX_ERR(24, 118, __pyx_L21_error)
  130736. __Pyx_GOTREF(__pyx_t_11);
  130737. __pyx_t_14 = NULL;
  130738. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) {
  130739. __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_11);
  130740. if (likely(__pyx_t_14)) {
  130741. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
  130742. __Pyx_INCREF(__pyx_t_14);
  130743. __Pyx_INCREF(function);
  130744. __Pyx_DECREF_SET(__pyx_t_11, function);
  130745. }
  130746. }
  130747. __pyx_t_12 = (__pyx_t_14) ? __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_14) : __Pyx_PyObject_CallNoArg(__pyx_t_11);
  130748. __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
  130749. if (unlikely(!__pyx_t_12)) __PYX_ERR(24, 118, __pyx_L21_error)
  130750. __Pyx_GOTREF(__pyx_t_12);
  130751. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  130752. __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  130753. /* "uvloop/server.pyx":119
  130754. * try:
  130755. * self.close()
  130756. * await self.wait_closed() # <<<<<<<<<<<<<<
  130757. * finally:
  130758. * raise
  130759. */
  130760. __pyx_t_11 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_wait_closed); if (unlikely(!__pyx_t_11)) __PYX_ERR(24, 119, __pyx_L21_error)
  130761. __Pyx_GOTREF(__pyx_t_11);
  130762. __pyx_t_14 = NULL;
  130763. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) {
  130764. __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_11);
  130765. if (likely(__pyx_t_14)) {
  130766. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
  130767. __Pyx_INCREF(__pyx_t_14);
  130768. __Pyx_INCREF(function);
  130769. __Pyx_DECREF_SET(__pyx_t_11, function);
  130770. }
  130771. }
  130772. __pyx_t_12 = (__pyx_t_14) ? __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_14) : __Pyx_PyObject_CallNoArg(__pyx_t_11);
  130773. __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
  130774. if (unlikely(!__pyx_t_12)) __PYX_ERR(24, 119, __pyx_L21_error)
  130775. __Pyx_GOTREF(__pyx_t_12);
  130776. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  130777. __pyx_r = __Pyx_Coroutine_Yield_From(__pyx_generator, __pyx_t_12);
  130778. __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  130779. __Pyx_XGOTREF(__pyx_r);
  130780. if (likely(__pyx_r)) {
  130781. __Pyx_XGIVEREF(__pyx_t_3);
  130782. __pyx_cur_scope->__pyx_t_0 = __pyx_t_3;
  130783. __Pyx_XGIVEREF(__pyx_t_6);
  130784. __pyx_cur_scope->__pyx_t_1 = __pyx_t_6;
  130785. __Pyx_XGIVEREF(__pyx_t_7);
  130786. __pyx_cur_scope->__pyx_t_2 = __pyx_t_7;
  130787. __Pyx_XGIVEREF(__pyx_t_8);
  130788. __pyx_cur_scope->__pyx_t_3 = __pyx_t_8;
  130789. __Pyx_XGIVEREF(__pyx_t_9);
  130790. __pyx_cur_scope->__pyx_t_4 = __pyx_t_9;
  130791. __Pyx_XGIVEREF(__pyx_t_10);
  130792. __pyx_cur_scope->__pyx_t_5 = __pyx_t_10;
  130793. __Pyx_XGIVEREF(__pyx_r);
  130794. __Pyx_RefNannyFinishContext();
  130795. __Pyx_Coroutine_SwapException(__pyx_generator);
  130796. /* return from generator, awaiting value */
  130797. __pyx_generator->resume_label = 2;
  130798. return __pyx_r;
  130799. __pyx_L23_resume_from_await:;
  130800. __pyx_t_3 = __pyx_cur_scope->__pyx_t_0;
  130801. __pyx_cur_scope->__pyx_t_0 = 0;
  130802. __Pyx_XGOTREF(__pyx_t_3);
  130803. __pyx_t_6 = __pyx_cur_scope->__pyx_t_1;
  130804. __pyx_cur_scope->__pyx_t_1 = 0;
  130805. __Pyx_XGOTREF(__pyx_t_6);
  130806. __pyx_t_7 = __pyx_cur_scope->__pyx_t_2;
  130807. __pyx_cur_scope->__pyx_t_2 = 0;
  130808. __Pyx_XGOTREF(__pyx_t_7);
  130809. __pyx_t_8 = __pyx_cur_scope->__pyx_t_3;
  130810. __pyx_cur_scope->__pyx_t_3 = 0;
  130811. __Pyx_XGOTREF(__pyx_t_8);
  130812. __pyx_t_9 = __pyx_cur_scope->__pyx_t_4;
  130813. __pyx_cur_scope->__pyx_t_4 = 0;
  130814. __Pyx_XGOTREF(__pyx_t_9);
  130815. __pyx_t_10 = __pyx_cur_scope->__pyx_t_5;
  130816. __pyx_cur_scope->__pyx_t_5 = 0;
  130817. __Pyx_XGOTREF(__pyx_t_10);
  130818. if (unlikely(!__pyx_sent_value)) __PYX_ERR(24, 119, __pyx_L21_error)
  130819. } else {
  130820. PyObject* exc_type = __Pyx_PyErr_Occurred();
  130821. if (exc_type) {
  130822. if (likely(exc_type == PyExc_StopIteration || (exc_type != PyExc_GeneratorExit && __Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)))) PyErr_Clear();
  130823. else __PYX_ERR(24, 119, __pyx_L21_error)
  130824. }
  130825. }
  130826. }
  130827. /* "uvloop/server.pyx":121
  130828. * await self.wait_closed()
  130829. * finally:
  130830. * raise # <<<<<<<<<<<<<<
  130831. * finally:
  130832. * self._serving_forever_fut = None
  130833. */
  130834. /*finally:*/ {
  130835. /*normal exit:*/{
  130836. __Pyx_GIVEREF(__pyx_t_7);
  130837. __Pyx_GIVEREF(__pyx_t_6);
  130838. __Pyx_XGIVEREF(__pyx_t_3);
  130839. __Pyx_ErrRestoreWithState(__pyx_t_7, __pyx_t_6, __pyx_t_3);
  130840. __pyx_t_7 = 0; __pyx_t_6 = 0; __pyx_t_3 = 0;
  130841. __PYX_ERR(24, 121, __pyx_L11_except_error)
  130842. }
  130843. __pyx_L21_error:;
  130844. /*exception exit:*/{
  130845. __Pyx_PyThreadState_assign
  130846. __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0;
  130847. __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
  130848. __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
  130849. __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
  130850. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20);
  130851. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17) < 0)) __Pyx_ErrFetch(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17);
  130852. __Pyx_XGOTREF(__pyx_t_15);
  130853. __Pyx_XGOTREF(__pyx_t_16);
  130854. __Pyx_XGOTREF(__pyx_t_17);
  130855. __Pyx_XGOTREF(__pyx_t_18);
  130856. __Pyx_XGOTREF(__pyx_t_19);
  130857. __Pyx_XGOTREF(__pyx_t_20);
  130858. {
  130859. __Pyx_GIVEREF(__pyx_t_15);
  130860. __Pyx_GIVEREF(__pyx_t_16);
  130861. __Pyx_XGIVEREF(__pyx_t_17);
  130862. __Pyx_ErrRestoreWithState(__pyx_t_15, __pyx_t_16, __pyx_t_17);
  130863. __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0;
  130864. __PYX_ERR(24, 121, __pyx_L27_error)
  130865. }
  130866. __pyx_L27_error:;
  130867. if (PY_MAJOR_VERSION >= 3) {
  130868. __Pyx_XGIVEREF(__pyx_t_18);
  130869. __Pyx_XGIVEREF(__pyx_t_19);
  130870. __Pyx_XGIVEREF(__pyx_t_20);
  130871. __Pyx_ExceptionReset(__pyx_t_18, __pyx_t_19, __pyx_t_20);
  130872. }
  130873. __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
  130874. __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
  130875. __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
  130876. __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0;
  130877. goto __pyx_L11_except_error;
  130878. }
  130879. }
  130880. }
  130881. goto __pyx_L11_except_error;
  130882. __pyx_L11_except_error:;
  130883. /* "uvloop/server.pyx":114
  130884. * self._serving_forever_fut = self._loop.create_future()
  130885. *
  130886. * try: # <<<<<<<<<<<<<<
  130887. * await self._serving_forever_fut
  130888. * except asyncio.CancelledError:
  130889. */
  130890. __Pyx_XGIVEREF(__pyx_t_8);
  130891. __Pyx_XGIVEREF(__pyx_t_9);
  130892. __Pyx_XGIVEREF(__pyx_t_10);
  130893. __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
  130894. goto __pyx_L7_error;
  130895. __pyx_L14_try_end:;
  130896. }
  130897. }
  130898. /* "uvloop/server.pyx":123
  130899. * raise
  130900. * finally:
  130901. * self._serving_forever_fut = None # <<<<<<<<<<<<<<
  130902. *
  130903. * property sockets:
  130904. */
  130905. /*finally:*/ {
  130906. /*normal exit:*/{
  130907. __Pyx_INCREF(Py_None);
  130908. __Pyx_GIVEREF(Py_None);
  130909. __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_self->_serving_forever_fut);
  130910. __Pyx_DECREF(__pyx_cur_scope->__pyx_v_self->_serving_forever_fut);
  130911. __pyx_cur_scope->__pyx_v_self->_serving_forever_fut = Py_None;
  130912. goto __pyx_L8;
  130913. }
  130914. __pyx_L7_error:;
  130915. /*exception exit:*/{
  130916. __Pyx_PyThreadState_assign
  130917. __pyx_t_10 = 0; __pyx_t_9 = 0; __pyx_t_8 = 0; __pyx_t_20 = 0; __pyx_t_19 = 0; __pyx_t_18 = 0;
  130918. __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
  130919. __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
  130920. __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
  130921. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  130922. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  130923. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  130924. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_20, &__pyx_t_19, &__pyx_t_18);
  130925. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8) < 0)) __Pyx_ErrFetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8);
  130926. __Pyx_XGOTREF(__pyx_t_10);
  130927. __Pyx_XGOTREF(__pyx_t_9);
  130928. __Pyx_XGOTREF(__pyx_t_8);
  130929. __Pyx_XGOTREF(__pyx_t_20);
  130930. __Pyx_XGOTREF(__pyx_t_19);
  130931. __Pyx_XGOTREF(__pyx_t_18);
  130932. __pyx_t_13 = __pyx_lineno; __pyx_t_21 = __pyx_clineno; __pyx_t_22 = __pyx_filename;
  130933. {
  130934. __Pyx_INCREF(Py_None);
  130935. __Pyx_GIVEREF(Py_None);
  130936. __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_self->_serving_forever_fut);
  130937. __Pyx_DECREF(__pyx_cur_scope->__pyx_v_self->_serving_forever_fut);
  130938. __pyx_cur_scope->__pyx_v_self->_serving_forever_fut = Py_None;
  130939. }
  130940. if (PY_MAJOR_VERSION >= 3) {
  130941. __Pyx_XGIVEREF(__pyx_t_20);
  130942. __Pyx_XGIVEREF(__pyx_t_19);
  130943. __Pyx_XGIVEREF(__pyx_t_18);
  130944. __Pyx_ExceptionReset(__pyx_t_20, __pyx_t_19, __pyx_t_18);
  130945. }
  130946. __Pyx_XGIVEREF(__pyx_t_10);
  130947. __Pyx_XGIVEREF(__pyx_t_9);
  130948. __Pyx_XGIVEREF(__pyx_t_8);
  130949. __Pyx_ErrRestore(__pyx_t_10, __pyx_t_9, __pyx_t_8);
  130950. __pyx_t_10 = 0; __pyx_t_9 = 0; __pyx_t_8 = 0; __pyx_t_20 = 0; __pyx_t_19 = 0; __pyx_t_18 = 0;
  130951. __pyx_lineno = __pyx_t_13; __pyx_clineno = __pyx_t_21; __pyx_filename = __pyx_t_22;
  130952. goto __pyx_L1_error;
  130953. }
  130954. __pyx_L8:;
  130955. }
  130956. CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
  130957. /* "uvloop/server.pyx":104
  130958. *
  130959. * @cython.iterable_coroutine
  130960. * async def serve_forever(self): # <<<<<<<<<<<<<<
  130961. * if self._serving_forever_fut is not None:
  130962. * raise RuntimeError(
  130963. */
  130964. /* function exit code */
  130965. PyErr_SetNone(PyExc_StopIteration);
  130966. goto __pyx_L0;
  130967. __pyx_L1_error:;
  130968. __Pyx_XDECREF(__pyx_t_3);
  130969. __Pyx_XDECREF(__pyx_t_6);
  130970. __Pyx_XDECREF(__pyx_t_7);
  130971. __Pyx_XDECREF(__pyx_t_11);
  130972. __Pyx_XDECREF(__pyx_t_12);
  130973. __Pyx_XDECREF(__pyx_t_14);
  130974. __Pyx_AddTraceback("serve_forever", __pyx_clineno, __pyx_lineno, __pyx_filename);
  130975. __pyx_L0:;
  130976. __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  130977. #if !CYTHON_USE_EXC_INFO_STACK
  130978. __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  130979. #endif
  130980. __pyx_generator->resume_label = -1;
  130981. __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  130982. __Pyx_RefNannyFinishContext();
  130983. return __pyx_r;
  130984. }
  130985. /* "uvloop/server.pyx":126
  130986. *
  130987. * property sockets:
  130988. * def __get__(self): # <<<<<<<<<<<<<<
  130989. * cdef list sockets = []
  130990. *
  130991. */
  130992. /* Python wrapper */
  130993. static PyObject *__pyx_pw_6uvloop_4loop_6Server_7sockets_1__get__(PyObject *__pyx_v_self); /*proto*/
  130994. static PyObject *__pyx_pw_6uvloop_4loop_6Server_7sockets_1__get__(PyObject *__pyx_v_self) {
  130995. PyObject *__pyx_r = 0;
  130996. __Pyx_RefNannyDeclarations
  130997. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  130998. __pyx_r = __pyx_pf_6uvloop_4loop_6Server_7sockets___get__(((struct __pyx_obj_6uvloop_4loop_Server *)__pyx_v_self));
  130999. /* function exit code */
  131000. __Pyx_RefNannyFinishContext();
  131001. return __pyx_r;
  131002. }
  131003. static PyObject *__pyx_pf_6uvloop_4loop_6Server_7sockets___get__(struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_self) {
  131004. PyObject *__pyx_v_sockets = 0;
  131005. PyObject *__pyx_v_server = NULL;
  131006. PyObject *__pyx_r = NULL;
  131007. __Pyx_RefNannyDeclarations
  131008. PyObject *__pyx_t_1 = NULL;
  131009. int __pyx_t_2;
  131010. Py_ssize_t __pyx_t_3;
  131011. PyObject *__pyx_t_4 = NULL;
  131012. int __pyx_t_5;
  131013. __Pyx_RefNannySetupContext("__get__", 0);
  131014. /* "uvloop/server.pyx":127
  131015. * property sockets:
  131016. * def __get__(self):
  131017. * cdef list sockets = [] # <<<<<<<<<<<<<<
  131018. *
  131019. * # Guard against `self._servers is None`
  131020. */
  131021. __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(24, 127, __pyx_L1_error)
  131022. __Pyx_GOTREF(__pyx_t_1);
  131023. __pyx_v_sockets = ((PyObject*)__pyx_t_1);
  131024. __pyx_t_1 = 0;
  131025. /* "uvloop/server.pyx":130
  131026. *
  131027. * # Guard against `self._servers is None`
  131028. * if self._servers: # <<<<<<<<<<<<<<
  131029. * for server in self._servers:
  131030. * sockets.append(
  131031. */
  131032. __pyx_t_2 = (__pyx_v_self->_servers != Py_None)&&(PyList_GET_SIZE(__pyx_v_self->_servers) != 0);
  131033. if (__pyx_t_2) {
  131034. /* "uvloop/server.pyx":131
  131035. * # Guard against `self._servers is None`
  131036. * if self._servers:
  131037. * for server in self._servers: # <<<<<<<<<<<<<<
  131038. * sockets.append(
  131039. * (<UVStreamServer>server)._get_socket()
  131040. */
  131041. if (unlikely(__pyx_v_self->_servers == Py_None)) {
  131042. PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
  131043. __PYX_ERR(24, 131, __pyx_L1_error)
  131044. }
  131045. __pyx_t_1 = __pyx_v_self->_servers; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0;
  131046. for (;;) {
  131047. if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
  131048. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  131049. __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(24, 131, __pyx_L1_error)
  131050. #else
  131051. __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) __PYX_ERR(24, 131, __pyx_L1_error)
  131052. __Pyx_GOTREF(__pyx_t_4);
  131053. #endif
  131054. __Pyx_XDECREF_SET(__pyx_v_server, __pyx_t_4);
  131055. __pyx_t_4 = 0;
  131056. /* "uvloop/server.pyx":133
  131057. * for server in self._servers:
  131058. * sockets.append(
  131059. * (<UVStreamServer>server)._get_socket() # <<<<<<<<<<<<<<
  131060. * )
  131061. *
  131062. */
  131063. __pyx_t_4 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStreamServer *)((struct __pyx_obj_6uvloop_4loop_UVStreamServer *)__pyx_v_server)->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._get_socket(((struct __pyx_obj_6uvloop_4loop_UVSocketHandle *)((struct __pyx_obj_6uvloop_4loop_UVStreamServer *)__pyx_v_server))); if (unlikely(!__pyx_t_4)) __PYX_ERR(24, 133, __pyx_L1_error)
  131064. __Pyx_GOTREF(__pyx_t_4);
  131065. /* "uvloop/server.pyx":132
  131066. * if self._servers:
  131067. * for server in self._servers:
  131068. * sockets.append( # <<<<<<<<<<<<<<
  131069. * (<UVStreamServer>server)._get_socket()
  131070. * )
  131071. */
  131072. __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_sockets, __pyx_t_4); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(24, 132, __pyx_L1_error)
  131073. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  131074. /* "uvloop/server.pyx":131
  131075. * # Guard against `self._servers is None`
  131076. * if self._servers:
  131077. * for server in self._servers: # <<<<<<<<<<<<<<
  131078. * sockets.append(
  131079. * (<UVStreamServer>server)._get_socket()
  131080. */
  131081. }
  131082. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  131083. /* "uvloop/server.pyx":130
  131084. *
  131085. * # Guard against `self._servers is None`
  131086. * if self._servers: # <<<<<<<<<<<<<<
  131087. * for server in self._servers:
  131088. * sockets.append(
  131089. */
  131090. }
  131091. /* "uvloop/server.pyx":136
  131092. * )
  131093. *
  131094. * return sockets # <<<<<<<<<<<<<<
  131095. */
  131096. __Pyx_XDECREF(__pyx_r);
  131097. __Pyx_INCREF(__pyx_v_sockets);
  131098. __pyx_r = __pyx_v_sockets;
  131099. goto __pyx_L0;
  131100. /* "uvloop/server.pyx":126
  131101. *
  131102. * property sockets:
  131103. * def __get__(self): # <<<<<<<<<<<<<<
  131104. * cdef list sockets = []
  131105. *
  131106. */
  131107. /* function exit code */
  131108. __pyx_L1_error:;
  131109. __Pyx_XDECREF(__pyx_t_1);
  131110. __Pyx_XDECREF(__pyx_t_4);
  131111. __Pyx_AddTraceback("uvloop.loop.Server.sockets.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  131112. __pyx_r = NULL;
  131113. __pyx_L0:;
  131114. __Pyx_XDECREF(__pyx_v_sockets);
  131115. __Pyx_XDECREF(__pyx_v_server);
  131116. __Pyx_XGIVEREF(__pyx_r);
  131117. __Pyx_RefNannyFinishContext();
  131118. return __pyx_r;
  131119. }
  131120. /* "(tree fragment)":1
  131121. * def __reduce_cython__(self): # <<<<<<<<<<<<<<
  131122. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  131123. * def __setstate_cython__(self, __pyx_state):
  131124. */
  131125. /* Python wrapper */
  131126. static PyObject *__pyx_pw_6uvloop_4loop_6Server_26__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  131127. static char __pyx_doc_6uvloop_4loop_6Server_25__reduce_cython__[] = "Server.__reduce_cython__(self)";
  131128. static PyObject *__pyx_pw_6uvloop_4loop_6Server_26__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  131129. PyObject *__pyx_r = 0;
  131130. __Pyx_RefNannyDeclarations
  131131. __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  131132. __pyx_r = __pyx_pf_6uvloop_4loop_6Server_25__reduce_cython__(((struct __pyx_obj_6uvloop_4loop_Server *)__pyx_v_self));
  131133. /* function exit code */
  131134. __Pyx_RefNannyFinishContext();
  131135. return __pyx_r;
  131136. }
  131137. static PyObject *__pyx_pf_6uvloop_4loop_6Server_25__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_self) {
  131138. PyObject *__pyx_r = NULL;
  131139. __Pyx_RefNannyDeclarations
  131140. PyObject *__pyx_t_1 = NULL;
  131141. __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  131142. /* "(tree fragment)":2
  131143. * def __reduce_cython__(self):
  131144. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  131145. * def __setstate_cython__(self, __pyx_state):
  131146. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  131147. */
  131148. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__215, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 2, __pyx_L1_error)
  131149. __Pyx_GOTREF(__pyx_t_1);
  131150. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  131151. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  131152. __PYX_ERR(9, 2, __pyx_L1_error)
  131153. /* "(tree fragment)":1
  131154. * def __reduce_cython__(self): # <<<<<<<<<<<<<<
  131155. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  131156. * def __setstate_cython__(self, __pyx_state):
  131157. */
  131158. /* function exit code */
  131159. __pyx_L1_error:;
  131160. __Pyx_XDECREF(__pyx_t_1);
  131161. __Pyx_AddTraceback("uvloop.loop.Server.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  131162. __pyx_r = NULL;
  131163. __Pyx_XGIVEREF(__pyx_r);
  131164. __Pyx_RefNannyFinishContext();
  131165. return __pyx_r;
  131166. }
  131167. /* "(tree fragment)":3
  131168. * def __reduce_cython__(self):
  131169. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  131170. * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
  131171. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  131172. */
  131173. /* Python wrapper */
  131174. static PyObject *__pyx_pw_6uvloop_4loop_6Server_28__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
  131175. static char __pyx_doc_6uvloop_4loop_6Server_27__setstate_cython__[] = "Server.__setstate_cython__(self, __pyx_state)";
  131176. static PyObject *__pyx_pw_6uvloop_4loop_6Server_28__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  131177. PyObject *__pyx_r = 0;
  131178. __Pyx_RefNannyDeclarations
  131179. __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  131180. __pyx_r = __pyx_pf_6uvloop_4loop_6Server_27__setstate_cython__(((struct __pyx_obj_6uvloop_4loop_Server *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
  131181. /* function exit code */
  131182. __Pyx_RefNannyFinishContext();
  131183. return __pyx_r;
  131184. }
  131185. static PyObject *__pyx_pf_6uvloop_4loop_6Server_27__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  131186. PyObject *__pyx_r = NULL;
  131187. __Pyx_RefNannyDeclarations
  131188. PyObject *__pyx_t_1 = NULL;
  131189. __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  131190. /* "(tree fragment)":4
  131191. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  131192. * def __setstate_cython__(self, __pyx_state):
  131193. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  131194. */
  131195. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__216, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 4, __pyx_L1_error)
  131196. __Pyx_GOTREF(__pyx_t_1);
  131197. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  131198. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  131199. __PYX_ERR(9, 4, __pyx_L1_error)
  131200. /* "(tree fragment)":3
  131201. * def __reduce_cython__(self):
  131202. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  131203. * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
  131204. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  131205. */
  131206. /* function exit code */
  131207. __pyx_L1_error:;
  131208. __Pyx_XDECREF(__pyx_t_1);
  131209. __Pyx_AddTraceback("uvloop.loop.Server.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  131210. __pyx_r = NULL;
  131211. __Pyx_XGIVEREF(__pyx_r);
  131212. __Pyx_RefNannyFinishContext();
  131213. return __pyx_r;
  131214. }
  131215. /* "uvloop/loop.pyx":3121
  131216. *
  131217. *
  131218. * cdef void __atfork_child() nogil: # <<<<<<<<<<<<<<
  131219. * # See CPython/posixmodule.c for details
  131220. * global __forking
  131221. */
  131222. static void __pyx_f_6uvloop_4loop___atfork_child(void) {
  131223. __Pyx_RefNannyDeclarations
  131224. int __pyx_t_1;
  131225. int __pyx_t_2;
  131226. int __pyx_t_3;
  131227. PyObject *__pyx_t_4 = NULL;
  131228. #ifdef WITH_THREAD
  131229. PyGILState_STATE __pyx_gilstate_save;
  131230. #endif
  131231. __Pyx_RefNannySetupContext("__atfork_child", 1);
  131232. /* "uvloop/loop.pyx":3123
  131233. * cdef void __atfork_child() nogil:
  131234. * # See CPython/posixmodule.c for details
  131235. * global __forking # <<<<<<<<<<<<<<
  131236. *
  131237. * with gil:
  131238. */
  131239. /*try:*/ {
  131240. /* "uvloop/loop.pyx":3125
  131241. * global __forking
  131242. *
  131243. * with gil: # <<<<<<<<<<<<<<
  131244. * if (__forking and
  131245. * __forking_loop is not None and
  131246. */
  131247. {
  131248. #ifdef WITH_THREAD
  131249. PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  131250. #endif
  131251. /*try:*/ {
  131252. /* "uvloop/loop.pyx":3126
  131253. *
  131254. * with gil:
  131255. * if (__forking and # <<<<<<<<<<<<<<
  131256. * __forking_loop is not None and
  131257. * __forking_loop.active_process_handler is not None):
  131258. */
  131259. __pyx_t_2 = (__pyx_v_6uvloop_4loop___forking != 0);
  131260. if (__pyx_t_2) {
  131261. } else {
  131262. __pyx_t_1 = __pyx_t_2;
  131263. goto __pyx_L10_bool_binop_done;
  131264. }
  131265. /* "uvloop/loop.pyx":3127
  131266. * with gil:
  131267. * if (__forking and
  131268. * __forking_loop is not None and # <<<<<<<<<<<<<<
  131269. * __forking_loop.active_process_handler is not None):
  131270. *
  131271. */
  131272. __pyx_t_2 = (((PyObject *)__pyx_v_6uvloop_4loop___forking_loop) != Py_None);
  131273. __pyx_t_3 = (__pyx_t_2 != 0);
  131274. if (__pyx_t_3) {
  131275. } else {
  131276. __pyx_t_1 = __pyx_t_3;
  131277. goto __pyx_L10_bool_binop_done;
  131278. }
  131279. /* "uvloop/loop.pyx":3128
  131280. * if (__forking and
  131281. * __forking_loop is not None and
  131282. * __forking_loop.active_process_handler is not None): # <<<<<<<<<<<<<<
  131283. *
  131284. * __forking_loop.active_process_handler._after_fork()
  131285. */
  131286. __pyx_t_3 = (((PyObject *)__pyx_v_6uvloop_4loop___forking_loop->active_process_handler) != Py_None);
  131287. __pyx_t_2 = (__pyx_t_3 != 0);
  131288. __pyx_t_1 = __pyx_t_2;
  131289. __pyx_L10_bool_binop_done:;
  131290. /* "uvloop/loop.pyx":3126
  131291. *
  131292. * with gil:
  131293. * if (__forking and # <<<<<<<<<<<<<<
  131294. * __forking_loop is not None and
  131295. * __forking_loop.active_process_handler is not None):
  131296. */
  131297. if (__pyx_t_1) {
  131298. /* "uvloop/loop.pyx":3130
  131299. * __forking_loop.active_process_handler is not None):
  131300. *
  131301. * __forking_loop.active_process_handler._after_fork() # <<<<<<<<<<<<<<
  131302. *
  131303. *
  131304. */
  131305. __pyx_t_4 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcess *)__pyx_v_6uvloop_4loop___forking_loop->active_process_handler->__pyx_base.__pyx_vtab)->_after_fork(__pyx_v_6uvloop_4loop___forking_loop->active_process_handler); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 3130, __pyx_L7_error)
  131306. __Pyx_GOTREF(__pyx_t_4);
  131307. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  131308. /* "uvloop/loop.pyx":3126
  131309. *
  131310. * with gil:
  131311. * if (__forking and # <<<<<<<<<<<<<<
  131312. * __forking_loop is not None and
  131313. * __forking_loop.active_process_handler is not None):
  131314. */
  131315. }
  131316. }
  131317. /* "uvloop/loop.pyx":3125
  131318. * global __forking
  131319. *
  131320. * with gil: # <<<<<<<<<<<<<<
  131321. * if (__forking and
  131322. * __forking_loop is not None and
  131323. */
  131324. /*finally:*/ {
  131325. /*normal exit:*/{
  131326. #ifdef WITH_THREAD
  131327. __Pyx_PyGILState_Release(__pyx_gilstate_save);
  131328. #endif
  131329. goto __pyx_L8;
  131330. }
  131331. __pyx_L7_error: {
  131332. #ifdef WITH_THREAD
  131333. __Pyx_PyGILState_Release(__pyx_gilstate_save);
  131334. #endif
  131335. goto __pyx_L4_error;
  131336. }
  131337. __pyx_L8:;
  131338. }
  131339. }
  131340. }
  131341. /* "uvloop/loop.pyx":3123
  131342. * cdef void __atfork_child() nogil:
  131343. * # See CPython/posixmodule.c for details
  131344. * global __forking # <<<<<<<<<<<<<<
  131345. *
  131346. * with gil:
  131347. */
  131348. /*finally:*/ {
  131349. /*normal exit:*/{
  131350. #ifdef WITH_THREAD
  131351. __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  131352. #endif
  131353. goto __pyx_L5;
  131354. }
  131355. __pyx_L4_error: {
  131356. #ifdef WITH_THREAD
  131357. __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  131358. #endif
  131359. goto __pyx_L1_error;
  131360. }
  131361. __pyx_L5:;
  131362. }
  131363. /* "uvloop/loop.pyx":3121
  131364. *
  131365. *
  131366. * cdef void __atfork_child() nogil: # <<<<<<<<<<<<<<
  131367. * # See CPython/posixmodule.c for details
  131368. * global __forking
  131369. */
  131370. /* function exit code */
  131371. goto __pyx_L0;
  131372. __pyx_L1_error:;
  131373. __Pyx_XDECREF(__pyx_t_4);
  131374. __Pyx_WriteUnraisable("uvloop.loop.__atfork_child", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1);
  131375. __pyx_L0:;
  131376. #ifdef WITH_THREAD
  131377. __Pyx_PyGILState_Release(__pyx_gilstate_save);
  131378. #endif
  131379. }
  131380. /* "uvloop/loop.pyx":3133
  131381. *
  131382. *
  131383. * cdef __install_atfork(): # <<<<<<<<<<<<<<
  131384. * global __atfork_installed
  131385. * if __atfork_installed:
  131386. */
  131387. static PyObject *__pyx_f_6uvloop_4loop___install_atfork(void) {
  131388. int __pyx_v_err;
  131389. PyObject *__pyx_r = NULL;
  131390. __Pyx_RefNannyDeclarations
  131391. int __pyx_t_1;
  131392. PyObject *__pyx_t_2 = NULL;
  131393. __Pyx_RefNannySetupContext("__install_atfork", 0);
  131394. /* "uvloop/loop.pyx":3135
  131395. * cdef __install_atfork():
  131396. * global __atfork_installed
  131397. * if __atfork_installed: # <<<<<<<<<<<<<<
  131398. * return
  131399. * __atfork_installed = 1
  131400. */
  131401. __pyx_t_1 = (__pyx_v_6uvloop_4loop___atfork_installed != 0);
  131402. if (__pyx_t_1) {
  131403. /* "uvloop/loop.pyx":3136
  131404. * global __atfork_installed
  131405. * if __atfork_installed:
  131406. * return # <<<<<<<<<<<<<<
  131407. * __atfork_installed = 1
  131408. *
  131409. */
  131410. __Pyx_XDECREF(__pyx_r);
  131411. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  131412. goto __pyx_L0;
  131413. /* "uvloop/loop.pyx":3135
  131414. * cdef __install_atfork():
  131415. * global __atfork_installed
  131416. * if __atfork_installed: # <<<<<<<<<<<<<<
  131417. * return
  131418. * __atfork_installed = 1
  131419. */
  131420. }
  131421. /* "uvloop/loop.pyx":3137
  131422. * if __atfork_installed:
  131423. * return
  131424. * __atfork_installed = 1 # <<<<<<<<<<<<<<
  131425. *
  131426. * cdef int err
  131427. */
  131428. __pyx_v_6uvloop_4loop___atfork_installed = 1;
  131429. /* "uvloop/loop.pyx":3141
  131430. * cdef int err
  131431. *
  131432. * err = system.pthread_atfork(NULL, NULL, &__atfork_child) # <<<<<<<<<<<<<<
  131433. * if err:
  131434. * __atfork_installed = 0
  131435. */
  131436. __pyx_v_err = pthread_atfork(NULL, NULL, (&__pyx_f_6uvloop_4loop___atfork_child));
  131437. /* "uvloop/loop.pyx":3142
  131438. *
  131439. * err = system.pthread_atfork(NULL, NULL, &__atfork_child)
  131440. * if err: # <<<<<<<<<<<<<<
  131441. * __atfork_installed = 0
  131442. * raise convert_error(-err)
  131443. */
  131444. __pyx_t_1 = (__pyx_v_err != 0);
  131445. if (unlikely(__pyx_t_1)) {
  131446. /* "uvloop/loop.pyx":3143
  131447. * err = system.pthread_atfork(NULL, NULL, &__atfork_child)
  131448. * if err:
  131449. * __atfork_installed = 0 # <<<<<<<<<<<<<<
  131450. * raise convert_error(-err)
  131451. *
  131452. */
  131453. __pyx_v_6uvloop_4loop___atfork_installed = 0;
  131454. /* "uvloop/loop.pyx":3144
  131455. * if err:
  131456. * __atfork_installed = 0
  131457. * raise convert_error(-err) # <<<<<<<<<<<<<<
  131458. *
  131459. *
  131460. */
  131461. __pyx_t_2 = __pyx_f_6uvloop_4loop_convert_error((-__pyx_v_err)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 3144, __pyx_L1_error)
  131462. __Pyx_GOTREF(__pyx_t_2);
  131463. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  131464. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  131465. __PYX_ERR(2, 3144, __pyx_L1_error)
  131466. /* "uvloop/loop.pyx":3142
  131467. *
  131468. * err = system.pthread_atfork(NULL, NULL, &__atfork_child)
  131469. * if err: # <<<<<<<<<<<<<<
  131470. * __atfork_installed = 0
  131471. * raise convert_error(-err)
  131472. */
  131473. }
  131474. /* "uvloop/loop.pyx":3133
  131475. *
  131476. *
  131477. * cdef __install_atfork(): # <<<<<<<<<<<<<<
  131478. * global __atfork_installed
  131479. * if __atfork_installed:
  131480. */
  131481. /* function exit code */
  131482. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  131483. goto __pyx_L0;
  131484. __pyx_L1_error:;
  131485. __Pyx_XDECREF(__pyx_t_2);
  131486. __Pyx_AddTraceback("uvloop.loop.__install_atfork", __pyx_clineno, __pyx_lineno, __pyx_filename);
  131487. __pyx_r = 0;
  131488. __pyx_L0:;
  131489. __Pyx_XGIVEREF(__pyx_r);
  131490. __Pyx_RefNannyFinishContext();
  131491. return __pyx_r;
  131492. }
  131493. /* "uvloop/loop.pyx":3149
  131494. * # Install PyMem* memory allocators
  131495. * cdef vint __mem_installed = 0
  131496. * cdef __install_pymem(): # <<<<<<<<<<<<<<
  131497. * global __mem_installed
  131498. * if __mem_installed:
  131499. */
  131500. static PyObject *__pyx_f_6uvloop_4loop___install_pymem(void) {
  131501. int __pyx_v_err;
  131502. PyObject *__pyx_r = NULL;
  131503. __Pyx_RefNannyDeclarations
  131504. int __pyx_t_1;
  131505. PyObject *__pyx_t_2 = NULL;
  131506. __Pyx_RefNannySetupContext("__install_pymem", 0);
  131507. /* "uvloop/loop.pyx":3151
  131508. * cdef __install_pymem():
  131509. * global __mem_installed
  131510. * if __mem_installed: # <<<<<<<<<<<<<<
  131511. * return
  131512. * __mem_installed = 1
  131513. */
  131514. __pyx_t_1 = (__pyx_v_6uvloop_4loop___mem_installed != 0);
  131515. if (__pyx_t_1) {
  131516. /* "uvloop/loop.pyx":3152
  131517. * global __mem_installed
  131518. * if __mem_installed:
  131519. * return # <<<<<<<<<<<<<<
  131520. * __mem_installed = 1
  131521. *
  131522. */
  131523. __Pyx_XDECREF(__pyx_r);
  131524. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  131525. goto __pyx_L0;
  131526. /* "uvloop/loop.pyx":3151
  131527. * cdef __install_pymem():
  131528. * global __mem_installed
  131529. * if __mem_installed: # <<<<<<<<<<<<<<
  131530. * return
  131531. * __mem_installed = 1
  131532. */
  131533. }
  131534. /* "uvloop/loop.pyx":3153
  131535. * if __mem_installed:
  131536. * return
  131537. * __mem_installed = 1 # <<<<<<<<<<<<<<
  131538. *
  131539. * cdef int err
  131540. */
  131541. __pyx_v_6uvloop_4loop___mem_installed = 1;
  131542. /* "uvloop/loop.pyx":3156
  131543. *
  131544. * cdef int err
  131545. * err = uv.uv_replace_allocator(<uv.uv_malloc_func>PyMem_RawMalloc, # <<<<<<<<<<<<<<
  131546. * <uv.uv_realloc_func>PyMem_RawRealloc,
  131547. * <uv.uv_calloc_func>PyMem_RawCalloc,
  131548. */
  131549. __pyx_v_err = uv_replace_allocator(((uv_malloc_func)PyMem_RawMalloc), ((uv_realloc_func)PyMem_RawRealloc), ((uv_calloc_func)PyMem_RawCalloc), ((uv_free_func)PyMem_RawFree));
  131550. /* "uvloop/loop.pyx":3160
  131551. * <uv.uv_calloc_func>PyMem_RawCalloc,
  131552. * <uv.uv_free_func>PyMem_RawFree)
  131553. * if err < 0: # <<<<<<<<<<<<<<
  131554. * __mem_installed = 0
  131555. * raise convert_error(err)
  131556. */
  131557. __pyx_t_1 = ((__pyx_v_err < 0) != 0);
  131558. if (unlikely(__pyx_t_1)) {
  131559. /* "uvloop/loop.pyx":3161
  131560. * <uv.uv_free_func>PyMem_RawFree)
  131561. * if err < 0:
  131562. * __mem_installed = 0 # <<<<<<<<<<<<<<
  131563. * raise convert_error(err)
  131564. *
  131565. */
  131566. __pyx_v_6uvloop_4loop___mem_installed = 0;
  131567. /* "uvloop/loop.pyx":3162
  131568. * if err < 0:
  131569. * __mem_installed = 0
  131570. * raise convert_error(err) # <<<<<<<<<<<<<<
  131571. *
  131572. *
  131573. */
  131574. __pyx_t_2 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 3162, __pyx_L1_error)
  131575. __Pyx_GOTREF(__pyx_t_2);
  131576. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  131577. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  131578. __PYX_ERR(2, 3162, __pyx_L1_error)
  131579. /* "uvloop/loop.pyx":3160
  131580. * <uv.uv_calloc_func>PyMem_RawCalloc,
  131581. * <uv.uv_free_func>PyMem_RawFree)
  131582. * if err < 0: # <<<<<<<<<<<<<<
  131583. * __mem_installed = 0
  131584. * raise convert_error(err)
  131585. */
  131586. }
  131587. /* "uvloop/loop.pyx":3149
  131588. * # Install PyMem* memory allocators
  131589. * cdef vint __mem_installed = 0
  131590. * cdef __install_pymem(): # <<<<<<<<<<<<<<
  131591. * global __mem_installed
  131592. * if __mem_installed:
  131593. */
  131594. /* function exit code */
  131595. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  131596. goto __pyx_L0;
  131597. __pyx_L1_error:;
  131598. __Pyx_XDECREF(__pyx_t_2);
  131599. __Pyx_AddTraceback("uvloop.loop.__install_pymem", __pyx_clineno, __pyx_lineno, __pyx_filename);
  131600. __pyx_r = 0;
  131601. __pyx_L0:;
  131602. __Pyx_XGIVEREF(__pyx_r);
  131603. __Pyx_RefNannyFinishContext();
  131604. return __pyx_r;
  131605. }
  131606. /* "uvloop/loop.pyx":3165
  131607. *
  131608. *
  131609. * cdef _set_signal_wakeup_fd(fd): # <<<<<<<<<<<<<<
  131610. * if PY37 and fd >= 0:
  131611. * signal_set_wakeup_fd(fd, warn_on_full_buffer=False)
  131612. */
  131613. static PyObject *__pyx_f_6uvloop_4loop__set_signal_wakeup_fd(PyObject *__pyx_v_fd) {
  131614. PyObject *__pyx_r = NULL;
  131615. __Pyx_RefNannyDeclarations
  131616. int __pyx_t_1;
  131617. int __pyx_t_2;
  131618. PyObject *__pyx_t_3 = NULL;
  131619. PyObject *__pyx_t_4 = NULL;
  131620. PyObject *__pyx_t_5 = NULL;
  131621. __Pyx_RefNannySetupContext("_set_signal_wakeup_fd", 0);
  131622. /* "uvloop/loop.pyx":3166
  131623. *
  131624. * cdef _set_signal_wakeup_fd(fd):
  131625. * if PY37 and fd >= 0: # <<<<<<<<<<<<<<
  131626. * signal_set_wakeup_fd(fd, warn_on_full_buffer=False)
  131627. * else:
  131628. */
  131629. __pyx_t_2 = (__pyx_v_6uvloop_4loop_PY37 != 0);
  131630. if (__pyx_t_2) {
  131631. } else {
  131632. __pyx_t_1 = __pyx_t_2;
  131633. goto __pyx_L4_bool_binop_done;
  131634. }
  131635. __pyx_t_3 = PyObject_RichCompare(__pyx_v_fd, __pyx_int_0, Py_GE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 3166, __pyx_L1_error)
  131636. __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(2, 3166, __pyx_L1_error)
  131637. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  131638. __pyx_t_1 = __pyx_t_2;
  131639. __pyx_L4_bool_binop_done:;
  131640. if (__pyx_t_1) {
  131641. /* "uvloop/loop.pyx":3167
  131642. * cdef _set_signal_wakeup_fd(fd):
  131643. * if PY37 and fd >= 0:
  131644. * signal_set_wakeup_fd(fd, warn_on_full_buffer=False) # <<<<<<<<<<<<<<
  131645. * else:
  131646. * signal_set_wakeup_fd(fd)
  131647. */
  131648. __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 3167, __pyx_L1_error)
  131649. __Pyx_GOTREF(__pyx_t_3);
  131650. __Pyx_INCREF(__pyx_v_fd);
  131651. __Pyx_GIVEREF(__pyx_v_fd);
  131652. PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_fd);
  131653. __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 3167, __pyx_L1_error)
  131654. __Pyx_GOTREF(__pyx_t_4);
  131655. if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_warn_on_full_buffer, Py_False) < 0) __PYX_ERR(2, 3167, __pyx_L1_error)
  131656. __pyx_t_5 = __Pyx_PyObject_Call(__pyx_v_6uvloop_4loop_signal_set_wakeup_fd, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 3167, __pyx_L1_error)
  131657. __Pyx_GOTREF(__pyx_t_5);
  131658. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  131659. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  131660. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  131661. /* "uvloop/loop.pyx":3166
  131662. *
  131663. * cdef _set_signal_wakeup_fd(fd):
  131664. * if PY37 and fd >= 0: # <<<<<<<<<<<<<<
  131665. * signal_set_wakeup_fd(fd, warn_on_full_buffer=False)
  131666. * else:
  131667. */
  131668. goto __pyx_L3;
  131669. }
  131670. /* "uvloop/loop.pyx":3169
  131671. * signal_set_wakeup_fd(fd, warn_on_full_buffer=False)
  131672. * else:
  131673. * signal_set_wakeup_fd(fd) # <<<<<<<<<<<<<<
  131674. *
  131675. *
  131676. */
  131677. /*else*/ {
  131678. __Pyx_INCREF(__pyx_v_6uvloop_4loop_signal_set_wakeup_fd);
  131679. __pyx_t_4 = __pyx_v_6uvloop_4loop_signal_set_wakeup_fd; __pyx_t_3 = NULL;
  131680. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
  131681. __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
  131682. if (likely(__pyx_t_3)) {
  131683. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  131684. __Pyx_INCREF(__pyx_t_3);
  131685. __Pyx_INCREF(function);
  131686. __Pyx_DECREF_SET(__pyx_t_4, function);
  131687. }
  131688. }
  131689. __pyx_t_5 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_3, __pyx_v_fd) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_fd);
  131690. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  131691. if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 3169, __pyx_L1_error)
  131692. __Pyx_GOTREF(__pyx_t_5);
  131693. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  131694. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  131695. }
  131696. __pyx_L3:;
  131697. /* "uvloop/loop.pyx":3165
  131698. *
  131699. *
  131700. * cdef _set_signal_wakeup_fd(fd): # <<<<<<<<<<<<<<
  131701. * if PY37 and fd >= 0:
  131702. * signal_set_wakeup_fd(fd, warn_on_full_buffer=False)
  131703. */
  131704. /* function exit code */
  131705. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  131706. goto __pyx_L0;
  131707. __pyx_L1_error:;
  131708. __Pyx_XDECREF(__pyx_t_3);
  131709. __Pyx_XDECREF(__pyx_t_4);
  131710. __Pyx_XDECREF(__pyx_t_5);
  131711. __Pyx_AddTraceback("uvloop.loop._set_signal_wakeup_fd", __pyx_clineno, __pyx_lineno, __pyx_filename);
  131712. __pyx_r = 0;
  131713. __pyx_L0:;
  131714. __Pyx_XGIVEREF(__pyx_r);
  131715. __Pyx_RefNannyFinishContext();
  131716. return __pyx_r;
  131717. }
  131718. /* "uvloop/loop.pyx":3172
  131719. *
  131720. *
  131721. * cdef _warn_with_source(msg, cls, source): # <<<<<<<<<<<<<<
  131722. * if PY36:
  131723. * warnings_warn(msg, cls, source=source)
  131724. */
  131725. static PyObject *__pyx_f_6uvloop_4loop__warn_with_source(PyObject *__pyx_v_msg, PyObject *__pyx_v_cls, PyObject *__pyx_v_source) {
  131726. PyObject *__pyx_r = NULL;
  131727. __Pyx_RefNannyDeclarations
  131728. int __pyx_t_1;
  131729. PyObject *__pyx_t_2 = NULL;
  131730. PyObject *__pyx_t_3 = NULL;
  131731. PyObject *__pyx_t_4 = NULL;
  131732. int __pyx_t_5;
  131733. PyObject *__pyx_t_6 = NULL;
  131734. __Pyx_RefNannySetupContext("_warn_with_source", 0);
  131735. /* "uvloop/loop.pyx":3173
  131736. *
  131737. * cdef _warn_with_source(msg, cls, source):
  131738. * if PY36: # <<<<<<<<<<<<<<
  131739. * warnings_warn(msg, cls, source=source)
  131740. * else:
  131741. */
  131742. __pyx_t_1 = (__pyx_v_6uvloop_4loop_PY36 != 0);
  131743. if (__pyx_t_1) {
  131744. /* "uvloop/loop.pyx":3174
  131745. * cdef _warn_with_source(msg, cls, source):
  131746. * if PY36:
  131747. * warnings_warn(msg, cls, source=source) # <<<<<<<<<<<<<<
  131748. * else:
  131749. * warnings_warn(msg, cls)
  131750. */
  131751. __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 3174, __pyx_L1_error)
  131752. __Pyx_GOTREF(__pyx_t_2);
  131753. __Pyx_INCREF(__pyx_v_msg);
  131754. __Pyx_GIVEREF(__pyx_v_msg);
  131755. PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_msg);
  131756. __Pyx_INCREF(__pyx_v_cls);
  131757. __Pyx_GIVEREF(__pyx_v_cls);
  131758. PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_cls);
  131759. __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 3174, __pyx_L1_error)
  131760. __Pyx_GOTREF(__pyx_t_3);
  131761. if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_source, __pyx_v_source) < 0) __PYX_ERR(2, 3174, __pyx_L1_error)
  131762. __pyx_t_4 = __Pyx_PyObject_Call(__pyx_v_6uvloop_4loop_warnings_warn, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 3174, __pyx_L1_error)
  131763. __Pyx_GOTREF(__pyx_t_4);
  131764. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  131765. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  131766. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  131767. /* "uvloop/loop.pyx":3173
  131768. *
  131769. * cdef _warn_with_source(msg, cls, source):
  131770. * if PY36: # <<<<<<<<<<<<<<
  131771. * warnings_warn(msg, cls, source=source)
  131772. * else:
  131773. */
  131774. goto __pyx_L3;
  131775. }
  131776. /* "uvloop/loop.pyx":3176
  131777. * warnings_warn(msg, cls, source=source)
  131778. * else:
  131779. * warnings_warn(msg, cls) # <<<<<<<<<<<<<<
  131780. *
  131781. *
  131782. */
  131783. /*else*/ {
  131784. __Pyx_INCREF(__pyx_v_6uvloop_4loop_warnings_warn);
  131785. __pyx_t_3 = __pyx_v_6uvloop_4loop_warnings_warn; __pyx_t_2 = NULL;
  131786. __pyx_t_5 = 0;
  131787. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
  131788. __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
  131789. if (likely(__pyx_t_2)) {
  131790. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  131791. __Pyx_INCREF(__pyx_t_2);
  131792. __Pyx_INCREF(function);
  131793. __Pyx_DECREF_SET(__pyx_t_3, function);
  131794. __pyx_t_5 = 1;
  131795. }
  131796. }
  131797. #if CYTHON_FAST_PYCALL
  131798. if (PyFunction_Check(__pyx_t_3)) {
  131799. PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_msg, __pyx_v_cls};
  131800. __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 3176, __pyx_L1_error)
  131801. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  131802. __Pyx_GOTREF(__pyx_t_4);
  131803. } else
  131804. #endif
  131805. #if CYTHON_FAST_PYCCALL
  131806. if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
  131807. PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_msg, __pyx_v_cls};
  131808. __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 3176, __pyx_L1_error)
  131809. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  131810. __Pyx_GOTREF(__pyx_t_4);
  131811. } else
  131812. #endif
  131813. {
  131814. __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 3176, __pyx_L1_error)
  131815. __Pyx_GOTREF(__pyx_t_6);
  131816. if (__pyx_t_2) {
  131817. __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2); __pyx_t_2 = NULL;
  131818. }
  131819. __Pyx_INCREF(__pyx_v_msg);
  131820. __Pyx_GIVEREF(__pyx_v_msg);
  131821. PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_msg);
  131822. __Pyx_INCREF(__pyx_v_cls);
  131823. __Pyx_GIVEREF(__pyx_v_cls);
  131824. PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_cls);
  131825. __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 3176, __pyx_L1_error)
  131826. __Pyx_GOTREF(__pyx_t_4);
  131827. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  131828. }
  131829. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  131830. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  131831. }
  131832. __pyx_L3:;
  131833. /* "uvloop/loop.pyx":3172
  131834. *
  131835. *
  131836. * cdef _warn_with_source(msg, cls, source): # <<<<<<<<<<<<<<
  131837. * if PY36:
  131838. * warnings_warn(msg, cls, source=source)
  131839. */
  131840. /* function exit code */
  131841. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  131842. goto __pyx_L0;
  131843. __pyx_L1_error:;
  131844. __Pyx_XDECREF(__pyx_t_2);
  131845. __Pyx_XDECREF(__pyx_t_3);
  131846. __Pyx_XDECREF(__pyx_t_4);
  131847. __Pyx_XDECREF(__pyx_t_6);
  131848. __Pyx_AddTraceback("uvloop.loop._warn_with_source", __pyx_clineno, __pyx_lineno, __pyx_filename);
  131849. __pyx_r = 0;
  131850. __pyx_L0:;
  131851. __Pyx_XGIVEREF(__pyx_r);
  131852. __Pyx_RefNannyFinishContext();
  131853. return __pyx_r;
  131854. }
  131855. static PyObject *__pyx_gb_6uvloop_4loop_2generator25(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
  131856. /* "uvloop/loop.pyx":3182
  131857. *
  131858. * @cython.iterable_coroutine
  131859. * async def _test_coroutine_1(): # <<<<<<<<<<<<<<
  131860. * return 42
  131861. */
  131862. /* Python wrapper */
  131863. static PyObject *__pyx_pw_6uvloop_4loop_1_test_coroutine_1(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  131864. static char __pyx_doc_6uvloop_4loop__test_coroutine_1[] = "_test_coroutine_1()";
  131865. static PyMethodDef __pyx_mdef_6uvloop_4loop_1_test_coroutine_1 = {"_test_coroutine_1", (PyCFunction)__pyx_pw_6uvloop_4loop_1_test_coroutine_1, METH_NOARGS, __pyx_doc_6uvloop_4loop__test_coroutine_1};
  131866. static PyObject *__pyx_pw_6uvloop_4loop_1_test_coroutine_1(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  131867. PyObject *__pyx_r = 0;
  131868. __Pyx_RefNannyDeclarations
  131869. __Pyx_RefNannySetupContext("_test_coroutine_1 (wrapper)", 0);
  131870. __pyx_r = __pyx_pf_6uvloop_4loop__test_coroutine_1(__pyx_self);
  131871. /* function exit code */
  131872. __Pyx_RefNannyFinishContext();
  131873. return __pyx_r;
  131874. }
  131875. static PyObject *__pyx_pf_6uvloop_4loop__test_coroutine_1(CYTHON_UNUSED PyObject *__pyx_self) {
  131876. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_37__test_coroutine_1 *__pyx_cur_scope;
  131877. PyObject *__pyx_r = NULL;
  131878. __Pyx_RefNannyDeclarations
  131879. __Pyx_RefNannySetupContext("_test_coroutine_1", 0);
  131880. __pyx_cur_scope = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_37__test_coroutine_1 *)__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_37__test_coroutine_1(__pyx_ptype_6uvloop_4loop___pyx_scope_struct_37__test_coroutine_1, __pyx_empty_tuple, NULL);
  131881. if (unlikely(!__pyx_cur_scope)) {
  131882. __pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_37__test_coroutine_1 *)Py_None);
  131883. __Pyx_INCREF(Py_None);
  131884. __PYX_ERR(2, 3182, __pyx_L1_error)
  131885. } else {
  131886. __Pyx_GOTREF(__pyx_cur_scope);
  131887. }
  131888. {
  131889. __pyx_CoroutineObject *gen = __Pyx_IterableCoroutine_New((__pyx_coroutine_body_t) __pyx_gb_6uvloop_4loop_2generator25, __pyx_codeobj__217, (PyObject *) __pyx_cur_scope, __pyx_n_s_test_coroutine_1, __pyx_n_s_test_coroutine_1, __pyx_n_s_uvloop_loop); if (unlikely(!gen)) __PYX_ERR(2, 3182, __pyx_L1_error)
  131890. __Pyx_DECREF(__pyx_cur_scope);
  131891. __Pyx_RefNannyFinishContext();
  131892. return (PyObject *) gen;
  131893. }
  131894. /* function exit code */
  131895. __pyx_L1_error:;
  131896. __Pyx_AddTraceback("uvloop.loop._test_coroutine_1", __pyx_clineno, __pyx_lineno, __pyx_filename);
  131897. __pyx_r = NULL;
  131898. __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  131899. __Pyx_XGIVEREF(__pyx_r);
  131900. __Pyx_RefNannyFinishContext();
  131901. return __pyx_r;
  131902. }
  131903. static PyObject *__pyx_gb_6uvloop_4loop_2generator25(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
  131904. {
  131905. PyObject *__pyx_r = NULL;
  131906. __Pyx_RefNannyDeclarations
  131907. __Pyx_RefNannySetupContext("_test_coroutine_1", 0);
  131908. switch (__pyx_generator->resume_label) {
  131909. case 0: goto __pyx_L3_first_run;
  131910. default: /* CPython raises the right error here */
  131911. __Pyx_RefNannyFinishContext();
  131912. return NULL;
  131913. }
  131914. __pyx_L3_first_run:;
  131915. if (unlikely(!__pyx_sent_value)) __PYX_ERR(2, 3182, __pyx_L1_error)
  131916. /* "uvloop/loop.pyx":3183
  131917. * @cython.iterable_coroutine
  131918. * async def _test_coroutine_1():
  131919. * return 42 # <<<<<<<<<<<<<<
  131920. */
  131921. __Pyx_XDECREF(__pyx_r);
  131922. __pyx_r = NULL; __Pyx_ReturnWithStopIteration(__pyx_int_42);
  131923. goto __pyx_L0;
  131924. /* "uvloop/loop.pyx":3182
  131925. *
  131926. * @cython.iterable_coroutine
  131927. * async def _test_coroutine_1(): # <<<<<<<<<<<<<<
  131928. * return 42
  131929. */
  131930. /* function exit code */
  131931. __pyx_L1_error:;
  131932. __Pyx_AddTraceback("_test_coroutine_1", __pyx_clineno, __pyx_lineno, __pyx_filename);
  131933. __pyx_L0:;
  131934. __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  131935. #if !CYTHON_USE_EXC_INFO_STACK
  131936. __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  131937. #endif
  131938. __pyx_generator->resume_label = -1;
  131939. __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  131940. __Pyx_RefNannyFinishContext();
  131941. return __pyx_r;
  131942. }
  131943. /* "(tree fragment)":1
  131944. * def __pyx_unpickle_PseudoSocket(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
  131945. * cdef object __pyx_PickleError
  131946. * cdef object __pyx_result
  131947. */
  131948. /* Python wrapper */
  131949. static PyObject *__pyx_pw_6uvloop_4loop_4__pyx_unpickle_PseudoSocket(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  131950. static char __pyx_doc_6uvloop_4loop_3__pyx_unpickle_PseudoSocket[] = "__pyx_unpickle_PseudoSocket(__pyx_type, long __pyx_checksum, __pyx_state)";
  131951. static PyMethodDef __pyx_mdef_6uvloop_4loop_4__pyx_unpickle_PseudoSocket = {"__pyx_unpickle_PseudoSocket", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6uvloop_4loop_4__pyx_unpickle_PseudoSocket, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_3__pyx_unpickle_PseudoSocket};
  131952. static PyObject *__pyx_pw_6uvloop_4loop_4__pyx_unpickle_PseudoSocket(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  131953. PyObject *__pyx_v___pyx_type = 0;
  131954. long __pyx_v___pyx_checksum;
  131955. PyObject *__pyx_v___pyx_state = 0;
  131956. PyObject *__pyx_r = 0;
  131957. __Pyx_RefNannyDeclarations
  131958. __Pyx_RefNannySetupContext("__pyx_unpickle_PseudoSocket (wrapper)", 0);
  131959. {
  131960. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
  131961. PyObject* values[3] = {0,0,0};
  131962. if (unlikely(__pyx_kwds)) {
  131963. Py_ssize_t kw_args;
  131964. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  131965. switch (pos_args) {
  131966. case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
  131967. CYTHON_FALLTHROUGH;
  131968. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  131969. CYTHON_FALLTHROUGH;
  131970. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  131971. CYTHON_FALLTHROUGH;
  131972. case 0: break;
  131973. default: goto __pyx_L5_argtuple_error;
  131974. }
  131975. kw_args = PyDict_Size(__pyx_kwds);
  131976. switch (pos_args) {
  131977. case 0:
  131978. if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
  131979. else goto __pyx_L5_argtuple_error;
  131980. CYTHON_FALLTHROUGH;
  131981. case 1:
  131982. if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
  131983. else {
  131984. __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_PseudoSocket", 1, 3, 3, 1); __PYX_ERR(9, 1, __pyx_L3_error)
  131985. }
  131986. CYTHON_FALLTHROUGH;
  131987. case 2:
  131988. if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
  131989. else {
  131990. __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_PseudoSocket", 1, 3, 3, 2); __PYX_ERR(9, 1, __pyx_L3_error)
  131991. }
  131992. }
  131993. if (unlikely(kw_args > 0)) {
  131994. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_PseudoSocket") < 0)) __PYX_ERR(9, 1, __pyx_L3_error)
  131995. }
  131996. } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
  131997. goto __pyx_L5_argtuple_error;
  131998. } else {
  131999. values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  132000. values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  132001. values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
  132002. }
  132003. __pyx_v___pyx_type = values[0];
  132004. __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(9, 1, __pyx_L3_error)
  132005. __pyx_v___pyx_state = values[2];
  132006. }
  132007. goto __pyx_L4_argument_unpacking_done;
  132008. __pyx_L5_argtuple_error:;
  132009. __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_PseudoSocket", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(9, 1, __pyx_L3_error)
  132010. __pyx_L3_error:;
  132011. __Pyx_AddTraceback("uvloop.loop.__pyx_unpickle_PseudoSocket", __pyx_clineno, __pyx_lineno, __pyx_filename);
  132012. __Pyx_RefNannyFinishContext();
  132013. return NULL;
  132014. __pyx_L4_argument_unpacking_done:;
  132015. __pyx_r = __pyx_pf_6uvloop_4loop_3__pyx_unpickle_PseudoSocket(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
  132016. /* function exit code */
  132017. __Pyx_RefNannyFinishContext();
  132018. return __pyx_r;
  132019. }
  132020. static PyObject *__pyx_pf_6uvloop_4loop_3__pyx_unpickle_PseudoSocket(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  132021. PyObject *__pyx_v___pyx_PickleError = 0;
  132022. PyObject *__pyx_v___pyx_result = 0;
  132023. PyObject *__pyx_r = NULL;
  132024. __Pyx_RefNannyDeclarations
  132025. int __pyx_t_1;
  132026. PyObject *__pyx_t_2 = NULL;
  132027. PyObject *__pyx_t_3 = NULL;
  132028. PyObject *__pyx_t_4 = NULL;
  132029. PyObject *__pyx_t_5 = NULL;
  132030. int __pyx_t_6;
  132031. __Pyx_RefNannySetupContext("__pyx_unpickle_PseudoSocket", 0);
  132032. /* "(tree fragment)":4
  132033. * cdef object __pyx_PickleError
  132034. * cdef object __pyx_result
  132035. * if __pyx_checksum != 0x88c0b03: # <<<<<<<<<<<<<<
  132036. * from pickle import PickleError as __pyx_PickleError
  132037. * raise __pyx_PickleError("Incompatible checksums (%s vs 0x88c0b03 = (_family, _fd, _peername, _proto, _sockname, _type))" % __pyx_checksum)
  132038. */
  132039. __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x88c0b03) != 0);
  132040. if (__pyx_t_1) {
  132041. /* "(tree fragment)":5
  132042. * cdef object __pyx_result
  132043. * if __pyx_checksum != 0x88c0b03:
  132044. * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
  132045. * raise __pyx_PickleError("Incompatible checksums (%s vs 0x88c0b03 = (_family, _fd, _peername, _proto, _sockname, _type))" % __pyx_checksum)
  132046. * __pyx_result = PseudoSocket.__new__(__pyx_type)
  132047. */
  132048. __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 5, __pyx_L1_error)
  132049. __Pyx_GOTREF(__pyx_t_2);
  132050. __Pyx_INCREF(__pyx_n_s_PickleError);
  132051. __Pyx_GIVEREF(__pyx_n_s_PickleError);
  132052. PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
  132053. __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 5, __pyx_L1_error)
  132054. __Pyx_GOTREF(__pyx_t_3);
  132055. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  132056. __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 5, __pyx_L1_error)
  132057. __Pyx_GOTREF(__pyx_t_2);
  132058. __Pyx_INCREF(__pyx_t_2);
  132059. __pyx_v___pyx_PickleError = __pyx_t_2;
  132060. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  132061. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  132062. /* "(tree fragment)":6
  132063. * if __pyx_checksum != 0x88c0b03:
  132064. * from pickle import PickleError as __pyx_PickleError
  132065. * raise __pyx_PickleError("Incompatible checksums (%s vs 0x88c0b03 = (_family, _fd, _peername, _proto, _sockname, _type))" % __pyx_checksum) # <<<<<<<<<<<<<<
  132066. * __pyx_result = PseudoSocket.__new__(__pyx_type)
  132067. * if __pyx_state is not None:
  132068. */
  132069. __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 6, __pyx_L1_error)
  132070. __Pyx_GOTREF(__pyx_t_2);
  132071. __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x88, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(9, 6, __pyx_L1_error)
  132072. __Pyx_GOTREF(__pyx_t_4);
  132073. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  132074. __Pyx_INCREF(__pyx_v___pyx_PickleError);
  132075. __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
  132076. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
  132077. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
  132078. if (likely(__pyx_t_5)) {
  132079. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  132080. __Pyx_INCREF(__pyx_t_5);
  132081. __Pyx_INCREF(function);
  132082. __Pyx_DECREF_SET(__pyx_t_2, function);
  132083. }
  132084. }
  132085. __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
  132086. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  132087. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  132088. if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 6, __pyx_L1_error)
  132089. __Pyx_GOTREF(__pyx_t_3);
  132090. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  132091. __Pyx_Raise(__pyx_t_3, 0, 0, 0);
  132092. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  132093. __PYX_ERR(9, 6, __pyx_L1_error)
  132094. /* "(tree fragment)":4
  132095. * cdef object __pyx_PickleError
  132096. * cdef object __pyx_result
  132097. * if __pyx_checksum != 0x88c0b03: # <<<<<<<<<<<<<<
  132098. * from pickle import PickleError as __pyx_PickleError
  132099. * raise __pyx_PickleError("Incompatible checksums (%s vs 0x88c0b03 = (_family, _fd, _peername, _proto, _sockname, _type))" % __pyx_checksum)
  132100. */
  132101. }
  132102. /* "(tree fragment)":7
  132103. * from pickle import PickleError as __pyx_PickleError
  132104. * raise __pyx_PickleError("Incompatible checksums (%s vs 0x88c0b03 = (_family, _fd, _peername, _proto, _sockname, _type))" % __pyx_checksum)
  132105. * __pyx_result = PseudoSocket.__new__(__pyx_type) # <<<<<<<<<<<<<<
  132106. * if __pyx_state is not None:
  132107. * __pyx_unpickle_PseudoSocket__set_state(<PseudoSocket> __pyx_result, __pyx_state)
  132108. */
  132109. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6uvloop_4loop_PseudoSocket), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 7, __pyx_L1_error)
  132110. __Pyx_GOTREF(__pyx_t_2);
  132111. __pyx_t_4 = NULL;
  132112. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
  132113. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
  132114. if (likely(__pyx_t_4)) {
  132115. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  132116. __Pyx_INCREF(__pyx_t_4);
  132117. __Pyx_INCREF(function);
  132118. __Pyx_DECREF_SET(__pyx_t_2, function);
  132119. }
  132120. }
  132121. __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
  132122. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  132123. if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 7, __pyx_L1_error)
  132124. __Pyx_GOTREF(__pyx_t_3);
  132125. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  132126. __pyx_v___pyx_result = __pyx_t_3;
  132127. __pyx_t_3 = 0;
  132128. /* "(tree fragment)":8
  132129. * raise __pyx_PickleError("Incompatible checksums (%s vs 0x88c0b03 = (_family, _fd, _peername, _proto, _sockname, _type))" % __pyx_checksum)
  132130. * __pyx_result = PseudoSocket.__new__(__pyx_type)
  132131. * if __pyx_state is not None: # <<<<<<<<<<<<<<
  132132. * __pyx_unpickle_PseudoSocket__set_state(<PseudoSocket> __pyx_result, __pyx_state)
  132133. * return __pyx_result
  132134. */
  132135. __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  132136. __pyx_t_6 = (__pyx_t_1 != 0);
  132137. if (__pyx_t_6) {
  132138. /* "(tree fragment)":9
  132139. * __pyx_result = PseudoSocket.__new__(__pyx_type)
  132140. * if __pyx_state is not None:
  132141. * __pyx_unpickle_PseudoSocket__set_state(<PseudoSocket> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
  132142. * return __pyx_result
  132143. * cdef __pyx_unpickle_PseudoSocket__set_state(PseudoSocket __pyx_result, tuple __pyx_state):
  132144. */
  132145. if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(9, 9, __pyx_L1_error)
  132146. __pyx_t_3 = __pyx_f_6uvloop_4loop___pyx_unpickle_PseudoSocket__set_state(((struct __pyx_obj_6uvloop_4loop_PseudoSocket *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 9, __pyx_L1_error)
  132147. __Pyx_GOTREF(__pyx_t_3);
  132148. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  132149. /* "(tree fragment)":8
  132150. * raise __pyx_PickleError("Incompatible checksums (%s vs 0x88c0b03 = (_family, _fd, _peername, _proto, _sockname, _type))" % __pyx_checksum)
  132151. * __pyx_result = PseudoSocket.__new__(__pyx_type)
  132152. * if __pyx_state is not None: # <<<<<<<<<<<<<<
  132153. * __pyx_unpickle_PseudoSocket__set_state(<PseudoSocket> __pyx_result, __pyx_state)
  132154. * return __pyx_result
  132155. */
  132156. }
  132157. /* "(tree fragment)":10
  132158. * if __pyx_state is not None:
  132159. * __pyx_unpickle_PseudoSocket__set_state(<PseudoSocket> __pyx_result, __pyx_state)
  132160. * return __pyx_result # <<<<<<<<<<<<<<
  132161. * cdef __pyx_unpickle_PseudoSocket__set_state(PseudoSocket __pyx_result, tuple __pyx_state):
  132162. * __pyx_result._family = __pyx_state[0]; __pyx_result._fd = __pyx_state[1]; __pyx_result._peername = __pyx_state[2]; __pyx_result._proto = __pyx_state[3]; __pyx_result._sockname = __pyx_state[4]; __pyx_result._type = __pyx_state[5]
  132163. */
  132164. __Pyx_XDECREF(__pyx_r);
  132165. __Pyx_INCREF(__pyx_v___pyx_result);
  132166. __pyx_r = __pyx_v___pyx_result;
  132167. goto __pyx_L0;
  132168. /* "(tree fragment)":1
  132169. * def __pyx_unpickle_PseudoSocket(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
  132170. * cdef object __pyx_PickleError
  132171. * cdef object __pyx_result
  132172. */
  132173. /* function exit code */
  132174. __pyx_L1_error:;
  132175. __Pyx_XDECREF(__pyx_t_2);
  132176. __Pyx_XDECREF(__pyx_t_3);
  132177. __Pyx_XDECREF(__pyx_t_4);
  132178. __Pyx_XDECREF(__pyx_t_5);
  132179. __Pyx_AddTraceback("uvloop.loop.__pyx_unpickle_PseudoSocket", __pyx_clineno, __pyx_lineno, __pyx_filename);
  132180. __pyx_r = NULL;
  132181. __pyx_L0:;
  132182. __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  132183. __Pyx_XDECREF(__pyx_v___pyx_result);
  132184. __Pyx_XGIVEREF(__pyx_r);
  132185. __Pyx_RefNannyFinishContext();
  132186. return __pyx_r;
  132187. }
  132188. /* "(tree fragment)":11
  132189. * __pyx_unpickle_PseudoSocket__set_state(<PseudoSocket> __pyx_result, __pyx_state)
  132190. * return __pyx_result
  132191. * cdef __pyx_unpickle_PseudoSocket__set_state(PseudoSocket __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
  132192. * __pyx_result._family = __pyx_state[0]; __pyx_result._fd = __pyx_state[1]; __pyx_result._peername = __pyx_state[2]; __pyx_result._proto = __pyx_state[3]; __pyx_result._sockname = __pyx_state[4]; __pyx_result._type = __pyx_state[5]
  132193. * if len(__pyx_state) > 6 and hasattr(__pyx_result, '__dict__'):
  132194. */
  132195. static PyObject *__pyx_f_6uvloop_4loop___pyx_unpickle_PseudoSocket__set_state(struct __pyx_obj_6uvloop_4loop_PseudoSocket *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  132196. PyObject *__pyx_r = NULL;
  132197. __Pyx_RefNannyDeclarations
  132198. PyObject *__pyx_t_1 = NULL;
  132199. int __pyx_t_2;
  132200. int __pyx_t_3;
  132201. Py_ssize_t __pyx_t_4;
  132202. int __pyx_t_5;
  132203. int __pyx_t_6;
  132204. PyObject *__pyx_t_7 = NULL;
  132205. PyObject *__pyx_t_8 = NULL;
  132206. PyObject *__pyx_t_9 = NULL;
  132207. __Pyx_RefNannySetupContext("__pyx_unpickle_PseudoSocket__set_state", 0);
  132208. /* "(tree fragment)":12
  132209. * return __pyx_result
  132210. * cdef __pyx_unpickle_PseudoSocket__set_state(PseudoSocket __pyx_result, tuple __pyx_state):
  132211. * __pyx_result._family = __pyx_state[0]; __pyx_result._fd = __pyx_state[1]; __pyx_result._peername = __pyx_state[2]; __pyx_result._proto = __pyx_state[3]; __pyx_result._sockname = __pyx_state[4]; __pyx_result._type = __pyx_state[5] # <<<<<<<<<<<<<<
  132212. * if len(__pyx_state) > 6 and hasattr(__pyx_result, '__dict__'):
  132213. * __pyx_result.__dict__.update(__pyx_state[6])
  132214. */
  132215. if (unlikely(__pyx_v___pyx_state == Py_None)) {
  132216. PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
  132217. __PYX_ERR(9, 12, __pyx_L1_error)
  132218. }
  132219. __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 12, __pyx_L1_error)
  132220. __Pyx_GOTREF(__pyx_t_1);
  132221. __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(9, 12, __pyx_L1_error)
  132222. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  132223. __pyx_v___pyx_result->_family = __pyx_t_2;
  132224. if (unlikely(__pyx_v___pyx_state == Py_None)) {
  132225. PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
  132226. __PYX_ERR(9, 12, __pyx_L1_error)
  132227. }
  132228. __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 12, __pyx_L1_error)
  132229. __Pyx_GOTREF(__pyx_t_1);
  132230. __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(9, 12, __pyx_L1_error)
  132231. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  132232. __pyx_v___pyx_result->_fd = __pyx_t_2;
  132233. if (unlikely(__pyx_v___pyx_state == Py_None)) {
  132234. PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
  132235. __PYX_ERR(9, 12, __pyx_L1_error)
  132236. }
  132237. __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 12, __pyx_L1_error)
  132238. __Pyx_GOTREF(__pyx_t_1);
  132239. __Pyx_GIVEREF(__pyx_t_1);
  132240. __Pyx_GOTREF(__pyx_v___pyx_result->_peername);
  132241. __Pyx_DECREF(__pyx_v___pyx_result->_peername);
  132242. __pyx_v___pyx_result->_peername = __pyx_t_1;
  132243. __pyx_t_1 = 0;
  132244. if (unlikely(__pyx_v___pyx_state == Py_None)) {
  132245. PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
  132246. __PYX_ERR(9, 12, __pyx_L1_error)
  132247. }
  132248. __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 12, __pyx_L1_error)
  132249. __Pyx_GOTREF(__pyx_t_1);
  132250. __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(9, 12, __pyx_L1_error)
  132251. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  132252. __pyx_v___pyx_result->_proto = __pyx_t_2;
  132253. if (unlikely(__pyx_v___pyx_state == Py_None)) {
  132254. PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
  132255. __PYX_ERR(9, 12, __pyx_L1_error)
  132256. }
  132257. __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 12, __pyx_L1_error)
  132258. __Pyx_GOTREF(__pyx_t_1);
  132259. __Pyx_GIVEREF(__pyx_t_1);
  132260. __Pyx_GOTREF(__pyx_v___pyx_result->_sockname);
  132261. __Pyx_DECREF(__pyx_v___pyx_result->_sockname);
  132262. __pyx_v___pyx_result->_sockname = __pyx_t_1;
  132263. __pyx_t_1 = 0;
  132264. if (unlikely(__pyx_v___pyx_state == Py_None)) {
  132265. PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
  132266. __PYX_ERR(9, 12, __pyx_L1_error)
  132267. }
  132268. __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 12, __pyx_L1_error)
  132269. __Pyx_GOTREF(__pyx_t_1);
  132270. __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(9, 12, __pyx_L1_error)
  132271. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  132272. __pyx_v___pyx_result->_type = __pyx_t_2;
  132273. /* "(tree fragment)":13
  132274. * cdef __pyx_unpickle_PseudoSocket__set_state(PseudoSocket __pyx_result, tuple __pyx_state):
  132275. * __pyx_result._family = __pyx_state[0]; __pyx_result._fd = __pyx_state[1]; __pyx_result._peername = __pyx_state[2]; __pyx_result._proto = __pyx_state[3]; __pyx_result._sockname = __pyx_state[4]; __pyx_result._type = __pyx_state[5]
  132276. * if len(__pyx_state) > 6 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
  132277. * __pyx_result.__dict__.update(__pyx_state[6])
  132278. */
  132279. if (unlikely(__pyx_v___pyx_state == Py_None)) {
  132280. PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
  132281. __PYX_ERR(9, 13, __pyx_L1_error)
  132282. }
  132283. __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(9, 13, __pyx_L1_error)
  132284. __pyx_t_5 = ((__pyx_t_4 > 6) != 0);
  132285. if (__pyx_t_5) {
  132286. } else {
  132287. __pyx_t_3 = __pyx_t_5;
  132288. goto __pyx_L4_bool_binop_done;
  132289. }
  132290. __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(9, 13, __pyx_L1_error)
  132291. __pyx_t_6 = (__pyx_t_5 != 0);
  132292. __pyx_t_3 = __pyx_t_6;
  132293. __pyx_L4_bool_binop_done:;
  132294. if (__pyx_t_3) {
  132295. /* "(tree fragment)":14
  132296. * __pyx_result._family = __pyx_state[0]; __pyx_result._fd = __pyx_state[1]; __pyx_result._peername = __pyx_state[2]; __pyx_result._proto = __pyx_state[3]; __pyx_result._sockname = __pyx_state[4]; __pyx_result._type = __pyx_state[5]
  132297. * if len(__pyx_state) > 6 and hasattr(__pyx_result, '__dict__'):
  132298. * __pyx_result.__dict__.update(__pyx_state[6]) # <<<<<<<<<<<<<<
  132299. */
  132300. __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(9, 14, __pyx_L1_error)
  132301. __Pyx_GOTREF(__pyx_t_7);
  132302. __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(9, 14, __pyx_L1_error)
  132303. __Pyx_GOTREF(__pyx_t_8);
  132304. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  132305. if (unlikely(__pyx_v___pyx_state == Py_None)) {
  132306. PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
  132307. __PYX_ERR(9, 14, __pyx_L1_error)
  132308. }
  132309. __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 6, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(9, 14, __pyx_L1_error)
  132310. __Pyx_GOTREF(__pyx_t_7);
  132311. __pyx_t_9 = NULL;
  132312. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
  132313. __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
  132314. if (likely(__pyx_t_9)) {
  132315. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
  132316. __Pyx_INCREF(__pyx_t_9);
  132317. __Pyx_INCREF(function);
  132318. __Pyx_DECREF_SET(__pyx_t_8, function);
  132319. }
  132320. }
  132321. __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7);
  132322. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  132323. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  132324. if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 14, __pyx_L1_error)
  132325. __Pyx_GOTREF(__pyx_t_1);
  132326. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  132327. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  132328. /* "(tree fragment)":13
  132329. * cdef __pyx_unpickle_PseudoSocket__set_state(PseudoSocket __pyx_result, tuple __pyx_state):
  132330. * __pyx_result._family = __pyx_state[0]; __pyx_result._fd = __pyx_state[1]; __pyx_result._peername = __pyx_state[2]; __pyx_result._proto = __pyx_state[3]; __pyx_result._sockname = __pyx_state[4]; __pyx_result._type = __pyx_state[5]
  132331. * if len(__pyx_state) > 6 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
  132332. * __pyx_result.__dict__.update(__pyx_state[6])
  132333. */
  132334. }
  132335. /* "(tree fragment)":11
  132336. * __pyx_unpickle_PseudoSocket__set_state(<PseudoSocket> __pyx_result, __pyx_state)
  132337. * return __pyx_result
  132338. * cdef __pyx_unpickle_PseudoSocket__set_state(PseudoSocket __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
  132339. * __pyx_result._family = __pyx_state[0]; __pyx_result._fd = __pyx_state[1]; __pyx_result._peername = __pyx_state[2]; __pyx_result._proto = __pyx_state[3]; __pyx_result._sockname = __pyx_state[4]; __pyx_result._type = __pyx_state[5]
  132340. * if len(__pyx_state) > 6 and hasattr(__pyx_result, '__dict__'):
  132341. */
  132342. /* function exit code */
  132343. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  132344. goto __pyx_L0;
  132345. __pyx_L1_error:;
  132346. __Pyx_XDECREF(__pyx_t_1);
  132347. __Pyx_XDECREF(__pyx_t_7);
  132348. __Pyx_XDECREF(__pyx_t_8);
  132349. __Pyx_XDECREF(__pyx_t_9);
  132350. __Pyx_AddTraceback("uvloop.loop.__pyx_unpickle_PseudoSocket__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  132351. __pyx_r = 0;
  132352. __pyx_L0:;
  132353. __Pyx_XGIVEREF(__pyx_r);
  132354. __Pyx_RefNannyFinishContext();
  132355. return __pyx_r;
  132356. }
  132357. /* "(tree fragment)":1
  132358. * def __pyx_unpickle_LruCache(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
  132359. * cdef object __pyx_PickleError
  132360. * cdef object __pyx_result
  132361. */
  132362. /* Python wrapper */
  132363. static PyObject *__pyx_pw_6uvloop_4loop_6__pyx_unpickle_LruCache(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  132364. static char __pyx_doc_6uvloop_4loop_5__pyx_unpickle_LruCache[] = "__pyx_unpickle_LruCache(__pyx_type, long __pyx_checksum, __pyx_state)";
  132365. static PyMethodDef __pyx_mdef_6uvloop_4loop_6__pyx_unpickle_LruCache = {"__pyx_unpickle_LruCache", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6uvloop_4loop_6__pyx_unpickle_LruCache, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_5__pyx_unpickle_LruCache};
  132366. static PyObject *__pyx_pw_6uvloop_4loop_6__pyx_unpickle_LruCache(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  132367. PyObject *__pyx_v___pyx_type = 0;
  132368. long __pyx_v___pyx_checksum;
  132369. PyObject *__pyx_v___pyx_state = 0;
  132370. PyObject *__pyx_r = 0;
  132371. __Pyx_RefNannyDeclarations
  132372. __Pyx_RefNannySetupContext("__pyx_unpickle_LruCache (wrapper)", 0);
  132373. {
  132374. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
  132375. PyObject* values[3] = {0,0,0};
  132376. if (unlikely(__pyx_kwds)) {
  132377. Py_ssize_t kw_args;
  132378. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  132379. switch (pos_args) {
  132380. case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
  132381. CYTHON_FALLTHROUGH;
  132382. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  132383. CYTHON_FALLTHROUGH;
  132384. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  132385. CYTHON_FALLTHROUGH;
  132386. case 0: break;
  132387. default: goto __pyx_L5_argtuple_error;
  132388. }
  132389. kw_args = PyDict_Size(__pyx_kwds);
  132390. switch (pos_args) {
  132391. case 0:
  132392. if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
  132393. else goto __pyx_L5_argtuple_error;
  132394. CYTHON_FALLTHROUGH;
  132395. case 1:
  132396. if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
  132397. else {
  132398. __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_LruCache", 1, 3, 3, 1); __PYX_ERR(9, 1, __pyx_L3_error)
  132399. }
  132400. CYTHON_FALLTHROUGH;
  132401. case 2:
  132402. if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
  132403. else {
  132404. __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_LruCache", 1, 3, 3, 2); __PYX_ERR(9, 1, __pyx_L3_error)
  132405. }
  132406. }
  132407. if (unlikely(kw_args > 0)) {
  132408. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_LruCache") < 0)) __PYX_ERR(9, 1, __pyx_L3_error)
  132409. }
  132410. } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
  132411. goto __pyx_L5_argtuple_error;
  132412. } else {
  132413. values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  132414. values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  132415. values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
  132416. }
  132417. __pyx_v___pyx_type = values[0];
  132418. __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(9, 1, __pyx_L3_error)
  132419. __pyx_v___pyx_state = values[2];
  132420. }
  132421. goto __pyx_L4_argument_unpacking_done;
  132422. __pyx_L5_argtuple_error:;
  132423. __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_LruCache", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(9, 1, __pyx_L3_error)
  132424. __pyx_L3_error:;
  132425. __Pyx_AddTraceback("uvloop.loop.__pyx_unpickle_LruCache", __pyx_clineno, __pyx_lineno, __pyx_filename);
  132426. __Pyx_RefNannyFinishContext();
  132427. return NULL;
  132428. __pyx_L4_argument_unpacking_done:;
  132429. __pyx_r = __pyx_pf_6uvloop_4loop_5__pyx_unpickle_LruCache(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
  132430. /* function exit code */
  132431. __Pyx_RefNannyFinishContext();
  132432. return __pyx_r;
  132433. }
  132434. static PyObject *__pyx_pf_6uvloop_4loop_5__pyx_unpickle_LruCache(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  132435. PyObject *__pyx_v___pyx_PickleError = 0;
  132436. PyObject *__pyx_v___pyx_result = 0;
  132437. PyObject *__pyx_r = NULL;
  132438. __Pyx_RefNannyDeclarations
  132439. int __pyx_t_1;
  132440. PyObject *__pyx_t_2 = NULL;
  132441. PyObject *__pyx_t_3 = NULL;
  132442. PyObject *__pyx_t_4 = NULL;
  132443. PyObject *__pyx_t_5 = NULL;
  132444. int __pyx_t_6;
  132445. __Pyx_RefNannySetupContext("__pyx_unpickle_LruCache", 0);
  132446. /* "(tree fragment)":4
  132447. * cdef object __pyx_PickleError
  132448. * cdef object __pyx_result
  132449. * if __pyx_checksum != 0x53368d7: # <<<<<<<<<<<<<<
  132450. * from pickle import PickleError as __pyx_PickleError
  132451. * raise __pyx_PickleError("Incompatible checksums (%s vs 0x53368d7 = (_dict, _dict_get, _dict_move_to_end, _maxsize))" % __pyx_checksum)
  132452. */
  132453. __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x53368d7) != 0);
  132454. if (__pyx_t_1) {
  132455. /* "(tree fragment)":5
  132456. * cdef object __pyx_result
  132457. * if __pyx_checksum != 0x53368d7:
  132458. * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
  132459. * raise __pyx_PickleError("Incompatible checksums (%s vs 0x53368d7 = (_dict, _dict_get, _dict_move_to_end, _maxsize))" % __pyx_checksum)
  132460. * __pyx_result = LruCache.__new__(__pyx_type)
  132461. */
  132462. __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 5, __pyx_L1_error)
  132463. __Pyx_GOTREF(__pyx_t_2);
  132464. __Pyx_INCREF(__pyx_n_s_PickleError);
  132465. __Pyx_GIVEREF(__pyx_n_s_PickleError);
  132466. PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
  132467. __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 5, __pyx_L1_error)
  132468. __Pyx_GOTREF(__pyx_t_3);
  132469. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  132470. __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 5, __pyx_L1_error)
  132471. __Pyx_GOTREF(__pyx_t_2);
  132472. __Pyx_INCREF(__pyx_t_2);
  132473. __pyx_v___pyx_PickleError = __pyx_t_2;
  132474. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  132475. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  132476. /* "(tree fragment)":6
  132477. * if __pyx_checksum != 0x53368d7:
  132478. * from pickle import PickleError as __pyx_PickleError
  132479. * raise __pyx_PickleError("Incompatible checksums (%s vs 0x53368d7 = (_dict, _dict_get, _dict_move_to_end, _maxsize))" % __pyx_checksum) # <<<<<<<<<<<<<<
  132480. * __pyx_result = LruCache.__new__(__pyx_type)
  132481. * if __pyx_state is not None:
  132482. */
  132483. __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 6, __pyx_L1_error)
  132484. __Pyx_GOTREF(__pyx_t_2);
  132485. __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x53, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(9, 6, __pyx_L1_error)
  132486. __Pyx_GOTREF(__pyx_t_4);
  132487. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  132488. __Pyx_INCREF(__pyx_v___pyx_PickleError);
  132489. __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
  132490. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
  132491. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
  132492. if (likely(__pyx_t_5)) {
  132493. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  132494. __Pyx_INCREF(__pyx_t_5);
  132495. __Pyx_INCREF(function);
  132496. __Pyx_DECREF_SET(__pyx_t_2, function);
  132497. }
  132498. }
  132499. __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
  132500. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  132501. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  132502. if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 6, __pyx_L1_error)
  132503. __Pyx_GOTREF(__pyx_t_3);
  132504. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  132505. __Pyx_Raise(__pyx_t_3, 0, 0, 0);
  132506. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  132507. __PYX_ERR(9, 6, __pyx_L1_error)
  132508. /* "(tree fragment)":4
  132509. * cdef object __pyx_PickleError
  132510. * cdef object __pyx_result
  132511. * if __pyx_checksum != 0x53368d7: # <<<<<<<<<<<<<<
  132512. * from pickle import PickleError as __pyx_PickleError
  132513. * raise __pyx_PickleError("Incompatible checksums (%s vs 0x53368d7 = (_dict, _dict_get, _dict_move_to_end, _maxsize))" % __pyx_checksum)
  132514. */
  132515. }
  132516. /* "(tree fragment)":7
  132517. * from pickle import PickleError as __pyx_PickleError
  132518. * raise __pyx_PickleError("Incompatible checksums (%s vs 0x53368d7 = (_dict, _dict_get, _dict_move_to_end, _maxsize))" % __pyx_checksum)
  132519. * __pyx_result = LruCache.__new__(__pyx_type) # <<<<<<<<<<<<<<
  132520. * if __pyx_state is not None:
  132521. * __pyx_unpickle_LruCache__set_state(<LruCache> __pyx_result, __pyx_state)
  132522. */
  132523. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6uvloop_4loop_LruCache), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 7, __pyx_L1_error)
  132524. __Pyx_GOTREF(__pyx_t_2);
  132525. __pyx_t_4 = NULL;
  132526. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
  132527. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
  132528. if (likely(__pyx_t_4)) {
  132529. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  132530. __Pyx_INCREF(__pyx_t_4);
  132531. __Pyx_INCREF(function);
  132532. __Pyx_DECREF_SET(__pyx_t_2, function);
  132533. }
  132534. }
  132535. __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
  132536. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  132537. if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 7, __pyx_L1_error)
  132538. __Pyx_GOTREF(__pyx_t_3);
  132539. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  132540. __pyx_v___pyx_result = __pyx_t_3;
  132541. __pyx_t_3 = 0;
  132542. /* "(tree fragment)":8
  132543. * raise __pyx_PickleError("Incompatible checksums (%s vs 0x53368d7 = (_dict, _dict_get, _dict_move_to_end, _maxsize))" % __pyx_checksum)
  132544. * __pyx_result = LruCache.__new__(__pyx_type)
  132545. * if __pyx_state is not None: # <<<<<<<<<<<<<<
  132546. * __pyx_unpickle_LruCache__set_state(<LruCache> __pyx_result, __pyx_state)
  132547. * return __pyx_result
  132548. */
  132549. __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  132550. __pyx_t_6 = (__pyx_t_1 != 0);
  132551. if (__pyx_t_6) {
  132552. /* "(tree fragment)":9
  132553. * __pyx_result = LruCache.__new__(__pyx_type)
  132554. * if __pyx_state is not None:
  132555. * __pyx_unpickle_LruCache__set_state(<LruCache> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
  132556. * return __pyx_result
  132557. * cdef __pyx_unpickle_LruCache__set_state(LruCache __pyx_result, tuple __pyx_state):
  132558. */
  132559. if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(9, 9, __pyx_L1_error)
  132560. __pyx_t_3 = __pyx_f_6uvloop_4loop___pyx_unpickle_LruCache__set_state(((struct __pyx_obj_6uvloop_4loop_LruCache *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 9, __pyx_L1_error)
  132561. __Pyx_GOTREF(__pyx_t_3);
  132562. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  132563. /* "(tree fragment)":8
  132564. * raise __pyx_PickleError("Incompatible checksums (%s vs 0x53368d7 = (_dict, _dict_get, _dict_move_to_end, _maxsize))" % __pyx_checksum)
  132565. * __pyx_result = LruCache.__new__(__pyx_type)
  132566. * if __pyx_state is not None: # <<<<<<<<<<<<<<
  132567. * __pyx_unpickle_LruCache__set_state(<LruCache> __pyx_result, __pyx_state)
  132568. * return __pyx_result
  132569. */
  132570. }
  132571. /* "(tree fragment)":10
  132572. * if __pyx_state is not None:
  132573. * __pyx_unpickle_LruCache__set_state(<LruCache> __pyx_result, __pyx_state)
  132574. * return __pyx_result # <<<<<<<<<<<<<<
  132575. * cdef __pyx_unpickle_LruCache__set_state(LruCache __pyx_result, tuple __pyx_state):
  132576. * __pyx_result._dict = __pyx_state[0]; __pyx_result._dict_get = __pyx_state[1]; __pyx_result._dict_move_to_end = __pyx_state[2]; __pyx_result._maxsize = __pyx_state[3]
  132577. */
  132578. __Pyx_XDECREF(__pyx_r);
  132579. __Pyx_INCREF(__pyx_v___pyx_result);
  132580. __pyx_r = __pyx_v___pyx_result;
  132581. goto __pyx_L0;
  132582. /* "(tree fragment)":1
  132583. * def __pyx_unpickle_LruCache(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
  132584. * cdef object __pyx_PickleError
  132585. * cdef object __pyx_result
  132586. */
  132587. /* function exit code */
  132588. __pyx_L1_error:;
  132589. __Pyx_XDECREF(__pyx_t_2);
  132590. __Pyx_XDECREF(__pyx_t_3);
  132591. __Pyx_XDECREF(__pyx_t_4);
  132592. __Pyx_XDECREF(__pyx_t_5);
  132593. __Pyx_AddTraceback("uvloop.loop.__pyx_unpickle_LruCache", __pyx_clineno, __pyx_lineno, __pyx_filename);
  132594. __pyx_r = NULL;
  132595. __pyx_L0:;
  132596. __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  132597. __Pyx_XDECREF(__pyx_v___pyx_result);
  132598. __Pyx_XGIVEREF(__pyx_r);
  132599. __Pyx_RefNannyFinishContext();
  132600. return __pyx_r;
  132601. }
  132602. /* "(tree fragment)":11
  132603. * __pyx_unpickle_LruCache__set_state(<LruCache> __pyx_result, __pyx_state)
  132604. * return __pyx_result
  132605. * cdef __pyx_unpickle_LruCache__set_state(LruCache __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
  132606. * __pyx_result._dict = __pyx_state[0]; __pyx_result._dict_get = __pyx_state[1]; __pyx_result._dict_move_to_end = __pyx_state[2]; __pyx_result._maxsize = __pyx_state[3]
  132607. * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
  132608. */
  132609. static PyObject *__pyx_f_6uvloop_4loop___pyx_unpickle_LruCache__set_state(struct __pyx_obj_6uvloop_4loop_LruCache *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  132610. PyObject *__pyx_r = NULL;
  132611. __Pyx_RefNannyDeclarations
  132612. PyObject *__pyx_t_1 = NULL;
  132613. int __pyx_t_2;
  132614. int __pyx_t_3;
  132615. Py_ssize_t __pyx_t_4;
  132616. int __pyx_t_5;
  132617. int __pyx_t_6;
  132618. PyObject *__pyx_t_7 = NULL;
  132619. PyObject *__pyx_t_8 = NULL;
  132620. PyObject *__pyx_t_9 = NULL;
  132621. __Pyx_RefNannySetupContext("__pyx_unpickle_LruCache__set_state", 0);
  132622. /* "(tree fragment)":12
  132623. * return __pyx_result
  132624. * cdef __pyx_unpickle_LruCache__set_state(LruCache __pyx_result, tuple __pyx_state):
  132625. * __pyx_result._dict = __pyx_state[0]; __pyx_result._dict_get = __pyx_state[1]; __pyx_result._dict_move_to_end = __pyx_state[2]; __pyx_result._maxsize = __pyx_state[3] # <<<<<<<<<<<<<<
  132626. * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
  132627. * __pyx_result.__dict__.update(__pyx_state[4])
  132628. */
  132629. if (unlikely(__pyx_v___pyx_state == Py_None)) {
  132630. PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
  132631. __PYX_ERR(9, 12, __pyx_L1_error)
  132632. }
  132633. __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 12, __pyx_L1_error)
  132634. __Pyx_GOTREF(__pyx_t_1);
  132635. __Pyx_GIVEREF(__pyx_t_1);
  132636. __Pyx_GOTREF(__pyx_v___pyx_result->_dict);
  132637. __Pyx_DECREF(__pyx_v___pyx_result->_dict);
  132638. __pyx_v___pyx_result->_dict = __pyx_t_1;
  132639. __pyx_t_1 = 0;
  132640. if (unlikely(__pyx_v___pyx_state == Py_None)) {
  132641. PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
  132642. __PYX_ERR(9, 12, __pyx_L1_error)
  132643. }
  132644. __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 12, __pyx_L1_error)
  132645. __Pyx_GOTREF(__pyx_t_1);
  132646. __Pyx_GIVEREF(__pyx_t_1);
  132647. __Pyx_GOTREF(__pyx_v___pyx_result->_dict_get);
  132648. __Pyx_DECREF(__pyx_v___pyx_result->_dict_get);
  132649. __pyx_v___pyx_result->_dict_get = __pyx_t_1;
  132650. __pyx_t_1 = 0;
  132651. if (unlikely(__pyx_v___pyx_state == Py_None)) {
  132652. PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
  132653. __PYX_ERR(9, 12, __pyx_L1_error)
  132654. }
  132655. __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 12, __pyx_L1_error)
  132656. __Pyx_GOTREF(__pyx_t_1);
  132657. __Pyx_GIVEREF(__pyx_t_1);
  132658. __Pyx_GOTREF(__pyx_v___pyx_result->_dict_move_to_end);
  132659. __Pyx_DECREF(__pyx_v___pyx_result->_dict_move_to_end);
  132660. __pyx_v___pyx_result->_dict_move_to_end = __pyx_t_1;
  132661. __pyx_t_1 = 0;
  132662. if (unlikely(__pyx_v___pyx_state == Py_None)) {
  132663. PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
  132664. __PYX_ERR(9, 12, __pyx_L1_error)
  132665. }
  132666. __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 12, __pyx_L1_error)
  132667. __Pyx_GOTREF(__pyx_t_1);
  132668. __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(9, 12, __pyx_L1_error)
  132669. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  132670. __pyx_v___pyx_result->_maxsize = __pyx_t_2;
  132671. /* "(tree fragment)":13
  132672. * cdef __pyx_unpickle_LruCache__set_state(LruCache __pyx_result, tuple __pyx_state):
  132673. * __pyx_result._dict = __pyx_state[0]; __pyx_result._dict_get = __pyx_state[1]; __pyx_result._dict_move_to_end = __pyx_state[2]; __pyx_result._maxsize = __pyx_state[3]
  132674. * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
  132675. * __pyx_result.__dict__.update(__pyx_state[4])
  132676. */
  132677. if (unlikely(__pyx_v___pyx_state == Py_None)) {
  132678. PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
  132679. __PYX_ERR(9, 13, __pyx_L1_error)
  132680. }
  132681. __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(9, 13, __pyx_L1_error)
  132682. __pyx_t_5 = ((__pyx_t_4 > 4) != 0);
  132683. if (__pyx_t_5) {
  132684. } else {
  132685. __pyx_t_3 = __pyx_t_5;
  132686. goto __pyx_L4_bool_binop_done;
  132687. }
  132688. __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(9, 13, __pyx_L1_error)
  132689. __pyx_t_6 = (__pyx_t_5 != 0);
  132690. __pyx_t_3 = __pyx_t_6;
  132691. __pyx_L4_bool_binop_done:;
  132692. if (__pyx_t_3) {
  132693. /* "(tree fragment)":14
  132694. * __pyx_result._dict = __pyx_state[0]; __pyx_result._dict_get = __pyx_state[1]; __pyx_result._dict_move_to_end = __pyx_state[2]; __pyx_result._maxsize = __pyx_state[3]
  132695. * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
  132696. * __pyx_result.__dict__.update(__pyx_state[4]) # <<<<<<<<<<<<<<
  132697. */
  132698. __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(9, 14, __pyx_L1_error)
  132699. __Pyx_GOTREF(__pyx_t_7);
  132700. __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(9, 14, __pyx_L1_error)
  132701. __Pyx_GOTREF(__pyx_t_8);
  132702. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  132703. if (unlikely(__pyx_v___pyx_state == Py_None)) {
  132704. PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
  132705. __PYX_ERR(9, 14, __pyx_L1_error)
  132706. }
  132707. __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(9, 14, __pyx_L1_error)
  132708. __Pyx_GOTREF(__pyx_t_7);
  132709. __pyx_t_9 = NULL;
  132710. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
  132711. __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
  132712. if (likely(__pyx_t_9)) {
  132713. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
  132714. __Pyx_INCREF(__pyx_t_9);
  132715. __Pyx_INCREF(function);
  132716. __Pyx_DECREF_SET(__pyx_t_8, function);
  132717. }
  132718. }
  132719. __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7);
  132720. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  132721. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  132722. if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 14, __pyx_L1_error)
  132723. __Pyx_GOTREF(__pyx_t_1);
  132724. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  132725. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  132726. /* "(tree fragment)":13
  132727. * cdef __pyx_unpickle_LruCache__set_state(LruCache __pyx_result, tuple __pyx_state):
  132728. * __pyx_result._dict = __pyx_state[0]; __pyx_result._dict_get = __pyx_state[1]; __pyx_result._dict_move_to_end = __pyx_state[2]; __pyx_result._maxsize = __pyx_state[3]
  132729. * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
  132730. * __pyx_result.__dict__.update(__pyx_state[4])
  132731. */
  132732. }
  132733. /* "(tree fragment)":11
  132734. * __pyx_unpickle_LruCache__set_state(<LruCache> __pyx_result, __pyx_state)
  132735. * return __pyx_result
  132736. * cdef __pyx_unpickle_LruCache__set_state(LruCache __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
  132737. * __pyx_result._dict = __pyx_state[0]; __pyx_result._dict_get = __pyx_state[1]; __pyx_result._dict_move_to_end = __pyx_state[2]; __pyx_result._maxsize = __pyx_state[3]
  132738. * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
  132739. */
  132740. /* function exit code */
  132741. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  132742. goto __pyx_L0;
  132743. __pyx_L1_error:;
  132744. __Pyx_XDECREF(__pyx_t_1);
  132745. __Pyx_XDECREF(__pyx_t_7);
  132746. __Pyx_XDECREF(__pyx_t_8);
  132747. __Pyx_XDECREF(__pyx_t_9);
  132748. __Pyx_AddTraceback("uvloop.loop.__pyx_unpickle_LruCache__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  132749. __pyx_r = 0;
  132750. __pyx_L0:;
  132751. __Pyx_XGIVEREF(__pyx_r);
  132752. __Pyx_RefNannyFinishContext();
  132753. return __pyx_r;
  132754. }
  132755. /* "includes/flowcontrol.pxd":4
  132756. *
  132757. *
  132758. * cdef inline add_flowcontrol_defaults(high, low, int kb): # <<<<<<<<<<<<<<
  132759. * cdef int h, l
  132760. * if high is None:
  132761. */
  132762. static CYTHON_INLINE PyObject *__pyx_f_6uvloop_8includes_11flowcontrol_add_flowcontrol_defaults(PyObject *__pyx_v_high, PyObject *__pyx_v_low, int __pyx_v_kb) {
  132763. int __pyx_v_h;
  132764. int __pyx_v_l;
  132765. PyObject *__pyx_r = NULL;
  132766. __Pyx_RefNannyDeclarations
  132767. int __pyx_t_1;
  132768. int __pyx_t_2;
  132769. int __pyx_t_3;
  132770. PyObject *__pyx_t_4 = NULL;
  132771. Py_ssize_t __pyx_t_5;
  132772. Py_UCS4 __pyx_t_6;
  132773. PyObject *__pyx_t_7 = NULL;
  132774. PyObject *__pyx_t_8 = NULL;
  132775. __Pyx_RefNannySetupContext("add_flowcontrol_defaults", 0);
  132776. /* "includes/flowcontrol.pxd":6
  132777. * cdef inline add_flowcontrol_defaults(high, low, int kb):
  132778. * cdef int h, l
  132779. * if high is None: # <<<<<<<<<<<<<<
  132780. * if low is None:
  132781. * h = kb * 1024
  132782. */
  132783. __pyx_t_1 = (__pyx_v_high == Py_None);
  132784. __pyx_t_2 = (__pyx_t_1 != 0);
  132785. if (__pyx_t_2) {
  132786. /* "includes/flowcontrol.pxd":7
  132787. * cdef int h, l
  132788. * if high is None:
  132789. * if low is None: # <<<<<<<<<<<<<<
  132790. * h = kb * 1024
  132791. * else:
  132792. */
  132793. __pyx_t_2 = (__pyx_v_low == Py_None);
  132794. __pyx_t_1 = (__pyx_t_2 != 0);
  132795. if (__pyx_t_1) {
  132796. /* "includes/flowcontrol.pxd":8
  132797. * if high is None:
  132798. * if low is None:
  132799. * h = kb * 1024 # <<<<<<<<<<<<<<
  132800. * else:
  132801. * l = low
  132802. */
  132803. __pyx_v_h = (__pyx_v_kb * 0x400);
  132804. /* "includes/flowcontrol.pxd":7
  132805. * cdef int h, l
  132806. * if high is None:
  132807. * if low is None: # <<<<<<<<<<<<<<
  132808. * h = kb * 1024
  132809. * else:
  132810. */
  132811. goto __pyx_L4;
  132812. }
  132813. /* "includes/flowcontrol.pxd":10
  132814. * h = kb * 1024
  132815. * else:
  132816. * l = low # <<<<<<<<<<<<<<
  132817. * h = 4 * l
  132818. * else:
  132819. */
  132820. /*else*/ {
  132821. __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v_low); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(25, 10, __pyx_L1_error)
  132822. __pyx_v_l = __pyx_t_3;
  132823. /* "includes/flowcontrol.pxd":11
  132824. * else:
  132825. * l = low
  132826. * h = 4 * l # <<<<<<<<<<<<<<
  132827. * else:
  132828. * h = high
  132829. */
  132830. __pyx_v_h = (4 * __pyx_v_l);
  132831. }
  132832. __pyx_L4:;
  132833. /* "includes/flowcontrol.pxd":6
  132834. * cdef inline add_flowcontrol_defaults(high, low, int kb):
  132835. * cdef int h, l
  132836. * if high is None: # <<<<<<<<<<<<<<
  132837. * if low is None:
  132838. * h = kb * 1024
  132839. */
  132840. goto __pyx_L3;
  132841. }
  132842. /* "includes/flowcontrol.pxd":13
  132843. * h = 4 * l
  132844. * else:
  132845. * h = high # <<<<<<<<<<<<<<
  132846. * if low is None:
  132847. * l = h // 4
  132848. */
  132849. /*else*/ {
  132850. __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v_high); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(25, 13, __pyx_L1_error)
  132851. __pyx_v_h = __pyx_t_3;
  132852. }
  132853. __pyx_L3:;
  132854. /* "includes/flowcontrol.pxd":14
  132855. * else:
  132856. * h = high
  132857. * if low is None: # <<<<<<<<<<<<<<
  132858. * l = h // 4
  132859. * else:
  132860. */
  132861. __pyx_t_1 = (__pyx_v_low == Py_None);
  132862. __pyx_t_2 = (__pyx_t_1 != 0);
  132863. if (__pyx_t_2) {
  132864. /* "includes/flowcontrol.pxd":15
  132865. * h = high
  132866. * if low is None:
  132867. * l = h // 4 # <<<<<<<<<<<<<<
  132868. * else:
  132869. * l = low
  132870. */
  132871. __pyx_v_l = __Pyx_div_long(__pyx_v_h, 4);
  132872. /* "includes/flowcontrol.pxd":14
  132873. * else:
  132874. * h = high
  132875. * if low is None: # <<<<<<<<<<<<<<
  132876. * l = h // 4
  132877. * else:
  132878. */
  132879. goto __pyx_L5;
  132880. }
  132881. /* "includes/flowcontrol.pxd":17
  132882. * l = h // 4
  132883. * else:
  132884. * l = low # <<<<<<<<<<<<<<
  132885. *
  132886. * if not h >= l >= 0:
  132887. */
  132888. /*else*/ {
  132889. __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v_low); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(25, 17, __pyx_L1_error)
  132890. __pyx_v_l = __pyx_t_3;
  132891. }
  132892. __pyx_L5:;
  132893. /* "includes/flowcontrol.pxd":19
  132894. * l = low
  132895. *
  132896. * if not h >= l >= 0: # <<<<<<<<<<<<<<
  132897. * raise ValueError('high (%r) must be >= low (%r) must be >= 0' %
  132898. * (h, l))
  132899. */
  132900. __pyx_t_2 = (__pyx_v_h >= __pyx_v_l);
  132901. if (__pyx_t_2) {
  132902. __pyx_t_2 = (__pyx_v_l >= 0);
  132903. }
  132904. __pyx_t_1 = ((!(__pyx_t_2 != 0)) != 0);
  132905. if (unlikely(__pyx_t_1)) {
  132906. /* "includes/flowcontrol.pxd":20
  132907. *
  132908. * if not h >= l >= 0:
  132909. * raise ValueError('high (%r) must be >= low (%r) must be >= 0' % # <<<<<<<<<<<<<<
  132910. * (h, l))
  132911. *
  132912. */
  132913. __pyx_t_4 = PyTuple_New(5); if (unlikely(!__pyx_t_4)) __PYX_ERR(25, 20, __pyx_L1_error)
  132914. __Pyx_GOTREF(__pyx_t_4);
  132915. __pyx_t_5 = 0;
  132916. __pyx_t_6 = 127;
  132917. __Pyx_INCREF(__pyx_kp_u_high_2);
  132918. __pyx_t_5 += 6;
  132919. __Pyx_GIVEREF(__pyx_kp_u_high_2);
  132920. PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_high_2);
  132921. /* "includes/flowcontrol.pxd":21
  132922. * if not h >= l >= 0:
  132923. * raise ValueError('high (%r) must be >= low (%r) must be >= 0' %
  132924. * (h, l)) # <<<<<<<<<<<<<<
  132925. *
  132926. * return h, l
  132927. */
  132928. __pyx_t_7 = __Pyx_PyUnicode_From_int(__pyx_v_h, 0, ' ', 'd'); if (unlikely(!__pyx_t_7)) __PYX_ERR(25, 21, __pyx_L1_error)
  132929. __Pyx_GOTREF(__pyx_t_7);
  132930. __pyx_t_5 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7);
  132931. __Pyx_GIVEREF(__pyx_t_7);
  132932. PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_7);
  132933. __pyx_t_7 = 0;
  132934. __Pyx_INCREF(__pyx_kp_u_must_be_low);
  132935. __pyx_t_5 += 18;
  132936. __Pyx_GIVEREF(__pyx_kp_u_must_be_low);
  132937. PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_kp_u_must_be_low);
  132938. __pyx_t_7 = __Pyx_PyUnicode_From_int(__pyx_v_l, 0, ' ', 'd'); if (unlikely(!__pyx_t_7)) __PYX_ERR(25, 21, __pyx_L1_error)
  132939. __Pyx_GOTREF(__pyx_t_7);
  132940. __pyx_t_5 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7);
  132941. __Pyx_GIVEREF(__pyx_t_7);
  132942. PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_t_7);
  132943. __pyx_t_7 = 0;
  132944. __Pyx_INCREF(__pyx_kp_u_must_be_0);
  132945. __pyx_t_5 += 14;
  132946. __Pyx_GIVEREF(__pyx_kp_u_must_be_0);
  132947. PyTuple_SET_ITEM(__pyx_t_4, 4, __pyx_kp_u_must_be_0);
  132948. /* "includes/flowcontrol.pxd":20
  132949. *
  132950. * if not h >= l >= 0:
  132951. * raise ValueError('high (%r) must be >= low (%r) must be >= 0' % # <<<<<<<<<<<<<<
  132952. * (h, l))
  132953. *
  132954. */
  132955. __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_4, 5, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(25, 20, __pyx_L1_error)
  132956. __Pyx_GOTREF(__pyx_t_7);
  132957. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  132958. __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(25, 20, __pyx_L1_error)
  132959. __Pyx_GOTREF(__pyx_t_4);
  132960. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  132961. __Pyx_Raise(__pyx_t_4, 0, 0, 0);
  132962. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  132963. __PYX_ERR(25, 20, __pyx_L1_error)
  132964. /* "includes/flowcontrol.pxd":19
  132965. * l = low
  132966. *
  132967. * if not h >= l >= 0: # <<<<<<<<<<<<<<
  132968. * raise ValueError('high (%r) must be >= low (%r) must be >= 0' %
  132969. * (h, l))
  132970. */
  132971. }
  132972. /* "includes/flowcontrol.pxd":23
  132973. * (h, l))
  132974. *
  132975. * return h, l # <<<<<<<<<<<<<<
  132976. */
  132977. __Pyx_XDECREF(__pyx_r);
  132978. __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_h); if (unlikely(!__pyx_t_4)) __PYX_ERR(25, 23, __pyx_L1_error)
  132979. __Pyx_GOTREF(__pyx_t_4);
  132980. __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_l); if (unlikely(!__pyx_t_7)) __PYX_ERR(25, 23, __pyx_L1_error)
  132981. __Pyx_GOTREF(__pyx_t_7);
  132982. __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(25, 23, __pyx_L1_error)
  132983. __Pyx_GOTREF(__pyx_t_8);
  132984. __Pyx_GIVEREF(__pyx_t_4);
  132985. PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_4);
  132986. __Pyx_GIVEREF(__pyx_t_7);
  132987. PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_7);
  132988. __pyx_t_4 = 0;
  132989. __pyx_t_7 = 0;
  132990. __pyx_r = __pyx_t_8;
  132991. __pyx_t_8 = 0;
  132992. goto __pyx_L0;
  132993. /* "includes/flowcontrol.pxd":4
  132994. *
  132995. *
  132996. * cdef inline add_flowcontrol_defaults(high, low, int kb): # <<<<<<<<<<<<<<
  132997. * cdef int h, l
  132998. * if high is None:
  132999. */
  133000. /* function exit code */
  133001. __pyx_L1_error:;
  133002. __Pyx_XDECREF(__pyx_t_4);
  133003. __Pyx_XDECREF(__pyx_t_7);
  133004. __Pyx_XDECREF(__pyx_t_8);
  133005. __Pyx_AddTraceback("uvloop.includes.flowcontrol.add_flowcontrol_defaults", __pyx_clineno, __pyx_lineno, __pyx_filename);
  133006. __pyx_r = 0;
  133007. __pyx_L0:;
  133008. __Pyx_XGIVEREF(__pyx_r);
  133009. __Pyx_RefNannyFinishContext();
  133010. return __pyx_r;
  133011. }
  133012. /* "cfunc.to_py":65
  133013. * @cname("__Pyx_CFunc_object____Loop____bint___to_py")
  133014. * cdef object __Pyx_CFunc_object____Loop____bint___to_py(object (*f)(Loop, bint) ):
  133015. * def wrap(Loop self, bint enabled): # <<<<<<<<<<<<<<
  133016. * """wrap(self: 'Loop', enabled: bool)"""
  133017. * return f(self, enabled)
  133018. */
  133019. /* Python wrapper */
  133020. static PyObject *__pyx_pw_11cfunc_dot_to_py_42__Pyx_CFunc_object____Loop____bint___to_py_1wrap(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  133021. static char __pyx_doc_11cfunc_dot_to_py_42__Pyx_CFunc_object____Loop____bint___to_py_wrap[] = "wrap(self: 'Loop', enabled: bool)";
  133022. static PyMethodDef __pyx_mdef_11cfunc_dot_to_py_42__Pyx_CFunc_object____Loop____bint___to_py_1wrap = {"wrap", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11cfunc_dot_to_py_42__Pyx_CFunc_object____Loop____bint___to_py_1wrap, METH_VARARGS|METH_KEYWORDS, __pyx_doc_11cfunc_dot_to_py_42__Pyx_CFunc_object____Loop____bint___to_py_wrap};
  133023. static PyObject *__pyx_pw_11cfunc_dot_to_py_42__Pyx_CFunc_object____Loop____bint___to_py_1wrap(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  133024. struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self = 0;
  133025. int __pyx_v_enabled;
  133026. PyObject *__pyx_r = 0;
  133027. __Pyx_RefNannyDeclarations
  133028. __Pyx_RefNannySetupContext("wrap (wrapper)", 0);
  133029. {
  133030. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self_2,&__pyx_n_s_enabled,0};
  133031. PyObject* values[2] = {0,0};
  133032. if (unlikely(__pyx_kwds)) {
  133033. Py_ssize_t kw_args;
  133034. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  133035. switch (pos_args) {
  133036. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  133037. CYTHON_FALLTHROUGH;
  133038. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  133039. CYTHON_FALLTHROUGH;
  133040. case 0: break;
  133041. default: goto __pyx_L5_argtuple_error;
  133042. }
  133043. kw_args = PyDict_Size(__pyx_kwds);
  133044. switch (pos_args) {
  133045. case 0:
  133046. if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self_2)) != 0)) kw_args--;
  133047. else goto __pyx_L5_argtuple_error;
  133048. CYTHON_FALLTHROUGH;
  133049. case 1:
  133050. if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_enabled)) != 0)) kw_args--;
  133051. else {
  133052. __Pyx_RaiseArgtupleInvalid("wrap", 1, 2, 2, 1); __PYX_ERR(9, 65, __pyx_L3_error)
  133053. }
  133054. }
  133055. if (unlikely(kw_args > 0)) {
  133056. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "wrap") < 0)) __PYX_ERR(9, 65, __pyx_L3_error)
  133057. }
  133058. } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
  133059. goto __pyx_L5_argtuple_error;
  133060. } else {
  133061. values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  133062. values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  133063. }
  133064. __pyx_v_self = ((struct __pyx_obj_6uvloop_4loop_Loop *)values[0]);
  133065. __pyx_v_enabled = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_enabled == (int)-1) && PyErr_Occurred())) __PYX_ERR(9, 65, __pyx_L3_error)
  133066. }
  133067. goto __pyx_L4_argument_unpacking_done;
  133068. __pyx_L5_argtuple_error:;
  133069. __Pyx_RaiseArgtupleInvalid("wrap", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(9, 65, __pyx_L3_error)
  133070. __pyx_L3_error:;
  133071. __Pyx_AddTraceback("cfunc.to_py.__Pyx_CFunc_object____Loop____bint___to_py.wrap", __pyx_clineno, __pyx_lineno, __pyx_filename);
  133072. __Pyx_RefNannyFinishContext();
  133073. return NULL;
  133074. __pyx_L4_argument_unpacking_done:;
  133075. if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_self), __pyx_ptype_6uvloop_4loop_Loop, 1, "self", 0))) __PYX_ERR(9, 65, __pyx_L1_error)
  133076. __pyx_r = __pyx_pf_11cfunc_dot_to_py_42__Pyx_CFunc_object____Loop____bint___to_py_wrap(__pyx_self, __pyx_v_self, __pyx_v_enabled);
  133077. /* function exit code */
  133078. goto __pyx_L0;
  133079. __pyx_L1_error:;
  133080. __pyx_r = NULL;
  133081. __pyx_L0:;
  133082. __Pyx_RefNannyFinishContext();
  133083. return __pyx_r;
  133084. }
  133085. static PyObject *__pyx_pf_11cfunc_dot_to_py_42__Pyx_CFunc_object____Loop____bint___to_py_wrap(PyObject *__pyx_self, struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, int __pyx_v_enabled) {
  133086. struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_object____Loop____bint___to_py *__pyx_cur_scope;
  133087. struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_object____Loop____bint___to_py *__pyx_outer_scope;
  133088. PyObject *__pyx_r = NULL;
  133089. __Pyx_RefNannyDeclarations
  133090. PyObject *__pyx_t_1 = NULL;
  133091. __Pyx_RefNannySetupContext("wrap", 0);
  133092. __pyx_outer_scope = (struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_object____Loop____bint___to_py *) __Pyx_CyFunction_GetClosure(__pyx_self);
  133093. __pyx_cur_scope = __pyx_outer_scope;
  133094. /* "cfunc.to_py":67
  133095. * def wrap(Loop self, bint enabled):
  133096. * """wrap(self: 'Loop', enabled: bool)"""
  133097. * return f(self, enabled) # <<<<<<<<<<<<<<
  133098. * return wrap
  133099. *
  133100. */
  133101. __Pyx_XDECREF(__pyx_r);
  133102. __pyx_t_1 = __pyx_cur_scope->__pyx_v_f(__pyx_v_self, __pyx_v_enabled); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 67, __pyx_L1_error)
  133103. __Pyx_GOTREF(__pyx_t_1);
  133104. __pyx_r = __pyx_t_1;
  133105. __pyx_t_1 = 0;
  133106. goto __pyx_L0;
  133107. /* "cfunc.to_py":65
  133108. * @cname("__Pyx_CFunc_object____Loop____bint___to_py")
  133109. * cdef object __Pyx_CFunc_object____Loop____bint___to_py(object (*f)(Loop, bint) ):
  133110. * def wrap(Loop self, bint enabled): # <<<<<<<<<<<<<<
  133111. * """wrap(self: 'Loop', enabled: bool)"""
  133112. * return f(self, enabled)
  133113. */
  133114. /* function exit code */
  133115. __pyx_L1_error:;
  133116. __Pyx_XDECREF(__pyx_t_1);
  133117. __Pyx_AddTraceback("cfunc.to_py.__Pyx_CFunc_object____Loop____bint___to_py.wrap", __pyx_clineno, __pyx_lineno, __pyx_filename);
  133118. __pyx_r = NULL;
  133119. __pyx_L0:;
  133120. __Pyx_XGIVEREF(__pyx_r);
  133121. __Pyx_RefNannyFinishContext();
  133122. return __pyx_r;
  133123. }
  133124. /* "cfunc.to_py":64
  133125. *
  133126. * @cname("__Pyx_CFunc_object____Loop____bint___to_py")
  133127. * cdef object __Pyx_CFunc_object____Loop____bint___to_py(object (*f)(Loop, bint) ): # <<<<<<<<<<<<<<
  133128. * def wrap(Loop self, bint enabled):
  133129. * """wrap(self: 'Loop', enabled: bool)"""
  133130. */
  133131. static PyObject *__Pyx_CFunc_object____Loop____bint___to_py(PyObject *(*__pyx_v_f)(struct __pyx_obj_6uvloop_4loop_Loop *, int)) {
  133132. struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_object____Loop____bint___to_py *__pyx_cur_scope;
  133133. PyObject *__pyx_v_wrap = 0;
  133134. PyObject *__pyx_r = NULL;
  133135. __Pyx_RefNannyDeclarations
  133136. PyObject *__pyx_t_1 = NULL;
  133137. __Pyx_RefNannySetupContext("__Pyx_CFunc_object____Loop____bint___to_py", 0);
  133138. __pyx_cur_scope = (struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_object____Loop____bint___to_py *)__pyx_tp_new___pyx_scope_struct____Pyx_CFunc_object____Loop____bint___to_py(__pyx_ptype___pyx_scope_struct____Pyx_CFunc_object____Loop____bint___to_py, __pyx_empty_tuple, NULL);
  133139. if (unlikely(!__pyx_cur_scope)) {
  133140. __pyx_cur_scope = ((struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_object____Loop____bint___to_py *)Py_None);
  133141. __Pyx_INCREF(Py_None);
  133142. __PYX_ERR(9, 64, __pyx_L1_error)
  133143. } else {
  133144. __Pyx_GOTREF(__pyx_cur_scope);
  133145. }
  133146. __pyx_cur_scope->__pyx_v_f = __pyx_v_f;
  133147. /* "cfunc.to_py":65
  133148. * @cname("__Pyx_CFunc_object____Loop____bint___to_py")
  133149. * cdef object __Pyx_CFunc_object____Loop____bint___to_py(object (*f)(Loop, bint) ):
  133150. * def wrap(Loop self, bint enabled): # <<<<<<<<<<<<<<
  133151. * """wrap(self: 'Loop', enabled: bool)"""
  133152. * return f(self, enabled)
  133153. */
  133154. __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11cfunc_dot_to_py_42__Pyx_CFunc_object____Loop____bint___to_py_1wrap, 0, __pyx_n_s_Pyx_CFunc_object____Loop____bi, ((PyObject*)__pyx_cur_scope), __pyx_n_s_cfunc_to_py, __pyx_d, ((PyObject *)__pyx_codeobj__219)); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 65, __pyx_L1_error)
  133155. __Pyx_GOTREF(__pyx_t_1);
  133156. __pyx_v_wrap = __pyx_t_1;
  133157. __pyx_t_1 = 0;
  133158. /* "cfunc.to_py":68
  133159. * """wrap(self: 'Loop', enabled: bool)"""
  133160. * return f(self, enabled)
  133161. * return wrap # <<<<<<<<<<<<<<
  133162. *
  133163. *
  133164. */
  133165. __Pyx_XDECREF(__pyx_r);
  133166. __Pyx_INCREF(__pyx_v_wrap);
  133167. __pyx_r = __pyx_v_wrap;
  133168. goto __pyx_L0;
  133169. /* "cfunc.to_py":64
  133170. *
  133171. * @cname("__Pyx_CFunc_object____Loop____bint___to_py")
  133172. * cdef object __Pyx_CFunc_object____Loop____bint___to_py(object (*f)(Loop, bint) ): # <<<<<<<<<<<<<<
  133173. * def wrap(Loop self, bint enabled):
  133174. * """wrap(self: 'Loop', enabled: bool)"""
  133175. */
  133176. /* function exit code */
  133177. __pyx_L1_error:;
  133178. __Pyx_XDECREF(__pyx_t_1);
  133179. __Pyx_AddTraceback("cfunc.to_py.__Pyx_CFunc_object____Loop____bint___to_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
  133180. __pyx_r = 0;
  133181. __pyx_L0:;
  133182. __Pyx_XDECREF(__pyx_v_wrap);
  133183. __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  133184. __Pyx_XGIVEREF(__pyx_r);
  133185. __Pyx_RefNannyFinishContext();
  133186. return __pyx_r;
  133187. }
  133188. static struct __pyx_vtabstruct_6uvloop_4loop_UVHandle __pyx_vtable_6uvloop_4loop_UVHandle;
  133189. static PyObject *__pyx_tp_new_6uvloop_4loop_UVHandle(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  133190. struct __pyx_obj_6uvloop_4loop_UVHandle *p;
  133191. PyObject *o;
  133192. if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
  133193. o = (*t->tp_alloc)(t, 0);
  133194. } else {
  133195. o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  133196. }
  133197. if (unlikely(!o)) return 0;
  133198. p = ((struct __pyx_obj_6uvloop_4loop_UVHandle *)o);
  133199. p->__pyx_vtab = __pyx_vtabptr_6uvloop_4loop_UVHandle;
  133200. p->_loop = ((struct __pyx_obj_6uvloop_4loop_Loop *)Py_None); Py_INCREF(Py_None);
  133201. p->_source_traceback = Py_None; Py_INCREF(Py_None);
  133202. if (unlikely(__pyx_pw_6uvloop_4loop_8UVHandle_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad;
  133203. return o;
  133204. bad:
  133205. Py_DECREF(o); o = 0;
  133206. return NULL;
  133207. }
  133208. static void __pyx_tp_dealloc_6uvloop_4loop_UVHandle(PyObject *o) {
  133209. struct __pyx_obj_6uvloop_4loop_UVHandle *p = (struct __pyx_obj_6uvloop_4loop_UVHandle *)o;
  133210. #if CYTHON_USE_TP_FINALIZE
  133211. if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
  133212. if (PyObject_CallFinalizerFromDealloc(o)) return;
  133213. }
  133214. #endif
  133215. PyObject_GC_UnTrack(o);
  133216. {
  133217. PyObject *etype, *eval, *etb;
  133218. PyErr_Fetch(&etype, &eval, &etb);
  133219. ++Py_REFCNT(o);
  133220. __pyx_pw_6uvloop_4loop_8UVHandle_5__dealloc__(o);
  133221. --Py_REFCNT(o);
  133222. PyErr_Restore(etype, eval, etb);
  133223. }
  133224. Py_CLEAR(p->_loop);
  133225. Py_CLEAR(p->_source_traceback);
  133226. (*Py_TYPE(o)->tp_free)(o);
  133227. }
  133228. static int __pyx_tp_traverse_6uvloop_4loop_UVHandle(PyObject *o, visitproc v, void *a) {
  133229. int e;
  133230. struct __pyx_obj_6uvloop_4loop_UVHandle *p = (struct __pyx_obj_6uvloop_4loop_UVHandle *)o;
  133231. if (p->_loop) {
  133232. e = (*v)(((PyObject *)p->_loop), a); if (e) return e;
  133233. }
  133234. if (p->_source_traceback) {
  133235. e = (*v)(p->_source_traceback, a); if (e) return e;
  133236. }
  133237. return 0;
  133238. }
  133239. static int __pyx_tp_clear_6uvloop_4loop_UVHandle(PyObject *o) {
  133240. PyObject* tmp;
  133241. struct __pyx_obj_6uvloop_4loop_UVHandle *p = (struct __pyx_obj_6uvloop_4loop_UVHandle *)o;
  133242. tmp = ((PyObject*)p->_loop);
  133243. p->_loop = ((struct __pyx_obj_6uvloop_4loop_Loop *)Py_None); Py_INCREF(Py_None);
  133244. Py_XDECREF(tmp);
  133245. tmp = ((PyObject*)p->_source_traceback);
  133246. p->_source_traceback = Py_None; Py_INCREF(Py_None);
  133247. Py_XDECREF(tmp);
  133248. return 0;
  133249. }
  133250. static PyObject *__pyx_getprop_6uvloop_4loop_8UVHandle__source_traceback(PyObject *o, CYTHON_UNUSED void *x) {
  133251. return __pyx_pw_6uvloop_4loop_8UVHandle_17_source_traceback_1__get__(o);
  133252. }
  133253. static PyMethodDef __pyx_methods_6uvloop_4loop_UVHandle[] = {
  133254. {"__reduce_cython__", (PyCFunction)__pyx_pw_6uvloop_4loop_8UVHandle_9__reduce_cython__, METH_NOARGS, __pyx_doc_6uvloop_4loop_8UVHandle_8__reduce_cython__},
  133255. {"__setstate_cython__", (PyCFunction)__pyx_pw_6uvloop_4loop_8UVHandle_11__setstate_cython__, METH_O, __pyx_doc_6uvloop_4loop_8UVHandle_10__setstate_cython__},
  133256. {0, 0, 0, 0}
  133257. };
  133258. static struct PyGetSetDef __pyx_getsets_6uvloop_4loop_UVHandle[] = {
  133259. {(char *)"_source_traceback", __pyx_getprop_6uvloop_4loop_8UVHandle__source_traceback, 0, (char *)0, 0},
  133260. {0, 0, 0, 0, 0}
  133261. };
  133262. static PyTypeObject __pyx_type_6uvloop_4loop_UVHandle = {
  133263. PyVarObject_HEAD_INIT(0, 0)
  133264. "uvloop.loop.UVHandle", /*tp_name*/
  133265. sizeof(struct __pyx_obj_6uvloop_4loop_UVHandle), /*tp_basicsize*/
  133266. 0, /*tp_itemsize*/
  133267. __pyx_tp_dealloc_6uvloop_4loop_UVHandle, /*tp_dealloc*/
  133268. 0, /*tp_print*/
  133269. 0, /*tp_getattr*/
  133270. 0, /*tp_setattr*/
  133271. #if PY_MAJOR_VERSION < 3
  133272. 0, /*tp_compare*/
  133273. #endif
  133274. #if PY_MAJOR_VERSION >= 3
  133275. 0, /*tp_as_async*/
  133276. #endif
  133277. __pyx_pw_6uvloop_4loop_8UVHandle_7__repr__, /*tp_repr*/
  133278. 0, /*tp_as_number*/
  133279. 0, /*tp_as_sequence*/
  133280. 0, /*tp_as_mapping*/
  133281. 0, /*tp_hash*/
  133282. 0, /*tp_call*/
  133283. 0, /*tp_str*/
  133284. 0, /*tp_getattro*/
  133285. 0, /*tp_setattro*/
  133286. 0, /*tp_as_buffer*/
  133287. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  133288. "UVHandle()\nA base class for all libuv handles.\n\n Automatically manages memory deallocation and closing.\n\n Important:\n\n 1. call \"_ensure_alive()\" before calling any libuv functions on\n your handles.\n\n 2. call \"__ensure_handle_data\" in *all* libuv handle callbacks.\n ", /*tp_doc*/
  133289. __pyx_tp_traverse_6uvloop_4loop_UVHandle, /*tp_traverse*/
  133290. __pyx_tp_clear_6uvloop_4loop_UVHandle, /*tp_clear*/
  133291. 0, /*tp_richcompare*/
  133292. 0, /*tp_weaklistoffset*/
  133293. 0, /*tp_iter*/
  133294. 0, /*tp_iternext*/
  133295. __pyx_methods_6uvloop_4loop_UVHandle, /*tp_methods*/
  133296. 0, /*tp_members*/
  133297. __pyx_getsets_6uvloop_4loop_UVHandle, /*tp_getset*/
  133298. 0, /*tp_base*/
  133299. 0, /*tp_dict*/
  133300. 0, /*tp_descr_get*/
  133301. 0, /*tp_descr_set*/
  133302. 0, /*tp_dictoffset*/
  133303. __pyx_pw_6uvloop_4loop_8UVHandle_3__init__, /*tp_init*/
  133304. 0, /*tp_alloc*/
  133305. __pyx_tp_new_6uvloop_4loop_UVHandle, /*tp_new*/
  133306. 0, /*tp_free*/
  133307. 0, /*tp_is_gc*/
  133308. 0, /*tp_bases*/
  133309. 0, /*tp_mro*/
  133310. 0, /*tp_cache*/
  133311. 0, /*tp_subclasses*/
  133312. 0, /*tp_weaklist*/
  133313. 0, /*tp_del*/
  133314. 0, /*tp_version_tag*/
  133315. #if PY_VERSION_HEX >= 0x030400a1
  133316. 0, /*tp_finalize*/
  133317. #endif
  133318. #if PY_VERSION_HEX >= 0x030800b1
  133319. 0, /*tp_vectorcall*/
  133320. #endif
  133321. };
  133322. static struct __pyx_vtabstruct_6uvloop_4loop_UVSocketHandle __pyx_vtable_6uvloop_4loop_UVSocketHandle;
  133323. static PyObject *__pyx_tp_new_6uvloop_4loop_UVSocketHandle(PyTypeObject *t, PyObject *a, PyObject *k) {
  133324. struct __pyx_obj_6uvloop_4loop_UVSocketHandle *p;
  133325. PyObject *o = __pyx_tp_new_6uvloop_4loop_UVHandle(t, a, k);
  133326. if (unlikely(!o)) return 0;
  133327. p = ((struct __pyx_obj_6uvloop_4loop_UVSocketHandle *)o);
  133328. p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6uvloop_4loop_UVHandle*)__pyx_vtabptr_6uvloop_4loop_UVSocketHandle;
  133329. p->_fileobj = Py_None; Py_INCREF(Py_None);
  133330. p->__pyx___cached_socket = Py_None; Py_INCREF(Py_None);
  133331. if (unlikely(__pyx_pw_6uvloop_4loop_14UVSocketHandle_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad;
  133332. return o;
  133333. bad:
  133334. Py_DECREF(o); o = 0;
  133335. return NULL;
  133336. }
  133337. static void __pyx_tp_dealloc_6uvloop_4loop_UVSocketHandle(PyObject *o) {
  133338. struct __pyx_obj_6uvloop_4loop_UVSocketHandle *p = (struct __pyx_obj_6uvloop_4loop_UVSocketHandle *)o;
  133339. #if CYTHON_USE_TP_FINALIZE
  133340. if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
  133341. if (PyObject_CallFinalizerFromDealloc(o)) return;
  133342. }
  133343. #endif
  133344. PyObject_GC_UnTrack(o);
  133345. Py_CLEAR(p->_fileobj);
  133346. Py_CLEAR(p->__pyx___cached_socket);
  133347. PyObject_GC_Track(o);
  133348. __pyx_tp_dealloc_6uvloop_4loop_UVHandle(o);
  133349. }
  133350. static int __pyx_tp_traverse_6uvloop_4loop_UVSocketHandle(PyObject *o, visitproc v, void *a) {
  133351. int e;
  133352. struct __pyx_obj_6uvloop_4loop_UVSocketHandle *p = (struct __pyx_obj_6uvloop_4loop_UVSocketHandle *)o;
  133353. e = __pyx_tp_traverse_6uvloop_4loop_UVHandle(o, v, a); if (e) return e;
  133354. if (p->_fileobj) {
  133355. e = (*v)(p->_fileobj, a); if (e) return e;
  133356. }
  133357. if (p->__pyx___cached_socket) {
  133358. e = (*v)(p->__pyx___cached_socket, a); if (e) return e;
  133359. }
  133360. return 0;
  133361. }
  133362. static int __pyx_tp_clear_6uvloop_4loop_UVSocketHandle(PyObject *o) {
  133363. PyObject* tmp;
  133364. struct __pyx_obj_6uvloop_4loop_UVSocketHandle *p = (struct __pyx_obj_6uvloop_4loop_UVSocketHandle *)o;
  133365. __pyx_tp_clear_6uvloop_4loop_UVHandle(o);
  133366. tmp = ((PyObject*)p->_fileobj);
  133367. p->_fileobj = Py_None; Py_INCREF(Py_None);
  133368. Py_XDECREF(tmp);
  133369. tmp = ((PyObject*)p->__pyx___cached_socket);
  133370. p->__pyx___cached_socket = Py_None; Py_INCREF(Py_None);
  133371. Py_XDECREF(tmp);
  133372. return 0;
  133373. }
  133374. static PyMethodDef __pyx_methods_6uvloop_4loop_UVSocketHandle[] = {
  133375. {"__reduce_cython__", (PyCFunction)__pyx_pw_6uvloop_4loop_14UVSocketHandle_3__reduce_cython__, METH_NOARGS, __pyx_doc_6uvloop_4loop_14UVSocketHandle_2__reduce_cython__},
  133376. {"__setstate_cython__", (PyCFunction)__pyx_pw_6uvloop_4loop_14UVSocketHandle_5__setstate_cython__, METH_O, __pyx_doc_6uvloop_4loop_14UVSocketHandle_4__setstate_cython__},
  133377. {0, 0, 0, 0}
  133378. };
  133379. static PyTypeObject __pyx_type_6uvloop_4loop_UVSocketHandle = {
  133380. PyVarObject_HEAD_INIT(0, 0)
  133381. "uvloop.loop.UVSocketHandle", /*tp_name*/
  133382. sizeof(struct __pyx_obj_6uvloop_4loop_UVSocketHandle), /*tp_basicsize*/
  133383. 0, /*tp_itemsize*/
  133384. __pyx_tp_dealloc_6uvloop_4loop_UVSocketHandle, /*tp_dealloc*/
  133385. 0, /*tp_print*/
  133386. 0, /*tp_getattr*/
  133387. 0, /*tp_setattr*/
  133388. #if PY_MAJOR_VERSION < 3
  133389. 0, /*tp_compare*/
  133390. #endif
  133391. #if PY_MAJOR_VERSION >= 3
  133392. 0, /*tp_as_async*/
  133393. #endif
  133394. #if CYTHON_COMPILING_IN_PYPY
  133395. __pyx_pw_6uvloop_4loop_8UVHandle_7__repr__, /*tp_repr*/
  133396. #else
  133397. 0, /*tp_repr*/
  133398. #endif
  133399. 0, /*tp_as_number*/
  133400. 0, /*tp_as_sequence*/
  133401. 0, /*tp_as_mapping*/
  133402. 0, /*tp_hash*/
  133403. 0, /*tp_call*/
  133404. 0, /*tp_str*/
  133405. 0, /*tp_getattro*/
  133406. 0, /*tp_setattro*/
  133407. 0, /*tp_as_buffer*/
  133408. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  133409. 0, /*tp_doc*/
  133410. __pyx_tp_traverse_6uvloop_4loop_UVSocketHandle, /*tp_traverse*/
  133411. __pyx_tp_clear_6uvloop_4loop_UVSocketHandle, /*tp_clear*/
  133412. 0, /*tp_richcompare*/
  133413. 0, /*tp_weaklistoffset*/
  133414. 0, /*tp_iter*/
  133415. 0, /*tp_iternext*/
  133416. __pyx_methods_6uvloop_4loop_UVSocketHandle, /*tp_methods*/
  133417. 0, /*tp_members*/
  133418. 0, /*tp_getset*/
  133419. 0, /*tp_base*/
  133420. 0, /*tp_dict*/
  133421. 0, /*tp_descr_get*/
  133422. 0, /*tp_descr_set*/
  133423. 0, /*tp_dictoffset*/
  133424. #if CYTHON_COMPILING_IN_PYPY
  133425. __pyx_pw_6uvloop_4loop_8UVHandle_3__init__, /*tp_init*/
  133426. #else
  133427. 0, /*tp_init*/
  133428. #endif
  133429. 0, /*tp_alloc*/
  133430. __pyx_tp_new_6uvloop_4loop_UVSocketHandle, /*tp_new*/
  133431. 0, /*tp_free*/
  133432. 0, /*tp_is_gc*/
  133433. 0, /*tp_bases*/
  133434. 0, /*tp_mro*/
  133435. 0, /*tp_cache*/
  133436. 0, /*tp_subclasses*/
  133437. 0, /*tp_weaklist*/
  133438. 0, /*tp_del*/
  133439. 0, /*tp_version_tag*/
  133440. #if PY_VERSION_HEX >= 0x030400a1
  133441. 0, /*tp_finalize*/
  133442. #endif
  133443. #if PY_VERSION_HEX >= 0x030800b1
  133444. 0, /*tp_vectorcall*/
  133445. #endif
  133446. };
  133447. static struct __pyx_vtabstruct_6uvloop_4loop_UVAsync __pyx_vtable_6uvloop_4loop_UVAsync;
  133448. static PyObject *__pyx_tp_new_6uvloop_4loop_UVAsync(PyTypeObject *t, PyObject *a, PyObject *k) {
  133449. struct __pyx_obj_6uvloop_4loop_UVAsync *p;
  133450. PyObject *o = __pyx_tp_new_6uvloop_4loop_UVHandle(t, a, k);
  133451. if (unlikely(!o)) return 0;
  133452. p = ((struct __pyx_obj_6uvloop_4loop_UVAsync *)o);
  133453. p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6uvloop_4loop_UVHandle*)__pyx_vtabptr_6uvloop_4loop_UVAsync;
  133454. p->ctx = Py_None; Py_INCREF(Py_None);
  133455. return o;
  133456. }
  133457. static void __pyx_tp_dealloc_6uvloop_4loop_UVAsync(PyObject *o) {
  133458. struct __pyx_obj_6uvloop_4loop_UVAsync *p = (struct __pyx_obj_6uvloop_4loop_UVAsync *)o;
  133459. #if CYTHON_USE_TP_FINALIZE
  133460. if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
  133461. if (PyObject_CallFinalizerFromDealloc(o)) return;
  133462. }
  133463. #endif
  133464. PyObject_GC_UnTrack(o);
  133465. Py_CLEAR(p->ctx);
  133466. PyObject_GC_Track(o);
  133467. __pyx_tp_dealloc_6uvloop_4loop_UVHandle(o);
  133468. }
  133469. static int __pyx_tp_traverse_6uvloop_4loop_UVAsync(PyObject *o, visitproc v, void *a) {
  133470. int e;
  133471. struct __pyx_obj_6uvloop_4loop_UVAsync *p = (struct __pyx_obj_6uvloop_4loop_UVAsync *)o;
  133472. e = __pyx_tp_traverse_6uvloop_4loop_UVHandle(o, v, a); if (e) return e;
  133473. if (p->ctx) {
  133474. e = (*v)(p->ctx, a); if (e) return e;
  133475. }
  133476. return 0;
  133477. }
  133478. static PyMethodDef __pyx_methods_6uvloop_4loop_UVAsync[] = {
  133479. {"__reduce_cython__", (PyCFunction)__pyx_pw_6uvloop_4loop_7UVAsync_1__reduce_cython__, METH_NOARGS, __pyx_doc_6uvloop_4loop_7UVAsync___reduce_cython__},
  133480. {"__setstate_cython__", (PyCFunction)__pyx_pw_6uvloop_4loop_7UVAsync_3__setstate_cython__, METH_O, __pyx_doc_6uvloop_4loop_7UVAsync_2__setstate_cython__},
  133481. {0, 0, 0, 0}
  133482. };
  133483. static PyTypeObject __pyx_type_6uvloop_4loop_UVAsync = {
  133484. PyVarObject_HEAD_INIT(0, 0)
  133485. "uvloop.loop.UVAsync", /*tp_name*/
  133486. sizeof(struct __pyx_obj_6uvloop_4loop_UVAsync), /*tp_basicsize*/
  133487. 0, /*tp_itemsize*/
  133488. __pyx_tp_dealloc_6uvloop_4loop_UVAsync, /*tp_dealloc*/
  133489. 0, /*tp_print*/
  133490. 0, /*tp_getattr*/
  133491. 0, /*tp_setattr*/
  133492. #if PY_MAJOR_VERSION < 3
  133493. 0, /*tp_compare*/
  133494. #endif
  133495. #if PY_MAJOR_VERSION >= 3
  133496. 0, /*tp_as_async*/
  133497. #endif
  133498. #if CYTHON_COMPILING_IN_PYPY
  133499. __pyx_pw_6uvloop_4loop_8UVHandle_7__repr__, /*tp_repr*/
  133500. #else
  133501. 0, /*tp_repr*/
  133502. #endif
  133503. 0, /*tp_as_number*/
  133504. 0, /*tp_as_sequence*/
  133505. 0, /*tp_as_mapping*/
  133506. 0, /*tp_hash*/
  133507. 0, /*tp_call*/
  133508. 0, /*tp_str*/
  133509. 0, /*tp_getattro*/
  133510. 0, /*tp_setattro*/
  133511. 0, /*tp_as_buffer*/
  133512. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  133513. 0, /*tp_doc*/
  133514. __pyx_tp_traverse_6uvloop_4loop_UVAsync, /*tp_traverse*/
  133515. 0, /*tp_clear*/
  133516. 0, /*tp_richcompare*/
  133517. 0, /*tp_weaklistoffset*/
  133518. 0, /*tp_iter*/
  133519. 0, /*tp_iternext*/
  133520. __pyx_methods_6uvloop_4loop_UVAsync, /*tp_methods*/
  133521. 0, /*tp_members*/
  133522. 0, /*tp_getset*/
  133523. 0, /*tp_base*/
  133524. 0, /*tp_dict*/
  133525. 0, /*tp_descr_get*/
  133526. 0, /*tp_descr_set*/
  133527. 0, /*tp_dictoffset*/
  133528. #if CYTHON_COMPILING_IN_PYPY
  133529. __pyx_pw_6uvloop_4loop_8UVHandle_3__init__, /*tp_init*/
  133530. #else
  133531. 0, /*tp_init*/
  133532. #endif
  133533. 0, /*tp_alloc*/
  133534. __pyx_tp_new_6uvloop_4loop_UVAsync, /*tp_new*/
  133535. 0, /*tp_free*/
  133536. 0, /*tp_is_gc*/
  133537. 0, /*tp_bases*/
  133538. 0, /*tp_mro*/
  133539. 0, /*tp_cache*/
  133540. 0, /*tp_subclasses*/
  133541. 0, /*tp_weaklist*/
  133542. 0, /*tp_del*/
  133543. 0, /*tp_version_tag*/
  133544. #if PY_VERSION_HEX >= 0x030400a1
  133545. 0, /*tp_finalize*/
  133546. #endif
  133547. #if PY_VERSION_HEX >= 0x030800b1
  133548. 0, /*tp_vectorcall*/
  133549. #endif
  133550. };
  133551. static struct __pyx_vtabstruct_6uvloop_4loop_UVTimer __pyx_vtable_6uvloop_4loop_UVTimer;
  133552. static PyObject *__pyx_tp_new_6uvloop_4loop_UVTimer(PyTypeObject *t, PyObject *a, PyObject *k) {
  133553. struct __pyx_obj_6uvloop_4loop_UVTimer *p;
  133554. PyObject *o = __pyx_tp_new_6uvloop_4loop_UVHandle(t, a, k);
  133555. if (unlikely(!o)) return 0;
  133556. p = ((struct __pyx_obj_6uvloop_4loop_UVTimer *)o);
  133557. p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6uvloop_4loop_UVHandle*)__pyx_vtabptr_6uvloop_4loop_UVTimer;
  133558. p->ctx = Py_None; Py_INCREF(Py_None);
  133559. return o;
  133560. }
  133561. static void __pyx_tp_dealloc_6uvloop_4loop_UVTimer(PyObject *o) {
  133562. struct __pyx_obj_6uvloop_4loop_UVTimer *p = (struct __pyx_obj_6uvloop_4loop_UVTimer *)o;
  133563. #if CYTHON_USE_TP_FINALIZE
  133564. if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
  133565. if (PyObject_CallFinalizerFromDealloc(o)) return;
  133566. }
  133567. #endif
  133568. PyObject_GC_UnTrack(o);
  133569. Py_CLEAR(p->ctx);
  133570. PyObject_GC_Track(o);
  133571. __pyx_tp_dealloc_6uvloop_4loop_UVHandle(o);
  133572. }
  133573. static int __pyx_tp_traverse_6uvloop_4loop_UVTimer(PyObject *o, visitproc v, void *a) {
  133574. int e;
  133575. struct __pyx_obj_6uvloop_4loop_UVTimer *p = (struct __pyx_obj_6uvloop_4loop_UVTimer *)o;
  133576. e = __pyx_tp_traverse_6uvloop_4loop_UVHandle(o, v, a); if (e) return e;
  133577. if (p->ctx) {
  133578. e = (*v)(p->ctx, a); if (e) return e;
  133579. }
  133580. return 0;
  133581. }
  133582. static PyMethodDef __pyx_methods_6uvloop_4loop_UVTimer[] = {
  133583. {"__reduce_cython__", (PyCFunction)__pyx_pw_6uvloop_4loop_7UVTimer_1__reduce_cython__, METH_NOARGS, __pyx_doc_6uvloop_4loop_7UVTimer___reduce_cython__},
  133584. {"__setstate_cython__", (PyCFunction)__pyx_pw_6uvloop_4loop_7UVTimer_3__setstate_cython__, METH_O, __pyx_doc_6uvloop_4loop_7UVTimer_2__setstate_cython__},
  133585. {0, 0, 0, 0}
  133586. };
  133587. static PyTypeObject __pyx_type_6uvloop_4loop_UVTimer = {
  133588. PyVarObject_HEAD_INIT(0, 0)
  133589. "uvloop.loop.UVTimer", /*tp_name*/
  133590. sizeof(struct __pyx_obj_6uvloop_4loop_UVTimer), /*tp_basicsize*/
  133591. 0, /*tp_itemsize*/
  133592. __pyx_tp_dealloc_6uvloop_4loop_UVTimer, /*tp_dealloc*/
  133593. 0, /*tp_print*/
  133594. 0, /*tp_getattr*/
  133595. 0, /*tp_setattr*/
  133596. #if PY_MAJOR_VERSION < 3
  133597. 0, /*tp_compare*/
  133598. #endif
  133599. #if PY_MAJOR_VERSION >= 3
  133600. 0, /*tp_as_async*/
  133601. #endif
  133602. #if CYTHON_COMPILING_IN_PYPY
  133603. __pyx_pw_6uvloop_4loop_8UVHandle_7__repr__, /*tp_repr*/
  133604. #else
  133605. 0, /*tp_repr*/
  133606. #endif
  133607. 0, /*tp_as_number*/
  133608. 0, /*tp_as_sequence*/
  133609. 0, /*tp_as_mapping*/
  133610. 0, /*tp_hash*/
  133611. 0, /*tp_call*/
  133612. 0, /*tp_str*/
  133613. 0, /*tp_getattro*/
  133614. 0, /*tp_setattro*/
  133615. 0, /*tp_as_buffer*/
  133616. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  133617. 0, /*tp_doc*/
  133618. __pyx_tp_traverse_6uvloop_4loop_UVTimer, /*tp_traverse*/
  133619. 0, /*tp_clear*/
  133620. 0, /*tp_richcompare*/
  133621. 0, /*tp_weaklistoffset*/
  133622. 0, /*tp_iter*/
  133623. 0, /*tp_iternext*/
  133624. __pyx_methods_6uvloop_4loop_UVTimer, /*tp_methods*/
  133625. 0, /*tp_members*/
  133626. 0, /*tp_getset*/
  133627. 0, /*tp_base*/
  133628. 0, /*tp_dict*/
  133629. 0, /*tp_descr_get*/
  133630. 0, /*tp_descr_set*/
  133631. 0, /*tp_dictoffset*/
  133632. #if CYTHON_COMPILING_IN_PYPY
  133633. __pyx_pw_6uvloop_4loop_8UVHandle_3__init__, /*tp_init*/
  133634. #else
  133635. 0, /*tp_init*/
  133636. #endif
  133637. 0, /*tp_alloc*/
  133638. __pyx_tp_new_6uvloop_4loop_UVTimer, /*tp_new*/
  133639. 0, /*tp_free*/
  133640. 0, /*tp_is_gc*/
  133641. 0, /*tp_bases*/
  133642. 0, /*tp_mro*/
  133643. 0, /*tp_cache*/
  133644. 0, /*tp_subclasses*/
  133645. 0, /*tp_weaklist*/
  133646. 0, /*tp_del*/
  133647. 0, /*tp_version_tag*/
  133648. #if PY_VERSION_HEX >= 0x030400a1
  133649. 0, /*tp_finalize*/
  133650. #endif
  133651. #if PY_VERSION_HEX >= 0x030800b1
  133652. 0, /*tp_vectorcall*/
  133653. #endif
  133654. };
  133655. static struct __pyx_vtabstruct_6uvloop_4loop_UVIdle __pyx_vtable_6uvloop_4loop_UVIdle;
  133656. static PyObject *__pyx_tp_new_6uvloop_4loop_UVIdle(PyTypeObject *t, PyObject *a, PyObject *k) {
  133657. struct __pyx_obj_6uvloop_4loop_UVIdle *p;
  133658. PyObject *o = __pyx_tp_new_6uvloop_4loop_UVHandle(t, a, k);
  133659. if (unlikely(!o)) return 0;
  133660. p = ((struct __pyx_obj_6uvloop_4loop_UVIdle *)o);
  133661. p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6uvloop_4loop_UVHandle*)__pyx_vtabptr_6uvloop_4loop_UVIdle;
  133662. p->h = ((struct __pyx_obj_6uvloop_4loop_Handle *)Py_None); Py_INCREF(Py_None);
  133663. return o;
  133664. }
  133665. static void __pyx_tp_dealloc_6uvloop_4loop_UVIdle(PyObject *o) {
  133666. struct __pyx_obj_6uvloop_4loop_UVIdle *p = (struct __pyx_obj_6uvloop_4loop_UVIdle *)o;
  133667. #if CYTHON_USE_TP_FINALIZE
  133668. if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
  133669. if (PyObject_CallFinalizerFromDealloc(o)) return;
  133670. }
  133671. #endif
  133672. PyObject_GC_UnTrack(o);
  133673. Py_CLEAR(p->h);
  133674. PyObject_GC_Track(o);
  133675. __pyx_tp_dealloc_6uvloop_4loop_UVHandle(o);
  133676. }
  133677. static int __pyx_tp_traverse_6uvloop_4loop_UVIdle(PyObject *o, visitproc v, void *a) {
  133678. int e;
  133679. struct __pyx_obj_6uvloop_4loop_UVIdle *p = (struct __pyx_obj_6uvloop_4loop_UVIdle *)o;
  133680. e = __pyx_tp_traverse_6uvloop_4loop_UVHandle(o, v, a); if (e) return e;
  133681. if (p->h) {
  133682. e = (*v)(((PyObject *)p->h), a); if (e) return e;
  133683. }
  133684. return 0;
  133685. }
  133686. static PyMethodDef __pyx_methods_6uvloop_4loop_UVIdle[] = {
  133687. {"__reduce_cython__", (PyCFunction)__pyx_pw_6uvloop_4loop_6UVIdle_1__reduce_cython__, METH_NOARGS, __pyx_doc_6uvloop_4loop_6UVIdle___reduce_cython__},
  133688. {"__setstate_cython__", (PyCFunction)__pyx_pw_6uvloop_4loop_6UVIdle_3__setstate_cython__, METH_O, __pyx_doc_6uvloop_4loop_6UVIdle_2__setstate_cython__},
  133689. {0, 0, 0, 0}
  133690. };
  133691. static PyTypeObject __pyx_type_6uvloop_4loop_UVIdle = {
  133692. PyVarObject_HEAD_INIT(0, 0)
  133693. "uvloop.loop.UVIdle", /*tp_name*/
  133694. sizeof(struct __pyx_obj_6uvloop_4loop_UVIdle), /*tp_basicsize*/
  133695. 0, /*tp_itemsize*/
  133696. __pyx_tp_dealloc_6uvloop_4loop_UVIdle, /*tp_dealloc*/
  133697. 0, /*tp_print*/
  133698. 0, /*tp_getattr*/
  133699. 0, /*tp_setattr*/
  133700. #if PY_MAJOR_VERSION < 3
  133701. 0, /*tp_compare*/
  133702. #endif
  133703. #if PY_MAJOR_VERSION >= 3
  133704. 0, /*tp_as_async*/
  133705. #endif
  133706. #if CYTHON_COMPILING_IN_PYPY
  133707. __pyx_pw_6uvloop_4loop_8UVHandle_7__repr__, /*tp_repr*/
  133708. #else
  133709. 0, /*tp_repr*/
  133710. #endif
  133711. 0, /*tp_as_number*/
  133712. 0, /*tp_as_sequence*/
  133713. 0, /*tp_as_mapping*/
  133714. 0, /*tp_hash*/
  133715. 0, /*tp_call*/
  133716. 0, /*tp_str*/
  133717. 0, /*tp_getattro*/
  133718. 0, /*tp_setattro*/
  133719. 0, /*tp_as_buffer*/
  133720. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  133721. 0, /*tp_doc*/
  133722. __pyx_tp_traverse_6uvloop_4loop_UVIdle, /*tp_traverse*/
  133723. 0, /*tp_clear*/
  133724. 0, /*tp_richcompare*/
  133725. 0, /*tp_weaklistoffset*/
  133726. 0, /*tp_iter*/
  133727. 0, /*tp_iternext*/
  133728. __pyx_methods_6uvloop_4loop_UVIdle, /*tp_methods*/
  133729. 0, /*tp_members*/
  133730. 0, /*tp_getset*/
  133731. 0, /*tp_base*/
  133732. 0, /*tp_dict*/
  133733. 0, /*tp_descr_get*/
  133734. 0, /*tp_descr_set*/
  133735. 0, /*tp_dictoffset*/
  133736. #if CYTHON_COMPILING_IN_PYPY
  133737. __pyx_pw_6uvloop_4loop_8UVHandle_3__init__, /*tp_init*/
  133738. #else
  133739. 0, /*tp_init*/
  133740. #endif
  133741. 0, /*tp_alloc*/
  133742. __pyx_tp_new_6uvloop_4loop_UVIdle, /*tp_new*/
  133743. 0, /*tp_free*/
  133744. 0, /*tp_is_gc*/
  133745. 0, /*tp_bases*/
  133746. 0, /*tp_mro*/
  133747. 0, /*tp_cache*/
  133748. 0, /*tp_subclasses*/
  133749. 0, /*tp_weaklist*/
  133750. 0, /*tp_del*/
  133751. 0, /*tp_version_tag*/
  133752. #if PY_VERSION_HEX >= 0x030400a1
  133753. 0, /*tp_finalize*/
  133754. #endif
  133755. #if PY_VERSION_HEX >= 0x030800b1
  133756. 0, /*tp_vectorcall*/
  133757. #endif
  133758. };
  133759. static struct __pyx_vtabstruct_6uvloop_4loop_UVBaseTransport __pyx_vtable_6uvloop_4loop_UVBaseTransport;
  133760. static PyObject *__pyx_tp_new_6uvloop_4loop_UVBaseTransport(PyTypeObject *t, PyObject *a, PyObject *k) {
  133761. struct __pyx_obj_6uvloop_4loop_UVBaseTransport *p;
  133762. PyObject *o = __pyx_tp_new_6uvloop_4loop_UVSocketHandle(t, a, k);
  133763. if (unlikely(!o)) return 0;
  133764. p = ((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)o);
  133765. p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6uvloop_4loop_UVHandle*)__pyx_vtabptr_6uvloop_4loop_UVBaseTransport;
  133766. p->_protocol_data_received = Py_None; Py_INCREF(Py_None);
  133767. p->_protocol = Py_None; Py_INCREF(Py_None);
  133768. p->_server = ((struct __pyx_obj_6uvloop_4loop_Server *)Py_None); Py_INCREF(Py_None);
  133769. p->_waiter = Py_None; Py_INCREF(Py_None);
  133770. p->_extra_info = ((PyObject*)Py_None); Py_INCREF(Py_None);
  133771. if (unlikely(__pyx_pw_6uvloop_4loop_15UVBaseTransport_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad;
  133772. return o;
  133773. bad:
  133774. Py_DECREF(o); o = 0;
  133775. return NULL;
  133776. }
  133777. static void __pyx_tp_dealloc_6uvloop_4loop_UVBaseTransport(PyObject *o) {
  133778. struct __pyx_obj_6uvloop_4loop_UVBaseTransport *p = (struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)o;
  133779. #if CYTHON_USE_TP_FINALIZE
  133780. if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
  133781. if (PyObject_CallFinalizerFromDealloc(o)) return;
  133782. }
  133783. #endif
  133784. PyObject_GC_UnTrack(o);
  133785. if (p->__weakref__) PyObject_ClearWeakRefs(o);
  133786. Py_CLEAR(p->_protocol_data_received);
  133787. Py_CLEAR(p->_protocol);
  133788. Py_CLEAR(p->_server);
  133789. Py_CLEAR(p->_waiter);
  133790. Py_CLEAR(p->_extra_info);
  133791. PyObject_GC_Track(o);
  133792. __pyx_tp_dealloc_6uvloop_4loop_UVSocketHandle(o);
  133793. }
  133794. static int __pyx_tp_traverse_6uvloop_4loop_UVBaseTransport(PyObject *o, visitproc v, void *a) {
  133795. int e;
  133796. struct __pyx_obj_6uvloop_4loop_UVBaseTransport *p = (struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)o;
  133797. e = __pyx_tp_traverse_6uvloop_4loop_UVSocketHandle(o, v, a); if (e) return e;
  133798. if (p->_protocol_data_received) {
  133799. e = (*v)(p->_protocol_data_received, a); if (e) return e;
  133800. }
  133801. if (p->_protocol) {
  133802. e = (*v)(p->_protocol, a); if (e) return e;
  133803. }
  133804. if (p->_server) {
  133805. e = (*v)(((PyObject *)p->_server), a); if (e) return e;
  133806. }
  133807. if (p->_waiter) {
  133808. e = (*v)(p->_waiter, a); if (e) return e;
  133809. }
  133810. if (p->_extra_info) {
  133811. e = (*v)(p->_extra_info, a); if (e) return e;
  133812. }
  133813. return 0;
  133814. }
  133815. static int __pyx_tp_clear_6uvloop_4loop_UVBaseTransport(PyObject *o) {
  133816. PyObject* tmp;
  133817. struct __pyx_obj_6uvloop_4loop_UVBaseTransport *p = (struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)o;
  133818. __pyx_tp_clear_6uvloop_4loop_UVSocketHandle(o);
  133819. tmp = ((PyObject*)p->_protocol_data_received);
  133820. p->_protocol_data_received = Py_None; Py_INCREF(Py_None);
  133821. Py_XDECREF(tmp);
  133822. tmp = ((PyObject*)p->_protocol);
  133823. p->_protocol = Py_None; Py_INCREF(Py_None);
  133824. Py_XDECREF(tmp);
  133825. tmp = ((PyObject*)p->_server);
  133826. p->_server = ((struct __pyx_obj_6uvloop_4loop_Server *)Py_None); Py_INCREF(Py_None);
  133827. Py_XDECREF(tmp);
  133828. tmp = ((PyObject*)p->_waiter);
  133829. p->_waiter = Py_None; Py_INCREF(Py_None);
  133830. Py_XDECREF(tmp);
  133831. tmp = ((PyObject*)p->_extra_info);
  133832. p->_extra_info = ((PyObject*)Py_None); Py_INCREF(Py_None);
  133833. Py_XDECREF(tmp);
  133834. return 0;
  133835. }
  133836. static PyObject *__pyx_getprop_6uvloop_4loop_15UVBaseTransport__paused(PyObject *o, CYTHON_UNUSED void *x) {
  133837. return __pyx_pw_6uvloop_4loop_15UVBaseTransport_7_paused_1__get__(o);
  133838. }
  133839. static PyObject *__pyx_getprop_6uvloop_4loop_15UVBaseTransport__closing(PyObject *o, CYTHON_UNUSED void *x) {
  133840. return __pyx_pw_6uvloop_4loop_15UVBaseTransport_8_closing_1__get__(o);
  133841. }
  133842. static PyMethodDef __pyx_methods_6uvloop_4loop_UVBaseTransport[] = {
  133843. {"get_protocol", (PyCFunction)__pyx_pw_6uvloop_4loop_15UVBaseTransport_3get_protocol, METH_NOARGS, __pyx_doc_6uvloop_4loop_15UVBaseTransport_2get_protocol},
  133844. {"set_protocol", (PyCFunction)__pyx_pw_6uvloop_4loop_15UVBaseTransport_5set_protocol, METH_O, __pyx_doc_6uvloop_4loop_15UVBaseTransport_4set_protocol},
  133845. {"_force_close", (PyCFunction)__pyx_pw_6uvloop_4loop_15UVBaseTransport_7_force_close, METH_O, __pyx_doc_6uvloop_4loop_15UVBaseTransport_6_force_close},
  133846. {"abort", (PyCFunction)__pyx_pw_6uvloop_4loop_15UVBaseTransport_9abort, METH_NOARGS, __pyx_doc_6uvloop_4loop_15UVBaseTransport_8abort},
  133847. {"close", (PyCFunction)__pyx_pw_6uvloop_4loop_15UVBaseTransport_11close, METH_NOARGS, __pyx_doc_6uvloop_4loop_15UVBaseTransport_10close},
  133848. {"is_closing", (PyCFunction)__pyx_pw_6uvloop_4loop_15UVBaseTransport_13is_closing, METH_NOARGS, __pyx_doc_6uvloop_4loop_15UVBaseTransport_12is_closing},
  133849. {"get_write_buffer_size", (PyCFunction)__pyx_pw_6uvloop_4loop_15UVBaseTransport_15get_write_buffer_size, METH_NOARGS, __pyx_doc_6uvloop_4loop_15UVBaseTransport_14get_write_buffer_size},
  133850. {"set_write_buffer_limits", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6uvloop_4loop_15UVBaseTransport_17set_write_buffer_limits, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_15UVBaseTransport_16set_write_buffer_limits},
  133851. {"get_write_buffer_limits", (PyCFunction)__pyx_pw_6uvloop_4loop_15UVBaseTransport_19get_write_buffer_limits, METH_NOARGS, __pyx_doc_6uvloop_4loop_15UVBaseTransport_18get_write_buffer_limits},
  133852. {"get_extra_info", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6uvloop_4loop_15UVBaseTransport_21get_extra_info, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_15UVBaseTransport_20get_extra_info},
  133853. {"__reduce_cython__", (PyCFunction)__pyx_pw_6uvloop_4loop_15UVBaseTransport_23__reduce_cython__, METH_NOARGS, __pyx_doc_6uvloop_4loop_15UVBaseTransport_22__reduce_cython__},
  133854. {"__setstate_cython__", (PyCFunction)__pyx_pw_6uvloop_4loop_15UVBaseTransport_25__setstate_cython__, METH_O, __pyx_doc_6uvloop_4loop_15UVBaseTransport_24__setstate_cython__},
  133855. {0, 0, 0, 0}
  133856. };
  133857. static struct PyGetSetDef __pyx_getsets_6uvloop_4loop_UVBaseTransport[] = {
  133858. {(char *)"_paused", __pyx_getprop_6uvloop_4loop_15UVBaseTransport__paused, 0, (char *)0, 0},
  133859. {(char *)"_closing", __pyx_getprop_6uvloop_4loop_15UVBaseTransport__closing, 0, (char *)0, 0},
  133860. {0, 0, 0, 0, 0}
  133861. };
  133862. static PyTypeObject __pyx_type_6uvloop_4loop_UVBaseTransport = {
  133863. PyVarObject_HEAD_INIT(0, 0)
  133864. "uvloop.loop.UVBaseTransport", /*tp_name*/
  133865. sizeof(struct __pyx_obj_6uvloop_4loop_UVBaseTransport), /*tp_basicsize*/
  133866. 0, /*tp_itemsize*/
  133867. __pyx_tp_dealloc_6uvloop_4loop_UVBaseTransport, /*tp_dealloc*/
  133868. 0, /*tp_print*/
  133869. 0, /*tp_getattr*/
  133870. 0, /*tp_setattr*/
  133871. #if PY_MAJOR_VERSION < 3
  133872. 0, /*tp_compare*/
  133873. #endif
  133874. #if PY_MAJOR_VERSION >= 3
  133875. 0, /*tp_as_async*/
  133876. #endif
  133877. #if CYTHON_COMPILING_IN_PYPY
  133878. __pyx_pw_6uvloop_4loop_8UVHandle_7__repr__, /*tp_repr*/
  133879. #else
  133880. 0, /*tp_repr*/
  133881. #endif
  133882. 0, /*tp_as_number*/
  133883. 0, /*tp_as_sequence*/
  133884. 0, /*tp_as_mapping*/
  133885. 0, /*tp_hash*/
  133886. 0, /*tp_call*/
  133887. 0, /*tp_str*/
  133888. 0, /*tp_getattro*/
  133889. 0, /*tp_setattro*/
  133890. 0, /*tp_as_buffer*/
  133891. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  133892. 0, /*tp_doc*/
  133893. __pyx_tp_traverse_6uvloop_4loop_UVBaseTransport, /*tp_traverse*/
  133894. __pyx_tp_clear_6uvloop_4loop_UVBaseTransport, /*tp_clear*/
  133895. 0, /*tp_richcompare*/
  133896. 0, /*tp_weaklistoffset*/
  133897. 0, /*tp_iter*/
  133898. 0, /*tp_iternext*/
  133899. __pyx_methods_6uvloop_4loop_UVBaseTransport, /*tp_methods*/
  133900. 0, /*tp_members*/
  133901. __pyx_getsets_6uvloop_4loop_UVBaseTransport, /*tp_getset*/
  133902. 0, /*tp_base*/
  133903. 0, /*tp_dict*/
  133904. 0, /*tp_descr_get*/
  133905. 0, /*tp_descr_set*/
  133906. 0, /*tp_dictoffset*/
  133907. #if CYTHON_COMPILING_IN_PYPY
  133908. __pyx_pw_6uvloop_4loop_8UVHandle_3__init__, /*tp_init*/
  133909. #else
  133910. 0, /*tp_init*/
  133911. #endif
  133912. 0, /*tp_alloc*/
  133913. __pyx_tp_new_6uvloop_4loop_UVBaseTransport, /*tp_new*/
  133914. 0, /*tp_free*/
  133915. 0, /*tp_is_gc*/
  133916. 0, /*tp_bases*/
  133917. 0, /*tp_mro*/
  133918. 0, /*tp_cache*/
  133919. 0, /*tp_subclasses*/
  133920. 0, /*tp_weaklist*/
  133921. 0, /*tp_del*/
  133922. 0, /*tp_version_tag*/
  133923. #if PY_VERSION_HEX >= 0x030400a1
  133924. 0, /*tp_finalize*/
  133925. #endif
  133926. #if PY_VERSION_HEX >= 0x030800b1
  133927. 0, /*tp_vectorcall*/
  133928. #endif
  133929. };
  133930. static struct __pyx_vtabstruct_6uvloop_4loop_Loop __pyx_vtable_6uvloop_4loop_Loop;
  133931. static PyObject *__pyx_tp_new_6uvloop_4loop_Loop(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  133932. struct __pyx_obj_6uvloop_4loop_Loop *p;
  133933. PyObject *o;
  133934. if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
  133935. o = (*t->tp_alloc)(t, 0);
  133936. } else {
  133937. o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  133938. }
  133939. if (unlikely(!o)) return 0;
  133940. p = ((struct __pyx_obj_6uvloop_4loop_Loop *)o);
  133941. p->__pyx_vtab = __pyx_vtabptr_6uvloop_4loop_Loop;
  133942. p->slow_callback_duration = Py_None; Py_INCREF(Py_None);
  133943. p->_task_factory = Py_None; Py_INCREF(Py_None);
  133944. p->_exception_handler = Py_None; Py_INCREF(Py_None);
  133945. p->_default_executor = Py_None; Py_INCREF(Py_None);
  133946. p->_ready = Py_None; Py_INCREF(Py_None);
  133947. p->_queued_streams = ((PyObject*)Py_None); Py_INCREF(Py_None);
  133948. p->_servers = ((PyObject*)Py_None); Py_INCREF(Py_None);
  133949. p->_transports = Py_None; Py_INCREF(Py_None);
  133950. p->_processes = ((PyObject*)Py_None); Py_INCREF(Py_None);
  133951. p->_fd_to_reader_fileobj = ((PyObject*)Py_None); Py_INCREF(Py_None);
  133952. p->_fd_to_writer_fileobj = ((PyObject*)Py_None); Py_INCREF(Py_None);
  133953. p->_signals = ((PyObject*)Py_None); Py_INCREF(Py_None);
  133954. p->_signal_handlers = ((PyObject*)Py_None); Py_INCREF(Py_None);
  133955. p->_ssock = Py_None; Py_INCREF(Py_None);
  133956. p->_csock = Py_None; Py_INCREF(Py_None);
  133957. p->_timers = ((PyObject*)Py_None); Py_INCREF(Py_None);
  133958. p->_polls = ((PyObject*)Py_None); Py_INCREF(Py_None);
  133959. p->active_process_handler = ((struct __pyx_obj_6uvloop_4loop_UVProcess *)Py_None); Py_INCREF(Py_None);
  133960. p->handler_async = ((struct __pyx_obj_6uvloop_4loop_UVAsync *)Py_None); Py_INCREF(Py_None);
  133961. p->handler_idle = ((struct __pyx_obj_6uvloop_4loop_UVIdle *)Py_None); Py_INCREF(Py_None);
  133962. p->handler_check__exec_writes = ((struct __pyx_obj_6uvloop_4loop_UVCheck *)Py_None); Py_INCREF(Py_None);
  133963. p->_last_error = Py_None; Py_INCREF(Py_None);
  133964. p->_asyncgens = Py_None; Py_INCREF(Py_None);
  133965. p->_debug_handles_total = Py_None; Py_INCREF(Py_None);
  133966. p->_debug_handles_closed = Py_None; Py_INCREF(Py_None);
  133967. p->_debug_handles_current = Py_None; Py_INCREF(Py_None);
  133968. if (unlikely(__pyx_pw_6uvloop_4loop_4Loop_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad;
  133969. return o;
  133970. bad:
  133971. Py_DECREF(o); o = 0;
  133972. return NULL;
  133973. }
  133974. static void __pyx_tp_dealloc_6uvloop_4loop_Loop(PyObject *o) {
  133975. struct __pyx_obj_6uvloop_4loop_Loop *p = (struct __pyx_obj_6uvloop_4loop_Loop *)o;
  133976. #if CYTHON_USE_TP_FINALIZE
  133977. if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
  133978. if (PyObject_CallFinalizerFromDealloc(o)) return;
  133979. }
  133980. #endif
  133981. PyObject_GC_UnTrack(o);
  133982. {
  133983. PyObject *etype, *eval, *etb;
  133984. PyErr_Fetch(&etype, &eval, &etb);
  133985. ++Py_REFCNT(o);
  133986. __pyx_pw_6uvloop_4loop_4Loop_5__dealloc__(o);
  133987. --Py_REFCNT(o);
  133988. PyErr_Restore(etype, eval, etb);
  133989. }
  133990. if (p->__weakref__) PyObject_ClearWeakRefs(o);
  133991. Py_CLEAR(p->slow_callback_duration);
  133992. Py_CLEAR(p->_task_factory);
  133993. Py_CLEAR(p->_exception_handler);
  133994. Py_CLEAR(p->_default_executor);
  133995. Py_CLEAR(p->_ready);
  133996. Py_CLEAR(p->_queued_streams);
  133997. Py_CLEAR(p->_servers);
  133998. Py_CLEAR(p->_transports);
  133999. Py_CLEAR(p->_processes);
  134000. Py_CLEAR(p->_fd_to_reader_fileobj);
  134001. Py_CLEAR(p->_fd_to_writer_fileobj);
  134002. Py_CLEAR(p->_signals);
  134003. Py_CLEAR(p->_signal_handlers);
  134004. Py_CLEAR(p->_ssock);
  134005. Py_CLEAR(p->_csock);
  134006. Py_CLEAR(p->_timers);
  134007. Py_CLEAR(p->_polls);
  134008. Py_CLEAR(p->active_process_handler);
  134009. Py_CLEAR(p->handler_async);
  134010. Py_CLEAR(p->handler_idle);
  134011. Py_CLEAR(p->handler_check__exec_writes);
  134012. Py_CLEAR(p->_last_error);
  134013. Py_CLEAR(p->_asyncgens);
  134014. Py_CLEAR(p->_debug_handles_total);
  134015. Py_CLEAR(p->_debug_handles_closed);
  134016. Py_CLEAR(p->_debug_handles_current);
  134017. (*Py_TYPE(o)->tp_free)(o);
  134018. }
  134019. static int __pyx_tp_traverse_6uvloop_4loop_Loop(PyObject *o, visitproc v, void *a) {
  134020. int e;
  134021. struct __pyx_obj_6uvloop_4loop_Loop *p = (struct __pyx_obj_6uvloop_4loop_Loop *)o;
  134022. if (p->slow_callback_duration) {
  134023. e = (*v)(p->slow_callback_duration, a); if (e) return e;
  134024. }
  134025. if (p->_task_factory) {
  134026. e = (*v)(p->_task_factory, a); if (e) return e;
  134027. }
  134028. if (p->_exception_handler) {
  134029. e = (*v)(p->_exception_handler, a); if (e) return e;
  134030. }
  134031. if (p->_default_executor) {
  134032. e = (*v)(p->_default_executor, a); if (e) return e;
  134033. }
  134034. if (p->_ready) {
  134035. e = (*v)(p->_ready, a); if (e) return e;
  134036. }
  134037. if (p->_queued_streams) {
  134038. e = (*v)(p->_queued_streams, a); if (e) return e;
  134039. }
  134040. if (p->_servers) {
  134041. e = (*v)(p->_servers, a); if (e) return e;
  134042. }
  134043. if (p->_transports) {
  134044. e = (*v)(p->_transports, a); if (e) return e;
  134045. }
  134046. if (p->_processes) {
  134047. e = (*v)(p->_processes, a); if (e) return e;
  134048. }
  134049. if (p->_fd_to_reader_fileobj) {
  134050. e = (*v)(p->_fd_to_reader_fileobj, a); if (e) return e;
  134051. }
  134052. if (p->_fd_to_writer_fileobj) {
  134053. e = (*v)(p->_fd_to_writer_fileobj, a); if (e) return e;
  134054. }
  134055. if (p->_signals) {
  134056. e = (*v)(p->_signals, a); if (e) return e;
  134057. }
  134058. if (p->_signal_handlers) {
  134059. e = (*v)(p->_signal_handlers, a); if (e) return e;
  134060. }
  134061. if (p->_ssock) {
  134062. e = (*v)(p->_ssock, a); if (e) return e;
  134063. }
  134064. if (p->_csock) {
  134065. e = (*v)(p->_csock, a); if (e) return e;
  134066. }
  134067. if (p->_timers) {
  134068. e = (*v)(p->_timers, a); if (e) return e;
  134069. }
  134070. if (p->_polls) {
  134071. e = (*v)(p->_polls, a); if (e) return e;
  134072. }
  134073. if (p->active_process_handler) {
  134074. e = (*v)(((PyObject *)p->active_process_handler), a); if (e) return e;
  134075. }
  134076. if (p->handler_async) {
  134077. e = (*v)(((PyObject *)p->handler_async), a); if (e) return e;
  134078. }
  134079. if (p->handler_idle) {
  134080. e = (*v)(((PyObject *)p->handler_idle), a); if (e) return e;
  134081. }
  134082. if (p->handler_check__exec_writes) {
  134083. e = (*v)(((PyObject *)p->handler_check__exec_writes), a); if (e) return e;
  134084. }
  134085. if (p->_last_error) {
  134086. e = (*v)(p->_last_error, a); if (e) return e;
  134087. }
  134088. if (p->_asyncgens) {
  134089. e = (*v)(p->_asyncgens, a); if (e) return e;
  134090. }
  134091. if (p->_debug_handles_total) {
  134092. e = (*v)(p->_debug_handles_total, a); if (e) return e;
  134093. }
  134094. if (p->_debug_handles_closed) {
  134095. e = (*v)(p->_debug_handles_closed, a); if (e) return e;
  134096. }
  134097. if (p->_debug_handles_current) {
  134098. e = (*v)(p->_debug_handles_current, a); if (e) return e;
  134099. }
  134100. return 0;
  134101. }
  134102. static PyObject *__pyx_getprop_6uvloop_4loop_4Loop_print_debug_info(PyObject *o, CYTHON_UNUSED void *x) {
  134103. return __pyx_pw_6uvloop_4loop_4Loop_16print_debug_info_1__get__(o);
  134104. }
  134105. static PyObject *__pyx_getprop_6uvloop_4loop_4Loop_slow_callback_duration(PyObject *o, CYTHON_UNUSED void *x) {
  134106. return __pyx_pw_6uvloop_4loop_4Loop_22slow_callback_duration_1__get__(o);
  134107. }
  134108. static int __pyx_setprop_6uvloop_4loop_4Loop_slow_callback_duration(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  134109. if (v) {
  134110. return __pyx_pw_6uvloop_4loop_4Loop_22slow_callback_duration_3__set__(o, v);
  134111. }
  134112. else {
  134113. return __pyx_pw_6uvloop_4loop_4Loop_22slow_callback_duration_5__del__(o);
  134114. }
  134115. }
  134116. static PyObject *__pyx_getprop_6uvloop_4loop_4Loop__closed(PyObject *o, CYTHON_UNUSED void *x) {
  134117. return __pyx_pw_6uvloop_4loop_4Loop_7_closed_1__get__(o);
  134118. }
  134119. static PyObject *__pyx_getprop_6uvloop_4loop_4Loop__debug_cc(PyObject *o, CYTHON_UNUSED void *x) {
  134120. return __pyx_pw_6uvloop_4loop_4Loop_9_debug_cc_1__get__(o);
  134121. }
  134122. static PyObject *__pyx_getprop_6uvloop_4loop_4Loop__debug_handles_total(PyObject *o, CYTHON_UNUSED void *x) {
  134123. return __pyx_pw_6uvloop_4loop_4Loop_20_debug_handles_total_1__get__(o);
  134124. }
  134125. static PyObject *__pyx_getprop_6uvloop_4loop_4Loop__debug_handles_closed(PyObject *o, CYTHON_UNUSED void *x) {
  134126. return __pyx_pw_6uvloop_4loop_4Loop_21_debug_handles_closed_1__get__(o);
  134127. }
  134128. static PyObject *__pyx_getprop_6uvloop_4loop_4Loop__debug_handles_current(PyObject *o, CYTHON_UNUSED void *x) {
  134129. return __pyx_pw_6uvloop_4loop_4Loop_22_debug_handles_current_1__get__(o);
  134130. }
  134131. static PyObject *__pyx_getprop_6uvloop_4loop_4Loop__debug_uv_handles_total(PyObject *o, CYTHON_UNUSED void *x) {
  134132. return __pyx_pw_6uvloop_4loop_4Loop_23_debug_uv_handles_total_1__get__(o);
  134133. }
  134134. static PyObject *__pyx_getprop_6uvloop_4loop_4Loop__debug_uv_handles_freed(PyObject *o, CYTHON_UNUSED void *x) {
  134135. return __pyx_pw_6uvloop_4loop_4Loop_23_debug_uv_handles_freed_1__get__(o);
  134136. }
  134137. static PyObject *__pyx_getprop_6uvloop_4loop_4Loop__debug_cb_handles_total(PyObject *o, CYTHON_UNUSED void *x) {
  134138. return __pyx_pw_6uvloop_4loop_4Loop_23_debug_cb_handles_total_1__get__(o);
  134139. }
  134140. static PyObject *__pyx_getprop_6uvloop_4loop_4Loop__debug_cb_handles_count(PyObject *o, CYTHON_UNUSED void *x) {
  134141. return __pyx_pw_6uvloop_4loop_4Loop_23_debug_cb_handles_count_1__get__(o);
  134142. }
  134143. static PyObject *__pyx_getprop_6uvloop_4loop_4Loop__debug_cb_timer_handles_total(PyObject *o, CYTHON_UNUSED void *x) {
  134144. return __pyx_pw_6uvloop_4loop_4Loop_29_debug_cb_timer_handles_total_1__get__(o);
  134145. }
  134146. static PyObject *__pyx_getprop_6uvloop_4loop_4Loop__debug_cb_timer_handles_count(PyObject *o, CYTHON_UNUSED void *x) {
  134147. return __pyx_pw_6uvloop_4loop_4Loop_29_debug_cb_timer_handles_count_1__get__(o);
  134148. }
  134149. static PyObject *__pyx_getprop_6uvloop_4loop_4Loop__debug_stream_shutdown_errors_total(PyObject *o, CYTHON_UNUSED void *x) {
  134150. return __pyx_pw_6uvloop_4loop_4Loop_35_debug_stream_shutdown_errors_total_1__get__(o);
  134151. }
  134152. static PyObject *__pyx_getprop_6uvloop_4loop_4Loop__debug_stream_listen_errors_total(PyObject *o, CYTHON_UNUSED void *x) {
  134153. return __pyx_pw_6uvloop_4loop_4Loop_33_debug_stream_listen_errors_total_1__get__(o);
  134154. }
  134155. static PyObject *__pyx_getprop_6uvloop_4loop_4Loop__debug_stream_read_cb_total(PyObject *o, CYTHON_UNUSED void *x) {
  134156. return __pyx_pw_6uvloop_4loop_4Loop_27_debug_stream_read_cb_total_1__get__(o);
  134157. }
  134158. static PyObject *__pyx_getprop_6uvloop_4loop_4Loop__debug_stream_read_cb_errors_total(PyObject *o, CYTHON_UNUSED void *x) {
  134159. return __pyx_pw_6uvloop_4loop_4Loop_34_debug_stream_read_cb_errors_total_1__get__(o);
  134160. }
  134161. static PyObject *__pyx_getprop_6uvloop_4loop_4Loop__debug_stream_read_eof_total(PyObject *o, CYTHON_UNUSED void *x) {
  134162. return __pyx_pw_6uvloop_4loop_4Loop_28_debug_stream_read_eof_total_1__get__(o);
  134163. }
  134164. static PyObject *__pyx_getprop_6uvloop_4loop_4Loop__debug_stream_read_eof_cb_errors_total(PyObject *o, CYTHON_UNUSED void *x) {
  134165. return __pyx_pw_6uvloop_4loop_4Loop_38_debug_stream_read_eof_cb_errors_total_1__get__(o);
  134166. }
  134167. static PyObject *__pyx_getprop_6uvloop_4loop_4Loop__debug_stream_read_errors_total(PyObject *o, CYTHON_UNUSED void *x) {
  134168. return __pyx_pw_6uvloop_4loop_4Loop_31_debug_stream_read_errors_total_1__get__(o);
  134169. }
  134170. static PyObject *__pyx_getprop_6uvloop_4loop_4Loop__debug_stream_write_tries(PyObject *o, CYTHON_UNUSED void *x) {
  134171. return __pyx_pw_6uvloop_4loop_4Loop_25_debug_stream_write_tries_1__get__(o);
  134172. }
  134173. static PyObject *__pyx_getprop_6uvloop_4loop_4Loop__debug_stream_write_errors_total(PyObject *o, CYTHON_UNUSED void *x) {
  134174. return __pyx_pw_6uvloop_4loop_4Loop_32_debug_stream_write_errors_total_1__get__(o);
  134175. }
  134176. static PyObject *__pyx_getprop_6uvloop_4loop_4Loop__debug_stream_write_ctx_total(PyObject *o, CYTHON_UNUSED void *x) {
  134177. return __pyx_pw_6uvloop_4loop_4Loop_29_debug_stream_write_ctx_total_1__get__(o);
  134178. }
  134179. static PyObject *__pyx_getprop_6uvloop_4loop_4Loop__debug_stream_write_ctx_cnt(PyObject *o, CYTHON_UNUSED void *x) {
  134180. return __pyx_pw_6uvloop_4loop_4Loop_27_debug_stream_write_ctx_cnt_1__get__(o);
  134181. }
  134182. static PyObject *__pyx_getprop_6uvloop_4loop_4Loop__debug_stream_write_cb_errors_total(PyObject *o, CYTHON_UNUSED void *x) {
  134183. return __pyx_pw_6uvloop_4loop_4Loop_35_debug_stream_write_cb_errors_total_1__get__(o);
  134184. }
  134185. static PyObject *__pyx_getprop_6uvloop_4loop_4Loop__poll_read_events_total(PyObject *o, CYTHON_UNUSED void *x) {
  134186. return __pyx_pw_6uvloop_4loop_4Loop_23_poll_read_events_total_1__get__(o);
  134187. }
  134188. static PyObject *__pyx_getprop_6uvloop_4loop_4Loop__poll_read_cb_errors_total(PyObject *o, CYTHON_UNUSED void *x) {
  134189. return __pyx_pw_6uvloop_4loop_4Loop_26_poll_read_cb_errors_total_1__get__(o);
  134190. }
  134191. static PyObject *__pyx_getprop_6uvloop_4loop_4Loop__poll_write_events_total(PyObject *o, CYTHON_UNUSED void *x) {
  134192. return __pyx_pw_6uvloop_4loop_4Loop_24_poll_write_events_total_1__get__(o);
  134193. }
  134194. static PyObject *__pyx_getprop_6uvloop_4loop_4Loop__poll_write_cb_errors_total(PyObject *o, CYTHON_UNUSED void *x) {
  134195. return __pyx_pw_6uvloop_4loop_4Loop_27_poll_write_cb_errors_total_1__get__(o);
  134196. }
  134197. static PyObject *__pyx_getprop_6uvloop_4loop_4Loop__sock_try_write_total(PyObject *o, CYTHON_UNUSED void *x) {
  134198. return __pyx_pw_6uvloop_4loop_4Loop_21_sock_try_write_total_1__get__(o);
  134199. }
  134200. static PyObject *__pyx_getprop_6uvloop_4loop_4Loop__debug_exception_handler_cnt(PyObject *o, CYTHON_UNUSED void *x) {
  134201. return __pyx_pw_6uvloop_4loop_4Loop_28_debug_exception_handler_cnt_1__get__(o);
  134202. }
  134203. static PyMethodDef __pyx_methods_6uvloop_4loop_Loop[] = {
  134204. {"__sighandler", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6uvloop_4loop_4Loop_7__sighandler, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_4Loop_6__sighandler},
  134205. {"_get_backend_id", (PyCFunction)__pyx_pw_6uvloop_4loop_4Loop_9_get_backend_id, METH_NOARGS, __pyx_doc_6uvloop_4loop_4Loop_8_get_backend_id},
  134206. {"call_soon", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6uvloop_4loop_4Loop_13call_soon, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_4Loop_12call_soon},
  134207. {"call_soon_threadsafe", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6uvloop_4loop_4Loop_15call_soon_threadsafe, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_4Loop_14call_soon_threadsafe},
  134208. {"call_later", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6uvloop_4loop_4Loop_17call_later, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_4Loop_16call_later},
  134209. {"call_at", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6uvloop_4loop_4Loop_19call_at, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_4Loop_18call_at},
  134210. {"time", (PyCFunction)__pyx_pw_6uvloop_4loop_4Loop_21time, METH_NOARGS, __pyx_doc_6uvloop_4loop_4Loop_20time},
  134211. {"stop", (PyCFunction)__pyx_pw_6uvloop_4loop_4Loop_23stop, METH_NOARGS, __pyx_doc_6uvloop_4loop_4Loop_22stop},
  134212. {"run_forever", (PyCFunction)__pyx_pw_6uvloop_4loop_4Loop_25run_forever, METH_NOARGS, __pyx_doc_6uvloop_4loop_4Loop_24run_forever},
  134213. {"close", (PyCFunction)__pyx_pw_6uvloop_4loop_4Loop_27close, METH_NOARGS, __pyx_doc_6uvloop_4loop_4Loop_26close},
  134214. {"get_debug", (PyCFunction)__pyx_pw_6uvloop_4loop_4Loop_29get_debug, METH_NOARGS, __pyx_doc_6uvloop_4loop_4Loop_28get_debug},
  134215. {"set_debug", (PyCFunction)__pyx_pw_6uvloop_4loop_4Loop_31set_debug, METH_O, __pyx_doc_6uvloop_4loop_4Loop_30set_debug},
  134216. {"is_running", (PyCFunction)__pyx_pw_6uvloop_4loop_4Loop_33is_running, METH_NOARGS, __pyx_doc_6uvloop_4loop_4Loop_32is_running},
  134217. {"is_closed", (PyCFunction)__pyx_pw_6uvloop_4loop_4Loop_35is_closed, METH_NOARGS, __pyx_doc_6uvloop_4loop_4Loop_34is_closed},
  134218. {"create_future", (PyCFunction)__pyx_pw_6uvloop_4loop_4Loop_37create_future, METH_NOARGS, __pyx_doc_6uvloop_4loop_4Loop_36create_future},
  134219. {"create_task", (PyCFunction)__pyx_pw_6uvloop_4loop_4Loop_39create_task, METH_O, __pyx_doc_6uvloop_4loop_4Loop_38create_task},
  134220. {"set_task_factory", (PyCFunction)__pyx_pw_6uvloop_4loop_4Loop_41set_task_factory, METH_O, __pyx_doc_6uvloop_4loop_4Loop_40set_task_factory},
  134221. {"get_task_factory", (PyCFunction)__pyx_pw_6uvloop_4loop_4Loop_43get_task_factory, METH_NOARGS, __pyx_doc_6uvloop_4loop_4Loop_42get_task_factory},
  134222. {"run_until_complete", (PyCFunction)__pyx_pw_6uvloop_4loop_4Loop_45run_until_complete, METH_O, __pyx_doc_6uvloop_4loop_4Loop_44run_until_complete},
  134223. {"getaddrinfo", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6uvloop_4loop_4Loop_47getaddrinfo, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_4Loop_46getaddrinfo},
  134224. {"getnameinfo", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6uvloop_4loop_4Loop_50getnameinfo, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_4Loop_49getnameinfo},
  134225. {"start_tls", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6uvloop_4loop_4Loop_53start_tls, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_4Loop_52start_tls},
  134226. {"create_server", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6uvloop_4loop_4Loop_56create_server, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_4Loop_55create_server},
  134227. {"create_connection", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6uvloop_4loop_4Loop_59create_connection, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_4Loop_58create_connection},
  134228. {"create_unix_server", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6uvloop_4loop_4Loop_62create_unix_server, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_4Loop_61create_unix_server},
  134229. {"create_unix_connection", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6uvloop_4loop_4Loop_65create_unix_connection, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_4Loop_64create_unix_connection},
  134230. {"default_exception_handler", (PyCFunction)__pyx_pw_6uvloop_4loop_4Loop_68default_exception_handler, METH_O, __pyx_doc_6uvloop_4loop_4Loop_67default_exception_handler},
  134231. {"get_exception_handler", (PyCFunction)__pyx_pw_6uvloop_4loop_4Loop_70get_exception_handler, METH_NOARGS, __pyx_doc_6uvloop_4loop_4Loop_69get_exception_handler},
  134232. {"set_exception_handler", (PyCFunction)__pyx_pw_6uvloop_4loop_4Loop_72set_exception_handler, METH_O, __pyx_doc_6uvloop_4loop_4Loop_71set_exception_handler},
  134233. {"call_exception_handler", (PyCFunction)__pyx_pw_6uvloop_4loop_4Loop_74call_exception_handler, METH_O, __pyx_doc_6uvloop_4loop_4Loop_73call_exception_handler},
  134234. {"add_reader", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6uvloop_4loop_4Loop_76add_reader, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_4Loop_75add_reader},
  134235. {"remove_reader", (PyCFunction)__pyx_pw_6uvloop_4loop_4Loop_78remove_reader, METH_O, __pyx_doc_6uvloop_4loop_4Loop_77remove_reader},
  134236. {"add_writer", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6uvloop_4loop_4Loop_80add_writer, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_4Loop_79add_writer},
  134237. {"remove_writer", (PyCFunction)__pyx_pw_6uvloop_4loop_4Loop_82remove_writer, METH_O, __pyx_doc_6uvloop_4loop_4Loop_81remove_writer},
  134238. {"sock_recv", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6uvloop_4loop_4Loop_84sock_recv, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_4Loop_83sock_recv},
  134239. {"sock_recv_into", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6uvloop_4loop_4Loop_87sock_recv_into, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_4Loop_86sock_recv_into},
  134240. {"sock_sendall", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6uvloop_4loop_4Loop_90sock_sendall, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_4Loop_89sock_sendall},
  134241. {"sock_accept", (PyCFunction)__pyx_pw_6uvloop_4loop_4Loop_93sock_accept, METH_O, __pyx_doc_6uvloop_4loop_4Loop_92sock_accept},
  134242. {"sock_connect", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6uvloop_4loop_4Loop_96sock_connect, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_4Loop_95sock_connect},
  134243. {"connect_accepted_socket", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6uvloop_4loop_4Loop_99connect_accepted_socket, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_4Loop_98connect_accepted_socket},
  134244. {"run_in_executor", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6uvloop_4loop_4Loop_102run_in_executor, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_4Loop_101run_in_executor},
  134245. {"set_default_executor", (PyCFunction)__pyx_pw_6uvloop_4loop_4Loop_104set_default_executor, METH_O, __pyx_doc_6uvloop_4loop_4Loop_103set_default_executor},
  134246. {"__subprocess_run", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6uvloop_4loop_4Loop_106__subprocess_run, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_4Loop_105__subprocess_run},
  134247. {"subprocess_shell", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6uvloop_4loop_4Loop_109subprocess_shell, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_4Loop_108subprocess_shell},
  134248. {"subprocess_exec", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6uvloop_4loop_4Loop_112subprocess_exec, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_4Loop_111subprocess_exec},
  134249. {"connect_read_pipe", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6uvloop_4loop_4Loop_115connect_read_pipe, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_4Loop_114connect_read_pipe},
  134250. {"connect_write_pipe", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6uvloop_4loop_4Loop_118connect_write_pipe, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_4Loop_117connect_write_pipe},
  134251. {"add_signal_handler", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6uvloop_4loop_4Loop_121add_signal_handler, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_4Loop_120add_signal_handler},
  134252. {"remove_signal_handler", (PyCFunction)__pyx_pw_6uvloop_4loop_4Loop_123remove_signal_handler, METH_O, __pyx_doc_6uvloop_4loop_4Loop_122remove_signal_handler},
  134253. {"create_datagram_endpoint", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6uvloop_4loop_4Loop_125create_datagram_endpoint, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_4Loop_124create_datagram_endpoint},
  134254. {"_asyncgen_finalizer_hook", (PyCFunction)__pyx_pw_6uvloop_4loop_4Loop_128_asyncgen_finalizer_hook, METH_O, __pyx_doc_6uvloop_4loop_4Loop_127_asyncgen_finalizer_hook},
  134255. {"_asyncgen_firstiter_hook", (PyCFunction)__pyx_pw_6uvloop_4loop_4Loop_130_asyncgen_firstiter_hook, METH_O, __pyx_doc_6uvloop_4loop_4Loop_129_asyncgen_firstiter_hook},
  134256. {"shutdown_asyncgens", (PyCFunction)__pyx_pw_6uvloop_4loop_4Loop_132shutdown_asyncgens, METH_NOARGS, __pyx_doc_6uvloop_4loop_4Loop_131shutdown_asyncgens},
  134257. {"__reduce_cython__", (PyCFunction)__pyx_pw_6uvloop_4loop_4Loop_135__reduce_cython__, METH_NOARGS, __pyx_doc_6uvloop_4loop_4Loop_134__reduce_cython__},
  134258. {"__setstate_cython__", (PyCFunction)__pyx_pw_6uvloop_4loop_4Loop_137__setstate_cython__, METH_O, __pyx_doc_6uvloop_4loop_4Loop_136__setstate_cython__},
  134259. {0, 0, 0, 0}
  134260. };
  134261. static struct PyGetSetDef __pyx_getsets_6uvloop_4loop_Loop[] = {
  134262. {(char *)"print_debug_info", __pyx_getprop_6uvloop_4loop_4Loop_print_debug_info, 0, (char *)0, 0},
  134263. {(char *)"slow_callback_duration", __pyx_getprop_6uvloop_4loop_4Loop_slow_callback_duration, __pyx_setprop_6uvloop_4loop_4Loop_slow_callback_duration, (char *)"slow_callback_duration: object", 0},
  134264. {(char *)"_closed", __pyx_getprop_6uvloop_4loop_4Loop__closed, 0, (char *)0, 0},
  134265. {(char *)"_debug_cc", __pyx_getprop_6uvloop_4loop_4Loop__debug_cc, 0, (char *)0, 0},
  134266. {(char *)"_debug_handles_total", __pyx_getprop_6uvloop_4loop_4Loop__debug_handles_total, 0, (char *)0, 0},
  134267. {(char *)"_debug_handles_closed", __pyx_getprop_6uvloop_4loop_4Loop__debug_handles_closed, 0, (char *)0, 0},
  134268. {(char *)"_debug_handles_current", __pyx_getprop_6uvloop_4loop_4Loop__debug_handles_current, 0, (char *)0, 0},
  134269. {(char *)"_debug_uv_handles_total", __pyx_getprop_6uvloop_4loop_4Loop__debug_uv_handles_total, 0, (char *)0, 0},
  134270. {(char *)"_debug_uv_handles_freed", __pyx_getprop_6uvloop_4loop_4Loop__debug_uv_handles_freed, 0, (char *)0, 0},
  134271. {(char *)"_debug_cb_handles_total", __pyx_getprop_6uvloop_4loop_4Loop__debug_cb_handles_total, 0, (char *)0, 0},
  134272. {(char *)"_debug_cb_handles_count", __pyx_getprop_6uvloop_4loop_4Loop__debug_cb_handles_count, 0, (char *)0, 0},
  134273. {(char *)"_debug_cb_timer_handles_total", __pyx_getprop_6uvloop_4loop_4Loop__debug_cb_timer_handles_total, 0, (char *)0, 0},
  134274. {(char *)"_debug_cb_timer_handles_count", __pyx_getprop_6uvloop_4loop_4Loop__debug_cb_timer_handles_count, 0, (char *)0, 0},
  134275. {(char *)"_debug_stream_shutdown_errors_total", __pyx_getprop_6uvloop_4loop_4Loop__debug_stream_shutdown_errors_total, 0, (char *)0, 0},
  134276. {(char *)"_debug_stream_listen_errors_total", __pyx_getprop_6uvloop_4loop_4Loop__debug_stream_listen_errors_total, 0, (char *)0, 0},
  134277. {(char *)"_debug_stream_read_cb_total", __pyx_getprop_6uvloop_4loop_4Loop__debug_stream_read_cb_total, 0, (char *)0, 0},
  134278. {(char *)"_debug_stream_read_cb_errors_total", __pyx_getprop_6uvloop_4loop_4Loop__debug_stream_read_cb_errors_total, 0, (char *)0, 0},
  134279. {(char *)"_debug_stream_read_eof_total", __pyx_getprop_6uvloop_4loop_4Loop__debug_stream_read_eof_total, 0, (char *)0, 0},
  134280. {(char *)"_debug_stream_read_eof_cb_errors_total", __pyx_getprop_6uvloop_4loop_4Loop__debug_stream_read_eof_cb_errors_total, 0, (char *)0, 0},
  134281. {(char *)"_debug_stream_read_errors_total", __pyx_getprop_6uvloop_4loop_4Loop__debug_stream_read_errors_total, 0, (char *)0, 0},
  134282. {(char *)"_debug_stream_write_tries", __pyx_getprop_6uvloop_4loop_4Loop__debug_stream_write_tries, 0, (char *)0, 0},
  134283. {(char *)"_debug_stream_write_errors_total", __pyx_getprop_6uvloop_4loop_4Loop__debug_stream_write_errors_total, 0, (char *)0, 0},
  134284. {(char *)"_debug_stream_write_ctx_total", __pyx_getprop_6uvloop_4loop_4Loop__debug_stream_write_ctx_total, 0, (char *)0, 0},
  134285. {(char *)"_debug_stream_write_ctx_cnt", __pyx_getprop_6uvloop_4loop_4Loop__debug_stream_write_ctx_cnt, 0, (char *)0, 0},
  134286. {(char *)"_debug_stream_write_cb_errors_total", __pyx_getprop_6uvloop_4loop_4Loop__debug_stream_write_cb_errors_total, 0, (char *)0, 0},
  134287. {(char *)"_poll_read_events_total", __pyx_getprop_6uvloop_4loop_4Loop__poll_read_events_total, 0, (char *)0, 0},
  134288. {(char *)"_poll_read_cb_errors_total", __pyx_getprop_6uvloop_4loop_4Loop__poll_read_cb_errors_total, 0, (char *)0, 0},
  134289. {(char *)"_poll_write_events_total", __pyx_getprop_6uvloop_4loop_4Loop__poll_write_events_total, 0, (char *)0, 0},
  134290. {(char *)"_poll_write_cb_errors_total", __pyx_getprop_6uvloop_4loop_4Loop__poll_write_cb_errors_total, 0, (char *)0, 0},
  134291. {(char *)"_sock_try_write_total", __pyx_getprop_6uvloop_4loop_4Loop__sock_try_write_total, 0, (char *)0, 0},
  134292. {(char *)"_debug_exception_handler_cnt", __pyx_getprop_6uvloop_4loop_4Loop__debug_exception_handler_cnt, 0, (char *)0, 0},
  134293. {0, 0, 0, 0, 0}
  134294. };
  134295. static PyTypeObject __pyx_type_6uvloop_4loop_Loop = {
  134296. PyVarObject_HEAD_INIT(0, 0)
  134297. "uvloop.loop.Loop", /*tp_name*/
  134298. sizeof(struct __pyx_obj_6uvloop_4loop_Loop), /*tp_basicsize*/
  134299. 0, /*tp_itemsize*/
  134300. __pyx_tp_dealloc_6uvloop_4loop_Loop, /*tp_dealloc*/
  134301. 0, /*tp_print*/
  134302. 0, /*tp_getattr*/
  134303. 0, /*tp_setattr*/
  134304. #if PY_MAJOR_VERSION < 3
  134305. 0, /*tp_compare*/
  134306. #endif
  134307. #if PY_MAJOR_VERSION >= 3
  134308. 0, /*tp_as_async*/
  134309. #endif
  134310. __pyx_pw_6uvloop_4loop_4Loop_11__repr__, /*tp_repr*/
  134311. 0, /*tp_as_number*/
  134312. 0, /*tp_as_sequence*/
  134313. 0, /*tp_as_mapping*/
  134314. 0, /*tp_hash*/
  134315. 0, /*tp_call*/
  134316. 0, /*tp_str*/
  134317. 0, /*tp_getattro*/
  134318. 0, /*tp_setattro*/
  134319. 0, /*tp_as_buffer*/
  134320. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  134321. "Loop()", /*tp_doc*/
  134322. __pyx_tp_traverse_6uvloop_4loop_Loop, /*tp_traverse*/
  134323. 0, /*tp_clear*/
  134324. 0, /*tp_richcompare*/
  134325. 0, /*tp_weaklistoffset*/
  134326. 0, /*tp_iter*/
  134327. 0, /*tp_iternext*/
  134328. __pyx_methods_6uvloop_4loop_Loop, /*tp_methods*/
  134329. 0, /*tp_members*/
  134330. __pyx_getsets_6uvloop_4loop_Loop, /*tp_getset*/
  134331. 0, /*tp_base*/
  134332. 0, /*tp_dict*/
  134333. 0, /*tp_descr_get*/
  134334. 0, /*tp_descr_set*/
  134335. 0, /*tp_dictoffset*/
  134336. __pyx_pw_6uvloop_4loop_4Loop_3__init__, /*tp_init*/
  134337. 0, /*tp_alloc*/
  134338. __pyx_tp_new_6uvloop_4loop_Loop, /*tp_new*/
  134339. 0, /*tp_free*/
  134340. 0, /*tp_is_gc*/
  134341. 0, /*tp_bases*/
  134342. 0, /*tp_mro*/
  134343. 0, /*tp_cache*/
  134344. 0, /*tp_subclasses*/
  134345. 0, /*tp_weaklist*/
  134346. 0, /*tp_del*/
  134347. 0, /*tp_version_tag*/
  134348. #if PY_VERSION_HEX >= 0x030400a1
  134349. 0, /*tp_finalize*/
  134350. #endif
  134351. #if PY_VERSION_HEX >= 0x030800b1
  134352. 0, /*tp_vectorcall*/
  134353. #endif
  134354. };
  134355. static struct __pyx_vtabstruct_6uvloop_4loop_Handle __pyx_vtable_6uvloop_4loop_Handle;
  134356. static struct __pyx_obj_6uvloop_4loop_Handle *__pyx_freelist_6uvloop_4loop_Handle[250];
  134357. static int __pyx_freecount_6uvloop_4loop_Handle = 0;
  134358. static PyObject *__pyx_tp_new_6uvloop_4loop_Handle(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  134359. struct __pyx_obj_6uvloop_4loop_Handle *p;
  134360. PyObject *o;
  134361. if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6uvloop_4loop_Handle > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop_Handle)) & ((t->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)) == 0))) {
  134362. o = (PyObject*)__pyx_freelist_6uvloop_4loop_Handle[--__pyx_freecount_6uvloop_4loop_Handle];
  134363. memset(o, 0, sizeof(struct __pyx_obj_6uvloop_4loop_Handle));
  134364. (void) PyObject_INIT(o, t);
  134365. PyObject_GC_Track(o);
  134366. } else {
  134367. if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
  134368. o = (*t->tp_alloc)(t, 0);
  134369. } else {
  134370. o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  134371. }
  134372. if (unlikely(!o)) return 0;
  134373. }
  134374. p = ((struct __pyx_obj_6uvloop_4loop_Handle *)o);
  134375. p->__pyx_vtab = __pyx_vtabptr_6uvloop_4loop_Handle;
  134376. p->loop = ((struct __pyx_obj_6uvloop_4loop_Loop *)Py_None); Py_INCREF(Py_None);
  134377. p->context = Py_None; Py_INCREF(Py_None);
  134378. p->meth_name = ((PyObject*)Py_None); Py_INCREF(Py_None);
  134379. p->arg1 = Py_None; Py_INCREF(Py_None);
  134380. p->arg2 = Py_None; Py_INCREF(Py_None);
  134381. p->arg3 = Py_None; Py_INCREF(Py_None);
  134382. p->arg4 = Py_None; Py_INCREF(Py_None);
  134383. p->_source_traceback = Py_None; Py_INCREF(Py_None);
  134384. if (unlikely(__pyx_pw_6uvloop_4loop_6Handle_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad;
  134385. return o;
  134386. bad:
  134387. Py_DECREF(o); o = 0;
  134388. return NULL;
  134389. }
  134390. static void __pyx_tp_dealloc_6uvloop_4loop_Handle(PyObject *o) {
  134391. struct __pyx_obj_6uvloop_4loop_Handle *p = (struct __pyx_obj_6uvloop_4loop_Handle *)o;
  134392. #if CYTHON_USE_TP_FINALIZE
  134393. if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
  134394. if (PyObject_CallFinalizerFromDealloc(o)) return;
  134395. }
  134396. #endif
  134397. PyObject_GC_UnTrack(o);
  134398. {
  134399. PyObject *etype, *eval, *etb;
  134400. PyErr_Fetch(&etype, &eval, &etb);
  134401. ++Py_REFCNT(o);
  134402. __pyx_pw_6uvloop_4loop_6Handle_3__dealloc__(o);
  134403. --Py_REFCNT(o);
  134404. PyErr_Restore(etype, eval, etb);
  134405. }
  134406. if (p->__weakref__) PyObject_ClearWeakRefs(o);
  134407. Py_CLEAR(p->loop);
  134408. Py_CLEAR(p->context);
  134409. Py_CLEAR(p->meth_name);
  134410. Py_CLEAR(p->arg1);
  134411. Py_CLEAR(p->arg2);
  134412. Py_CLEAR(p->arg3);
  134413. Py_CLEAR(p->arg4);
  134414. Py_CLEAR(p->_source_traceback);
  134415. if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6uvloop_4loop_Handle < 250) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop_Handle)) & ((Py_TYPE(o)->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)) == 0))) {
  134416. __pyx_freelist_6uvloop_4loop_Handle[__pyx_freecount_6uvloop_4loop_Handle++] = ((struct __pyx_obj_6uvloop_4loop_Handle *)o);
  134417. } else {
  134418. (*Py_TYPE(o)->tp_free)(o);
  134419. }
  134420. }
  134421. static int __pyx_tp_traverse_6uvloop_4loop_Handle(PyObject *o, visitproc v, void *a) {
  134422. int e;
  134423. struct __pyx_obj_6uvloop_4loop_Handle *p = (struct __pyx_obj_6uvloop_4loop_Handle *)o;
  134424. if (p->loop) {
  134425. e = (*v)(((PyObject *)p->loop), a); if (e) return e;
  134426. }
  134427. if (p->context) {
  134428. e = (*v)(p->context, a); if (e) return e;
  134429. }
  134430. if (p->arg1) {
  134431. e = (*v)(p->arg1, a); if (e) return e;
  134432. }
  134433. if (p->arg2) {
  134434. e = (*v)(p->arg2, a); if (e) return e;
  134435. }
  134436. if (p->arg3) {
  134437. e = (*v)(p->arg3, a); if (e) return e;
  134438. }
  134439. if (p->arg4) {
  134440. e = (*v)(p->arg4, a); if (e) return e;
  134441. }
  134442. if (p->_source_traceback) {
  134443. e = (*v)(p->_source_traceback, a); if (e) return e;
  134444. }
  134445. return 0;
  134446. }
  134447. static PyObject *__pyx_getprop_6uvloop_4loop_6Handle__source_traceback(PyObject *o, CYTHON_UNUSED void *x) {
  134448. return __pyx_pw_6uvloop_4loop_6Handle_17_source_traceback_1__get__(o);
  134449. }
  134450. static PyMethodDef __pyx_methods_6uvloop_4loop_Handle[] = {
  134451. {"cancel", (PyCFunction)__pyx_pw_6uvloop_4loop_6Handle_9cancel, METH_NOARGS, __pyx_doc_6uvloop_4loop_6Handle_8cancel},
  134452. {"cancelled", (PyCFunction)__pyx_pw_6uvloop_4loop_6Handle_11cancelled, METH_NOARGS, __pyx_doc_6uvloop_4loop_6Handle_10cancelled},
  134453. {"__reduce_cython__", (PyCFunction)__pyx_pw_6uvloop_4loop_6Handle_13__reduce_cython__, METH_NOARGS, __pyx_doc_6uvloop_4loop_6Handle_12__reduce_cython__},
  134454. {"__setstate_cython__", (PyCFunction)__pyx_pw_6uvloop_4loop_6Handle_15__setstate_cython__, METH_O, __pyx_doc_6uvloop_4loop_6Handle_14__setstate_cython__},
  134455. {0, 0, 0, 0}
  134456. };
  134457. static struct PyGetSetDef __pyx_getsets_6uvloop_4loop_Handle[] = {
  134458. {(char *)"_source_traceback", __pyx_getprop_6uvloop_4loop_6Handle__source_traceback, 0, (char *)0, 0},
  134459. {0, 0, 0, 0, 0}
  134460. };
  134461. static PyTypeObject __pyx_type_6uvloop_4loop_Handle = {
  134462. PyVarObject_HEAD_INIT(0, 0)
  134463. "uvloop.loop.Handle", /*tp_name*/
  134464. sizeof(struct __pyx_obj_6uvloop_4loop_Handle), /*tp_basicsize*/
  134465. 0, /*tp_itemsize*/
  134466. __pyx_tp_dealloc_6uvloop_4loop_Handle, /*tp_dealloc*/
  134467. 0, /*tp_print*/
  134468. 0, /*tp_getattr*/
  134469. 0, /*tp_setattr*/
  134470. #if PY_MAJOR_VERSION < 3
  134471. 0, /*tp_compare*/
  134472. #endif
  134473. #if PY_MAJOR_VERSION >= 3
  134474. 0, /*tp_as_async*/
  134475. #endif
  134476. __pyx_pw_6uvloop_4loop_6Handle_7__repr__, /*tp_repr*/
  134477. 0, /*tp_as_number*/
  134478. 0, /*tp_as_sequence*/
  134479. 0, /*tp_as_mapping*/
  134480. 0, /*tp_hash*/
  134481. 0, /*tp_call*/
  134482. 0, /*tp_str*/
  134483. 0, /*tp_getattro*/
  134484. 0, /*tp_setattro*/
  134485. 0, /*tp_as_buffer*/
  134486. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  134487. "Handle()", /*tp_doc*/
  134488. __pyx_tp_traverse_6uvloop_4loop_Handle, /*tp_traverse*/
  134489. 0, /*tp_clear*/
  134490. 0, /*tp_richcompare*/
  134491. 0, /*tp_weaklistoffset*/
  134492. 0, /*tp_iter*/
  134493. 0, /*tp_iternext*/
  134494. __pyx_methods_6uvloop_4loop_Handle, /*tp_methods*/
  134495. 0, /*tp_members*/
  134496. __pyx_getsets_6uvloop_4loop_Handle, /*tp_getset*/
  134497. 0, /*tp_base*/
  134498. 0, /*tp_dict*/
  134499. 0, /*tp_descr_get*/
  134500. 0, /*tp_descr_set*/
  134501. 0, /*tp_dictoffset*/
  134502. __pyx_pw_6uvloop_4loop_6Handle_5__init__, /*tp_init*/
  134503. 0, /*tp_alloc*/
  134504. __pyx_tp_new_6uvloop_4loop_Handle, /*tp_new*/
  134505. 0, /*tp_free*/
  134506. 0, /*tp_is_gc*/
  134507. 0, /*tp_bases*/
  134508. 0, /*tp_mro*/
  134509. 0, /*tp_cache*/
  134510. 0, /*tp_subclasses*/
  134511. 0, /*tp_weaklist*/
  134512. 0, /*tp_del*/
  134513. 0, /*tp_version_tag*/
  134514. #if PY_VERSION_HEX >= 0x030400a1
  134515. 0, /*tp_finalize*/
  134516. #endif
  134517. #if PY_VERSION_HEX >= 0x030800b1
  134518. 0, /*tp_vectorcall*/
  134519. #endif
  134520. };
  134521. static struct __pyx_vtabstruct_6uvloop_4loop_TimerHandle __pyx_vtable_6uvloop_4loop_TimerHandle;
  134522. static struct __pyx_obj_6uvloop_4loop_TimerHandle *__pyx_freelist_6uvloop_4loop_TimerHandle[250];
  134523. static int __pyx_freecount_6uvloop_4loop_TimerHandle = 0;
  134524. static PyObject *__pyx_tp_new_6uvloop_4loop_TimerHandle(PyTypeObject *t, PyObject *a, PyObject *k) {
  134525. struct __pyx_obj_6uvloop_4loop_TimerHandle *p;
  134526. PyObject *o;
  134527. if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6uvloop_4loop_TimerHandle > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop_TimerHandle)) & ((t->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)) == 0))) {
  134528. o = (PyObject*)__pyx_freelist_6uvloop_4loop_TimerHandle[--__pyx_freecount_6uvloop_4loop_TimerHandle];
  134529. memset(o, 0, sizeof(struct __pyx_obj_6uvloop_4loop_TimerHandle));
  134530. (void) PyObject_INIT(o, t);
  134531. PyObject_GC_Track(o);
  134532. } else {
  134533. if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
  134534. o = (*t->tp_alloc)(t, 0);
  134535. } else {
  134536. o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  134537. }
  134538. if (unlikely(!o)) return 0;
  134539. }
  134540. p = ((struct __pyx_obj_6uvloop_4loop_TimerHandle *)o);
  134541. p->__pyx_vtab = __pyx_vtabptr_6uvloop_4loop_TimerHandle;
  134542. p->callback = Py_None; Py_INCREF(Py_None);
  134543. p->args = ((PyObject*)Py_None); Py_INCREF(Py_None);
  134544. p->timer = ((struct __pyx_obj_6uvloop_4loop_UVTimer *)Py_None); Py_INCREF(Py_None);
  134545. p->loop = ((struct __pyx_obj_6uvloop_4loop_Loop *)Py_None); Py_INCREF(Py_None);
  134546. p->context = Py_None; Py_INCREF(Py_None);
  134547. p->_debug_info = ((PyObject*)Py_None); Py_INCREF(Py_None);
  134548. if (unlikely(__pyx_pw_6uvloop_4loop_11TimerHandle_1__cinit__(o, a, k) < 0)) goto bad;
  134549. return o;
  134550. bad:
  134551. Py_DECREF(o); o = 0;
  134552. return NULL;
  134553. }
  134554. static void __pyx_tp_dealloc_6uvloop_4loop_TimerHandle(PyObject *o) {
  134555. struct __pyx_obj_6uvloop_4loop_TimerHandle *p = (struct __pyx_obj_6uvloop_4loop_TimerHandle *)o;
  134556. #if CYTHON_USE_TP_FINALIZE
  134557. if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
  134558. if (PyObject_CallFinalizerFromDealloc(o)) return;
  134559. }
  134560. #endif
  134561. PyObject_GC_UnTrack(o);
  134562. {
  134563. PyObject *etype, *eval, *etb;
  134564. PyErr_Fetch(&etype, &eval, &etb);
  134565. ++Py_REFCNT(o);
  134566. __pyx_pw_6uvloop_4loop_11TimerHandle_3__dealloc__(o);
  134567. --Py_REFCNT(o);
  134568. PyErr_Restore(etype, eval, etb);
  134569. }
  134570. if (p->__weakref__) PyObject_ClearWeakRefs(o);
  134571. Py_CLEAR(p->callback);
  134572. Py_CLEAR(p->args);
  134573. Py_CLEAR(p->timer);
  134574. Py_CLEAR(p->loop);
  134575. Py_CLEAR(p->context);
  134576. Py_CLEAR(p->_debug_info);
  134577. if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6uvloop_4loop_TimerHandle < 250) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop_TimerHandle)) & ((Py_TYPE(o)->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)) == 0))) {
  134578. __pyx_freelist_6uvloop_4loop_TimerHandle[__pyx_freecount_6uvloop_4loop_TimerHandle++] = ((struct __pyx_obj_6uvloop_4loop_TimerHandle *)o);
  134579. } else {
  134580. (*Py_TYPE(o)->tp_free)(o);
  134581. }
  134582. }
  134583. static int __pyx_tp_traverse_6uvloop_4loop_TimerHandle(PyObject *o, visitproc v, void *a) {
  134584. int e;
  134585. struct __pyx_obj_6uvloop_4loop_TimerHandle *p = (struct __pyx_obj_6uvloop_4loop_TimerHandle *)o;
  134586. if (p->callback) {
  134587. e = (*v)(p->callback, a); if (e) return e;
  134588. }
  134589. if (p->args) {
  134590. e = (*v)(p->args, a); if (e) return e;
  134591. }
  134592. if (p->timer) {
  134593. e = (*v)(((PyObject *)p->timer), a); if (e) return e;
  134594. }
  134595. if (p->loop) {
  134596. e = (*v)(((PyObject *)p->loop), a); if (e) return e;
  134597. }
  134598. if (p->context) {
  134599. e = (*v)(p->context, a); if (e) return e;
  134600. }
  134601. if (p->_debug_info) {
  134602. e = (*v)(p->_debug_info, a); if (e) return e;
  134603. }
  134604. return 0;
  134605. }
  134606. static PyObject *__pyx_getprop_6uvloop_4loop_11TimerHandle__source_traceback(PyObject *o, CYTHON_UNUSED void *x) {
  134607. return __pyx_pw_6uvloop_4loop_11TimerHandle_17_source_traceback_1__get__(o);
  134608. }
  134609. static PyMethodDef __pyx_methods_6uvloop_4loop_TimerHandle[] = {
  134610. {"cancelled", (PyCFunction)__pyx_pw_6uvloop_4loop_11TimerHandle_7cancelled, METH_NOARGS, __pyx_doc_6uvloop_4loop_11TimerHandle_6cancelled},
  134611. {"cancel", (PyCFunction)__pyx_pw_6uvloop_4loop_11TimerHandle_9cancel, METH_NOARGS, __pyx_doc_6uvloop_4loop_11TimerHandle_8cancel},
  134612. {"__reduce_cython__", (PyCFunction)__pyx_pw_6uvloop_4loop_11TimerHandle_11__reduce_cython__, METH_NOARGS, __pyx_doc_6uvloop_4loop_11TimerHandle_10__reduce_cython__},
  134613. {"__setstate_cython__", (PyCFunction)__pyx_pw_6uvloop_4loop_11TimerHandle_13__setstate_cython__, METH_O, __pyx_doc_6uvloop_4loop_11TimerHandle_12__setstate_cython__},
  134614. {0, 0, 0, 0}
  134615. };
  134616. static struct PyGetSetDef __pyx_getsets_6uvloop_4loop_TimerHandle[] = {
  134617. {(char *)"_source_traceback", __pyx_getprop_6uvloop_4loop_11TimerHandle__source_traceback, 0, (char *)0, 0},
  134618. {0, 0, 0, 0, 0}
  134619. };
  134620. static PyTypeObject __pyx_type_6uvloop_4loop_TimerHandle = {
  134621. PyVarObject_HEAD_INIT(0, 0)
  134622. "uvloop.loop.TimerHandle", /*tp_name*/
  134623. sizeof(struct __pyx_obj_6uvloop_4loop_TimerHandle), /*tp_basicsize*/
  134624. 0, /*tp_itemsize*/
  134625. __pyx_tp_dealloc_6uvloop_4loop_TimerHandle, /*tp_dealloc*/
  134626. 0, /*tp_print*/
  134627. 0, /*tp_getattr*/
  134628. 0, /*tp_setattr*/
  134629. #if PY_MAJOR_VERSION < 3
  134630. 0, /*tp_compare*/
  134631. #endif
  134632. #if PY_MAJOR_VERSION >= 3
  134633. 0, /*tp_as_async*/
  134634. #endif
  134635. __pyx_pw_6uvloop_4loop_11TimerHandle_5__repr__, /*tp_repr*/
  134636. 0, /*tp_as_number*/
  134637. 0, /*tp_as_sequence*/
  134638. 0, /*tp_as_mapping*/
  134639. 0, /*tp_hash*/
  134640. 0, /*tp_call*/
  134641. 0, /*tp_str*/
  134642. 0, /*tp_getattro*/
  134643. 0, /*tp_setattro*/
  134644. 0, /*tp_as_buffer*/
  134645. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  134646. 0, /*tp_doc*/
  134647. __pyx_tp_traverse_6uvloop_4loop_TimerHandle, /*tp_traverse*/
  134648. 0, /*tp_clear*/
  134649. 0, /*tp_richcompare*/
  134650. 0, /*tp_weaklistoffset*/
  134651. 0, /*tp_iter*/
  134652. 0, /*tp_iternext*/
  134653. __pyx_methods_6uvloop_4loop_TimerHandle, /*tp_methods*/
  134654. 0, /*tp_members*/
  134655. __pyx_getsets_6uvloop_4loop_TimerHandle, /*tp_getset*/
  134656. 0, /*tp_base*/
  134657. 0, /*tp_dict*/
  134658. 0, /*tp_descr_get*/
  134659. 0, /*tp_descr_set*/
  134660. 0, /*tp_dictoffset*/
  134661. 0, /*tp_init*/
  134662. 0, /*tp_alloc*/
  134663. __pyx_tp_new_6uvloop_4loop_TimerHandle, /*tp_new*/
  134664. 0, /*tp_free*/
  134665. 0, /*tp_is_gc*/
  134666. 0, /*tp_bases*/
  134667. 0, /*tp_mro*/
  134668. 0, /*tp_cache*/
  134669. 0, /*tp_subclasses*/
  134670. 0, /*tp_weaklist*/
  134671. 0, /*tp_del*/
  134672. 0, /*tp_version_tag*/
  134673. #if PY_VERSION_HEX >= 0x030400a1
  134674. 0, /*tp_finalize*/
  134675. #endif
  134676. #if PY_VERSION_HEX >= 0x030800b1
  134677. 0, /*tp_vectorcall*/
  134678. #endif
  134679. };
  134680. static struct __pyx_vtabstruct_6uvloop_4loop_UVCheck __pyx_vtable_6uvloop_4loop_UVCheck;
  134681. static PyObject *__pyx_tp_new_6uvloop_4loop_UVCheck(PyTypeObject *t, PyObject *a, PyObject *k) {
  134682. struct __pyx_obj_6uvloop_4loop_UVCheck *p;
  134683. PyObject *o = __pyx_tp_new_6uvloop_4loop_UVHandle(t, a, k);
  134684. if (unlikely(!o)) return 0;
  134685. p = ((struct __pyx_obj_6uvloop_4loop_UVCheck *)o);
  134686. p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6uvloop_4loop_UVHandle*)__pyx_vtabptr_6uvloop_4loop_UVCheck;
  134687. p->h = ((struct __pyx_obj_6uvloop_4loop_Handle *)Py_None); Py_INCREF(Py_None);
  134688. return o;
  134689. }
  134690. static void __pyx_tp_dealloc_6uvloop_4loop_UVCheck(PyObject *o) {
  134691. struct __pyx_obj_6uvloop_4loop_UVCheck *p = (struct __pyx_obj_6uvloop_4loop_UVCheck *)o;
  134692. #if CYTHON_USE_TP_FINALIZE
  134693. if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
  134694. if (PyObject_CallFinalizerFromDealloc(o)) return;
  134695. }
  134696. #endif
  134697. PyObject_GC_UnTrack(o);
  134698. Py_CLEAR(p->h);
  134699. PyObject_GC_Track(o);
  134700. __pyx_tp_dealloc_6uvloop_4loop_UVHandle(o);
  134701. }
  134702. static int __pyx_tp_traverse_6uvloop_4loop_UVCheck(PyObject *o, visitproc v, void *a) {
  134703. int e;
  134704. struct __pyx_obj_6uvloop_4loop_UVCheck *p = (struct __pyx_obj_6uvloop_4loop_UVCheck *)o;
  134705. e = __pyx_tp_traverse_6uvloop_4loop_UVHandle(o, v, a); if (e) return e;
  134706. if (p->h) {
  134707. e = (*v)(((PyObject *)p->h), a); if (e) return e;
  134708. }
  134709. return 0;
  134710. }
  134711. static PyMethodDef __pyx_methods_6uvloop_4loop_UVCheck[] = {
  134712. {"__reduce_cython__", (PyCFunction)__pyx_pw_6uvloop_4loop_7UVCheck_1__reduce_cython__, METH_NOARGS, __pyx_doc_6uvloop_4loop_7UVCheck___reduce_cython__},
  134713. {"__setstate_cython__", (PyCFunction)__pyx_pw_6uvloop_4loop_7UVCheck_3__setstate_cython__, METH_O, __pyx_doc_6uvloop_4loop_7UVCheck_2__setstate_cython__},
  134714. {0, 0, 0, 0}
  134715. };
  134716. static PyTypeObject __pyx_type_6uvloop_4loop_UVCheck = {
  134717. PyVarObject_HEAD_INIT(0, 0)
  134718. "uvloop.loop.UVCheck", /*tp_name*/
  134719. sizeof(struct __pyx_obj_6uvloop_4loop_UVCheck), /*tp_basicsize*/
  134720. 0, /*tp_itemsize*/
  134721. __pyx_tp_dealloc_6uvloop_4loop_UVCheck, /*tp_dealloc*/
  134722. 0, /*tp_print*/
  134723. 0, /*tp_getattr*/
  134724. 0, /*tp_setattr*/
  134725. #if PY_MAJOR_VERSION < 3
  134726. 0, /*tp_compare*/
  134727. #endif
  134728. #if PY_MAJOR_VERSION >= 3
  134729. 0, /*tp_as_async*/
  134730. #endif
  134731. #if CYTHON_COMPILING_IN_PYPY
  134732. __pyx_pw_6uvloop_4loop_8UVHandle_7__repr__, /*tp_repr*/
  134733. #else
  134734. 0, /*tp_repr*/
  134735. #endif
  134736. 0, /*tp_as_number*/
  134737. 0, /*tp_as_sequence*/
  134738. 0, /*tp_as_mapping*/
  134739. 0, /*tp_hash*/
  134740. 0, /*tp_call*/
  134741. 0, /*tp_str*/
  134742. 0, /*tp_getattro*/
  134743. 0, /*tp_setattro*/
  134744. 0, /*tp_as_buffer*/
  134745. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  134746. 0, /*tp_doc*/
  134747. __pyx_tp_traverse_6uvloop_4loop_UVCheck, /*tp_traverse*/
  134748. 0, /*tp_clear*/
  134749. 0, /*tp_richcompare*/
  134750. 0, /*tp_weaklistoffset*/
  134751. 0, /*tp_iter*/
  134752. 0, /*tp_iternext*/
  134753. __pyx_methods_6uvloop_4loop_UVCheck, /*tp_methods*/
  134754. 0, /*tp_members*/
  134755. 0, /*tp_getset*/
  134756. 0, /*tp_base*/
  134757. 0, /*tp_dict*/
  134758. 0, /*tp_descr_get*/
  134759. 0, /*tp_descr_set*/
  134760. 0, /*tp_dictoffset*/
  134761. #if CYTHON_COMPILING_IN_PYPY
  134762. __pyx_pw_6uvloop_4loop_8UVHandle_3__init__, /*tp_init*/
  134763. #else
  134764. 0, /*tp_init*/
  134765. #endif
  134766. 0, /*tp_alloc*/
  134767. __pyx_tp_new_6uvloop_4loop_UVCheck, /*tp_new*/
  134768. 0, /*tp_free*/
  134769. 0, /*tp_is_gc*/
  134770. 0, /*tp_bases*/
  134771. 0, /*tp_mro*/
  134772. 0, /*tp_cache*/
  134773. 0, /*tp_subclasses*/
  134774. 0, /*tp_weaklist*/
  134775. 0, /*tp_del*/
  134776. 0, /*tp_version_tag*/
  134777. #if PY_VERSION_HEX >= 0x030400a1
  134778. 0, /*tp_finalize*/
  134779. #endif
  134780. #if PY_VERSION_HEX >= 0x030800b1
  134781. 0, /*tp_vectorcall*/
  134782. #endif
  134783. };
  134784. static struct __pyx_vtabstruct_6uvloop_4loop_UVPoll __pyx_vtable_6uvloop_4loop_UVPoll;
  134785. static PyObject *__pyx_tp_new_6uvloop_4loop_UVPoll(PyTypeObject *t, PyObject *a, PyObject *k) {
  134786. struct __pyx_obj_6uvloop_4loop_UVPoll *p;
  134787. PyObject *o = __pyx_tp_new_6uvloop_4loop_UVHandle(t, a, k);
  134788. if (unlikely(!o)) return 0;
  134789. p = ((struct __pyx_obj_6uvloop_4loop_UVPoll *)o);
  134790. p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6uvloop_4loop_UVHandle*)__pyx_vtabptr_6uvloop_4loop_UVPoll;
  134791. p->reading_handle = ((struct __pyx_obj_6uvloop_4loop_Handle *)Py_None); Py_INCREF(Py_None);
  134792. p->writing_handle = ((struct __pyx_obj_6uvloop_4loop_Handle *)Py_None); Py_INCREF(Py_None);
  134793. return o;
  134794. }
  134795. static void __pyx_tp_dealloc_6uvloop_4loop_UVPoll(PyObject *o) {
  134796. struct __pyx_obj_6uvloop_4loop_UVPoll *p = (struct __pyx_obj_6uvloop_4loop_UVPoll *)o;
  134797. #if CYTHON_USE_TP_FINALIZE
  134798. if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
  134799. if (PyObject_CallFinalizerFromDealloc(o)) return;
  134800. }
  134801. #endif
  134802. PyObject_GC_UnTrack(o);
  134803. Py_CLEAR(p->reading_handle);
  134804. Py_CLEAR(p->writing_handle);
  134805. PyObject_GC_Track(o);
  134806. __pyx_tp_dealloc_6uvloop_4loop_UVHandle(o);
  134807. }
  134808. static int __pyx_tp_traverse_6uvloop_4loop_UVPoll(PyObject *o, visitproc v, void *a) {
  134809. int e;
  134810. struct __pyx_obj_6uvloop_4loop_UVPoll *p = (struct __pyx_obj_6uvloop_4loop_UVPoll *)o;
  134811. e = __pyx_tp_traverse_6uvloop_4loop_UVHandle(o, v, a); if (e) return e;
  134812. if (p->reading_handle) {
  134813. e = (*v)(((PyObject *)p->reading_handle), a); if (e) return e;
  134814. }
  134815. if (p->writing_handle) {
  134816. e = (*v)(((PyObject *)p->writing_handle), a); if (e) return e;
  134817. }
  134818. return 0;
  134819. }
  134820. static PyMethodDef __pyx_methods_6uvloop_4loop_UVPoll[] = {
  134821. {"__reduce_cython__", (PyCFunction)__pyx_pw_6uvloop_4loop_6UVPoll_1__reduce_cython__, METH_NOARGS, __pyx_doc_6uvloop_4loop_6UVPoll___reduce_cython__},
  134822. {"__setstate_cython__", (PyCFunction)__pyx_pw_6uvloop_4loop_6UVPoll_3__setstate_cython__, METH_O, __pyx_doc_6uvloop_4loop_6UVPoll_2__setstate_cython__},
  134823. {0, 0, 0, 0}
  134824. };
  134825. static PyTypeObject __pyx_type_6uvloop_4loop_UVPoll = {
  134826. PyVarObject_HEAD_INIT(0, 0)
  134827. "uvloop.loop.UVPoll", /*tp_name*/
  134828. sizeof(struct __pyx_obj_6uvloop_4loop_UVPoll), /*tp_basicsize*/
  134829. 0, /*tp_itemsize*/
  134830. __pyx_tp_dealloc_6uvloop_4loop_UVPoll, /*tp_dealloc*/
  134831. 0, /*tp_print*/
  134832. 0, /*tp_getattr*/
  134833. 0, /*tp_setattr*/
  134834. #if PY_MAJOR_VERSION < 3
  134835. 0, /*tp_compare*/
  134836. #endif
  134837. #if PY_MAJOR_VERSION >= 3
  134838. 0, /*tp_as_async*/
  134839. #endif
  134840. #if CYTHON_COMPILING_IN_PYPY
  134841. __pyx_pw_6uvloop_4loop_8UVHandle_7__repr__, /*tp_repr*/
  134842. #else
  134843. 0, /*tp_repr*/
  134844. #endif
  134845. 0, /*tp_as_number*/
  134846. 0, /*tp_as_sequence*/
  134847. 0, /*tp_as_mapping*/
  134848. 0, /*tp_hash*/
  134849. 0, /*tp_call*/
  134850. 0, /*tp_str*/
  134851. 0, /*tp_getattro*/
  134852. 0, /*tp_setattro*/
  134853. 0, /*tp_as_buffer*/
  134854. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  134855. 0, /*tp_doc*/
  134856. __pyx_tp_traverse_6uvloop_4loop_UVPoll, /*tp_traverse*/
  134857. 0, /*tp_clear*/
  134858. 0, /*tp_richcompare*/
  134859. 0, /*tp_weaklistoffset*/
  134860. 0, /*tp_iter*/
  134861. 0, /*tp_iternext*/
  134862. __pyx_methods_6uvloop_4loop_UVPoll, /*tp_methods*/
  134863. 0, /*tp_members*/
  134864. 0, /*tp_getset*/
  134865. 0, /*tp_base*/
  134866. 0, /*tp_dict*/
  134867. 0, /*tp_descr_get*/
  134868. 0, /*tp_descr_set*/
  134869. 0, /*tp_dictoffset*/
  134870. #if CYTHON_COMPILING_IN_PYPY
  134871. __pyx_pw_6uvloop_4loop_8UVHandle_3__init__, /*tp_init*/
  134872. #else
  134873. 0, /*tp_init*/
  134874. #endif
  134875. 0, /*tp_alloc*/
  134876. __pyx_tp_new_6uvloop_4loop_UVPoll, /*tp_new*/
  134877. 0, /*tp_free*/
  134878. 0, /*tp_is_gc*/
  134879. 0, /*tp_bases*/
  134880. 0, /*tp_mro*/
  134881. 0, /*tp_cache*/
  134882. 0, /*tp_subclasses*/
  134883. 0, /*tp_weaklist*/
  134884. 0, /*tp_del*/
  134885. 0, /*tp_version_tag*/
  134886. #if PY_VERSION_HEX >= 0x030400a1
  134887. 0, /*tp_finalize*/
  134888. #endif
  134889. #if PY_VERSION_HEX >= 0x030800b1
  134890. 0, /*tp_vectorcall*/
  134891. #endif
  134892. };
  134893. static struct __pyx_vtabstruct_6uvloop_4loop_UVStream __pyx_vtable_6uvloop_4loop_UVStream;
  134894. static PyObject *__pyx_tp_new_6uvloop_4loop_UVStream(PyTypeObject *t, PyObject *a, PyObject *k) {
  134895. struct __pyx_obj_6uvloop_4loop_UVStream *p;
  134896. PyObject *o = __pyx_tp_new_6uvloop_4loop_UVBaseTransport(t, a, k);
  134897. if (unlikely(!o)) return 0;
  134898. p = ((struct __pyx_obj_6uvloop_4loop_UVStream *)o);
  134899. p->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6uvloop_4loop_UVHandle*)__pyx_vtabptr_6uvloop_4loop_UVStream;
  134900. p->_protocol_get_buffer = Py_None; Py_INCREF(Py_None);
  134901. p->_protocol_buffer_updated = Py_None; Py_INCREF(Py_None);
  134902. p->_buffer = ((PyObject*)Py_None); Py_INCREF(Py_None);
  134903. p->_read_pybuf.obj = NULL;
  134904. if (unlikely(__pyx_pw_6uvloop_4loop_8UVStream_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad;
  134905. return o;
  134906. bad:
  134907. Py_DECREF(o); o = 0;
  134908. return NULL;
  134909. }
  134910. static void __pyx_tp_dealloc_6uvloop_4loop_UVStream(PyObject *o) {
  134911. struct __pyx_obj_6uvloop_4loop_UVStream *p = (struct __pyx_obj_6uvloop_4loop_UVStream *)o;
  134912. #if CYTHON_USE_TP_FINALIZE
  134913. if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
  134914. if (PyObject_CallFinalizerFromDealloc(o)) return;
  134915. }
  134916. #endif
  134917. PyObject_GC_UnTrack(o);
  134918. Py_CLEAR(p->_protocol_get_buffer);
  134919. Py_CLEAR(p->_protocol_buffer_updated);
  134920. Py_CLEAR(p->_buffer);
  134921. PyObject_GC_Track(o);
  134922. __pyx_tp_dealloc_6uvloop_4loop_UVBaseTransport(o);
  134923. }
  134924. static int __pyx_tp_traverse_6uvloop_4loop_UVStream(PyObject *o, visitproc v, void *a) {
  134925. int e;
  134926. struct __pyx_obj_6uvloop_4loop_UVStream *p = (struct __pyx_obj_6uvloop_4loop_UVStream *)o;
  134927. e = __pyx_tp_traverse_6uvloop_4loop_UVBaseTransport(o, v, a); if (e) return e;
  134928. if (p->_protocol_get_buffer) {
  134929. e = (*v)(p->_protocol_get_buffer, a); if (e) return e;
  134930. }
  134931. if (p->_protocol_buffer_updated) {
  134932. e = (*v)(p->_protocol_buffer_updated, a); if (e) return e;
  134933. }
  134934. if (p->_buffer) {
  134935. e = (*v)(p->_buffer, a); if (e) return e;
  134936. }
  134937. if (p->_read_pybuf.obj) {
  134938. e = (*v)(p->_read_pybuf.obj, a); if (e) return e;
  134939. }
  134940. return 0;
  134941. }
  134942. static PyMethodDef __pyx_methods_6uvloop_4loop_UVStream[] = {
  134943. {"write", (PyCFunction)__pyx_pw_6uvloop_4loop_8UVStream_5write, METH_O, __pyx_doc_6uvloop_4loop_8UVStream_4write},
  134944. {"writelines", (PyCFunction)__pyx_pw_6uvloop_4loop_8UVStream_7writelines, METH_O, __pyx_doc_6uvloop_4loop_8UVStream_6writelines},
  134945. {"write_eof", (PyCFunction)__pyx_pw_6uvloop_4loop_8UVStream_9write_eof, METH_NOARGS, __pyx_doc_6uvloop_4loop_8UVStream_8write_eof},
  134946. {"can_write_eof", (PyCFunction)__pyx_pw_6uvloop_4loop_8UVStream_11can_write_eof, METH_NOARGS, __pyx_doc_6uvloop_4loop_8UVStream_10can_write_eof},
  134947. {"is_reading", (PyCFunction)__pyx_pw_6uvloop_4loop_8UVStream_13is_reading, METH_NOARGS, __pyx_doc_6uvloop_4loop_8UVStream_12is_reading},
  134948. {"pause_reading", (PyCFunction)__pyx_pw_6uvloop_4loop_8UVStream_15pause_reading, METH_NOARGS, __pyx_doc_6uvloop_4loop_8UVStream_14pause_reading},
  134949. {"resume_reading", (PyCFunction)__pyx_pw_6uvloop_4loop_8UVStream_17resume_reading, METH_NOARGS, __pyx_doc_6uvloop_4loop_8UVStream_16resume_reading},
  134950. {"__reduce_cython__", (PyCFunction)__pyx_pw_6uvloop_4loop_8UVStream_19__reduce_cython__, METH_NOARGS, __pyx_doc_6uvloop_4loop_8UVStream_18__reduce_cython__},
  134951. {"__setstate_cython__", (PyCFunction)__pyx_pw_6uvloop_4loop_8UVStream_21__setstate_cython__, METH_O, __pyx_doc_6uvloop_4loop_8UVStream_20__setstate_cython__},
  134952. {0, 0, 0, 0}
  134953. };
  134954. static PyTypeObject __pyx_type_6uvloop_4loop_UVStream = {
  134955. PyVarObject_HEAD_INIT(0, 0)
  134956. "uvloop.loop.UVStream", /*tp_name*/
  134957. sizeof(struct __pyx_obj_6uvloop_4loop_UVStream), /*tp_basicsize*/
  134958. 0, /*tp_itemsize*/
  134959. __pyx_tp_dealloc_6uvloop_4loop_UVStream, /*tp_dealloc*/
  134960. 0, /*tp_print*/
  134961. 0, /*tp_getattr*/
  134962. 0, /*tp_setattr*/
  134963. #if PY_MAJOR_VERSION < 3
  134964. 0, /*tp_compare*/
  134965. #endif
  134966. #if PY_MAJOR_VERSION >= 3
  134967. 0, /*tp_as_async*/
  134968. #endif
  134969. __pyx_pw_6uvloop_4loop_8UVStream_3__repr__, /*tp_repr*/
  134970. 0, /*tp_as_number*/
  134971. 0, /*tp_as_sequence*/
  134972. 0, /*tp_as_mapping*/
  134973. 0, /*tp_hash*/
  134974. 0, /*tp_call*/
  134975. 0, /*tp_str*/
  134976. 0, /*tp_getattro*/
  134977. 0, /*tp_setattro*/
  134978. 0, /*tp_as_buffer*/
  134979. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  134980. 0, /*tp_doc*/
  134981. __pyx_tp_traverse_6uvloop_4loop_UVStream, /*tp_traverse*/
  134982. 0, /*tp_clear*/
  134983. 0, /*tp_richcompare*/
  134984. 0, /*tp_weaklistoffset*/
  134985. 0, /*tp_iter*/
  134986. 0, /*tp_iternext*/
  134987. __pyx_methods_6uvloop_4loop_UVStream, /*tp_methods*/
  134988. 0, /*tp_members*/
  134989. 0, /*tp_getset*/
  134990. 0, /*tp_base*/
  134991. 0, /*tp_dict*/
  134992. 0, /*tp_descr_get*/
  134993. 0, /*tp_descr_set*/
  134994. 0, /*tp_dictoffset*/
  134995. #if CYTHON_COMPILING_IN_PYPY
  134996. __pyx_pw_6uvloop_4loop_8UVHandle_3__init__, /*tp_init*/
  134997. #else
  134998. 0, /*tp_init*/
  134999. #endif
  135000. 0, /*tp_alloc*/
  135001. __pyx_tp_new_6uvloop_4loop_UVStream, /*tp_new*/
  135002. 0, /*tp_free*/
  135003. 0, /*tp_is_gc*/
  135004. 0, /*tp_bases*/
  135005. 0, /*tp_mro*/
  135006. 0, /*tp_cache*/
  135007. 0, /*tp_subclasses*/
  135008. 0, /*tp_weaklist*/
  135009. 0, /*tp_del*/
  135010. 0, /*tp_version_tag*/
  135011. #if PY_VERSION_HEX >= 0x030400a1
  135012. 0, /*tp_finalize*/
  135013. #endif
  135014. #if PY_VERSION_HEX >= 0x030800b1
  135015. 0, /*tp_vectorcall*/
  135016. #endif
  135017. };
  135018. static struct __pyx_vtabstruct_6uvloop_4loop_UVStreamServer __pyx_vtable_6uvloop_4loop_UVStreamServer;
  135019. static PyObject *__pyx_tp_new_6uvloop_4loop_UVStreamServer(PyTypeObject *t, PyObject *a, PyObject *k) {
  135020. struct __pyx_obj_6uvloop_4loop_UVStreamServer *p;
  135021. PyObject *o = __pyx_tp_new_6uvloop_4loop_UVSocketHandle(t, a, k);
  135022. if (unlikely(!o)) return 0;
  135023. p = ((struct __pyx_obj_6uvloop_4loop_UVStreamServer *)o);
  135024. p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6uvloop_4loop_UVHandle*)__pyx_vtabptr_6uvloop_4loop_UVStreamServer;
  135025. p->ssl = Py_None; Py_INCREF(Py_None);
  135026. p->ssl_handshake_timeout = Py_None; Py_INCREF(Py_None);
  135027. p->ssl_shutdown_timeout = Py_None; Py_INCREF(Py_None);
  135028. p->protocol_factory = Py_None; Py_INCREF(Py_None);
  135029. p->_server = ((struct __pyx_obj_6uvloop_4loop_Server *)Py_None); Py_INCREF(Py_None);
  135030. if (unlikely(__pyx_pw_6uvloop_4loop_14UVStreamServer_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad;
  135031. return o;
  135032. bad:
  135033. Py_DECREF(o); o = 0;
  135034. return NULL;
  135035. }
  135036. static void __pyx_tp_dealloc_6uvloop_4loop_UVStreamServer(PyObject *o) {
  135037. struct __pyx_obj_6uvloop_4loop_UVStreamServer *p = (struct __pyx_obj_6uvloop_4loop_UVStreamServer *)o;
  135038. #if CYTHON_USE_TP_FINALIZE
  135039. if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
  135040. if (PyObject_CallFinalizerFromDealloc(o)) return;
  135041. }
  135042. #endif
  135043. PyObject_GC_UnTrack(o);
  135044. Py_CLEAR(p->ssl);
  135045. Py_CLEAR(p->ssl_handshake_timeout);
  135046. Py_CLEAR(p->ssl_shutdown_timeout);
  135047. Py_CLEAR(p->protocol_factory);
  135048. Py_CLEAR(p->_server);
  135049. PyObject_GC_Track(o);
  135050. __pyx_tp_dealloc_6uvloop_4loop_UVSocketHandle(o);
  135051. }
  135052. static int __pyx_tp_traverse_6uvloop_4loop_UVStreamServer(PyObject *o, visitproc v, void *a) {
  135053. int e;
  135054. struct __pyx_obj_6uvloop_4loop_UVStreamServer *p = (struct __pyx_obj_6uvloop_4loop_UVStreamServer *)o;
  135055. e = __pyx_tp_traverse_6uvloop_4loop_UVSocketHandle(o, v, a); if (e) return e;
  135056. if (p->ssl) {
  135057. e = (*v)(p->ssl, a); if (e) return e;
  135058. }
  135059. if (p->ssl_handshake_timeout) {
  135060. e = (*v)(p->ssl_handshake_timeout, a); if (e) return e;
  135061. }
  135062. if (p->ssl_shutdown_timeout) {
  135063. e = (*v)(p->ssl_shutdown_timeout, a); if (e) return e;
  135064. }
  135065. if (p->protocol_factory) {
  135066. e = (*v)(p->protocol_factory, a); if (e) return e;
  135067. }
  135068. if (p->_server) {
  135069. e = (*v)(((PyObject *)p->_server), a); if (e) return e;
  135070. }
  135071. return 0;
  135072. }
  135073. static PyMethodDef __pyx_methods_6uvloop_4loop_UVStreamServer[] = {
  135074. {"__on_ssl_connected", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6uvloop_4loop_14UVStreamServer_3__on_ssl_connected, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_14UVStreamServer_2__on_ssl_connected},
  135075. {"__reduce_cython__", (PyCFunction)__pyx_pw_6uvloop_4loop_14UVStreamServer_5__reduce_cython__, METH_NOARGS, __pyx_doc_6uvloop_4loop_14UVStreamServer_4__reduce_cython__},
  135076. {"__setstate_cython__", (PyCFunction)__pyx_pw_6uvloop_4loop_14UVStreamServer_7__setstate_cython__, METH_O, __pyx_doc_6uvloop_4loop_14UVStreamServer_6__setstate_cython__},
  135077. {0, 0, 0, 0}
  135078. };
  135079. static PyTypeObject __pyx_type_6uvloop_4loop_UVStreamServer = {
  135080. PyVarObject_HEAD_INIT(0, 0)
  135081. "uvloop.loop.UVStreamServer", /*tp_name*/
  135082. sizeof(struct __pyx_obj_6uvloop_4loop_UVStreamServer), /*tp_basicsize*/
  135083. 0, /*tp_itemsize*/
  135084. __pyx_tp_dealloc_6uvloop_4loop_UVStreamServer, /*tp_dealloc*/
  135085. 0, /*tp_print*/
  135086. 0, /*tp_getattr*/
  135087. 0, /*tp_setattr*/
  135088. #if PY_MAJOR_VERSION < 3
  135089. 0, /*tp_compare*/
  135090. #endif
  135091. #if PY_MAJOR_VERSION >= 3
  135092. 0, /*tp_as_async*/
  135093. #endif
  135094. #if CYTHON_COMPILING_IN_PYPY
  135095. __pyx_pw_6uvloop_4loop_8UVHandle_7__repr__, /*tp_repr*/
  135096. #else
  135097. 0, /*tp_repr*/
  135098. #endif
  135099. 0, /*tp_as_number*/
  135100. 0, /*tp_as_sequence*/
  135101. 0, /*tp_as_mapping*/
  135102. 0, /*tp_hash*/
  135103. 0, /*tp_call*/
  135104. 0, /*tp_str*/
  135105. 0, /*tp_getattro*/
  135106. 0, /*tp_setattro*/
  135107. 0, /*tp_as_buffer*/
  135108. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  135109. 0, /*tp_doc*/
  135110. __pyx_tp_traverse_6uvloop_4loop_UVStreamServer, /*tp_traverse*/
  135111. 0, /*tp_clear*/
  135112. 0, /*tp_richcompare*/
  135113. 0, /*tp_weaklistoffset*/
  135114. 0, /*tp_iter*/
  135115. 0, /*tp_iternext*/
  135116. __pyx_methods_6uvloop_4loop_UVStreamServer, /*tp_methods*/
  135117. 0, /*tp_members*/
  135118. 0, /*tp_getset*/
  135119. 0, /*tp_base*/
  135120. 0, /*tp_dict*/
  135121. 0, /*tp_descr_get*/
  135122. 0, /*tp_descr_set*/
  135123. 0, /*tp_dictoffset*/
  135124. #if CYTHON_COMPILING_IN_PYPY
  135125. __pyx_pw_6uvloop_4loop_8UVHandle_3__init__, /*tp_init*/
  135126. #else
  135127. 0, /*tp_init*/
  135128. #endif
  135129. 0, /*tp_alloc*/
  135130. __pyx_tp_new_6uvloop_4loop_UVStreamServer, /*tp_new*/
  135131. 0, /*tp_free*/
  135132. 0, /*tp_is_gc*/
  135133. 0, /*tp_bases*/
  135134. 0, /*tp_mro*/
  135135. 0, /*tp_cache*/
  135136. 0, /*tp_subclasses*/
  135137. 0, /*tp_weaklist*/
  135138. 0, /*tp_del*/
  135139. 0, /*tp_version_tag*/
  135140. #if PY_VERSION_HEX >= 0x030400a1
  135141. 0, /*tp_finalize*/
  135142. #endif
  135143. #if PY_VERSION_HEX >= 0x030800b1
  135144. 0, /*tp_vectorcall*/
  135145. #endif
  135146. };
  135147. static struct __pyx_vtabstruct_6uvloop_4loop_TCPServer __pyx_vtable_6uvloop_4loop_TCPServer;
  135148. static PyObject *__pyx_tp_new_6uvloop_4loop_TCPServer(PyTypeObject *t, PyObject *a, PyObject *k) {
  135149. struct __pyx_obj_6uvloop_4loop_TCPServer *p;
  135150. PyObject *o = __pyx_tp_new_6uvloop_4loop_UVStreamServer(t, a, k);
  135151. if (unlikely(!o)) return 0;
  135152. p = ((struct __pyx_obj_6uvloop_4loop_TCPServer *)o);
  135153. p->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6uvloop_4loop_UVHandle*)__pyx_vtabptr_6uvloop_4loop_TCPServer;
  135154. return o;
  135155. }
  135156. static PyMethodDef __pyx_methods_6uvloop_4loop_TCPServer[] = {
  135157. {"__reduce_cython__", (PyCFunction)__pyx_pw_6uvloop_4loop_9TCPServer_1__reduce_cython__, METH_NOARGS, __pyx_doc_6uvloop_4loop_9TCPServer___reduce_cython__},
  135158. {"__setstate_cython__", (PyCFunction)__pyx_pw_6uvloop_4loop_9TCPServer_3__setstate_cython__, METH_O, __pyx_doc_6uvloop_4loop_9TCPServer_2__setstate_cython__},
  135159. {0, 0, 0, 0}
  135160. };
  135161. static PyTypeObject __pyx_type_6uvloop_4loop_TCPServer = {
  135162. PyVarObject_HEAD_INIT(0, 0)
  135163. "uvloop.loop.TCPServer", /*tp_name*/
  135164. sizeof(struct __pyx_obj_6uvloop_4loop_TCPServer), /*tp_basicsize*/
  135165. 0, /*tp_itemsize*/
  135166. __pyx_tp_dealloc_6uvloop_4loop_UVStreamServer, /*tp_dealloc*/
  135167. 0, /*tp_print*/
  135168. 0, /*tp_getattr*/
  135169. 0, /*tp_setattr*/
  135170. #if PY_MAJOR_VERSION < 3
  135171. 0, /*tp_compare*/
  135172. #endif
  135173. #if PY_MAJOR_VERSION >= 3
  135174. 0, /*tp_as_async*/
  135175. #endif
  135176. #if CYTHON_COMPILING_IN_PYPY
  135177. __pyx_pw_6uvloop_4loop_8UVHandle_7__repr__, /*tp_repr*/
  135178. #else
  135179. 0, /*tp_repr*/
  135180. #endif
  135181. 0, /*tp_as_number*/
  135182. 0, /*tp_as_sequence*/
  135183. 0, /*tp_as_mapping*/
  135184. 0, /*tp_hash*/
  135185. 0, /*tp_call*/
  135186. 0, /*tp_str*/
  135187. 0, /*tp_getattro*/
  135188. 0, /*tp_setattro*/
  135189. 0, /*tp_as_buffer*/
  135190. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  135191. 0, /*tp_doc*/
  135192. __pyx_tp_traverse_6uvloop_4loop_UVStreamServer, /*tp_traverse*/
  135193. 0, /*tp_clear*/
  135194. 0, /*tp_richcompare*/
  135195. 0, /*tp_weaklistoffset*/
  135196. 0, /*tp_iter*/
  135197. 0, /*tp_iternext*/
  135198. __pyx_methods_6uvloop_4loop_TCPServer, /*tp_methods*/
  135199. 0, /*tp_members*/
  135200. 0, /*tp_getset*/
  135201. 0, /*tp_base*/
  135202. 0, /*tp_dict*/
  135203. 0, /*tp_descr_get*/
  135204. 0, /*tp_descr_set*/
  135205. 0, /*tp_dictoffset*/
  135206. #if CYTHON_COMPILING_IN_PYPY
  135207. __pyx_pw_6uvloop_4loop_8UVHandle_3__init__, /*tp_init*/
  135208. #else
  135209. 0, /*tp_init*/
  135210. #endif
  135211. 0, /*tp_alloc*/
  135212. __pyx_tp_new_6uvloop_4loop_TCPServer, /*tp_new*/
  135213. 0, /*tp_free*/
  135214. 0, /*tp_is_gc*/
  135215. 0, /*tp_bases*/
  135216. 0, /*tp_mro*/
  135217. 0, /*tp_cache*/
  135218. 0, /*tp_subclasses*/
  135219. 0, /*tp_weaklist*/
  135220. 0, /*tp_del*/
  135221. 0, /*tp_version_tag*/
  135222. #if PY_VERSION_HEX >= 0x030400a1
  135223. 0, /*tp_finalize*/
  135224. #endif
  135225. #if PY_VERSION_HEX >= 0x030800b1
  135226. 0, /*tp_vectorcall*/
  135227. #endif
  135228. };
  135229. static struct __pyx_vtabstruct_6uvloop_4loop_TCPTransport __pyx_vtable_6uvloop_4loop_TCPTransport;
  135230. static PyObject *__pyx_tp_new_6uvloop_4loop_TCPTransport(PyTypeObject *t, PyObject *a, PyObject *k) {
  135231. struct __pyx_obj_6uvloop_4loop_TCPTransport *p;
  135232. PyObject *o = __pyx_tp_new_6uvloop_4loop_UVStream(t, a, k);
  135233. if (unlikely(!o)) return 0;
  135234. p = ((struct __pyx_obj_6uvloop_4loop_TCPTransport *)o);
  135235. p->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6uvloop_4loop_UVHandle*)__pyx_vtabptr_6uvloop_4loop_TCPTransport;
  135236. return o;
  135237. }
  135238. static PyMethodDef __pyx_methods_6uvloop_4loop_TCPTransport[] = {
  135239. {"get_extra_info", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6uvloop_4loop_12TCPTransport_1get_extra_info, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_12TCPTransport_get_extra_info},
  135240. {"__reduce_cython__", (PyCFunction)__pyx_pw_6uvloop_4loop_12TCPTransport_3__reduce_cython__, METH_NOARGS, __pyx_doc_6uvloop_4loop_12TCPTransport_2__reduce_cython__},
  135241. {"__setstate_cython__", (PyCFunction)__pyx_pw_6uvloop_4loop_12TCPTransport_5__setstate_cython__, METH_O, __pyx_doc_6uvloop_4loop_12TCPTransport_4__setstate_cython__},
  135242. {0, 0, 0, 0}
  135243. };
  135244. static PyTypeObject __pyx_type_6uvloop_4loop_TCPTransport = {
  135245. PyVarObject_HEAD_INIT(0, 0)
  135246. "uvloop.loop.TCPTransport", /*tp_name*/
  135247. sizeof(struct __pyx_obj_6uvloop_4loop_TCPTransport), /*tp_basicsize*/
  135248. 0, /*tp_itemsize*/
  135249. __pyx_tp_dealloc_6uvloop_4loop_UVStream, /*tp_dealloc*/
  135250. 0, /*tp_print*/
  135251. 0, /*tp_getattr*/
  135252. 0, /*tp_setattr*/
  135253. #if PY_MAJOR_VERSION < 3
  135254. 0, /*tp_compare*/
  135255. #endif
  135256. #if PY_MAJOR_VERSION >= 3
  135257. 0, /*tp_as_async*/
  135258. #endif
  135259. #if CYTHON_COMPILING_IN_PYPY
  135260. __pyx_pw_6uvloop_4loop_8UVStream_3__repr__, /*tp_repr*/
  135261. #else
  135262. 0, /*tp_repr*/
  135263. #endif
  135264. 0, /*tp_as_number*/
  135265. 0, /*tp_as_sequence*/
  135266. 0, /*tp_as_mapping*/
  135267. 0, /*tp_hash*/
  135268. 0, /*tp_call*/
  135269. 0, /*tp_str*/
  135270. 0, /*tp_getattro*/
  135271. 0, /*tp_setattro*/
  135272. 0, /*tp_as_buffer*/
  135273. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  135274. 0, /*tp_doc*/
  135275. __pyx_tp_traverse_6uvloop_4loop_UVStream, /*tp_traverse*/
  135276. 0, /*tp_clear*/
  135277. 0, /*tp_richcompare*/
  135278. 0, /*tp_weaklistoffset*/
  135279. 0, /*tp_iter*/
  135280. 0, /*tp_iternext*/
  135281. __pyx_methods_6uvloop_4loop_TCPTransport, /*tp_methods*/
  135282. 0, /*tp_members*/
  135283. 0, /*tp_getset*/
  135284. 0, /*tp_base*/
  135285. 0, /*tp_dict*/
  135286. 0, /*tp_descr_get*/
  135287. 0, /*tp_descr_set*/
  135288. 0, /*tp_dictoffset*/
  135289. #if CYTHON_COMPILING_IN_PYPY
  135290. __pyx_pw_6uvloop_4loop_8UVHandle_3__init__, /*tp_init*/
  135291. #else
  135292. 0, /*tp_init*/
  135293. #endif
  135294. 0, /*tp_alloc*/
  135295. __pyx_tp_new_6uvloop_4loop_TCPTransport, /*tp_new*/
  135296. 0, /*tp_free*/
  135297. 0, /*tp_is_gc*/
  135298. 0, /*tp_bases*/
  135299. 0, /*tp_mro*/
  135300. 0, /*tp_cache*/
  135301. 0, /*tp_subclasses*/
  135302. 0, /*tp_weaklist*/
  135303. 0, /*tp_del*/
  135304. 0, /*tp_version_tag*/
  135305. #if PY_VERSION_HEX >= 0x030400a1
  135306. 0, /*tp_finalize*/
  135307. #endif
  135308. #if PY_VERSION_HEX >= 0x030800b1
  135309. 0, /*tp_vectorcall*/
  135310. #endif
  135311. };
  135312. static struct __pyx_vtabstruct_6uvloop_4loop_UnixServer __pyx_vtable_6uvloop_4loop_UnixServer;
  135313. static PyObject *__pyx_tp_new_6uvloop_4loop_UnixServer(PyTypeObject *t, PyObject *a, PyObject *k) {
  135314. struct __pyx_obj_6uvloop_4loop_UnixServer *p;
  135315. PyObject *o = __pyx_tp_new_6uvloop_4loop_UVStreamServer(t, a, k);
  135316. if (unlikely(!o)) return 0;
  135317. p = ((struct __pyx_obj_6uvloop_4loop_UnixServer *)o);
  135318. p->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6uvloop_4loop_UVHandle*)__pyx_vtabptr_6uvloop_4loop_UnixServer;
  135319. return o;
  135320. }
  135321. static PyMethodDef __pyx_methods_6uvloop_4loop_UnixServer[] = {
  135322. {"__reduce_cython__", (PyCFunction)__pyx_pw_6uvloop_4loop_10UnixServer_1__reduce_cython__, METH_NOARGS, __pyx_doc_6uvloop_4loop_10UnixServer___reduce_cython__},
  135323. {"__setstate_cython__", (PyCFunction)__pyx_pw_6uvloop_4loop_10UnixServer_3__setstate_cython__, METH_O, __pyx_doc_6uvloop_4loop_10UnixServer_2__setstate_cython__},
  135324. {0, 0, 0, 0}
  135325. };
  135326. static PyTypeObject __pyx_type_6uvloop_4loop_UnixServer = {
  135327. PyVarObject_HEAD_INIT(0, 0)
  135328. "uvloop.loop.UnixServer", /*tp_name*/
  135329. sizeof(struct __pyx_obj_6uvloop_4loop_UnixServer), /*tp_basicsize*/
  135330. 0, /*tp_itemsize*/
  135331. __pyx_tp_dealloc_6uvloop_4loop_UVStreamServer, /*tp_dealloc*/
  135332. 0, /*tp_print*/
  135333. 0, /*tp_getattr*/
  135334. 0, /*tp_setattr*/
  135335. #if PY_MAJOR_VERSION < 3
  135336. 0, /*tp_compare*/
  135337. #endif
  135338. #if PY_MAJOR_VERSION >= 3
  135339. 0, /*tp_as_async*/
  135340. #endif
  135341. #if CYTHON_COMPILING_IN_PYPY
  135342. __pyx_pw_6uvloop_4loop_8UVHandle_7__repr__, /*tp_repr*/
  135343. #else
  135344. 0, /*tp_repr*/
  135345. #endif
  135346. 0, /*tp_as_number*/
  135347. 0, /*tp_as_sequence*/
  135348. 0, /*tp_as_mapping*/
  135349. 0, /*tp_hash*/
  135350. 0, /*tp_call*/
  135351. 0, /*tp_str*/
  135352. 0, /*tp_getattro*/
  135353. 0, /*tp_setattro*/
  135354. 0, /*tp_as_buffer*/
  135355. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  135356. 0, /*tp_doc*/
  135357. __pyx_tp_traverse_6uvloop_4loop_UVStreamServer, /*tp_traverse*/
  135358. 0, /*tp_clear*/
  135359. 0, /*tp_richcompare*/
  135360. 0, /*tp_weaklistoffset*/
  135361. 0, /*tp_iter*/
  135362. 0, /*tp_iternext*/
  135363. __pyx_methods_6uvloop_4loop_UnixServer, /*tp_methods*/
  135364. 0, /*tp_members*/
  135365. 0, /*tp_getset*/
  135366. 0, /*tp_base*/
  135367. 0, /*tp_dict*/
  135368. 0, /*tp_descr_get*/
  135369. 0, /*tp_descr_set*/
  135370. 0, /*tp_dictoffset*/
  135371. #if CYTHON_COMPILING_IN_PYPY
  135372. __pyx_pw_6uvloop_4loop_8UVHandle_3__init__, /*tp_init*/
  135373. #else
  135374. 0, /*tp_init*/
  135375. #endif
  135376. 0, /*tp_alloc*/
  135377. __pyx_tp_new_6uvloop_4loop_UnixServer, /*tp_new*/
  135378. 0, /*tp_free*/
  135379. 0, /*tp_is_gc*/
  135380. 0, /*tp_bases*/
  135381. 0, /*tp_mro*/
  135382. 0, /*tp_cache*/
  135383. 0, /*tp_subclasses*/
  135384. 0, /*tp_weaklist*/
  135385. 0, /*tp_del*/
  135386. 0, /*tp_version_tag*/
  135387. #if PY_VERSION_HEX >= 0x030400a1
  135388. 0, /*tp_finalize*/
  135389. #endif
  135390. #if PY_VERSION_HEX >= 0x030800b1
  135391. 0, /*tp_vectorcall*/
  135392. #endif
  135393. };
  135394. static struct __pyx_vtabstruct_6uvloop_4loop_UnixTransport __pyx_vtable_6uvloop_4loop_UnixTransport;
  135395. static PyObject *__pyx_tp_new_6uvloop_4loop_UnixTransport(PyTypeObject *t, PyObject *a, PyObject *k) {
  135396. struct __pyx_obj_6uvloop_4loop_UnixTransport *p;
  135397. PyObject *o = __pyx_tp_new_6uvloop_4loop_UVStream(t, a, k);
  135398. if (unlikely(!o)) return 0;
  135399. p = ((struct __pyx_obj_6uvloop_4loop_UnixTransport *)o);
  135400. p->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6uvloop_4loop_UVHandle*)__pyx_vtabptr_6uvloop_4loop_UnixTransport;
  135401. return o;
  135402. }
  135403. static PyMethodDef __pyx_methods_6uvloop_4loop_UnixTransport[] = {
  135404. {"__reduce_cython__", (PyCFunction)__pyx_pw_6uvloop_4loop_13UnixTransport_1__reduce_cython__, METH_NOARGS, __pyx_doc_6uvloop_4loop_13UnixTransport___reduce_cython__},
  135405. {"__setstate_cython__", (PyCFunction)__pyx_pw_6uvloop_4loop_13UnixTransport_3__setstate_cython__, METH_O, __pyx_doc_6uvloop_4loop_13UnixTransport_2__setstate_cython__},
  135406. {0, 0, 0, 0}
  135407. };
  135408. static PyTypeObject __pyx_type_6uvloop_4loop_UnixTransport = {
  135409. PyVarObject_HEAD_INIT(0, 0)
  135410. "uvloop.loop.UnixTransport", /*tp_name*/
  135411. sizeof(struct __pyx_obj_6uvloop_4loop_UnixTransport), /*tp_basicsize*/
  135412. 0, /*tp_itemsize*/
  135413. __pyx_tp_dealloc_6uvloop_4loop_UVStream, /*tp_dealloc*/
  135414. 0, /*tp_print*/
  135415. 0, /*tp_getattr*/
  135416. 0, /*tp_setattr*/
  135417. #if PY_MAJOR_VERSION < 3
  135418. 0, /*tp_compare*/
  135419. #endif
  135420. #if PY_MAJOR_VERSION >= 3
  135421. 0, /*tp_as_async*/
  135422. #endif
  135423. #if CYTHON_COMPILING_IN_PYPY
  135424. __pyx_pw_6uvloop_4loop_8UVStream_3__repr__, /*tp_repr*/
  135425. #else
  135426. 0, /*tp_repr*/
  135427. #endif
  135428. 0, /*tp_as_number*/
  135429. 0, /*tp_as_sequence*/
  135430. 0, /*tp_as_mapping*/
  135431. 0, /*tp_hash*/
  135432. 0, /*tp_call*/
  135433. 0, /*tp_str*/
  135434. 0, /*tp_getattro*/
  135435. 0, /*tp_setattro*/
  135436. 0, /*tp_as_buffer*/
  135437. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  135438. 0, /*tp_doc*/
  135439. __pyx_tp_traverse_6uvloop_4loop_UVStream, /*tp_traverse*/
  135440. 0, /*tp_clear*/
  135441. 0, /*tp_richcompare*/
  135442. 0, /*tp_weaklistoffset*/
  135443. 0, /*tp_iter*/
  135444. 0, /*tp_iternext*/
  135445. __pyx_methods_6uvloop_4loop_UnixTransport, /*tp_methods*/
  135446. 0, /*tp_members*/
  135447. 0, /*tp_getset*/
  135448. 0, /*tp_base*/
  135449. 0, /*tp_dict*/
  135450. 0, /*tp_descr_get*/
  135451. 0, /*tp_descr_set*/
  135452. 0, /*tp_dictoffset*/
  135453. #if CYTHON_COMPILING_IN_PYPY
  135454. __pyx_pw_6uvloop_4loop_8UVHandle_3__init__, /*tp_init*/
  135455. #else
  135456. 0, /*tp_init*/
  135457. #endif
  135458. 0, /*tp_alloc*/
  135459. __pyx_tp_new_6uvloop_4loop_UnixTransport, /*tp_new*/
  135460. 0, /*tp_free*/
  135461. 0, /*tp_is_gc*/
  135462. 0, /*tp_bases*/
  135463. 0, /*tp_mro*/
  135464. 0, /*tp_cache*/
  135465. 0, /*tp_subclasses*/
  135466. 0, /*tp_weaklist*/
  135467. 0, /*tp_del*/
  135468. 0, /*tp_version_tag*/
  135469. #if PY_VERSION_HEX >= 0x030400a1
  135470. 0, /*tp_finalize*/
  135471. #endif
  135472. #if PY_VERSION_HEX >= 0x030800b1
  135473. 0, /*tp_vectorcall*/
  135474. #endif
  135475. };
  135476. static struct __pyx_vtabstruct_6uvloop_4loop_ReadUnixTransport __pyx_vtable_6uvloop_4loop_ReadUnixTransport;
  135477. static PyObject *__pyx_tp_new_6uvloop_4loop_ReadUnixTransport(PyTypeObject *t, PyObject *a, PyObject *k) {
  135478. struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *p;
  135479. PyObject *o = __pyx_tp_new_6uvloop_4loop_UVStream(t, a, k);
  135480. if (unlikely(!o)) return 0;
  135481. p = ((struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *)o);
  135482. p->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6uvloop_4loop_UVHandle*)__pyx_vtabptr_6uvloop_4loop_ReadUnixTransport;
  135483. return o;
  135484. }
  135485. static PyMethodDef __pyx_methods_6uvloop_4loop_ReadUnixTransport[] = {
  135486. {"get_write_buffer_limits", (PyCFunction)__pyx_pw_6uvloop_4loop_17ReadUnixTransport_1get_write_buffer_limits, METH_NOARGS, __pyx_doc_6uvloop_4loop_17ReadUnixTransport_get_write_buffer_limits},
  135487. {"set_write_buffer_limits", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6uvloop_4loop_17ReadUnixTransport_3set_write_buffer_limits, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_17ReadUnixTransport_2set_write_buffer_limits},
  135488. {"get_write_buffer_size", (PyCFunction)__pyx_pw_6uvloop_4loop_17ReadUnixTransport_5get_write_buffer_size, METH_NOARGS, __pyx_doc_6uvloop_4loop_17ReadUnixTransport_4get_write_buffer_size},
  135489. {"write", (PyCFunction)__pyx_pw_6uvloop_4loop_17ReadUnixTransport_7write, METH_O, __pyx_doc_6uvloop_4loop_17ReadUnixTransport_6write},
  135490. {"writelines", (PyCFunction)__pyx_pw_6uvloop_4loop_17ReadUnixTransport_9writelines, METH_O, __pyx_doc_6uvloop_4loop_17ReadUnixTransport_8writelines},
  135491. {"write_eof", (PyCFunction)__pyx_pw_6uvloop_4loop_17ReadUnixTransport_11write_eof, METH_NOARGS, __pyx_doc_6uvloop_4loop_17ReadUnixTransport_10write_eof},
  135492. {"can_write_eof", (PyCFunction)__pyx_pw_6uvloop_4loop_17ReadUnixTransport_13can_write_eof, METH_NOARGS, __pyx_doc_6uvloop_4loop_17ReadUnixTransport_12can_write_eof},
  135493. {"abort", (PyCFunction)__pyx_pw_6uvloop_4loop_17ReadUnixTransport_15abort, METH_NOARGS, __pyx_doc_6uvloop_4loop_17ReadUnixTransport_14abort},
  135494. {"__reduce_cython__", (PyCFunction)__pyx_pw_6uvloop_4loop_17ReadUnixTransport_17__reduce_cython__, METH_NOARGS, __pyx_doc_6uvloop_4loop_17ReadUnixTransport_16__reduce_cython__},
  135495. {"__setstate_cython__", (PyCFunction)__pyx_pw_6uvloop_4loop_17ReadUnixTransport_19__setstate_cython__, METH_O, __pyx_doc_6uvloop_4loop_17ReadUnixTransport_18__setstate_cython__},
  135496. {0, 0, 0, 0}
  135497. };
  135498. static PyTypeObject __pyx_type_6uvloop_4loop_ReadUnixTransport = {
  135499. PyVarObject_HEAD_INIT(0, 0)
  135500. "uvloop.loop.ReadUnixTransport", /*tp_name*/
  135501. sizeof(struct __pyx_obj_6uvloop_4loop_ReadUnixTransport), /*tp_basicsize*/
  135502. 0, /*tp_itemsize*/
  135503. __pyx_tp_dealloc_6uvloop_4loop_UVStream, /*tp_dealloc*/
  135504. 0, /*tp_print*/
  135505. 0, /*tp_getattr*/
  135506. 0, /*tp_setattr*/
  135507. #if PY_MAJOR_VERSION < 3
  135508. 0, /*tp_compare*/
  135509. #endif
  135510. #if PY_MAJOR_VERSION >= 3
  135511. 0, /*tp_as_async*/
  135512. #endif
  135513. #if CYTHON_COMPILING_IN_PYPY
  135514. __pyx_pw_6uvloop_4loop_8UVStream_3__repr__, /*tp_repr*/
  135515. #else
  135516. 0, /*tp_repr*/
  135517. #endif
  135518. 0, /*tp_as_number*/
  135519. 0, /*tp_as_sequence*/
  135520. 0, /*tp_as_mapping*/
  135521. 0, /*tp_hash*/
  135522. 0, /*tp_call*/
  135523. 0, /*tp_str*/
  135524. 0, /*tp_getattro*/
  135525. 0, /*tp_setattro*/
  135526. 0, /*tp_as_buffer*/
  135527. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  135528. 0, /*tp_doc*/
  135529. __pyx_tp_traverse_6uvloop_4loop_UVStream, /*tp_traverse*/
  135530. 0, /*tp_clear*/
  135531. 0, /*tp_richcompare*/
  135532. 0, /*tp_weaklistoffset*/
  135533. 0, /*tp_iter*/
  135534. 0, /*tp_iternext*/
  135535. __pyx_methods_6uvloop_4loop_ReadUnixTransport, /*tp_methods*/
  135536. 0, /*tp_members*/
  135537. 0, /*tp_getset*/
  135538. 0, /*tp_base*/
  135539. 0, /*tp_dict*/
  135540. 0, /*tp_descr_get*/
  135541. 0, /*tp_descr_set*/
  135542. 0, /*tp_dictoffset*/
  135543. #if CYTHON_COMPILING_IN_PYPY
  135544. __pyx_pw_6uvloop_4loop_8UVHandle_3__init__, /*tp_init*/
  135545. #else
  135546. 0, /*tp_init*/
  135547. #endif
  135548. 0, /*tp_alloc*/
  135549. __pyx_tp_new_6uvloop_4loop_ReadUnixTransport, /*tp_new*/
  135550. 0, /*tp_free*/
  135551. 0, /*tp_is_gc*/
  135552. 0, /*tp_bases*/
  135553. 0, /*tp_mro*/
  135554. 0, /*tp_cache*/
  135555. 0, /*tp_subclasses*/
  135556. 0, /*tp_weaklist*/
  135557. 0, /*tp_del*/
  135558. 0, /*tp_version_tag*/
  135559. #if PY_VERSION_HEX >= 0x030400a1
  135560. 0, /*tp_finalize*/
  135561. #endif
  135562. #if PY_VERSION_HEX >= 0x030800b1
  135563. 0, /*tp_vectorcall*/
  135564. #endif
  135565. };
  135566. static struct __pyx_vtabstruct_6uvloop_4loop_WriteUnixTransport __pyx_vtable_6uvloop_4loop_WriteUnixTransport;
  135567. static PyObject *__pyx_tp_new_6uvloop_4loop_WriteUnixTransport(PyTypeObject *t, PyObject *a, PyObject *k) {
  135568. struct __pyx_obj_6uvloop_4loop_WriteUnixTransport *p;
  135569. PyObject *o = __pyx_tp_new_6uvloop_4loop_UVStream(t, a, k);
  135570. if (unlikely(!o)) return 0;
  135571. p = ((struct __pyx_obj_6uvloop_4loop_WriteUnixTransport *)o);
  135572. p->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6uvloop_4loop_UVHandle*)__pyx_vtabptr_6uvloop_4loop_WriteUnixTransport;
  135573. if (unlikely(__pyx_pw_6uvloop_4loop_18WriteUnixTransport_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad;
  135574. return o;
  135575. bad:
  135576. Py_DECREF(o); o = 0;
  135577. return NULL;
  135578. }
  135579. static PyMethodDef __pyx_methods_6uvloop_4loop_WriteUnixTransport[] = {
  135580. {"pause_reading", (PyCFunction)__pyx_pw_6uvloop_4loop_18WriteUnixTransport_3pause_reading, METH_NOARGS, __pyx_doc_6uvloop_4loop_18WriteUnixTransport_2pause_reading},
  135581. {"resume_reading", (PyCFunction)__pyx_pw_6uvloop_4loop_18WriteUnixTransport_5resume_reading, METH_NOARGS, __pyx_doc_6uvloop_4loop_18WriteUnixTransport_4resume_reading},
  135582. {"__reduce_cython__", (PyCFunction)__pyx_pw_6uvloop_4loop_18WriteUnixTransport_7__reduce_cython__, METH_NOARGS, __pyx_doc_6uvloop_4loop_18WriteUnixTransport_6__reduce_cython__},
  135583. {"__setstate_cython__", (PyCFunction)__pyx_pw_6uvloop_4loop_18WriteUnixTransport_9__setstate_cython__, METH_O, __pyx_doc_6uvloop_4loop_18WriteUnixTransport_8__setstate_cython__},
  135584. {0, 0, 0, 0}
  135585. };
  135586. static PyTypeObject __pyx_type_6uvloop_4loop_WriteUnixTransport = {
  135587. PyVarObject_HEAD_INIT(0, 0)
  135588. "uvloop.loop.WriteUnixTransport", /*tp_name*/
  135589. sizeof(struct __pyx_obj_6uvloop_4loop_WriteUnixTransport), /*tp_basicsize*/
  135590. 0, /*tp_itemsize*/
  135591. __pyx_tp_dealloc_6uvloop_4loop_UVStream, /*tp_dealloc*/
  135592. 0, /*tp_print*/
  135593. 0, /*tp_getattr*/
  135594. 0, /*tp_setattr*/
  135595. #if PY_MAJOR_VERSION < 3
  135596. 0, /*tp_compare*/
  135597. #endif
  135598. #if PY_MAJOR_VERSION >= 3
  135599. 0, /*tp_as_async*/
  135600. #endif
  135601. #if CYTHON_COMPILING_IN_PYPY
  135602. __pyx_pw_6uvloop_4loop_8UVStream_3__repr__, /*tp_repr*/
  135603. #else
  135604. 0, /*tp_repr*/
  135605. #endif
  135606. 0, /*tp_as_number*/
  135607. 0, /*tp_as_sequence*/
  135608. 0, /*tp_as_mapping*/
  135609. 0, /*tp_hash*/
  135610. 0, /*tp_call*/
  135611. 0, /*tp_str*/
  135612. 0, /*tp_getattro*/
  135613. 0, /*tp_setattro*/
  135614. 0, /*tp_as_buffer*/
  135615. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  135616. 0, /*tp_doc*/
  135617. __pyx_tp_traverse_6uvloop_4loop_UVStream, /*tp_traverse*/
  135618. 0, /*tp_clear*/
  135619. 0, /*tp_richcompare*/
  135620. 0, /*tp_weaklistoffset*/
  135621. 0, /*tp_iter*/
  135622. 0, /*tp_iternext*/
  135623. __pyx_methods_6uvloop_4loop_WriteUnixTransport, /*tp_methods*/
  135624. 0, /*tp_members*/
  135625. 0, /*tp_getset*/
  135626. 0, /*tp_base*/
  135627. 0, /*tp_dict*/
  135628. 0, /*tp_descr_get*/
  135629. 0, /*tp_descr_set*/
  135630. 0, /*tp_dictoffset*/
  135631. #if CYTHON_COMPILING_IN_PYPY
  135632. __pyx_pw_6uvloop_4loop_8UVHandle_3__init__, /*tp_init*/
  135633. #else
  135634. 0, /*tp_init*/
  135635. #endif
  135636. 0, /*tp_alloc*/
  135637. __pyx_tp_new_6uvloop_4loop_WriteUnixTransport, /*tp_new*/
  135638. 0, /*tp_free*/
  135639. 0, /*tp_is_gc*/
  135640. 0, /*tp_bases*/
  135641. 0, /*tp_mro*/
  135642. 0, /*tp_cache*/
  135643. 0, /*tp_subclasses*/
  135644. 0, /*tp_weaklist*/
  135645. 0, /*tp_del*/
  135646. 0, /*tp_version_tag*/
  135647. #if PY_VERSION_HEX >= 0x030400a1
  135648. 0, /*tp_finalize*/
  135649. #endif
  135650. #if PY_VERSION_HEX >= 0x030800b1
  135651. 0, /*tp_vectorcall*/
  135652. #endif
  135653. };
  135654. static struct __pyx_vtabstruct_6uvloop_4loop_UVProcess __pyx_vtable_6uvloop_4loop_UVProcess;
  135655. static PyObject *__pyx_tp_new_6uvloop_4loop_UVProcess(PyTypeObject *t, PyObject *a, PyObject *k) {
  135656. struct __pyx_obj_6uvloop_4loop_UVProcess *p;
  135657. PyObject *o = __pyx_tp_new_6uvloop_4loop_UVHandle(t, a, k);
  135658. if (unlikely(!o)) return 0;
  135659. p = ((struct __pyx_obj_6uvloop_4loop_UVProcess *)o);
  135660. p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6uvloop_4loop_UVHandle*)__pyx_vtabptr_6uvloop_4loop_UVProcess;
  135661. p->_returncode = Py_None; Py_INCREF(Py_None);
  135662. p->_pid = Py_None; Py_INCREF(Py_None);
  135663. p->_errpipe_read = Py_None; Py_INCREF(Py_None);
  135664. p->_errpipe_write = Py_None; Py_INCREF(Py_None);
  135665. p->_preexec_fn = Py_None; Py_INCREF(Py_None);
  135666. p->_fds_to_close = ((PyObject*)Py_None); Py_INCREF(Py_None);
  135667. p->__pyx___env = ((PyObject*)Py_None); Py_INCREF(Py_None);
  135668. p->__pyx___args = ((PyObject*)Py_None); Py_INCREF(Py_None);
  135669. p->__pyx___cwd = ((PyObject*)Py_None); Py_INCREF(Py_None);
  135670. if (unlikely(__pyx_pw_6uvloop_4loop_9UVProcess_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad;
  135671. return o;
  135672. bad:
  135673. Py_DECREF(o); o = 0;
  135674. return NULL;
  135675. }
  135676. static void __pyx_tp_dealloc_6uvloop_4loop_UVProcess(PyObject *o) {
  135677. struct __pyx_obj_6uvloop_4loop_UVProcess *p = (struct __pyx_obj_6uvloop_4loop_UVProcess *)o;
  135678. #if CYTHON_USE_TP_FINALIZE
  135679. if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
  135680. if (PyObject_CallFinalizerFromDealloc(o)) return;
  135681. }
  135682. #endif
  135683. PyObject_GC_UnTrack(o);
  135684. {
  135685. PyObject *etype, *eval, *etb;
  135686. PyErr_Fetch(&etype, &eval, &etb);
  135687. ++Py_REFCNT(o);
  135688. __pyx_pw_6uvloop_4loop_9UVProcess_3__dealloc__(o);
  135689. --Py_REFCNT(o);
  135690. PyErr_Restore(etype, eval, etb);
  135691. }
  135692. Py_CLEAR(p->_returncode);
  135693. Py_CLEAR(p->_pid);
  135694. Py_CLEAR(p->_errpipe_read);
  135695. Py_CLEAR(p->_errpipe_write);
  135696. Py_CLEAR(p->_preexec_fn);
  135697. Py_CLEAR(p->_fds_to_close);
  135698. Py_CLEAR(p->__pyx___env);
  135699. Py_CLEAR(p->__pyx___args);
  135700. Py_CLEAR(p->__pyx___cwd);
  135701. PyObject_GC_Track(o);
  135702. __pyx_tp_dealloc_6uvloop_4loop_UVHandle(o);
  135703. }
  135704. static int __pyx_tp_traverse_6uvloop_4loop_UVProcess(PyObject *o, visitproc v, void *a) {
  135705. int e;
  135706. struct __pyx_obj_6uvloop_4loop_UVProcess *p = (struct __pyx_obj_6uvloop_4loop_UVProcess *)o;
  135707. e = __pyx_tp_traverse_6uvloop_4loop_UVHandle(o, v, a); if (e) return e;
  135708. if (p->_returncode) {
  135709. e = (*v)(p->_returncode, a); if (e) return e;
  135710. }
  135711. if (p->_pid) {
  135712. e = (*v)(p->_pid, a); if (e) return e;
  135713. }
  135714. if (p->_errpipe_read) {
  135715. e = (*v)(p->_errpipe_read, a); if (e) return e;
  135716. }
  135717. if (p->_errpipe_write) {
  135718. e = (*v)(p->_errpipe_write, a); if (e) return e;
  135719. }
  135720. if (p->_preexec_fn) {
  135721. e = (*v)(p->_preexec_fn, a); if (e) return e;
  135722. }
  135723. if (p->_fds_to_close) {
  135724. e = (*v)(p->_fds_to_close, a); if (e) return e;
  135725. }
  135726. if (p->__pyx___env) {
  135727. e = (*v)(p->__pyx___env, a); if (e) return e;
  135728. }
  135729. if (p->__pyx___args) {
  135730. e = (*v)(p->__pyx___args, a); if (e) return e;
  135731. }
  135732. return 0;
  135733. }
  135734. static PyMethodDef __pyx_methods_6uvloop_4loop_UVProcess[] = {
  135735. {"__reduce_cython__", (PyCFunction)__pyx_pw_6uvloop_4loop_9UVProcess_5__reduce_cython__, METH_NOARGS, __pyx_doc_6uvloop_4loop_9UVProcess_4__reduce_cython__},
  135736. {"__setstate_cython__", (PyCFunction)__pyx_pw_6uvloop_4loop_9UVProcess_7__setstate_cython__, METH_O, __pyx_doc_6uvloop_4loop_9UVProcess_6__setstate_cython__},
  135737. {0, 0, 0, 0}
  135738. };
  135739. static PyTypeObject __pyx_type_6uvloop_4loop_UVProcess = {
  135740. PyVarObject_HEAD_INIT(0, 0)
  135741. "uvloop.loop.UVProcess", /*tp_name*/
  135742. sizeof(struct __pyx_obj_6uvloop_4loop_UVProcess), /*tp_basicsize*/
  135743. 0, /*tp_itemsize*/
  135744. __pyx_tp_dealloc_6uvloop_4loop_UVProcess, /*tp_dealloc*/
  135745. 0, /*tp_print*/
  135746. 0, /*tp_getattr*/
  135747. 0, /*tp_setattr*/
  135748. #if PY_MAJOR_VERSION < 3
  135749. 0, /*tp_compare*/
  135750. #endif
  135751. #if PY_MAJOR_VERSION >= 3
  135752. 0, /*tp_as_async*/
  135753. #endif
  135754. #if CYTHON_COMPILING_IN_PYPY
  135755. __pyx_pw_6uvloop_4loop_8UVHandle_7__repr__, /*tp_repr*/
  135756. #else
  135757. 0, /*tp_repr*/
  135758. #endif
  135759. 0, /*tp_as_number*/
  135760. 0, /*tp_as_sequence*/
  135761. 0, /*tp_as_mapping*/
  135762. 0, /*tp_hash*/
  135763. 0, /*tp_call*/
  135764. 0, /*tp_str*/
  135765. 0, /*tp_getattro*/
  135766. 0, /*tp_setattro*/
  135767. 0, /*tp_as_buffer*/
  135768. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  135769. "Abstract class; wrapper over uv_process_t handle.", /*tp_doc*/
  135770. __pyx_tp_traverse_6uvloop_4loop_UVProcess, /*tp_traverse*/
  135771. 0, /*tp_clear*/
  135772. 0, /*tp_richcompare*/
  135773. 0, /*tp_weaklistoffset*/
  135774. 0, /*tp_iter*/
  135775. 0, /*tp_iternext*/
  135776. __pyx_methods_6uvloop_4loop_UVProcess, /*tp_methods*/
  135777. 0, /*tp_members*/
  135778. 0, /*tp_getset*/
  135779. 0, /*tp_base*/
  135780. 0, /*tp_dict*/
  135781. 0, /*tp_descr_get*/
  135782. 0, /*tp_descr_set*/
  135783. 0, /*tp_dictoffset*/
  135784. #if CYTHON_COMPILING_IN_PYPY
  135785. __pyx_pw_6uvloop_4loop_8UVHandle_3__init__, /*tp_init*/
  135786. #else
  135787. 0, /*tp_init*/
  135788. #endif
  135789. 0, /*tp_alloc*/
  135790. __pyx_tp_new_6uvloop_4loop_UVProcess, /*tp_new*/
  135791. 0, /*tp_free*/
  135792. 0, /*tp_is_gc*/
  135793. 0, /*tp_bases*/
  135794. 0, /*tp_mro*/
  135795. 0, /*tp_cache*/
  135796. 0, /*tp_subclasses*/
  135797. 0, /*tp_weaklist*/
  135798. 0, /*tp_del*/
  135799. 0, /*tp_version_tag*/
  135800. #if PY_VERSION_HEX >= 0x030400a1
  135801. 0, /*tp_finalize*/
  135802. #endif
  135803. #if PY_VERSION_HEX >= 0x030800b1
  135804. 0, /*tp_vectorcall*/
  135805. #endif
  135806. };
  135807. static struct __pyx_vtabstruct_6uvloop_4loop_UVProcessTransport __pyx_vtable_6uvloop_4loop_UVProcessTransport;
  135808. static PyObject *__pyx_tp_new_6uvloop_4loop_UVProcessTransport(PyTypeObject *t, PyObject *a, PyObject *k) {
  135809. struct __pyx_obj_6uvloop_4loop_UVProcessTransport *p;
  135810. PyObject *o = __pyx_tp_new_6uvloop_4loop_UVProcess(t, a, k);
  135811. if (unlikely(!o)) return 0;
  135812. p = ((struct __pyx_obj_6uvloop_4loop_UVProcessTransport *)o);
  135813. p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6uvloop_4loop_UVHandle*)__pyx_vtabptr_6uvloop_4loop_UVProcessTransport;
  135814. p->_exit_waiters = ((PyObject*)Py_None); Py_INCREF(Py_None);
  135815. p->_init_futs = ((PyObject*)Py_None); Py_INCREF(Py_None);
  135816. p->_pending_calls = ((PyObject*)Py_None); Py_INCREF(Py_None);
  135817. p->_protocol = Py_None; Py_INCREF(Py_None);
  135818. p->_stdin = ((struct __pyx_obj_6uvloop_4loop_WriteUnixTransport *)Py_None); Py_INCREF(Py_None);
  135819. p->_stdout = ((struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *)Py_None); Py_INCREF(Py_None);
  135820. p->_stderr = ((struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *)Py_None); Py_INCREF(Py_None);
  135821. p->stdin_proto = Py_None; Py_INCREF(Py_None);
  135822. p->stdout_proto = Py_None; Py_INCREF(Py_None);
  135823. p->stderr_proto = Py_None; Py_INCREF(Py_None);
  135824. if (unlikely(__pyx_pw_6uvloop_4loop_18UVProcessTransport_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad;
  135825. return o;
  135826. bad:
  135827. Py_DECREF(o); o = 0;
  135828. return NULL;
  135829. }
  135830. static void __pyx_tp_dealloc_6uvloop_4loop_UVProcessTransport(PyObject *o) {
  135831. struct __pyx_obj_6uvloop_4loop_UVProcessTransport *p = (struct __pyx_obj_6uvloop_4loop_UVProcessTransport *)o;
  135832. #if CYTHON_USE_TP_FINALIZE
  135833. if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
  135834. if (PyObject_CallFinalizerFromDealloc(o)) return;
  135835. }
  135836. #endif
  135837. PyObject_GC_UnTrack(o);
  135838. Py_CLEAR(p->_exit_waiters);
  135839. Py_CLEAR(p->_init_futs);
  135840. Py_CLEAR(p->_pending_calls);
  135841. Py_CLEAR(p->_protocol);
  135842. Py_CLEAR(p->_stdin);
  135843. Py_CLEAR(p->_stdout);
  135844. Py_CLEAR(p->_stderr);
  135845. Py_CLEAR(p->stdin_proto);
  135846. Py_CLEAR(p->stdout_proto);
  135847. Py_CLEAR(p->stderr_proto);
  135848. PyObject_GC_Track(o);
  135849. __pyx_tp_dealloc_6uvloop_4loop_UVProcess(o);
  135850. }
  135851. static int __pyx_tp_traverse_6uvloop_4loop_UVProcessTransport(PyObject *o, visitproc v, void *a) {
  135852. int e;
  135853. struct __pyx_obj_6uvloop_4loop_UVProcessTransport *p = (struct __pyx_obj_6uvloop_4loop_UVProcessTransport *)o;
  135854. e = __pyx_tp_traverse_6uvloop_4loop_UVProcess(o, v, a); if (e) return e;
  135855. if (p->_exit_waiters) {
  135856. e = (*v)(p->_exit_waiters, a); if (e) return e;
  135857. }
  135858. if (p->_init_futs) {
  135859. e = (*v)(p->_init_futs, a); if (e) return e;
  135860. }
  135861. if (p->_pending_calls) {
  135862. e = (*v)(p->_pending_calls, a); if (e) return e;
  135863. }
  135864. if (p->_protocol) {
  135865. e = (*v)(p->_protocol, a); if (e) return e;
  135866. }
  135867. if (p->_stdin) {
  135868. e = (*v)(((PyObject *)p->_stdin), a); if (e) return e;
  135869. }
  135870. if (p->_stdout) {
  135871. e = (*v)(((PyObject *)p->_stdout), a); if (e) return e;
  135872. }
  135873. if (p->_stderr) {
  135874. e = (*v)(((PyObject *)p->_stderr), a); if (e) return e;
  135875. }
  135876. if (p->stdin_proto) {
  135877. e = (*v)(p->stdin_proto, a); if (e) return e;
  135878. }
  135879. if (p->stdout_proto) {
  135880. e = (*v)(p->stdout_proto, a); if (e) return e;
  135881. }
  135882. if (p->stderr_proto) {
  135883. e = (*v)(p->stderr_proto, a); if (e) return e;
  135884. }
  135885. return 0;
  135886. }
  135887. static PyMethodDef __pyx_methods_6uvloop_4loop_UVProcessTransport[] = {
  135888. {"__stdio_inited", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6uvloop_4loop_18UVProcessTransport_3__stdio_inited, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_18UVProcessTransport_2__stdio_inited},
  135889. {"get_protocol", (PyCFunction)__pyx_pw_6uvloop_4loop_18UVProcessTransport_5get_protocol, METH_NOARGS, __pyx_doc_6uvloop_4loop_18UVProcessTransport_4get_protocol},
  135890. {"set_protocol", (PyCFunction)__pyx_pw_6uvloop_4loop_18UVProcessTransport_7set_protocol, METH_O, __pyx_doc_6uvloop_4loop_18UVProcessTransport_6set_protocol},
  135891. {"get_pid", (PyCFunction)__pyx_pw_6uvloop_4loop_18UVProcessTransport_9get_pid, METH_NOARGS, __pyx_doc_6uvloop_4loop_18UVProcessTransport_8get_pid},
  135892. {"get_returncode", (PyCFunction)__pyx_pw_6uvloop_4loop_18UVProcessTransport_11get_returncode, METH_NOARGS, __pyx_doc_6uvloop_4loop_18UVProcessTransport_10get_returncode},
  135893. {"get_pipe_transport", (PyCFunction)__pyx_pw_6uvloop_4loop_18UVProcessTransport_13get_pipe_transport, METH_O, __pyx_doc_6uvloop_4loop_18UVProcessTransport_12get_pipe_transport},
  135894. {"terminate", (PyCFunction)__pyx_pw_6uvloop_4loop_18UVProcessTransport_15terminate, METH_NOARGS, __pyx_doc_6uvloop_4loop_18UVProcessTransport_14terminate},
  135895. {"kill", (PyCFunction)__pyx_pw_6uvloop_4loop_18UVProcessTransport_17kill, METH_NOARGS, __pyx_doc_6uvloop_4loop_18UVProcessTransport_16kill},
  135896. {"send_signal", (PyCFunction)__pyx_pw_6uvloop_4loop_18UVProcessTransport_19send_signal, METH_O, __pyx_doc_6uvloop_4loop_18UVProcessTransport_18send_signal},
  135897. {"is_closing", (PyCFunction)__pyx_pw_6uvloop_4loop_18UVProcessTransport_21is_closing, METH_NOARGS, __pyx_doc_6uvloop_4loop_18UVProcessTransport_20is_closing},
  135898. {"close", (PyCFunction)__pyx_pw_6uvloop_4loop_18UVProcessTransport_23close, METH_NOARGS, __pyx_doc_6uvloop_4loop_18UVProcessTransport_22close},
  135899. {"get_extra_info", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6uvloop_4loop_18UVProcessTransport_25get_extra_info, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_18UVProcessTransport_24get_extra_info},
  135900. {"_wait", (PyCFunction)__pyx_pw_6uvloop_4loop_18UVProcessTransport_27_wait, METH_NOARGS, __pyx_doc_6uvloop_4loop_18UVProcessTransport_26_wait},
  135901. {"__reduce_cython__", (PyCFunction)__pyx_pw_6uvloop_4loop_18UVProcessTransport_29__reduce_cython__, METH_NOARGS, __pyx_doc_6uvloop_4loop_18UVProcessTransport_28__reduce_cython__},
  135902. {"__setstate_cython__", (PyCFunction)__pyx_pw_6uvloop_4loop_18UVProcessTransport_31__setstate_cython__, METH_O, __pyx_doc_6uvloop_4loop_18UVProcessTransport_30__setstate_cython__},
  135903. {0, 0, 0, 0}
  135904. };
  135905. static PyTypeObject __pyx_type_6uvloop_4loop_UVProcessTransport = {
  135906. PyVarObject_HEAD_INIT(0, 0)
  135907. "uvloop.loop.UVProcessTransport", /*tp_name*/
  135908. sizeof(struct __pyx_obj_6uvloop_4loop_UVProcessTransport), /*tp_basicsize*/
  135909. 0, /*tp_itemsize*/
  135910. __pyx_tp_dealloc_6uvloop_4loop_UVProcessTransport, /*tp_dealloc*/
  135911. 0, /*tp_print*/
  135912. 0, /*tp_getattr*/
  135913. 0, /*tp_setattr*/
  135914. #if PY_MAJOR_VERSION < 3
  135915. 0, /*tp_compare*/
  135916. #endif
  135917. #if PY_MAJOR_VERSION >= 3
  135918. 0, /*tp_as_async*/
  135919. #endif
  135920. #if CYTHON_COMPILING_IN_PYPY
  135921. __pyx_pw_6uvloop_4loop_8UVHandle_7__repr__, /*tp_repr*/
  135922. #else
  135923. 0, /*tp_repr*/
  135924. #endif
  135925. 0, /*tp_as_number*/
  135926. 0, /*tp_as_sequence*/
  135927. 0, /*tp_as_mapping*/
  135928. 0, /*tp_hash*/
  135929. 0, /*tp_call*/
  135930. 0, /*tp_str*/
  135931. 0, /*tp_getattro*/
  135932. 0, /*tp_setattro*/
  135933. 0, /*tp_as_buffer*/
  135934. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  135935. 0, /*tp_doc*/
  135936. __pyx_tp_traverse_6uvloop_4loop_UVProcessTransport, /*tp_traverse*/
  135937. 0, /*tp_clear*/
  135938. 0, /*tp_richcompare*/
  135939. 0, /*tp_weaklistoffset*/
  135940. 0, /*tp_iter*/
  135941. 0, /*tp_iternext*/
  135942. __pyx_methods_6uvloop_4loop_UVProcessTransport, /*tp_methods*/
  135943. 0, /*tp_members*/
  135944. 0, /*tp_getset*/
  135945. 0, /*tp_base*/
  135946. 0, /*tp_dict*/
  135947. 0, /*tp_descr_get*/
  135948. 0, /*tp_descr_set*/
  135949. 0, /*tp_dictoffset*/
  135950. #if CYTHON_COMPILING_IN_PYPY
  135951. __pyx_pw_6uvloop_4loop_8UVHandle_3__init__, /*tp_init*/
  135952. #else
  135953. 0, /*tp_init*/
  135954. #endif
  135955. 0, /*tp_alloc*/
  135956. __pyx_tp_new_6uvloop_4loop_UVProcessTransport, /*tp_new*/
  135957. 0, /*tp_free*/
  135958. 0, /*tp_is_gc*/
  135959. 0, /*tp_bases*/
  135960. 0, /*tp_mro*/
  135961. 0, /*tp_cache*/
  135962. 0, /*tp_subclasses*/
  135963. 0, /*tp_weaklist*/
  135964. 0, /*tp_del*/
  135965. 0, /*tp_version_tag*/
  135966. #if PY_VERSION_HEX >= 0x030400a1
  135967. 0, /*tp_finalize*/
  135968. #endif
  135969. #if PY_VERSION_HEX >= 0x030800b1
  135970. 0, /*tp_vectorcall*/
  135971. #endif
  135972. };
  135973. static struct __pyx_vtabstruct_6uvloop_4loop_UVRequest __pyx_vtable_6uvloop_4loop_UVRequest;
  135974. static PyObject *__pyx_tp_new_6uvloop_4loop_UVRequest(PyTypeObject *t, PyObject *a, PyObject *k) {
  135975. struct __pyx_obj_6uvloop_4loop_UVRequest *p;
  135976. PyObject *o;
  135977. if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
  135978. o = (*t->tp_alloc)(t, 0);
  135979. } else {
  135980. o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  135981. }
  135982. if (unlikely(!o)) return 0;
  135983. p = ((struct __pyx_obj_6uvloop_4loop_UVRequest *)o);
  135984. p->__pyx_vtab = __pyx_vtabptr_6uvloop_4loop_UVRequest;
  135985. p->loop = ((struct __pyx_obj_6uvloop_4loop_Loop *)Py_None); Py_INCREF(Py_None);
  135986. if (unlikely(__pyx_pw_6uvloop_4loop_9UVRequest_1__cinit__(o, a, k) < 0)) goto bad;
  135987. return o;
  135988. bad:
  135989. Py_DECREF(o); o = 0;
  135990. return NULL;
  135991. }
  135992. static void __pyx_tp_dealloc_6uvloop_4loop_UVRequest(PyObject *o) {
  135993. struct __pyx_obj_6uvloop_4loop_UVRequest *p = (struct __pyx_obj_6uvloop_4loop_UVRequest *)o;
  135994. #if CYTHON_USE_TP_FINALIZE
  135995. if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
  135996. if (PyObject_CallFinalizerFromDealloc(o)) return;
  135997. }
  135998. #endif
  135999. PyObject_GC_UnTrack(o);
  136000. Py_CLEAR(p->loop);
  136001. (*Py_TYPE(o)->tp_free)(o);
  136002. }
  136003. static int __pyx_tp_traverse_6uvloop_4loop_UVRequest(PyObject *o, visitproc v, void *a) {
  136004. int e;
  136005. struct __pyx_obj_6uvloop_4loop_UVRequest *p = (struct __pyx_obj_6uvloop_4loop_UVRequest *)o;
  136006. if (p->loop) {
  136007. e = (*v)(((PyObject *)p->loop), a); if (e) return e;
  136008. }
  136009. return 0;
  136010. }
  136011. static int __pyx_tp_clear_6uvloop_4loop_UVRequest(PyObject *o) {
  136012. PyObject* tmp;
  136013. struct __pyx_obj_6uvloop_4loop_UVRequest *p = (struct __pyx_obj_6uvloop_4loop_UVRequest *)o;
  136014. tmp = ((PyObject*)p->loop);
  136015. p->loop = ((struct __pyx_obj_6uvloop_4loop_Loop *)Py_None); Py_INCREF(Py_None);
  136016. Py_XDECREF(tmp);
  136017. return 0;
  136018. }
  136019. static PyMethodDef __pyx_methods_6uvloop_4loop_UVRequest[] = {
  136020. {"__reduce_cython__", (PyCFunction)__pyx_pw_6uvloop_4loop_9UVRequest_3__reduce_cython__, METH_NOARGS, __pyx_doc_6uvloop_4loop_9UVRequest_2__reduce_cython__},
  136021. {"__setstate_cython__", (PyCFunction)__pyx_pw_6uvloop_4loop_9UVRequest_5__setstate_cython__, METH_O, __pyx_doc_6uvloop_4loop_9UVRequest_4__setstate_cython__},
  136022. {0, 0, 0, 0}
  136023. };
  136024. static PyTypeObject __pyx_type_6uvloop_4loop_UVRequest = {
  136025. PyVarObject_HEAD_INIT(0, 0)
  136026. "uvloop.loop.UVRequest", /*tp_name*/
  136027. sizeof(struct __pyx_obj_6uvloop_4loop_UVRequest), /*tp_basicsize*/
  136028. 0, /*tp_itemsize*/
  136029. __pyx_tp_dealloc_6uvloop_4loop_UVRequest, /*tp_dealloc*/
  136030. 0, /*tp_print*/
  136031. 0, /*tp_getattr*/
  136032. 0, /*tp_setattr*/
  136033. #if PY_MAJOR_VERSION < 3
  136034. 0, /*tp_compare*/
  136035. #endif
  136036. #if PY_MAJOR_VERSION >= 3
  136037. 0, /*tp_as_async*/
  136038. #endif
  136039. 0, /*tp_repr*/
  136040. 0, /*tp_as_number*/
  136041. 0, /*tp_as_sequence*/
  136042. 0, /*tp_as_mapping*/
  136043. 0, /*tp_hash*/
  136044. 0, /*tp_call*/
  136045. 0, /*tp_str*/
  136046. 0, /*tp_getattro*/
  136047. 0, /*tp_setattro*/
  136048. 0, /*tp_as_buffer*/
  136049. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  136050. "A base class for all libuv requests (uv_getaddrinfo_t, etc).\n\n Important: it's a responsibility of the subclass to call the\n \"on_done\" method in the request's callback.\n\n If \"on_done\" isn't called, the request object will never die.\n ", /*tp_doc*/
  136051. __pyx_tp_traverse_6uvloop_4loop_UVRequest, /*tp_traverse*/
  136052. __pyx_tp_clear_6uvloop_4loop_UVRequest, /*tp_clear*/
  136053. 0, /*tp_richcompare*/
  136054. 0, /*tp_weaklistoffset*/
  136055. 0, /*tp_iter*/
  136056. 0, /*tp_iternext*/
  136057. __pyx_methods_6uvloop_4loop_UVRequest, /*tp_methods*/
  136058. 0, /*tp_members*/
  136059. 0, /*tp_getset*/
  136060. 0, /*tp_base*/
  136061. 0, /*tp_dict*/
  136062. 0, /*tp_descr_get*/
  136063. 0, /*tp_descr_set*/
  136064. 0, /*tp_dictoffset*/
  136065. 0, /*tp_init*/
  136066. 0, /*tp_alloc*/
  136067. __pyx_tp_new_6uvloop_4loop_UVRequest, /*tp_new*/
  136068. 0, /*tp_free*/
  136069. 0, /*tp_is_gc*/
  136070. 0, /*tp_bases*/
  136071. 0, /*tp_mro*/
  136072. 0, /*tp_cache*/
  136073. 0, /*tp_subclasses*/
  136074. 0, /*tp_weaklist*/
  136075. 0, /*tp_del*/
  136076. 0, /*tp_version_tag*/
  136077. #if PY_VERSION_HEX >= 0x030400a1
  136078. 0, /*tp_finalize*/
  136079. #endif
  136080. #if PY_VERSION_HEX >= 0x030800b1
  136081. 0, /*tp_vectorcall*/
  136082. #endif
  136083. };
  136084. static PyObject *__pyx_tp_new_6uvloop_4loop__SSLProtocolTransport(PyTypeObject *t, PyObject *a, PyObject *k) {
  136085. struct __pyx_obj_6uvloop_4loop__SSLProtocolTransport *p;
  136086. PyObject *o;
  136087. if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
  136088. o = (*t->tp_alloc)(t, 0);
  136089. } else {
  136090. o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  136091. }
  136092. if (unlikely(!o)) return 0;
  136093. p = ((struct __pyx_obj_6uvloop_4loop__SSLProtocolTransport *)o);
  136094. p->_loop = Py_None; Py_INCREF(Py_None);
  136095. p->_ssl_protocol = ((struct __pyx_obj_6uvloop_4loop_SSLProtocol *)Py_None); Py_INCREF(Py_None);
  136096. if (unlikely(__pyx_pw_6uvloop_4loop_21_SSLProtocolTransport_1__cinit__(o, a, k) < 0)) goto bad;
  136097. return o;
  136098. bad:
  136099. Py_DECREF(o); o = 0;
  136100. return NULL;
  136101. }
  136102. static void __pyx_tp_dealloc_6uvloop_4loop__SSLProtocolTransport(PyObject *o) {
  136103. struct __pyx_obj_6uvloop_4loop__SSLProtocolTransport *p = (struct __pyx_obj_6uvloop_4loop__SSLProtocolTransport *)o;
  136104. #if CYTHON_USE_TP_FINALIZE
  136105. if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
  136106. if (PyObject_CallFinalizerFromDealloc(o)) return;
  136107. }
  136108. #endif
  136109. PyObject_GC_UnTrack(o);
  136110. {
  136111. PyObject *etype, *eval, *etb;
  136112. PyErr_Fetch(&etype, &eval, &etb);
  136113. ++Py_REFCNT(o);
  136114. __pyx_pw_6uvloop_4loop_21_SSLProtocolTransport_13__dealloc__(o);
  136115. --Py_REFCNT(o);
  136116. PyErr_Restore(etype, eval, etb);
  136117. }
  136118. Py_CLEAR(p->_loop);
  136119. Py_CLEAR(p->_ssl_protocol);
  136120. (*Py_TYPE(o)->tp_free)(o);
  136121. }
  136122. static int __pyx_tp_traverse_6uvloop_4loop__SSLProtocolTransport(PyObject *o, visitproc v, void *a) {
  136123. int e;
  136124. struct __pyx_obj_6uvloop_4loop__SSLProtocolTransport *p = (struct __pyx_obj_6uvloop_4loop__SSLProtocolTransport *)o;
  136125. if (p->_loop) {
  136126. e = (*v)(p->_loop, a); if (e) return e;
  136127. }
  136128. if (p->_ssl_protocol) {
  136129. e = (*v)(((PyObject *)p->_ssl_protocol), a); if (e) return e;
  136130. }
  136131. return 0;
  136132. }
  136133. static int __pyx_tp_clear_6uvloop_4loop__SSLProtocolTransport(PyObject *o) {
  136134. PyObject* tmp;
  136135. struct __pyx_obj_6uvloop_4loop__SSLProtocolTransport *p = (struct __pyx_obj_6uvloop_4loop__SSLProtocolTransport *)o;
  136136. tmp = ((PyObject*)p->_loop);
  136137. p->_loop = Py_None; Py_INCREF(Py_None);
  136138. Py_XDECREF(tmp);
  136139. tmp = ((PyObject*)p->_ssl_protocol);
  136140. p->_ssl_protocol = ((struct __pyx_obj_6uvloop_4loop_SSLProtocol *)Py_None); Py_INCREF(Py_None);
  136141. Py_XDECREF(tmp);
  136142. return 0;
  136143. }
  136144. static PyObject *__pyx_getprop_6uvloop_4loop_21_SSLProtocolTransport__protocol_paused(PyObject *o, CYTHON_UNUSED void *x) {
  136145. return __pyx_pw_6uvloop_4loop_21_SSLProtocolTransport_16_protocol_paused_1__get__(o);
  136146. }
  136147. static PyMethodDef __pyx_methods_6uvloop_4loop__SSLProtocolTransport[] = {
  136148. {"get_extra_info", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6uvloop_4loop_21_SSLProtocolTransport_3get_extra_info, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_21_SSLProtocolTransport_2get_extra_info},
  136149. {"set_protocol", (PyCFunction)__pyx_pw_6uvloop_4loop_21_SSLProtocolTransport_5set_protocol, METH_O, __pyx_doc_6uvloop_4loop_21_SSLProtocolTransport_4set_protocol},
  136150. {"get_protocol", (PyCFunction)__pyx_pw_6uvloop_4loop_21_SSLProtocolTransport_7get_protocol, METH_NOARGS, __pyx_doc_6uvloop_4loop_21_SSLProtocolTransport_6get_protocol},
  136151. {"is_closing", (PyCFunction)__pyx_pw_6uvloop_4loop_21_SSLProtocolTransport_9is_closing, METH_NOARGS, __pyx_doc_6uvloop_4loop_21_SSLProtocolTransport_8is_closing},
  136152. {"close", (PyCFunction)__pyx_pw_6uvloop_4loop_21_SSLProtocolTransport_11close, METH_NOARGS, __pyx_doc_6uvloop_4loop_21_SSLProtocolTransport_10close},
  136153. {"is_reading", (PyCFunction)__pyx_pw_6uvloop_4loop_21_SSLProtocolTransport_15is_reading, METH_NOARGS, __pyx_doc_6uvloop_4loop_21_SSLProtocolTransport_14is_reading},
  136154. {"pause_reading", (PyCFunction)__pyx_pw_6uvloop_4loop_21_SSLProtocolTransport_17pause_reading, METH_NOARGS, __pyx_doc_6uvloop_4loop_21_SSLProtocolTransport_16pause_reading},
  136155. {"resume_reading", (PyCFunction)__pyx_pw_6uvloop_4loop_21_SSLProtocolTransport_19resume_reading, METH_NOARGS, __pyx_doc_6uvloop_4loop_21_SSLProtocolTransport_18resume_reading},
  136156. {"set_write_buffer_limits", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6uvloop_4loop_21_SSLProtocolTransport_21set_write_buffer_limits, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_21_SSLProtocolTransport_20set_write_buffer_limits},
  136157. {"get_write_buffer_limits", (PyCFunction)__pyx_pw_6uvloop_4loop_21_SSLProtocolTransport_23get_write_buffer_limits, METH_NOARGS, __pyx_doc_6uvloop_4loop_21_SSLProtocolTransport_22get_write_buffer_limits},
  136158. {"get_write_buffer_size", (PyCFunction)__pyx_pw_6uvloop_4loop_21_SSLProtocolTransport_25get_write_buffer_size, METH_NOARGS, __pyx_doc_6uvloop_4loop_21_SSLProtocolTransport_24get_write_buffer_size},
  136159. {"set_read_buffer_limits", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6uvloop_4loop_21_SSLProtocolTransport_27set_read_buffer_limits, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_21_SSLProtocolTransport_26set_read_buffer_limits},
  136160. {"get_read_buffer_limits", (PyCFunction)__pyx_pw_6uvloop_4loop_21_SSLProtocolTransport_29get_read_buffer_limits, METH_NOARGS, __pyx_doc_6uvloop_4loop_21_SSLProtocolTransport_28get_read_buffer_limits},
  136161. {"get_read_buffer_size", (PyCFunction)__pyx_pw_6uvloop_4loop_21_SSLProtocolTransport_31get_read_buffer_size, METH_NOARGS, __pyx_doc_6uvloop_4loop_21_SSLProtocolTransport_30get_read_buffer_size},
  136162. {"write", (PyCFunction)__pyx_pw_6uvloop_4loop_21_SSLProtocolTransport_33write, METH_O, __pyx_doc_6uvloop_4loop_21_SSLProtocolTransport_32write},
  136163. {"writelines", (PyCFunction)__pyx_pw_6uvloop_4loop_21_SSLProtocolTransport_35writelines, METH_O, __pyx_doc_6uvloop_4loop_21_SSLProtocolTransport_34writelines},
  136164. {"write_eof", (PyCFunction)__pyx_pw_6uvloop_4loop_21_SSLProtocolTransport_37write_eof, METH_NOARGS, __pyx_doc_6uvloop_4loop_21_SSLProtocolTransport_36write_eof},
  136165. {"can_write_eof", (PyCFunction)__pyx_pw_6uvloop_4loop_21_SSLProtocolTransport_39can_write_eof, METH_NOARGS, __pyx_doc_6uvloop_4loop_21_SSLProtocolTransport_38can_write_eof},
  136166. {"abort", (PyCFunction)__pyx_pw_6uvloop_4loop_21_SSLProtocolTransport_41abort, METH_NOARGS, __pyx_doc_6uvloop_4loop_21_SSLProtocolTransport_40abort},
  136167. {"_force_close", (PyCFunction)__pyx_pw_6uvloop_4loop_21_SSLProtocolTransport_43_force_close, METH_O, __pyx_doc_6uvloop_4loop_21_SSLProtocolTransport_42_force_close},
  136168. {"_test__append_write_backlog", (PyCFunction)__pyx_pw_6uvloop_4loop_21_SSLProtocolTransport_45_test__append_write_backlog, METH_O, __pyx_doc_6uvloop_4loop_21_SSLProtocolTransport_44_test__append_write_backlog},
  136169. {"__reduce_cython__", (PyCFunction)__pyx_pw_6uvloop_4loop_21_SSLProtocolTransport_47__reduce_cython__, METH_NOARGS, __pyx_doc_6uvloop_4loop_21_SSLProtocolTransport_46__reduce_cython__},
  136170. {"__setstate_cython__", (PyCFunction)__pyx_pw_6uvloop_4loop_21_SSLProtocolTransport_49__setstate_cython__, METH_O, __pyx_doc_6uvloop_4loop_21_SSLProtocolTransport_48__setstate_cython__},
  136171. {0, 0, 0, 0}
  136172. };
  136173. static struct PyGetSetDef __pyx_getsets_6uvloop_4loop__SSLProtocolTransport[] = {
  136174. {(char *)"_protocol_paused", __pyx_getprop_6uvloop_4loop_21_SSLProtocolTransport__protocol_paused, 0, (char *)0, 0},
  136175. {0, 0, 0, 0, 0}
  136176. };
  136177. static PyTypeObject __pyx_type_6uvloop_4loop__SSLProtocolTransport = {
  136178. PyVarObject_HEAD_INIT(0, 0)
  136179. "uvloop.loop._SSLProtocolTransport", /*tp_name*/
  136180. sizeof(struct __pyx_obj_6uvloop_4loop__SSLProtocolTransport), /*tp_basicsize*/
  136181. 0, /*tp_itemsize*/
  136182. __pyx_tp_dealloc_6uvloop_4loop__SSLProtocolTransport, /*tp_dealloc*/
  136183. 0, /*tp_print*/
  136184. 0, /*tp_getattr*/
  136185. 0, /*tp_setattr*/
  136186. #if PY_MAJOR_VERSION < 3
  136187. 0, /*tp_compare*/
  136188. #endif
  136189. #if PY_MAJOR_VERSION >= 3
  136190. 0, /*tp_as_async*/
  136191. #endif
  136192. 0, /*tp_repr*/
  136193. 0, /*tp_as_number*/
  136194. 0, /*tp_as_sequence*/
  136195. 0, /*tp_as_mapping*/
  136196. 0, /*tp_hash*/
  136197. 0, /*tp_call*/
  136198. 0, /*tp_str*/
  136199. 0, /*tp_getattro*/
  136200. 0, /*tp_setattro*/
  136201. 0, /*tp_as_buffer*/
  136202. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  136203. 0, /*tp_doc*/
  136204. __pyx_tp_traverse_6uvloop_4loop__SSLProtocolTransport, /*tp_traverse*/
  136205. __pyx_tp_clear_6uvloop_4loop__SSLProtocolTransport, /*tp_clear*/
  136206. 0, /*tp_richcompare*/
  136207. 0, /*tp_weaklistoffset*/
  136208. 0, /*tp_iter*/
  136209. 0, /*tp_iternext*/
  136210. __pyx_methods_6uvloop_4loop__SSLProtocolTransport, /*tp_methods*/
  136211. 0, /*tp_members*/
  136212. __pyx_getsets_6uvloop_4loop__SSLProtocolTransport, /*tp_getset*/
  136213. 0, /*tp_base*/
  136214. 0, /*tp_dict*/
  136215. 0, /*tp_descr_get*/
  136216. 0, /*tp_descr_set*/
  136217. 0, /*tp_dictoffset*/
  136218. 0, /*tp_init*/
  136219. 0, /*tp_alloc*/
  136220. __pyx_tp_new_6uvloop_4loop__SSLProtocolTransport, /*tp_new*/
  136221. 0, /*tp_free*/
  136222. 0, /*tp_is_gc*/
  136223. 0, /*tp_bases*/
  136224. 0, /*tp_mro*/
  136225. 0, /*tp_cache*/
  136226. 0, /*tp_subclasses*/
  136227. 0, /*tp_weaklist*/
  136228. 0, /*tp_del*/
  136229. 0, /*tp_version_tag*/
  136230. #if PY_VERSION_HEX >= 0x030400a1
  136231. 0, /*tp_finalize*/
  136232. #endif
  136233. #if PY_VERSION_HEX >= 0x030800b1
  136234. 0, /*tp_vectorcall*/
  136235. #endif
  136236. };
  136237. static struct __pyx_vtabstruct_6uvloop_4loop_SSLProtocol __pyx_vtable_6uvloop_4loop_SSLProtocol;
  136238. static PyObject *__pyx_tp_new_6uvloop_4loop_SSLProtocol(PyTypeObject *t, PyObject *a, PyObject *k) {
  136239. struct __pyx_obj_6uvloop_4loop_SSLProtocol *p;
  136240. PyObject *o;
  136241. if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
  136242. o = (*t->tp_alloc)(t, 0);
  136243. } else {
  136244. o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  136245. }
  136246. if (unlikely(!o)) return 0;
  136247. p = ((struct __pyx_obj_6uvloop_4loop_SSLProtocol *)o);
  136248. p->__pyx_vtab = __pyx_vtabptr_6uvloop_4loop_SSLProtocol;
  136249. p->_server_hostname = ((PyObject*)Py_None); Py_INCREF(Py_None);
  136250. p->_sslcontext = Py_None; Py_INCREF(Py_None);
  136251. p->_extra = Py_None; Py_INCREF(Py_None);
  136252. p->_write_backlog = Py_None; Py_INCREF(Py_None);
  136253. p->_waiter = Py_None; Py_INCREF(Py_None);
  136254. p->_loop = Py_None; Py_INCREF(Py_None);
  136255. p->_app_transport = ((struct __pyx_obj_6uvloop_4loop__SSLProtocolTransport *)Py_None); Py_INCREF(Py_None);
  136256. p->_transport = Py_None; Py_INCREF(Py_None);
  136257. p->_ssl_handshake_timeout = Py_None; Py_INCREF(Py_None);
  136258. p->_ssl_shutdown_timeout = Py_None; Py_INCREF(Py_None);
  136259. p->_sslobj = Py_None; Py_INCREF(Py_None);
  136260. p->_sslobj_read = Py_None; Py_INCREF(Py_None);
  136261. p->_sslobj_write = Py_None; Py_INCREF(Py_None);
  136262. p->_incoming = Py_None; Py_INCREF(Py_None);
  136263. p->_incoming_write = Py_None; Py_INCREF(Py_None);
  136264. p->_outgoing = Py_None; Py_INCREF(Py_None);
  136265. p->_outgoing_read = Py_None; Py_INCREF(Py_None);
  136266. p->_ssl_buffer_view = Py_None; Py_INCREF(Py_None);
  136267. p->_app_protocol = Py_None; Py_INCREF(Py_None);
  136268. p->_app_protocol_get_buffer = Py_None; Py_INCREF(Py_None);
  136269. p->_app_protocol_buffer_updated = Py_None; Py_INCREF(Py_None);
  136270. p->_handshake_start_time = Py_None; Py_INCREF(Py_None);
  136271. p->_handshake_timeout_handle = Py_None; Py_INCREF(Py_None);
  136272. p->_shutdown_timeout_handle = Py_None; Py_INCREF(Py_None);
  136273. if (unlikely(__pyx_pw_6uvloop_4loop_11SSLProtocol_1__cinit__(o, a, k) < 0)) goto bad;
  136274. return o;
  136275. bad:
  136276. Py_DECREF(o); o = 0;
  136277. return NULL;
  136278. }
  136279. static void __pyx_tp_dealloc_6uvloop_4loop_SSLProtocol(PyObject *o) {
  136280. struct __pyx_obj_6uvloop_4loop_SSLProtocol *p = (struct __pyx_obj_6uvloop_4loop_SSLProtocol *)o;
  136281. #if CYTHON_USE_TP_FINALIZE
  136282. if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
  136283. if (PyObject_CallFinalizerFromDealloc(o)) return;
  136284. }
  136285. #endif
  136286. PyObject_GC_UnTrack(o);
  136287. {
  136288. PyObject *etype, *eval, *etb;
  136289. PyErr_Fetch(&etype, &eval, &etb);
  136290. ++Py_REFCNT(o);
  136291. __pyx_pw_6uvloop_4loop_11SSLProtocol_3__dealloc__(o);
  136292. --Py_REFCNT(o);
  136293. PyErr_Restore(etype, eval, etb);
  136294. }
  136295. Py_CLEAR(p->_server_hostname);
  136296. Py_CLEAR(p->_sslcontext);
  136297. Py_CLEAR(p->_extra);
  136298. Py_CLEAR(p->_write_backlog);
  136299. Py_CLEAR(p->_waiter);
  136300. Py_CLEAR(p->_loop);
  136301. Py_CLEAR(p->_app_transport);
  136302. Py_CLEAR(p->_transport);
  136303. Py_CLEAR(p->_ssl_handshake_timeout);
  136304. Py_CLEAR(p->_ssl_shutdown_timeout);
  136305. Py_CLEAR(p->_sslobj);
  136306. Py_CLEAR(p->_sslobj_read);
  136307. Py_CLEAR(p->_sslobj_write);
  136308. Py_CLEAR(p->_incoming);
  136309. Py_CLEAR(p->_incoming_write);
  136310. Py_CLEAR(p->_outgoing);
  136311. Py_CLEAR(p->_outgoing_read);
  136312. Py_CLEAR(p->_ssl_buffer_view);
  136313. Py_CLEAR(p->_app_protocol);
  136314. Py_CLEAR(p->_app_protocol_get_buffer);
  136315. Py_CLEAR(p->_app_protocol_buffer_updated);
  136316. Py_CLEAR(p->_handshake_start_time);
  136317. Py_CLEAR(p->_handshake_timeout_handle);
  136318. Py_CLEAR(p->_shutdown_timeout_handle);
  136319. (*Py_TYPE(o)->tp_free)(o);
  136320. }
  136321. static int __pyx_tp_traverse_6uvloop_4loop_SSLProtocol(PyObject *o, visitproc v, void *a) {
  136322. int e;
  136323. struct __pyx_obj_6uvloop_4loop_SSLProtocol *p = (struct __pyx_obj_6uvloop_4loop_SSLProtocol *)o;
  136324. if (p->_sslcontext) {
  136325. e = (*v)(p->_sslcontext, a); if (e) return e;
  136326. }
  136327. if (p->_extra) {
  136328. e = (*v)(p->_extra, a); if (e) return e;
  136329. }
  136330. if (p->_write_backlog) {
  136331. e = (*v)(p->_write_backlog, a); if (e) return e;
  136332. }
  136333. if (p->_waiter) {
  136334. e = (*v)(p->_waiter, a); if (e) return e;
  136335. }
  136336. if (p->_loop) {
  136337. e = (*v)(p->_loop, a); if (e) return e;
  136338. }
  136339. if (p->_app_transport) {
  136340. e = (*v)(((PyObject *)p->_app_transport), a); if (e) return e;
  136341. }
  136342. if (p->_transport) {
  136343. e = (*v)(p->_transport, a); if (e) return e;
  136344. }
  136345. if (p->_ssl_handshake_timeout) {
  136346. e = (*v)(p->_ssl_handshake_timeout, a); if (e) return e;
  136347. }
  136348. if (p->_ssl_shutdown_timeout) {
  136349. e = (*v)(p->_ssl_shutdown_timeout, a); if (e) return e;
  136350. }
  136351. if (p->_sslobj) {
  136352. e = (*v)(p->_sslobj, a); if (e) return e;
  136353. }
  136354. if (p->_sslobj_read) {
  136355. e = (*v)(p->_sslobj_read, a); if (e) return e;
  136356. }
  136357. if (p->_sslobj_write) {
  136358. e = (*v)(p->_sslobj_write, a); if (e) return e;
  136359. }
  136360. if (p->_incoming) {
  136361. e = (*v)(p->_incoming, a); if (e) return e;
  136362. }
  136363. if (p->_incoming_write) {
  136364. e = (*v)(p->_incoming_write, a); if (e) return e;
  136365. }
  136366. if (p->_outgoing) {
  136367. e = (*v)(p->_outgoing, a); if (e) return e;
  136368. }
  136369. if (p->_outgoing_read) {
  136370. e = (*v)(p->_outgoing_read, a); if (e) return e;
  136371. }
  136372. if (p->_ssl_buffer_view) {
  136373. e = (*v)(p->_ssl_buffer_view, a); if (e) return e;
  136374. }
  136375. if (p->_app_protocol) {
  136376. e = (*v)(p->_app_protocol, a); if (e) return e;
  136377. }
  136378. if (p->_app_protocol_get_buffer) {
  136379. e = (*v)(p->_app_protocol_get_buffer, a); if (e) return e;
  136380. }
  136381. if (p->_app_protocol_buffer_updated) {
  136382. e = (*v)(p->_app_protocol_buffer_updated, a); if (e) return e;
  136383. }
  136384. if (p->_handshake_start_time) {
  136385. e = (*v)(p->_handshake_start_time, a); if (e) return e;
  136386. }
  136387. if (p->_handshake_timeout_handle) {
  136388. e = (*v)(p->_handshake_timeout_handle, a); if (e) return e;
  136389. }
  136390. if (p->_shutdown_timeout_handle) {
  136391. e = (*v)(p->_shutdown_timeout_handle, a); if (e) return e;
  136392. }
  136393. return 0;
  136394. }
  136395. static int __pyx_tp_clear_6uvloop_4loop_SSLProtocol(PyObject *o) {
  136396. PyObject* tmp;
  136397. struct __pyx_obj_6uvloop_4loop_SSLProtocol *p = (struct __pyx_obj_6uvloop_4loop_SSLProtocol *)o;
  136398. tmp = ((PyObject*)p->_sslcontext);
  136399. p->_sslcontext = Py_None; Py_INCREF(Py_None);
  136400. Py_XDECREF(tmp);
  136401. tmp = ((PyObject*)p->_extra);
  136402. p->_extra = Py_None; Py_INCREF(Py_None);
  136403. Py_XDECREF(tmp);
  136404. tmp = ((PyObject*)p->_write_backlog);
  136405. p->_write_backlog = Py_None; Py_INCREF(Py_None);
  136406. Py_XDECREF(tmp);
  136407. tmp = ((PyObject*)p->_waiter);
  136408. p->_waiter = Py_None; Py_INCREF(Py_None);
  136409. Py_XDECREF(tmp);
  136410. tmp = ((PyObject*)p->_loop);
  136411. p->_loop = Py_None; Py_INCREF(Py_None);
  136412. Py_XDECREF(tmp);
  136413. tmp = ((PyObject*)p->_app_transport);
  136414. p->_app_transport = ((struct __pyx_obj_6uvloop_4loop__SSLProtocolTransport *)Py_None); Py_INCREF(Py_None);
  136415. Py_XDECREF(tmp);
  136416. tmp = ((PyObject*)p->_transport);
  136417. p->_transport = Py_None; Py_INCREF(Py_None);
  136418. Py_XDECREF(tmp);
  136419. tmp = ((PyObject*)p->_ssl_handshake_timeout);
  136420. p->_ssl_handshake_timeout = Py_None; Py_INCREF(Py_None);
  136421. Py_XDECREF(tmp);
  136422. tmp = ((PyObject*)p->_ssl_shutdown_timeout);
  136423. p->_ssl_shutdown_timeout = Py_None; Py_INCREF(Py_None);
  136424. Py_XDECREF(tmp);
  136425. tmp = ((PyObject*)p->_sslobj);
  136426. p->_sslobj = Py_None; Py_INCREF(Py_None);
  136427. Py_XDECREF(tmp);
  136428. tmp = ((PyObject*)p->_sslobj_read);
  136429. p->_sslobj_read = Py_None; Py_INCREF(Py_None);
  136430. Py_XDECREF(tmp);
  136431. tmp = ((PyObject*)p->_sslobj_write);
  136432. p->_sslobj_write = Py_None; Py_INCREF(Py_None);
  136433. Py_XDECREF(tmp);
  136434. tmp = ((PyObject*)p->_incoming);
  136435. p->_incoming = Py_None; Py_INCREF(Py_None);
  136436. Py_XDECREF(tmp);
  136437. tmp = ((PyObject*)p->_incoming_write);
  136438. p->_incoming_write = Py_None; Py_INCREF(Py_None);
  136439. Py_XDECREF(tmp);
  136440. tmp = ((PyObject*)p->_outgoing);
  136441. p->_outgoing = Py_None; Py_INCREF(Py_None);
  136442. Py_XDECREF(tmp);
  136443. tmp = ((PyObject*)p->_outgoing_read);
  136444. p->_outgoing_read = Py_None; Py_INCREF(Py_None);
  136445. Py_XDECREF(tmp);
  136446. tmp = ((PyObject*)p->_ssl_buffer_view);
  136447. p->_ssl_buffer_view = Py_None; Py_INCREF(Py_None);
  136448. Py_XDECREF(tmp);
  136449. tmp = ((PyObject*)p->_app_protocol);
  136450. p->_app_protocol = Py_None; Py_INCREF(Py_None);
  136451. Py_XDECREF(tmp);
  136452. tmp = ((PyObject*)p->_app_protocol_get_buffer);
  136453. p->_app_protocol_get_buffer = Py_None; Py_INCREF(Py_None);
  136454. Py_XDECREF(tmp);
  136455. tmp = ((PyObject*)p->_app_protocol_buffer_updated);
  136456. p->_app_protocol_buffer_updated = Py_None; Py_INCREF(Py_None);
  136457. Py_XDECREF(tmp);
  136458. tmp = ((PyObject*)p->_handshake_start_time);
  136459. p->_handshake_start_time = Py_None; Py_INCREF(Py_None);
  136460. Py_XDECREF(tmp);
  136461. tmp = ((PyObject*)p->_handshake_timeout_handle);
  136462. p->_handshake_timeout_handle = Py_None; Py_INCREF(Py_None);
  136463. Py_XDECREF(tmp);
  136464. tmp = ((PyObject*)p->_shutdown_timeout_handle);
  136465. p->_shutdown_timeout_handle = Py_None; Py_INCREF(Py_None);
  136466. Py_XDECREF(tmp);
  136467. return 0;
  136468. }
  136469. static PyMethodDef __pyx_methods_6uvloop_4loop_SSLProtocol[] = {
  136470. {"_get_app_transport", (PyCFunction)__pyx_pw_6uvloop_4loop_11SSLProtocol_7_get_app_transport, METH_NOARGS, __pyx_doc_6uvloop_4loop_11SSLProtocol_6_get_app_transport},
  136471. {"connection_made", (PyCFunction)__pyx_pw_6uvloop_4loop_11SSLProtocol_9connection_made, METH_O, __pyx_doc_6uvloop_4loop_11SSLProtocol_8connection_made},
  136472. {"connection_lost", (PyCFunction)__pyx_pw_6uvloop_4loop_11SSLProtocol_11connection_lost, METH_O, __pyx_doc_6uvloop_4loop_11SSLProtocol_10connection_lost},
  136473. {"get_buffer", (PyCFunction)__pyx_pw_6uvloop_4loop_11SSLProtocol_13get_buffer, METH_O, __pyx_doc_6uvloop_4loop_11SSLProtocol_12get_buffer},
  136474. {"buffer_updated", (PyCFunction)__pyx_pw_6uvloop_4loop_11SSLProtocol_15buffer_updated, METH_O, __pyx_doc_6uvloop_4loop_11SSLProtocol_14buffer_updated},
  136475. {"eof_received", (PyCFunction)__pyx_pw_6uvloop_4loop_11SSLProtocol_17eof_received, METH_NOARGS, __pyx_doc_6uvloop_4loop_11SSLProtocol_16eof_received},
  136476. {"pause_writing", (PyCFunction)__pyx_pw_6uvloop_4loop_11SSLProtocol_19pause_writing, METH_NOARGS, __pyx_doc_6uvloop_4loop_11SSLProtocol_18pause_writing},
  136477. {"resume_writing", (PyCFunction)__pyx_pw_6uvloop_4loop_11SSLProtocol_21resume_writing, METH_NOARGS, __pyx_doc_6uvloop_4loop_11SSLProtocol_20resume_writing},
  136478. {"__reduce_cython__", (PyCFunction)__pyx_pw_6uvloop_4loop_11SSLProtocol_23__reduce_cython__, METH_NOARGS, __pyx_doc_6uvloop_4loop_11SSLProtocol_22__reduce_cython__},
  136479. {"__setstate_cython__", (PyCFunction)__pyx_pw_6uvloop_4loop_11SSLProtocol_25__setstate_cython__, METH_O, __pyx_doc_6uvloop_4loop_11SSLProtocol_24__setstate_cython__},
  136480. {0, 0, 0, 0}
  136481. };
  136482. static PyTypeObject __pyx_type_6uvloop_4loop_SSLProtocol = {
  136483. PyVarObject_HEAD_INIT(0, 0)
  136484. "uvloop.loop.SSLProtocol", /*tp_name*/
  136485. sizeof(struct __pyx_obj_6uvloop_4loop_SSLProtocol), /*tp_basicsize*/
  136486. 0, /*tp_itemsize*/
  136487. __pyx_tp_dealloc_6uvloop_4loop_SSLProtocol, /*tp_dealloc*/
  136488. 0, /*tp_print*/
  136489. 0, /*tp_getattr*/
  136490. 0, /*tp_setattr*/
  136491. #if PY_MAJOR_VERSION < 3
  136492. 0, /*tp_compare*/
  136493. #endif
  136494. #if PY_MAJOR_VERSION >= 3
  136495. 0, /*tp_as_async*/
  136496. #endif
  136497. 0, /*tp_repr*/
  136498. 0, /*tp_as_number*/
  136499. 0, /*tp_as_sequence*/
  136500. 0, /*tp_as_mapping*/
  136501. 0, /*tp_hash*/
  136502. 0, /*tp_call*/
  136503. 0, /*tp_str*/
  136504. 0, /*tp_getattro*/
  136505. 0, /*tp_setattro*/
  136506. 0, /*tp_as_buffer*/
  136507. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  136508. "SSLProtocol(loop, app_protocol, sslcontext, waiter, server_side=False, server_hostname=None, call_connection_made=True, ssl_handshake_timeout=None, ssl_shutdown_timeout=None)\nSSL protocol.\n\n Implementation of SSL on top of a socket using incoming and outgoing\n buffers which are ssl.MemoryBIO objects.\n ", /*tp_doc*/
  136509. __pyx_tp_traverse_6uvloop_4loop_SSLProtocol, /*tp_traverse*/
  136510. __pyx_tp_clear_6uvloop_4loop_SSLProtocol, /*tp_clear*/
  136511. 0, /*tp_richcompare*/
  136512. 0, /*tp_weaklistoffset*/
  136513. 0, /*tp_iter*/
  136514. 0, /*tp_iternext*/
  136515. __pyx_methods_6uvloop_4loop_SSLProtocol, /*tp_methods*/
  136516. 0, /*tp_members*/
  136517. 0, /*tp_getset*/
  136518. 0, /*tp_base*/
  136519. 0, /*tp_dict*/
  136520. 0, /*tp_descr_get*/
  136521. 0, /*tp_descr_set*/
  136522. 0, /*tp_dictoffset*/
  136523. __pyx_pw_6uvloop_4loop_11SSLProtocol_5__init__, /*tp_init*/
  136524. 0, /*tp_alloc*/
  136525. __pyx_tp_new_6uvloop_4loop_SSLProtocol, /*tp_new*/
  136526. 0, /*tp_free*/
  136527. 0, /*tp_is_gc*/
  136528. 0, /*tp_bases*/
  136529. 0, /*tp_mro*/
  136530. 0, /*tp_cache*/
  136531. 0, /*tp_subclasses*/
  136532. 0, /*tp_weaklist*/
  136533. 0, /*tp_del*/
  136534. 0, /*tp_version_tag*/
  136535. #if PY_VERSION_HEX >= 0x030400a1
  136536. 0, /*tp_finalize*/
  136537. #endif
  136538. #if PY_VERSION_HEX >= 0x030800b1
  136539. 0, /*tp_vectorcall*/
  136540. #endif
  136541. };
  136542. static struct __pyx_vtabstruct_6uvloop_4loop_UDPTransport __pyx_vtable_6uvloop_4loop_UDPTransport;
  136543. static PyObject *__pyx_tp_new_6uvloop_4loop_UDPTransport(PyTypeObject *t, PyObject *a, PyObject *k) {
  136544. struct __pyx_obj_6uvloop_4loop_UDPTransport *p;
  136545. PyObject *o = __pyx_tp_new_6uvloop_4loop_UVBaseTransport(t, a, k);
  136546. if (unlikely(!o)) return 0;
  136547. p = ((struct __pyx_obj_6uvloop_4loop_UDPTransport *)o);
  136548. p->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6uvloop_4loop_UVHandle*)__pyx_vtabptr_6uvloop_4loop_UDPTransport;
  136549. if (unlikely(__pyx_pw_6uvloop_4loop_12UDPTransport_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad;
  136550. return o;
  136551. bad:
  136552. Py_DECREF(o); o = 0;
  136553. return NULL;
  136554. }
  136555. static PyMethodDef __pyx_methods_6uvloop_4loop_UDPTransport[] = {
  136556. {"sendto", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6uvloop_4loop_12UDPTransport_3sendto, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_12UDPTransport_2sendto},
  136557. {"__reduce_cython__", (PyCFunction)__pyx_pw_6uvloop_4loop_12UDPTransport_5__reduce_cython__, METH_NOARGS, __pyx_doc_6uvloop_4loop_12UDPTransport_4__reduce_cython__},
  136558. {"__setstate_cython__", (PyCFunction)__pyx_pw_6uvloop_4loop_12UDPTransport_7__setstate_cython__, METH_O, __pyx_doc_6uvloop_4loop_12UDPTransport_6__setstate_cython__},
  136559. {0, 0, 0, 0}
  136560. };
  136561. static PyTypeObject __pyx_type_6uvloop_4loop_UDPTransport = {
  136562. PyVarObject_HEAD_INIT(0, 0)
  136563. "uvloop.loop.UDPTransport", /*tp_name*/
  136564. sizeof(struct __pyx_obj_6uvloop_4loop_UDPTransport), /*tp_basicsize*/
  136565. 0, /*tp_itemsize*/
  136566. __pyx_tp_dealloc_6uvloop_4loop_UVBaseTransport, /*tp_dealloc*/
  136567. 0, /*tp_print*/
  136568. 0, /*tp_getattr*/
  136569. 0, /*tp_setattr*/
  136570. #if PY_MAJOR_VERSION < 3
  136571. 0, /*tp_compare*/
  136572. #endif
  136573. #if PY_MAJOR_VERSION >= 3
  136574. 0, /*tp_as_async*/
  136575. #endif
  136576. #if CYTHON_COMPILING_IN_PYPY
  136577. __pyx_pw_6uvloop_4loop_8UVHandle_7__repr__, /*tp_repr*/
  136578. #else
  136579. 0, /*tp_repr*/
  136580. #endif
  136581. 0, /*tp_as_number*/
  136582. 0, /*tp_as_sequence*/
  136583. 0, /*tp_as_mapping*/
  136584. 0, /*tp_hash*/
  136585. 0, /*tp_call*/
  136586. 0, /*tp_str*/
  136587. 0, /*tp_getattro*/
  136588. 0, /*tp_setattro*/
  136589. 0, /*tp_as_buffer*/
  136590. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  136591. 0, /*tp_doc*/
  136592. __pyx_tp_traverse_6uvloop_4loop_UVBaseTransport, /*tp_traverse*/
  136593. 0, /*tp_clear*/
  136594. 0, /*tp_richcompare*/
  136595. 0, /*tp_weaklistoffset*/
  136596. 0, /*tp_iter*/
  136597. 0, /*tp_iternext*/
  136598. __pyx_methods_6uvloop_4loop_UDPTransport, /*tp_methods*/
  136599. 0, /*tp_members*/
  136600. 0, /*tp_getset*/
  136601. 0, /*tp_base*/
  136602. 0, /*tp_dict*/
  136603. 0, /*tp_descr_get*/
  136604. 0, /*tp_descr_set*/
  136605. 0, /*tp_dictoffset*/
  136606. #if CYTHON_COMPILING_IN_PYPY
  136607. __pyx_pw_6uvloop_4loop_8UVHandle_3__init__, /*tp_init*/
  136608. #else
  136609. 0, /*tp_init*/
  136610. #endif
  136611. 0, /*tp_alloc*/
  136612. __pyx_tp_new_6uvloop_4loop_UDPTransport, /*tp_new*/
  136613. 0, /*tp_free*/
  136614. 0, /*tp_is_gc*/
  136615. 0, /*tp_bases*/
  136616. 0, /*tp_mro*/
  136617. 0, /*tp_cache*/
  136618. 0, /*tp_subclasses*/
  136619. 0, /*tp_weaklist*/
  136620. 0, /*tp_del*/
  136621. 0, /*tp_version_tag*/
  136622. #if PY_VERSION_HEX >= 0x030400a1
  136623. 0, /*tp_finalize*/
  136624. #endif
  136625. #if PY_VERSION_HEX >= 0x030800b1
  136626. 0, /*tp_vectorcall*/
  136627. #endif
  136628. };
  136629. static struct __pyx_vtabstruct_6uvloop_4loop_Server __pyx_vtable_6uvloop_4loop_Server;
  136630. static PyObject *__pyx_tp_new_6uvloop_4loop_Server(PyTypeObject *t, PyObject *a, PyObject *k) {
  136631. struct __pyx_obj_6uvloop_4loop_Server *p;
  136632. PyObject *o;
  136633. if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
  136634. o = (*t->tp_alloc)(t, 0);
  136635. } else {
  136636. o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  136637. }
  136638. if (unlikely(!o)) return 0;
  136639. p = ((struct __pyx_obj_6uvloop_4loop_Server *)o);
  136640. p->__pyx_vtab = __pyx_vtabptr_6uvloop_4loop_Server;
  136641. p->_servers = ((PyObject*)Py_None); Py_INCREF(Py_None);
  136642. p->_waiters = ((PyObject*)Py_None); Py_INCREF(Py_None);
  136643. p->_loop = ((struct __pyx_obj_6uvloop_4loop_Loop *)Py_None); Py_INCREF(Py_None);
  136644. p->_serving_forever_fut = Py_None; Py_INCREF(Py_None);
  136645. if (unlikely(__pyx_pw_6uvloop_4loop_6Server_1__cinit__(o, a, k) < 0)) goto bad;
  136646. return o;
  136647. bad:
  136648. Py_DECREF(o); o = 0;
  136649. return NULL;
  136650. }
  136651. static void __pyx_tp_dealloc_6uvloop_4loop_Server(PyObject *o) {
  136652. struct __pyx_obj_6uvloop_4loop_Server *p = (struct __pyx_obj_6uvloop_4loop_Server *)o;
  136653. #if CYTHON_USE_TP_FINALIZE
  136654. if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
  136655. if (PyObject_CallFinalizerFromDealloc(o)) return;
  136656. }
  136657. #endif
  136658. PyObject_GC_UnTrack(o);
  136659. if (p->__weakref__) PyObject_ClearWeakRefs(o);
  136660. Py_CLEAR(p->_servers);
  136661. Py_CLEAR(p->_waiters);
  136662. Py_CLEAR(p->_loop);
  136663. Py_CLEAR(p->_serving_forever_fut);
  136664. (*Py_TYPE(o)->tp_free)(o);
  136665. }
  136666. static int __pyx_tp_traverse_6uvloop_4loop_Server(PyObject *o, visitproc v, void *a) {
  136667. int e;
  136668. struct __pyx_obj_6uvloop_4loop_Server *p = (struct __pyx_obj_6uvloop_4loop_Server *)o;
  136669. if (p->_servers) {
  136670. e = (*v)(p->_servers, a); if (e) return e;
  136671. }
  136672. if (p->_waiters) {
  136673. e = (*v)(p->_waiters, a); if (e) return e;
  136674. }
  136675. if (p->_loop) {
  136676. e = (*v)(((PyObject *)p->_loop), a); if (e) return e;
  136677. }
  136678. if (p->_serving_forever_fut) {
  136679. e = (*v)(p->_serving_forever_fut, a); if (e) return e;
  136680. }
  136681. return 0;
  136682. }
  136683. static int __pyx_tp_clear_6uvloop_4loop_Server(PyObject *o) {
  136684. PyObject* tmp;
  136685. struct __pyx_obj_6uvloop_4loop_Server *p = (struct __pyx_obj_6uvloop_4loop_Server *)o;
  136686. tmp = ((PyObject*)p->_servers);
  136687. p->_servers = ((PyObject*)Py_None); Py_INCREF(Py_None);
  136688. Py_XDECREF(tmp);
  136689. tmp = ((PyObject*)p->_waiters);
  136690. p->_waiters = ((PyObject*)Py_None); Py_INCREF(Py_None);
  136691. Py_XDECREF(tmp);
  136692. tmp = ((PyObject*)p->_loop);
  136693. p->_loop = ((struct __pyx_obj_6uvloop_4loop_Loop *)Py_None); Py_INCREF(Py_None);
  136694. Py_XDECREF(tmp);
  136695. tmp = ((PyObject*)p->_serving_forever_fut);
  136696. p->_serving_forever_fut = Py_None; Py_INCREF(Py_None);
  136697. Py_XDECREF(tmp);
  136698. return 0;
  136699. }
  136700. static PyObject *__pyx_getprop_6uvloop_4loop_6Server_sockets(PyObject *o, CYTHON_UNUSED void *x) {
  136701. return __pyx_pw_6uvloop_4loop_6Server_7sockets_1__get__(o);
  136702. }
  136703. static PyMethodDef __pyx_methods_6uvloop_4loop_Server[] = {
  136704. {"__aenter__", (PyCFunction)__pyx_pw_6uvloop_4loop_6Server_3__aenter__, METH_NOARGS, __pyx_doc_6uvloop_4loop_6Server_2__aenter__},
  136705. {"__aexit__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6uvloop_4loop_6Server_6__aexit__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_6Server_5__aexit__},
  136706. {"get_loop", (PyCFunction)__pyx_pw_6uvloop_4loop_6Server_11get_loop, METH_NOARGS, __pyx_doc_6uvloop_4loop_6Server_10get_loop},
  136707. {"wait_closed", (PyCFunction)__pyx_pw_6uvloop_4loop_6Server_13wait_closed, METH_NOARGS, __pyx_doc_6uvloop_4loop_6Server_12wait_closed},
  136708. {"close", (PyCFunction)__pyx_pw_6uvloop_4loop_6Server_16close, METH_NOARGS, __pyx_doc_6uvloop_4loop_6Server_15close},
  136709. {"is_serving", (PyCFunction)__pyx_pw_6uvloop_4loop_6Server_18is_serving, METH_NOARGS, __pyx_doc_6uvloop_4loop_6Server_17is_serving},
  136710. {"start_serving", (PyCFunction)__pyx_pw_6uvloop_4loop_6Server_20start_serving, METH_NOARGS, __pyx_doc_6uvloop_4loop_6Server_19start_serving},
  136711. {"serve_forever", (PyCFunction)__pyx_pw_6uvloop_4loop_6Server_23serve_forever, METH_NOARGS, __pyx_doc_6uvloop_4loop_6Server_22serve_forever},
  136712. {"__reduce_cython__", (PyCFunction)__pyx_pw_6uvloop_4loop_6Server_26__reduce_cython__, METH_NOARGS, __pyx_doc_6uvloop_4loop_6Server_25__reduce_cython__},
  136713. {"__setstate_cython__", (PyCFunction)__pyx_pw_6uvloop_4loop_6Server_28__setstate_cython__, METH_O, __pyx_doc_6uvloop_4loop_6Server_27__setstate_cython__},
  136714. {0, 0, 0, 0}
  136715. };
  136716. static struct PyGetSetDef __pyx_getsets_6uvloop_4loop_Server[] = {
  136717. {(char *)"sockets", __pyx_getprop_6uvloop_4loop_6Server_sockets, 0, (char *)0, 0},
  136718. {0, 0, 0, 0, 0}
  136719. };
  136720. static PyTypeObject __pyx_type_6uvloop_4loop_Server = {
  136721. PyVarObject_HEAD_INIT(0, 0)
  136722. "uvloop.loop.Server", /*tp_name*/
  136723. sizeof(struct __pyx_obj_6uvloop_4loop_Server), /*tp_basicsize*/
  136724. 0, /*tp_itemsize*/
  136725. __pyx_tp_dealloc_6uvloop_4loop_Server, /*tp_dealloc*/
  136726. 0, /*tp_print*/
  136727. 0, /*tp_getattr*/
  136728. 0, /*tp_setattr*/
  136729. #if PY_MAJOR_VERSION < 3
  136730. 0, /*tp_compare*/
  136731. #endif
  136732. #if PY_MAJOR_VERSION >= 3
  136733. 0, /*tp_as_async*/
  136734. #endif
  136735. __pyx_pw_6uvloop_4loop_6Server_9__repr__, /*tp_repr*/
  136736. 0, /*tp_as_number*/
  136737. 0, /*tp_as_sequence*/
  136738. 0, /*tp_as_mapping*/
  136739. 0, /*tp_hash*/
  136740. 0, /*tp_call*/
  136741. 0, /*tp_str*/
  136742. 0, /*tp_getattro*/
  136743. 0, /*tp_setattro*/
  136744. 0, /*tp_as_buffer*/
  136745. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  136746. 0, /*tp_doc*/
  136747. __pyx_tp_traverse_6uvloop_4loop_Server, /*tp_traverse*/
  136748. __pyx_tp_clear_6uvloop_4loop_Server, /*tp_clear*/
  136749. 0, /*tp_richcompare*/
  136750. 0, /*tp_weaklistoffset*/
  136751. 0, /*tp_iter*/
  136752. 0, /*tp_iternext*/
  136753. __pyx_methods_6uvloop_4loop_Server, /*tp_methods*/
  136754. 0, /*tp_members*/
  136755. __pyx_getsets_6uvloop_4loop_Server, /*tp_getset*/
  136756. 0, /*tp_base*/
  136757. 0, /*tp_dict*/
  136758. 0, /*tp_descr_get*/
  136759. 0, /*tp_descr_set*/
  136760. 0, /*tp_dictoffset*/
  136761. 0, /*tp_init*/
  136762. 0, /*tp_alloc*/
  136763. __pyx_tp_new_6uvloop_4loop_Server, /*tp_new*/
  136764. 0, /*tp_free*/
  136765. 0, /*tp_is_gc*/
  136766. 0, /*tp_bases*/
  136767. 0, /*tp_mro*/
  136768. 0, /*tp_cache*/
  136769. 0, /*tp_subclasses*/
  136770. 0, /*tp_weaklist*/
  136771. 0, /*tp_del*/
  136772. 0, /*tp_version_tag*/
  136773. #if PY_VERSION_HEX >= 0x030400a1
  136774. 0, /*tp_finalize*/
  136775. #endif
  136776. #if PY_VERSION_HEX >= 0x030800b1
  136777. 0, /*tp_vectorcall*/
  136778. #endif
  136779. };
  136780. static struct __pyx_vtabstruct_6uvloop_4loop_PseudoSocket __pyx_vtable_6uvloop_4loop_PseudoSocket;
  136781. static PyObject *__pyx_tp_new_6uvloop_4loop_PseudoSocket(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  136782. struct __pyx_obj_6uvloop_4loop_PseudoSocket *p;
  136783. PyObject *o;
  136784. if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
  136785. o = (*t->tp_alloc)(t, 0);
  136786. } else {
  136787. o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  136788. }
  136789. if (unlikely(!o)) return 0;
  136790. p = ((struct __pyx_obj_6uvloop_4loop_PseudoSocket *)o);
  136791. p->__pyx_vtab = __pyx_vtabptr_6uvloop_4loop_PseudoSocket;
  136792. p->_peername = Py_None; Py_INCREF(Py_None);
  136793. p->_sockname = Py_None; Py_INCREF(Py_None);
  136794. return o;
  136795. }
  136796. static void __pyx_tp_dealloc_6uvloop_4loop_PseudoSocket(PyObject *o) {
  136797. struct __pyx_obj_6uvloop_4loop_PseudoSocket *p = (struct __pyx_obj_6uvloop_4loop_PseudoSocket *)o;
  136798. #if CYTHON_USE_TP_FINALIZE
  136799. if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
  136800. if (PyObject_CallFinalizerFromDealloc(o)) return;
  136801. }
  136802. #endif
  136803. PyObject_GC_UnTrack(o);
  136804. Py_CLEAR(p->_peername);
  136805. Py_CLEAR(p->_sockname);
  136806. (*Py_TYPE(o)->tp_free)(o);
  136807. }
  136808. static int __pyx_tp_traverse_6uvloop_4loop_PseudoSocket(PyObject *o, visitproc v, void *a) {
  136809. int e;
  136810. struct __pyx_obj_6uvloop_4loop_PseudoSocket *p = (struct __pyx_obj_6uvloop_4loop_PseudoSocket *)o;
  136811. if (p->_peername) {
  136812. e = (*v)(p->_peername, a); if (e) return e;
  136813. }
  136814. if (p->_sockname) {
  136815. e = (*v)(p->_sockname, a); if (e) return e;
  136816. }
  136817. return 0;
  136818. }
  136819. static int __pyx_tp_clear_6uvloop_4loop_PseudoSocket(PyObject *o) {
  136820. PyObject* tmp;
  136821. struct __pyx_obj_6uvloop_4loop_PseudoSocket *p = (struct __pyx_obj_6uvloop_4loop_PseudoSocket *)o;
  136822. tmp = ((PyObject*)p->_peername);
  136823. p->_peername = Py_None; Py_INCREF(Py_None);
  136824. Py_XDECREF(tmp);
  136825. tmp = ((PyObject*)p->_sockname);
  136826. p->_sockname = Py_None; Py_INCREF(Py_None);
  136827. Py_XDECREF(tmp);
  136828. return 0;
  136829. }
  136830. static PyObject *__pyx_getprop_6uvloop_4loop_12PseudoSocket_family(PyObject *o, CYTHON_UNUSED void *x) {
  136831. return __pyx_pw_6uvloop_4loop_12PseudoSocket_6family_1__get__(o);
  136832. }
  136833. static PyObject *__pyx_getprop_6uvloop_4loop_12PseudoSocket_type(PyObject *o, CYTHON_UNUSED void *x) {
  136834. return __pyx_pw_6uvloop_4loop_12PseudoSocket_4type_1__get__(o);
  136835. }
  136836. static PyObject *__pyx_getprop_6uvloop_4loop_12PseudoSocket_proto(PyObject *o, CYTHON_UNUSED void *x) {
  136837. return __pyx_pw_6uvloop_4loop_12PseudoSocket_5proto_1__get__(o);
  136838. }
  136839. static PyMethodDef __pyx_methods_6uvloop_4loop_PseudoSocket[] = {
  136840. {"__getstate__", (PyCFunction)__pyx_pw_6uvloop_4loop_12PseudoSocket_5__getstate__, METH_NOARGS, __pyx_doc_6uvloop_4loop_12PseudoSocket_4__getstate__},
  136841. {"fileno", (PyCFunction)__pyx_pw_6uvloop_4loop_12PseudoSocket_7fileno, METH_NOARGS, __pyx_doc_6uvloop_4loop_12PseudoSocket_6fileno},
  136842. {"dup", (PyCFunction)__pyx_pw_6uvloop_4loop_12PseudoSocket_9dup, METH_NOARGS, __pyx_doc_6uvloop_4loop_12PseudoSocket_8dup},
  136843. {"get_inheritable", (PyCFunction)__pyx_pw_6uvloop_4loop_12PseudoSocket_11get_inheritable, METH_NOARGS, __pyx_doc_6uvloop_4loop_12PseudoSocket_10get_inheritable},
  136844. {"set_inheritable", (PyCFunction)__pyx_pw_6uvloop_4loop_12PseudoSocket_13set_inheritable, METH_NOARGS, __pyx_doc_6uvloop_4loop_12PseudoSocket_12set_inheritable},
  136845. {"ioctl", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6uvloop_4loop_12PseudoSocket_15ioctl, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_12PseudoSocket_14ioctl},
  136846. {"getsockopt", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6uvloop_4loop_12PseudoSocket_17getsockopt, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_12PseudoSocket_16getsockopt},
  136847. {"setsockopt", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6uvloop_4loop_12PseudoSocket_19setsockopt, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_12PseudoSocket_18setsockopt},
  136848. {"getpeername", (PyCFunction)__pyx_pw_6uvloop_4loop_12PseudoSocket_21getpeername, METH_NOARGS, __pyx_doc_6uvloop_4loop_12PseudoSocket_20getpeername},
  136849. {"getsockname", (PyCFunction)__pyx_pw_6uvloop_4loop_12PseudoSocket_23getsockname, METH_NOARGS, __pyx_doc_6uvloop_4loop_12PseudoSocket_22getsockname},
  136850. {"share", (PyCFunction)__pyx_pw_6uvloop_4loop_12PseudoSocket_25share, METH_O, __pyx_doc_6uvloop_4loop_12PseudoSocket_24share},
  136851. {"accept", (PyCFunction)__pyx_pw_6uvloop_4loop_12PseudoSocket_27accept, METH_NOARGS, __pyx_doc_6uvloop_4loop_12PseudoSocket_26accept},
  136852. {"connect", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6uvloop_4loop_12PseudoSocket_29connect, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_12PseudoSocket_28connect},
  136853. {"connect_ex", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6uvloop_4loop_12PseudoSocket_31connect_ex, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_12PseudoSocket_30connect_ex},
  136854. {"bind", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6uvloop_4loop_12PseudoSocket_33bind, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_12PseudoSocket_32bind},
  136855. {"listen", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6uvloop_4loop_12PseudoSocket_35listen, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_12PseudoSocket_34listen},
  136856. {"makefile", (PyCFunction)__pyx_pw_6uvloop_4loop_12PseudoSocket_37makefile, METH_NOARGS, __pyx_doc_6uvloop_4loop_12PseudoSocket_36makefile},
  136857. {"sendfile", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6uvloop_4loop_12PseudoSocket_39sendfile, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_12PseudoSocket_38sendfile},
  136858. {"close", (PyCFunction)__pyx_pw_6uvloop_4loop_12PseudoSocket_41close, METH_NOARGS, __pyx_doc_6uvloop_4loop_12PseudoSocket_40close},
  136859. {"detach", (PyCFunction)__pyx_pw_6uvloop_4loop_12PseudoSocket_43detach, METH_NOARGS, __pyx_doc_6uvloop_4loop_12PseudoSocket_42detach},
  136860. {"shutdown", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6uvloop_4loop_12PseudoSocket_45shutdown, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_12PseudoSocket_44shutdown},
  136861. {"sendmsg_afalg", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6uvloop_4loop_12PseudoSocket_47sendmsg_afalg, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_12PseudoSocket_46sendmsg_afalg},
  136862. {"sendmsg", (PyCFunction)__pyx_pw_6uvloop_4loop_12PseudoSocket_49sendmsg, METH_NOARGS, __pyx_doc_6uvloop_4loop_12PseudoSocket_48sendmsg},
  136863. {"sendto", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6uvloop_4loop_12PseudoSocket_51sendto, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_12PseudoSocket_50sendto},
  136864. {"send", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6uvloop_4loop_12PseudoSocket_53send, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_12PseudoSocket_52send},
  136865. {"sendall", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6uvloop_4loop_12PseudoSocket_55sendall, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_12PseudoSocket_54sendall},
  136866. {"recv_into", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6uvloop_4loop_12PseudoSocket_57recv_into, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_12PseudoSocket_56recv_into},
  136867. {"recvfrom_into", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6uvloop_4loop_12PseudoSocket_59recvfrom_into, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_12PseudoSocket_58recvfrom_into},
  136868. {"recvmsg_into", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6uvloop_4loop_12PseudoSocket_61recvmsg_into, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_12PseudoSocket_60recvmsg_into},
  136869. {"recvmsg", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6uvloop_4loop_12PseudoSocket_63recvmsg, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_12PseudoSocket_62recvmsg},
  136870. {"recvfrom", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6uvloop_4loop_12PseudoSocket_65recvfrom, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_12PseudoSocket_64recvfrom},
  136871. {"recv", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6uvloop_4loop_12PseudoSocket_67recv, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_12PseudoSocket_66recv},
  136872. {"settimeout", (PyCFunction)__pyx_pw_6uvloop_4loop_12PseudoSocket_69settimeout, METH_O, __pyx_doc_6uvloop_4loop_12PseudoSocket_68settimeout},
  136873. {"gettimeout", (PyCFunction)__pyx_pw_6uvloop_4loop_12PseudoSocket_71gettimeout, METH_NOARGS, __pyx_doc_6uvloop_4loop_12PseudoSocket_70gettimeout},
  136874. {"setblocking", (PyCFunction)__pyx_pw_6uvloop_4loop_12PseudoSocket_73setblocking, METH_O, __pyx_doc_6uvloop_4loop_12PseudoSocket_72setblocking},
  136875. {"__enter__", (PyCFunction)__pyx_pw_6uvloop_4loop_12PseudoSocket_75__enter__, METH_NOARGS, __pyx_doc_6uvloop_4loop_12PseudoSocket_74__enter__},
  136876. {"__exit__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6uvloop_4loop_12PseudoSocket_77__exit__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_12PseudoSocket_76__exit__},
  136877. {"__reduce_cython__", (PyCFunction)__pyx_pw_6uvloop_4loop_12PseudoSocket_79__reduce_cython__, METH_NOARGS, __pyx_doc_6uvloop_4loop_12PseudoSocket_78__reduce_cython__},
  136878. {"__setstate_cython__", (PyCFunction)__pyx_pw_6uvloop_4loop_12PseudoSocket_81__setstate_cython__, METH_O, __pyx_doc_6uvloop_4loop_12PseudoSocket_80__setstate_cython__},
  136879. {0, 0, 0, 0}
  136880. };
  136881. static struct PyGetSetDef __pyx_getsets_6uvloop_4loop_PseudoSocket[] = {
  136882. {(char *)"family", __pyx_getprop_6uvloop_4loop_12PseudoSocket_family, 0, (char *)0, 0},
  136883. {(char *)"type", __pyx_getprop_6uvloop_4loop_12PseudoSocket_type, 0, (char *)0, 0},
  136884. {(char *)"proto", __pyx_getprop_6uvloop_4loop_12PseudoSocket_proto, 0, (char *)0, 0},
  136885. {0, 0, 0, 0, 0}
  136886. };
  136887. static PyTypeObject __pyx_type_6uvloop_4loop_PseudoSocket = {
  136888. PyVarObject_HEAD_INIT(0, 0)
  136889. "uvloop.loop.PseudoSocket", /*tp_name*/
  136890. sizeof(struct __pyx_obj_6uvloop_4loop_PseudoSocket), /*tp_basicsize*/
  136891. 0, /*tp_itemsize*/
  136892. __pyx_tp_dealloc_6uvloop_4loop_PseudoSocket, /*tp_dealloc*/
  136893. 0, /*tp_print*/
  136894. 0, /*tp_getattr*/
  136895. 0, /*tp_setattr*/
  136896. #if PY_MAJOR_VERSION < 3
  136897. 0, /*tp_compare*/
  136898. #endif
  136899. #if PY_MAJOR_VERSION >= 3
  136900. 0, /*tp_as_async*/
  136901. #endif
  136902. __pyx_pw_6uvloop_4loop_12PseudoSocket_3__repr__, /*tp_repr*/
  136903. 0, /*tp_as_number*/
  136904. 0, /*tp_as_sequence*/
  136905. 0, /*tp_as_mapping*/
  136906. 0, /*tp_hash*/
  136907. 0, /*tp_call*/
  136908. 0, /*tp_str*/
  136909. 0, /*tp_getattro*/
  136910. 0, /*tp_setattro*/
  136911. 0, /*tp_as_buffer*/
  136912. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  136913. "PseudoSocket(int family, int type, int proto, int fd)", /*tp_doc*/
  136914. __pyx_tp_traverse_6uvloop_4loop_PseudoSocket, /*tp_traverse*/
  136915. __pyx_tp_clear_6uvloop_4loop_PseudoSocket, /*tp_clear*/
  136916. 0, /*tp_richcompare*/
  136917. 0, /*tp_weaklistoffset*/
  136918. 0, /*tp_iter*/
  136919. 0, /*tp_iternext*/
  136920. __pyx_methods_6uvloop_4loop_PseudoSocket, /*tp_methods*/
  136921. 0, /*tp_members*/
  136922. __pyx_getsets_6uvloop_4loop_PseudoSocket, /*tp_getset*/
  136923. 0, /*tp_base*/
  136924. 0, /*tp_dict*/
  136925. 0, /*tp_descr_get*/
  136926. 0, /*tp_descr_set*/
  136927. 0, /*tp_dictoffset*/
  136928. __pyx_pw_6uvloop_4loop_12PseudoSocket_1__init__, /*tp_init*/
  136929. 0, /*tp_alloc*/
  136930. __pyx_tp_new_6uvloop_4loop_PseudoSocket, /*tp_new*/
  136931. 0, /*tp_free*/
  136932. 0, /*tp_is_gc*/
  136933. 0, /*tp_bases*/
  136934. 0, /*tp_mro*/
  136935. 0, /*tp_cache*/
  136936. 0, /*tp_subclasses*/
  136937. 0, /*tp_weaklist*/
  136938. 0, /*tp_del*/
  136939. 0, /*tp_version_tag*/
  136940. #if PY_VERSION_HEX >= 0x030400a1
  136941. 0, /*tp_finalize*/
  136942. #endif
  136943. #if PY_VERSION_HEX >= 0x030800b1
  136944. 0, /*tp_vectorcall*/
  136945. #endif
  136946. };
  136947. static struct __pyx_vtabstruct_6uvloop_4loop_LruCache __pyx_vtable_6uvloop_4loop_LruCache;
  136948. static PyObject *__pyx_tp_new_6uvloop_4loop_LruCache(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  136949. struct __pyx_obj_6uvloop_4loop_LruCache *p;
  136950. PyObject *o;
  136951. o = (*t->tp_alloc)(t, 0);
  136952. if (unlikely(!o)) return 0;
  136953. p = ((struct __pyx_obj_6uvloop_4loop_LruCache *)o);
  136954. p->__pyx_vtab = __pyx_vtabptr_6uvloop_4loop_LruCache;
  136955. p->_dict = Py_None; Py_INCREF(Py_None);
  136956. p->_dict_move_to_end = Py_None; Py_INCREF(Py_None);
  136957. p->_dict_get = Py_None; Py_INCREF(Py_None);
  136958. return o;
  136959. }
  136960. static void __pyx_tp_dealloc_6uvloop_4loop_LruCache(PyObject *o) {
  136961. struct __pyx_obj_6uvloop_4loop_LruCache *p = (struct __pyx_obj_6uvloop_4loop_LruCache *)o;
  136962. PyObject_GC_UnTrack(o);
  136963. Py_CLEAR(p->_dict);
  136964. Py_CLEAR(p->_dict_move_to_end);
  136965. Py_CLEAR(p->_dict_get);
  136966. (*Py_TYPE(o)->tp_free)(o);
  136967. }
  136968. static int __pyx_tp_traverse_6uvloop_4loop_LruCache(PyObject *o, visitproc v, void *a) {
  136969. int e;
  136970. struct __pyx_obj_6uvloop_4loop_LruCache *p = (struct __pyx_obj_6uvloop_4loop_LruCache *)o;
  136971. if (p->_dict) {
  136972. e = (*v)(p->_dict, a); if (e) return e;
  136973. }
  136974. if (p->_dict_move_to_end) {
  136975. e = (*v)(p->_dict_move_to_end, a); if (e) return e;
  136976. }
  136977. if (p->_dict_get) {
  136978. e = (*v)(p->_dict_get, a); if (e) return e;
  136979. }
  136980. return 0;
  136981. }
  136982. static int __pyx_tp_clear_6uvloop_4loop_LruCache(PyObject *o) {
  136983. PyObject* tmp;
  136984. struct __pyx_obj_6uvloop_4loop_LruCache *p = (struct __pyx_obj_6uvloop_4loop_LruCache *)o;
  136985. tmp = ((PyObject*)p->_dict);
  136986. p->_dict = Py_None; Py_INCREF(Py_None);
  136987. Py_XDECREF(tmp);
  136988. tmp = ((PyObject*)p->_dict_move_to_end);
  136989. p->_dict_move_to_end = Py_None; Py_INCREF(Py_None);
  136990. Py_XDECREF(tmp);
  136991. tmp = ((PyObject*)p->_dict_get);
  136992. p->_dict_get = Py_None; Py_INCREF(Py_None);
  136993. Py_XDECREF(tmp);
  136994. return 0;
  136995. }
  136996. static PyObject *__pyx_sq_item_6uvloop_4loop_LruCache(PyObject *o, Py_ssize_t i) {
  136997. PyObject *r;
  136998. PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
  136999. r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
  137000. Py_DECREF(x);
  137001. return r;
  137002. }
  137003. static int __pyx_mp_ass_subscript_6uvloop_4loop_LruCache(PyObject *o, PyObject *i, PyObject *v) {
  137004. if (v) {
  137005. return __pyx_pw_6uvloop_4loop_8LruCache_5__setitem__(o, i, v);
  137006. }
  137007. else {
  137008. return __pyx_pw_6uvloop_4loop_8LruCache_7__delitem__(o, i);
  137009. }
  137010. }
  137011. static PyMethodDef __pyx_methods_6uvloop_4loop_LruCache[] = {
  137012. {"__reduce_cython__", (PyCFunction)__pyx_pw_6uvloop_4loop_8LruCache_15__reduce_cython__, METH_NOARGS, __pyx_doc_6uvloop_4loop_8LruCache_14__reduce_cython__},
  137013. {"__setstate_cython__", (PyCFunction)__pyx_pw_6uvloop_4loop_8LruCache_17__setstate_cython__, METH_O, __pyx_doc_6uvloop_4loop_8LruCache_16__setstate_cython__},
  137014. {0, 0, 0, 0}
  137015. };
  137016. static PySequenceMethods __pyx_tp_as_sequence_LruCache = {
  137017. __pyx_pw_6uvloop_4loop_8LruCache_11__len__, /*sq_length*/
  137018. 0, /*sq_concat*/
  137019. 0, /*sq_repeat*/
  137020. __pyx_sq_item_6uvloop_4loop_LruCache, /*sq_item*/
  137021. 0, /*sq_slice*/
  137022. 0, /*sq_ass_item*/
  137023. 0, /*sq_ass_slice*/
  137024. __pyx_pw_6uvloop_4loop_8LruCache_9__contains__, /*sq_contains*/
  137025. 0, /*sq_inplace_concat*/
  137026. 0, /*sq_inplace_repeat*/
  137027. };
  137028. static PyMappingMethods __pyx_tp_as_mapping_LruCache = {
  137029. __pyx_pw_6uvloop_4loop_8LruCache_11__len__, /*mp_length*/
  137030. __pyx_pw_6uvloop_4loop_8LruCache_3__getitem__, /*mp_subscript*/
  137031. __pyx_mp_ass_subscript_6uvloop_4loop_LruCache, /*mp_ass_subscript*/
  137032. };
  137033. static PyTypeObject __pyx_type_6uvloop_4loop_LruCache = {
  137034. PyVarObject_HEAD_INIT(0, 0)
  137035. "uvloop.loop.LruCache", /*tp_name*/
  137036. sizeof(struct __pyx_obj_6uvloop_4loop_LruCache), /*tp_basicsize*/
  137037. 0, /*tp_itemsize*/
  137038. __pyx_tp_dealloc_6uvloop_4loop_LruCache, /*tp_dealloc*/
  137039. 0, /*tp_print*/
  137040. 0, /*tp_getattr*/
  137041. 0, /*tp_setattr*/
  137042. #if PY_MAJOR_VERSION < 3
  137043. 0, /*tp_compare*/
  137044. #endif
  137045. #if PY_MAJOR_VERSION >= 3
  137046. 0, /*tp_as_async*/
  137047. #endif
  137048. 0, /*tp_repr*/
  137049. 0, /*tp_as_number*/
  137050. &__pyx_tp_as_sequence_LruCache, /*tp_as_sequence*/
  137051. &__pyx_tp_as_mapping_LruCache, /*tp_as_mapping*/
  137052. 0, /*tp_hash*/
  137053. 0, /*tp_call*/
  137054. 0, /*tp_str*/
  137055. 0, /*tp_getattro*/
  137056. 0, /*tp_setattro*/
  137057. 0, /*tp_as_buffer*/
  137058. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  137059. "LruCache(maxsize, *)", /*tp_doc*/
  137060. __pyx_tp_traverse_6uvloop_4loop_LruCache, /*tp_traverse*/
  137061. __pyx_tp_clear_6uvloop_4loop_LruCache, /*tp_clear*/
  137062. 0, /*tp_richcompare*/
  137063. 0, /*tp_weaklistoffset*/
  137064. __pyx_pw_6uvloop_4loop_8LruCache_13__iter__, /*tp_iter*/
  137065. 0, /*tp_iternext*/
  137066. __pyx_methods_6uvloop_4loop_LruCache, /*tp_methods*/
  137067. 0, /*tp_members*/
  137068. 0, /*tp_getset*/
  137069. 0, /*tp_base*/
  137070. 0, /*tp_dict*/
  137071. 0, /*tp_descr_get*/
  137072. 0, /*tp_descr_set*/
  137073. 0, /*tp_dictoffset*/
  137074. __pyx_pw_6uvloop_4loop_8LruCache_1__init__, /*tp_init*/
  137075. 0, /*tp_alloc*/
  137076. __pyx_tp_new_6uvloop_4loop_LruCache, /*tp_new*/
  137077. 0, /*tp_free*/
  137078. 0, /*tp_is_gc*/
  137079. 0, /*tp_bases*/
  137080. 0, /*tp_mro*/
  137081. 0, /*tp_cache*/
  137082. 0, /*tp_subclasses*/
  137083. 0, /*tp_weaklist*/
  137084. 0, /*tp_del*/
  137085. 0, /*tp_version_tag*/
  137086. #if PY_VERSION_HEX >= 0x030400a1
  137087. 0, /*tp_finalize*/
  137088. #endif
  137089. #if PY_VERSION_HEX >= 0x030800b1
  137090. 0, /*tp_vectorcall*/
  137091. #endif
  137092. };
  137093. static struct __pyx_vtabstruct_6uvloop_4loop__StreamWriteContext __pyx_vtable_6uvloop_4loop__StreamWriteContext;
  137094. static struct __pyx_obj_6uvloop_4loop__StreamWriteContext *__pyx_freelist_6uvloop_4loop__StreamWriteContext[250];
  137095. static int __pyx_freecount_6uvloop_4loop__StreamWriteContext = 0;
  137096. static PyObject *__pyx_tp_new_6uvloop_4loop__StreamWriteContext(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  137097. struct __pyx_obj_6uvloop_4loop__StreamWriteContext *p;
  137098. PyObject *o;
  137099. if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6uvloop_4loop__StreamWriteContext > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop__StreamWriteContext)) & ((t->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)) == 0))) {
  137100. o = (PyObject*)__pyx_freelist_6uvloop_4loop__StreamWriteContext[--__pyx_freecount_6uvloop_4loop__StreamWriteContext];
  137101. memset(o, 0, sizeof(struct __pyx_obj_6uvloop_4loop__StreamWriteContext));
  137102. (void) PyObject_INIT(o, t);
  137103. PyObject_GC_Track(o);
  137104. } else {
  137105. if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
  137106. o = (*t->tp_alloc)(t, 0);
  137107. } else {
  137108. o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  137109. }
  137110. if (unlikely(!o)) return 0;
  137111. }
  137112. p = ((struct __pyx_obj_6uvloop_4loop__StreamWriteContext *)o);
  137113. p->__pyx_vtab = __pyx_vtabptr_6uvloop_4loop__StreamWriteContext;
  137114. p->buffers = ((PyObject*)Py_None); Py_INCREF(Py_None);
  137115. p->stream = ((struct __pyx_obj_6uvloop_4loop_UVStream *)Py_None); Py_INCREF(Py_None);
  137116. return o;
  137117. }
  137118. static void __pyx_tp_dealloc_6uvloop_4loop__StreamWriteContext(PyObject *o) {
  137119. struct __pyx_obj_6uvloop_4loop__StreamWriteContext *p = (struct __pyx_obj_6uvloop_4loop__StreamWriteContext *)o;
  137120. #if CYTHON_USE_TP_FINALIZE
  137121. if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
  137122. if (PyObject_CallFinalizerFromDealloc(o)) return;
  137123. }
  137124. #endif
  137125. PyObject_GC_UnTrack(o);
  137126. {
  137127. PyObject *etype, *eval, *etb;
  137128. PyErr_Fetch(&etype, &eval, &etb);
  137129. ++Py_REFCNT(o);
  137130. __pyx_pw_6uvloop_4loop_19_StreamWriteContext_1__dealloc__(o);
  137131. --Py_REFCNT(o);
  137132. PyErr_Restore(etype, eval, etb);
  137133. }
  137134. Py_CLEAR(p->buffers);
  137135. Py_CLEAR(p->stream);
  137136. if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6uvloop_4loop__StreamWriteContext < 250) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop__StreamWriteContext)) & ((Py_TYPE(o)->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)) == 0))) {
  137137. __pyx_freelist_6uvloop_4loop__StreamWriteContext[__pyx_freecount_6uvloop_4loop__StreamWriteContext++] = ((struct __pyx_obj_6uvloop_4loop__StreamWriteContext *)o);
  137138. } else {
  137139. (*Py_TYPE(o)->tp_free)(o);
  137140. }
  137141. }
  137142. static int __pyx_tp_traverse_6uvloop_4loop__StreamWriteContext(PyObject *o, visitproc v, void *a) {
  137143. int e;
  137144. struct __pyx_obj_6uvloop_4loop__StreamWriteContext *p = (struct __pyx_obj_6uvloop_4loop__StreamWriteContext *)o;
  137145. if (p->buffers) {
  137146. e = (*v)(p->buffers, a); if (e) return e;
  137147. }
  137148. if (p->stream) {
  137149. e = (*v)(((PyObject *)p->stream), a); if (e) return e;
  137150. }
  137151. return 0;
  137152. }
  137153. static PyMethodDef __pyx_methods_6uvloop_4loop__StreamWriteContext[] = {
  137154. {"__reduce_cython__", (PyCFunction)__pyx_pw_6uvloop_4loop_19_StreamWriteContext_3__reduce_cython__, METH_NOARGS, __pyx_doc_6uvloop_4loop_19_StreamWriteContext_2__reduce_cython__},
  137155. {"__setstate_cython__", (PyCFunction)__pyx_pw_6uvloop_4loop_19_StreamWriteContext_5__setstate_cython__, METH_O, __pyx_doc_6uvloop_4loop_19_StreamWriteContext_4__setstate_cython__},
  137156. {0, 0, 0, 0}
  137157. };
  137158. static PyTypeObject __pyx_type_6uvloop_4loop__StreamWriteContext = {
  137159. PyVarObject_HEAD_INIT(0, 0)
  137160. "uvloop.loop._StreamWriteContext", /*tp_name*/
  137161. sizeof(struct __pyx_obj_6uvloop_4loop__StreamWriteContext), /*tp_basicsize*/
  137162. 0, /*tp_itemsize*/
  137163. __pyx_tp_dealloc_6uvloop_4loop__StreamWriteContext, /*tp_dealloc*/
  137164. 0, /*tp_print*/
  137165. 0, /*tp_getattr*/
  137166. 0, /*tp_setattr*/
  137167. #if PY_MAJOR_VERSION < 3
  137168. 0, /*tp_compare*/
  137169. #endif
  137170. #if PY_MAJOR_VERSION >= 3
  137171. 0, /*tp_as_async*/
  137172. #endif
  137173. 0, /*tp_repr*/
  137174. 0, /*tp_as_number*/
  137175. 0, /*tp_as_sequence*/
  137176. 0, /*tp_as_mapping*/
  137177. 0, /*tp_hash*/
  137178. 0, /*tp_call*/
  137179. 0, /*tp_str*/
  137180. 0, /*tp_getattro*/
  137181. 0, /*tp_setattro*/
  137182. 0, /*tp_as_buffer*/
  137183. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  137184. 0, /*tp_doc*/
  137185. __pyx_tp_traverse_6uvloop_4loop__StreamWriteContext, /*tp_traverse*/
  137186. 0, /*tp_clear*/
  137187. 0, /*tp_richcompare*/
  137188. 0, /*tp_weaklistoffset*/
  137189. 0, /*tp_iter*/
  137190. 0, /*tp_iternext*/
  137191. __pyx_methods_6uvloop_4loop__StreamWriteContext, /*tp_methods*/
  137192. 0, /*tp_members*/
  137193. 0, /*tp_getset*/
  137194. 0, /*tp_base*/
  137195. 0, /*tp_dict*/
  137196. 0, /*tp_descr_get*/
  137197. 0, /*tp_descr_set*/
  137198. 0, /*tp_dictoffset*/
  137199. 0, /*tp_init*/
  137200. 0, /*tp_alloc*/
  137201. __pyx_tp_new_6uvloop_4loop__StreamWriteContext, /*tp_new*/
  137202. 0, /*tp_free*/
  137203. 0, /*tp_is_gc*/
  137204. 0, /*tp_bases*/
  137205. 0, /*tp_mro*/
  137206. 0, /*tp_cache*/
  137207. 0, /*tp_subclasses*/
  137208. 0, /*tp_weaklist*/
  137209. 0, /*tp_del*/
  137210. 0, /*tp_version_tag*/
  137211. #if PY_VERSION_HEX >= 0x030400a1
  137212. 0, /*tp_finalize*/
  137213. #endif
  137214. #if PY_VERSION_HEX >= 0x030800b1
  137215. 0, /*tp_vectorcall*/
  137216. #endif
  137217. };
  137218. static struct __pyx_vtabstruct_6uvloop_4loop__TCPConnectRequest __pyx_vtable_6uvloop_4loop__TCPConnectRequest;
  137219. static PyObject *__pyx_tp_new_6uvloop_4loop__TCPConnectRequest(PyTypeObject *t, PyObject *a, PyObject *k) {
  137220. struct __pyx_obj_6uvloop_4loop__TCPConnectRequest *p;
  137221. PyObject *o = __pyx_tp_new_6uvloop_4loop_UVRequest(t, a, k);
  137222. if (unlikely(!o)) return 0;
  137223. p = ((struct __pyx_obj_6uvloop_4loop__TCPConnectRequest *)o);
  137224. p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6uvloop_4loop_UVRequest*)__pyx_vtabptr_6uvloop_4loop__TCPConnectRequest;
  137225. p->transport = ((struct __pyx_obj_6uvloop_4loop_TCPTransport *)Py_None); Py_INCREF(Py_None);
  137226. if (unlikely(__pyx_pw_6uvloop_4loop_18_TCPConnectRequest_1__cinit__(o, a, k) < 0)) goto bad;
  137227. return o;
  137228. bad:
  137229. Py_DECREF(o); o = 0;
  137230. return NULL;
  137231. }
  137232. static void __pyx_tp_dealloc_6uvloop_4loop__TCPConnectRequest(PyObject *o) {
  137233. struct __pyx_obj_6uvloop_4loop__TCPConnectRequest *p = (struct __pyx_obj_6uvloop_4loop__TCPConnectRequest *)o;
  137234. #if CYTHON_USE_TP_FINALIZE
  137235. if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
  137236. if (PyObject_CallFinalizerFromDealloc(o)) return;
  137237. }
  137238. #endif
  137239. PyObject_GC_UnTrack(o);
  137240. Py_CLEAR(p->transport);
  137241. PyObject_GC_Track(o);
  137242. __pyx_tp_dealloc_6uvloop_4loop_UVRequest(o);
  137243. }
  137244. static int __pyx_tp_traverse_6uvloop_4loop__TCPConnectRequest(PyObject *o, visitproc v, void *a) {
  137245. int e;
  137246. struct __pyx_obj_6uvloop_4loop__TCPConnectRequest *p = (struct __pyx_obj_6uvloop_4loop__TCPConnectRequest *)o;
  137247. e = __pyx_tp_traverse_6uvloop_4loop_UVRequest(o, v, a); if (e) return e;
  137248. if (p->transport) {
  137249. e = (*v)(((PyObject *)p->transport), a); if (e) return e;
  137250. }
  137251. return 0;
  137252. }
  137253. static int __pyx_tp_clear_6uvloop_4loop__TCPConnectRequest(PyObject *o) {
  137254. PyObject* tmp;
  137255. struct __pyx_obj_6uvloop_4loop__TCPConnectRequest *p = (struct __pyx_obj_6uvloop_4loop__TCPConnectRequest *)o;
  137256. __pyx_tp_clear_6uvloop_4loop_UVRequest(o);
  137257. tmp = ((PyObject*)p->transport);
  137258. p->transport = ((struct __pyx_obj_6uvloop_4loop_TCPTransport *)Py_None); Py_INCREF(Py_None);
  137259. Py_XDECREF(tmp);
  137260. return 0;
  137261. }
  137262. static PyMethodDef __pyx_methods_6uvloop_4loop__TCPConnectRequest[] = {
  137263. {"__reduce_cython__", (PyCFunction)__pyx_pw_6uvloop_4loop_18_TCPConnectRequest_3__reduce_cython__, METH_NOARGS, __pyx_doc_6uvloop_4loop_18_TCPConnectRequest_2__reduce_cython__},
  137264. {"__setstate_cython__", (PyCFunction)__pyx_pw_6uvloop_4loop_18_TCPConnectRequest_5__setstate_cython__, METH_O, __pyx_doc_6uvloop_4loop_18_TCPConnectRequest_4__setstate_cython__},
  137265. {0, 0, 0, 0}
  137266. };
  137267. static PyTypeObject __pyx_type_6uvloop_4loop__TCPConnectRequest = {
  137268. PyVarObject_HEAD_INIT(0, 0)
  137269. "uvloop.loop._TCPConnectRequest", /*tp_name*/
  137270. sizeof(struct __pyx_obj_6uvloop_4loop__TCPConnectRequest), /*tp_basicsize*/
  137271. 0, /*tp_itemsize*/
  137272. __pyx_tp_dealloc_6uvloop_4loop__TCPConnectRequest, /*tp_dealloc*/
  137273. 0, /*tp_print*/
  137274. 0, /*tp_getattr*/
  137275. 0, /*tp_setattr*/
  137276. #if PY_MAJOR_VERSION < 3
  137277. 0, /*tp_compare*/
  137278. #endif
  137279. #if PY_MAJOR_VERSION >= 3
  137280. 0, /*tp_as_async*/
  137281. #endif
  137282. 0, /*tp_repr*/
  137283. 0, /*tp_as_number*/
  137284. 0, /*tp_as_sequence*/
  137285. 0, /*tp_as_mapping*/
  137286. 0, /*tp_hash*/
  137287. 0, /*tp_call*/
  137288. 0, /*tp_str*/
  137289. 0, /*tp_getattro*/
  137290. 0, /*tp_setattro*/
  137291. 0, /*tp_as_buffer*/
  137292. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  137293. 0, /*tp_doc*/
  137294. __pyx_tp_traverse_6uvloop_4loop__TCPConnectRequest, /*tp_traverse*/
  137295. __pyx_tp_clear_6uvloop_4loop__TCPConnectRequest, /*tp_clear*/
  137296. 0, /*tp_richcompare*/
  137297. 0, /*tp_weaklistoffset*/
  137298. 0, /*tp_iter*/
  137299. 0, /*tp_iternext*/
  137300. __pyx_methods_6uvloop_4loop__TCPConnectRequest, /*tp_methods*/
  137301. 0, /*tp_members*/
  137302. 0, /*tp_getset*/
  137303. 0, /*tp_base*/
  137304. 0, /*tp_dict*/
  137305. 0, /*tp_descr_get*/
  137306. 0, /*tp_descr_set*/
  137307. 0, /*tp_dictoffset*/
  137308. 0, /*tp_init*/
  137309. 0, /*tp_alloc*/
  137310. __pyx_tp_new_6uvloop_4loop__TCPConnectRequest, /*tp_new*/
  137311. 0, /*tp_free*/
  137312. 0, /*tp_is_gc*/
  137313. 0, /*tp_bases*/
  137314. 0, /*tp_mro*/
  137315. 0, /*tp_cache*/
  137316. 0, /*tp_subclasses*/
  137317. 0, /*tp_weaklist*/
  137318. 0, /*tp_del*/
  137319. 0, /*tp_version_tag*/
  137320. #if PY_VERSION_HEX >= 0x030400a1
  137321. 0, /*tp_finalize*/
  137322. #endif
  137323. #if PY_VERSION_HEX >= 0x030800b1
  137324. 0, /*tp_vectorcall*/
  137325. #endif
  137326. };
  137327. static struct __pyx_vtabstruct_6uvloop_4loop__PipeConnectRequest __pyx_vtable_6uvloop_4loop__PipeConnectRequest;
  137328. static PyObject *__pyx_tp_new_6uvloop_4loop__PipeConnectRequest(PyTypeObject *t, PyObject *a, PyObject *k) {
  137329. struct __pyx_obj_6uvloop_4loop__PipeConnectRequest *p;
  137330. PyObject *o = __pyx_tp_new_6uvloop_4loop_UVRequest(t, a, k);
  137331. if (unlikely(!o)) return 0;
  137332. p = ((struct __pyx_obj_6uvloop_4loop__PipeConnectRequest *)o);
  137333. p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6uvloop_4loop_UVRequest*)__pyx_vtabptr_6uvloop_4loop__PipeConnectRequest;
  137334. p->transport = ((struct __pyx_obj_6uvloop_4loop_UnixTransport *)Py_None); Py_INCREF(Py_None);
  137335. if (unlikely(__pyx_pw_6uvloop_4loop_19_PipeConnectRequest_1__cinit__(o, a, k) < 0)) goto bad;
  137336. return o;
  137337. bad:
  137338. Py_DECREF(o); o = 0;
  137339. return NULL;
  137340. }
  137341. static void __pyx_tp_dealloc_6uvloop_4loop__PipeConnectRequest(PyObject *o) {
  137342. struct __pyx_obj_6uvloop_4loop__PipeConnectRequest *p = (struct __pyx_obj_6uvloop_4loop__PipeConnectRequest *)o;
  137343. #if CYTHON_USE_TP_FINALIZE
  137344. if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
  137345. if (PyObject_CallFinalizerFromDealloc(o)) return;
  137346. }
  137347. #endif
  137348. PyObject_GC_UnTrack(o);
  137349. Py_CLEAR(p->transport);
  137350. PyObject_GC_Track(o);
  137351. __pyx_tp_dealloc_6uvloop_4loop_UVRequest(o);
  137352. }
  137353. static int __pyx_tp_traverse_6uvloop_4loop__PipeConnectRequest(PyObject *o, visitproc v, void *a) {
  137354. int e;
  137355. struct __pyx_obj_6uvloop_4loop__PipeConnectRequest *p = (struct __pyx_obj_6uvloop_4loop__PipeConnectRequest *)o;
  137356. e = __pyx_tp_traverse_6uvloop_4loop_UVRequest(o, v, a); if (e) return e;
  137357. if (p->transport) {
  137358. e = (*v)(((PyObject *)p->transport), a); if (e) return e;
  137359. }
  137360. return 0;
  137361. }
  137362. static int __pyx_tp_clear_6uvloop_4loop__PipeConnectRequest(PyObject *o) {
  137363. PyObject* tmp;
  137364. struct __pyx_obj_6uvloop_4loop__PipeConnectRequest *p = (struct __pyx_obj_6uvloop_4loop__PipeConnectRequest *)o;
  137365. __pyx_tp_clear_6uvloop_4loop_UVRequest(o);
  137366. tmp = ((PyObject*)p->transport);
  137367. p->transport = ((struct __pyx_obj_6uvloop_4loop_UnixTransport *)Py_None); Py_INCREF(Py_None);
  137368. Py_XDECREF(tmp);
  137369. return 0;
  137370. }
  137371. static PyMethodDef __pyx_methods_6uvloop_4loop__PipeConnectRequest[] = {
  137372. {"__reduce_cython__", (PyCFunction)__pyx_pw_6uvloop_4loop_19_PipeConnectRequest_3__reduce_cython__, METH_NOARGS, __pyx_doc_6uvloop_4loop_19_PipeConnectRequest_2__reduce_cython__},
  137373. {"__setstate_cython__", (PyCFunction)__pyx_pw_6uvloop_4loop_19_PipeConnectRequest_5__setstate_cython__, METH_O, __pyx_doc_6uvloop_4loop_19_PipeConnectRequest_4__setstate_cython__},
  137374. {0, 0, 0, 0}
  137375. };
  137376. static PyTypeObject __pyx_type_6uvloop_4loop__PipeConnectRequest = {
  137377. PyVarObject_HEAD_INIT(0, 0)
  137378. "uvloop.loop._PipeConnectRequest", /*tp_name*/
  137379. sizeof(struct __pyx_obj_6uvloop_4loop__PipeConnectRequest), /*tp_basicsize*/
  137380. 0, /*tp_itemsize*/
  137381. __pyx_tp_dealloc_6uvloop_4loop__PipeConnectRequest, /*tp_dealloc*/
  137382. 0, /*tp_print*/
  137383. 0, /*tp_getattr*/
  137384. 0, /*tp_setattr*/
  137385. #if PY_MAJOR_VERSION < 3
  137386. 0, /*tp_compare*/
  137387. #endif
  137388. #if PY_MAJOR_VERSION >= 3
  137389. 0, /*tp_as_async*/
  137390. #endif
  137391. 0, /*tp_repr*/
  137392. 0, /*tp_as_number*/
  137393. 0, /*tp_as_sequence*/
  137394. 0, /*tp_as_mapping*/
  137395. 0, /*tp_hash*/
  137396. 0, /*tp_call*/
  137397. 0, /*tp_str*/
  137398. 0, /*tp_getattro*/
  137399. 0, /*tp_setattro*/
  137400. 0, /*tp_as_buffer*/
  137401. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  137402. 0, /*tp_doc*/
  137403. __pyx_tp_traverse_6uvloop_4loop__PipeConnectRequest, /*tp_traverse*/
  137404. __pyx_tp_clear_6uvloop_4loop__PipeConnectRequest, /*tp_clear*/
  137405. 0, /*tp_richcompare*/
  137406. 0, /*tp_weaklistoffset*/
  137407. 0, /*tp_iter*/
  137408. 0, /*tp_iternext*/
  137409. __pyx_methods_6uvloop_4loop__PipeConnectRequest, /*tp_methods*/
  137410. 0, /*tp_members*/
  137411. 0, /*tp_getset*/
  137412. 0, /*tp_base*/
  137413. 0, /*tp_dict*/
  137414. 0, /*tp_descr_get*/
  137415. 0, /*tp_descr_set*/
  137416. 0, /*tp_dictoffset*/
  137417. 0, /*tp_init*/
  137418. 0, /*tp_alloc*/
  137419. __pyx_tp_new_6uvloop_4loop__PipeConnectRequest, /*tp_new*/
  137420. 0, /*tp_free*/
  137421. 0, /*tp_is_gc*/
  137422. 0, /*tp_bases*/
  137423. 0, /*tp_mro*/
  137424. 0, /*tp_cache*/
  137425. 0, /*tp_subclasses*/
  137426. 0, /*tp_weaklist*/
  137427. 0, /*tp_del*/
  137428. 0, /*tp_version_tag*/
  137429. #if PY_VERSION_HEX >= 0x030400a1
  137430. 0, /*tp_finalize*/
  137431. #endif
  137432. #if PY_VERSION_HEX >= 0x030800b1
  137433. 0, /*tp_vectorcall*/
  137434. #endif
  137435. };
  137436. static struct __pyx_obj_6uvloop_4loop_SockAddrHolder *__pyx_freelist_6uvloop_4loop_SockAddrHolder[250];
  137437. static int __pyx_freecount_6uvloop_4loop_SockAddrHolder = 0;
  137438. static PyObject *__pyx_tp_new_6uvloop_4loop_SockAddrHolder(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  137439. PyObject *o;
  137440. if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6uvloop_4loop_SockAddrHolder > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop_SockAddrHolder)) & ((t->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)) == 0))) {
  137441. o = (PyObject*)__pyx_freelist_6uvloop_4loop_SockAddrHolder[--__pyx_freecount_6uvloop_4loop_SockAddrHolder];
  137442. memset(o, 0, sizeof(struct __pyx_obj_6uvloop_4loop_SockAddrHolder));
  137443. (void) PyObject_INIT(o, t);
  137444. } else {
  137445. if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
  137446. o = (*t->tp_alloc)(t, 0);
  137447. } else {
  137448. o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  137449. }
  137450. if (unlikely(!o)) return 0;
  137451. }
  137452. return o;
  137453. }
  137454. static void __pyx_tp_dealloc_6uvloop_4loop_SockAddrHolder(PyObject *o) {
  137455. #if CYTHON_USE_TP_FINALIZE
  137456. if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
  137457. if (PyObject_CallFinalizerFromDealloc(o)) return;
  137458. }
  137459. #endif
  137460. if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6uvloop_4loop_SockAddrHolder < 250) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop_SockAddrHolder)) & ((Py_TYPE(o)->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)) == 0))) {
  137461. __pyx_freelist_6uvloop_4loop_SockAddrHolder[__pyx_freecount_6uvloop_4loop_SockAddrHolder++] = ((struct __pyx_obj_6uvloop_4loop_SockAddrHolder *)o);
  137462. } else {
  137463. (*Py_TYPE(o)->tp_free)(o);
  137464. }
  137465. }
  137466. static PyMethodDef __pyx_methods_6uvloop_4loop_SockAddrHolder[] = {
  137467. {"__reduce_cython__", (PyCFunction)__pyx_pw_6uvloop_4loop_14SockAddrHolder_1__reduce_cython__, METH_NOARGS, __pyx_doc_6uvloop_4loop_14SockAddrHolder___reduce_cython__},
  137468. {"__setstate_cython__", (PyCFunction)__pyx_pw_6uvloop_4loop_14SockAddrHolder_3__setstate_cython__, METH_O, __pyx_doc_6uvloop_4loop_14SockAddrHolder_2__setstate_cython__},
  137469. {0, 0, 0, 0}
  137470. };
  137471. static PyTypeObject __pyx_type_6uvloop_4loop_SockAddrHolder = {
  137472. PyVarObject_HEAD_INIT(0, 0)
  137473. "uvloop.loop.SockAddrHolder", /*tp_name*/
  137474. sizeof(struct __pyx_obj_6uvloop_4loop_SockAddrHolder), /*tp_basicsize*/
  137475. 0, /*tp_itemsize*/
  137476. __pyx_tp_dealloc_6uvloop_4loop_SockAddrHolder, /*tp_dealloc*/
  137477. 0, /*tp_print*/
  137478. 0, /*tp_getattr*/
  137479. 0, /*tp_setattr*/
  137480. #if PY_MAJOR_VERSION < 3
  137481. 0, /*tp_compare*/
  137482. #endif
  137483. #if PY_MAJOR_VERSION >= 3
  137484. 0, /*tp_as_async*/
  137485. #endif
  137486. 0, /*tp_repr*/
  137487. 0, /*tp_as_number*/
  137488. 0, /*tp_as_sequence*/
  137489. 0, /*tp_as_mapping*/
  137490. 0, /*tp_hash*/
  137491. 0, /*tp_call*/
  137492. 0, /*tp_str*/
  137493. 0, /*tp_getattro*/
  137494. 0, /*tp_setattro*/
  137495. 0, /*tp_as_buffer*/
  137496. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  137497. 0, /*tp_doc*/
  137498. 0, /*tp_traverse*/
  137499. 0, /*tp_clear*/
  137500. 0, /*tp_richcompare*/
  137501. 0, /*tp_weaklistoffset*/
  137502. 0, /*tp_iter*/
  137503. 0, /*tp_iternext*/
  137504. __pyx_methods_6uvloop_4loop_SockAddrHolder, /*tp_methods*/
  137505. 0, /*tp_members*/
  137506. 0, /*tp_getset*/
  137507. 0, /*tp_base*/
  137508. 0, /*tp_dict*/
  137509. 0, /*tp_descr_get*/
  137510. 0, /*tp_descr_set*/
  137511. 0, /*tp_dictoffset*/
  137512. 0, /*tp_init*/
  137513. 0, /*tp_alloc*/
  137514. __pyx_tp_new_6uvloop_4loop_SockAddrHolder, /*tp_new*/
  137515. 0, /*tp_free*/
  137516. 0, /*tp_is_gc*/
  137517. 0, /*tp_bases*/
  137518. 0, /*tp_mro*/
  137519. 0, /*tp_cache*/
  137520. 0, /*tp_subclasses*/
  137521. 0, /*tp_weaklist*/
  137522. 0, /*tp_del*/
  137523. 0, /*tp_version_tag*/
  137524. #if PY_VERSION_HEX >= 0x030400a1
  137525. 0, /*tp_finalize*/
  137526. #endif
  137527. #if PY_VERSION_HEX >= 0x030800b1
  137528. 0, /*tp_vectorcall*/
  137529. #endif
  137530. };
  137531. static struct __pyx_vtabstruct_6uvloop_4loop_AddrInfo __pyx_vtable_6uvloop_4loop_AddrInfo;
  137532. static struct __pyx_obj_6uvloop_4loop_AddrInfo *__pyx_freelist_6uvloop_4loop_AddrInfo[250];
  137533. static int __pyx_freecount_6uvloop_4loop_AddrInfo = 0;
  137534. static PyObject *__pyx_tp_new_6uvloop_4loop_AddrInfo(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  137535. struct __pyx_obj_6uvloop_4loop_AddrInfo *p;
  137536. PyObject *o;
  137537. if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6uvloop_4loop_AddrInfo > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop_AddrInfo)) & ((t->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)) == 0))) {
  137538. o = (PyObject*)__pyx_freelist_6uvloop_4loop_AddrInfo[--__pyx_freecount_6uvloop_4loop_AddrInfo];
  137539. memset(o, 0, sizeof(struct __pyx_obj_6uvloop_4loop_AddrInfo));
  137540. (void) PyObject_INIT(o, t);
  137541. } else {
  137542. if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
  137543. o = (*t->tp_alloc)(t, 0);
  137544. } else {
  137545. o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  137546. }
  137547. if (unlikely(!o)) return 0;
  137548. }
  137549. p = ((struct __pyx_obj_6uvloop_4loop_AddrInfo *)o);
  137550. p->__pyx_vtab = __pyx_vtabptr_6uvloop_4loop_AddrInfo;
  137551. if (unlikely(__pyx_pw_6uvloop_4loop_8AddrInfo_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad;
  137552. return o;
  137553. bad:
  137554. Py_DECREF(o); o = 0;
  137555. return NULL;
  137556. }
  137557. static void __pyx_tp_dealloc_6uvloop_4loop_AddrInfo(PyObject *o) {
  137558. #if CYTHON_USE_TP_FINALIZE
  137559. if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
  137560. if (PyObject_CallFinalizerFromDealloc(o)) return;
  137561. }
  137562. #endif
  137563. {
  137564. PyObject *etype, *eval, *etb;
  137565. PyErr_Fetch(&etype, &eval, &etb);
  137566. ++Py_REFCNT(o);
  137567. __pyx_pw_6uvloop_4loop_8AddrInfo_3__dealloc__(o);
  137568. --Py_REFCNT(o);
  137569. PyErr_Restore(etype, eval, etb);
  137570. }
  137571. if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6uvloop_4loop_AddrInfo < 250) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop_AddrInfo)) & ((Py_TYPE(o)->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)) == 0))) {
  137572. __pyx_freelist_6uvloop_4loop_AddrInfo[__pyx_freecount_6uvloop_4loop_AddrInfo++] = ((struct __pyx_obj_6uvloop_4loop_AddrInfo *)o);
  137573. } else {
  137574. (*Py_TYPE(o)->tp_free)(o);
  137575. }
  137576. }
  137577. static PyMethodDef __pyx_methods_6uvloop_4loop_AddrInfo[] = {
  137578. {"__reduce_cython__", (PyCFunction)__pyx_pw_6uvloop_4loop_8AddrInfo_5__reduce_cython__, METH_NOARGS, __pyx_doc_6uvloop_4loop_8AddrInfo_4__reduce_cython__},
  137579. {"__setstate_cython__", (PyCFunction)__pyx_pw_6uvloop_4loop_8AddrInfo_7__setstate_cython__, METH_O, __pyx_doc_6uvloop_4loop_8AddrInfo_6__setstate_cython__},
  137580. {0, 0, 0, 0}
  137581. };
  137582. static PyTypeObject __pyx_type_6uvloop_4loop_AddrInfo = {
  137583. PyVarObject_HEAD_INIT(0, 0)
  137584. "uvloop.loop.AddrInfo", /*tp_name*/
  137585. sizeof(struct __pyx_obj_6uvloop_4loop_AddrInfo), /*tp_basicsize*/
  137586. 0, /*tp_itemsize*/
  137587. __pyx_tp_dealloc_6uvloop_4loop_AddrInfo, /*tp_dealloc*/
  137588. 0, /*tp_print*/
  137589. 0, /*tp_getattr*/
  137590. 0, /*tp_setattr*/
  137591. #if PY_MAJOR_VERSION < 3
  137592. 0, /*tp_compare*/
  137593. #endif
  137594. #if PY_MAJOR_VERSION >= 3
  137595. 0, /*tp_as_async*/
  137596. #endif
  137597. 0, /*tp_repr*/
  137598. 0, /*tp_as_number*/
  137599. 0, /*tp_as_sequence*/
  137600. 0, /*tp_as_mapping*/
  137601. 0, /*tp_hash*/
  137602. 0, /*tp_call*/
  137603. 0, /*tp_str*/
  137604. 0, /*tp_getattro*/
  137605. 0, /*tp_setattro*/
  137606. 0, /*tp_as_buffer*/
  137607. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  137608. 0, /*tp_doc*/
  137609. 0, /*tp_traverse*/
  137610. 0, /*tp_clear*/
  137611. 0, /*tp_richcompare*/
  137612. 0, /*tp_weaklistoffset*/
  137613. 0, /*tp_iter*/
  137614. 0, /*tp_iternext*/
  137615. __pyx_methods_6uvloop_4loop_AddrInfo, /*tp_methods*/
  137616. 0, /*tp_members*/
  137617. 0, /*tp_getset*/
  137618. 0, /*tp_base*/
  137619. 0, /*tp_dict*/
  137620. 0, /*tp_descr_get*/
  137621. 0, /*tp_descr_set*/
  137622. 0, /*tp_dictoffset*/
  137623. 0, /*tp_init*/
  137624. 0, /*tp_alloc*/
  137625. __pyx_tp_new_6uvloop_4loop_AddrInfo, /*tp_new*/
  137626. 0, /*tp_free*/
  137627. 0, /*tp_is_gc*/
  137628. 0, /*tp_bases*/
  137629. 0, /*tp_mro*/
  137630. 0, /*tp_cache*/
  137631. 0, /*tp_subclasses*/
  137632. 0, /*tp_weaklist*/
  137633. 0, /*tp_del*/
  137634. 0, /*tp_version_tag*/
  137635. #if PY_VERSION_HEX >= 0x030400a1
  137636. 0, /*tp_finalize*/
  137637. #endif
  137638. #if PY_VERSION_HEX >= 0x030800b1
  137639. 0, /*tp_vectorcall*/
  137640. #endif
  137641. };
  137642. static struct __pyx_vtabstruct_6uvloop_4loop_AddrInfoRequest __pyx_vtable_6uvloop_4loop_AddrInfoRequest;
  137643. static PyObject *__pyx_tp_new_6uvloop_4loop_AddrInfoRequest(PyTypeObject *t, PyObject *a, PyObject *k) {
  137644. struct __pyx_obj_6uvloop_4loop_AddrInfoRequest *p;
  137645. PyObject *o = __pyx_tp_new_6uvloop_4loop_UVRequest(t, a, k);
  137646. if (unlikely(!o)) return 0;
  137647. p = ((struct __pyx_obj_6uvloop_4loop_AddrInfoRequest *)o);
  137648. p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6uvloop_4loop_UVRequest*)__pyx_vtabptr_6uvloop_4loop_AddrInfoRequest;
  137649. p->callback = Py_None; Py_INCREF(Py_None);
  137650. if (unlikely(__pyx_pw_6uvloop_4loop_15AddrInfoRequest_1__cinit__(o, a, k) < 0)) goto bad;
  137651. return o;
  137652. bad:
  137653. Py_DECREF(o); o = 0;
  137654. return NULL;
  137655. }
  137656. static void __pyx_tp_dealloc_6uvloop_4loop_AddrInfoRequest(PyObject *o) {
  137657. struct __pyx_obj_6uvloop_4loop_AddrInfoRequest *p = (struct __pyx_obj_6uvloop_4loop_AddrInfoRequest *)o;
  137658. #if CYTHON_USE_TP_FINALIZE
  137659. if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
  137660. if (PyObject_CallFinalizerFromDealloc(o)) return;
  137661. }
  137662. #endif
  137663. PyObject_GC_UnTrack(o);
  137664. Py_CLEAR(p->callback);
  137665. PyObject_GC_Track(o);
  137666. __pyx_tp_dealloc_6uvloop_4loop_UVRequest(o);
  137667. }
  137668. static int __pyx_tp_traverse_6uvloop_4loop_AddrInfoRequest(PyObject *o, visitproc v, void *a) {
  137669. int e;
  137670. struct __pyx_obj_6uvloop_4loop_AddrInfoRequest *p = (struct __pyx_obj_6uvloop_4loop_AddrInfoRequest *)o;
  137671. e = __pyx_tp_traverse_6uvloop_4loop_UVRequest(o, v, a); if (e) return e;
  137672. if (p->callback) {
  137673. e = (*v)(p->callback, a); if (e) return e;
  137674. }
  137675. return 0;
  137676. }
  137677. static int __pyx_tp_clear_6uvloop_4loop_AddrInfoRequest(PyObject *o) {
  137678. PyObject* tmp;
  137679. struct __pyx_obj_6uvloop_4loop_AddrInfoRequest *p = (struct __pyx_obj_6uvloop_4loop_AddrInfoRequest *)o;
  137680. __pyx_tp_clear_6uvloop_4loop_UVRequest(o);
  137681. tmp = ((PyObject*)p->callback);
  137682. p->callback = Py_None; Py_INCREF(Py_None);
  137683. Py_XDECREF(tmp);
  137684. return 0;
  137685. }
  137686. static PyMethodDef __pyx_methods_6uvloop_4loop_AddrInfoRequest[] = {
  137687. {"__reduce_cython__", (PyCFunction)__pyx_pw_6uvloop_4loop_15AddrInfoRequest_3__reduce_cython__, METH_NOARGS, __pyx_doc_6uvloop_4loop_15AddrInfoRequest_2__reduce_cython__},
  137688. {"__setstate_cython__", (PyCFunction)__pyx_pw_6uvloop_4loop_15AddrInfoRequest_5__setstate_cython__, METH_O, __pyx_doc_6uvloop_4loop_15AddrInfoRequest_4__setstate_cython__},
  137689. {0, 0, 0, 0}
  137690. };
  137691. static PyTypeObject __pyx_type_6uvloop_4loop_AddrInfoRequest = {
  137692. PyVarObject_HEAD_INIT(0, 0)
  137693. "uvloop.loop.AddrInfoRequest", /*tp_name*/
  137694. sizeof(struct __pyx_obj_6uvloop_4loop_AddrInfoRequest), /*tp_basicsize*/
  137695. 0, /*tp_itemsize*/
  137696. __pyx_tp_dealloc_6uvloop_4loop_AddrInfoRequest, /*tp_dealloc*/
  137697. 0, /*tp_print*/
  137698. 0, /*tp_getattr*/
  137699. 0, /*tp_setattr*/
  137700. #if PY_MAJOR_VERSION < 3
  137701. 0, /*tp_compare*/
  137702. #endif
  137703. #if PY_MAJOR_VERSION >= 3
  137704. 0, /*tp_as_async*/
  137705. #endif
  137706. 0, /*tp_repr*/
  137707. 0, /*tp_as_number*/
  137708. 0, /*tp_as_sequence*/
  137709. 0, /*tp_as_mapping*/
  137710. 0, /*tp_hash*/
  137711. 0, /*tp_call*/
  137712. 0, /*tp_str*/
  137713. 0, /*tp_getattro*/
  137714. 0, /*tp_setattro*/
  137715. 0, /*tp_as_buffer*/
  137716. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  137717. 0, /*tp_doc*/
  137718. __pyx_tp_traverse_6uvloop_4loop_AddrInfoRequest, /*tp_traverse*/
  137719. __pyx_tp_clear_6uvloop_4loop_AddrInfoRequest, /*tp_clear*/
  137720. 0, /*tp_richcompare*/
  137721. 0, /*tp_weaklistoffset*/
  137722. 0, /*tp_iter*/
  137723. 0, /*tp_iternext*/
  137724. __pyx_methods_6uvloop_4loop_AddrInfoRequest, /*tp_methods*/
  137725. 0, /*tp_members*/
  137726. 0, /*tp_getset*/
  137727. 0, /*tp_base*/
  137728. 0, /*tp_dict*/
  137729. 0, /*tp_descr_get*/
  137730. 0, /*tp_descr_set*/
  137731. 0, /*tp_dictoffset*/
  137732. 0, /*tp_init*/
  137733. 0, /*tp_alloc*/
  137734. __pyx_tp_new_6uvloop_4loop_AddrInfoRequest, /*tp_new*/
  137735. 0, /*tp_free*/
  137736. 0, /*tp_is_gc*/
  137737. 0, /*tp_bases*/
  137738. 0, /*tp_mro*/
  137739. 0, /*tp_cache*/
  137740. 0, /*tp_subclasses*/
  137741. 0, /*tp_weaklist*/
  137742. 0, /*tp_del*/
  137743. 0, /*tp_version_tag*/
  137744. #if PY_VERSION_HEX >= 0x030400a1
  137745. 0, /*tp_finalize*/
  137746. #endif
  137747. #if PY_VERSION_HEX >= 0x030800b1
  137748. 0, /*tp_vectorcall*/
  137749. #endif
  137750. };
  137751. static struct __pyx_vtabstruct_6uvloop_4loop_NameInfoRequest __pyx_vtable_6uvloop_4loop_NameInfoRequest;
  137752. static PyObject *__pyx_tp_new_6uvloop_4loop_NameInfoRequest(PyTypeObject *t, PyObject *a, PyObject *k) {
  137753. struct __pyx_obj_6uvloop_4loop_NameInfoRequest *p;
  137754. PyObject *o = __pyx_tp_new_6uvloop_4loop_UVRequest(t, a, k);
  137755. if (unlikely(!o)) return 0;
  137756. p = ((struct __pyx_obj_6uvloop_4loop_NameInfoRequest *)o);
  137757. p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6uvloop_4loop_UVRequest*)__pyx_vtabptr_6uvloop_4loop_NameInfoRequest;
  137758. p->callback = Py_None; Py_INCREF(Py_None);
  137759. if (unlikely(__pyx_pw_6uvloop_4loop_15NameInfoRequest_1__cinit__(o, a, k) < 0)) goto bad;
  137760. return o;
  137761. bad:
  137762. Py_DECREF(o); o = 0;
  137763. return NULL;
  137764. }
  137765. static void __pyx_tp_dealloc_6uvloop_4loop_NameInfoRequest(PyObject *o) {
  137766. struct __pyx_obj_6uvloop_4loop_NameInfoRequest *p = (struct __pyx_obj_6uvloop_4loop_NameInfoRequest *)o;
  137767. #if CYTHON_USE_TP_FINALIZE
  137768. if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
  137769. if (PyObject_CallFinalizerFromDealloc(o)) return;
  137770. }
  137771. #endif
  137772. PyObject_GC_UnTrack(o);
  137773. Py_CLEAR(p->callback);
  137774. PyObject_GC_Track(o);
  137775. __pyx_tp_dealloc_6uvloop_4loop_UVRequest(o);
  137776. }
  137777. static int __pyx_tp_traverse_6uvloop_4loop_NameInfoRequest(PyObject *o, visitproc v, void *a) {
  137778. int e;
  137779. struct __pyx_obj_6uvloop_4loop_NameInfoRequest *p = (struct __pyx_obj_6uvloop_4loop_NameInfoRequest *)o;
  137780. e = __pyx_tp_traverse_6uvloop_4loop_UVRequest(o, v, a); if (e) return e;
  137781. if (p->callback) {
  137782. e = (*v)(p->callback, a); if (e) return e;
  137783. }
  137784. return 0;
  137785. }
  137786. static int __pyx_tp_clear_6uvloop_4loop_NameInfoRequest(PyObject *o) {
  137787. PyObject* tmp;
  137788. struct __pyx_obj_6uvloop_4loop_NameInfoRequest *p = (struct __pyx_obj_6uvloop_4loop_NameInfoRequest *)o;
  137789. __pyx_tp_clear_6uvloop_4loop_UVRequest(o);
  137790. tmp = ((PyObject*)p->callback);
  137791. p->callback = Py_None; Py_INCREF(Py_None);
  137792. Py_XDECREF(tmp);
  137793. return 0;
  137794. }
  137795. static PyMethodDef __pyx_methods_6uvloop_4loop_NameInfoRequest[] = {
  137796. {"__reduce_cython__", (PyCFunction)__pyx_pw_6uvloop_4loop_15NameInfoRequest_3__reduce_cython__, METH_NOARGS, __pyx_doc_6uvloop_4loop_15NameInfoRequest_2__reduce_cython__},
  137797. {"__setstate_cython__", (PyCFunction)__pyx_pw_6uvloop_4loop_15NameInfoRequest_5__setstate_cython__, METH_O, __pyx_doc_6uvloop_4loop_15NameInfoRequest_4__setstate_cython__},
  137798. {0, 0, 0, 0}
  137799. };
  137800. static PyTypeObject __pyx_type_6uvloop_4loop_NameInfoRequest = {
  137801. PyVarObject_HEAD_INIT(0, 0)
  137802. "uvloop.loop.NameInfoRequest", /*tp_name*/
  137803. sizeof(struct __pyx_obj_6uvloop_4loop_NameInfoRequest), /*tp_basicsize*/
  137804. 0, /*tp_itemsize*/
  137805. __pyx_tp_dealloc_6uvloop_4loop_NameInfoRequest, /*tp_dealloc*/
  137806. 0, /*tp_print*/
  137807. 0, /*tp_getattr*/
  137808. 0, /*tp_setattr*/
  137809. #if PY_MAJOR_VERSION < 3
  137810. 0, /*tp_compare*/
  137811. #endif
  137812. #if PY_MAJOR_VERSION >= 3
  137813. 0, /*tp_as_async*/
  137814. #endif
  137815. 0, /*tp_repr*/
  137816. 0, /*tp_as_number*/
  137817. 0, /*tp_as_sequence*/
  137818. 0, /*tp_as_mapping*/
  137819. 0, /*tp_hash*/
  137820. 0, /*tp_call*/
  137821. 0, /*tp_str*/
  137822. 0, /*tp_getattro*/
  137823. 0, /*tp_setattro*/
  137824. 0, /*tp_as_buffer*/
  137825. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  137826. 0, /*tp_doc*/
  137827. __pyx_tp_traverse_6uvloop_4loop_NameInfoRequest, /*tp_traverse*/
  137828. __pyx_tp_clear_6uvloop_4loop_NameInfoRequest, /*tp_clear*/
  137829. 0, /*tp_richcompare*/
  137830. 0, /*tp_weaklistoffset*/
  137831. 0, /*tp_iter*/
  137832. 0, /*tp_iternext*/
  137833. __pyx_methods_6uvloop_4loop_NameInfoRequest, /*tp_methods*/
  137834. 0, /*tp_members*/
  137835. 0, /*tp_getset*/
  137836. 0, /*tp_base*/
  137837. 0, /*tp_dict*/
  137838. 0, /*tp_descr_get*/
  137839. 0, /*tp_descr_set*/
  137840. 0, /*tp_dictoffset*/
  137841. 0, /*tp_init*/
  137842. 0, /*tp_alloc*/
  137843. __pyx_tp_new_6uvloop_4loop_NameInfoRequest, /*tp_new*/
  137844. 0, /*tp_free*/
  137845. 0, /*tp_is_gc*/
  137846. 0, /*tp_bases*/
  137847. 0, /*tp_mro*/
  137848. 0, /*tp_cache*/
  137849. 0, /*tp_subclasses*/
  137850. 0, /*tp_weaklist*/
  137851. 0, /*tp_del*/
  137852. 0, /*tp_version_tag*/
  137853. #if PY_VERSION_HEX >= 0x030400a1
  137854. 0, /*tp_finalize*/
  137855. #endif
  137856. #if PY_VERSION_HEX >= 0x030800b1
  137857. 0, /*tp_vectorcall*/
  137858. #endif
  137859. };
  137860. static struct __pyx_vtabstruct_6uvloop_4loop__UDPSendContext __pyx_vtable_6uvloop_4loop__UDPSendContext;
  137861. static struct __pyx_obj_6uvloop_4loop__UDPSendContext *__pyx_freelist_6uvloop_4loop__UDPSendContext[250];
  137862. static int __pyx_freecount_6uvloop_4loop__UDPSendContext = 0;
  137863. static PyObject *__pyx_tp_new_6uvloop_4loop__UDPSendContext(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  137864. struct __pyx_obj_6uvloop_4loop__UDPSendContext *p;
  137865. PyObject *o;
  137866. if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6uvloop_4loop__UDPSendContext > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop__UDPSendContext)) & ((t->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)) == 0))) {
  137867. o = (PyObject*)__pyx_freelist_6uvloop_4loop__UDPSendContext[--__pyx_freecount_6uvloop_4loop__UDPSendContext];
  137868. memset(o, 0, sizeof(struct __pyx_obj_6uvloop_4loop__UDPSendContext));
  137869. (void) PyObject_INIT(o, t);
  137870. PyObject_GC_Track(o);
  137871. } else {
  137872. if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
  137873. o = (*t->tp_alloc)(t, 0);
  137874. } else {
  137875. o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  137876. }
  137877. if (unlikely(!o)) return 0;
  137878. }
  137879. p = ((struct __pyx_obj_6uvloop_4loop__UDPSendContext *)o);
  137880. p->__pyx_vtab = __pyx_vtabptr_6uvloop_4loop__UDPSendContext;
  137881. p->udp = ((struct __pyx_obj_6uvloop_4loop_UDPTransport *)Py_None); Py_INCREF(Py_None);
  137882. p->py_buf.obj = NULL;
  137883. return o;
  137884. }
  137885. static void __pyx_tp_dealloc_6uvloop_4loop__UDPSendContext(PyObject *o) {
  137886. struct __pyx_obj_6uvloop_4loop__UDPSendContext *p = (struct __pyx_obj_6uvloop_4loop__UDPSendContext *)o;
  137887. #if CYTHON_USE_TP_FINALIZE
  137888. if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
  137889. if (PyObject_CallFinalizerFromDealloc(o)) return;
  137890. }
  137891. #endif
  137892. PyObject_GC_UnTrack(o);
  137893. {
  137894. PyObject *etype, *eval, *etb;
  137895. PyErr_Fetch(&etype, &eval, &etb);
  137896. ++Py_REFCNT(o);
  137897. __pyx_pw_6uvloop_4loop_15_UDPSendContext_1__dealloc__(o);
  137898. --Py_REFCNT(o);
  137899. PyErr_Restore(etype, eval, etb);
  137900. }
  137901. Py_CLEAR(p->udp);
  137902. if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6uvloop_4loop__UDPSendContext < 250) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop__UDPSendContext)) & ((Py_TYPE(o)->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)) == 0))) {
  137903. __pyx_freelist_6uvloop_4loop__UDPSendContext[__pyx_freecount_6uvloop_4loop__UDPSendContext++] = ((struct __pyx_obj_6uvloop_4loop__UDPSendContext *)o);
  137904. } else {
  137905. (*Py_TYPE(o)->tp_free)(o);
  137906. }
  137907. }
  137908. static int __pyx_tp_traverse_6uvloop_4loop__UDPSendContext(PyObject *o, visitproc v, void *a) {
  137909. int e;
  137910. struct __pyx_obj_6uvloop_4loop__UDPSendContext *p = (struct __pyx_obj_6uvloop_4loop__UDPSendContext *)o;
  137911. if (p->udp) {
  137912. e = (*v)(((PyObject *)p->udp), a); if (e) return e;
  137913. }
  137914. if (p->py_buf.obj) {
  137915. e = (*v)(p->py_buf.obj, a); if (e) return e;
  137916. }
  137917. return 0;
  137918. }
  137919. static PyMethodDef __pyx_methods_6uvloop_4loop__UDPSendContext[] = {
  137920. {"__reduce_cython__", (PyCFunction)__pyx_pw_6uvloop_4loop_15_UDPSendContext_3__reduce_cython__, METH_NOARGS, __pyx_doc_6uvloop_4loop_15_UDPSendContext_2__reduce_cython__},
  137921. {"__setstate_cython__", (PyCFunction)__pyx_pw_6uvloop_4loop_15_UDPSendContext_5__setstate_cython__, METH_O, __pyx_doc_6uvloop_4loop_15_UDPSendContext_4__setstate_cython__},
  137922. {0, 0, 0, 0}
  137923. };
  137924. static PyTypeObject __pyx_type_6uvloop_4loop__UDPSendContext = {
  137925. PyVarObject_HEAD_INIT(0, 0)
  137926. "uvloop.loop._UDPSendContext", /*tp_name*/
  137927. sizeof(struct __pyx_obj_6uvloop_4loop__UDPSendContext), /*tp_basicsize*/
  137928. 0, /*tp_itemsize*/
  137929. __pyx_tp_dealloc_6uvloop_4loop__UDPSendContext, /*tp_dealloc*/
  137930. 0, /*tp_print*/
  137931. 0, /*tp_getattr*/
  137932. 0, /*tp_setattr*/
  137933. #if PY_MAJOR_VERSION < 3
  137934. 0, /*tp_compare*/
  137935. #endif
  137936. #if PY_MAJOR_VERSION >= 3
  137937. 0, /*tp_as_async*/
  137938. #endif
  137939. 0, /*tp_repr*/
  137940. 0, /*tp_as_number*/
  137941. 0, /*tp_as_sequence*/
  137942. 0, /*tp_as_mapping*/
  137943. 0, /*tp_hash*/
  137944. 0, /*tp_call*/
  137945. 0, /*tp_str*/
  137946. 0, /*tp_getattro*/
  137947. 0, /*tp_setattro*/
  137948. 0, /*tp_as_buffer*/
  137949. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  137950. 0, /*tp_doc*/
  137951. __pyx_tp_traverse_6uvloop_4loop__UDPSendContext, /*tp_traverse*/
  137952. 0, /*tp_clear*/
  137953. 0, /*tp_richcompare*/
  137954. 0, /*tp_weaklistoffset*/
  137955. 0, /*tp_iter*/
  137956. 0, /*tp_iternext*/
  137957. __pyx_methods_6uvloop_4loop__UDPSendContext, /*tp_methods*/
  137958. 0, /*tp_members*/
  137959. 0, /*tp_getset*/
  137960. 0, /*tp_base*/
  137961. 0, /*tp_dict*/
  137962. 0, /*tp_descr_get*/
  137963. 0, /*tp_descr_set*/
  137964. 0, /*tp_dictoffset*/
  137965. 0, /*tp_init*/
  137966. 0, /*tp_alloc*/
  137967. __pyx_tp_new_6uvloop_4loop__UDPSendContext, /*tp_new*/
  137968. 0, /*tp_free*/
  137969. 0, /*tp_is_gc*/
  137970. 0, /*tp_bases*/
  137971. 0, /*tp_mro*/
  137972. 0, /*tp_cache*/
  137973. 0, /*tp_subclasses*/
  137974. 0, /*tp_weaklist*/
  137975. 0, /*tp_del*/
  137976. 0, /*tp_version_tag*/
  137977. #if PY_VERSION_HEX >= 0x030400a1
  137978. 0, /*tp_finalize*/
  137979. #endif
  137980. #if PY_VERSION_HEX >= 0x030800b1
  137981. 0, /*tp_vectorcall*/
  137982. #endif
  137983. };
  137984. static struct __pyx_obj_6uvloop_4loop___pyx_scope_struct___getaddrinfo *__pyx_freelist_6uvloop_4loop___pyx_scope_struct___getaddrinfo[8];
  137985. static int __pyx_freecount_6uvloop_4loop___pyx_scope_struct___getaddrinfo = 0;
  137986. static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct___getaddrinfo(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  137987. PyObject *o;
  137988. if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6uvloop_4loop___pyx_scope_struct___getaddrinfo > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct___getaddrinfo)))) {
  137989. o = (PyObject*)__pyx_freelist_6uvloop_4loop___pyx_scope_struct___getaddrinfo[--__pyx_freecount_6uvloop_4loop___pyx_scope_struct___getaddrinfo];
  137990. memset(o, 0, sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct___getaddrinfo));
  137991. (void) PyObject_INIT(o, t);
  137992. PyObject_GC_Track(o);
  137993. } else {
  137994. o = (*t->tp_alloc)(t, 0);
  137995. if (unlikely(!o)) return 0;
  137996. }
  137997. return o;
  137998. }
  137999. static void __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct___getaddrinfo(PyObject *o) {
  138000. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct___getaddrinfo *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct___getaddrinfo *)o;
  138001. PyObject_GC_UnTrack(o);
  138002. Py_CLEAR(p->__pyx_v_fut);
  138003. if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6uvloop_4loop___pyx_scope_struct___getaddrinfo < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct___getaddrinfo)))) {
  138004. __pyx_freelist_6uvloop_4loop___pyx_scope_struct___getaddrinfo[__pyx_freecount_6uvloop_4loop___pyx_scope_struct___getaddrinfo++] = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct___getaddrinfo *)o);
  138005. } else {
  138006. (*Py_TYPE(o)->tp_free)(o);
  138007. }
  138008. }
  138009. static int __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct___getaddrinfo(PyObject *o, visitproc v, void *a) {
  138010. int e;
  138011. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct___getaddrinfo *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct___getaddrinfo *)o;
  138012. if (p->__pyx_v_fut) {
  138013. e = (*v)(p->__pyx_v_fut, a); if (e) return e;
  138014. }
  138015. return 0;
  138016. }
  138017. static int __pyx_tp_clear_6uvloop_4loop___pyx_scope_struct___getaddrinfo(PyObject *o) {
  138018. PyObject* tmp;
  138019. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct___getaddrinfo *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct___getaddrinfo *)o;
  138020. tmp = ((PyObject*)p->__pyx_v_fut);
  138021. p->__pyx_v_fut = Py_None; Py_INCREF(Py_None);
  138022. Py_XDECREF(tmp);
  138023. return 0;
  138024. }
  138025. static PyTypeObject __pyx_type_6uvloop_4loop___pyx_scope_struct___getaddrinfo = {
  138026. PyVarObject_HEAD_INIT(0, 0)
  138027. "uvloop.loop.__pyx_scope_struct___getaddrinfo", /*tp_name*/
  138028. sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct___getaddrinfo), /*tp_basicsize*/
  138029. 0, /*tp_itemsize*/
  138030. __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct___getaddrinfo, /*tp_dealloc*/
  138031. 0, /*tp_print*/
  138032. 0, /*tp_getattr*/
  138033. 0, /*tp_setattr*/
  138034. #if PY_MAJOR_VERSION < 3
  138035. 0, /*tp_compare*/
  138036. #endif
  138037. #if PY_MAJOR_VERSION >= 3
  138038. 0, /*tp_as_async*/
  138039. #endif
  138040. 0, /*tp_repr*/
  138041. 0, /*tp_as_number*/
  138042. 0, /*tp_as_sequence*/
  138043. 0, /*tp_as_mapping*/
  138044. 0, /*tp_hash*/
  138045. 0, /*tp_call*/
  138046. 0, /*tp_str*/
  138047. 0, /*tp_getattro*/
  138048. 0, /*tp_setattro*/
  138049. 0, /*tp_as_buffer*/
  138050. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  138051. 0, /*tp_doc*/
  138052. __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct___getaddrinfo, /*tp_traverse*/
  138053. __pyx_tp_clear_6uvloop_4loop___pyx_scope_struct___getaddrinfo, /*tp_clear*/
  138054. 0, /*tp_richcompare*/
  138055. 0, /*tp_weaklistoffset*/
  138056. 0, /*tp_iter*/
  138057. 0, /*tp_iternext*/
  138058. 0, /*tp_methods*/
  138059. 0, /*tp_members*/
  138060. 0, /*tp_getset*/
  138061. 0, /*tp_base*/
  138062. 0, /*tp_dict*/
  138063. 0, /*tp_descr_get*/
  138064. 0, /*tp_descr_set*/
  138065. 0, /*tp_dictoffset*/
  138066. 0, /*tp_init*/
  138067. 0, /*tp_alloc*/
  138068. __pyx_tp_new_6uvloop_4loop___pyx_scope_struct___getaddrinfo, /*tp_new*/
  138069. 0, /*tp_free*/
  138070. 0, /*tp_is_gc*/
  138071. 0, /*tp_bases*/
  138072. 0, /*tp_mro*/
  138073. 0, /*tp_cache*/
  138074. 0, /*tp_subclasses*/
  138075. 0, /*tp_weaklist*/
  138076. 0, /*tp_del*/
  138077. 0, /*tp_version_tag*/
  138078. #if PY_VERSION_HEX >= 0x030400a1
  138079. 0, /*tp_finalize*/
  138080. #endif
  138081. #if PY_VERSION_HEX >= 0x030800b1
  138082. 0, /*tp_vectorcall*/
  138083. #endif
  138084. };
  138085. static struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_1__getnameinfo *__pyx_freelist_6uvloop_4loop___pyx_scope_struct_1__getnameinfo[8];
  138086. static int __pyx_freecount_6uvloop_4loop___pyx_scope_struct_1__getnameinfo = 0;
  138087. static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_1__getnameinfo(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  138088. PyObject *o;
  138089. if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_1__getnameinfo > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_1__getnameinfo)))) {
  138090. o = (PyObject*)__pyx_freelist_6uvloop_4loop___pyx_scope_struct_1__getnameinfo[--__pyx_freecount_6uvloop_4loop___pyx_scope_struct_1__getnameinfo];
  138091. memset(o, 0, sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_1__getnameinfo));
  138092. (void) PyObject_INIT(o, t);
  138093. PyObject_GC_Track(o);
  138094. } else {
  138095. o = (*t->tp_alloc)(t, 0);
  138096. if (unlikely(!o)) return 0;
  138097. }
  138098. return o;
  138099. }
  138100. static void __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_1__getnameinfo(PyObject *o) {
  138101. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_1__getnameinfo *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_1__getnameinfo *)o;
  138102. PyObject_GC_UnTrack(o);
  138103. Py_CLEAR(p->__pyx_v_fut);
  138104. if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_1__getnameinfo < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_1__getnameinfo)))) {
  138105. __pyx_freelist_6uvloop_4loop___pyx_scope_struct_1__getnameinfo[__pyx_freecount_6uvloop_4loop___pyx_scope_struct_1__getnameinfo++] = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_1__getnameinfo *)o);
  138106. } else {
  138107. (*Py_TYPE(o)->tp_free)(o);
  138108. }
  138109. }
  138110. static int __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_1__getnameinfo(PyObject *o, visitproc v, void *a) {
  138111. int e;
  138112. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_1__getnameinfo *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_1__getnameinfo *)o;
  138113. if (p->__pyx_v_fut) {
  138114. e = (*v)(p->__pyx_v_fut, a); if (e) return e;
  138115. }
  138116. return 0;
  138117. }
  138118. static int __pyx_tp_clear_6uvloop_4loop___pyx_scope_struct_1__getnameinfo(PyObject *o) {
  138119. PyObject* tmp;
  138120. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_1__getnameinfo *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_1__getnameinfo *)o;
  138121. tmp = ((PyObject*)p->__pyx_v_fut);
  138122. p->__pyx_v_fut = Py_None; Py_INCREF(Py_None);
  138123. Py_XDECREF(tmp);
  138124. return 0;
  138125. }
  138126. static PyTypeObject __pyx_type_6uvloop_4loop___pyx_scope_struct_1__getnameinfo = {
  138127. PyVarObject_HEAD_INIT(0, 0)
  138128. "uvloop.loop.__pyx_scope_struct_1__getnameinfo", /*tp_name*/
  138129. sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_1__getnameinfo), /*tp_basicsize*/
  138130. 0, /*tp_itemsize*/
  138131. __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_1__getnameinfo, /*tp_dealloc*/
  138132. 0, /*tp_print*/
  138133. 0, /*tp_getattr*/
  138134. 0, /*tp_setattr*/
  138135. #if PY_MAJOR_VERSION < 3
  138136. 0, /*tp_compare*/
  138137. #endif
  138138. #if PY_MAJOR_VERSION >= 3
  138139. 0, /*tp_as_async*/
  138140. #endif
  138141. 0, /*tp_repr*/
  138142. 0, /*tp_as_number*/
  138143. 0, /*tp_as_sequence*/
  138144. 0, /*tp_as_mapping*/
  138145. 0, /*tp_hash*/
  138146. 0, /*tp_call*/
  138147. 0, /*tp_str*/
  138148. 0, /*tp_getattro*/
  138149. 0, /*tp_setattro*/
  138150. 0, /*tp_as_buffer*/
  138151. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  138152. 0, /*tp_doc*/
  138153. __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_1__getnameinfo, /*tp_traverse*/
  138154. __pyx_tp_clear_6uvloop_4loop___pyx_scope_struct_1__getnameinfo, /*tp_clear*/
  138155. 0, /*tp_richcompare*/
  138156. 0, /*tp_weaklistoffset*/
  138157. 0, /*tp_iter*/
  138158. 0, /*tp_iternext*/
  138159. 0, /*tp_methods*/
  138160. 0, /*tp_members*/
  138161. 0, /*tp_getset*/
  138162. 0, /*tp_base*/
  138163. 0, /*tp_dict*/
  138164. 0, /*tp_descr_get*/
  138165. 0, /*tp_descr_set*/
  138166. 0, /*tp_dictoffset*/
  138167. 0, /*tp_init*/
  138168. 0, /*tp_alloc*/
  138169. __pyx_tp_new_6uvloop_4loop___pyx_scope_struct_1__getnameinfo, /*tp_new*/
  138170. 0, /*tp_free*/
  138171. 0, /*tp_is_gc*/
  138172. 0, /*tp_bases*/
  138173. 0, /*tp_mro*/
  138174. 0, /*tp_cache*/
  138175. 0, /*tp_subclasses*/
  138176. 0, /*tp_weaklist*/
  138177. 0, /*tp_del*/
  138178. 0, /*tp_version_tag*/
  138179. #if PY_VERSION_HEX >= 0x030400a1
  138180. 0, /*tp_finalize*/
  138181. #endif
  138182. #if PY_VERSION_HEX >= 0x030800b1
  138183. 0, /*tp_vectorcall*/
  138184. #endif
  138185. };
  138186. static struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_2__sock_connect *__pyx_freelist_6uvloop_4loop___pyx_scope_struct_2__sock_connect[8];
  138187. static int __pyx_freecount_6uvloop_4loop___pyx_scope_struct_2__sock_connect = 0;
  138188. static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_2__sock_connect(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  138189. PyObject *o;
  138190. if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_2__sock_connect > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_2__sock_connect)))) {
  138191. o = (PyObject*)__pyx_freelist_6uvloop_4loop___pyx_scope_struct_2__sock_connect[--__pyx_freecount_6uvloop_4loop___pyx_scope_struct_2__sock_connect];
  138192. memset(o, 0, sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_2__sock_connect));
  138193. (void) PyObject_INIT(o, t);
  138194. PyObject_GC_Track(o);
  138195. } else {
  138196. o = (*t->tp_alloc)(t, 0);
  138197. if (unlikely(!o)) return 0;
  138198. }
  138199. return o;
  138200. }
  138201. static void __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_2__sock_connect(PyObject *o) {
  138202. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_2__sock_connect *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_2__sock_connect *)o;
  138203. PyObject_GC_UnTrack(o);
  138204. Py_CLEAR(p->__pyx_v_self);
  138205. Py_CLEAR(p->__pyx_v_sock);
  138206. if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_2__sock_connect < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_2__sock_connect)))) {
  138207. __pyx_freelist_6uvloop_4loop___pyx_scope_struct_2__sock_connect[__pyx_freecount_6uvloop_4loop___pyx_scope_struct_2__sock_connect++] = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_2__sock_connect *)o);
  138208. } else {
  138209. (*Py_TYPE(o)->tp_free)(o);
  138210. }
  138211. }
  138212. static int __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_2__sock_connect(PyObject *o, visitproc v, void *a) {
  138213. int e;
  138214. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_2__sock_connect *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_2__sock_connect *)o;
  138215. if (p->__pyx_v_self) {
  138216. e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  138217. }
  138218. if (p->__pyx_v_sock) {
  138219. e = (*v)(p->__pyx_v_sock, a); if (e) return e;
  138220. }
  138221. return 0;
  138222. }
  138223. static int __pyx_tp_clear_6uvloop_4loop___pyx_scope_struct_2__sock_connect(PyObject *o) {
  138224. PyObject* tmp;
  138225. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_2__sock_connect *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_2__sock_connect *)o;
  138226. tmp = ((PyObject*)p->__pyx_v_self);
  138227. p->__pyx_v_self = ((struct __pyx_obj_6uvloop_4loop_Loop *)Py_None); Py_INCREF(Py_None);
  138228. Py_XDECREF(tmp);
  138229. tmp = ((PyObject*)p->__pyx_v_sock);
  138230. p->__pyx_v_sock = Py_None; Py_INCREF(Py_None);
  138231. Py_XDECREF(tmp);
  138232. return 0;
  138233. }
  138234. static PyTypeObject __pyx_type_6uvloop_4loop___pyx_scope_struct_2__sock_connect = {
  138235. PyVarObject_HEAD_INIT(0, 0)
  138236. "uvloop.loop.__pyx_scope_struct_2__sock_connect", /*tp_name*/
  138237. sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_2__sock_connect), /*tp_basicsize*/
  138238. 0, /*tp_itemsize*/
  138239. __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_2__sock_connect, /*tp_dealloc*/
  138240. 0, /*tp_print*/
  138241. 0, /*tp_getattr*/
  138242. 0, /*tp_setattr*/
  138243. #if PY_MAJOR_VERSION < 3
  138244. 0, /*tp_compare*/
  138245. #endif
  138246. #if PY_MAJOR_VERSION >= 3
  138247. 0, /*tp_as_async*/
  138248. #endif
  138249. 0, /*tp_repr*/
  138250. 0, /*tp_as_number*/
  138251. 0, /*tp_as_sequence*/
  138252. 0, /*tp_as_mapping*/
  138253. 0, /*tp_hash*/
  138254. 0, /*tp_call*/
  138255. 0, /*tp_str*/
  138256. 0, /*tp_getattro*/
  138257. 0, /*tp_setattro*/
  138258. 0, /*tp_as_buffer*/
  138259. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  138260. 0, /*tp_doc*/
  138261. __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_2__sock_connect, /*tp_traverse*/
  138262. __pyx_tp_clear_6uvloop_4loop___pyx_scope_struct_2__sock_connect, /*tp_clear*/
  138263. 0, /*tp_richcompare*/
  138264. 0, /*tp_weaklistoffset*/
  138265. 0, /*tp_iter*/
  138266. 0, /*tp_iternext*/
  138267. 0, /*tp_methods*/
  138268. 0, /*tp_members*/
  138269. 0, /*tp_getset*/
  138270. 0, /*tp_base*/
  138271. 0, /*tp_dict*/
  138272. 0, /*tp_descr_get*/
  138273. 0, /*tp_descr_set*/
  138274. 0, /*tp_dictoffset*/
  138275. 0, /*tp_init*/
  138276. 0, /*tp_alloc*/
  138277. __pyx_tp_new_6uvloop_4loop___pyx_scope_struct_2__sock_connect, /*tp_new*/
  138278. 0, /*tp_free*/
  138279. 0, /*tp_is_gc*/
  138280. 0, /*tp_bases*/
  138281. 0, /*tp_mro*/
  138282. 0, /*tp_cache*/
  138283. 0, /*tp_subclasses*/
  138284. 0, /*tp_weaklist*/
  138285. 0, /*tp_del*/
  138286. 0, /*tp_version_tag*/
  138287. #if PY_VERSION_HEX >= 0x030400a1
  138288. 0, /*tp_finalize*/
  138289. #endif
  138290. #if PY_VERSION_HEX >= 0x030800b1
  138291. 0, /*tp_vectorcall*/
  138292. #endif
  138293. };
  138294. static struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_3___get__ *__pyx_freelist_6uvloop_4loop___pyx_scope_struct_3___get__[8];
  138295. static int __pyx_freecount_6uvloop_4loop___pyx_scope_struct_3___get__ = 0;
  138296. static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_3___get__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  138297. PyObject *o;
  138298. if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_3___get__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_3___get__)))) {
  138299. o = (PyObject*)__pyx_freelist_6uvloop_4loop___pyx_scope_struct_3___get__[--__pyx_freecount_6uvloop_4loop___pyx_scope_struct_3___get__];
  138300. memset(o, 0, sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_3___get__));
  138301. (void) PyObject_INIT(o, t);
  138302. PyObject_GC_Track(o);
  138303. } else {
  138304. o = (*t->tp_alloc)(t, 0);
  138305. if (unlikely(!o)) return 0;
  138306. }
  138307. return o;
  138308. }
  138309. static void __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_3___get__(PyObject *o) {
  138310. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_3___get__ *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_3___get__ *)o;
  138311. PyObject_GC_UnTrack(o);
  138312. Py_CLEAR(p->__pyx_v_self);
  138313. if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_3___get__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_3___get__)))) {
  138314. __pyx_freelist_6uvloop_4loop___pyx_scope_struct_3___get__[__pyx_freecount_6uvloop_4loop___pyx_scope_struct_3___get__++] = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_3___get__ *)o);
  138315. } else {
  138316. (*Py_TYPE(o)->tp_free)(o);
  138317. }
  138318. }
  138319. static int __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_3___get__(PyObject *o, visitproc v, void *a) {
  138320. int e;
  138321. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_3___get__ *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_3___get__ *)o;
  138322. if (p->__pyx_v_self) {
  138323. e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  138324. }
  138325. return 0;
  138326. }
  138327. static int __pyx_tp_clear_6uvloop_4loop___pyx_scope_struct_3___get__(PyObject *o) {
  138328. PyObject* tmp;
  138329. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_3___get__ *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_3___get__ *)o;
  138330. tmp = ((PyObject*)p->__pyx_v_self);
  138331. p->__pyx_v_self = ((struct __pyx_obj_6uvloop_4loop_Loop *)Py_None); Py_INCREF(Py_None);
  138332. Py_XDECREF(tmp);
  138333. return 0;
  138334. }
  138335. static PyTypeObject __pyx_type_6uvloop_4loop___pyx_scope_struct_3___get__ = {
  138336. PyVarObject_HEAD_INIT(0, 0)
  138337. "uvloop.loop.__pyx_scope_struct_3___get__", /*tp_name*/
  138338. sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_3___get__), /*tp_basicsize*/
  138339. 0, /*tp_itemsize*/
  138340. __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_3___get__, /*tp_dealloc*/
  138341. 0, /*tp_print*/
  138342. 0, /*tp_getattr*/
  138343. 0, /*tp_setattr*/
  138344. #if PY_MAJOR_VERSION < 3
  138345. 0, /*tp_compare*/
  138346. #endif
  138347. #if PY_MAJOR_VERSION >= 3
  138348. 0, /*tp_as_async*/
  138349. #endif
  138350. 0, /*tp_repr*/
  138351. 0, /*tp_as_number*/
  138352. 0, /*tp_as_sequence*/
  138353. 0, /*tp_as_mapping*/
  138354. 0, /*tp_hash*/
  138355. 0, /*tp_call*/
  138356. 0, /*tp_str*/
  138357. 0, /*tp_getattro*/
  138358. 0, /*tp_setattro*/
  138359. 0, /*tp_as_buffer*/
  138360. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  138361. 0, /*tp_doc*/
  138362. __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_3___get__, /*tp_traverse*/
  138363. __pyx_tp_clear_6uvloop_4loop___pyx_scope_struct_3___get__, /*tp_clear*/
  138364. 0, /*tp_richcompare*/
  138365. 0, /*tp_weaklistoffset*/
  138366. 0, /*tp_iter*/
  138367. 0, /*tp_iternext*/
  138368. 0, /*tp_methods*/
  138369. 0, /*tp_members*/
  138370. 0, /*tp_getset*/
  138371. 0, /*tp_base*/
  138372. 0, /*tp_dict*/
  138373. 0, /*tp_descr_get*/
  138374. 0, /*tp_descr_set*/
  138375. 0, /*tp_dictoffset*/
  138376. 0, /*tp_init*/
  138377. 0, /*tp_alloc*/
  138378. __pyx_tp_new_6uvloop_4loop___pyx_scope_struct_3___get__, /*tp_new*/
  138379. 0, /*tp_free*/
  138380. 0, /*tp_is_gc*/
  138381. 0, /*tp_bases*/
  138382. 0, /*tp_mro*/
  138383. 0, /*tp_cache*/
  138384. 0, /*tp_subclasses*/
  138385. 0, /*tp_weaklist*/
  138386. 0, /*tp_del*/
  138387. 0, /*tp_version_tag*/
  138388. #if PY_VERSION_HEX >= 0x030400a1
  138389. 0, /*tp_finalize*/
  138390. #endif
  138391. #if PY_VERSION_HEX >= 0x030800b1
  138392. 0, /*tp_vectorcall*/
  138393. #endif
  138394. };
  138395. static struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_4_run_until_complete *__pyx_freelist_6uvloop_4loop___pyx_scope_struct_4_run_until_complete[8];
  138396. static int __pyx_freecount_6uvloop_4loop___pyx_scope_struct_4_run_until_complete = 0;
  138397. static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_4_run_until_complete(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  138398. PyObject *o;
  138399. if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_4_run_until_complete > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_4_run_until_complete)))) {
  138400. o = (PyObject*)__pyx_freelist_6uvloop_4loop___pyx_scope_struct_4_run_until_complete[--__pyx_freecount_6uvloop_4loop___pyx_scope_struct_4_run_until_complete];
  138401. memset(o, 0, sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_4_run_until_complete));
  138402. (void) PyObject_INIT(o, t);
  138403. PyObject_GC_Track(o);
  138404. } else {
  138405. o = (*t->tp_alloc)(t, 0);
  138406. if (unlikely(!o)) return 0;
  138407. }
  138408. return o;
  138409. }
  138410. static void __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_4_run_until_complete(PyObject *o) {
  138411. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_4_run_until_complete *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_4_run_until_complete *)o;
  138412. PyObject_GC_UnTrack(o);
  138413. Py_CLEAR(p->__pyx_v_self);
  138414. if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_4_run_until_complete < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_4_run_until_complete)))) {
  138415. __pyx_freelist_6uvloop_4loop___pyx_scope_struct_4_run_until_complete[__pyx_freecount_6uvloop_4loop___pyx_scope_struct_4_run_until_complete++] = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_4_run_until_complete *)o);
  138416. } else {
  138417. (*Py_TYPE(o)->tp_free)(o);
  138418. }
  138419. }
  138420. static int __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_4_run_until_complete(PyObject *o, visitproc v, void *a) {
  138421. int e;
  138422. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_4_run_until_complete *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_4_run_until_complete *)o;
  138423. if (p->__pyx_v_self) {
  138424. e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  138425. }
  138426. return 0;
  138427. }
  138428. static int __pyx_tp_clear_6uvloop_4loop___pyx_scope_struct_4_run_until_complete(PyObject *o) {
  138429. PyObject* tmp;
  138430. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_4_run_until_complete *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_4_run_until_complete *)o;
  138431. tmp = ((PyObject*)p->__pyx_v_self);
  138432. p->__pyx_v_self = ((struct __pyx_obj_6uvloop_4loop_Loop *)Py_None); Py_INCREF(Py_None);
  138433. Py_XDECREF(tmp);
  138434. return 0;
  138435. }
  138436. static PyTypeObject __pyx_type_6uvloop_4loop___pyx_scope_struct_4_run_until_complete = {
  138437. PyVarObject_HEAD_INIT(0, 0)
  138438. "uvloop.loop.__pyx_scope_struct_4_run_until_complete", /*tp_name*/
  138439. sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_4_run_until_complete), /*tp_basicsize*/
  138440. 0, /*tp_itemsize*/
  138441. __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_4_run_until_complete, /*tp_dealloc*/
  138442. 0, /*tp_print*/
  138443. 0, /*tp_getattr*/
  138444. 0, /*tp_setattr*/
  138445. #if PY_MAJOR_VERSION < 3
  138446. 0, /*tp_compare*/
  138447. #endif
  138448. #if PY_MAJOR_VERSION >= 3
  138449. 0, /*tp_as_async*/
  138450. #endif
  138451. 0, /*tp_repr*/
  138452. 0, /*tp_as_number*/
  138453. 0, /*tp_as_sequence*/
  138454. 0, /*tp_as_mapping*/
  138455. 0, /*tp_hash*/
  138456. 0, /*tp_call*/
  138457. 0, /*tp_str*/
  138458. 0, /*tp_getattro*/
  138459. 0, /*tp_setattro*/
  138460. 0, /*tp_as_buffer*/
  138461. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  138462. 0, /*tp_doc*/
  138463. __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_4_run_until_complete, /*tp_traverse*/
  138464. __pyx_tp_clear_6uvloop_4loop___pyx_scope_struct_4_run_until_complete, /*tp_clear*/
  138465. 0, /*tp_richcompare*/
  138466. 0, /*tp_weaklistoffset*/
  138467. 0, /*tp_iter*/
  138468. 0, /*tp_iternext*/
  138469. 0, /*tp_methods*/
  138470. 0, /*tp_members*/
  138471. 0, /*tp_getset*/
  138472. 0, /*tp_base*/
  138473. 0, /*tp_dict*/
  138474. 0, /*tp_descr_get*/
  138475. 0, /*tp_descr_set*/
  138476. 0, /*tp_dictoffset*/
  138477. 0, /*tp_init*/
  138478. 0, /*tp_alloc*/
  138479. __pyx_tp_new_6uvloop_4loop___pyx_scope_struct_4_run_until_complete, /*tp_new*/
  138480. 0, /*tp_free*/
  138481. 0, /*tp_is_gc*/
  138482. 0, /*tp_bases*/
  138483. 0, /*tp_mro*/
  138484. 0, /*tp_cache*/
  138485. 0, /*tp_subclasses*/
  138486. 0, /*tp_weaklist*/
  138487. 0, /*tp_del*/
  138488. 0, /*tp_version_tag*/
  138489. #if PY_VERSION_HEX >= 0x030400a1
  138490. 0, /*tp_finalize*/
  138491. #endif
  138492. #if PY_VERSION_HEX >= 0x030800b1
  138493. 0, /*tp_vectorcall*/
  138494. #endif
  138495. };
  138496. static struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_5_getaddrinfo *__pyx_freelist_6uvloop_4loop___pyx_scope_struct_5_getaddrinfo[8];
  138497. static int __pyx_freecount_6uvloop_4loop___pyx_scope_struct_5_getaddrinfo = 0;
  138498. static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_5_getaddrinfo(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  138499. PyObject *o;
  138500. if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_5_getaddrinfo > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_5_getaddrinfo)))) {
  138501. o = (PyObject*)__pyx_freelist_6uvloop_4loop___pyx_scope_struct_5_getaddrinfo[--__pyx_freecount_6uvloop_4loop___pyx_scope_struct_5_getaddrinfo];
  138502. memset(o, 0, sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_5_getaddrinfo));
  138503. (void) PyObject_INIT(o, t);
  138504. PyObject_GC_Track(o);
  138505. } else {
  138506. o = (*t->tp_alloc)(t, 0);
  138507. if (unlikely(!o)) return 0;
  138508. }
  138509. return o;
  138510. }
  138511. static void __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_5_getaddrinfo(PyObject *o) {
  138512. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_5_getaddrinfo *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_5_getaddrinfo *)o;
  138513. PyObject_GC_UnTrack(o);
  138514. Py_CLEAR(p->__pyx_v_addr);
  138515. Py_CLEAR(p->__pyx_v_fut);
  138516. Py_CLEAR(p->__pyx_v_host);
  138517. Py_CLEAR(p->__pyx_v_port);
  138518. Py_CLEAR(p->__pyx_v_self);
  138519. if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_5_getaddrinfo < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_5_getaddrinfo)))) {
  138520. __pyx_freelist_6uvloop_4loop___pyx_scope_struct_5_getaddrinfo[__pyx_freecount_6uvloop_4loop___pyx_scope_struct_5_getaddrinfo++] = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_5_getaddrinfo *)o);
  138521. } else {
  138522. (*Py_TYPE(o)->tp_free)(o);
  138523. }
  138524. }
  138525. static int __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_5_getaddrinfo(PyObject *o, visitproc v, void *a) {
  138526. int e;
  138527. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_5_getaddrinfo *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_5_getaddrinfo *)o;
  138528. if (p->__pyx_v_addr) {
  138529. e = (*v)(p->__pyx_v_addr, a); if (e) return e;
  138530. }
  138531. if (p->__pyx_v_fut) {
  138532. e = (*v)(p->__pyx_v_fut, a); if (e) return e;
  138533. }
  138534. if (p->__pyx_v_host) {
  138535. e = (*v)(p->__pyx_v_host, a); if (e) return e;
  138536. }
  138537. if (p->__pyx_v_port) {
  138538. e = (*v)(p->__pyx_v_port, a); if (e) return e;
  138539. }
  138540. if (p->__pyx_v_self) {
  138541. e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  138542. }
  138543. return 0;
  138544. }
  138545. static PyTypeObject __pyx_type_6uvloop_4loop___pyx_scope_struct_5_getaddrinfo = {
  138546. PyVarObject_HEAD_INIT(0, 0)
  138547. "uvloop.loop.__pyx_scope_struct_5_getaddrinfo", /*tp_name*/
  138548. sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_5_getaddrinfo), /*tp_basicsize*/
  138549. 0, /*tp_itemsize*/
  138550. __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_5_getaddrinfo, /*tp_dealloc*/
  138551. 0, /*tp_print*/
  138552. 0, /*tp_getattr*/
  138553. 0, /*tp_setattr*/
  138554. #if PY_MAJOR_VERSION < 3
  138555. 0, /*tp_compare*/
  138556. #endif
  138557. #if PY_MAJOR_VERSION >= 3
  138558. 0, /*tp_as_async*/
  138559. #endif
  138560. 0, /*tp_repr*/
  138561. 0, /*tp_as_number*/
  138562. 0, /*tp_as_sequence*/
  138563. 0, /*tp_as_mapping*/
  138564. 0, /*tp_hash*/
  138565. 0, /*tp_call*/
  138566. 0, /*tp_str*/
  138567. 0, /*tp_getattro*/
  138568. 0, /*tp_setattro*/
  138569. 0, /*tp_as_buffer*/
  138570. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  138571. 0, /*tp_doc*/
  138572. __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_5_getaddrinfo, /*tp_traverse*/
  138573. 0, /*tp_clear*/
  138574. 0, /*tp_richcompare*/
  138575. 0, /*tp_weaklistoffset*/
  138576. 0, /*tp_iter*/
  138577. 0, /*tp_iternext*/
  138578. 0, /*tp_methods*/
  138579. 0, /*tp_members*/
  138580. 0, /*tp_getset*/
  138581. 0, /*tp_base*/
  138582. 0, /*tp_dict*/
  138583. 0, /*tp_descr_get*/
  138584. 0, /*tp_descr_set*/
  138585. 0, /*tp_dictoffset*/
  138586. 0, /*tp_init*/
  138587. 0, /*tp_alloc*/
  138588. __pyx_tp_new_6uvloop_4loop___pyx_scope_struct_5_getaddrinfo, /*tp_new*/
  138589. 0, /*tp_free*/
  138590. 0, /*tp_is_gc*/
  138591. 0, /*tp_bases*/
  138592. 0, /*tp_mro*/
  138593. 0, /*tp_cache*/
  138594. 0, /*tp_subclasses*/
  138595. 0, /*tp_weaklist*/
  138596. 0, /*tp_del*/
  138597. 0, /*tp_version_tag*/
  138598. #if PY_VERSION_HEX >= 0x030400a1
  138599. 0, /*tp_finalize*/
  138600. #endif
  138601. #if PY_VERSION_HEX >= 0x030800b1
  138602. 0, /*tp_vectorcall*/
  138603. #endif
  138604. };
  138605. static struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_6_getnameinfo *__pyx_freelist_6uvloop_4loop___pyx_scope_struct_6_getnameinfo[8];
  138606. static int __pyx_freecount_6uvloop_4loop___pyx_scope_struct_6_getnameinfo = 0;
  138607. static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_6_getnameinfo(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  138608. PyObject *o;
  138609. if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_6_getnameinfo > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_6_getnameinfo)))) {
  138610. o = (PyObject*)__pyx_freelist_6uvloop_4loop___pyx_scope_struct_6_getnameinfo[--__pyx_freecount_6uvloop_4loop___pyx_scope_struct_6_getnameinfo];
  138611. memset(o, 0, sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_6_getnameinfo));
  138612. (void) PyObject_INIT(o, t);
  138613. PyObject_GC_Track(o);
  138614. } else {
  138615. o = (*t->tp_alloc)(t, 0);
  138616. if (unlikely(!o)) return 0;
  138617. }
  138618. return o;
  138619. }
  138620. static void __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_6_getnameinfo(PyObject *o) {
  138621. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_6_getnameinfo *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_6_getnameinfo *)o;
  138622. PyObject_GC_UnTrack(o);
  138623. Py_CLEAR(p->__pyx_v_ai_cnt);
  138624. Py_CLEAR(p->__pyx_v_flowinfo);
  138625. Py_CLEAR(p->__pyx_v_msg);
  138626. Py_CLEAR(p->__pyx_v_scope_id);
  138627. Py_CLEAR(p->__pyx_v_self);
  138628. Py_CLEAR(p->__pyx_v_sockaddr);
  138629. if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_6_getnameinfo < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_6_getnameinfo)))) {
  138630. __pyx_freelist_6uvloop_4loop___pyx_scope_struct_6_getnameinfo[__pyx_freecount_6uvloop_4loop___pyx_scope_struct_6_getnameinfo++] = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_6_getnameinfo *)o);
  138631. } else {
  138632. (*Py_TYPE(o)->tp_free)(o);
  138633. }
  138634. }
  138635. static int __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_6_getnameinfo(PyObject *o, visitproc v, void *a) {
  138636. int e;
  138637. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_6_getnameinfo *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_6_getnameinfo *)o;
  138638. if (p->__pyx_v_ai_cnt) {
  138639. e = (*v)(((PyObject *)p->__pyx_v_ai_cnt), a); if (e) return e;
  138640. }
  138641. if (p->__pyx_v_flowinfo) {
  138642. e = (*v)(p->__pyx_v_flowinfo, a); if (e) return e;
  138643. }
  138644. if (p->__pyx_v_scope_id) {
  138645. e = (*v)(p->__pyx_v_scope_id, a); if (e) return e;
  138646. }
  138647. if (p->__pyx_v_self) {
  138648. e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  138649. }
  138650. if (p->__pyx_v_sockaddr) {
  138651. e = (*v)(p->__pyx_v_sockaddr, a); if (e) return e;
  138652. }
  138653. return 0;
  138654. }
  138655. static PyTypeObject __pyx_type_6uvloop_4loop___pyx_scope_struct_6_getnameinfo = {
  138656. PyVarObject_HEAD_INIT(0, 0)
  138657. "uvloop.loop.__pyx_scope_struct_6_getnameinfo", /*tp_name*/
  138658. sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_6_getnameinfo), /*tp_basicsize*/
  138659. 0, /*tp_itemsize*/
  138660. __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_6_getnameinfo, /*tp_dealloc*/
  138661. 0, /*tp_print*/
  138662. 0, /*tp_getattr*/
  138663. 0, /*tp_setattr*/
  138664. #if PY_MAJOR_VERSION < 3
  138665. 0, /*tp_compare*/
  138666. #endif
  138667. #if PY_MAJOR_VERSION >= 3
  138668. 0, /*tp_as_async*/
  138669. #endif
  138670. 0, /*tp_repr*/
  138671. 0, /*tp_as_number*/
  138672. 0, /*tp_as_sequence*/
  138673. 0, /*tp_as_mapping*/
  138674. 0, /*tp_hash*/
  138675. 0, /*tp_call*/
  138676. 0, /*tp_str*/
  138677. 0, /*tp_getattro*/
  138678. 0, /*tp_setattro*/
  138679. 0, /*tp_as_buffer*/
  138680. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  138681. 0, /*tp_doc*/
  138682. __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_6_getnameinfo, /*tp_traverse*/
  138683. 0, /*tp_clear*/
  138684. 0, /*tp_richcompare*/
  138685. 0, /*tp_weaklistoffset*/
  138686. 0, /*tp_iter*/
  138687. 0, /*tp_iternext*/
  138688. 0, /*tp_methods*/
  138689. 0, /*tp_members*/
  138690. 0, /*tp_getset*/
  138691. 0, /*tp_base*/
  138692. 0, /*tp_dict*/
  138693. 0, /*tp_descr_get*/
  138694. 0, /*tp_descr_set*/
  138695. 0, /*tp_dictoffset*/
  138696. 0, /*tp_init*/
  138697. 0, /*tp_alloc*/
  138698. __pyx_tp_new_6uvloop_4loop___pyx_scope_struct_6_getnameinfo, /*tp_new*/
  138699. 0, /*tp_free*/
  138700. 0, /*tp_is_gc*/
  138701. 0, /*tp_bases*/
  138702. 0, /*tp_mro*/
  138703. 0, /*tp_cache*/
  138704. 0, /*tp_subclasses*/
  138705. 0, /*tp_weaklist*/
  138706. 0, /*tp_del*/
  138707. 0, /*tp_version_tag*/
  138708. #if PY_VERSION_HEX >= 0x030400a1
  138709. 0, /*tp_finalize*/
  138710. #endif
  138711. #if PY_VERSION_HEX >= 0x030800b1
  138712. 0, /*tp_vectorcall*/
  138713. #endif
  138714. };
  138715. static struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_7_start_tls *__pyx_freelist_6uvloop_4loop___pyx_scope_struct_7_start_tls[8];
  138716. static int __pyx_freecount_6uvloop_4loop___pyx_scope_struct_7_start_tls = 0;
  138717. static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_7_start_tls(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  138718. PyObject *o;
  138719. if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_7_start_tls > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_7_start_tls)))) {
  138720. o = (PyObject*)__pyx_freelist_6uvloop_4loop___pyx_scope_struct_7_start_tls[--__pyx_freecount_6uvloop_4loop___pyx_scope_struct_7_start_tls];
  138721. memset(o, 0, sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_7_start_tls));
  138722. (void) PyObject_INIT(o, t);
  138723. PyObject_GC_Track(o);
  138724. } else {
  138725. o = (*t->tp_alloc)(t, 0);
  138726. if (unlikely(!o)) return 0;
  138727. }
  138728. return o;
  138729. }
  138730. static void __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_7_start_tls(PyObject *o) {
  138731. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_7_start_tls *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_7_start_tls *)o;
  138732. PyObject_GC_UnTrack(o);
  138733. Py_CLEAR(p->__pyx_v_app_transport);
  138734. Py_CLEAR(p->__pyx_v_conmade_cb);
  138735. Py_CLEAR(p->__pyx_v_protocol);
  138736. Py_CLEAR(p->__pyx_v_resume_cb);
  138737. Py_CLEAR(p->__pyx_v_self);
  138738. Py_CLEAR(p->__pyx_v_server_hostname);
  138739. Py_CLEAR(p->__pyx_v_server_side);
  138740. Py_CLEAR(p->__pyx_v_ssl_handshake_timeout);
  138741. Py_CLEAR(p->__pyx_v_ssl_protocol);
  138742. Py_CLEAR(p->__pyx_v_ssl_shutdown_timeout);
  138743. Py_CLEAR(p->__pyx_v_sslcontext);
  138744. Py_CLEAR(p->__pyx_v_transport);
  138745. Py_CLEAR(p->__pyx_v_waiter);
  138746. Py_CLEAR(p->__pyx_t_0);
  138747. Py_CLEAR(p->__pyx_t_1);
  138748. Py_CLEAR(p->__pyx_t_2);
  138749. if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_7_start_tls < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_7_start_tls)))) {
  138750. __pyx_freelist_6uvloop_4loop___pyx_scope_struct_7_start_tls[__pyx_freecount_6uvloop_4loop___pyx_scope_struct_7_start_tls++] = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_7_start_tls *)o);
  138751. } else {
  138752. (*Py_TYPE(o)->tp_free)(o);
  138753. }
  138754. }
  138755. static int __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_7_start_tls(PyObject *o, visitproc v, void *a) {
  138756. int e;
  138757. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_7_start_tls *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_7_start_tls *)o;
  138758. if (p->__pyx_v_app_transport) {
  138759. e = (*v)(p->__pyx_v_app_transport, a); if (e) return e;
  138760. }
  138761. if (p->__pyx_v_conmade_cb) {
  138762. e = (*v)(p->__pyx_v_conmade_cb, a); if (e) return e;
  138763. }
  138764. if (p->__pyx_v_protocol) {
  138765. e = (*v)(p->__pyx_v_protocol, a); if (e) return e;
  138766. }
  138767. if (p->__pyx_v_resume_cb) {
  138768. e = (*v)(p->__pyx_v_resume_cb, a); if (e) return e;
  138769. }
  138770. if (p->__pyx_v_self) {
  138771. e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  138772. }
  138773. if (p->__pyx_v_server_hostname) {
  138774. e = (*v)(p->__pyx_v_server_hostname, a); if (e) return e;
  138775. }
  138776. if (p->__pyx_v_server_side) {
  138777. e = (*v)(p->__pyx_v_server_side, a); if (e) return e;
  138778. }
  138779. if (p->__pyx_v_ssl_handshake_timeout) {
  138780. e = (*v)(p->__pyx_v_ssl_handshake_timeout, a); if (e) return e;
  138781. }
  138782. if (p->__pyx_v_ssl_protocol) {
  138783. e = (*v)(((PyObject *)p->__pyx_v_ssl_protocol), a); if (e) return e;
  138784. }
  138785. if (p->__pyx_v_ssl_shutdown_timeout) {
  138786. e = (*v)(p->__pyx_v_ssl_shutdown_timeout, a); if (e) return e;
  138787. }
  138788. if (p->__pyx_v_sslcontext) {
  138789. e = (*v)(p->__pyx_v_sslcontext, a); if (e) return e;
  138790. }
  138791. if (p->__pyx_v_transport) {
  138792. e = (*v)(p->__pyx_v_transport, a); if (e) return e;
  138793. }
  138794. if (p->__pyx_v_waiter) {
  138795. e = (*v)(p->__pyx_v_waiter, a); if (e) return e;
  138796. }
  138797. if (p->__pyx_t_0) {
  138798. e = (*v)(p->__pyx_t_0, a); if (e) return e;
  138799. }
  138800. if (p->__pyx_t_1) {
  138801. e = (*v)(p->__pyx_t_1, a); if (e) return e;
  138802. }
  138803. if (p->__pyx_t_2) {
  138804. e = (*v)(p->__pyx_t_2, a); if (e) return e;
  138805. }
  138806. return 0;
  138807. }
  138808. static PyTypeObject __pyx_type_6uvloop_4loop___pyx_scope_struct_7_start_tls = {
  138809. PyVarObject_HEAD_INIT(0, 0)
  138810. "uvloop.loop.__pyx_scope_struct_7_start_tls", /*tp_name*/
  138811. sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_7_start_tls), /*tp_basicsize*/
  138812. 0, /*tp_itemsize*/
  138813. __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_7_start_tls, /*tp_dealloc*/
  138814. 0, /*tp_print*/
  138815. 0, /*tp_getattr*/
  138816. 0, /*tp_setattr*/
  138817. #if PY_MAJOR_VERSION < 3
  138818. 0, /*tp_compare*/
  138819. #endif
  138820. #if PY_MAJOR_VERSION >= 3
  138821. 0, /*tp_as_async*/
  138822. #endif
  138823. 0, /*tp_repr*/
  138824. 0, /*tp_as_number*/
  138825. 0, /*tp_as_sequence*/
  138826. 0, /*tp_as_mapping*/
  138827. 0, /*tp_hash*/
  138828. 0, /*tp_call*/
  138829. 0, /*tp_str*/
  138830. 0, /*tp_getattro*/
  138831. 0, /*tp_setattro*/
  138832. 0, /*tp_as_buffer*/
  138833. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  138834. 0, /*tp_doc*/
  138835. __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_7_start_tls, /*tp_traverse*/
  138836. 0, /*tp_clear*/
  138837. 0, /*tp_richcompare*/
  138838. 0, /*tp_weaklistoffset*/
  138839. 0, /*tp_iter*/
  138840. 0, /*tp_iternext*/
  138841. 0, /*tp_methods*/
  138842. 0, /*tp_members*/
  138843. 0, /*tp_getset*/
  138844. 0, /*tp_base*/
  138845. 0, /*tp_dict*/
  138846. 0, /*tp_descr_get*/
  138847. 0, /*tp_descr_set*/
  138848. 0, /*tp_dictoffset*/
  138849. 0, /*tp_init*/
  138850. 0, /*tp_alloc*/
  138851. __pyx_tp_new_6uvloop_4loop___pyx_scope_struct_7_start_tls, /*tp_new*/
  138852. 0, /*tp_free*/
  138853. 0, /*tp_is_gc*/
  138854. 0, /*tp_bases*/
  138855. 0, /*tp_mro*/
  138856. 0, /*tp_cache*/
  138857. 0, /*tp_subclasses*/
  138858. 0, /*tp_weaklist*/
  138859. 0, /*tp_del*/
  138860. 0, /*tp_version_tag*/
  138861. #if PY_VERSION_HEX >= 0x030400a1
  138862. 0, /*tp_finalize*/
  138863. #endif
  138864. #if PY_VERSION_HEX >= 0x030800b1
  138865. 0, /*tp_vectorcall*/
  138866. #endif
  138867. };
  138868. static struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_8_create_server *__pyx_freelist_6uvloop_4loop___pyx_scope_struct_8_create_server[8];
  138869. static int __pyx_freecount_6uvloop_4loop___pyx_scope_struct_8_create_server = 0;
  138870. static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_8_create_server(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  138871. PyObject *o;
  138872. if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_8_create_server > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_8_create_server)))) {
  138873. o = (PyObject*)__pyx_freelist_6uvloop_4loop___pyx_scope_struct_8_create_server[--__pyx_freecount_6uvloop_4loop___pyx_scope_struct_8_create_server];
  138874. memset(o, 0, sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_8_create_server));
  138875. (void) PyObject_INIT(o, t);
  138876. PyObject_GC_Track(o);
  138877. } else {
  138878. o = (*t->tp_alloc)(t, 0);
  138879. if (unlikely(!o)) return 0;
  138880. }
  138881. return o;
  138882. }
  138883. static void __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_8_create_server(PyObject *o) {
  138884. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_8_create_server *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_8_create_server *)o;
  138885. PyObject_GC_UnTrack(o);
  138886. Py_CLEAR(p->__pyx_v_backlog);
  138887. Py_CLEAR(p->__pyx_v_err);
  138888. Py_CLEAR(p->__pyx_v_fs);
  138889. Py_CLEAR(p->__pyx_7genexpr__pyx_v_host);
  138890. Py_CLEAR(p->__pyx_v_host);
  138891. Py_CLEAR(p->__pyx_v_hosts);
  138892. Py_CLEAR(p->__pyx_v_info);
  138893. Py_CLEAR(p->__pyx_v_infos);
  138894. Py_CLEAR(p->__pyx_v_port);
  138895. Py_CLEAR(p->__pyx_v_protocol_factory);
  138896. Py_CLEAR(p->__pyx_v_pyaddr);
  138897. Py_CLEAR(p->__pyx_v_reuse_address);
  138898. Py_CLEAR(p->__pyx_v_reuse_port);
  138899. Py_CLEAR(p->__pyx_v_self);
  138900. Py_CLEAR(p->__pyx_v_server);
  138901. Py_CLEAR(p->__pyx_v_sock);
  138902. Py_CLEAR(p->__pyx_v_ssl);
  138903. Py_CLEAR(p->__pyx_v_ssl_handshake_timeout);
  138904. Py_CLEAR(p->__pyx_v_ssl_shutdown_timeout);
  138905. Py_CLEAR(p->__pyx_v_start_serving);
  138906. Py_CLEAR(p->__pyx_v_tcp);
  138907. if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_8_create_server < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_8_create_server)))) {
  138908. __pyx_freelist_6uvloop_4loop___pyx_scope_struct_8_create_server[__pyx_freecount_6uvloop_4loop___pyx_scope_struct_8_create_server++] = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_8_create_server *)o);
  138909. } else {
  138910. (*Py_TYPE(o)->tp_free)(o);
  138911. }
  138912. }
  138913. static int __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_8_create_server(PyObject *o, visitproc v, void *a) {
  138914. int e;
  138915. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_8_create_server *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_8_create_server *)o;
  138916. if (p->__pyx_v_backlog) {
  138917. e = (*v)(p->__pyx_v_backlog, a); if (e) return e;
  138918. }
  138919. if (p->__pyx_v_err) {
  138920. e = (*v)(p->__pyx_v_err, a); if (e) return e;
  138921. }
  138922. if (p->__pyx_v_fs) {
  138923. e = (*v)(p->__pyx_v_fs, a); if (e) return e;
  138924. }
  138925. if (p->__pyx_7genexpr__pyx_v_host) {
  138926. e = (*v)(p->__pyx_7genexpr__pyx_v_host, a); if (e) return e;
  138927. }
  138928. if (p->__pyx_v_host) {
  138929. e = (*v)(p->__pyx_v_host, a); if (e) return e;
  138930. }
  138931. if (p->__pyx_v_hosts) {
  138932. e = (*v)(p->__pyx_v_hosts, a); if (e) return e;
  138933. }
  138934. if (p->__pyx_v_info) {
  138935. e = (*v)(p->__pyx_v_info, a); if (e) return e;
  138936. }
  138937. if (p->__pyx_v_infos) {
  138938. e = (*v)(p->__pyx_v_infos, a); if (e) return e;
  138939. }
  138940. if (p->__pyx_v_port) {
  138941. e = (*v)(p->__pyx_v_port, a); if (e) return e;
  138942. }
  138943. if (p->__pyx_v_protocol_factory) {
  138944. e = (*v)(p->__pyx_v_protocol_factory, a); if (e) return e;
  138945. }
  138946. if (p->__pyx_v_pyaddr) {
  138947. e = (*v)(p->__pyx_v_pyaddr, a); if (e) return e;
  138948. }
  138949. if (p->__pyx_v_reuse_address) {
  138950. e = (*v)(p->__pyx_v_reuse_address, a); if (e) return e;
  138951. }
  138952. if (p->__pyx_v_reuse_port) {
  138953. e = (*v)(p->__pyx_v_reuse_port, a); if (e) return e;
  138954. }
  138955. if (p->__pyx_v_self) {
  138956. e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  138957. }
  138958. if (p->__pyx_v_server) {
  138959. e = (*v)(((PyObject *)p->__pyx_v_server), a); if (e) return e;
  138960. }
  138961. if (p->__pyx_v_sock) {
  138962. e = (*v)(p->__pyx_v_sock, a); if (e) return e;
  138963. }
  138964. if (p->__pyx_v_ssl) {
  138965. e = (*v)(p->__pyx_v_ssl, a); if (e) return e;
  138966. }
  138967. if (p->__pyx_v_ssl_handshake_timeout) {
  138968. e = (*v)(p->__pyx_v_ssl_handshake_timeout, a); if (e) return e;
  138969. }
  138970. if (p->__pyx_v_ssl_shutdown_timeout) {
  138971. e = (*v)(p->__pyx_v_ssl_shutdown_timeout, a); if (e) return e;
  138972. }
  138973. if (p->__pyx_v_start_serving) {
  138974. e = (*v)(p->__pyx_v_start_serving, a); if (e) return e;
  138975. }
  138976. if (p->__pyx_v_tcp) {
  138977. e = (*v)(((PyObject *)p->__pyx_v_tcp), a); if (e) return e;
  138978. }
  138979. return 0;
  138980. }
  138981. static PyTypeObject __pyx_type_6uvloop_4loop___pyx_scope_struct_8_create_server = {
  138982. PyVarObject_HEAD_INIT(0, 0)
  138983. "uvloop.loop.__pyx_scope_struct_8_create_server", /*tp_name*/
  138984. sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_8_create_server), /*tp_basicsize*/
  138985. 0, /*tp_itemsize*/
  138986. __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_8_create_server, /*tp_dealloc*/
  138987. 0, /*tp_print*/
  138988. 0, /*tp_getattr*/
  138989. 0, /*tp_setattr*/
  138990. #if PY_MAJOR_VERSION < 3
  138991. 0, /*tp_compare*/
  138992. #endif
  138993. #if PY_MAJOR_VERSION >= 3
  138994. 0, /*tp_as_async*/
  138995. #endif
  138996. 0, /*tp_repr*/
  138997. 0, /*tp_as_number*/
  138998. 0, /*tp_as_sequence*/
  138999. 0, /*tp_as_mapping*/
  139000. 0, /*tp_hash*/
  139001. 0, /*tp_call*/
  139002. 0, /*tp_str*/
  139003. 0, /*tp_getattro*/
  139004. 0, /*tp_setattro*/
  139005. 0, /*tp_as_buffer*/
  139006. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  139007. 0, /*tp_doc*/
  139008. __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_8_create_server, /*tp_traverse*/
  139009. 0, /*tp_clear*/
  139010. 0, /*tp_richcompare*/
  139011. 0, /*tp_weaklistoffset*/
  139012. 0, /*tp_iter*/
  139013. 0, /*tp_iternext*/
  139014. 0, /*tp_methods*/
  139015. 0, /*tp_members*/
  139016. 0, /*tp_getset*/
  139017. 0, /*tp_base*/
  139018. 0, /*tp_dict*/
  139019. 0, /*tp_descr_get*/
  139020. 0, /*tp_descr_set*/
  139021. 0, /*tp_dictoffset*/
  139022. 0, /*tp_init*/
  139023. 0, /*tp_alloc*/
  139024. __pyx_tp_new_6uvloop_4loop___pyx_scope_struct_8_create_server, /*tp_new*/
  139025. 0, /*tp_free*/
  139026. 0, /*tp_is_gc*/
  139027. 0, /*tp_bases*/
  139028. 0, /*tp_mro*/
  139029. 0, /*tp_cache*/
  139030. 0, /*tp_subclasses*/
  139031. 0, /*tp_weaklist*/
  139032. 0, /*tp_del*/
  139033. 0, /*tp_version_tag*/
  139034. #if PY_VERSION_HEX >= 0x030400a1
  139035. 0, /*tp_finalize*/
  139036. #endif
  139037. #if PY_VERSION_HEX >= 0x030800b1
  139038. 0, /*tp_vectorcall*/
  139039. #endif
  139040. };
  139041. static struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_9_create_connection *__pyx_freelist_6uvloop_4loop___pyx_scope_struct_9_create_connection[8];
  139042. static int __pyx_freecount_6uvloop_4loop___pyx_scope_struct_9_create_connection = 0;
  139043. static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_9_create_connection(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  139044. PyObject *o;
  139045. if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_9_create_connection > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_9_create_connection)))) {
  139046. o = (PyObject*)__pyx_freelist_6uvloop_4loop___pyx_scope_struct_9_create_connection[--__pyx_freecount_6uvloop_4loop___pyx_scope_struct_9_create_connection];
  139047. memset(o, 0, sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_9_create_connection));
  139048. (void) PyObject_INIT(o, t);
  139049. PyObject_GC_Track(o);
  139050. } else {
  139051. o = (*t->tp_alloc)(t, 0);
  139052. if (unlikely(!o)) return 0;
  139053. }
  139054. return o;
  139055. }
  139056. static void __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_9_create_connection(PyObject *o) {
  139057. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_9_create_connection *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_9_create_connection *)o;
  139058. PyObject_GC_UnTrack(o);
  139059. Py_CLEAR(p->__pyx_v_addr);
  139060. Py_CLEAR(p->__pyx_v_ai_local);
  139061. Py_CLEAR(p->__pyx_v_ai_remote);
  139062. Py_CLEAR(p->__pyx_v_app_protocol);
  139063. Py_CLEAR(p->__pyx_v_app_transport);
  139064. Py_CLEAR(p->__pyx_v_exc);
  139065. Py_CLEAR(p->__pyx_v_exceptions);
  139066. Py_CLEAR(p->__pyx_v_f1);
  139067. Py_CLEAR(p->__pyx_v_f2);
  139068. Py_CLEAR(p->__pyx_v_family);
  139069. Py_CLEAR(p->__pyx_v_flags);
  139070. Py_CLEAR(p->__pyx_v_fs);
  139071. Py_CLEAR(p->__pyx_v_genexpr);
  139072. Py_CLEAR(p->__pyx_v_host);
  139073. Py_CLEAR(p->__pyx_v_local_addr);
  139074. Py_CLEAR(p->__pyx_v_model);
  139075. Py_CLEAR(p->__pyx_v_port);
  139076. Py_CLEAR(p->__pyx_v_proto);
  139077. Py_CLEAR(p->__pyx_v_protocol);
  139078. Py_CLEAR(p->__pyx_v_protocol_factory);
  139079. Py_CLEAR(p->__pyx_v_self);
  139080. Py_CLEAR(p->__pyx_v_server_hostname);
  139081. Py_CLEAR(p->__pyx_v_sock);
  139082. Py_CLEAR(p->__pyx_v_ssl);
  139083. Py_CLEAR(p->__pyx_v_ssl_handshake_timeout);
  139084. Py_CLEAR(p->__pyx_v_ssl_shutdown_timeout);
  139085. Py_CLEAR(p->__pyx_v_ssl_waiter);
  139086. Py_CLEAR(p->__pyx_v_sslcontext);
  139087. Py_CLEAR(p->__pyx_v_tr);
  139088. Py_CLEAR(p->__pyx_v_waiter);
  139089. Py_CLEAR(p->__pyx_t_0);
  139090. Py_CLEAR(p->__pyx_t_1);
  139091. Py_CLEAR(p->__pyx_t_2);
  139092. if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_9_create_connection < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_9_create_connection)))) {
  139093. __pyx_freelist_6uvloop_4loop___pyx_scope_struct_9_create_connection[__pyx_freecount_6uvloop_4loop___pyx_scope_struct_9_create_connection++] = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_9_create_connection *)o);
  139094. } else {
  139095. (*Py_TYPE(o)->tp_free)(o);
  139096. }
  139097. }
  139098. static int __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_9_create_connection(PyObject *o, visitproc v, void *a) {
  139099. int e;
  139100. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_9_create_connection *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_9_create_connection *)o;
  139101. if (p->__pyx_v_addr) {
  139102. e = (*v)(p->__pyx_v_addr, a); if (e) return e;
  139103. }
  139104. if (p->__pyx_v_ai_local) {
  139105. e = (*v)(((PyObject *)p->__pyx_v_ai_local), a); if (e) return e;
  139106. }
  139107. if (p->__pyx_v_ai_remote) {
  139108. e = (*v)(((PyObject *)p->__pyx_v_ai_remote), a); if (e) return e;
  139109. }
  139110. if (p->__pyx_v_app_protocol) {
  139111. e = (*v)(p->__pyx_v_app_protocol, a); if (e) return e;
  139112. }
  139113. if (p->__pyx_v_app_transport) {
  139114. e = (*v)(p->__pyx_v_app_transport, a); if (e) return e;
  139115. }
  139116. if (p->__pyx_v_exc) {
  139117. e = (*v)(p->__pyx_v_exc, a); if (e) return e;
  139118. }
  139119. if (p->__pyx_v_exceptions) {
  139120. e = (*v)(p->__pyx_v_exceptions, a); if (e) return e;
  139121. }
  139122. if (p->__pyx_v_f1) {
  139123. e = (*v)(p->__pyx_v_f1, a); if (e) return e;
  139124. }
  139125. if (p->__pyx_v_f2) {
  139126. e = (*v)(p->__pyx_v_f2, a); if (e) return e;
  139127. }
  139128. if (p->__pyx_v_family) {
  139129. e = (*v)(p->__pyx_v_family, a); if (e) return e;
  139130. }
  139131. if (p->__pyx_v_flags) {
  139132. e = (*v)(p->__pyx_v_flags, a); if (e) return e;
  139133. }
  139134. if (p->__pyx_v_fs) {
  139135. e = (*v)(p->__pyx_v_fs, a); if (e) return e;
  139136. }
  139137. if (p->__pyx_v_genexpr) {
  139138. e = (*v)(p->__pyx_v_genexpr, a); if (e) return e;
  139139. }
  139140. if (p->__pyx_v_host) {
  139141. e = (*v)(p->__pyx_v_host, a); if (e) return e;
  139142. }
  139143. if (p->__pyx_v_local_addr) {
  139144. e = (*v)(p->__pyx_v_local_addr, a); if (e) return e;
  139145. }
  139146. if (p->__pyx_v_model) {
  139147. e = (*v)(p->__pyx_v_model, a); if (e) return e;
  139148. }
  139149. if (p->__pyx_v_port) {
  139150. e = (*v)(p->__pyx_v_port, a); if (e) return e;
  139151. }
  139152. if (p->__pyx_v_proto) {
  139153. e = (*v)(p->__pyx_v_proto, a); if (e) return e;
  139154. }
  139155. if (p->__pyx_v_protocol) {
  139156. e = (*v)(p->__pyx_v_protocol, a); if (e) return e;
  139157. }
  139158. if (p->__pyx_v_protocol_factory) {
  139159. e = (*v)(p->__pyx_v_protocol_factory, a); if (e) return e;
  139160. }
  139161. if (p->__pyx_v_self) {
  139162. e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  139163. }
  139164. if (p->__pyx_v_server_hostname) {
  139165. e = (*v)(p->__pyx_v_server_hostname, a); if (e) return e;
  139166. }
  139167. if (p->__pyx_v_sock) {
  139168. e = (*v)(p->__pyx_v_sock, a); if (e) return e;
  139169. }
  139170. if (p->__pyx_v_ssl) {
  139171. e = (*v)(p->__pyx_v_ssl, a); if (e) return e;
  139172. }
  139173. if (p->__pyx_v_ssl_handshake_timeout) {
  139174. e = (*v)(p->__pyx_v_ssl_handshake_timeout, a); if (e) return e;
  139175. }
  139176. if (p->__pyx_v_ssl_shutdown_timeout) {
  139177. e = (*v)(p->__pyx_v_ssl_shutdown_timeout, a); if (e) return e;
  139178. }
  139179. if (p->__pyx_v_ssl_waiter) {
  139180. e = (*v)(p->__pyx_v_ssl_waiter, a); if (e) return e;
  139181. }
  139182. if (p->__pyx_v_sslcontext) {
  139183. e = (*v)(p->__pyx_v_sslcontext, a); if (e) return e;
  139184. }
  139185. if (p->__pyx_v_tr) {
  139186. e = (*v)(((PyObject *)p->__pyx_v_tr), a); if (e) return e;
  139187. }
  139188. if (p->__pyx_v_waiter) {
  139189. e = (*v)(p->__pyx_v_waiter, a); if (e) return e;
  139190. }
  139191. if (p->__pyx_t_0) {
  139192. e = (*v)(p->__pyx_t_0, a); if (e) return e;
  139193. }
  139194. if (p->__pyx_t_1) {
  139195. e = (*v)(p->__pyx_t_1, a); if (e) return e;
  139196. }
  139197. if (p->__pyx_t_2) {
  139198. e = (*v)(p->__pyx_t_2, a); if (e) return e;
  139199. }
  139200. return 0;
  139201. }
  139202. static PyTypeObject __pyx_type_6uvloop_4loop___pyx_scope_struct_9_create_connection = {
  139203. PyVarObject_HEAD_INIT(0, 0)
  139204. "uvloop.loop.__pyx_scope_struct_9_create_connection", /*tp_name*/
  139205. sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_9_create_connection), /*tp_basicsize*/
  139206. 0, /*tp_itemsize*/
  139207. __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_9_create_connection, /*tp_dealloc*/
  139208. 0, /*tp_print*/
  139209. 0, /*tp_getattr*/
  139210. 0, /*tp_setattr*/
  139211. #if PY_MAJOR_VERSION < 3
  139212. 0, /*tp_compare*/
  139213. #endif
  139214. #if PY_MAJOR_VERSION >= 3
  139215. 0, /*tp_as_async*/
  139216. #endif
  139217. 0, /*tp_repr*/
  139218. 0, /*tp_as_number*/
  139219. 0, /*tp_as_sequence*/
  139220. 0, /*tp_as_mapping*/
  139221. 0, /*tp_hash*/
  139222. 0, /*tp_call*/
  139223. 0, /*tp_str*/
  139224. 0, /*tp_getattro*/
  139225. 0, /*tp_setattro*/
  139226. 0, /*tp_as_buffer*/
  139227. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  139228. 0, /*tp_doc*/
  139229. __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_9_create_connection, /*tp_traverse*/
  139230. 0, /*tp_clear*/
  139231. 0, /*tp_richcompare*/
  139232. 0, /*tp_weaklistoffset*/
  139233. 0, /*tp_iter*/
  139234. 0, /*tp_iternext*/
  139235. 0, /*tp_methods*/
  139236. 0, /*tp_members*/
  139237. 0, /*tp_getset*/
  139238. 0, /*tp_base*/
  139239. 0, /*tp_dict*/
  139240. 0, /*tp_descr_get*/
  139241. 0, /*tp_descr_set*/
  139242. 0, /*tp_dictoffset*/
  139243. 0, /*tp_init*/
  139244. 0, /*tp_alloc*/
  139245. __pyx_tp_new_6uvloop_4loop___pyx_scope_struct_9_create_connection, /*tp_new*/
  139246. 0, /*tp_free*/
  139247. 0, /*tp_is_gc*/
  139248. 0, /*tp_bases*/
  139249. 0, /*tp_mro*/
  139250. 0, /*tp_cache*/
  139251. 0, /*tp_subclasses*/
  139252. 0, /*tp_weaklist*/
  139253. 0, /*tp_del*/
  139254. 0, /*tp_version_tag*/
  139255. #if PY_VERSION_HEX >= 0x030400a1
  139256. 0, /*tp_finalize*/
  139257. #endif
  139258. #if PY_VERSION_HEX >= 0x030800b1
  139259. 0, /*tp_vectorcall*/
  139260. #endif
  139261. };
  139262. static struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_10_genexpr *__pyx_freelist_6uvloop_4loop___pyx_scope_struct_10_genexpr[8];
  139263. static int __pyx_freecount_6uvloop_4loop___pyx_scope_struct_10_genexpr = 0;
  139264. static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_10_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  139265. PyObject *o;
  139266. if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_10_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_10_genexpr)))) {
  139267. o = (PyObject*)__pyx_freelist_6uvloop_4loop___pyx_scope_struct_10_genexpr[--__pyx_freecount_6uvloop_4loop___pyx_scope_struct_10_genexpr];
  139268. memset(o, 0, sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_10_genexpr));
  139269. (void) PyObject_INIT(o, t);
  139270. PyObject_GC_Track(o);
  139271. } else {
  139272. o = (*t->tp_alloc)(t, 0);
  139273. if (unlikely(!o)) return 0;
  139274. }
  139275. return o;
  139276. }
  139277. static void __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_10_genexpr(PyObject *o) {
  139278. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_10_genexpr *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_10_genexpr *)o;
  139279. PyObject_GC_UnTrack(o);
  139280. Py_CLEAR(p->__pyx_outer_scope);
  139281. Py_CLEAR(p->__pyx_v_exc);
  139282. if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_10_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_10_genexpr)))) {
  139283. __pyx_freelist_6uvloop_4loop___pyx_scope_struct_10_genexpr[__pyx_freecount_6uvloop_4loop___pyx_scope_struct_10_genexpr++] = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_10_genexpr *)o);
  139284. } else {
  139285. (*Py_TYPE(o)->tp_free)(o);
  139286. }
  139287. }
  139288. static int __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_10_genexpr(PyObject *o, visitproc v, void *a) {
  139289. int e;
  139290. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_10_genexpr *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_10_genexpr *)o;
  139291. if (p->__pyx_outer_scope) {
  139292. e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
  139293. }
  139294. if (p->__pyx_v_exc) {
  139295. e = (*v)(p->__pyx_v_exc, a); if (e) return e;
  139296. }
  139297. return 0;
  139298. }
  139299. static PyTypeObject __pyx_type_6uvloop_4loop___pyx_scope_struct_10_genexpr = {
  139300. PyVarObject_HEAD_INIT(0, 0)
  139301. "uvloop.loop.__pyx_scope_struct_10_genexpr", /*tp_name*/
  139302. sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_10_genexpr), /*tp_basicsize*/
  139303. 0, /*tp_itemsize*/
  139304. __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_10_genexpr, /*tp_dealloc*/
  139305. 0, /*tp_print*/
  139306. 0, /*tp_getattr*/
  139307. 0, /*tp_setattr*/
  139308. #if PY_MAJOR_VERSION < 3
  139309. 0, /*tp_compare*/
  139310. #endif
  139311. #if PY_MAJOR_VERSION >= 3
  139312. 0, /*tp_as_async*/
  139313. #endif
  139314. 0, /*tp_repr*/
  139315. 0, /*tp_as_number*/
  139316. 0, /*tp_as_sequence*/
  139317. 0, /*tp_as_mapping*/
  139318. 0, /*tp_hash*/
  139319. 0, /*tp_call*/
  139320. 0, /*tp_str*/
  139321. 0, /*tp_getattro*/
  139322. 0, /*tp_setattro*/
  139323. 0, /*tp_as_buffer*/
  139324. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  139325. 0, /*tp_doc*/
  139326. __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_10_genexpr, /*tp_traverse*/
  139327. 0, /*tp_clear*/
  139328. 0, /*tp_richcompare*/
  139329. 0, /*tp_weaklistoffset*/
  139330. 0, /*tp_iter*/
  139331. 0, /*tp_iternext*/
  139332. 0, /*tp_methods*/
  139333. 0, /*tp_members*/
  139334. 0, /*tp_getset*/
  139335. 0, /*tp_base*/
  139336. 0, /*tp_dict*/
  139337. 0, /*tp_descr_get*/
  139338. 0, /*tp_descr_set*/
  139339. 0, /*tp_dictoffset*/
  139340. 0, /*tp_init*/
  139341. 0, /*tp_alloc*/
  139342. __pyx_tp_new_6uvloop_4loop___pyx_scope_struct_10_genexpr, /*tp_new*/
  139343. 0, /*tp_free*/
  139344. 0, /*tp_is_gc*/
  139345. 0, /*tp_bases*/
  139346. 0, /*tp_mro*/
  139347. 0, /*tp_cache*/
  139348. 0, /*tp_subclasses*/
  139349. 0, /*tp_weaklist*/
  139350. 0, /*tp_del*/
  139351. 0, /*tp_version_tag*/
  139352. #if PY_VERSION_HEX >= 0x030400a1
  139353. 0, /*tp_finalize*/
  139354. #endif
  139355. #if PY_VERSION_HEX >= 0x030800b1
  139356. 0, /*tp_vectorcall*/
  139357. #endif
  139358. };
  139359. static struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_11_genexpr *__pyx_freelist_6uvloop_4loop___pyx_scope_struct_11_genexpr[8];
  139360. static int __pyx_freecount_6uvloop_4loop___pyx_scope_struct_11_genexpr = 0;
  139361. static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_11_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  139362. PyObject *o;
  139363. if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_11_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_11_genexpr)))) {
  139364. o = (PyObject*)__pyx_freelist_6uvloop_4loop___pyx_scope_struct_11_genexpr[--__pyx_freecount_6uvloop_4loop___pyx_scope_struct_11_genexpr];
  139365. memset(o, 0, sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_11_genexpr));
  139366. (void) PyObject_INIT(o, t);
  139367. PyObject_GC_Track(o);
  139368. } else {
  139369. o = (*t->tp_alloc)(t, 0);
  139370. if (unlikely(!o)) return 0;
  139371. }
  139372. return o;
  139373. }
  139374. static void __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_11_genexpr(PyObject *o) {
  139375. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_11_genexpr *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_11_genexpr *)o;
  139376. PyObject_GC_UnTrack(o);
  139377. Py_CLEAR(p->__pyx_outer_scope);
  139378. Py_CLEAR(p->__pyx_v_exc);
  139379. if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_11_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_11_genexpr)))) {
  139380. __pyx_freelist_6uvloop_4loop___pyx_scope_struct_11_genexpr[__pyx_freecount_6uvloop_4loop___pyx_scope_struct_11_genexpr++] = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_11_genexpr *)o);
  139381. } else {
  139382. (*Py_TYPE(o)->tp_free)(o);
  139383. }
  139384. }
  139385. static int __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_11_genexpr(PyObject *o, visitproc v, void *a) {
  139386. int e;
  139387. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_11_genexpr *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_11_genexpr *)o;
  139388. if (p->__pyx_outer_scope) {
  139389. e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
  139390. }
  139391. if (p->__pyx_v_exc) {
  139392. e = (*v)(p->__pyx_v_exc, a); if (e) return e;
  139393. }
  139394. return 0;
  139395. }
  139396. static PyTypeObject __pyx_type_6uvloop_4loop___pyx_scope_struct_11_genexpr = {
  139397. PyVarObject_HEAD_INIT(0, 0)
  139398. "uvloop.loop.__pyx_scope_struct_11_genexpr", /*tp_name*/
  139399. sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_11_genexpr), /*tp_basicsize*/
  139400. 0, /*tp_itemsize*/
  139401. __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_11_genexpr, /*tp_dealloc*/
  139402. 0, /*tp_print*/
  139403. 0, /*tp_getattr*/
  139404. 0, /*tp_setattr*/
  139405. #if PY_MAJOR_VERSION < 3
  139406. 0, /*tp_compare*/
  139407. #endif
  139408. #if PY_MAJOR_VERSION >= 3
  139409. 0, /*tp_as_async*/
  139410. #endif
  139411. 0, /*tp_repr*/
  139412. 0, /*tp_as_number*/
  139413. 0, /*tp_as_sequence*/
  139414. 0, /*tp_as_mapping*/
  139415. 0, /*tp_hash*/
  139416. 0, /*tp_call*/
  139417. 0, /*tp_str*/
  139418. 0, /*tp_getattro*/
  139419. 0, /*tp_setattro*/
  139420. 0, /*tp_as_buffer*/
  139421. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  139422. 0, /*tp_doc*/
  139423. __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_11_genexpr, /*tp_traverse*/
  139424. 0, /*tp_clear*/
  139425. 0, /*tp_richcompare*/
  139426. 0, /*tp_weaklistoffset*/
  139427. 0, /*tp_iter*/
  139428. 0, /*tp_iternext*/
  139429. 0, /*tp_methods*/
  139430. 0, /*tp_members*/
  139431. 0, /*tp_getset*/
  139432. 0, /*tp_base*/
  139433. 0, /*tp_dict*/
  139434. 0, /*tp_descr_get*/
  139435. 0, /*tp_descr_set*/
  139436. 0, /*tp_dictoffset*/
  139437. 0, /*tp_init*/
  139438. 0, /*tp_alloc*/
  139439. __pyx_tp_new_6uvloop_4loop___pyx_scope_struct_11_genexpr, /*tp_new*/
  139440. 0, /*tp_free*/
  139441. 0, /*tp_is_gc*/
  139442. 0, /*tp_bases*/
  139443. 0, /*tp_mro*/
  139444. 0, /*tp_cache*/
  139445. 0, /*tp_subclasses*/
  139446. 0, /*tp_weaklist*/
  139447. 0, /*tp_del*/
  139448. 0, /*tp_version_tag*/
  139449. #if PY_VERSION_HEX >= 0x030400a1
  139450. 0, /*tp_finalize*/
  139451. #endif
  139452. #if PY_VERSION_HEX >= 0x030800b1
  139453. 0, /*tp_vectorcall*/
  139454. #endif
  139455. };
  139456. static struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_12_create_unix_server *__pyx_freelist_6uvloop_4loop___pyx_scope_struct_12_create_unix_server[8];
  139457. static int __pyx_freecount_6uvloop_4loop___pyx_scope_struct_12_create_unix_server = 0;
  139458. static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_12_create_unix_server(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  139459. PyObject *o;
  139460. if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_12_create_unix_server > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_12_create_unix_server)))) {
  139461. o = (PyObject*)__pyx_freelist_6uvloop_4loop___pyx_scope_struct_12_create_unix_server[--__pyx_freecount_6uvloop_4loop___pyx_scope_struct_12_create_unix_server];
  139462. memset(o, 0, sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_12_create_unix_server));
  139463. (void) PyObject_INIT(o, t);
  139464. PyObject_GC_Track(o);
  139465. } else {
  139466. o = (*t->tp_alloc)(t, 0);
  139467. if (unlikely(!o)) return 0;
  139468. }
  139469. return o;
  139470. }
  139471. static void __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_12_create_unix_server(PyObject *o) {
  139472. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_12_create_unix_server *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_12_create_unix_server *)o;
  139473. PyObject_GC_UnTrack(o);
  139474. Py_CLEAR(p->__pyx_v_backlog);
  139475. Py_CLEAR(p->__pyx_v_err);
  139476. Py_CLEAR(p->__pyx_v_exc);
  139477. Py_CLEAR(p->__pyx_v_fspath);
  139478. Py_CLEAR(p->__pyx_v_msg);
  139479. Py_CLEAR(p->__pyx_v_orig_path);
  139480. Py_CLEAR(p->__pyx_v_path);
  139481. Py_CLEAR(p->__pyx_v_pipe);
  139482. Py_CLEAR(p->__pyx_v_protocol_factory);
  139483. Py_CLEAR(p->__pyx_v_self);
  139484. Py_CLEAR(p->__pyx_v_server);
  139485. Py_CLEAR(p->__pyx_v_sock);
  139486. Py_CLEAR(p->__pyx_v_ssl);
  139487. Py_CLEAR(p->__pyx_v_ssl_handshake_timeout);
  139488. Py_CLEAR(p->__pyx_v_ssl_shutdown_timeout);
  139489. Py_CLEAR(p->__pyx_v_start_serving);
  139490. if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_12_create_unix_server < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_12_create_unix_server)))) {
  139491. __pyx_freelist_6uvloop_4loop___pyx_scope_struct_12_create_unix_server[__pyx_freecount_6uvloop_4loop___pyx_scope_struct_12_create_unix_server++] = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_12_create_unix_server *)o);
  139492. } else {
  139493. (*Py_TYPE(o)->tp_free)(o);
  139494. }
  139495. }
  139496. static int __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_12_create_unix_server(PyObject *o, visitproc v, void *a) {
  139497. int e;
  139498. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_12_create_unix_server *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_12_create_unix_server *)o;
  139499. if (p->__pyx_v_backlog) {
  139500. e = (*v)(p->__pyx_v_backlog, a); if (e) return e;
  139501. }
  139502. if (p->__pyx_v_err) {
  139503. e = (*v)(p->__pyx_v_err, a); if (e) return e;
  139504. }
  139505. if (p->__pyx_v_exc) {
  139506. e = (*v)(p->__pyx_v_exc, a); if (e) return e;
  139507. }
  139508. if (p->__pyx_v_fspath) {
  139509. e = (*v)(p->__pyx_v_fspath, a); if (e) return e;
  139510. }
  139511. if (p->__pyx_v_msg) {
  139512. e = (*v)(p->__pyx_v_msg, a); if (e) return e;
  139513. }
  139514. if (p->__pyx_v_orig_path) {
  139515. e = (*v)(p->__pyx_v_orig_path, a); if (e) return e;
  139516. }
  139517. if (p->__pyx_v_path) {
  139518. e = (*v)(p->__pyx_v_path, a); if (e) return e;
  139519. }
  139520. if (p->__pyx_v_pipe) {
  139521. e = (*v)(((PyObject *)p->__pyx_v_pipe), a); if (e) return e;
  139522. }
  139523. if (p->__pyx_v_protocol_factory) {
  139524. e = (*v)(p->__pyx_v_protocol_factory, a); if (e) return e;
  139525. }
  139526. if (p->__pyx_v_self) {
  139527. e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  139528. }
  139529. if (p->__pyx_v_server) {
  139530. e = (*v)(((PyObject *)p->__pyx_v_server), a); if (e) return e;
  139531. }
  139532. if (p->__pyx_v_sock) {
  139533. e = (*v)(p->__pyx_v_sock, a); if (e) return e;
  139534. }
  139535. if (p->__pyx_v_ssl) {
  139536. e = (*v)(p->__pyx_v_ssl, a); if (e) return e;
  139537. }
  139538. if (p->__pyx_v_ssl_handshake_timeout) {
  139539. e = (*v)(p->__pyx_v_ssl_handshake_timeout, a); if (e) return e;
  139540. }
  139541. if (p->__pyx_v_ssl_shutdown_timeout) {
  139542. e = (*v)(p->__pyx_v_ssl_shutdown_timeout, a); if (e) return e;
  139543. }
  139544. if (p->__pyx_v_start_serving) {
  139545. e = (*v)(p->__pyx_v_start_serving, a); if (e) return e;
  139546. }
  139547. return 0;
  139548. }
  139549. static PyTypeObject __pyx_type_6uvloop_4loop___pyx_scope_struct_12_create_unix_server = {
  139550. PyVarObject_HEAD_INIT(0, 0)
  139551. "uvloop.loop.__pyx_scope_struct_12_create_unix_server", /*tp_name*/
  139552. sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_12_create_unix_server), /*tp_basicsize*/
  139553. 0, /*tp_itemsize*/
  139554. __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_12_create_unix_server, /*tp_dealloc*/
  139555. 0, /*tp_print*/
  139556. 0, /*tp_getattr*/
  139557. 0, /*tp_setattr*/
  139558. #if PY_MAJOR_VERSION < 3
  139559. 0, /*tp_compare*/
  139560. #endif
  139561. #if PY_MAJOR_VERSION >= 3
  139562. 0, /*tp_as_async*/
  139563. #endif
  139564. 0, /*tp_repr*/
  139565. 0, /*tp_as_number*/
  139566. 0, /*tp_as_sequence*/
  139567. 0, /*tp_as_mapping*/
  139568. 0, /*tp_hash*/
  139569. 0, /*tp_call*/
  139570. 0, /*tp_str*/
  139571. 0, /*tp_getattro*/
  139572. 0, /*tp_setattro*/
  139573. 0, /*tp_as_buffer*/
  139574. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  139575. 0, /*tp_doc*/
  139576. __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_12_create_unix_server, /*tp_traverse*/
  139577. 0, /*tp_clear*/
  139578. 0, /*tp_richcompare*/
  139579. 0, /*tp_weaklistoffset*/
  139580. 0, /*tp_iter*/
  139581. 0, /*tp_iternext*/
  139582. 0, /*tp_methods*/
  139583. 0, /*tp_members*/
  139584. 0, /*tp_getset*/
  139585. 0, /*tp_base*/
  139586. 0, /*tp_dict*/
  139587. 0, /*tp_descr_get*/
  139588. 0, /*tp_descr_set*/
  139589. 0, /*tp_dictoffset*/
  139590. 0, /*tp_init*/
  139591. 0, /*tp_alloc*/
  139592. __pyx_tp_new_6uvloop_4loop___pyx_scope_struct_12_create_unix_server, /*tp_new*/
  139593. 0, /*tp_free*/
  139594. 0, /*tp_is_gc*/
  139595. 0, /*tp_bases*/
  139596. 0, /*tp_mro*/
  139597. 0, /*tp_cache*/
  139598. 0, /*tp_subclasses*/
  139599. 0, /*tp_weaklist*/
  139600. 0, /*tp_del*/
  139601. 0, /*tp_version_tag*/
  139602. #if PY_VERSION_HEX >= 0x030400a1
  139603. 0, /*tp_finalize*/
  139604. #endif
  139605. #if PY_VERSION_HEX >= 0x030800b1
  139606. 0, /*tp_vectorcall*/
  139607. #endif
  139608. };
  139609. static struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_13_create_unix_connection *__pyx_freelist_6uvloop_4loop___pyx_scope_struct_13_create_unix_connection[8];
  139610. static int __pyx_freecount_6uvloop_4loop___pyx_scope_struct_13_create_unix_connection = 0;
  139611. static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_13_create_unix_connection(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  139612. PyObject *o;
  139613. if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_13_create_unix_connection > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_13_create_unix_connection)))) {
  139614. o = (PyObject*)__pyx_freelist_6uvloop_4loop___pyx_scope_struct_13_create_unix_connection[--__pyx_freecount_6uvloop_4loop___pyx_scope_struct_13_create_unix_connection];
  139615. memset(o, 0, sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_13_create_unix_connection));
  139616. (void) PyObject_INIT(o, t);
  139617. PyObject_GC_Track(o);
  139618. } else {
  139619. o = (*t->tp_alloc)(t, 0);
  139620. if (unlikely(!o)) return 0;
  139621. }
  139622. return o;
  139623. }
  139624. static void __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_13_create_unix_connection(PyObject *o) {
  139625. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_13_create_unix_connection *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_13_create_unix_connection *)o;
  139626. PyObject_GC_UnTrack(o);
  139627. Py_CLEAR(p->__pyx_v_app_protocol);
  139628. Py_CLEAR(p->__pyx_v_app_transport);
  139629. Py_CLEAR(p->__pyx_v_fspath);
  139630. Py_CLEAR(p->__pyx_v_path);
  139631. Py_CLEAR(p->__pyx_v_protocol);
  139632. Py_CLEAR(p->__pyx_v_protocol_factory);
  139633. Py_CLEAR(p->__pyx_v_self);
  139634. Py_CLEAR(p->__pyx_v_server_hostname);
  139635. Py_CLEAR(p->__pyx_v_sock);
  139636. Py_CLEAR(p->__pyx_v_ssl);
  139637. Py_CLEAR(p->__pyx_v_ssl_handshake_timeout);
  139638. Py_CLEAR(p->__pyx_v_ssl_shutdown_timeout);
  139639. Py_CLEAR(p->__pyx_v_ssl_waiter);
  139640. Py_CLEAR(p->__pyx_v_sslcontext);
  139641. Py_CLEAR(p->__pyx_v_tr);
  139642. Py_CLEAR(p->__pyx_v_waiter);
  139643. Py_CLEAR(p->__pyx_t_0);
  139644. Py_CLEAR(p->__pyx_t_1);
  139645. Py_CLEAR(p->__pyx_t_2);
  139646. if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_13_create_unix_connection < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_13_create_unix_connection)))) {
  139647. __pyx_freelist_6uvloop_4loop___pyx_scope_struct_13_create_unix_connection[__pyx_freecount_6uvloop_4loop___pyx_scope_struct_13_create_unix_connection++] = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_13_create_unix_connection *)o);
  139648. } else {
  139649. (*Py_TYPE(o)->tp_free)(o);
  139650. }
  139651. }
  139652. static int __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_13_create_unix_connection(PyObject *o, visitproc v, void *a) {
  139653. int e;
  139654. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_13_create_unix_connection *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_13_create_unix_connection *)o;
  139655. if (p->__pyx_v_app_protocol) {
  139656. e = (*v)(p->__pyx_v_app_protocol, a); if (e) return e;
  139657. }
  139658. if (p->__pyx_v_app_transport) {
  139659. e = (*v)(p->__pyx_v_app_transport, a); if (e) return e;
  139660. }
  139661. if (p->__pyx_v_fspath) {
  139662. e = (*v)(p->__pyx_v_fspath, a); if (e) return e;
  139663. }
  139664. if (p->__pyx_v_path) {
  139665. e = (*v)(p->__pyx_v_path, a); if (e) return e;
  139666. }
  139667. if (p->__pyx_v_protocol) {
  139668. e = (*v)(p->__pyx_v_protocol, a); if (e) return e;
  139669. }
  139670. if (p->__pyx_v_protocol_factory) {
  139671. e = (*v)(p->__pyx_v_protocol_factory, a); if (e) return e;
  139672. }
  139673. if (p->__pyx_v_self) {
  139674. e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  139675. }
  139676. if (p->__pyx_v_server_hostname) {
  139677. e = (*v)(p->__pyx_v_server_hostname, a); if (e) return e;
  139678. }
  139679. if (p->__pyx_v_sock) {
  139680. e = (*v)(p->__pyx_v_sock, a); if (e) return e;
  139681. }
  139682. if (p->__pyx_v_ssl) {
  139683. e = (*v)(p->__pyx_v_ssl, a); if (e) return e;
  139684. }
  139685. if (p->__pyx_v_ssl_handshake_timeout) {
  139686. e = (*v)(p->__pyx_v_ssl_handshake_timeout, a); if (e) return e;
  139687. }
  139688. if (p->__pyx_v_ssl_shutdown_timeout) {
  139689. e = (*v)(p->__pyx_v_ssl_shutdown_timeout, a); if (e) return e;
  139690. }
  139691. if (p->__pyx_v_ssl_waiter) {
  139692. e = (*v)(p->__pyx_v_ssl_waiter, a); if (e) return e;
  139693. }
  139694. if (p->__pyx_v_sslcontext) {
  139695. e = (*v)(p->__pyx_v_sslcontext, a); if (e) return e;
  139696. }
  139697. if (p->__pyx_v_tr) {
  139698. e = (*v)(((PyObject *)p->__pyx_v_tr), a); if (e) return e;
  139699. }
  139700. if (p->__pyx_v_waiter) {
  139701. e = (*v)(p->__pyx_v_waiter, a); if (e) return e;
  139702. }
  139703. if (p->__pyx_t_0) {
  139704. e = (*v)(p->__pyx_t_0, a); if (e) return e;
  139705. }
  139706. if (p->__pyx_t_1) {
  139707. e = (*v)(p->__pyx_t_1, a); if (e) return e;
  139708. }
  139709. if (p->__pyx_t_2) {
  139710. e = (*v)(p->__pyx_t_2, a); if (e) return e;
  139711. }
  139712. return 0;
  139713. }
  139714. static PyTypeObject __pyx_type_6uvloop_4loop___pyx_scope_struct_13_create_unix_connection = {
  139715. PyVarObject_HEAD_INIT(0, 0)
  139716. "uvloop.loop.__pyx_scope_struct_13_create_unix_connection", /*tp_name*/
  139717. sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_13_create_unix_connection), /*tp_basicsize*/
  139718. 0, /*tp_itemsize*/
  139719. __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_13_create_unix_connection, /*tp_dealloc*/
  139720. 0, /*tp_print*/
  139721. 0, /*tp_getattr*/
  139722. 0, /*tp_setattr*/
  139723. #if PY_MAJOR_VERSION < 3
  139724. 0, /*tp_compare*/
  139725. #endif
  139726. #if PY_MAJOR_VERSION >= 3
  139727. 0, /*tp_as_async*/
  139728. #endif
  139729. 0, /*tp_repr*/
  139730. 0, /*tp_as_number*/
  139731. 0, /*tp_as_sequence*/
  139732. 0, /*tp_as_mapping*/
  139733. 0, /*tp_hash*/
  139734. 0, /*tp_call*/
  139735. 0, /*tp_str*/
  139736. 0, /*tp_getattro*/
  139737. 0, /*tp_setattro*/
  139738. 0, /*tp_as_buffer*/
  139739. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  139740. 0, /*tp_doc*/
  139741. __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_13_create_unix_connection, /*tp_traverse*/
  139742. 0, /*tp_clear*/
  139743. 0, /*tp_richcompare*/
  139744. 0, /*tp_weaklistoffset*/
  139745. 0, /*tp_iter*/
  139746. 0, /*tp_iternext*/
  139747. 0, /*tp_methods*/
  139748. 0, /*tp_members*/
  139749. 0, /*tp_getset*/
  139750. 0, /*tp_base*/
  139751. 0, /*tp_dict*/
  139752. 0, /*tp_descr_get*/
  139753. 0, /*tp_descr_set*/
  139754. 0, /*tp_dictoffset*/
  139755. 0, /*tp_init*/
  139756. 0, /*tp_alloc*/
  139757. __pyx_tp_new_6uvloop_4loop___pyx_scope_struct_13_create_unix_connection, /*tp_new*/
  139758. 0, /*tp_free*/
  139759. 0, /*tp_is_gc*/
  139760. 0, /*tp_bases*/
  139761. 0, /*tp_mro*/
  139762. 0, /*tp_cache*/
  139763. 0, /*tp_subclasses*/
  139764. 0, /*tp_weaklist*/
  139765. 0, /*tp_del*/
  139766. 0, /*tp_version_tag*/
  139767. #if PY_VERSION_HEX >= 0x030400a1
  139768. 0, /*tp_finalize*/
  139769. #endif
  139770. #if PY_VERSION_HEX >= 0x030800b1
  139771. 0, /*tp_vectorcall*/
  139772. #endif
  139773. };
  139774. static struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_14_sock_recv *__pyx_freelist_6uvloop_4loop___pyx_scope_struct_14_sock_recv[8];
  139775. static int __pyx_freecount_6uvloop_4loop___pyx_scope_struct_14_sock_recv = 0;
  139776. static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_14_sock_recv(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  139777. PyObject *o;
  139778. if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_14_sock_recv > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_14_sock_recv)))) {
  139779. o = (PyObject*)__pyx_freelist_6uvloop_4loop___pyx_scope_struct_14_sock_recv[--__pyx_freecount_6uvloop_4loop___pyx_scope_struct_14_sock_recv];
  139780. memset(o, 0, sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_14_sock_recv));
  139781. (void) PyObject_INIT(o, t);
  139782. PyObject_GC_Track(o);
  139783. } else {
  139784. o = (*t->tp_alloc)(t, 0);
  139785. if (unlikely(!o)) return 0;
  139786. }
  139787. return o;
  139788. }
  139789. static void __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_14_sock_recv(PyObject *o) {
  139790. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_14_sock_recv *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_14_sock_recv *)o;
  139791. PyObject_GC_UnTrack(o);
  139792. Py_CLEAR(p->__pyx_v_fut);
  139793. Py_CLEAR(p->__pyx_v_handle);
  139794. Py_CLEAR(p->__pyx_v_n);
  139795. Py_CLEAR(p->__pyx_v_self);
  139796. Py_CLEAR(p->__pyx_v_sock);
  139797. if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_14_sock_recv < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_14_sock_recv)))) {
  139798. __pyx_freelist_6uvloop_4loop___pyx_scope_struct_14_sock_recv[__pyx_freecount_6uvloop_4loop___pyx_scope_struct_14_sock_recv++] = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_14_sock_recv *)o);
  139799. } else {
  139800. (*Py_TYPE(o)->tp_free)(o);
  139801. }
  139802. }
  139803. static int __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_14_sock_recv(PyObject *o, visitproc v, void *a) {
  139804. int e;
  139805. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_14_sock_recv *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_14_sock_recv *)o;
  139806. if (p->__pyx_v_fut) {
  139807. e = (*v)(p->__pyx_v_fut, a); if (e) return e;
  139808. }
  139809. if (p->__pyx_v_handle) {
  139810. e = (*v)(((PyObject *)p->__pyx_v_handle), a); if (e) return e;
  139811. }
  139812. if (p->__pyx_v_n) {
  139813. e = (*v)(p->__pyx_v_n, a); if (e) return e;
  139814. }
  139815. if (p->__pyx_v_self) {
  139816. e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  139817. }
  139818. if (p->__pyx_v_sock) {
  139819. e = (*v)(p->__pyx_v_sock, a); if (e) return e;
  139820. }
  139821. return 0;
  139822. }
  139823. static PyTypeObject __pyx_type_6uvloop_4loop___pyx_scope_struct_14_sock_recv = {
  139824. PyVarObject_HEAD_INIT(0, 0)
  139825. "uvloop.loop.__pyx_scope_struct_14_sock_recv", /*tp_name*/
  139826. sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_14_sock_recv), /*tp_basicsize*/
  139827. 0, /*tp_itemsize*/
  139828. __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_14_sock_recv, /*tp_dealloc*/
  139829. 0, /*tp_print*/
  139830. 0, /*tp_getattr*/
  139831. 0, /*tp_setattr*/
  139832. #if PY_MAJOR_VERSION < 3
  139833. 0, /*tp_compare*/
  139834. #endif
  139835. #if PY_MAJOR_VERSION >= 3
  139836. 0, /*tp_as_async*/
  139837. #endif
  139838. 0, /*tp_repr*/
  139839. 0, /*tp_as_number*/
  139840. 0, /*tp_as_sequence*/
  139841. 0, /*tp_as_mapping*/
  139842. 0, /*tp_hash*/
  139843. 0, /*tp_call*/
  139844. 0, /*tp_str*/
  139845. 0, /*tp_getattro*/
  139846. 0, /*tp_setattro*/
  139847. 0, /*tp_as_buffer*/
  139848. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  139849. 0, /*tp_doc*/
  139850. __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_14_sock_recv, /*tp_traverse*/
  139851. 0, /*tp_clear*/
  139852. 0, /*tp_richcompare*/
  139853. 0, /*tp_weaklistoffset*/
  139854. 0, /*tp_iter*/
  139855. 0, /*tp_iternext*/
  139856. 0, /*tp_methods*/
  139857. 0, /*tp_members*/
  139858. 0, /*tp_getset*/
  139859. 0, /*tp_base*/
  139860. 0, /*tp_dict*/
  139861. 0, /*tp_descr_get*/
  139862. 0, /*tp_descr_set*/
  139863. 0, /*tp_dictoffset*/
  139864. 0, /*tp_init*/
  139865. 0, /*tp_alloc*/
  139866. __pyx_tp_new_6uvloop_4loop___pyx_scope_struct_14_sock_recv, /*tp_new*/
  139867. 0, /*tp_free*/
  139868. 0, /*tp_is_gc*/
  139869. 0, /*tp_bases*/
  139870. 0, /*tp_mro*/
  139871. 0, /*tp_cache*/
  139872. 0, /*tp_subclasses*/
  139873. 0, /*tp_weaklist*/
  139874. 0, /*tp_del*/
  139875. 0, /*tp_version_tag*/
  139876. #if PY_VERSION_HEX >= 0x030400a1
  139877. 0, /*tp_finalize*/
  139878. #endif
  139879. #if PY_VERSION_HEX >= 0x030800b1
  139880. 0, /*tp_vectorcall*/
  139881. #endif
  139882. };
  139883. static struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_15_sock_recv_into *__pyx_freelist_6uvloop_4loop___pyx_scope_struct_15_sock_recv_into[8];
  139884. static int __pyx_freecount_6uvloop_4loop___pyx_scope_struct_15_sock_recv_into = 0;
  139885. static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_15_sock_recv_into(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  139886. PyObject *o;
  139887. if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_15_sock_recv_into > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_15_sock_recv_into)))) {
  139888. o = (PyObject*)__pyx_freelist_6uvloop_4loop___pyx_scope_struct_15_sock_recv_into[--__pyx_freecount_6uvloop_4loop___pyx_scope_struct_15_sock_recv_into];
  139889. memset(o, 0, sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_15_sock_recv_into));
  139890. (void) PyObject_INIT(o, t);
  139891. PyObject_GC_Track(o);
  139892. } else {
  139893. o = (*t->tp_alloc)(t, 0);
  139894. if (unlikely(!o)) return 0;
  139895. }
  139896. return o;
  139897. }
  139898. static void __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_15_sock_recv_into(PyObject *o) {
  139899. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_15_sock_recv_into *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_15_sock_recv_into *)o;
  139900. PyObject_GC_UnTrack(o);
  139901. Py_CLEAR(p->__pyx_v_buf);
  139902. Py_CLEAR(p->__pyx_v_fut);
  139903. Py_CLEAR(p->__pyx_v_handle);
  139904. Py_CLEAR(p->__pyx_v_self);
  139905. Py_CLEAR(p->__pyx_v_sock);
  139906. if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_15_sock_recv_into < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_15_sock_recv_into)))) {
  139907. __pyx_freelist_6uvloop_4loop___pyx_scope_struct_15_sock_recv_into[__pyx_freecount_6uvloop_4loop___pyx_scope_struct_15_sock_recv_into++] = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_15_sock_recv_into *)o);
  139908. } else {
  139909. (*Py_TYPE(o)->tp_free)(o);
  139910. }
  139911. }
  139912. static int __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_15_sock_recv_into(PyObject *o, visitproc v, void *a) {
  139913. int e;
  139914. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_15_sock_recv_into *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_15_sock_recv_into *)o;
  139915. if (p->__pyx_v_buf) {
  139916. e = (*v)(p->__pyx_v_buf, a); if (e) return e;
  139917. }
  139918. if (p->__pyx_v_fut) {
  139919. e = (*v)(p->__pyx_v_fut, a); if (e) return e;
  139920. }
  139921. if (p->__pyx_v_handle) {
  139922. e = (*v)(((PyObject *)p->__pyx_v_handle), a); if (e) return e;
  139923. }
  139924. if (p->__pyx_v_self) {
  139925. e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  139926. }
  139927. if (p->__pyx_v_sock) {
  139928. e = (*v)(p->__pyx_v_sock, a); if (e) return e;
  139929. }
  139930. return 0;
  139931. }
  139932. static PyTypeObject __pyx_type_6uvloop_4loop___pyx_scope_struct_15_sock_recv_into = {
  139933. PyVarObject_HEAD_INIT(0, 0)
  139934. "uvloop.loop.__pyx_scope_struct_15_sock_recv_into", /*tp_name*/
  139935. sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_15_sock_recv_into), /*tp_basicsize*/
  139936. 0, /*tp_itemsize*/
  139937. __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_15_sock_recv_into, /*tp_dealloc*/
  139938. 0, /*tp_print*/
  139939. 0, /*tp_getattr*/
  139940. 0, /*tp_setattr*/
  139941. #if PY_MAJOR_VERSION < 3
  139942. 0, /*tp_compare*/
  139943. #endif
  139944. #if PY_MAJOR_VERSION >= 3
  139945. 0, /*tp_as_async*/
  139946. #endif
  139947. 0, /*tp_repr*/
  139948. 0, /*tp_as_number*/
  139949. 0, /*tp_as_sequence*/
  139950. 0, /*tp_as_mapping*/
  139951. 0, /*tp_hash*/
  139952. 0, /*tp_call*/
  139953. 0, /*tp_str*/
  139954. 0, /*tp_getattro*/
  139955. 0, /*tp_setattro*/
  139956. 0, /*tp_as_buffer*/
  139957. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  139958. 0, /*tp_doc*/
  139959. __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_15_sock_recv_into, /*tp_traverse*/
  139960. 0, /*tp_clear*/
  139961. 0, /*tp_richcompare*/
  139962. 0, /*tp_weaklistoffset*/
  139963. 0, /*tp_iter*/
  139964. 0, /*tp_iternext*/
  139965. 0, /*tp_methods*/
  139966. 0, /*tp_members*/
  139967. 0, /*tp_getset*/
  139968. 0, /*tp_base*/
  139969. 0, /*tp_dict*/
  139970. 0, /*tp_descr_get*/
  139971. 0, /*tp_descr_set*/
  139972. 0, /*tp_dictoffset*/
  139973. 0, /*tp_init*/
  139974. 0, /*tp_alloc*/
  139975. __pyx_tp_new_6uvloop_4loop___pyx_scope_struct_15_sock_recv_into, /*tp_new*/
  139976. 0, /*tp_free*/
  139977. 0, /*tp_is_gc*/
  139978. 0, /*tp_bases*/
  139979. 0, /*tp_mro*/
  139980. 0, /*tp_cache*/
  139981. 0, /*tp_subclasses*/
  139982. 0, /*tp_weaklist*/
  139983. 0, /*tp_del*/
  139984. 0, /*tp_version_tag*/
  139985. #if PY_VERSION_HEX >= 0x030400a1
  139986. 0, /*tp_finalize*/
  139987. #endif
  139988. #if PY_VERSION_HEX >= 0x030800b1
  139989. 0, /*tp_vectorcall*/
  139990. #endif
  139991. };
  139992. static struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_16_sock_sendall *__pyx_freelist_6uvloop_4loop___pyx_scope_struct_16_sock_sendall[8];
  139993. static int __pyx_freecount_6uvloop_4loop___pyx_scope_struct_16_sock_sendall = 0;
  139994. static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_16_sock_sendall(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  139995. PyObject *o;
  139996. if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_16_sock_sendall > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_16_sock_sendall)))) {
  139997. o = (PyObject*)__pyx_freelist_6uvloop_4loop___pyx_scope_struct_16_sock_sendall[--__pyx_freecount_6uvloop_4loop___pyx_scope_struct_16_sock_sendall];
  139998. memset(o, 0, sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_16_sock_sendall));
  139999. (void) PyObject_INIT(o, t);
  140000. PyObject_GC_Track(o);
  140001. } else {
  140002. o = (*t->tp_alloc)(t, 0);
  140003. if (unlikely(!o)) return 0;
  140004. }
  140005. return o;
  140006. }
  140007. static void __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_16_sock_sendall(PyObject *o) {
  140008. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_16_sock_sendall *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_16_sock_sendall *)o;
  140009. PyObject_GC_UnTrack(o);
  140010. Py_CLEAR(p->__pyx_v_data);
  140011. Py_CLEAR(p->__pyx_v_fut);
  140012. Py_CLEAR(p->__pyx_v_handle);
  140013. Py_CLEAR(p->__pyx_v_self);
  140014. Py_CLEAR(p->__pyx_v_sock);
  140015. if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_16_sock_sendall < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_16_sock_sendall)))) {
  140016. __pyx_freelist_6uvloop_4loop___pyx_scope_struct_16_sock_sendall[__pyx_freecount_6uvloop_4loop___pyx_scope_struct_16_sock_sendall++] = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_16_sock_sendall *)o);
  140017. } else {
  140018. (*Py_TYPE(o)->tp_free)(o);
  140019. }
  140020. }
  140021. static int __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_16_sock_sendall(PyObject *o, visitproc v, void *a) {
  140022. int e;
  140023. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_16_sock_sendall *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_16_sock_sendall *)o;
  140024. if (p->__pyx_v_data) {
  140025. e = (*v)(p->__pyx_v_data, a); if (e) return e;
  140026. }
  140027. if (p->__pyx_v_fut) {
  140028. e = (*v)(p->__pyx_v_fut, a); if (e) return e;
  140029. }
  140030. if (p->__pyx_v_handle) {
  140031. e = (*v)(((PyObject *)p->__pyx_v_handle), a); if (e) return e;
  140032. }
  140033. if (p->__pyx_v_self) {
  140034. e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  140035. }
  140036. if (p->__pyx_v_sock) {
  140037. e = (*v)(p->__pyx_v_sock, a); if (e) return e;
  140038. }
  140039. return 0;
  140040. }
  140041. static PyTypeObject __pyx_type_6uvloop_4loop___pyx_scope_struct_16_sock_sendall = {
  140042. PyVarObject_HEAD_INIT(0, 0)
  140043. "uvloop.loop.__pyx_scope_struct_16_sock_sendall", /*tp_name*/
  140044. sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_16_sock_sendall), /*tp_basicsize*/
  140045. 0, /*tp_itemsize*/
  140046. __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_16_sock_sendall, /*tp_dealloc*/
  140047. 0, /*tp_print*/
  140048. 0, /*tp_getattr*/
  140049. 0, /*tp_setattr*/
  140050. #if PY_MAJOR_VERSION < 3
  140051. 0, /*tp_compare*/
  140052. #endif
  140053. #if PY_MAJOR_VERSION >= 3
  140054. 0, /*tp_as_async*/
  140055. #endif
  140056. 0, /*tp_repr*/
  140057. 0, /*tp_as_number*/
  140058. 0, /*tp_as_sequence*/
  140059. 0, /*tp_as_mapping*/
  140060. 0, /*tp_hash*/
  140061. 0, /*tp_call*/
  140062. 0, /*tp_str*/
  140063. 0, /*tp_getattro*/
  140064. 0, /*tp_setattro*/
  140065. 0, /*tp_as_buffer*/
  140066. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  140067. 0, /*tp_doc*/
  140068. __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_16_sock_sendall, /*tp_traverse*/
  140069. 0, /*tp_clear*/
  140070. 0, /*tp_richcompare*/
  140071. 0, /*tp_weaklistoffset*/
  140072. 0, /*tp_iter*/
  140073. 0, /*tp_iternext*/
  140074. 0, /*tp_methods*/
  140075. 0, /*tp_members*/
  140076. 0, /*tp_getset*/
  140077. 0, /*tp_base*/
  140078. 0, /*tp_dict*/
  140079. 0, /*tp_descr_get*/
  140080. 0, /*tp_descr_set*/
  140081. 0, /*tp_dictoffset*/
  140082. 0, /*tp_init*/
  140083. 0, /*tp_alloc*/
  140084. __pyx_tp_new_6uvloop_4loop___pyx_scope_struct_16_sock_sendall, /*tp_new*/
  140085. 0, /*tp_free*/
  140086. 0, /*tp_is_gc*/
  140087. 0, /*tp_bases*/
  140088. 0, /*tp_mro*/
  140089. 0, /*tp_cache*/
  140090. 0, /*tp_subclasses*/
  140091. 0, /*tp_weaklist*/
  140092. 0, /*tp_del*/
  140093. 0, /*tp_version_tag*/
  140094. #if PY_VERSION_HEX >= 0x030400a1
  140095. 0, /*tp_finalize*/
  140096. #endif
  140097. #if PY_VERSION_HEX >= 0x030800b1
  140098. 0, /*tp_vectorcall*/
  140099. #endif
  140100. };
  140101. static struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_17_sock_accept *__pyx_freelist_6uvloop_4loop___pyx_scope_struct_17_sock_accept[8];
  140102. static int __pyx_freecount_6uvloop_4loop___pyx_scope_struct_17_sock_accept = 0;
  140103. static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_17_sock_accept(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  140104. PyObject *o;
  140105. if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_17_sock_accept > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_17_sock_accept)))) {
  140106. o = (PyObject*)__pyx_freelist_6uvloop_4loop___pyx_scope_struct_17_sock_accept[--__pyx_freecount_6uvloop_4loop___pyx_scope_struct_17_sock_accept];
  140107. memset(o, 0, sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_17_sock_accept));
  140108. (void) PyObject_INIT(o, t);
  140109. PyObject_GC_Track(o);
  140110. } else {
  140111. o = (*t->tp_alloc)(t, 0);
  140112. if (unlikely(!o)) return 0;
  140113. }
  140114. return o;
  140115. }
  140116. static void __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_17_sock_accept(PyObject *o) {
  140117. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_17_sock_accept *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_17_sock_accept *)o;
  140118. PyObject_GC_UnTrack(o);
  140119. Py_CLEAR(p->__pyx_v_fut);
  140120. Py_CLEAR(p->__pyx_v_handle);
  140121. Py_CLEAR(p->__pyx_v_self);
  140122. Py_CLEAR(p->__pyx_v_sock);
  140123. if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_17_sock_accept < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_17_sock_accept)))) {
  140124. __pyx_freelist_6uvloop_4loop___pyx_scope_struct_17_sock_accept[__pyx_freecount_6uvloop_4loop___pyx_scope_struct_17_sock_accept++] = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_17_sock_accept *)o);
  140125. } else {
  140126. (*Py_TYPE(o)->tp_free)(o);
  140127. }
  140128. }
  140129. static int __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_17_sock_accept(PyObject *o, visitproc v, void *a) {
  140130. int e;
  140131. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_17_sock_accept *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_17_sock_accept *)o;
  140132. if (p->__pyx_v_fut) {
  140133. e = (*v)(p->__pyx_v_fut, a); if (e) return e;
  140134. }
  140135. if (p->__pyx_v_handle) {
  140136. e = (*v)(((PyObject *)p->__pyx_v_handle), a); if (e) return e;
  140137. }
  140138. if (p->__pyx_v_self) {
  140139. e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  140140. }
  140141. if (p->__pyx_v_sock) {
  140142. e = (*v)(p->__pyx_v_sock, a); if (e) return e;
  140143. }
  140144. return 0;
  140145. }
  140146. static PyTypeObject __pyx_type_6uvloop_4loop___pyx_scope_struct_17_sock_accept = {
  140147. PyVarObject_HEAD_INIT(0, 0)
  140148. "uvloop.loop.__pyx_scope_struct_17_sock_accept", /*tp_name*/
  140149. sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_17_sock_accept), /*tp_basicsize*/
  140150. 0, /*tp_itemsize*/
  140151. __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_17_sock_accept, /*tp_dealloc*/
  140152. 0, /*tp_print*/
  140153. 0, /*tp_getattr*/
  140154. 0, /*tp_setattr*/
  140155. #if PY_MAJOR_VERSION < 3
  140156. 0, /*tp_compare*/
  140157. #endif
  140158. #if PY_MAJOR_VERSION >= 3
  140159. 0, /*tp_as_async*/
  140160. #endif
  140161. 0, /*tp_repr*/
  140162. 0, /*tp_as_number*/
  140163. 0, /*tp_as_sequence*/
  140164. 0, /*tp_as_mapping*/
  140165. 0, /*tp_hash*/
  140166. 0, /*tp_call*/
  140167. 0, /*tp_str*/
  140168. 0, /*tp_getattro*/
  140169. 0, /*tp_setattro*/
  140170. 0, /*tp_as_buffer*/
  140171. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  140172. 0, /*tp_doc*/
  140173. __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_17_sock_accept, /*tp_traverse*/
  140174. 0, /*tp_clear*/
  140175. 0, /*tp_richcompare*/
  140176. 0, /*tp_weaklistoffset*/
  140177. 0, /*tp_iter*/
  140178. 0, /*tp_iternext*/
  140179. 0, /*tp_methods*/
  140180. 0, /*tp_members*/
  140181. 0, /*tp_getset*/
  140182. 0, /*tp_base*/
  140183. 0, /*tp_dict*/
  140184. 0, /*tp_descr_get*/
  140185. 0, /*tp_descr_set*/
  140186. 0, /*tp_dictoffset*/
  140187. 0, /*tp_init*/
  140188. 0, /*tp_alloc*/
  140189. __pyx_tp_new_6uvloop_4loop___pyx_scope_struct_17_sock_accept, /*tp_new*/
  140190. 0, /*tp_free*/
  140191. 0, /*tp_is_gc*/
  140192. 0, /*tp_bases*/
  140193. 0, /*tp_mro*/
  140194. 0, /*tp_cache*/
  140195. 0, /*tp_subclasses*/
  140196. 0, /*tp_weaklist*/
  140197. 0, /*tp_del*/
  140198. 0, /*tp_version_tag*/
  140199. #if PY_VERSION_HEX >= 0x030400a1
  140200. 0, /*tp_finalize*/
  140201. #endif
  140202. #if PY_VERSION_HEX >= 0x030800b1
  140203. 0, /*tp_vectorcall*/
  140204. #endif
  140205. };
  140206. static struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_18_sock_connect *__pyx_freelist_6uvloop_4loop___pyx_scope_struct_18_sock_connect[8];
  140207. static int __pyx_freecount_6uvloop_4loop___pyx_scope_struct_18_sock_connect = 0;
  140208. static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_18_sock_connect(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  140209. PyObject *o;
  140210. if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_18_sock_connect > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_18_sock_connect)))) {
  140211. o = (PyObject*)__pyx_freelist_6uvloop_4loop___pyx_scope_struct_18_sock_connect[--__pyx_freecount_6uvloop_4loop___pyx_scope_struct_18_sock_connect];
  140212. memset(o, 0, sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_18_sock_connect));
  140213. (void) PyObject_INIT(o, t);
  140214. PyObject_GC_Track(o);
  140215. } else {
  140216. o = (*t->tp_alloc)(t, 0);
  140217. if (unlikely(!o)) return 0;
  140218. }
  140219. return o;
  140220. }
  140221. static void __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_18_sock_connect(PyObject *o) {
  140222. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_18_sock_connect *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_18_sock_connect *)o;
  140223. PyObject_GC_UnTrack(o);
  140224. Py_CLEAR(p->__pyx_v__);
  140225. Py_CLEAR(p->__pyx_v_address);
  140226. Py_CLEAR(p->__pyx_v_addrs);
  140227. Py_CLEAR(p->__pyx_v_fut);
  140228. Py_CLEAR(p->__pyx_v_self);
  140229. Py_CLEAR(p->__pyx_v_sock);
  140230. if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_18_sock_connect < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_18_sock_connect)))) {
  140231. __pyx_freelist_6uvloop_4loop___pyx_scope_struct_18_sock_connect[__pyx_freecount_6uvloop_4loop___pyx_scope_struct_18_sock_connect++] = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_18_sock_connect *)o);
  140232. } else {
  140233. (*Py_TYPE(o)->tp_free)(o);
  140234. }
  140235. }
  140236. static int __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_18_sock_connect(PyObject *o, visitproc v, void *a) {
  140237. int e;
  140238. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_18_sock_connect *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_18_sock_connect *)o;
  140239. if (p->__pyx_v__) {
  140240. e = (*v)(p->__pyx_v__, a); if (e) return e;
  140241. }
  140242. if (p->__pyx_v_address) {
  140243. e = (*v)(p->__pyx_v_address, a); if (e) return e;
  140244. }
  140245. if (p->__pyx_v_addrs) {
  140246. e = (*v)(p->__pyx_v_addrs, a); if (e) return e;
  140247. }
  140248. if (p->__pyx_v_fut) {
  140249. e = (*v)(p->__pyx_v_fut, a); if (e) return e;
  140250. }
  140251. if (p->__pyx_v_self) {
  140252. e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  140253. }
  140254. if (p->__pyx_v_sock) {
  140255. e = (*v)(p->__pyx_v_sock, a); if (e) return e;
  140256. }
  140257. return 0;
  140258. }
  140259. static PyTypeObject __pyx_type_6uvloop_4loop___pyx_scope_struct_18_sock_connect = {
  140260. PyVarObject_HEAD_INIT(0, 0)
  140261. "uvloop.loop.__pyx_scope_struct_18_sock_connect", /*tp_name*/
  140262. sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_18_sock_connect), /*tp_basicsize*/
  140263. 0, /*tp_itemsize*/
  140264. __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_18_sock_connect, /*tp_dealloc*/
  140265. 0, /*tp_print*/
  140266. 0, /*tp_getattr*/
  140267. 0, /*tp_setattr*/
  140268. #if PY_MAJOR_VERSION < 3
  140269. 0, /*tp_compare*/
  140270. #endif
  140271. #if PY_MAJOR_VERSION >= 3
  140272. 0, /*tp_as_async*/
  140273. #endif
  140274. 0, /*tp_repr*/
  140275. 0, /*tp_as_number*/
  140276. 0, /*tp_as_sequence*/
  140277. 0, /*tp_as_mapping*/
  140278. 0, /*tp_hash*/
  140279. 0, /*tp_call*/
  140280. 0, /*tp_str*/
  140281. 0, /*tp_getattro*/
  140282. 0, /*tp_setattro*/
  140283. 0, /*tp_as_buffer*/
  140284. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  140285. 0, /*tp_doc*/
  140286. __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_18_sock_connect, /*tp_traverse*/
  140287. 0, /*tp_clear*/
  140288. 0, /*tp_richcompare*/
  140289. 0, /*tp_weaklistoffset*/
  140290. 0, /*tp_iter*/
  140291. 0, /*tp_iternext*/
  140292. 0, /*tp_methods*/
  140293. 0, /*tp_members*/
  140294. 0, /*tp_getset*/
  140295. 0, /*tp_base*/
  140296. 0, /*tp_dict*/
  140297. 0, /*tp_descr_get*/
  140298. 0, /*tp_descr_set*/
  140299. 0, /*tp_dictoffset*/
  140300. 0, /*tp_init*/
  140301. 0, /*tp_alloc*/
  140302. __pyx_tp_new_6uvloop_4loop___pyx_scope_struct_18_sock_connect, /*tp_new*/
  140303. 0, /*tp_free*/
  140304. 0, /*tp_is_gc*/
  140305. 0, /*tp_bases*/
  140306. 0, /*tp_mro*/
  140307. 0, /*tp_cache*/
  140308. 0, /*tp_subclasses*/
  140309. 0, /*tp_weaklist*/
  140310. 0, /*tp_del*/
  140311. 0, /*tp_version_tag*/
  140312. #if PY_VERSION_HEX >= 0x030400a1
  140313. 0, /*tp_finalize*/
  140314. #endif
  140315. #if PY_VERSION_HEX >= 0x030800b1
  140316. 0, /*tp_vectorcall*/
  140317. #endif
  140318. };
  140319. static struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_19_connect_accepted_socket *__pyx_freelist_6uvloop_4loop___pyx_scope_struct_19_connect_accepted_socket[8];
  140320. static int __pyx_freecount_6uvloop_4loop___pyx_scope_struct_19_connect_accepted_socket = 0;
  140321. static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_19_connect_accepted_socket(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  140322. PyObject *o;
  140323. if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_19_connect_accepted_socket > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_19_connect_accepted_socket)))) {
  140324. o = (PyObject*)__pyx_freelist_6uvloop_4loop___pyx_scope_struct_19_connect_accepted_socket[--__pyx_freecount_6uvloop_4loop___pyx_scope_struct_19_connect_accepted_socket];
  140325. memset(o, 0, sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_19_connect_accepted_socket));
  140326. (void) PyObject_INIT(o, t);
  140327. PyObject_GC_Track(o);
  140328. } else {
  140329. o = (*t->tp_alloc)(t, 0);
  140330. if (unlikely(!o)) return 0;
  140331. }
  140332. return o;
  140333. }
  140334. static void __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_19_connect_accepted_socket(PyObject *o) {
  140335. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_19_connect_accepted_socket *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_19_connect_accepted_socket *)o;
  140336. PyObject_GC_UnTrack(o);
  140337. Py_CLEAR(p->__pyx_v_app_protocol);
  140338. Py_CLEAR(p->__pyx_v_app_transport);
  140339. Py_CLEAR(p->__pyx_v_protocol);
  140340. Py_CLEAR(p->__pyx_v_protocol_factory);
  140341. Py_CLEAR(p->__pyx_v_self);
  140342. Py_CLEAR(p->__pyx_v_sock);
  140343. Py_CLEAR(p->__pyx_v_ssl);
  140344. Py_CLEAR(p->__pyx_v_ssl_handshake_timeout);
  140345. Py_CLEAR(p->__pyx_v_ssl_shutdown_timeout);
  140346. Py_CLEAR(p->__pyx_v_transport);
  140347. Py_CLEAR(p->__pyx_v_transport_waiter);
  140348. Py_CLEAR(p->__pyx_v_waiter);
  140349. Py_CLEAR(p->__pyx_t_0);
  140350. Py_CLEAR(p->__pyx_t_1);
  140351. Py_CLEAR(p->__pyx_t_2);
  140352. if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_19_connect_accepted_socket < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_19_connect_accepted_socket)))) {
  140353. __pyx_freelist_6uvloop_4loop___pyx_scope_struct_19_connect_accepted_socket[__pyx_freecount_6uvloop_4loop___pyx_scope_struct_19_connect_accepted_socket++] = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_19_connect_accepted_socket *)o);
  140354. } else {
  140355. (*Py_TYPE(o)->tp_free)(o);
  140356. }
  140357. }
  140358. static int __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_19_connect_accepted_socket(PyObject *o, visitproc v, void *a) {
  140359. int e;
  140360. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_19_connect_accepted_socket *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_19_connect_accepted_socket *)o;
  140361. if (p->__pyx_v_app_protocol) {
  140362. e = (*v)(p->__pyx_v_app_protocol, a); if (e) return e;
  140363. }
  140364. if (p->__pyx_v_app_transport) {
  140365. e = (*v)(p->__pyx_v_app_transport, a); if (e) return e;
  140366. }
  140367. if (p->__pyx_v_protocol) {
  140368. e = (*v)(p->__pyx_v_protocol, a); if (e) return e;
  140369. }
  140370. if (p->__pyx_v_protocol_factory) {
  140371. e = (*v)(p->__pyx_v_protocol_factory, a); if (e) return e;
  140372. }
  140373. if (p->__pyx_v_self) {
  140374. e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  140375. }
  140376. if (p->__pyx_v_sock) {
  140377. e = (*v)(p->__pyx_v_sock, a); if (e) return e;
  140378. }
  140379. if (p->__pyx_v_ssl) {
  140380. e = (*v)(p->__pyx_v_ssl, a); if (e) return e;
  140381. }
  140382. if (p->__pyx_v_ssl_handshake_timeout) {
  140383. e = (*v)(p->__pyx_v_ssl_handshake_timeout, a); if (e) return e;
  140384. }
  140385. if (p->__pyx_v_ssl_shutdown_timeout) {
  140386. e = (*v)(p->__pyx_v_ssl_shutdown_timeout, a); if (e) return e;
  140387. }
  140388. if (p->__pyx_v_transport) {
  140389. e = (*v)(((PyObject *)p->__pyx_v_transport), a); if (e) return e;
  140390. }
  140391. if (p->__pyx_v_transport_waiter) {
  140392. e = (*v)(p->__pyx_v_transport_waiter, a); if (e) return e;
  140393. }
  140394. if (p->__pyx_v_waiter) {
  140395. e = (*v)(p->__pyx_v_waiter, a); if (e) return e;
  140396. }
  140397. if (p->__pyx_t_0) {
  140398. e = (*v)(p->__pyx_t_0, a); if (e) return e;
  140399. }
  140400. if (p->__pyx_t_1) {
  140401. e = (*v)(p->__pyx_t_1, a); if (e) return e;
  140402. }
  140403. if (p->__pyx_t_2) {
  140404. e = (*v)(p->__pyx_t_2, a); if (e) return e;
  140405. }
  140406. return 0;
  140407. }
  140408. static PyTypeObject __pyx_type_6uvloop_4loop___pyx_scope_struct_19_connect_accepted_socket = {
  140409. PyVarObject_HEAD_INIT(0, 0)
  140410. "uvloop.loop.__pyx_scope_struct_19_connect_accepted_socket", /*tp_name*/
  140411. sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_19_connect_accepted_socket), /*tp_basicsize*/
  140412. 0, /*tp_itemsize*/
  140413. __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_19_connect_accepted_socket, /*tp_dealloc*/
  140414. 0, /*tp_print*/
  140415. 0, /*tp_getattr*/
  140416. 0, /*tp_setattr*/
  140417. #if PY_MAJOR_VERSION < 3
  140418. 0, /*tp_compare*/
  140419. #endif
  140420. #if PY_MAJOR_VERSION >= 3
  140421. 0, /*tp_as_async*/
  140422. #endif
  140423. 0, /*tp_repr*/
  140424. 0, /*tp_as_number*/
  140425. 0, /*tp_as_sequence*/
  140426. 0, /*tp_as_mapping*/
  140427. 0, /*tp_hash*/
  140428. 0, /*tp_call*/
  140429. 0, /*tp_str*/
  140430. 0, /*tp_getattro*/
  140431. 0, /*tp_setattro*/
  140432. 0, /*tp_as_buffer*/
  140433. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  140434. 0, /*tp_doc*/
  140435. __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_19_connect_accepted_socket, /*tp_traverse*/
  140436. 0, /*tp_clear*/
  140437. 0, /*tp_richcompare*/
  140438. 0, /*tp_weaklistoffset*/
  140439. 0, /*tp_iter*/
  140440. 0, /*tp_iternext*/
  140441. 0, /*tp_methods*/
  140442. 0, /*tp_members*/
  140443. 0, /*tp_getset*/
  140444. 0, /*tp_base*/
  140445. 0, /*tp_dict*/
  140446. 0, /*tp_descr_get*/
  140447. 0, /*tp_descr_set*/
  140448. 0, /*tp_dictoffset*/
  140449. 0, /*tp_init*/
  140450. 0, /*tp_alloc*/
  140451. __pyx_tp_new_6uvloop_4loop___pyx_scope_struct_19_connect_accepted_socket, /*tp_new*/
  140452. 0, /*tp_free*/
  140453. 0, /*tp_is_gc*/
  140454. 0, /*tp_bases*/
  140455. 0, /*tp_mro*/
  140456. 0, /*tp_cache*/
  140457. 0, /*tp_subclasses*/
  140458. 0, /*tp_weaklist*/
  140459. 0, /*tp_del*/
  140460. 0, /*tp_version_tag*/
  140461. #if PY_VERSION_HEX >= 0x030400a1
  140462. 0, /*tp_finalize*/
  140463. #endif
  140464. #if PY_VERSION_HEX >= 0x030800b1
  140465. 0, /*tp_vectorcall*/
  140466. #endif
  140467. };
  140468. static struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_20___subprocess_run *__pyx_freelist_6uvloop_4loop___pyx_scope_struct_20___subprocess_run[8];
  140469. static int __pyx_freecount_6uvloop_4loop___pyx_scope_struct_20___subprocess_run = 0;
  140470. static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_20___subprocess_run(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  140471. PyObject *o;
  140472. if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_20___subprocess_run > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_20___subprocess_run)))) {
  140473. o = (PyObject*)__pyx_freelist_6uvloop_4loop___pyx_scope_struct_20___subprocess_run[--__pyx_freecount_6uvloop_4loop___pyx_scope_struct_20___subprocess_run];
  140474. memset(o, 0, sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_20___subprocess_run));
  140475. (void) PyObject_INIT(o, t);
  140476. PyObject_GC_Track(o);
  140477. } else {
  140478. o = (*t->tp_alloc)(t, 0);
  140479. if (unlikely(!o)) return 0;
  140480. }
  140481. return o;
  140482. }
  140483. static void __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_20___subprocess_run(PyObject *o) {
  140484. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_20___subprocess_run *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_20___subprocess_run *)o;
  140485. PyObject_GC_UnTrack(o);
  140486. Py_CLEAR(p->__pyx_v___uvloop_sleep_after_fork);
  140487. Py_CLEAR(p->__pyx_v_args);
  140488. Py_CLEAR(p->__pyx_v_bufsize);
  140489. Py_CLEAR(p->__pyx_v_close_fds);
  140490. Py_CLEAR(p->__pyx_v_creationflags);
  140491. Py_CLEAR(p->__pyx_v_cwd);
  140492. Py_CLEAR(p->__pyx_v_env);
  140493. Py_CLEAR(p->__pyx_v_executable);
  140494. Py_CLEAR(p->__pyx_v_pass_fds);
  140495. Py_CLEAR(p->__pyx_v_preexec_fn);
  140496. Py_CLEAR(p->__pyx_v_proc);
  140497. Py_CLEAR(p->__pyx_v_protocol);
  140498. Py_CLEAR(p->__pyx_v_protocol_factory);
  140499. Py_CLEAR(p->__pyx_v_restore_signals);
  140500. Py_CLEAR(p->__pyx_v_self);
  140501. Py_CLEAR(p->__pyx_v_shell);
  140502. Py_CLEAR(p->__pyx_v_start_new_session);
  140503. Py_CLEAR(p->__pyx_v_startupinfo);
  140504. Py_CLEAR(p->__pyx_v_stderr);
  140505. Py_CLEAR(p->__pyx_v_stdin);
  140506. Py_CLEAR(p->__pyx_v_stdout);
  140507. Py_CLEAR(p->__pyx_v_universal_newlines);
  140508. Py_CLEAR(p->__pyx_v_waiter);
  140509. Py_CLEAR(p->__pyx_t_0);
  140510. Py_CLEAR(p->__pyx_t_1);
  140511. Py_CLEAR(p->__pyx_t_2);
  140512. if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_20___subprocess_run < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_20___subprocess_run)))) {
  140513. __pyx_freelist_6uvloop_4loop___pyx_scope_struct_20___subprocess_run[__pyx_freecount_6uvloop_4loop___pyx_scope_struct_20___subprocess_run++] = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_20___subprocess_run *)o);
  140514. } else {
  140515. (*Py_TYPE(o)->tp_free)(o);
  140516. }
  140517. }
  140518. static int __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_20___subprocess_run(PyObject *o, visitproc v, void *a) {
  140519. int e;
  140520. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_20___subprocess_run *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_20___subprocess_run *)o;
  140521. if (p->__pyx_v___uvloop_sleep_after_fork) {
  140522. e = (*v)(p->__pyx_v___uvloop_sleep_after_fork, a); if (e) return e;
  140523. }
  140524. if (p->__pyx_v_args) {
  140525. e = (*v)(p->__pyx_v_args, a); if (e) return e;
  140526. }
  140527. if (p->__pyx_v_bufsize) {
  140528. e = (*v)(p->__pyx_v_bufsize, a); if (e) return e;
  140529. }
  140530. if (p->__pyx_v_close_fds) {
  140531. e = (*v)(p->__pyx_v_close_fds, a); if (e) return e;
  140532. }
  140533. if (p->__pyx_v_creationflags) {
  140534. e = (*v)(p->__pyx_v_creationflags, a); if (e) return e;
  140535. }
  140536. if (p->__pyx_v_cwd) {
  140537. e = (*v)(p->__pyx_v_cwd, a); if (e) return e;
  140538. }
  140539. if (p->__pyx_v_env) {
  140540. e = (*v)(p->__pyx_v_env, a); if (e) return e;
  140541. }
  140542. if (p->__pyx_v_executable) {
  140543. e = (*v)(p->__pyx_v_executable, a); if (e) return e;
  140544. }
  140545. if (p->__pyx_v_pass_fds) {
  140546. e = (*v)(p->__pyx_v_pass_fds, a); if (e) return e;
  140547. }
  140548. if (p->__pyx_v_preexec_fn) {
  140549. e = (*v)(p->__pyx_v_preexec_fn, a); if (e) return e;
  140550. }
  140551. if (p->__pyx_v_proc) {
  140552. e = (*v)(((PyObject *)p->__pyx_v_proc), a); if (e) return e;
  140553. }
  140554. if (p->__pyx_v_protocol) {
  140555. e = (*v)(p->__pyx_v_protocol, a); if (e) return e;
  140556. }
  140557. if (p->__pyx_v_protocol_factory) {
  140558. e = (*v)(p->__pyx_v_protocol_factory, a); if (e) return e;
  140559. }
  140560. if (p->__pyx_v_restore_signals) {
  140561. e = (*v)(p->__pyx_v_restore_signals, a); if (e) return e;
  140562. }
  140563. if (p->__pyx_v_self) {
  140564. e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  140565. }
  140566. if (p->__pyx_v_shell) {
  140567. e = (*v)(p->__pyx_v_shell, a); if (e) return e;
  140568. }
  140569. if (p->__pyx_v_start_new_session) {
  140570. e = (*v)(p->__pyx_v_start_new_session, a); if (e) return e;
  140571. }
  140572. if (p->__pyx_v_startupinfo) {
  140573. e = (*v)(p->__pyx_v_startupinfo, a); if (e) return e;
  140574. }
  140575. if (p->__pyx_v_stderr) {
  140576. e = (*v)(p->__pyx_v_stderr, a); if (e) return e;
  140577. }
  140578. if (p->__pyx_v_stdin) {
  140579. e = (*v)(p->__pyx_v_stdin, a); if (e) return e;
  140580. }
  140581. if (p->__pyx_v_stdout) {
  140582. e = (*v)(p->__pyx_v_stdout, a); if (e) return e;
  140583. }
  140584. if (p->__pyx_v_universal_newlines) {
  140585. e = (*v)(p->__pyx_v_universal_newlines, a); if (e) return e;
  140586. }
  140587. if (p->__pyx_v_waiter) {
  140588. e = (*v)(p->__pyx_v_waiter, a); if (e) return e;
  140589. }
  140590. if (p->__pyx_t_0) {
  140591. e = (*v)(p->__pyx_t_0, a); if (e) return e;
  140592. }
  140593. if (p->__pyx_t_1) {
  140594. e = (*v)(p->__pyx_t_1, a); if (e) return e;
  140595. }
  140596. if (p->__pyx_t_2) {
  140597. e = (*v)(p->__pyx_t_2, a); if (e) return e;
  140598. }
  140599. return 0;
  140600. }
  140601. static PyTypeObject __pyx_type_6uvloop_4loop___pyx_scope_struct_20___subprocess_run = {
  140602. PyVarObject_HEAD_INIT(0, 0)
  140603. "uvloop.loop.__pyx_scope_struct_20___subprocess_run", /*tp_name*/
  140604. sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_20___subprocess_run), /*tp_basicsize*/
  140605. 0, /*tp_itemsize*/
  140606. __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_20___subprocess_run, /*tp_dealloc*/
  140607. 0, /*tp_print*/
  140608. 0, /*tp_getattr*/
  140609. 0, /*tp_setattr*/
  140610. #if PY_MAJOR_VERSION < 3
  140611. 0, /*tp_compare*/
  140612. #endif
  140613. #if PY_MAJOR_VERSION >= 3
  140614. 0, /*tp_as_async*/
  140615. #endif
  140616. 0, /*tp_repr*/
  140617. 0, /*tp_as_number*/
  140618. 0, /*tp_as_sequence*/
  140619. 0, /*tp_as_mapping*/
  140620. 0, /*tp_hash*/
  140621. 0, /*tp_call*/
  140622. 0, /*tp_str*/
  140623. 0, /*tp_getattro*/
  140624. 0, /*tp_setattro*/
  140625. 0, /*tp_as_buffer*/
  140626. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  140627. 0, /*tp_doc*/
  140628. __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_20___subprocess_run, /*tp_traverse*/
  140629. 0, /*tp_clear*/
  140630. 0, /*tp_richcompare*/
  140631. 0, /*tp_weaklistoffset*/
  140632. 0, /*tp_iter*/
  140633. 0, /*tp_iternext*/
  140634. 0, /*tp_methods*/
  140635. 0, /*tp_members*/
  140636. 0, /*tp_getset*/
  140637. 0, /*tp_base*/
  140638. 0, /*tp_dict*/
  140639. 0, /*tp_descr_get*/
  140640. 0, /*tp_descr_set*/
  140641. 0, /*tp_dictoffset*/
  140642. 0, /*tp_init*/
  140643. 0, /*tp_alloc*/
  140644. __pyx_tp_new_6uvloop_4loop___pyx_scope_struct_20___subprocess_run, /*tp_new*/
  140645. 0, /*tp_free*/
  140646. 0, /*tp_is_gc*/
  140647. 0, /*tp_bases*/
  140648. 0, /*tp_mro*/
  140649. 0, /*tp_cache*/
  140650. 0, /*tp_subclasses*/
  140651. 0, /*tp_weaklist*/
  140652. 0, /*tp_del*/
  140653. 0, /*tp_version_tag*/
  140654. #if PY_VERSION_HEX >= 0x030400a1
  140655. 0, /*tp_finalize*/
  140656. #endif
  140657. #if PY_VERSION_HEX >= 0x030800b1
  140658. 0, /*tp_vectorcall*/
  140659. #endif
  140660. };
  140661. static struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_21_subprocess_shell *__pyx_freelist_6uvloop_4loop___pyx_scope_struct_21_subprocess_shell[8];
  140662. static int __pyx_freecount_6uvloop_4loop___pyx_scope_struct_21_subprocess_shell = 0;
  140663. static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_21_subprocess_shell(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  140664. PyObject *o;
  140665. if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_21_subprocess_shell > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_21_subprocess_shell)))) {
  140666. o = (PyObject*)__pyx_freelist_6uvloop_4loop___pyx_scope_struct_21_subprocess_shell[--__pyx_freecount_6uvloop_4loop___pyx_scope_struct_21_subprocess_shell];
  140667. memset(o, 0, sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_21_subprocess_shell));
  140668. (void) PyObject_INIT(o, t);
  140669. PyObject_GC_Track(o);
  140670. } else {
  140671. o = (*t->tp_alloc)(t, 0);
  140672. if (unlikely(!o)) return 0;
  140673. }
  140674. return o;
  140675. }
  140676. static void __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_21_subprocess_shell(PyObject *o) {
  140677. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_21_subprocess_shell *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_21_subprocess_shell *)o;
  140678. PyObject_GC_UnTrack(o);
  140679. Py_CLEAR(p->__pyx_v_args);
  140680. Py_CLEAR(p->__pyx_v_cmd);
  140681. Py_CLEAR(p->__pyx_v_kwargs);
  140682. Py_CLEAR(p->__pyx_v_protocol_factory);
  140683. Py_CLEAR(p->__pyx_v_self);
  140684. Py_CLEAR(p->__pyx_v_shell);
  140685. if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_21_subprocess_shell < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_21_subprocess_shell)))) {
  140686. __pyx_freelist_6uvloop_4loop___pyx_scope_struct_21_subprocess_shell[__pyx_freecount_6uvloop_4loop___pyx_scope_struct_21_subprocess_shell++] = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_21_subprocess_shell *)o);
  140687. } else {
  140688. (*Py_TYPE(o)->tp_free)(o);
  140689. }
  140690. }
  140691. static int __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_21_subprocess_shell(PyObject *o, visitproc v, void *a) {
  140692. int e;
  140693. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_21_subprocess_shell *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_21_subprocess_shell *)o;
  140694. if (p->__pyx_v_args) {
  140695. e = (*v)(p->__pyx_v_args, a); if (e) return e;
  140696. }
  140697. if (p->__pyx_v_cmd) {
  140698. e = (*v)(p->__pyx_v_cmd, a); if (e) return e;
  140699. }
  140700. if (p->__pyx_v_kwargs) {
  140701. e = (*v)(p->__pyx_v_kwargs, a); if (e) return e;
  140702. }
  140703. if (p->__pyx_v_protocol_factory) {
  140704. e = (*v)(p->__pyx_v_protocol_factory, a); if (e) return e;
  140705. }
  140706. if (p->__pyx_v_self) {
  140707. e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  140708. }
  140709. if (p->__pyx_v_shell) {
  140710. e = (*v)(p->__pyx_v_shell, a); if (e) return e;
  140711. }
  140712. return 0;
  140713. }
  140714. static PyTypeObject __pyx_type_6uvloop_4loop___pyx_scope_struct_21_subprocess_shell = {
  140715. PyVarObject_HEAD_INIT(0, 0)
  140716. "uvloop.loop.__pyx_scope_struct_21_subprocess_shell", /*tp_name*/
  140717. sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_21_subprocess_shell), /*tp_basicsize*/
  140718. 0, /*tp_itemsize*/
  140719. __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_21_subprocess_shell, /*tp_dealloc*/
  140720. 0, /*tp_print*/
  140721. 0, /*tp_getattr*/
  140722. 0, /*tp_setattr*/
  140723. #if PY_MAJOR_VERSION < 3
  140724. 0, /*tp_compare*/
  140725. #endif
  140726. #if PY_MAJOR_VERSION >= 3
  140727. 0, /*tp_as_async*/
  140728. #endif
  140729. 0, /*tp_repr*/
  140730. 0, /*tp_as_number*/
  140731. 0, /*tp_as_sequence*/
  140732. 0, /*tp_as_mapping*/
  140733. 0, /*tp_hash*/
  140734. 0, /*tp_call*/
  140735. 0, /*tp_str*/
  140736. 0, /*tp_getattro*/
  140737. 0, /*tp_setattro*/
  140738. 0, /*tp_as_buffer*/
  140739. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  140740. 0, /*tp_doc*/
  140741. __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_21_subprocess_shell, /*tp_traverse*/
  140742. 0, /*tp_clear*/
  140743. 0, /*tp_richcompare*/
  140744. 0, /*tp_weaklistoffset*/
  140745. 0, /*tp_iter*/
  140746. 0, /*tp_iternext*/
  140747. 0, /*tp_methods*/
  140748. 0, /*tp_members*/
  140749. 0, /*tp_getset*/
  140750. 0, /*tp_base*/
  140751. 0, /*tp_dict*/
  140752. 0, /*tp_descr_get*/
  140753. 0, /*tp_descr_set*/
  140754. 0, /*tp_dictoffset*/
  140755. 0, /*tp_init*/
  140756. 0, /*tp_alloc*/
  140757. __pyx_tp_new_6uvloop_4loop___pyx_scope_struct_21_subprocess_shell, /*tp_new*/
  140758. 0, /*tp_free*/
  140759. 0, /*tp_is_gc*/
  140760. 0, /*tp_bases*/
  140761. 0, /*tp_mro*/
  140762. 0, /*tp_cache*/
  140763. 0, /*tp_subclasses*/
  140764. 0, /*tp_weaklist*/
  140765. 0, /*tp_del*/
  140766. 0, /*tp_version_tag*/
  140767. #if PY_VERSION_HEX >= 0x030400a1
  140768. 0, /*tp_finalize*/
  140769. #endif
  140770. #if PY_VERSION_HEX >= 0x030800b1
  140771. 0, /*tp_vectorcall*/
  140772. #endif
  140773. };
  140774. static struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_22_subprocess_exec *__pyx_freelist_6uvloop_4loop___pyx_scope_struct_22_subprocess_exec[8];
  140775. static int __pyx_freecount_6uvloop_4loop___pyx_scope_struct_22_subprocess_exec = 0;
  140776. static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_22_subprocess_exec(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  140777. PyObject *o;
  140778. if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_22_subprocess_exec > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_22_subprocess_exec)))) {
  140779. o = (PyObject*)__pyx_freelist_6uvloop_4loop___pyx_scope_struct_22_subprocess_exec[--__pyx_freecount_6uvloop_4loop___pyx_scope_struct_22_subprocess_exec];
  140780. memset(o, 0, sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_22_subprocess_exec));
  140781. (void) PyObject_INIT(o, t);
  140782. PyObject_GC_Track(o);
  140783. } else {
  140784. o = (*t->tp_alloc)(t, 0);
  140785. if (unlikely(!o)) return 0;
  140786. }
  140787. return o;
  140788. }
  140789. static void __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_22_subprocess_exec(PyObject *o) {
  140790. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_22_subprocess_exec *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_22_subprocess_exec *)o;
  140791. PyObject_GC_UnTrack(o);
  140792. Py_CLEAR(p->__pyx_v_args);
  140793. Py_CLEAR(p->__pyx_v_kwargs);
  140794. Py_CLEAR(p->__pyx_v_program);
  140795. Py_CLEAR(p->__pyx_v_protocol_factory);
  140796. Py_CLEAR(p->__pyx_v_self);
  140797. Py_CLEAR(p->__pyx_v_shell);
  140798. if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_22_subprocess_exec < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_22_subprocess_exec)))) {
  140799. __pyx_freelist_6uvloop_4loop___pyx_scope_struct_22_subprocess_exec[__pyx_freecount_6uvloop_4loop___pyx_scope_struct_22_subprocess_exec++] = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_22_subprocess_exec *)o);
  140800. } else {
  140801. (*Py_TYPE(o)->tp_free)(o);
  140802. }
  140803. }
  140804. static int __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_22_subprocess_exec(PyObject *o, visitproc v, void *a) {
  140805. int e;
  140806. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_22_subprocess_exec *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_22_subprocess_exec *)o;
  140807. if (p->__pyx_v_args) {
  140808. e = (*v)(p->__pyx_v_args, a); if (e) return e;
  140809. }
  140810. if (p->__pyx_v_kwargs) {
  140811. e = (*v)(p->__pyx_v_kwargs, a); if (e) return e;
  140812. }
  140813. if (p->__pyx_v_program) {
  140814. e = (*v)(p->__pyx_v_program, a); if (e) return e;
  140815. }
  140816. if (p->__pyx_v_protocol_factory) {
  140817. e = (*v)(p->__pyx_v_protocol_factory, a); if (e) return e;
  140818. }
  140819. if (p->__pyx_v_self) {
  140820. e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  140821. }
  140822. if (p->__pyx_v_shell) {
  140823. e = (*v)(p->__pyx_v_shell, a); if (e) return e;
  140824. }
  140825. return 0;
  140826. }
  140827. static PyTypeObject __pyx_type_6uvloop_4loop___pyx_scope_struct_22_subprocess_exec = {
  140828. PyVarObject_HEAD_INIT(0, 0)
  140829. "uvloop.loop.__pyx_scope_struct_22_subprocess_exec", /*tp_name*/
  140830. sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_22_subprocess_exec), /*tp_basicsize*/
  140831. 0, /*tp_itemsize*/
  140832. __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_22_subprocess_exec, /*tp_dealloc*/
  140833. 0, /*tp_print*/
  140834. 0, /*tp_getattr*/
  140835. 0, /*tp_setattr*/
  140836. #if PY_MAJOR_VERSION < 3
  140837. 0, /*tp_compare*/
  140838. #endif
  140839. #if PY_MAJOR_VERSION >= 3
  140840. 0, /*tp_as_async*/
  140841. #endif
  140842. 0, /*tp_repr*/
  140843. 0, /*tp_as_number*/
  140844. 0, /*tp_as_sequence*/
  140845. 0, /*tp_as_mapping*/
  140846. 0, /*tp_hash*/
  140847. 0, /*tp_call*/
  140848. 0, /*tp_str*/
  140849. 0, /*tp_getattro*/
  140850. 0, /*tp_setattro*/
  140851. 0, /*tp_as_buffer*/
  140852. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  140853. 0, /*tp_doc*/
  140854. __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_22_subprocess_exec, /*tp_traverse*/
  140855. 0, /*tp_clear*/
  140856. 0, /*tp_richcompare*/
  140857. 0, /*tp_weaklistoffset*/
  140858. 0, /*tp_iter*/
  140859. 0, /*tp_iternext*/
  140860. 0, /*tp_methods*/
  140861. 0, /*tp_members*/
  140862. 0, /*tp_getset*/
  140863. 0, /*tp_base*/
  140864. 0, /*tp_dict*/
  140865. 0, /*tp_descr_get*/
  140866. 0, /*tp_descr_set*/
  140867. 0, /*tp_dictoffset*/
  140868. 0, /*tp_init*/
  140869. 0, /*tp_alloc*/
  140870. __pyx_tp_new_6uvloop_4loop___pyx_scope_struct_22_subprocess_exec, /*tp_new*/
  140871. 0, /*tp_free*/
  140872. 0, /*tp_is_gc*/
  140873. 0, /*tp_bases*/
  140874. 0, /*tp_mro*/
  140875. 0, /*tp_cache*/
  140876. 0, /*tp_subclasses*/
  140877. 0, /*tp_weaklist*/
  140878. 0, /*tp_del*/
  140879. 0, /*tp_version_tag*/
  140880. #if PY_VERSION_HEX >= 0x030400a1
  140881. 0, /*tp_finalize*/
  140882. #endif
  140883. #if PY_VERSION_HEX >= 0x030800b1
  140884. 0, /*tp_vectorcall*/
  140885. #endif
  140886. };
  140887. static struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_23_connect_read_pipe *__pyx_freelist_6uvloop_4loop___pyx_scope_struct_23_connect_read_pipe[8];
  140888. static int __pyx_freecount_6uvloop_4loop___pyx_scope_struct_23_connect_read_pipe = 0;
  140889. static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_23_connect_read_pipe(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  140890. PyObject *o;
  140891. if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_23_connect_read_pipe > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_23_connect_read_pipe)))) {
  140892. o = (PyObject*)__pyx_freelist_6uvloop_4loop___pyx_scope_struct_23_connect_read_pipe[--__pyx_freecount_6uvloop_4loop___pyx_scope_struct_23_connect_read_pipe];
  140893. memset(o, 0, sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_23_connect_read_pipe));
  140894. (void) PyObject_INIT(o, t);
  140895. PyObject_GC_Track(o);
  140896. } else {
  140897. o = (*t->tp_alloc)(t, 0);
  140898. if (unlikely(!o)) return 0;
  140899. }
  140900. return o;
  140901. }
  140902. static void __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_23_connect_read_pipe(PyObject *o) {
  140903. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_23_connect_read_pipe *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_23_connect_read_pipe *)o;
  140904. PyObject_GC_UnTrack(o);
  140905. Py_CLEAR(p->__pyx_v_pipe);
  140906. Py_CLEAR(p->__pyx_v_proto);
  140907. Py_CLEAR(p->__pyx_v_proto_factory);
  140908. Py_CLEAR(p->__pyx_v_self);
  140909. Py_CLEAR(p->__pyx_v_transp);
  140910. Py_CLEAR(p->__pyx_v_waiter);
  140911. Py_CLEAR(p->__pyx_t_0);
  140912. Py_CLEAR(p->__pyx_t_1);
  140913. Py_CLEAR(p->__pyx_t_2);
  140914. if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_23_connect_read_pipe < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_23_connect_read_pipe)))) {
  140915. __pyx_freelist_6uvloop_4loop___pyx_scope_struct_23_connect_read_pipe[__pyx_freecount_6uvloop_4loop___pyx_scope_struct_23_connect_read_pipe++] = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_23_connect_read_pipe *)o);
  140916. } else {
  140917. (*Py_TYPE(o)->tp_free)(o);
  140918. }
  140919. }
  140920. static int __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_23_connect_read_pipe(PyObject *o, visitproc v, void *a) {
  140921. int e;
  140922. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_23_connect_read_pipe *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_23_connect_read_pipe *)o;
  140923. if (p->__pyx_v_pipe) {
  140924. e = (*v)(p->__pyx_v_pipe, a); if (e) return e;
  140925. }
  140926. if (p->__pyx_v_proto) {
  140927. e = (*v)(p->__pyx_v_proto, a); if (e) return e;
  140928. }
  140929. if (p->__pyx_v_proto_factory) {
  140930. e = (*v)(p->__pyx_v_proto_factory, a); if (e) return e;
  140931. }
  140932. if (p->__pyx_v_self) {
  140933. e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  140934. }
  140935. if (p->__pyx_v_transp) {
  140936. e = (*v)(((PyObject *)p->__pyx_v_transp), a); if (e) return e;
  140937. }
  140938. if (p->__pyx_v_waiter) {
  140939. e = (*v)(p->__pyx_v_waiter, a); if (e) return e;
  140940. }
  140941. if (p->__pyx_t_0) {
  140942. e = (*v)(p->__pyx_t_0, a); if (e) return e;
  140943. }
  140944. if (p->__pyx_t_1) {
  140945. e = (*v)(p->__pyx_t_1, a); if (e) return e;
  140946. }
  140947. if (p->__pyx_t_2) {
  140948. e = (*v)(p->__pyx_t_2, a); if (e) return e;
  140949. }
  140950. return 0;
  140951. }
  140952. static PyTypeObject __pyx_type_6uvloop_4loop___pyx_scope_struct_23_connect_read_pipe = {
  140953. PyVarObject_HEAD_INIT(0, 0)
  140954. "uvloop.loop.__pyx_scope_struct_23_connect_read_pipe", /*tp_name*/
  140955. sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_23_connect_read_pipe), /*tp_basicsize*/
  140956. 0, /*tp_itemsize*/
  140957. __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_23_connect_read_pipe, /*tp_dealloc*/
  140958. 0, /*tp_print*/
  140959. 0, /*tp_getattr*/
  140960. 0, /*tp_setattr*/
  140961. #if PY_MAJOR_VERSION < 3
  140962. 0, /*tp_compare*/
  140963. #endif
  140964. #if PY_MAJOR_VERSION >= 3
  140965. 0, /*tp_as_async*/
  140966. #endif
  140967. 0, /*tp_repr*/
  140968. 0, /*tp_as_number*/
  140969. 0, /*tp_as_sequence*/
  140970. 0, /*tp_as_mapping*/
  140971. 0, /*tp_hash*/
  140972. 0, /*tp_call*/
  140973. 0, /*tp_str*/
  140974. 0, /*tp_getattro*/
  140975. 0, /*tp_setattro*/
  140976. 0, /*tp_as_buffer*/
  140977. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  140978. 0, /*tp_doc*/
  140979. __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_23_connect_read_pipe, /*tp_traverse*/
  140980. 0, /*tp_clear*/
  140981. 0, /*tp_richcompare*/
  140982. 0, /*tp_weaklistoffset*/
  140983. 0, /*tp_iter*/
  140984. 0, /*tp_iternext*/
  140985. 0, /*tp_methods*/
  140986. 0, /*tp_members*/
  140987. 0, /*tp_getset*/
  140988. 0, /*tp_base*/
  140989. 0, /*tp_dict*/
  140990. 0, /*tp_descr_get*/
  140991. 0, /*tp_descr_set*/
  140992. 0, /*tp_dictoffset*/
  140993. 0, /*tp_init*/
  140994. 0, /*tp_alloc*/
  140995. __pyx_tp_new_6uvloop_4loop___pyx_scope_struct_23_connect_read_pipe, /*tp_new*/
  140996. 0, /*tp_free*/
  140997. 0, /*tp_is_gc*/
  140998. 0, /*tp_bases*/
  140999. 0, /*tp_mro*/
  141000. 0, /*tp_cache*/
  141001. 0, /*tp_subclasses*/
  141002. 0, /*tp_weaklist*/
  141003. 0, /*tp_del*/
  141004. 0, /*tp_version_tag*/
  141005. #if PY_VERSION_HEX >= 0x030400a1
  141006. 0, /*tp_finalize*/
  141007. #endif
  141008. #if PY_VERSION_HEX >= 0x030800b1
  141009. 0, /*tp_vectorcall*/
  141010. #endif
  141011. };
  141012. static struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_24_connect_write_pipe *__pyx_freelist_6uvloop_4loop___pyx_scope_struct_24_connect_write_pipe[8];
  141013. static int __pyx_freecount_6uvloop_4loop___pyx_scope_struct_24_connect_write_pipe = 0;
  141014. static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_24_connect_write_pipe(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  141015. PyObject *o;
  141016. if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_24_connect_write_pipe > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_24_connect_write_pipe)))) {
  141017. o = (PyObject*)__pyx_freelist_6uvloop_4loop___pyx_scope_struct_24_connect_write_pipe[--__pyx_freecount_6uvloop_4loop___pyx_scope_struct_24_connect_write_pipe];
  141018. memset(o, 0, sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_24_connect_write_pipe));
  141019. (void) PyObject_INIT(o, t);
  141020. PyObject_GC_Track(o);
  141021. } else {
  141022. o = (*t->tp_alloc)(t, 0);
  141023. if (unlikely(!o)) return 0;
  141024. }
  141025. return o;
  141026. }
  141027. static void __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_24_connect_write_pipe(PyObject *o) {
  141028. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_24_connect_write_pipe *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_24_connect_write_pipe *)o;
  141029. PyObject_GC_UnTrack(o);
  141030. Py_CLEAR(p->__pyx_v_pipe);
  141031. Py_CLEAR(p->__pyx_v_proto);
  141032. Py_CLEAR(p->__pyx_v_proto_factory);
  141033. Py_CLEAR(p->__pyx_v_self);
  141034. Py_CLEAR(p->__pyx_v_transp);
  141035. Py_CLEAR(p->__pyx_v_waiter);
  141036. Py_CLEAR(p->__pyx_t_0);
  141037. Py_CLEAR(p->__pyx_t_1);
  141038. Py_CLEAR(p->__pyx_t_2);
  141039. if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_24_connect_write_pipe < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_24_connect_write_pipe)))) {
  141040. __pyx_freelist_6uvloop_4loop___pyx_scope_struct_24_connect_write_pipe[__pyx_freecount_6uvloop_4loop___pyx_scope_struct_24_connect_write_pipe++] = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_24_connect_write_pipe *)o);
  141041. } else {
  141042. (*Py_TYPE(o)->tp_free)(o);
  141043. }
  141044. }
  141045. static int __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_24_connect_write_pipe(PyObject *o, visitproc v, void *a) {
  141046. int e;
  141047. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_24_connect_write_pipe *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_24_connect_write_pipe *)o;
  141048. if (p->__pyx_v_pipe) {
  141049. e = (*v)(p->__pyx_v_pipe, a); if (e) return e;
  141050. }
  141051. if (p->__pyx_v_proto) {
  141052. e = (*v)(p->__pyx_v_proto, a); if (e) return e;
  141053. }
  141054. if (p->__pyx_v_proto_factory) {
  141055. e = (*v)(p->__pyx_v_proto_factory, a); if (e) return e;
  141056. }
  141057. if (p->__pyx_v_self) {
  141058. e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  141059. }
  141060. if (p->__pyx_v_transp) {
  141061. e = (*v)(((PyObject *)p->__pyx_v_transp), a); if (e) return e;
  141062. }
  141063. if (p->__pyx_v_waiter) {
  141064. e = (*v)(p->__pyx_v_waiter, a); if (e) return e;
  141065. }
  141066. if (p->__pyx_t_0) {
  141067. e = (*v)(p->__pyx_t_0, a); if (e) return e;
  141068. }
  141069. if (p->__pyx_t_1) {
  141070. e = (*v)(p->__pyx_t_1, a); if (e) return e;
  141071. }
  141072. if (p->__pyx_t_2) {
  141073. e = (*v)(p->__pyx_t_2, a); if (e) return e;
  141074. }
  141075. return 0;
  141076. }
  141077. static PyTypeObject __pyx_type_6uvloop_4loop___pyx_scope_struct_24_connect_write_pipe = {
  141078. PyVarObject_HEAD_INIT(0, 0)
  141079. "uvloop.loop.__pyx_scope_struct_24_connect_write_pipe", /*tp_name*/
  141080. sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_24_connect_write_pipe), /*tp_basicsize*/
  141081. 0, /*tp_itemsize*/
  141082. __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_24_connect_write_pipe, /*tp_dealloc*/
  141083. 0, /*tp_print*/
  141084. 0, /*tp_getattr*/
  141085. 0, /*tp_setattr*/
  141086. #if PY_MAJOR_VERSION < 3
  141087. 0, /*tp_compare*/
  141088. #endif
  141089. #if PY_MAJOR_VERSION >= 3
  141090. 0, /*tp_as_async*/
  141091. #endif
  141092. 0, /*tp_repr*/
  141093. 0, /*tp_as_number*/
  141094. 0, /*tp_as_sequence*/
  141095. 0, /*tp_as_mapping*/
  141096. 0, /*tp_hash*/
  141097. 0, /*tp_call*/
  141098. 0, /*tp_str*/
  141099. 0, /*tp_getattro*/
  141100. 0, /*tp_setattro*/
  141101. 0, /*tp_as_buffer*/
  141102. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  141103. 0, /*tp_doc*/
  141104. __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_24_connect_write_pipe, /*tp_traverse*/
  141105. 0, /*tp_clear*/
  141106. 0, /*tp_richcompare*/
  141107. 0, /*tp_weaklistoffset*/
  141108. 0, /*tp_iter*/
  141109. 0, /*tp_iternext*/
  141110. 0, /*tp_methods*/
  141111. 0, /*tp_members*/
  141112. 0, /*tp_getset*/
  141113. 0, /*tp_base*/
  141114. 0, /*tp_dict*/
  141115. 0, /*tp_descr_get*/
  141116. 0, /*tp_descr_set*/
  141117. 0, /*tp_dictoffset*/
  141118. 0, /*tp_init*/
  141119. 0, /*tp_alloc*/
  141120. __pyx_tp_new_6uvloop_4loop___pyx_scope_struct_24_connect_write_pipe, /*tp_new*/
  141121. 0, /*tp_free*/
  141122. 0, /*tp_is_gc*/
  141123. 0, /*tp_bases*/
  141124. 0, /*tp_mro*/
  141125. 0, /*tp_cache*/
  141126. 0, /*tp_subclasses*/
  141127. 0, /*tp_weaklist*/
  141128. 0, /*tp_del*/
  141129. 0, /*tp_version_tag*/
  141130. #if PY_VERSION_HEX >= 0x030400a1
  141131. 0, /*tp_finalize*/
  141132. #endif
  141133. #if PY_VERSION_HEX >= 0x030800b1
  141134. 0, /*tp_vectorcall*/
  141135. #endif
  141136. };
  141137. static struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_25_create_datagram_endpoint *__pyx_freelist_6uvloop_4loop___pyx_scope_struct_25_create_datagram_endpoint[8];
  141138. static int __pyx_freecount_6uvloop_4loop___pyx_scope_struct_25_create_datagram_endpoint = 0;
  141139. static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_25_create_datagram_endpoint(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  141140. PyObject *o;
  141141. if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_25_create_datagram_endpoint > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_25_create_datagram_endpoint)))) {
  141142. o = (PyObject*)__pyx_freelist_6uvloop_4loop___pyx_scope_struct_25_create_datagram_endpoint[--__pyx_freecount_6uvloop_4loop___pyx_scope_struct_25_create_datagram_endpoint];
  141143. memset(o, 0, sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_25_create_datagram_endpoint));
  141144. (void) PyObject_INIT(o, t);
  141145. PyObject_GC_Track(o);
  141146. } else {
  141147. o = (*t->tp_alloc)(t, 0);
  141148. if (unlikely(!o)) return 0;
  141149. }
  141150. return o;
  141151. }
  141152. static void __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_25_create_datagram_endpoint(PyObject *o) {
  141153. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_25_create_datagram_endpoint *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_25_create_datagram_endpoint *)o;
  141154. PyObject_GC_UnTrack(o);
  141155. Py_CLEAR(p->__pyx_v_allow_broadcast);
  141156. Py_CLEAR(p->__pyx_v_ctx);
  141157. Py_CLEAR(p->__pyx_v_ex);
  141158. Py_CLEAR(p->__pyx_v_excs);
  141159. Py_CLEAR(p->__pyx_v_family);
  141160. Py_CLEAR(p->__pyx_v_flags);
  141161. Py_CLEAR(p->__pyx_v_genexpr);
  141162. Py_CLEAR(p->__pyx_v_lads);
  141163. Py_CLEAR(p->__pyx_v_local_addr);
  141164. Py_CLEAR(p->__pyx_v_opts);
  141165. Py_CLEAR(p->__pyx_v_problems);
  141166. Py_CLEAR(p->__pyx_v_proto);
  141167. Py_CLEAR(p->__pyx_v_protocol);
  141168. Py_CLEAR(p->__pyx_v_protocol_factory);
  141169. Py_CLEAR(p->__pyx_v_rads);
  141170. Py_CLEAR(p->__pyx_v_remote_addr);
  141171. Py_CLEAR(p->__pyx_v_reuse_address);
  141172. Py_CLEAR(p->__pyx_v_reuse_port);
  141173. Py_CLEAR(p->__pyx_v_self);
  141174. Py_CLEAR(p->__pyx_v_sock);
  141175. Py_CLEAR(p->__pyx_v_udp);
  141176. Py_CLEAR(p->__pyx_v_waiter);
  141177. if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_25_create_datagram_endpoint < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_25_create_datagram_endpoint)))) {
  141178. __pyx_freelist_6uvloop_4loop___pyx_scope_struct_25_create_datagram_endpoint[__pyx_freecount_6uvloop_4loop___pyx_scope_struct_25_create_datagram_endpoint++] = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_25_create_datagram_endpoint *)o);
  141179. } else {
  141180. (*Py_TYPE(o)->tp_free)(o);
  141181. }
  141182. }
  141183. static int __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_25_create_datagram_endpoint(PyObject *o, visitproc v, void *a) {
  141184. int e;
  141185. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_25_create_datagram_endpoint *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_25_create_datagram_endpoint *)o;
  141186. if (p->__pyx_v_allow_broadcast) {
  141187. e = (*v)(p->__pyx_v_allow_broadcast, a); if (e) return e;
  141188. }
  141189. if (p->__pyx_v_ctx) {
  141190. e = (*v)(p->__pyx_v_ctx, a); if (e) return e;
  141191. }
  141192. if (p->__pyx_v_ex) {
  141193. e = (*v)(p->__pyx_v_ex, a); if (e) return e;
  141194. }
  141195. if (p->__pyx_v_excs) {
  141196. e = (*v)(p->__pyx_v_excs, a); if (e) return e;
  141197. }
  141198. if (p->__pyx_v_family) {
  141199. e = (*v)(p->__pyx_v_family, a); if (e) return e;
  141200. }
  141201. if (p->__pyx_v_flags) {
  141202. e = (*v)(p->__pyx_v_flags, a); if (e) return e;
  141203. }
  141204. if (p->__pyx_v_genexpr) {
  141205. e = (*v)(p->__pyx_v_genexpr, a); if (e) return e;
  141206. }
  141207. if (p->__pyx_v_lads) {
  141208. e = (*v)(p->__pyx_v_lads, a); if (e) return e;
  141209. }
  141210. if (p->__pyx_v_local_addr) {
  141211. e = (*v)(p->__pyx_v_local_addr, a); if (e) return e;
  141212. }
  141213. if (p->__pyx_v_opts) {
  141214. e = (*v)(p->__pyx_v_opts, a); if (e) return e;
  141215. }
  141216. if (p->__pyx_v_proto) {
  141217. e = (*v)(p->__pyx_v_proto, a); if (e) return e;
  141218. }
  141219. if (p->__pyx_v_protocol) {
  141220. e = (*v)(p->__pyx_v_protocol, a); if (e) return e;
  141221. }
  141222. if (p->__pyx_v_protocol_factory) {
  141223. e = (*v)(p->__pyx_v_protocol_factory, a); if (e) return e;
  141224. }
  141225. if (p->__pyx_v_rads) {
  141226. e = (*v)(p->__pyx_v_rads, a); if (e) return e;
  141227. }
  141228. if (p->__pyx_v_remote_addr) {
  141229. e = (*v)(p->__pyx_v_remote_addr, a); if (e) return e;
  141230. }
  141231. if (p->__pyx_v_reuse_address) {
  141232. e = (*v)(p->__pyx_v_reuse_address, a); if (e) return e;
  141233. }
  141234. if (p->__pyx_v_reuse_port) {
  141235. e = (*v)(p->__pyx_v_reuse_port, a); if (e) return e;
  141236. }
  141237. if (p->__pyx_v_self) {
  141238. e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  141239. }
  141240. if (p->__pyx_v_sock) {
  141241. e = (*v)(p->__pyx_v_sock, a); if (e) return e;
  141242. }
  141243. if (p->__pyx_v_udp) {
  141244. e = (*v)(((PyObject *)p->__pyx_v_udp), a); if (e) return e;
  141245. }
  141246. if (p->__pyx_v_waiter) {
  141247. e = (*v)(p->__pyx_v_waiter, a); if (e) return e;
  141248. }
  141249. return 0;
  141250. }
  141251. static PyTypeObject __pyx_type_6uvloop_4loop___pyx_scope_struct_25_create_datagram_endpoint = {
  141252. PyVarObject_HEAD_INIT(0, 0)
  141253. "uvloop.loop.__pyx_scope_struct_25_create_datagram_endpoint", /*tp_name*/
  141254. sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_25_create_datagram_endpoint), /*tp_basicsize*/
  141255. 0, /*tp_itemsize*/
  141256. __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_25_create_datagram_endpoint, /*tp_dealloc*/
  141257. 0, /*tp_print*/
  141258. 0, /*tp_getattr*/
  141259. 0, /*tp_setattr*/
  141260. #if PY_MAJOR_VERSION < 3
  141261. 0, /*tp_compare*/
  141262. #endif
  141263. #if PY_MAJOR_VERSION >= 3
  141264. 0, /*tp_as_async*/
  141265. #endif
  141266. 0, /*tp_repr*/
  141267. 0, /*tp_as_number*/
  141268. 0, /*tp_as_sequence*/
  141269. 0, /*tp_as_mapping*/
  141270. 0, /*tp_hash*/
  141271. 0, /*tp_call*/
  141272. 0, /*tp_str*/
  141273. 0, /*tp_getattro*/
  141274. 0, /*tp_setattro*/
  141275. 0, /*tp_as_buffer*/
  141276. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  141277. 0, /*tp_doc*/
  141278. __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_25_create_datagram_endpoint, /*tp_traverse*/
  141279. 0, /*tp_clear*/
  141280. 0, /*tp_richcompare*/
  141281. 0, /*tp_weaklistoffset*/
  141282. 0, /*tp_iter*/
  141283. 0, /*tp_iternext*/
  141284. 0, /*tp_methods*/
  141285. 0, /*tp_members*/
  141286. 0, /*tp_getset*/
  141287. 0, /*tp_base*/
  141288. 0, /*tp_dict*/
  141289. 0, /*tp_descr_get*/
  141290. 0, /*tp_descr_set*/
  141291. 0, /*tp_dictoffset*/
  141292. 0, /*tp_init*/
  141293. 0, /*tp_alloc*/
  141294. __pyx_tp_new_6uvloop_4loop___pyx_scope_struct_25_create_datagram_endpoint, /*tp_new*/
  141295. 0, /*tp_free*/
  141296. 0, /*tp_is_gc*/
  141297. 0, /*tp_bases*/
  141298. 0, /*tp_mro*/
  141299. 0, /*tp_cache*/
  141300. 0, /*tp_subclasses*/
  141301. 0, /*tp_weaklist*/
  141302. 0, /*tp_del*/
  141303. 0, /*tp_version_tag*/
  141304. #if PY_VERSION_HEX >= 0x030400a1
  141305. 0, /*tp_finalize*/
  141306. #endif
  141307. #if PY_VERSION_HEX >= 0x030800b1
  141308. 0, /*tp_vectorcall*/
  141309. #endif
  141310. };
  141311. static struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_26_genexpr *__pyx_freelist_6uvloop_4loop___pyx_scope_struct_26_genexpr[8];
  141312. static int __pyx_freecount_6uvloop_4loop___pyx_scope_struct_26_genexpr = 0;
  141313. static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_26_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  141314. PyObject *o;
  141315. if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_26_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_26_genexpr)))) {
  141316. o = (PyObject*)__pyx_freelist_6uvloop_4loop___pyx_scope_struct_26_genexpr[--__pyx_freecount_6uvloop_4loop___pyx_scope_struct_26_genexpr];
  141317. memset(o, 0, sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_26_genexpr));
  141318. (void) PyObject_INIT(o, t);
  141319. PyObject_GC_Track(o);
  141320. } else {
  141321. o = (*t->tp_alloc)(t, 0);
  141322. if (unlikely(!o)) return 0;
  141323. }
  141324. return o;
  141325. }
  141326. static void __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_26_genexpr(PyObject *o) {
  141327. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_26_genexpr *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_26_genexpr *)o;
  141328. PyObject_GC_UnTrack(o);
  141329. Py_CLEAR(p->__pyx_outer_scope);
  141330. Py_CLEAR(p->__pyx_v_k);
  141331. Py_CLEAR(p->__pyx_v_v);
  141332. if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_26_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_26_genexpr)))) {
  141333. __pyx_freelist_6uvloop_4loop___pyx_scope_struct_26_genexpr[__pyx_freecount_6uvloop_4loop___pyx_scope_struct_26_genexpr++] = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_26_genexpr *)o);
  141334. } else {
  141335. (*Py_TYPE(o)->tp_free)(o);
  141336. }
  141337. }
  141338. static int __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_26_genexpr(PyObject *o, visitproc v, void *a) {
  141339. int e;
  141340. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_26_genexpr *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_26_genexpr *)o;
  141341. if (p->__pyx_outer_scope) {
  141342. e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
  141343. }
  141344. if (p->__pyx_v_k) {
  141345. e = (*v)(p->__pyx_v_k, a); if (e) return e;
  141346. }
  141347. if (p->__pyx_v_v) {
  141348. e = (*v)(p->__pyx_v_v, a); if (e) return e;
  141349. }
  141350. return 0;
  141351. }
  141352. static PyTypeObject __pyx_type_6uvloop_4loop___pyx_scope_struct_26_genexpr = {
  141353. PyVarObject_HEAD_INIT(0, 0)
  141354. "uvloop.loop.__pyx_scope_struct_26_genexpr", /*tp_name*/
  141355. sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_26_genexpr), /*tp_basicsize*/
  141356. 0, /*tp_itemsize*/
  141357. __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_26_genexpr, /*tp_dealloc*/
  141358. 0, /*tp_print*/
  141359. 0, /*tp_getattr*/
  141360. 0, /*tp_setattr*/
  141361. #if PY_MAJOR_VERSION < 3
  141362. 0, /*tp_compare*/
  141363. #endif
  141364. #if PY_MAJOR_VERSION >= 3
  141365. 0, /*tp_as_async*/
  141366. #endif
  141367. 0, /*tp_repr*/
  141368. 0, /*tp_as_number*/
  141369. 0, /*tp_as_sequence*/
  141370. 0, /*tp_as_mapping*/
  141371. 0, /*tp_hash*/
  141372. 0, /*tp_call*/
  141373. 0, /*tp_str*/
  141374. 0, /*tp_getattro*/
  141375. 0, /*tp_setattro*/
  141376. 0, /*tp_as_buffer*/
  141377. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  141378. 0, /*tp_doc*/
  141379. __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_26_genexpr, /*tp_traverse*/
  141380. 0, /*tp_clear*/
  141381. 0, /*tp_richcompare*/
  141382. 0, /*tp_weaklistoffset*/
  141383. 0, /*tp_iter*/
  141384. 0, /*tp_iternext*/
  141385. 0, /*tp_methods*/
  141386. 0, /*tp_members*/
  141387. 0, /*tp_getset*/
  141388. 0, /*tp_base*/
  141389. 0, /*tp_dict*/
  141390. 0, /*tp_descr_get*/
  141391. 0, /*tp_descr_set*/
  141392. 0, /*tp_dictoffset*/
  141393. 0, /*tp_init*/
  141394. 0, /*tp_alloc*/
  141395. __pyx_tp_new_6uvloop_4loop___pyx_scope_struct_26_genexpr, /*tp_new*/
  141396. 0, /*tp_free*/
  141397. 0, /*tp_is_gc*/
  141398. 0, /*tp_bases*/
  141399. 0, /*tp_mro*/
  141400. 0, /*tp_cache*/
  141401. 0, /*tp_subclasses*/
  141402. 0, /*tp_weaklist*/
  141403. 0, /*tp_del*/
  141404. 0, /*tp_version_tag*/
  141405. #if PY_VERSION_HEX >= 0x030400a1
  141406. 0, /*tp_finalize*/
  141407. #endif
  141408. #if PY_VERSION_HEX >= 0x030800b1
  141409. 0, /*tp_vectorcall*/
  141410. #endif
  141411. };
  141412. static struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_27_shutdown_asyncgens *__pyx_freelist_6uvloop_4loop___pyx_scope_struct_27_shutdown_asyncgens[8];
  141413. static int __pyx_freecount_6uvloop_4loop___pyx_scope_struct_27_shutdown_asyncgens = 0;
  141414. static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_27_shutdown_asyncgens(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  141415. PyObject *o;
  141416. if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_27_shutdown_asyncgens > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_27_shutdown_asyncgens)))) {
  141417. o = (PyObject*)__pyx_freelist_6uvloop_4loop___pyx_scope_struct_27_shutdown_asyncgens[--__pyx_freecount_6uvloop_4loop___pyx_scope_struct_27_shutdown_asyncgens];
  141418. memset(o, 0, sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_27_shutdown_asyncgens));
  141419. (void) PyObject_INIT(o, t);
  141420. PyObject_GC_Track(o);
  141421. } else {
  141422. o = (*t->tp_alloc)(t, 0);
  141423. if (unlikely(!o)) return 0;
  141424. }
  141425. return o;
  141426. }
  141427. static void __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_27_shutdown_asyncgens(PyObject *o) {
  141428. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_27_shutdown_asyncgens *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_27_shutdown_asyncgens *)o;
  141429. PyObject_GC_UnTrack(o);
  141430. Py_CLEAR(p->__pyx_8genexpr4__pyx_v_ag);
  141431. Py_CLEAR(p->__pyx_v_agen);
  141432. Py_CLEAR(p->__pyx_v_closing_agens);
  141433. Py_CLEAR(p->__pyx_v_result);
  141434. Py_CLEAR(p->__pyx_v_results);
  141435. Py_CLEAR(p->__pyx_v_self);
  141436. Py_CLEAR(p->__pyx_v_shutdown_coro);
  141437. if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_27_shutdown_asyncgens < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_27_shutdown_asyncgens)))) {
  141438. __pyx_freelist_6uvloop_4loop___pyx_scope_struct_27_shutdown_asyncgens[__pyx_freecount_6uvloop_4loop___pyx_scope_struct_27_shutdown_asyncgens++] = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_27_shutdown_asyncgens *)o);
  141439. } else {
  141440. (*Py_TYPE(o)->tp_free)(o);
  141441. }
  141442. }
  141443. static int __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_27_shutdown_asyncgens(PyObject *o, visitproc v, void *a) {
  141444. int e;
  141445. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_27_shutdown_asyncgens *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_27_shutdown_asyncgens *)o;
  141446. if (p->__pyx_8genexpr4__pyx_v_ag) {
  141447. e = (*v)(p->__pyx_8genexpr4__pyx_v_ag, a); if (e) return e;
  141448. }
  141449. if (p->__pyx_v_agen) {
  141450. e = (*v)(p->__pyx_v_agen, a); if (e) return e;
  141451. }
  141452. if (p->__pyx_v_closing_agens) {
  141453. e = (*v)(p->__pyx_v_closing_agens, a); if (e) return e;
  141454. }
  141455. if (p->__pyx_v_result) {
  141456. e = (*v)(p->__pyx_v_result, a); if (e) return e;
  141457. }
  141458. if (p->__pyx_v_results) {
  141459. e = (*v)(p->__pyx_v_results, a); if (e) return e;
  141460. }
  141461. if (p->__pyx_v_self) {
  141462. e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  141463. }
  141464. if (p->__pyx_v_shutdown_coro) {
  141465. e = (*v)(p->__pyx_v_shutdown_coro, a); if (e) return e;
  141466. }
  141467. return 0;
  141468. }
  141469. static PyTypeObject __pyx_type_6uvloop_4loop___pyx_scope_struct_27_shutdown_asyncgens = {
  141470. PyVarObject_HEAD_INIT(0, 0)
  141471. "uvloop.loop.__pyx_scope_struct_27_shutdown_asyncgens", /*tp_name*/
  141472. sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_27_shutdown_asyncgens), /*tp_basicsize*/
  141473. 0, /*tp_itemsize*/
  141474. __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_27_shutdown_asyncgens, /*tp_dealloc*/
  141475. 0, /*tp_print*/
  141476. 0, /*tp_getattr*/
  141477. 0, /*tp_setattr*/
  141478. #if PY_MAJOR_VERSION < 3
  141479. 0, /*tp_compare*/
  141480. #endif
  141481. #if PY_MAJOR_VERSION >= 3
  141482. 0, /*tp_as_async*/
  141483. #endif
  141484. 0, /*tp_repr*/
  141485. 0, /*tp_as_number*/
  141486. 0, /*tp_as_sequence*/
  141487. 0, /*tp_as_mapping*/
  141488. 0, /*tp_hash*/
  141489. 0, /*tp_call*/
  141490. 0, /*tp_str*/
  141491. 0, /*tp_getattro*/
  141492. 0, /*tp_setattro*/
  141493. 0, /*tp_as_buffer*/
  141494. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  141495. 0, /*tp_doc*/
  141496. __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_27_shutdown_asyncgens, /*tp_traverse*/
  141497. 0, /*tp_clear*/
  141498. 0, /*tp_richcompare*/
  141499. 0, /*tp_weaklistoffset*/
  141500. 0, /*tp_iter*/
  141501. 0, /*tp_iternext*/
  141502. 0, /*tp_methods*/
  141503. 0, /*tp_members*/
  141504. 0, /*tp_getset*/
  141505. 0, /*tp_base*/
  141506. 0, /*tp_dict*/
  141507. 0, /*tp_descr_get*/
  141508. 0, /*tp_descr_set*/
  141509. 0, /*tp_dictoffset*/
  141510. 0, /*tp_init*/
  141511. 0, /*tp_alloc*/
  141512. __pyx_tp_new_6uvloop_4loop___pyx_scope_struct_27_shutdown_asyncgens, /*tp_new*/
  141513. 0, /*tp_free*/
  141514. 0, /*tp_is_gc*/
  141515. 0, /*tp_bases*/
  141516. 0, /*tp_mro*/
  141517. 0, /*tp_cache*/
  141518. 0, /*tp_subclasses*/
  141519. 0, /*tp_weaklist*/
  141520. 0, /*tp_del*/
  141521. 0, /*tp_version_tag*/
  141522. #if PY_VERSION_HEX >= 0x030400a1
  141523. 0, /*tp_finalize*/
  141524. #endif
  141525. #if PY_VERSION_HEX >= 0x030800b1
  141526. 0, /*tp_vectorcall*/
  141527. #endif
  141528. };
  141529. static struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_28__start_handshake *__pyx_freelist_6uvloop_4loop___pyx_scope_struct_28__start_handshake[8];
  141530. static int __pyx_freecount_6uvloop_4loop___pyx_scope_struct_28__start_handshake = 0;
  141531. static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_28__start_handshake(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  141532. PyObject *o;
  141533. if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_28__start_handshake > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_28__start_handshake)))) {
  141534. o = (PyObject*)__pyx_freelist_6uvloop_4loop___pyx_scope_struct_28__start_handshake[--__pyx_freecount_6uvloop_4loop___pyx_scope_struct_28__start_handshake];
  141535. memset(o, 0, sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_28__start_handshake));
  141536. (void) PyObject_INIT(o, t);
  141537. PyObject_GC_Track(o);
  141538. } else {
  141539. o = (*t->tp_alloc)(t, 0);
  141540. if (unlikely(!o)) return 0;
  141541. }
  141542. return o;
  141543. }
  141544. static void __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_28__start_handshake(PyObject *o) {
  141545. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_28__start_handshake *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_28__start_handshake *)o;
  141546. PyObject_GC_UnTrack(o);
  141547. Py_CLEAR(p->__pyx_v_self);
  141548. if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_28__start_handshake < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_28__start_handshake)))) {
  141549. __pyx_freelist_6uvloop_4loop___pyx_scope_struct_28__start_handshake[__pyx_freecount_6uvloop_4loop___pyx_scope_struct_28__start_handshake++] = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_28__start_handshake *)o);
  141550. } else {
  141551. (*Py_TYPE(o)->tp_free)(o);
  141552. }
  141553. }
  141554. static int __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_28__start_handshake(PyObject *o, visitproc v, void *a) {
  141555. int e;
  141556. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_28__start_handshake *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_28__start_handshake *)o;
  141557. if (p->__pyx_v_self) {
  141558. e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  141559. }
  141560. return 0;
  141561. }
  141562. static int __pyx_tp_clear_6uvloop_4loop___pyx_scope_struct_28__start_handshake(PyObject *o) {
  141563. PyObject* tmp;
  141564. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_28__start_handshake *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_28__start_handshake *)o;
  141565. tmp = ((PyObject*)p->__pyx_v_self);
  141566. p->__pyx_v_self = ((struct __pyx_obj_6uvloop_4loop_SSLProtocol *)Py_None); Py_INCREF(Py_None);
  141567. Py_XDECREF(tmp);
  141568. return 0;
  141569. }
  141570. static PyTypeObject __pyx_type_6uvloop_4loop___pyx_scope_struct_28__start_handshake = {
  141571. PyVarObject_HEAD_INIT(0, 0)
  141572. "uvloop.loop.__pyx_scope_struct_28__start_handshake", /*tp_name*/
  141573. sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_28__start_handshake), /*tp_basicsize*/
  141574. 0, /*tp_itemsize*/
  141575. __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_28__start_handshake, /*tp_dealloc*/
  141576. 0, /*tp_print*/
  141577. 0, /*tp_getattr*/
  141578. 0, /*tp_setattr*/
  141579. #if PY_MAJOR_VERSION < 3
  141580. 0, /*tp_compare*/
  141581. #endif
  141582. #if PY_MAJOR_VERSION >= 3
  141583. 0, /*tp_as_async*/
  141584. #endif
  141585. 0, /*tp_repr*/
  141586. 0, /*tp_as_number*/
  141587. 0, /*tp_as_sequence*/
  141588. 0, /*tp_as_mapping*/
  141589. 0, /*tp_hash*/
  141590. 0, /*tp_call*/
  141591. 0, /*tp_str*/
  141592. 0, /*tp_getattro*/
  141593. 0, /*tp_setattro*/
  141594. 0, /*tp_as_buffer*/
  141595. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  141596. 0, /*tp_doc*/
  141597. __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_28__start_handshake, /*tp_traverse*/
  141598. __pyx_tp_clear_6uvloop_4loop___pyx_scope_struct_28__start_handshake, /*tp_clear*/
  141599. 0, /*tp_richcompare*/
  141600. 0, /*tp_weaklistoffset*/
  141601. 0, /*tp_iter*/
  141602. 0, /*tp_iternext*/
  141603. 0, /*tp_methods*/
  141604. 0, /*tp_members*/
  141605. 0, /*tp_getset*/
  141606. 0, /*tp_base*/
  141607. 0, /*tp_dict*/
  141608. 0, /*tp_descr_get*/
  141609. 0, /*tp_descr_set*/
  141610. 0, /*tp_dictoffset*/
  141611. 0, /*tp_init*/
  141612. 0, /*tp_alloc*/
  141613. __pyx_tp_new_6uvloop_4loop___pyx_scope_struct_28__start_handshake, /*tp_new*/
  141614. 0, /*tp_free*/
  141615. 0, /*tp_is_gc*/
  141616. 0, /*tp_bases*/
  141617. 0, /*tp_mro*/
  141618. 0, /*tp_cache*/
  141619. 0, /*tp_subclasses*/
  141620. 0, /*tp_weaklist*/
  141621. 0, /*tp_del*/
  141622. 0, /*tp_version_tag*/
  141623. #if PY_VERSION_HEX >= 0x030400a1
  141624. 0, /*tp_finalize*/
  141625. #endif
  141626. #if PY_VERSION_HEX >= 0x030800b1
  141627. 0, /*tp_vectorcall*/
  141628. #endif
  141629. };
  141630. static struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_29__start_shutdown *__pyx_freelist_6uvloop_4loop___pyx_scope_struct_29__start_shutdown[8];
  141631. static int __pyx_freecount_6uvloop_4loop___pyx_scope_struct_29__start_shutdown = 0;
  141632. static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_29__start_shutdown(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  141633. PyObject *o;
  141634. if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_29__start_shutdown > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_29__start_shutdown)))) {
  141635. o = (PyObject*)__pyx_freelist_6uvloop_4loop___pyx_scope_struct_29__start_shutdown[--__pyx_freecount_6uvloop_4loop___pyx_scope_struct_29__start_shutdown];
  141636. memset(o, 0, sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_29__start_shutdown));
  141637. (void) PyObject_INIT(o, t);
  141638. PyObject_GC_Track(o);
  141639. } else {
  141640. o = (*t->tp_alloc)(t, 0);
  141641. if (unlikely(!o)) return 0;
  141642. }
  141643. return o;
  141644. }
  141645. static void __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_29__start_shutdown(PyObject *o) {
  141646. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_29__start_shutdown *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_29__start_shutdown *)o;
  141647. PyObject_GC_UnTrack(o);
  141648. Py_CLEAR(p->__pyx_v_self);
  141649. if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_29__start_shutdown < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_29__start_shutdown)))) {
  141650. __pyx_freelist_6uvloop_4loop___pyx_scope_struct_29__start_shutdown[__pyx_freecount_6uvloop_4loop___pyx_scope_struct_29__start_shutdown++] = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_29__start_shutdown *)o);
  141651. } else {
  141652. (*Py_TYPE(o)->tp_free)(o);
  141653. }
  141654. }
  141655. static int __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_29__start_shutdown(PyObject *o, visitproc v, void *a) {
  141656. int e;
  141657. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_29__start_shutdown *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_29__start_shutdown *)o;
  141658. if (p->__pyx_v_self) {
  141659. e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  141660. }
  141661. return 0;
  141662. }
  141663. static int __pyx_tp_clear_6uvloop_4loop___pyx_scope_struct_29__start_shutdown(PyObject *o) {
  141664. PyObject* tmp;
  141665. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_29__start_shutdown *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_29__start_shutdown *)o;
  141666. tmp = ((PyObject*)p->__pyx_v_self);
  141667. p->__pyx_v_self = ((struct __pyx_obj_6uvloop_4loop_SSLProtocol *)Py_None); Py_INCREF(Py_None);
  141668. Py_XDECREF(tmp);
  141669. return 0;
  141670. }
  141671. static PyTypeObject __pyx_type_6uvloop_4loop___pyx_scope_struct_29__start_shutdown = {
  141672. PyVarObject_HEAD_INIT(0, 0)
  141673. "uvloop.loop.__pyx_scope_struct_29__start_shutdown", /*tp_name*/
  141674. sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_29__start_shutdown), /*tp_basicsize*/
  141675. 0, /*tp_itemsize*/
  141676. __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_29__start_shutdown, /*tp_dealloc*/
  141677. 0, /*tp_print*/
  141678. 0, /*tp_getattr*/
  141679. 0, /*tp_setattr*/
  141680. #if PY_MAJOR_VERSION < 3
  141681. 0, /*tp_compare*/
  141682. #endif
  141683. #if PY_MAJOR_VERSION >= 3
  141684. 0, /*tp_as_async*/
  141685. #endif
  141686. 0, /*tp_repr*/
  141687. 0, /*tp_as_number*/
  141688. 0, /*tp_as_sequence*/
  141689. 0, /*tp_as_mapping*/
  141690. 0, /*tp_hash*/
  141691. 0, /*tp_call*/
  141692. 0, /*tp_str*/
  141693. 0, /*tp_getattro*/
  141694. 0, /*tp_setattro*/
  141695. 0, /*tp_as_buffer*/
  141696. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  141697. 0, /*tp_doc*/
  141698. __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_29__start_shutdown, /*tp_traverse*/
  141699. __pyx_tp_clear_6uvloop_4loop___pyx_scope_struct_29__start_shutdown, /*tp_clear*/
  141700. 0, /*tp_richcompare*/
  141701. 0, /*tp_weaklistoffset*/
  141702. 0, /*tp_iter*/
  141703. 0, /*tp_iternext*/
  141704. 0, /*tp_methods*/
  141705. 0, /*tp_members*/
  141706. 0, /*tp_getset*/
  141707. 0, /*tp_base*/
  141708. 0, /*tp_dict*/
  141709. 0, /*tp_descr_get*/
  141710. 0, /*tp_descr_set*/
  141711. 0, /*tp_dictoffset*/
  141712. 0, /*tp_init*/
  141713. 0, /*tp_alloc*/
  141714. __pyx_tp_new_6uvloop_4loop___pyx_scope_struct_29__start_shutdown, /*tp_new*/
  141715. 0, /*tp_free*/
  141716. 0, /*tp_is_gc*/
  141717. 0, /*tp_bases*/
  141718. 0, /*tp_mro*/
  141719. 0, /*tp_cache*/
  141720. 0, /*tp_subclasses*/
  141721. 0, /*tp_weaklist*/
  141722. 0, /*tp_del*/
  141723. 0, /*tp_version_tag*/
  141724. #if PY_VERSION_HEX >= 0x030400a1
  141725. 0, /*tp_finalize*/
  141726. #endif
  141727. #if PY_VERSION_HEX >= 0x030800b1
  141728. 0, /*tp_vectorcall*/
  141729. #endif
  141730. };
  141731. static struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_30__do_read__buffered *__pyx_freelist_6uvloop_4loop___pyx_scope_struct_30__do_read__buffered[8];
  141732. static int __pyx_freecount_6uvloop_4loop___pyx_scope_struct_30__do_read__buffered = 0;
  141733. static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_30__do_read__buffered(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  141734. PyObject *o;
  141735. if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_30__do_read__buffered > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_30__do_read__buffered)))) {
  141736. o = (PyObject*)__pyx_freelist_6uvloop_4loop___pyx_scope_struct_30__do_read__buffered[--__pyx_freecount_6uvloop_4loop___pyx_scope_struct_30__do_read__buffered];
  141737. memset(o, 0, sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_30__do_read__buffered));
  141738. (void) PyObject_INIT(o, t);
  141739. PyObject_GC_Track(o);
  141740. } else {
  141741. o = (*t->tp_alloc)(t, 0);
  141742. if (unlikely(!o)) return 0;
  141743. }
  141744. return o;
  141745. }
  141746. static void __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_30__do_read__buffered(PyObject *o) {
  141747. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_30__do_read__buffered *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_30__do_read__buffered *)o;
  141748. PyObject_GC_UnTrack(o);
  141749. Py_CLEAR(p->__pyx_v_self);
  141750. if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_30__do_read__buffered < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_30__do_read__buffered)))) {
  141751. __pyx_freelist_6uvloop_4loop___pyx_scope_struct_30__do_read__buffered[__pyx_freecount_6uvloop_4loop___pyx_scope_struct_30__do_read__buffered++] = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_30__do_read__buffered *)o);
  141752. } else {
  141753. (*Py_TYPE(o)->tp_free)(o);
  141754. }
  141755. }
  141756. static int __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_30__do_read__buffered(PyObject *o, visitproc v, void *a) {
  141757. int e;
  141758. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_30__do_read__buffered *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_30__do_read__buffered *)o;
  141759. if (p->__pyx_v_self) {
  141760. e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  141761. }
  141762. return 0;
  141763. }
  141764. static int __pyx_tp_clear_6uvloop_4loop___pyx_scope_struct_30__do_read__buffered(PyObject *o) {
  141765. PyObject* tmp;
  141766. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_30__do_read__buffered *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_30__do_read__buffered *)o;
  141767. tmp = ((PyObject*)p->__pyx_v_self);
  141768. p->__pyx_v_self = ((struct __pyx_obj_6uvloop_4loop_SSLProtocol *)Py_None); Py_INCREF(Py_None);
  141769. Py_XDECREF(tmp);
  141770. return 0;
  141771. }
  141772. static PyTypeObject __pyx_type_6uvloop_4loop___pyx_scope_struct_30__do_read__buffered = {
  141773. PyVarObject_HEAD_INIT(0, 0)
  141774. "uvloop.loop.__pyx_scope_struct_30__do_read__buffered", /*tp_name*/
  141775. sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_30__do_read__buffered), /*tp_basicsize*/
  141776. 0, /*tp_itemsize*/
  141777. __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_30__do_read__buffered, /*tp_dealloc*/
  141778. 0, /*tp_print*/
  141779. 0, /*tp_getattr*/
  141780. 0, /*tp_setattr*/
  141781. #if PY_MAJOR_VERSION < 3
  141782. 0, /*tp_compare*/
  141783. #endif
  141784. #if PY_MAJOR_VERSION >= 3
  141785. 0, /*tp_as_async*/
  141786. #endif
  141787. 0, /*tp_repr*/
  141788. 0, /*tp_as_number*/
  141789. 0, /*tp_as_sequence*/
  141790. 0, /*tp_as_mapping*/
  141791. 0, /*tp_hash*/
  141792. 0, /*tp_call*/
  141793. 0, /*tp_str*/
  141794. 0, /*tp_getattro*/
  141795. 0, /*tp_setattro*/
  141796. 0, /*tp_as_buffer*/
  141797. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  141798. 0, /*tp_doc*/
  141799. __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_30__do_read__buffered, /*tp_traverse*/
  141800. __pyx_tp_clear_6uvloop_4loop___pyx_scope_struct_30__do_read__buffered, /*tp_clear*/
  141801. 0, /*tp_richcompare*/
  141802. 0, /*tp_weaklistoffset*/
  141803. 0, /*tp_iter*/
  141804. 0, /*tp_iternext*/
  141805. 0, /*tp_methods*/
  141806. 0, /*tp_members*/
  141807. 0, /*tp_getset*/
  141808. 0, /*tp_base*/
  141809. 0, /*tp_dict*/
  141810. 0, /*tp_descr_get*/
  141811. 0, /*tp_descr_set*/
  141812. 0, /*tp_dictoffset*/
  141813. 0, /*tp_init*/
  141814. 0, /*tp_alloc*/
  141815. __pyx_tp_new_6uvloop_4loop___pyx_scope_struct_30__do_read__buffered, /*tp_new*/
  141816. 0, /*tp_free*/
  141817. 0, /*tp_is_gc*/
  141818. 0, /*tp_bases*/
  141819. 0, /*tp_mro*/
  141820. 0, /*tp_cache*/
  141821. 0, /*tp_subclasses*/
  141822. 0, /*tp_weaklist*/
  141823. 0, /*tp_del*/
  141824. 0, /*tp_version_tag*/
  141825. #if PY_VERSION_HEX >= 0x030400a1
  141826. 0, /*tp_finalize*/
  141827. #endif
  141828. #if PY_VERSION_HEX >= 0x030800b1
  141829. 0, /*tp_vectorcall*/
  141830. #endif
  141831. };
  141832. static struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_31__resume_reading *__pyx_freelist_6uvloop_4loop___pyx_scope_struct_31__resume_reading[8];
  141833. static int __pyx_freecount_6uvloop_4loop___pyx_scope_struct_31__resume_reading = 0;
  141834. static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_31__resume_reading(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  141835. PyObject *o;
  141836. if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_31__resume_reading > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_31__resume_reading)))) {
  141837. o = (PyObject*)__pyx_freelist_6uvloop_4loop___pyx_scope_struct_31__resume_reading[--__pyx_freecount_6uvloop_4loop___pyx_scope_struct_31__resume_reading];
  141838. memset(o, 0, sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_31__resume_reading));
  141839. (void) PyObject_INIT(o, t);
  141840. PyObject_GC_Track(o);
  141841. } else {
  141842. o = (*t->tp_alloc)(t, 0);
  141843. if (unlikely(!o)) return 0;
  141844. }
  141845. return o;
  141846. }
  141847. static void __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_31__resume_reading(PyObject *o) {
  141848. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_31__resume_reading *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_31__resume_reading *)o;
  141849. PyObject_GC_UnTrack(o);
  141850. Py_CLEAR(p->__pyx_v_self);
  141851. if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_31__resume_reading < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_31__resume_reading)))) {
  141852. __pyx_freelist_6uvloop_4loop___pyx_scope_struct_31__resume_reading[__pyx_freecount_6uvloop_4loop___pyx_scope_struct_31__resume_reading++] = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_31__resume_reading *)o);
  141853. } else {
  141854. (*Py_TYPE(o)->tp_free)(o);
  141855. }
  141856. }
  141857. static int __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_31__resume_reading(PyObject *o, visitproc v, void *a) {
  141858. int e;
  141859. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_31__resume_reading *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_31__resume_reading *)o;
  141860. if (p->__pyx_v_self) {
  141861. e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  141862. }
  141863. return 0;
  141864. }
  141865. static int __pyx_tp_clear_6uvloop_4loop___pyx_scope_struct_31__resume_reading(PyObject *o) {
  141866. PyObject* tmp;
  141867. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_31__resume_reading *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_31__resume_reading *)o;
  141868. tmp = ((PyObject*)p->__pyx_v_self);
  141869. p->__pyx_v_self = ((struct __pyx_obj_6uvloop_4loop_SSLProtocol *)Py_None); Py_INCREF(Py_None);
  141870. Py_XDECREF(tmp);
  141871. return 0;
  141872. }
  141873. static PyTypeObject __pyx_type_6uvloop_4loop___pyx_scope_struct_31__resume_reading = {
  141874. PyVarObject_HEAD_INIT(0, 0)
  141875. "uvloop.loop.__pyx_scope_struct_31__resume_reading", /*tp_name*/
  141876. sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_31__resume_reading), /*tp_basicsize*/
  141877. 0, /*tp_itemsize*/
  141878. __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_31__resume_reading, /*tp_dealloc*/
  141879. 0, /*tp_print*/
  141880. 0, /*tp_getattr*/
  141881. 0, /*tp_setattr*/
  141882. #if PY_MAJOR_VERSION < 3
  141883. 0, /*tp_compare*/
  141884. #endif
  141885. #if PY_MAJOR_VERSION >= 3
  141886. 0, /*tp_as_async*/
  141887. #endif
  141888. 0, /*tp_repr*/
  141889. 0, /*tp_as_number*/
  141890. 0, /*tp_as_sequence*/
  141891. 0, /*tp_as_mapping*/
  141892. 0, /*tp_hash*/
  141893. 0, /*tp_call*/
  141894. 0, /*tp_str*/
  141895. 0, /*tp_getattro*/
  141896. 0, /*tp_setattro*/
  141897. 0, /*tp_as_buffer*/
  141898. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  141899. 0, /*tp_doc*/
  141900. __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_31__resume_reading, /*tp_traverse*/
  141901. __pyx_tp_clear_6uvloop_4loop___pyx_scope_struct_31__resume_reading, /*tp_clear*/
  141902. 0, /*tp_richcompare*/
  141903. 0, /*tp_weaklistoffset*/
  141904. 0, /*tp_iter*/
  141905. 0, /*tp_iternext*/
  141906. 0, /*tp_methods*/
  141907. 0, /*tp_members*/
  141908. 0, /*tp_getset*/
  141909. 0, /*tp_base*/
  141910. 0, /*tp_dict*/
  141911. 0, /*tp_descr_get*/
  141912. 0, /*tp_descr_set*/
  141913. 0, /*tp_dictoffset*/
  141914. 0, /*tp_init*/
  141915. 0, /*tp_alloc*/
  141916. __pyx_tp_new_6uvloop_4loop___pyx_scope_struct_31__resume_reading, /*tp_new*/
  141917. 0, /*tp_free*/
  141918. 0, /*tp_is_gc*/
  141919. 0, /*tp_bases*/
  141920. 0, /*tp_mro*/
  141921. 0, /*tp_cache*/
  141922. 0, /*tp_subclasses*/
  141923. 0, /*tp_weaklist*/
  141924. 0, /*tp_del*/
  141925. 0, /*tp_version_tag*/
  141926. #if PY_VERSION_HEX >= 0x030400a1
  141927. 0, /*tp_finalize*/
  141928. #endif
  141929. #if PY_VERSION_HEX >= 0x030800b1
  141930. 0, /*tp_vectorcall*/
  141931. #endif
  141932. };
  141933. static struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_32___aenter__ *__pyx_freelist_6uvloop_4loop___pyx_scope_struct_32___aenter__[8];
  141934. static int __pyx_freecount_6uvloop_4loop___pyx_scope_struct_32___aenter__ = 0;
  141935. static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_32___aenter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  141936. PyObject *o;
  141937. if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_32___aenter__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_32___aenter__)))) {
  141938. o = (PyObject*)__pyx_freelist_6uvloop_4loop___pyx_scope_struct_32___aenter__[--__pyx_freecount_6uvloop_4loop___pyx_scope_struct_32___aenter__];
  141939. memset(o, 0, sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_32___aenter__));
  141940. (void) PyObject_INIT(o, t);
  141941. PyObject_GC_Track(o);
  141942. } else {
  141943. o = (*t->tp_alloc)(t, 0);
  141944. if (unlikely(!o)) return 0;
  141945. }
  141946. return o;
  141947. }
  141948. static void __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_32___aenter__(PyObject *o) {
  141949. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_32___aenter__ *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_32___aenter__ *)o;
  141950. PyObject_GC_UnTrack(o);
  141951. Py_CLEAR(p->__pyx_v_self);
  141952. if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_32___aenter__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_32___aenter__)))) {
  141953. __pyx_freelist_6uvloop_4loop___pyx_scope_struct_32___aenter__[__pyx_freecount_6uvloop_4loop___pyx_scope_struct_32___aenter__++] = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_32___aenter__ *)o);
  141954. } else {
  141955. (*Py_TYPE(o)->tp_free)(o);
  141956. }
  141957. }
  141958. static int __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_32___aenter__(PyObject *o, visitproc v, void *a) {
  141959. int e;
  141960. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_32___aenter__ *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_32___aenter__ *)o;
  141961. if (p->__pyx_v_self) {
  141962. e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  141963. }
  141964. return 0;
  141965. }
  141966. static PyTypeObject __pyx_type_6uvloop_4loop___pyx_scope_struct_32___aenter__ = {
  141967. PyVarObject_HEAD_INIT(0, 0)
  141968. "uvloop.loop.__pyx_scope_struct_32___aenter__", /*tp_name*/
  141969. sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_32___aenter__), /*tp_basicsize*/
  141970. 0, /*tp_itemsize*/
  141971. __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_32___aenter__, /*tp_dealloc*/
  141972. 0, /*tp_print*/
  141973. 0, /*tp_getattr*/
  141974. 0, /*tp_setattr*/
  141975. #if PY_MAJOR_VERSION < 3
  141976. 0, /*tp_compare*/
  141977. #endif
  141978. #if PY_MAJOR_VERSION >= 3
  141979. 0, /*tp_as_async*/
  141980. #endif
  141981. 0, /*tp_repr*/
  141982. 0, /*tp_as_number*/
  141983. 0, /*tp_as_sequence*/
  141984. 0, /*tp_as_mapping*/
  141985. 0, /*tp_hash*/
  141986. 0, /*tp_call*/
  141987. 0, /*tp_str*/
  141988. 0, /*tp_getattro*/
  141989. 0, /*tp_setattro*/
  141990. 0, /*tp_as_buffer*/
  141991. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  141992. 0, /*tp_doc*/
  141993. __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_32___aenter__, /*tp_traverse*/
  141994. 0, /*tp_clear*/
  141995. 0, /*tp_richcompare*/
  141996. 0, /*tp_weaklistoffset*/
  141997. 0, /*tp_iter*/
  141998. 0, /*tp_iternext*/
  141999. 0, /*tp_methods*/
  142000. 0, /*tp_members*/
  142001. 0, /*tp_getset*/
  142002. 0, /*tp_base*/
  142003. 0, /*tp_dict*/
  142004. 0, /*tp_descr_get*/
  142005. 0, /*tp_descr_set*/
  142006. 0, /*tp_dictoffset*/
  142007. 0, /*tp_init*/
  142008. 0, /*tp_alloc*/
  142009. __pyx_tp_new_6uvloop_4loop___pyx_scope_struct_32___aenter__, /*tp_new*/
  142010. 0, /*tp_free*/
  142011. 0, /*tp_is_gc*/
  142012. 0, /*tp_bases*/
  142013. 0, /*tp_mro*/
  142014. 0, /*tp_cache*/
  142015. 0, /*tp_subclasses*/
  142016. 0, /*tp_weaklist*/
  142017. 0, /*tp_del*/
  142018. 0, /*tp_version_tag*/
  142019. #if PY_VERSION_HEX >= 0x030400a1
  142020. 0, /*tp_finalize*/
  142021. #endif
  142022. #if PY_VERSION_HEX >= 0x030800b1
  142023. 0, /*tp_vectorcall*/
  142024. #endif
  142025. };
  142026. static struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_33___aexit__ *__pyx_freelist_6uvloop_4loop___pyx_scope_struct_33___aexit__[8];
  142027. static int __pyx_freecount_6uvloop_4loop___pyx_scope_struct_33___aexit__ = 0;
  142028. static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_33___aexit__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  142029. PyObject *o;
  142030. if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_33___aexit__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_33___aexit__)))) {
  142031. o = (PyObject*)__pyx_freelist_6uvloop_4loop___pyx_scope_struct_33___aexit__[--__pyx_freecount_6uvloop_4loop___pyx_scope_struct_33___aexit__];
  142032. memset(o, 0, sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_33___aexit__));
  142033. (void) PyObject_INIT(o, t);
  142034. PyObject_GC_Track(o);
  142035. } else {
  142036. o = (*t->tp_alloc)(t, 0);
  142037. if (unlikely(!o)) return 0;
  142038. }
  142039. return o;
  142040. }
  142041. static void __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_33___aexit__(PyObject *o) {
  142042. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_33___aexit__ *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_33___aexit__ *)o;
  142043. PyObject_GC_UnTrack(o);
  142044. Py_CLEAR(p->__pyx_v_exc);
  142045. Py_CLEAR(p->__pyx_v_self);
  142046. if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_33___aexit__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_33___aexit__)))) {
  142047. __pyx_freelist_6uvloop_4loop___pyx_scope_struct_33___aexit__[__pyx_freecount_6uvloop_4loop___pyx_scope_struct_33___aexit__++] = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_33___aexit__ *)o);
  142048. } else {
  142049. (*Py_TYPE(o)->tp_free)(o);
  142050. }
  142051. }
  142052. static int __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_33___aexit__(PyObject *o, visitproc v, void *a) {
  142053. int e;
  142054. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_33___aexit__ *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_33___aexit__ *)o;
  142055. if (p->__pyx_v_exc) {
  142056. e = (*v)(p->__pyx_v_exc, a); if (e) return e;
  142057. }
  142058. if (p->__pyx_v_self) {
  142059. e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  142060. }
  142061. return 0;
  142062. }
  142063. static PyTypeObject __pyx_type_6uvloop_4loop___pyx_scope_struct_33___aexit__ = {
  142064. PyVarObject_HEAD_INIT(0, 0)
  142065. "uvloop.loop.__pyx_scope_struct_33___aexit__", /*tp_name*/
  142066. sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_33___aexit__), /*tp_basicsize*/
  142067. 0, /*tp_itemsize*/
  142068. __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_33___aexit__, /*tp_dealloc*/
  142069. 0, /*tp_print*/
  142070. 0, /*tp_getattr*/
  142071. 0, /*tp_setattr*/
  142072. #if PY_MAJOR_VERSION < 3
  142073. 0, /*tp_compare*/
  142074. #endif
  142075. #if PY_MAJOR_VERSION >= 3
  142076. 0, /*tp_as_async*/
  142077. #endif
  142078. 0, /*tp_repr*/
  142079. 0, /*tp_as_number*/
  142080. 0, /*tp_as_sequence*/
  142081. 0, /*tp_as_mapping*/
  142082. 0, /*tp_hash*/
  142083. 0, /*tp_call*/
  142084. 0, /*tp_str*/
  142085. 0, /*tp_getattro*/
  142086. 0, /*tp_setattro*/
  142087. 0, /*tp_as_buffer*/
  142088. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  142089. 0, /*tp_doc*/
  142090. __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_33___aexit__, /*tp_traverse*/
  142091. 0, /*tp_clear*/
  142092. 0, /*tp_richcompare*/
  142093. 0, /*tp_weaklistoffset*/
  142094. 0, /*tp_iter*/
  142095. 0, /*tp_iternext*/
  142096. 0, /*tp_methods*/
  142097. 0, /*tp_members*/
  142098. 0, /*tp_getset*/
  142099. 0, /*tp_base*/
  142100. 0, /*tp_dict*/
  142101. 0, /*tp_descr_get*/
  142102. 0, /*tp_descr_set*/
  142103. 0, /*tp_dictoffset*/
  142104. 0, /*tp_init*/
  142105. 0, /*tp_alloc*/
  142106. __pyx_tp_new_6uvloop_4loop___pyx_scope_struct_33___aexit__, /*tp_new*/
  142107. 0, /*tp_free*/
  142108. 0, /*tp_is_gc*/
  142109. 0, /*tp_bases*/
  142110. 0, /*tp_mro*/
  142111. 0, /*tp_cache*/
  142112. 0, /*tp_subclasses*/
  142113. 0, /*tp_weaklist*/
  142114. 0, /*tp_del*/
  142115. 0, /*tp_version_tag*/
  142116. #if PY_VERSION_HEX >= 0x030400a1
  142117. 0, /*tp_finalize*/
  142118. #endif
  142119. #if PY_VERSION_HEX >= 0x030800b1
  142120. 0, /*tp_vectorcall*/
  142121. #endif
  142122. };
  142123. static struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_34_wait_closed *__pyx_freelist_6uvloop_4loop___pyx_scope_struct_34_wait_closed[8];
  142124. static int __pyx_freecount_6uvloop_4loop___pyx_scope_struct_34_wait_closed = 0;
  142125. static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_34_wait_closed(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  142126. PyObject *o;
  142127. if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_34_wait_closed > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_34_wait_closed)))) {
  142128. o = (PyObject*)__pyx_freelist_6uvloop_4loop___pyx_scope_struct_34_wait_closed[--__pyx_freecount_6uvloop_4loop___pyx_scope_struct_34_wait_closed];
  142129. memset(o, 0, sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_34_wait_closed));
  142130. (void) PyObject_INIT(o, t);
  142131. PyObject_GC_Track(o);
  142132. } else {
  142133. o = (*t->tp_alloc)(t, 0);
  142134. if (unlikely(!o)) return 0;
  142135. }
  142136. return o;
  142137. }
  142138. static void __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_34_wait_closed(PyObject *o) {
  142139. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_34_wait_closed *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_34_wait_closed *)o;
  142140. PyObject_GC_UnTrack(o);
  142141. Py_CLEAR(p->__pyx_v_self);
  142142. Py_CLEAR(p->__pyx_v_waiter);
  142143. if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_34_wait_closed < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_34_wait_closed)))) {
  142144. __pyx_freelist_6uvloop_4loop___pyx_scope_struct_34_wait_closed[__pyx_freecount_6uvloop_4loop___pyx_scope_struct_34_wait_closed++] = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_34_wait_closed *)o);
  142145. } else {
  142146. (*Py_TYPE(o)->tp_free)(o);
  142147. }
  142148. }
  142149. static int __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_34_wait_closed(PyObject *o, visitproc v, void *a) {
  142150. int e;
  142151. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_34_wait_closed *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_34_wait_closed *)o;
  142152. if (p->__pyx_v_self) {
  142153. e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  142154. }
  142155. if (p->__pyx_v_waiter) {
  142156. e = (*v)(p->__pyx_v_waiter, a); if (e) return e;
  142157. }
  142158. return 0;
  142159. }
  142160. static PyTypeObject __pyx_type_6uvloop_4loop___pyx_scope_struct_34_wait_closed = {
  142161. PyVarObject_HEAD_INIT(0, 0)
  142162. "uvloop.loop.__pyx_scope_struct_34_wait_closed", /*tp_name*/
  142163. sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_34_wait_closed), /*tp_basicsize*/
  142164. 0, /*tp_itemsize*/
  142165. __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_34_wait_closed, /*tp_dealloc*/
  142166. 0, /*tp_print*/
  142167. 0, /*tp_getattr*/
  142168. 0, /*tp_setattr*/
  142169. #if PY_MAJOR_VERSION < 3
  142170. 0, /*tp_compare*/
  142171. #endif
  142172. #if PY_MAJOR_VERSION >= 3
  142173. 0, /*tp_as_async*/
  142174. #endif
  142175. 0, /*tp_repr*/
  142176. 0, /*tp_as_number*/
  142177. 0, /*tp_as_sequence*/
  142178. 0, /*tp_as_mapping*/
  142179. 0, /*tp_hash*/
  142180. 0, /*tp_call*/
  142181. 0, /*tp_str*/
  142182. 0, /*tp_getattro*/
  142183. 0, /*tp_setattro*/
  142184. 0, /*tp_as_buffer*/
  142185. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  142186. 0, /*tp_doc*/
  142187. __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_34_wait_closed, /*tp_traverse*/
  142188. 0, /*tp_clear*/
  142189. 0, /*tp_richcompare*/
  142190. 0, /*tp_weaklistoffset*/
  142191. 0, /*tp_iter*/
  142192. 0, /*tp_iternext*/
  142193. 0, /*tp_methods*/
  142194. 0, /*tp_members*/
  142195. 0, /*tp_getset*/
  142196. 0, /*tp_base*/
  142197. 0, /*tp_dict*/
  142198. 0, /*tp_descr_get*/
  142199. 0, /*tp_descr_set*/
  142200. 0, /*tp_dictoffset*/
  142201. 0, /*tp_init*/
  142202. 0, /*tp_alloc*/
  142203. __pyx_tp_new_6uvloop_4loop___pyx_scope_struct_34_wait_closed, /*tp_new*/
  142204. 0, /*tp_free*/
  142205. 0, /*tp_is_gc*/
  142206. 0, /*tp_bases*/
  142207. 0, /*tp_mro*/
  142208. 0, /*tp_cache*/
  142209. 0, /*tp_subclasses*/
  142210. 0, /*tp_weaklist*/
  142211. 0, /*tp_del*/
  142212. 0, /*tp_version_tag*/
  142213. #if PY_VERSION_HEX >= 0x030400a1
  142214. 0, /*tp_finalize*/
  142215. #endif
  142216. #if PY_VERSION_HEX >= 0x030800b1
  142217. 0, /*tp_vectorcall*/
  142218. #endif
  142219. };
  142220. static struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_35_start_serving *__pyx_freelist_6uvloop_4loop___pyx_scope_struct_35_start_serving[8];
  142221. static int __pyx_freecount_6uvloop_4loop___pyx_scope_struct_35_start_serving = 0;
  142222. static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_35_start_serving(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  142223. PyObject *o;
  142224. if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_35_start_serving > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_35_start_serving)))) {
  142225. o = (PyObject*)__pyx_freelist_6uvloop_4loop___pyx_scope_struct_35_start_serving[--__pyx_freecount_6uvloop_4loop___pyx_scope_struct_35_start_serving];
  142226. memset(o, 0, sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_35_start_serving));
  142227. (void) PyObject_INIT(o, t);
  142228. PyObject_GC_Track(o);
  142229. } else {
  142230. o = (*t->tp_alloc)(t, 0);
  142231. if (unlikely(!o)) return 0;
  142232. }
  142233. return o;
  142234. }
  142235. static void __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_35_start_serving(PyObject *o) {
  142236. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_35_start_serving *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_35_start_serving *)o;
  142237. PyObject_GC_UnTrack(o);
  142238. Py_CLEAR(p->__pyx_v_self);
  142239. if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_35_start_serving < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_35_start_serving)))) {
  142240. __pyx_freelist_6uvloop_4loop___pyx_scope_struct_35_start_serving[__pyx_freecount_6uvloop_4loop___pyx_scope_struct_35_start_serving++] = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_35_start_serving *)o);
  142241. } else {
  142242. (*Py_TYPE(o)->tp_free)(o);
  142243. }
  142244. }
  142245. static int __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_35_start_serving(PyObject *o, visitproc v, void *a) {
  142246. int e;
  142247. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_35_start_serving *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_35_start_serving *)o;
  142248. if (p->__pyx_v_self) {
  142249. e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  142250. }
  142251. return 0;
  142252. }
  142253. static PyTypeObject __pyx_type_6uvloop_4loop___pyx_scope_struct_35_start_serving = {
  142254. PyVarObject_HEAD_INIT(0, 0)
  142255. "uvloop.loop.__pyx_scope_struct_35_start_serving", /*tp_name*/
  142256. sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_35_start_serving), /*tp_basicsize*/
  142257. 0, /*tp_itemsize*/
  142258. __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_35_start_serving, /*tp_dealloc*/
  142259. 0, /*tp_print*/
  142260. 0, /*tp_getattr*/
  142261. 0, /*tp_setattr*/
  142262. #if PY_MAJOR_VERSION < 3
  142263. 0, /*tp_compare*/
  142264. #endif
  142265. #if PY_MAJOR_VERSION >= 3
  142266. 0, /*tp_as_async*/
  142267. #endif
  142268. 0, /*tp_repr*/
  142269. 0, /*tp_as_number*/
  142270. 0, /*tp_as_sequence*/
  142271. 0, /*tp_as_mapping*/
  142272. 0, /*tp_hash*/
  142273. 0, /*tp_call*/
  142274. 0, /*tp_str*/
  142275. 0, /*tp_getattro*/
  142276. 0, /*tp_setattro*/
  142277. 0, /*tp_as_buffer*/
  142278. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  142279. 0, /*tp_doc*/
  142280. __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_35_start_serving, /*tp_traverse*/
  142281. 0, /*tp_clear*/
  142282. 0, /*tp_richcompare*/
  142283. 0, /*tp_weaklistoffset*/
  142284. 0, /*tp_iter*/
  142285. 0, /*tp_iternext*/
  142286. 0, /*tp_methods*/
  142287. 0, /*tp_members*/
  142288. 0, /*tp_getset*/
  142289. 0, /*tp_base*/
  142290. 0, /*tp_dict*/
  142291. 0, /*tp_descr_get*/
  142292. 0, /*tp_descr_set*/
  142293. 0, /*tp_dictoffset*/
  142294. 0, /*tp_init*/
  142295. 0, /*tp_alloc*/
  142296. __pyx_tp_new_6uvloop_4loop___pyx_scope_struct_35_start_serving, /*tp_new*/
  142297. 0, /*tp_free*/
  142298. 0, /*tp_is_gc*/
  142299. 0, /*tp_bases*/
  142300. 0, /*tp_mro*/
  142301. 0, /*tp_cache*/
  142302. 0, /*tp_subclasses*/
  142303. 0, /*tp_weaklist*/
  142304. 0, /*tp_del*/
  142305. 0, /*tp_version_tag*/
  142306. #if PY_VERSION_HEX >= 0x030400a1
  142307. 0, /*tp_finalize*/
  142308. #endif
  142309. #if PY_VERSION_HEX >= 0x030800b1
  142310. 0, /*tp_vectorcall*/
  142311. #endif
  142312. };
  142313. static struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_36_serve_forever *__pyx_freelist_6uvloop_4loop___pyx_scope_struct_36_serve_forever[8];
  142314. static int __pyx_freecount_6uvloop_4loop___pyx_scope_struct_36_serve_forever = 0;
  142315. static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_36_serve_forever(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  142316. PyObject *o;
  142317. if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_36_serve_forever > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_36_serve_forever)))) {
  142318. o = (PyObject*)__pyx_freelist_6uvloop_4loop___pyx_scope_struct_36_serve_forever[--__pyx_freecount_6uvloop_4loop___pyx_scope_struct_36_serve_forever];
  142319. memset(o, 0, sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_36_serve_forever));
  142320. (void) PyObject_INIT(o, t);
  142321. PyObject_GC_Track(o);
  142322. } else {
  142323. o = (*t->tp_alloc)(t, 0);
  142324. if (unlikely(!o)) return 0;
  142325. }
  142326. return o;
  142327. }
  142328. static void __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_36_serve_forever(PyObject *o) {
  142329. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_36_serve_forever *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_36_serve_forever *)o;
  142330. PyObject_GC_UnTrack(o);
  142331. Py_CLEAR(p->__pyx_v_self);
  142332. Py_CLEAR(p->__pyx_t_0);
  142333. Py_CLEAR(p->__pyx_t_1);
  142334. Py_CLEAR(p->__pyx_t_2);
  142335. Py_CLEAR(p->__pyx_t_3);
  142336. Py_CLEAR(p->__pyx_t_4);
  142337. Py_CLEAR(p->__pyx_t_5);
  142338. if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_36_serve_forever < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_36_serve_forever)))) {
  142339. __pyx_freelist_6uvloop_4loop___pyx_scope_struct_36_serve_forever[__pyx_freecount_6uvloop_4loop___pyx_scope_struct_36_serve_forever++] = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_36_serve_forever *)o);
  142340. } else {
  142341. (*Py_TYPE(o)->tp_free)(o);
  142342. }
  142343. }
  142344. static int __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_36_serve_forever(PyObject *o, visitproc v, void *a) {
  142345. int e;
  142346. struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_36_serve_forever *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_36_serve_forever *)o;
  142347. if (p->__pyx_v_self) {
  142348. e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  142349. }
  142350. if (p->__pyx_t_0) {
  142351. e = (*v)(p->__pyx_t_0, a); if (e) return e;
  142352. }
  142353. if (p->__pyx_t_1) {
  142354. e = (*v)(p->__pyx_t_1, a); if (e) return e;
  142355. }
  142356. if (p->__pyx_t_2) {
  142357. e = (*v)(p->__pyx_t_2, a); if (e) return e;
  142358. }
  142359. if (p->__pyx_t_3) {
  142360. e = (*v)(p->__pyx_t_3, a); if (e) return e;
  142361. }
  142362. if (p->__pyx_t_4) {
  142363. e = (*v)(p->__pyx_t_4, a); if (e) return e;
  142364. }
  142365. if (p->__pyx_t_5) {
  142366. e = (*v)(p->__pyx_t_5, a); if (e) return e;
  142367. }
  142368. return 0;
  142369. }
  142370. static PyTypeObject __pyx_type_6uvloop_4loop___pyx_scope_struct_36_serve_forever = {
  142371. PyVarObject_HEAD_INIT(0, 0)
  142372. "uvloop.loop.__pyx_scope_struct_36_serve_forever", /*tp_name*/
  142373. sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_36_serve_forever), /*tp_basicsize*/
  142374. 0, /*tp_itemsize*/
  142375. __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_36_serve_forever, /*tp_dealloc*/
  142376. 0, /*tp_print*/
  142377. 0, /*tp_getattr*/
  142378. 0, /*tp_setattr*/
  142379. #if PY_MAJOR_VERSION < 3
  142380. 0, /*tp_compare*/
  142381. #endif
  142382. #if PY_MAJOR_VERSION >= 3
  142383. 0, /*tp_as_async*/
  142384. #endif
  142385. 0, /*tp_repr*/
  142386. 0, /*tp_as_number*/
  142387. 0, /*tp_as_sequence*/
  142388. 0, /*tp_as_mapping*/
  142389. 0, /*tp_hash*/
  142390. 0, /*tp_call*/
  142391. 0, /*tp_str*/
  142392. 0, /*tp_getattro*/
  142393. 0, /*tp_setattro*/
  142394. 0, /*tp_as_buffer*/
  142395. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  142396. 0, /*tp_doc*/
  142397. __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_36_serve_forever, /*tp_traverse*/
  142398. 0, /*tp_clear*/
  142399. 0, /*tp_richcompare*/
  142400. 0, /*tp_weaklistoffset*/
  142401. 0, /*tp_iter*/
  142402. 0, /*tp_iternext*/
  142403. 0, /*tp_methods*/
  142404. 0, /*tp_members*/
  142405. 0, /*tp_getset*/
  142406. 0, /*tp_base*/
  142407. 0, /*tp_dict*/
  142408. 0, /*tp_descr_get*/
  142409. 0, /*tp_descr_set*/
  142410. 0, /*tp_dictoffset*/
  142411. 0, /*tp_init*/
  142412. 0, /*tp_alloc*/
  142413. __pyx_tp_new_6uvloop_4loop___pyx_scope_struct_36_serve_forever, /*tp_new*/
  142414. 0, /*tp_free*/
  142415. 0, /*tp_is_gc*/
  142416. 0, /*tp_bases*/
  142417. 0, /*tp_mro*/
  142418. 0, /*tp_cache*/
  142419. 0, /*tp_subclasses*/
  142420. 0, /*tp_weaklist*/
  142421. 0, /*tp_del*/
  142422. 0, /*tp_version_tag*/
  142423. #if PY_VERSION_HEX >= 0x030400a1
  142424. 0, /*tp_finalize*/
  142425. #endif
  142426. #if PY_VERSION_HEX >= 0x030800b1
  142427. 0, /*tp_vectorcall*/
  142428. #endif
  142429. };
  142430. static struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_37__test_coroutine_1 *__pyx_freelist_6uvloop_4loop___pyx_scope_struct_37__test_coroutine_1[8];
  142431. static int __pyx_freecount_6uvloop_4loop___pyx_scope_struct_37__test_coroutine_1 = 0;
  142432. static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_37__test_coroutine_1(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  142433. PyObject *o;
  142434. if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_37__test_coroutine_1 > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_37__test_coroutine_1)))) {
  142435. o = (PyObject*)__pyx_freelist_6uvloop_4loop___pyx_scope_struct_37__test_coroutine_1[--__pyx_freecount_6uvloop_4loop___pyx_scope_struct_37__test_coroutine_1];
  142436. memset(o, 0, sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_37__test_coroutine_1));
  142437. (void) PyObject_INIT(o, t);
  142438. } else {
  142439. o = (*t->tp_alloc)(t, 0);
  142440. if (unlikely(!o)) return 0;
  142441. }
  142442. return o;
  142443. }
  142444. static void __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_37__test_coroutine_1(PyObject *o) {
  142445. if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_37__test_coroutine_1 < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_37__test_coroutine_1)))) {
  142446. __pyx_freelist_6uvloop_4loop___pyx_scope_struct_37__test_coroutine_1[__pyx_freecount_6uvloop_4loop___pyx_scope_struct_37__test_coroutine_1++] = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_37__test_coroutine_1 *)o);
  142447. } else {
  142448. (*Py_TYPE(o)->tp_free)(o);
  142449. }
  142450. }
  142451. static PyTypeObject __pyx_type_6uvloop_4loop___pyx_scope_struct_37__test_coroutine_1 = {
  142452. PyVarObject_HEAD_INIT(0, 0)
  142453. "uvloop.loop.__pyx_scope_struct_37__test_coroutine_1", /*tp_name*/
  142454. sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_37__test_coroutine_1), /*tp_basicsize*/
  142455. 0, /*tp_itemsize*/
  142456. __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_37__test_coroutine_1, /*tp_dealloc*/
  142457. 0, /*tp_print*/
  142458. 0, /*tp_getattr*/
  142459. 0, /*tp_setattr*/
  142460. #if PY_MAJOR_VERSION < 3
  142461. 0, /*tp_compare*/
  142462. #endif
  142463. #if PY_MAJOR_VERSION >= 3
  142464. 0, /*tp_as_async*/
  142465. #endif
  142466. 0, /*tp_repr*/
  142467. 0, /*tp_as_number*/
  142468. 0, /*tp_as_sequence*/
  142469. 0, /*tp_as_mapping*/
  142470. 0, /*tp_hash*/
  142471. 0, /*tp_call*/
  142472. 0, /*tp_str*/
  142473. 0, /*tp_getattro*/
  142474. 0, /*tp_setattro*/
  142475. 0, /*tp_as_buffer*/
  142476. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER, /*tp_flags*/
  142477. 0, /*tp_doc*/
  142478. 0, /*tp_traverse*/
  142479. 0, /*tp_clear*/
  142480. 0, /*tp_richcompare*/
  142481. 0, /*tp_weaklistoffset*/
  142482. 0, /*tp_iter*/
  142483. 0, /*tp_iternext*/
  142484. 0, /*tp_methods*/
  142485. 0, /*tp_members*/
  142486. 0, /*tp_getset*/
  142487. 0, /*tp_base*/
  142488. 0, /*tp_dict*/
  142489. 0, /*tp_descr_get*/
  142490. 0, /*tp_descr_set*/
  142491. 0, /*tp_dictoffset*/
  142492. 0, /*tp_init*/
  142493. 0, /*tp_alloc*/
  142494. __pyx_tp_new_6uvloop_4loop___pyx_scope_struct_37__test_coroutine_1, /*tp_new*/
  142495. 0, /*tp_free*/
  142496. 0, /*tp_is_gc*/
  142497. 0, /*tp_bases*/
  142498. 0, /*tp_mro*/
  142499. 0, /*tp_cache*/
  142500. 0, /*tp_subclasses*/
  142501. 0, /*tp_weaklist*/
  142502. 0, /*tp_del*/
  142503. 0, /*tp_version_tag*/
  142504. #if PY_VERSION_HEX >= 0x030400a1
  142505. 0, /*tp_finalize*/
  142506. #endif
  142507. #if PY_VERSION_HEX >= 0x030800b1
  142508. 0, /*tp_vectorcall*/
  142509. #endif
  142510. };
  142511. static struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_object____Loop____bint___to_py *__pyx_freelist___pyx_scope_struct____Pyx_CFunc_object____Loop____bint___to_py[8];
  142512. static int __pyx_freecount___pyx_scope_struct____Pyx_CFunc_object____Loop____bint___to_py = 0;
  142513. static PyObject *__pyx_tp_new___pyx_scope_struct____Pyx_CFunc_object____Loop____bint___to_py(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  142514. PyObject *o;
  142515. if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount___pyx_scope_struct____Pyx_CFunc_object____Loop____bint___to_py > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_object____Loop____bint___to_py)))) {
  142516. o = (PyObject*)__pyx_freelist___pyx_scope_struct____Pyx_CFunc_object____Loop____bint___to_py[--__pyx_freecount___pyx_scope_struct____Pyx_CFunc_object____Loop____bint___to_py];
  142517. memset(o, 0, sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_object____Loop____bint___to_py));
  142518. (void) PyObject_INIT(o, t);
  142519. } else {
  142520. o = (*t->tp_alloc)(t, 0);
  142521. if (unlikely(!o)) return 0;
  142522. }
  142523. return o;
  142524. }
  142525. static void __pyx_tp_dealloc___pyx_scope_struct____Pyx_CFunc_object____Loop____bint___to_py(PyObject *o) {
  142526. if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount___pyx_scope_struct____Pyx_CFunc_object____Loop____bint___to_py < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_object____Loop____bint___to_py)))) {
  142527. __pyx_freelist___pyx_scope_struct____Pyx_CFunc_object____Loop____bint___to_py[__pyx_freecount___pyx_scope_struct____Pyx_CFunc_object____Loop____bint___to_py++] = ((struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_object____Loop____bint___to_py *)o);
  142528. } else {
  142529. (*Py_TYPE(o)->tp_free)(o);
  142530. }
  142531. }
  142532. static PyTypeObject __pyx_scope_struct____Pyx_CFunc_object____Loop____bint___to_py = {
  142533. PyVarObject_HEAD_INIT(0, 0)
  142534. "uvloop.loop.__pyx_scope_struct____Pyx_CFunc_object____Loop____bint___to_py", /*tp_name*/
  142535. sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_object____Loop____bint___to_py), /*tp_basicsize*/
  142536. 0, /*tp_itemsize*/
  142537. __pyx_tp_dealloc___pyx_scope_struct____Pyx_CFunc_object____Loop____bint___to_py, /*tp_dealloc*/
  142538. 0, /*tp_print*/
  142539. 0, /*tp_getattr*/
  142540. 0, /*tp_setattr*/
  142541. #if PY_MAJOR_VERSION < 3
  142542. 0, /*tp_compare*/
  142543. #endif
  142544. #if PY_MAJOR_VERSION >= 3
  142545. 0, /*tp_as_async*/
  142546. #endif
  142547. 0, /*tp_repr*/
  142548. 0, /*tp_as_number*/
  142549. 0, /*tp_as_sequence*/
  142550. 0, /*tp_as_mapping*/
  142551. 0, /*tp_hash*/
  142552. 0, /*tp_call*/
  142553. 0, /*tp_str*/
  142554. 0, /*tp_getattro*/
  142555. 0, /*tp_setattro*/
  142556. 0, /*tp_as_buffer*/
  142557. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER, /*tp_flags*/
  142558. 0, /*tp_doc*/
  142559. 0, /*tp_traverse*/
  142560. 0, /*tp_clear*/
  142561. 0, /*tp_richcompare*/
  142562. 0, /*tp_weaklistoffset*/
  142563. 0, /*tp_iter*/
  142564. 0, /*tp_iternext*/
  142565. 0, /*tp_methods*/
  142566. 0, /*tp_members*/
  142567. 0, /*tp_getset*/
  142568. 0, /*tp_base*/
  142569. 0, /*tp_dict*/
  142570. 0, /*tp_descr_get*/
  142571. 0, /*tp_descr_set*/
  142572. 0, /*tp_dictoffset*/
  142573. 0, /*tp_init*/
  142574. 0, /*tp_alloc*/
  142575. __pyx_tp_new___pyx_scope_struct____Pyx_CFunc_object____Loop____bint___to_py, /*tp_new*/
  142576. 0, /*tp_free*/
  142577. 0, /*tp_is_gc*/
  142578. 0, /*tp_bases*/
  142579. 0, /*tp_mro*/
  142580. 0, /*tp_cache*/
  142581. 0, /*tp_subclasses*/
  142582. 0, /*tp_weaklist*/
  142583. 0, /*tp_del*/
  142584. 0, /*tp_version_tag*/
  142585. #if PY_VERSION_HEX >= 0x030400a1
  142586. 0, /*tp_finalize*/
  142587. #endif
  142588. #if PY_VERSION_HEX >= 0x030800b1
  142589. 0, /*tp_vectorcall*/
  142590. #endif
  142591. };
  142592. static PyMethodDef __pyx_methods[] = {
  142593. {0, 0, 0, 0}
  142594. };
  142595. #if PY_MAJOR_VERSION >= 3
  142596. #if CYTHON_PEP489_MULTI_PHASE_INIT
  142597. static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
  142598. static int __pyx_pymod_exec_loop(PyObject* module); /*proto*/
  142599. static PyModuleDef_Slot __pyx_moduledef_slots[] = {
  142600. {Py_mod_create, (void*)__pyx_pymod_create},
  142601. {Py_mod_exec, (void*)__pyx_pymod_exec_loop},
  142602. {0, NULL}
  142603. };
  142604. #endif
  142605. static struct PyModuleDef __pyx_moduledef = {
  142606. PyModuleDef_HEAD_INIT,
  142607. "loop",
  142608. 0, /* m_doc */
  142609. #if CYTHON_PEP489_MULTI_PHASE_INIT
  142610. 0, /* m_size */
  142611. #else
  142612. -1, /* m_size */
  142613. #endif
  142614. __pyx_methods /* m_methods */,
  142615. #if CYTHON_PEP489_MULTI_PHASE_INIT
  142616. __pyx_moduledef_slots, /* m_slots */
  142617. #else
  142618. NULL, /* m_reload */
  142619. #endif
  142620. NULL, /* m_traverse */
  142621. NULL, /* m_clear */
  142622. NULL /* m_free */
  142623. };
  142624. #endif
  142625. #ifndef CYTHON_SMALL_CODE
  142626. #if defined(__clang__)
  142627. #define CYTHON_SMALL_CODE
  142628. #elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
  142629. #define CYTHON_SMALL_CODE __attribute__((cold))
  142630. #else
  142631. #define CYTHON_SMALL_CODE
  142632. #endif
  142633. #endif
  142634. static __Pyx_StringTabEntry __pyx_string_tab[] = {
  142635. {&__pyx_kp_b_1, __pyx_k_1, sizeof(__pyx_k_1), 0, 0, 0, 0},
  142636. {&__pyx_kp_u_18_7_7_7, __pyx_k_18_7_7_7, sizeof(__pyx_k_18_7_7_7), 0, 1, 0, 0},
  142637. {&__pyx_kp_u_AF_INET6_address_must_be_tuple, __pyx_k_AF_INET6_address_must_be_tuple, sizeof(__pyx_k_AF_INET6_address_must_be_tuple), 0, 1, 0, 0},
  142638. {&__pyx_kp_u_AF_INET6_must_be_a_tuple_of_2_4, __pyx_k_AF_INET6_must_be_a_tuple_of_2_4, sizeof(__pyx_k_AF_INET6_must_be_a_tuple_of_2_4), 0, 1, 0, 0},
  142639. {&__pyx_kp_u_AF_INET_address_must_be_tuple, __pyx_k_AF_INET_address_must_be_tuple, sizeof(__pyx_k_AF_INET_address_must_be_tuple), 0, 1, 0, 0},
  142640. {&__pyx_kp_u_AF_INET_address_must_be_tuple_of, __pyx_k_AF_INET_address_must_be_tuple_of, sizeof(__pyx_k_AF_INET_address_must_be_tuple_of), 0, 1, 0, 0},
  142641. {&__pyx_kp_u_AF_UNIX_address_must_be_a_str_or, __pyx_k_AF_UNIX_address_must_be_a_str_or, sizeof(__pyx_k_AF_UNIX_address_must_be_a_str_or), 0, 1, 0, 0},
  142642. {&__pyx_kp_u_AF_UNSPEC_in_DNS_results, __pyx_k_AF_UNSPEC_in_DNS_results, sizeof(__pyx_k_AF_UNSPEC_in_DNS_results), 0, 1, 0, 0},
  142643. {&__pyx_kp_u_A_Stream_Socket_was_expected_got, __pyx_k_A_Stream_Socket_was_expected_got, sizeof(__pyx_k_A_Stream_Socket_was_expected_got), 0, 1, 0, 0},
  142644. {&__pyx_kp_u_A_UDP_Socket_was_expected_got_r, __pyx_k_A_UDP_Socket_was_expected_got_r, sizeof(__pyx_k_A_UDP_Socket_was_expected_got_r), 0, 1, 0, 0},
  142645. {&__pyx_kp_u_A_UNIX_Domain_Stream_Socket_was, __pyx_k_A_UNIX_Domain_Stream_Socket_was, sizeof(__pyx_k_A_UNIX_Domain_Stream_Socket_was), 0, 1, 0, 0},
  142646. {&__pyx_kp_u_A_callable_object_or_None_is_exp, __pyx_k_A_callable_object_or_None_is_exp, sizeof(__pyx_k_A_callable_object_or_None_is_exp), 0, 1, 0, 0},
  142647. {&__pyx_n_s_AbstractChildWatcher, __pyx_k_AbstractChildWatcher, sizeof(__pyx_k_AbstractChildWatcher), 0, 0, 1, 1},
  142648. {&__pyx_n_s_AddrInfo, __pyx_k_AddrInfo, sizeof(__pyx_k_AddrInfo), 0, 0, 1, 1},
  142649. {&__pyx_n_s_AddrInfoRequest, __pyx_k_AddrInfoRequest, sizeof(__pyx_k_AddrInfoRequest), 0, 0, 1, 1},
  142650. {&__pyx_kp_u_AddrInfoRequest_callback_called, __pyx_k_AddrInfoRequest_callback_called, sizeof(__pyx_k_AddrInfoRequest_callback_called), 0, 1, 0, 0},
  142651. {&__pyx_kp_u_AddrInfo_data_is_NULL, __pyx_k_AddrInfo_data_is_NULL, sizeof(__pyx_k_AddrInfo_data_is_NULL), 0, 1, 0, 0},
  142652. {&__pyx_n_s_AddressFamily, __pyx_k_AddressFamily, sizeof(__pyx_k_AddressFamily), 0, 0, 1, 1},
  142653. {&__pyx_kp_u_Address_r_is_already_in_use, __pyx_k_Address_r_is_already_in_use, sizeof(__pyx_k_Address_r_is_already_in_use), 0, 1, 0, 0},
  142654. {&__pyx_n_s_AttributeError, __pyx_k_AttributeError, sizeof(__pyx_k_AttributeError), 0, 0, 1, 1},
  142655. {&__pyx_kp_u_Bad_exception_data_from_child_r, __pyx_k_Bad_exception_data_from_child_r, sizeof(__pyx_k_Bad_exception_data_from_child_r), 0, 1, 0, 0},
  142656. {&__pyx_n_s_BaseException, __pyx_k_BaseException, sizeof(__pyx_k_BaseException), 0, 0, 1, 1},
  142657. {&__pyx_n_s_BaseProtocol, __pyx_k_BaseProtocol, sizeof(__pyx_k_BaseProtocol), 0, 0, 1, 1},
  142658. {&__pyx_n_s_BlockingIOError, __pyx_k_BlockingIOError, sizeof(__pyx_k_BlockingIOError), 0, 0, 1, 1},
  142659. {&__pyx_n_s_BrokenPipeError, __pyx_k_BrokenPipeError, sizeof(__pyx_k_BrokenPipeError), 0, 0, 1, 1},
  142660. {&__pyx_kp_u_Callback_handles_8, __pyx_k_Callback_handles_8, sizeof(__pyx_k_Callback_handles_8), 0, 1, 0, 0},
  142661. {&__pyx_n_s_CancelledError, __pyx_k_CancelledError, sizeof(__pyx_k_CancelledError), 0, 0, 1, 1},
  142662. {&__pyx_kp_u_Cannot_call_write_after_write_eo, __pyx_k_Cannot_call_write_after_write_eo, sizeof(__pyx_k_Cannot_call_write_after_write_eo), 0, 1, 0, 0},
  142663. {&__pyx_kp_u_Cannot_call_writelines_after_wri, __pyx_k_Cannot_call_writelines_after_wri, sizeof(__pyx_k_Cannot_call_writelines_after_wri), 0, 1, 0, 0},
  142664. {&__pyx_kp_u_Cannot_close_a_running_event_loo, __pyx_k_Cannot_close_a_running_event_loo, sizeof(__pyx_k_Cannot_close_a_running_event_loo), 0, 1, 0, 0},
  142665. {&__pyx_kp_u_Cannot_run_the_event_loop_while, __pyx_k_Cannot_run_the_event_loop_while, sizeof(__pyx_k_Cannot_run_the_event_loop_while), 0, 1, 0, 0},
  142666. {&__pyx_kp_u_Cannot_serialize_socket_object, __pyx_k_Cannot_serialize_socket_object, sizeof(__pyx_k_Cannot_serialize_socket_object), 0, 1, 0, 0},
  142667. {&__pyx_n_s_CertificateError, __pyx_k_CertificateError, sizeof(__pyx_k_CertificateError), 0, 0, 1, 1},
  142668. {&__pyx_kp_u_Connect_call_failed, __pyx_k_Connect_call_failed, sizeof(__pyx_k_Connect_call_failed), 0, 1, 0, 0},
  142669. {&__pyx_n_s_ConnectionAbortedError, __pyx_k_ConnectionAbortedError, sizeof(__pyx_k_ConnectionAbortedError), 0, 0, 1, 1},
  142670. {&__pyx_n_s_ConnectionRefusedError, __pyx_k_ConnectionRefusedError, sizeof(__pyx_k_ConnectionRefusedError), 0, 0, 1, 1},
  142671. {&__pyx_n_s_ConnectionResetError, __pyx_k_ConnectionResetError, sizeof(__pyx_k_ConnectionResetError), 0, 0, 1, 1},
  142672. {&__pyx_n_s_Counter, __pyx_k_Counter, sizeof(__pyx_k_Counter), 0, 0, 1, 1},
  142673. {&__pyx_kp_u_Creating__SSLProtocolTransport_t, __pyx_k_Creating__SSLProtocolTransport_t, sizeof(__pyx_k_Creating__SSLProtocolTransport_t), 0, 1, 0, 0},
  142674. {&__pyx_n_s_DEVNULL, __pyx_k_DEVNULL, sizeof(__pyx_k_DEVNULL), 0, 0, 1, 1},
  142675. {&__pyx_n_u_EAI_ADDRFAMILY, __pyx_k_EAI_ADDRFAMILY, sizeof(__pyx_k_EAI_ADDRFAMILY), 0, 1, 0, 1},
  142676. {&__pyx_n_u_EAI_AGAIN, __pyx_k_EAI_AGAIN, sizeof(__pyx_k_EAI_AGAIN), 0, 1, 0, 1},
  142677. {&__pyx_n_u_EAI_BADFLAGS, __pyx_k_EAI_BADFLAGS, sizeof(__pyx_k_EAI_BADFLAGS), 0, 1, 0, 1},
  142678. {&__pyx_n_u_EAI_BADHINTS, __pyx_k_EAI_BADHINTS, sizeof(__pyx_k_EAI_BADHINTS), 0, 1, 0, 1},
  142679. {&__pyx_n_u_EAI_CANCELED, __pyx_k_EAI_CANCELED, sizeof(__pyx_k_EAI_CANCELED), 0, 1, 0, 1},
  142680. {&__pyx_n_u_EAI_FAIL, __pyx_k_EAI_FAIL, sizeof(__pyx_k_EAI_FAIL), 0, 1, 0, 1},
  142681. {&__pyx_n_u_EAI_FAMILY, __pyx_k_EAI_FAMILY, sizeof(__pyx_k_EAI_FAMILY), 0, 1, 0, 1},
  142682. {&__pyx_n_u_EAI_MEMORY, __pyx_k_EAI_MEMORY, sizeof(__pyx_k_EAI_MEMORY), 0, 1, 0, 1},
  142683. {&__pyx_n_u_EAI_NODATA, __pyx_k_EAI_NODATA, sizeof(__pyx_k_EAI_NODATA), 0, 1, 0, 1},
  142684. {&__pyx_n_u_EAI_NONAME, __pyx_k_EAI_NONAME, sizeof(__pyx_k_EAI_NONAME), 0, 1, 0, 1},
  142685. {&__pyx_n_u_EAI_OVERFLOW, __pyx_k_EAI_OVERFLOW, sizeof(__pyx_k_EAI_OVERFLOW), 0, 1, 0, 1},
  142686. {&__pyx_n_u_EAI_PROTOCOL, __pyx_k_EAI_PROTOCOL, sizeof(__pyx_k_EAI_PROTOCOL), 0, 1, 0, 1},
  142687. {&__pyx_n_u_EAI_SERVICE, __pyx_k_EAI_SERVICE, sizeof(__pyx_k_EAI_SERVICE), 0, 1, 0, 1},
  142688. {&__pyx_n_u_EAI_SOCKTYPE, __pyx_k_EAI_SOCKTYPE, sizeof(__pyx_k_EAI_SOCKTYPE), 0, 1, 0, 1},
  142689. {&__pyx_kp_u_Error_calling_eof_received, __pyx_k_Error_calling_eof_received, sizeof(__pyx_k_Error_calling_eof_received), 0, 1, 0, 0},
  142690. {&__pyx_kp_u_Errors_logged, __pyx_k_Errors_logged, sizeof(__pyx_k_Errors_logged), 0, 1, 0, 0},
  142691. {&__pyx_kp_u_Event_loop_is_closed, __pyx_k_Event_loop_is_closed, sizeof(__pyx_k_Event_loop_is_closed), 0, 1, 0, 0},
  142692. {&__pyx_kp_u_Event_loop_stopped_before_Future, __pyx_k_Event_loop_stopped_before_Future, sizeof(__pyx_k_Event_loop_stopped_before_Future), 0, 1, 0, 0},
  142693. {&__pyx_kp_u_Exception_in___repr___r_value_ty, __pyx_k_Exception_in___repr___r_value_ty, sizeof(__pyx_k_Exception_in___repr___r_value_ty), 0, 1, 0, 0},
  142694. {&__pyx_kp_u_Exception_in_callback, __pyx_k_Exception_in_callback, sizeof(__pyx_k_Exception_in_callback), 0, 1, 0, 0},
  142695. {&__pyx_kp_u_Exception_in_default_exception_h, __pyx_k_Exception_in_default_exception_h, sizeof(__pyx_k_Exception_in_default_exception_h), 0, 1, 0, 0},
  142696. {&__pyx_kp_u_Exception_in_default_exception_h_2, __pyx_k_Exception_in_default_exception_h_2, sizeof(__pyx_k_Exception_in_default_exception_h_2), 0, 1, 0, 0},
  142697. {&__pyx_kp_u_Exception_occurred_in_preexec_fn, __pyx_k_Exception_occurred_in_preexec_fn, sizeof(__pyx_k_Exception_occurred_in_preexec_fn), 0, 1, 0, 0},
  142698. {&__pyx_kp_u_Executing_r_took_3f_seconds, __pyx_k_Executing_r_took_3f_seconds, sizeof(__pyx_k_Executing_r_took_3f_seconds), 0, 1, 0, 0},
  142699. {&__pyx_kp_u_Executing_s_took_3f_seconds, __pyx_k_Executing_s_took_3f_seconds, sizeof(__pyx_k_Executing_s_took_3f_seconds), 0, 1, 0, 0},
  142700. {&__pyx_kp_u_Fatal_error_on_SSL_protocol, __pyx_k_Fatal_error_on_SSL_protocol, sizeof(__pyx_k_Fatal_error_on_SSL_protocol), 0, 1, 0, 0},
  142701. {&__pyx_kp_u_Fatal_error_on_server, __pyx_k_Fatal_error_on_server, sizeof(__pyx_k_Fatal_error_on_server), 0, 1, 0, 0},
  142702. {&__pyx_kp_u_Fatal_error_on_transport, __pyx_k_Fatal_error_on_transport, sizeof(__pyx_k_Fatal_error_on_transport), 0, 1, 0, 0},
  142703. {&__pyx_kp_u_Fatal_error_on_transport_2, __pyx_k_Fatal_error_on_transport_2, sizeof(__pyx_k_Fatal_error_on_transport_2), 0, 1, 0, 0},
  142704. {&__pyx_kp_u_Fatal_write_error_on_datagram_tr, __pyx_k_Fatal_write_error_on_datagram_tr, sizeof(__pyx_k_Fatal_write_error_on_datagram_tr), 0, 1, 0, 0},
  142705. {&__pyx_n_s_FileExistsError, __pyx_k_FileExistsError, sizeof(__pyx_k_FileExistsError), 0, 0, 1, 1},
  142706. {&__pyx_n_s_FileNotFoundError, __pyx_k_FileNotFoundError, sizeof(__pyx_k_FileNotFoundError), 0, 0, 1, 1},
  142707. {&__pyx_kp_u_File_descriptor_r_is_used_by_tra, __pyx_k_File_descriptor_r_is_used_by_tra, sizeof(__pyx_k_File_descriptor_r_is_used_by_tra), 0, 1, 0, 0},
  142708. {&__pyx_n_s_FlowControlMixin, __pyx_k_FlowControlMixin, sizeof(__pyx_k_FlowControlMixin), 0, 0, 1, 1},
  142709. {&__pyx_n_s_Future, __pyx_k_Future, sizeof(__pyx_k_Future), 0, 0, 1, 1},
  142710. {&__pyx_n_s_Handle, __pyx_k_Handle, sizeof(__pyx_k_Handle), 0, 0, 1, 1},
  142711. {&__pyx_kp_u_Handle_loop_is_None_in_Handle, __pyx_k_Handle_loop_is_None_in_Handle, sizeof(__pyx_k_Handle_loop_is_None_in_Handle), 0, 1, 0, 0},
  142712. {&__pyx_n_u_IPV6_V6ONLY, __pyx_k_IPV6_V6ONLY, sizeof(__pyx_k_IPV6_V6ONLY), 0, 1, 0, 1},
  142713. {&__pyx_kp_u_IPv4_sockaddr_must_be_2_tuple, __pyx_k_IPv4_sockaddr_must_be_2_tuple, sizeof(__pyx_k_IPv4_sockaddr_must_be_2_tuple), 0, 1, 0, 0},
  142714. {&__pyx_kp_s_Incompatible_checksums_s_vs_0x53, __pyx_k_Incompatible_checksums_s_vs_0x53, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x53), 0, 0, 1, 0},
  142715. {&__pyx_kp_s_Incompatible_checksums_s_vs_0x88, __pyx_k_Incompatible_checksums_s_vs_0x88, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x88), 0, 0, 1, 0},
  142716. {&__pyx_n_s_InterruptedError, __pyx_k_InterruptedError, sizeof(__pyx_k_InterruptedError), 0, 0, 1, 1},
  142717. {&__pyx_n_s_InvalidStateError, __pyx_k_InvalidStateError, sizeof(__pyx_k_InvalidStateError), 0, 0, 1, 1},
  142718. {&__pyx_kp_u_Invalid_file_descriptor, __pyx_k_Invalid_file_descriptor, sizeof(__pyx_k_Invalid_file_descriptor), 0, 1, 0, 0},
  142719. {&__pyx_kp_u_Invalid_file_object_r, __pyx_k_Invalid_file_object_r, sizeof(__pyx_k_Invalid_file_object_r), 0, 1, 0, 0},
  142720. {&__pyx_n_s_IsADirectoryError, __pyx_k_IsADirectoryError, sizeof(__pyx_k_IsADirectoryError), 0, 0, 1, 1},
  142721. {&__pyx_n_s_Iterable, __pyx_k_Iterable, sizeof(__pyx_k_Iterable), 0, 0, 1, 1},
  142722. {&__pyx_n_s_KeyError, __pyx_k_KeyError, sizeof(__pyx_k_KeyError), 0, 0, 1, 1},
  142723. {&__pyx_kp_u_Listen_errors, __pyx_k_Listen_errors, sizeof(__pyx_k_Listen_errors), 0, 1, 0, 0},
  142724. {&__pyx_n_s_Loop, __pyx_k_Loop, sizeof(__pyx_k_Loop), 0, 0, 1, 1},
  142725. {&__pyx_n_s_Loop___get___locals_lambda, __pyx_k_Loop___get___locals_lambda, sizeof(__pyx_k_Loop___get___locals_lambda), 0, 0, 1, 1},
  142726. {&__pyx_n_s_Loop___subprocess_run, __pyx_k_Loop___subprocess_run, sizeof(__pyx_k_Loop___subprocess_run), 0, 0, 1, 1},
  142727. {&__pyx_n_s_Loop__getaddrinfo_locals_callbac, __pyx_k_Loop__getaddrinfo_locals_callbac, sizeof(__pyx_k_Loop__getaddrinfo_locals_callbac), 0, 0, 1, 1},
  142728. {&__pyx_n_s_Loop__getnameinfo_locals_callbac, __pyx_k_Loop__getnameinfo_locals_callbac, sizeof(__pyx_k_Loop__getnameinfo_locals_callbac), 0, 0, 1, 1},
  142729. {&__pyx_kp_u_Loop__read_from_self, __pyx_k_Loop__read_from_self, sizeof(__pyx_k_Loop__read_from_self), 0, 1, 0, 0},
  142730. {&__pyx_kp_u_Loop__sock_accept, __pyx_k_Loop__sock_accept, sizeof(__pyx_k_Loop__sock_accept), 0, 1, 0, 0},
  142731. {&__pyx_kp_u_Loop__sock_connect, __pyx_k_Loop__sock_connect, sizeof(__pyx_k_Loop__sock_connect), 0, 1, 0, 0},
  142732. {&__pyx_n_s_Loop__sock_connect_locals_lambda, __pyx_k_Loop__sock_connect_locals_lambda, sizeof(__pyx_k_Loop__sock_connect_locals_lambda), 0, 0, 1, 1},
  142733. {&__pyx_kp_u_Loop__sock_recv, __pyx_k_Loop__sock_recv, sizeof(__pyx_k_Loop__sock_recv), 0, 1, 0, 0},
  142734. {&__pyx_kp_u_Loop__sock_recv_into, __pyx_k_Loop__sock_recv_into, sizeof(__pyx_k_Loop__sock_recv_into), 0, 1, 0, 0},
  142735. {&__pyx_kp_u_Loop__sock_sendall, __pyx_k_Loop__sock_sendall, sizeof(__pyx_k_Loop__sock_sendall), 0, 1, 0, 0},
  142736. {&__pyx_kp_u_Loop__stop, __pyx_k_Loop__stop, sizeof(__pyx_k_Loop__stop), 0, 1, 0, 0},
  142737. {&__pyx_n_s_Loop_connect_accepted_socket, __pyx_k_Loop_connect_accepted_socket, sizeof(__pyx_k_Loop_connect_accepted_socket), 0, 0, 1, 1},
  142738. {&__pyx_n_s_Loop_connect_read_pipe, __pyx_k_Loop_connect_read_pipe, sizeof(__pyx_k_Loop_connect_read_pipe), 0, 0, 1, 1},
  142739. {&__pyx_n_s_Loop_connect_write_pipe, __pyx_k_Loop_connect_write_pipe, sizeof(__pyx_k_Loop_connect_write_pipe), 0, 0, 1, 1},
  142740. {&__pyx_n_s_Loop_create_connection, __pyx_k_Loop_create_connection, sizeof(__pyx_k_Loop_create_connection), 0, 0, 1, 1},
  142741. {&__pyx_n_s_Loop_create_datagram_endpoint, __pyx_k_Loop_create_datagram_endpoint, sizeof(__pyx_k_Loop_create_datagram_endpoint), 0, 0, 1, 1},
  142742. {&__pyx_n_s_Loop_create_server, __pyx_k_Loop_create_server, sizeof(__pyx_k_Loop_create_server), 0, 0, 1, 1},
  142743. {&__pyx_n_s_Loop_create_unix_connection, __pyx_k_Loop_create_unix_connection, sizeof(__pyx_k_Loop_create_unix_connection), 0, 0, 1, 1},
  142744. {&__pyx_n_s_Loop_create_unix_server, __pyx_k_Loop_create_unix_server, sizeof(__pyx_k_Loop_create_unix_server), 0, 0, 1, 1},
  142745. {&__pyx_kp_u_Loop_debug_info, __pyx_k_Loop_debug_info, sizeof(__pyx_k_Loop_debug_info), 0, 1, 0, 0},
  142746. {&__pyx_n_s_Loop_getaddrinfo, __pyx_k_Loop_getaddrinfo, sizeof(__pyx_k_Loop_getaddrinfo), 0, 0, 1, 1},
  142747. {&__pyx_n_s_Loop_getnameinfo, __pyx_k_Loop_getnameinfo, sizeof(__pyx_k_Loop_getnameinfo), 0, 0, 1, 1},
  142748. {&__pyx_n_s_Loop_shutdown_asyncgens, __pyx_k_Loop_shutdown_asyncgens, sizeof(__pyx_k_Loop_shutdown_asyncgens), 0, 0, 1, 1},
  142749. {&__pyx_n_s_Loop_sock_accept, __pyx_k_Loop_sock_accept, sizeof(__pyx_k_Loop_sock_accept), 0, 0, 1, 1},
  142750. {&__pyx_n_s_Loop_sock_connect, __pyx_k_Loop_sock_connect, sizeof(__pyx_k_Loop_sock_connect), 0, 0, 1, 1},
  142751. {&__pyx_n_s_Loop_sock_recv, __pyx_k_Loop_sock_recv, sizeof(__pyx_k_Loop_sock_recv), 0, 0, 1, 1},
  142752. {&__pyx_n_s_Loop_sock_recv_into, __pyx_k_Loop_sock_recv_into, sizeof(__pyx_k_Loop_sock_recv_into), 0, 0, 1, 1},
  142753. {&__pyx_n_s_Loop_sock_sendall, __pyx_k_Loop_sock_sendall, sizeof(__pyx_k_Loop_sock_sendall), 0, 0, 1, 1},
  142754. {&__pyx_n_s_Loop_start_tls, __pyx_k_Loop_start_tls, sizeof(__pyx_k_Loop_start_tls), 0, 0, 1, 1},
  142755. {&__pyx_n_s_Loop_subprocess_exec, __pyx_k_Loop_subprocess_exec, sizeof(__pyx_k_Loop_subprocess_exec), 0, 0, 1, 1},
  142756. {&__pyx_n_s_Loop_subprocess_shell, __pyx_k_Loop_subprocess_shell, sizeof(__pyx_k_Loop_subprocess_shell), 0, 0, 1, 1},
  142757. {&__pyx_kp_u_Loop_time, __pyx_k_Loop_time, sizeof(__pyx_k_Loop_time), 0, 1, 0, 0},
  142758. {&__pyx_n_s_LruCache, __pyx_k_LruCache, sizeof(__pyx_k_LruCache), 0, 0, 1, 1},
  142759. {&__pyx_n_s_MemoryBIO, __pyx_k_MemoryBIO, sizeof(__pyx_k_MemoryBIO), 0, 0, 1, 1},
  142760. {&__pyx_n_s_MemoryError, __pyx_k_MemoryError, sizeof(__pyx_k_MemoryError), 0, 0, 1, 1},
  142761. {&__pyx_kp_u_Multiple_exceptions, __pyx_k_Multiple_exceptions, sizeof(__pyx_k_Multiple_exceptions), 0, 1, 0, 0},
  142762. {&__pyx_n_s_NSIG, __pyx_k_NSIG, sizeof(__pyx_k_NSIG), 0, 0, 1, 1},
  142763. {&__pyx_n_s_NameInfoRequest, __pyx_k_NameInfoRequest, sizeof(__pyx_k_NameInfoRequest), 0, 0, 1, 1},
  142764. {&__pyx_kp_u_Neither_host_port_nor_sock_were, __pyx_k_Neither_host_port_nor_sock_were, sizeof(__pyx_k_Neither_host_port_nor_sock_were), 0, 1, 0, 0},
  142765. {&__pyx_kp_u_Non_thread_safe_operation_invoke, __pyx_k_Non_thread_safe_operation_invoke, sizeof(__pyx_k_Non_thread_safe_operation_invoke), 0, 1, 0, 0},
  142766. {&__pyx_n_s_NotImplementedError, __pyx_k_NotImplementedError, sizeof(__pyx_k_NotImplementedError), 0, 0, 1, 1},
  142767. {&__pyx_kp_u_Number_of_signals, __pyx_k_Number_of_signals, sizeof(__pyx_k_Number_of_signals), 0, 1, 0, 0},
  142768. {&__pyx_n_s_OSError, __pyx_k_OSError, sizeof(__pyx_k_OSError), 0, 0, 1, 1},
  142769. {&__pyx_n_s_O_RDWR, __pyx_k_O_RDWR, sizeof(__pyx_k_O_RDWR), 0, 0, 1, 1},
  142770. {&__pyx_kp_u_Object_created_at_most_recent_ca, __pyx_k_Object_created_at_most_recent_ca, sizeof(__pyx_k_Object_created_at_most_recent_ca), 0, 1, 0, 0},
  142771. {&__pyx_n_s_OrderedDict, __pyx_k_OrderedDict, sizeof(__pyx_k_OrderedDict), 0, 0, 1, 1},
  142772. {&__pyx_n_s_OverflowError, __pyx_k_OverflowError, sizeof(__pyx_k_OverflowError), 0, 0, 1, 1},
  142773. {&__pyx_n_s_PIPE, __pyx_k_PIPE, sizeof(__pyx_k_PIPE), 0, 0, 1, 1},
  142774. {&__pyx_n_u_PYTHONASYNCIODEBUG, __pyx_k_PYTHONASYNCIODEBUG, sizeof(__pyx_k_PYTHONASYNCIODEBUG), 0, 1, 0, 1},
  142775. {&__pyx_n_s_PermissionError, __pyx_k_PermissionError, sizeof(__pyx_k_PermissionError), 0, 0, 1, 1},
  142776. {&__pyx_n_s_PickleError, __pyx_k_PickleError, sizeof(__pyx_k_PickleError), 0, 0, 1, 1},
  142777. {&__pyx_kp_s_Pickling_of_struct_members_such, __pyx_k_Pickling_of_struct_members_such, sizeof(__pyx_k_Pickling_of_struct_members_such), 0, 0, 1, 0},
  142778. {&__pyx_n_s_PipeConnectRequest, __pyx_k_PipeConnectRequest, sizeof(__pyx_k_PipeConnectRequest), 0, 0, 1, 1},
  142779. {&__pyx_kp_u_Polls_debug_info, __pyx_k_Polls_debug_info, sizeof(__pyx_k_Polls_debug_info), 0, 1, 0, 0},
  142780. {&__pyx_n_s_ProcessLookupError, __pyx_k_ProcessLookupError, sizeof(__pyx_k_ProcessLookupError), 0, 0, 1, 1},
  142781. {&__pyx_kp_u_Process_info, __pyx_k_Process_info, sizeof(__pyx_k_Process_info), 0, 1, 0, 0},
  142782. {&__pyx_kp_u_Process_memory, __pyx_k_Process_memory, sizeof(__pyx_k_Process_memory), 0, 1, 0, 0},
  142783. {&__pyx_n_s_Protocol, __pyx_k_Protocol, sizeof(__pyx_k_Protocol), 0, 0, 1, 1},
  142784. {&__pyx_n_s_PseudoSocket, __pyx_k_PseudoSocket, sizeof(__pyx_k_PseudoSocket), 0, 0, 1, 1},
  142785. {&__pyx_n_s_Pyx_CFunc_object____Loop____bi, __pyx_k_Pyx_CFunc_object____Loop____bi, sizeof(__pyx_k_Pyx_CFunc_object____Loop____bi), 0, 0, 1, 1},
  142786. {&__pyx_kp_u_Racing_with_another_loop_to_spaw, __pyx_k_Racing_with_another_loop_to_spaw, sizeof(__pyx_k_Racing_with_another_loop_to_spaw), 0, 1, 0, 0},
  142787. {&__pyx_n_s_ReadSubprocessPipeProto, __pyx_k_ReadSubprocessPipeProto, sizeof(__pyx_k_ReadSubprocessPipeProto), 0, 0, 1, 1},
  142788. {&__pyx_n_s_ReadSubprocessPipeProto_data_rec, __pyx_k_ReadSubprocessPipeProto_data_rec, sizeof(__pyx_k_ReadSubprocessPipeProto_data_rec), 0, 0, 1, 1},
  142789. {&__pyx_n_s_ReadUnixTransport, __pyx_k_ReadUnixTransport, sizeof(__pyx_k_ReadUnixTransport), 0, 0, 1, 1},
  142790. {&__pyx_kp_u_Read_EOF_failed_callbacks, __pyx_k_Read_EOF_failed_callbacks, sizeof(__pyx_k_Read_EOF_failed_callbacks), 0, 1, 0, 0},
  142791. {&__pyx_kp_u_Read_EOFs, __pyx_k_Read_EOFs, sizeof(__pyx_k_Read_EOFs), 0, 1, 0, 0},
  142792. {&__pyx_kp_u_Read_callbacks, __pyx_k_Read_callbacks, sizeof(__pyx_k_Read_callbacks), 0, 1, 0, 0},
  142793. {&__pyx_kp_u_Read_callbacks_failed, __pyx_k_Read_callbacks_failed, sizeof(__pyx_k_Read_callbacks_failed), 0, 1, 0, 0},
  142794. {&__pyx_kp_u_Read_errors, __pyx_k_Read_errors, sizeof(__pyx_k_Read_errors), 0, 1, 0, 0},
  142795. {&__pyx_kp_u_Read_events, __pyx_k_Read_events, sizeof(__pyx_k_Read_events), 0, 1, 0, 0},
  142796. {&__pyx_kp_u_Read_failed_callbacks, __pyx_k_Read_failed_callbacks, sizeof(__pyx_k_Read_failed_callbacks), 0, 1, 0, 0},
  142797. {&__pyx_n_s_ResourceWarning, __pyx_k_ResourceWarning, sizeof(__pyx_k_ResourceWarning), 0, 0, 1, 1},
  142798. {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1},
  142799. {&__pyx_n_s_RuntimeWarning, __pyx_k_RuntimeWarning, sizeof(__pyx_k_RuntimeWarning), 0, 0, 1, 1},
  142800. {&__pyx_n_s_SIG_DFL, __pyx_k_SIG_DFL, sizeof(__pyx_k_SIG_DFL), 0, 0, 1, 1},
  142801. {&__pyx_n_u_SOCK_NONBLOCK, __pyx_k_SOCK_NONBLOCK, sizeof(__pyx_k_SOCK_NONBLOCK), 0, 1, 0, 1},
  142802. {&__pyx_n_u_SO_BROADCAST, __pyx_k_SO_BROADCAST, sizeof(__pyx_k_SO_BROADCAST), 0, 1, 0, 1},
  142803. {&__pyx_n_u_SO_REUSEPORT, __pyx_k_SO_REUSEPORT, sizeof(__pyx_k_SO_REUSEPORT), 0, 1, 0, 1},
  142804. {&__pyx_n_s_SSLContext, __pyx_k_SSLContext, sizeof(__pyx_k_SSLContext), 0, 0, 1, 1},
  142805. {&__pyx_n_s_SSLError, __pyx_k_SSLError, sizeof(__pyx_k_SSLError), 0, 0, 1, 1},
  142806. {&__pyx_n_s_SSLProtocol, __pyx_k_SSLProtocol, sizeof(__pyx_k_SSLProtocol), 0, 0, 1, 1},
  142807. {&__pyx_n_s_SSLProtocolTransport, __pyx_k_SSLProtocolTransport, sizeof(__pyx_k_SSLProtocolTransport), 0, 0, 1, 1},
  142808. {&__pyx_n_s_SSLProtocol__do_read__buffered_l, __pyx_k_SSLProtocol__do_read__buffered_l, sizeof(__pyx_k_SSLProtocol__do_read__buffered_l), 0, 0, 1, 1},
  142809. {&__pyx_n_s_SSLProtocol__resume_reading_loca, __pyx_k_SSLProtocol__resume_reading_loca, sizeof(__pyx_k_SSLProtocol__resume_reading_loca), 0, 0, 1, 1},
  142810. {&__pyx_n_s_SSLProtocol__start_handshake_loc, __pyx_k_SSLProtocol__start_handshake_loc, sizeof(__pyx_k_SSLProtocol__start_handshake_loc), 0, 0, 1, 1},
  142811. {&__pyx_n_s_SSLProtocol__start_shutdown_loca, __pyx_k_SSLProtocol__start_shutdown_loca, sizeof(__pyx_k_SSLProtocol__start_shutdown_loca), 0, 0, 1, 1},
  142812. {&__pyx_n_s_SSLSyscallError, __pyx_k_SSLSyscallError, sizeof(__pyx_k_SSLSyscallError), 0, 0, 1, 1},
  142813. {&__pyx_n_s_SSLWantReadError, __pyx_k_SSLWantReadError, sizeof(__pyx_k_SSLWantReadError), 0, 0, 1, 1},
  142814. {&__pyx_n_s_SSL_ERROR_SYSCALL, __pyx_k_SSL_ERROR_SYSCALL, sizeof(__pyx_k_SSL_ERROR_SYSCALL), 0, 0, 1, 1},
  142815. {&__pyx_n_s_SSL_ERROR_WANT_READ, __pyx_k_SSL_ERROR_WANT_READ, sizeof(__pyx_k_SSL_ERROR_WANT_READ), 0, 0, 1, 1},
  142816. {&__pyx_n_s_SSL_ERROR_WANT_WRITE, __pyx_k_SSL_ERROR_WANT_WRITE, sizeof(__pyx_k_SSL_ERROR_WANT_WRITE), 0, 0, 1, 1},
  142817. {&__pyx_kp_u_SSL_connection_is_closed, __pyx_k_SSL_connection_is_closed, sizeof(__pyx_k_SSL_connection_is_closed), 0, 1, 0, 0},
  142818. {&__pyx_kp_u_SSL_handshake_failed, __pyx_k_SSL_handshake_failed, sizeof(__pyx_k_SSL_handshake_failed), 0, 1, 0, 0},
  142819. {&__pyx_kp_u_SSL_handshake_failed_on_verifyin, __pyx_k_SSL_handshake_failed_on_verifyin, sizeof(__pyx_k_SSL_handshake_failed_on_verifyin), 0, 1, 0, 0},
  142820. {&__pyx_kp_u_SSL_handshake_is_taking_longer_t, __pyx_k_SSL_handshake_is_taking_longer_t, sizeof(__pyx_k_SSL_handshake_is_taking_longer_t), 0, 1, 0, 0},
  142821. {&__pyx_kp_u_SSL_shutdown_timed_out, __pyx_k_SSL_shutdown_timed_out, sizeof(__pyx_k_SSL_shutdown_timed_out), 0, 1, 0, 0},
  142822. {&__pyx_n_s_STDOUT, __pyx_k_STDOUT, sizeof(__pyx_k_STDOUT), 0, 0, 1, 1},
  142823. {&__pyx_n_s_S_ISSOCK, __pyx_k_S_ISSOCK, sizeof(__pyx_k_S_ISSOCK), 0, 0, 1, 1},
  142824. {&__pyx_n_s_Server, __pyx_k_Server, sizeof(__pyx_k_Server), 0, 0, 1, 1},
  142825. {&__pyx_n_s_Server___aenter, __pyx_k_Server___aenter, sizeof(__pyx_k_Server___aenter), 0, 0, 1, 1},
  142826. {&__pyx_n_s_Server___aexit, __pyx_k_Server___aexit, sizeof(__pyx_k_Server___aexit), 0, 0, 1, 1},
  142827. {&__pyx_n_s_Server_serve_forever, __pyx_k_Server_serve_forever, sizeof(__pyx_k_Server_serve_forever), 0, 0, 1, 1},
  142828. {&__pyx_kp_u_Server_side_SSL_needs_a_valid_SS, __pyx_k_Server_side_SSL_needs_a_valid_SS, sizeof(__pyx_k_Server_side_SSL_needs_a_valid_SS), 0, 1, 0, 0},
  142829. {&__pyx_n_s_Server_start_serving, __pyx_k_Server_start_serving, sizeof(__pyx_k_Server_start_serving), 0, 0, 1, 1},
  142830. {&__pyx_n_s_Server_wait_closed, __pyx_k_Server_wait_closed, sizeof(__pyx_k_Server_wait_closed), 0, 0, 1, 1},
  142831. {&__pyx_kp_u_Shutdown_errors, __pyx_k_Shutdown_errors, sizeof(__pyx_k_Shutdown_errors), 0, 1, 0, 0},
  142832. {&__pyx_n_s_SockAddrHolder, __pyx_k_SockAddrHolder, sizeof(__pyx_k_SockAddrHolder), 0, 0, 1, 1},
  142833. {&__pyx_kp_u_Sock_ops_successful_on_1st_try, __pyx_k_Sock_ops_successful_on_1st_try, sizeof(__pyx_k_Sock_ops_successful_on_1st_try), 0, 1, 0, 0},
  142834. {&__pyx_n_s_SocketKind, __pyx_k_SocketKind, sizeof(__pyx_k_SocketKind), 0, 0, 1, 1},
  142835. {&__pyx_kp_u_Socket_try_writes, __pyx_k_Socket_try_writes, sizeof(__pyx_k_Socket_try_writes), 0, 1, 0, 0},
  142836. {&__pyx_n_s_StackSummary, __pyx_k_StackSummary, sizeof(__pyx_k_StackSummary), 0, 0, 1, 1},
  142837. {&__pyx_n_s_StreamWriteContext, __pyx_k_StreamWriteContext, sizeof(__pyx_k_StreamWriteContext), 0, 0, 1, 1},
  142838. {&__pyx_kp_u_StreamWriteContext_close_py_buf, __pyx_k_StreamWriteContext_close_py_buf, sizeof(__pyx_k_StreamWriteContext_close_py_buf), 0, 1, 0, 0},
  142839. {&__pyx_kp_u_StreamWriteContext_close_uv_buf, __pyx_k_StreamWriteContext_close_uv_buf, sizeof(__pyx_k_StreamWriteContext_close_uv_buf), 0, 1, 0, 0},
  142840. {&__pyx_kp_u_Streams_debug_info, __pyx_k_Streams_debug_info, sizeof(__pyx_k_Streams_debug_info), 0, 1, 0, 0},
  142841. {&__pyx_n_s_SubprocessError, __pyx_k_SubprocessError, sizeof(__pyx_k_SubprocessError), 0, 0, 1, 1},
  142842. {&__pyx_n_s_SyncSocketReaderFuture, __pyx_k_SyncSocketReaderFuture, sizeof(__pyx_k_SyncSocketReaderFuture), 0, 0, 1, 1},
  142843. {&__pyx_n_s_SyncSocketReaderFuture___init, __pyx_k_SyncSocketReaderFuture___init, sizeof(__pyx_k_SyncSocketReaderFuture___init), 0, 0, 1, 1},
  142844. {&__pyx_n_s_SyncSocketReaderFuture__loop, __pyx_k_SyncSocketReaderFuture__loop, sizeof(__pyx_k_SyncSocketReaderFuture__loop), 0, 0, 1, 1},
  142845. {&__pyx_n_s_SyncSocketReaderFuture__sock, __pyx_k_SyncSocketReaderFuture__sock, sizeof(__pyx_k_SyncSocketReaderFuture__sock), 0, 0, 1, 1},
  142846. {&__pyx_n_s_SyncSocketReaderFuture_cancel, __pyx_k_SyncSocketReaderFuture_cancel, sizeof(__pyx_k_SyncSocketReaderFuture_cancel), 0, 0, 1, 1},
  142847. {&__pyx_n_s_SyncSocketWriterFuture, __pyx_k_SyncSocketWriterFuture, sizeof(__pyx_k_SyncSocketWriterFuture), 0, 0, 1, 1},
  142848. {&__pyx_n_s_SyncSocketWriterFuture___init, __pyx_k_SyncSocketWriterFuture___init, sizeof(__pyx_k_SyncSocketWriterFuture___init), 0, 0, 1, 1},
  142849. {&__pyx_n_s_SyncSocketWriterFuture__loop, __pyx_k_SyncSocketWriterFuture__loop, sizeof(__pyx_k_SyncSocketWriterFuture__loop), 0, 0, 1, 1},
  142850. {&__pyx_n_s_SyncSocketWriterFuture__sock, __pyx_k_SyncSocketWriterFuture__sock, sizeof(__pyx_k_SyncSocketWriterFuture__sock), 0, 0, 1, 1},
  142851. {&__pyx_n_s_SyncSocketWriterFuture_cancel, __pyx_k_SyncSocketWriterFuture_cancel, sizeof(__pyx_k_SyncSocketWriterFuture_cancel), 0, 0, 1, 1},
  142852. {&__pyx_n_s_TCPConnectRequest, __pyx_k_TCPConnectRequest, sizeof(__pyx_k_TCPConnectRequest), 0, 0, 1, 1},
  142853. {&__pyx_n_s_TCPServer, __pyx_k_TCPServer, sizeof(__pyx_k_TCPServer), 0, 0, 1, 1},
  142854. {&__pyx_n_s_TCPTransport, __pyx_k_TCPTransport, sizeof(__pyx_k_TCPTransport), 0, 0, 1, 1},
  142855. {&__pyx_n_s_Task, __pyx_k_Task, sizeof(__pyx_k_Task), 0, 0, 1, 1},
  142856. {&__pyx_n_s_ThreadPoolExecutor, __pyx_k_ThreadPoolExecutor, sizeof(__pyx_k_ThreadPoolExecutor), 0, 0, 1, 1},
  142857. {&__pyx_n_s_TimeoutError, __pyx_k_TimeoutError, sizeof(__pyx_k_TimeoutError), 0, 0, 1, 1},
  142858. {&__pyx_n_s_TimerHandle, __pyx_k_TimerHandle, sizeof(__pyx_k_TimerHandle), 0, 0, 1, 1},
  142859. {&__pyx_kp_u_Timer_handles_8, __pyx_k_Timer_handles_8, sizeof(__pyx_k_Timer_handles_8), 0, 1, 0, 0},
  142860. {&__pyx_n_s_Transport, __pyx_k_Transport, sizeof(__pyx_k_Transport), 0, 0, 1, 1},
  142861. {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
  142862. {&__pyx_n_s_UDPSendContext, __pyx_k_UDPSendContext, sizeof(__pyx_k_UDPSendContext), 0, 0, 1, 1},
  142863. {&__pyx_n_s_UDPTransport, __pyx_k_UDPTransport, sizeof(__pyx_k_UDPTransport), 0, 0, 1, 1},
  142864. {&__pyx_kp_u_UDPTransport_family_is_undefined, __pyx_k_UDPTransport_family_is_undefined, sizeof(__pyx_k_UDPTransport_family_is_undefined), 0, 1, 0, 0},
  142865. {&__pyx_kp_u_UDPTransport_family_is_undefined_2, __pyx_k_UDPTransport_family_is_undefined_2, sizeof(__pyx_k_UDPTransport_family_is_undefined_2), 0, 1, 0, 0},
  142866. {&__pyx_n_s_UVAsync, __pyx_k_UVAsync, sizeof(__pyx_k_UVAsync), 0, 0, 1, 1},
  142867. {&__pyx_n_s_UVBaseTransport, __pyx_k_UVBaseTransport, sizeof(__pyx_k_UVBaseTransport), 0, 0, 1, 1},
  142868. {&__pyx_n_s_UVCheck, __pyx_k_UVCheck, sizeof(__pyx_k_UVCheck), 0, 0, 1, 1},
  142869. {&__pyx_n_s_UVHandle, __pyx_k_UVHandle, sizeof(__pyx_k_UVHandle), 0, 0, 1, 1},
  142870. {&__pyx_kp_u_UVHandles_python_libuv_total, __pyx_k_UVHandles_python_libuv_total, sizeof(__pyx_k_UVHandles_python_libuv_total), 0, 1, 0, 0},
  142871. {&__pyx_n_s_UVIdle, __pyx_k_UVIdle, sizeof(__pyx_k_UVIdle), 0, 0, 1, 1},
  142872. {&__pyx_n_s_UVPoll, __pyx_k_UVPoll, sizeof(__pyx_k_UVPoll), 0, 0, 1, 1},
  142873. {&__pyx_n_s_UVProcess, __pyx_k_UVProcess, sizeof(__pyx_k_UVProcess), 0, 0, 1, 1},
  142874. {&__pyx_n_s_UVProcessTransport, __pyx_k_UVProcessTransport, sizeof(__pyx_k_UVProcessTransport), 0, 0, 1, 1},
  142875. {&__pyx_kp_u_UVProcessTransport__call_connect, __pyx_k_UVProcessTransport__call_connect, sizeof(__pyx_k_UVProcessTransport__call_connect), 0, 1, 0, 0},
  142876. {&__pyx_kp_u_UVProcess__close_after_spawn_cal, __pyx_k_UVProcess__close_after_spawn_cal, sizeof(__pyx_k_UVProcess__close_after_spawn_cal), 0, 1, 0, 0},
  142877. {&__pyx_n_s_UVRequest, __pyx_k_UVRequest, sizeof(__pyx_k_UVRequest), 0, 0, 1, 1},
  142878. {&__pyx_n_s_UVSocketHandle, __pyx_k_UVSocketHandle, sizeof(__pyx_k_UVSocketHandle), 0, 0, 1, 1},
  142879. {&__pyx_n_s_UVStream, __pyx_k_UVStream, sizeof(__pyx_k_UVStream), 0, 0, 1, 1},
  142880. {&__pyx_n_s_UVStreamServer, __pyx_k_UVStreamServer, sizeof(__pyx_k_UVStreamServer), 0, 0, 1, 1},
  142881. {&__pyx_kp_u_UVStream__try_write_called_with, __pyx_k_UVStream__try_write_called_with, sizeof(__pyx_k_UVStream__try_write_called_with), 0, 1, 0, 0},
  142882. {&__pyx_kp_u_UVStream_shutdown_callback_calle, __pyx_k_UVStream_shutdown_callback_calle, sizeof(__pyx_k_UVStream_shutdown_callback_calle), 0, 1, 0, 0},
  142883. {&__pyx_kp_u_UVStream_write_callback_called_w, __pyx_k_UVStream_write_callback_called_w, sizeof(__pyx_k_UVStream_write_callback_called_w), 0, 1, 0, 0},
  142884. {&__pyx_n_s_UVTimer, __pyx_k_UVTimer, sizeof(__pyx_k_UVTimer), 0, 0, 1, 1},
  142885. {&__pyx_kp_u_UVTransport__call_connection_los, __pyx_k_UVTransport__call_connection_los, sizeof(__pyx_k_UVTransport__call_connection_los), 0, 1, 0, 0},
  142886. {&__pyx_kp_u_UVTransport__call_connection_mad, __pyx_k_UVTransport__call_connection_mad, sizeof(__pyx_k_UVTransport__call_connection_mad), 0, 1, 0, 0},
  142887. {&__pyx_kp_u_Unable_to_check_or_remove_stale, __pyx_k_Unable_to_check_or_remove_stale, sizeof(__pyx_k_Unable_to_check_or_remove_stale), 0, 1, 0, 0},
  142888. {&__pyx_kp_u_Unhandled_error_in_exception_han, __pyx_k_Unhandled_error_in_exception_han, sizeof(__pyx_k_Unhandled_error_in_exception_han), 0, 1, 0, 0},
  142889. {&__pyx_kp_u_Unhandled_exception_in_event_loo, __pyx_k_Unhandled_exception_in_event_loo, sizeof(__pyx_k_Unhandled_exception_in_event_loo), 0, 1, 0, 0},
  142890. {&__pyx_n_s_UnicodeEncodeError, __pyx_k_UnicodeEncodeError, sizeof(__pyx_k_UnicodeEncodeError), 0, 0, 1, 1},
  142891. {&__pyx_n_s_UnixServer, __pyx_k_UnixServer, sizeof(__pyx_k_UnixServer), 0, 0, 1, 1},
  142892. {&__pyx_n_s_UnixTransport, __pyx_k_UnixTransport, sizeof(__pyx_k_UnixTransport), 0, 0, 1, 1},
  142893. {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
  142894. {&__pyx_n_s_WeakSet, __pyx_k_WeakSet, sizeof(__pyx_k_WeakSet), 0, 0, 1, 1},
  142895. {&__pyx_n_s_WeakValueDictionary, __pyx_k_WeakValueDictionary, sizeof(__pyx_k_WeakValueDictionary), 0, 0, 1, 1},
  142896. {&__pyx_n_s_WriteSubprocessPipeProto, __pyx_k_WriteSubprocessPipeProto, sizeof(__pyx_k_WriteSubprocessPipeProto), 0, 0, 1, 1},
  142897. {&__pyx_n_s_WriteSubprocessPipeProto___init, __pyx_k_WriteSubprocessPipeProto___init, sizeof(__pyx_k_WriteSubprocessPipeProto___init), 0, 0, 1, 1},
  142898. {&__pyx_n_s_WriteSubprocessPipeProto___repr, __pyx_k_WriteSubprocessPipeProto___repr, sizeof(__pyx_k_WriteSubprocessPipeProto___repr), 0, 0, 1, 1},
  142899. {&__pyx_n_s_WriteSubprocessPipeProto_connect, __pyx_k_WriteSubprocessPipeProto_connect, sizeof(__pyx_k_WriteSubprocessPipeProto_connect), 0, 0, 1, 1},
  142900. {&__pyx_n_s_WriteSubprocessPipeProto_connect_2, __pyx_k_WriteSubprocessPipeProto_connect_2, sizeof(__pyx_k_WriteSubprocessPipeProto_connect_2), 0, 0, 1, 1},
  142901. {&__pyx_n_s_WriteSubprocessPipeProto_pause_w, __pyx_k_WriteSubprocessPipeProto_pause_w, sizeof(__pyx_k_WriteSubprocessPipeProto_pause_w), 0, 0, 1, 1},
  142902. {&__pyx_n_s_WriteSubprocessPipeProto_resume, __pyx_k_WriteSubprocessPipeProto_resume, sizeof(__pyx_k_WriteSubprocessPipeProto_resume), 0, 0, 1, 1},
  142903. {&__pyx_n_s_WriteUnixTransport, __pyx_k_WriteUnixTransport, sizeof(__pyx_k_WriteUnixTransport), 0, 0, 1, 1},
  142904. {&__pyx_kp_u_Write_callbacks_failed, __pyx_k_Write_callbacks_failed, sizeof(__pyx_k_Write_callbacks_failed), 0, 1, 0, 0},
  142905. {&__pyx_kp_u_Write_contexts_8, __pyx_k_Write_contexts_8, sizeof(__pyx_k_Write_contexts_8), 0, 1, 0, 0},
  142906. {&__pyx_kp_u_Write_errors, __pyx_k_Write_errors, sizeof(__pyx_k_Write_errors), 0, 1, 0, 0},
  142907. {&__pyx_kp_u_Write_events, __pyx_k_Write_events, sizeof(__pyx_k_Write_events), 0, 1, 0, 0},
  142908. {&__pyx_kp_u_Write_failed_callbacks, __pyx_k_Write_failed_callbacks, sizeof(__pyx_k_Write_failed_callbacks), 0, 1, 0, 0},
  142909. {&__pyx_kp_u_Write_without_poll, __pyx_k_Write_without_poll, sizeof(__pyx_k_Write_without_poll), 0, 1, 0, 0},
  142910. {&__pyx_kp_u_XXX_an_allocated_buffer_in_trans, __pyx_k_XXX_an_allocated_buffer_in_trans, sizeof(__pyx_k_XXX_an_allocated_buffer_in_trans), 0, 1, 0, 0},
  142911. {&__pyx_kp_u_You_must_set_server_hostname_whe, __pyx_k_You_must_set_server_hostname_whe, sizeof(__pyx_k_You_must_set_server_hostname_whe), 0, 1, 0, 0},
  142912. {&__pyx_kp_u__118, __pyx_k__118, sizeof(__pyx_k__118), 0, 1, 0, 0},
  142913. {&__pyx_kp_u__119, __pyx_k__119, sizeof(__pyx_k__119), 0, 1, 0, 0},
  142914. {&__pyx_kp_b__163, __pyx_k__163, sizeof(__pyx_k__163), 0, 0, 0, 0},
  142915. {&__pyx_kp_b__172, __pyx_k__172, sizeof(__pyx_k__172), 0, 0, 0, 0},
  142916. {&__pyx_n_s__2, __pyx_k__2, sizeof(__pyx_k__2), 0, 0, 1, 1},
  142917. {&__pyx_kp_b__2, __pyx_k__2, sizeof(__pyx_k__2), 0, 0, 0, 0},
  142918. {&__pyx_kp_u__2, __pyx_k__2, sizeof(__pyx_k__2), 0, 1, 0, 0},
  142919. {&__pyx_kp_u__25, __pyx_k__25, sizeof(__pyx_k__25), 0, 1, 0, 0},
  142920. {&__pyx_kp_u__46, __pyx_k__46, sizeof(__pyx_k__46), 0, 1, 0, 0},
  142921. {&__pyx_kp_u__53, __pyx_k__53, sizeof(__pyx_k__53), 0, 1, 0, 0},
  142922. {&__pyx_kp_u__58, __pyx_k__58, sizeof(__pyx_k__58), 0, 1, 0, 0},
  142923. {&__pyx_kp_u__59, __pyx_k__59, sizeof(__pyx_k__59), 0, 1, 0, 0},
  142924. {&__pyx_kp_u__78, __pyx_k__78, sizeof(__pyx_k__78), 0, 1, 0, 0},
  142925. {&__pyx_kp_u__88, __pyx_k__88, sizeof(__pyx_k__88), 0, 1, 0, 0},
  142926. {&__pyx_kp_u__89, __pyx_k__89, sizeof(__pyx_k__89), 0, 1, 0, 0},
  142927. {&__pyx_kp_u__90, __pyx_k__90, sizeof(__pyx_k__90), 0, 1, 0, 0},
  142928. {&__pyx_n_s_abc, __pyx_k_abc, sizeof(__pyx_k_abc), 0, 0, 1, 1},
  142929. {&__pyx_kp_u_abort_init__closed_is_set, __pyx_k_abort_init__closed_is_set, sizeof(__pyx_k_abort_init__closed_is_set), 0, 1, 0, 0},
  142930. {&__pyx_kp_u_abort_init__inited_is_set, __pyx_k_abort_init__inited_is_set, sizeof(__pyx_k_abort_init__inited_is_set), 0, 1, 0, 0},
  142931. {&__pyx_n_s_accept, __pyx_k_accept, sizeof(__pyx_k_accept), 0, 0, 1, 1},
  142932. {&__pyx_kp_u_accept_method, __pyx_k_accept_method, sizeof(__pyx_k_accept_method), 0, 1, 0, 0},
  142933. {&__pyx_n_s_aclose, __pyx_k_aclose, sizeof(__pyx_k_aclose), 0, 0, 1, 1},
  142934. {&__pyx_kp_u_active_TimerHandle_is_deallacati, __pyx_k_active_TimerHandle_is_deallacati, sizeof(__pyx_k_active_TimerHandle_is_deallacati), 0, 1, 0, 0},
  142935. {&__pyx_n_s_add, __pyx_k_add, sizeof(__pyx_k_add), 0, 0, 1, 1},
  142936. {&__pyx_n_s_add_done_callback, __pyx_k_add_done_callback, sizeof(__pyx_k_add_done_callback), 0, 0, 1, 1},
  142937. {&__pyx_n_s_addr, __pyx_k_addr, sizeof(__pyx_k_addr), 0, 0, 1, 1},
  142938. {&__pyx_n_s_address, __pyx_k_address, sizeof(__pyx_k_address), 0, 0, 1, 1},
  142939. {&__pyx_n_s_aenter, __pyx_k_aenter, sizeof(__pyx_k_aenter), 0, 0, 1, 1},
  142940. {&__pyx_n_s_aexit, __pyx_k_aexit, sizeof(__pyx_k_aexit), 0, 0, 1, 1},
  142941. {&__pyx_kp_u_alive_closed, __pyx_k_alive_closed, sizeof(__pyx_k_alive_closed), 0, 1, 0, 0},
  142942. {&__pyx_kp_u_all_args_must_be_str_or_bytes, __pyx_k_all_args_must_be_str_or_bytes, sizeof(__pyx_k_all_args_must_be_str_or_bytes), 0, 1, 0, 0},
  142943. {&__pyx_kp_u_all_environment_values_must_be_b, __pyx_k_all_environment_values_must_be_b, sizeof(__pyx_k_all_environment_values_must_be_b), 0, 1, 0, 0},
  142944. {&__pyx_kp_u_all_environment_vars_must_be_byt, __pyx_k_all_environment_vars_must_be_byt, sizeof(__pyx_k_all_environment_vars_must_be_byt), 0, 1, 0, 0},
  142945. {&__pyx_n_s_allow_broadcast, __pyx_k_allow_broadcast, sizeof(__pyx_k_allow_broadcast), 0, 0, 1, 1},
  142946. {&__pyx_kp_u_an_error_occurred_during_closing, __pyx_k_an_error_occurred_during_closing, sizeof(__pyx_k_an_error_occurred_during_closing), 0, 1, 0, 0},
  142947. {&__pyx_n_s_app_protocol, __pyx_k_app_protocol, sizeof(__pyx_k_app_protocol), 0, 0, 1, 1},
  142948. {&__pyx_n_s_append, __pyx_k_append, sizeof(__pyx_k_append), 0, 0, 1, 1},
  142949. {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1},
  142950. {&__pyx_n_u_ascii, __pyx_k_ascii, sizeof(__pyx_k_ascii), 0, 1, 0, 1},
  142951. {&__pyx_n_u_asyncgen, __pyx_k_asyncgen, sizeof(__pyx_k_asyncgen), 0, 1, 0, 1},
  142952. {&__pyx_n_s_asyncgen_finalizer_hook, __pyx_k_asyncgen_finalizer_hook, sizeof(__pyx_k_asyncgen_finalizer_hook), 0, 0, 1, 1},
  142953. {&__pyx_n_s_asyncgen_firstiter_hook, __pyx_k_asyncgen_firstiter_hook, sizeof(__pyx_k_asyncgen_firstiter_hook), 0, 0, 1, 1},
  142954. {&__pyx_kp_u_asynchronous_generator_r_was_sch, __pyx_k_asynchronous_generator_r_was_sch, sizeof(__pyx_k_asynchronous_generator_r_was_sch), 0, 1, 0, 0},
  142955. {&__pyx_n_s_asyncio, __pyx_k_asyncio, sizeof(__pyx_k_asyncio), 0, 0, 1, 1},
  142956. {&__pyx_n_s_asyncio_base_events, __pyx_k_asyncio_base_events, sizeof(__pyx_k_asyncio_base_events), 0, 0, 1, 1},
  142957. {&__pyx_n_s_asyncio_coroutines, __pyx_k_asyncio_coroutines, sizeof(__pyx_k_asyncio_coroutines), 0, 0, 1, 1},
  142958. {&__pyx_n_s_asyncio_futures, __pyx_k_asyncio_futures, sizeof(__pyx_k_asyncio_futures), 0, 0, 1, 1},
  142959. {&__pyx_kp_u_asyncio_is_trying_to_install_it, __pyx_k_asyncio_is_trying_to_install_it, sizeof(__pyx_k_asyncio_is_trying_to_install_it), 0, 1, 0, 0},
  142960. {&__pyx_n_s_asyncio_log, __pyx_k_asyncio_log, sizeof(__pyx_k_asyncio_log), 0, 0, 1, 1},
  142961. {&__pyx_n_s_asyncio_sslproto, __pyx_k_asyncio_sslproto, sizeof(__pyx_k_asyncio_sslproto), 0, 0, 1, 1},
  142962. {&__pyx_n_s_asyncio_tasks, __pyx_k_asyncio_tasks, sizeof(__pyx_k_asyncio_tasks), 0, 0, 1, 1},
  142963. {&__pyx_n_s_asyncio_transports, __pyx_k_asyncio_transports, sizeof(__pyx_k_asyncio_transports), 0, 0, 1, 1},
  142964. {&__pyx_n_s_await, __pyx_k_await, sizeof(__pyx_k_await), 0, 0, 1, 1},
  142965. {&__pyx_n_u_b, __pyx_k_b, sizeof(__pyx_k_b), 0, 1, 0, 1},
  142966. {&__pyx_n_s_backlog, __pyx_k_backlog, sizeof(__pyx_k_backlog), 0, 0, 1, 1},
  142967. {&__pyx_kp_b_bin_sh, __pyx_k_bin_sh, sizeof(__pyx_k_bin_sh), 0, 0, 0, 0},
  142968. {&__pyx_n_s_bind, __pyx_k_bind, sizeof(__pyx_k_bind), 0, 0, 1, 1},
  142969. {&__pyx_kp_u_bind_method, __pyx_k_bind_method, sizeof(__pyx_k_bind_method), 0, 1, 0, 0},
  142970. {&__pyx_n_s_buf, __pyx_k_buf, sizeof(__pyx_k_buf), 0, 0, 1, 1},
  142971. {&__pyx_kp_u_buffer_size_is_not_0_after_a_su, __pyx_k_buffer_size_is_not_0_after_a_su, sizeof(__pyx_k_buffer_size_is_not_0_after_a_su), 0, 1, 0, 0},
  142972. {&__pyx_n_s_buffer_updated, __pyx_k_buffer_updated, sizeof(__pyx_k_buffer_updated), 0, 0, 1, 1},
  142973. {&__pyx_n_s_bufsize, __pyx_k_bufsize, sizeof(__pyx_k_bufsize), 0, 0, 1, 1},
  142974. {&__pyx_kp_u_bufsize_must_be_0, __pyx_k_bufsize_must_be_0, sizeof(__pyx_k_bufsize_must_be_0), 0, 1, 0, 0},
  142975. {&__pyx_n_s_builtins, __pyx_k_builtins, sizeof(__pyx_k_builtins), 0, 0, 1, 1},
  142976. {&__pyx_kp_b_c, __pyx_k_c, sizeof(__pyx_k_c), 0, 0, 0, 0},
  142977. {&__pyx_n_s_call_connection_made, __pyx_k_call_connection_made, sizeof(__pyx_k_call_connection_made), 0, 0, 1, 1},
  142978. {&__pyx_n_s_call_exception_handler, __pyx_k_call_exception_handler, sizeof(__pyx_k_call_exception_handler), 0, 0, 1, 1},
  142979. {&__pyx_n_s_call_later, __pyx_k_call_later, sizeof(__pyx_k_call_later), 0, 0, 1, 1},
  142980. {&__pyx_n_s_call_soon, __pyx_k_call_soon, sizeof(__pyx_k_call_soon), 0, 0, 1, 1},
  142981. {&__pyx_n_s_call_soon_threadsafe, __pyx_k_call_soon_threadsafe, sizeof(__pyx_k_call_soon_threadsafe), 0, 0, 1, 1},
  142982. {&__pyx_n_s_callback, __pyx_k_callback, sizeof(__pyx_k_callback), 0, 0, 1, 1},
  142983. {&__pyx_kp_u_called_after_destroying_the_UVH, __pyx_k_called_after_destroying_the_UVH, sizeof(__pyx_k_called_after_destroying_the_UVH), 0, 1, 0, 0},
  142984. {&__pyx_kp_u_called_with_handle_data_NULL, __pyx_k_called_with_handle_data_NULL, sizeof(__pyx_k_called_with_handle_data_NULL), 0, 1, 0, 0},
  142985. {&__pyx_n_s_cancel, __pyx_k_cancel, sizeof(__pyx_k_cancel), 0, 0, 1, 1},
  142986. {&__pyx_kp_u_cancel_request_data_is_NULL, __pyx_k_cancel_request_data_is_NULL, sizeof(__pyx_k_cancel_request_data_is_NULL), 0, 1, 0, 0},
  142987. {&__pyx_kp_u_cancel_request_data_is_not_UVRe, __pyx_k_cancel_request_data_is_not_UVRe, sizeof(__pyx_k_cancel_request_data_is_not_UVRe), 0, 1, 0, 0},
  142988. {&__pyx_kp_u_cancel_request_is_NULL, __pyx_k_cancel_request_is_NULL, sizeof(__pyx_k_cancel_request_is_NULL), 0, 1, 0, 0},
  142989. {&__pyx_n_s_cancelled, __pyx_k_cancelled, sizeof(__pyx_k_cancelled), 0, 0, 1, 1},
  142990. {&__pyx_n_u_cancelled, __pyx_k_cancelled, sizeof(__pyx_k_cancelled), 0, 1, 0, 1},
  142991. {&__pyx_kp_u_cannot_add_a_signal_handler_for, __pyx_k_cannot_add_a_signal_handler_for, sizeof(__pyx_k_cannot_add_a_signal_handler_for), 0, 1, 0, 0},
  142992. {&__pyx_kp_u_cannot_apply_subprocess_STDOUT, __pyx_k_cannot_apply_subprocess_STDOUT, sizeof(__pyx_k_cannot_apply_subprocess_STDOUT), 0, 1, 0, 0},
  142993. {&__pyx_kp_u_cannot_convert_sockaddr_into_Pyt, __pyx_k_cannot_convert_sockaddr_into_Pyt, sizeof(__pyx_k_cannot_convert_sockaddr_into_Pyt), 0, 1, 0, 0},
  142994. {&__pyx_kp_u_cannot_open_a_UDP_handle_invalid, __pyx_k_cannot_open_a_UDP_handle_invalid, sizeof(__pyx_k_cannot_open_a_UDP_handle_invalid), 0, 1, 0, 0},
  142995. {&__pyx_kp_u_cannot_run_Handle_callback_is_no, __pyx_k_cannot_run_Handle_callback_is_no, sizeof(__pyx_k_cannot_run_Handle_callback_is_no), 0, 1, 0, 0},
  142996. {&__pyx_kp_u_cannot_run_TimerHandle_callback, __pyx_k_cannot_run_TimerHandle_callback, sizeof(__pyx_k_cannot_run_TimerHandle_callback), 0, 1, 0, 0},
  142997. {&__pyx_kp_u_cannot_spawn_a_process_args_are, __pyx_k_cannot_spawn_a_process_args_are, sizeof(__pyx_k_cannot_spawn_a_process_args_are), 0, 1, 0, 0},
  142998. {&__pyx_kp_u_cannot_switch_state_from_to, __pyx_k_cannot_switch_state_from_to, sizeof(__pyx_k_cannot_switch_state_from_to), 0, 1, 0, 0},
  142999. {&__pyx_n_s_cast, __pyx_k_cast, sizeof(__pyx_k_cast), 0, 0, 1, 1},
  143000. {&__pyx_n_s_cause, __pyx_k_cause, sizeof(__pyx_k_cause), 0, 0, 1, 1},
  143001. {&__pyx_n_s_cfunc_to_py, __pyx_k_cfunc_to_py, sizeof(__pyx_k_cfunc_to_py), 0, 0, 1, 1},
  143002. {&__pyx_n_s_chain, __pyx_k_chain, sizeof(__pyx_k_chain), 0, 0, 1, 1},
  143003. {&__pyx_n_s_check_hostname, __pyx_k_check_hostname, sizeof(__pyx_k_check_hostname), 0, 0, 1, 1},
  143004. {&__pyx_n_s_cipher, __pyx_k_cipher, sizeof(__pyx_k_cipher), 0, 0, 1, 1},
  143005. {&__pyx_n_s_class, __pyx_k_class, sizeof(__pyx_k_class), 0, 0, 1, 1},
  143006. {&__pyx_n_s_clear, __pyx_k_clear, sizeof(__pyx_k_clear), 0, 0, 1, 1},
  143007. {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
  143008. {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1},
  143009. {&__pyx_kp_u_close__handle_data_is_NULL, __pyx_k_close__handle_data_is_NULL, sizeof(__pyx_k_close__handle_data_is_NULL), 0, 1, 0, 0},
  143010. {&__pyx_kp_u_close__handle_data_is_not_UVHa, __pyx_k_close__handle_data_is_not_UVHa, sizeof(__pyx_k_close__handle_data_is_not_UVHa), 0, 1, 0, 0},
  143011. {&__pyx_n_s_close_fds, __pyx_k_close_fds, sizeof(__pyx_k_close_fds), 0, 0, 1, 1},
  143012. {&__pyx_kp_u_close_method, __pyx_k_close_method, sizeof(__pyx_k_close_method), 0, 1, 0, 0},
  143013. {&__pyx_kp_u_close_uv_is_closing_is_true, __pyx_k_close_uv_is_closing_is_true, sizeof(__pyx_k_close_uv_is_closing_is_true), 0, 1, 0, 0},
  143014. {&__pyx_kp_u_closed_Transport_handle_and_unse, __pyx_k_closed_Transport_handle_and_unse, sizeof(__pyx_k_closed_Transport_handle_and_unse), 0, 1, 0, 0},
  143015. {&__pyx_kp_u_closed_reading_x, __pyx_k_closed_reading_x, sizeof(__pyx_k_closed_reading_x), 0, 1, 0, 0},
  143016. {&__pyx_kp_u_closed_x, __pyx_k_closed_x, sizeof(__pyx_k_closed_x), 0, 1, 0, 0},
  143017. {&__pyx_n_s_cmd, __pyx_k_cmd, sizeof(__pyx_k_cmd), 0, 0, 1, 1},
  143018. {&__pyx_n_s_collections, __pyx_k_collections, sizeof(__pyx_k_collections), 0, 0, 1, 1},
  143019. {&__pyx_n_s_collections_abc, __pyx_k_collections_abc, sizeof(__pyx_k_collections_abc), 0, 0, 1, 1},
  143020. {&__pyx_n_s_compression, __pyx_k_compression, sizeof(__pyx_k_compression), 0, 0, 1, 1},
  143021. {&__pyx_n_s_concurrent, __pyx_k_concurrent, sizeof(__pyx_k_concurrent), 0, 0, 1, 1},
  143022. {&__pyx_kp_u_concurrent_allocations, __pyx_k_concurrent_allocations, sizeof(__pyx_k_concurrent_allocations), 0, 1, 0, 0},
  143023. {&__pyx_n_s_concurrent_futures, __pyx_k_concurrent_futures, sizeof(__pyx_k_concurrent_futures), 0, 0, 1, 1},
  143024. {&__pyx_n_s_connect, __pyx_k_connect, sizeof(__pyx_k_connect), 0, 0, 1, 1},
  143025. {&__pyx_n_s_connect_accepted_socket, __pyx_k_connect_accepted_socket, sizeof(__pyx_k_connect_accepted_socket), 0, 0, 1, 1},
  143026. {&__pyx_kp_u_connect_ex_method, __pyx_k_connect_ex_method, sizeof(__pyx_k_connect_ex_method), 0, 1, 0, 0},
  143027. {&__pyx_kp_u_connect_failed, __pyx_k_connect_failed, sizeof(__pyx_k_connect_failed), 0, 1, 0, 0},
  143028. {&__pyx_kp_u_connect_method, __pyx_k_connect_method, sizeof(__pyx_k_connect_method), 0, 1, 0, 0},
  143029. {&__pyx_n_s_connect_read_pipe, __pyx_k_connect_read_pipe, sizeof(__pyx_k_connect_read_pipe), 0, 0, 1, 1},
  143030. {&__pyx_n_s_connect_write_pipe, __pyx_k_connect_write_pipe, sizeof(__pyx_k_connect_write_pipe), 0, 0, 1, 1},
  143031. {&__pyx_n_s_connection_lost, __pyx_k_connection_lost, sizeof(__pyx_k_connection_lost), 0, 0, 1, 1},
  143032. {&__pyx_n_s_connection_made, __pyx_k_connection_made, sizeof(__pyx_k_connection_made), 0, 0, 1, 1},
  143033. {&__pyx_n_s_context, __pyx_k_context, sizeof(__pyx_k_context), 0, 0, 1, 1},
  143034. {&__pyx_n_u_context, __pyx_k_context, sizeof(__pyx_k_context), 0, 1, 0, 1},
  143035. {&__pyx_kp_u_context_argument_requires_Pytho, __pyx_k_context_argument_requires_Pytho, sizeof(__pyx_k_context_argument_requires_Pytho), 0, 1, 0, 0},
  143036. {&__pyx_kp_u_context_manager_protocol, __pyx_k_context_manager_protocol, sizeof(__pyx_k_context_manager_protocol), 0, 1, 0, 0},
  143037. {&__pyx_n_s_copy, __pyx_k_copy, sizeof(__pyx_k_copy), 0, 0, 1, 1},
  143038. {&__pyx_n_s_coroutines, __pyx_k_coroutines, sizeof(__pyx_k_coroutines), 0, 0, 1, 1},
  143039. {&__pyx_kp_u_coroutines_cannot_be_used_with_a, __pyx_k_coroutines_cannot_be_used_with_a, sizeof(__pyx_k_coroutines_cannot_be_used_with_a), 0, 1, 0, 0},
  143040. {&__pyx_kp_u_coroutines_cannot_be_used_with_r, __pyx_k_coroutines_cannot_be_used_with_r, sizeof(__pyx_k_coroutines_cannot_be_used_with_r), 0, 1, 0, 0},
  143041. {&__pyx_kp_u_could_not_bind_to_local_addr, __pyx_k_could_not_bind_to_local_addr, sizeof(__pyx_k_could_not_bind_to_local_addr), 0, 1, 0, 0},
  143042. {&__pyx_kp_u_could_not_bind_to_remote_addr, __pyx_k_could_not_bind_to_remote_addr, sizeof(__pyx_k_could_not_bind_to_remote_addr), 0, 1, 0, 0},
  143043. {&__pyx_kp_u_could_not_close_attached_file_ob, __pyx_k_could_not_close_attached_file_ob, sizeof(__pyx_k_could_not_close_attached_file_ob), 0, 1, 0, 0},
  143044. {&__pyx_n_s_create_connection, __pyx_k_create_connection, sizeof(__pyx_k_create_connection), 0, 0, 1, 1},
  143045. {&__pyx_n_s_create_connection_locals_genexpr, __pyx_k_create_connection_locals_genexpr, sizeof(__pyx_k_create_connection_locals_genexpr), 0, 0, 1, 1},
  143046. {&__pyx_n_s_create_datagram_endpoint, __pyx_k_create_datagram_endpoint, sizeof(__pyx_k_create_datagram_endpoint), 0, 0, 1, 1},
  143047. {&__pyx_n_s_create_datagram_endpoint_locals, __pyx_k_create_datagram_endpoint_locals, sizeof(__pyx_k_create_datagram_endpoint_locals), 0, 0, 1, 1},
  143048. {&__pyx_n_s_create_default_context, __pyx_k_create_default_context, sizeof(__pyx_k_create_default_context), 0, 0, 1, 1},
  143049. {&__pyx_n_s_create_future, __pyx_k_create_future, sizeof(__pyx_k_create_future), 0, 0, 1, 1},
  143050. {&__pyx_n_s_create_server, __pyx_k_create_server, sizeof(__pyx_k_create_server), 0, 0, 1, 1},
  143051. {&__pyx_kp_u_create_server_failed_to_create_s, __pyx_k_create_server_failed_to_create_s, sizeof(__pyx_k_create_server_failed_to_create_s), 0, 1, 0, 0},
  143052. {&__pyx_n_s_create_task, __pyx_k_create_task, sizeof(__pyx_k_create_task), 0, 0, 1, 1},
  143053. {&__pyx_n_s_create_unix_connection, __pyx_k_create_unix_connection, sizeof(__pyx_k_create_unix_connection), 0, 0, 1, 1},
  143054. {&__pyx_n_s_create_unix_server, __pyx_k_create_unix_server, sizeof(__pyx_k_create_unix_server), 0, 0, 1, 1},
  143055. {&__pyx_kp_u_created_at, __pyx_k_created_at, sizeof(__pyx_k_created_at), 0, 1, 0, 0},
  143056. {&__pyx_n_s_creationflags, __pyx_k_creationflags, sizeof(__pyx_k_creationflags), 0, 0, 1, 1},
  143057. {&__pyx_kp_u_creationflags_is_not_supported, __pyx_k_creationflags_is_not_supported, sizeof(__pyx_k_creationflags_is_not_supported), 0, 1, 0, 0},
  143058. {&__pyx_n_s_cwd, __pyx_k_cwd, sizeof(__pyx_k_cwd), 0, 0, 1, 1},
  143059. {&__pyx_kp_u_cwd_must_be_a_str_or_bytes_objec, __pyx_k_cwd_must_be_a_str_or_bytes_objec, sizeof(__pyx_k_cwd_must_be_a_str_or_bytes_objec), 0, 1, 0, 0},
  143060. {&__pyx_n_u_cygwin, __pyx_k_cygwin, sizeof(__pyx_k_cygwin), 0, 1, 0, 1},
  143061. {&__pyx_n_s_data, __pyx_k_data, sizeof(__pyx_k_data), 0, 0, 1, 1},
  143062. {&__pyx_kp_u_data_expecting_a_bytes_like_inst, __pyx_k_data_expecting_a_bytes_like_inst, sizeof(__pyx_k_data_expecting_a_bytes_like_inst), 0, 1, 0, 0},
  143063. {&__pyx_n_s_data_received, __pyx_k_data_received, sizeof(__pyx_k_data_received), 0, 0, 1, 1},
  143064. {&__pyx_n_s_datagram_received, __pyx_k_datagram_received, sizeof(__pyx_k_datagram_received), 0, 0, 1, 1},
  143065. {&__pyx_kp_u_dealloc____handle_is_NULL__cl, __pyx_k_dealloc____handle_is_NULL__cl, sizeof(__pyx_k_dealloc____handle_is_NULL__cl), 0, 1, 0, 0},
  143066. {&__pyx_kp_u_deallocating_a_running_event_loo, __pyx_k_deallocating_a_running_event_loo, sizeof(__pyx_k_deallocating_a_running_event_loo), 0, 1, 0, 0},
  143067. {&__pyx_kp_u_deallocating_an_open_event_loop, __pyx_k_deallocating_an_open_event_loop, sizeof(__pyx_k_deallocating_an_open_event_loop), 0, 1, 0, 0},
  143068. {&__pyx_n_s_debug, __pyx_k_debug, sizeof(__pyx_k_debug), 0, 0, 1, 1},
  143069. {&__pyx_n_u_debug_wrapper, __pyx_k_debug_wrapper, sizeof(__pyx_k_debug_wrapper), 0, 1, 0, 1},
  143070. {&__pyx_n_s_decode, __pyx_k_decode, sizeof(__pyx_k_decode), 0, 0, 1, 1},
  143071. {&__pyx_n_s_decref_socketios, __pyx_k_decref_socketios, sizeof(__pyx_k_decref_socketios), 0, 0, 1, 1},
  143072. {&__pyx_n_s_default, __pyx_k_default, sizeof(__pyx_k_default), 0, 0, 1, 1},
  143073. {&__pyx_n_s_default_exception_handler, __pyx_k_default_exception_handler, sizeof(__pyx_k_default_exception_handler), 0, 0, 1, 1},
  143074. {&__pyx_n_s_default_int_handler, __pyx_k_default_int_handler, sizeof(__pyx_k_default_int_handler), 0, 0, 1, 1},
  143075. {&__pyx_n_s_delay, __pyx_k_delay, sizeof(__pyx_k_delay), 0, 0, 1, 1},
  143076. {&__pyx_n_s_deque, __pyx_k_deque, sizeof(__pyx_k_deque), 0, 0, 1, 1},
  143077. {&__pyx_n_s_detach, __pyx_k_detach, sizeof(__pyx_k_detach), 0, 0, 1, 1},
  143078. {&__pyx_kp_u_detach_method, __pyx_k_detach_method, sizeof(__pyx_k_detach_method), 0, 1, 0, 0},
  143079. {&__pyx_n_s_devnull, __pyx_k_devnull, sizeof(__pyx_k_devnull), 0, 0, 1, 1},
  143080. {&__pyx_n_s_dict, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 0, 1, 1},
  143081. {&__pyx_n_s_disable, __pyx_k_disable, sizeof(__pyx_k_disable), 0, 0, 1, 1},
  143082. {&__pyx_n_s_discard, __pyx_k_discard, sizeof(__pyx_k_discard), 0, 0, 1, 1},
  143083. {&__pyx_n_s_disconnected, __pyx_k_disconnected, sizeof(__pyx_k_disconnected), 0, 0, 1, 1},
  143084. {&__pyx_n_s_do_handshake, __pyx_k_do_handshake, sizeof(__pyx_k_do_handshake), 0, 0, 1, 1},
  143085. {&__pyx_n_s_doc, __pyx_k_doc, sizeof(__pyx_k_doc), 0, 0, 1, 1},
  143086. {&__pyx_kp_u_does_not_have_a_reader_in_the, __pyx_k_does_not_have_a_reader_in_the, sizeof(__pyx_k_does_not_have_a_reader_in_the), 0, 1, 0, 0},
  143087. {&__pyx_kp_u_does_not_have_a_reader_in_the_2, __pyx_k_does_not_have_a_reader_in_the_2, sizeof(__pyx_k_does_not_have_a_reader_in_the_2), 0, 1, 0, 0},
  143088. {&__pyx_kp_u_does_not_have_a_writer_in_the, __pyx_k_does_not_have_a_writer_in_the, sizeof(__pyx_k_does_not_have_a_writer_in_the), 0, 1, 0, 0},
  143089. {&__pyx_n_s_done, __pyx_k_done, sizeof(__pyx_k_done), 0, 0, 1, 1},
  143090. {&__pyx_n_s_dup, __pyx_k_dup, sizeof(__pyx_k_dup), 0, 0, 1, 1},
  143091. {&__pyx_n_s_enabled, __pyx_k_enabled, sizeof(__pyx_k_enabled), 0, 0, 1, 1},
  143092. {&__pyx_n_s_encode, __pyx_k_encode, sizeof(__pyx_k_encode), 0, 0, 1, 1},
  143093. {&__pyx_n_s_ensure_future, __pyx_k_ensure_future, sizeof(__pyx_k_ensure_future), 0, 0, 1, 1},
  143094. {&__pyx_n_s_enter, __pyx_k_enter, sizeof(__pyx_k_enter), 0, 0, 1, 1},
  143095. {&__pyx_n_s_env, __pyx_k_env, sizeof(__pyx_k_env), 0, 0, 1, 1},
  143096. {&__pyx_n_s_environ, __pyx_k_environ, sizeof(__pyx_k_environ), 0, 0, 1, 1},
  143097. {&__pyx_n_s_eof_received, __pyx_k_eof_received, sizeof(__pyx_k_eof_received), 0, 0, 1, 1},
  143098. {&__pyx_n_s_errno, __pyx_k_errno, sizeof(__pyx_k_errno), 0, 0, 1, 1},
  143099. {&__pyx_n_s_error, __pyx_k_error, sizeof(__pyx_k_error), 0, 0, 1, 1},
  143100. {&__pyx_n_s_error_received, __pyx_k_error_received, sizeof(__pyx_k_error_received), 0, 0, 1, 1},
  143101. {&__pyx_kp_u_error_status_in_uv_stream_t_list, __pyx_k_error_status_in_uv_stream_t_list, sizeof(__pyx_k_error_status_in_uv_stream_t_list), 0, 1, 0, 0},
  143102. {&__pyx_kp_u_error_status_in_uv_stream_t_read, __pyx_k_error_status_in_uv_stream_t_read, sizeof(__pyx_k_error_status_in_uv_stream_t_read), 0, 1, 0, 0},
  143103. {&__pyx_kp_u_error_status_in_uv_stream_t_shut, __pyx_k_error_status_in_uv_stream_t_shut, sizeof(__pyx_k_error_status_in_uv_stream_t_shut), 0, 1, 0, 0},
  143104. {&__pyx_kp_u_error_status_in_uv_stream_t_writ, __pyx_k_error_status_in_uv_stream_t_writ, sizeof(__pyx_k_error_status_in_uv_stream_t_writ), 0, 1, 0, 0},
  143105. {&__pyx_kp_u_error_while_attempting_to_bind_o, __pyx_k_error_while_attempting_to_bind_o, sizeof(__pyx_k_error_while_attempting_to_bind_o), 0, 1, 0, 0},
  143106. {&__pyx_n_s_ex, __pyx_k_ex, sizeof(__pyx_k_ex), 0, 0, 1, 1},
  143107. {&__pyx_n_s_exc, __pyx_k_exc, sizeof(__pyx_k_exc), 0, 0, 1, 1},
  143108. {&__pyx_n_s_exc_info, __pyx_k_exc_info, sizeof(__pyx_k_exc_info), 0, 0, 1, 1},
  143109. {&__pyx_n_s_exception, __pyx_k_exception, sizeof(__pyx_k_exception), 0, 0, 1, 1},
  143110. {&__pyx_n_u_exception, __pyx_k_exception, sizeof(__pyx_k_exception), 0, 1, 0, 1},
  143111. {&__pyx_kp_u_exception_in_Task___repr, __pyx_k_exception_in_Task___repr, sizeof(__pyx_k_exception_in_Task___repr), 0, 1, 0, 0},
  143112. {&__pyx_n_s_executable, __pyx_k_executable, sizeof(__pyx_k_executable), 0, 0, 1, 1},
  143113. {&__pyx_n_s_executor, __pyx_k_executor, sizeof(__pyx_k_executor), 0, 0, 1, 1},
  143114. {&__pyx_n_s_exit, __pyx_k_exit, sizeof(__pyx_k_exit), 0, 0, 1, 1},
  143115. {&__pyx_kp_u_expected_AF_INET_AF_INET6_or_AF, __pyx_k_expected_AF_INET_AF_INET6_or_AF, sizeof(__pyx_k_expected_AF_INET_AF_INET6_or_AF), 0, 1, 0, 0},
  143116. {&__pyx_kp_u_expected_asyncio_Future, __pyx_k_expected_asyncio_Future, sizeof(__pyx_k_expected_asyncio_Future), 0, 1, 0, 0},
  143117. {&__pyx_n_s_extract, __pyx_k_extract, sizeof(__pyx_k_extract), 0, 0, 1, 1},
  143118. {&__pyx_n_s_family, __pyx_k_family, sizeof(__pyx_k_family), 0, 0, 1, 1},
  143119. {&__pyx_kp_u_fatal_Could_not_advance__StreamW, __pyx_k_fatal_Could_not_advance__StreamW, sizeof(__pyx_k_fatal_Could_not_advance__StreamW), 0, 1, 0, 0},
  143120. {&__pyx_kp_u_fatal_sent_0_in_advance_uv_buf, __pyx_k_fatal_sent_0_in_advance_uv_buf, sizeof(__pyx_k_fatal_sent_0_in_advance_uv_buf), 0, 1, 0, 0},
  143121. {&__pyx_n_s_fd, __pyx_k_fd, sizeof(__pyx_k_fd), 0, 0, 1, 1},
  143122. {&__pyx_kp_u_fd_2, __pyx_k_fd_2, sizeof(__pyx_k_fd_2), 0, 1, 0, 0},
  143123. {&__pyx_n_s_fileno, __pyx_k_fileno, sizeof(__pyx_k_fileno), 0, 0, 1, 1},
  143124. {&__pyx_n_s_fileobj, __pyx_k_fileobj, sizeof(__pyx_k_fileobj), 0, 0, 1, 1},
  143125. {&__pyx_n_s_finalizer, __pyx_k_finalizer, sizeof(__pyx_k_finalizer), 0, 0, 1, 1},
  143126. {&__pyx_n_s_firstiter, __pyx_k_firstiter, sizeof(__pyx_k_firstiter), 0, 0, 1, 1},
  143127. {&__pyx_n_s_flags, __pyx_k_flags, sizeof(__pyx_k_flags), 0, 0, 1, 1},
  143128. {&__pyx_n_s_flush, __pyx_k_flush, sizeof(__pyx_k_flush), 0, 0, 1, 1},
  143129. {&__pyx_n_s_force_close, __pyx_k_force_close, sizeof(__pyx_k_force_close), 0, 0, 1, 1},
  143130. {&__pyx_n_s_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1},
  143131. {&__pyx_n_s_format_list, __pyx_k_format_list, sizeof(__pyx_k_format_list), 0, 0, 1, 1},
  143132. {&__pyx_n_s_frame, __pyx_k_frame, sizeof(__pyx_k_frame), 0, 0, 1, 1},
  143133. {&__pyx_n_s_fspath, __pyx_k_fspath, sizeof(__pyx_k_fspath), 0, 0, 1, 1},
  143134. {&__pyx_n_s_func, __pyx_k_func, sizeof(__pyx_k_func), 0, 0, 1, 1},
  143135. {&__pyx_n_s_functools, __pyx_k_functools, sizeof(__pyx_k_functools), 0, 0, 1, 1},
  143136. {&__pyx_n_s_fut, __pyx_k_fut, sizeof(__pyx_k_fut), 0, 0, 1, 1},
  143137. {&__pyx_n_s_futures, __pyx_k_futures, sizeof(__pyx_k_futures), 0, 0, 1, 1},
  143138. {&__pyx_n_s_gaierror, __pyx_k_gaierror, sizeof(__pyx_k_gaierror), 0, 0, 1, 1},
  143139. {&__pyx_n_s_gather, __pyx_k_gather, sizeof(__pyx_k_gather), 0, 0, 1, 1},
  143140. {&__pyx_n_s_gc, __pyx_k_gc, sizeof(__pyx_k_gc), 0, 0, 1, 1},
  143141. {&__pyx_n_s_genexpr, __pyx_k_genexpr, sizeof(__pyx_k_genexpr), 0, 0, 1, 1},
  143142. {&__pyx_n_s_get, __pyx_k_get, sizeof(__pyx_k_get), 0, 0, 1, 1},
  143143. {&__pyx_n_s_get_app_transport, __pyx_k_get_app_transport, sizeof(__pyx_k_get_app_transport), 0, 0, 1, 1},
  143144. {&__pyx_n_s_get_asyncgen_hooks, __pyx_k_get_asyncgen_hooks, sizeof(__pyx_k_get_asyncgen_hooks), 0, 0, 1, 1},
  143145. {&__pyx_n_u_get_asyncgen_hooks, __pyx_k_get_asyncgen_hooks, sizeof(__pyx_k_get_asyncgen_hooks), 0, 1, 0, 1},
  143146. {&__pyx_n_s_get_buffer, __pyx_k_get_buffer, sizeof(__pyx_k_get_buffer), 0, 0, 1, 1},
  143147. {&__pyx_n_u_get_buffer, __pyx_k_get_buffer, sizeof(__pyx_k_get_buffer), 0, 1, 0, 1},
  143148. {&__pyx_n_s_get_coroutine_origin_tracking_de, __pyx_k_get_coroutine_origin_tracking_de, sizeof(__pyx_k_get_coroutine_origin_tracking_de), 0, 0, 1, 1},
  143149. {&__pyx_n_u_get_coroutine_wrapper, __pyx_k_get_coroutine_wrapper, sizeof(__pyx_k_get_coroutine_wrapper), 0, 1, 0, 1},
  143150. {&__pyx_n_s_get_debug, __pyx_k_get_debug, sizeof(__pyx_k_get_debug), 0, 0, 1, 1},
  143151. {&__pyx_n_s_get_event_loop, __pyx_k_get_event_loop, sizeof(__pyx_k_get_event_loop), 0, 0, 1, 1},
  143152. {&__pyx_n_s_get_extra_info, __pyx_k_get_extra_info, sizeof(__pyx_k_get_extra_info), 0, 0, 1, 1},
  143153. {&__pyx_n_s_get_inheritable, __pyx_k_get_inheritable, sizeof(__pyx_k_get_inheritable), 0, 0, 1, 1},
  143154. {&__pyx_n_u_get_running_loop, __pyx_k_get_running_loop, sizeof(__pyx_k_get_running_loop), 0, 1, 0, 1},
  143155. {&__pyx_n_s_getaddrinfo, __pyx_k_getaddrinfo, sizeof(__pyx_k_getaddrinfo), 0, 0, 1, 1},
  143156. {&__pyx_kp_u_getaddrinfo_returned_empty_list, __pyx_k_getaddrinfo_returned_empty_list, sizeof(__pyx_k_getaddrinfo_returned_empty_list), 0, 1, 0, 0},
  143157. {&__pyx_kp_u_getaddrinfo_returned_empty_list_2, __pyx_k_getaddrinfo_returned_empty_list_2, sizeof(__pyx_k_getaddrinfo_returned_empty_list_2), 0, 1, 0, 0},
  143158. {&__pyx_n_s_getfilesystemencoding, __pyx_k_getfilesystemencoding, sizeof(__pyx_k_getfilesystemencoding), 0, 0, 1, 1},
  143159. {&__pyx_n_s_getframe, __pyx_k_getframe, sizeof(__pyx_k_getframe), 0, 0, 1, 1},
  143160. {&__pyx_n_s_getnameinfo, __pyx_k_getnameinfo, sizeof(__pyx_k_getnameinfo), 0, 0, 1, 1},
  143161. {&__pyx_kp_u_getnameinfo_argument_1_must_be_a, __pyx_k_getnameinfo_argument_1_must_be_a, sizeof(__pyx_k_getnameinfo_argument_1_must_be_a), 0, 1, 0, 0},
  143162. {&__pyx_kp_u_getnameinfo_flowinfo_must_be_0_1, __pyx_k_getnameinfo_flowinfo_must_be_0_1, sizeof(__pyx_k_getnameinfo_flowinfo_must_be_0_1), 0, 1, 0, 0},
  143163. {&__pyx_n_s_getpeercert, __pyx_k_getpeercert, sizeof(__pyx_k_getpeercert), 0, 0, 1, 1},
  143164. {&__pyx_n_s_getpeername, __pyx_k_getpeername, sizeof(__pyx_k_getpeername), 0, 0, 1, 1},
  143165. {&__pyx_n_s_getservbyname, __pyx_k_getservbyname, sizeof(__pyx_k_getservbyname), 0, 0, 1, 1},
  143166. {&__pyx_kp_u_getsockaddrarg_flowinfo_must_be, __pyx_k_getsockaddrarg_flowinfo_must_be, sizeof(__pyx_k_getsockaddrarg_flowinfo_must_be), 0, 1, 0, 0},
  143167. {&__pyx_kp_u_getsockaddrarg_scope_id_must_be, __pyx_k_getsockaddrarg_scope_id_must_be, sizeof(__pyx_k_getsockaddrarg_scope_id_must_be), 0, 1, 0, 0},
  143168. {&__pyx_n_s_getsockname, __pyx_k_getsockname, sizeof(__pyx_k_getsockname), 0, 0, 1, 1},
  143169. {&__pyx_n_s_getsockopt, __pyx_k_getsockopt, sizeof(__pyx_k_getsockopt), 0, 0, 1, 1},
  143170. {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1},
  143171. {&__pyx_n_s_gettimeout, __pyx_k_gettimeout, sizeof(__pyx_k_gettimeout), 0, 0, 1, 1},
  143172. {&__pyx_n_u_handle, __pyx_k_handle, sizeof(__pyx_k_handle), 0, 1, 0, 1},
  143173. {&__pyx_kp_u_handle_data_is_NULL_in___close_a, __pyx_k_handle_data_is_NULL_in___close_a, sizeof(__pyx_k_handle_data_is_NULL_in___close_a), 0, 1, 0, 0},
  143174. {&__pyx_kp_u_handle_loop_data_is_NULL_in___en, __pyx_k_handle_loop_data_is_NULL_in___en, sizeof(__pyx_k_handle_loop_data_is_NULL_in___en), 0, 1, 0, 0},
  143175. {&__pyx_kp_u_handle_loop_is_NULL_in___ensure, __pyx_k_handle_loop_is_NULL_in___ensure, sizeof(__pyx_k_handle_loop_is_NULL_in___ensure), 0, 1, 0, 0},
  143176. {&__pyx_kp_u_has_handle_0_in___uv_close_handl, __pyx_k_has_handle_0_in___uv_close_handl, sizeof(__pyx_k_has_handle_0_in___uv_close_handl), 0, 1, 0, 0},
  143177. {&__pyx_n_s_high, __pyx_k_high, sizeof(__pyx_k_high), 0, 0, 1, 1},
  143178. {&__pyx_kp_u_high_2, __pyx_k_high_2, sizeof(__pyx_k_high_2), 0, 1, 0, 0},
  143179. {&__pyx_n_s_host, __pyx_k_host, sizeof(__pyx_k_host), 0, 0, 1, 1},
  143180. {&__pyx_kp_u_host_and_port_was_not_specified, __pyx_k_host_and_port_was_not_specified, sizeof(__pyx_k_host_and_port_was_not_specified), 0, 1, 0, 0},
  143181. {&__pyx_kp_u_host_must_be_a_str_or_bytes, __pyx_k_host_must_be_a_str_or_bytes, sizeof(__pyx_k_host_must_be_a_str_or_bytes), 0, 1, 0, 0},
  143182. {&__pyx_kp_u_host_must_be_a_string_or_bytes_o, __pyx_k_host_must_be_a_string_or_bytes_o, sizeof(__pyx_k_host_must_be_a_string_or_bytes_o), 0, 1, 0, 0},
  143183. {&__pyx_kp_u_host_port_and_sock_can_not_be_sp, __pyx_k_host_port_and_sock_can_not_be_sp, sizeof(__pyx_k_host_port_and_sock_can_not_be_sp), 0, 1, 0, 0},
  143184. {&__pyx_n_s_id, __pyx_k_id, sizeof(__pyx_k_id), 0, 0, 1, 1},
  143185. {&__pyx_n_s_ident, __pyx_k_ident, sizeof(__pyx_k_ident), 0, 0, 1, 1},
  143186. {&__pyx_n_u_idna, __pyx_k_idna, sizeof(__pyx_k_idna), 0, 1, 0, 1},
  143187. {&__pyx_n_s_ignore_environment, __pyx_k_ignore_environment, sizeof(__pyx_k_ignore_environment), 0, 0, 1, 1},
  143188. {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
  143189. {&__pyx_n_u_inf, __pyx_k_inf, sizeof(__pyx_k_inf), 0, 1, 0, 1},
  143190. {&__pyx_n_s_info, __pyx_k_info, sizeof(__pyx_k_info), 0, 0, 1, 1},
  143191. {&__pyx_n_s_init, __pyx_k_init, sizeof(__pyx_k_init), 0, 0, 1, 1},
  143192. {&__pyx_n_s_inspect, __pyx_k_inspect, sizeof(__pyx_k_inspect), 0, 0, 1, 1},
  143193. {&__pyx_kp_u_integer_argument_expected_got, __pyx_k_integer_argument_expected_got, sizeof(__pyx_k_integer_argument_expected_got), 0, 1, 0, 0},
  143194. {&__pyx_kp_u_invalid_Handle_cb_type, __pyx_k_invalid_Handle_cb_type, sizeof(__pyx_k_invalid_Handle_cb_type), 0, 1, 0, 0},
  143195. {&__pyx_kp_u_invalid__init_protocol_call, __pyx_k_invalid__init_protocol_call, sizeof(__pyx_k_invalid__init_protocol_call), 0, 1, 0, 0},
  143196. {&__pyx_kp_u_invalid_data_in_writebuf_an_inst, __pyx_k_invalid_data_in_writebuf_an_inst, sizeof(__pyx_k_invalid_data_in_writebuf_an_inst), 0, 1, 0, 0},
  143197. {&__pyx_kp_u_invalid_socket_family_expected_A, __pyx_k_invalid_socket_family_expected_A, sizeof(__pyx_k_invalid_socket_family_expected_A), 0, 1, 0, 0},
  143198. {&__pyx_kp_u_invalid_waiter_object, __pyx_k_invalid_waiter_object, sizeof(__pyx_k_invalid_waiter_object), 0, 1, 0, 0},
  143199. {&__pyx_n_s_io_refs, __pyx_k_io_refs, sizeof(__pyx_k_io_refs), 0, 0, 1, 1},
  143200. {&__pyx_kp_u_is_alive_but__handle_data_is_no, __pyx_k_is_alive_but__handle_data_is_no, sizeof(__pyx_k_is_alive_but__handle_data_is_no), 0, 1, 0, 0},
  143201. {&__pyx_kp_u_is_alive_but__handle_is_NULL, __pyx_k_is_alive_but__handle_is_NULL, sizeof(__pyx_k_is_alive_but__handle_is_NULL), 0, 1, 0, 0},
  143202. {&__pyx_kp_u_is_alive_but__handle_loop_is_no, __pyx_k_is_alive_but__handle_loop_is_no, sizeof(__pyx_k_is_alive_but__handle_loop_is_no), 0, 1, 0, 0},
  143203. {&__pyx_kp_u_is_alive_but__loop_is_None, __pyx_k_is_alive_but__loop_is_None, sizeof(__pyx_k_is_alive_but__loop_is_None), 0, 1, 0, 0},
  143204. {&__pyx_kp_u_is_already_being_awaited_on_ser, __pyx_k_is_already_being_awaited_on_ser, sizeof(__pyx_k_is_already_being_awaited_on_ser), 0, 1, 0, 0},
  143205. {&__pyx_n_s_is_closed, __pyx_k_is_closed, sizeof(__pyx_k_is_closed), 0, 0, 1, 1},
  143206. {&__pyx_kp_u_is_closed_2, __pyx_k_is_closed_2, sizeof(__pyx_k_is_closed_2), 0, 1, 0, 0},
  143207. {&__pyx_kp_u_is_longer_than_107_characters, __pyx_k_is_longer_than_107_characters, sizeof(__pyx_k_is_longer_than_107_characters), 0, 1, 0, 0},
  143208. {&__pyx_kp_u_is_not_supported_by_start_tls, __pyx_k_is_not_supported_by_start_tls, sizeof(__pyx_k_is_not_supported_by_start_tls), 0, 1, 0, 0},
  143209. {&__pyx_kp_u_is_not_supposed_to_be_instantia, __pyx_k_is_not_supposed_to_be_instantia, sizeof(__pyx_k_is_not_supposed_to_be_instantia), 0, 1, 0, 0},
  143210. {&__pyx_kp_u_is_open_in___dealloc___with_loo, __pyx_k_is_open_in___dealloc___with_loo, sizeof(__pyx_k_is_open_in___dealloc___with_loo), 0, 1, 0, 0},
  143211. {&__pyx_n_s_is_running, __pyx_k_is_running, sizeof(__pyx_k_is_running), 0, 0, 1, 1},
  143212. {&__pyx_n_s_iscoroutine, __pyx_k_iscoroutine, sizeof(__pyx_k_iscoroutine), 0, 0, 1, 1},
  143213. {&__pyx_n_s_iscoroutinefunction, __pyx_k_iscoroutinefunction, sizeof(__pyx_k_iscoroutinefunction), 0, 0, 1, 1},
  143214. {&__pyx_n_u_isfuture, __pyx_k_isfuture, sizeof(__pyx_k_isfuture), 0, 1, 0, 1},
  143215. {&__pyx_n_s_isgenerator, __pyx_k_isgenerator, sizeof(__pyx_k_isgenerator), 0, 0, 1, 1},
  143216. {&__pyx_n_s_items, __pyx_k_items, sizeof(__pyx_k_items), 0, 0, 1, 1},
  143217. {&__pyx_n_s_itertools, __pyx_k_itertools, sizeof(__pyx_k_itertools), 0, 0, 1, 1},
  143218. {&__pyx_n_s_join, __pyx_k_join, sizeof(__pyx_k_join), 0, 0, 1, 1},
  143219. {&__pyx_kp_u_laddr_s, __pyx_k_laddr_s, sizeof(__pyx_k_laddr_s), 0, 1, 0, 0},
  143220. {&__pyx_n_s_last, __pyx_k_last, sizeof(__pyx_k_last), 0, 0, 1, 1},
  143221. {&__pyx_n_s_limit, __pyx_k_limit, sizeof(__pyx_k_limit), 0, 0, 1, 1},
  143222. {&__pyx_kp_u_listen_method, __pyx_k_listen_method, sizeof(__pyx_k_listen_method), 0, 1, 0, 0},
  143223. {&__pyx_n_s_local_addr, __pyx_k_local_addr, sizeof(__pyx_k_local_addr), 0, 0, 1, 1},
  143224. {&__pyx_kp_u_local_addr_must_be_a_tuple_of_ho, __pyx_k_local_addr_must_be_a_tuple_of_ho, sizeof(__pyx_k_local_addr_must_be_a_tuple_of_ho), 0, 1, 0, 0},
  143225. {&__pyx_kp_u_local_addr_must_be_a_tuple_of_ho_2, __pyx_k_local_addr_must_be_a_tuple_of_ho_2, sizeof(__pyx_k_local_addr_must_be_a_tuple_of_ho_2), 0, 1, 0, 0},
  143226. {&__pyx_n_s_log, __pyx_k_log, sizeof(__pyx_k_log), 0, 0, 1, 1},
  143227. {&__pyx_n_s_log_destroy_pending, __pyx_k_log_destroy_pending, sizeof(__pyx_k_log_destroy_pending), 0, 0, 1, 1},
  143228. {&__pyx_n_s_logger, __pyx_k_logger, sizeof(__pyx_k_logger), 0, 0, 1, 1},
  143229. {&__pyx_n_s_lookup_lines, __pyx_k_lookup_lines, sizeof(__pyx_k_lookup_lines), 0, 0, 1, 1},
  143230. {&__pyx_n_s_loop, __pyx_k_loop, sizeof(__pyx_k_loop), 0, 0, 1, 1},
  143231. {&__pyx_kp_u_loop__exec_queued_writes, __pyx_k_loop__exec_queued_writes, sizeof(__pyx_k_loop__exec_queued_writes), 0, 1, 0, 0},
  143232. {&__pyx_kp_u_loop__on_idle, __pyx_k_loop__on_idle, sizeof(__pyx_k_loop__on_idle), 0, 1, 0, 0},
  143233. {&__pyx_kp_u_loop__queued_streams_are_not_emp, __pyx_k_loop__queued_streams_are_not_emp, sizeof(__pyx_k_loop__queued_streams_are_not_emp), 0, 1, 0, 0},
  143234. {&__pyx_kp_u_loop_set_debug_False_cannot_unse, __pyx_k_loop_set_debug_False_cannot_unse, sizeof(__pyx_k_loop_set_debug_False_cannot_unse), 0, 1, 0, 0},
  143235. {&__pyx_kp_u_loop_set_debug_True_cannot_set_d, __pyx_k_loop_set_debug_True_cannot_set_d, sizeof(__pyx_k_loop_set_debug_True_cannot_set_d), 0, 1, 0, 0},
  143236. {&__pyx_n_s_low, __pyx_k_low, sizeof(__pyx_k_low), 0, 0, 1, 1},
  143237. {&__pyx_n_s_lower, __pyx_k_lower, sizeof(__pyx_k_lower), 0, 0, 1, 1},
  143238. {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
  143239. {&__pyx_n_s_main_thread, __pyx_k_main_thread, sizeof(__pyx_k_main_thread), 0, 0, 1, 1},
  143240. {&__pyx_kp_u_makefile_method, __pyx_k_makefile_method, sizeof(__pyx_k_makefile_method), 0, 1, 0, 0},
  143241. {&__pyx_n_s_maxsize, __pyx_k_maxsize, sizeof(__pyx_k_maxsize), 0, 0, 1, 1},
  143242. {&__pyx_kp_u_maxsize_is_expected_to_be_greate, __pyx_k_maxsize_is_expected_to_be_greate, sizeof(__pyx_k_maxsize_is_expected_to_be_greate), 0, 1, 0, 0},
  143243. {&__pyx_n_s_memoryview, __pyx_k_memoryview, sizeof(__pyx_k_memoryview), 0, 0, 1, 1},
  143244. {&__pyx_n_u_message, __pyx_k_message, sizeof(__pyx_k_message), 0, 1, 0, 1},
  143245. {&__pyx_n_s_metaclass, __pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 0, 1, 1},
  143246. {&__pyx_n_s_module, __pyx_k_module, sizeof(__pyx_k_module), 0, 0, 1, 1},
  143247. {&__pyx_n_s_monotonic, __pyx_k_monotonic, sizeof(__pyx_k_monotonic), 0, 0, 1, 1},
  143248. {&__pyx_n_s_move_to_end, __pyx_k_move_to_end, sizeof(__pyx_k_move_to_end), 0, 0, 1, 1},
  143249. {&__pyx_kp_u_must_be_0, __pyx_k_must_be_0, sizeof(__pyx_k_must_be_0), 0, 1, 0, 0},
  143250. {&__pyx_kp_u_must_be_low, __pyx_k_must_be_low, sizeof(__pyx_k_must_be_low), 0, 1, 0, 0},
  143251. {&__pyx_n_s_n, __pyx_k_n, sizeof(__pyx_k_n), 0, 0, 1, 1},
  143252. {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
  143253. {&__pyx_n_u_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 1, 0, 1},
  143254. {&__pyx_n_s_name_2, __pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 0, 1, 1},
  143255. {&__pyx_n_s_new, __pyx_k_new, sizeof(__pyx_k_new), 0, 0, 1, 1},
  143256. {&__pyx_kp_u_new_callbacks_were_queued_during, __pyx_k_new_callbacks_were_queued_during, sizeof(__pyx_k_new_callbacks_were_queued_during), 0, 1, 0, 0},
  143257. {&__pyx_kp_u_new_poll_handles_were_queued_dur, __pyx_k_new_poll_handles_were_queued_dur, sizeof(__pyx_k_new_poll_handles_were_queued_dur), 0, 1, 0, 0},
  143258. {&__pyx_kp_u_new_timers_were_queued_during_lo, __pyx_k_new_timers_were_queued_during_lo, sizeof(__pyx_k_new_timers_were_queued_during_lo), 0, 1, 0, 0},
  143259. {&__pyx_kp_s_no_default___reduce___due_to_non, __pyx_k_no_default___reduce___due_to_non, sizeof(__pyx_k_no_default___reduce___due_to_non), 0, 0, 1, 0},
  143260. {&__pyx_kp_u_no_path_and_sock_were_specified, __pyx_k_no_path_and_sock_were_specified, sizeof(__pyx_k_no_path_and_sock_were_specified), 0, 1, 0, 0},
  143261. {&__pyx_kp_u_no_python_buffer_is_allocated_in, __pyx_k_no_python_buffer_is_allocated_in, sizeof(__pyx_k_no_python_buffer_is_allocated_in), 0, 1, 0, 0},
  143262. {&__pyx_n_s_noop, __pyx_k_noop, sizeof(__pyx_k_noop), 0, 0, 1, 1},
  143263. {&__pyx_n_s_noop_2, __pyx_k_noop_2, sizeof(__pyx_k_noop_2), 0, 0, 1, 1},
  143264. {&__pyx_n_s_object, __pyx_k_object, sizeof(__pyx_k_object), 0, 0, 1, 1},
  143265. {&__pyx_kp_u_object_created_at_most_recent_ca, __pyx_k_object_created_at_most_recent_ca, sizeof(__pyx_k_object_created_at_most_recent_ca), 0, 1, 0, 0},
  143266. {&__pyx_kp_u_objs_handles, __pyx_k_objs_handles, sizeof(__pyx_k_objs_handles), 0, 1, 0, 0},
  143267. {&__pyx_n_s_on_ssl_connected, __pyx_k_on_ssl_connected, sizeof(__pyx_k_on_ssl_connected), 0, 0, 1, 1},
  143268. {&__pyx_n_s_open, __pyx_k_open, sizeof(__pyx_k_open), 0, 0, 1, 1},
  143269. {&__pyx_kp_u_open__StreamWriteContext_is_bein, __pyx_k_open__StreamWriteContext_is_bein, sizeof(__pyx_k_open__StreamWriteContext_is_bein), 0, 1, 0, 0},
  143270. {&__pyx_kp_u_open__UDPSendContext_is_being_de, __pyx_k_open__UDPSendContext_is_being_de, sizeof(__pyx_k_open__UDPSendContext_is_being_de), 0, 1, 0, 0},
  143271. {&__pyx_n_s_os, __pyx_k_os, sizeof(__pyx_k_os), 0, 0, 1, 1},
  143272. {&__pyx_n_s_partial, __pyx_k_partial, sizeof(__pyx_k_partial), 0, 0, 1, 1},
  143273. {&__pyx_n_s_pass_fds, __pyx_k_pass_fds, sizeof(__pyx_k_pass_fds), 0, 0, 1, 1},
  143274. {&__pyx_n_s_path, __pyx_k_path, sizeof(__pyx_k_path), 0, 0, 1, 1},
  143275. {&__pyx_kp_u_path_and_sock_can_not_be_specifi, __pyx_k_path_and_sock_can_not_be_specifi, sizeof(__pyx_k_path_and_sock_can_not_be_specifi), 0, 1, 0, 0},
  143276. {&__pyx_kp_u_path_was_not_specified_and_no_so, __pyx_k_path_was_not_specified_and_no_so, sizeof(__pyx_k_path_was_not_specified_and_no_so), 0, 1, 0, 0},
  143277. {&__pyx_n_s_pause_reading, __pyx_k_pause_reading, sizeof(__pyx_k_pause_reading), 0, 0, 1, 1},
  143278. {&__pyx_n_s_pause_writing, __pyx_k_pause_writing, sizeof(__pyx_k_pause_writing), 0, 0, 1, 1},
  143279. {&__pyx_n_s_peercert, __pyx_k_peercert, sizeof(__pyx_k_peercert), 0, 0, 1, 1},
  143280. {&__pyx_n_u_peername, __pyx_k_peername, sizeof(__pyx_k_peername), 0, 1, 0, 1},
  143281. {&__pyx_n_s_pending, __pyx_k_pending, sizeof(__pyx_k_pending), 0, 0, 1, 1},
  143282. {&__pyx_n_s_pickle, __pyx_k_pickle, sizeof(__pyx_k_pickle), 0, 0, 1, 1},
  143283. {&__pyx_n_s_pipe, __pyx_k_pipe, sizeof(__pyx_k_pipe), 0, 0, 1, 1},
  143284. {&__pyx_n_u_pipe, __pyx_k_pipe, sizeof(__pyx_k_pipe), 0, 1, 0, 1},
  143285. {&__pyx_kp_u_pipe_2, __pyx_k_pipe_2, sizeof(__pyx_k_pipe_2), 0, 1, 0, 0},
  143286. {&__pyx_n_s_pipe_connection_lost, __pyx_k_pipe_connection_lost, sizeof(__pyx_k_pipe_connection_lost), 0, 0, 1, 1},
  143287. {&__pyx_n_s_pipe_data_received, __pyx_k_pipe_data_received, sizeof(__pyx_k_pipe_data_received), 0, 0, 1, 1},
  143288. {&__pyx_n_s_platform, __pyx_k_platform, sizeof(__pyx_k_platform), 0, 0, 1, 1},
  143289. {&__pyx_n_s_pop, __pyx_k_pop, sizeof(__pyx_k_pop), 0, 0, 1, 1},
  143290. {&__pyx_n_s_popitem, __pyx_k_popitem, sizeof(__pyx_k_popitem), 0, 0, 1, 1},
  143291. {&__pyx_n_s_popleft, __pyx_k_popleft, sizeof(__pyx_k_popleft), 0, 0, 1, 1},
  143292. {&__pyx_n_s_port, __pyx_k_port, sizeof(__pyx_k_port), 0, 0, 1, 1},
  143293. {&__pyx_kp_u_port_must_be_a_str_bytes_or_int, __pyx_k_port_must_be_a_str_bytes_or_int, sizeof(__pyx_k_port_must_be_a_str_bytes_or_int), 0, 1, 0, 0},
  143294. {&__pyx_n_u_posix, __pyx_k_posix, sizeof(__pyx_k_posix), 0, 1, 0, 1},
  143295. {&__pyx_n_s_preexec_fn, __pyx_k_preexec_fn, sizeof(__pyx_k_preexec_fn), 0, 0, 1, 1},
  143296. {&__pyx_n_s_prepare, __pyx_k_prepare, sizeof(__pyx_k_prepare), 0, 0, 1, 1},
  143297. {&__pyx_n_s_print, __pyx_k_print, sizeof(__pyx_k_print), 0, 0, 1, 1},
  143298. {&__pyx_n_u_print_debug_info, __pyx_k_print_debug_info, sizeof(__pyx_k_print_debug_info), 0, 1, 0, 1},
  143299. {&__pyx_n_s_proc, __pyx_k_proc, sizeof(__pyx_k_proc), 0, 0, 1, 1},
  143300. {&__pyx_n_s_process_exited, __pyx_k_process_exited, sizeof(__pyx_k_process_exited), 0, 0, 1, 1},
  143301. {&__pyx_n_s_program, __pyx_k_program, sizeof(__pyx_k_program), 0, 0, 1, 1},
  143302. {&__pyx_n_s_proto, __pyx_k_proto, sizeof(__pyx_k_proto), 0, 0, 1, 1},
  143303. {&__pyx_n_s_proto_factory, __pyx_k_proto_factory, sizeof(__pyx_k_proto_factory), 0, 0, 1, 1},
  143304. {&__pyx_n_s_protocol, __pyx_k_protocol, sizeof(__pyx_k_protocol), 0, 0, 1, 1},
  143305. {&__pyx_n_u_protocol, __pyx_k_protocol, sizeof(__pyx_k_protocol), 0, 1, 0, 1},
  143306. {&__pyx_n_s_protocol_factory, __pyx_k_protocol_factory, sizeof(__pyx_k_protocol_factory), 0, 0, 1, 1},
  143307. {&__pyx_kp_u_protocol_is_not_set_cannot_call, __pyx_k_protocol_is_not_set_cannot_call, sizeof(__pyx_k_protocol_is_not_set_cannot_call), 0, 1, 0, 0},
  143308. {&__pyx_kp_u_protocol_is_required, __pyx_k_protocol_is_required, sizeof(__pyx_k_protocol_is_required), 0, 1, 0, 0},
  143309. {&__pyx_kp_u_protocol_pause_writing_failed, __pyx_k_protocol_pause_writing_failed, sizeof(__pyx_k_protocol_pause_writing_failed), 0, 1, 0, 0},
  143310. {&__pyx_kp_u_protocol_resume_writing_failed, __pyx_k_protocol_resume_writing_failed, sizeof(__pyx_k_protocol_resume_writing_failed), 0, 1, 0, 0},
  143311. {&__pyx_n_s_pyx_PickleError, __pyx_k_pyx_PickleError, sizeof(__pyx_k_pyx_PickleError), 0, 0, 1, 1},
  143312. {&__pyx_n_s_pyx_checksum, __pyx_k_pyx_checksum, sizeof(__pyx_k_pyx_checksum), 0, 0, 1, 1},
  143313. {&__pyx_n_s_pyx_result, __pyx_k_pyx_result, sizeof(__pyx_k_pyx_result), 0, 0, 1, 1},
  143314. {&__pyx_n_s_pyx_state, __pyx_k_pyx_state, sizeof(__pyx_k_pyx_state), 0, 0, 1, 1},
  143315. {&__pyx_n_s_pyx_type, __pyx_k_pyx_type, sizeof(__pyx_k_pyx_type), 0, 0, 1, 1},
  143316. {&__pyx_n_s_pyx_unpickle_LruCache, __pyx_k_pyx_unpickle_LruCache, sizeof(__pyx_k_pyx_unpickle_LruCache), 0, 0, 1, 1},
  143317. {&__pyx_n_s_pyx_unpickle_PseudoSocket, __pyx_k_pyx_unpickle_PseudoSocket, sizeof(__pyx_k_pyx_unpickle_PseudoSocket), 0, 0, 1, 1},
  143318. {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1},
  143319. {&__pyx_n_s_qualname, __pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 0, 1, 1},
  143320. {&__pyx_n_u_qualname, __pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 1, 0, 1},
  143321. {&__pyx_kp_u_r_SSL_handshake_took_1f_ms, __pyx_k_r_SSL_handshake_took_1f_ms, sizeof(__pyx_k_r_SSL_handshake_took_1f_ms), 0, 1, 0, 0},
  143322. {&__pyx_kp_u_r_fileno_returned_non_integer, __pyx_k_r_fileno_returned_non_integer, sizeof(__pyx_k_r_fileno_returned_non_integer), 0, 1, 0, 0},
  143323. {&__pyx_kp_u_r_received_EOF, __pyx_k_r_received_EOF, sizeof(__pyx_k_r_received_EOF), 0, 1, 0, 0},
  143324. {&__pyx_kp_u_r_s, __pyx_k_r_s, sizeof(__pyx_k_r_s), 0, 1, 0, 0},
  143325. {&__pyx_kp_u_r_starts_SSL_handshake, __pyx_k_r_starts_SSL_handshake, sizeof(__pyx_k_r_starts_SSL_handshake), 0, 1, 0, 0},
  143326. {&__pyx_kp_u_raddr_s, __pyx_k_raddr_s, sizeof(__pyx_k_raddr_s), 0, 1, 0, 0},
  143327. {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
  143328. {&__pyx_n_s_read, __pyx_k_read, sizeof(__pyx_k_read), 0, 0, 1, 1},
  143329. {&__pyx_n_s_recv, __pyx_k_recv, sizeof(__pyx_k_recv), 0, 0, 1, 1},
  143330. {&__pyx_n_s_recv_into, __pyx_k_recv_into, sizeof(__pyx_k_recv_into), 0, 0, 1, 1},
  143331. {&__pyx_kp_u_recv_into_method, __pyx_k_recv_into_method, sizeof(__pyx_k_recv_into_method), 0, 1, 0, 0},
  143332. {&__pyx_kp_u_recv_method, __pyx_k_recv_method, sizeof(__pyx_k_recv_method), 0, 1, 0, 0},
  143333. {&__pyx_kp_u_recvfrom_into_method, __pyx_k_recvfrom_into_method, sizeof(__pyx_k_recvfrom_into_method), 0, 1, 0, 0},
  143334. {&__pyx_kp_u_recvfrom_method, __pyx_k_recvfrom_method, sizeof(__pyx_k_recvfrom_method), 0, 1, 0, 0},
  143335. {&__pyx_kp_u_recvmsg_into_method, __pyx_k_recvmsg_into_method, sizeof(__pyx_k_recvmsg_into_method), 0, 1, 0, 0},
  143336. {&__pyx_kp_u_recvmsg_method, __pyx_k_recvmsg_method, sizeof(__pyx_k_recvmsg_method), 0, 1, 0, 0},
  143337. {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1},
  143338. {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1},
  143339. {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1},
  143340. {&__pyx_n_s_remote_addr, __pyx_k_remote_addr, sizeof(__pyx_k_remote_addr), 0, 0, 1, 1},
  143341. {&__pyx_kp_u_remote_addr_must_be_a_tuple_of_h, __pyx_k_remote_addr_must_be_a_tuple_of_h, sizeof(__pyx_k_remote_addr_must_be_a_tuple_of_h), 0, 1, 0, 0},
  143342. {&__pyx_n_s_remove, __pyx_k_remove, sizeof(__pyx_k_remove), 0, 0, 1, 1},
  143343. {&__pyx_n_s_remove_done_callback, __pyx_k_remove_done_callback, sizeof(__pyx_k_remove_done_callback), 0, 0, 1, 1},
  143344. {&__pyx_n_s_remove_reader, __pyx_k_remove_reader, sizeof(__pyx_k_remove_reader), 0, 0, 1, 1},
  143345. {&__pyx_n_s_remove_signal_handler, __pyx_k_remove_signal_handler, sizeof(__pyx_k_remove_signal_handler), 0, 0, 1, 1},
  143346. {&__pyx_n_s_remove_writer, __pyx_k_remove_writer, sizeof(__pyx_k_remove_writer), 0, 0, 1, 1},
  143347. {&__pyx_n_s_repr, __pyx_k_repr, sizeof(__pyx_k_repr), 0, 0, 1, 1},
  143348. {&__pyx_n_s_restore_signals, __pyx_k_restore_signals, sizeof(__pyx_k_restore_signals), 0, 0, 1, 1},
  143349. {&__pyx_n_s_result, __pyx_k_result, sizeof(__pyx_k_result), 0, 0, 1, 1},
  143350. {&__pyx_n_s_resume, __pyx_k_resume, sizeof(__pyx_k_resume), 0, 0, 1, 1},
  143351. {&__pyx_n_s_resume_reading, __pyx_k_resume_reading, sizeof(__pyx_k_resume_reading), 0, 0, 1, 1},
  143352. {&__pyx_n_s_resume_writing, __pyx_k_resume_writing, sizeof(__pyx_k_resume_writing), 0, 0, 1, 1},
  143353. {&__pyx_n_s_return_exceptions, __pyx_k_return_exceptions, sizeof(__pyx_k_return_exceptions), 0, 0, 1, 1},
  143354. {&__pyx_kp_u_returning_true_from_eof_received, __pyx_k_returning_true_from_eof_received, sizeof(__pyx_k_returning_true_from_eof_received), 0, 1, 0, 0},
  143355. {&__pyx_n_s_reuse_address, __pyx_k_reuse_address, sizeof(__pyx_k_reuse_address), 0, 0, 1, 1},
  143356. {&__pyx_n_s_reuse_port, __pyx_k_reuse_port, sizeof(__pyx_k_reuse_port), 0, 0, 1, 1},
  143357. {&__pyx_kp_u_reuse_port_not_supported_by_sock, __pyx_k_reuse_port_not_supported_by_sock, sizeof(__pyx_k_reuse_port_not_supported_by_sock), 0, 1, 0, 0},
  143358. {&__pyx_n_s_reverse, __pyx_k_reverse, sizeof(__pyx_k_reverse), 0, 0, 1, 1},
  143359. {&__pyx_n_s_round, __pyx_k_round, sizeof(__pyx_k_round), 0, 0, 1, 1},
  143360. {&__pyx_n_s_rstrip, __pyx_k_rstrip, sizeof(__pyx_k_rstrip), 0, 0, 1, 1},
  143361. {&__pyx_n_s_run_forever, __pyx_k_run_forever, sizeof(__pyx_k_run_forever), 0, 0, 1, 1},
  143362. {&__pyx_n_s_run_until_complete_locals_lambda, __pyx_k_run_until_complete_locals_lambda, sizeof(__pyx_k_run_until_complete_locals_lambda), 0, 0, 1, 1},
  143363. {&__pyx_kp_u_running_closed_debug, __pyx_k_running_closed_debug, sizeof(__pyx_k_running_closed_debug), 0, 1, 0, 0},
  143364. {&__pyx_kp_u_seconds_aborting_the_connection, __pyx_k_seconds_aborting_the_connection, sizeof(__pyx_k_seconds_aborting_the_connection), 0, 1, 0, 0},
  143365. {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1},
  143366. {&__pyx_n_u_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 1, 0, 1},
  143367. {&__pyx_n_s_self_2, __pyx_k_self_2, sizeof(__pyx_k_self_2), 0, 0, 1, 1},
  143368. {&__pyx_kp_s_self_py_buf_self_req_cannot_be_c, __pyx_k_self_py_buf_self_req_cannot_be_c, sizeof(__pyx_k_self_py_buf_self_req_cannot_be_c), 0, 0, 1, 0},
  143369. {&__pyx_kp_s_self_py_bufs_self_py_bufs_sml_se, __pyx_k_self_py_bufs_self_py_bufs_sml_se, sizeof(__pyx_k_self_py_bufs_self_py_bufs_sml_se), 0, 0, 1, 0},
  143370. {&__pyx_n_s_send, __pyx_k_send, sizeof(__pyx_k_send), 0, 0, 1, 1},
  143371. {&__pyx_kp_u_send_method, __pyx_k_send_method, sizeof(__pyx_k_send_method), 0, 1, 0, 0},
  143372. {&__pyx_kp_u_sendall_method, __pyx_k_sendall_method, sizeof(__pyx_k_sendall_method), 0, 1, 0, 0},
  143373. {&__pyx_kp_u_sendfile_method, __pyx_k_sendfile_method, sizeof(__pyx_k_sendfile_method), 0, 1, 0, 0},
  143374. {&__pyx_kp_u_sendmsg_afalg_method, __pyx_k_sendmsg_afalg_method, sizeof(__pyx_k_sendmsg_afalg_method), 0, 1, 0, 0},
  143375. {&__pyx_kp_u_sendmsg_method, __pyx_k_sendmsg_method, sizeof(__pyx_k_sendmsg_method), 0, 1, 0, 0},
  143376. {&__pyx_kp_u_sendto_method, __pyx_k_sendto_method, sizeof(__pyx_k_sendto_method), 0, 1, 0, 0},
  143377. {&__pyx_n_s_serve_forever, __pyx_k_serve_forever, sizeof(__pyx_k_serve_forever), 0, 0, 1, 1},
  143378. {&__pyx_kp_u_server, __pyx_k_server, sizeof(__pyx_k_server), 0, 1, 0, 0},
  143379. {&__pyx_n_s_server_hostname, __pyx_k_server_hostname, sizeof(__pyx_k_server_hostname), 0, 0, 1, 1},
  143380. {&__pyx_kp_u_server_hostname_is_only_meaningf, __pyx_k_server_hostname_is_only_meaningf, sizeof(__pyx_k_server_hostname_is_only_meaningf), 0, 1, 0, 0},
  143381. {&__pyx_n_s_server_side, __pyx_k_server_side, sizeof(__pyx_k_server_side), 0, 0, 1, 1},
  143382. {&__pyx_kp_u_service_proto_not_found, __pyx_k_service_proto_not_found, sizeof(__pyx_k_service_proto_not_found), 0, 1, 0, 0},
  143383. {&__pyx_n_s_set_asyncgen_hooks, __pyx_k_set_asyncgen_hooks, sizeof(__pyx_k_set_asyncgen_hooks), 0, 0, 1, 1},
  143384. {&__pyx_n_s_set_coroutine_origin_tracking_de, __pyx_k_set_coroutine_origin_tracking_de, sizeof(__pyx_k_set_coroutine_origin_tracking_de), 0, 0, 1, 1},
  143385. {&__pyx_n_u_set_coroutine_wrapper, __pyx_k_set_coroutine_wrapper, sizeof(__pyx_k_set_coroutine_wrapper), 0, 1, 0, 1},
  143386. {&__pyx_n_s_set_debug, __pyx_k_set_debug, sizeof(__pyx_k_set_debug), 0, 0, 1, 1},
  143387. {&__pyx_n_s_set_exception, __pyx_k_set_exception, sizeof(__pyx_k_set_exception), 0, 0, 1, 1},
  143388. {&__pyx_n_s_set_inheritable, __pyx_k_set_inheritable, sizeof(__pyx_k_set_inheritable), 0, 0, 1, 1},
  143389. {&__pyx_n_s_set_protocol, __pyx_k_set_protocol, sizeof(__pyx_k_set_protocol), 0, 0, 1, 1},
  143390. {&__pyx_n_s_set_result, __pyx_k_set_result, sizeof(__pyx_k_set_result), 0, 0, 1, 1},
  143391. {&__pyx_n_u_set_running_loop, __pyx_k_set_running_loop, sizeof(__pyx_k_set_running_loop), 0, 1, 0, 1},
  143392. {&__pyx_n_s_set_wakeup_fd, __pyx_k_set_wakeup_fd, sizeof(__pyx_k_set_wakeup_fd), 0, 0, 1, 1},
  143393. {&__pyx_kp_u_set_wakeup_fd_1_failed_s, __pyx_k_set_wakeup_fd_1_failed_s, sizeof(__pyx_k_set_wakeup_fd_1_failed_s), 0, 1, 0, 0},
  143394. {&__pyx_kp_u_set_wakeup_fd_only_works_in_main, __pyx_k_set_wakeup_fd_only_works_in_main, sizeof(__pyx_k_set_wakeup_fd_only_works_in_main), 0, 1, 0, 0},
  143395. {&__pyx_n_s_setblocking, __pyx_k_setblocking, sizeof(__pyx_k_setblocking), 0, 0, 1, 1},
  143396. {&__pyx_kp_u_setblocking_transport_sockets_ca, __pyx_k_setblocking_transport_sockets_ca, sizeof(__pyx_k_setblocking_transport_sockets_ca), 0, 1, 0, 0},
  143397. {&__pyx_n_s_setsockopt, __pyx_k_setsockopt, sizeof(__pyx_k_setsockopt), 0, 0, 1, 1},
  143398. {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1},
  143399. {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1},
  143400. {&__pyx_n_s_settimeout, __pyx_k_settimeout, sizeof(__pyx_k_settimeout), 0, 0, 1, 1},
  143401. {&__pyx_kp_u_settimeout_only_0_timeout_is_all, __pyx_k_settimeout_only_0_timeout_is_all, sizeof(__pyx_k_settimeout_only_0_timeout_is_all), 0, 1, 0, 0},
  143402. {&__pyx_n_s_share, __pyx_k_share, sizeof(__pyx_k_share), 0, 0, 1, 1},
  143403. {&__pyx_n_s_shell, __pyx_k_shell, sizeof(__pyx_k_shell), 0, 0, 1, 1},
  143404. {&__pyx_kp_u_shell_must_be_False, __pyx_k_shell_must_be_False, sizeof(__pyx_k_shell_must_be_False), 0, 1, 0, 0},
  143405. {&__pyx_kp_u_shell_must_be_True, __pyx_k_shell_must_be_True, sizeof(__pyx_k_shell_must_be_True), 0, 1, 0, 0},
  143406. {&__pyx_n_s_shutdown, __pyx_k_shutdown, sizeof(__pyx_k_shutdown), 0, 0, 1, 1},
  143407. {&__pyx_n_s_shutdown_asyncgens, __pyx_k_shutdown_asyncgens, sizeof(__pyx_k_shutdown_asyncgens), 0, 0, 1, 1},
  143408. {&__pyx_kp_u_shutdown_method, __pyx_k_shutdown_method, sizeof(__pyx_k_shutdown_method), 0, 1, 0, 0},
  143409. {&__pyx_n_s_sig, __pyx_k_sig, sizeof(__pyx_k_sig), 0, 0, 1, 1},
  143410. {&__pyx_kp_u_sig_cannot_be_caught, __pyx_k_sig_cannot_be_caught, sizeof(__pyx_k_sig_cannot_be_caught), 0, 1, 0, 0},
  143411. {&__pyx_kp_u_sig_must_be_an_int_not_r, __pyx_k_sig_must_be_an_int_not_r, sizeof(__pyx_k_sig_must_be_an_int_not_r), 0, 1, 0, 0},
  143412. {&__pyx_kp_u_sig_out_of_range_1, __pyx_k_sig_out_of_range_1, sizeof(__pyx_k_sig_out_of_range_1), 0, 1, 0, 0},
  143413. {&__pyx_n_s_sighandler, __pyx_k_sighandler, sizeof(__pyx_k_sighandler), 0, 0, 1, 1},
  143414. {&__pyx_n_s_siginterrupt, __pyx_k_siginterrupt, sizeof(__pyx_k_siginterrupt), 0, 0, 1, 1},
  143415. {&__pyx_n_s_signal, __pyx_k_signal, sizeof(__pyx_k_signal), 0, 0, 1, 1},
  143416. {&__pyx_n_s_signum, __pyx_k_signum, sizeof(__pyx_k_signum), 0, 0, 1, 1},
  143417. {&__pyx_n_s_sleep, __pyx_k_sleep, sizeof(__pyx_k_sleep), 0, 0, 1, 1},
  143418. {&__pyx_n_s_sock, __pyx_k_sock, sizeof(__pyx_k_sock), 0, 0, 1, 1},
  143419. {&__pyx_n_s_sock_accept, __pyx_k_sock_accept, sizeof(__pyx_k_sock_accept), 0, 0, 1, 1},
  143420. {&__pyx_n_s_sock_connect, __pyx_k_sock_connect, sizeof(__pyx_k_sock_connect), 0, 0, 1, 1},
  143421. {&__pyx_n_s_sock_recv, __pyx_k_sock_recv, sizeof(__pyx_k_sock_recv), 0, 0, 1, 1},
  143422. {&__pyx_n_s_sock_recv_into, __pyx_k_sock_recv_into, sizeof(__pyx_k_sock_recv_into), 0, 0, 1, 1},
  143423. {&__pyx_kp_u_sock_recv_into_is_called_on_a_c, __pyx_k_sock_recv_into_is_called_on_a_c, sizeof(__pyx_k_sock_recv_into_is_called_on_a_c), 0, 1, 0, 0},
  143424. {&__pyx_kp_u_sock_recv_is_called_on_a_cancel, __pyx_k_sock_recv_is_called_on_a_cancel, sizeof(__pyx_k_sock_recv_is_called_on_a_cancel), 0, 1, 0, 0},
  143425. {&__pyx_n_s_sock_sendall, __pyx_k_sock_sendall, sizeof(__pyx_k_sock_sendall), 0, 0, 1, 1},
  143426. {&__pyx_kp_u_sock_sendall_is_called_on_a_can, __pyx_k_sock_sendall_is_called_on_a_can, sizeof(__pyx_k_sock_sendall_is_called_on_a_can), 0, 1, 0, 0},
  143427. {&__pyx_n_s_sockaddr, __pyx_k_sockaddr, sizeof(__pyx_k_sockaddr), 0, 0, 1, 1},
  143428. {&__pyx_kp_u_sockaddr_must_be_a_tuple_of_2_3, __pyx_k_sockaddr_must_be_a_tuple_of_2_3, sizeof(__pyx_k_sockaddr_must_be_a_tuple_of_2_3), 0, 1, 0, 0},
  143429. {&__pyx_kp_u_sockaddr_resolved_to_multiple_ad, __pyx_k_sockaddr_resolved_to_multiple_ad, sizeof(__pyx_k_sockaddr_resolved_to_multiple_ad), 0, 1, 0, 0},
  143430. {&__pyx_kp_u_socket, __pyx_k_socket, sizeof(__pyx_k_socket), 0, 1, 0, 0},
  143431. {&__pyx_n_s_socket_2, __pyx_k_socket_2, sizeof(__pyx_k_socket_2), 0, 0, 1, 1},
  143432. {&__pyx_n_u_socket_2, __pyx_k_socket_2, sizeof(__pyx_k_socket_2), 0, 1, 0, 1},
  143433. {&__pyx_kp_u_socket_family_mismatch_or_a_DNS, __pyx_k_socket_family_mismatch_or_a_DNS, sizeof(__pyx_k_socket_family_mismatch_or_a_DNS), 0, 1, 0, 0},
  143434. {&__pyx_kp_u_socket_modifier_keyword_argument, __pyx_k_socket_modifier_keyword_argument, sizeof(__pyx_k_socket_modifier_keyword_argument), 0, 1, 0, 0},
  143435. {&__pyx_kp_u_socket_send_raised_exception, __pyx_k_socket_send_raised_exception, sizeof(__pyx_k_socket_send_raised_exception), 0, 1, 0, 0},
  143436. {&__pyx_n_s_socketpair, __pyx_k_socketpair, sizeof(__pyx_k_socketpair), 0, 0, 1, 1},
  143437. {&__pyx_kp_u_sockets, __pyx_k_sockets, sizeof(__pyx_k_sockets), 0, 1, 0, 0},
  143438. {&__pyx_n_s_sockets_2, __pyx_k_sockets_2, sizeof(__pyx_k_sockets_2), 0, 0, 1, 1},
  143439. {&__pyx_n_u_sockname, __pyx_k_sockname, sizeof(__pyx_k_sockname), 0, 1, 0, 1},
  143440. {&__pyx_n_s_source, __pyx_k_source, sizeof(__pyx_k_source), 0, 0, 1, 1},
  143441. {&__pyx_n_u_source_traceback, __pyx_k_source_traceback, sizeof(__pyx_k_source_traceback), 0, 1, 0, 1},
  143442. {&__pyx_n_s_split, __pyx_k_split, sizeof(__pyx_k_split), 0, 0, 1, 1},
  143443. {&__pyx_n_s_ssl, __pyx_k_ssl, sizeof(__pyx_k_ssl), 0, 0, 1, 1},
  143444. {&__pyx_kp_u_ssl_argument_must_be_an_SSLConte, __pyx_k_ssl_argument_must_be_an_SSLConte, sizeof(__pyx_k_ssl_argument_must_be_an_SSLConte), 0, 1, 0, 0},
  143445. {&__pyx_n_s_ssl_handshake_timeout, __pyx_k_ssl_handshake_timeout, sizeof(__pyx_k_ssl_handshake_timeout), 0, 0, 1, 1},
  143446. {&__pyx_kp_u_ssl_handshake_timeout_is_only_me, __pyx_k_ssl_handshake_timeout_is_only_me, sizeof(__pyx_k_ssl_handshake_timeout_is_only_me), 0, 1, 0, 0},
  143447. {&__pyx_kp_u_ssl_handshake_timeout_should_be, __pyx_k_ssl_handshake_timeout_should_be, sizeof(__pyx_k_ssl_handshake_timeout_should_be), 0, 1, 0, 0},
  143448. {&__pyx_kp_u_ssl_is_expected_to_be_None_or_an, __pyx_k_ssl_is_expected_to_be_None_or_an, sizeof(__pyx_k_ssl_is_expected_to_be_None_or_an), 0, 1, 0, 0},
  143449. {&__pyx_n_s_ssl_object, __pyx_k_ssl_object, sizeof(__pyx_k_ssl_object), 0, 0, 1, 1},
  143450. {&__pyx_n_s_ssl_protocol, __pyx_k_ssl_protocol, sizeof(__pyx_k_ssl_protocol), 0, 0, 1, 1},
  143451. {&__pyx_n_s_ssl_shutdown_timeout, __pyx_k_ssl_shutdown_timeout, sizeof(__pyx_k_ssl_shutdown_timeout), 0, 0, 1, 1},
  143452. {&__pyx_kp_u_ssl_shutdown_timeout_is_only_mea, __pyx_k_ssl_shutdown_timeout_is_only_mea, sizeof(__pyx_k_ssl_shutdown_timeout_is_only_mea), 0, 1, 0, 0},
  143453. {&__pyx_kp_u_ssl_shutdown_timeout_should_be_a, __pyx_k_ssl_shutdown_timeout_should_be_a, sizeof(__pyx_k_ssl_shutdown_timeout_should_be_a), 0, 1, 0, 0},
  143454. {&__pyx_n_s_sslcontext, __pyx_k_sslcontext, sizeof(__pyx_k_sslcontext), 0, 0, 1, 1},
  143455. {&__pyx_kp_u_sslcontext_is_expected_to_be_an, __pyx_k_sslcontext_is_expected_to_be_an, sizeof(__pyx_k_sslcontext_is_expected_to_be_an), 0, 1, 0, 0},
  143456. {&__pyx_n_s_st_mode, __pyx_k_st_mode, sizeof(__pyx_k_st_mode), 0, 0, 1, 1},
  143457. {&__pyx_kp_u_start_init_can_only_be_called, __pyx_k_start_init_can_only_be_called, sizeof(__pyx_k_start_init_can_only_be_called), 0, 1, 0, 0},
  143458. {&__pyx_n_s_start_new_session, __pyx_k_start_new_session, sizeof(__pyx_k_start_new_session), 0, 0, 1, 1},
  143459. {&__pyx_n_s_start_serving, __pyx_k_start_serving, sizeof(__pyx_k_start_serving), 0, 0, 1, 1},
  143460. {&__pyx_n_s_start_tls, __pyx_k_start_tls, sizeof(__pyx_k_start_tls), 0, 0, 1, 1},
  143461. {&__pyx_n_s_startupinfo, __pyx_k_startupinfo, sizeof(__pyx_k_startupinfo), 0, 0, 1, 1},
  143462. {&__pyx_kp_u_startupinfo_is_not_supported, __pyx_k_startupinfo_is_not_supported, sizeof(__pyx_k_startupinfo_is_not_supported), 0, 1, 0, 0},
  143463. {&__pyx_n_s_stat, __pyx_k_stat, sizeof(__pyx_k_stat), 0, 0, 1, 1},
  143464. {&__pyx_n_s_stderr, __pyx_k_stderr, sizeof(__pyx_k_stderr), 0, 0, 1, 1},
  143465. {&__pyx_n_s_stdin, __pyx_k_stdin, sizeof(__pyx_k_stdin), 0, 0, 1, 1},
  143466. {&__pyx_n_s_stdio_fut, __pyx_k_stdio_fut, sizeof(__pyx_k_stdio_fut), 0, 0, 1, 1},
  143467. {&__pyx_n_s_stdio_inited, __pyx_k_stdio_inited, sizeof(__pyx_k_stdio_inited), 0, 0, 1, 1},
  143468. {&__pyx_n_s_stdout, __pyx_k_stdout, sizeof(__pyx_k_stdout), 0, 0, 1, 1},
  143469. {&__pyx_n_s_stop, __pyx_k_stop, sizeof(__pyx_k_stop), 0, 0, 1, 1},
  143470. {&__pyx_kp_u_stream_is_open_after_UVStream__t, __pyx_k_stream_is_open_after_UVStream__t, sizeof(__pyx_k_stream_is_open_after_UVStream__t), 0, 1, 0, 0},
  143471. {&__pyx_n_s_strerror, __pyx_k_strerror, sizeof(__pyx_k_strerror), 0, 0, 1, 1},
  143472. {&__pyx_kp_s_stringsource, __pyx_k_stringsource, sizeof(__pyx_k_stringsource), 0, 0, 1, 0},
  143473. {&__pyx_n_s_submit, __pyx_k_submit, sizeof(__pyx_k_submit), 0, 0, 1, 1},
  143474. {&__pyx_n_s_subprocess, __pyx_k_subprocess, sizeof(__pyx_k_subprocess), 0, 0, 1, 1},
  143475. {&__pyx_kp_u_subprocess_STDOUT_is_supported_o, __pyx_k_subprocess_STDOUT_is_supported_o, sizeof(__pyx_k_subprocess_STDOUT_is_supported_o), 0, 1, 0, 0},
  143476. {&__pyx_n_s_subprocess_exec, __pyx_k_subprocess_exec, sizeof(__pyx_k_subprocess_exec), 0, 0, 1, 1},
  143477. {&__pyx_n_s_subprocess_run, __pyx_k_subprocess_run, sizeof(__pyx_k_subprocess_run), 0, 0, 1, 1},
  143478. {&__pyx_n_s_subprocess_shell, __pyx_k_subprocess_shell, sizeof(__pyx_k_subprocess_shell), 0, 0, 1, 1},
  143479. {&__pyx_n_s_subtract, __pyx_k_subtract, sizeof(__pyx_k_subtract), 0, 0, 1, 1},
  143480. {&__pyx_n_s_super, __pyx_k_super, sizeof(__pyx_k_super), 0, 0, 1, 1},
  143481. {&__pyx_n_s_sys, __pyx_k_sys, sizeof(__pyx_k_sys), 0, 0, 1, 1},
  143482. {&__pyx_n_u_task, __pyx_k_task, sizeof(__pyx_k_task), 0, 1, 0, 1},
  143483. {&__pyx_kp_u_task_factory_must_be_a_callable, __pyx_k_task_factory_must_be_a_callable, sizeof(__pyx_k_task_factory_must_be_a_callable), 0, 1, 0, 0},
  143484. {&__pyx_n_u_tcp, __pyx_k_tcp, sizeof(__pyx_k_tcp), 0, 1, 0, 1},
  143485. {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
  143486. {&__pyx_n_s_test_coroutine_1, __pyx_k_test_coroutine_1, sizeof(__pyx_k_test_coroutine_1), 0, 0, 1, 1},
  143487. {&__pyx_kp_u_the_socket_must_be_non_blocking, __pyx_k_the_socket_must_be_non_blocking, sizeof(__pyx_k_the_socket_must_be_non_blocking), 0, 1, 0, 0},
  143488. {&__pyx_kp_u_this_event_loop_is_already_runni, __pyx_k_this_event_loop_is_already_runni, sizeof(__pyx_k_this_event_loop_is_already_runni), 0, 1, 0, 0},
  143489. {&__pyx_n_s_threading, __pyx_k_threading, sizeof(__pyx_k_threading), 0, 0, 1, 1},
  143490. {&__pyx_n_s_throw, __pyx_k_throw, sizeof(__pyx_k_throw), 0, 0, 1, 1},
  143491. {&__pyx_n_s_time, __pyx_k_time, sizeof(__pyx_k_time), 0, 0, 1, 1},
  143492. {&__pyx_n_s_timeout, __pyx_k_timeout, sizeof(__pyx_k_timeout), 0, 0, 1, 1},
  143493. {&__pyx_n_s_traceback, __pyx_k_traceback, sizeof(__pyx_k_traceback), 0, 0, 1, 1},
  143494. {&__pyx_n_s_traceback_2, __pyx_k_traceback_2, sizeof(__pyx_k_traceback_2), 0, 0, 1, 1},
  143495. {&__pyx_n_s_transport, __pyx_k_transport, sizeof(__pyx_k_transport), 0, 0, 1, 1},
  143496. {&__pyx_n_u_transport, __pyx_k_transport, sizeof(__pyx_k_transport), 0, 1, 0, 1},
  143497. {&__pyx_kp_u_transport_2, __pyx_k_transport_2, sizeof(__pyx_k_transport_2), 0, 1, 0, 0},
  143498. {&__pyx_kp_u_transport_sockets_do_not_support, __pyx_k_transport_sockets_do_not_support, sizeof(__pyx_k_transport_sockets_do_not_support), 0, 1, 0, 0},
  143499. {&__pyx_n_s_transports, __pyx_k_transports, sizeof(__pyx_k_transports), 0, 0, 1, 1},
  143500. {&__pyx_kp_u_try_write_sent_all_data_and_ret, __pyx_k_try_write_sent_all_data_and_ret, sizeof(__pyx_k_try_write_sent_all_data_and_ret), 0, 1, 0, 0},
  143501. {&__pyx_n_s_type, __pyx_k_type, sizeof(__pyx_k_type), 0, 0, 1, 1},
  143502. {&__pyx_n_u_udp, __pyx_k_udp, sizeof(__pyx_k_udp), 0, 1, 0, 1},
  143503. {&__pyx_kp_u_unable_to_listen_no_protocol_fac, __pyx_k_unable_to_listen_no_protocol_fac, sizeof(__pyx_k_unable_to_listen_no_protocol_fac), 0, 1, 0, 0},
  143504. {&__pyx_kp_u_unable_to_perform_operation_on_r, __pyx_k_unable_to_perform_operation_on_r, sizeof(__pyx_k_unable_to_perform_operation_on_r), 0, 1, 0, 0},
  143505. {&__pyx_kp_u_unable_to_start_the_loop_it_was, __pyx_k_unable_to_start_the_loop_it_was, sizeof(__pyx_k_unable_to_start_the_loop_it_was), 0, 1, 0, 0},
  143506. {&__pyx_kp_u_unclosed_resource_r, __pyx_k_unclosed_resource_r, sizeof(__pyx_k_unclosed_resource_r), 0, 1, 0, 0},
  143507. {&__pyx_kp_u_unclosed_resource_r_2, __pyx_k_unclosed_resource_r_2, sizeof(__pyx_k_unclosed_resource_r_2), 0, 1, 0, 0},
  143508. {&__pyx_kp_u_unclosed_resource_r_could_not_se, __pyx_k_unclosed_resource_r_could_not_se, sizeof(__pyx_k_unclosed_resource_r_could_not_se), 0, 1, 0, 0},
  143509. {&__pyx_kp_u_unclosed_transport_uvloop_loop, __pyx_k_unclosed_transport_uvloop_loop, sizeof(__pyx_k_unclosed_transport_uvloop_loop), 0, 1, 0, 0},
  143510. {&__pyx_kp_u_unexpected_address_family, __pyx_k_unexpected_address_family, sizeof(__pyx_k_unexpected_address_family), 0, 1, 0, 0},
  143511. {&__pyx_kp_u_unhandled_error_or_an_empty_buff, __pyx_k_unhandled_error_or_an_empty_buff, sizeof(__pyx_k_unhandled_error_or_an_empty_buff), 0, 1, 0, 0},
  143512. {&__pyx_n_s_universal_newlines, __pyx_k_universal_newlines, sizeof(__pyx_k_universal_newlines), 0, 0, 1, 1},
  143513. {&__pyx_kp_u_universal_newlines_must_be_False, __pyx_k_universal_newlines_must_be_False, sizeof(__pyx_k_universal_newlines_must_be_False), 0, 1, 0, 0},
  143514. {&__pyx_kp_u_unix_socket_path, __pyx_k_unix_socket_path, sizeof(__pyx_k_unix_socket_path), 0, 1, 0, 0},
  143515. {&__pyx_kp_u_unopened_TCPServer, __pyx_k_unopened_TCPServer, sizeof(__pyx_k_unopened_TCPServer), 0, 1, 0, 0},
  143516. {&__pyx_n_s_unwrap, __pyx_k_unwrap, sizeof(__pyx_k_unwrap), 0, 0, 1, 1},
  143517. {&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1},
  143518. {&__pyx_kp_u_uv_close_handle_cb_handle_loop, __pyx_k_uv_close_handle_cb_handle_loop, sizeof(__pyx_k_uv_close_handle_cb_handle_loop), 0, 1, 0, 0},
  143519. {&__pyx_kp_u_uv_handle_t_current_freed_total, __pyx_k_uv_handle_t_current_freed_total, sizeof(__pyx_k_uv_handle_t_current_freed_total), 0, 1, 0, 0},
  143520. {&__pyx_kp_u_uv_udp_receive_callback_addr_is, __pyx_k_uv_udp_receive_callback_addr_is, sizeof(__pyx_k_uv_udp_receive_callback_addr_is), 0, 1, 0, 0},
  143521. {&__pyx_kp_u_uvloop_PseudoSocket_fd_family_s, __pyx_k_uvloop_PseudoSocket_fd_family_s, sizeof(__pyx_k_uvloop_PseudoSocket_fd_family_s), 0, 1, 0, 0},
  143522. {&__pyx_kp_s_uvloop_handles_process_pyx, __pyx_k_uvloop_handles_process_pyx, sizeof(__pyx_k_uvloop_handles_process_pyx), 0, 0, 1, 0},
  143523. {&__pyx_n_s_uvloop_loop, __pyx_k_uvloop_loop, sizeof(__pyx_k_uvloop_loop), 0, 0, 1, 1},
  143524. {&__pyx_kp_s_uvloop_loop_pyx, __pyx_k_uvloop_loop_pyx, sizeof(__pyx_k_uvloop_loop_pyx), 0, 0, 1, 0},
  143525. {&__pyx_n_s_uvloop_sleep_after_fork, __pyx_k_uvloop_sleep_after_fork, sizeof(__pyx_k_uvloop_sleep_after_fork), 0, 0, 1, 1},
  143526. {&__pyx_kp_s_uvloop_sslproto_pyx, __pyx_k_uvloop_sslproto_pyx, sizeof(__pyx_k_uvloop_sslproto_pyx), 0, 0, 1, 0},
  143527. {&__pyx_n_s_values, __pyx_k_values, sizeof(__pyx_k_values), 0, 0, 1, 1},
  143528. {&__pyx_n_s_version_info, __pyx_k_version_info, sizeof(__pyx_k_version_info), 0, 0, 1, 1},
  143529. {&__pyx_n_s_wait, __pyx_k_wait, sizeof(__pyx_k_wait), 0, 0, 1, 1},
  143530. {&__pyx_n_s_wait_closed, __pyx_k_wait_closed, sizeof(__pyx_k_wait_closed), 0, 0, 1, 1},
  143531. {&__pyx_n_s_waiter, __pyx_k_waiter, sizeof(__pyx_k_waiter), 0, 0, 1, 1},
  143532. {&__pyx_n_s_walk_stack, __pyx_k_walk_stack, sizeof(__pyx_k_walk_stack), 0, 0, 1, 1},
  143533. {&__pyx_n_s_warn, __pyx_k_warn, sizeof(__pyx_k_warn), 0, 0, 1, 1},
  143534. {&__pyx_n_s_warn_on_full_buffer, __pyx_k_warn_on_full_buffer, sizeof(__pyx_k_warn_on_full_buffer), 0, 0, 1, 1},
  143535. {&__pyx_n_s_warning, __pyx_k_warning, sizeof(__pyx_k_warning), 0, 0, 1, 1},
  143536. {&__pyx_n_s_warnings, __pyx_k_warnings, sizeof(__pyx_k_warnings), 0, 0, 1, 1},
  143537. {&__pyx_n_u_wb, __pyx_k_wb, sizeof(__pyx_k_wb), 0, 1, 0, 1},
  143538. {&__pyx_n_s_weakref, __pyx_k_weakref, sizeof(__pyx_k_weakref), 0, 0, 1, 1},
  143539. {&__pyx_n_s_when, __pyx_k_when, sizeof(__pyx_k_when), 0, 0, 1, 1},
  143540. {&__pyx_kp_u_without_no_gc_clear_loop_was_se, __pyx_k_without_no_gc_clear_loop_was_se, sizeof(__pyx_k_without_no_gc_clear_loop_was_se), 0, 1, 0, 0},
  143541. {&__pyx_n_s_wrap, __pyx_k_wrap, sizeof(__pyx_k_wrap), 0, 0, 1, 1},
  143542. {&__pyx_n_s_wrap_bio, __pyx_k_wrap_bio, sizeof(__pyx_k_wrap_bio), 0, 0, 1, 1},
  143543. {&__pyx_n_s_wrap_future, __pyx_k_wrap_future, sizeof(__pyx_k_wrap_future), 0, 0, 1, 1},
  143544. {&__pyx_n_s_write, __pyx_k_write, sizeof(__pyx_k_write), 0, 0, 1, 1},
  143545. {&__pyx_n_s_zip, __pyx_k_zip, sizeof(__pyx_k_zip), 0, 0, 1, 1},
  143546. {0, 0, 0, 0, 0, 0, 0}
  143547. };
  143548. static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
  143549. __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_n_s_object); if (!__pyx_builtin_object) __PYX_ERR(0, 1, __pyx_L1_error)
  143550. __pyx_builtin_OSError = __Pyx_GetBuiltinName(__pyx_n_s_OSError); if (!__pyx_builtin_OSError) __PYX_ERR(1, 13, __pyx_L1_error)
  143551. __pyx_builtin_MemoryError = __Pyx_GetBuiltinName(__pyx_n_s_MemoryError); if (!__pyx_builtin_MemoryError) __PYX_ERR(2, 105, __pyx_L1_error)
  143552. __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(2, 191, __pyx_L1_error)
  143553. __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(2, 252, __pyx_L1_error)
  143554. __pyx_builtin_KeyError = __Pyx_GetBuiltinName(__pyx_n_s_KeyError); if (!__pyx_builtin_KeyError) __PYX_ERR(2, 362, __pyx_L1_error)
  143555. __pyx_builtin_BaseException = __Pyx_GetBuiltinName(__pyx_n_s_BaseException); if (!__pyx_builtin_BaseException) __PYX_ERR(2, 394, __pyx_L1_error)
  143556. __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(2, 633, __pyx_L1_error)
  143557. __pyx_builtin_AttributeError = __Pyx_GetBuiltinName(__pyx_n_s_AttributeError); if (!__pyx_builtin_AttributeError) __PYX_ERR(2, 685, __pyx_L1_error)
  143558. __pyx_builtin_RuntimeWarning = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeWarning); if (!__pyx_builtin_RuntimeWarning) __PYX_ERR(2, 1075, __pyx_L1_error)
  143559. __pyx_builtin_print = __Pyx_GetBuiltinName(__pyx_n_s_print); if (!__pyx_builtin_print) __PYX_ERR(2, 1104, __pyx_L1_error)
  143560. __pyx_builtin_round = __Pyx_GetBuiltinName(__pyx_n_s_round); if (!__pyx_builtin_round) __PYX_ERR(2, 1259, __pyx_L1_error)
  143561. __pyx_builtin_OverflowError = __Pyx_GetBuiltinName(__pyx_n_s_OverflowError); if (!__pyx_builtin_OverflowError) __PYX_ERR(2, 1455, __pyx_L1_error)
  143562. __pyx_builtin_zip = __Pyx_GetBuiltinName(__pyx_n_s_zip); if (!__pyx_builtin_zip) __PYX_ERR(2, 3028, __pyx_L1_error)
  143563. __pyx_builtin_NotImplementedError = __Pyx_GetBuiltinName(__pyx_n_s_NotImplementedError); if (!__pyx_builtin_NotImplementedError) __PYX_ERR(3, 24, __pyx_L1_error)
  143564. __pyx_builtin_id = __Pyx_GetBuiltinName(__pyx_n_s_id); if (!__pyx_builtin_id) __PYX_ERR(4, 218, __pyx_L1_error)
  143565. __pyx_builtin_super = __Pyx_GetBuiltinName(__pyx_n_s_super); if (!__pyx_builtin_super) __PYX_ERR(5, 164, __pyx_L1_error)
  143566. __pyx_builtin_open = __Pyx_GetBuiltinName(__pyx_n_s_open); if (!__pyx_builtin_open) __PYX_ERR(6, 184, __pyx_L1_error)
  143567. __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(6, 225, __pyx_L1_error)
  143568. __pyx_builtin_UnicodeEncodeError = __Pyx_GetBuiltinName(__pyx_n_s_UnicodeEncodeError); if (!__pyx_builtin_UnicodeEncodeError) __PYX_ERR(7, 104, __pyx_L1_error)
  143569. return 0;
  143570. __pyx_L1_error:;
  143571. return -1;
  143572. }
  143573. static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
  143574. __Pyx_RefNannyDeclarations
  143575. __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
  143576. /* "uvloop/loop.pyx":191
  143577. * def __dealloc__(self):
  143578. * if self._running == 1:
  143579. * raise RuntimeError('deallocating a running event loop!') # <<<<<<<<<<<<<<
  143580. * if self._closed == 0:
  143581. * aio_logger.error("deallocating an open event loop")
  143582. */
  143583. __pyx_tuple_ = PyTuple_Pack(1, __pyx_kp_u_deallocating_a_running_event_loo); if (unlikely(!__pyx_tuple_)) __PYX_ERR(2, 191, __pyx_L1_error)
  143584. __Pyx_GOTREF(__pyx_tuple_);
  143585. __Pyx_GIVEREF(__pyx_tuple_);
  143586. /* "uvloop/loop.pyx":450
  143587. *
  143588. * if self._closed == 1:
  143589. * raise RuntimeError('unable to start the loop; it was closed') # <<<<<<<<<<<<<<
  143590. *
  143591. * if self._running == 1:
  143592. */
  143593. __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_u_unable_to_start_the_loop_it_was); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(2, 450, __pyx_L1_error)
  143594. __Pyx_GOTREF(__pyx_tuple__3);
  143595. __Pyx_GIVEREF(__pyx_tuple__3);
  143596. /* "uvloop/loop.pyx":453
  143597. *
  143598. * if self._running == 1:
  143599. * raise RuntimeError('this event loop is already running.') # <<<<<<<<<<<<<<
  143600. *
  143601. * if (aio_get_running_loop is not None and
  143602. */
  143603. __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_u_this_event_loop_is_already_runni); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(2, 453, __pyx_L1_error)
  143604. __Pyx_GOTREF(__pyx_tuple__4);
  143605. __Pyx_GIVEREF(__pyx_tuple__4);
  143606. /* "uvloop/loop.pyx":457
  143607. * if (aio_get_running_loop is not None and
  143608. * aio_get_running_loop() is not None):
  143609. * raise RuntimeError( # <<<<<<<<<<<<<<
  143610. * 'Cannot run the event loop while another loop is running')
  143611. *
  143612. */
  143613. __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_u_Cannot_run_the_event_loop_while); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(2, 457, __pyx_L1_error)
  143614. __Pyx_GOTREF(__pyx_tuple__5);
  143615. __Pyx_GIVEREF(__pyx_tuple__5);
  143616. /* "uvloop/loop.pyx":498
  143617. *
  143618. * if self._running == 1:
  143619. * raise RuntimeError("Cannot close a running event loop") # <<<<<<<<<<<<<<
  143620. *
  143621. * if self._closed == 1:
  143622. */
  143623. __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_u_Cannot_close_a_running_event_loo); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(2, 498, __pyx_L1_error)
  143624. __Pyx_GOTREF(__pyx_tuple__6);
  143625. __Pyx_GIVEREF(__pyx_tuple__6);
  143626. /* "uvloop/loop.pyx":596
  143627. * if UVLOOP_DEBUG:
  143628. * if len(self._queued_streams) != queued_len:
  143629. * raise RuntimeError( # <<<<<<<<<<<<<<
  143630. * 'loop._queued_streams are not empty after '
  143631. * '_exec_queued_writes')
  143632. */
  143633. __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_u_loop__queued_streams_are_not_emp); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(2, 596, __pyx_L1_error)
  143634. __Pyx_GOTREF(__pyx_tuple__7);
  143635. __Pyx_GIVEREF(__pyx_tuple__7);
  143636. /* "uvloop/loop.pyx":641
  143637. * cdef inline _check_closed(self):
  143638. * if self._closed == 1:
  143639. * raise RuntimeError('Event loop is closed') # <<<<<<<<<<<<<<
  143640. *
  143641. * cdef inline _check_thread(self):
  143642. */
  143643. __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_u_Event_loop_is_closed); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(2, 641, __pyx_L1_error)
  143644. __Pyx_GOTREF(__pyx_tuple__8);
  143645. __Pyx_GIVEREF(__pyx_tuple__8);
  143646. /* "uvloop/loop.pyx":651
  143647. *
  143648. * if thread_id != self._thread_id:
  143649. * raise RuntimeError( # <<<<<<<<<<<<<<
  143650. * "Non-thread-safe operation invoked on an event loop other "
  143651. * "than the current one")
  143652. */
  143653. __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_u_Non_thread_safe_operation_invoke); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(2, 651, __pyx_L1_error)
  143654. __Pyx_GOTREF(__pyx_tuple__9);
  143655. __Pyx_GIVEREF(__pyx_tuple__9);
  143656. /* "uvloop/loop.pyx":840
  143657. * port = str(port).encode()
  143658. * if port is not None and not isinstance(port, bytes):
  143659. * raise TypeError('port must be a str, bytes or int') # <<<<<<<<<<<<<<
  143660. *
  143661. * if isinstance(host, str):
  143662. */
  143663. __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_u_port_must_be_a_str_bytes_or_int); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(2, 840, __pyx_L1_error)
  143664. __Pyx_GOTREF(__pyx_tuple__10);
  143665. __Pyx_GIVEREF(__pyx_tuple__10);
  143666. /* "uvloop/loop.pyx":846
  143667. * if host is not None:
  143668. * if not isinstance(host, bytes):
  143669. * raise TypeError('host must be a str or bytes') # <<<<<<<<<<<<<<
  143670. *
  143671. * fut = self._new_future()
  143672. */
  143673. __pyx_tuple__11 = PyTuple_Pack(1, __pyx_kp_u_host_must_be_a_str_or_bytes); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(2, 846, __pyx_L1_error)
  143674. __Pyx_GOTREF(__pyx_tuple__11);
  143675. __Pyx_GIVEREF(__pyx_tuple__11);
  143676. /* "uvloop/loop.pyx":850
  143677. * fut = self._new_future()
  143678. *
  143679. * def callback(result): # <<<<<<<<<<<<<<
  143680. * if AddrInfo.isinstance(result):
  143681. * try:
  143682. */
  143683. __pyx_tuple__12 = PyTuple_Pack(3, __pyx_n_s_result, __pyx_n_s_data, __pyx_n_s_ex); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(2, 850, __pyx_L1_error)
  143684. __Pyx_GOTREF(__pyx_tuple__12);
  143685. __Pyx_GIVEREF(__pyx_tuple__12);
  143686. __pyx_codeobj__13 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__12, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_uvloop_loop_pyx, __pyx_n_s_callback, 850, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__13)) __PYX_ERR(2, 850, __pyx_L1_error)
  143687. /* "uvloop/loop.pyx":874
  143688. * fut = self._new_future()
  143689. *
  143690. * def callback(result): # <<<<<<<<<<<<<<
  143691. * if isinstance(result, tuple):
  143692. * fut.set_result(result)
  143693. */
  143694. __pyx_tuple__14 = PyTuple_Pack(1, __pyx_n_s_result); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(2, 874, __pyx_L1_error)
  143695. __Pyx_GOTREF(__pyx_tuple__14);
  143696. __Pyx_GIVEREF(__pyx_tuple__14);
  143697. __pyx_codeobj__15 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__14, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_uvloop_loop_pyx, __pyx_n_s_callback, 874, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__15)) __PYX_ERR(2, 874, __pyx_L1_error)
  143698. /* "uvloop/loop.pyx":888
  143699. * if fut.cancelled():
  143700. * # Shouldn't happen with _SyncSocketReaderFuture.
  143701. * raise RuntimeError( # <<<<<<<<<<<<<<
  143702. * f'_sock_recv is called on a cancelled Future')
  143703. *
  143704. */
  143705. __pyx_tuple__16 = PyTuple_Pack(1, __pyx_kp_u_sock_recv_is_called_on_a_cancel); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(2, 888, __pyx_L1_error)
  143706. __Pyx_GOTREF(__pyx_tuple__16);
  143707. __Pyx_GIVEREF(__pyx_tuple__16);
  143708. /* "uvloop/loop.pyx":913
  143709. * if fut.cancelled():
  143710. * # Shouldn't happen with _SyncSocketReaderFuture.
  143711. * raise RuntimeError( # <<<<<<<<<<<<<<
  143712. * f'_sock_recv_into is called on a cancelled Future')
  143713. *
  143714. */
  143715. __pyx_tuple__17 = PyTuple_Pack(1, __pyx_kp_u_sock_recv_into_is_called_on_a_c); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(2, 913, __pyx_L1_error)
  143716. __Pyx_GOTREF(__pyx_tuple__17);
  143717. __Pyx_GIVEREF(__pyx_tuple__17);
  143718. /* "uvloop/loop.pyx":942
  143719. * if fut.cancelled():
  143720. * # Shouldn't happen with _SyncSocketReaderFuture.
  143721. * raise RuntimeError( # <<<<<<<<<<<<<<
  143722. * f'_sock_sendall is called on a cancelled Future')
  143723. *
  143724. */
  143725. __pyx_tuple__18 = PyTuple_Pack(1, __pyx_kp_u_sock_sendall_is_called_on_a_can); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(2, 942, __pyx_L1_error)
  143726. __Pyx_GOTREF(__pyx_tuple__18);
  143727. __Pyx_GIVEREF(__pyx_tuple__18);
  143728. /* "uvloop/loop.pyx":1104
  143729. * # OS
  143730. *
  143731. * print('---- Process info: -----') # <<<<<<<<<<<<<<
  143732. * print('Process memory: {}'.format(rusage.ru_maxrss))
  143733. * print('Number of signals: {}'.format(rusage.ru_nsignals))
  143734. */
  143735. __pyx_tuple__19 = PyTuple_Pack(1, __pyx_kp_u_Process_info); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(2, 1104, __pyx_L1_error)
  143736. __Pyx_GOTREF(__pyx_tuple__19);
  143737. __Pyx_GIVEREF(__pyx_tuple__19);
  143738. /* "uvloop/loop.pyx":1107
  143739. * print('Process memory: {}'.format(rusage.ru_maxrss))
  143740. * print('Number of signals: {}'.format(rusage.ru_nsignals))
  143741. * print('') # <<<<<<<<<<<<<<
  143742. *
  143743. * # Loop
  143744. */
  143745. __pyx_tuple__20 = PyTuple_Pack(1, __pyx_kp_u__2); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(2, 1107, __pyx_L1_error)
  143746. __Pyx_GOTREF(__pyx_tuple__20);
  143747. __Pyx_GIVEREF(__pyx_tuple__20);
  143748. /* "uvloop/loop.pyx":1111
  143749. * # Loop
  143750. *
  143751. * print('--- Loop debug info: ---') # <<<<<<<<<<<<<<
  143752. * print('Loop time: {}'.format(self.time()))
  143753. * print('Errors logged: {}'.format(
  143754. */
  143755. __pyx_tuple__21 = PyTuple_Pack(1, __pyx_kp_u_Loop_debug_info); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(2, 1111, __pyx_L1_error)
  143756. __Pyx_GOTREF(__pyx_tuple__21);
  143757. __Pyx_GIVEREF(__pyx_tuple__21);
  143758. /* "uvloop/loop.pyx":1124
  143759. * print()
  143760. *
  143761. * print(' alive | closed |') # <<<<<<<<<<<<<<
  143762. * print('UVHandles python | libuv | total')
  143763. * print(' objs | handles |')
  143764. */
  143765. __pyx_tuple__22 = PyTuple_Pack(1, __pyx_kp_u_alive_closed); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(2, 1124, __pyx_L1_error)
  143766. __Pyx_GOTREF(__pyx_tuple__22);
  143767. __Pyx_GIVEREF(__pyx_tuple__22);
  143768. /* "uvloop/loop.pyx":1125
  143769. *
  143770. * print(' alive | closed |')
  143771. * print('UVHandles python | libuv | total') # <<<<<<<<<<<<<<
  143772. * print(' objs | handles |')
  143773. * print('-------------------------------+---------+---------')
  143774. */
  143775. __pyx_tuple__23 = PyTuple_Pack(1, __pyx_kp_u_UVHandles_python_libuv_total); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(2, 1125, __pyx_L1_error)
  143776. __Pyx_GOTREF(__pyx_tuple__23);
  143777. __Pyx_GIVEREF(__pyx_tuple__23);
  143778. /* "uvloop/loop.pyx":1126
  143779. * print(' alive | closed |')
  143780. * print('UVHandles python | libuv | total')
  143781. * print(' objs | handles |') # <<<<<<<<<<<<<<
  143782. * print('-------------------------------+---------+---------')
  143783. * for name in sorted(self._debug_handles_total):
  143784. */
  143785. __pyx_tuple__24 = PyTuple_Pack(1, __pyx_kp_u_objs_handles); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(2, 1126, __pyx_L1_error)
  143786. __Pyx_GOTREF(__pyx_tuple__24);
  143787. __Pyx_GIVEREF(__pyx_tuple__24);
  143788. /* "uvloop/loop.pyx":1127
  143789. * print('UVHandles python | libuv | total')
  143790. * print(' objs | handles |')
  143791. * print('-------------------------------+---------+---------') # <<<<<<<<<<<<<<
  143792. * for name in sorted(self._debug_handles_total):
  143793. * print(' {: <18} {: >7} | {: >7} | {: >7}'.format(
  143794. */
  143795. __pyx_tuple__26 = PyTuple_Pack(1, __pyx_kp_u__25); if (unlikely(!__pyx_tuple__26)) __PYX_ERR(2, 1127, __pyx_L1_error)
  143796. __Pyx_GOTREF(__pyx_tuple__26);
  143797. __Pyx_GIVEREF(__pyx_tuple__26);
  143798. /* "uvloop/loop.pyx":1142
  143799. * print()
  143800. *
  143801. * print('--- Streams debug info: ---') # <<<<<<<<<<<<<<
  143802. * print('Write errors: {}'.format(
  143803. * self._debug_stream_write_errors_total))
  143804. */
  143805. __pyx_tuple__27 = PyTuple_Pack(1, __pyx_kp_u_Streams_debug_info); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(2, 1142, __pyx_L1_error)
  143806. __Pyx_GOTREF(__pyx_tuple__27);
  143807. __Pyx_GIVEREF(__pyx_tuple__27);
  143808. /* "uvloop/loop.pyx":1170
  143809. * print()
  143810. *
  143811. * print('--- Polls debug info: ---') # <<<<<<<<<<<<<<
  143812. * print('Read events: {}'.format(
  143813. * self._poll_read_events_total))
  143814. */
  143815. __pyx_tuple__28 = PyTuple_Pack(1, __pyx_kp_u_Polls_debug_info); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(2, 1170, __pyx_L1_error)
  143816. __Pyx_GOTREF(__pyx_tuple__28);
  143817. __Pyx_GIVEREF(__pyx_tuple__28);
  143818. /* "uvloop/loop.pyx":1181
  143819. * print()
  143820. *
  143821. * print('--- Sock ops successful on 1st try: ---') # <<<<<<<<<<<<<<
  143822. * print('Socket try-writes: {}'.format(
  143823. * self._sock_try_write_total))
  143824. */
  143825. __pyx_tuple__29 = PyTuple_Pack(1, __pyx_kp_u_Sock_ops_successful_on_1st_try); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(2, 1181, __pyx_L1_error)
  143826. __Pyx_GOTREF(__pyx_tuple__29);
  143827. __Pyx_GIVEREF(__pyx_tuple__29);
  143828. /* "uvloop/loop.pyx":1192
  143829. * return lambda: self._print_debug_info()
  143830. * else:
  143831. * raise AttributeError('print_debug_info') # <<<<<<<<<<<<<<
  143832. *
  143833. * # Public API
  143834. */
  143835. __pyx_tuple__30 = PyTuple_Pack(1, __pyx_n_u_print_debug_info); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(2, 1192, __pyx_L1_error)
  143836. __Pyx_GOTREF(__pyx_tuple__30);
  143837. __Pyx_GIVEREF(__pyx_tuple__30);
  143838. /* "uvloop/loop.pyx":1373
  143839. * """
  143840. * if factory is not None and not callable(factory):
  143841. * raise TypeError('task factory must be a callable or None') # <<<<<<<<<<<<<<
  143842. * self._task_factory = factory
  143843. *
  143844. */
  143845. __pyx_tuple__31 = PyTuple_Pack(1, __pyx_kp_u_task_factory_must_be_a_callable); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(2, 1373, __pyx_L1_error)
  143846. __Pyx_GOTREF(__pyx_tuple__31);
  143847. __Pyx_GIVEREF(__pyx_tuple__31);
  143848. /* "uvloop/loop.pyx":1415
  143849. * future.remove_done_callback(done_cb)
  143850. * if not future.done():
  143851. * raise RuntimeError('Event loop stopped before Future completed.') # <<<<<<<<<<<<<<
  143852. *
  143853. * return future.result()
  143854. */
  143855. __pyx_tuple__32 = PyTuple_Pack(1, __pyx_kp_u_Event_loop_stopped_before_Future); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(2, 1415, __pyx_L1_error)
  143856. __Pyx_GOTREF(__pyx_tuple__32);
  143857. __Pyx_GIVEREF(__pyx_tuple__32);
  143858. /* "uvloop/loop.pyx":1441
  143859. *
  143860. * if not isinstance(sockaddr, tuple):
  143861. * raise TypeError('getnameinfo() argument 1 must be a tuple') # <<<<<<<<<<<<<<
  143862. *
  143863. * sl = len(sockaddr)
  143864. */
  143865. __pyx_tuple__33 = PyTuple_Pack(1, __pyx_kp_u_getnameinfo_argument_1_must_be_a); if (unlikely(!__pyx_tuple__33)) __PYX_ERR(2, 1441, __pyx_L1_error)
  143866. __Pyx_GOTREF(__pyx_tuple__33);
  143867. __Pyx_GIVEREF(__pyx_tuple__33);
  143868. /* "uvloop/loop.pyx":1446
  143869. *
  143870. * if sl < 2 or sl > 4:
  143871. * raise ValueError('sockaddr must be a tuple of 2, 3 or 4 values') # <<<<<<<<<<<<<<
  143872. *
  143873. * if sl > 2:
  143874. */
  143875. __pyx_tuple__34 = PyTuple_Pack(1, __pyx_kp_u_sockaddr_must_be_a_tuple_of_2_3); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(2, 1446, __pyx_L1_error)
  143876. __Pyx_GOTREF(__pyx_tuple__34);
  143877. __Pyx_GIVEREF(__pyx_tuple__34);
  143878. /* "uvloop/loop.pyx":1462
  143879. * scope_id = sockaddr[3]
  143880. * if scope_id < 0 or scope_id > 2 ** 32:
  143881. * raise OverflowError( # <<<<<<<<<<<<<<
  143882. * 'getsockaddrarg: scope_id must be unsigned 32 bit integer')
  143883. * else:
  143884. */
  143885. __pyx_tuple__35 = PyTuple_Pack(1, __pyx_kp_u_getsockaddrarg_scope_id_must_be); if (unlikely(!__pyx_tuple__35)) __PYX_ERR(2, 1462, __pyx_L1_error)
  143886. __Pyx_GOTREF(__pyx_tuple__35);
  143887. __Pyx_GIVEREF(__pyx_tuple__35);
  143888. /* "uvloop/loop.pyx":1478
  143889. *
  143890. * if ai.ai_next:
  143891. * raise OSError("sockaddr resolved to multiple addresses") # <<<<<<<<<<<<<<
  143892. *
  143893. * if ai.ai_family == uv.AF_INET:
  143894. */
  143895. __pyx_tuple__36 = PyTuple_Pack(1, __pyx_kp_u_sockaddr_resolved_to_multiple_ad); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(2, 1478, __pyx_L1_error)
  143896. __Pyx_GOTREF(__pyx_tuple__36);
  143897. __Pyx_GIVEREF(__pyx_tuple__36);
  143898. /* "uvloop/loop.pyx":1482
  143899. * if ai.ai_family == uv.AF_INET:
  143900. * if sl > 2:
  143901. * raise OSError("IPv4 sockaddr must be 2 tuple") # <<<<<<<<<<<<<<
  143902. * elif ai.ai_family == uv.AF_INET6:
  143903. * # Modify some fields in `ai`
  143904. */
  143905. __pyx_tuple__37 = PyTuple_Pack(1, __pyx_kp_u_IPv4_sockaddr_must_be_2_tuple); if (unlikely(!__pyx_tuple__37)) __PYX_ERR(2, 1482, __pyx_L1_error)
  143906. __Pyx_GOTREF(__pyx_tuple__37);
  143907. __Pyx_GIVEREF(__pyx_tuple__37);
  143908. /* "uvloop/loop.pyx":1602
  143909. * if sock is not None and sock.family == uv.AF_UNIX:
  143910. * if host is not None or port is not None:
  143911. * raise ValueError( # <<<<<<<<<<<<<<
  143912. * 'host/port and sock can not be specified at the same time')
  143913. * return await self.create_unix_server(
  143914. */
  143915. __pyx_tuple__40 = PyTuple_Pack(1, __pyx_kp_u_host_port_and_sock_can_not_be_sp); if (unlikely(!__pyx_tuple__40)) __PYX_ERR(2, 1602, __pyx_L1_error)
  143916. __Pyx_GOTREF(__pyx_tuple__40);
  143917. __Pyx_GIVEREF(__pyx_tuple__40);
  143918. /* "uvloop/loop.pyx":1612
  143919. * if ssl is not None:
  143920. * if not isinstance(ssl, ssl_SSLContext):
  143921. * raise TypeError('ssl argument must be an SSLContext or None') # <<<<<<<<<<<<<<
  143922. * else:
  143923. * if ssl_handshake_timeout is not None:
  143924. */
  143925. __pyx_tuple__41 = PyTuple_Pack(1, __pyx_kp_u_ssl_argument_must_be_an_SSLConte); if (unlikely(!__pyx_tuple__41)) __PYX_ERR(2, 1612, __pyx_L1_error)
  143926. __Pyx_GOTREF(__pyx_tuple__41);
  143927. __Pyx_GIVEREF(__pyx_tuple__41);
  143928. /* "uvloop/loop.pyx":1615
  143929. * else:
  143930. * if ssl_handshake_timeout is not None:
  143931. * raise ValueError( # <<<<<<<<<<<<<<
  143932. * 'ssl_handshake_timeout is only meaningful with ssl')
  143933. * if ssl_shutdown_timeout is not None:
  143934. */
  143935. __pyx_tuple__42 = PyTuple_Pack(1, __pyx_kp_u_ssl_handshake_timeout_is_only_me); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(2, 1615, __pyx_L1_error)
  143936. __Pyx_GOTREF(__pyx_tuple__42);
  143937. __Pyx_GIVEREF(__pyx_tuple__42);
  143938. /* "uvloop/loop.pyx":1618
  143939. * 'ssl_handshake_timeout is only meaningful with ssl')
  143940. * if ssl_shutdown_timeout is not None:
  143941. * raise ValueError( # <<<<<<<<<<<<<<
  143942. * 'ssl_shutdown_timeout is only meaningful with ssl')
  143943. *
  143944. */
  143945. __pyx_tuple__43 = PyTuple_Pack(1, __pyx_kp_u_ssl_shutdown_timeout_is_only_mea); if (unlikely(!__pyx_tuple__43)) __PYX_ERR(2, 1618, __pyx_L1_error)
  143946. __Pyx_GOTREF(__pyx_tuple__43);
  143947. __Pyx_GIVEREF(__pyx_tuple__43);
  143948. /* "uvloop/loop.pyx":1630
  143949. * reuse_port = bool(reuse_port)
  143950. * if reuse_port and not has_SO_REUSEPORT:
  143951. * raise ValueError( # <<<<<<<<<<<<<<
  143952. * 'reuse_port not supported by socket module')
  143953. *
  143954. */
  143955. __pyx_tuple__44 = PyTuple_Pack(1, __pyx_kp_u_reuse_port_not_supported_by_sock); if (unlikely(!__pyx_tuple__44)) __PYX_ERR(2, 1630, __pyx_L1_error)
  143956. __Pyx_GOTREF(__pyx_tuple__44);
  143957. __Pyx_GIVEREF(__pyx_tuple__44);
  143958. /* "uvloop/loop.pyx":1653
  143959. * while addrinfo != NULL:
  143960. * if addrinfo.ai_family == uv.AF_UNSPEC:
  143961. * raise RuntimeError('AF_UNSPEC in DNS results') # <<<<<<<<<<<<<<
  143962. *
  143963. * try:
  143964. */
  143965. __pyx_tuple__45 = PyTuple_Pack(1, __pyx_kp_u_AF_UNSPEC_in_DNS_results); if (unlikely(!__pyx_tuple__45)) __PYX_ERR(2, 1653, __pyx_L1_error)
  143966. __Pyx_GOTREF(__pyx_tuple__45);
  143967. __Pyx_GIVEREF(__pyx_tuple__45);
  143968. /* "uvloop/loop.pyx":1716
  143969. * else:
  143970. * if sock is None:
  143971. * raise ValueError('Neither host/port nor sock were specified') # <<<<<<<<<<<<<<
  143972. * if not _is_sock_stream(sock.type):
  143973. * raise ValueError(
  143974. */
  143975. __pyx_tuple__47 = PyTuple_Pack(1, __pyx_kp_u_Neither_host_port_nor_sock_were); if (unlikely(!__pyx_tuple__47)) __PYX_ERR(2, 1716, __pyx_L1_error)
  143976. __Pyx_GOTREF(__pyx_tuple__47);
  143977. __Pyx_GIVEREF(__pyx_tuple__47);
  143978. /* "uvloop/loop.pyx":1798
  143979. * if server_hostname is None:
  143980. * if not host:
  143981. * raise ValueError('You must set server_hostname ' # <<<<<<<<<<<<<<
  143982. * 'when using ssl without a host')
  143983. * server_hostname = host
  143984. */
  143985. __pyx_tuple__48 = PyTuple_Pack(1, __pyx_kp_u_You_must_set_server_hostname_whe); if (unlikely(!__pyx_tuple__48)) __PYX_ERR(2, 1798, __pyx_L1_error)
  143986. __Pyx_GOTREF(__pyx_tuple__48);
  143987. __Pyx_GIVEREF(__pyx_tuple__48);
  143988. /* "uvloop/loop.pyx":1811
  143989. * else:
  143990. * if server_hostname is not None:
  143991. * raise ValueError('server_hostname is only meaningful with ssl') # <<<<<<<<<<<<<<
  143992. * if ssl_handshake_timeout is not None:
  143993. * raise ValueError(
  143994. */
  143995. __pyx_tuple__49 = PyTuple_Pack(1, __pyx_kp_u_server_hostname_is_only_meaningf); if (unlikely(!__pyx_tuple__49)) __PYX_ERR(2, 1811, __pyx_L1_error)
  143996. __Pyx_GOTREF(__pyx_tuple__49);
  143997. __Pyx_GIVEREF(__pyx_tuple__49);
  143998. /* "uvloop/loop.pyx":1846
  143999. * if not isinstance(local_addr, (tuple, list)) or \
  144000. * len(local_addr) != 2:
  144001. * raise ValueError( # <<<<<<<<<<<<<<
  144002. * 'local_addr must be a tuple of host and port')
  144003. *
  144004. */
  144005. __pyx_tuple__50 = PyTuple_Pack(1, __pyx_kp_u_local_addr_must_be_a_tuple_of_ho); if (unlikely(!__pyx_tuple__50)) __PYX_ERR(2, 1846, __pyx_L1_error)
  144006. __Pyx_GOTREF(__pyx_tuple__50);
  144007. __Pyx_GIVEREF(__pyx_tuple__50);
  144008. /* "uvloop/loop.pyx":1871
  144009. * ai_remote = f1.result()
  144010. * if ai_remote.data is NULL:
  144011. * raise OSError('getaddrinfo() returned empty list') # <<<<<<<<<<<<<<
  144012. * rai = ai_remote.data
  144013. *
  144014. */
  144015. __pyx_tuple__51 = PyTuple_Pack(1, __pyx_kp_u_getaddrinfo_returned_empty_list); if (unlikely(!__pyx_tuple__51)) __PYX_ERR(2, 1871, __pyx_L1_error)
  144016. __Pyx_GOTREF(__pyx_tuple__51);
  144017. __Pyx_GIVEREF(__pyx_tuple__51);
  144018. /* "uvloop/loop.pyx":1877
  144019. * ai_local = f2.result()
  144020. * if ai_local.data is NULL:
  144021. * raise OSError( # <<<<<<<<<<<<<<
  144022. * 'getaddrinfo() returned empty list for local_addr')
  144023. * lai = ai_local.data
  144024. */
  144025. __pyx_tuple__52 = PyTuple_Pack(1, __pyx_kp_u_getaddrinfo_returned_empty_list_2); if (unlikely(!__pyx_tuple__52)) __PYX_ERR(2, 1877, __pyx_L1_error)
  144026. __Pyx_GOTREF(__pyx_tuple__52);
  144027. __Pyx_GIVEREF(__pyx_tuple__52);
  144028. /* "uvloop/loop.pyx":1934
  144029. * else:
  144030. * if sock is None:
  144031. * raise ValueError( # <<<<<<<<<<<<<<
  144032. * 'host and port was not specified and no sock specified')
  144033. * if not _is_sock_stream(sock.type):
  144034. */
  144035. __pyx_tuple__54 = PyTuple_Pack(1, __pyx_kp_u_host_and_port_was_not_specified); if (unlikely(!__pyx_tuple__54)) __PYX_ERR(2, 1934, __pyx_L1_error)
  144036. __Pyx_GOTREF(__pyx_tuple__54);
  144037. __Pyx_GIVEREF(__pyx_tuple__54);
  144038. /* "uvloop/loop.pyx":2021
  144039. * if path is not None:
  144040. * if sock is not None:
  144041. * raise ValueError( # <<<<<<<<<<<<<<
  144042. * 'path and sock can not be specified at the same time')
  144043. * orig_path = path
  144044. */
  144045. __pyx_tuple__55 = PyTuple_Pack(1, __pyx_kp_u_path_and_sock_can_not_be_specifi); if (unlikely(!__pyx_tuple__55)) __PYX_ERR(2, 2021, __pyx_L1_error)
  144046. __Pyx_GOTREF(__pyx_tuple__55);
  144047. __Pyx_GIVEREF(__pyx_tuple__55);
  144048. /* "uvloop/loop.pyx":2073
  144049. * else:
  144050. * if sock is None:
  144051. * raise ValueError( # <<<<<<<<<<<<<<
  144052. * 'path was not specified, and no sock specified')
  144053. *
  144054. */
  144055. __pyx_tuple__56 = PyTuple_Pack(1, __pyx_kp_u_path_was_not_specified_and_no_so); if (unlikely(!__pyx_tuple__56)) __PYX_ERR(2, 2073, __pyx_L1_error)
  144056. __Pyx_GOTREF(__pyx_tuple__56);
  144057. __Pyx_GIVEREF(__pyx_tuple__56);
  144058. /* "uvloop/loop.pyx":2170
  144059. * else:
  144060. * if sock is None:
  144061. * raise ValueError('no path and sock were specified') # <<<<<<<<<<<<<<
  144062. *
  144063. * if sock.family != uv.AF_UNIX or not _is_sock_stream(sock.type):
  144064. */
  144065. __pyx_tuple__57 = PyTuple_Pack(1, __pyx_kp_u_no_path_and_sock_were_specified); if (unlikely(!__pyx_tuple__57)) __PYX_ERR(2, 2170, __pyx_L1_error)
  144066. __Pyx_GOTREF(__pyx_tuple__57);
  144067. __Pyx_GIVEREF(__pyx_tuple__57);
  144068. /* "uvloop/loop.pyx":2294
  144069. * # in the default implementation, as well as for subclassed
  144070. * # event loops with overloaded "default_exception_handler".
  144071. * aio_logger.error('Exception in default exception handler', # <<<<<<<<<<<<<<
  144072. * exc_info=True)
  144073. * else:
  144074. */
  144075. __pyx_tuple__60 = PyTuple_Pack(1, __pyx_kp_u_Exception_in_default_exception_h); if (unlikely(!__pyx_tuple__60)) __PYX_ERR(2, 2294, __pyx_L1_error)
  144076. __Pyx_GOTREF(__pyx_tuple__60);
  144077. __Pyx_GIVEREF(__pyx_tuple__60);
  144078. /* "uvloop/loop.pyx":2311
  144079. * # Guard 'default_exception_handler' in case it is
  144080. * # overloaded.
  144081. * aio_logger.error('Exception in default exception handler ' # <<<<<<<<<<<<<<
  144082. * 'while handling an unexpected error '
  144083. * 'in custom exception handler',
  144084. */
  144085. __pyx_tuple__61 = PyTuple_Pack(1, __pyx_kp_u_Exception_in_default_exception_h_2); if (unlikely(!__pyx_tuple__61)) __PYX_ERR(2, 2311, __pyx_L1_error)
  144086. __Pyx_GOTREF(__pyx_tuple__61);
  144087. __Pyx_GIVEREF(__pyx_tuple__61);
  144088. /* "uvloop/loop.pyx":2350
  144089. *
  144090. * if self._debug and sock.gettimeout() != 0:
  144091. * raise ValueError("the socket must be non-blocking") # <<<<<<<<<<<<<<
  144092. *
  144093. * fut = _SyncSocketReaderFuture(sock, self)
  144094. */
  144095. __pyx_tuple__62 = PyTuple_Pack(1, __pyx_kp_u_the_socket_must_be_non_blocking); if (unlikely(!__pyx_tuple__62)) __PYX_ERR(2, 2350, __pyx_L1_error)
  144096. __Pyx_GOTREF(__pyx_tuple__62);
  144097. __Pyx_GIVEREF(__pyx_tuple__62);
  144098. /* "uvloop/loop.pyx":2485
  144099. * else:
  144100. * addrs = await self.getaddrinfo(
  144101. * *address[:2], family=sock.family) # <<<<<<<<<<<<<<
  144102. *
  144103. * _, _, _, _, address = addrs[0]
  144104. */
  144105. __pyx_slice__63 = PySlice_New(Py_None, __pyx_int_2, Py_None); if (unlikely(!__pyx_slice__63)) __PYX_ERR(2, 2485, __pyx_L1_error)
  144106. __Pyx_GOTREF(__pyx_slice__63);
  144107. __Pyx_GIVEREF(__pyx_slice__63);
  144108. /* "uvloop/loop.pyx":2550
  144109. *
  144110. * if transport is None:
  144111. * raise ValueError( # <<<<<<<<<<<<<<
  144112. * 'invalid socket family, expected AF_UNIX, AF_INET or AF_INET6')
  144113. *
  144114. */
  144115. __pyx_tuple__64 = PyTuple_Pack(1, __pyx_kp_u_invalid_socket_family_expected_A); if (unlikely(!__pyx_tuple__64)) __PYX_ERR(2, 2550, __pyx_L1_error)
  144116. __Pyx_GOTREF(__pyx_tuple__64);
  144117. __Pyx_GIVEREF(__pyx_tuple__64);
  144118. /* "uvloop/loop.pyx":2575
  144119. * def run_in_executor(self, executor, func, *args):
  144120. * if aio_iscoroutine(func) or aio_iscoroutinefunction(func):
  144121. * raise TypeError("coroutines cannot be used with run_in_executor()") # <<<<<<<<<<<<<<
  144122. *
  144123. * self._check_closed()
  144124. */
  144125. __pyx_tuple__65 = PyTuple_Pack(1, __pyx_kp_u_coroutines_cannot_be_used_with_r); if (unlikely(!__pyx_tuple__65)) __PYX_ERR(2, 2575, __pyx_L1_error)
  144126. __Pyx_GOTREF(__pyx_tuple__65);
  144127. __Pyx_GIVEREF(__pyx_tuple__65);
  144128. /* "uvloop/loop.pyx":2618
  144129. *
  144130. * if universal_newlines:
  144131. * raise ValueError("universal_newlines must be False") # <<<<<<<<<<<<<<
  144132. * if bufsize != 0:
  144133. * raise ValueError("bufsize must be 0")
  144134. */
  144135. __pyx_tuple__69 = PyTuple_Pack(1, __pyx_kp_u_universal_newlines_must_be_False); if (unlikely(!__pyx_tuple__69)) __PYX_ERR(2, 2618, __pyx_L1_error)
  144136. __Pyx_GOTREF(__pyx_tuple__69);
  144137. __Pyx_GIVEREF(__pyx_tuple__69);
  144138. /* "uvloop/loop.pyx":2620
  144139. * raise ValueError("universal_newlines must be False")
  144140. * if bufsize != 0:
  144141. * raise ValueError("bufsize must be 0") # <<<<<<<<<<<<<<
  144142. * if startupinfo is not None:
  144143. * raise ValueError('startupinfo is not supported')
  144144. */
  144145. __pyx_tuple__70 = PyTuple_Pack(1, __pyx_kp_u_bufsize_must_be_0); if (unlikely(!__pyx_tuple__70)) __PYX_ERR(2, 2620, __pyx_L1_error)
  144146. __Pyx_GOTREF(__pyx_tuple__70);
  144147. __Pyx_GIVEREF(__pyx_tuple__70);
  144148. /* "uvloop/loop.pyx":2622
  144149. * raise ValueError("bufsize must be 0")
  144150. * if startupinfo is not None:
  144151. * raise ValueError('startupinfo is not supported') # <<<<<<<<<<<<<<
  144152. * if creationflags != 0:
  144153. * raise ValueError('creationflags is not supported')
  144154. */
  144155. __pyx_tuple__71 = PyTuple_Pack(1, __pyx_kp_u_startupinfo_is_not_supported); if (unlikely(!__pyx_tuple__71)) __PYX_ERR(2, 2622, __pyx_L1_error)
  144156. __Pyx_GOTREF(__pyx_tuple__71);
  144157. __Pyx_GIVEREF(__pyx_tuple__71);
  144158. /* "uvloop/loop.pyx":2624
  144159. * raise ValueError('startupinfo is not supported')
  144160. * if creationflags != 0:
  144161. * raise ValueError('creationflags is not supported') # <<<<<<<<<<<<<<
  144162. *
  144163. * if executable is not None:
  144164. */
  144165. __pyx_tuple__72 = PyTuple_Pack(1, __pyx_kp_u_creationflags_is_not_supported); if (unlikely(!__pyx_tuple__72)) __PYX_ERR(2, 2624, __pyx_L1_error)
  144166. __Pyx_GOTREF(__pyx_tuple__72);
  144167. __Pyx_GIVEREF(__pyx_tuple__72);
  144168. /* "uvloop/loop.pyx":2656
  144169. *
  144170. * if not shell:
  144171. * raise ValueError("shell must be True") # <<<<<<<<<<<<<<
  144172. *
  144173. * args = [cmd]
  144174. */
  144175. __pyx_tuple__73 = PyTuple_Pack(1, __pyx_kp_u_shell_must_be_True); if (unlikely(!__pyx_tuple__73)) __PYX_ERR(2, 2656, __pyx_L1_error)
  144176. __Pyx_GOTREF(__pyx_tuple__73);
  144177. __Pyx_GIVEREF(__pyx_tuple__73);
  144178. /* "uvloop/loop.pyx":2670
  144179. *
  144180. * if shell:
  144181. * raise ValueError("shell must be False") # <<<<<<<<<<<<<<
  144182. *
  144183. * args = list((program,) + args)
  144184. */
  144185. __pyx_tuple__74 = PyTuple_Pack(1, __pyx_kp_u_shell_must_be_False); if (unlikely(!__pyx_tuple__74)) __PYX_ERR(2, 2670, __pyx_L1_error)
  144186. __Pyx_GOTREF(__pyx_tuple__74);
  144187. __Pyx_GIVEREF(__pyx_tuple__74);
  144188. /* "uvloop/loop.pyx":2739
  144189. * self._setup_signals()
  144190. * if not self._listening_signals:
  144191. * raise ValueError('set_wakeup_fd only works in main thread') # <<<<<<<<<<<<<<
  144192. *
  144193. * if (aio_iscoroutine(callback)
  144194. */
  144195. __pyx_tuple__75 = PyTuple_Pack(1, __pyx_kp_u_set_wakeup_fd_only_works_in_main); if (unlikely(!__pyx_tuple__75)) __PYX_ERR(2, 2739, __pyx_L1_error)
  144196. __Pyx_GOTREF(__pyx_tuple__75);
  144197. __Pyx_GIVEREF(__pyx_tuple__75);
  144198. /* "uvloop/loop.pyx":2743
  144199. * if (aio_iscoroutine(callback)
  144200. * or aio_iscoroutinefunction(callback)):
  144201. * raise TypeError( # <<<<<<<<<<<<<<
  144202. * "coroutines cannot be used with add_signal_handler()")
  144203. *
  144204. */
  144205. __pyx_tuple__76 = PyTuple_Pack(1, __pyx_kp_u_coroutines_cannot_be_used_with_a); if (unlikely(!__pyx_tuple__76)) __PYX_ERR(2, 2743, __pyx_L1_error)
  144206. __Pyx_GOTREF(__pyx_tuple__76);
  144207. __Pyx_GIVEREF(__pyx_tuple__76);
  144208. /* "uvloop/loop.pyx":2765
  144209. * return
  144210. *
  144211. * raise RuntimeError( # <<<<<<<<<<<<<<
  144212. * 'cannot add a signal handler for SIGCHLD: it is used '
  144213. * 'by the event loop to track subprocesses')
  144214. */
  144215. __pyx_tuple__77 = PyTuple_Pack(1, __pyx_kp_u_cannot_add_a_signal_handler_for); if (unlikely(!__pyx_tuple__77)) __PYX_ERR(2, 2765, __pyx_L1_error)
  144216. __Pyx_GOTREF(__pyx_tuple__77);
  144217. __Pyx_GIVEREF(__pyx_tuple__77);
  144218. /* "uvloop/loop.pyx":2908
  144219. * if (not isinstance(local_addr, (tuple, list)) or
  144220. * len(local_addr) != 2):
  144221. * raise TypeError( # <<<<<<<<<<<<<<
  144222. * 'local_addr must be a tuple of (host, port)')
  144223. * lads = await self._getaddrinfo(
  144224. */
  144225. __pyx_tuple__79 = PyTuple_Pack(1, __pyx_kp_u_local_addr_must_be_a_tuple_of_ho_2); if (unlikely(!__pyx_tuple__79)) __PYX_ERR(2, 2908, __pyx_L1_error)
  144226. __Pyx_GOTREF(__pyx_tuple__79);
  144227. __Pyx_GIVEREF(__pyx_tuple__79);
  144228. /* "uvloop/loop.pyx":2919
  144229. * if (not isinstance(remote_addr, (tuple, list)) or
  144230. * len(remote_addr) != 2):
  144231. * raise TypeError( # <<<<<<<<<<<<<<
  144232. * 'remote_addr must be a tuple of (host, port)')
  144233. * rads = await self._getaddrinfo(
  144234. */
  144235. __pyx_tuple__80 = PyTuple_Pack(1, __pyx_kp_u_remote_addr_must_be_a_tuple_of_h); if (unlikely(!__pyx_tuple__80)) __PYX_ERR(2, 2919, __pyx_L1_error)
  144236. __Pyx_GOTREF(__pyx_tuple__80);
  144237. __Pyx_GIVEREF(__pyx_tuple__80);
  144238. /* "uvloop/loop.pyx":2935
  144239. * else:
  144240. * if family not in (uv.AF_INET, uv.AF_INET6):
  144241. * raise ValueError('unexpected address family') # <<<<<<<<<<<<<<
  144242. * udp = UDPTransport.__new__(UDPTransport)
  144243. * udp._init(self, family)
  144244. */
  144245. __pyx_tuple__81 = PyTuple_Pack(1, __pyx_kp_u_unexpected_address_family); if (unlikely(!__pyx_tuple__81)) __PYX_ERR(2, 2935, __pyx_L1_error)
  144246. __Pyx_GOTREF(__pyx_tuple__81);
  144247. __Pyx_GIVEREF(__pyx_tuple__81);
  144248. /* "(tree fragment)":2
  144249. * def __reduce_cython__(self):
  144250. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  144251. * def __setstate_cython__(self, __pyx_state):
  144252. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  144253. */
  144254. __pyx_tuple__82 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__82)) __PYX_ERR(9, 2, __pyx_L1_error)
  144255. __Pyx_GOTREF(__pyx_tuple__82);
  144256. __Pyx_GIVEREF(__pyx_tuple__82);
  144257. /* "(tree fragment)":4
  144258. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  144259. * def __setstate_cython__(self, __pyx_state):
  144260. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  144261. */
  144262. __pyx_tuple__83 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__83)) __PYX_ERR(9, 4, __pyx_L1_error)
  144263. __Pyx_GOTREF(__pyx_tuple__83);
  144264. __Pyx_GIVEREF(__pyx_tuple__83);
  144265. /* "uvloop/loop.pyx":3046
  144266. * if loop._recv_buffer_in_use == 1:
  144267. * buf.len = 0
  144268. * exc = RuntimeError('concurrent allocations') # <<<<<<<<<<<<<<
  144269. * loop._handle_exception(exc)
  144270. * return
  144271. */
  144272. __pyx_tuple__84 = PyTuple_Pack(1, __pyx_kp_u_concurrent_allocations); if (unlikely(!__pyx_tuple__84)) __PYX_ERR(2, 3046, __pyx_L1_error)
  144273. __Pyx_GOTREF(__pyx_tuple__84);
  144274. __Pyx_GIVEREF(__pyx_tuple__84);
  144275. /* "uvloop/cbhandles.pyx":24
  144276. * else:
  144277. * if context is not None:
  144278. * raise NotImplementedError( # <<<<<<<<<<<<<<
  144279. * '"context" argument requires Python 3.7')
  144280. * self.context = None
  144281. */
  144282. __pyx_tuple__85 = PyTuple_Pack(1, __pyx_kp_u_context_argument_requires_Pytho); if (unlikely(!__pyx_tuple__85)) __PYX_ERR(3, 24, __pyx_L1_error)
  144283. __Pyx_GOTREF(__pyx_tuple__85);
  144284. __Pyx_GIVEREF(__pyx_tuple__85);
  144285. /* "uvloop/cbhandles.pyx":32
  144286. * self.loop._debug_cb_handles_count -= 1
  144287. * if self.loop is None:
  144288. * raise RuntimeError('Handle.loop is None in Handle.__dealloc__') # <<<<<<<<<<<<<<
  144289. *
  144290. * def __init__(self):
  144291. */
  144292. __pyx_tuple__86 = PyTuple_Pack(1, __pyx_kp_u_Handle_loop_is_None_in_Handle); if (unlikely(!__pyx_tuple__86)) __PYX_ERR(3, 32, __pyx_L1_error)
  144293. __Pyx_GOTREF(__pyx_tuple__86);
  144294. __Pyx_GIVEREF(__pyx_tuple__86);
  144295. /* "uvloop/cbhandles.pyx":62
  144296. * callback = self.arg1
  144297. * if callback is None:
  144298. * raise RuntimeError( # <<<<<<<<<<<<<<
  144299. * 'cannot run Handle; callback is not set')
  144300. *
  144301. */
  144302. __pyx_tuple__87 = PyTuple_Pack(1, __pyx_kp_u_cannot_run_Handle_callback_is_no); if (unlikely(!__pyx_tuple__87)) __PYX_ERR(3, 62, __pyx_L1_error)
  144303. __Pyx_GOTREF(__pyx_tuple__87);
  144304. __Pyx_GIVEREF(__pyx_tuple__87);
  144305. /* "(tree fragment)":2
  144306. * def __reduce_cython__(self):
  144307. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  144308. * def __setstate_cython__(self, __pyx_state):
  144309. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  144310. */
  144311. __pyx_tuple__91 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__91)) __PYX_ERR(9, 2, __pyx_L1_error)
  144312. __Pyx_GOTREF(__pyx_tuple__91);
  144313. __Pyx_GIVEREF(__pyx_tuple__91);
  144314. /* "(tree fragment)":4
  144315. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  144316. * def __setstate_cython__(self, __pyx_state):
  144317. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  144318. */
  144319. __pyx_tuple__92 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__92)) __PYX_ERR(9, 4, __pyx_L1_error)
  144320. __Pyx_GOTREF(__pyx_tuple__92);
  144321. __Pyx_GIVEREF(__pyx_tuple__92);
  144322. /* "uvloop/cbhandles.pyx":221
  144323. * self.loop._debug_cb_timer_handles_count -= 1
  144324. * if self.timer is not None:
  144325. * raise RuntimeError('active TimerHandle is deallacating') # <<<<<<<<<<<<<<
  144326. *
  144327. * cdef _cancel(self):
  144328. */
  144329. __pyx_tuple__93 = PyTuple_Pack(1, __pyx_kp_u_active_TimerHandle_is_deallacati); if (unlikely(!__pyx_tuple__93)) __PYX_ERR(3, 221, __pyx_L1_error)
  144330. __Pyx_GOTREF(__pyx_tuple__93);
  144331. __Pyx_GIVEREF(__pyx_tuple__93);
  144332. /* "uvloop/cbhandles.pyx":246
  144333. * return
  144334. * if self.callback is None:
  144335. * raise RuntimeError('cannot run TimerHandle; callback is not set') # <<<<<<<<<<<<<<
  144336. *
  144337. * callback = self.callback
  144338. */
  144339. __pyx_tuple__94 = PyTuple_Pack(1, __pyx_kp_u_cannot_run_TimerHandle_callback); if (unlikely(!__pyx_tuple__94)) __PYX_ERR(3, 246, __pyx_L1_error)
  144340. __Pyx_GOTREF(__pyx_tuple__94);
  144341. __Pyx_GIVEREF(__pyx_tuple__94);
  144342. /* "(tree fragment)":2
  144343. * def __reduce_cython__(self):
  144344. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  144345. * def __setstate_cython__(self, __pyx_state):
  144346. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  144347. */
  144348. __pyx_tuple__95 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__95)) __PYX_ERR(9, 2, __pyx_L1_error)
  144349. __Pyx_GOTREF(__pyx_tuple__95);
  144350. __Pyx_GIVEREF(__pyx_tuple__95);
  144351. /* "(tree fragment)":4
  144352. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  144353. * def __setstate_cython__(self, __pyx_state):
  144354. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  144355. */
  144356. __pyx_tuple__96 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__96)) __PYX_ERR(9, 4, __pyx_L1_error)
  144357. __Pyx_GOTREF(__pyx_tuple__96);
  144358. __Pyx_GIVEREF(__pyx_tuple__96);
  144359. /* "uvloop/pseudosock.pyx":64
  144360. *
  144361. * def __getstate__(self):
  144362. * raise TypeError("Cannot serialize socket object") # <<<<<<<<<<<<<<
  144363. *
  144364. * def fileno(self):
  144365. */
  144366. __pyx_tuple__97 = PyTuple_Pack(1, __pyx_kp_u_Cannot_serialize_socket_object); if (unlikely(!__pyx_tuple__97)) __PYX_ERR(10, 64, __pyx_L1_error)
  144367. __Pyx_GOTREF(__pyx_tuple__97);
  144368. __Pyx_GIVEREF(__pyx_tuple__97);
  144369. /* "uvloop/pseudosock.pyx":193
  144370. * if value == 0:
  144371. * return
  144372. * raise ValueError( # <<<<<<<<<<<<<<
  144373. * 'settimeout(): only 0 timeout is allowed on transport sockets')
  144374. *
  144375. */
  144376. __pyx_tuple__98 = PyTuple_Pack(1, __pyx_kp_u_settimeout_only_0_timeout_is_all); if (unlikely(!__pyx_tuple__98)) __PYX_ERR(10, 193, __pyx_L1_error)
  144377. __Pyx_GOTREF(__pyx_tuple__98);
  144378. __Pyx_GIVEREF(__pyx_tuple__98);
  144379. /* "uvloop/pseudosock.pyx":202
  144380. * if not flag:
  144381. * return
  144382. * raise ValueError( # <<<<<<<<<<<<<<
  144383. * 'setblocking(): transport sockets cannot be blocking')
  144384. *
  144385. */
  144386. __pyx_tuple__99 = PyTuple_Pack(1, __pyx_kp_u_setblocking_transport_sockets_ca); if (unlikely(!__pyx_tuple__99)) __PYX_ERR(10, 202, __pyx_L1_error)
  144387. __Pyx_GOTREF(__pyx_tuple__99);
  144388. __Pyx_GIVEREF(__pyx_tuple__99);
  144389. /* "(tree fragment)":2
  144390. * def __reduce_cython__(self):
  144391. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  144392. * def __setstate_cython__(self, __pyx_state):
  144393. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  144394. */
  144395. __pyx_tuple__100 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__100)) __PYX_ERR(9, 2, __pyx_L1_error)
  144396. __Pyx_GOTREF(__pyx_tuple__100);
  144397. __Pyx_GIVEREF(__pyx_tuple__100);
  144398. /* "(tree fragment)":4
  144399. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  144400. * def __setstate_cython__(self, __pyx_state):
  144401. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  144402. */
  144403. __pyx_tuple__101 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__101)) __PYX_ERR(9, 4, __pyx_L1_error)
  144404. __Pyx_GOTREF(__pyx_tuple__101);
  144405. __Pyx_GIVEREF(__pyx_tuple__101);
  144406. /* "(tree fragment)":2
  144407. * def __reduce_cython__(self):
  144408. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  144409. * def __setstate_cython__(self, __pyx_state):
  144410. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  144411. */
  144412. __pyx_tuple__102 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__102)) __PYX_ERR(9, 2, __pyx_L1_error)
  144413. __Pyx_GOTREF(__pyx_tuple__102);
  144414. __Pyx_GIVEREF(__pyx_tuple__102);
  144415. /* "(tree fragment)":4
  144416. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  144417. * def __setstate_cython__(self, __pyx_state):
  144418. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  144419. */
  144420. __pyx_tuple__103 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__103)) __PYX_ERR(9, 4, __pyx_L1_error)
  144421. __Pyx_GOTREF(__pyx_tuple__103);
  144422. __Pyx_GIVEREF(__pyx_tuple__103);
  144423. /* "uvloop/handles/handle.pyx":311
  144424. * if UVLOOP_DEBUG:
  144425. * if handle.loop is NULL:
  144426. * raise RuntimeError( # <<<<<<<<<<<<<<
  144427. * 'handle.loop is NULL in __ensure_handle_data')
  144428. *
  144429. */
  144430. __pyx_tuple__104 = PyTuple_Pack(1, __pyx_kp_u_handle_loop_is_NULL_in___ensure); if (unlikely(!__pyx_tuple__104)) __PYX_ERR(4, 311, __pyx_L1_error)
  144431. __Pyx_GOTREF(__pyx_tuple__104);
  144432. __Pyx_GIVEREF(__pyx_tuple__104);
  144433. /* "uvloop/handles/handle.pyx":315
  144434. *
  144435. * if handle.loop.data is NULL:
  144436. * raise RuntimeError( # <<<<<<<<<<<<<<
  144437. * 'handle.loop.data is NULL in __ensure_handle_data')
  144438. *
  144439. */
  144440. __pyx_tuple__105 = PyTuple_Pack(1, __pyx_kp_u_handle_loop_data_is_NULL_in___en); if (unlikely(!__pyx_tuple__105)) __PYX_ERR(4, 315, __pyx_L1_error)
  144441. __Pyx_GOTREF(__pyx_tuple__105);
  144442. __Pyx_GIVEREF(__pyx_tuple__105);
  144443. /* "uvloop/handles/handle.pyx":347
  144444. * if UVLOOP_DEBUG:
  144445. * if handle.loop == NULL or handle.loop.data == NULL:
  144446. * raise RuntimeError( # <<<<<<<<<<<<<<
  144447. * '__uv_close_handle_cb: handle.loop is invalid')
  144448. * (<Loop>handle.loop.data)._debug_uv_handles_freed += 1
  144449. */
  144450. __pyx_tuple__106 = PyTuple_Pack(1, __pyx_kp_u_uv_close_handle_cb_handle_loop); if (unlikely(!__pyx_tuple__106)) __PYX_ERR(4, 347, __pyx_L1_error)
  144451. __Pyx_GOTREF(__pyx_tuple__106);
  144452. __Pyx_GIVEREF(__pyx_tuple__106);
  144453. /* "uvloop/handles/handle.pyx":357
  144454. * if UVLOOP_DEBUG:
  144455. * if not h._has_handle:
  144456. * raise RuntimeError( # <<<<<<<<<<<<<<
  144457. * 'has_handle=0 in __uv_close_handle_cb')
  144458. * h._loop._debug_handles_closed.update([
  144459. */
  144460. __pyx_tuple__107 = PyTuple_Pack(1, __pyx_kp_u_has_handle_0_in___uv_close_handl); if (unlikely(!__pyx_tuple__107)) __PYX_ERR(4, 357, __pyx_L1_error)
  144461. __Pyx_GOTREF(__pyx_tuple__107);
  144462. __Pyx_GIVEREF(__pyx_tuple__107);
  144463. /* "(tree fragment)":2
  144464. * def __reduce_cython__(self):
  144465. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  144466. * def __setstate_cython__(self, __pyx_state):
  144467. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  144468. */
  144469. __pyx_tuple__108 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__108)) __PYX_ERR(9, 2, __pyx_L1_error)
  144470. __Pyx_GOTREF(__pyx_tuple__108);
  144471. __Pyx_GIVEREF(__pyx_tuple__108);
  144472. /* "(tree fragment)":4
  144473. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  144474. * def __setstate_cython__(self, __pyx_state):
  144475. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  144476. */
  144477. __pyx_tuple__109 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__109)) __PYX_ERR(9, 4, __pyx_L1_error)
  144478. __Pyx_GOTREF(__pyx_tuple__109);
  144479. __Pyx_GIVEREF(__pyx_tuple__109);
  144480. /* "(tree fragment)":2
  144481. * def __reduce_cython__(self):
  144482. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  144483. * def __setstate_cython__(self, __pyx_state):
  144484. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  144485. */
  144486. __pyx_tuple__110 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__110)) __PYX_ERR(9, 2, __pyx_L1_error)
  144487. __Pyx_GOTREF(__pyx_tuple__110);
  144488. __Pyx_GIVEREF(__pyx_tuple__110);
  144489. /* "(tree fragment)":4
  144490. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  144491. * def __setstate_cython__(self, __pyx_state):
  144492. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  144493. */
  144494. __pyx_tuple__111 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__111)) __PYX_ERR(9, 4, __pyx_L1_error)
  144495. __Pyx_GOTREF(__pyx_tuple__111);
  144496. __Pyx_GIVEREF(__pyx_tuple__111);
  144497. /* "(tree fragment)":2
  144498. * def __reduce_cython__(self):
  144499. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  144500. * def __setstate_cython__(self, __pyx_state):
  144501. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  144502. */
  144503. __pyx_tuple__112 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__112)) __PYX_ERR(9, 2, __pyx_L1_error)
  144504. __Pyx_GOTREF(__pyx_tuple__112);
  144505. __Pyx_GIVEREF(__pyx_tuple__112);
  144506. /* "(tree fragment)":4
  144507. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  144508. * def __setstate_cython__(self, __pyx_state):
  144509. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  144510. */
  144511. __pyx_tuple__113 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__113)) __PYX_ERR(9, 4, __pyx_L1_error)
  144512. __Pyx_GOTREF(__pyx_tuple__113);
  144513. __Pyx_GIVEREF(__pyx_tuple__113);
  144514. /* "(tree fragment)":2
  144515. * def __reduce_cython__(self):
  144516. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  144517. * def __setstate_cython__(self, __pyx_state):
  144518. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  144519. */
  144520. __pyx_tuple__114 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__114)) __PYX_ERR(9, 2, __pyx_L1_error)
  144521. __Pyx_GOTREF(__pyx_tuple__114);
  144522. __Pyx_GIVEREF(__pyx_tuple__114);
  144523. /* "(tree fragment)":4
  144524. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  144525. * def __setstate_cython__(self, __pyx_state):
  144526. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  144527. */
  144528. __pyx_tuple__115 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__115)) __PYX_ERR(9, 4, __pyx_L1_error)
  144529. __Pyx_GOTREF(__pyx_tuple__115);
  144530. __Pyx_GIVEREF(__pyx_tuple__115);
  144531. /* "(tree fragment)":2
  144532. * def __reduce_cython__(self):
  144533. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  144534. * def __setstate_cython__(self, __pyx_state):
  144535. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  144536. */
  144537. __pyx_tuple__116 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__116)) __PYX_ERR(9, 2, __pyx_L1_error)
  144538. __Pyx_GOTREF(__pyx_tuple__116);
  144539. __Pyx_GIVEREF(__pyx_tuple__116);
  144540. /* "(tree fragment)":4
  144541. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  144542. * def __setstate_cython__(self, __pyx_state):
  144543. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  144544. */
  144545. __pyx_tuple__117 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__117)) __PYX_ERR(9, 4, __pyx_L1_error)
  144546. __Pyx_GOTREF(__pyx_tuple__117);
  144547. __Pyx_GIVEREF(__pyx_tuple__117);
  144548. /* "uvloop/handles/basetransport.pyx":99
  144549. * if not self._is_alive():
  144550. * self._waiter.set_exception(
  144551. * RuntimeError( # <<<<<<<<<<<<<<
  144552. * 'closed Transport handle and unset waiter'))
  144553. * else:
  144554. */
  144555. __pyx_tuple__120 = PyTuple_Pack(1, __pyx_kp_u_closed_Transport_handle_and_unse); if (unlikely(!__pyx_tuple__120)) __PYX_ERR(16, 99, __pyx_L1_error)
  144556. __Pyx_GOTREF(__pyx_tuple__120);
  144557. __Pyx_GIVEREF(__pyx_tuple__120);
  144558. /* "uvloop/handles/basetransport.pyx":107
  144559. * cdef _call_connection_made(self):
  144560. * if self._protocol is None:
  144561. * raise RuntimeError( # <<<<<<<<<<<<<<
  144562. * 'protocol is not set, cannot call connection_made()')
  144563. *
  144564. */
  144565. __pyx_tuple__121 = PyTuple_Pack(1, __pyx_kp_u_protocol_is_not_set_cannot_call); if (unlikely(!__pyx_tuple__121)) __PYX_ERR(16, 107, __pyx_L1_error)
  144566. __Pyx_GOTREF(__pyx_tuple__121);
  144567. __Pyx_GIVEREF(__pyx_tuple__121);
  144568. /* "uvloop/handles/basetransport.pyx":191
  144569. * self._loop._track_transport(self)
  144570. * if self._protocol is None:
  144571. * raise RuntimeError('invalid _init_protocol call') # <<<<<<<<<<<<<<
  144572. * self._schedule_call_connection_made()
  144573. *
  144574. */
  144575. __pyx_tuple__122 = PyTuple_Pack(1, __pyx_kp_u_invalid__init_protocol_call); if (unlikely(!__pyx_tuple__122)) __PYX_ERR(16, 191, __pyx_L1_error)
  144576. __Pyx_GOTREF(__pyx_tuple__122);
  144577. __Pyx_GIVEREF(__pyx_tuple__122);
  144578. /* "(tree fragment)":2
  144579. * def __reduce_cython__(self):
  144580. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  144581. * def __setstate_cython__(self, __pyx_state):
  144582. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  144583. */
  144584. __pyx_tuple__123 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__123)) __PYX_ERR(9, 2, __pyx_L1_error)
  144585. __Pyx_GOTREF(__pyx_tuple__123);
  144586. __Pyx_GIVEREF(__pyx_tuple__123);
  144587. /* "(tree fragment)":4
  144588. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  144589. * def __setstate_cython__(self, __pyx_state):
  144590. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  144591. */
  144592. __pyx_tuple__124 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__124)) __PYX_ERR(9, 4, __pyx_L1_error)
  144593. __Pyx_GOTREF(__pyx_tuple__124);
  144594. __Pyx_GIVEREF(__pyx_tuple__124);
  144595. /* "uvloop/handles/stream.pyx":37
  144596. * if UVLOOP_DEBUG:
  144597. * if self.py_bufs_sml_inuse:
  144598. * raise RuntimeError( # <<<<<<<<<<<<<<
  144599. * '_StreamWriteContext.close: uv_bufs != NULL and '
  144600. * 'py_bufs_sml_inuse is True')
  144601. */
  144602. __pyx_tuple__125 = PyTuple_Pack(1, __pyx_kp_u_StreamWriteContext_close_uv_buf); if (unlikely(!__pyx_tuple__125)) __PYX_ERR(18, 37, __pyx_L1_error)
  144603. __Pyx_GOTREF(__pyx_tuple__125);
  144604. __Pyx_GIVEREF(__pyx_tuple__125);
  144605. /* "uvloop/handles/stream.pyx":48
  144606. * if UVLOOP_DEBUG:
  144607. * if self.py_bufs_sml_inuse:
  144608. * raise RuntimeError( # <<<<<<<<<<<<<<
  144609. * '_StreamWriteContext.close: py_bufs != NULL and '
  144610. * 'py_bufs_sml_inuse is True')
  144611. */
  144612. __pyx_tuple__126 = PyTuple_Pack(1, __pyx_kp_u_StreamWriteContext_close_py_buf); if (unlikely(!__pyx_tuple__126)) __PYX_ERR(18, 48, __pyx_L1_error)
  144613. __Pyx_GOTREF(__pyx_tuple__126);
  144614. __Pyx_GIVEREF(__pyx_tuple__126);
  144615. /* "uvloop/handles/stream.pyx":93
  144616. * if UVLOOP_DEBUG:
  144617. * if sent < 0:
  144618. * raise RuntimeError('fatal: sent < 0 in advance_uv_buf') # <<<<<<<<<<<<<<
  144619. *
  144620. * raise RuntimeError('fatal: Could not advance _StreamWriteContext')
  144621. */
  144622. __pyx_tuple__127 = PyTuple_Pack(1, __pyx_kp_u_fatal_sent_0_in_advance_uv_buf); if (unlikely(!__pyx_tuple__127)) __PYX_ERR(18, 93, __pyx_L1_error)
  144623. __Pyx_GOTREF(__pyx_tuple__127);
  144624. __Pyx_GIVEREF(__pyx_tuple__127);
  144625. /* "uvloop/handles/stream.pyx":95
  144626. * raise RuntimeError('fatal: sent < 0 in advance_uv_buf')
  144627. *
  144628. * raise RuntimeError('fatal: Could not advance _StreamWriteContext') # <<<<<<<<<<<<<<
  144629. *
  144630. * @staticmethod
  144631. */
  144632. __pyx_tuple__128 = PyTuple_Pack(1, __pyx_kp_u_fatal_Could_not_advance__StreamW); if (unlikely(!__pyx_tuple__128)) __PYX_ERR(18, 95, __pyx_L1_error)
  144633. __Pyx_GOTREF(__pyx_tuple__128);
  144634. __Pyx_GIVEREF(__pyx_tuple__128);
  144635. /* "uvloop/handles/stream.pyx":199
  144636. * # Because we do an INCREF in _StreamWriteContext.new,
  144637. * # __dealloc__ shouldn't ever happen with `self.closed == 1`
  144638. * raise RuntimeError( # <<<<<<<<<<<<<<
  144639. * 'open _StreamWriteContext is being deallocated')
  144640. *
  144641. */
  144642. __pyx_tuple__129 = PyTuple_Pack(1, __pyx_kp_u_open__StreamWriteContext_is_bein); if (unlikely(!__pyx_tuple__129)) __PYX_ERR(18, 199, __pyx_L1_error)
  144643. __Pyx_GOTREF(__pyx_tuple__129);
  144644. __Pyx_GIVEREF(__pyx_tuple__129);
  144645. /* "(tree fragment)":2
  144646. * def __reduce_cython__(self):
  144647. * raise TypeError("self.py_bufs,self.py_bufs_sml,self.req,self.uv_bufs,self.uv_bufs_start cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
  144648. * def __setstate_cython__(self, __pyx_state):
  144649. * raise TypeError("self.py_bufs,self.py_bufs_sml,self.req,self.uv_bufs,self.uv_bufs_start cannot be converted to a Python object for pickling")
  144650. */
  144651. __pyx_tuple__130 = PyTuple_Pack(1, __pyx_kp_s_self_py_bufs_self_py_bufs_sml_se); if (unlikely(!__pyx_tuple__130)) __PYX_ERR(9, 2, __pyx_L1_error)
  144652. __Pyx_GOTREF(__pyx_tuple__130);
  144653. __Pyx_GIVEREF(__pyx_tuple__130);
  144654. /* "(tree fragment)":4
  144655. * raise TypeError("self.py_bufs,self.py_bufs_sml,self.req,self.uv_bufs,self.uv_bufs_start cannot be converted to a Python object for pickling")
  144656. * def __setstate_cython__(self, __pyx_state):
  144657. * raise TypeError("self.py_bufs,self.py_bufs_sml,self.req,self.uv_bufs,self.uv_bufs_start cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
  144658. */
  144659. __pyx_tuple__131 = PyTuple_Pack(1, __pyx_kp_s_self_py_bufs_self_py_bufs_sml_se); if (unlikely(!__pyx_tuple__131)) __PYX_ERR(9, 4, __pyx_L1_error)
  144660. __Pyx_GOTREF(__pyx_tuple__131);
  144661. __Pyx_GIVEREF(__pyx_tuple__131);
  144662. /* "uvloop/handles/stream.pyx":227
  144663. * cdef _set_protocol(self, object protocol):
  144664. * if protocol is None:
  144665. * raise TypeError('protocol is required') # <<<<<<<<<<<<<<
  144666. *
  144667. * UVBaseTransport._set_protocol(self, protocol)
  144668. */
  144669. __pyx_tuple__132 = PyTuple_Pack(1, __pyx_kp_u_protocol_is_required); if (unlikely(!__pyx_tuple__132)) __PYX_ERR(18, 227, __pyx_L1_error)
  144670. __Pyx_GOTREF(__pyx_tuple__132);
  144671. __Pyx_GIVEREF(__pyx_tuple__132);
  144672. /* "uvloop/handles/stream.pyx":354
  144673. *
  144674. * if (<uv.uv_stream_t*>self._handle).write_queue_size != 0:
  144675. * raise RuntimeError( # <<<<<<<<<<<<<<
  144676. * 'UVStream._try_write called with data in uv buffers')
  144677. *
  144678. */
  144679. __pyx_tuple__133 = PyTuple_Pack(1, __pyx_kp_u_UVStream__try_write_called_with); if (unlikely(!__pyx_tuple__133)) __PYX_ERR(18, 354, __pyx_L1_error)
  144680. __Pyx_GOTREF(__pyx_tuple__133);
  144681. __Pyx_GIVEREF(__pyx_tuple__133);
  144682. /* "uvloop/handles/stream.pyx":436
  144683. * if UVLOOP_DEBUG:
  144684. * if self._buffer_size != 0 or self._buffer != []:
  144685. * raise RuntimeError( # <<<<<<<<<<<<<<
  144686. * '_buffer_size is not 0 after a successful _exec_write')
  144687. *
  144688. */
  144689. __pyx_tuple__134 = PyTuple_Pack(1, __pyx_kp_u_buffer_size_is_not_0_after_a_su); if (unlikely(!__pyx_tuple__134)) __PYX_ERR(18, 436, __pyx_L1_error)
  144690. __Pyx_GOTREF(__pyx_tuple__134);
  144691. __Pyx_GIVEREF(__pyx_tuple__134);
  144692. /* "uvloop/handles/stream.pyx":482
  144693. * if not self._closing:
  144694. * # This should never happen.
  144695. * raise RuntimeError( # <<<<<<<<<<<<<<
  144696. * 'stream is open after UVStream._try_write '
  144697. * 'returned None')
  144698. */
  144699. __pyx_tuple__135 = PyTuple_Pack(1, __pyx_kp_u_stream_is_open_after_UVStream__t); if (unlikely(!__pyx_tuple__135)) __PYX_ERR(18, 482, __pyx_L1_error)
  144700. __Pyx_GOTREF(__pyx_tuple__135);
  144701. __Pyx_GIVEREF(__pyx_tuple__135);
  144702. /* "uvloop/handles/stream.pyx":498
  144703. * if UVLOOP_DEBUG:
  144704. * if sent == len(data):
  144705. * raise RuntimeError( # <<<<<<<<<<<<<<
  144706. * '_try_write sent all data and returned '
  144707. * 'non-zero')
  144708. */
  144709. __pyx_tuple__136 = PyTuple_Pack(1, __pyx_kp_u_try_write_sent_all_data_and_ret); if (unlikely(!__pyx_tuple__136)) __PYX_ERR(18, 498, __pyx_L1_error)
  144710. __Pyx_GOTREF(__pyx_tuple__136);
  144711. __Pyx_GIVEREF(__pyx_tuple__136);
  144712. /* "uvloop/handles/stream.pyx":676
  144713. *
  144714. * if self._eof:
  144715. * raise RuntimeError('Cannot call write() after write_eof()') # <<<<<<<<<<<<<<
  144716. * if not buf:
  144717. * return
  144718. */
  144719. __pyx_tuple__137 = PyTuple_Pack(1, __pyx_kp_u_Cannot_call_write_after_write_eo); if (unlikely(!__pyx_tuple__137)) __PYX_ERR(18, 676, __pyx_L1_error)
  144720. __Pyx_GOTREF(__pyx_tuple__137);
  144721. __Pyx_GIVEREF(__pyx_tuple__137);
  144722. /* "uvloop/handles/stream.pyx":688
  144723. *
  144724. * if self._eof:
  144725. * raise RuntimeError('Cannot call writelines() after write_eof()') # <<<<<<<<<<<<<<
  144726. * if self._conn_lost:
  144727. * self._conn_lost += 1
  144728. */
  144729. __pyx_tuple__138 = PyTuple_Pack(1, __pyx_kp_u_Cannot_call_writelines_after_wri); if (unlikely(!__pyx_tuple__138)) __PYX_ERR(18, 688, __pyx_L1_error)
  144730. __Pyx_GOTREF(__pyx_tuple__138);
  144731. __Pyx_GIVEREF(__pyx_tuple__138);
  144732. /* "(tree fragment)":2
  144733. * def __reduce_cython__(self):
  144734. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  144735. * def __setstate_cython__(self, __pyx_state):
  144736. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  144737. */
  144738. __pyx_tuple__139 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__139)) __PYX_ERR(9, 2, __pyx_L1_error)
  144739. __Pyx_GOTREF(__pyx_tuple__139);
  144740. __Pyx_GIVEREF(__pyx_tuple__139);
  144741. /* "(tree fragment)":4
  144742. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  144743. * def __setstate_cython__(self, __pyx_state):
  144744. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  144745. */
  144746. __pyx_tuple__140 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__140)) __PYX_ERR(9, 4, __pyx_L1_error)
  144747. __Pyx_GOTREF(__pyx_tuple__140);
  144748. __Pyx_GIVEREF(__pyx_tuple__140);
  144749. /* "uvloop/handles/stream.pyx":952
  144750. * if nread == uv.UV_ENOBUFS:
  144751. * sc._fatal_error(
  144752. * RuntimeError( # <<<<<<<<<<<<<<
  144753. * 'unhandled error (or an empty buffer) in get_buffer()'),
  144754. * False)
  144755. */
  144756. __pyx_tuple__141 = PyTuple_Pack(1, __pyx_kp_u_unhandled_error_or_an_empty_buff); if (unlikely(!__pyx_tuple__141)) __PYX_ERR(18, 952, __pyx_L1_error)
  144757. __Pyx_GOTREF(__pyx_tuple__141);
  144758. __Pyx_GIVEREF(__pyx_tuple__141);
  144759. /* "uvloop/handles/streamserver.pyx":51
  144760. *
  144761. * if self.protocol_factory is None:
  144762. * raise RuntimeError('unable to listen(); no protocol_factory') # <<<<<<<<<<<<<<
  144763. *
  144764. * if self.opened != 1:
  144765. */
  144766. __pyx_tuple__142 = PyTuple_Pack(1, __pyx_kp_u_unable_to_listen_no_protocol_fac); if (unlikely(!__pyx_tuple__142)) __PYX_ERR(19, 51, __pyx_L1_error)
  144767. __Pyx_GOTREF(__pyx_tuple__142);
  144768. __Pyx_GIVEREF(__pyx_tuple__142);
  144769. /* "uvloop/handles/streamserver.pyx":54
  144770. *
  144771. * if self.opened != 1:
  144772. * raise RuntimeError('unopened TCPServer') # <<<<<<<<<<<<<<
  144773. *
  144774. * err = uv.uv_listen(<uv.uv_stream_t*> self._handle,
  144775. */
  144776. __pyx_tuple__143 = PyTuple_Pack(1, __pyx_kp_u_unopened_TCPServer); if (unlikely(!__pyx_tuple__143)) __PYX_ERR(19, 54, __pyx_L1_error)
  144777. __Pyx_GOTREF(__pyx_tuple__143);
  144778. __Pyx_GIVEREF(__pyx_tuple__143);
  144779. /* "(tree fragment)":2
  144780. * def __reduce_cython__(self):
  144781. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  144782. * def __setstate_cython__(self, __pyx_state):
  144783. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  144784. */
  144785. __pyx_tuple__144 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__144)) __PYX_ERR(9, 2, __pyx_L1_error)
  144786. __Pyx_GOTREF(__pyx_tuple__144);
  144787. __Pyx_GIVEREF(__pyx_tuple__144);
  144788. /* "(tree fragment)":4
  144789. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  144790. * def __setstate_cython__(self, __pyx_state):
  144791. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  144792. */
  144793. __pyx_tuple__145 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__145)) __PYX_ERR(9, 4, __pyx_L1_error)
  144794. __Pyx_GOTREF(__pyx_tuple__145);
  144795. __Pyx_GIVEREF(__pyx_tuple__145);
  144796. /* "(tree fragment)":2
  144797. * def __reduce_cython__(self):
  144798. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  144799. * def __setstate_cython__(self, __pyx_state):
  144800. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  144801. */
  144802. __pyx_tuple__146 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__146)) __PYX_ERR(9, 2, __pyx_L1_error)
  144803. __Pyx_GOTREF(__pyx_tuple__146);
  144804. __Pyx_GIVEREF(__pyx_tuple__146);
  144805. /* "(tree fragment)":4
  144806. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  144807. * def __setstate_cython__(self, __pyx_state):
  144808. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  144809. */
  144810. __pyx_tuple__147 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__147)) __PYX_ERR(9, 4, __pyx_L1_error)
  144811. __Pyx_GOTREF(__pyx_tuple__147);
  144812. __Pyx_GIVEREF(__pyx_tuple__147);
  144813. /* "(tree fragment)":2
  144814. * def __reduce_cython__(self):
  144815. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  144816. * def __setstate_cython__(self, __pyx_state):
  144817. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  144818. */
  144819. __pyx_tuple__148 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__148)) __PYX_ERR(9, 2, __pyx_L1_error)
  144820. __Pyx_GOTREF(__pyx_tuple__148);
  144821. __Pyx_GIVEREF(__pyx_tuple__148);
  144822. /* "(tree fragment)":4
  144823. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  144824. * def __setstate_cython__(self, __pyx_state):
  144825. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  144826. */
  144827. __pyx_tuple__149 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__149)) __PYX_ERR(9, 4, __pyx_L1_error)
  144828. __Pyx_GOTREF(__pyx_tuple__149);
  144829. __Pyx_GIVEREF(__pyx_tuple__149);
  144830. /* "(tree fragment)":2
  144831. * def __reduce_cython__(self):
  144832. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  144833. * def __setstate_cython__(self, __pyx_state):
  144834. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  144835. */
  144836. __pyx_tuple__150 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__150)) __PYX_ERR(9, 2, __pyx_L1_error)
  144837. __Pyx_GOTREF(__pyx_tuple__150);
  144838. __Pyx_GIVEREF(__pyx_tuple__150);
  144839. /* "(tree fragment)":4
  144840. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  144841. * def __setstate_cython__(self, __pyx_state):
  144842. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  144843. */
  144844. __pyx_tuple__151 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__151)) __PYX_ERR(9, 4, __pyx_L1_error)
  144845. __Pyx_GOTREF(__pyx_tuple__151);
  144846. __Pyx_GIVEREF(__pyx_tuple__151);
  144847. /* "(tree fragment)":2
  144848. * def __reduce_cython__(self):
  144849. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  144850. * def __setstate_cython__(self, __pyx_state):
  144851. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  144852. */
  144853. __pyx_tuple__152 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__152)) __PYX_ERR(9, 2, __pyx_L1_error)
  144854. __Pyx_GOTREF(__pyx_tuple__152);
  144855. __Pyx_GIVEREF(__pyx_tuple__152);
  144856. /* "(tree fragment)":4
  144857. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  144858. * def __setstate_cython__(self, __pyx_state):
  144859. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  144860. */
  144861. __pyx_tuple__153 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__153)) __PYX_ERR(9, 4, __pyx_L1_error)
  144862. __Pyx_GOTREF(__pyx_tuple__153);
  144863. __Pyx_GIVEREF(__pyx_tuple__153);
  144864. /* "(tree fragment)":2
  144865. * def __reduce_cython__(self):
  144866. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  144867. * def __setstate_cython__(self, __pyx_state):
  144868. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  144869. */
  144870. __pyx_tuple__154 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__154)) __PYX_ERR(9, 2, __pyx_L1_error)
  144871. __Pyx_GOTREF(__pyx_tuple__154);
  144872. __Pyx_GIVEREF(__pyx_tuple__154);
  144873. /* "(tree fragment)":4
  144874. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  144875. * def __setstate_cython__(self, __pyx_state):
  144876. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  144877. */
  144878. __pyx_tuple__155 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__155)) __PYX_ERR(9, 4, __pyx_L1_error)
  144879. __Pyx_GOTREF(__pyx_tuple__155);
  144880. __Pyx_GIVEREF(__pyx_tuple__155);
  144881. /* "(tree fragment)":2
  144882. * def __reduce_cython__(self):
  144883. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  144884. * def __setstate_cython__(self, __pyx_state):
  144885. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  144886. */
  144887. __pyx_tuple__156 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__156)) __PYX_ERR(9, 2, __pyx_L1_error)
  144888. __Pyx_GOTREF(__pyx_tuple__156);
  144889. __Pyx_GIVEREF(__pyx_tuple__156);
  144890. /* "(tree fragment)":4
  144891. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  144892. * def __setstate_cython__(self, __pyx_state):
  144893. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  144894. */
  144895. __pyx_tuple__157 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__157)) __PYX_ERR(9, 4, __pyx_L1_error)
  144896. __Pyx_GOTREF(__pyx_tuple__157);
  144897. __Pyx_GIVEREF(__pyx_tuple__157);
  144898. /* "(tree fragment)":2
  144899. * def __reduce_cython__(self):
  144900. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  144901. * def __setstate_cython__(self, __pyx_state):
  144902. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  144903. */
  144904. __pyx_tuple__158 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__158)) __PYX_ERR(9, 2, __pyx_L1_error)
  144905. __Pyx_GOTREF(__pyx_tuple__158);
  144906. __Pyx_GIVEREF(__pyx_tuple__158);
  144907. /* "(tree fragment)":4
  144908. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  144909. * def __setstate_cython__(self, __pyx_state):
  144910. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  144911. */
  144912. __pyx_tuple__159 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__159)) __PYX_ERR(9, 4, __pyx_L1_error)
  144913. __Pyx_GOTREF(__pyx_tuple__159);
  144914. __Pyx_GIVEREF(__pyx_tuple__159);
  144915. /* "(tree fragment)":2
  144916. * def __reduce_cython__(self):
  144917. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  144918. * def __setstate_cython__(self, __pyx_state):
  144919. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  144920. */
  144921. __pyx_tuple__160 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__160)) __PYX_ERR(9, 2, __pyx_L1_error)
  144922. __Pyx_GOTREF(__pyx_tuple__160);
  144923. __Pyx_GIVEREF(__pyx_tuple__160);
  144924. /* "(tree fragment)":4
  144925. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  144926. * def __setstate_cython__(self, __pyx_state):
  144927. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  144928. */
  144929. __pyx_tuple__161 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__161)) __PYX_ERR(9, 4, __pyx_L1_error)
  144930. __Pyx_GOTREF(__pyx_tuple__161);
  144931. __Pyx_GIVEREF(__pyx_tuple__161);
  144932. /* "uvloop/handles/process.pyx":66
  144933. * # GIL should help us to avoid that.)
  144934. * self._abort_init()
  144935. * raise RuntimeError( # <<<<<<<<<<<<<<
  144936. * 'Racing with another loop to spawn a process.')
  144937. *
  144938. */
  144939. __pyx_tuple__162 = PyTuple_Pack(1, __pyx_kp_u_Racing_with_another_loop_to_spaw); if (unlikely(!__pyx_tuple__162)) __PYX_ERR(6, 66, __pyx_L1_error)
  144940. __Pyx_GOTREF(__pyx_tuple__162);
  144941. __Pyx_GIVEREF(__pyx_tuple__162);
  144942. /* "uvloop/handles/process.pyx":148
  144943. * # process must be dead now.
  144944. * try:
  144945. * exc_name, exc_msg = errpipe_data.split(b':', 1) # <<<<<<<<<<<<<<
  144946. * exc_name = exc_name.decode()
  144947. * exc_msg = exc_msg.decode()
  144948. */
  144949. __pyx_tuple__164 = PyTuple_Pack(2, __pyx_kp_b__163, __pyx_int_1); if (unlikely(!__pyx_tuple__164)) __PYX_ERR(6, 148, __pyx_L1_error)
  144950. __Pyx_GOTREF(__pyx_tuple__164);
  144951. __Pyx_GIVEREF(__pyx_tuple__164);
  144952. /* "uvloop/handles/process.pyx":184
  144953. * except BaseException as ex:
  144954. * try:
  144955. * with open(self._errpipe_write, 'wb') as f: # <<<<<<<<<<<<<<
  144956. * f.write(str(ex.__class__.__name__).encode())
  144957. * f.write(b':')
  144958. */
  144959. __pyx_tuple__165 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_tuple__165)) __PYX_ERR(6, 184, __pyx_L1_error)
  144960. __Pyx_GOTREF(__pyx_tuple__165);
  144961. __Pyx_GIVEREF(__pyx_tuple__165);
  144962. /* "uvloop/handles/process.pyx":197
  144963. * cdef _close_after_spawn(self, int fd):
  144964. * if self._fds_to_close is None:
  144965. * raise RuntimeError( # <<<<<<<<<<<<<<
  144966. * 'UVProcess._close_after_spawn called after uv_spawn')
  144967. * self._fds_to_close.add(fd)
  144968. */
  144969. __pyx_tuple__166 = PyTuple_Pack(1, __pyx_kp_u_UVProcess__close_after_spawn_cal); if (unlikely(!__pyx_tuple__166)) __PYX_ERR(6, 197, __pyx_L1_error)
  144970. __Pyx_GOTREF(__pyx_tuple__166);
  144971. __Pyx_GIVEREF(__pyx_tuple__166);
  144972. /* "uvloop/handles/process.pyx":263
  144973. * cwd = PyUnicode_EncodeFSDefault(cwd)
  144974. * if not isinstance(cwd, bytes):
  144975. * raise ValueError('cwd must be a str or bytes object') # <<<<<<<<<<<<<<
  144976. *
  144977. * self.__cwd = cwd
  144978. */
  144979. __pyx_tuple__167 = PyTuple_Pack(1, __pyx_kp_u_cwd_must_be_a_str_or_bytes_objec); if (unlikely(!__pyx_tuple__167)) __PYX_ERR(6, 263, __pyx_L1_error)
  144980. __Pyx_GOTREF(__pyx_tuple__167);
  144981. __Pyx_GIVEREF(__pyx_tuple__167);
  144982. /* "uvloop/handles/process.pyx":278
  144983. *
  144984. * if an < 1:
  144985. * raise ValueError('cannot spawn a process: args are empty') # <<<<<<<<<<<<<<
  144986. *
  144987. * self.__args = args.copy()
  144988. */
  144989. __pyx_tuple__168 = PyTuple_Pack(1, __pyx_kp_u_cannot_spawn_a_process_args_are); if (unlikely(!__pyx_tuple__168)) __PYX_ERR(6, 278, __pyx_L1_error)
  144990. __Pyx_GOTREF(__pyx_tuple__168);
  144991. __Pyx_GIVEREF(__pyx_tuple__168);
  144992. /* "uvloop/handles/process.pyx":286
  144993. * self.__args[i] = PyUnicode_EncodeFSDefault(arg)
  144994. * elif not isinstance(arg, bytes):
  144995. * raise TypeError('all args must be str or bytes') # <<<<<<<<<<<<<<
  144996. *
  144997. * path = self.__args[0]
  144998. */
  144999. __pyx_tuple__169 = PyTuple_Pack(1, __pyx_kp_u_all_args_must_be_str_or_bytes); if (unlikely(!__pyx_tuple__169)) __PYX_ERR(6, 286, __pyx_L1_error)
  145000. __Pyx_GOTREF(__pyx_tuple__169);
  145001. __Pyx_GIVEREF(__pyx_tuple__169);
  145002. /* "uvloop/handles/process.pyx":301
  145003. * key = PyUnicode_EncodeFSDefault(key)
  145004. * elif not isinstance(key, bytes):
  145005. * raise TypeError( # <<<<<<<<<<<<<<
  145006. * 'all environment vars must be bytes or str')
  145007. *
  145008. */
  145009. __pyx_tuple__170 = PyTuple_Pack(1, __pyx_kp_u_all_environment_vars_must_be_byt); if (unlikely(!__pyx_tuple__170)) __PYX_ERR(6, 301, __pyx_L1_error)
  145010. __Pyx_GOTREF(__pyx_tuple__170);
  145011. __Pyx_GIVEREF(__pyx_tuple__170);
  145012. /* "uvloop/handles/process.pyx":307
  145013. * val = PyUnicode_EncodeFSDefault(val)
  145014. * elif not isinstance(val, bytes):
  145015. * raise TypeError( # <<<<<<<<<<<<<<
  145016. * 'all environment values must be bytes or str')
  145017. *
  145018. */
  145019. __pyx_tuple__171 = PyTuple_Pack(1, __pyx_kp_u_all_environment_values_must_be_b); if (unlikely(!__pyx_tuple__171)) __PYX_ERR(6, 307, __pyx_L1_error)
  145020. __Pyx_GOTREF(__pyx_tuple__171);
  145021. __Pyx_GIVEREF(__pyx_tuple__171);
  145022. /* "(tree fragment)":2
  145023. * def __reduce_cython__(self):
  145024. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  145025. * def __setstate_cython__(self, __pyx_state):
  145026. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  145027. */
  145028. __pyx_tuple__173 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__173)) __PYX_ERR(9, 2, __pyx_L1_error)
  145029. __Pyx_GOTREF(__pyx_tuple__173);
  145030. __Pyx_GIVEREF(__pyx_tuple__173);
  145031. /* "(tree fragment)":4
  145032. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  145033. * def __setstate_cython__(self, __pyx_state):
  145034. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  145035. */
  145036. __pyx_tuple__174 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__174)) __PYX_ERR(9, 4, __pyx_L1_error)
  145037. __Pyx_GOTREF(__pyx_tuple__174);
  145038. __Pyx_GIVEREF(__pyx_tuple__174);
  145039. /* "uvloop/handles/process.pyx":372
  145040. * self._loop.call_soon(self._protocol.process_exited)
  145041. * else:
  145042. * self._pending_calls.append((_CALL_PROCESS_EXITED, None, None)) # <<<<<<<<<<<<<<
  145043. *
  145044. * self._try_finish()
  145045. */
  145046. __pyx_tuple__175 = PyTuple_Pack(3, __pyx_int_2, Py_None, Py_None); if (unlikely(!__pyx_tuple__175)) __PYX_ERR(6, 372, __pyx_L1_error)
  145047. __Pyx_GOTREF(__pyx_tuple__175);
  145048. __Pyx_GIVEREF(__pyx_tuple__175);
  145049. /* "uvloop/handles/process.pyx":449
  145050. * io[0] = self._file_devnull()
  145051. * elif _stdout == subprocess_STDOUT:
  145052. * raise ValueError( # <<<<<<<<<<<<<<
  145053. * 'subprocess.STDOUT is supported only by stderr parameter')
  145054. * else:
  145055. */
  145056. __pyx_tuple__176 = PyTuple_Pack(1, __pyx_kp_u_subprocess_STDOUT_is_supported_o); if (unlikely(!__pyx_tuple__176)) __PYX_ERR(6, 449, __pyx_L1_error)
  145057. __Pyx_GOTREF(__pyx_tuple__176);
  145058. __Pyx_GIVEREF(__pyx_tuple__176);
  145059. /* "uvloop/handles/process.pyx":499
  145060. * if io[1] is None:
  145061. * # shouldn't ever happen
  145062. * raise RuntimeError('cannot apply subprocess.STDOUT') # <<<<<<<<<<<<<<
  145063. *
  145064. * newfd = os_dup(io[1])
  145065. */
  145066. __pyx_tuple__177 = PyTuple_Pack(1, __pyx_kp_u_cannot_apply_subprocess_STDOUT); if (unlikely(!__pyx_tuple__177)) __PYX_ERR(6, 499, __pyx_L1_error)
  145067. __Pyx_GOTREF(__pyx_tuple__177);
  145068. __Pyx_GIVEREF(__pyx_tuple__177);
  145069. /* "uvloop/handles/process.pyx":562
  145070. * self._loop.call_soon(self._protocol.connection_lost, None)
  145071. * else:
  145072. * self._pending_calls.append((_CALL_CONNECTION_LOST, None, None)) # <<<<<<<<<<<<<<
  145073. *
  145074. * def __stdio_inited(self, waiter, stdio_fut):
  145075. */
  145076. __pyx_tuple__178 = PyTuple_Pack(3, __pyx_int_3, Py_None, Py_None); if (unlikely(!__pyx_tuple__178)) __PYX_ERR(6, 562, __pyx_L1_error)
  145077. __Pyx_GOTREF(__pyx_tuple__178);
  145078. __Pyx_GIVEREF(__pyx_tuple__178);
  145079. /* "(tree fragment)":2
  145080. * def __reduce_cython__(self):
  145081. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  145082. * def __setstate_cython__(self, __pyx_state):
  145083. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  145084. */
  145085. __pyx_tuple__179 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__179)) __PYX_ERR(9, 2, __pyx_L1_error)
  145086. __Pyx_GOTREF(__pyx_tuple__179);
  145087. __Pyx_GIVEREF(__pyx_tuple__179);
  145088. /* "(tree fragment)":4
  145089. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  145090. * def __setstate_cython__(self, __pyx_state):
  145091. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  145092. */
  145093. __pyx_tuple__180 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__180)) __PYX_ERR(9, 4, __pyx_L1_error)
  145094. __Pyx_GOTREF(__pyx_tuple__180);
  145095. __Pyx_GIVEREF(__pyx_tuple__180);
  145096. /* "(tree fragment)":2
  145097. * def __reduce_cython__(self):
  145098. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  145099. * def __setstate_cython__(self, __pyx_state):
  145100. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  145101. */
  145102. __pyx_tuple__181 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__181)) __PYX_ERR(9, 2, __pyx_L1_error)
  145103. __Pyx_GOTREF(__pyx_tuple__181);
  145104. __Pyx_GIVEREF(__pyx_tuple__181);
  145105. /* "(tree fragment)":4
  145106. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  145107. * def __setstate_cython__(self, __pyx_state):
  145108. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  145109. */
  145110. __pyx_tuple__182 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__182)) __PYX_ERR(9, 4, __pyx_L1_error)
  145111. __Pyx_GOTREF(__pyx_tuple__182);
  145112. __Pyx_GIVEREF(__pyx_tuple__182);
  145113. /* "uvloop/dns.pyx":22
  145114. * return socket_getservbyname(port, 'udp')
  145115. *
  145116. * raise OSError('service/proto not found') # <<<<<<<<<<<<<<
  145117. *
  145118. *
  145119. */
  145120. __pyx_tuple__183 = PyTuple_Pack(1, __pyx_kp_u_service_proto_not_found); if (unlikely(!__pyx_tuple__183)) __PYX_ERR(7, 22, __pyx_L1_error)
  145121. __Pyx_GOTREF(__pyx_tuple__183);
  145122. __Pyx_GIVEREF(__pyx_tuple__183);
  145123. /* "uvloop/dns.pyx":63
  145124. * )
  145125. *
  145126. * raise RuntimeError("cannot convert sockaddr into Python object") # <<<<<<<<<<<<<<
  145127. *
  145128. *
  145129. */
  145130. __pyx_tuple__184 = PyTuple_Pack(1, __pyx_kp_u_cannot_convert_sockaddr_into_Pyt); if (unlikely(!__pyx_tuple__184)) __PYX_ERR(7, 63, __pyx_L1_error)
  145131. __Pyx_GOTREF(__pyx_tuple__184);
  145132. __Pyx_GIVEREF(__pyx_tuple__184);
  145133. /* "(tree fragment)":2
  145134. * def __reduce_cython__(self):
  145135. * raise TypeError("Pickling of struct members such as self.addr must be explicitly requested with @auto_pickle(True)") # <<<<<<<<<<<<<<
  145136. * def __setstate_cython__(self, __pyx_state):
  145137. * raise TypeError("Pickling of struct members such as self.addr must be explicitly requested with @auto_pickle(True)")
  145138. */
  145139. __pyx_tuple__185 = PyTuple_Pack(1, __pyx_kp_s_Pickling_of_struct_members_such); if (unlikely(!__pyx_tuple__185)) __PYX_ERR(9, 2, __pyx_L1_error)
  145140. __Pyx_GOTREF(__pyx_tuple__185);
  145141. __Pyx_GIVEREF(__pyx_tuple__185);
  145142. /* "(tree fragment)":4
  145143. * raise TypeError("Pickling of struct members such as self.addr must be explicitly requested with @auto_pickle(True)")
  145144. * def __setstate_cython__(self, __pyx_state):
  145145. * raise TypeError("Pickling of struct members such as self.addr must be explicitly requested with @auto_pickle(True)") # <<<<<<<<<<<<<<
  145146. */
  145147. __pyx_tuple__186 = PyTuple_Pack(1, __pyx_kp_s_Pickling_of_struct_members_such); if (unlikely(!__pyx_tuple__186)) __PYX_ERR(9, 4, __pyx_L1_error)
  145148. __Pyx_GOTREF(__pyx_tuple__186);
  145149. __Pyx_GIVEREF(__pyx_tuple__186);
  145150. /* "uvloop/dns.pyx":96
  145151. * if family == uv.AF_INET:
  145152. * if not isinstance(addr, tuple):
  145153. * raise TypeError('AF_INET address must be tuple') # <<<<<<<<<<<<<<
  145154. * if len(addr) != 2:
  145155. * raise ValueError('AF_INET address must be tuple of (host, port)')
  145156. */
  145157. __pyx_tuple__187 = PyTuple_Pack(1, __pyx_kp_u_AF_INET_address_must_be_tuple); if (unlikely(!__pyx_tuple__187)) __PYX_ERR(7, 96, __pyx_L1_error)
  145158. __Pyx_GOTREF(__pyx_tuple__187);
  145159. __Pyx_GIVEREF(__pyx_tuple__187);
  145160. /* "uvloop/dns.pyx":98
  145161. * raise TypeError('AF_INET address must be tuple')
  145162. * if len(addr) != 2:
  145163. * raise ValueError('AF_INET address must be tuple of (host, port)') # <<<<<<<<<<<<<<
  145164. * host, port = addr
  145165. * if isinstance(host, str):
  145166. */
  145167. __pyx_tuple__188 = PyTuple_Pack(1, __pyx_kp_u_AF_INET_address_must_be_tuple_of); if (unlikely(!__pyx_tuple__188)) __PYX_ERR(7, 98, __pyx_L1_error)
  145168. __Pyx_GOTREF(__pyx_tuple__188);
  145169. __Pyx_GIVEREF(__pyx_tuple__188);
  145170. /* "uvloop/dns.pyx":107
  145171. * host = host.encode('idna')
  145172. * if not isinstance(host, (bytes, bytearray)):
  145173. * raise TypeError('host must be a string or bytes object') # <<<<<<<<<<<<<<
  145174. *
  145175. * port = __port_to_int(port, None)
  145176. */
  145177. __pyx_tuple__189 = PyTuple_Pack(1, __pyx_kp_u_host_must_be_a_string_or_bytes_o); if (unlikely(!__pyx_tuple__189)) __PYX_ERR(7, 107, __pyx_L1_error)
  145178. __Pyx_GOTREF(__pyx_tuple__189);
  145179. __Pyx_GIVEREF(__pyx_tuple__189);
  145180. /* "uvloop/dns.pyx":118
  145181. * elif family == uv.AF_INET6:
  145182. * if not isinstance(addr, tuple):
  145183. * raise TypeError('AF_INET6 address must be tuple') # <<<<<<<<<<<<<<
  145184. *
  145185. * addr_len = len(addr)
  145186. */
  145187. __pyx_tuple__190 = PyTuple_Pack(1, __pyx_kp_u_AF_INET6_address_must_be_tuple); if (unlikely(!__pyx_tuple__190)) __PYX_ERR(7, 118, __pyx_L1_error)
  145188. __Pyx_GOTREF(__pyx_tuple__190);
  145189. __Pyx_GIVEREF(__pyx_tuple__190);
  145190. /* "uvloop/dns.pyx":122
  145191. * addr_len = len(addr)
  145192. * if addr_len < 2 or addr_len > 4:
  145193. * raise ValueError( # <<<<<<<<<<<<<<
  145194. * 'AF_INET6 must be a tuple of 2-4 parameters: '
  145195. * '(host, port, flowinfo?, scope_id?)')
  145196. */
  145197. __pyx_tuple__191 = PyTuple_Pack(1, __pyx_kp_u_AF_INET6_must_be_a_tuple_of_2_4); if (unlikely(!__pyx_tuple__191)) __PYX_ERR(7, 122, __pyx_L1_error)
  145198. __Pyx_GOTREF(__pyx_tuple__191);
  145199. __Pyx_GIVEREF(__pyx_tuple__191);
  145200. /* "uvloop/dns.pyx":156
  145201. * addr = addr.encode(sys_getfilesystemencoding())
  145202. * elif not isinstance(addr, bytes):
  145203. * raise TypeError('AF_UNIX address must be a str or a bytes object') # <<<<<<<<<<<<<<
  145204. *
  145205. * PyBytes_AsStringAndSize(addr, &buf, &buflen)
  145206. */
  145207. __pyx_tuple__192 = PyTuple_Pack(1, __pyx_kp_u_AF_UNIX_address_must_be_a_str_or); if (unlikely(!__pyx_tuple__192)) __PYX_ERR(7, 156, __pyx_L1_error)
  145208. __Pyx_GOTREF(__pyx_tuple__192);
  145209. __Pyx_GIVEREF(__pyx_tuple__192);
  145210. /* "uvloop/dns.pyx":268
  145211. *
  145212. * if self.data is NULL:
  145213. * raise RuntimeError('AddrInfo.data is NULL') # <<<<<<<<<<<<<<
  145214. *
  145215. * ptr = self.data
  145216. */
  145217. __pyx_tuple__193 = PyTuple_Pack(1, __pyx_kp_u_AddrInfo_data_is_NULL); if (unlikely(!__pyx_tuple__193)) __PYX_ERR(7, 268, __pyx_L1_error)
  145218. __Pyx_GOTREF(__pyx_tuple__193);
  145219. __Pyx_GIVEREF(__pyx_tuple__193);
  145220. /* "(tree fragment)":2
  145221. * def __reduce_cython__(self):
  145222. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  145223. * def __setstate_cython__(self, __pyx_state):
  145224. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  145225. */
  145226. __pyx_tuple__194 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__194)) __PYX_ERR(9, 2, __pyx_L1_error)
  145227. __Pyx_GOTREF(__pyx_tuple__194);
  145228. __Pyx_GIVEREF(__pyx_tuple__194);
  145229. /* "(tree fragment)":4
  145230. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  145231. * def __setstate_cython__(self, __pyx_state):
  145232. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  145233. */
  145234. __pyx_tuple__195 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__195)) __PYX_ERR(9, 4, __pyx_L1_error)
  145235. __Pyx_GOTREF(__pyx_tuple__195);
  145236. __Pyx_GIVEREF(__pyx_tuple__195);
  145237. /* "(tree fragment)":2
  145238. * def __reduce_cython__(self):
  145239. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  145240. * def __setstate_cython__(self, __pyx_state):
  145241. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  145242. */
  145243. __pyx_tuple__196 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__196)) __PYX_ERR(9, 2, __pyx_L1_error)
  145244. __Pyx_GOTREF(__pyx_tuple__196);
  145245. __Pyx_GIVEREF(__pyx_tuple__196);
  145246. /* "(tree fragment)":4
  145247. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  145248. * def __setstate_cython__(self, __pyx_state):
  145249. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  145250. */
  145251. __pyx_tuple__197 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__197)) __PYX_ERR(9, 4, __pyx_L1_error)
  145252. __Pyx_GOTREF(__pyx_tuple__197);
  145253. __Pyx_GIVEREF(__pyx_tuple__197);
  145254. /* "(tree fragment)":2
  145255. * def __reduce_cython__(self):
  145256. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  145257. * def __setstate_cython__(self, __pyx_state):
  145258. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  145259. */
  145260. __pyx_tuple__198 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__198)) __PYX_ERR(9, 2, __pyx_L1_error)
  145261. __Pyx_GOTREF(__pyx_tuple__198);
  145262. __Pyx_GIVEREF(__pyx_tuple__198);
  145263. /* "(tree fragment)":4
  145264. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  145265. * def __setstate_cython__(self, __pyx_state):
  145266. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  145267. */
  145268. __pyx_tuple__199 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__199)) __PYX_ERR(9, 4, __pyx_L1_error)
  145269. __Pyx_GOTREF(__pyx_tuple__199);
  145270. __Pyx_GIVEREF(__pyx_tuple__199);
  145271. /* "uvloop/sslproto.pyx":3
  145272. * cdef _create_transport_context(server_side, server_hostname):
  145273. * if server_side:
  145274. * raise ValueError('Server side SSL needs a valid SSLContext') # <<<<<<<<<<<<<<
  145275. *
  145276. * # Client side may pass ssl=True to use a default
  145277. */
  145278. __pyx_tuple__200 = PyTuple_Pack(1, __pyx_kp_u_Server_side_SSL_needs_a_valid_SS); if (unlikely(!__pyx_tuple__200)) __PYX_ERR(22, 3, __pyx_L1_error)
  145279. __Pyx_GOTREF(__pyx_tuple__200);
  145280. __Pyx_GIVEREF(__pyx_tuple__200);
  145281. /* "(tree fragment)":2
  145282. * def __reduce_cython__(self):
  145283. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  145284. * def __setstate_cython__(self, __pyx_state):
  145285. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  145286. */
  145287. __pyx_tuple__201 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__201)) __PYX_ERR(9, 2, __pyx_L1_error)
  145288. __Pyx_GOTREF(__pyx_tuple__201);
  145289. __Pyx_GIVEREF(__pyx_tuple__201);
  145290. /* "(tree fragment)":4
  145291. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  145292. * def __setstate_cython__(self, __pyx_state):
  145293. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  145294. */
  145295. __pyx_tuple__202 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__202)) __PYX_ERR(9, 4, __pyx_L1_error)
  145296. __Pyx_GOTREF(__pyx_tuple__202);
  145297. __Pyx_GIVEREF(__pyx_tuple__202);
  145298. /* "uvloop/sslproto.pyx":308
  145299. * if self._app_transport is None:
  145300. * if self._app_transport_created:
  145301. * raise RuntimeError('Creating _SSLProtocolTransport twice') # <<<<<<<<<<<<<<
  145302. * self._app_transport = _SSLProtocolTransport(self._loop, self)
  145303. * self._app_transport_created = True
  145304. */
  145305. __pyx_tuple__203 = PyTuple_Pack(1, __pyx_kp_u_Creating__SSLProtocolTransport_t); if (unlikely(!__pyx_tuple__203)) __PYX_ERR(22, 308, __pyx_L1_error)
  145306. __Pyx_GOTREF(__pyx_tuple__203);
  145307. __Pyx_GIVEREF(__pyx_tuple__203);
  145308. /* "uvloop/sslproto.pyx":792
  145309. * self._app_reading_paused = False
  145310. *
  145311. * def resume(): # <<<<<<<<<<<<<<
  145312. * if self._state == WRAPPED:
  145313. * self._do_read()
  145314. */
  145315. __pyx_codeobj__204 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_uvloop_sslproto_pyx, __pyx_n_s_resume, 792, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__204)) __PYX_ERR(22, 792, __pyx_L1_error)
  145316. /* "(tree fragment)":2
  145317. * def __reduce_cython__(self):
  145318. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  145319. * def __setstate_cython__(self, __pyx_state):
  145320. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  145321. */
  145322. __pyx_tuple__205 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__205)) __PYX_ERR(9, 2, __pyx_L1_error)
  145323. __Pyx_GOTREF(__pyx_tuple__205);
  145324. __Pyx_GIVEREF(__pyx_tuple__205);
  145325. /* "(tree fragment)":4
  145326. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  145327. * def __setstate_cython__(self, __pyx_state):
  145328. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  145329. */
  145330. __pyx_tuple__206 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__206)) __PYX_ERR(9, 4, __pyx_L1_error)
  145331. __Pyx_GOTREF(__pyx_tuple__206);
  145332. __Pyx_GIVEREF(__pyx_tuple__206);
  145333. /* "uvloop/handles/udp.pyx":48
  145334. * if UVLOOP_DEBUG:
  145335. * if not self.closed:
  145336. * raise RuntimeError( # <<<<<<<<<<<<<<
  145337. * 'open _UDPSendContext is being deallocated')
  145338. * self.udp = None
  145339. */
  145340. __pyx_tuple__207 = PyTuple_Pack(1, __pyx_kp_u_open__UDPSendContext_is_being_de); if (unlikely(!__pyx_tuple__207)) __PYX_ERR(23, 48, __pyx_L1_error)
  145341. __Pyx_GOTREF(__pyx_tuple__207);
  145342. __Pyx_GIVEREF(__pyx_tuple__207);
  145343. /* "(tree fragment)":2
  145344. * def __reduce_cython__(self):
  145345. * raise TypeError("self.py_buf,self.req cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
  145346. * def __setstate_cython__(self, __pyx_state):
  145347. * raise TypeError("self.py_buf,self.req cannot be converted to a Python object for pickling")
  145348. */
  145349. __pyx_tuple__208 = PyTuple_Pack(1, __pyx_kp_s_self_py_buf_self_req_cannot_be_c); if (unlikely(!__pyx_tuple__208)) __PYX_ERR(9, 2, __pyx_L1_error)
  145350. __Pyx_GOTREF(__pyx_tuple__208);
  145351. __Pyx_GIVEREF(__pyx_tuple__208);
  145352. /* "(tree fragment)":4
  145353. * raise TypeError("self.py_buf,self.req cannot be converted to a Python object for pickling")
  145354. * def __setstate_cython__(self, __pyx_state):
  145355. * raise TypeError("self.py_buf,self.req cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
  145356. */
  145357. __pyx_tuple__209 = PyTuple_Pack(1, __pyx_kp_s_self_py_buf_self_req_cannot_be_c); if (unlikely(!__pyx_tuple__209)) __PYX_ERR(9, 4, __pyx_L1_error)
  145358. __Pyx_GOTREF(__pyx_tuple__209);
  145359. __Pyx_GIVEREF(__pyx_tuple__209);
  145360. /* "uvloop/handles/udp.pyx":186
  145361. * cdef _new_socket(self):
  145362. * if self._family not in (uv.AF_INET, uv.AF_INET6, uv.AF_UNIX):
  145363. * raise RuntimeError( # <<<<<<<<<<<<<<
  145364. * 'UDPTransport.family is undefined; '
  145365. * 'cannot create python socket')
  145366. */
  145367. __pyx_tuple__210 = PyTuple_Pack(1, __pyx_kp_u_UDPTransport_family_is_undefined); if (unlikely(!__pyx_tuple__210)) __PYX_ERR(23, 186, __pyx_L1_error)
  145368. __Pyx_GOTREF(__pyx_tuple__210);
  145369. __Pyx_GIVEREF(__pyx_tuple__210);
  145370. /* "uvloop/handles/udp.pyx":204
  145371. *
  145372. * if self._family not in (uv.AF_INET, uv.AF_INET6, uv.AF_UNIX):
  145373. * raise RuntimeError('UDPTransport.family is undefined; cannot send') # <<<<<<<<<<<<<<
  145374. *
  145375. * if addr is None:
  145376. */
  145377. __pyx_tuple__211 = PyTuple_Pack(1, __pyx_kp_u_UDPTransport_family_is_undefined_2); if (unlikely(!__pyx_tuple__211)) __PYX_ERR(23, 204, __pyx_L1_error)
  145378. __Pyx_GOTREF(__pyx_tuple__211);
  145379. __Pyx_GIVEREF(__pyx_tuple__211);
  145380. /* "(tree fragment)":2
  145381. * def __reduce_cython__(self):
  145382. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  145383. * def __setstate_cython__(self, __pyx_state):
  145384. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  145385. */
  145386. __pyx_tuple__212 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__212)) __PYX_ERR(9, 2, __pyx_L1_error)
  145387. __Pyx_GOTREF(__pyx_tuple__212);
  145388. __Pyx_GIVEREF(__pyx_tuple__212);
  145389. /* "(tree fragment)":4
  145390. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  145391. * def __setstate_cython__(self, __pyx_state):
  145392. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  145393. */
  145394. __pyx_tuple__213 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__213)) __PYX_ERR(9, 4, __pyx_L1_error)
  145395. __Pyx_GOTREF(__pyx_tuple__213);
  145396. __Pyx_GIVEREF(__pyx_tuple__213);
  145397. /* "uvloop/handles/udp.pyx":347
  145398. * if pyaddr is None:
  145399. * udp._fatal_error(
  145400. * RuntimeError( # <<<<<<<<<<<<<<
  145401. * 'uv_udp.receive callback: addr is NULL and nread >= 0'),
  145402. * False)
  145403. */
  145404. __pyx_tuple__214 = PyTuple_Pack(1, __pyx_kp_u_uv_udp_receive_callback_addr_is); if (unlikely(!__pyx_tuple__214)) __PYX_ERR(23, 347, __pyx_L1_error)
  145405. __Pyx_GOTREF(__pyx_tuple__214);
  145406. __Pyx_GIVEREF(__pyx_tuple__214);
  145407. /* "(tree fragment)":2
  145408. * def __reduce_cython__(self):
  145409. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  145410. * def __setstate_cython__(self, __pyx_state):
  145411. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  145412. */
  145413. __pyx_tuple__215 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__215)) __PYX_ERR(9, 2, __pyx_L1_error)
  145414. __Pyx_GOTREF(__pyx_tuple__215);
  145415. __Pyx_GIVEREF(__pyx_tuple__215);
  145416. /* "(tree fragment)":4
  145417. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  145418. * def __setstate_cython__(self, __pyx_state):
  145419. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  145420. */
  145421. __pyx_tuple__216 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__216)) __PYX_ERR(9, 4, __pyx_L1_error)
  145422. __Pyx_GOTREF(__pyx_tuple__216);
  145423. __Pyx_GIVEREF(__pyx_tuple__216);
  145424. /* "cfunc.to_py":65
  145425. * @cname("__Pyx_CFunc_object____Loop____bint___to_py")
  145426. * cdef object __Pyx_CFunc_object____Loop____bint___to_py(object (*f)(Loop, bint) ):
  145427. * def wrap(Loop self, bint enabled): # <<<<<<<<<<<<<<
  145428. * """wrap(self: 'Loop', enabled: bool)"""
  145429. * return f(self, enabled)
  145430. */
  145431. __pyx_tuple__218 = PyTuple_Pack(2, __pyx_n_s_self_2, __pyx_n_s_enabled); if (unlikely(!__pyx_tuple__218)) __PYX_ERR(9, 65, __pyx_L1_error)
  145432. __Pyx_GOTREF(__pyx_tuple__218);
  145433. __Pyx_GIVEREF(__pyx_tuple__218);
  145434. __pyx_codeobj__219 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__218, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_wrap, 65, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__219)) __PYX_ERR(9, 65, __pyx_L1_error)
  145435. /* "uvloop/loop.pyx":3061
  145436. * class _SyncSocketReaderFuture(aio_Future):
  145437. *
  145438. * def __init__(self, sock, loop): # <<<<<<<<<<<<<<
  145439. * aio_Future.__init__(self, loop=loop)
  145440. * self.__sock = sock
  145441. */
  145442. __pyx_tuple__220 = PyTuple_Pack(3, __pyx_n_s_self_2, __pyx_n_s_sock, __pyx_n_s_loop); if (unlikely(!__pyx_tuple__220)) __PYX_ERR(2, 3061, __pyx_L1_error)
  145443. __Pyx_GOTREF(__pyx_tuple__220);
  145444. __Pyx_GIVEREF(__pyx_tuple__220);
  145445. __pyx_codeobj__221 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__220, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_uvloop_loop_pyx, __pyx_n_s_init, 3061, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__221)) __PYX_ERR(2, 3061, __pyx_L1_error)
  145446. /* "uvloop/loop.pyx":3066
  145447. * self.__loop = loop
  145448. *
  145449. * def cancel(self): # <<<<<<<<<<<<<<
  145450. * if self.__sock is not None and self.__sock.fileno() != -1:
  145451. * self.__loop.remove_reader(self.__sock)
  145452. */
  145453. __pyx_tuple__222 = PyTuple_Pack(1, __pyx_n_s_self_2); if (unlikely(!__pyx_tuple__222)) __PYX_ERR(2, 3066, __pyx_L1_error)
  145454. __Pyx_GOTREF(__pyx_tuple__222);
  145455. __Pyx_GIVEREF(__pyx_tuple__222);
  145456. __pyx_codeobj__223 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__222, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_uvloop_loop_pyx, __pyx_n_s_cancel, 3066, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__223)) __PYX_ERR(2, 3066, __pyx_L1_error)
  145457. /* "uvloop/loop.pyx":3076
  145458. * class _SyncSocketWriterFuture(aio_Future):
  145459. *
  145460. * def __init__(self, sock, loop): # <<<<<<<<<<<<<<
  145461. * aio_Future.__init__(self, loop=loop)
  145462. * self.__sock = sock
  145463. */
  145464. __pyx_tuple__224 = PyTuple_Pack(3, __pyx_n_s_self_2, __pyx_n_s_sock, __pyx_n_s_loop); if (unlikely(!__pyx_tuple__224)) __PYX_ERR(2, 3076, __pyx_L1_error)
  145465. __Pyx_GOTREF(__pyx_tuple__224);
  145466. __Pyx_GIVEREF(__pyx_tuple__224);
  145467. __pyx_codeobj__225 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__224, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_uvloop_loop_pyx, __pyx_n_s_init, 3076, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__225)) __PYX_ERR(2, 3076, __pyx_L1_error)
  145468. /* "uvloop/loop.pyx":3081
  145469. * self.__loop = loop
  145470. *
  145471. * def cancel(self): # <<<<<<<<<<<<<<
  145472. * if self.__sock is not None and self.__sock.fileno() != -1:
  145473. * self.__loop.remove_writer(self.__sock)
  145474. */
  145475. __pyx_tuple__226 = PyTuple_Pack(1, __pyx_n_s_self_2); if (unlikely(!__pyx_tuple__226)) __PYX_ERR(2, 3081, __pyx_L1_error)
  145476. __Pyx_GOTREF(__pyx_tuple__226);
  145477. __Pyx_GIVEREF(__pyx_tuple__226);
  145478. __pyx_codeobj__227 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__226, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_uvloop_loop_pyx, __pyx_n_s_cancel, 3081, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__227)) __PYX_ERR(2, 3081, __pyx_L1_error)
  145479. /* "uvloop/handles/process.pyx":684
  145480. * class WriteSubprocessPipeProto(aio_BaseProtocol):
  145481. *
  145482. * def __init__(self, proc, fd): # <<<<<<<<<<<<<<
  145483. * if UVLOOP_DEBUG:
  145484. * if type(proc) is not UVProcessTransport:
  145485. */
  145486. __pyx_tuple__228 = PyTuple_Pack(3, __pyx_n_s_self_2, __pyx_n_s_proc, __pyx_n_s_fd); if (unlikely(!__pyx_tuple__228)) __PYX_ERR(6, 684, __pyx_L1_error)
  145487. __Pyx_GOTREF(__pyx_tuple__228);
  145488. __Pyx_GIVEREF(__pyx_tuple__228);
  145489. __pyx_codeobj__229 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__228, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_uvloop_handles_process_pyx, __pyx_n_s_init, 684, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__229)) __PYX_ERR(6, 684, __pyx_L1_error)
  145490. /* "uvloop/handles/process.pyx":695
  145491. * self.disconnected = False
  145492. *
  145493. * def connection_made(self, transport): # <<<<<<<<<<<<<<
  145494. * self.pipe = transport
  145495. *
  145496. */
  145497. __pyx_tuple__230 = PyTuple_Pack(2, __pyx_n_s_self_2, __pyx_n_s_transport); if (unlikely(!__pyx_tuple__230)) __PYX_ERR(6, 695, __pyx_L1_error)
  145498. __Pyx_GOTREF(__pyx_tuple__230);
  145499. __Pyx_GIVEREF(__pyx_tuple__230);
  145500. __pyx_codeobj__231 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__230, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_uvloop_handles_process_pyx, __pyx_n_s_connection_made, 695, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__231)) __PYX_ERR(6, 695, __pyx_L1_error)
  145501. /* "uvloop/handles/process.pyx":698
  145502. * self.pipe = transport
  145503. *
  145504. * def __repr__(self): # <<<<<<<<<<<<<<
  145505. * return ('<%s fd=%s pipe=%r>'
  145506. * % (self.__class__.__name__, self.fd, self.pipe))
  145507. */
  145508. __pyx_tuple__232 = PyTuple_Pack(1, __pyx_n_s_self_2); if (unlikely(!__pyx_tuple__232)) __PYX_ERR(6, 698, __pyx_L1_error)
  145509. __Pyx_GOTREF(__pyx_tuple__232);
  145510. __Pyx_GIVEREF(__pyx_tuple__232);
  145511. __pyx_codeobj__233 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__232, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_uvloop_handles_process_pyx, __pyx_n_s_repr, 698, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__233)) __PYX_ERR(6, 698, __pyx_L1_error)
  145512. /* "uvloop/handles/process.pyx":702
  145513. * % (self.__class__.__name__, self.fd, self.pipe))
  145514. *
  145515. * def connection_lost(self, exc): # <<<<<<<<<<<<<<
  145516. * self.disconnected = True
  145517. * (<UVProcessTransport>self.proc)._pipe_connection_lost(self.fd, exc)
  145518. */
  145519. __pyx_tuple__234 = PyTuple_Pack(2, __pyx_n_s_self_2, __pyx_n_s_exc); if (unlikely(!__pyx_tuple__234)) __PYX_ERR(6, 702, __pyx_L1_error)
  145520. __Pyx_GOTREF(__pyx_tuple__234);
  145521. __Pyx_GIVEREF(__pyx_tuple__234);
  145522. __pyx_codeobj__235 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__234, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_uvloop_handles_process_pyx, __pyx_n_s_connection_lost, 702, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__235)) __PYX_ERR(6, 702, __pyx_L1_error)
  145523. /* "uvloop/handles/process.pyx":707
  145524. * self.proc = None
  145525. *
  145526. * def pause_writing(self): # <<<<<<<<<<<<<<
  145527. * (<UVProcessTransport>self.proc)._protocol.pause_writing()
  145528. *
  145529. */
  145530. __pyx_tuple__236 = PyTuple_Pack(1, __pyx_n_s_self_2); if (unlikely(!__pyx_tuple__236)) __PYX_ERR(6, 707, __pyx_L1_error)
  145531. __Pyx_GOTREF(__pyx_tuple__236);
  145532. __Pyx_GIVEREF(__pyx_tuple__236);
  145533. __pyx_codeobj__237 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__236, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_uvloop_handles_process_pyx, __pyx_n_s_pause_writing, 707, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__237)) __PYX_ERR(6, 707, __pyx_L1_error)
  145534. /* "uvloop/handles/process.pyx":710
  145535. * (<UVProcessTransport>self.proc)._protocol.pause_writing()
  145536. *
  145537. * def resume_writing(self): # <<<<<<<<<<<<<<
  145538. * (<UVProcessTransport>self.proc)._protocol.resume_writing()
  145539. *
  145540. */
  145541. __pyx_tuple__238 = PyTuple_Pack(1, __pyx_n_s_self_2); if (unlikely(!__pyx_tuple__238)) __PYX_ERR(6, 710, __pyx_L1_error)
  145542. __Pyx_GOTREF(__pyx_tuple__238);
  145543. __Pyx_GIVEREF(__pyx_tuple__238);
  145544. __pyx_codeobj__239 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__238, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_uvloop_handles_process_pyx, __pyx_n_s_resume_writing, 710, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__239)) __PYX_ERR(6, 710, __pyx_L1_error)
  145545. /* "uvloop/handles/process.pyx":717
  145546. * aio_Protocol):
  145547. *
  145548. * def data_received(self, data): # <<<<<<<<<<<<<<
  145549. * (<UVProcessTransport>self.proc)._pipe_data_received(self.fd, data)
  145550. *
  145551. */
  145552. __pyx_tuple__240 = PyTuple_Pack(2, __pyx_n_s_self_2, __pyx_n_s_data); if (unlikely(!__pyx_tuple__240)) __PYX_ERR(6, 717, __pyx_L1_error)
  145553. __Pyx_GOTREF(__pyx_tuple__240);
  145554. __Pyx_GIVEREF(__pyx_tuple__240);
  145555. __pyx_codeobj__241 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__240, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_uvloop_handles_process_pyx, __pyx_n_s_data_received, 717, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__241)) __PYX_ERR(6, 717, __pyx_L1_error)
  145556. /* "uvloop/loop.pyx":3182
  145557. *
  145558. * @cython.iterable_coroutine
  145559. * async def _test_coroutine_1(): # <<<<<<<<<<<<<<
  145560. * return 42
  145561. */
  145562. __pyx_codeobj__217 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_uvloop_loop_pyx, __pyx_n_s_test_coroutine_1, 3182, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__217)) __PYX_ERR(2, 3182, __pyx_L1_error)
  145563. /* "(tree fragment)":1
  145564. * def __pyx_unpickle_PseudoSocket(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
  145565. * cdef object __pyx_PickleError
  145566. * cdef object __pyx_result
  145567. */
  145568. __pyx_tuple__242 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__242)) __PYX_ERR(9, 1, __pyx_L1_error)
  145569. __Pyx_GOTREF(__pyx_tuple__242);
  145570. __Pyx_GIVEREF(__pyx_tuple__242);
  145571. __pyx_codeobj__243 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__242, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_PseudoSocket, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__243)) __PYX_ERR(9, 1, __pyx_L1_error)
  145572. __pyx_tuple__244 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__244)) __PYX_ERR(9, 1, __pyx_L1_error)
  145573. __Pyx_GOTREF(__pyx_tuple__244);
  145574. __Pyx_GIVEREF(__pyx_tuple__244);
  145575. __pyx_codeobj__245 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__244, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_LruCache, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__245)) __PYX_ERR(9, 1, __pyx_L1_error)
  145576. __Pyx_RefNannyFinishContext();
  145577. return 0;
  145578. __pyx_L1_error:;
  145579. __Pyx_RefNannyFinishContext();
  145580. return -1;
  145581. }
  145582. static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {
  145583. __pyx_umethod_PyDict_Type_pop.type = (PyObject*)&PyDict_Type;
  145584. __pyx_umethod_PyList_Type_copy.type = (PyObject*)&PyList_Type;
  145585. __pyx_umethod_PyUnicode_Type_rstrip.type = (PyObject*)&PyUnicode_Type;
  145586. if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(2, 1, __pyx_L1_error);
  145587. __pyx_float_0_1 = PyFloat_FromDouble(0.1); if (unlikely(!__pyx_float_0_1)) __PYX_ERR(2, 1, __pyx_L1_error)
  145588. __pyx_float_1e3 = PyFloat_FromDouble(1e3); if (unlikely(!__pyx_float_1e3)) __PYX_ERR(2, 1, __pyx_L1_error)
  145589. __pyx_float_30_0 = PyFloat_FromDouble(30.0); if (unlikely(!__pyx_float_30_0)) __PYX_ERR(2, 1, __pyx_L1_error)
  145590. __pyx_float_60_0 = PyFloat_FromDouble(60.0); if (unlikely(!__pyx_float_60_0)) __PYX_ERR(2, 1, __pyx_L1_error)
  145591. __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(2, 1, __pyx_L1_error)
  145592. __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(2, 1, __pyx_L1_error)
  145593. __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) __PYX_ERR(2, 1, __pyx_L1_error)
  145594. __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) __PYX_ERR(2, 1, __pyx_L1_error)
  145595. __pyx_int_10 = PyInt_FromLong(10); if (unlikely(!__pyx_int_10)) __PYX_ERR(2, 1, __pyx_L1_error)
  145596. __pyx_int_15 = PyInt_FromLong(15); if (unlikely(!__pyx_int_15)) __PYX_ERR(2, 1, __pyx_L1_error)
  145597. __pyx_int_42 = PyInt_FromLong(42); if (unlikely(!__pyx_int_42)) __PYX_ERR(2, 1, __pyx_L1_error)
  145598. __pyx_int_100 = PyInt_FromLong(100); if (unlikely(!__pyx_int_100)) __PYX_ERR(2, 1, __pyx_L1_error)
  145599. __pyx_int_1000 = PyInt_FromLong(1000); if (unlikely(!__pyx_int_1000)) __PYX_ERR(2, 1, __pyx_L1_error)
  145600. __pyx_int_2048 = PyInt_FromLong(2048); if (unlikely(!__pyx_int_2048)) __PYX_ERR(2, 1, __pyx_L1_error)
  145601. __pyx_int_50000 = PyInt_FromLong(50000L); if (unlikely(!__pyx_int_50000)) __PYX_ERR(2, 1, __pyx_L1_error)
  145602. __pyx_int_65536 = PyInt_FromLong(65536L); if (unlikely(!__pyx_int_65536)) __PYX_ERR(2, 1, __pyx_L1_error)
  145603. __pyx_int_262144 = PyInt_FromLong(262144L); if (unlikely(!__pyx_int_262144)) __PYX_ERR(2, 1, __pyx_L1_error)
  145604. __pyx_int_1048575 = PyInt_FromLong(1048575L); if (unlikely(!__pyx_int_1048575)) __PYX_ERR(2, 1, __pyx_L1_error)
  145605. __pyx_int_87255255 = PyInt_FromLong(87255255L); if (unlikely(!__pyx_int_87255255)) __PYX_ERR(2, 1, __pyx_L1_error)
  145606. __pyx_int_143395587 = PyInt_FromLong(143395587L); if (unlikely(!__pyx_int_143395587)) __PYX_ERR(2, 1, __pyx_L1_error)
  145607. __pyx_int_3153600000 = PyInt_FromString((char *)"3153600000", 0, 0); if (unlikely(!__pyx_int_3153600000)) __PYX_ERR(2, 1, __pyx_L1_error)
  145608. __pyx_int_4294967296 = PyInt_FromString((char *)"4294967296", 0, 0); if (unlikely(!__pyx_int_4294967296)) __PYX_ERR(2, 1, __pyx_L1_error)
  145609. __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) __PYX_ERR(2, 1, __pyx_L1_error)
  145610. return 0;
  145611. __pyx_L1_error:;
  145612. return -1;
  145613. }
  145614. static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/
  145615. static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/
  145616. static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/
  145617. static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/
  145618. static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/
  145619. static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/
  145620. static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/
  145621. static int __Pyx_modinit_global_init_code(void) {
  145622. __Pyx_RefNannyDeclarations
  145623. __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
  145624. /*--- Global init code ---*/
  145625. __pyx_v_6uvloop_4loop_aio_get_event_loop = Py_None; Py_INCREF(Py_None);
  145626. __pyx_v_6uvloop_4loop_aio_CancelledError = Py_None; Py_INCREF(Py_None);
  145627. __pyx_v_6uvloop_4loop_aio_InvalidStateError = Py_None; Py_INCREF(Py_None);
  145628. __pyx_v_6uvloop_4loop_aio_TimeoutError = Py_None; Py_INCREF(Py_None);
  145629. __pyx_v_6uvloop_4loop_aio_Future = Py_None; Py_INCREF(Py_None);
  145630. __pyx_v_6uvloop_4loop_aio_Task = Py_None; Py_INCREF(Py_None);
  145631. __pyx_v_6uvloop_4loop_aio_ensure_future = Py_None; Py_INCREF(Py_None);
  145632. __pyx_v_6uvloop_4loop_aio_gather = Py_None; Py_INCREF(Py_None);
  145633. __pyx_v_6uvloop_4loop_aio_wait = Py_None; Py_INCREF(Py_None);
  145634. __pyx_v_6uvloop_4loop_aio_wrap_future = Py_None; Py_INCREF(Py_None);
  145635. __pyx_v_6uvloop_4loop_aio_logger = Py_None; Py_INCREF(Py_None);
  145636. __pyx_v_6uvloop_4loop_aio_iscoroutine = Py_None; Py_INCREF(Py_None);
  145637. __pyx_v_6uvloop_4loop_aio_iscoroutinefunction = Py_None; Py_INCREF(Py_None);
  145638. __pyx_v_6uvloop_4loop_aio_BaseProtocol = Py_None; Py_INCREF(Py_None);
  145639. __pyx_v_6uvloop_4loop_aio_Protocol = Py_None; Py_INCREF(Py_None);
  145640. __pyx_v_6uvloop_4loop_aio_isfuture = Py_None; Py_INCREF(Py_None);
  145641. __pyx_v_6uvloop_4loop_aio_get_running_loop = Py_None; Py_INCREF(Py_None);
  145642. __pyx_v_6uvloop_4loop_aio_set_running_loop = Py_None; Py_INCREF(Py_None);
  145643. __pyx_v_6uvloop_4loop_aio_debug_wrapper = Py_None; Py_INCREF(Py_None);
  145644. __pyx_v_6uvloop_4loop_aio_AbstractChildWatcher = Py_None; Py_INCREF(Py_None);
  145645. __pyx_v_6uvloop_4loop_aio_Transport = Py_None; Py_INCREF(Py_None);
  145646. __pyx_v_6uvloop_4loop_aio_FlowControlMixin = Py_None; Py_INCREF(Py_None);
  145647. __pyx_v_6uvloop_4loop_col_deque = Py_None; Py_INCREF(Py_None);
  145648. __pyx_v_6uvloop_4loop_col_Iterable = Py_None; Py_INCREF(Py_None);
  145649. __pyx_v_6uvloop_4loop_col_Counter = Py_None; Py_INCREF(Py_None);
  145650. __pyx_v_6uvloop_4loop_col_OrderedDict = Py_None; Py_INCREF(Py_None);
  145651. __pyx_v_6uvloop_4loop_cc_ThreadPoolExecutor = Py_None; Py_INCREF(Py_None);
  145652. __pyx_v_6uvloop_4loop_cc_Future = Py_None; Py_INCREF(Py_None);
  145653. __pyx_v_6uvloop_4loop_errno_EBADF = Py_None; Py_INCREF(Py_None);
  145654. __pyx_v_6uvloop_4loop_errno_EINVAL = Py_None; Py_INCREF(Py_None);
  145655. __pyx_v_6uvloop_4loop_ft_partial = Py_None; Py_INCREF(Py_None);
  145656. __pyx_v_6uvloop_4loop_gc_disable = Py_None; Py_INCREF(Py_None);
  145657. __pyx_v_6uvloop_4loop_iter_chain = Py_None; Py_INCREF(Py_None);
  145658. __pyx_v_6uvloop_4loop_inspect_isgenerator = Py_None; Py_INCREF(Py_None);
  145659. __pyx_v_6uvloop_4loop_socket_gaierror = Py_None; Py_INCREF(Py_None);
  145660. __pyx_v_6uvloop_4loop_socket_error = Py_None; Py_INCREF(Py_None);
  145661. __pyx_v_6uvloop_4loop_socket_timeout = Py_None; Py_INCREF(Py_None);
  145662. __pyx_v_6uvloop_4loop_socket_socket = Py_None; Py_INCREF(Py_None);
  145663. __pyx_v_6uvloop_4loop_socket_socketpair = Py_None; Py_INCREF(Py_None);
  145664. __pyx_v_6uvloop_4loop_socket_getservbyname = Py_None; Py_INCREF(Py_None);
  145665. __pyx_v_6uvloop_4loop_socket_AddressFamily = Py_None; Py_INCREF(Py_None);
  145666. __pyx_v_6uvloop_4loop_socket_SocketKind = Py_None; Py_INCREF(Py_None);
  145667. __pyx_v_6uvloop_4loop_os_name = ((PyObject*)Py_None); Py_INCREF(Py_None);
  145668. __pyx_v_6uvloop_4loop_os_environ = Py_None; Py_INCREF(Py_None);
  145669. __pyx_v_6uvloop_4loop_os_dup = Py_None; Py_INCREF(Py_None);
  145670. __pyx_v_6uvloop_4loop_os_set_inheritable = Py_None; Py_INCREF(Py_None);
  145671. __pyx_v_6uvloop_4loop_os_get_inheritable = Py_None; Py_INCREF(Py_None);
  145672. __pyx_v_6uvloop_4loop_os_close = Py_None; Py_INCREF(Py_None);
  145673. __pyx_v_6uvloop_4loop_os_open = Py_None; Py_INCREF(Py_None);
  145674. __pyx_v_6uvloop_4loop_os_devnull = Py_None; Py_INCREF(Py_None);
  145675. __pyx_v_6uvloop_4loop_os_O_RDWR = Py_None; Py_INCREF(Py_None);
  145676. __pyx_v_6uvloop_4loop_os_pipe = Py_None; Py_INCREF(Py_None);
  145677. __pyx_v_6uvloop_4loop_os_read = Py_None; Py_INCREF(Py_None);
  145678. __pyx_v_6uvloop_4loop_os_remove = Py_None; Py_INCREF(Py_None);
  145679. __pyx_v_6uvloop_4loop_os_stat = Py_None; Py_INCREF(Py_None);
  145680. __pyx_v_6uvloop_4loop_stat_S_ISSOCK = Py_None; Py_INCREF(Py_None);
  145681. __pyx_v_6uvloop_4loop_sys_ignore_environment = Py_None; Py_INCREF(Py_None);
  145682. __pyx_v_6uvloop_4loop_sys_exc_info = Py_None; Py_INCREF(Py_None);
  145683. __pyx_v_6uvloop_4loop_sys_set_coroutine_wrapper = Py_None; Py_INCREF(Py_None);
  145684. __pyx_v_6uvloop_4loop_sys_get_coroutine_wrapper = Py_None; Py_INCREF(Py_None);
  145685. __pyx_v_6uvloop_4loop_sys_getframe = Py_None; Py_INCREF(Py_None);
  145686. __pyx_v_6uvloop_4loop_sys_version_info = Py_None; Py_INCREF(Py_None);
  145687. __pyx_v_6uvloop_4loop_sys_getfilesystemencoding = Py_None; Py_INCREF(Py_None);
  145688. __pyx_v_6uvloop_4loop_sys_platform = ((PyObject*)Py_None); Py_INCREF(Py_None);
  145689. __pyx_v_6uvloop_4loop_ssl_SSLContext = Py_None; Py_INCREF(Py_None);
  145690. __pyx_v_6uvloop_4loop_ssl_MemoryBIO = Py_None; Py_INCREF(Py_None);
  145691. __pyx_v_6uvloop_4loop_ssl_create_default_context = Py_None; Py_INCREF(Py_None);
  145692. __pyx_v_6uvloop_4loop_ssl_SSLError = Py_None; Py_INCREF(Py_None);
  145693. __pyx_v_6uvloop_4loop_ssl_SSLAgainErrors = Py_None; Py_INCREF(Py_None);
  145694. __pyx_v_6uvloop_4loop_ssl_CertificateError = Py_None; Py_INCREF(Py_None);
  145695. __pyx_v_6uvloop_4loop_subprocess_SubprocessError = Py_None; Py_INCREF(Py_None);
  145696. __pyx_v_6uvloop_4loop_signal_signal = Py_None; Py_INCREF(Py_None);
  145697. __pyx_v_6uvloop_4loop_signal_siginterrupt = Py_None; Py_INCREF(Py_None);
  145698. __pyx_v_6uvloop_4loop_signal_set_wakeup_fd = Py_None; Py_INCREF(Py_None);
  145699. __pyx_v_6uvloop_4loop_signal_default_int_handler = Py_None; Py_INCREF(Py_None);
  145700. __pyx_v_6uvloop_4loop_signal_SIG_DFL = Py_None; Py_INCREF(Py_None);
  145701. __pyx_v_6uvloop_4loop_time_sleep = Py_None; Py_INCREF(Py_None);
  145702. __pyx_v_6uvloop_4loop_time_monotonic = Py_None; Py_INCREF(Py_None);
  145703. __pyx_v_6uvloop_4loop_tb_StackSummary = Py_None; Py_INCREF(Py_None);
  145704. __pyx_v_6uvloop_4loop_tb_walk_stack = Py_None; Py_INCREF(Py_None);
  145705. __pyx_v_6uvloop_4loop_tb_format_list = Py_None; Py_INCREF(Py_None);
  145706. __pyx_v_6uvloop_4loop_warnings_warn = Py_None; Py_INCREF(Py_None);
  145707. __pyx_v_6uvloop_4loop_weakref_WeakValueDictionary = Py_None; Py_INCREF(Py_None);
  145708. __pyx_v_6uvloop_4loop_weakref_WeakSet = Py_None; Py_INCREF(Py_None);
  145709. __pyx_v_6uvloop_4loop_py_inf = Py_None; Py_INCREF(Py_None);
  145710. __pyx_v_6uvloop_4loop__LRU_MARKER = Py_None; Py_INCREF(Py_None);
  145711. __pyx_v_6uvloop_4loop_sockaddrs = ((struct __pyx_obj_6uvloop_4loop_LruCache *)Py_None); Py_INCREF(Py_None);
  145712. __pyx_v_6uvloop_4loop___forking_loop = ((struct __pyx_obj_6uvloop_4loop_Loop *)Py_None); Py_INCREF(Py_None);
  145713. __Pyx_RefNannyFinishContext();
  145714. return 0;
  145715. }
  145716. static int __Pyx_modinit_variable_export_code(void) {
  145717. __Pyx_RefNannyDeclarations
  145718. __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
  145719. /*--- Variable export code ---*/
  145720. __Pyx_RefNannyFinishContext();
  145721. return 0;
  145722. }
  145723. static int __Pyx_modinit_function_export_code(void) {
  145724. __Pyx_RefNannyDeclarations
  145725. __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
  145726. /*--- Function export code ---*/
  145727. __Pyx_RefNannyFinishContext();
  145728. return 0;
  145729. }
  145730. static int __Pyx_modinit_type_init_code(void) {
  145731. __Pyx_RefNannyDeclarations
  145732. __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
  145733. /*--- Type init code ---*/
  145734. __pyx_vtabptr_6uvloop_4loop_UVHandle = &__pyx_vtable_6uvloop_4loop_UVHandle;
  145735. __pyx_vtable_6uvloop_4loop_UVHandle._start_init = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVHandle *, struct __pyx_obj_6uvloop_4loop_Loop *))__pyx_f_6uvloop_4loop_8UVHandle__start_init;
  145736. __pyx_vtable_6uvloop_4loop_UVHandle._abort_init = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVHandle *))__pyx_f_6uvloop_4loop_8UVHandle__abort_init;
  145737. __pyx_vtable_6uvloop_4loop_UVHandle._finish_init = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVHandle *))__pyx_f_6uvloop_4loop_8UVHandle__finish_init;
  145738. __pyx_vtable_6uvloop_4loop_UVHandle._is_alive = (int (*)(struct __pyx_obj_6uvloop_4loop_UVHandle *))__pyx_f_6uvloop_4loop_8UVHandle__is_alive;
  145739. __pyx_vtable_6uvloop_4loop_UVHandle._ensure_alive = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVHandle *))__pyx_f_6uvloop_4loop_8UVHandle__ensure_alive;
  145740. __pyx_vtable_6uvloop_4loop_UVHandle._error = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVHandle *, PyObject *, PyObject *))__pyx_f_6uvloop_4loop_8UVHandle__error;
  145741. __pyx_vtable_6uvloop_4loop_UVHandle._fatal_error = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVHandle *, PyObject *, PyObject *, struct __pyx_opt_args_6uvloop_4loop_8UVHandle__fatal_error *__pyx_optional_args))__pyx_f_6uvloop_4loop_8UVHandle__fatal_error;
  145742. __pyx_vtable_6uvloop_4loop_UVHandle._warn_unclosed = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVHandle *))__pyx_f_6uvloop_4loop_8UVHandle__warn_unclosed;
  145743. __pyx_vtable_6uvloop_4loop_UVHandle._free = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVHandle *))__pyx_f_6uvloop_4loop_8UVHandle__free;
  145744. __pyx_vtable_6uvloop_4loop_UVHandle._close = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVHandle *))__pyx_f_6uvloop_4loop_8UVHandle__close;
  145745. if (PyType_Ready(&__pyx_type_6uvloop_4loop_UVHandle) < 0) __PYX_ERR(4, 1, __pyx_L1_error)
  145746. #if PY_VERSION_HEX < 0x030800B1
  145747. __pyx_type_6uvloop_4loop_UVHandle.tp_print = 0;
  145748. #endif
  145749. if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6uvloop_4loop_UVHandle.tp_dictoffset && __pyx_type_6uvloop_4loop_UVHandle.tp_getattro == PyObject_GenericGetAttr)) {
  145750. __pyx_type_6uvloop_4loop_UVHandle.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  145751. }
  145752. if (__Pyx_SetVtable(__pyx_type_6uvloop_4loop_UVHandle.tp_dict, __pyx_vtabptr_6uvloop_4loop_UVHandle) < 0) __PYX_ERR(4, 1, __pyx_L1_error)
  145753. if (PyObject_SetAttr(__pyx_m, __pyx_n_s_UVHandle, (PyObject *)&__pyx_type_6uvloop_4loop_UVHandle) < 0) __PYX_ERR(4, 1, __pyx_L1_error)
  145754. if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6uvloop_4loop_UVHandle) < 0) __PYX_ERR(4, 1, __pyx_L1_error)
  145755. __pyx_ptype_6uvloop_4loop_UVHandle = &__pyx_type_6uvloop_4loop_UVHandle;
  145756. __pyx_vtabptr_6uvloop_4loop_UVSocketHandle = &__pyx_vtable_6uvloop_4loop_UVSocketHandle;
  145757. __pyx_vtable_6uvloop_4loop_UVSocketHandle.__pyx_base = *__pyx_vtabptr_6uvloop_4loop_UVHandle;
  145758. __pyx_vtable_6uvloop_4loop_UVSocketHandle.__pyx_base._close = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVHandle *))__pyx_f_6uvloop_4loop_14UVSocketHandle__close;
  145759. __pyx_vtable_6uvloop_4loop_UVSocketHandle._fileno = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVSocketHandle *))__pyx_f_6uvloop_4loop_14UVSocketHandle__fileno;
  145760. __pyx_vtable_6uvloop_4loop_UVSocketHandle._new_socket = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVSocketHandle *))__pyx_f_6uvloop_4loop_14UVSocketHandle__new_socket;
  145761. __pyx_vtable_6uvloop_4loop_UVSocketHandle._get_socket = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVSocketHandle *))__pyx_f_6uvloop_4loop_14UVSocketHandle__get_socket;
  145762. __pyx_vtable_6uvloop_4loop_UVSocketHandle._attach_fileobj = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVSocketHandle *, PyObject *))__pyx_f_6uvloop_4loop_14UVSocketHandle__attach_fileobj;
  145763. __pyx_vtable_6uvloop_4loop_UVSocketHandle._open = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVSocketHandle *, int))__pyx_f_6uvloop_4loop_14UVSocketHandle__open;
  145764. __pyx_type_6uvloop_4loop_UVSocketHandle.tp_base = __pyx_ptype_6uvloop_4loop_UVHandle;
  145765. if (PyType_Ready(&__pyx_type_6uvloop_4loop_UVSocketHandle) < 0) __PYX_ERR(4, 221, __pyx_L1_error)
  145766. #if PY_VERSION_HEX < 0x030800B1
  145767. __pyx_type_6uvloop_4loop_UVSocketHandle.tp_print = 0;
  145768. #endif
  145769. if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6uvloop_4loop_UVSocketHandle.tp_dictoffset && __pyx_type_6uvloop_4loop_UVSocketHandle.tp_getattro == PyObject_GenericGetAttr)) {
  145770. __pyx_type_6uvloop_4loop_UVSocketHandle.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  145771. }
  145772. if (__Pyx_SetVtable(__pyx_type_6uvloop_4loop_UVSocketHandle.tp_dict, __pyx_vtabptr_6uvloop_4loop_UVSocketHandle) < 0) __PYX_ERR(4, 221, __pyx_L1_error)
  145773. if (PyObject_SetAttr(__pyx_m, __pyx_n_s_UVSocketHandle, (PyObject *)&__pyx_type_6uvloop_4loop_UVSocketHandle) < 0) __PYX_ERR(4, 221, __pyx_L1_error)
  145774. if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6uvloop_4loop_UVSocketHandle) < 0) __PYX_ERR(4, 221, __pyx_L1_error)
  145775. __pyx_ptype_6uvloop_4loop_UVSocketHandle = &__pyx_type_6uvloop_4loop_UVSocketHandle;
  145776. __pyx_vtabptr_6uvloop_4loop_UVAsync = &__pyx_vtable_6uvloop_4loop_UVAsync;
  145777. __pyx_vtable_6uvloop_4loop_UVAsync.__pyx_base = *__pyx_vtabptr_6uvloop_4loop_UVHandle;
  145778. __pyx_vtable_6uvloop_4loop_UVAsync._init = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVAsync *, struct __pyx_obj_6uvloop_4loop_Loop *, __pyx_t_6uvloop_4loop_method_t, PyObject *))__pyx_f_6uvloop_4loop_7UVAsync__init;
  145779. __pyx_vtable_6uvloop_4loop_UVAsync.send = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVAsync *))__pyx_f_6uvloop_4loop_7UVAsync_send;
  145780. __pyx_vtable_6uvloop_4loop_UVAsync.new = (struct __pyx_obj_6uvloop_4loop_UVAsync *(*)(struct __pyx_obj_6uvloop_4loop_Loop *, __pyx_t_6uvloop_4loop_method_t, PyObject *))__pyx_f_6uvloop_4loop_7UVAsync_new;
  145781. __pyx_type_6uvloop_4loop_UVAsync.tp_base = __pyx_ptype_6uvloop_4loop_UVHandle;
  145782. if (PyType_Ready(&__pyx_type_6uvloop_4loop_UVAsync) < 0) __PYX_ERR(11, 2, __pyx_L1_error)
  145783. #if PY_VERSION_HEX < 0x030800B1
  145784. __pyx_type_6uvloop_4loop_UVAsync.tp_print = 0;
  145785. #endif
  145786. if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6uvloop_4loop_UVAsync.tp_dictoffset && __pyx_type_6uvloop_4loop_UVAsync.tp_getattro == PyObject_GenericGetAttr)) {
  145787. __pyx_type_6uvloop_4loop_UVAsync.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  145788. }
  145789. if (__Pyx_SetVtable(__pyx_type_6uvloop_4loop_UVAsync.tp_dict, __pyx_vtabptr_6uvloop_4loop_UVAsync) < 0) __PYX_ERR(11, 2, __pyx_L1_error)
  145790. if (PyObject_SetAttr(__pyx_m, __pyx_n_s_UVAsync, (PyObject *)&__pyx_type_6uvloop_4loop_UVAsync) < 0) __PYX_ERR(11, 2, __pyx_L1_error)
  145791. if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6uvloop_4loop_UVAsync) < 0) __PYX_ERR(11, 2, __pyx_L1_error)
  145792. __pyx_ptype_6uvloop_4loop_UVAsync = &__pyx_type_6uvloop_4loop_UVAsync;
  145793. __pyx_vtabptr_6uvloop_4loop_UVTimer = &__pyx_vtable_6uvloop_4loop_UVTimer;
  145794. __pyx_vtable_6uvloop_4loop_UVTimer.__pyx_base = *__pyx_vtabptr_6uvloop_4loop_UVHandle;
  145795. __pyx_vtable_6uvloop_4loop_UVTimer._init = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVTimer *, struct __pyx_obj_6uvloop_4loop_Loop *, __pyx_t_6uvloop_4loop_method_t, PyObject *, uint64_t))__pyx_f_6uvloop_4loop_7UVTimer__init;
  145796. __pyx_vtable_6uvloop_4loop_UVTimer.stop = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVTimer *))__pyx_f_6uvloop_4loop_7UVTimer_stop;
  145797. __pyx_vtable_6uvloop_4loop_UVTimer.start = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVTimer *))__pyx_f_6uvloop_4loop_7UVTimer_start;
  145798. __pyx_vtable_6uvloop_4loop_UVTimer.new = (struct __pyx_obj_6uvloop_4loop_UVTimer *(*)(struct __pyx_obj_6uvloop_4loop_Loop *, __pyx_t_6uvloop_4loop_method_t, PyObject *, uint64_t))__pyx_f_6uvloop_4loop_7UVTimer_new;
  145799. __pyx_type_6uvloop_4loop_UVTimer.tp_base = __pyx_ptype_6uvloop_4loop_UVHandle;
  145800. if (PyType_Ready(&__pyx_type_6uvloop_4loop_UVTimer) < 0) __PYX_ERR(14, 2, __pyx_L1_error)
  145801. #if PY_VERSION_HEX < 0x030800B1
  145802. __pyx_type_6uvloop_4loop_UVTimer.tp_print = 0;
  145803. #endif
  145804. if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6uvloop_4loop_UVTimer.tp_dictoffset && __pyx_type_6uvloop_4loop_UVTimer.tp_getattro == PyObject_GenericGetAttr)) {
  145805. __pyx_type_6uvloop_4loop_UVTimer.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  145806. }
  145807. if (__Pyx_SetVtable(__pyx_type_6uvloop_4loop_UVTimer.tp_dict, __pyx_vtabptr_6uvloop_4loop_UVTimer) < 0) __PYX_ERR(14, 2, __pyx_L1_error)
  145808. if (PyObject_SetAttr(__pyx_m, __pyx_n_s_UVTimer, (PyObject *)&__pyx_type_6uvloop_4loop_UVTimer) < 0) __PYX_ERR(14, 2, __pyx_L1_error)
  145809. if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6uvloop_4loop_UVTimer) < 0) __PYX_ERR(14, 2, __pyx_L1_error)
  145810. __pyx_ptype_6uvloop_4loop_UVTimer = &__pyx_type_6uvloop_4loop_UVTimer;
  145811. __pyx_vtabptr_6uvloop_4loop_UVIdle = &__pyx_vtable_6uvloop_4loop_UVIdle;
  145812. __pyx_vtable_6uvloop_4loop_UVIdle.__pyx_base = *__pyx_vtabptr_6uvloop_4loop_UVHandle;
  145813. __pyx_vtable_6uvloop_4loop_UVIdle._init = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVIdle *, struct __pyx_obj_6uvloop_4loop_Loop *, struct __pyx_obj_6uvloop_4loop_Handle *))__pyx_f_6uvloop_4loop_6UVIdle__init;
  145814. __pyx_vtable_6uvloop_4loop_UVIdle.stop = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVIdle *))__pyx_f_6uvloop_4loop_6UVIdle_stop;
  145815. __pyx_vtable_6uvloop_4loop_UVIdle.start = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVIdle *))__pyx_f_6uvloop_4loop_6UVIdle_start;
  145816. __pyx_vtable_6uvloop_4loop_UVIdle.new = (struct __pyx_obj_6uvloop_4loop_UVIdle *(*)(struct __pyx_obj_6uvloop_4loop_Loop *, struct __pyx_obj_6uvloop_4loop_Handle *))__pyx_f_6uvloop_4loop_6UVIdle_new;
  145817. __pyx_type_6uvloop_4loop_UVIdle.tp_base = __pyx_ptype_6uvloop_4loop_UVHandle;
  145818. if (PyType_Ready(&__pyx_type_6uvloop_4loop_UVIdle) < 0) __PYX_ERR(12, 2, __pyx_L1_error)
  145819. #if PY_VERSION_HEX < 0x030800B1
  145820. __pyx_type_6uvloop_4loop_UVIdle.tp_print = 0;
  145821. #endif
  145822. if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6uvloop_4loop_UVIdle.tp_dictoffset && __pyx_type_6uvloop_4loop_UVIdle.tp_getattro == PyObject_GenericGetAttr)) {
  145823. __pyx_type_6uvloop_4loop_UVIdle.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  145824. }
  145825. if (__Pyx_SetVtable(__pyx_type_6uvloop_4loop_UVIdle.tp_dict, __pyx_vtabptr_6uvloop_4loop_UVIdle) < 0) __PYX_ERR(12, 2, __pyx_L1_error)
  145826. if (PyObject_SetAttr(__pyx_m, __pyx_n_s_UVIdle, (PyObject *)&__pyx_type_6uvloop_4loop_UVIdle) < 0) __PYX_ERR(12, 2, __pyx_L1_error)
  145827. if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6uvloop_4loop_UVIdle) < 0) __PYX_ERR(12, 2, __pyx_L1_error)
  145828. __pyx_ptype_6uvloop_4loop_UVIdle = &__pyx_type_6uvloop_4loop_UVIdle;
  145829. __pyx_vtabptr_6uvloop_4loop_UVBaseTransport = &__pyx_vtable_6uvloop_4loop_UVBaseTransport;
  145830. __pyx_vtable_6uvloop_4loop_UVBaseTransport.__pyx_base = *__pyx_vtabptr_6uvloop_4loop_UVSocketHandle;
  145831. __pyx_vtable_6uvloop_4loop_UVBaseTransport.__pyx_base.__pyx_base._fatal_error = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVHandle *, PyObject *, PyObject *, struct __pyx_opt_args_6uvloop_4loop_8UVHandle__fatal_error *__pyx_optional_args))__pyx_f_6uvloop_4loop_15UVBaseTransport__fatal_error;
  145832. __pyx_vtable_6uvloop_4loop_UVBaseTransport._maybe_pause_protocol = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *))__pyx_f_6uvloop_4loop_15UVBaseTransport__maybe_pause_protocol;
  145833. __pyx_vtable_6uvloop_4loop_UVBaseTransport._maybe_resume_protocol = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *))__pyx_f_6uvloop_4loop_15UVBaseTransport__maybe_resume_protocol;
  145834. __pyx_vtable_6uvloop_4loop_UVBaseTransport._schedule_call_connection_made = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *))__pyx_f_6uvloop_4loop_15UVBaseTransport__schedule_call_connection_made;
  145835. __pyx_vtable_6uvloop_4loop_UVBaseTransport._schedule_call_connection_lost = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *, PyObject *))__pyx_f_6uvloop_4loop_15UVBaseTransport__schedule_call_connection_lost;
  145836. __pyx_vtable_6uvloop_4loop_UVBaseTransport._wakeup_waiter = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *))__pyx_f_6uvloop_4loop_15UVBaseTransport__wakeup_waiter;
  145837. __pyx_vtable_6uvloop_4loop_UVBaseTransport._call_connection_made = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *))__pyx_f_6uvloop_4loop_15UVBaseTransport__call_connection_made;
  145838. __pyx_vtable_6uvloop_4loop_UVBaseTransport._call_connection_lost = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *, PyObject *))__pyx_f_6uvloop_4loop_15UVBaseTransport__call_connection_lost;
  145839. __pyx_vtable_6uvloop_4loop_UVBaseTransport._set_server = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *, struct __pyx_obj_6uvloop_4loop_Server *))__pyx_f_6uvloop_4loop_15UVBaseTransport__set_server;
  145840. __pyx_vtable_6uvloop_4loop_UVBaseTransport._set_waiter = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *, PyObject *))__pyx_f_6uvloop_4loop_15UVBaseTransport__set_waiter;
  145841. __pyx_vtable_6uvloop_4loop_UVBaseTransport._set_protocol = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *, PyObject *))__pyx_f_6uvloop_4loop_15UVBaseTransport__set_protocol;
  145842. __pyx_vtable_6uvloop_4loop_UVBaseTransport._clear_protocol = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *))__pyx_f_6uvloop_4loop_15UVBaseTransport__clear_protocol;
  145843. __pyx_vtable_6uvloop_4loop_UVBaseTransport._init_protocol = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *))__pyx_f_6uvloop_4loop_15UVBaseTransport__init_protocol;
  145844. __pyx_vtable_6uvloop_4loop_UVBaseTransport._add_extra_info = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *, PyObject *, PyObject *))__pyx_f_6uvloop_4loop_15UVBaseTransport__add_extra_info;
  145845. __pyx_vtable_6uvloop_4loop_UVBaseTransport._get_write_buffer_size = (size_t (*)(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *))__pyx_f_6uvloop_4loop_15UVBaseTransport__get_write_buffer_size;
  145846. __pyx_vtable_6uvloop_4loop_UVBaseTransport._is_reading = (int (*)(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *))__pyx_f_6uvloop_4loop_15UVBaseTransport__is_reading;
  145847. __pyx_vtable_6uvloop_4loop_UVBaseTransport._start_reading = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *))__pyx_f_6uvloop_4loop_15UVBaseTransport__start_reading;
  145848. __pyx_vtable_6uvloop_4loop_UVBaseTransport._stop_reading = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *))__pyx_f_6uvloop_4loop_15UVBaseTransport__stop_reading;
  145849. __pyx_type_6uvloop_4loop_UVBaseTransport.tp_base = __pyx_ptype_6uvloop_4loop_UVSocketHandle;
  145850. if (PyType_Ready(&__pyx_type_6uvloop_4loop_UVBaseTransport) < 0) __PYX_ERR(16, 1, __pyx_L1_error)
  145851. #if PY_VERSION_HEX < 0x030800B1
  145852. __pyx_type_6uvloop_4loop_UVBaseTransport.tp_print = 0;
  145853. #endif
  145854. if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6uvloop_4loop_UVBaseTransport.tp_dictoffset && __pyx_type_6uvloop_4loop_UVBaseTransport.tp_getattro == PyObject_GenericGetAttr)) {
  145855. __pyx_type_6uvloop_4loop_UVBaseTransport.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  145856. }
  145857. if (__Pyx_SetVtable(__pyx_type_6uvloop_4loop_UVBaseTransport.tp_dict, __pyx_vtabptr_6uvloop_4loop_UVBaseTransport) < 0) __PYX_ERR(16, 1, __pyx_L1_error)
  145858. if (PyObject_SetAttr(__pyx_m, __pyx_n_s_UVBaseTransport, (PyObject *)&__pyx_type_6uvloop_4loop_UVBaseTransport) < 0) __PYX_ERR(16, 1, __pyx_L1_error)
  145859. if (__pyx_type_6uvloop_4loop_UVBaseTransport.tp_weaklistoffset == 0) __pyx_type_6uvloop_4loop_UVBaseTransport.tp_weaklistoffset = offsetof(struct __pyx_obj_6uvloop_4loop_UVBaseTransport, __weakref__);
  145860. if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6uvloop_4loop_UVBaseTransport) < 0) __PYX_ERR(16, 1, __pyx_L1_error)
  145861. __pyx_ptype_6uvloop_4loop_UVBaseTransport = &__pyx_type_6uvloop_4loop_UVBaseTransport;
  145862. __pyx_vtabptr_6uvloop_4loop_Loop = &__pyx_vtable_6uvloop_4loop_Loop;
  145863. __pyx_vtable_6uvloop_4loop_Loop._init_debug_fields = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Loop *))__pyx_f_6uvloop_4loop_4Loop__init_debug_fields;
  145864. __pyx_vtable_6uvloop_4loop_Loop._on_wake = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Loop *))__pyx_f_6uvloop_4loop_4Loop__on_wake;
  145865. __pyx_vtable_6uvloop_4loop_Loop._on_idle = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Loop *))__pyx_f_6uvloop_4loop_4Loop__on_idle;
  145866. __pyx_vtable_6uvloop_4loop_Loop.__pyx___run = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Loop *, uv_run_mode))__pyx_f_6uvloop_4loop_4Loop___run;
  145867. __pyx_vtable_6uvloop_4loop_Loop._run = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Loop *, uv_run_mode))__pyx_f_6uvloop_4loop_4Loop__run;
  145868. __pyx_vtable_6uvloop_4loop_Loop._close = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Loop *))__pyx_f_6uvloop_4loop_4Loop__close;
  145869. __pyx_vtable_6uvloop_4loop_Loop._stop = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *))__pyx_f_6uvloop_4loop_4Loop__stop;
  145870. __pyx_vtable_6uvloop_4loop_Loop._time = (uint64_t (*)(struct __pyx_obj_6uvloop_4loop_Loop *))__pyx_f_6uvloop_4loop_4Loop__time;
  145871. __pyx_vtable_6uvloop_4loop_Loop._queue_write = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Loop *, struct __pyx_obj_6uvloop_4loop_UVStream *))__pyx_f_6uvloop_4loop_4Loop__queue_write;
  145872. __pyx_vtable_6uvloop_4loop_Loop._exec_queued_writes = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Loop *))__pyx_f_6uvloop_4loop_4Loop__exec_queued_writes;
  145873. __pyx_vtable_6uvloop_4loop_Loop._call_soon = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, PyObject *, PyObject *))__pyx_f_6uvloop_4loop_4Loop__call_soon;
  145874. __pyx_vtable_6uvloop_4loop_Loop._call_soon_handle = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Loop *, struct __pyx_obj_6uvloop_4loop_Handle *))__pyx_f_6uvloop_4loop_4Loop__call_soon_handle;
  145875. __pyx_vtable_6uvloop_4loop_Loop._call_later = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Loop *, uint64_t, PyObject *, PyObject *, PyObject *))__pyx_f_6uvloop_4loop_4Loop__call_later;
  145876. __pyx_vtable_6uvloop_4loop_Loop._handle_exception = (void (*)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *))__pyx_f_6uvloop_4loop_4Loop__handle_exception;
  145877. __pyx_vtable_6uvloop_4loop_Loop._new_future = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Loop *))__pyx_f_6uvloop_4loop_4Loop__new_future;
  145878. __pyx_vtable_6uvloop_4loop_Loop._check_signal = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *))__pyx_f_6uvloop_4loop_4Loop__check_signal;
  145879. __pyx_vtable_6uvloop_4loop_Loop._check_closed = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Loop *))__pyx_f_6uvloop_4loop_4Loop__check_closed;
  145880. __pyx_vtable_6uvloop_4loop_Loop._check_thread = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Loop *))__pyx_f_6uvloop_4loop_4Loop__check_thread;
  145881. __pyx_vtable_6uvloop_4loop_Loop._getaddrinfo = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, PyObject *, int, int, int, int, int))__pyx_f_6uvloop_4loop_4Loop__getaddrinfo;
  145882. __pyx_vtable_6uvloop_4loop_Loop._getnameinfo = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Loop *, struct sockaddr *, int))__pyx_f_6uvloop_4loop_4Loop__getnameinfo;
  145883. __pyx_vtable_6uvloop_4loop_Loop._track_transport = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Loop *, struct __pyx_obj_6uvloop_4loop_UVBaseTransport *))__pyx_f_6uvloop_4loop_4Loop__track_transport;
  145884. __pyx_vtable_6uvloop_4loop_Loop._fileobj_to_fd = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *))__pyx_f_6uvloop_4loop_4Loop__fileobj_to_fd;
  145885. __pyx_vtable_6uvloop_4loop_Loop._ensure_fd_no_transport = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *))__pyx_f_6uvloop_4loop_4Loop__ensure_fd_no_transport;
  145886. __pyx_vtable_6uvloop_4loop_Loop._track_process = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Loop *, struct __pyx_obj_6uvloop_4loop_UVProcess *))__pyx_f_6uvloop_4loop_4Loop__track_process;
  145887. __pyx_vtable_6uvloop_4loop_Loop._untrack_process = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Loop *, struct __pyx_obj_6uvloop_4loop_UVProcess *))__pyx_f_6uvloop_4loop_4Loop__untrack_process;
  145888. __pyx_vtable_6uvloop_4loop_Loop._add_reader = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, struct __pyx_obj_6uvloop_4loop_Handle *))__pyx_f_6uvloop_4loop_4Loop__add_reader;
  145889. __pyx_vtable_6uvloop_4loop_Loop._has_reader = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *))__pyx_f_6uvloop_4loop_4Loop__has_reader;
  145890. __pyx_vtable_6uvloop_4loop_Loop._remove_reader = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *))__pyx_f_6uvloop_4loop_4Loop__remove_reader;
  145891. __pyx_vtable_6uvloop_4loop_Loop._add_writer = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, struct __pyx_obj_6uvloop_4loop_Handle *))__pyx_f_6uvloop_4loop_4Loop__add_writer;
  145892. __pyx_vtable_6uvloop_4loop_Loop._has_writer = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *))__pyx_f_6uvloop_4loop_4Loop__has_writer;
  145893. __pyx_vtable_6uvloop_4loop_Loop._remove_writer = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *))__pyx_f_6uvloop_4loop_4Loop__remove_writer;
  145894. __pyx_vtable_6uvloop_4loop_Loop._sock_recv = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, PyObject *, PyObject *))__pyx_f_6uvloop_4loop_4Loop__sock_recv;
  145895. __pyx_vtable_6uvloop_4loop_Loop._sock_recv_into = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, PyObject *, PyObject *))__pyx_f_6uvloop_4loop_4Loop__sock_recv_into;
  145896. __pyx_vtable_6uvloop_4loop_Loop._sock_sendall = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, PyObject *, PyObject *))__pyx_f_6uvloop_4loop_4Loop__sock_sendall;
  145897. __pyx_vtable_6uvloop_4loop_Loop._sock_accept = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, PyObject *))__pyx_f_6uvloop_4loop_4Loop__sock_accept;
  145898. __pyx_vtable_6uvloop_4loop_Loop._sock_connect = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, PyObject *))__pyx_f_6uvloop_4loop_4Loop__sock_connect;
  145899. __pyx_vtable_6uvloop_4loop_Loop._sock_connect_cb = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, PyObject *, PyObject *))__pyx_f_6uvloop_4loop_4Loop__sock_connect_cb;
  145900. __pyx_vtable_6uvloop_4loop_Loop._sock_set_reuseport = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Loop *, int))__pyx_f_6uvloop_4loop_4Loop__sock_set_reuseport;
  145901. __pyx_vtable_6uvloop_4loop_Loop._setup_signals = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Loop *))__pyx_f_6uvloop_4loop_4Loop__setup_signals;
  145902. __pyx_vtable_6uvloop_4loop_Loop._shutdown_signals = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Loop *))__pyx_f_6uvloop_4loop_4Loop__shutdown_signals;
  145903. __pyx_vtable_6uvloop_4loop_Loop._recv_signals_start = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Loop *))__pyx_f_6uvloop_4loop_4Loop__recv_signals_start;
  145904. __pyx_vtable_6uvloop_4loop_Loop._recv_signals_stop = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Loop *))__pyx_f_6uvloop_4loop_4Loop__recv_signals_stop;
  145905. __pyx_vtable_6uvloop_4loop_Loop._handle_signal = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *))__pyx_f_6uvloop_4loop_4Loop__handle_signal;
  145906. __pyx_vtable_6uvloop_4loop_Loop._read_from_self = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Loop *))__pyx_f_6uvloop_4loop_4Loop__read_from_self;
  145907. __pyx_vtable_6uvloop_4loop_Loop._ceval_process_signals = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Loop *))__pyx_f_6uvloop_4loop_4Loop__ceval_process_signals;
  145908. __pyx_vtable_6uvloop_4loop_Loop._invoke_signals = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *))__pyx_f_6uvloop_4loop_4Loop__invoke_signals;
  145909. __pyx_vtable_6uvloop_4loop_Loop._set_coroutine_debug = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Loop *, int))__pyx_f_6uvloop_4loop_4Loop__set_coroutine_debug;
  145910. __pyx_vtable_6uvloop_4loop_Loop._print_debug_info = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Loop *))__pyx_f_6uvloop_4loop_4Loop__print_debug_info;
  145911. if (PyType_Ready(&__pyx_type_6uvloop_4loop_Loop) < 0) __PYX_ERR(2, 93, __pyx_L1_error)
  145912. #if PY_VERSION_HEX < 0x030800B1
  145913. __pyx_type_6uvloop_4loop_Loop.tp_print = 0;
  145914. #endif
  145915. if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6uvloop_4loop_Loop.tp_dictoffset && __pyx_type_6uvloop_4loop_Loop.tp_getattro == PyObject_GenericGetAttr)) {
  145916. __pyx_type_6uvloop_4loop_Loop.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  145917. }
  145918. if (__Pyx_SetVtable(__pyx_type_6uvloop_4loop_Loop.tp_dict, __pyx_vtabptr_6uvloop_4loop_Loop) < 0) __PYX_ERR(2, 93, __pyx_L1_error)
  145919. if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Loop, (PyObject *)&__pyx_type_6uvloop_4loop_Loop) < 0) __PYX_ERR(2, 93, __pyx_L1_error)
  145920. if (__pyx_type_6uvloop_4loop_Loop.tp_weaklistoffset == 0) __pyx_type_6uvloop_4loop_Loop.tp_weaklistoffset = offsetof(struct __pyx_obj_6uvloop_4loop_Loop, __weakref__);
  145921. if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6uvloop_4loop_Loop) < 0) __PYX_ERR(2, 93, __pyx_L1_error)
  145922. __pyx_ptype_6uvloop_4loop_Loop = &__pyx_type_6uvloop_4loop_Loop;
  145923. __pyx_vtabptr_6uvloop_4loop_Handle = &__pyx_vtable_6uvloop_4loop_Handle;
  145924. __pyx_vtable_6uvloop_4loop_Handle._set_loop = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Handle *, struct __pyx_obj_6uvloop_4loop_Loop *))__pyx_f_6uvloop_4loop_6Handle__set_loop;
  145925. __pyx_vtable_6uvloop_4loop_Handle._set_context = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Handle *, PyObject *))__pyx_f_6uvloop_4loop_6Handle__set_context;
  145926. __pyx_vtable_6uvloop_4loop_Handle._run = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Handle *))__pyx_f_6uvloop_4loop_6Handle__run;
  145927. __pyx_vtable_6uvloop_4loop_Handle._cancel = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Handle *))__pyx_f_6uvloop_4loop_6Handle__cancel;
  145928. __pyx_vtable_6uvloop_4loop_Handle._format_handle = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Handle *))__pyx_f_6uvloop_4loop_6Handle__format_handle;
  145929. if (PyType_Ready(&__pyx_type_6uvloop_4loop_Handle) < 0) __PYX_ERR(3, 3, __pyx_L1_error)
  145930. #if PY_VERSION_HEX < 0x030800B1
  145931. __pyx_type_6uvloop_4loop_Handle.tp_print = 0;
  145932. #endif
  145933. if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6uvloop_4loop_Handle.tp_dictoffset && __pyx_type_6uvloop_4loop_Handle.tp_getattro == PyObject_GenericGetAttr)) {
  145934. __pyx_type_6uvloop_4loop_Handle.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  145935. }
  145936. if (__Pyx_SetVtable(__pyx_type_6uvloop_4loop_Handle.tp_dict, __pyx_vtabptr_6uvloop_4loop_Handle) < 0) __PYX_ERR(3, 3, __pyx_L1_error)
  145937. if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Handle, (PyObject *)&__pyx_type_6uvloop_4loop_Handle) < 0) __PYX_ERR(3, 3, __pyx_L1_error)
  145938. if (__pyx_type_6uvloop_4loop_Handle.tp_weaklistoffset == 0) __pyx_type_6uvloop_4loop_Handle.tp_weaklistoffset = offsetof(struct __pyx_obj_6uvloop_4loop_Handle, __weakref__);
  145939. if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6uvloop_4loop_Handle) < 0) __PYX_ERR(3, 3, __pyx_L1_error)
  145940. __pyx_ptype_6uvloop_4loop_Handle = &__pyx_type_6uvloop_4loop_Handle;
  145941. __pyx_vtabptr_6uvloop_4loop_TimerHandle = &__pyx_vtable_6uvloop_4loop_TimerHandle;
  145942. __pyx_vtable_6uvloop_4loop_TimerHandle._run = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_TimerHandle *))__pyx_f_6uvloop_4loop_11TimerHandle__run;
  145943. __pyx_vtable_6uvloop_4loop_TimerHandle._cancel = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_TimerHandle *))__pyx_f_6uvloop_4loop_11TimerHandle__cancel;
  145944. __pyx_vtable_6uvloop_4loop_TimerHandle._clear = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_TimerHandle *))__pyx_f_6uvloop_4loop_11TimerHandle__clear;
  145945. if (PyType_Ready(&__pyx_type_6uvloop_4loop_TimerHandle) < 0) __PYX_ERR(3, 173, __pyx_L1_error)
  145946. #if PY_VERSION_HEX < 0x030800B1
  145947. __pyx_type_6uvloop_4loop_TimerHandle.tp_print = 0;
  145948. #endif
  145949. if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6uvloop_4loop_TimerHandle.tp_dictoffset && __pyx_type_6uvloop_4loop_TimerHandle.tp_getattro == PyObject_GenericGetAttr)) {
  145950. __pyx_type_6uvloop_4loop_TimerHandle.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  145951. }
  145952. if (__Pyx_SetVtable(__pyx_type_6uvloop_4loop_TimerHandle.tp_dict, __pyx_vtabptr_6uvloop_4loop_TimerHandle) < 0) __PYX_ERR(3, 173, __pyx_L1_error)
  145953. if (PyObject_SetAttr(__pyx_m, __pyx_n_s_TimerHandle, (PyObject *)&__pyx_type_6uvloop_4loop_TimerHandle) < 0) __PYX_ERR(3, 173, __pyx_L1_error)
  145954. if (__pyx_type_6uvloop_4loop_TimerHandle.tp_weaklistoffset == 0) __pyx_type_6uvloop_4loop_TimerHandle.tp_weaklistoffset = offsetof(struct __pyx_obj_6uvloop_4loop_TimerHandle, __weakref__);
  145955. if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6uvloop_4loop_TimerHandle) < 0) __PYX_ERR(3, 173, __pyx_L1_error)
  145956. __pyx_ptype_6uvloop_4loop_TimerHandle = &__pyx_type_6uvloop_4loop_TimerHandle;
  145957. __pyx_vtabptr_6uvloop_4loop_UVCheck = &__pyx_vtable_6uvloop_4loop_UVCheck;
  145958. __pyx_vtable_6uvloop_4loop_UVCheck.__pyx_base = *__pyx_vtabptr_6uvloop_4loop_UVHandle;
  145959. __pyx_vtable_6uvloop_4loop_UVCheck._init = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVCheck *, struct __pyx_obj_6uvloop_4loop_Loop *, struct __pyx_obj_6uvloop_4loop_Handle *))__pyx_f_6uvloop_4loop_7UVCheck__init;
  145960. __pyx_vtable_6uvloop_4loop_UVCheck.stop = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVCheck *))__pyx_f_6uvloop_4loop_7UVCheck_stop;
  145961. __pyx_vtable_6uvloop_4loop_UVCheck.start = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVCheck *))__pyx_f_6uvloop_4loop_7UVCheck_start;
  145962. __pyx_vtable_6uvloop_4loop_UVCheck.new = (struct __pyx_obj_6uvloop_4loop_UVCheck *(*)(struct __pyx_obj_6uvloop_4loop_Loop *, struct __pyx_obj_6uvloop_4loop_Handle *))__pyx_f_6uvloop_4loop_7UVCheck_new;
  145963. __pyx_type_6uvloop_4loop_UVCheck.tp_base = __pyx_ptype_6uvloop_4loop_UVHandle;
  145964. if (PyType_Ready(&__pyx_type_6uvloop_4loop_UVCheck) < 0) __PYX_ERR(13, 2, __pyx_L1_error)
  145965. #if PY_VERSION_HEX < 0x030800B1
  145966. __pyx_type_6uvloop_4loop_UVCheck.tp_print = 0;
  145967. #endif
  145968. if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6uvloop_4loop_UVCheck.tp_dictoffset && __pyx_type_6uvloop_4loop_UVCheck.tp_getattro == PyObject_GenericGetAttr)) {
  145969. __pyx_type_6uvloop_4loop_UVCheck.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  145970. }
  145971. if (__Pyx_SetVtable(__pyx_type_6uvloop_4loop_UVCheck.tp_dict, __pyx_vtabptr_6uvloop_4loop_UVCheck) < 0) __PYX_ERR(13, 2, __pyx_L1_error)
  145972. if (PyObject_SetAttr(__pyx_m, __pyx_n_s_UVCheck, (PyObject *)&__pyx_type_6uvloop_4loop_UVCheck) < 0) __PYX_ERR(13, 2, __pyx_L1_error)
  145973. if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6uvloop_4loop_UVCheck) < 0) __PYX_ERR(13, 2, __pyx_L1_error)
  145974. __pyx_ptype_6uvloop_4loop_UVCheck = &__pyx_type_6uvloop_4loop_UVCheck;
  145975. __pyx_vtabptr_6uvloop_4loop_UVPoll = &__pyx_vtable_6uvloop_4loop_UVPoll;
  145976. __pyx_vtable_6uvloop_4loop_UVPoll.__pyx_base = *__pyx_vtabptr_6uvloop_4loop_UVHandle;
  145977. __pyx_vtable_6uvloop_4loop_UVPoll.__pyx_base._fatal_error = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVHandle *, PyObject *, PyObject *, struct __pyx_opt_args_6uvloop_4loop_8UVHandle__fatal_error *__pyx_optional_args))__pyx_f_6uvloop_4loop_6UVPoll__fatal_error;
  145978. __pyx_vtable_6uvloop_4loop_UVPoll.__pyx_base._close = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVHandle *))__pyx_f_6uvloop_4loop_6UVPoll__close;
  145979. __pyx_vtable_6uvloop_4loop_UVPoll._init = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVPoll *, struct __pyx_obj_6uvloop_4loop_Loop *, int))__pyx_f_6uvloop_4loop_6UVPoll__init;
  145980. __pyx_vtable_6uvloop_4loop_UVPoll._poll_start = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVPoll *, int))__pyx_f_6uvloop_4loop_6UVPoll__poll_start;
  145981. __pyx_vtable_6uvloop_4loop_UVPoll._poll_stop = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVPoll *))__pyx_f_6uvloop_4loop_6UVPoll__poll_stop;
  145982. __pyx_vtable_6uvloop_4loop_UVPoll.is_active = (int (*)(struct __pyx_obj_6uvloop_4loop_UVPoll *))__pyx_f_6uvloop_4loop_6UVPoll_is_active;
  145983. __pyx_vtable_6uvloop_4loop_UVPoll.is_reading = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVPoll *))__pyx_f_6uvloop_4loop_6UVPoll_is_reading;
  145984. __pyx_vtable_6uvloop_4loop_UVPoll.is_writing = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVPoll *))__pyx_f_6uvloop_4loop_6UVPoll_is_writing;
  145985. __pyx_vtable_6uvloop_4loop_UVPoll.start_reading = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVPoll *, struct __pyx_obj_6uvloop_4loop_Handle *))__pyx_f_6uvloop_4loop_6UVPoll_start_reading;
  145986. __pyx_vtable_6uvloop_4loop_UVPoll.start_writing = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVPoll *, struct __pyx_obj_6uvloop_4loop_Handle *))__pyx_f_6uvloop_4loop_6UVPoll_start_writing;
  145987. __pyx_vtable_6uvloop_4loop_UVPoll.stop_reading = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVPoll *))__pyx_f_6uvloop_4loop_6UVPoll_stop_reading;
  145988. __pyx_vtable_6uvloop_4loop_UVPoll.stop_writing = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVPoll *))__pyx_f_6uvloop_4loop_6UVPoll_stop_writing;
  145989. __pyx_vtable_6uvloop_4loop_UVPoll.stop = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVPoll *))__pyx_f_6uvloop_4loop_6UVPoll_stop;
  145990. __pyx_vtable_6uvloop_4loop_UVPoll.new = (struct __pyx_obj_6uvloop_4loop_UVPoll *(*)(struct __pyx_obj_6uvloop_4loop_Loop *, int))__pyx_f_6uvloop_4loop_6UVPoll_new;
  145991. __pyx_type_6uvloop_4loop_UVPoll.tp_base = __pyx_ptype_6uvloop_4loop_UVHandle;
  145992. if (PyType_Ready(&__pyx_type_6uvloop_4loop_UVPoll) < 0) __PYX_ERR(15, 2, __pyx_L1_error)
  145993. #if PY_VERSION_HEX < 0x030800B1
  145994. __pyx_type_6uvloop_4loop_UVPoll.tp_print = 0;
  145995. #endif
  145996. if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6uvloop_4loop_UVPoll.tp_dictoffset && __pyx_type_6uvloop_4loop_UVPoll.tp_getattro == PyObject_GenericGetAttr)) {
  145997. __pyx_type_6uvloop_4loop_UVPoll.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  145998. }
  145999. if (__Pyx_SetVtable(__pyx_type_6uvloop_4loop_UVPoll.tp_dict, __pyx_vtabptr_6uvloop_4loop_UVPoll) < 0) __PYX_ERR(15, 2, __pyx_L1_error)
  146000. if (PyObject_SetAttr(__pyx_m, __pyx_n_s_UVPoll, (PyObject *)&__pyx_type_6uvloop_4loop_UVPoll) < 0) __PYX_ERR(15, 2, __pyx_L1_error)
  146001. if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6uvloop_4loop_UVPoll) < 0) __PYX_ERR(15, 2, __pyx_L1_error)
  146002. __pyx_ptype_6uvloop_4loop_UVPoll = &__pyx_type_6uvloop_4loop_UVPoll;
  146003. __pyx_vtabptr_6uvloop_4loop_UVStream = &__pyx_vtable_6uvloop_4loop_UVStream;
  146004. __pyx_vtable_6uvloop_4loop_UVStream.__pyx_base = *__pyx_vtabptr_6uvloop_4loop_UVBaseTransport;
  146005. __pyx_vtable_6uvloop_4loop_UVStream.__pyx_base.__pyx_base.__pyx_base._close = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVHandle *))__pyx_f_6uvloop_4loop_8UVStream__close;
  146006. __pyx_vtable_6uvloop_4loop_UVStream.__pyx_base._set_protocol = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *, PyObject *))__pyx_f_6uvloop_4loop_8UVStream__set_protocol;
  146007. __pyx_vtable_6uvloop_4loop_UVStream.__pyx_base._clear_protocol = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *))__pyx_f_6uvloop_4loop_8UVStream__clear_protocol;
  146008. __pyx_vtable_6uvloop_4loop_UVStream.__pyx_base._get_write_buffer_size = (size_t (*)(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *))__pyx_f_6uvloop_4loop_8UVStream__get_write_buffer_size;
  146009. __pyx_vtable_6uvloop_4loop_UVStream.__pyx_base._is_reading = (int (*)(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *))__pyx_f_6uvloop_4loop_8UVStream__is_reading;
  146010. __pyx_vtable_6uvloop_4loop_UVStream.__pyx_base._start_reading = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *))__pyx_f_6uvloop_4loop_8UVStream__start_reading;
  146011. __pyx_vtable_6uvloop_4loop_UVStream.__pyx_base._stop_reading = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *))__pyx_f_6uvloop_4loop_8UVStream__stop_reading;
  146012. __pyx_vtable_6uvloop_4loop_UVStream._init = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVStream *, struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, struct __pyx_obj_6uvloop_4loop_Server *, PyObject *))__pyx_f_6uvloop_4loop_8UVStream__init;
  146013. __pyx_vtable_6uvloop_4loop_UVStream._exec_write = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVStream *))__pyx_f_6uvloop_4loop_8UVStream__exec_write;
  146014. __pyx_vtable_6uvloop_4loop_UVStream._shutdown = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVStream *))__pyx_f_6uvloop_4loop_8UVStream__shutdown;
  146015. __pyx_vtable_6uvloop_4loop_UVStream._accept = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVStream *, struct __pyx_obj_6uvloop_4loop_UVStream *))__pyx_f_6uvloop_4loop_8UVStream__accept;
  146016. __pyx_vtable_6uvloop_4loop_UVStream._close_on_read_error = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVStream *))__pyx_f_6uvloop_4loop_8UVStream__close_on_read_error;
  146017. __pyx_vtable_6uvloop_4loop_UVStream.__pyx___reading_started = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVStream *))__pyx_f_6uvloop_4loop_8UVStream___reading_started;
  146018. __pyx_vtable_6uvloop_4loop_UVStream.__pyx___reading_stopped = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVStream *))__pyx_f_6uvloop_4loop_8UVStream___reading_stopped;
  146019. __pyx_vtable_6uvloop_4loop_UVStream._write = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVStream *, PyObject *))__pyx_f_6uvloop_4loop_8UVStream__write;
  146020. __pyx_vtable_6uvloop_4loop_UVStream._try_write = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVStream *, PyObject *))__pyx_f_6uvloop_4loop_8UVStream__try_write;
  146021. __pyx_vtable_6uvloop_4loop_UVStream._on_accept = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVStream *))__pyx_f_6uvloop_4loop_8UVStream__on_accept;
  146022. __pyx_vtable_6uvloop_4loop_UVStream._on_eof = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVStream *))__pyx_f_6uvloop_4loop_8UVStream__on_eof;
  146023. __pyx_vtable_6uvloop_4loop_UVStream._on_write = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVStream *))__pyx_f_6uvloop_4loop_8UVStream__on_write;
  146024. __pyx_vtable_6uvloop_4loop_UVStream._on_connect = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVStream *, PyObject *))__pyx_f_6uvloop_4loop_8UVStream__on_connect;
  146025. __pyx_type_6uvloop_4loop_UVStream.tp_base = __pyx_ptype_6uvloop_4loop_UVBaseTransport;
  146026. if (PyType_Ready(&__pyx_type_6uvloop_4loop_UVStream) < 0) __PYX_ERR(18, 209, __pyx_L1_error)
  146027. #if PY_VERSION_HEX < 0x030800B1
  146028. __pyx_type_6uvloop_4loop_UVStream.tp_print = 0;
  146029. #endif
  146030. if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6uvloop_4loop_UVStream.tp_dictoffset && __pyx_type_6uvloop_4loop_UVStream.tp_getattro == PyObject_GenericGetAttr)) {
  146031. __pyx_type_6uvloop_4loop_UVStream.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  146032. }
  146033. if (__Pyx_SetVtable(__pyx_type_6uvloop_4loop_UVStream.tp_dict, __pyx_vtabptr_6uvloop_4loop_UVStream) < 0) __PYX_ERR(18, 209, __pyx_L1_error)
  146034. if (PyObject_SetAttr(__pyx_m, __pyx_n_s_UVStream, (PyObject *)&__pyx_type_6uvloop_4loop_UVStream) < 0) __PYX_ERR(18, 209, __pyx_L1_error)
  146035. if (__pyx_type_6uvloop_4loop_UVStream.tp_weaklistoffset == 0) __pyx_type_6uvloop_4loop_UVStream.tp_weaklistoffset = offsetof(struct __pyx_obj_6uvloop_4loop_UVStream, __pyx_base.__weakref__);
  146036. if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6uvloop_4loop_UVStream) < 0) __PYX_ERR(18, 209, __pyx_L1_error)
  146037. __pyx_ptype_6uvloop_4loop_UVStream = &__pyx_type_6uvloop_4loop_UVStream;
  146038. __pyx_vtabptr_6uvloop_4loop_UVStreamServer = &__pyx_vtable_6uvloop_4loop_UVStreamServer;
  146039. __pyx_vtable_6uvloop_4loop_UVStreamServer.__pyx_base = *__pyx_vtabptr_6uvloop_4loop_UVSocketHandle;
  146040. __pyx_vtable_6uvloop_4loop_UVStreamServer.__pyx_base.__pyx_base._fatal_error = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVHandle *, PyObject *, PyObject *, struct __pyx_opt_args_6uvloop_4loop_8UVHandle__fatal_error *__pyx_optional_args))__pyx_f_6uvloop_4loop_14UVStreamServer__fatal_error;
  146041. __pyx_vtable_6uvloop_4loop_UVStreamServer._init = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVStreamServer *, struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, struct __pyx_obj_6uvloop_4loop_Server *, PyObject *, PyObject *, PyObject *, PyObject *))__pyx_f_6uvloop_4loop_14UVStreamServer__init;
  146042. __pyx_vtable_6uvloop_4loop_UVStreamServer._mark_as_open = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVStreamServer *))__pyx_f_6uvloop_4loop_14UVStreamServer__mark_as_open;
  146043. __pyx_vtable_6uvloop_4loop_UVStreamServer.listen = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVStreamServer *))__pyx_f_6uvloop_4loop_14UVStreamServer_listen;
  146044. __pyx_vtable_6uvloop_4loop_UVStreamServer._on_listen = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVStreamServer *))__pyx_f_6uvloop_4loop_14UVStreamServer__on_listen;
  146045. __pyx_vtable_6uvloop_4loop_UVStreamServer._make_new_transport = (struct __pyx_obj_6uvloop_4loop_UVStream *(*)(struct __pyx_obj_6uvloop_4loop_UVStreamServer *, PyObject *, PyObject *))__pyx_f_6uvloop_4loop_14UVStreamServer__make_new_transport;
  146046. __pyx_type_6uvloop_4loop_UVStreamServer.tp_base = __pyx_ptype_6uvloop_4loop_UVSocketHandle;
  146047. if (PyType_Ready(&__pyx_type_6uvloop_4loop_UVStreamServer) < 0) __PYX_ERR(19, 2, __pyx_L1_error)
  146048. #if PY_VERSION_HEX < 0x030800B1
  146049. __pyx_type_6uvloop_4loop_UVStreamServer.tp_print = 0;
  146050. #endif
  146051. if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6uvloop_4loop_UVStreamServer.tp_dictoffset && __pyx_type_6uvloop_4loop_UVStreamServer.tp_getattro == PyObject_GenericGetAttr)) {
  146052. __pyx_type_6uvloop_4loop_UVStreamServer.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  146053. }
  146054. if (__Pyx_SetVtable(__pyx_type_6uvloop_4loop_UVStreamServer.tp_dict, __pyx_vtabptr_6uvloop_4loop_UVStreamServer) < 0) __PYX_ERR(19, 2, __pyx_L1_error)
  146055. if (PyObject_SetAttr(__pyx_m, __pyx_n_s_UVStreamServer, (PyObject *)&__pyx_type_6uvloop_4loop_UVStreamServer) < 0) __PYX_ERR(19, 2, __pyx_L1_error)
  146056. if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6uvloop_4loop_UVStreamServer) < 0) __PYX_ERR(19, 2, __pyx_L1_error)
  146057. __pyx_ptype_6uvloop_4loop_UVStreamServer = &__pyx_type_6uvloop_4loop_UVStreamServer;
  146058. __pyx_vtabptr_6uvloop_4loop_TCPServer = &__pyx_vtable_6uvloop_4loop_TCPServer;
  146059. __pyx_vtable_6uvloop_4loop_TCPServer.__pyx_base = *__pyx_vtabptr_6uvloop_4loop_UVStreamServer;
  146060. __pyx_vtable_6uvloop_4loop_TCPServer.__pyx_base.__pyx_base._new_socket = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVSocketHandle *))__pyx_f_6uvloop_4loop_9TCPServer__new_socket;
  146061. __pyx_vtable_6uvloop_4loop_TCPServer.__pyx_base.__pyx_base._open = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVSocketHandle *, int))__pyx_f_6uvloop_4loop_9TCPServer__open;
  146062. __pyx_vtable_6uvloop_4loop_TCPServer.__pyx_base._make_new_transport = (struct __pyx_obj_6uvloop_4loop_UVStream *(*)(struct __pyx_obj_6uvloop_4loop_UVStreamServer *, PyObject *, PyObject *))__pyx_f_6uvloop_4loop_9TCPServer__make_new_transport;
  146063. __pyx_vtable_6uvloop_4loop_TCPServer.bind = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_TCPServer *, struct sockaddr *, struct __pyx_opt_args_6uvloop_4loop_9TCPServer_bind *__pyx_optional_args))__pyx_f_6uvloop_4loop_9TCPServer_bind;
  146064. __pyx_vtable_6uvloop_4loop_TCPServer.new = (struct __pyx_obj_6uvloop_4loop_TCPServer *(*)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, struct __pyx_obj_6uvloop_4loop_Server *, unsigned int, PyObject *, PyObject *, PyObject *, PyObject *))__pyx_f_6uvloop_4loop_9TCPServer_new;
  146065. __pyx_type_6uvloop_4loop_TCPServer.tp_base = __pyx_ptype_6uvloop_4loop_UVStreamServer;
  146066. if (PyType_Ready(&__pyx_type_6uvloop_4loop_TCPServer) < 0) __PYX_ERR(5, 56, __pyx_L1_error)
  146067. #if PY_VERSION_HEX < 0x030800B1
  146068. __pyx_type_6uvloop_4loop_TCPServer.tp_print = 0;
  146069. #endif
  146070. if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6uvloop_4loop_TCPServer.tp_dictoffset && __pyx_type_6uvloop_4loop_TCPServer.tp_getattro == PyObject_GenericGetAttr)) {
  146071. __pyx_type_6uvloop_4loop_TCPServer.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  146072. }
  146073. if (__Pyx_SetVtable(__pyx_type_6uvloop_4loop_TCPServer.tp_dict, __pyx_vtabptr_6uvloop_4loop_TCPServer) < 0) __PYX_ERR(5, 56, __pyx_L1_error)
  146074. if (PyObject_SetAttr(__pyx_m, __pyx_n_s_TCPServer, (PyObject *)&__pyx_type_6uvloop_4loop_TCPServer) < 0) __PYX_ERR(5, 56, __pyx_L1_error)
  146075. if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6uvloop_4loop_TCPServer) < 0) __PYX_ERR(5, 56, __pyx_L1_error)
  146076. __pyx_ptype_6uvloop_4loop_TCPServer = &__pyx_type_6uvloop_4loop_TCPServer;
  146077. __pyx_vtabptr_6uvloop_4loop_TCPTransport = &__pyx_vtable_6uvloop_4loop_TCPTransport;
  146078. __pyx_vtable_6uvloop_4loop_TCPTransport.__pyx_base = *__pyx_vtabptr_6uvloop_4loop_UVStream;
  146079. __pyx_vtable_6uvloop_4loop_TCPTransport.__pyx_base.__pyx_base.__pyx_base._new_socket = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVSocketHandle *))__pyx_f_6uvloop_4loop_12TCPTransport__new_socket;
  146080. __pyx_vtable_6uvloop_4loop_TCPTransport.__pyx_base.__pyx_base.__pyx_base._open = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVSocketHandle *, int))__pyx_f_6uvloop_4loop_12TCPTransport__open;
  146081. __pyx_vtable_6uvloop_4loop_TCPTransport.__pyx_base.__pyx_base._call_connection_made = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *))__pyx_f_6uvloop_4loop_12TCPTransport__call_connection_made;
  146082. __pyx_vtable_6uvloop_4loop_TCPTransport.bind = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_TCPTransport *, struct sockaddr *, struct __pyx_opt_args_6uvloop_4loop_12TCPTransport_bind *__pyx_optional_args))__pyx_f_6uvloop_4loop_12TCPTransport_bind;
  146083. __pyx_vtable_6uvloop_4loop_TCPTransport.connect = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_TCPTransport *, struct sockaddr *))__pyx_f_6uvloop_4loop_12TCPTransport_connect;
  146084. __pyx_vtable_6uvloop_4loop_TCPTransport._set_nodelay = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_TCPTransport *))__pyx_f_6uvloop_4loop_12TCPTransport__set_nodelay;
  146085. __pyx_vtable_6uvloop_4loop_TCPTransport.new = (struct __pyx_obj_6uvloop_4loop_TCPTransport *(*)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, struct __pyx_obj_6uvloop_4loop_Server *, PyObject *))__pyx_f_6uvloop_4loop_12TCPTransport_new;
  146086. __pyx_type_6uvloop_4loop_TCPTransport.tp_base = __pyx_ptype_6uvloop_4loop_UVStream;
  146087. if (PyType_Ready(&__pyx_type_6uvloop_4loop_TCPTransport) < 0) __PYX_ERR(5, 101, __pyx_L1_error)
  146088. #if PY_VERSION_HEX < 0x030800B1
  146089. __pyx_type_6uvloop_4loop_TCPTransport.tp_print = 0;
  146090. #endif
  146091. if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6uvloop_4loop_TCPTransport.tp_dictoffset && __pyx_type_6uvloop_4loop_TCPTransport.tp_getattro == PyObject_GenericGetAttr)) {
  146092. __pyx_type_6uvloop_4loop_TCPTransport.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  146093. }
  146094. if (__Pyx_SetVtable(__pyx_type_6uvloop_4loop_TCPTransport.tp_dict, __pyx_vtabptr_6uvloop_4loop_TCPTransport) < 0) __PYX_ERR(5, 101, __pyx_L1_error)
  146095. if (PyObject_SetAttr(__pyx_m, __pyx_n_s_TCPTransport, (PyObject *)&__pyx_type_6uvloop_4loop_TCPTransport) < 0) __PYX_ERR(5, 101, __pyx_L1_error)
  146096. if (__pyx_type_6uvloop_4loop_TCPTransport.tp_weaklistoffset == 0) __pyx_type_6uvloop_4loop_TCPTransport.tp_weaklistoffset = offsetof(struct __pyx_obj_6uvloop_4loop_TCPTransport, __pyx_base.__pyx_base.__weakref__);
  146097. if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6uvloop_4loop_TCPTransport) < 0) __PYX_ERR(5, 101, __pyx_L1_error)
  146098. __pyx_ptype_6uvloop_4loop_TCPTransport = &__pyx_type_6uvloop_4loop_TCPTransport;
  146099. __pyx_vtabptr_6uvloop_4loop_UnixServer = &__pyx_vtable_6uvloop_4loop_UnixServer;
  146100. __pyx_vtable_6uvloop_4loop_UnixServer.__pyx_base = *__pyx_vtabptr_6uvloop_4loop_UVStreamServer;
  146101. __pyx_vtable_6uvloop_4loop_UnixServer.__pyx_base.__pyx_base._new_socket = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVSocketHandle *))__pyx_f_6uvloop_4loop_10UnixServer__new_socket;
  146102. __pyx_vtable_6uvloop_4loop_UnixServer.__pyx_base.__pyx_base._open = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVSocketHandle *, int))__pyx_f_6uvloop_4loop_10UnixServer__open;
  146103. __pyx_vtable_6uvloop_4loop_UnixServer.__pyx_base._make_new_transport = (struct __pyx_obj_6uvloop_4loop_UVStream *(*)(struct __pyx_obj_6uvloop_4loop_UVStreamServer *, PyObject *, PyObject *))__pyx_f_6uvloop_4loop_10UnixServer__make_new_transport;
  146104. __pyx_vtable_6uvloop_4loop_UnixServer.bind = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UnixServer *, PyObject *))__pyx_f_6uvloop_4loop_10UnixServer_bind;
  146105. __pyx_vtable_6uvloop_4loop_UnixServer.new = (struct __pyx_obj_6uvloop_4loop_UnixServer *(*)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, struct __pyx_obj_6uvloop_4loop_Server *, PyObject *, PyObject *, PyObject *, PyObject *))__pyx_f_6uvloop_4loop_10UnixServer_new;
  146106. __pyx_type_6uvloop_4loop_UnixServer.tp_base = __pyx_ptype_6uvloop_4loop_UVStreamServer;
  146107. if (PyType_Ready(&__pyx_type_6uvloop_4loop_UnixServer) < 0) __PYX_ERR(20, 37, __pyx_L1_error)
  146108. #if PY_VERSION_HEX < 0x030800B1
  146109. __pyx_type_6uvloop_4loop_UnixServer.tp_print = 0;
  146110. #endif
  146111. if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6uvloop_4loop_UnixServer.tp_dictoffset && __pyx_type_6uvloop_4loop_UnixServer.tp_getattro == PyObject_GenericGetAttr)) {
  146112. __pyx_type_6uvloop_4loop_UnixServer.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  146113. }
  146114. if (__Pyx_SetVtable(__pyx_type_6uvloop_4loop_UnixServer.tp_dict, __pyx_vtabptr_6uvloop_4loop_UnixServer) < 0) __PYX_ERR(20, 37, __pyx_L1_error)
  146115. if (PyObject_SetAttr(__pyx_m, __pyx_n_s_UnixServer, (PyObject *)&__pyx_type_6uvloop_4loop_UnixServer) < 0) __PYX_ERR(20, 37, __pyx_L1_error)
  146116. if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6uvloop_4loop_UnixServer) < 0) __PYX_ERR(20, 37, __pyx_L1_error)
  146117. __pyx_ptype_6uvloop_4loop_UnixServer = &__pyx_type_6uvloop_4loop_UnixServer;
  146118. __pyx_vtabptr_6uvloop_4loop_UnixTransport = &__pyx_vtable_6uvloop_4loop_UnixTransport;
  146119. __pyx_vtable_6uvloop_4loop_UnixTransport.__pyx_base = *__pyx_vtabptr_6uvloop_4loop_UVStream;
  146120. __pyx_vtable_6uvloop_4loop_UnixTransport.__pyx_base.__pyx_base.__pyx_base._new_socket = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVSocketHandle *))__pyx_f_6uvloop_4loop_13UnixTransport__new_socket;
  146121. __pyx_vtable_6uvloop_4loop_UnixTransport.__pyx_base.__pyx_base.__pyx_base._open = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVSocketHandle *, int))__pyx_f_6uvloop_4loop_13UnixTransport__open;
  146122. __pyx_vtable_6uvloop_4loop_UnixTransport.new = (struct __pyx_obj_6uvloop_4loop_UnixTransport *(*)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, struct __pyx_obj_6uvloop_4loop_Server *, PyObject *))__pyx_f_6uvloop_4loop_13UnixTransport_new;
  146123. __pyx_vtable_6uvloop_4loop_UnixTransport.connect = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UnixTransport *, char *))__pyx_f_6uvloop_4loop_13UnixTransport_connect;
  146124. __pyx_type_6uvloop_4loop_UnixTransport.tp_base = __pyx_ptype_6uvloop_4loop_UVStream;
  146125. if (PyType_Ready(&__pyx_type_6uvloop_4loop_UnixTransport) < 0) __PYX_ERR(20, 80, __pyx_L1_error)
  146126. #if PY_VERSION_HEX < 0x030800B1
  146127. __pyx_type_6uvloop_4loop_UnixTransport.tp_print = 0;
  146128. #endif
  146129. if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6uvloop_4loop_UnixTransport.tp_dictoffset && __pyx_type_6uvloop_4loop_UnixTransport.tp_getattro == PyObject_GenericGetAttr)) {
  146130. __pyx_type_6uvloop_4loop_UnixTransport.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  146131. }
  146132. if (__Pyx_SetVtable(__pyx_type_6uvloop_4loop_UnixTransport.tp_dict, __pyx_vtabptr_6uvloop_4loop_UnixTransport) < 0) __PYX_ERR(20, 80, __pyx_L1_error)
  146133. if (PyObject_SetAttr(__pyx_m, __pyx_n_s_UnixTransport, (PyObject *)&__pyx_type_6uvloop_4loop_UnixTransport) < 0) __PYX_ERR(20, 80, __pyx_L1_error)
  146134. if (__pyx_type_6uvloop_4loop_UnixTransport.tp_weaklistoffset == 0) __pyx_type_6uvloop_4loop_UnixTransport.tp_weaklistoffset = offsetof(struct __pyx_obj_6uvloop_4loop_UnixTransport, __pyx_base.__pyx_base.__weakref__);
  146135. if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6uvloop_4loop_UnixTransport) < 0) __PYX_ERR(20, 80, __pyx_L1_error)
  146136. __pyx_ptype_6uvloop_4loop_UnixTransport = &__pyx_type_6uvloop_4loop_UnixTransport;
  146137. __pyx_vtabptr_6uvloop_4loop_ReadUnixTransport = &__pyx_vtable_6uvloop_4loop_ReadUnixTransport;
  146138. __pyx_vtable_6uvloop_4loop_ReadUnixTransport.__pyx_base = *__pyx_vtabptr_6uvloop_4loop_UVStream;
  146139. __pyx_vtable_6uvloop_4loop_ReadUnixTransport.__pyx_base.__pyx_base.__pyx_base._new_socket = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVSocketHandle *))__pyx_f_6uvloop_4loop_17ReadUnixTransport__new_socket;
  146140. __pyx_vtable_6uvloop_4loop_ReadUnixTransport.__pyx_base.__pyx_base.__pyx_base._open = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVSocketHandle *, int))__pyx_f_6uvloop_4loop_17ReadUnixTransport__open;
  146141. __pyx_vtable_6uvloop_4loop_ReadUnixTransport.new = (struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *(*)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, struct __pyx_obj_6uvloop_4loop_Server *, PyObject *))__pyx_f_6uvloop_4loop_17ReadUnixTransport_new;
  146142. __pyx_type_6uvloop_4loop_ReadUnixTransport.tp_base = __pyx_ptype_6uvloop_4loop_UVStream;
  146143. if (PyType_Ready(&__pyx_type_6uvloop_4loop_ReadUnixTransport) < 0) __PYX_ERR(20, 105, __pyx_L1_error)
  146144. #if PY_VERSION_HEX < 0x030800B1
  146145. __pyx_type_6uvloop_4loop_ReadUnixTransport.tp_print = 0;
  146146. #endif
  146147. if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6uvloop_4loop_ReadUnixTransport.tp_dictoffset && __pyx_type_6uvloop_4loop_ReadUnixTransport.tp_getattro == PyObject_GenericGetAttr)) {
  146148. __pyx_type_6uvloop_4loop_ReadUnixTransport.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  146149. }
  146150. if (__Pyx_SetVtable(__pyx_type_6uvloop_4loop_ReadUnixTransport.tp_dict, __pyx_vtabptr_6uvloop_4loop_ReadUnixTransport) < 0) __PYX_ERR(20, 105, __pyx_L1_error)
  146151. if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ReadUnixTransport, (PyObject *)&__pyx_type_6uvloop_4loop_ReadUnixTransport) < 0) __PYX_ERR(20, 105, __pyx_L1_error)
  146152. if (__pyx_type_6uvloop_4loop_ReadUnixTransport.tp_weaklistoffset == 0) __pyx_type_6uvloop_4loop_ReadUnixTransport.tp_weaklistoffset = offsetof(struct __pyx_obj_6uvloop_4loop_ReadUnixTransport, __pyx_base.__pyx_base.__weakref__);
  146153. if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6uvloop_4loop_ReadUnixTransport) < 0) __PYX_ERR(20, 105, __pyx_L1_error)
  146154. __pyx_ptype_6uvloop_4loop_ReadUnixTransport = &__pyx_type_6uvloop_4loop_ReadUnixTransport;
  146155. __pyx_vtabptr_6uvloop_4loop_WriteUnixTransport = &__pyx_vtable_6uvloop_4loop_WriteUnixTransport;
  146156. __pyx_vtable_6uvloop_4loop_WriteUnixTransport.__pyx_base = *__pyx_vtabptr_6uvloop_4loop_UVStream;
  146157. __pyx_vtable_6uvloop_4loop_WriteUnixTransport.__pyx_base.__pyx_base.__pyx_base.__pyx_base._close = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVHandle *))__pyx_f_6uvloop_4loop_18WriteUnixTransport__close;
  146158. __pyx_vtable_6uvloop_4loop_WriteUnixTransport.__pyx_base.__pyx_base.__pyx_base._new_socket = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVSocketHandle *))__pyx_f_6uvloop_4loop_18WriteUnixTransport__new_socket;
  146159. __pyx_vtable_6uvloop_4loop_WriteUnixTransport.__pyx_base.__pyx_base.__pyx_base._open = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVSocketHandle *, int))__pyx_f_6uvloop_4loop_18WriteUnixTransport__open;
  146160. __pyx_vtable_6uvloop_4loop_WriteUnixTransport.__pyx_base.__pyx_base._start_reading = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *))__pyx_f_6uvloop_4loop_18WriteUnixTransport__start_reading;
  146161. __pyx_vtable_6uvloop_4loop_WriteUnixTransport.__pyx_base.__pyx_base._stop_reading = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *))__pyx_f_6uvloop_4loop_18WriteUnixTransport__stop_reading;
  146162. __pyx_vtable_6uvloop_4loop_WriteUnixTransport.new = (struct __pyx_obj_6uvloop_4loop_WriteUnixTransport *(*)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, struct __pyx_obj_6uvloop_4loop_Server *, PyObject *))__pyx_f_6uvloop_4loop_18WriteUnixTransport_new;
  146163. __pyx_type_6uvloop_4loop_WriteUnixTransport.tp_base = __pyx_ptype_6uvloop_4loop_UVStream;
  146164. if (PyType_Ready(&__pyx_type_6uvloop_4loop_WriteUnixTransport) < 0) __PYX_ERR(20, 148, __pyx_L1_error)
  146165. #if PY_VERSION_HEX < 0x030800B1
  146166. __pyx_type_6uvloop_4loop_WriteUnixTransport.tp_print = 0;
  146167. #endif
  146168. if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6uvloop_4loop_WriteUnixTransport.tp_dictoffset && __pyx_type_6uvloop_4loop_WriteUnixTransport.tp_getattro == PyObject_GenericGetAttr)) {
  146169. __pyx_type_6uvloop_4loop_WriteUnixTransport.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  146170. }
  146171. if (__Pyx_SetVtable(__pyx_type_6uvloop_4loop_WriteUnixTransport.tp_dict, __pyx_vtabptr_6uvloop_4loop_WriteUnixTransport) < 0) __PYX_ERR(20, 148, __pyx_L1_error)
  146172. if (PyObject_SetAttr(__pyx_m, __pyx_n_s_WriteUnixTransport, (PyObject *)&__pyx_type_6uvloop_4loop_WriteUnixTransport) < 0) __PYX_ERR(20, 148, __pyx_L1_error)
  146173. if (__pyx_type_6uvloop_4loop_WriteUnixTransport.tp_weaklistoffset == 0) __pyx_type_6uvloop_4loop_WriteUnixTransport.tp_weaklistoffset = offsetof(struct __pyx_obj_6uvloop_4loop_WriteUnixTransport, __pyx_base.__pyx_base.__weakref__);
  146174. if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6uvloop_4loop_WriteUnixTransport) < 0) __PYX_ERR(20, 148, __pyx_L1_error)
  146175. __pyx_ptype_6uvloop_4loop_WriteUnixTransport = &__pyx_type_6uvloop_4loop_WriteUnixTransport;
  146176. __pyx_vtabptr_6uvloop_4loop_UVProcess = &__pyx_vtable_6uvloop_4loop_UVProcess;
  146177. __pyx_vtable_6uvloop_4loop_UVProcess.__pyx_base = *__pyx_vtabptr_6uvloop_4loop_UVHandle;
  146178. __pyx_vtable_6uvloop_4loop_UVProcess.__pyx_base._close = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVHandle *))__pyx_f_6uvloop_4loop_9UVProcess__close;
  146179. __pyx_vtable_6uvloop_4loop_UVProcess._close_process_handle = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVProcess *))__pyx_f_6uvloop_4loop_9UVProcess__close_process_handle;
  146180. __pyx_vtable_6uvloop_4loop_UVProcess._init = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVProcess *, struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *))__pyx_f_6uvloop_4loop_9UVProcess__init;
  146181. __pyx_vtable_6uvloop_4loop_UVProcess._after_fork = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVProcess *))__pyx_f_6uvloop_4loop_9UVProcess__after_fork;
  146182. __pyx_vtable_6uvloop_4loop_UVProcess.__pyx___to_cstring_array = (char **(*)(struct __pyx_obj_6uvloop_4loop_UVProcess *, PyObject *))__pyx_f_6uvloop_4loop_9UVProcess___to_cstring_array;
  146183. __pyx_vtable_6uvloop_4loop_UVProcess._init_args = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVProcess *, PyObject *))__pyx_f_6uvloop_4loop_9UVProcess__init_args;
  146184. __pyx_vtable_6uvloop_4loop_UVProcess._init_env = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVProcess *, PyObject *))__pyx_f_6uvloop_4loop_9UVProcess__init_env;
  146185. __pyx_vtable_6uvloop_4loop_UVProcess._init_files = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVProcess *, PyObject *, PyObject *, PyObject *))__pyx_f_6uvloop_4loop_9UVProcess__init_files;
  146186. __pyx_vtable_6uvloop_4loop_UVProcess._init_options = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVProcess *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *))__pyx_f_6uvloop_4loop_9UVProcess__init_options;
  146187. __pyx_vtable_6uvloop_4loop_UVProcess._close_after_spawn = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVProcess *, int))__pyx_f_6uvloop_4loop_9UVProcess__close_after_spawn;
  146188. __pyx_vtable_6uvloop_4loop_UVProcess._on_exit = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVProcess *, int64_t, int))__pyx_f_6uvloop_4loop_9UVProcess__on_exit;
  146189. __pyx_vtable_6uvloop_4loop_UVProcess._kill = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVProcess *, int))__pyx_f_6uvloop_4loop_9UVProcess__kill;
  146190. __pyx_type_6uvloop_4loop_UVProcess.tp_base = __pyx_ptype_6uvloop_4loop_UVHandle;
  146191. if (PyType_Ready(&__pyx_type_6uvloop_4loop_UVProcess) < 0) __PYX_ERR(6, 2, __pyx_L1_error)
  146192. #if PY_VERSION_HEX < 0x030800B1
  146193. __pyx_type_6uvloop_4loop_UVProcess.tp_print = 0;
  146194. #endif
  146195. if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6uvloop_4loop_UVProcess.tp_dictoffset && __pyx_type_6uvloop_4loop_UVProcess.tp_getattro == PyObject_GenericGetAttr)) {
  146196. __pyx_type_6uvloop_4loop_UVProcess.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  146197. }
  146198. if (__Pyx_SetVtable(__pyx_type_6uvloop_4loop_UVProcess.tp_dict, __pyx_vtabptr_6uvloop_4loop_UVProcess) < 0) __PYX_ERR(6, 2, __pyx_L1_error)
  146199. if (PyObject_SetAttr(__pyx_m, __pyx_n_s_UVProcess, (PyObject *)&__pyx_type_6uvloop_4loop_UVProcess) < 0) __PYX_ERR(6, 2, __pyx_L1_error)
  146200. if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6uvloop_4loop_UVProcess) < 0) __PYX_ERR(6, 2, __pyx_L1_error)
  146201. __pyx_ptype_6uvloop_4loop_UVProcess = &__pyx_type_6uvloop_4loop_UVProcess;
  146202. __pyx_vtabptr_6uvloop_4loop_UVProcessTransport = &__pyx_vtable_6uvloop_4loop_UVProcessTransport;
  146203. __pyx_vtable_6uvloop_4loop_UVProcessTransport.__pyx_base = *__pyx_vtabptr_6uvloop_4loop_UVProcess;
  146204. __pyx_vtable_6uvloop_4loop_UVProcessTransport.__pyx_base._init_files = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVProcess *, PyObject *, PyObject *, PyObject *))__pyx_f_6uvloop_4loop_18UVProcessTransport__init_files;
  146205. __pyx_vtable_6uvloop_4loop_UVProcessTransport.__pyx_base._on_exit = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVProcess *, int64_t, int))__pyx_f_6uvloop_4loop_18UVProcessTransport__on_exit;
  146206. __pyx_vtable_6uvloop_4loop_UVProcessTransport._file_redirect_stdio = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *, int))__pyx_f_6uvloop_4loop_18UVProcessTransport__file_redirect_stdio;
  146207. __pyx_vtable_6uvloop_4loop_UVProcessTransport._file_devnull = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *))__pyx_f_6uvloop_4loop_18UVProcessTransport__file_devnull;
  146208. __pyx_vtable_6uvloop_4loop_UVProcessTransport._file_inpipe = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *))__pyx_f_6uvloop_4loop_18UVProcessTransport__file_inpipe;
  146209. __pyx_vtable_6uvloop_4loop_UVProcessTransport._file_outpipe = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *))__pyx_f_6uvloop_4loop_18UVProcessTransport__file_outpipe;
  146210. __pyx_vtable_6uvloop_4loop_UVProcessTransport._check_proc = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *))__pyx_f_6uvloop_4loop_18UVProcessTransport__check_proc;
  146211. __pyx_vtable_6uvloop_4loop_UVProcessTransport._pipe_connection_lost = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *, int, PyObject *))__pyx_f_6uvloop_4loop_18UVProcessTransport__pipe_connection_lost;
  146212. __pyx_vtable_6uvloop_4loop_UVProcessTransport._pipe_data_received = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *, int, PyObject *))__pyx_f_6uvloop_4loop_18UVProcessTransport__pipe_data_received;
  146213. __pyx_vtable_6uvloop_4loop_UVProcessTransport._call_connection_made = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *, PyObject *))__pyx_f_6uvloop_4loop_18UVProcessTransport__call_connection_made;
  146214. __pyx_vtable_6uvloop_4loop_UVProcessTransport._try_finish = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *))__pyx_f_6uvloop_4loop_18UVProcessTransport__try_finish;
  146215. __pyx_vtable_6uvloop_4loop_UVProcessTransport.new = (struct __pyx_obj_6uvloop_4loop_UVProcessTransport *(*)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *))__pyx_f_6uvloop_4loop_18UVProcessTransport_new;
  146216. __pyx_type_6uvloop_4loop_UVProcessTransport.tp_base = __pyx_ptype_6uvloop_4loop_UVProcess;
  146217. if (PyType_Ready(&__pyx_type_6uvloop_4loop_UVProcessTransport) < 0) __PYX_ERR(6, 352, __pyx_L1_error)
  146218. #if PY_VERSION_HEX < 0x030800B1
  146219. __pyx_type_6uvloop_4loop_UVProcessTransport.tp_print = 0;
  146220. #endif
  146221. if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6uvloop_4loop_UVProcessTransport.tp_dictoffset && __pyx_type_6uvloop_4loop_UVProcessTransport.tp_getattro == PyObject_GenericGetAttr)) {
  146222. __pyx_type_6uvloop_4loop_UVProcessTransport.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  146223. }
  146224. if (__Pyx_SetVtable(__pyx_type_6uvloop_4loop_UVProcessTransport.tp_dict, __pyx_vtabptr_6uvloop_4loop_UVProcessTransport) < 0) __PYX_ERR(6, 352, __pyx_L1_error)
  146225. if (PyObject_SetAttr(__pyx_m, __pyx_n_s_UVProcessTransport, (PyObject *)&__pyx_type_6uvloop_4loop_UVProcessTransport) < 0) __PYX_ERR(6, 352, __pyx_L1_error)
  146226. if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6uvloop_4loop_UVProcessTransport) < 0) __PYX_ERR(6, 352, __pyx_L1_error)
  146227. __pyx_ptype_6uvloop_4loop_UVProcessTransport = &__pyx_type_6uvloop_4loop_UVProcessTransport;
  146228. __pyx_vtabptr_6uvloop_4loop_UVRequest = &__pyx_vtable_6uvloop_4loop_UVRequest;
  146229. __pyx_vtable_6uvloop_4loop_UVRequest.on_done = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVRequest *))__pyx_f_6uvloop_4loop_9UVRequest_on_done;
  146230. __pyx_vtable_6uvloop_4loop_UVRequest.cancel = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVRequest *))__pyx_f_6uvloop_4loop_9UVRequest_cancel;
  146231. if (PyType_Ready(&__pyx_type_6uvloop_4loop_UVRequest) < 0) __PYX_ERR(21, 1, __pyx_L1_error)
  146232. #if PY_VERSION_HEX < 0x030800B1
  146233. __pyx_type_6uvloop_4loop_UVRequest.tp_print = 0;
  146234. #endif
  146235. if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6uvloop_4loop_UVRequest.tp_dictoffset && __pyx_type_6uvloop_4loop_UVRequest.tp_getattro == PyObject_GenericGetAttr)) {
  146236. __pyx_type_6uvloop_4loop_UVRequest.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  146237. }
  146238. if (__Pyx_SetVtable(__pyx_type_6uvloop_4loop_UVRequest.tp_dict, __pyx_vtabptr_6uvloop_4loop_UVRequest) < 0) __PYX_ERR(21, 1, __pyx_L1_error)
  146239. if (PyObject_SetAttr(__pyx_m, __pyx_n_s_UVRequest, (PyObject *)&__pyx_type_6uvloop_4loop_UVRequest) < 0) __PYX_ERR(21, 1, __pyx_L1_error)
  146240. if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6uvloop_4loop_UVRequest) < 0) __PYX_ERR(21, 1, __pyx_L1_error)
  146241. __pyx_ptype_6uvloop_4loop_UVRequest = &__pyx_type_6uvloop_4loop_UVRequest;
  146242. if (PyType_Ready(&__pyx_type_6uvloop_4loop__SSLProtocolTransport) < 0) __PYX_ERR(22, 15, __pyx_L1_error)
  146243. #if PY_VERSION_HEX < 0x030800B1
  146244. __pyx_type_6uvloop_4loop__SSLProtocolTransport.tp_print = 0;
  146245. #endif
  146246. if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6uvloop_4loop__SSLProtocolTransport.tp_dictoffset && __pyx_type_6uvloop_4loop__SSLProtocolTransport.tp_getattro == PyObject_GenericGetAttr)) {
  146247. __pyx_type_6uvloop_4loop__SSLProtocolTransport.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  146248. }
  146249. if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SSLProtocolTransport, (PyObject *)&__pyx_type_6uvloop_4loop__SSLProtocolTransport) < 0) __PYX_ERR(22, 15, __pyx_L1_error)
  146250. if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6uvloop_4loop__SSLProtocolTransport) < 0) __PYX_ERR(22, 15, __pyx_L1_error)
  146251. __pyx_ptype_6uvloop_4loop__SSLProtocolTransport = &__pyx_type_6uvloop_4loop__SSLProtocolTransport;
  146252. __pyx_vtabptr_6uvloop_4loop_SSLProtocol = &__pyx_vtable_6uvloop_4loop_SSLProtocol;
  146253. __pyx_vtable_6uvloop_4loop_SSLProtocol._set_app_protocol = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_SSLProtocol *, PyObject *))__pyx_f_6uvloop_4loop_11SSLProtocol__set_app_protocol;
  146254. __pyx_vtable_6uvloop_4loop_SSLProtocol._wakeup_waiter = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_SSLProtocol *, struct __pyx_opt_args_6uvloop_4loop_11SSLProtocol__wakeup_waiter *__pyx_optional_args))__pyx_f_6uvloop_4loop_11SSLProtocol__wakeup_waiter;
  146255. __pyx_vtable_6uvloop_4loop_SSLProtocol._get_extra_info = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_SSLProtocol *, PyObject *, struct __pyx_opt_args_6uvloop_4loop_11SSLProtocol__get_extra_info *__pyx_optional_args))__pyx_f_6uvloop_4loop_11SSLProtocol__get_extra_info;
  146256. __pyx_vtable_6uvloop_4loop_SSLProtocol._set_state = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_SSLProtocol *, enum __pyx_t_6uvloop_4loop_SSLProtocolState))__pyx_f_6uvloop_4loop_11SSLProtocol__set_state;
  146257. __pyx_vtable_6uvloop_4loop_SSLProtocol._start_handshake = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_SSLProtocol *))__pyx_f_6uvloop_4loop_11SSLProtocol__start_handshake;
  146258. __pyx_vtable_6uvloop_4loop_SSLProtocol._check_handshake_timeout = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_SSLProtocol *))__pyx_f_6uvloop_4loop_11SSLProtocol__check_handshake_timeout;
  146259. __pyx_vtable_6uvloop_4loop_SSLProtocol._do_handshake = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_SSLProtocol *))__pyx_f_6uvloop_4loop_11SSLProtocol__do_handshake;
  146260. __pyx_vtable_6uvloop_4loop_SSLProtocol._on_handshake_complete = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_SSLProtocol *, PyObject *))__pyx_f_6uvloop_4loop_11SSLProtocol__on_handshake_complete;
  146261. __pyx_vtable_6uvloop_4loop_SSLProtocol._start_shutdown = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_SSLProtocol *))__pyx_f_6uvloop_4loop_11SSLProtocol__start_shutdown;
  146262. __pyx_vtable_6uvloop_4loop_SSLProtocol._check_shutdown_timeout = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_SSLProtocol *))__pyx_f_6uvloop_4loop_11SSLProtocol__check_shutdown_timeout;
  146263. __pyx_vtable_6uvloop_4loop_SSLProtocol._do_flush = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_SSLProtocol *))__pyx_f_6uvloop_4loop_11SSLProtocol__do_flush;
  146264. __pyx_vtable_6uvloop_4loop_SSLProtocol._do_shutdown = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_SSLProtocol *))__pyx_f_6uvloop_4loop_11SSLProtocol__do_shutdown;
  146265. __pyx_vtable_6uvloop_4loop_SSLProtocol._on_shutdown_complete = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_SSLProtocol *, PyObject *))__pyx_f_6uvloop_4loop_11SSLProtocol__on_shutdown_complete;
  146266. __pyx_vtable_6uvloop_4loop_SSLProtocol._abort = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_SSLProtocol *, PyObject *))__pyx_f_6uvloop_4loop_11SSLProtocol__abort;
  146267. __pyx_vtable_6uvloop_4loop_SSLProtocol._write_appdata = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_SSLProtocol *, PyObject *))__pyx_f_6uvloop_4loop_11SSLProtocol__write_appdata;
  146268. __pyx_vtable_6uvloop_4loop_SSLProtocol._do_write = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_SSLProtocol *))__pyx_f_6uvloop_4loop_11SSLProtocol__do_write;
  146269. __pyx_vtable_6uvloop_4loop_SSLProtocol._process_outgoing = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_SSLProtocol *))__pyx_f_6uvloop_4loop_11SSLProtocol__process_outgoing;
  146270. __pyx_vtable_6uvloop_4loop_SSLProtocol._do_read = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_SSLProtocol *))__pyx_f_6uvloop_4loop_11SSLProtocol__do_read;
  146271. __pyx_vtable_6uvloop_4loop_SSLProtocol._do_read__buffered = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_SSLProtocol *))__pyx_f_6uvloop_4loop_11SSLProtocol__do_read__buffered;
  146272. __pyx_vtable_6uvloop_4loop_SSLProtocol._do_read__copied = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_SSLProtocol *))__pyx_f_6uvloop_4loop_11SSLProtocol__do_read__copied;
  146273. __pyx_vtable_6uvloop_4loop_SSLProtocol._call_eof_received = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_SSLProtocol *))__pyx_f_6uvloop_4loop_11SSLProtocol__call_eof_received;
  146274. __pyx_vtable_6uvloop_4loop_SSLProtocol._control_app_writing = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_SSLProtocol *))__pyx_f_6uvloop_4loop_11SSLProtocol__control_app_writing;
  146275. __pyx_vtable_6uvloop_4loop_SSLProtocol._get_write_buffer_size = (size_t (*)(struct __pyx_obj_6uvloop_4loop_SSLProtocol *))__pyx_f_6uvloop_4loop_11SSLProtocol__get_write_buffer_size;
  146276. __pyx_vtable_6uvloop_4loop_SSLProtocol._set_write_buffer_limits = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_SSLProtocol *, struct __pyx_opt_args_6uvloop_4loop_11SSLProtocol__set_write_buffer_limits *__pyx_optional_args))__pyx_f_6uvloop_4loop_11SSLProtocol__set_write_buffer_limits;
  146277. __pyx_vtable_6uvloop_4loop_SSLProtocol._pause_reading = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_SSLProtocol *))__pyx_f_6uvloop_4loop_11SSLProtocol__pause_reading;
  146278. __pyx_vtable_6uvloop_4loop_SSLProtocol._resume_reading = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_SSLProtocol *))__pyx_f_6uvloop_4loop_11SSLProtocol__resume_reading;
  146279. __pyx_vtable_6uvloop_4loop_SSLProtocol._control_ssl_reading = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_SSLProtocol *))__pyx_f_6uvloop_4loop_11SSLProtocol__control_ssl_reading;
  146280. __pyx_vtable_6uvloop_4loop_SSLProtocol._set_read_buffer_limits = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_SSLProtocol *, struct __pyx_opt_args_6uvloop_4loop_11SSLProtocol__set_read_buffer_limits *__pyx_optional_args))__pyx_f_6uvloop_4loop_11SSLProtocol__set_read_buffer_limits;
  146281. __pyx_vtable_6uvloop_4loop_SSLProtocol._get_read_buffer_size = (size_t (*)(struct __pyx_obj_6uvloop_4loop_SSLProtocol *))__pyx_f_6uvloop_4loop_11SSLProtocol__get_read_buffer_size;
  146282. __pyx_vtable_6uvloop_4loop_SSLProtocol._fatal_error = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_SSLProtocol *, PyObject *, struct __pyx_opt_args_6uvloop_4loop_11SSLProtocol__fatal_error *__pyx_optional_args))__pyx_f_6uvloop_4loop_11SSLProtocol__fatal_error;
  146283. if (PyType_Ready(&__pyx_type_6uvloop_4loop_SSLProtocol) < 0) __PYX_ERR(22, 192, __pyx_L1_error)
  146284. #if PY_VERSION_HEX < 0x030800B1
  146285. __pyx_type_6uvloop_4loop_SSLProtocol.tp_print = 0;
  146286. #endif
  146287. if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6uvloop_4loop_SSLProtocol.tp_dictoffset && __pyx_type_6uvloop_4loop_SSLProtocol.tp_getattro == PyObject_GenericGetAttr)) {
  146288. __pyx_type_6uvloop_4loop_SSLProtocol.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  146289. }
  146290. if (__Pyx_SetVtable(__pyx_type_6uvloop_4loop_SSLProtocol.tp_dict, __pyx_vtabptr_6uvloop_4loop_SSLProtocol) < 0) __PYX_ERR(22, 192, __pyx_L1_error)
  146291. if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SSLProtocol, (PyObject *)&__pyx_type_6uvloop_4loop_SSLProtocol) < 0) __PYX_ERR(22, 192, __pyx_L1_error)
  146292. if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6uvloop_4loop_SSLProtocol) < 0) __PYX_ERR(22, 192, __pyx_L1_error)
  146293. __pyx_ptype_6uvloop_4loop_SSLProtocol = &__pyx_type_6uvloop_4loop_SSLProtocol;
  146294. __pyx_vtabptr_6uvloop_4loop_UDPTransport = &__pyx_vtable_6uvloop_4loop_UDPTransport;
  146295. __pyx_vtable_6uvloop_4loop_UDPTransport.__pyx_base = *__pyx_vtabptr_6uvloop_4loop_UVBaseTransport;
  146296. __pyx_vtable_6uvloop_4loop_UDPTransport.__pyx_base.__pyx_base._new_socket = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVSocketHandle *))__pyx_f_6uvloop_4loop_12UDPTransport__new_socket;
  146297. __pyx_vtable_6uvloop_4loop_UDPTransport.__pyx_base._get_write_buffer_size = (size_t (*)(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *))__pyx_f_6uvloop_4loop_12UDPTransport__get_write_buffer_size;
  146298. __pyx_vtable_6uvloop_4loop_UDPTransport.__pyx_base._is_reading = (int (*)(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *))__pyx_f_6uvloop_4loop_12UDPTransport__is_reading;
  146299. __pyx_vtable_6uvloop_4loop_UDPTransport.__pyx_base._start_reading = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *))__pyx_f_6uvloop_4loop_12UDPTransport__start_reading;
  146300. __pyx_vtable_6uvloop_4loop_UDPTransport.__pyx_base._stop_reading = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *))__pyx_f_6uvloop_4loop_12UDPTransport__stop_reading;
  146301. __pyx_vtable_6uvloop_4loop_UDPTransport._init = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UDPTransport *, struct __pyx_obj_6uvloop_4loop_Loop *, unsigned int))__pyx_f_6uvloop_4loop_12UDPTransport__init;
  146302. __pyx_vtable_6uvloop_4loop_UDPTransport._connect = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UDPTransport *, struct sockaddr *, size_t))__pyx_f_6uvloop_4loop_12UDPTransport__connect;
  146303. __pyx_vtable_6uvloop_4loop_UDPTransport._bind = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UDPTransport *, struct sockaddr *, int))__pyx_f_6uvloop_4loop_12UDPTransport__bind;
  146304. __pyx_vtable_6uvloop_4loop_UDPTransport.open = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UDPTransport *, int, int))__pyx_f_6uvloop_4loop_12UDPTransport_open;
  146305. __pyx_vtable_6uvloop_4loop_UDPTransport._set_broadcast = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UDPTransport *, int))__pyx_f_6uvloop_4loop_12UDPTransport__set_broadcast;
  146306. __pyx_vtable_6uvloop_4loop_UDPTransport.__pyx___receiving_started = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UDPTransport *))__pyx_f_6uvloop_4loop_12UDPTransport___receiving_started;
  146307. __pyx_vtable_6uvloop_4loop_UDPTransport.__pyx___receiving_stopped = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UDPTransport *))__pyx_f_6uvloop_4loop_12UDPTransport___receiving_stopped;
  146308. __pyx_vtable_6uvloop_4loop_UDPTransport._send = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UDPTransport *, PyObject *, PyObject *))__pyx_f_6uvloop_4loop_12UDPTransport__send;
  146309. __pyx_vtable_6uvloop_4loop_UDPTransport._on_receive = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UDPTransport *, PyObject *, PyObject *, PyObject *))__pyx_f_6uvloop_4loop_12UDPTransport__on_receive;
  146310. __pyx_vtable_6uvloop_4loop_UDPTransport._on_sent = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UDPTransport *, PyObject *))__pyx_f_6uvloop_4loop_12UDPTransport__on_sent;
  146311. __pyx_type_6uvloop_4loop_UDPTransport.tp_base = __pyx_ptype_6uvloop_4loop_UVBaseTransport;
  146312. if (PyType_Ready(&__pyx_type_6uvloop_4loop_UDPTransport) < 0) __PYX_ERR(23, 54, __pyx_L1_error)
  146313. #if PY_VERSION_HEX < 0x030800B1
  146314. __pyx_type_6uvloop_4loop_UDPTransport.tp_print = 0;
  146315. #endif
  146316. if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6uvloop_4loop_UDPTransport.tp_dictoffset && __pyx_type_6uvloop_4loop_UDPTransport.tp_getattro == PyObject_GenericGetAttr)) {
  146317. __pyx_type_6uvloop_4loop_UDPTransport.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  146318. }
  146319. if (__Pyx_SetVtable(__pyx_type_6uvloop_4loop_UDPTransport.tp_dict, __pyx_vtabptr_6uvloop_4loop_UDPTransport) < 0) __PYX_ERR(23, 54, __pyx_L1_error)
  146320. if (PyObject_SetAttr(__pyx_m, __pyx_n_s_UDPTransport, (PyObject *)&__pyx_type_6uvloop_4loop_UDPTransport) < 0) __PYX_ERR(23, 54, __pyx_L1_error)
  146321. if (__pyx_type_6uvloop_4loop_UDPTransport.tp_weaklistoffset == 0) __pyx_type_6uvloop_4loop_UDPTransport.tp_weaklistoffset = offsetof(struct __pyx_obj_6uvloop_4loop_UDPTransport, __pyx_base.__weakref__);
  146322. if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6uvloop_4loop_UDPTransport) < 0) __PYX_ERR(23, 54, __pyx_L1_error)
  146323. __pyx_ptype_6uvloop_4loop_UDPTransport = &__pyx_type_6uvloop_4loop_UDPTransport;
  146324. __pyx_vtabptr_6uvloop_4loop_Server = &__pyx_vtable_6uvloop_4loop_Server;
  146325. __pyx_vtable_6uvloop_4loop_Server._add_server = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Server *, struct __pyx_obj_6uvloop_4loop_UVStreamServer *))__pyx_f_6uvloop_4loop_6Server__add_server;
  146326. __pyx_vtable_6uvloop_4loop_Server._start_serving = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Server *))__pyx_f_6uvloop_4loop_6Server__start_serving;
  146327. __pyx_vtable_6uvloop_4loop_Server._wakeup = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Server *))__pyx_f_6uvloop_4loop_6Server__wakeup;
  146328. __pyx_vtable_6uvloop_4loop_Server._attach = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Server *))__pyx_f_6uvloop_4loop_6Server__attach;
  146329. __pyx_vtable_6uvloop_4loop_Server._detach = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Server *))__pyx_f_6uvloop_4loop_6Server__detach;
  146330. __pyx_vtable_6uvloop_4loop_Server._ref = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Server *))__pyx_f_6uvloop_4loop_6Server__ref;
  146331. __pyx_vtable_6uvloop_4loop_Server._unref = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Server *))__pyx_f_6uvloop_4loop_6Server__unref;
  146332. if (PyType_Ready(&__pyx_type_6uvloop_4loop_Server) < 0) __PYX_ERR(24, 4, __pyx_L1_error)
  146333. #if PY_VERSION_HEX < 0x030800B1
  146334. __pyx_type_6uvloop_4loop_Server.tp_print = 0;
  146335. #endif
  146336. if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6uvloop_4loop_Server.tp_dictoffset && __pyx_type_6uvloop_4loop_Server.tp_getattro == PyObject_GenericGetAttr)) {
  146337. __pyx_type_6uvloop_4loop_Server.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  146338. }
  146339. if (__Pyx_SetVtable(__pyx_type_6uvloop_4loop_Server.tp_dict, __pyx_vtabptr_6uvloop_4loop_Server) < 0) __PYX_ERR(24, 4, __pyx_L1_error)
  146340. if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Server, (PyObject *)&__pyx_type_6uvloop_4loop_Server) < 0) __PYX_ERR(24, 4, __pyx_L1_error)
  146341. if (__pyx_type_6uvloop_4loop_Server.tp_weaklistoffset == 0) __pyx_type_6uvloop_4loop_Server.tp_weaklistoffset = offsetof(struct __pyx_obj_6uvloop_4loop_Server, __weakref__);
  146342. if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6uvloop_4loop_Server) < 0) __PYX_ERR(24, 4, __pyx_L1_error)
  146343. __pyx_ptype_6uvloop_4loop_Server = &__pyx_type_6uvloop_4loop_Server;
  146344. __pyx_vtabptr_6uvloop_4loop_PseudoSocket = &__pyx_vtable_6uvloop_4loop_PseudoSocket;
  146345. __pyx_vtable_6uvloop_4loop_PseudoSocket._na = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_PseudoSocket *, PyObject *))__pyx_f_6uvloop_4loop_12PseudoSocket__na;
  146346. __pyx_vtable_6uvloop_4loop_PseudoSocket._make_sock = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_PseudoSocket *))__pyx_f_6uvloop_4loop_12PseudoSocket__make_sock;
  146347. if (PyType_Ready(&__pyx_type_6uvloop_4loop_PseudoSocket) < 0) __PYX_ERR(10, 1, __pyx_L1_error)
  146348. #if PY_VERSION_HEX < 0x030800B1
  146349. __pyx_type_6uvloop_4loop_PseudoSocket.tp_print = 0;
  146350. #endif
  146351. if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6uvloop_4loop_PseudoSocket.tp_dictoffset && __pyx_type_6uvloop_4loop_PseudoSocket.tp_getattro == PyObject_GenericGetAttr)) {
  146352. __pyx_type_6uvloop_4loop_PseudoSocket.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  146353. }
  146354. if (__Pyx_SetVtable(__pyx_type_6uvloop_4loop_PseudoSocket.tp_dict, __pyx_vtabptr_6uvloop_4loop_PseudoSocket) < 0) __PYX_ERR(10, 1, __pyx_L1_error)
  146355. if (PyObject_SetAttr(__pyx_m, __pyx_n_s_PseudoSocket, (PyObject *)&__pyx_type_6uvloop_4loop_PseudoSocket) < 0) __PYX_ERR(10, 1, __pyx_L1_error)
  146356. if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6uvloop_4loop_PseudoSocket) < 0) __PYX_ERR(10, 1, __pyx_L1_error)
  146357. __pyx_ptype_6uvloop_4loop_PseudoSocket = &__pyx_type_6uvloop_4loop_PseudoSocket;
  146358. __pyx_vtabptr_6uvloop_4loop_LruCache = &__pyx_vtable_6uvloop_4loop_LruCache;
  146359. __pyx_vtable_6uvloop_4loop_LruCache.get = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_LruCache *, PyObject *, PyObject *))__pyx_f_6uvloop_4loop_8LruCache_get;
  146360. __pyx_vtable_6uvloop_4loop_LruCache.needs_cleanup = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_LruCache *))__pyx_f_6uvloop_4loop_8LruCache_needs_cleanup;
  146361. __pyx_vtable_6uvloop_4loop_LruCache.cleanup_one = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_LruCache *))__pyx_f_6uvloop_4loop_8LruCache_cleanup_one;
  146362. if (PyType_Ready(&__pyx_type_6uvloop_4loop_LruCache) < 0) __PYX_ERR(0, 5, __pyx_L1_error)
  146363. #if PY_VERSION_HEX < 0x030800B1
  146364. __pyx_type_6uvloop_4loop_LruCache.tp_print = 0;
  146365. #endif
  146366. if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6uvloop_4loop_LruCache.tp_dictoffset && __pyx_type_6uvloop_4loop_LruCache.tp_getattro == PyObject_GenericGetAttr)) {
  146367. __pyx_type_6uvloop_4loop_LruCache.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  146368. }
  146369. if (__Pyx_SetVtable(__pyx_type_6uvloop_4loop_LruCache.tp_dict, __pyx_vtabptr_6uvloop_4loop_LruCache) < 0) __PYX_ERR(0, 5, __pyx_L1_error)
  146370. if (PyObject_SetAttr(__pyx_m, __pyx_n_s_LruCache, (PyObject *)&__pyx_type_6uvloop_4loop_LruCache) < 0) __PYX_ERR(0, 5, __pyx_L1_error)
  146371. if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6uvloop_4loop_LruCache) < 0) __PYX_ERR(0, 5, __pyx_L1_error)
  146372. __pyx_ptype_6uvloop_4loop_LruCache = &__pyx_type_6uvloop_4loop_LruCache;
  146373. __pyx_vtabptr_6uvloop_4loop__StreamWriteContext = &__pyx_vtable_6uvloop_4loop__StreamWriteContext;
  146374. __pyx_vtable_6uvloop_4loop__StreamWriteContext.free_bufs = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop__StreamWriteContext *))__pyx_f_6uvloop_4loop_19_StreamWriteContext_free_bufs;
  146375. __pyx_vtable_6uvloop_4loop__StreamWriteContext.close = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop__StreamWriteContext *))__pyx_f_6uvloop_4loop_19_StreamWriteContext_close;
  146376. __pyx_vtable_6uvloop_4loop__StreamWriteContext.advance_uv_buf = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop__StreamWriteContext *, size_t))__pyx_f_6uvloop_4loop_19_StreamWriteContext_advance_uv_buf;
  146377. __pyx_vtable_6uvloop_4loop__StreamWriteContext.new = (struct __pyx_obj_6uvloop_4loop__StreamWriteContext *(*)(struct __pyx_obj_6uvloop_4loop_UVStream *, PyObject *))__pyx_f_6uvloop_4loop_19_StreamWriteContext_new;
  146378. if (PyType_Ready(&__pyx_type_6uvloop_4loop__StreamWriteContext) < 0) __PYX_ERR(18, 6, __pyx_L1_error)
  146379. #if PY_VERSION_HEX < 0x030800B1
  146380. __pyx_type_6uvloop_4loop__StreamWriteContext.tp_print = 0;
  146381. #endif
  146382. if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6uvloop_4loop__StreamWriteContext.tp_dictoffset && __pyx_type_6uvloop_4loop__StreamWriteContext.tp_getattro == PyObject_GenericGetAttr)) {
  146383. __pyx_type_6uvloop_4loop__StreamWriteContext.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  146384. }
  146385. if (__Pyx_SetVtable(__pyx_type_6uvloop_4loop__StreamWriteContext.tp_dict, __pyx_vtabptr_6uvloop_4loop__StreamWriteContext) < 0) __PYX_ERR(18, 6, __pyx_L1_error)
  146386. if (PyObject_SetAttr(__pyx_m, __pyx_n_s_StreamWriteContext, (PyObject *)&__pyx_type_6uvloop_4loop__StreamWriteContext) < 0) __PYX_ERR(18, 6, __pyx_L1_error)
  146387. if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6uvloop_4loop__StreamWriteContext) < 0) __PYX_ERR(18, 6, __pyx_L1_error)
  146388. __pyx_ptype_6uvloop_4loop__StreamWriteContext = &__pyx_type_6uvloop_4loop__StreamWriteContext;
  146389. __pyx_vtabptr_6uvloop_4loop__TCPConnectRequest = &__pyx_vtable_6uvloop_4loop__TCPConnectRequest;
  146390. __pyx_vtable_6uvloop_4loop__TCPConnectRequest.__pyx_base = *__pyx_vtabptr_6uvloop_4loop_UVRequest;
  146391. __pyx_vtable_6uvloop_4loop__TCPConnectRequest.connect = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop__TCPConnectRequest *, struct sockaddr *))__pyx_f_6uvloop_4loop_18_TCPConnectRequest_connect;
  146392. __pyx_type_6uvloop_4loop__TCPConnectRequest.tp_base = __pyx_ptype_6uvloop_4loop_UVRequest;
  146393. if (PyType_Ready(&__pyx_type_6uvloop_4loop__TCPConnectRequest) < 0) __PYX_ERR(5, 183, __pyx_L1_error)
  146394. #if PY_VERSION_HEX < 0x030800B1
  146395. __pyx_type_6uvloop_4loop__TCPConnectRequest.tp_print = 0;
  146396. #endif
  146397. if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6uvloop_4loop__TCPConnectRequest.tp_dictoffset && __pyx_type_6uvloop_4loop__TCPConnectRequest.tp_getattro == PyObject_GenericGetAttr)) {
  146398. __pyx_type_6uvloop_4loop__TCPConnectRequest.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  146399. }
  146400. if (__Pyx_SetVtable(__pyx_type_6uvloop_4loop__TCPConnectRequest.tp_dict, __pyx_vtabptr_6uvloop_4loop__TCPConnectRequest) < 0) __PYX_ERR(5, 183, __pyx_L1_error)
  146401. if (PyObject_SetAttr(__pyx_m, __pyx_n_s_TCPConnectRequest, (PyObject *)&__pyx_type_6uvloop_4loop__TCPConnectRequest) < 0) __PYX_ERR(5, 183, __pyx_L1_error)
  146402. if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6uvloop_4loop__TCPConnectRequest) < 0) __PYX_ERR(5, 183, __pyx_L1_error)
  146403. __pyx_ptype_6uvloop_4loop__TCPConnectRequest = &__pyx_type_6uvloop_4loop__TCPConnectRequest;
  146404. __pyx_vtabptr_6uvloop_4loop__PipeConnectRequest = &__pyx_vtable_6uvloop_4loop__PipeConnectRequest;
  146405. __pyx_vtable_6uvloop_4loop__PipeConnectRequest.__pyx_base = *__pyx_vtabptr_6uvloop_4loop_UVRequest;
  146406. __pyx_vtable_6uvloop_4loop__PipeConnectRequest.connect = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop__PipeConnectRequest *, char *))__pyx_f_6uvloop_4loop_19_PipeConnectRequest_connect;
  146407. __pyx_type_6uvloop_4loop__PipeConnectRequest.tp_base = __pyx_ptype_6uvloop_4loop_UVRequest;
  146408. if (PyType_Ready(&__pyx_type_6uvloop_4loop__PipeConnectRequest) < 0) __PYX_ERR(20, 242, __pyx_L1_error)
  146409. #if PY_VERSION_HEX < 0x030800B1
  146410. __pyx_type_6uvloop_4loop__PipeConnectRequest.tp_print = 0;
  146411. #endif
  146412. if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6uvloop_4loop__PipeConnectRequest.tp_dictoffset && __pyx_type_6uvloop_4loop__PipeConnectRequest.tp_getattro == PyObject_GenericGetAttr)) {
  146413. __pyx_type_6uvloop_4loop__PipeConnectRequest.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  146414. }
  146415. if (__Pyx_SetVtable(__pyx_type_6uvloop_4loop__PipeConnectRequest.tp_dict, __pyx_vtabptr_6uvloop_4loop__PipeConnectRequest) < 0) __PYX_ERR(20, 242, __pyx_L1_error)
  146416. if (PyObject_SetAttr(__pyx_m, __pyx_n_s_PipeConnectRequest, (PyObject *)&__pyx_type_6uvloop_4loop__PipeConnectRequest) < 0) __PYX_ERR(20, 242, __pyx_L1_error)
  146417. if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6uvloop_4loop__PipeConnectRequest) < 0) __PYX_ERR(20, 242, __pyx_L1_error)
  146418. __pyx_ptype_6uvloop_4loop__PipeConnectRequest = &__pyx_type_6uvloop_4loop__PipeConnectRequest;
  146419. if (PyType_Ready(&__pyx_type_6uvloop_4loop_SockAddrHolder) < 0) __PYX_ERR(7, 67, __pyx_L1_error)
  146420. #if PY_VERSION_HEX < 0x030800B1
  146421. __pyx_type_6uvloop_4loop_SockAddrHolder.tp_print = 0;
  146422. #endif
  146423. if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6uvloop_4loop_SockAddrHolder.tp_dictoffset && __pyx_type_6uvloop_4loop_SockAddrHolder.tp_getattro == PyObject_GenericGetAttr)) {
  146424. __pyx_type_6uvloop_4loop_SockAddrHolder.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  146425. }
  146426. if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SockAddrHolder, (PyObject *)&__pyx_type_6uvloop_4loop_SockAddrHolder) < 0) __PYX_ERR(7, 67, __pyx_L1_error)
  146427. if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6uvloop_4loop_SockAddrHolder) < 0) __PYX_ERR(7, 67, __pyx_L1_error)
  146428. __pyx_ptype_6uvloop_4loop_SockAddrHolder = &__pyx_type_6uvloop_4loop_SockAddrHolder;
  146429. __pyx_vtabptr_6uvloop_4loop_AddrInfo = &__pyx_vtable_6uvloop_4loop_AddrInfo;
  146430. __pyx_vtable_6uvloop_4loop_AddrInfo.set_data = (void (*)(struct __pyx_obj_6uvloop_4loop_AddrInfo *, struct addrinfo *))__pyx_f_6uvloop_4loop_8AddrInfo_set_data;
  146431. __pyx_vtable_6uvloop_4loop_AddrInfo.unpack = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_AddrInfo *))__pyx_f_6uvloop_4loop_8AddrInfo_unpack;
  146432. __pyx_vtable_6uvloop_4loop_AddrInfo.isinstance = (int (*)(PyObject *))__pyx_f_6uvloop_4loop_8AddrInfo_isinstance;
  146433. if (PyType_Ready(&__pyx_type_6uvloop_4loop_AddrInfo) < 0) __PYX_ERR(7, 247, __pyx_L1_error)
  146434. #if PY_VERSION_HEX < 0x030800B1
  146435. __pyx_type_6uvloop_4loop_AddrInfo.tp_print = 0;
  146436. #endif
  146437. if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6uvloop_4loop_AddrInfo.tp_dictoffset && __pyx_type_6uvloop_4loop_AddrInfo.tp_getattro == PyObject_GenericGetAttr)) {
  146438. __pyx_type_6uvloop_4loop_AddrInfo.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  146439. }
  146440. if (__Pyx_SetVtable(__pyx_type_6uvloop_4loop_AddrInfo.tp_dict, __pyx_vtabptr_6uvloop_4loop_AddrInfo) < 0) __PYX_ERR(7, 247, __pyx_L1_error)
  146441. if (PyObject_SetAttr(__pyx_m, __pyx_n_s_AddrInfo, (PyObject *)&__pyx_type_6uvloop_4loop_AddrInfo) < 0) __PYX_ERR(7, 247, __pyx_L1_error)
  146442. if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6uvloop_4loop_AddrInfo) < 0) __PYX_ERR(7, 247, __pyx_L1_error)
  146443. __pyx_ptype_6uvloop_4loop_AddrInfo = &__pyx_type_6uvloop_4loop_AddrInfo;
  146444. __pyx_vtabptr_6uvloop_4loop_AddrInfoRequest = &__pyx_vtable_6uvloop_4loop_AddrInfoRequest;
  146445. __pyx_vtable_6uvloop_4loop_AddrInfoRequest.__pyx_base = *__pyx_vtabptr_6uvloop_4loop_UVRequest;
  146446. __pyx_type_6uvloop_4loop_AddrInfoRequest.tp_base = __pyx_ptype_6uvloop_4loop_UVRequest;
  146447. if (PyType_Ready(&__pyx_type_6uvloop_4loop_AddrInfoRequest) < 0) __PYX_ERR(7, 291, __pyx_L1_error)
  146448. #if PY_VERSION_HEX < 0x030800B1
  146449. __pyx_type_6uvloop_4loop_AddrInfoRequest.tp_print = 0;
  146450. #endif
  146451. if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6uvloop_4loop_AddrInfoRequest.tp_dictoffset && __pyx_type_6uvloop_4loop_AddrInfoRequest.tp_getattro == PyObject_GenericGetAttr)) {
  146452. __pyx_type_6uvloop_4loop_AddrInfoRequest.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  146453. }
  146454. if (__Pyx_SetVtable(__pyx_type_6uvloop_4loop_AddrInfoRequest.tp_dict, __pyx_vtabptr_6uvloop_4loop_AddrInfoRequest) < 0) __PYX_ERR(7, 291, __pyx_L1_error)
  146455. if (PyObject_SetAttr(__pyx_m, __pyx_n_s_AddrInfoRequest, (PyObject *)&__pyx_type_6uvloop_4loop_AddrInfoRequest) < 0) __PYX_ERR(7, 291, __pyx_L1_error)
  146456. if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6uvloop_4loop_AddrInfoRequest) < 0) __PYX_ERR(7, 291, __pyx_L1_error)
  146457. __pyx_ptype_6uvloop_4loop_AddrInfoRequest = &__pyx_type_6uvloop_4loop_AddrInfoRequest;
  146458. __pyx_vtabptr_6uvloop_4loop_NameInfoRequest = &__pyx_vtable_6uvloop_4loop_NameInfoRequest;
  146459. __pyx_vtable_6uvloop_4loop_NameInfoRequest.__pyx_base = *__pyx_vtabptr_6uvloop_4loop_UVRequest;
  146460. __pyx_vtable_6uvloop_4loop_NameInfoRequest.query = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_NameInfoRequest *, struct sockaddr *, int))__pyx_f_6uvloop_4loop_15NameInfoRequest_query;
  146461. __pyx_type_6uvloop_4loop_NameInfoRequest.tp_base = __pyx_ptype_6uvloop_4loop_UVRequest;
  146462. if (PyType_Ready(&__pyx_type_6uvloop_4loop_NameInfoRequest) < 0) __PYX_ERR(7, 346, __pyx_L1_error)
  146463. #if PY_VERSION_HEX < 0x030800B1
  146464. __pyx_type_6uvloop_4loop_NameInfoRequest.tp_print = 0;
  146465. #endif
  146466. if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6uvloop_4loop_NameInfoRequest.tp_dictoffset && __pyx_type_6uvloop_4loop_NameInfoRequest.tp_getattro == PyObject_GenericGetAttr)) {
  146467. __pyx_type_6uvloop_4loop_NameInfoRequest.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  146468. }
  146469. if (__Pyx_SetVtable(__pyx_type_6uvloop_4loop_NameInfoRequest.tp_dict, __pyx_vtabptr_6uvloop_4loop_NameInfoRequest) < 0) __PYX_ERR(7, 346, __pyx_L1_error)
  146470. if (PyObject_SetAttr(__pyx_m, __pyx_n_s_NameInfoRequest, (PyObject *)&__pyx_type_6uvloop_4loop_NameInfoRequest) < 0) __PYX_ERR(7, 346, __pyx_L1_error)
  146471. if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6uvloop_4loop_NameInfoRequest) < 0) __PYX_ERR(7, 346, __pyx_L1_error)
  146472. __pyx_ptype_6uvloop_4loop_NameInfoRequest = &__pyx_type_6uvloop_4loop_NameInfoRequest;
  146473. __pyx_vtabptr_6uvloop_4loop__UDPSendContext = &__pyx_vtable_6uvloop_4loop__UDPSendContext;
  146474. __pyx_vtable_6uvloop_4loop__UDPSendContext.close = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop__UDPSendContext *))__pyx_f_6uvloop_4loop_15_UDPSendContext_close;
  146475. __pyx_vtable_6uvloop_4loop__UDPSendContext.new = (struct __pyx_obj_6uvloop_4loop__UDPSendContext *(*)(struct __pyx_obj_6uvloop_4loop_UDPTransport *, PyObject *))__pyx_f_6uvloop_4loop_15_UDPSendContext_new;
  146476. if (PyType_Ready(&__pyx_type_6uvloop_4loop__UDPSendContext) < 0) __PYX_ERR(23, 3, __pyx_L1_error)
  146477. #if PY_VERSION_HEX < 0x030800B1
  146478. __pyx_type_6uvloop_4loop__UDPSendContext.tp_print = 0;
  146479. #endif
  146480. if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6uvloop_4loop__UDPSendContext.tp_dictoffset && __pyx_type_6uvloop_4loop__UDPSendContext.tp_getattro == PyObject_GenericGetAttr)) {
  146481. __pyx_type_6uvloop_4loop__UDPSendContext.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  146482. }
  146483. if (__Pyx_SetVtable(__pyx_type_6uvloop_4loop__UDPSendContext.tp_dict, __pyx_vtabptr_6uvloop_4loop__UDPSendContext) < 0) __PYX_ERR(23, 3, __pyx_L1_error)
  146484. if (PyObject_SetAttr(__pyx_m, __pyx_n_s_UDPSendContext, (PyObject *)&__pyx_type_6uvloop_4loop__UDPSendContext) < 0) __PYX_ERR(23, 3, __pyx_L1_error)
  146485. if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6uvloop_4loop__UDPSendContext) < 0) __PYX_ERR(23, 3, __pyx_L1_error)
  146486. __pyx_ptype_6uvloop_4loop__UDPSendContext = &__pyx_type_6uvloop_4loop__UDPSendContext;
  146487. if (PyType_Ready(&__pyx_type_6uvloop_4loop___pyx_scope_struct___getaddrinfo) < 0) __PYX_ERR(2, 830, __pyx_L1_error)
  146488. #if PY_VERSION_HEX < 0x030800B1
  146489. __pyx_type_6uvloop_4loop___pyx_scope_struct___getaddrinfo.tp_print = 0;
  146490. #endif
  146491. if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6uvloop_4loop___pyx_scope_struct___getaddrinfo.tp_dictoffset && __pyx_type_6uvloop_4loop___pyx_scope_struct___getaddrinfo.tp_getattro == PyObject_GenericGetAttr)) {
  146492. __pyx_type_6uvloop_4loop___pyx_scope_struct___getaddrinfo.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  146493. }
  146494. __pyx_ptype_6uvloop_4loop___pyx_scope_struct___getaddrinfo = &__pyx_type_6uvloop_4loop___pyx_scope_struct___getaddrinfo;
  146495. if (PyType_Ready(&__pyx_type_6uvloop_4loop___pyx_scope_struct_1__getnameinfo) < 0) __PYX_ERR(2, 870, __pyx_L1_error)
  146496. #if PY_VERSION_HEX < 0x030800B1
  146497. __pyx_type_6uvloop_4loop___pyx_scope_struct_1__getnameinfo.tp_print = 0;
  146498. #endif
  146499. if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6uvloop_4loop___pyx_scope_struct_1__getnameinfo.tp_dictoffset && __pyx_type_6uvloop_4loop___pyx_scope_struct_1__getnameinfo.tp_getattro == PyObject_GenericGetAttr)) {
  146500. __pyx_type_6uvloop_4loop___pyx_scope_struct_1__getnameinfo.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  146501. }
  146502. __pyx_ptype_6uvloop_4loop___pyx_scope_struct_1__getnameinfo = &__pyx_type_6uvloop_4loop___pyx_scope_struct_1__getnameinfo;
  146503. if (PyType_Ready(&__pyx_type_6uvloop_4loop___pyx_scope_struct_2__sock_connect) < 0) __PYX_ERR(2, 994, __pyx_L1_error)
  146504. #if PY_VERSION_HEX < 0x030800B1
  146505. __pyx_type_6uvloop_4loop___pyx_scope_struct_2__sock_connect.tp_print = 0;
  146506. #endif
  146507. if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6uvloop_4loop___pyx_scope_struct_2__sock_connect.tp_dictoffset && __pyx_type_6uvloop_4loop___pyx_scope_struct_2__sock_connect.tp_getattro == PyObject_GenericGetAttr)) {
  146508. __pyx_type_6uvloop_4loop___pyx_scope_struct_2__sock_connect.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  146509. }
  146510. __pyx_ptype_6uvloop_4loop___pyx_scope_struct_2__sock_connect = &__pyx_type_6uvloop_4loop___pyx_scope_struct_2__sock_connect;
  146511. if (PyType_Ready(&__pyx_type_6uvloop_4loop___pyx_scope_struct_3___get__) < 0) __PYX_ERR(2, 1188, __pyx_L1_error)
  146512. #if PY_VERSION_HEX < 0x030800B1
  146513. __pyx_type_6uvloop_4loop___pyx_scope_struct_3___get__.tp_print = 0;
  146514. #endif
  146515. if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6uvloop_4loop___pyx_scope_struct_3___get__.tp_dictoffset && __pyx_type_6uvloop_4loop___pyx_scope_struct_3___get__.tp_getattro == PyObject_GenericGetAttr)) {
  146516. __pyx_type_6uvloop_4loop___pyx_scope_struct_3___get__.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  146517. }
  146518. __pyx_ptype_6uvloop_4loop___pyx_scope_struct_3___get__ = &__pyx_type_6uvloop_4loop___pyx_scope_struct_3___get__;
  146519. if (PyType_Ready(&__pyx_type_6uvloop_4loop___pyx_scope_struct_4_run_until_complete) < 0) __PYX_ERR(2, 1380, __pyx_L1_error)
  146520. #if PY_VERSION_HEX < 0x030800B1
  146521. __pyx_type_6uvloop_4loop___pyx_scope_struct_4_run_until_complete.tp_print = 0;
  146522. #endif
  146523. if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6uvloop_4loop___pyx_scope_struct_4_run_until_complete.tp_dictoffset && __pyx_type_6uvloop_4loop___pyx_scope_struct_4_run_until_complete.tp_getattro == PyObject_GenericGetAttr)) {
  146524. __pyx_type_6uvloop_4loop___pyx_scope_struct_4_run_until_complete.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  146525. }
  146526. __pyx_ptype_6uvloop_4loop___pyx_scope_struct_4_run_until_complete = &__pyx_type_6uvloop_4loop___pyx_scope_struct_4_run_until_complete;
  146527. if (PyType_Ready(&__pyx_type_6uvloop_4loop___pyx_scope_struct_5_getaddrinfo) < 0) __PYX_ERR(2, 1420, __pyx_L1_error)
  146528. #if PY_VERSION_HEX < 0x030800B1
  146529. __pyx_type_6uvloop_4loop___pyx_scope_struct_5_getaddrinfo.tp_print = 0;
  146530. #endif
  146531. if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6uvloop_4loop___pyx_scope_struct_5_getaddrinfo.tp_dictoffset && __pyx_type_6uvloop_4loop___pyx_scope_struct_5_getaddrinfo.tp_getattro == PyObject_GenericGetAttr)) {
  146532. __pyx_type_6uvloop_4loop___pyx_scope_struct_5_getaddrinfo.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  146533. }
  146534. __pyx_ptype_6uvloop_4loop___pyx_scope_struct_5_getaddrinfo = &__pyx_type_6uvloop_4loop___pyx_scope_struct_5_getaddrinfo;
  146535. if (PyType_Ready(&__pyx_type_6uvloop_4loop___pyx_scope_struct_6_getnameinfo) < 0) __PYX_ERR(2, 1434, __pyx_L1_error)
  146536. #if PY_VERSION_HEX < 0x030800B1
  146537. __pyx_type_6uvloop_4loop___pyx_scope_struct_6_getnameinfo.tp_print = 0;
  146538. #endif
  146539. if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6uvloop_4loop___pyx_scope_struct_6_getnameinfo.tp_dictoffset && __pyx_type_6uvloop_4loop___pyx_scope_struct_6_getnameinfo.tp_getattro == PyObject_GenericGetAttr)) {
  146540. __pyx_type_6uvloop_4loop___pyx_scope_struct_6_getnameinfo.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  146541. }
  146542. __pyx_ptype_6uvloop_4loop___pyx_scope_struct_6_getnameinfo = &__pyx_type_6uvloop_4loop___pyx_scope_struct_6_getnameinfo;
  146543. if (PyType_Ready(&__pyx_type_6uvloop_4loop___pyx_scope_struct_7_start_tls) < 0) __PYX_ERR(2, 1492, __pyx_L1_error)
  146544. #if PY_VERSION_HEX < 0x030800B1
  146545. __pyx_type_6uvloop_4loop___pyx_scope_struct_7_start_tls.tp_print = 0;
  146546. #endif
  146547. if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6uvloop_4loop___pyx_scope_struct_7_start_tls.tp_dictoffset && __pyx_type_6uvloop_4loop___pyx_scope_struct_7_start_tls.tp_getattro == PyObject_GenericGetAttr)) {
  146548. __pyx_type_6uvloop_4loop___pyx_scope_struct_7_start_tls.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  146549. }
  146550. __pyx_ptype_6uvloop_4loop___pyx_scope_struct_7_start_tls = &__pyx_type_6uvloop_4loop___pyx_scope_struct_7_start_tls;
  146551. if (PyType_Ready(&__pyx_type_6uvloop_4loop___pyx_scope_struct_8_create_server) < 0) __PYX_ERR(2, 1540, __pyx_L1_error)
  146552. #if PY_VERSION_HEX < 0x030800B1
  146553. __pyx_type_6uvloop_4loop___pyx_scope_struct_8_create_server.tp_print = 0;
  146554. #endif
  146555. if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6uvloop_4loop___pyx_scope_struct_8_create_server.tp_dictoffset && __pyx_type_6uvloop_4loop___pyx_scope_struct_8_create_server.tp_getattro == PyObject_GenericGetAttr)) {
  146556. __pyx_type_6uvloop_4loop___pyx_scope_struct_8_create_server.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  146557. }
  146558. __pyx_ptype_6uvloop_4loop___pyx_scope_struct_8_create_server = &__pyx_type_6uvloop_4loop___pyx_scope_struct_8_create_server;
  146559. if (PyType_Ready(&__pyx_type_6uvloop_4loop___pyx_scope_struct_9_create_connection) < 0) __PYX_ERR(2, 1746, __pyx_L1_error)
  146560. #if PY_VERSION_HEX < 0x030800B1
  146561. __pyx_type_6uvloop_4loop___pyx_scope_struct_9_create_connection.tp_print = 0;
  146562. #endif
  146563. if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6uvloop_4loop___pyx_scope_struct_9_create_connection.tp_dictoffset && __pyx_type_6uvloop_4loop___pyx_scope_struct_9_create_connection.tp_getattro == PyObject_GenericGetAttr)) {
  146564. __pyx_type_6uvloop_4loop___pyx_scope_struct_9_create_connection.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  146565. }
  146566. __pyx_ptype_6uvloop_4loop___pyx_scope_struct_9_create_connection = &__pyx_type_6uvloop_4loop___pyx_scope_struct_9_create_connection;
  146567. if (PyType_Ready(&__pyx_type_6uvloop_4loop___pyx_scope_struct_10_genexpr) < 0) __PYX_ERR(2, 1926, __pyx_L1_error)
  146568. #if PY_VERSION_HEX < 0x030800B1
  146569. __pyx_type_6uvloop_4loop___pyx_scope_struct_10_genexpr.tp_print = 0;
  146570. #endif
  146571. if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6uvloop_4loop___pyx_scope_struct_10_genexpr.tp_dictoffset && __pyx_type_6uvloop_4loop___pyx_scope_struct_10_genexpr.tp_getattro == PyObject_GenericGetAttr)) {
  146572. __pyx_type_6uvloop_4loop___pyx_scope_struct_10_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  146573. }
  146574. __pyx_ptype_6uvloop_4loop___pyx_scope_struct_10_genexpr = &__pyx_type_6uvloop_4loop___pyx_scope_struct_10_genexpr;
  146575. if (PyType_Ready(&__pyx_type_6uvloop_4loop___pyx_scope_struct_11_genexpr) < 0) __PYX_ERR(2, 1931, __pyx_L1_error)
  146576. #if PY_VERSION_HEX < 0x030800B1
  146577. __pyx_type_6uvloop_4loop___pyx_scope_struct_11_genexpr.tp_print = 0;
  146578. #endif
  146579. if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6uvloop_4loop___pyx_scope_struct_11_genexpr.tp_dictoffset && __pyx_type_6uvloop_4loop___pyx_scope_struct_11_genexpr.tp_getattro == PyObject_GenericGetAttr)) {
  146580. __pyx_type_6uvloop_4loop___pyx_scope_struct_11_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  146581. }
  146582. __pyx_ptype_6uvloop_4loop___pyx_scope_struct_11_genexpr = &__pyx_type_6uvloop_4loop___pyx_scope_struct_11_genexpr;
  146583. if (PyType_Ready(&__pyx_type_6uvloop_4loop___pyx_scope_struct_12_create_unix_server) < 0) __PYX_ERR(2, 1974, __pyx_L1_error)
  146584. #if PY_VERSION_HEX < 0x030800B1
  146585. __pyx_type_6uvloop_4loop___pyx_scope_struct_12_create_unix_server.tp_print = 0;
  146586. #endif
  146587. if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6uvloop_4loop___pyx_scope_struct_12_create_unix_server.tp_dictoffset && __pyx_type_6uvloop_4loop___pyx_scope_struct_12_create_unix_server.tp_getattro == PyObject_GenericGetAttr)) {
  146588. __pyx_type_6uvloop_4loop___pyx_scope_struct_12_create_unix_server.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  146589. }
  146590. __pyx_ptype_6uvloop_4loop___pyx_scope_struct_12_create_unix_server = &__pyx_type_6uvloop_4loop___pyx_scope_struct_12_create_unix_server;
  146591. if (PyType_Ready(&__pyx_type_6uvloop_4loop___pyx_scope_struct_13_create_unix_connection) < 0) __PYX_ERR(2, 2105, __pyx_L1_error)
  146592. #if PY_VERSION_HEX < 0x030800B1
  146593. __pyx_type_6uvloop_4loop___pyx_scope_struct_13_create_unix_connection.tp_print = 0;
  146594. #endif
  146595. if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6uvloop_4loop___pyx_scope_struct_13_create_unix_connection.tp_dictoffset && __pyx_type_6uvloop_4loop___pyx_scope_struct_13_create_unix_connection.tp_getattro == PyObject_GenericGetAttr)) {
  146596. __pyx_type_6uvloop_4loop___pyx_scope_struct_13_create_unix_connection.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  146597. }
  146598. __pyx_ptype_6uvloop_4loop___pyx_scope_struct_13_create_unix_connection = &__pyx_type_6uvloop_4loop___pyx_scope_struct_13_create_unix_connection;
  146599. if (PyType_Ready(&__pyx_type_6uvloop_4loop___pyx_scope_struct_14_sock_recv) < 0) __PYX_ERR(2, 2337, __pyx_L1_error)
  146600. #if PY_VERSION_HEX < 0x030800B1
  146601. __pyx_type_6uvloop_4loop___pyx_scope_struct_14_sock_recv.tp_print = 0;
  146602. #endif
  146603. if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6uvloop_4loop___pyx_scope_struct_14_sock_recv.tp_dictoffset && __pyx_type_6uvloop_4loop___pyx_scope_struct_14_sock_recv.tp_getattro == PyObject_GenericGetAttr)) {
  146604. __pyx_type_6uvloop_4loop___pyx_scope_struct_14_sock_recv.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  146605. }
  146606. __pyx_ptype_6uvloop_4loop___pyx_scope_struct_14_sock_recv = &__pyx_type_6uvloop_4loop___pyx_scope_struct_14_sock_recv;
  146607. if (PyType_Ready(&__pyx_type_6uvloop_4loop___pyx_scope_struct_15_sock_recv_into) < 0) __PYX_ERR(2, 2364, __pyx_L1_error)
  146608. #if PY_VERSION_HEX < 0x030800B1
  146609. __pyx_type_6uvloop_4loop___pyx_scope_struct_15_sock_recv_into.tp_print = 0;
  146610. #endif
  146611. if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6uvloop_4loop___pyx_scope_struct_15_sock_recv_into.tp_dictoffset && __pyx_type_6uvloop_4loop___pyx_scope_struct_15_sock_recv_into.tp_getattro == PyObject_GenericGetAttr)) {
  146612. __pyx_type_6uvloop_4loop___pyx_scope_struct_15_sock_recv_into.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  146613. }
  146614. __pyx_ptype_6uvloop_4loop___pyx_scope_struct_15_sock_recv_into = &__pyx_type_6uvloop_4loop___pyx_scope_struct_15_sock_recv_into;
  146615. if (PyType_Ready(&__pyx_type_6uvloop_4loop___pyx_scope_struct_16_sock_sendall) < 0) __PYX_ERR(2, 2390, __pyx_L1_error)
  146616. #if PY_VERSION_HEX < 0x030800B1
  146617. __pyx_type_6uvloop_4loop___pyx_scope_struct_16_sock_sendall.tp_print = 0;
  146618. #endif
  146619. if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6uvloop_4loop___pyx_scope_struct_16_sock_sendall.tp_dictoffset && __pyx_type_6uvloop_4loop___pyx_scope_struct_16_sock_sendall.tp_getattro == PyObject_GenericGetAttr)) {
  146620. __pyx_type_6uvloop_4loop___pyx_scope_struct_16_sock_sendall.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  146621. }
  146622. __pyx_ptype_6uvloop_4loop___pyx_scope_struct_16_sock_sendall = &__pyx_type_6uvloop_4loop___pyx_scope_struct_16_sock_sendall;
  146623. if (PyType_Ready(&__pyx_type_6uvloop_4loop___pyx_scope_struct_17_sock_accept) < 0) __PYX_ERR(2, 2443, __pyx_L1_error)
  146624. #if PY_VERSION_HEX < 0x030800B1
  146625. __pyx_type_6uvloop_4loop___pyx_scope_struct_17_sock_accept.tp_print = 0;
  146626. #endif
  146627. if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6uvloop_4loop___pyx_scope_struct_17_sock_accept.tp_dictoffset && __pyx_type_6uvloop_4loop___pyx_scope_struct_17_sock_accept.tp_getattro == PyObject_GenericGetAttr)) {
  146628. __pyx_type_6uvloop_4loop___pyx_scope_struct_17_sock_accept.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  146629. }
  146630. __pyx_ptype_6uvloop_4loop___pyx_scope_struct_17_sock_accept = &__pyx_type_6uvloop_4loop___pyx_scope_struct_17_sock_accept;
  146631. if (PyType_Ready(&__pyx_type_6uvloop_4loop___pyx_scope_struct_18_sock_connect) < 0) __PYX_ERR(2, 2471, __pyx_L1_error)
  146632. #if PY_VERSION_HEX < 0x030800B1
  146633. __pyx_type_6uvloop_4loop___pyx_scope_struct_18_sock_connect.tp_print = 0;
  146634. #endif
  146635. if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6uvloop_4loop___pyx_scope_struct_18_sock_connect.tp_dictoffset && __pyx_type_6uvloop_4loop___pyx_scope_struct_18_sock_connect.tp_getattro == PyObject_GenericGetAttr)) {
  146636. __pyx_type_6uvloop_4loop___pyx_scope_struct_18_sock_connect.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  146637. }
  146638. __pyx_ptype_6uvloop_4loop___pyx_scope_struct_18_sock_connect = &__pyx_type_6uvloop_4loop___pyx_scope_struct_18_sock_connect;
  146639. if (PyType_Ready(&__pyx_type_6uvloop_4loop___pyx_scope_struct_19_connect_accepted_socket) < 0) __PYX_ERR(2, 2495, __pyx_L1_error)
  146640. #if PY_VERSION_HEX < 0x030800B1
  146641. __pyx_type_6uvloop_4loop___pyx_scope_struct_19_connect_accepted_socket.tp_print = 0;
  146642. #endif
  146643. if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6uvloop_4loop___pyx_scope_struct_19_connect_accepted_socket.tp_dictoffset && __pyx_type_6uvloop_4loop___pyx_scope_struct_19_connect_accepted_socket.tp_getattro == PyObject_GenericGetAttr)) {
  146644. __pyx_type_6uvloop_4loop___pyx_scope_struct_19_connect_accepted_socket.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  146645. }
  146646. __pyx_ptype_6uvloop_4loop___pyx_scope_struct_19_connect_accepted_socket = &__pyx_type_6uvloop_4loop___pyx_scope_struct_19_connect_accepted_socket;
  146647. if (PyType_Ready(&__pyx_type_6uvloop_4loop___pyx_scope_struct_20___subprocess_run) < 0) __PYX_ERR(2, 2591, __pyx_L1_error)
  146648. #if PY_VERSION_HEX < 0x030800B1
  146649. __pyx_type_6uvloop_4loop___pyx_scope_struct_20___subprocess_run.tp_print = 0;
  146650. #endif
  146651. if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6uvloop_4loop___pyx_scope_struct_20___subprocess_run.tp_dictoffset && __pyx_type_6uvloop_4loop___pyx_scope_struct_20___subprocess_run.tp_getattro == PyObject_GenericGetAttr)) {
  146652. __pyx_type_6uvloop_4loop___pyx_scope_struct_20___subprocess_run.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  146653. }
  146654. __pyx_ptype_6uvloop_4loop___pyx_scope_struct_20___subprocess_run = &__pyx_type_6uvloop_4loop___pyx_scope_struct_20___subprocess_run;
  146655. if (PyType_Ready(&__pyx_type_6uvloop_4loop___pyx_scope_struct_21_subprocess_shell) < 0) __PYX_ERR(2, 2651, __pyx_L1_error)
  146656. #if PY_VERSION_HEX < 0x030800B1
  146657. __pyx_type_6uvloop_4loop___pyx_scope_struct_21_subprocess_shell.tp_print = 0;
  146658. #endif
  146659. if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6uvloop_4loop___pyx_scope_struct_21_subprocess_shell.tp_dictoffset && __pyx_type_6uvloop_4loop___pyx_scope_struct_21_subprocess_shell.tp_getattro == PyObject_GenericGetAttr)) {
  146660. __pyx_type_6uvloop_4loop___pyx_scope_struct_21_subprocess_shell.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  146661. }
  146662. __pyx_ptype_6uvloop_4loop___pyx_scope_struct_21_subprocess_shell = &__pyx_type_6uvloop_4loop___pyx_scope_struct_21_subprocess_shell;
  146663. if (PyType_Ready(&__pyx_type_6uvloop_4loop___pyx_scope_struct_22_subprocess_exec) < 0) __PYX_ERR(2, 2666, __pyx_L1_error)
  146664. #if PY_VERSION_HEX < 0x030800B1
  146665. __pyx_type_6uvloop_4loop___pyx_scope_struct_22_subprocess_exec.tp_print = 0;
  146666. #endif
  146667. if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6uvloop_4loop___pyx_scope_struct_22_subprocess_exec.tp_dictoffset && __pyx_type_6uvloop_4loop___pyx_scope_struct_22_subprocess_exec.tp_getattro == PyObject_GenericGetAttr)) {
  146668. __pyx_type_6uvloop_4loop___pyx_scope_struct_22_subprocess_exec.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  146669. }
  146670. __pyx_ptype_6uvloop_4loop___pyx_scope_struct_22_subprocess_exec = &__pyx_type_6uvloop_4loop___pyx_scope_struct_22_subprocess_exec;
  146671. if (PyType_Ready(&__pyx_type_6uvloop_4loop___pyx_scope_struct_23_connect_read_pipe) < 0) __PYX_ERR(2, 2678, __pyx_L1_error)
  146672. #if PY_VERSION_HEX < 0x030800B1
  146673. __pyx_type_6uvloop_4loop___pyx_scope_struct_23_connect_read_pipe.tp_print = 0;
  146674. #endif
  146675. if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6uvloop_4loop___pyx_scope_struct_23_connect_read_pipe.tp_dictoffset && __pyx_type_6uvloop_4loop___pyx_scope_struct_23_connect_read_pipe.tp_getattro == PyObject_GenericGetAttr)) {
  146676. __pyx_type_6uvloop_4loop___pyx_scope_struct_23_connect_read_pipe.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  146677. }
  146678. __pyx_ptype_6uvloop_4loop___pyx_scope_struct_23_connect_read_pipe = &__pyx_type_6uvloop_4loop___pyx_scope_struct_23_connect_read_pipe;
  146679. if (PyType_Ready(&__pyx_type_6uvloop_4loop___pyx_scope_struct_24_connect_write_pipe) < 0) __PYX_ERR(2, 2703, __pyx_L1_error)
  146680. #if PY_VERSION_HEX < 0x030800B1
  146681. __pyx_type_6uvloop_4loop___pyx_scope_struct_24_connect_write_pipe.tp_print = 0;
  146682. #endif
  146683. if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6uvloop_4loop___pyx_scope_struct_24_connect_write_pipe.tp_dictoffset && __pyx_type_6uvloop_4loop___pyx_scope_struct_24_connect_write_pipe.tp_getattro == PyObject_GenericGetAttr)) {
  146684. __pyx_type_6uvloop_4loop___pyx_scope_struct_24_connect_write_pipe.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  146685. }
  146686. __pyx_ptype_6uvloop_4loop___pyx_scope_struct_24_connect_write_pipe = &__pyx_type_6uvloop_4loop___pyx_scope_struct_24_connect_write_pipe;
  146687. if (PyType_Ready(&__pyx_type_6uvloop_4loop___pyx_scope_struct_25_create_datagram_endpoint) < 0) __PYX_ERR(2, 2837, __pyx_L1_error)
  146688. #if PY_VERSION_HEX < 0x030800B1
  146689. __pyx_type_6uvloop_4loop___pyx_scope_struct_25_create_datagram_endpoint.tp_print = 0;
  146690. #endif
  146691. if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6uvloop_4loop___pyx_scope_struct_25_create_datagram_endpoint.tp_dictoffset && __pyx_type_6uvloop_4loop___pyx_scope_struct_25_create_datagram_endpoint.tp_getattro == PyObject_GenericGetAttr)) {
  146692. __pyx_type_6uvloop_4loop___pyx_scope_struct_25_create_datagram_endpoint.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  146693. }
  146694. __pyx_ptype_6uvloop_4loop___pyx_scope_struct_25_create_datagram_endpoint = &__pyx_type_6uvloop_4loop___pyx_scope_struct_25_create_datagram_endpoint;
  146695. if (PyType_Ready(&__pyx_type_6uvloop_4loop___pyx_scope_struct_26_genexpr) < 0) __PYX_ERR(2, 2888, __pyx_L1_error)
  146696. #if PY_VERSION_HEX < 0x030800B1
  146697. __pyx_type_6uvloop_4loop___pyx_scope_struct_26_genexpr.tp_print = 0;
  146698. #endif
  146699. if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6uvloop_4loop___pyx_scope_struct_26_genexpr.tp_dictoffset && __pyx_type_6uvloop_4loop___pyx_scope_struct_26_genexpr.tp_getattro == PyObject_GenericGetAttr)) {
  146700. __pyx_type_6uvloop_4loop___pyx_scope_struct_26_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  146701. }
  146702. __pyx_ptype_6uvloop_4loop___pyx_scope_struct_26_genexpr = &__pyx_type_6uvloop_4loop___pyx_scope_struct_26_genexpr;
  146703. if (PyType_Ready(&__pyx_type_6uvloop_4loop___pyx_scope_struct_27_shutdown_asyncgens) < 0) __PYX_ERR(2, 3010, __pyx_L1_error)
  146704. #if PY_VERSION_HEX < 0x030800B1
  146705. __pyx_type_6uvloop_4loop___pyx_scope_struct_27_shutdown_asyncgens.tp_print = 0;
  146706. #endif
  146707. if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6uvloop_4loop___pyx_scope_struct_27_shutdown_asyncgens.tp_dictoffset && __pyx_type_6uvloop_4loop___pyx_scope_struct_27_shutdown_asyncgens.tp_getattro == PyObject_GenericGetAttr)) {
  146708. __pyx_type_6uvloop_4loop___pyx_scope_struct_27_shutdown_asyncgens.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  146709. }
  146710. __pyx_ptype_6uvloop_4loop___pyx_scope_struct_27_shutdown_asyncgens = &__pyx_type_6uvloop_4loop___pyx_scope_struct_27_shutdown_asyncgens;
  146711. if (PyType_Ready(&__pyx_type_6uvloop_4loop___pyx_scope_struct_28__start_handshake) < 0) __PYX_ERR(22, 447, __pyx_L1_error)
  146712. #if PY_VERSION_HEX < 0x030800B1
  146713. __pyx_type_6uvloop_4loop___pyx_scope_struct_28__start_handshake.tp_print = 0;
  146714. #endif
  146715. if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6uvloop_4loop___pyx_scope_struct_28__start_handshake.tp_dictoffset && __pyx_type_6uvloop_4loop___pyx_scope_struct_28__start_handshake.tp_getattro == PyObject_GenericGetAttr)) {
  146716. __pyx_type_6uvloop_4loop___pyx_scope_struct_28__start_handshake.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  146717. }
  146718. __pyx_ptype_6uvloop_4loop___pyx_scope_struct_28__start_handshake = &__pyx_type_6uvloop_4loop___pyx_scope_struct_28__start_handshake;
  146719. if (PyType_Ready(&__pyx_type_6uvloop_4loop___pyx_scope_struct_29__start_shutdown) < 0) __PYX_ERR(22, 528, __pyx_L1_error)
  146720. #if PY_VERSION_HEX < 0x030800B1
  146721. __pyx_type_6uvloop_4loop___pyx_scope_struct_29__start_shutdown.tp_print = 0;
  146722. #endif
  146723. if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6uvloop_4loop___pyx_scope_struct_29__start_shutdown.tp_dictoffset && __pyx_type_6uvloop_4loop___pyx_scope_struct_29__start_shutdown.tp_getattro == PyObject_GenericGetAttr)) {
  146724. __pyx_type_6uvloop_4loop___pyx_scope_struct_29__start_shutdown.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  146725. }
  146726. __pyx_ptype_6uvloop_4loop___pyx_scope_struct_29__start_shutdown = &__pyx_type_6uvloop_4loop___pyx_scope_struct_29__start_shutdown;
  146727. if (PyType_Ready(&__pyx_type_6uvloop_4loop___pyx_scope_struct_30__do_read__buffered) < 0) __PYX_ERR(22, 662, __pyx_L1_error)
  146728. #if PY_VERSION_HEX < 0x030800B1
  146729. __pyx_type_6uvloop_4loop___pyx_scope_struct_30__do_read__buffered.tp_print = 0;
  146730. #endif
  146731. if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6uvloop_4loop___pyx_scope_struct_30__do_read__buffered.tp_dictoffset && __pyx_type_6uvloop_4loop___pyx_scope_struct_30__do_read__buffered.tp_getattro == PyObject_GenericGetAttr)) {
  146732. __pyx_type_6uvloop_4loop___pyx_scope_struct_30__do_read__buffered.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  146733. }
  146734. __pyx_ptype_6uvloop_4loop___pyx_scope_struct_30__do_read__buffered = &__pyx_type_6uvloop_4loop___pyx_scope_struct_30__do_read__buffered;
  146735. if (PyType_Ready(&__pyx_type_6uvloop_4loop___pyx_scope_struct_31__resume_reading) < 0) __PYX_ERR(22, 788, __pyx_L1_error)
  146736. #if PY_VERSION_HEX < 0x030800B1
  146737. __pyx_type_6uvloop_4loop___pyx_scope_struct_31__resume_reading.tp_print = 0;
  146738. #endif
  146739. if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6uvloop_4loop___pyx_scope_struct_31__resume_reading.tp_dictoffset && __pyx_type_6uvloop_4loop___pyx_scope_struct_31__resume_reading.tp_getattro == PyObject_GenericGetAttr)) {
  146740. __pyx_type_6uvloop_4loop___pyx_scope_struct_31__resume_reading.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  146741. }
  146742. __pyx_ptype_6uvloop_4loop___pyx_scope_struct_31__resume_reading = &__pyx_type_6uvloop_4loop___pyx_scope_struct_31__resume_reading;
  146743. if (PyType_Ready(&__pyx_type_6uvloop_4loop___pyx_scope_struct_32___aenter__) < 0) __PYX_ERR(24, 52, __pyx_L1_error)
  146744. #if PY_VERSION_HEX < 0x030800B1
  146745. __pyx_type_6uvloop_4loop___pyx_scope_struct_32___aenter__.tp_print = 0;
  146746. #endif
  146747. if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6uvloop_4loop___pyx_scope_struct_32___aenter__.tp_dictoffset && __pyx_type_6uvloop_4loop___pyx_scope_struct_32___aenter__.tp_getattro == PyObject_GenericGetAttr)) {
  146748. __pyx_type_6uvloop_4loop___pyx_scope_struct_32___aenter__.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  146749. }
  146750. __pyx_ptype_6uvloop_4loop___pyx_scope_struct_32___aenter__ = &__pyx_type_6uvloop_4loop___pyx_scope_struct_32___aenter__;
  146751. if (PyType_Ready(&__pyx_type_6uvloop_4loop___pyx_scope_struct_33___aexit__) < 0) __PYX_ERR(24, 56, __pyx_L1_error)
  146752. #if PY_VERSION_HEX < 0x030800B1
  146753. __pyx_type_6uvloop_4loop___pyx_scope_struct_33___aexit__.tp_print = 0;
  146754. #endif
  146755. if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6uvloop_4loop___pyx_scope_struct_33___aexit__.tp_dictoffset && __pyx_type_6uvloop_4loop___pyx_scope_struct_33___aexit__.tp_getattro == PyObject_GenericGetAttr)) {
  146756. __pyx_type_6uvloop_4loop___pyx_scope_struct_33___aexit__.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  146757. }
  146758. __pyx_ptype_6uvloop_4loop___pyx_scope_struct_33___aexit__ = &__pyx_type_6uvloop_4loop___pyx_scope_struct_33___aexit__;
  146759. if (PyType_Ready(&__pyx_type_6uvloop_4loop___pyx_scope_struct_34_wait_closed) < 0) __PYX_ERR(24, 67, __pyx_L1_error)
  146760. #if PY_VERSION_HEX < 0x030800B1
  146761. __pyx_type_6uvloop_4loop___pyx_scope_struct_34_wait_closed.tp_print = 0;
  146762. #endif
  146763. if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6uvloop_4loop___pyx_scope_struct_34_wait_closed.tp_dictoffset && __pyx_type_6uvloop_4loop___pyx_scope_struct_34_wait_closed.tp_getattro == PyObject_GenericGetAttr)) {
  146764. __pyx_type_6uvloop_4loop___pyx_scope_struct_34_wait_closed.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  146765. }
  146766. __pyx_ptype_6uvloop_4loop___pyx_scope_struct_34_wait_closed = &__pyx_type_6uvloop_4loop___pyx_scope_struct_34_wait_closed;
  146767. if (PyType_Ready(&__pyx_type_6uvloop_4loop___pyx_scope_struct_35_start_serving) < 0) __PYX_ERR(24, 100, __pyx_L1_error)
  146768. #if PY_VERSION_HEX < 0x030800B1
  146769. __pyx_type_6uvloop_4loop___pyx_scope_struct_35_start_serving.tp_print = 0;
  146770. #endif
  146771. if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6uvloop_4loop___pyx_scope_struct_35_start_serving.tp_dictoffset && __pyx_type_6uvloop_4loop___pyx_scope_struct_35_start_serving.tp_getattro == PyObject_GenericGetAttr)) {
  146772. __pyx_type_6uvloop_4loop___pyx_scope_struct_35_start_serving.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  146773. }
  146774. __pyx_ptype_6uvloop_4loop___pyx_scope_struct_35_start_serving = &__pyx_type_6uvloop_4loop___pyx_scope_struct_35_start_serving;
  146775. if (PyType_Ready(&__pyx_type_6uvloop_4loop___pyx_scope_struct_36_serve_forever) < 0) __PYX_ERR(24, 104, __pyx_L1_error)
  146776. #if PY_VERSION_HEX < 0x030800B1
  146777. __pyx_type_6uvloop_4loop___pyx_scope_struct_36_serve_forever.tp_print = 0;
  146778. #endif
  146779. if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6uvloop_4loop___pyx_scope_struct_36_serve_forever.tp_dictoffset && __pyx_type_6uvloop_4loop___pyx_scope_struct_36_serve_forever.tp_getattro == PyObject_GenericGetAttr)) {
  146780. __pyx_type_6uvloop_4loop___pyx_scope_struct_36_serve_forever.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  146781. }
  146782. __pyx_ptype_6uvloop_4loop___pyx_scope_struct_36_serve_forever = &__pyx_type_6uvloop_4loop___pyx_scope_struct_36_serve_forever;
  146783. if (PyType_Ready(&__pyx_type_6uvloop_4loop___pyx_scope_struct_37__test_coroutine_1) < 0) __PYX_ERR(2, 3182, __pyx_L1_error)
  146784. #if PY_VERSION_HEX < 0x030800B1
  146785. __pyx_type_6uvloop_4loop___pyx_scope_struct_37__test_coroutine_1.tp_print = 0;
  146786. #endif
  146787. if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6uvloop_4loop___pyx_scope_struct_37__test_coroutine_1.tp_dictoffset && __pyx_type_6uvloop_4loop___pyx_scope_struct_37__test_coroutine_1.tp_getattro == PyObject_GenericGetAttr)) {
  146788. __pyx_type_6uvloop_4loop___pyx_scope_struct_37__test_coroutine_1.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  146789. }
  146790. __pyx_ptype_6uvloop_4loop___pyx_scope_struct_37__test_coroutine_1 = &__pyx_type_6uvloop_4loop___pyx_scope_struct_37__test_coroutine_1;
  146791. if (PyType_Ready(&__pyx_scope_struct____Pyx_CFunc_object____Loop____bint___to_py) < 0) __PYX_ERR(9, 64, __pyx_L1_error)
  146792. #if PY_VERSION_HEX < 0x030800B1
  146793. __pyx_scope_struct____Pyx_CFunc_object____Loop____bint___to_py.tp_print = 0;
  146794. #endif
  146795. if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_scope_struct____Pyx_CFunc_object____Loop____bint___to_py.tp_dictoffset && __pyx_scope_struct____Pyx_CFunc_object____Loop____bint___to_py.tp_getattro == PyObject_GenericGetAttr)) {
  146796. __pyx_scope_struct____Pyx_CFunc_object____Loop____bint___to_py.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  146797. }
  146798. __pyx_ptype___pyx_scope_struct____Pyx_CFunc_object____Loop____bint___to_py = &__pyx_scope_struct____Pyx_CFunc_object____Loop____bint___to_py;
  146799. __Pyx_RefNannyFinishContext();
  146800. return 0;
  146801. __pyx_L1_error:;
  146802. __Pyx_RefNannyFinishContext();
  146803. return -1;
  146804. }
  146805. static int __Pyx_modinit_type_import_code(void) {
  146806. __Pyx_RefNannyDeclarations
  146807. PyObject *__pyx_t_1 = NULL;
  146808. __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
  146809. /*--- Type import code ---*/
  146810. __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(26, 9, __pyx_L1_error)
  146811. __Pyx_GOTREF(__pyx_t_1);
  146812. __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type",
  146813. #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  146814. sizeof(PyTypeObject),
  146815. #else
  146816. sizeof(PyHeapTypeObject),
  146817. #endif
  146818. __Pyx_ImportType_CheckSize_Warn);
  146819. if (!__pyx_ptype_7cpython_4type_type) __PYX_ERR(26, 9, __pyx_L1_error)
  146820. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  146821. __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(27, 8, __pyx_L1_error)
  146822. __Pyx_GOTREF(__pyx_t_1);
  146823. __pyx_ptype_7cpython_4bool_bool = __Pyx_ImportType(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "bool", sizeof(PyBoolObject), __Pyx_ImportType_CheckSize_Warn);
  146824. if (!__pyx_ptype_7cpython_4bool_bool) __PYX_ERR(27, 8, __pyx_L1_error)
  146825. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  146826. __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(28, 15, __pyx_L1_error)
  146827. __Pyx_GOTREF(__pyx_t_1);
  146828. __pyx_ptype_7cpython_7complex_complex = __Pyx_ImportType(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "complex", sizeof(PyComplexObject), __Pyx_ImportType_CheckSize_Warn);
  146829. if (!__pyx_ptype_7cpython_7complex_complex) __PYX_ERR(28, 15, __pyx_L1_error)
  146830. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  146831. __Pyx_RefNannyFinishContext();
  146832. return 0;
  146833. __pyx_L1_error:;
  146834. __Pyx_XDECREF(__pyx_t_1);
  146835. __Pyx_RefNannyFinishContext();
  146836. return -1;
  146837. }
  146838. static int __Pyx_modinit_variable_import_code(void) {
  146839. __Pyx_RefNannyDeclarations
  146840. __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
  146841. /*--- Variable import code ---*/
  146842. __Pyx_RefNannyFinishContext();
  146843. return 0;
  146844. }
  146845. static int __Pyx_modinit_function_import_code(void) {
  146846. __Pyx_RefNannyDeclarations
  146847. __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
  146848. /*--- Function import code ---*/
  146849. __Pyx_RefNannyFinishContext();
  146850. return 0;
  146851. }
  146852. #if PY_MAJOR_VERSION < 3
  146853. #ifdef CYTHON_NO_PYINIT_EXPORT
  146854. #define __Pyx_PyMODINIT_FUNC void
  146855. #else
  146856. #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
  146857. #endif
  146858. #else
  146859. #ifdef CYTHON_NO_PYINIT_EXPORT
  146860. #define __Pyx_PyMODINIT_FUNC PyObject *
  146861. #else
  146862. #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
  146863. #endif
  146864. #endif
  146865. #if PY_MAJOR_VERSION < 3
  146866. __Pyx_PyMODINIT_FUNC initloop(void) CYTHON_SMALL_CODE; /*proto*/
  146867. __Pyx_PyMODINIT_FUNC initloop(void)
  146868. #else
  146869. __Pyx_PyMODINIT_FUNC PyInit_loop(void) CYTHON_SMALL_CODE; /*proto*/
  146870. __Pyx_PyMODINIT_FUNC PyInit_loop(void)
  146871. #if CYTHON_PEP489_MULTI_PHASE_INIT
  146872. {
  146873. return PyModuleDef_Init(&__pyx_moduledef);
  146874. }
  146875. static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
  146876. #if PY_VERSION_HEX >= 0x030700A1
  146877. static PY_INT64_T main_interpreter_id = -1;
  146878. PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
  146879. if (main_interpreter_id == -1) {
  146880. main_interpreter_id = current_id;
  146881. return (unlikely(current_id == -1)) ? -1 : 0;
  146882. } else if (unlikely(main_interpreter_id != current_id))
  146883. #else
  146884. static PyInterpreterState *main_interpreter = NULL;
  146885. PyInterpreterState *current_interpreter = PyThreadState_Get()->interp;
  146886. if (!main_interpreter) {
  146887. main_interpreter = current_interpreter;
  146888. } else if (unlikely(main_interpreter != current_interpreter))
  146889. #endif
  146890. {
  146891. PyErr_SetString(
  146892. PyExc_ImportError,
  146893. "Interpreter change detected - this module can only be loaded into one interpreter per process.");
  146894. return -1;
  146895. }
  146896. return 0;
  146897. }
  146898. static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) {
  146899. PyObject *value = PyObject_GetAttrString(spec, from_name);
  146900. int result = 0;
  146901. if (likely(value)) {
  146902. if (allow_none || value != Py_None) {
  146903. result = PyDict_SetItemString(moddict, to_name, value);
  146904. }
  146905. Py_DECREF(value);
  146906. } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
  146907. PyErr_Clear();
  146908. } else {
  146909. result = -1;
  146910. }
  146911. return result;
  146912. }
  146913. static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) {
  146914. PyObject *module = NULL, *moddict, *modname;
  146915. if (__Pyx_check_single_interpreter())
  146916. return NULL;
  146917. if (__pyx_m)
  146918. return __Pyx_NewRef(__pyx_m);
  146919. modname = PyObject_GetAttrString(spec, "name");
  146920. if (unlikely(!modname)) goto bad;
  146921. module = PyModule_NewObject(modname);
  146922. Py_DECREF(modname);
  146923. if (unlikely(!module)) goto bad;
  146924. moddict = PyModule_GetDict(module);
  146925. if (unlikely(!moddict)) goto bad;
  146926. if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad;
  146927. if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad;
  146928. if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad;
  146929. if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad;
  146930. return module;
  146931. bad:
  146932. Py_XDECREF(module);
  146933. return NULL;
  146934. }
  146935. static CYTHON_SMALL_CODE int __pyx_pymod_exec_loop(PyObject *__pyx_pyinit_module)
  146936. #endif
  146937. #endif
  146938. {
  146939. PyObject *__pyx_t_1 = NULL;
  146940. PyObject *__pyx_t_2 = NULL;
  146941. int __pyx_t_3;
  146942. int __pyx_t_4;
  146943. PyObject *__pyx_t_5 = NULL;
  146944. int64_t __pyx_t_6;
  146945. PyObject *__pyx_t_7 = NULL;
  146946. __Pyx_RefNannyDeclarations
  146947. #if CYTHON_PEP489_MULTI_PHASE_INIT
  146948. if (__pyx_m) {
  146949. if (__pyx_m == __pyx_pyinit_module) return 0;
  146950. PyErr_SetString(PyExc_RuntimeError, "Module 'loop' has already been imported. Re-initialisation is not supported.");
  146951. return -1;
  146952. }
  146953. #elif PY_MAJOR_VERSION >= 3
  146954. if (__pyx_m) return __Pyx_NewRef(__pyx_m);
  146955. #endif
  146956. #if CYTHON_REFNANNY
  146957. __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
  146958. if (!__Pyx_RefNanny) {
  146959. PyErr_Clear();
  146960. __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
  146961. if (!__Pyx_RefNanny)
  146962. Py_FatalError("failed to import 'refnanny' module");
  146963. }
  146964. #endif
  146965. __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_loop(void)", 0);
  146966. if (__Pyx_check_binary_version() < 0) __PYX_ERR(2, 1, __pyx_L1_error)
  146967. #ifdef __Pxy_PyFrame_Initialize_Offsets
  146968. __Pxy_PyFrame_Initialize_Offsets();
  146969. #endif
  146970. __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(2, 1, __pyx_L1_error)
  146971. __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(2, 1, __pyx_L1_error)
  146972. __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(2, 1, __pyx_L1_error)
  146973. #ifdef __Pyx_CyFunction_USED
  146974. if (__pyx_CyFunction_init() < 0) __PYX_ERR(2, 1, __pyx_L1_error)
  146975. #endif
  146976. #ifdef __Pyx_FusedFunction_USED
  146977. if (__pyx_FusedFunction_init() < 0) __PYX_ERR(2, 1, __pyx_L1_error)
  146978. #endif
  146979. #ifdef __Pyx_Coroutine_USED
  146980. if (__pyx_Coroutine_init() < 0) __PYX_ERR(2, 1, __pyx_L1_error)
  146981. #endif
  146982. #ifdef __Pyx_Generator_USED
  146983. if (__pyx_Generator_init() < 0) __PYX_ERR(2, 1, __pyx_L1_error)
  146984. #endif
  146985. #ifdef __Pyx_AsyncGen_USED
  146986. if (__pyx_AsyncGen_init() < 0) __PYX_ERR(2, 1, __pyx_L1_error)
  146987. #endif
  146988. #ifdef __Pyx_StopAsyncIteration_USED
  146989. if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(2, 1, __pyx_L1_error)
  146990. #endif
  146991. /*--- Library function declarations ---*/
  146992. /*--- Threads initialization code ---*/
  146993. #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
  146994. #ifdef WITH_THREAD /* Python build with threading support? */
  146995. PyEval_InitThreads();
  146996. #endif
  146997. #endif
  146998. /*--- Module creation code ---*/
  146999. #if CYTHON_PEP489_MULTI_PHASE_INIT
  147000. __pyx_m = __pyx_pyinit_module;
  147001. Py_INCREF(__pyx_m);
  147002. #else
  147003. #if PY_MAJOR_VERSION < 3
  147004. __pyx_m = Py_InitModule4("loop", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
  147005. #else
  147006. __pyx_m = PyModule_Create(&__pyx_moduledef);
  147007. #endif
  147008. if (unlikely(!__pyx_m)) __PYX_ERR(2, 1, __pyx_L1_error)
  147009. #endif
  147010. __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(2, 1, __pyx_L1_error)
  147011. Py_INCREF(__pyx_d);
  147012. __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(2, 1, __pyx_L1_error)
  147013. Py_INCREF(__pyx_b);
  147014. __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(2, 1, __pyx_L1_error)
  147015. Py_INCREF(__pyx_cython_runtime);
  147016. if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(2, 1, __pyx_L1_error);
  147017. /*--- Initialize various global constants etc. ---*/
  147018. if (__Pyx_InitGlobals() < 0) __PYX_ERR(2, 1, __pyx_L1_error)
  147019. #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
  147020. if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(2, 1, __pyx_L1_error)
  147021. #endif
  147022. if (__pyx_module_is_main_uvloop__loop) {
  147023. if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name, __pyx_n_s_main) < 0) __PYX_ERR(2, 1, __pyx_L1_error)
  147024. }
  147025. #if PY_MAJOR_VERSION >= 3
  147026. {
  147027. PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(2, 1, __pyx_L1_error)
  147028. if (!PyDict_GetItemString(modules, "uvloop.loop")) {
  147029. if (unlikely(PyDict_SetItemString(modules, "uvloop.loop", __pyx_m) < 0)) __PYX_ERR(2, 1, __pyx_L1_error)
  147030. }
  147031. }
  147032. #endif
  147033. /*--- Builtin init code ---*/
  147034. if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(2, 1, __pyx_L1_error)
  147035. /*--- Constants init code ---*/
  147036. if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(2, 1, __pyx_L1_error)
  147037. /*--- Global type/function init code ---*/
  147038. (void)__Pyx_modinit_global_init_code();
  147039. (void)__Pyx_modinit_variable_export_code();
  147040. (void)__Pyx_modinit_function_export_code();
  147041. if (unlikely(__Pyx_modinit_type_init_code() != 0)) goto __pyx_L1_error;
  147042. if (unlikely(__Pyx_modinit_type_import_code() != 0)) goto __pyx_L1_error;
  147043. (void)__Pyx_modinit_variable_import_code();
  147044. (void)__Pyx_modinit_function_import_code();
  147045. /*--- Execution code ---*/
  147046. #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
  147047. if (__Pyx_patch_abc() < 0) __PYX_ERR(2, 1, __pyx_L1_error)
  147048. #endif
  147049. /* "uvloop/loop.pyx":3
  147050. * # cython: language_level=3, embedsignature=True
  147051. *
  147052. * import asyncio # <<<<<<<<<<<<<<
  147053. * cimport cython
  147054. *
  147055. */
  147056. __pyx_t_1 = __Pyx_patch_asyncio(__Pyx_Import(__pyx_n_s_asyncio, 0, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 3, __pyx_L1_error)
  147057. __Pyx_GOTREF(__pyx_t_1);
  147058. if (PyDict_SetItem(__pyx_d, __pyx_n_s_asyncio, __pyx_t_1) < 0) __PYX_ERR(2, 3, __pyx_L1_error)
  147059. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  147060. /* "uvloop/loop.pyx":42
  147061. * )
  147062. *
  147063. * from . import _noop # <<<<<<<<<<<<<<
  147064. *
  147065. *
  147066. */
  147067. __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 42, __pyx_L1_error)
  147068. __Pyx_GOTREF(__pyx_t_1);
  147069. __Pyx_INCREF(__pyx_n_s_noop);
  147070. __Pyx_GIVEREF(__pyx_n_s_noop);
  147071. PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_noop);
  147072. __pyx_t_2 = __Pyx_Import(__pyx_n_s__2, __pyx_t_1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 42, __pyx_L1_error)
  147073. __Pyx_GOTREF(__pyx_t_2);
  147074. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  147075. __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_noop); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 42, __pyx_L1_error)
  147076. __Pyx_GOTREF(__pyx_t_1);
  147077. if (PyDict_SetItem(__pyx_d, __pyx_n_s_noop, __pyx_t_1) < 0) __PYX_ERR(2, 42, __pyx_L1_error)
  147078. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  147079. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  147080. /* "uvloop/includes/stdlib.pxi":4
  147081. *
  147082. *
  147083. * import asyncio, asyncio.log, asyncio.base_events, \ # <<<<<<<<<<<<<<
  147084. * asyncio.sslproto, asyncio.coroutines, \
  147085. * asyncio.futures, asyncio.transports
  147086. */
  147087. __pyx_t_2 = __Pyx_patch_asyncio(__Pyx_Import(__pyx_n_s_asyncio, 0, 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 4, __pyx_L1_error)
  147088. __Pyx_GOTREF(__pyx_t_2);
  147089. if (PyDict_SetItem(__pyx_d, __pyx_n_s_asyncio, __pyx_t_2) < 0) __PYX_ERR(29, 4, __pyx_L1_error)
  147090. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  147091. __pyx_t_2 = __Pyx_Import(__pyx_n_s_asyncio_log, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 4, __pyx_L1_error)
  147092. __Pyx_GOTREF(__pyx_t_2);
  147093. if (PyDict_SetItem(__pyx_d, __pyx_n_s_asyncio, __pyx_t_2) < 0) __PYX_ERR(29, 4, __pyx_L1_error)
  147094. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  147095. __pyx_t_2 = __Pyx_Import(__pyx_n_s_asyncio_base_events, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 4, __pyx_L1_error)
  147096. __Pyx_GOTREF(__pyx_t_2);
  147097. if (PyDict_SetItem(__pyx_d, __pyx_n_s_asyncio, __pyx_t_2) < 0) __PYX_ERR(29, 4, __pyx_L1_error)
  147098. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  147099. /* "uvloop/includes/stdlib.pxi":5
  147100. *
  147101. * import asyncio, asyncio.log, asyncio.base_events, \
  147102. * asyncio.sslproto, asyncio.coroutines, \ # <<<<<<<<<<<<<<
  147103. * asyncio.futures, asyncio.transports
  147104. * import collections.abc
  147105. */
  147106. __pyx_t_2 = __Pyx_Import(__pyx_n_s_asyncio_sslproto, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 5, __pyx_L1_error)
  147107. __Pyx_GOTREF(__pyx_t_2);
  147108. if (PyDict_SetItem(__pyx_d, __pyx_n_s_asyncio, __pyx_t_2) < 0) __PYX_ERR(29, 5, __pyx_L1_error)
  147109. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  147110. __pyx_t_2 = __Pyx_Import(__pyx_n_s_asyncio_coroutines, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 5, __pyx_L1_error)
  147111. __Pyx_GOTREF(__pyx_t_2);
  147112. if (PyDict_SetItem(__pyx_d, __pyx_n_s_asyncio, __pyx_t_2) < 0) __PYX_ERR(29, 5, __pyx_L1_error)
  147113. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  147114. /* "uvloop/includes/stdlib.pxi":6
  147115. * import asyncio, asyncio.log, asyncio.base_events, \
  147116. * asyncio.sslproto, asyncio.coroutines, \
  147117. * asyncio.futures, asyncio.transports # <<<<<<<<<<<<<<
  147118. * import collections.abc
  147119. * import concurrent.futures
  147120. */
  147121. __pyx_t_2 = __Pyx_Import(__pyx_n_s_asyncio_futures, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 6, __pyx_L1_error)
  147122. __Pyx_GOTREF(__pyx_t_2);
  147123. if (PyDict_SetItem(__pyx_d, __pyx_n_s_asyncio, __pyx_t_2) < 0) __PYX_ERR(29, 6, __pyx_L1_error)
  147124. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  147125. __pyx_t_2 = __Pyx_Import(__pyx_n_s_asyncio_transports, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 6, __pyx_L1_error)
  147126. __Pyx_GOTREF(__pyx_t_2);
  147127. if (PyDict_SetItem(__pyx_d, __pyx_n_s_asyncio, __pyx_t_2) < 0) __PYX_ERR(29, 6, __pyx_L1_error)
  147128. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  147129. /* "uvloop/includes/stdlib.pxi":7
  147130. * asyncio.sslproto, asyncio.coroutines, \
  147131. * asyncio.futures, asyncio.transports
  147132. * import collections.abc # <<<<<<<<<<<<<<
  147133. * import concurrent.futures
  147134. * import errno
  147135. */
  147136. __pyx_t_2 = __Pyx_Import(__pyx_n_s_collections_abc, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 7, __pyx_L1_error)
  147137. __Pyx_GOTREF(__pyx_t_2);
  147138. if (PyDict_SetItem(__pyx_d, __pyx_n_s_collections, __pyx_t_2) < 0) __PYX_ERR(29, 7, __pyx_L1_error)
  147139. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  147140. /* "uvloop/includes/stdlib.pxi":8
  147141. * asyncio.futures, asyncio.transports
  147142. * import collections.abc
  147143. * import concurrent.futures # <<<<<<<<<<<<<<
  147144. * import errno
  147145. * import functools
  147146. */
  147147. __pyx_t_2 = __Pyx_Import(__pyx_n_s_concurrent_futures, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 8, __pyx_L1_error)
  147148. __Pyx_GOTREF(__pyx_t_2);
  147149. if (PyDict_SetItem(__pyx_d, __pyx_n_s_concurrent, __pyx_t_2) < 0) __PYX_ERR(29, 8, __pyx_L1_error)
  147150. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  147151. /* "uvloop/includes/stdlib.pxi":9
  147152. * import collections.abc
  147153. * import concurrent.futures
  147154. * import errno # <<<<<<<<<<<<<<
  147155. * import functools
  147156. * import gc
  147157. */
  147158. __pyx_t_2 = __Pyx_Import(__pyx_n_s_errno, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 9, __pyx_L1_error)
  147159. __Pyx_GOTREF(__pyx_t_2);
  147160. if (PyDict_SetItem(__pyx_d, __pyx_n_s_errno, __pyx_t_2) < 0) __PYX_ERR(29, 9, __pyx_L1_error)
  147161. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  147162. /* "uvloop/includes/stdlib.pxi":10
  147163. * import concurrent.futures
  147164. * import errno
  147165. * import functools # <<<<<<<<<<<<<<
  147166. * import gc
  147167. * import inspect
  147168. */
  147169. __pyx_t_2 = __Pyx_Import(__pyx_n_s_functools, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 10, __pyx_L1_error)
  147170. __Pyx_GOTREF(__pyx_t_2);
  147171. if (PyDict_SetItem(__pyx_d, __pyx_n_s_functools, __pyx_t_2) < 0) __PYX_ERR(29, 10, __pyx_L1_error)
  147172. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  147173. /* "uvloop/includes/stdlib.pxi":11
  147174. * import errno
  147175. * import functools
  147176. * import gc # <<<<<<<<<<<<<<
  147177. * import inspect
  147178. * import itertools
  147179. */
  147180. __pyx_t_2 = __Pyx_Import(__pyx_n_s_gc, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 11, __pyx_L1_error)
  147181. __Pyx_GOTREF(__pyx_t_2);
  147182. if (PyDict_SetItem(__pyx_d, __pyx_n_s_gc, __pyx_t_2) < 0) __PYX_ERR(29, 11, __pyx_L1_error)
  147183. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  147184. /* "uvloop/includes/stdlib.pxi":12
  147185. * import functools
  147186. * import gc
  147187. * import inspect # <<<<<<<<<<<<<<
  147188. * import itertools
  147189. * import os
  147190. */
  147191. __pyx_t_2 = __Pyx_patch_inspect(__Pyx_Import(__pyx_n_s_inspect, 0, 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 12, __pyx_L1_error)
  147192. __Pyx_GOTREF(__pyx_t_2);
  147193. if (PyDict_SetItem(__pyx_d, __pyx_n_s_inspect, __pyx_t_2) < 0) __PYX_ERR(29, 12, __pyx_L1_error)
  147194. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  147195. /* "uvloop/includes/stdlib.pxi":13
  147196. * import gc
  147197. * import inspect
  147198. * import itertools # <<<<<<<<<<<<<<
  147199. * import os
  147200. * import signal
  147201. */
  147202. __pyx_t_2 = __Pyx_Import(__pyx_n_s_itertools, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 13, __pyx_L1_error)
  147203. __Pyx_GOTREF(__pyx_t_2);
  147204. if (PyDict_SetItem(__pyx_d, __pyx_n_s_itertools, __pyx_t_2) < 0) __PYX_ERR(29, 13, __pyx_L1_error)
  147205. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  147206. /* "uvloop/includes/stdlib.pxi":14
  147207. * import inspect
  147208. * import itertools
  147209. * import os # <<<<<<<<<<<<<<
  147210. * import signal
  147211. * import socket
  147212. */
  147213. __pyx_t_2 = __Pyx_Import(__pyx_n_s_os, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 14, __pyx_L1_error)
  147214. __Pyx_GOTREF(__pyx_t_2);
  147215. if (PyDict_SetItem(__pyx_d, __pyx_n_s_os, __pyx_t_2) < 0) __PYX_ERR(29, 14, __pyx_L1_error)
  147216. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  147217. /* "uvloop/includes/stdlib.pxi":15
  147218. * import itertools
  147219. * import os
  147220. * import signal # <<<<<<<<<<<<<<
  147221. * import socket
  147222. * import subprocess
  147223. */
  147224. __pyx_t_2 = __Pyx_Import(__pyx_n_s_signal, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 15, __pyx_L1_error)
  147225. __Pyx_GOTREF(__pyx_t_2);
  147226. if (PyDict_SetItem(__pyx_d, __pyx_n_s_signal, __pyx_t_2) < 0) __PYX_ERR(29, 15, __pyx_L1_error)
  147227. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  147228. /* "uvloop/includes/stdlib.pxi":16
  147229. * import os
  147230. * import signal
  147231. * import socket # <<<<<<<<<<<<<<
  147232. * import subprocess
  147233. * import ssl
  147234. */
  147235. __pyx_t_2 = __Pyx_Import(__pyx_n_s_socket_2, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 16, __pyx_L1_error)
  147236. __Pyx_GOTREF(__pyx_t_2);
  147237. if (PyDict_SetItem(__pyx_d, __pyx_n_s_socket_2, __pyx_t_2) < 0) __PYX_ERR(29, 16, __pyx_L1_error)
  147238. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  147239. /* "uvloop/includes/stdlib.pxi":17
  147240. * import signal
  147241. * import socket
  147242. * import subprocess # <<<<<<<<<<<<<<
  147243. * import ssl
  147244. * import stat
  147245. */
  147246. __pyx_t_2 = __Pyx_Import(__pyx_n_s_subprocess, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 17, __pyx_L1_error)
  147247. __Pyx_GOTREF(__pyx_t_2);
  147248. if (PyDict_SetItem(__pyx_d, __pyx_n_s_subprocess, __pyx_t_2) < 0) __PYX_ERR(29, 17, __pyx_L1_error)
  147249. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  147250. /* "uvloop/includes/stdlib.pxi":18
  147251. * import socket
  147252. * import subprocess
  147253. * import ssl # <<<<<<<<<<<<<<
  147254. * import stat
  147255. * import sys
  147256. */
  147257. __pyx_t_2 = __Pyx_Import(__pyx_n_s_ssl, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 18, __pyx_L1_error)
  147258. __Pyx_GOTREF(__pyx_t_2);
  147259. if (PyDict_SetItem(__pyx_d, __pyx_n_s_ssl, __pyx_t_2) < 0) __PYX_ERR(29, 18, __pyx_L1_error)
  147260. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  147261. /* "uvloop/includes/stdlib.pxi":19
  147262. * import subprocess
  147263. * import ssl
  147264. * import stat # <<<<<<<<<<<<<<
  147265. * import sys
  147266. * import threading
  147267. */
  147268. __pyx_t_2 = __Pyx_Import(__pyx_n_s_stat, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 19, __pyx_L1_error)
  147269. __Pyx_GOTREF(__pyx_t_2);
  147270. if (PyDict_SetItem(__pyx_d, __pyx_n_s_stat, __pyx_t_2) < 0) __PYX_ERR(29, 19, __pyx_L1_error)
  147271. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  147272. /* "uvloop/includes/stdlib.pxi":20
  147273. * import ssl
  147274. * import stat
  147275. * import sys # <<<<<<<<<<<<<<
  147276. * import threading
  147277. * import traceback
  147278. */
  147279. __pyx_t_2 = __Pyx_Import(__pyx_n_s_sys, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 20, __pyx_L1_error)
  147280. __Pyx_GOTREF(__pyx_t_2);
  147281. if (PyDict_SetItem(__pyx_d, __pyx_n_s_sys, __pyx_t_2) < 0) __PYX_ERR(29, 20, __pyx_L1_error)
  147282. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  147283. /* "uvloop/includes/stdlib.pxi":21
  147284. * import stat
  147285. * import sys
  147286. * import threading # <<<<<<<<<<<<<<
  147287. * import traceback
  147288. * import time
  147289. */
  147290. __pyx_t_2 = __Pyx_Import(__pyx_n_s_threading, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 21, __pyx_L1_error)
  147291. __Pyx_GOTREF(__pyx_t_2);
  147292. if (PyDict_SetItem(__pyx_d, __pyx_n_s_threading, __pyx_t_2) < 0) __PYX_ERR(29, 21, __pyx_L1_error)
  147293. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  147294. /* "uvloop/includes/stdlib.pxi":22
  147295. * import sys
  147296. * import threading
  147297. * import traceback # <<<<<<<<<<<<<<
  147298. * import time
  147299. * import warnings
  147300. */
  147301. __pyx_t_2 = __Pyx_Import(__pyx_n_s_traceback_2, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 22, __pyx_L1_error)
  147302. __Pyx_GOTREF(__pyx_t_2);
  147303. if (PyDict_SetItem(__pyx_d, __pyx_n_s_traceback_2, __pyx_t_2) < 0) __PYX_ERR(29, 22, __pyx_L1_error)
  147304. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  147305. /* "uvloop/includes/stdlib.pxi":23
  147306. * import threading
  147307. * import traceback
  147308. * import time # <<<<<<<<<<<<<<
  147309. * import warnings
  147310. * import weakref
  147311. */
  147312. __pyx_t_2 = __Pyx_Import(__pyx_n_s_time, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 23, __pyx_L1_error)
  147313. __Pyx_GOTREF(__pyx_t_2);
  147314. if (PyDict_SetItem(__pyx_d, __pyx_n_s_time, __pyx_t_2) < 0) __PYX_ERR(29, 23, __pyx_L1_error)
  147315. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  147316. /* "uvloop/includes/stdlib.pxi":24
  147317. * import traceback
  147318. * import time
  147319. * import warnings # <<<<<<<<<<<<<<
  147320. * import weakref
  147321. *
  147322. */
  147323. __pyx_t_2 = __Pyx_Import(__pyx_n_s_warnings, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 24, __pyx_L1_error)
  147324. __Pyx_GOTREF(__pyx_t_2);
  147325. if (PyDict_SetItem(__pyx_d, __pyx_n_s_warnings, __pyx_t_2) < 0) __PYX_ERR(29, 24, __pyx_L1_error)
  147326. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  147327. /* "uvloop/includes/stdlib.pxi":25
  147328. * import time
  147329. * import warnings
  147330. * import weakref # <<<<<<<<<<<<<<
  147331. *
  147332. *
  147333. */
  147334. __pyx_t_2 = __Pyx_Import(__pyx_n_s_weakref, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 25, __pyx_L1_error)
  147335. __Pyx_GOTREF(__pyx_t_2);
  147336. if (PyDict_SetItem(__pyx_d, __pyx_n_s_weakref, __pyx_t_2) < 0) __PYX_ERR(29, 25, __pyx_L1_error)
  147337. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  147338. /* "uvloop/includes/stdlib.pxi":28
  147339. *
  147340. *
  147341. * cdef aio_get_event_loop = asyncio.get_event_loop # <<<<<<<<<<<<<<
  147342. * cdef aio_CancelledError = asyncio.CancelledError
  147343. * cdef aio_InvalidStateError = asyncio.InvalidStateError
  147344. */
  147345. __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 28, __pyx_L1_error)
  147346. __Pyx_GOTREF(__pyx_t_2);
  147347. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_get_event_loop); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 28, __pyx_L1_error)
  147348. __Pyx_GOTREF(__pyx_t_1);
  147349. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  147350. __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_aio_get_event_loop);
  147351. __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_aio_get_event_loop, __pyx_t_1);
  147352. __Pyx_GIVEREF(__pyx_t_1);
  147353. __pyx_t_1 = 0;
  147354. /* "uvloop/includes/stdlib.pxi":29
  147355. *
  147356. * cdef aio_get_event_loop = asyncio.get_event_loop
  147357. * cdef aio_CancelledError = asyncio.CancelledError # <<<<<<<<<<<<<<
  147358. * cdef aio_InvalidStateError = asyncio.InvalidStateError
  147359. * cdef aio_TimeoutError = asyncio.TimeoutError
  147360. */
  147361. __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 29, __pyx_L1_error)
  147362. __Pyx_GOTREF(__pyx_t_1);
  147363. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_CancelledError); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 29, __pyx_L1_error)
  147364. __Pyx_GOTREF(__pyx_t_2);
  147365. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  147366. __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_aio_CancelledError);
  147367. __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_aio_CancelledError, __pyx_t_2);
  147368. __Pyx_GIVEREF(__pyx_t_2);
  147369. __pyx_t_2 = 0;
  147370. /* "uvloop/includes/stdlib.pxi":30
  147371. * cdef aio_get_event_loop = asyncio.get_event_loop
  147372. * cdef aio_CancelledError = asyncio.CancelledError
  147373. * cdef aio_InvalidStateError = asyncio.InvalidStateError # <<<<<<<<<<<<<<
  147374. * cdef aio_TimeoutError = asyncio.TimeoutError
  147375. * cdef aio_Future = asyncio.Future
  147376. */
  147377. __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 30, __pyx_L1_error)
  147378. __Pyx_GOTREF(__pyx_t_2);
  147379. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_InvalidStateError); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 30, __pyx_L1_error)
  147380. __Pyx_GOTREF(__pyx_t_1);
  147381. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  147382. __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_aio_InvalidStateError);
  147383. __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_aio_InvalidStateError, __pyx_t_1);
  147384. __Pyx_GIVEREF(__pyx_t_1);
  147385. __pyx_t_1 = 0;
  147386. /* "uvloop/includes/stdlib.pxi":31
  147387. * cdef aio_CancelledError = asyncio.CancelledError
  147388. * cdef aio_InvalidStateError = asyncio.InvalidStateError
  147389. * cdef aio_TimeoutError = asyncio.TimeoutError # <<<<<<<<<<<<<<
  147390. * cdef aio_Future = asyncio.Future
  147391. * cdef aio_Task = asyncio.Task
  147392. */
  147393. __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 31, __pyx_L1_error)
  147394. __Pyx_GOTREF(__pyx_t_1);
  147395. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_TimeoutError); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 31, __pyx_L1_error)
  147396. __Pyx_GOTREF(__pyx_t_2);
  147397. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  147398. __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_aio_TimeoutError);
  147399. __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_aio_TimeoutError, __pyx_t_2);
  147400. __Pyx_GIVEREF(__pyx_t_2);
  147401. __pyx_t_2 = 0;
  147402. /* "uvloop/includes/stdlib.pxi":32
  147403. * cdef aio_InvalidStateError = asyncio.InvalidStateError
  147404. * cdef aio_TimeoutError = asyncio.TimeoutError
  147405. * cdef aio_Future = asyncio.Future # <<<<<<<<<<<<<<
  147406. * cdef aio_Task = asyncio.Task
  147407. * cdef aio_ensure_future = asyncio.ensure_future
  147408. */
  147409. __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 32, __pyx_L1_error)
  147410. __Pyx_GOTREF(__pyx_t_2);
  147411. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_Future); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 32, __pyx_L1_error)
  147412. __Pyx_GOTREF(__pyx_t_1);
  147413. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  147414. __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_aio_Future);
  147415. __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_aio_Future, __pyx_t_1);
  147416. __Pyx_GIVEREF(__pyx_t_1);
  147417. __pyx_t_1 = 0;
  147418. /* "uvloop/includes/stdlib.pxi":33
  147419. * cdef aio_TimeoutError = asyncio.TimeoutError
  147420. * cdef aio_Future = asyncio.Future
  147421. * cdef aio_Task = asyncio.Task # <<<<<<<<<<<<<<
  147422. * cdef aio_ensure_future = asyncio.ensure_future
  147423. * cdef aio_gather = asyncio.gather
  147424. */
  147425. __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 33, __pyx_L1_error)
  147426. __Pyx_GOTREF(__pyx_t_1);
  147427. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_Task); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 33, __pyx_L1_error)
  147428. __Pyx_GOTREF(__pyx_t_2);
  147429. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  147430. __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_aio_Task);
  147431. __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_aio_Task, __pyx_t_2);
  147432. __Pyx_GIVEREF(__pyx_t_2);
  147433. __pyx_t_2 = 0;
  147434. /* "uvloop/includes/stdlib.pxi":34
  147435. * cdef aio_Future = asyncio.Future
  147436. * cdef aio_Task = asyncio.Task
  147437. * cdef aio_ensure_future = asyncio.ensure_future # <<<<<<<<<<<<<<
  147438. * cdef aio_gather = asyncio.gather
  147439. * cdef aio_wait = asyncio.wait
  147440. */
  147441. __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 34, __pyx_L1_error)
  147442. __Pyx_GOTREF(__pyx_t_2);
  147443. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ensure_future); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 34, __pyx_L1_error)
  147444. __Pyx_GOTREF(__pyx_t_1);
  147445. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  147446. __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_aio_ensure_future);
  147447. __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_aio_ensure_future, __pyx_t_1);
  147448. __Pyx_GIVEREF(__pyx_t_1);
  147449. __pyx_t_1 = 0;
  147450. /* "uvloop/includes/stdlib.pxi":35
  147451. * cdef aio_Task = asyncio.Task
  147452. * cdef aio_ensure_future = asyncio.ensure_future
  147453. * cdef aio_gather = asyncio.gather # <<<<<<<<<<<<<<
  147454. * cdef aio_wait = asyncio.wait
  147455. * cdef aio_wrap_future = asyncio.wrap_future
  147456. */
  147457. __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 35, __pyx_L1_error)
  147458. __Pyx_GOTREF(__pyx_t_1);
  147459. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_gather); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 35, __pyx_L1_error)
  147460. __Pyx_GOTREF(__pyx_t_2);
  147461. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  147462. __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_aio_gather);
  147463. __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_aio_gather, __pyx_t_2);
  147464. __Pyx_GIVEREF(__pyx_t_2);
  147465. __pyx_t_2 = 0;
  147466. /* "uvloop/includes/stdlib.pxi":36
  147467. * cdef aio_ensure_future = asyncio.ensure_future
  147468. * cdef aio_gather = asyncio.gather
  147469. * cdef aio_wait = asyncio.wait # <<<<<<<<<<<<<<
  147470. * cdef aio_wrap_future = asyncio.wrap_future
  147471. * cdef aio_logger = asyncio.log.logger
  147472. */
  147473. __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 36, __pyx_L1_error)
  147474. __Pyx_GOTREF(__pyx_t_2);
  147475. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_wait); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 36, __pyx_L1_error)
  147476. __Pyx_GOTREF(__pyx_t_1);
  147477. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  147478. __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_aio_wait);
  147479. __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_aio_wait, __pyx_t_1);
  147480. __Pyx_GIVEREF(__pyx_t_1);
  147481. __pyx_t_1 = 0;
  147482. /* "uvloop/includes/stdlib.pxi":37
  147483. * cdef aio_gather = asyncio.gather
  147484. * cdef aio_wait = asyncio.wait
  147485. * cdef aio_wrap_future = asyncio.wrap_future # <<<<<<<<<<<<<<
  147486. * cdef aio_logger = asyncio.log.logger
  147487. * cdef aio_iscoroutine = asyncio.iscoroutine
  147488. */
  147489. __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 37, __pyx_L1_error)
  147490. __Pyx_GOTREF(__pyx_t_1);
  147491. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_wrap_future); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 37, __pyx_L1_error)
  147492. __Pyx_GOTREF(__pyx_t_2);
  147493. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  147494. __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_aio_wrap_future);
  147495. __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_aio_wrap_future, __pyx_t_2);
  147496. __Pyx_GIVEREF(__pyx_t_2);
  147497. __pyx_t_2 = 0;
  147498. /* "uvloop/includes/stdlib.pxi":38
  147499. * cdef aio_wait = asyncio.wait
  147500. * cdef aio_wrap_future = asyncio.wrap_future
  147501. * cdef aio_logger = asyncio.log.logger # <<<<<<<<<<<<<<
  147502. * cdef aio_iscoroutine = asyncio.iscoroutine
  147503. * cdef aio_iscoroutinefunction = asyncio.iscoroutinefunction
  147504. */
  147505. __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 38, __pyx_L1_error)
  147506. __Pyx_GOTREF(__pyx_t_2);
  147507. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_log); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 38, __pyx_L1_error)
  147508. __Pyx_GOTREF(__pyx_t_1);
  147509. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  147510. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_logger); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 38, __pyx_L1_error)
  147511. __Pyx_GOTREF(__pyx_t_2);
  147512. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  147513. __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_aio_logger);
  147514. __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_aio_logger, __pyx_t_2);
  147515. __Pyx_GIVEREF(__pyx_t_2);
  147516. __pyx_t_2 = 0;
  147517. /* "uvloop/includes/stdlib.pxi":39
  147518. * cdef aio_wrap_future = asyncio.wrap_future
  147519. * cdef aio_logger = asyncio.log.logger
  147520. * cdef aio_iscoroutine = asyncio.iscoroutine # <<<<<<<<<<<<<<
  147521. * cdef aio_iscoroutinefunction = asyncio.iscoroutinefunction
  147522. * cdef aio_BaseProtocol = asyncio.BaseProtocol
  147523. */
  147524. __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 39, __pyx_L1_error)
  147525. __Pyx_GOTREF(__pyx_t_2);
  147526. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_iscoroutine); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 39, __pyx_L1_error)
  147527. __Pyx_GOTREF(__pyx_t_1);
  147528. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  147529. __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_aio_iscoroutine);
  147530. __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_aio_iscoroutine, __pyx_t_1);
  147531. __Pyx_GIVEREF(__pyx_t_1);
  147532. __pyx_t_1 = 0;
  147533. /* "uvloop/includes/stdlib.pxi":40
  147534. * cdef aio_logger = asyncio.log.logger
  147535. * cdef aio_iscoroutine = asyncio.iscoroutine
  147536. * cdef aio_iscoroutinefunction = asyncio.iscoroutinefunction # <<<<<<<<<<<<<<
  147537. * cdef aio_BaseProtocol = asyncio.BaseProtocol
  147538. * cdef aio_Protocol = asyncio.Protocol
  147539. */
  147540. __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 40, __pyx_L1_error)
  147541. __Pyx_GOTREF(__pyx_t_1);
  147542. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_iscoroutinefunction); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 40, __pyx_L1_error)
  147543. __Pyx_GOTREF(__pyx_t_2);
  147544. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  147545. __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_aio_iscoroutinefunction);
  147546. __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_aio_iscoroutinefunction, __pyx_t_2);
  147547. __Pyx_GIVEREF(__pyx_t_2);
  147548. __pyx_t_2 = 0;
  147549. /* "uvloop/includes/stdlib.pxi":41
  147550. * cdef aio_iscoroutine = asyncio.iscoroutine
  147551. * cdef aio_iscoroutinefunction = asyncio.iscoroutinefunction
  147552. * cdef aio_BaseProtocol = asyncio.BaseProtocol # <<<<<<<<<<<<<<
  147553. * cdef aio_Protocol = asyncio.Protocol
  147554. * cdef aio_isfuture = getattr(asyncio, 'isfuture', None)
  147555. */
  147556. __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 41, __pyx_L1_error)
  147557. __Pyx_GOTREF(__pyx_t_2);
  147558. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_BaseProtocol); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 41, __pyx_L1_error)
  147559. __Pyx_GOTREF(__pyx_t_1);
  147560. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  147561. __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_aio_BaseProtocol);
  147562. __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_aio_BaseProtocol, __pyx_t_1);
  147563. __Pyx_GIVEREF(__pyx_t_1);
  147564. __pyx_t_1 = 0;
  147565. /* "uvloop/includes/stdlib.pxi":42
  147566. * cdef aio_iscoroutinefunction = asyncio.iscoroutinefunction
  147567. * cdef aio_BaseProtocol = asyncio.BaseProtocol
  147568. * cdef aio_Protocol = asyncio.Protocol # <<<<<<<<<<<<<<
  147569. * cdef aio_isfuture = getattr(asyncio, 'isfuture', None)
  147570. * cdef aio_get_running_loop = getattr(asyncio, '_get_running_loop', None)
  147571. */
  147572. __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 42, __pyx_L1_error)
  147573. __Pyx_GOTREF(__pyx_t_1);
  147574. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_Protocol); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 42, __pyx_L1_error)
  147575. __Pyx_GOTREF(__pyx_t_2);
  147576. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  147577. __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_aio_Protocol);
  147578. __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_aio_Protocol, __pyx_t_2);
  147579. __Pyx_GIVEREF(__pyx_t_2);
  147580. __pyx_t_2 = 0;
  147581. /* "uvloop/includes/stdlib.pxi":43
  147582. * cdef aio_BaseProtocol = asyncio.BaseProtocol
  147583. * cdef aio_Protocol = asyncio.Protocol
  147584. * cdef aio_isfuture = getattr(asyncio, 'isfuture', None) # <<<<<<<<<<<<<<
  147585. * cdef aio_get_running_loop = getattr(asyncio, '_get_running_loop', None)
  147586. * cdef aio_set_running_loop = getattr(asyncio, '_set_running_loop', None)
  147587. */
  147588. __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 43, __pyx_L1_error)
  147589. __Pyx_GOTREF(__pyx_t_2);
  147590. __pyx_t_1 = __Pyx_GetAttr3(__pyx_t_2, __pyx_n_u_isfuture, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 43, __pyx_L1_error)
  147591. __Pyx_GOTREF(__pyx_t_1);
  147592. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  147593. __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_aio_isfuture);
  147594. __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_aio_isfuture, __pyx_t_1);
  147595. __Pyx_GIVEREF(__pyx_t_1);
  147596. __pyx_t_1 = 0;
  147597. /* "uvloop/includes/stdlib.pxi":44
  147598. * cdef aio_Protocol = asyncio.Protocol
  147599. * cdef aio_isfuture = getattr(asyncio, 'isfuture', None)
  147600. * cdef aio_get_running_loop = getattr(asyncio, '_get_running_loop', None) # <<<<<<<<<<<<<<
  147601. * cdef aio_set_running_loop = getattr(asyncio, '_set_running_loop', None)
  147602. * cdef aio_debug_wrapper = getattr(asyncio.coroutines, 'debug_wrapper', None)
  147603. */
  147604. __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 44, __pyx_L1_error)
  147605. __Pyx_GOTREF(__pyx_t_1);
  147606. __pyx_t_2 = __Pyx_GetAttr3(__pyx_t_1, __pyx_n_u_get_running_loop, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 44, __pyx_L1_error)
  147607. __Pyx_GOTREF(__pyx_t_2);
  147608. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  147609. __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_aio_get_running_loop);
  147610. __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_aio_get_running_loop, __pyx_t_2);
  147611. __Pyx_GIVEREF(__pyx_t_2);
  147612. __pyx_t_2 = 0;
  147613. /* "uvloop/includes/stdlib.pxi":45
  147614. * cdef aio_isfuture = getattr(asyncio, 'isfuture', None)
  147615. * cdef aio_get_running_loop = getattr(asyncio, '_get_running_loop', None)
  147616. * cdef aio_set_running_loop = getattr(asyncio, '_set_running_loop', None) # <<<<<<<<<<<<<<
  147617. * cdef aio_debug_wrapper = getattr(asyncio.coroutines, 'debug_wrapper', None)
  147618. * cdef aio_AbstractChildWatcher = asyncio.AbstractChildWatcher
  147619. */
  147620. __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 45, __pyx_L1_error)
  147621. __Pyx_GOTREF(__pyx_t_2);
  147622. __pyx_t_1 = __Pyx_GetAttr3(__pyx_t_2, __pyx_n_u_set_running_loop, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 45, __pyx_L1_error)
  147623. __Pyx_GOTREF(__pyx_t_1);
  147624. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  147625. __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_aio_set_running_loop);
  147626. __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_aio_set_running_loop, __pyx_t_1);
  147627. __Pyx_GIVEREF(__pyx_t_1);
  147628. __pyx_t_1 = 0;
  147629. /* "uvloop/includes/stdlib.pxi":46
  147630. * cdef aio_get_running_loop = getattr(asyncio, '_get_running_loop', None)
  147631. * cdef aio_set_running_loop = getattr(asyncio, '_set_running_loop', None)
  147632. * cdef aio_debug_wrapper = getattr(asyncio.coroutines, 'debug_wrapper', None) # <<<<<<<<<<<<<<
  147633. * cdef aio_AbstractChildWatcher = asyncio.AbstractChildWatcher
  147634. * cdef aio_Transport = asyncio.Transport
  147635. */
  147636. __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 46, __pyx_L1_error)
  147637. __Pyx_GOTREF(__pyx_t_1);
  147638. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_coroutines); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 46, __pyx_L1_error)
  147639. __Pyx_GOTREF(__pyx_t_2);
  147640. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  147641. __pyx_t_1 = __Pyx_GetAttr3(__pyx_t_2, __pyx_n_u_debug_wrapper, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 46, __pyx_L1_error)
  147642. __Pyx_GOTREF(__pyx_t_1);
  147643. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  147644. __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_aio_debug_wrapper);
  147645. __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_aio_debug_wrapper, __pyx_t_1);
  147646. __Pyx_GIVEREF(__pyx_t_1);
  147647. __pyx_t_1 = 0;
  147648. /* "uvloop/includes/stdlib.pxi":47
  147649. * cdef aio_set_running_loop = getattr(asyncio, '_set_running_loop', None)
  147650. * cdef aio_debug_wrapper = getattr(asyncio.coroutines, 'debug_wrapper', None)
  147651. * cdef aio_AbstractChildWatcher = asyncio.AbstractChildWatcher # <<<<<<<<<<<<<<
  147652. * cdef aio_Transport = asyncio.Transport
  147653. * cdef aio_FlowControlMixin = asyncio.transports._FlowControlMixin
  147654. */
  147655. __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 47, __pyx_L1_error)
  147656. __Pyx_GOTREF(__pyx_t_1);
  147657. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_AbstractChildWatcher); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 47, __pyx_L1_error)
  147658. __Pyx_GOTREF(__pyx_t_2);
  147659. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  147660. __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_aio_AbstractChildWatcher);
  147661. __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_aio_AbstractChildWatcher, __pyx_t_2);
  147662. __Pyx_GIVEREF(__pyx_t_2);
  147663. __pyx_t_2 = 0;
  147664. /* "uvloop/includes/stdlib.pxi":48
  147665. * cdef aio_debug_wrapper = getattr(asyncio.coroutines, 'debug_wrapper', None)
  147666. * cdef aio_AbstractChildWatcher = asyncio.AbstractChildWatcher
  147667. * cdef aio_Transport = asyncio.Transport # <<<<<<<<<<<<<<
  147668. * cdef aio_FlowControlMixin = asyncio.transports._FlowControlMixin
  147669. *
  147670. */
  147671. __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 48, __pyx_L1_error)
  147672. __Pyx_GOTREF(__pyx_t_2);
  147673. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_Transport); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 48, __pyx_L1_error)
  147674. __Pyx_GOTREF(__pyx_t_1);
  147675. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  147676. __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_aio_Transport);
  147677. __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_aio_Transport, __pyx_t_1);
  147678. __Pyx_GIVEREF(__pyx_t_1);
  147679. __pyx_t_1 = 0;
  147680. /* "uvloop/includes/stdlib.pxi":49
  147681. * cdef aio_AbstractChildWatcher = asyncio.AbstractChildWatcher
  147682. * cdef aio_Transport = asyncio.Transport
  147683. * cdef aio_FlowControlMixin = asyncio.transports._FlowControlMixin # <<<<<<<<<<<<<<
  147684. *
  147685. * cdef col_deque = collections.deque
  147686. */
  147687. __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 49, __pyx_L1_error)
  147688. __Pyx_GOTREF(__pyx_t_1);
  147689. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_transports); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 49, __pyx_L1_error)
  147690. __Pyx_GOTREF(__pyx_t_2);
  147691. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  147692. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_FlowControlMixin); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 49, __pyx_L1_error)
  147693. __Pyx_GOTREF(__pyx_t_1);
  147694. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  147695. __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_aio_FlowControlMixin);
  147696. __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_aio_FlowControlMixin, __pyx_t_1);
  147697. __Pyx_GIVEREF(__pyx_t_1);
  147698. __pyx_t_1 = 0;
  147699. /* "uvloop/includes/stdlib.pxi":51
  147700. * cdef aio_FlowControlMixin = asyncio.transports._FlowControlMixin
  147701. *
  147702. * cdef col_deque = collections.deque # <<<<<<<<<<<<<<
  147703. * cdef col_Iterable = collections.abc.Iterable
  147704. * cdef col_Counter = collections.Counter
  147705. */
  147706. __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_collections); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 51, __pyx_L1_error)
  147707. __Pyx_GOTREF(__pyx_t_1);
  147708. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_deque); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 51, __pyx_L1_error)
  147709. __Pyx_GOTREF(__pyx_t_2);
  147710. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  147711. __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_col_deque);
  147712. __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_col_deque, __pyx_t_2);
  147713. __Pyx_GIVEREF(__pyx_t_2);
  147714. __pyx_t_2 = 0;
  147715. /* "uvloop/includes/stdlib.pxi":52
  147716. *
  147717. * cdef col_deque = collections.deque
  147718. * cdef col_Iterable = collections.abc.Iterable # <<<<<<<<<<<<<<
  147719. * cdef col_Counter = collections.Counter
  147720. * cdef col_OrderedDict = collections.OrderedDict
  147721. */
  147722. __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_collections); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 52, __pyx_L1_error)
  147723. __Pyx_GOTREF(__pyx_t_2);
  147724. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_abc); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 52, __pyx_L1_error)
  147725. __Pyx_GOTREF(__pyx_t_1);
  147726. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  147727. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_Iterable); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 52, __pyx_L1_error)
  147728. __Pyx_GOTREF(__pyx_t_2);
  147729. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  147730. __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_col_Iterable);
  147731. __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_col_Iterable, __pyx_t_2);
  147732. __Pyx_GIVEREF(__pyx_t_2);
  147733. __pyx_t_2 = 0;
  147734. /* "uvloop/includes/stdlib.pxi":53
  147735. * cdef col_deque = collections.deque
  147736. * cdef col_Iterable = collections.abc.Iterable
  147737. * cdef col_Counter = collections.Counter # <<<<<<<<<<<<<<
  147738. * cdef col_OrderedDict = collections.OrderedDict
  147739. *
  147740. */
  147741. __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_collections); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 53, __pyx_L1_error)
  147742. __Pyx_GOTREF(__pyx_t_2);
  147743. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_Counter); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 53, __pyx_L1_error)
  147744. __Pyx_GOTREF(__pyx_t_1);
  147745. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  147746. __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_col_Counter);
  147747. __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_col_Counter, __pyx_t_1);
  147748. __Pyx_GIVEREF(__pyx_t_1);
  147749. __pyx_t_1 = 0;
  147750. /* "uvloop/includes/stdlib.pxi":54
  147751. * cdef col_Iterable = collections.abc.Iterable
  147752. * cdef col_Counter = collections.Counter
  147753. * cdef col_OrderedDict = collections.OrderedDict # <<<<<<<<<<<<<<
  147754. *
  147755. * cdef cc_ThreadPoolExecutor = concurrent.futures.ThreadPoolExecutor
  147756. */
  147757. __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_collections); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 54, __pyx_L1_error)
  147758. __Pyx_GOTREF(__pyx_t_1);
  147759. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 54, __pyx_L1_error)
  147760. __Pyx_GOTREF(__pyx_t_2);
  147761. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  147762. __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_col_OrderedDict);
  147763. __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_col_OrderedDict, __pyx_t_2);
  147764. __Pyx_GIVEREF(__pyx_t_2);
  147765. __pyx_t_2 = 0;
  147766. /* "uvloop/includes/stdlib.pxi":56
  147767. * cdef col_OrderedDict = collections.OrderedDict
  147768. *
  147769. * cdef cc_ThreadPoolExecutor = concurrent.futures.ThreadPoolExecutor # <<<<<<<<<<<<<<
  147770. * cdef cc_Future = concurrent.futures.Future
  147771. *
  147772. */
  147773. __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_concurrent); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 56, __pyx_L1_error)
  147774. __Pyx_GOTREF(__pyx_t_2);
  147775. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_futures); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 56, __pyx_L1_error)
  147776. __Pyx_GOTREF(__pyx_t_1);
  147777. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  147778. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_ThreadPoolExecutor); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 56, __pyx_L1_error)
  147779. __Pyx_GOTREF(__pyx_t_2);
  147780. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  147781. __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_cc_ThreadPoolExecutor);
  147782. __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_cc_ThreadPoolExecutor, __pyx_t_2);
  147783. __Pyx_GIVEREF(__pyx_t_2);
  147784. __pyx_t_2 = 0;
  147785. /* "uvloop/includes/stdlib.pxi":57
  147786. *
  147787. * cdef cc_ThreadPoolExecutor = concurrent.futures.ThreadPoolExecutor
  147788. * cdef cc_Future = concurrent.futures.Future # <<<<<<<<<<<<<<
  147789. *
  147790. * cdef errno_EBADF = errno.EBADF
  147791. */
  147792. __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_concurrent); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 57, __pyx_L1_error)
  147793. __Pyx_GOTREF(__pyx_t_2);
  147794. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_futures); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 57, __pyx_L1_error)
  147795. __Pyx_GOTREF(__pyx_t_1);
  147796. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  147797. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_Future); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 57, __pyx_L1_error)
  147798. __Pyx_GOTREF(__pyx_t_2);
  147799. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  147800. __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_cc_Future);
  147801. __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_cc_Future, __pyx_t_2);
  147802. __Pyx_GIVEREF(__pyx_t_2);
  147803. __pyx_t_2 = 0;
  147804. /* "uvloop/includes/stdlib.pxi":59
  147805. * cdef cc_Future = concurrent.futures.Future
  147806. *
  147807. * cdef errno_EBADF = errno.EBADF # <<<<<<<<<<<<<<
  147808. * cdef errno_EINVAL = errno.EINVAL
  147809. *
  147810. */
  147811. __pyx_t_2 = __Pyx_PyInt_From_int(EBADF); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 59, __pyx_L1_error)
  147812. __Pyx_GOTREF(__pyx_t_2);
  147813. __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_errno_EBADF);
  147814. __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_errno_EBADF, __pyx_t_2);
  147815. __Pyx_GIVEREF(__pyx_t_2);
  147816. __pyx_t_2 = 0;
  147817. /* "uvloop/includes/stdlib.pxi":60
  147818. *
  147819. * cdef errno_EBADF = errno.EBADF
  147820. * cdef errno_EINVAL = errno.EINVAL # <<<<<<<<<<<<<<
  147821. *
  147822. * cdef ft_partial = functools.partial
  147823. */
  147824. __pyx_t_2 = __Pyx_PyInt_From_int(EINVAL); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 60, __pyx_L1_error)
  147825. __Pyx_GOTREF(__pyx_t_2);
  147826. __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_errno_EINVAL);
  147827. __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_errno_EINVAL, __pyx_t_2);
  147828. __Pyx_GIVEREF(__pyx_t_2);
  147829. __pyx_t_2 = 0;
  147830. /* "uvloop/includes/stdlib.pxi":62
  147831. * cdef errno_EINVAL = errno.EINVAL
  147832. *
  147833. * cdef ft_partial = functools.partial # <<<<<<<<<<<<<<
  147834. *
  147835. * cdef gc_disable = gc.disable
  147836. */
  147837. __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_functools); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 62, __pyx_L1_error)
  147838. __Pyx_GOTREF(__pyx_t_2);
  147839. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_partial); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 62, __pyx_L1_error)
  147840. __Pyx_GOTREF(__pyx_t_1);
  147841. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  147842. __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_ft_partial);
  147843. __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_ft_partial, __pyx_t_1);
  147844. __Pyx_GIVEREF(__pyx_t_1);
  147845. __pyx_t_1 = 0;
  147846. /* "uvloop/includes/stdlib.pxi":64
  147847. * cdef ft_partial = functools.partial
  147848. *
  147849. * cdef gc_disable = gc.disable # <<<<<<<<<<<<<<
  147850. *
  147851. * cdef iter_chain = itertools.chain
  147852. */
  147853. __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_gc); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 64, __pyx_L1_error)
  147854. __Pyx_GOTREF(__pyx_t_1);
  147855. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_disable); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 64, __pyx_L1_error)
  147856. __Pyx_GOTREF(__pyx_t_2);
  147857. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  147858. __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_gc_disable);
  147859. __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_gc_disable, __pyx_t_2);
  147860. __Pyx_GIVEREF(__pyx_t_2);
  147861. __pyx_t_2 = 0;
  147862. /* "uvloop/includes/stdlib.pxi":66
  147863. * cdef gc_disable = gc.disable
  147864. *
  147865. * cdef iter_chain = itertools.chain # <<<<<<<<<<<<<<
  147866. * cdef inspect_isgenerator = inspect.isgenerator
  147867. *
  147868. */
  147869. __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_itertools); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 66, __pyx_L1_error)
  147870. __Pyx_GOTREF(__pyx_t_2);
  147871. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_chain); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 66, __pyx_L1_error)
  147872. __Pyx_GOTREF(__pyx_t_1);
  147873. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  147874. __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_iter_chain);
  147875. __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_iter_chain, __pyx_t_1);
  147876. __Pyx_GIVEREF(__pyx_t_1);
  147877. __pyx_t_1 = 0;
  147878. /* "uvloop/includes/stdlib.pxi":67
  147879. *
  147880. * cdef iter_chain = itertools.chain
  147881. * cdef inspect_isgenerator = inspect.isgenerator # <<<<<<<<<<<<<<
  147882. *
  147883. * cdef int has_IPV6_V6ONLY = hasattr(socket, 'IPV6_V6ONLY')
  147884. */
  147885. __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_inspect); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 67, __pyx_L1_error)
  147886. __Pyx_GOTREF(__pyx_t_1);
  147887. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_isgenerator); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 67, __pyx_L1_error)
  147888. __Pyx_GOTREF(__pyx_t_2);
  147889. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  147890. __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_inspect_isgenerator);
  147891. __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_inspect_isgenerator, __pyx_t_2);
  147892. __Pyx_GIVEREF(__pyx_t_2);
  147893. __pyx_t_2 = 0;
  147894. /* "uvloop/includes/stdlib.pxi":69
  147895. * cdef inspect_isgenerator = inspect.isgenerator
  147896. *
  147897. * cdef int has_IPV6_V6ONLY = hasattr(socket, 'IPV6_V6ONLY') # <<<<<<<<<<<<<<
  147898. * cdef int IPV6_V6ONLY = getattr(socket, 'IPV6_V6ONLY', -1)
  147899. * cdef int has_SO_REUSEPORT = hasattr(socket, 'SO_REUSEPORT')
  147900. */
  147901. __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_socket_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 69, __pyx_L1_error)
  147902. __Pyx_GOTREF(__pyx_t_2);
  147903. __pyx_t_3 = __Pyx_HasAttr(__pyx_t_2, __pyx_n_u_IPV6_V6ONLY); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(29, 69, __pyx_L1_error)
  147904. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  147905. __pyx_v_6uvloop_4loop_has_IPV6_V6ONLY = __pyx_t_3;
  147906. /* "uvloop/includes/stdlib.pxi":70
  147907. *
  147908. * cdef int has_IPV6_V6ONLY = hasattr(socket, 'IPV6_V6ONLY')
  147909. * cdef int IPV6_V6ONLY = getattr(socket, 'IPV6_V6ONLY', -1) # <<<<<<<<<<<<<<
  147910. * cdef int has_SO_REUSEPORT = hasattr(socket, 'SO_REUSEPORT')
  147911. * cdef int SO_REUSEPORT = getattr(socket, 'SO_REUSEPORT', 0)
  147912. */
  147913. __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_socket_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 70, __pyx_L1_error)
  147914. __Pyx_GOTREF(__pyx_t_2);
  147915. __pyx_t_1 = __Pyx_GetAttr3(__pyx_t_2, __pyx_n_u_IPV6_V6ONLY, __pyx_int_neg_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 70, __pyx_L1_error)
  147916. __Pyx_GOTREF(__pyx_t_1);
  147917. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  147918. __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(29, 70, __pyx_L1_error)
  147919. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  147920. __pyx_v_6uvloop_4loop_IPV6_V6ONLY = __pyx_t_4;
  147921. /* "uvloop/includes/stdlib.pxi":71
  147922. * cdef int has_IPV6_V6ONLY = hasattr(socket, 'IPV6_V6ONLY')
  147923. * cdef int IPV6_V6ONLY = getattr(socket, 'IPV6_V6ONLY', -1)
  147924. * cdef int has_SO_REUSEPORT = hasattr(socket, 'SO_REUSEPORT') # <<<<<<<<<<<<<<
  147925. * cdef int SO_REUSEPORT = getattr(socket, 'SO_REUSEPORT', 0)
  147926. * cdef int SO_BROADCAST = getattr(socket, 'SO_BROADCAST')
  147927. */
  147928. __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_socket_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 71, __pyx_L1_error)
  147929. __Pyx_GOTREF(__pyx_t_1);
  147930. __pyx_t_3 = __Pyx_HasAttr(__pyx_t_1, __pyx_n_u_SO_REUSEPORT); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(29, 71, __pyx_L1_error)
  147931. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  147932. __pyx_v_6uvloop_4loop_has_SO_REUSEPORT = __pyx_t_3;
  147933. /* "uvloop/includes/stdlib.pxi":72
  147934. * cdef int IPV6_V6ONLY = getattr(socket, 'IPV6_V6ONLY', -1)
  147935. * cdef int has_SO_REUSEPORT = hasattr(socket, 'SO_REUSEPORT')
  147936. * cdef int SO_REUSEPORT = getattr(socket, 'SO_REUSEPORT', 0) # <<<<<<<<<<<<<<
  147937. * cdef int SO_BROADCAST = getattr(socket, 'SO_BROADCAST')
  147938. * cdef int SOCK_NONBLOCK = getattr(socket, 'SOCK_NONBLOCK', -1)
  147939. */
  147940. __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_socket_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 72, __pyx_L1_error)
  147941. __Pyx_GOTREF(__pyx_t_1);
  147942. __pyx_t_2 = __Pyx_GetAttr3(__pyx_t_1, __pyx_n_u_SO_REUSEPORT, __pyx_int_0); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 72, __pyx_L1_error)
  147943. __Pyx_GOTREF(__pyx_t_2);
  147944. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  147945. __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(29, 72, __pyx_L1_error)
  147946. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  147947. __pyx_v_6uvloop_4loop_SO_REUSEPORT = __pyx_t_4;
  147948. /* "uvloop/includes/stdlib.pxi":73
  147949. * cdef int has_SO_REUSEPORT = hasattr(socket, 'SO_REUSEPORT')
  147950. * cdef int SO_REUSEPORT = getattr(socket, 'SO_REUSEPORT', 0)
  147951. * cdef int SO_BROADCAST = getattr(socket, 'SO_BROADCAST') # <<<<<<<<<<<<<<
  147952. * cdef int SOCK_NONBLOCK = getattr(socket, 'SOCK_NONBLOCK', -1)
  147953. *
  147954. */
  147955. __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_socket_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 73, __pyx_L1_error)
  147956. __Pyx_GOTREF(__pyx_t_2);
  147957. __pyx_t_1 = __Pyx_GetAttr(__pyx_t_2, __pyx_n_u_SO_BROADCAST); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 73, __pyx_L1_error)
  147958. __Pyx_GOTREF(__pyx_t_1);
  147959. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  147960. __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(29, 73, __pyx_L1_error)
  147961. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  147962. __pyx_v_6uvloop_4loop_SO_BROADCAST = __pyx_t_4;
  147963. /* "uvloop/includes/stdlib.pxi":74
  147964. * cdef int SO_REUSEPORT = getattr(socket, 'SO_REUSEPORT', 0)
  147965. * cdef int SO_BROADCAST = getattr(socket, 'SO_BROADCAST')
  147966. * cdef int SOCK_NONBLOCK = getattr(socket, 'SOCK_NONBLOCK', -1) # <<<<<<<<<<<<<<
  147967. *
  147968. * cdef socket_gaierror = socket.gaierror
  147969. */
  147970. __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_socket_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 74, __pyx_L1_error)
  147971. __Pyx_GOTREF(__pyx_t_1);
  147972. __pyx_t_2 = __Pyx_GetAttr3(__pyx_t_1, __pyx_n_u_SOCK_NONBLOCK, __pyx_int_neg_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 74, __pyx_L1_error)
  147973. __Pyx_GOTREF(__pyx_t_2);
  147974. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  147975. __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(29, 74, __pyx_L1_error)
  147976. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  147977. __pyx_v_6uvloop_4loop_SOCK_NONBLOCK = __pyx_t_4;
  147978. /* "uvloop/includes/stdlib.pxi":76
  147979. * cdef int SOCK_NONBLOCK = getattr(socket, 'SOCK_NONBLOCK', -1)
  147980. *
  147981. * cdef socket_gaierror = socket.gaierror # <<<<<<<<<<<<<<
  147982. * cdef socket_error = socket.error
  147983. * cdef socket_timeout = socket.timeout
  147984. */
  147985. __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_socket_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 76, __pyx_L1_error)
  147986. __Pyx_GOTREF(__pyx_t_2);
  147987. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_gaierror); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 76, __pyx_L1_error)
  147988. __Pyx_GOTREF(__pyx_t_1);
  147989. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  147990. __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_socket_gaierror);
  147991. __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_socket_gaierror, __pyx_t_1);
  147992. __Pyx_GIVEREF(__pyx_t_1);
  147993. __pyx_t_1 = 0;
  147994. /* "uvloop/includes/stdlib.pxi":77
  147995. *
  147996. * cdef socket_gaierror = socket.gaierror
  147997. * cdef socket_error = socket.error # <<<<<<<<<<<<<<
  147998. * cdef socket_timeout = socket.timeout
  147999. * cdef socket_socket = socket.socket
  148000. */
  148001. __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_socket_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 77, __pyx_L1_error)
  148002. __Pyx_GOTREF(__pyx_t_1);
  148003. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_error); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 77, __pyx_L1_error)
  148004. __Pyx_GOTREF(__pyx_t_2);
  148005. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  148006. __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_socket_error);
  148007. __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_socket_error, __pyx_t_2);
  148008. __Pyx_GIVEREF(__pyx_t_2);
  148009. __pyx_t_2 = 0;
  148010. /* "uvloop/includes/stdlib.pxi":78
  148011. * cdef socket_gaierror = socket.gaierror
  148012. * cdef socket_error = socket.error
  148013. * cdef socket_timeout = socket.timeout # <<<<<<<<<<<<<<
  148014. * cdef socket_socket = socket.socket
  148015. * cdef socket_socketpair = socket.socketpair
  148016. */
  148017. __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_socket_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 78, __pyx_L1_error)
  148018. __Pyx_GOTREF(__pyx_t_2);
  148019. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_timeout); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 78, __pyx_L1_error)
  148020. __Pyx_GOTREF(__pyx_t_1);
  148021. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  148022. __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_socket_timeout);
  148023. __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_socket_timeout, __pyx_t_1);
  148024. __Pyx_GIVEREF(__pyx_t_1);
  148025. __pyx_t_1 = 0;
  148026. /* "uvloop/includes/stdlib.pxi":79
  148027. * cdef socket_error = socket.error
  148028. * cdef socket_timeout = socket.timeout
  148029. * cdef socket_socket = socket.socket # <<<<<<<<<<<<<<
  148030. * cdef socket_socketpair = socket.socketpair
  148031. * cdef socket_getservbyname = socket.getservbyname
  148032. */
  148033. __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_socket_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 79, __pyx_L1_error)
  148034. __Pyx_GOTREF(__pyx_t_1);
  148035. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_socket_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 79, __pyx_L1_error)
  148036. __Pyx_GOTREF(__pyx_t_2);
  148037. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  148038. __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_socket_socket);
  148039. __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_socket_socket, __pyx_t_2);
  148040. __Pyx_GIVEREF(__pyx_t_2);
  148041. __pyx_t_2 = 0;
  148042. /* "uvloop/includes/stdlib.pxi":80
  148043. * cdef socket_timeout = socket.timeout
  148044. * cdef socket_socket = socket.socket
  148045. * cdef socket_socketpair = socket.socketpair # <<<<<<<<<<<<<<
  148046. * cdef socket_getservbyname = socket.getservbyname
  148047. * cdef socket_AddressFamily = socket.AddressFamily
  148048. */
  148049. __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_socket_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 80, __pyx_L1_error)
  148050. __Pyx_GOTREF(__pyx_t_2);
  148051. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_socketpair); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 80, __pyx_L1_error)
  148052. __Pyx_GOTREF(__pyx_t_1);
  148053. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  148054. __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_socket_socketpair);
  148055. __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_socket_socketpair, __pyx_t_1);
  148056. __Pyx_GIVEREF(__pyx_t_1);
  148057. __pyx_t_1 = 0;
  148058. /* "uvloop/includes/stdlib.pxi":81
  148059. * cdef socket_socket = socket.socket
  148060. * cdef socket_socketpair = socket.socketpair
  148061. * cdef socket_getservbyname = socket.getservbyname # <<<<<<<<<<<<<<
  148062. * cdef socket_AddressFamily = socket.AddressFamily
  148063. * cdef socket_SocketKind = socket.SocketKind
  148064. */
  148065. __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_socket_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 81, __pyx_L1_error)
  148066. __Pyx_GOTREF(__pyx_t_1);
  148067. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_getservbyname); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 81, __pyx_L1_error)
  148068. __Pyx_GOTREF(__pyx_t_2);
  148069. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  148070. __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_socket_getservbyname);
  148071. __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_socket_getservbyname, __pyx_t_2);
  148072. __Pyx_GIVEREF(__pyx_t_2);
  148073. __pyx_t_2 = 0;
  148074. /* "uvloop/includes/stdlib.pxi":82
  148075. * cdef socket_socketpair = socket.socketpair
  148076. * cdef socket_getservbyname = socket.getservbyname
  148077. * cdef socket_AddressFamily = socket.AddressFamily # <<<<<<<<<<<<<<
  148078. * cdef socket_SocketKind = socket.SocketKind
  148079. *
  148080. */
  148081. __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_socket_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 82, __pyx_L1_error)
  148082. __Pyx_GOTREF(__pyx_t_2);
  148083. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_AddressFamily); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 82, __pyx_L1_error)
  148084. __Pyx_GOTREF(__pyx_t_1);
  148085. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  148086. __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_socket_AddressFamily);
  148087. __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_socket_AddressFamily, __pyx_t_1);
  148088. __Pyx_GIVEREF(__pyx_t_1);
  148089. __pyx_t_1 = 0;
  148090. /* "uvloop/includes/stdlib.pxi":83
  148091. * cdef socket_getservbyname = socket.getservbyname
  148092. * cdef socket_AddressFamily = socket.AddressFamily
  148093. * cdef socket_SocketKind = socket.SocketKind # <<<<<<<<<<<<<<
  148094. *
  148095. * cdef int socket_EAI_ADDRFAMILY = getattr(socket, 'EAI_ADDRFAMILY', -1)
  148096. */
  148097. __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_socket_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 83, __pyx_L1_error)
  148098. __Pyx_GOTREF(__pyx_t_1);
  148099. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_SocketKind); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 83, __pyx_L1_error)
  148100. __Pyx_GOTREF(__pyx_t_2);
  148101. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  148102. __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_socket_SocketKind);
  148103. __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_socket_SocketKind, __pyx_t_2);
  148104. __Pyx_GIVEREF(__pyx_t_2);
  148105. __pyx_t_2 = 0;
  148106. /* "uvloop/includes/stdlib.pxi":85
  148107. * cdef socket_SocketKind = socket.SocketKind
  148108. *
  148109. * cdef int socket_EAI_ADDRFAMILY = getattr(socket, 'EAI_ADDRFAMILY', -1) # <<<<<<<<<<<<<<
  148110. * cdef int socket_EAI_AGAIN = getattr(socket, 'EAI_AGAIN', -1)
  148111. * cdef int socket_EAI_BADFLAGS = getattr(socket, 'EAI_BADFLAGS', -1)
  148112. */
  148113. __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_socket_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 85, __pyx_L1_error)
  148114. __Pyx_GOTREF(__pyx_t_2);
  148115. __pyx_t_1 = __Pyx_GetAttr3(__pyx_t_2, __pyx_n_u_EAI_ADDRFAMILY, __pyx_int_neg_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 85, __pyx_L1_error)
  148116. __Pyx_GOTREF(__pyx_t_1);
  148117. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  148118. __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(29, 85, __pyx_L1_error)
  148119. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  148120. __pyx_v_6uvloop_4loop_socket_EAI_ADDRFAMILY = __pyx_t_4;
  148121. /* "uvloop/includes/stdlib.pxi":86
  148122. *
  148123. * cdef int socket_EAI_ADDRFAMILY = getattr(socket, 'EAI_ADDRFAMILY', -1)
  148124. * cdef int socket_EAI_AGAIN = getattr(socket, 'EAI_AGAIN', -1) # <<<<<<<<<<<<<<
  148125. * cdef int socket_EAI_BADFLAGS = getattr(socket, 'EAI_BADFLAGS', -1)
  148126. * cdef int socket_EAI_BADHINTS = getattr(socket, 'EAI_BADHINTS', -1)
  148127. */
  148128. __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_socket_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 86, __pyx_L1_error)
  148129. __Pyx_GOTREF(__pyx_t_1);
  148130. __pyx_t_2 = __Pyx_GetAttr3(__pyx_t_1, __pyx_n_u_EAI_AGAIN, __pyx_int_neg_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 86, __pyx_L1_error)
  148131. __Pyx_GOTREF(__pyx_t_2);
  148132. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  148133. __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(29, 86, __pyx_L1_error)
  148134. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  148135. __pyx_v_6uvloop_4loop_socket_EAI_AGAIN = __pyx_t_4;
  148136. /* "uvloop/includes/stdlib.pxi":87
  148137. * cdef int socket_EAI_ADDRFAMILY = getattr(socket, 'EAI_ADDRFAMILY', -1)
  148138. * cdef int socket_EAI_AGAIN = getattr(socket, 'EAI_AGAIN', -1)
  148139. * cdef int socket_EAI_BADFLAGS = getattr(socket, 'EAI_BADFLAGS', -1) # <<<<<<<<<<<<<<
  148140. * cdef int socket_EAI_BADHINTS = getattr(socket, 'EAI_BADHINTS', -1)
  148141. * cdef int socket_EAI_CANCELED = getattr(socket, 'EAI_CANCELED', -1)
  148142. */
  148143. __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_socket_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 87, __pyx_L1_error)
  148144. __Pyx_GOTREF(__pyx_t_2);
  148145. __pyx_t_1 = __Pyx_GetAttr3(__pyx_t_2, __pyx_n_u_EAI_BADFLAGS, __pyx_int_neg_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 87, __pyx_L1_error)
  148146. __Pyx_GOTREF(__pyx_t_1);
  148147. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  148148. __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(29, 87, __pyx_L1_error)
  148149. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  148150. __pyx_v_6uvloop_4loop_socket_EAI_BADFLAGS = __pyx_t_4;
  148151. /* "uvloop/includes/stdlib.pxi":88
  148152. * cdef int socket_EAI_AGAIN = getattr(socket, 'EAI_AGAIN', -1)
  148153. * cdef int socket_EAI_BADFLAGS = getattr(socket, 'EAI_BADFLAGS', -1)
  148154. * cdef int socket_EAI_BADHINTS = getattr(socket, 'EAI_BADHINTS', -1) # <<<<<<<<<<<<<<
  148155. * cdef int socket_EAI_CANCELED = getattr(socket, 'EAI_CANCELED', -1)
  148156. * cdef int socket_EAI_FAIL = getattr(socket, 'EAI_FAIL', -1)
  148157. */
  148158. __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_socket_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 88, __pyx_L1_error)
  148159. __Pyx_GOTREF(__pyx_t_1);
  148160. __pyx_t_2 = __Pyx_GetAttr3(__pyx_t_1, __pyx_n_u_EAI_BADHINTS, __pyx_int_neg_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 88, __pyx_L1_error)
  148161. __Pyx_GOTREF(__pyx_t_2);
  148162. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  148163. __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(29, 88, __pyx_L1_error)
  148164. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  148165. __pyx_v_6uvloop_4loop_socket_EAI_BADHINTS = __pyx_t_4;
  148166. /* "uvloop/includes/stdlib.pxi":89
  148167. * cdef int socket_EAI_BADFLAGS = getattr(socket, 'EAI_BADFLAGS', -1)
  148168. * cdef int socket_EAI_BADHINTS = getattr(socket, 'EAI_BADHINTS', -1)
  148169. * cdef int socket_EAI_CANCELED = getattr(socket, 'EAI_CANCELED', -1) # <<<<<<<<<<<<<<
  148170. * cdef int socket_EAI_FAIL = getattr(socket, 'EAI_FAIL', -1)
  148171. * cdef int socket_EAI_FAMILY = getattr(socket, 'EAI_FAMILY', -1)
  148172. */
  148173. __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_socket_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 89, __pyx_L1_error)
  148174. __Pyx_GOTREF(__pyx_t_2);
  148175. __pyx_t_1 = __Pyx_GetAttr3(__pyx_t_2, __pyx_n_u_EAI_CANCELED, __pyx_int_neg_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 89, __pyx_L1_error)
  148176. __Pyx_GOTREF(__pyx_t_1);
  148177. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  148178. __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(29, 89, __pyx_L1_error)
  148179. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  148180. __pyx_v_6uvloop_4loop_socket_EAI_CANCELED = __pyx_t_4;
  148181. /* "uvloop/includes/stdlib.pxi":90
  148182. * cdef int socket_EAI_BADHINTS = getattr(socket, 'EAI_BADHINTS', -1)
  148183. * cdef int socket_EAI_CANCELED = getattr(socket, 'EAI_CANCELED', -1)
  148184. * cdef int socket_EAI_FAIL = getattr(socket, 'EAI_FAIL', -1) # <<<<<<<<<<<<<<
  148185. * cdef int socket_EAI_FAMILY = getattr(socket, 'EAI_FAMILY', -1)
  148186. * cdef int socket_EAI_MEMORY = getattr(socket, 'EAI_MEMORY', -1)
  148187. */
  148188. __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_socket_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 90, __pyx_L1_error)
  148189. __Pyx_GOTREF(__pyx_t_1);
  148190. __pyx_t_2 = __Pyx_GetAttr3(__pyx_t_1, __pyx_n_u_EAI_FAIL, __pyx_int_neg_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 90, __pyx_L1_error)
  148191. __Pyx_GOTREF(__pyx_t_2);
  148192. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  148193. __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(29, 90, __pyx_L1_error)
  148194. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  148195. __pyx_v_6uvloop_4loop_socket_EAI_FAIL = __pyx_t_4;
  148196. /* "uvloop/includes/stdlib.pxi":91
  148197. * cdef int socket_EAI_CANCELED = getattr(socket, 'EAI_CANCELED', -1)
  148198. * cdef int socket_EAI_FAIL = getattr(socket, 'EAI_FAIL', -1)
  148199. * cdef int socket_EAI_FAMILY = getattr(socket, 'EAI_FAMILY', -1) # <<<<<<<<<<<<<<
  148200. * cdef int socket_EAI_MEMORY = getattr(socket, 'EAI_MEMORY', -1)
  148201. * cdef int socket_EAI_NODATA = getattr(socket, 'EAI_NODATA', -1)
  148202. */
  148203. __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_socket_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 91, __pyx_L1_error)
  148204. __Pyx_GOTREF(__pyx_t_2);
  148205. __pyx_t_1 = __Pyx_GetAttr3(__pyx_t_2, __pyx_n_u_EAI_FAMILY, __pyx_int_neg_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 91, __pyx_L1_error)
  148206. __Pyx_GOTREF(__pyx_t_1);
  148207. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  148208. __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(29, 91, __pyx_L1_error)
  148209. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  148210. __pyx_v_6uvloop_4loop_socket_EAI_FAMILY = __pyx_t_4;
  148211. /* "uvloop/includes/stdlib.pxi":92
  148212. * cdef int socket_EAI_FAIL = getattr(socket, 'EAI_FAIL', -1)
  148213. * cdef int socket_EAI_FAMILY = getattr(socket, 'EAI_FAMILY', -1)
  148214. * cdef int socket_EAI_MEMORY = getattr(socket, 'EAI_MEMORY', -1) # <<<<<<<<<<<<<<
  148215. * cdef int socket_EAI_NODATA = getattr(socket, 'EAI_NODATA', -1)
  148216. * cdef int socket_EAI_NONAME = getattr(socket, 'EAI_NONAME', -1)
  148217. */
  148218. __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_socket_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 92, __pyx_L1_error)
  148219. __Pyx_GOTREF(__pyx_t_1);
  148220. __pyx_t_2 = __Pyx_GetAttr3(__pyx_t_1, __pyx_n_u_EAI_MEMORY, __pyx_int_neg_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 92, __pyx_L1_error)
  148221. __Pyx_GOTREF(__pyx_t_2);
  148222. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  148223. __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(29, 92, __pyx_L1_error)
  148224. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  148225. __pyx_v_6uvloop_4loop_socket_EAI_MEMORY = __pyx_t_4;
  148226. /* "uvloop/includes/stdlib.pxi":93
  148227. * cdef int socket_EAI_FAMILY = getattr(socket, 'EAI_FAMILY', -1)
  148228. * cdef int socket_EAI_MEMORY = getattr(socket, 'EAI_MEMORY', -1)
  148229. * cdef int socket_EAI_NODATA = getattr(socket, 'EAI_NODATA', -1) # <<<<<<<<<<<<<<
  148230. * cdef int socket_EAI_NONAME = getattr(socket, 'EAI_NONAME', -1)
  148231. * cdef int socket_EAI_OVERFLOW = getattr(socket, 'EAI_OVERFLOW', -1)
  148232. */
  148233. __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_socket_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 93, __pyx_L1_error)
  148234. __Pyx_GOTREF(__pyx_t_2);
  148235. __pyx_t_1 = __Pyx_GetAttr3(__pyx_t_2, __pyx_n_u_EAI_NODATA, __pyx_int_neg_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 93, __pyx_L1_error)
  148236. __Pyx_GOTREF(__pyx_t_1);
  148237. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  148238. __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(29, 93, __pyx_L1_error)
  148239. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  148240. __pyx_v_6uvloop_4loop_socket_EAI_NODATA = __pyx_t_4;
  148241. /* "uvloop/includes/stdlib.pxi":94
  148242. * cdef int socket_EAI_MEMORY = getattr(socket, 'EAI_MEMORY', -1)
  148243. * cdef int socket_EAI_NODATA = getattr(socket, 'EAI_NODATA', -1)
  148244. * cdef int socket_EAI_NONAME = getattr(socket, 'EAI_NONAME', -1) # <<<<<<<<<<<<<<
  148245. * cdef int socket_EAI_OVERFLOW = getattr(socket, 'EAI_OVERFLOW', -1)
  148246. * cdef int socket_EAI_PROTOCOL = getattr(socket, 'EAI_PROTOCOL', -1)
  148247. */
  148248. __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_socket_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 94, __pyx_L1_error)
  148249. __Pyx_GOTREF(__pyx_t_1);
  148250. __pyx_t_2 = __Pyx_GetAttr3(__pyx_t_1, __pyx_n_u_EAI_NONAME, __pyx_int_neg_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 94, __pyx_L1_error)
  148251. __Pyx_GOTREF(__pyx_t_2);
  148252. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  148253. __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(29, 94, __pyx_L1_error)
  148254. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  148255. __pyx_v_6uvloop_4loop_socket_EAI_NONAME = __pyx_t_4;
  148256. /* "uvloop/includes/stdlib.pxi":95
  148257. * cdef int socket_EAI_NODATA = getattr(socket, 'EAI_NODATA', -1)
  148258. * cdef int socket_EAI_NONAME = getattr(socket, 'EAI_NONAME', -1)
  148259. * cdef int socket_EAI_OVERFLOW = getattr(socket, 'EAI_OVERFLOW', -1) # <<<<<<<<<<<<<<
  148260. * cdef int socket_EAI_PROTOCOL = getattr(socket, 'EAI_PROTOCOL', -1)
  148261. * cdef int socket_EAI_SERVICE = getattr(socket, 'EAI_SERVICE', -1)
  148262. */
  148263. __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_socket_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 95, __pyx_L1_error)
  148264. __Pyx_GOTREF(__pyx_t_2);
  148265. __pyx_t_1 = __Pyx_GetAttr3(__pyx_t_2, __pyx_n_u_EAI_OVERFLOW, __pyx_int_neg_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 95, __pyx_L1_error)
  148266. __Pyx_GOTREF(__pyx_t_1);
  148267. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  148268. __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(29, 95, __pyx_L1_error)
  148269. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  148270. __pyx_v_6uvloop_4loop_socket_EAI_OVERFLOW = __pyx_t_4;
  148271. /* "uvloop/includes/stdlib.pxi":96
  148272. * cdef int socket_EAI_NONAME = getattr(socket, 'EAI_NONAME', -1)
  148273. * cdef int socket_EAI_OVERFLOW = getattr(socket, 'EAI_OVERFLOW', -1)
  148274. * cdef int socket_EAI_PROTOCOL = getattr(socket, 'EAI_PROTOCOL', -1) # <<<<<<<<<<<<<<
  148275. * cdef int socket_EAI_SERVICE = getattr(socket, 'EAI_SERVICE', -1)
  148276. * cdef int socket_EAI_SOCKTYPE = getattr(socket, 'EAI_SOCKTYPE', -1)
  148277. */
  148278. __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_socket_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 96, __pyx_L1_error)
  148279. __Pyx_GOTREF(__pyx_t_1);
  148280. __pyx_t_2 = __Pyx_GetAttr3(__pyx_t_1, __pyx_n_u_EAI_PROTOCOL, __pyx_int_neg_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 96, __pyx_L1_error)
  148281. __Pyx_GOTREF(__pyx_t_2);
  148282. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  148283. __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(29, 96, __pyx_L1_error)
  148284. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  148285. __pyx_v_6uvloop_4loop_socket_EAI_PROTOCOL = __pyx_t_4;
  148286. /* "uvloop/includes/stdlib.pxi":97
  148287. * cdef int socket_EAI_OVERFLOW = getattr(socket, 'EAI_OVERFLOW', -1)
  148288. * cdef int socket_EAI_PROTOCOL = getattr(socket, 'EAI_PROTOCOL', -1)
  148289. * cdef int socket_EAI_SERVICE = getattr(socket, 'EAI_SERVICE', -1) # <<<<<<<<<<<<<<
  148290. * cdef int socket_EAI_SOCKTYPE = getattr(socket, 'EAI_SOCKTYPE', -1)
  148291. *
  148292. */
  148293. __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_socket_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 97, __pyx_L1_error)
  148294. __Pyx_GOTREF(__pyx_t_2);
  148295. __pyx_t_1 = __Pyx_GetAttr3(__pyx_t_2, __pyx_n_u_EAI_SERVICE, __pyx_int_neg_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 97, __pyx_L1_error)
  148296. __Pyx_GOTREF(__pyx_t_1);
  148297. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  148298. __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(29, 97, __pyx_L1_error)
  148299. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  148300. __pyx_v_6uvloop_4loop_socket_EAI_SERVICE = __pyx_t_4;
  148301. /* "uvloop/includes/stdlib.pxi":98
  148302. * cdef int socket_EAI_PROTOCOL = getattr(socket, 'EAI_PROTOCOL', -1)
  148303. * cdef int socket_EAI_SERVICE = getattr(socket, 'EAI_SERVICE', -1)
  148304. * cdef int socket_EAI_SOCKTYPE = getattr(socket, 'EAI_SOCKTYPE', -1) # <<<<<<<<<<<<<<
  148305. *
  148306. *
  148307. */
  148308. __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_socket_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 98, __pyx_L1_error)
  148309. __Pyx_GOTREF(__pyx_t_1);
  148310. __pyx_t_2 = __Pyx_GetAttr3(__pyx_t_1, __pyx_n_u_EAI_SOCKTYPE, __pyx_int_neg_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 98, __pyx_L1_error)
  148311. __Pyx_GOTREF(__pyx_t_2);
  148312. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  148313. __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(29, 98, __pyx_L1_error)
  148314. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  148315. __pyx_v_6uvloop_4loop_socket_EAI_SOCKTYPE = __pyx_t_4;
  148316. /* "uvloop/includes/stdlib.pxi":101
  148317. *
  148318. *
  148319. * cdef str os_name = os.name # <<<<<<<<<<<<<<
  148320. * cdef os_environ = os.environ
  148321. * cdef os_dup = os.dup
  148322. */
  148323. __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_os); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 101, __pyx_L1_error)
  148324. __Pyx_GOTREF(__pyx_t_2);
  148325. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 101, __pyx_L1_error)
  148326. __Pyx_GOTREF(__pyx_t_1);
  148327. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  148328. if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(29, 101, __pyx_L1_error)
  148329. __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_os_name);
  148330. __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_os_name, ((PyObject*)__pyx_t_1));
  148331. __Pyx_GIVEREF(__pyx_t_1);
  148332. __pyx_t_1 = 0;
  148333. /* "uvloop/includes/stdlib.pxi":102
  148334. *
  148335. * cdef str os_name = os.name
  148336. * cdef os_environ = os.environ # <<<<<<<<<<<<<<
  148337. * cdef os_dup = os.dup
  148338. * cdef os_set_inheritable = os.set_inheritable
  148339. */
  148340. __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_os); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 102, __pyx_L1_error)
  148341. __Pyx_GOTREF(__pyx_t_1);
  148342. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_environ); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 102, __pyx_L1_error)
  148343. __Pyx_GOTREF(__pyx_t_2);
  148344. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  148345. __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_os_environ);
  148346. __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_os_environ, __pyx_t_2);
  148347. __Pyx_GIVEREF(__pyx_t_2);
  148348. __pyx_t_2 = 0;
  148349. /* "uvloop/includes/stdlib.pxi":103
  148350. * cdef str os_name = os.name
  148351. * cdef os_environ = os.environ
  148352. * cdef os_dup = os.dup # <<<<<<<<<<<<<<
  148353. * cdef os_set_inheritable = os.set_inheritable
  148354. * cdef os_get_inheritable = os.get_inheritable
  148355. */
  148356. __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_os); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 103, __pyx_L1_error)
  148357. __Pyx_GOTREF(__pyx_t_2);
  148358. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_dup); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 103, __pyx_L1_error)
  148359. __Pyx_GOTREF(__pyx_t_1);
  148360. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  148361. __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_os_dup);
  148362. __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_os_dup, __pyx_t_1);
  148363. __Pyx_GIVEREF(__pyx_t_1);
  148364. __pyx_t_1 = 0;
  148365. /* "uvloop/includes/stdlib.pxi":104
  148366. * cdef os_environ = os.environ
  148367. * cdef os_dup = os.dup
  148368. * cdef os_set_inheritable = os.set_inheritable # <<<<<<<<<<<<<<
  148369. * cdef os_get_inheritable = os.get_inheritable
  148370. * cdef os_close = os.close
  148371. */
  148372. __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_os); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 104, __pyx_L1_error)
  148373. __Pyx_GOTREF(__pyx_t_1);
  148374. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_set_inheritable); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 104, __pyx_L1_error)
  148375. __Pyx_GOTREF(__pyx_t_2);
  148376. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  148377. __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_os_set_inheritable);
  148378. __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_os_set_inheritable, __pyx_t_2);
  148379. __Pyx_GIVEREF(__pyx_t_2);
  148380. __pyx_t_2 = 0;
  148381. /* "uvloop/includes/stdlib.pxi":105
  148382. * cdef os_dup = os.dup
  148383. * cdef os_set_inheritable = os.set_inheritable
  148384. * cdef os_get_inheritable = os.get_inheritable # <<<<<<<<<<<<<<
  148385. * cdef os_close = os.close
  148386. * cdef os_open = os.open
  148387. */
  148388. __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_os); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 105, __pyx_L1_error)
  148389. __Pyx_GOTREF(__pyx_t_2);
  148390. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_get_inheritable); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 105, __pyx_L1_error)
  148391. __Pyx_GOTREF(__pyx_t_1);
  148392. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  148393. __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_os_get_inheritable);
  148394. __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_os_get_inheritable, __pyx_t_1);
  148395. __Pyx_GIVEREF(__pyx_t_1);
  148396. __pyx_t_1 = 0;
  148397. /* "uvloop/includes/stdlib.pxi":106
  148398. * cdef os_set_inheritable = os.set_inheritable
  148399. * cdef os_get_inheritable = os.get_inheritable
  148400. * cdef os_close = os.close # <<<<<<<<<<<<<<
  148401. * cdef os_open = os.open
  148402. * cdef os_devnull = os.devnull
  148403. */
  148404. __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_os); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 106, __pyx_L1_error)
  148405. __Pyx_GOTREF(__pyx_t_1);
  148406. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_close); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 106, __pyx_L1_error)
  148407. __Pyx_GOTREF(__pyx_t_2);
  148408. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  148409. __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_os_close);
  148410. __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_os_close, __pyx_t_2);
  148411. __Pyx_GIVEREF(__pyx_t_2);
  148412. __pyx_t_2 = 0;
  148413. /* "uvloop/includes/stdlib.pxi":107
  148414. * cdef os_get_inheritable = os.get_inheritable
  148415. * cdef os_close = os.close
  148416. * cdef os_open = os.open # <<<<<<<<<<<<<<
  148417. * cdef os_devnull = os.devnull
  148418. * cdef os_O_RDWR = os.O_RDWR
  148419. */
  148420. __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_os); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 107, __pyx_L1_error)
  148421. __Pyx_GOTREF(__pyx_t_2);
  148422. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_open); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 107, __pyx_L1_error)
  148423. __Pyx_GOTREF(__pyx_t_1);
  148424. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  148425. __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_os_open);
  148426. __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_os_open, __pyx_t_1);
  148427. __Pyx_GIVEREF(__pyx_t_1);
  148428. __pyx_t_1 = 0;
  148429. /* "uvloop/includes/stdlib.pxi":108
  148430. * cdef os_close = os.close
  148431. * cdef os_open = os.open
  148432. * cdef os_devnull = os.devnull # <<<<<<<<<<<<<<
  148433. * cdef os_O_RDWR = os.O_RDWR
  148434. * cdef os_pipe = os.pipe
  148435. */
  148436. __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_os); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 108, __pyx_L1_error)
  148437. __Pyx_GOTREF(__pyx_t_1);
  148438. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_devnull); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 108, __pyx_L1_error)
  148439. __Pyx_GOTREF(__pyx_t_2);
  148440. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  148441. __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_os_devnull);
  148442. __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_os_devnull, __pyx_t_2);
  148443. __Pyx_GIVEREF(__pyx_t_2);
  148444. __pyx_t_2 = 0;
  148445. /* "uvloop/includes/stdlib.pxi":109
  148446. * cdef os_open = os.open
  148447. * cdef os_devnull = os.devnull
  148448. * cdef os_O_RDWR = os.O_RDWR # <<<<<<<<<<<<<<
  148449. * cdef os_pipe = os.pipe
  148450. * cdef os_read = os.read
  148451. */
  148452. __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_os); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 109, __pyx_L1_error)
  148453. __Pyx_GOTREF(__pyx_t_2);
  148454. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_O_RDWR); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 109, __pyx_L1_error)
  148455. __Pyx_GOTREF(__pyx_t_1);
  148456. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  148457. __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_os_O_RDWR);
  148458. __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_os_O_RDWR, __pyx_t_1);
  148459. __Pyx_GIVEREF(__pyx_t_1);
  148460. __pyx_t_1 = 0;
  148461. /* "uvloop/includes/stdlib.pxi":110
  148462. * cdef os_devnull = os.devnull
  148463. * cdef os_O_RDWR = os.O_RDWR
  148464. * cdef os_pipe = os.pipe # <<<<<<<<<<<<<<
  148465. * cdef os_read = os.read
  148466. * cdef os_remove = os.remove
  148467. */
  148468. __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_os); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 110, __pyx_L1_error)
  148469. __Pyx_GOTREF(__pyx_t_1);
  148470. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_pipe); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 110, __pyx_L1_error)
  148471. __Pyx_GOTREF(__pyx_t_2);
  148472. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  148473. __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_os_pipe);
  148474. __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_os_pipe, __pyx_t_2);
  148475. __Pyx_GIVEREF(__pyx_t_2);
  148476. __pyx_t_2 = 0;
  148477. /* "uvloop/includes/stdlib.pxi":111
  148478. * cdef os_O_RDWR = os.O_RDWR
  148479. * cdef os_pipe = os.pipe
  148480. * cdef os_read = os.read # <<<<<<<<<<<<<<
  148481. * cdef os_remove = os.remove
  148482. * cdef os_stat = os.stat
  148483. */
  148484. __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_os); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 111, __pyx_L1_error)
  148485. __Pyx_GOTREF(__pyx_t_2);
  148486. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_read); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 111, __pyx_L1_error)
  148487. __Pyx_GOTREF(__pyx_t_1);
  148488. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  148489. __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_os_read);
  148490. __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_os_read, __pyx_t_1);
  148491. __Pyx_GIVEREF(__pyx_t_1);
  148492. __pyx_t_1 = 0;
  148493. /* "uvloop/includes/stdlib.pxi":112
  148494. * cdef os_pipe = os.pipe
  148495. * cdef os_read = os.read
  148496. * cdef os_remove = os.remove # <<<<<<<<<<<<<<
  148497. * cdef os_stat = os.stat
  148498. *
  148499. */
  148500. __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_os); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 112, __pyx_L1_error)
  148501. __Pyx_GOTREF(__pyx_t_1);
  148502. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_remove); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 112, __pyx_L1_error)
  148503. __Pyx_GOTREF(__pyx_t_2);
  148504. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  148505. __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_os_remove);
  148506. __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_os_remove, __pyx_t_2);
  148507. __Pyx_GIVEREF(__pyx_t_2);
  148508. __pyx_t_2 = 0;
  148509. /* "uvloop/includes/stdlib.pxi":113
  148510. * cdef os_read = os.read
  148511. * cdef os_remove = os.remove
  148512. * cdef os_stat = os.stat # <<<<<<<<<<<<<<
  148513. *
  148514. * cdef stat_S_ISSOCK = stat.S_ISSOCK
  148515. */
  148516. __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_os); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 113, __pyx_L1_error)
  148517. __Pyx_GOTREF(__pyx_t_2);
  148518. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_stat); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 113, __pyx_L1_error)
  148519. __Pyx_GOTREF(__pyx_t_1);
  148520. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  148521. __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_os_stat);
  148522. __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_os_stat, __pyx_t_1);
  148523. __Pyx_GIVEREF(__pyx_t_1);
  148524. __pyx_t_1 = 0;
  148525. /* "uvloop/includes/stdlib.pxi":115
  148526. * cdef os_stat = os.stat
  148527. *
  148528. * cdef stat_S_ISSOCK = stat.S_ISSOCK # <<<<<<<<<<<<<<
  148529. *
  148530. * cdef sys_ignore_environment = sys.flags.ignore_environment
  148531. */
  148532. __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_stat); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 115, __pyx_L1_error)
  148533. __Pyx_GOTREF(__pyx_t_1);
  148534. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_S_ISSOCK); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 115, __pyx_L1_error)
  148535. __Pyx_GOTREF(__pyx_t_2);
  148536. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  148537. __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_stat_S_ISSOCK);
  148538. __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_stat_S_ISSOCK, __pyx_t_2);
  148539. __Pyx_GIVEREF(__pyx_t_2);
  148540. __pyx_t_2 = 0;
  148541. /* "uvloop/includes/stdlib.pxi":117
  148542. * cdef stat_S_ISSOCK = stat.S_ISSOCK
  148543. *
  148544. * cdef sys_ignore_environment = sys.flags.ignore_environment # <<<<<<<<<<<<<<
  148545. * cdef sys_exc_info = sys.exc_info
  148546. * cdef sys_set_coroutine_wrapper = getattr(sys, 'set_coroutine_wrapper', None)
  148547. */
  148548. __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_sys); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 117, __pyx_L1_error)
  148549. __Pyx_GOTREF(__pyx_t_2);
  148550. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 117, __pyx_L1_error)
  148551. __Pyx_GOTREF(__pyx_t_1);
  148552. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  148553. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_ignore_environment); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 117, __pyx_L1_error)
  148554. __Pyx_GOTREF(__pyx_t_2);
  148555. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  148556. __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_sys_ignore_environment);
  148557. __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_sys_ignore_environment, __pyx_t_2);
  148558. __Pyx_GIVEREF(__pyx_t_2);
  148559. __pyx_t_2 = 0;
  148560. /* "uvloop/includes/stdlib.pxi":118
  148561. *
  148562. * cdef sys_ignore_environment = sys.flags.ignore_environment
  148563. * cdef sys_exc_info = sys.exc_info # <<<<<<<<<<<<<<
  148564. * cdef sys_set_coroutine_wrapper = getattr(sys, 'set_coroutine_wrapper', None)
  148565. * cdef sys_get_coroutine_wrapper = getattr(sys, 'get_coroutine_wrapper', None)
  148566. */
  148567. __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_sys); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 118, __pyx_L1_error)
  148568. __Pyx_GOTREF(__pyx_t_2);
  148569. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_exc_info); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 118, __pyx_L1_error)
  148570. __Pyx_GOTREF(__pyx_t_1);
  148571. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  148572. __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_sys_exc_info);
  148573. __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_sys_exc_info, __pyx_t_1);
  148574. __Pyx_GIVEREF(__pyx_t_1);
  148575. __pyx_t_1 = 0;
  148576. /* "uvloop/includes/stdlib.pxi":119
  148577. * cdef sys_ignore_environment = sys.flags.ignore_environment
  148578. * cdef sys_exc_info = sys.exc_info
  148579. * cdef sys_set_coroutine_wrapper = getattr(sys, 'set_coroutine_wrapper', None) # <<<<<<<<<<<<<<
  148580. * cdef sys_get_coroutine_wrapper = getattr(sys, 'get_coroutine_wrapper', None)
  148581. * cdef sys_getframe = sys._getframe
  148582. */
  148583. __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 119, __pyx_L1_error)
  148584. __Pyx_GOTREF(__pyx_t_1);
  148585. __pyx_t_2 = __Pyx_GetAttr3(__pyx_t_1, __pyx_n_u_set_coroutine_wrapper, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 119, __pyx_L1_error)
  148586. __Pyx_GOTREF(__pyx_t_2);
  148587. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  148588. __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_sys_set_coroutine_wrapper);
  148589. __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_sys_set_coroutine_wrapper, __pyx_t_2);
  148590. __Pyx_GIVEREF(__pyx_t_2);
  148591. __pyx_t_2 = 0;
  148592. /* "uvloop/includes/stdlib.pxi":120
  148593. * cdef sys_exc_info = sys.exc_info
  148594. * cdef sys_set_coroutine_wrapper = getattr(sys, 'set_coroutine_wrapper', None)
  148595. * cdef sys_get_coroutine_wrapper = getattr(sys, 'get_coroutine_wrapper', None) # <<<<<<<<<<<<<<
  148596. * cdef sys_getframe = sys._getframe
  148597. * cdef sys_version_info = sys.version_info
  148598. */
  148599. __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_sys); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 120, __pyx_L1_error)
  148600. __Pyx_GOTREF(__pyx_t_2);
  148601. __pyx_t_1 = __Pyx_GetAttr3(__pyx_t_2, __pyx_n_u_get_coroutine_wrapper, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 120, __pyx_L1_error)
  148602. __Pyx_GOTREF(__pyx_t_1);
  148603. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  148604. __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_sys_get_coroutine_wrapper);
  148605. __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_sys_get_coroutine_wrapper, __pyx_t_1);
  148606. __Pyx_GIVEREF(__pyx_t_1);
  148607. __pyx_t_1 = 0;
  148608. /* "uvloop/includes/stdlib.pxi":121
  148609. * cdef sys_set_coroutine_wrapper = getattr(sys, 'set_coroutine_wrapper', None)
  148610. * cdef sys_get_coroutine_wrapper = getattr(sys, 'get_coroutine_wrapper', None)
  148611. * cdef sys_getframe = sys._getframe # <<<<<<<<<<<<<<
  148612. * cdef sys_version_info = sys.version_info
  148613. * cdef sys_getfilesystemencoding = sys.getfilesystemencoding
  148614. */
  148615. __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 121, __pyx_L1_error)
  148616. __Pyx_GOTREF(__pyx_t_1);
  148617. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_getframe); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 121, __pyx_L1_error)
  148618. __Pyx_GOTREF(__pyx_t_2);
  148619. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  148620. __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_sys_getframe);
  148621. __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_sys_getframe, __pyx_t_2);
  148622. __Pyx_GIVEREF(__pyx_t_2);
  148623. __pyx_t_2 = 0;
  148624. /* "uvloop/includes/stdlib.pxi":122
  148625. * cdef sys_get_coroutine_wrapper = getattr(sys, 'get_coroutine_wrapper', None)
  148626. * cdef sys_getframe = sys._getframe
  148627. * cdef sys_version_info = sys.version_info # <<<<<<<<<<<<<<
  148628. * cdef sys_getfilesystemencoding = sys.getfilesystemencoding
  148629. * cdef str sys_platform = sys.platform
  148630. */
  148631. __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_sys); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 122, __pyx_L1_error)
  148632. __Pyx_GOTREF(__pyx_t_2);
  148633. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_version_info); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 122, __pyx_L1_error)
  148634. __Pyx_GOTREF(__pyx_t_1);
  148635. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  148636. __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_sys_version_info);
  148637. __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_sys_version_info, __pyx_t_1);
  148638. __Pyx_GIVEREF(__pyx_t_1);
  148639. __pyx_t_1 = 0;
  148640. /* "uvloop/includes/stdlib.pxi":123
  148641. * cdef sys_getframe = sys._getframe
  148642. * cdef sys_version_info = sys.version_info
  148643. * cdef sys_getfilesystemencoding = sys.getfilesystemencoding # <<<<<<<<<<<<<<
  148644. * cdef str sys_platform = sys.platform
  148645. *
  148646. */
  148647. __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 123, __pyx_L1_error)
  148648. __Pyx_GOTREF(__pyx_t_1);
  148649. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_getfilesystemencoding); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 123, __pyx_L1_error)
  148650. __Pyx_GOTREF(__pyx_t_2);
  148651. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  148652. __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_sys_getfilesystemencoding);
  148653. __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_sys_getfilesystemencoding, __pyx_t_2);
  148654. __Pyx_GIVEREF(__pyx_t_2);
  148655. __pyx_t_2 = 0;
  148656. /* "uvloop/includes/stdlib.pxi":124
  148657. * cdef sys_version_info = sys.version_info
  148658. * cdef sys_getfilesystemencoding = sys.getfilesystemencoding
  148659. * cdef str sys_platform = sys.platform # <<<<<<<<<<<<<<
  148660. *
  148661. * cdef ssl_SSLContext = ssl.SSLContext
  148662. */
  148663. __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_sys); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 124, __pyx_L1_error)
  148664. __Pyx_GOTREF(__pyx_t_2);
  148665. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_platform); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 124, __pyx_L1_error)
  148666. __Pyx_GOTREF(__pyx_t_1);
  148667. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  148668. if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(29, 124, __pyx_L1_error)
  148669. __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_sys_platform);
  148670. __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_sys_platform, ((PyObject*)__pyx_t_1));
  148671. __Pyx_GIVEREF(__pyx_t_1);
  148672. __pyx_t_1 = 0;
  148673. /* "uvloop/includes/stdlib.pxi":126
  148674. * cdef str sys_platform = sys.platform
  148675. *
  148676. * cdef ssl_SSLContext = ssl.SSLContext # <<<<<<<<<<<<<<
  148677. * cdef ssl_MemoryBIO = ssl.MemoryBIO
  148678. * cdef ssl_create_default_context = ssl.create_default_context
  148679. */
  148680. __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ssl); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 126, __pyx_L1_error)
  148681. __Pyx_GOTREF(__pyx_t_1);
  148682. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_SSLContext); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 126, __pyx_L1_error)
  148683. __Pyx_GOTREF(__pyx_t_2);
  148684. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  148685. __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_ssl_SSLContext);
  148686. __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_ssl_SSLContext, __pyx_t_2);
  148687. __Pyx_GIVEREF(__pyx_t_2);
  148688. __pyx_t_2 = 0;
  148689. /* "uvloop/includes/stdlib.pxi":127
  148690. *
  148691. * cdef ssl_SSLContext = ssl.SSLContext
  148692. * cdef ssl_MemoryBIO = ssl.MemoryBIO # <<<<<<<<<<<<<<
  148693. * cdef ssl_create_default_context = ssl.create_default_context
  148694. * cdef ssl_SSLError = ssl.SSLError
  148695. */
  148696. __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ssl); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 127, __pyx_L1_error)
  148697. __Pyx_GOTREF(__pyx_t_2);
  148698. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_MemoryBIO); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 127, __pyx_L1_error)
  148699. __Pyx_GOTREF(__pyx_t_1);
  148700. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  148701. __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_ssl_MemoryBIO);
  148702. __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_ssl_MemoryBIO, __pyx_t_1);
  148703. __Pyx_GIVEREF(__pyx_t_1);
  148704. __pyx_t_1 = 0;
  148705. /* "uvloop/includes/stdlib.pxi":128
  148706. * cdef ssl_SSLContext = ssl.SSLContext
  148707. * cdef ssl_MemoryBIO = ssl.MemoryBIO
  148708. * cdef ssl_create_default_context = ssl.create_default_context # <<<<<<<<<<<<<<
  148709. * cdef ssl_SSLError = ssl.SSLError
  148710. * cdef ssl_SSLAgainErrors = (ssl.SSLWantReadError, ssl.SSLSyscallError)
  148711. */
  148712. __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ssl); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 128, __pyx_L1_error)
  148713. __Pyx_GOTREF(__pyx_t_1);
  148714. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_create_default_context); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 128, __pyx_L1_error)
  148715. __Pyx_GOTREF(__pyx_t_2);
  148716. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  148717. __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_ssl_create_default_context);
  148718. __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_ssl_create_default_context, __pyx_t_2);
  148719. __Pyx_GIVEREF(__pyx_t_2);
  148720. __pyx_t_2 = 0;
  148721. /* "uvloop/includes/stdlib.pxi":129
  148722. * cdef ssl_MemoryBIO = ssl.MemoryBIO
  148723. * cdef ssl_create_default_context = ssl.create_default_context
  148724. * cdef ssl_SSLError = ssl.SSLError # <<<<<<<<<<<<<<
  148725. * cdef ssl_SSLAgainErrors = (ssl.SSLWantReadError, ssl.SSLSyscallError)
  148726. * cdef ssl_CertificateError = ssl.CertificateError
  148727. */
  148728. __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ssl); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 129, __pyx_L1_error)
  148729. __Pyx_GOTREF(__pyx_t_2);
  148730. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_SSLError); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 129, __pyx_L1_error)
  148731. __Pyx_GOTREF(__pyx_t_1);
  148732. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  148733. __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_ssl_SSLError);
  148734. __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_ssl_SSLError, __pyx_t_1);
  148735. __Pyx_GIVEREF(__pyx_t_1);
  148736. __pyx_t_1 = 0;
  148737. /* "uvloop/includes/stdlib.pxi":130
  148738. * cdef ssl_create_default_context = ssl.create_default_context
  148739. * cdef ssl_SSLError = ssl.SSLError
  148740. * cdef ssl_SSLAgainErrors = (ssl.SSLWantReadError, ssl.SSLSyscallError) # <<<<<<<<<<<<<<
  148741. * cdef ssl_CertificateError = ssl.CertificateError
  148742. * cdef int ssl_SSL_ERROR_WANT_READ = ssl.SSL_ERROR_WANT_READ
  148743. */
  148744. __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ssl); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 130, __pyx_L1_error)
  148745. __Pyx_GOTREF(__pyx_t_1);
  148746. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_SSLWantReadError); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 130, __pyx_L1_error)
  148747. __Pyx_GOTREF(__pyx_t_2);
  148748. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  148749. __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ssl); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 130, __pyx_L1_error)
  148750. __Pyx_GOTREF(__pyx_t_1);
  148751. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_SSLSyscallError); if (unlikely(!__pyx_t_5)) __PYX_ERR(29, 130, __pyx_L1_error)
  148752. __Pyx_GOTREF(__pyx_t_5);
  148753. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  148754. __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 130, __pyx_L1_error)
  148755. __Pyx_GOTREF(__pyx_t_1);
  148756. __Pyx_GIVEREF(__pyx_t_2);
  148757. PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  148758. __Pyx_GIVEREF(__pyx_t_5);
  148759. PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_5);
  148760. __pyx_t_2 = 0;
  148761. __pyx_t_5 = 0;
  148762. __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_ssl_SSLAgainErrors);
  148763. __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_ssl_SSLAgainErrors, __pyx_t_1);
  148764. __Pyx_GIVEREF(__pyx_t_1);
  148765. __pyx_t_1 = 0;
  148766. /* "uvloop/includes/stdlib.pxi":131
  148767. * cdef ssl_SSLError = ssl.SSLError
  148768. * cdef ssl_SSLAgainErrors = (ssl.SSLWantReadError, ssl.SSLSyscallError)
  148769. * cdef ssl_CertificateError = ssl.CertificateError # <<<<<<<<<<<<<<
  148770. * cdef int ssl_SSL_ERROR_WANT_READ = ssl.SSL_ERROR_WANT_READ
  148771. * cdef int ssl_SSL_ERROR_WANT_WRITE = ssl.SSL_ERROR_WANT_WRITE
  148772. */
  148773. __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ssl); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 131, __pyx_L1_error)
  148774. __Pyx_GOTREF(__pyx_t_1);
  148775. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_CertificateError); if (unlikely(!__pyx_t_5)) __PYX_ERR(29, 131, __pyx_L1_error)
  148776. __Pyx_GOTREF(__pyx_t_5);
  148777. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  148778. __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_ssl_CertificateError);
  148779. __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_ssl_CertificateError, __pyx_t_5);
  148780. __Pyx_GIVEREF(__pyx_t_5);
  148781. __pyx_t_5 = 0;
  148782. /* "uvloop/includes/stdlib.pxi":132
  148783. * cdef ssl_SSLAgainErrors = (ssl.SSLWantReadError, ssl.SSLSyscallError)
  148784. * cdef ssl_CertificateError = ssl.CertificateError
  148785. * cdef int ssl_SSL_ERROR_WANT_READ = ssl.SSL_ERROR_WANT_READ # <<<<<<<<<<<<<<
  148786. * cdef int ssl_SSL_ERROR_WANT_WRITE = ssl.SSL_ERROR_WANT_WRITE
  148787. * cdef int ssl_SSL_ERROR_SYSCALL = ssl.SSL_ERROR_SYSCALL
  148788. */
  148789. __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_ssl); if (unlikely(!__pyx_t_5)) __PYX_ERR(29, 132, __pyx_L1_error)
  148790. __Pyx_GOTREF(__pyx_t_5);
  148791. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_SSL_ERROR_WANT_READ); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 132, __pyx_L1_error)
  148792. __Pyx_GOTREF(__pyx_t_1);
  148793. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  148794. __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(29, 132, __pyx_L1_error)
  148795. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  148796. __pyx_v_6uvloop_4loop_ssl_SSL_ERROR_WANT_READ = __pyx_t_4;
  148797. /* "uvloop/includes/stdlib.pxi":133
  148798. * cdef ssl_CertificateError = ssl.CertificateError
  148799. * cdef int ssl_SSL_ERROR_WANT_READ = ssl.SSL_ERROR_WANT_READ
  148800. * cdef int ssl_SSL_ERROR_WANT_WRITE = ssl.SSL_ERROR_WANT_WRITE # <<<<<<<<<<<<<<
  148801. * cdef int ssl_SSL_ERROR_SYSCALL = ssl.SSL_ERROR_SYSCALL
  148802. *
  148803. */
  148804. __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ssl); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 133, __pyx_L1_error)
  148805. __Pyx_GOTREF(__pyx_t_1);
  148806. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_SSL_ERROR_WANT_WRITE); if (unlikely(!__pyx_t_5)) __PYX_ERR(29, 133, __pyx_L1_error)
  148807. __Pyx_GOTREF(__pyx_t_5);
  148808. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  148809. __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(29, 133, __pyx_L1_error)
  148810. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  148811. __pyx_v_6uvloop_4loop_ssl_SSL_ERROR_WANT_WRITE = __pyx_t_4;
  148812. /* "uvloop/includes/stdlib.pxi":134
  148813. * cdef int ssl_SSL_ERROR_WANT_READ = ssl.SSL_ERROR_WANT_READ
  148814. * cdef int ssl_SSL_ERROR_WANT_WRITE = ssl.SSL_ERROR_WANT_WRITE
  148815. * cdef int ssl_SSL_ERROR_SYSCALL = ssl.SSL_ERROR_SYSCALL # <<<<<<<<<<<<<<
  148816. *
  148817. * cdef uint64_t MAIN_THREAD_ID = <uint64_t><int64_t>threading.main_thread().ident
  148818. */
  148819. __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_ssl); if (unlikely(!__pyx_t_5)) __PYX_ERR(29, 134, __pyx_L1_error)
  148820. __Pyx_GOTREF(__pyx_t_5);
  148821. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_SSL_ERROR_SYSCALL); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 134, __pyx_L1_error)
  148822. __Pyx_GOTREF(__pyx_t_1);
  148823. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  148824. __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(29, 134, __pyx_L1_error)
  148825. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  148826. __pyx_v_6uvloop_4loop_ssl_SSL_ERROR_SYSCALL = __pyx_t_4;
  148827. /* "uvloop/includes/stdlib.pxi":136
  148828. * cdef int ssl_SSL_ERROR_SYSCALL = ssl.SSL_ERROR_SYSCALL
  148829. *
  148830. * cdef uint64_t MAIN_THREAD_ID = <uint64_t><int64_t>threading.main_thread().ident # <<<<<<<<<<<<<<
  148831. *
  148832. * cdef int subprocess_PIPE = subprocess.PIPE
  148833. */
  148834. __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_threading); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 136, __pyx_L1_error)
  148835. __Pyx_GOTREF(__pyx_t_1);
  148836. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_main_thread); if (unlikely(!__pyx_t_5)) __PYX_ERR(29, 136, __pyx_L1_error)
  148837. __Pyx_GOTREF(__pyx_t_5);
  148838. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  148839. __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 136, __pyx_L1_error)
  148840. __Pyx_GOTREF(__pyx_t_1);
  148841. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  148842. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_ident); if (unlikely(!__pyx_t_5)) __PYX_ERR(29, 136, __pyx_L1_error)
  148843. __Pyx_GOTREF(__pyx_t_5);
  148844. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  148845. __pyx_t_6 = __Pyx_PyInt_As_int64_t(__pyx_t_5); if (unlikely((__pyx_t_6 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(29, 136, __pyx_L1_error)
  148846. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  148847. __pyx_v_6uvloop_4loop_MAIN_THREAD_ID = ((uint64_t)((int64_t)__pyx_t_6));
  148848. /* "uvloop/includes/stdlib.pxi":138
  148849. * cdef uint64_t MAIN_THREAD_ID = <uint64_t><int64_t>threading.main_thread().ident
  148850. *
  148851. * cdef int subprocess_PIPE = subprocess.PIPE # <<<<<<<<<<<<<<
  148852. * cdef int subprocess_STDOUT = subprocess.STDOUT
  148853. * cdef int subprocess_DEVNULL = subprocess.DEVNULL
  148854. */
  148855. __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_subprocess); if (unlikely(!__pyx_t_5)) __PYX_ERR(29, 138, __pyx_L1_error)
  148856. __Pyx_GOTREF(__pyx_t_5);
  148857. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_PIPE); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 138, __pyx_L1_error)
  148858. __Pyx_GOTREF(__pyx_t_1);
  148859. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  148860. __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(29, 138, __pyx_L1_error)
  148861. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  148862. __pyx_v_6uvloop_4loop_subprocess_PIPE = __pyx_t_4;
  148863. /* "uvloop/includes/stdlib.pxi":139
  148864. *
  148865. * cdef int subprocess_PIPE = subprocess.PIPE
  148866. * cdef int subprocess_STDOUT = subprocess.STDOUT # <<<<<<<<<<<<<<
  148867. * cdef int subprocess_DEVNULL = subprocess.DEVNULL
  148868. * cdef subprocess_SubprocessError = subprocess.SubprocessError
  148869. */
  148870. __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_subprocess); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 139, __pyx_L1_error)
  148871. __Pyx_GOTREF(__pyx_t_1);
  148872. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_STDOUT); if (unlikely(!__pyx_t_5)) __PYX_ERR(29, 139, __pyx_L1_error)
  148873. __Pyx_GOTREF(__pyx_t_5);
  148874. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  148875. __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(29, 139, __pyx_L1_error)
  148876. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  148877. __pyx_v_6uvloop_4loop_subprocess_STDOUT = __pyx_t_4;
  148878. /* "uvloop/includes/stdlib.pxi":140
  148879. * cdef int subprocess_PIPE = subprocess.PIPE
  148880. * cdef int subprocess_STDOUT = subprocess.STDOUT
  148881. * cdef int subprocess_DEVNULL = subprocess.DEVNULL # <<<<<<<<<<<<<<
  148882. * cdef subprocess_SubprocessError = subprocess.SubprocessError
  148883. *
  148884. */
  148885. __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_subprocess); if (unlikely(!__pyx_t_5)) __PYX_ERR(29, 140, __pyx_L1_error)
  148886. __Pyx_GOTREF(__pyx_t_5);
  148887. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_DEVNULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 140, __pyx_L1_error)
  148888. __Pyx_GOTREF(__pyx_t_1);
  148889. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  148890. __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(29, 140, __pyx_L1_error)
  148891. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  148892. __pyx_v_6uvloop_4loop_subprocess_DEVNULL = __pyx_t_4;
  148893. /* "uvloop/includes/stdlib.pxi":141
  148894. * cdef int subprocess_STDOUT = subprocess.STDOUT
  148895. * cdef int subprocess_DEVNULL = subprocess.DEVNULL
  148896. * cdef subprocess_SubprocessError = subprocess.SubprocessError # <<<<<<<<<<<<<<
  148897. *
  148898. * cdef int signal_NSIG = signal.NSIG
  148899. */
  148900. __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_subprocess); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 141, __pyx_L1_error)
  148901. __Pyx_GOTREF(__pyx_t_1);
  148902. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_SubprocessError); if (unlikely(!__pyx_t_5)) __PYX_ERR(29, 141, __pyx_L1_error)
  148903. __Pyx_GOTREF(__pyx_t_5);
  148904. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  148905. __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_subprocess_SubprocessError);
  148906. __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_subprocess_SubprocessError, __pyx_t_5);
  148907. __Pyx_GIVEREF(__pyx_t_5);
  148908. __pyx_t_5 = 0;
  148909. /* "uvloop/includes/stdlib.pxi":143
  148910. * cdef subprocess_SubprocessError = subprocess.SubprocessError
  148911. *
  148912. * cdef int signal_NSIG = signal.NSIG # <<<<<<<<<<<<<<
  148913. * cdef signal_signal = signal.signal
  148914. * cdef signal_siginterrupt = signal.siginterrupt
  148915. */
  148916. __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_signal); if (unlikely(!__pyx_t_5)) __PYX_ERR(29, 143, __pyx_L1_error)
  148917. __Pyx_GOTREF(__pyx_t_5);
  148918. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_NSIG); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 143, __pyx_L1_error)
  148919. __Pyx_GOTREF(__pyx_t_1);
  148920. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  148921. __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(29, 143, __pyx_L1_error)
  148922. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  148923. __pyx_v_6uvloop_4loop_signal_NSIG = __pyx_t_4;
  148924. /* "uvloop/includes/stdlib.pxi":144
  148925. *
  148926. * cdef int signal_NSIG = signal.NSIG
  148927. * cdef signal_signal = signal.signal # <<<<<<<<<<<<<<
  148928. * cdef signal_siginterrupt = signal.siginterrupt
  148929. * cdef signal_set_wakeup_fd = signal.set_wakeup_fd
  148930. */
  148931. __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_signal); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 144, __pyx_L1_error)
  148932. __Pyx_GOTREF(__pyx_t_1);
  148933. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_signal); if (unlikely(!__pyx_t_5)) __PYX_ERR(29, 144, __pyx_L1_error)
  148934. __Pyx_GOTREF(__pyx_t_5);
  148935. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  148936. __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_signal_signal);
  148937. __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_signal_signal, __pyx_t_5);
  148938. __Pyx_GIVEREF(__pyx_t_5);
  148939. __pyx_t_5 = 0;
  148940. /* "uvloop/includes/stdlib.pxi":145
  148941. * cdef int signal_NSIG = signal.NSIG
  148942. * cdef signal_signal = signal.signal
  148943. * cdef signal_siginterrupt = signal.siginterrupt # <<<<<<<<<<<<<<
  148944. * cdef signal_set_wakeup_fd = signal.set_wakeup_fd
  148945. * cdef signal_default_int_handler = signal.default_int_handler
  148946. */
  148947. __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_signal); if (unlikely(!__pyx_t_5)) __PYX_ERR(29, 145, __pyx_L1_error)
  148948. __Pyx_GOTREF(__pyx_t_5);
  148949. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_siginterrupt); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 145, __pyx_L1_error)
  148950. __Pyx_GOTREF(__pyx_t_1);
  148951. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  148952. __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_signal_siginterrupt);
  148953. __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_signal_siginterrupt, __pyx_t_1);
  148954. __Pyx_GIVEREF(__pyx_t_1);
  148955. __pyx_t_1 = 0;
  148956. /* "uvloop/includes/stdlib.pxi":146
  148957. * cdef signal_signal = signal.signal
  148958. * cdef signal_siginterrupt = signal.siginterrupt
  148959. * cdef signal_set_wakeup_fd = signal.set_wakeup_fd # <<<<<<<<<<<<<<
  148960. * cdef signal_default_int_handler = signal.default_int_handler
  148961. * cdef signal_SIG_DFL = signal.SIG_DFL
  148962. */
  148963. __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_signal); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 146, __pyx_L1_error)
  148964. __Pyx_GOTREF(__pyx_t_1);
  148965. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_set_wakeup_fd); if (unlikely(!__pyx_t_5)) __PYX_ERR(29, 146, __pyx_L1_error)
  148966. __Pyx_GOTREF(__pyx_t_5);
  148967. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  148968. __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_signal_set_wakeup_fd);
  148969. __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_signal_set_wakeup_fd, __pyx_t_5);
  148970. __Pyx_GIVEREF(__pyx_t_5);
  148971. __pyx_t_5 = 0;
  148972. /* "uvloop/includes/stdlib.pxi":147
  148973. * cdef signal_siginterrupt = signal.siginterrupt
  148974. * cdef signal_set_wakeup_fd = signal.set_wakeup_fd
  148975. * cdef signal_default_int_handler = signal.default_int_handler # <<<<<<<<<<<<<<
  148976. * cdef signal_SIG_DFL = signal.SIG_DFL
  148977. *
  148978. */
  148979. __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_signal); if (unlikely(!__pyx_t_5)) __PYX_ERR(29, 147, __pyx_L1_error)
  148980. __Pyx_GOTREF(__pyx_t_5);
  148981. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_default_int_handler); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 147, __pyx_L1_error)
  148982. __Pyx_GOTREF(__pyx_t_1);
  148983. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  148984. __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_signal_default_int_handler);
  148985. __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_signal_default_int_handler, __pyx_t_1);
  148986. __Pyx_GIVEREF(__pyx_t_1);
  148987. __pyx_t_1 = 0;
  148988. /* "uvloop/includes/stdlib.pxi":148
  148989. * cdef signal_set_wakeup_fd = signal.set_wakeup_fd
  148990. * cdef signal_default_int_handler = signal.default_int_handler
  148991. * cdef signal_SIG_DFL = signal.SIG_DFL # <<<<<<<<<<<<<<
  148992. *
  148993. * cdef time_sleep = time.sleep
  148994. */
  148995. __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_signal); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 148, __pyx_L1_error)
  148996. __Pyx_GOTREF(__pyx_t_1);
  148997. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_SIG_DFL); if (unlikely(!__pyx_t_5)) __PYX_ERR(29, 148, __pyx_L1_error)
  148998. __Pyx_GOTREF(__pyx_t_5);
  148999. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  149000. __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_signal_SIG_DFL);
  149001. __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_signal_SIG_DFL, __pyx_t_5);
  149002. __Pyx_GIVEREF(__pyx_t_5);
  149003. __pyx_t_5 = 0;
  149004. /* "uvloop/includes/stdlib.pxi":150
  149005. * cdef signal_SIG_DFL = signal.SIG_DFL
  149006. *
  149007. * cdef time_sleep = time.sleep # <<<<<<<<<<<<<<
  149008. * cdef time_monotonic = time.monotonic
  149009. *
  149010. */
  149011. __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_time); if (unlikely(!__pyx_t_5)) __PYX_ERR(29, 150, __pyx_L1_error)
  149012. __Pyx_GOTREF(__pyx_t_5);
  149013. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_sleep); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 150, __pyx_L1_error)
  149014. __Pyx_GOTREF(__pyx_t_1);
  149015. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  149016. __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_time_sleep);
  149017. __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_time_sleep, __pyx_t_1);
  149018. __Pyx_GIVEREF(__pyx_t_1);
  149019. __pyx_t_1 = 0;
  149020. /* "uvloop/includes/stdlib.pxi":151
  149021. *
  149022. * cdef time_sleep = time.sleep
  149023. * cdef time_monotonic = time.monotonic # <<<<<<<<<<<<<<
  149024. *
  149025. * cdef tb_StackSummary = traceback.StackSummary
  149026. */
  149027. __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_time); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 151, __pyx_L1_error)
  149028. __Pyx_GOTREF(__pyx_t_1);
  149029. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_monotonic); if (unlikely(!__pyx_t_5)) __PYX_ERR(29, 151, __pyx_L1_error)
  149030. __Pyx_GOTREF(__pyx_t_5);
  149031. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  149032. __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_time_monotonic);
  149033. __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_time_monotonic, __pyx_t_5);
  149034. __Pyx_GIVEREF(__pyx_t_5);
  149035. __pyx_t_5 = 0;
  149036. /* "uvloop/includes/stdlib.pxi":153
  149037. * cdef time_monotonic = time.monotonic
  149038. *
  149039. * cdef tb_StackSummary = traceback.StackSummary # <<<<<<<<<<<<<<
  149040. * cdef tb_walk_stack = traceback.walk_stack
  149041. * cdef tb_format_list = traceback.format_list
  149042. */
  149043. __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_traceback_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(29, 153, __pyx_L1_error)
  149044. __Pyx_GOTREF(__pyx_t_5);
  149045. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_StackSummary); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 153, __pyx_L1_error)
  149046. __Pyx_GOTREF(__pyx_t_1);
  149047. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  149048. __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_tb_StackSummary);
  149049. __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_tb_StackSummary, __pyx_t_1);
  149050. __Pyx_GIVEREF(__pyx_t_1);
  149051. __pyx_t_1 = 0;
  149052. /* "uvloop/includes/stdlib.pxi":154
  149053. *
  149054. * cdef tb_StackSummary = traceback.StackSummary
  149055. * cdef tb_walk_stack = traceback.walk_stack # <<<<<<<<<<<<<<
  149056. * cdef tb_format_list = traceback.format_list
  149057. *
  149058. */
  149059. __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_traceback_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 154, __pyx_L1_error)
  149060. __Pyx_GOTREF(__pyx_t_1);
  149061. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_walk_stack); if (unlikely(!__pyx_t_5)) __PYX_ERR(29, 154, __pyx_L1_error)
  149062. __Pyx_GOTREF(__pyx_t_5);
  149063. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  149064. __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_tb_walk_stack);
  149065. __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_tb_walk_stack, __pyx_t_5);
  149066. __Pyx_GIVEREF(__pyx_t_5);
  149067. __pyx_t_5 = 0;
  149068. /* "uvloop/includes/stdlib.pxi":155
  149069. * cdef tb_StackSummary = traceback.StackSummary
  149070. * cdef tb_walk_stack = traceback.walk_stack
  149071. * cdef tb_format_list = traceback.format_list # <<<<<<<<<<<<<<
  149072. *
  149073. * cdef warnings_warn = warnings.warn
  149074. */
  149075. __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_traceback_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(29, 155, __pyx_L1_error)
  149076. __Pyx_GOTREF(__pyx_t_5);
  149077. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_format_list); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 155, __pyx_L1_error)
  149078. __Pyx_GOTREF(__pyx_t_1);
  149079. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  149080. __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_tb_format_list);
  149081. __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_tb_format_list, __pyx_t_1);
  149082. __Pyx_GIVEREF(__pyx_t_1);
  149083. __pyx_t_1 = 0;
  149084. /* "uvloop/includes/stdlib.pxi":157
  149085. * cdef tb_format_list = traceback.format_list
  149086. *
  149087. * cdef warnings_warn = warnings.warn # <<<<<<<<<<<<<<
  149088. *
  149089. * cdef weakref_WeakValueDictionary = weakref.WeakValueDictionary
  149090. */
  149091. __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_warnings); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 157, __pyx_L1_error)
  149092. __Pyx_GOTREF(__pyx_t_1);
  149093. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_warn); if (unlikely(!__pyx_t_5)) __PYX_ERR(29, 157, __pyx_L1_error)
  149094. __Pyx_GOTREF(__pyx_t_5);
  149095. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  149096. __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_warnings_warn);
  149097. __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_warnings_warn, __pyx_t_5);
  149098. __Pyx_GIVEREF(__pyx_t_5);
  149099. __pyx_t_5 = 0;
  149100. /* "uvloop/includes/stdlib.pxi":159
  149101. * cdef warnings_warn = warnings.warn
  149102. *
  149103. * cdef weakref_WeakValueDictionary = weakref.WeakValueDictionary # <<<<<<<<<<<<<<
  149104. * cdef weakref_WeakSet = weakref.WeakSet
  149105. *
  149106. */
  149107. __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_weakref); if (unlikely(!__pyx_t_5)) __PYX_ERR(29, 159, __pyx_L1_error)
  149108. __Pyx_GOTREF(__pyx_t_5);
  149109. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_WeakValueDictionary); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 159, __pyx_L1_error)
  149110. __Pyx_GOTREF(__pyx_t_1);
  149111. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  149112. __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_weakref_WeakValueDictionary);
  149113. __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_weakref_WeakValueDictionary, __pyx_t_1);
  149114. __Pyx_GIVEREF(__pyx_t_1);
  149115. __pyx_t_1 = 0;
  149116. /* "uvloop/includes/stdlib.pxi":160
  149117. *
  149118. * cdef weakref_WeakValueDictionary = weakref.WeakValueDictionary
  149119. * cdef weakref_WeakSet = weakref.WeakSet # <<<<<<<<<<<<<<
  149120. *
  149121. * cdef py_inf = float('inf')
  149122. */
  149123. __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_weakref); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 160, __pyx_L1_error)
  149124. __Pyx_GOTREF(__pyx_t_1);
  149125. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_WeakSet); if (unlikely(!__pyx_t_5)) __PYX_ERR(29, 160, __pyx_L1_error)
  149126. __Pyx_GOTREF(__pyx_t_5);
  149127. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  149128. __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_weakref_WeakSet);
  149129. __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_weakref_WeakSet, __pyx_t_5);
  149130. __Pyx_GIVEREF(__pyx_t_5);
  149131. __pyx_t_5 = 0;
  149132. /* "uvloop/includes/stdlib.pxi":162
  149133. * cdef weakref_WeakSet = weakref.WeakSet
  149134. *
  149135. * cdef py_inf = float('inf') # <<<<<<<<<<<<<<
  149136. *
  149137. *
  149138. */
  149139. __pyx_t_5 = __Pyx_PyNumber_Float(__pyx_n_u_inf); if (unlikely(!__pyx_t_5)) __PYX_ERR(29, 162, __pyx_L1_error)
  149140. __Pyx_GOTREF(__pyx_t_5);
  149141. __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_py_inf);
  149142. __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_py_inf, __pyx_t_5);
  149143. __Pyx_GIVEREF(__pyx_t_5);
  149144. __pyx_t_5 = 0;
  149145. /* "uvloop/includes/stdlib.pxi":167
  149146. * # Cython doesn't clean-up imported objects properly in Py3 mode,
  149147. * # so we delete refs to all modules manually (except sys)
  149148. * del asyncio, concurrent, collections, errno # <<<<<<<<<<<<<<
  149149. * del functools, inspect, itertools, socket, os, threading
  149150. * del signal, subprocess, ssl
  149151. */
  149152. if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_asyncio) < 0) __PYX_ERR(29, 167, __pyx_L1_error)
  149153. if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_concurrent) < 0) __PYX_ERR(29, 167, __pyx_L1_error)
  149154. if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_collections) < 0) __PYX_ERR(29, 167, __pyx_L1_error)
  149155. if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_errno) < 0) __PYX_ERR(29, 167, __pyx_L1_error)
  149156. /* "uvloop/includes/stdlib.pxi":168
  149157. * # so we delete refs to all modules manually (except sys)
  149158. * del asyncio, concurrent, collections, errno
  149159. * del functools, inspect, itertools, socket, os, threading # <<<<<<<<<<<<<<
  149160. * del signal, subprocess, ssl
  149161. * del time, traceback, warnings, weakref
  149162. */
  149163. if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_functools) < 0) __PYX_ERR(29, 168, __pyx_L1_error)
  149164. if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_inspect) < 0) __PYX_ERR(29, 168, __pyx_L1_error)
  149165. if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_itertools) < 0) __PYX_ERR(29, 168, __pyx_L1_error)
  149166. if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_socket_2) < 0) __PYX_ERR(29, 168, __pyx_L1_error)
  149167. if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_os) < 0) __PYX_ERR(29, 168, __pyx_L1_error)
  149168. if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_threading) < 0) __PYX_ERR(29, 168, __pyx_L1_error)
  149169. /* "uvloop/includes/stdlib.pxi":169
  149170. * del asyncio, concurrent, collections, errno
  149171. * del functools, inspect, itertools, socket, os, threading
  149172. * del signal, subprocess, ssl # <<<<<<<<<<<<<<
  149173. * del time, traceback, warnings, weakref
  149174. */
  149175. if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_signal) < 0) __PYX_ERR(29, 169, __pyx_L1_error)
  149176. if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_subprocess) < 0) __PYX_ERR(29, 169, __pyx_L1_error)
  149177. if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_ssl) < 0) __PYX_ERR(29, 169, __pyx_L1_error)
  149178. /* "uvloop/includes/stdlib.pxi":170
  149179. * del functools, inspect, itertools, socket, os, threading
  149180. * del signal, subprocess, ssl
  149181. * del time, traceback, warnings, weakref # <<<<<<<<<<<<<<
  149182. */
  149183. if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_time) < 0) __PYX_ERR(29, 170, __pyx_L1_error)
  149184. if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_traceback_2) < 0) __PYX_ERR(29, 170, __pyx_L1_error)
  149185. if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_warnings) < 0) __PYX_ERR(29, 170, __pyx_L1_error)
  149186. if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_weakref) < 0) __PYX_ERR(29, 170, __pyx_L1_error)
  149187. /* "uvloop/loop.pyx":51
  149188. *
  149189. * cdef:
  149190. * int PY37 = PY_VERSION_HEX >= 0x03070000 # <<<<<<<<<<<<<<
  149191. * int PY36 = PY_VERSION_HEX >= 0x03060000
  149192. *
  149193. */
  149194. __pyx_v_6uvloop_4loop_PY37 = (PY_VERSION_HEX >= 0x03070000);
  149195. /* "uvloop/loop.pyx":52
  149196. * cdef:
  149197. * int PY37 = PY_VERSION_HEX >= 0x03070000
  149198. * int PY36 = PY_VERSION_HEX >= 0x03060000 # <<<<<<<<<<<<<<
  149199. *
  149200. *
  149201. */
  149202. __pyx_v_6uvloop_4loop_PY36 = (PY_VERSION_HEX >= 0x03060000);
  149203. /* "uvloop/loop.pyx":1542
  149204. * async def create_server(self, protocol_factory, host=None, port=None,
  149205. * *,
  149206. * int family=uv.AF_UNSPEC, # <<<<<<<<<<<<<<
  149207. * int flags=uv.AI_PASSIVE,
  149208. * sock=None,
  149209. */
  149210. __pyx_k__38 = AF_UNSPEC;
  149211. /* "uvloop/loop.pyx":1543
  149212. * *,
  149213. * int family=uv.AF_UNSPEC,
  149214. * int flags=uv.AI_PASSIVE, # <<<<<<<<<<<<<<
  149215. * sock=None,
  149216. * backlog=100,
  149217. */
  149218. __pyx_k__39 = AI_PASSIVE;
  149219. /* "uvloop/loop.pyx":2592
  149220. * @cython.iterable_coroutine
  149221. * async def __subprocess_run(self, protocol_factory, args,
  149222. * stdin=subprocess_PIPE, # <<<<<<<<<<<<<<
  149223. * stdout=subprocess_PIPE,
  149224. * stderr=subprocess_PIPE,
  149225. */
  149226. __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_6uvloop_4loop_subprocess_PIPE); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2592, __pyx_L1_error)
  149227. __Pyx_GOTREF(__pyx_t_5);
  149228. __pyx_k__66 = __pyx_t_5;
  149229. __Pyx_GIVEREF(__pyx_t_5);
  149230. __pyx_t_5 = 0;
  149231. /* "uvloop/loop.pyx":2593
  149232. * async def __subprocess_run(self, protocol_factory, args,
  149233. * stdin=subprocess_PIPE,
  149234. * stdout=subprocess_PIPE, # <<<<<<<<<<<<<<
  149235. * stderr=subprocess_PIPE,
  149236. * universal_newlines=False,
  149237. */
  149238. __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_6uvloop_4loop_subprocess_PIPE); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2593, __pyx_L1_error)
  149239. __Pyx_GOTREF(__pyx_t_5);
  149240. __pyx_k__67 = __pyx_t_5;
  149241. __Pyx_GIVEREF(__pyx_t_5);
  149242. __pyx_t_5 = 0;
  149243. /* "uvloop/loop.pyx":2594
  149244. * stdin=subprocess_PIPE,
  149245. * stdout=subprocess_PIPE,
  149246. * stderr=subprocess_PIPE, # <<<<<<<<<<<<<<
  149247. * universal_newlines=False,
  149248. * shell=True,
  149249. */
  149250. __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_6uvloop_4loop_subprocess_PIPE); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2594, __pyx_L1_error)
  149251. __Pyx_GOTREF(__pyx_t_5);
  149252. __pyx_k__68 = __pyx_t_5;
  149253. __Pyx_GIVEREF(__pyx_t_5);
  149254. __pyx_t_5 = 0;
  149255. /* "uvloop/loop.pyx":3059
  149256. *
  149257. *
  149258. * class _SyncSocketReaderFuture(aio_Future): # <<<<<<<<<<<<<<
  149259. *
  149260. * def __init__(self, sock, loop):
  149261. */
  149262. __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 3059, __pyx_L1_error)
  149263. __Pyx_GOTREF(__pyx_t_5);
  149264. __Pyx_INCREF(__pyx_v_6uvloop_4loop_aio_Future);
  149265. __Pyx_GIVEREF(__pyx_v_6uvloop_4loop_aio_Future);
  149266. PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_6uvloop_4loop_aio_Future);
  149267. __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 3059, __pyx_L1_error)
  149268. __Pyx_GOTREF(__pyx_t_1);
  149269. __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_5, __pyx_n_s_SyncSocketReaderFuture, __pyx_n_s_SyncSocketReaderFuture, (PyObject *) NULL, __pyx_n_s_uvloop_loop, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 3059, __pyx_L1_error)
  149270. __Pyx_GOTREF(__pyx_t_2);
  149271. /* "uvloop/loop.pyx":3061
  149272. * class _SyncSocketReaderFuture(aio_Future):
  149273. *
  149274. * def __init__(self, sock, loop): # <<<<<<<<<<<<<<
  149275. * aio_Future.__init__(self, loop=loop)
  149276. * self.__sock = sock
  149277. */
  149278. __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6uvloop_4loop_23_SyncSocketReaderFuture_1__init__, 0, __pyx_n_s_SyncSocketReaderFuture___init, NULL, __pyx_n_s_uvloop_loop, __pyx_d, ((PyObject *)__pyx_codeobj__221)); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 3061, __pyx_L1_error)
  149279. __Pyx_GOTREF(__pyx_t_7);
  149280. if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_init, __pyx_t_7) < 0) __PYX_ERR(2, 3061, __pyx_L1_error)
  149281. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  149282. /* "uvloop/loop.pyx":3066
  149283. * self.__loop = loop
  149284. *
  149285. * def cancel(self): # <<<<<<<<<<<<<<
  149286. * if self.__sock is not None and self.__sock.fileno() != -1:
  149287. * self.__loop.remove_reader(self.__sock)
  149288. */
  149289. __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6uvloop_4loop_23_SyncSocketReaderFuture_3cancel, 0, __pyx_n_s_SyncSocketReaderFuture_cancel, NULL, __pyx_n_s_uvloop_loop, __pyx_d, ((PyObject *)__pyx_codeobj__223)); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 3066, __pyx_L1_error)
  149290. __Pyx_GOTREF(__pyx_t_7);
  149291. if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_cancel, __pyx_t_7) < 0) __PYX_ERR(2, 3066, __pyx_L1_error)
  149292. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  149293. /* "uvloop/loop.pyx":3059
  149294. *
  149295. *
  149296. * class _SyncSocketReaderFuture(aio_Future): # <<<<<<<<<<<<<<
  149297. *
  149298. * def __init__(self, sock, loop):
  149299. */
  149300. __pyx_t_7 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_SyncSocketReaderFuture, __pyx_t_5, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 3059, __pyx_L1_error)
  149301. __Pyx_GOTREF(__pyx_t_7);
  149302. if (PyDict_SetItem(__pyx_d, __pyx_n_s_SyncSocketReaderFuture, __pyx_t_7) < 0) __PYX_ERR(2, 3059, __pyx_L1_error)
  149303. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  149304. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  149305. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  149306. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  149307. /* "uvloop/loop.pyx":3074
  149308. *
  149309. *
  149310. * class _SyncSocketWriterFuture(aio_Future): # <<<<<<<<<<<<<<
  149311. *
  149312. * def __init__(self, sock, loop):
  149313. */
  149314. __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 3074, __pyx_L1_error)
  149315. __Pyx_GOTREF(__pyx_t_5);
  149316. __Pyx_INCREF(__pyx_v_6uvloop_4loop_aio_Future);
  149317. __Pyx_GIVEREF(__pyx_v_6uvloop_4loop_aio_Future);
  149318. PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_6uvloop_4loop_aio_Future);
  149319. __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 3074, __pyx_L1_error)
  149320. __Pyx_GOTREF(__pyx_t_1);
  149321. __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_5, __pyx_n_s_SyncSocketWriterFuture, __pyx_n_s_SyncSocketWriterFuture, (PyObject *) NULL, __pyx_n_s_uvloop_loop, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 3074, __pyx_L1_error)
  149322. __Pyx_GOTREF(__pyx_t_2);
  149323. /* "uvloop/loop.pyx":3076
  149324. * class _SyncSocketWriterFuture(aio_Future):
  149325. *
  149326. * def __init__(self, sock, loop): # <<<<<<<<<<<<<<
  149327. * aio_Future.__init__(self, loop=loop)
  149328. * self.__sock = sock
  149329. */
  149330. __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6uvloop_4loop_23_SyncSocketWriterFuture_1__init__, 0, __pyx_n_s_SyncSocketWriterFuture___init, NULL, __pyx_n_s_uvloop_loop, __pyx_d, ((PyObject *)__pyx_codeobj__225)); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 3076, __pyx_L1_error)
  149331. __Pyx_GOTREF(__pyx_t_7);
  149332. if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_init, __pyx_t_7) < 0) __PYX_ERR(2, 3076, __pyx_L1_error)
  149333. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  149334. /* "uvloop/loop.pyx":3081
  149335. * self.__loop = loop
  149336. *
  149337. * def cancel(self): # <<<<<<<<<<<<<<
  149338. * if self.__sock is not None and self.__sock.fileno() != -1:
  149339. * self.__loop.remove_writer(self.__sock)
  149340. */
  149341. __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6uvloop_4loop_23_SyncSocketWriterFuture_3cancel, 0, __pyx_n_s_SyncSocketWriterFuture_cancel, NULL, __pyx_n_s_uvloop_loop, __pyx_d, ((PyObject *)__pyx_codeobj__227)); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 3081, __pyx_L1_error)
  149342. __Pyx_GOTREF(__pyx_t_7);
  149343. if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_cancel, __pyx_t_7) < 0) __PYX_ERR(2, 3081, __pyx_L1_error)
  149344. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  149345. /* "uvloop/loop.pyx":3074
  149346. *
  149347. *
  149348. * class _SyncSocketWriterFuture(aio_Future): # <<<<<<<<<<<<<<
  149349. *
  149350. * def __init__(self, sock, loop):
  149351. */
  149352. __pyx_t_7 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_SyncSocketWriterFuture, __pyx_t_5, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 3074, __pyx_L1_error)
  149353. __Pyx_GOTREF(__pyx_t_7);
  149354. if (PyDict_SetItem(__pyx_d, __pyx_n_s_SyncSocketWriterFuture, __pyx_t_7) < 0) __PYX_ERR(2, 3074, __pyx_L1_error)
  149355. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  149356. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  149357. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  149358. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  149359. /* "uvloop/lru.pyx":1
  149360. * cdef object _LRU_MARKER = object() # <<<<<<<<<<<<<<
  149361. *
  149362. *
  149363. */
  149364. __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_builtin_object); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1, __pyx_L1_error)
  149365. __Pyx_GOTREF(__pyx_t_5);
  149366. __Pyx_XGOTREF(__pyx_v_6uvloop_4loop__LRU_MARKER);
  149367. __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop__LRU_MARKER, __pyx_t_5);
  149368. __Pyx_GIVEREF(__pyx_t_5);
  149369. __pyx_t_5 = 0;
  149370. /* "uvloop/handles/process.pyx":682
  149371. *
  149372. *
  149373. * class WriteSubprocessPipeProto(aio_BaseProtocol): # <<<<<<<<<<<<<<
  149374. *
  149375. * def __init__(self, proc, fd):
  149376. */
  149377. __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 682, __pyx_L1_error)
  149378. __Pyx_GOTREF(__pyx_t_5);
  149379. __Pyx_INCREF(__pyx_v_6uvloop_4loop_aio_BaseProtocol);
  149380. __Pyx_GIVEREF(__pyx_v_6uvloop_4loop_aio_BaseProtocol);
  149381. PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_6uvloop_4loop_aio_BaseProtocol);
  149382. __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 682, __pyx_L1_error)
  149383. __Pyx_GOTREF(__pyx_t_1);
  149384. __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_5, __pyx_n_s_WriteSubprocessPipeProto, __pyx_n_s_WriteSubprocessPipeProto, (PyObject *) NULL, __pyx_n_s_uvloop_loop, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 682, __pyx_L1_error)
  149385. __Pyx_GOTREF(__pyx_t_2);
  149386. /* "uvloop/handles/process.pyx":684
  149387. * class WriteSubprocessPipeProto(aio_BaseProtocol):
  149388. *
  149389. * def __init__(self, proc, fd): # <<<<<<<<<<<<<<
  149390. * if UVLOOP_DEBUG:
  149391. * if type(proc) is not UVProcessTransport:
  149392. */
  149393. __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6uvloop_4loop_24WriteSubprocessPipeProto_1__init__, 0, __pyx_n_s_WriteSubprocessPipeProto___init, NULL, __pyx_n_s_uvloop_loop, __pyx_d, ((PyObject *)__pyx_codeobj__229)); if (unlikely(!__pyx_t_7)) __PYX_ERR(6, 684, __pyx_L1_error)
  149394. __Pyx_GOTREF(__pyx_t_7);
  149395. if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_init, __pyx_t_7) < 0) __PYX_ERR(6, 684, __pyx_L1_error)
  149396. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  149397. /* "uvloop/handles/process.pyx":695
  149398. * self.disconnected = False
  149399. *
  149400. * def connection_made(self, transport): # <<<<<<<<<<<<<<
  149401. * self.pipe = transport
  149402. *
  149403. */
  149404. __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6uvloop_4loop_24WriteSubprocessPipeProto_3connection_made, 0, __pyx_n_s_WriteSubprocessPipeProto_connect, NULL, __pyx_n_s_uvloop_loop, __pyx_d, ((PyObject *)__pyx_codeobj__231)); if (unlikely(!__pyx_t_7)) __PYX_ERR(6, 695, __pyx_L1_error)
  149405. __Pyx_GOTREF(__pyx_t_7);
  149406. if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_connection_made, __pyx_t_7) < 0) __PYX_ERR(6, 695, __pyx_L1_error)
  149407. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  149408. /* "uvloop/handles/process.pyx":698
  149409. * self.pipe = transport
  149410. *
  149411. * def __repr__(self): # <<<<<<<<<<<<<<
  149412. * return ('<%s fd=%s pipe=%r>'
  149413. * % (self.__class__.__name__, self.fd, self.pipe))
  149414. */
  149415. __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6uvloop_4loop_24WriteSubprocessPipeProto_5__repr__, 0, __pyx_n_s_WriteSubprocessPipeProto___repr, NULL, __pyx_n_s_uvloop_loop, __pyx_d, ((PyObject *)__pyx_codeobj__233)); if (unlikely(!__pyx_t_7)) __PYX_ERR(6, 698, __pyx_L1_error)
  149416. __Pyx_GOTREF(__pyx_t_7);
  149417. if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_repr, __pyx_t_7) < 0) __PYX_ERR(6, 698, __pyx_L1_error)
  149418. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  149419. /* "uvloop/handles/process.pyx":702
  149420. * % (self.__class__.__name__, self.fd, self.pipe))
  149421. *
  149422. * def connection_lost(self, exc): # <<<<<<<<<<<<<<
  149423. * self.disconnected = True
  149424. * (<UVProcessTransport>self.proc)._pipe_connection_lost(self.fd, exc)
  149425. */
  149426. __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6uvloop_4loop_24WriteSubprocessPipeProto_7connection_lost, 0, __pyx_n_s_WriteSubprocessPipeProto_connect_2, NULL, __pyx_n_s_uvloop_loop, __pyx_d, ((PyObject *)__pyx_codeobj__235)); if (unlikely(!__pyx_t_7)) __PYX_ERR(6, 702, __pyx_L1_error)
  149427. __Pyx_GOTREF(__pyx_t_7);
  149428. if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_connection_lost, __pyx_t_7) < 0) __PYX_ERR(6, 702, __pyx_L1_error)
  149429. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  149430. /* "uvloop/handles/process.pyx":707
  149431. * self.proc = None
  149432. *
  149433. * def pause_writing(self): # <<<<<<<<<<<<<<
  149434. * (<UVProcessTransport>self.proc)._protocol.pause_writing()
  149435. *
  149436. */
  149437. __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6uvloop_4loop_24WriteSubprocessPipeProto_9pause_writing, 0, __pyx_n_s_WriteSubprocessPipeProto_pause_w, NULL, __pyx_n_s_uvloop_loop, __pyx_d, ((PyObject *)__pyx_codeobj__237)); if (unlikely(!__pyx_t_7)) __PYX_ERR(6, 707, __pyx_L1_error)
  149438. __Pyx_GOTREF(__pyx_t_7);
  149439. if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_pause_writing, __pyx_t_7) < 0) __PYX_ERR(6, 707, __pyx_L1_error)
  149440. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  149441. /* "uvloop/handles/process.pyx":710
  149442. * (<UVProcessTransport>self.proc)._protocol.pause_writing()
  149443. *
  149444. * def resume_writing(self): # <<<<<<<<<<<<<<
  149445. * (<UVProcessTransport>self.proc)._protocol.resume_writing()
  149446. *
  149447. */
  149448. __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6uvloop_4loop_24WriteSubprocessPipeProto_11resume_writing, 0, __pyx_n_s_WriteSubprocessPipeProto_resume, NULL, __pyx_n_s_uvloop_loop, __pyx_d, ((PyObject *)__pyx_codeobj__239)); if (unlikely(!__pyx_t_7)) __PYX_ERR(6, 710, __pyx_L1_error)
  149449. __Pyx_GOTREF(__pyx_t_7);
  149450. if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_resume_writing, __pyx_t_7) < 0) __PYX_ERR(6, 710, __pyx_L1_error)
  149451. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  149452. /* "uvloop/handles/process.pyx":682
  149453. *
  149454. *
  149455. * class WriteSubprocessPipeProto(aio_BaseProtocol): # <<<<<<<<<<<<<<
  149456. *
  149457. * def __init__(self, proc, fd):
  149458. */
  149459. __pyx_t_7 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_WriteSubprocessPipeProto, __pyx_t_5, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(6, 682, __pyx_L1_error)
  149460. __Pyx_GOTREF(__pyx_t_7);
  149461. if (PyDict_SetItem(__pyx_d, __pyx_n_s_WriteSubprocessPipeProto, __pyx_t_7) < 0) __PYX_ERR(6, 682, __pyx_L1_error)
  149462. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  149463. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  149464. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  149465. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  149466. /* "uvloop/handles/process.pyx":714
  149467. *
  149468. *
  149469. * class ReadSubprocessPipeProto(WriteSubprocessPipeProto, # <<<<<<<<<<<<<<
  149470. * aio_Protocol):
  149471. *
  149472. */
  149473. __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_WriteSubprocessPipeProto); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 714, __pyx_L1_error)
  149474. __Pyx_GOTREF(__pyx_t_5);
  149475. /* "uvloop/handles/process.pyx":715
  149476. *
  149477. * class ReadSubprocessPipeProto(WriteSubprocessPipeProto,
  149478. * aio_Protocol): # <<<<<<<<<<<<<<
  149479. *
  149480. * def data_received(self, data):
  149481. */
  149482. __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 714, __pyx_L1_error)
  149483. __Pyx_GOTREF(__pyx_t_1);
  149484. __Pyx_GIVEREF(__pyx_t_5);
  149485. PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5);
  149486. __Pyx_INCREF(__pyx_v_6uvloop_4loop_aio_Protocol);
  149487. __Pyx_GIVEREF(__pyx_v_6uvloop_4loop_aio_Protocol);
  149488. PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_6uvloop_4loop_aio_Protocol);
  149489. __pyx_t_5 = 0;
  149490. /* "uvloop/handles/process.pyx":714
  149491. *
  149492. *
  149493. * class ReadSubprocessPipeProto(WriteSubprocessPipeProto, # <<<<<<<<<<<<<<
  149494. * aio_Protocol):
  149495. *
  149496. */
  149497. __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 714, __pyx_L1_error)
  149498. __Pyx_GOTREF(__pyx_t_5);
  149499. __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __pyx_t_1, __pyx_n_s_ReadSubprocessPipeProto, __pyx_n_s_ReadSubprocessPipeProto, (PyObject *) NULL, __pyx_n_s_uvloop_loop, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 714, __pyx_L1_error)
  149500. __Pyx_GOTREF(__pyx_t_2);
  149501. /* "uvloop/handles/process.pyx":717
  149502. * aio_Protocol):
  149503. *
  149504. * def data_received(self, data): # <<<<<<<<<<<<<<
  149505. * (<UVProcessTransport>self.proc)._pipe_data_received(self.fd, data)
  149506. *
  149507. */
  149508. __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6uvloop_4loop_23ReadSubprocessPipeProto_1data_received, 0, __pyx_n_s_ReadSubprocessPipeProto_data_rec, NULL, __pyx_n_s_uvloop_loop, __pyx_d, ((PyObject *)__pyx_codeobj__241)); if (unlikely(!__pyx_t_7)) __PYX_ERR(6, 717, __pyx_L1_error)
  149509. __Pyx_GOTREF(__pyx_t_7);
  149510. if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_data_received, __pyx_t_7) < 0) __PYX_ERR(6, 717, __pyx_L1_error)
  149511. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  149512. /* "uvloop/handles/process.pyx":714
  149513. *
  149514. *
  149515. * class ReadSubprocessPipeProto(WriteSubprocessPipeProto, # <<<<<<<<<<<<<<
  149516. * aio_Protocol):
  149517. *
  149518. */
  149519. __pyx_t_7 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_n_s_ReadSubprocessPipeProto, __pyx_t_1, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(6, 714, __pyx_L1_error)
  149520. __Pyx_GOTREF(__pyx_t_7);
  149521. if (PyDict_SetItem(__pyx_d, __pyx_n_s_ReadSubprocessPipeProto, __pyx_t_7) < 0) __PYX_ERR(6, 714, __pyx_L1_error)
  149522. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  149523. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  149524. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  149525. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  149526. /* "uvloop/dns.pyx":74
  149527. *
  149528. *
  149529. * cdef LruCache sockaddrs = LruCache(maxsize=DNS_PYADDR_TO_SOCKADDR_CACHE_SIZE) # <<<<<<<<<<<<<<
  149530. *
  149531. *
  149532. */
  149533. __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 74, __pyx_L1_error)
  149534. __Pyx_GOTREF(__pyx_t_1);
  149535. if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_maxsize, __pyx_int_2048) < 0) __PYX_ERR(7, 74, __pyx_L1_error)
  149536. __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6uvloop_4loop_LruCache), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(7, 74, __pyx_L1_error)
  149537. __Pyx_GOTREF(__pyx_t_5);
  149538. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  149539. __Pyx_XGOTREF(((PyObject *)__pyx_v_6uvloop_4loop_sockaddrs));
  149540. __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_sockaddrs, ((struct __pyx_obj_6uvloop_4loop_LruCache *)__pyx_t_5));
  149541. __Pyx_GIVEREF(__pyx_t_5);
  149542. __pyx_t_5 = 0;
  149543. /* "uvloop/server.pyx":1
  149544. * import asyncio # <<<<<<<<<<<<<<
  149545. *
  149546. *
  149547. */
  149548. __pyx_t_5 = __Pyx_patch_asyncio(__Pyx_Import(__pyx_n_s_asyncio, 0, 0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(24, 1, __pyx_L1_error)
  149549. __Pyx_GOTREF(__pyx_t_5);
  149550. if (PyDict_SetItem(__pyx_d, __pyx_n_s_asyncio, __pyx_t_5) < 0) __PYX_ERR(24, 1, __pyx_L1_error)
  149551. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  149552. /* "uvloop/loop.pyx":3116
  149553. *
  149554. * # Used in UVProcess
  149555. * cdef vint __atfork_installed = 0 # <<<<<<<<<<<<<<
  149556. * cdef vint __forking = 0
  149557. * cdef Loop __forking_loop = None
  149558. */
  149559. __pyx_v_6uvloop_4loop___atfork_installed = 0;
  149560. /* "uvloop/loop.pyx":3117
  149561. * # Used in UVProcess
  149562. * cdef vint __atfork_installed = 0
  149563. * cdef vint __forking = 0 # <<<<<<<<<<<<<<
  149564. * cdef Loop __forking_loop = None
  149565. *
  149566. */
  149567. __pyx_v_6uvloop_4loop___forking = 0;
  149568. /* "uvloop/loop.pyx":3118
  149569. * cdef vint __atfork_installed = 0
  149570. * cdef vint __forking = 0
  149571. * cdef Loop __forking_loop = None # <<<<<<<<<<<<<<
  149572. *
  149573. *
  149574. */
  149575. __Pyx_INCREF(Py_None);
  149576. __Pyx_XGOTREF(((PyObject *)__pyx_v_6uvloop_4loop___forking_loop));
  149577. __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop___forking_loop, ((struct __pyx_obj_6uvloop_4loop_Loop *)Py_None));
  149578. __Pyx_GIVEREF(Py_None);
  149579. /* "uvloop/loop.pyx":3148
  149580. *
  149581. * # Install PyMem* memory allocators
  149582. * cdef vint __mem_installed = 0 # <<<<<<<<<<<<<<
  149583. * cdef __install_pymem():
  149584. * global __mem_installed
  149585. */
  149586. __pyx_v_6uvloop_4loop___mem_installed = 0;
  149587. /* "uvloop/loop.pyx":3182
  149588. *
  149589. * @cython.iterable_coroutine
  149590. * async def _test_coroutine_1(): # <<<<<<<<<<<<<<
  149591. * return 42
  149592. */
  149593. __pyx_t_5 = PyCFunction_NewEx(&__pyx_mdef_6uvloop_4loop_1_test_coroutine_1, NULL, __pyx_n_s_uvloop_loop); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 3182, __pyx_L1_error)
  149594. __Pyx_GOTREF(__pyx_t_5);
  149595. if (PyDict_SetItem(__pyx_d, __pyx_n_s_test_coroutine_1, __pyx_t_5) < 0) __PYX_ERR(2, 3182, __pyx_L1_error)
  149596. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  149597. /* "(tree fragment)":1
  149598. * def __pyx_unpickle_PseudoSocket(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
  149599. * cdef object __pyx_PickleError
  149600. * cdef object __pyx_result
  149601. */
  149602. __pyx_t_5 = PyCFunction_NewEx(&__pyx_mdef_6uvloop_4loop_4__pyx_unpickle_PseudoSocket, NULL, __pyx_n_s_uvloop_loop); if (unlikely(!__pyx_t_5)) __PYX_ERR(9, 1, __pyx_L1_error)
  149603. __Pyx_GOTREF(__pyx_t_5);
  149604. if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_PseudoSocket, __pyx_t_5) < 0) __PYX_ERR(9, 1, __pyx_L1_error)
  149605. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  149606. /* "(tree fragment)":11
  149607. * __pyx_unpickle_PseudoSocket__set_state(<PseudoSocket> __pyx_result, __pyx_state)
  149608. * return __pyx_result
  149609. * cdef __pyx_unpickle_PseudoSocket__set_state(PseudoSocket __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
  149610. * __pyx_result._family = __pyx_state[0]; __pyx_result._fd = __pyx_state[1]; __pyx_result._peername = __pyx_state[2]; __pyx_result._proto = __pyx_state[3]; __pyx_result._sockname = __pyx_state[4]; __pyx_result._type = __pyx_state[5]
  149611. * if len(__pyx_state) > 6 and hasattr(__pyx_result, '__dict__'):
  149612. */
  149613. __pyx_t_5 = PyCFunction_NewEx(&__pyx_mdef_6uvloop_4loop_6__pyx_unpickle_LruCache, NULL, __pyx_n_s_uvloop_loop); if (unlikely(!__pyx_t_5)) __PYX_ERR(9, 1, __pyx_L1_error)
  149614. __Pyx_GOTREF(__pyx_t_5);
  149615. if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_LruCache, __pyx_t_5) < 0) __PYX_ERR(9, 1, __pyx_L1_error)
  149616. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  149617. /* "uvloop/loop.pyx":1
  149618. * # cython: language_level=3, embedsignature=True # <<<<<<<<<<<<<<
  149619. *
  149620. * import asyncio
  149621. */
  149622. __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1, __pyx_L1_error)
  149623. __Pyx_GOTREF(__pyx_t_5);
  149624. if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_5) < 0) __PYX_ERR(2, 1, __pyx_L1_error)
  149625. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  149626. /* "cfunc.to_py":64
  149627. *
  149628. * @cname("__Pyx_CFunc_object____Loop____bint___to_py")
  149629. * cdef object __Pyx_CFunc_object____Loop____bint___to_py(object (*f)(Loop, bint) ): # <<<<<<<<<<<<<<
  149630. * def wrap(Loop self, bint enabled):
  149631. * """wrap(self: 'Loop', enabled: bool)"""
  149632. */
  149633. /*--- Wrapped vars code ---*/
  149634. goto __pyx_L0;
  149635. __pyx_L1_error:;
  149636. __Pyx_XDECREF(__pyx_t_1);
  149637. __Pyx_XDECREF(__pyx_t_2);
  149638. __Pyx_XDECREF(__pyx_t_5);
  149639. __Pyx_XDECREF(__pyx_t_7);
  149640. if (__pyx_m) {
  149641. if (__pyx_d) {
  149642. __Pyx_AddTraceback("init uvloop.loop", __pyx_clineno, __pyx_lineno, __pyx_filename);
  149643. }
  149644. Py_CLEAR(__pyx_m);
  149645. } else if (!PyErr_Occurred()) {
  149646. PyErr_SetString(PyExc_ImportError, "init uvloop.loop");
  149647. }
  149648. __pyx_L0:;
  149649. __Pyx_RefNannyFinishContext();
  149650. #if CYTHON_PEP489_MULTI_PHASE_INIT
  149651. return (__pyx_m != NULL) ? 0 : -1;
  149652. #elif PY_MAJOR_VERSION >= 3
  149653. return __pyx_m;
  149654. #else
  149655. return;
  149656. #endif
  149657. }
  149658. /* --- Runtime support code --- */
  149659. /* Refnanny */
  149660. #if CYTHON_REFNANNY
  149661. static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
  149662. PyObject *m = NULL, *p = NULL;
  149663. void *r = NULL;
  149664. m = PyImport_ImportModule(modname);
  149665. if (!m) goto end;
  149666. p = PyObject_GetAttrString(m, "RefNannyAPI");
  149667. if (!p) goto end;
  149668. r = PyLong_AsVoidPtr(p);
  149669. end:
  149670. Py_XDECREF(p);
  149671. Py_XDECREF(m);
  149672. return (__Pyx_RefNannyAPIStruct *)r;
  149673. }
  149674. #endif
  149675. /* PyObjectGetAttrStr */
  149676. #if CYTHON_USE_TYPE_SLOTS
  149677. static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
  149678. PyTypeObject* tp = Py_TYPE(obj);
  149679. if (likely(tp->tp_getattro))
  149680. return tp->tp_getattro(obj, attr_name);
  149681. #if PY_MAJOR_VERSION < 3
  149682. if (likely(tp->tp_getattr))
  149683. return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
  149684. #endif
  149685. return PyObject_GetAttr(obj, attr_name);
  149686. }
  149687. #endif
  149688. /* GetBuiltinName */
  149689. static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
  149690. PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
  149691. if (unlikely(!result)) {
  149692. PyErr_Format(PyExc_NameError,
  149693. #if PY_MAJOR_VERSION >= 3
  149694. "name '%U' is not defined", name);
  149695. #else
  149696. "name '%.200s' is not defined", PyString_AS_STRING(name));
  149697. #endif
  149698. }
  149699. return result;
  149700. }
  149701. /* decode_c_string */
  149702. static CYTHON_INLINE PyObject* __Pyx_decode_c_string(
  149703. const char* cstring, Py_ssize_t start, Py_ssize_t stop,
  149704. const char* encoding, const char* errors,
  149705. PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) {
  149706. Py_ssize_t length;
  149707. if (unlikely((start < 0) | (stop < 0))) {
  149708. size_t slen = strlen(cstring);
  149709. if (unlikely(slen > (size_t) PY_SSIZE_T_MAX)) {
  149710. PyErr_SetString(PyExc_OverflowError,
  149711. "c-string too long to convert to Python");
  149712. return NULL;
  149713. }
  149714. length = (Py_ssize_t) slen;
  149715. if (start < 0) {
  149716. start += length;
  149717. if (start < 0)
  149718. start = 0;
  149719. }
  149720. if (stop < 0)
  149721. stop += length;
  149722. }
  149723. length = stop - start;
  149724. if (unlikely(length <= 0))
  149725. return PyUnicode_FromUnicode(NULL, 0);
  149726. cstring += start;
  149727. if (decode_func) {
  149728. return decode_func(cstring, length, errors);
  149729. } else {
  149730. return PyUnicode_Decode(cstring, length, encoding, errors);
  149731. }
  149732. }
  149733. /* PyDictVersioning */
  149734. #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
  149735. static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) {
  149736. PyObject *dict = Py_TYPE(obj)->tp_dict;
  149737. return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;
  149738. }
  149739. static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) {
  149740. PyObject **dictptr = NULL;
  149741. Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset;
  149742. if (offset) {
  149743. #if CYTHON_COMPILING_IN_CPYTHON
  149744. dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj);
  149745. #else
  149746. dictptr = _PyObject_GetDictPtr(obj);
  149747. #endif
  149748. }
  149749. return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
  149750. }
  149751. static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) {
  149752. PyObject *dict = Py_TYPE(obj)->tp_dict;
  149753. if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))
  149754. return 0;
  149755. return obj_dict_version == __Pyx_get_object_dict_version(obj);
  149756. }
  149757. #endif
  149758. /* GetModuleGlobalName */
  149759. #if CYTHON_USE_DICT_VERSIONS
  149760. static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value)
  149761. #else
  149762. static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
  149763. #endif
  149764. {
  149765. PyObject *result;
  149766. #if !CYTHON_AVOID_BORROWED_REFS
  149767. #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1
  149768. result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash);
  149769. __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
  149770. if (likely(result)) {
  149771. return __Pyx_NewRef(result);
  149772. } else if (unlikely(PyErr_Occurred())) {
  149773. return NULL;
  149774. }
  149775. #else
  149776. result = PyDict_GetItem(__pyx_d, name);
  149777. __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
  149778. if (likely(result)) {
  149779. return __Pyx_NewRef(result);
  149780. }
  149781. #endif
  149782. #else
  149783. result = PyObject_GetItem(__pyx_d, name);
  149784. __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
  149785. if (likely(result)) {
  149786. return __Pyx_NewRef(result);
  149787. }
  149788. PyErr_Clear();
  149789. #endif
  149790. return __Pyx_GetBuiltinName(name);
  149791. }
  149792. /* PyFunctionFastCall */
  149793. #if CYTHON_FAST_PYCALL
  149794. static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
  149795. PyObject *globals) {
  149796. PyFrameObject *f;
  149797. PyThreadState *tstate = __Pyx_PyThreadState_Current;
  149798. PyObject **fastlocals;
  149799. Py_ssize_t i;
  149800. PyObject *result;
  149801. assert(globals != NULL);
  149802. /* XXX Perhaps we should create a specialized
  149803. PyFrame_New() that doesn't take locals, but does
  149804. take builtins without sanity checking them.
  149805. */
  149806. assert(tstate != NULL);
  149807. f = PyFrame_New(tstate, co, globals, NULL);
  149808. if (f == NULL) {
  149809. return NULL;
  149810. }
  149811. fastlocals = __Pyx_PyFrame_GetLocalsplus(f);
  149812. for (i = 0; i < na; i++) {
  149813. Py_INCREF(*args);
  149814. fastlocals[i] = *args++;
  149815. }
  149816. result = PyEval_EvalFrameEx(f,0);
  149817. ++tstate->recursion_depth;
  149818. Py_DECREF(f);
  149819. --tstate->recursion_depth;
  149820. return result;
  149821. }
  149822. #if 1 || PY_VERSION_HEX < 0x030600B1
  149823. static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, int nargs, PyObject *kwargs) {
  149824. PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
  149825. PyObject *globals = PyFunction_GET_GLOBALS(func);
  149826. PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
  149827. PyObject *closure;
  149828. #if PY_MAJOR_VERSION >= 3
  149829. PyObject *kwdefs;
  149830. #endif
  149831. PyObject *kwtuple, **k;
  149832. PyObject **d;
  149833. Py_ssize_t nd;
  149834. Py_ssize_t nk;
  149835. PyObject *result;
  149836. assert(kwargs == NULL || PyDict_Check(kwargs));
  149837. nk = kwargs ? PyDict_Size(kwargs) : 0;
  149838. if (Py_EnterRecursiveCall((char*)" while calling a Python object")) {
  149839. return NULL;
  149840. }
  149841. if (
  149842. #if PY_MAJOR_VERSION >= 3
  149843. co->co_kwonlyargcount == 0 &&
  149844. #endif
  149845. likely(kwargs == NULL || nk == 0) &&
  149846. co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
  149847. if (argdefs == NULL && co->co_argcount == nargs) {
  149848. result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
  149849. goto done;
  149850. }
  149851. else if (nargs == 0 && argdefs != NULL
  149852. && co->co_argcount == Py_SIZE(argdefs)) {
  149853. /* function called with no arguments, but all parameters have
  149854. a default value: use default values as arguments .*/
  149855. args = &PyTuple_GET_ITEM(argdefs, 0);
  149856. result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
  149857. goto done;
  149858. }
  149859. }
  149860. if (kwargs != NULL) {
  149861. Py_ssize_t pos, i;
  149862. kwtuple = PyTuple_New(2 * nk);
  149863. if (kwtuple == NULL) {
  149864. result = NULL;
  149865. goto done;
  149866. }
  149867. k = &PyTuple_GET_ITEM(kwtuple, 0);
  149868. pos = i = 0;
  149869. while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
  149870. Py_INCREF(k[i]);
  149871. Py_INCREF(k[i+1]);
  149872. i += 2;
  149873. }
  149874. nk = i / 2;
  149875. }
  149876. else {
  149877. kwtuple = NULL;
  149878. k = NULL;
  149879. }
  149880. closure = PyFunction_GET_CLOSURE(func);
  149881. #if PY_MAJOR_VERSION >= 3
  149882. kwdefs = PyFunction_GET_KW_DEFAULTS(func);
  149883. #endif
  149884. if (argdefs != NULL) {
  149885. d = &PyTuple_GET_ITEM(argdefs, 0);
  149886. nd = Py_SIZE(argdefs);
  149887. }
  149888. else {
  149889. d = NULL;
  149890. nd = 0;
  149891. }
  149892. #if PY_MAJOR_VERSION >= 3
  149893. result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
  149894. args, nargs,
  149895. k, (int)nk,
  149896. d, (int)nd, kwdefs, closure);
  149897. #else
  149898. result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
  149899. args, nargs,
  149900. k, (int)nk,
  149901. d, (int)nd, closure);
  149902. #endif
  149903. Py_XDECREF(kwtuple);
  149904. done:
  149905. Py_LeaveRecursiveCall();
  149906. return result;
  149907. }
  149908. #endif
  149909. #endif
  149910. /* PyCFunctionFastCall */
  149911. #if CYTHON_FAST_PYCCALL
  149912. static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) {
  149913. PyCFunctionObject *func = (PyCFunctionObject*)func_obj;
  149914. PyCFunction meth = PyCFunction_GET_FUNCTION(func);
  149915. PyObject *self = PyCFunction_GET_SELF(func);
  149916. int flags = PyCFunction_GET_FLAGS(func);
  149917. assert(PyCFunction_Check(func));
  149918. assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)));
  149919. assert(nargs >= 0);
  149920. assert(nargs == 0 || args != NULL);
  149921. /* _PyCFunction_FastCallDict() must not be called with an exception set,
  149922. because it may clear it (directly or indirectly) and so the
  149923. caller loses its exception */
  149924. assert(!PyErr_Occurred());
  149925. if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) {
  149926. return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL);
  149927. } else {
  149928. return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs);
  149929. }
  149930. }
  149931. #endif
  149932. /* PyObjectCall */
  149933. #if CYTHON_COMPILING_IN_CPYTHON
  149934. static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
  149935. PyObject *result;
  149936. ternaryfunc call = func->ob_type->tp_call;
  149937. if (unlikely(!call))
  149938. return PyObject_Call(func, arg, kw);
  149939. if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
  149940. return NULL;
  149941. result = (*call)(func, arg, kw);
  149942. Py_LeaveRecursiveCall();
  149943. if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
  149944. PyErr_SetString(
  149945. PyExc_SystemError,
  149946. "NULL result without error in PyObject_Call");
  149947. }
  149948. return result;
  149949. }
  149950. #endif
  149951. /* PyObjectCallMethO */
  149952. #if CYTHON_COMPILING_IN_CPYTHON
  149953. static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
  149954. PyObject *self, *result;
  149955. PyCFunction cfunc;
  149956. cfunc = PyCFunction_GET_FUNCTION(func);
  149957. self = PyCFunction_GET_SELF(func);
  149958. if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
  149959. return NULL;
  149960. result = cfunc(self, arg);
  149961. Py_LeaveRecursiveCall();
  149962. if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
  149963. PyErr_SetString(
  149964. PyExc_SystemError,
  149965. "NULL result without error in PyObject_Call");
  149966. }
  149967. return result;
  149968. }
  149969. #endif
  149970. /* PyObjectCallNoArg */
  149971. #if CYTHON_COMPILING_IN_CPYTHON
  149972. static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
  149973. #if CYTHON_FAST_PYCALL
  149974. if (PyFunction_Check(func)) {
  149975. return __Pyx_PyFunction_FastCall(func, NULL, 0);
  149976. }
  149977. #endif
  149978. #ifdef __Pyx_CyFunction_USED
  149979. if (likely(PyCFunction_Check(func) || __Pyx_CyFunction_Check(func)))
  149980. #else
  149981. if (likely(PyCFunction_Check(func)))
  149982. #endif
  149983. {
  149984. if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
  149985. return __Pyx_PyObject_CallMethO(func, NULL);
  149986. }
  149987. }
  149988. return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL);
  149989. }
  149990. #endif
  149991. /* PyObjectCallOneArg */
  149992. #if CYTHON_COMPILING_IN_CPYTHON
  149993. static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
  149994. PyObject *result;
  149995. PyObject *args = PyTuple_New(1);
  149996. if (unlikely(!args)) return NULL;
  149997. Py_INCREF(arg);
  149998. PyTuple_SET_ITEM(args, 0, arg);
  149999. result = __Pyx_PyObject_Call(func, args, NULL);
  150000. Py_DECREF(args);
  150001. return result;
  150002. }
  150003. static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
  150004. #if CYTHON_FAST_PYCALL
  150005. if (PyFunction_Check(func)) {
  150006. return __Pyx_PyFunction_FastCall(func, &arg, 1);
  150007. }
  150008. #endif
  150009. if (likely(PyCFunction_Check(func))) {
  150010. if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
  150011. return __Pyx_PyObject_CallMethO(func, arg);
  150012. #if CYTHON_FAST_PYCCALL
  150013. } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) {
  150014. return __Pyx_PyCFunction_FastCall(func, &arg, 1);
  150015. #endif
  150016. }
  150017. }
  150018. return __Pyx__PyObject_CallOneArg(func, arg);
  150019. }
  150020. #else
  150021. static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
  150022. PyObject *result;
  150023. PyObject *args = PyTuple_Pack(1, arg);
  150024. if (unlikely(!args)) return NULL;
  150025. result = __Pyx_PyObject_Call(func, args, NULL);
  150026. Py_DECREF(args);
  150027. return result;
  150028. }
  150029. #endif
  150030. /* PyIntBinop */
  150031. #if !CYTHON_COMPILING_IN_PYPY
  150032. static PyObject* __Pyx_PyInt_AndObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) {
  150033. (void)inplace;
  150034. (void)zerodivision_check;
  150035. #if PY_MAJOR_VERSION < 3
  150036. if (likely(PyInt_CheckExact(op1))) {
  150037. const long b = intval;
  150038. long a = PyInt_AS_LONG(op1);
  150039. return PyInt_FromLong(a & b);
  150040. }
  150041. #endif
  150042. #if CYTHON_USE_PYLONG_INTERNALS
  150043. if (likely(PyLong_CheckExact(op1))) {
  150044. const long b = intval;
  150045. long a, x;
  150046. #ifdef HAVE_LONG_LONG
  150047. const PY_LONG_LONG llb = intval;
  150048. PY_LONG_LONG lla, llx;
  150049. #endif
  150050. const digit* digits = ((PyLongObject*)op1)->ob_digit;
  150051. const Py_ssize_t size = Py_SIZE(op1);
  150052. if (likely(__Pyx_sst_abs(size) <= 1)) {
  150053. a = likely(size) ? digits[0] : 0;
  150054. if (size == -1) a = -a;
  150055. } else {
  150056. switch (size) {
  150057. case -2:
  150058. if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
  150059. a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
  150060. break;
  150061. #ifdef HAVE_LONG_LONG
  150062. } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
  150063. lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
  150064. goto long_long;
  150065. #endif
  150066. }
  150067. CYTHON_FALLTHROUGH;
  150068. case 2:
  150069. if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
  150070. a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
  150071. break;
  150072. #ifdef HAVE_LONG_LONG
  150073. } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
  150074. lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
  150075. goto long_long;
  150076. #endif
  150077. }
  150078. CYTHON_FALLTHROUGH;
  150079. case -3:
  150080. if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
  150081. a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
  150082. break;
  150083. #ifdef HAVE_LONG_LONG
  150084. } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
  150085. lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
  150086. goto long_long;
  150087. #endif
  150088. }
  150089. CYTHON_FALLTHROUGH;
  150090. case 3:
  150091. if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
  150092. a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
  150093. break;
  150094. #ifdef HAVE_LONG_LONG
  150095. } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
  150096. lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
  150097. goto long_long;
  150098. #endif
  150099. }
  150100. CYTHON_FALLTHROUGH;
  150101. case -4:
  150102. if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
  150103. a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
  150104. break;
  150105. #ifdef HAVE_LONG_LONG
  150106. } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
  150107. lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
  150108. goto long_long;
  150109. #endif
  150110. }
  150111. CYTHON_FALLTHROUGH;
  150112. case 4:
  150113. if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
  150114. a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
  150115. break;
  150116. #ifdef HAVE_LONG_LONG
  150117. } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
  150118. lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
  150119. goto long_long;
  150120. #endif
  150121. }
  150122. CYTHON_FALLTHROUGH;
  150123. default: return PyLong_Type.tp_as_number->nb_and(op1, op2);
  150124. }
  150125. }
  150126. x = a & b;
  150127. return PyLong_FromLong(x);
  150128. #ifdef HAVE_LONG_LONG
  150129. long_long:
  150130. llx = lla & llb;
  150131. return PyLong_FromLongLong(llx);
  150132. #endif
  150133. }
  150134. #endif
  150135. return (inplace ? PyNumber_InPlaceAnd : PyNumber_And)(op1, op2);
  150136. }
  150137. #endif
  150138. /* PyObjectCall2Args */
  150139. static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) {
  150140. PyObject *args, *result = NULL;
  150141. #if CYTHON_FAST_PYCALL
  150142. if (PyFunction_Check(function)) {
  150143. PyObject *args[2] = {arg1, arg2};
  150144. return __Pyx_PyFunction_FastCall(function, args, 2);
  150145. }
  150146. #endif
  150147. #if CYTHON_FAST_PYCCALL
  150148. if (__Pyx_PyFastCFunction_Check(function)) {
  150149. PyObject *args[2] = {arg1, arg2};
  150150. return __Pyx_PyCFunction_FastCall(function, args, 2);
  150151. }
  150152. #endif
  150153. args = PyTuple_New(2);
  150154. if (unlikely(!args)) goto done;
  150155. Py_INCREF(arg1);
  150156. PyTuple_SET_ITEM(args, 0, arg1);
  150157. Py_INCREF(arg2);
  150158. PyTuple_SET_ITEM(args, 1, arg2);
  150159. Py_INCREF(function);
  150160. result = __Pyx_PyObject_Call(function, args, NULL);
  150161. Py_DECREF(args);
  150162. Py_DECREF(function);
  150163. done:
  150164. return result;
  150165. }
  150166. /* PyIntBinop */
  150167. #if !CYTHON_COMPILING_IN_PYPY
  150168. static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) {
  150169. (void)inplace;
  150170. (void)zerodivision_check;
  150171. #if PY_MAJOR_VERSION < 3
  150172. if (likely(PyInt_CheckExact(op1))) {
  150173. const long b = intval;
  150174. long x;
  150175. long a = PyInt_AS_LONG(op1);
  150176. x = (long)((unsigned long)a + b);
  150177. if (likely((x^a) >= 0 || (x^b) >= 0))
  150178. return PyInt_FromLong(x);
  150179. return PyLong_Type.tp_as_number->nb_add(op1, op2);
  150180. }
  150181. #endif
  150182. #if CYTHON_USE_PYLONG_INTERNALS
  150183. if (likely(PyLong_CheckExact(op1))) {
  150184. const long b = intval;
  150185. long a, x;
  150186. #ifdef HAVE_LONG_LONG
  150187. const PY_LONG_LONG llb = intval;
  150188. PY_LONG_LONG lla, llx;
  150189. #endif
  150190. const digit* digits = ((PyLongObject*)op1)->ob_digit;
  150191. const Py_ssize_t size = Py_SIZE(op1);
  150192. if (likely(__Pyx_sst_abs(size) <= 1)) {
  150193. a = likely(size) ? digits[0] : 0;
  150194. if (size == -1) a = -a;
  150195. } else {
  150196. switch (size) {
  150197. case -2:
  150198. if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
  150199. a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
  150200. break;
  150201. #ifdef HAVE_LONG_LONG
  150202. } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
  150203. lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
  150204. goto long_long;
  150205. #endif
  150206. }
  150207. CYTHON_FALLTHROUGH;
  150208. case 2:
  150209. if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
  150210. a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
  150211. break;
  150212. #ifdef HAVE_LONG_LONG
  150213. } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
  150214. lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
  150215. goto long_long;
  150216. #endif
  150217. }
  150218. CYTHON_FALLTHROUGH;
  150219. case -3:
  150220. if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
  150221. a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
  150222. break;
  150223. #ifdef HAVE_LONG_LONG
  150224. } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
  150225. lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
  150226. goto long_long;
  150227. #endif
  150228. }
  150229. CYTHON_FALLTHROUGH;
  150230. case 3:
  150231. if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
  150232. a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
  150233. break;
  150234. #ifdef HAVE_LONG_LONG
  150235. } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
  150236. lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
  150237. goto long_long;
  150238. #endif
  150239. }
  150240. CYTHON_FALLTHROUGH;
  150241. case -4:
  150242. if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
  150243. a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
  150244. break;
  150245. #ifdef HAVE_LONG_LONG
  150246. } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
  150247. lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
  150248. goto long_long;
  150249. #endif
  150250. }
  150251. CYTHON_FALLTHROUGH;
  150252. case 4:
  150253. if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
  150254. a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
  150255. break;
  150256. #ifdef HAVE_LONG_LONG
  150257. } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
  150258. lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
  150259. goto long_long;
  150260. #endif
  150261. }
  150262. CYTHON_FALLTHROUGH;
  150263. default: return PyLong_Type.tp_as_number->nb_add(op1, op2);
  150264. }
  150265. }
  150266. x = a + b;
  150267. return PyLong_FromLong(x);
  150268. #ifdef HAVE_LONG_LONG
  150269. long_long:
  150270. llx = lla + llb;
  150271. return PyLong_FromLongLong(llx);
  150272. #endif
  150273. }
  150274. #endif
  150275. if (PyFloat_CheckExact(op1)) {
  150276. const long b = intval;
  150277. double a = PyFloat_AS_DOUBLE(op1);
  150278. double result;
  150279. PyFPE_START_PROTECT("add", return NULL)
  150280. result = ((double)a) + (double)b;
  150281. PyFPE_END_PROTECT(result)
  150282. return PyFloat_FromDouble(result);
  150283. }
  150284. return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
  150285. }
  150286. #endif
  150287. /* PyObjectSetAttrStr */
  150288. #if CYTHON_USE_TYPE_SLOTS
  150289. static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) {
  150290. PyTypeObject* tp = Py_TYPE(obj);
  150291. if (likely(tp->tp_setattro))
  150292. return tp->tp_setattro(obj, attr_name, value);
  150293. #if PY_MAJOR_VERSION < 3
  150294. if (likely(tp->tp_setattr))
  150295. return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value);
  150296. #endif
  150297. return PyObject_SetAttr(obj, attr_name, value);
  150298. }
  150299. #endif
  150300. /* RaiseArgTupleInvalid */
  150301. static void __Pyx_RaiseArgtupleInvalid(
  150302. const char* func_name,
  150303. int exact,
  150304. Py_ssize_t num_min,
  150305. Py_ssize_t num_max,
  150306. Py_ssize_t num_found)
  150307. {
  150308. Py_ssize_t num_expected;
  150309. const char *more_or_less;
  150310. if (num_found < num_min) {
  150311. num_expected = num_min;
  150312. more_or_less = "at least";
  150313. } else {
  150314. num_expected = num_max;
  150315. more_or_less = "at most";
  150316. }
  150317. if (exact) {
  150318. more_or_less = "exactly";
  150319. }
  150320. PyErr_Format(PyExc_TypeError,
  150321. "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
  150322. func_name, more_or_less, num_expected,
  150323. (num_expected == 1) ? "" : "s", num_found);
  150324. }
  150325. /* KeywordStringCheck */
  150326. static int __Pyx_CheckKeywordStrings(
  150327. PyObject *kwdict,
  150328. const char* function_name,
  150329. int kw_allowed)
  150330. {
  150331. PyObject* key = 0;
  150332. Py_ssize_t pos = 0;
  150333. #if CYTHON_COMPILING_IN_PYPY
  150334. if (!kw_allowed && PyDict_Next(kwdict, &pos, &key, 0))
  150335. goto invalid_keyword;
  150336. return 1;
  150337. #else
  150338. while (PyDict_Next(kwdict, &pos, &key, 0)) {
  150339. #if PY_MAJOR_VERSION < 3
  150340. if (unlikely(!PyString_Check(key)))
  150341. #endif
  150342. if (unlikely(!PyUnicode_Check(key)))
  150343. goto invalid_keyword_type;
  150344. }
  150345. if ((!kw_allowed) && unlikely(key))
  150346. goto invalid_keyword;
  150347. return 1;
  150348. invalid_keyword_type:
  150349. PyErr_Format(PyExc_TypeError,
  150350. "%.200s() keywords must be strings", function_name);
  150351. return 0;
  150352. #endif
  150353. invalid_keyword:
  150354. PyErr_Format(PyExc_TypeError,
  150355. #if PY_MAJOR_VERSION < 3
  150356. "%.200s() got an unexpected keyword argument '%.200s'",
  150357. function_name, PyString_AsString(key));
  150358. #else
  150359. "%s() got an unexpected keyword argument '%U'",
  150360. function_name, key);
  150361. #endif
  150362. return 0;
  150363. }
  150364. /* PyErrFetchRestore */
  150365. #if CYTHON_FAST_THREAD_STATE
  150366. static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
  150367. PyObject *tmp_type, *tmp_value, *tmp_tb;
  150368. tmp_type = tstate->curexc_type;
  150369. tmp_value = tstate->curexc_value;
  150370. tmp_tb = tstate->curexc_traceback;
  150371. tstate->curexc_type = type;
  150372. tstate->curexc_value = value;
  150373. tstate->curexc_traceback = tb;
  150374. Py_XDECREF(tmp_type);
  150375. Py_XDECREF(tmp_value);
  150376. Py_XDECREF(tmp_tb);
  150377. }
  150378. static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
  150379. *type = tstate->curexc_type;
  150380. *value = tstate->curexc_value;
  150381. *tb = tstate->curexc_traceback;
  150382. tstate->curexc_type = 0;
  150383. tstate->curexc_value = 0;
  150384. tstate->curexc_traceback = 0;
  150385. }
  150386. #endif
  150387. /* RaiseException */
  150388. #if PY_MAJOR_VERSION < 3
  150389. static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
  150390. CYTHON_UNUSED PyObject *cause) {
  150391. __Pyx_PyThreadState_declare
  150392. Py_XINCREF(type);
  150393. if (!value || value == Py_None)
  150394. value = NULL;
  150395. else
  150396. Py_INCREF(value);
  150397. if (!tb || tb == Py_None)
  150398. tb = NULL;
  150399. else {
  150400. Py_INCREF(tb);
  150401. if (!PyTraceBack_Check(tb)) {
  150402. PyErr_SetString(PyExc_TypeError,
  150403. "raise: arg 3 must be a traceback or None");
  150404. goto raise_error;
  150405. }
  150406. }
  150407. if (PyType_Check(type)) {
  150408. #if CYTHON_COMPILING_IN_PYPY
  150409. if (!value) {
  150410. Py_INCREF(Py_None);
  150411. value = Py_None;
  150412. }
  150413. #endif
  150414. PyErr_NormalizeException(&type, &value, &tb);
  150415. } else {
  150416. if (value) {
  150417. PyErr_SetString(PyExc_TypeError,
  150418. "instance exception may not have a separate value");
  150419. goto raise_error;
  150420. }
  150421. value = type;
  150422. type = (PyObject*) Py_TYPE(type);
  150423. Py_INCREF(type);
  150424. if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
  150425. PyErr_SetString(PyExc_TypeError,
  150426. "raise: exception class must be a subclass of BaseException");
  150427. goto raise_error;
  150428. }
  150429. }
  150430. __Pyx_PyThreadState_assign
  150431. __Pyx_ErrRestore(type, value, tb);
  150432. return;
  150433. raise_error:
  150434. Py_XDECREF(value);
  150435. Py_XDECREF(type);
  150436. Py_XDECREF(tb);
  150437. return;
  150438. }
  150439. #else
  150440. static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
  150441. PyObject* owned_instance = NULL;
  150442. if (tb == Py_None) {
  150443. tb = 0;
  150444. } else if (tb && !PyTraceBack_Check(tb)) {
  150445. PyErr_SetString(PyExc_TypeError,
  150446. "raise: arg 3 must be a traceback or None");
  150447. goto bad;
  150448. }
  150449. if (value == Py_None)
  150450. value = 0;
  150451. if (PyExceptionInstance_Check(type)) {
  150452. if (value) {
  150453. PyErr_SetString(PyExc_TypeError,
  150454. "instance exception may not have a separate value");
  150455. goto bad;
  150456. }
  150457. value = type;
  150458. type = (PyObject*) Py_TYPE(value);
  150459. } else if (PyExceptionClass_Check(type)) {
  150460. PyObject *instance_class = NULL;
  150461. if (value && PyExceptionInstance_Check(value)) {
  150462. instance_class = (PyObject*) Py_TYPE(value);
  150463. if (instance_class != type) {
  150464. int is_subclass = PyObject_IsSubclass(instance_class, type);
  150465. if (!is_subclass) {
  150466. instance_class = NULL;
  150467. } else if (unlikely(is_subclass == -1)) {
  150468. goto bad;
  150469. } else {
  150470. type = instance_class;
  150471. }
  150472. }
  150473. }
  150474. if (!instance_class) {
  150475. PyObject *args;
  150476. if (!value)
  150477. args = PyTuple_New(0);
  150478. else if (PyTuple_Check(value)) {
  150479. Py_INCREF(value);
  150480. args = value;
  150481. } else
  150482. args = PyTuple_Pack(1, value);
  150483. if (!args)
  150484. goto bad;
  150485. owned_instance = PyObject_Call(type, args, NULL);
  150486. Py_DECREF(args);
  150487. if (!owned_instance)
  150488. goto bad;
  150489. value = owned_instance;
  150490. if (!PyExceptionInstance_Check(value)) {
  150491. PyErr_Format(PyExc_TypeError,
  150492. "calling %R should have returned an instance of "
  150493. "BaseException, not %R",
  150494. type, Py_TYPE(value));
  150495. goto bad;
  150496. }
  150497. }
  150498. } else {
  150499. PyErr_SetString(PyExc_TypeError,
  150500. "raise: exception class must be a subclass of BaseException");
  150501. goto bad;
  150502. }
  150503. if (cause) {
  150504. PyObject *fixed_cause;
  150505. if (cause == Py_None) {
  150506. fixed_cause = NULL;
  150507. } else if (PyExceptionClass_Check(cause)) {
  150508. fixed_cause = PyObject_CallObject(cause, NULL);
  150509. if (fixed_cause == NULL)
  150510. goto bad;
  150511. } else if (PyExceptionInstance_Check(cause)) {
  150512. fixed_cause = cause;
  150513. Py_INCREF(fixed_cause);
  150514. } else {
  150515. PyErr_SetString(PyExc_TypeError,
  150516. "exception causes must derive from "
  150517. "BaseException");
  150518. goto bad;
  150519. }
  150520. PyException_SetCause(value, fixed_cause);
  150521. }
  150522. PyErr_SetObject(type, value);
  150523. if (tb) {
  150524. #if CYTHON_COMPILING_IN_PYPY
  150525. PyObject *tmp_type, *tmp_value, *tmp_tb;
  150526. PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
  150527. Py_INCREF(tb);
  150528. PyErr_Restore(tmp_type, tmp_value, tb);
  150529. Py_XDECREF(tmp_tb);
  150530. #else
  150531. PyThreadState *tstate = __Pyx_PyThreadState_Current;
  150532. PyObject* tmp_tb = tstate->curexc_traceback;
  150533. if (tb != tmp_tb) {
  150534. Py_INCREF(tb);
  150535. tstate->curexc_traceback = tb;
  150536. Py_XDECREF(tmp_tb);
  150537. }
  150538. #endif
  150539. }
  150540. bad:
  150541. Py_XDECREF(owned_instance);
  150542. return;
  150543. }
  150544. #endif
  150545. /* ExtTypeTest */
  150546. static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
  150547. if (unlikely(!type)) {
  150548. PyErr_SetString(PyExc_SystemError, "Missing type object");
  150549. return 0;
  150550. }
  150551. if (likely(__Pyx_TypeCheck(obj, type)))
  150552. return 1;
  150553. PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s",
  150554. Py_TYPE(obj)->tp_name, type->tp_name);
  150555. return 0;
  150556. }
  150557. /* GetAttr */
  150558. static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) {
  150559. #if CYTHON_USE_TYPE_SLOTS
  150560. #if PY_MAJOR_VERSION >= 3
  150561. if (likely(PyUnicode_Check(n)))
  150562. #else
  150563. if (likely(PyString_Check(n)))
  150564. #endif
  150565. return __Pyx_PyObject_GetAttrStr(o, n);
  150566. #endif
  150567. return PyObject_GetAttr(o, n);
  150568. }
  150569. /* HasAttr */
  150570. static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) {
  150571. PyObject *r;
  150572. if (unlikely(!__Pyx_PyBaseString_Check(n))) {
  150573. PyErr_SetString(PyExc_TypeError,
  150574. "hasattr(): attribute name must be string");
  150575. return -1;
  150576. }
  150577. r = __Pyx_GetAttr(o, n);
  150578. if (unlikely(!r)) {
  150579. PyErr_Clear();
  150580. return 0;
  150581. } else {
  150582. Py_DECREF(r);
  150583. return 1;
  150584. }
  150585. }
  150586. /* WriteUnraisableException */
  150587. static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno,
  150588. CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename,
  150589. int full_traceback, CYTHON_UNUSED int nogil) {
  150590. PyObject *old_exc, *old_val, *old_tb;
  150591. PyObject *ctx;
  150592. __Pyx_PyThreadState_declare
  150593. #ifdef WITH_THREAD
  150594. PyGILState_STATE state;
  150595. if (nogil)
  150596. state = PyGILState_Ensure();
  150597. #ifdef _MSC_VER
  150598. else state = (PyGILState_STATE)-1;
  150599. #endif
  150600. #endif
  150601. __Pyx_PyThreadState_assign
  150602. __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
  150603. if (full_traceback) {
  150604. Py_XINCREF(old_exc);
  150605. Py_XINCREF(old_val);
  150606. Py_XINCREF(old_tb);
  150607. __Pyx_ErrRestore(old_exc, old_val, old_tb);
  150608. PyErr_PrintEx(1);
  150609. }
  150610. #if PY_MAJOR_VERSION < 3
  150611. ctx = PyString_FromString(name);
  150612. #else
  150613. ctx = PyUnicode_FromString(name);
  150614. #endif
  150615. __Pyx_ErrRestore(old_exc, old_val, old_tb);
  150616. if (!ctx) {
  150617. PyErr_WriteUnraisable(Py_None);
  150618. } else {
  150619. PyErr_WriteUnraisable(ctx);
  150620. Py_DECREF(ctx);
  150621. }
  150622. #ifdef WITH_THREAD
  150623. if (nogil)
  150624. PyGILState_Release(state);
  150625. #endif
  150626. }
  150627. /* RaiseTooManyValuesToUnpack */
  150628. static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
  150629. PyErr_Format(PyExc_ValueError,
  150630. "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
  150631. }
  150632. /* RaiseNeedMoreValuesToUnpack */
  150633. static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
  150634. PyErr_Format(PyExc_ValueError,
  150635. "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
  150636. index, (index == 1) ? "" : "s");
  150637. }
  150638. /* IterFinish */
  150639. static CYTHON_INLINE int __Pyx_IterFinish(void) {
  150640. #if CYTHON_FAST_THREAD_STATE
  150641. PyThreadState *tstate = __Pyx_PyThreadState_Current;
  150642. PyObject* exc_type = tstate->curexc_type;
  150643. if (unlikely(exc_type)) {
  150644. if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) {
  150645. PyObject *exc_value, *exc_tb;
  150646. exc_value = tstate->curexc_value;
  150647. exc_tb = tstate->curexc_traceback;
  150648. tstate->curexc_type = 0;
  150649. tstate->curexc_value = 0;
  150650. tstate->curexc_traceback = 0;
  150651. Py_DECREF(exc_type);
  150652. Py_XDECREF(exc_value);
  150653. Py_XDECREF(exc_tb);
  150654. return 0;
  150655. } else {
  150656. return -1;
  150657. }
  150658. }
  150659. return 0;
  150660. #else
  150661. if (unlikely(PyErr_Occurred())) {
  150662. if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) {
  150663. PyErr_Clear();
  150664. return 0;
  150665. } else {
  150666. return -1;
  150667. }
  150668. }
  150669. return 0;
  150670. #endif
  150671. }
  150672. /* UnpackItemEndCheck */
  150673. static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
  150674. if (unlikely(retval)) {
  150675. Py_DECREF(retval);
  150676. __Pyx_RaiseTooManyValuesError(expected);
  150677. return -1;
  150678. } else {
  150679. return __Pyx_IterFinish();
  150680. }
  150681. return 0;
  150682. }
  150683. /* GetTopmostException */
  150684. #if CYTHON_USE_EXC_INFO_STACK
  150685. static _PyErr_StackItem *
  150686. __Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
  150687. {
  150688. _PyErr_StackItem *exc_info = tstate->exc_info;
  150689. while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) &&
  150690. exc_info->previous_item != NULL)
  150691. {
  150692. exc_info = exc_info->previous_item;
  150693. }
  150694. return exc_info;
  150695. }
  150696. #endif
  150697. /* SaveResetException */
  150698. #if CYTHON_FAST_THREAD_STATE
  150699. static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
  150700. #if CYTHON_USE_EXC_INFO_STACK
  150701. _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
  150702. *type = exc_info->exc_type;
  150703. *value = exc_info->exc_value;
  150704. *tb = exc_info->exc_traceback;
  150705. #else
  150706. *type = tstate->exc_type;
  150707. *value = tstate->exc_value;
  150708. *tb = tstate->exc_traceback;
  150709. #endif
  150710. Py_XINCREF(*type);
  150711. Py_XINCREF(*value);
  150712. Py_XINCREF(*tb);
  150713. }
  150714. static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
  150715. PyObject *tmp_type, *tmp_value, *tmp_tb;
  150716. #if CYTHON_USE_EXC_INFO_STACK
  150717. _PyErr_StackItem *exc_info = tstate->exc_info;
  150718. tmp_type = exc_info->exc_type;
  150719. tmp_value = exc_info->exc_value;
  150720. tmp_tb = exc_info->exc_traceback;
  150721. exc_info->exc_type = type;
  150722. exc_info->exc_value = value;
  150723. exc_info->exc_traceback = tb;
  150724. #else
  150725. tmp_type = tstate->exc_type;
  150726. tmp_value = tstate->exc_value;
  150727. tmp_tb = tstate->exc_traceback;
  150728. tstate->exc_type = type;
  150729. tstate->exc_value = value;
  150730. tstate->exc_traceback = tb;
  150731. #endif
  150732. Py_XDECREF(tmp_type);
  150733. Py_XDECREF(tmp_value);
  150734. Py_XDECREF(tmp_tb);
  150735. }
  150736. #endif
  150737. /* PyErrExceptionMatches */
  150738. #if CYTHON_FAST_THREAD_STATE
  150739. static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
  150740. Py_ssize_t i, n;
  150741. n = PyTuple_GET_SIZE(tuple);
  150742. #if PY_MAJOR_VERSION >= 3
  150743. for (i=0; i<n; i++) {
  150744. if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
  150745. }
  150746. #endif
  150747. for (i=0; i<n; i++) {
  150748. if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
  150749. }
  150750. return 0;
  150751. }
  150752. static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
  150753. PyObject *exc_type = tstate->curexc_type;
  150754. if (exc_type == err) return 1;
  150755. if (unlikely(!exc_type)) return 0;
  150756. if (unlikely(PyTuple_Check(err)))
  150757. return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
  150758. return __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
  150759. }
  150760. #endif
  150761. /* GetException */
  150762. #if CYTHON_FAST_THREAD_STATE
  150763. static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
  150764. #else
  150765. static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
  150766. #endif
  150767. {
  150768. PyObject *local_type, *local_value, *local_tb;
  150769. #if CYTHON_FAST_THREAD_STATE
  150770. PyObject *tmp_type, *tmp_value, *tmp_tb;
  150771. local_type = tstate->curexc_type;
  150772. local_value = tstate->curexc_value;
  150773. local_tb = tstate->curexc_traceback;
  150774. tstate->curexc_type = 0;
  150775. tstate->curexc_value = 0;
  150776. tstate->curexc_traceback = 0;
  150777. #else
  150778. PyErr_Fetch(&local_type, &local_value, &local_tb);
  150779. #endif
  150780. PyErr_NormalizeException(&local_type, &local_value, &local_tb);
  150781. #if CYTHON_FAST_THREAD_STATE
  150782. if (unlikely(tstate->curexc_type))
  150783. #else
  150784. if (unlikely(PyErr_Occurred()))
  150785. #endif
  150786. goto bad;
  150787. #if PY_MAJOR_VERSION >= 3
  150788. if (local_tb) {
  150789. if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
  150790. goto bad;
  150791. }
  150792. #endif
  150793. Py_XINCREF(local_tb);
  150794. Py_XINCREF(local_type);
  150795. Py_XINCREF(local_value);
  150796. *type = local_type;
  150797. *value = local_value;
  150798. *tb = local_tb;
  150799. #if CYTHON_FAST_THREAD_STATE
  150800. #if CYTHON_USE_EXC_INFO_STACK
  150801. {
  150802. _PyErr_StackItem *exc_info = tstate->exc_info;
  150803. tmp_type = exc_info->exc_type;
  150804. tmp_value = exc_info->exc_value;
  150805. tmp_tb = exc_info->exc_traceback;
  150806. exc_info->exc_type = local_type;
  150807. exc_info->exc_value = local_value;
  150808. exc_info->exc_traceback = local_tb;
  150809. }
  150810. #else
  150811. tmp_type = tstate->exc_type;
  150812. tmp_value = tstate->exc_value;
  150813. tmp_tb = tstate->exc_traceback;
  150814. tstate->exc_type = local_type;
  150815. tstate->exc_value = local_value;
  150816. tstate->exc_traceback = local_tb;
  150817. #endif
  150818. Py_XDECREF(tmp_type);
  150819. Py_XDECREF(tmp_value);
  150820. Py_XDECREF(tmp_tb);
  150821. #else
  150822. PyErr_SetExcInfo(local_type, local_value, local_tb);
  150823. #endif
  150824. return 0;
  150825. bad:
  150826. *type = 0;
  150827. *value = 0;
  150828. *tb = 0;
  150829. Py_XDECREF(local_type);
  150830. Py_XDECREF(local_value);
  150831. Py_XDECREF(local_tb);
  150832. return -1;
  150833. }
  150834. /* SwapException */
  150835. #if CYTHON_FAST_THREAD_STATE
  150836. static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
  150837. PyObject *tmp_type, *tmp_value, *tmp_tb;
  150838. #if CYTHON_USE_EXC_INFO_STACK
  150839. _PyErr_StackItem *exc_info = tstate->exc_info;
  150840. tmp_type = exc_info->exc_type;
  150841. tmp_value = exc_info->exc_value;
  150842. tmp_tb = exc_info->exc_traceback;
  150843. exc_info->exc_type = *type;
  150844. exc_info->exc_value = *value;
  150845. exc_info->exc_traceback = *tb;
  150846. #else
  150847. tmp_type = tstate->exc_type;
  150848. tmp_value = tstate->exc_value;
  150849. tmp_tb = tstate->exc_traceback;
  150850. tstate->exc_type = *type;
  150851. tstate->exc_value = *value;
  150852. tstate->exc_traceback = *tb;
  150853. #endif
  150854. *type = tmp_type;
  150855. *value = tmp_value;
  150856. *tb = tmp_tb;
  150857. }
  150858. #else
  150859. static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
  150860. PyObject *tmp_type, *tmp_value, *tmp_tb;
  150861. PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
  150862. PyErr_SetExcInfo(*type, *value, *tb);
  150863. *type = tmp_type;
  150864. *value = tmp_value;
  150865. *tb = tmp_tb;
  150866. }
  150867. #endif
  150868. /* RaiseDoubleKeywords */
  150869. static void __Pyx_RaiseDoubleKeywordsError(
  150870. const char* func_name,
  150871. PyObject* kw_name)
  150872. {
  150873. PyErr_Format(PyExc_TypeError,
  150874. #if PY_MAJOR_VERSION >= 3
  150875. "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
  150876. #else
  150877. "%s() got multiple values for keyword argument '%s'", func_name,
  150878. PyString_AsString(kw_name));
  150879. #endif
  150880. }
  150881. /* ParseKeywords */
  150882. static int __Pyx_ParseOptionalKeywords(
  150883. PyObject *kwds,
  150884. PyObject **argnames[],
  150885. PyObject *kwds2,
  150886. PyObject *values[],
  150887. Py_ssize_t num_pos_args,
  150888. const char* function_name)
  150889. {
  150890. PyObject *key = 0, *value = 0;
  150891. Py_ssize_t pos = 0;
  150892. PyObject*** name;
  150893. PyObject*** first_kw_arg = argnames + num_pos_args;
  150894. while (PyDict_Next(kwds, &pos, &key, &value)) {
  150895. name = first_kw_arg;
  150896. while (*name && (**name != key)) name++;
  150897. if (*name) {
  150898. values[name-argnames] = value;
  150899. continue;
  150900. }
  150901. name = first_kw_arg;
  150902. #if PY_MAJOR_VERSION < 3
  150903. if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) {
  150904. while (*name) {
  150905. if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
  150906. && _PyString_Eq(**name, key)) {
  150907. values[name-argnames] = value;
  150908. break;
  150909. }
  150910. name++;
  150911. }
  150912. if (*name) continue;
  150913. else {
  150914. PyObject*** argname = argnames;
  150915. while (argname != first_kw_arg) {
  150916. if ((**argname == key) || (
  150917. (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
  150918. && _PyString_Eq(**argname, key))) {
  150919. goto arg_passed_twice;
  150920. }
  150921. argname++;
  150922. }
  150923. }
  150924. } else
  150925. #endif
  150926. if (likely(PyUnicode_Check(key))) {
  150927. while (*name) {
  150928. int cmp = (**name == key) ? 0 :
  150929. #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
  150930. (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
  150931. #endif
  150932. PyUnicode_Compare(**name, key);
  150933. if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
  150934. if (cmp == 0) {
  150935. values[name-argnames] = value;
  150936. break;
  150937. }
  150938. name++;
  150939. }
  150940. if (*name) continue;
  150941. else {
  150942. PyObject*** argname = argnames;
  150943. while (argname != first_kw_arg) {
  150944. int cmp = (**argname == key) ? 0 :
  150945. #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
  150946. (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
  150947. #endif
  150948. PyUnicode_Compare(**argname, key);
  150949. if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
  150950. if (cmp == 0) goto arg_passed_twice;
  150951. argname++;
  150952. }
  150953. }
  150954. } else
  150955. goto invalid_keyword_type;
  150956. if (kwds2) {
  150957. if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
  150958. } else {
  150959. goto invalid_keyword;
  150960. }
  150961. }
  150962. return 0;
  150963. arg_passed_twice:
  150964. __Pyx_RaiseDoubleKeywordsError(function_name, key);
  150965. goto bad;
  150966. invalid_keyword_type:
  150967. PyErr_Format(PyExc_TypeError,
  150968. "%.200s() keywords must be strings", function_name);
  150969. goto bad;
  150970. invalid_keyword:
  150971. PyErr_Format(PyExc_TypeError,
  150972. #if PY_MAJOR_VERSION < 3
  150973. "%.200s() got an unexpected keyword argument '%.200s'",
  150974. function_name, PyString_AsString(key));
  150975. #else
  150976. "%s() got an unexpected keyword argument '%U'",
  150977. function_name, key);
  150978. #endif
  150979. bad:
  150980. return -1;
  150981. }
  150982. /* FastTypeChecks */
  150983. #if CYTHON_COMPILING_IN_CPYTHON
  150984. static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
  150985. while (a) {
  150986. a = a->tp_base;
  150987. if (a == b)
  150988. return 1;
  150989. }
  150990. return b == &PyBaseObject_Type;
  150991. }
  150992. static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
  150993. PyObject *mro;
  150994. if (a == b) return 1;
  150995. mro = a->tp_mro;
  150996. if (likely(mro)) {
  150997. Py_ssize_t i, n;
  150998. n = PyTuple_GET_SIZE(mro);
  150999. for (i = 0; i < n; i++) {
  151000. if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
  151001. return 1;
  151002. }
  151003. return 0;
  151004. }
  151005. return __Pyx_InBases(a, b);
  151006. }
  151007. #if PY_MAJOR_VERSION == 2
  151008. static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
  151009. PyObject *exception, *value, *tb;
  151010. int res;
  151011. __Pyx_PyThreadState_declare
  151012. __Pyx_PyThreadState_assign
  151013. __Pyx_ErrFetch(&exception, &value, &tb);
  151014. res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
  151015. if (unlikely(res == -1)) {
  151016. PyErr_WriteUnraisable(err);
  151017. res = 0;
  151018. }
  151019. if (!res) {
  151020. res = PyObject_IsSubclass(err, exc_type2);
  151021. if (unlikely(res == -1)) {
  151022. PyErr_WriteUnraisable(err);
  151023. res = 0;
  151024. }
  151025. }
  151026. __Pyx_ErrRestore(exception, value, tb);
  151027. return res;
  151028. }
  151029. #else
  151030. static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
  151031. int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0;
  151032. if (!res) {
  151033. res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
  151034. }
  151035. return res;
  151036. }
  151037. #endif
  151038. static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
  151039. Py_ssize_t i, n;
  151040. assert(PyExceptionClass_Check(exc_type));
  151041. n = PyTuple_GET_SIZE(tuple);
  151042. #if PY_MAJOR_VERSION >= 3
  151043. for (i=0; i<n; i++) {
  151044. if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
  151045. }
  151046. #endif
  151047. for (i=0; i<n; i++) {
  151048. PyObject *t = PyTuple_GET_ITEM(tuple, i);
  151049. #if PY_MAJOR_VERSION < 3
  151050. if (likely(exc_type == t)) return 1;
  151051. #endif
  151052. if (likely(PyExceptionClass_Check(t))) {
  151053. if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
  151054. } else {
  151055. }
  151056. }
  151057. return 0;
  151058. }
  151059. static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
  151060. if (likely(err == exc_type)) return 1;
  151061. if (likely(PyExceptionClass_Check(err))) {
  151062. if (likely(PyExceptionClass_Check(exc_type))) {
  151063. return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
  151064. } else if (likely(PyTuple_Check(exc_type))) {
  151065. return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
  151066. } else {
  151067. }
  151068. }
  151069. return PyErr_GivenExceptionMatches(err, exc_type);
  151070. }
  151071. static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
  151072. assert(PyExceptionClass_Check(exc_type1));
  151073. assert(PyExceptionClass_Check(exc_type2));
  151074. if (likely(err == exc_type1 || err == exc_type2)) return 1;
  151075. if (likely(PyExceptionClass_Check(err))) {
  151076. return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
  151077. }
  151078. return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
  151079. }
  151080. #endif
  151081. /* pyfrozenset_new */
  151082. static CYTHON_INLINE PyObject* __Pyx_PyFrozenSet_New(PyObject* it) {
  151083. if (it) {
  151084. PyObject* result;
  151085. #if CYTHON_COMPILING_IN_PYPY
  151086. PyObject* args;
  151087. args = PyTuple_Pack(1, it);
  151088. if (unlikely(!args))
  151089. return NULL;
  151090. result = PyObject_Call((PyObject*)&PyFrozenSet_Type, args, NULL);
  151091. Py_DECREF(args);
  151092. return result;
  151093. #else
  151094. if (PyFrozenSet_CheckExact(it)) {
  151095. Py_INCREF(it);
  151096. return it;
  151097. }
  151098. result = PyFrozenSet_New(it);
  151099. if (unlikely(!result))
  151100. return NULL;
  151101. if (likely(PySet_GET_SIZE(result)))
  151102. return result;
  151103. Py_DECREF(result);
  151104. #endif
  151105. }
  151106. #if CYTHON_USE_TYPE_SLOTS
  151107. return PyFrozenSet_Type.tp_new(&PyFrozenSet_Type, __pyx_empty_tuple, NULL);
  151108. #else
  151109. return PyObject_Call((PyObject*)&PyFrozenSet_Type, __pyx_empty_tuple, NULL);
  151110. #endif
  151111. }
  151112. /* py_set_discard_unhashable */
  151113. static int __Pyx_PySet_DiscardUnhashable(PyObject *set, PyObject *key) {
  151114. PyObject *tmpkey;
  151115. int rv;
  151116. if (likely(!PySet_Check(key) || !PyErr_ExceptionMatches(PyExc_TypeError)))
  151117. return -1;
  151118. PyErr_Clear();
  151119. tmpkey = __Pyx_PyFrozenSet_New(key);
  151120. if (tmpkey == NULL)
  151121. return -1;
  151122. rv = PySet_Discard(set, tmpkey);
  151123. Py_DECREF(tmpkey);
  151124. return rv;
  151125. }
  151126. /* py_set_discard */
  151127. static CYTHON_INLINE int __Pyx_PySet_Discard(PyObject *set, PyObject *key) {
  151128. int found = PySet_Discard(set, key);
  151129. if (unlikely(found < 0)) {
  151130. found = __Pyx_PySet_DiscardUnhashable(set, key);
  151131. }
  151132. return found;
  151133. }
  151134. /* set_iter */
  151135. static CYTHON_INLINE PyObject* __Pyx_set_iterator(PyObject* iterable, int is_set,
  151136. Py_ssize_t* p_orig_length, int* p_source_is_set) {
  151137. #if CYTHON_COMPILING_IN_CPYTHON
  151138. is_set = is_set || likely(PySet_CheckExact(iterable) || PyFrozenSet_CheckExact(iterable));
  151139. *p_source_is_set = is_set;
  151140. if (likely(is_set)) {
  151141. *p_orig_length = PySet_Size(iterable);
  151142. Py_INCREF(iterable);
  151143. return iterable;
  151144. }
  151145. #else
  151146. (void)is_set;
  151147. *p_source_is_set = 0;
  151148. #endif
  151149. *p_orig_length = 0;
  151150. return PyObject_GetIter(iterable);
  151151. }
  151152. static CYTHON_INLINE int __Pyx_set_iter_next(
  151153. PyObject* iter_obj, Py_ssize_t orig_length,
  151154. Py_ssize_t* ppos, PyObject **value,
  151155. int source_is_set) {
  151156. if (!CYTHON_COMPILING_IN_CPYTHON || unlikely(!source_is_set)) {
  151157. *value = PyIter_Next(iter_obj);
  151158. if (unlikely(!*value)) {
  151159. return __Pyx_IterFinish();
  151160. }
  151161. (void)orig_length;
  151162. (void)ppos;
  151163. return 1;
  151164. }
  151165. #if CYTHON_COMPILING_IN_CPYTHON
  151166. if (unlikely(PySet_GET_SIZE(iter_obj) != orig_length)) {
  151167. PyErr_SetString(
  151168. PyExc_RuntimeError,
  151169. "set changed size during iteration");
  151170. return -1;
  151171. }
  151172. {
  151173. Py_hash_t hash;
  151174. int ret = _PySet_NextEntry(iter_obj, ppos, value, &hash);
  151175. assert (ret != -1);
  151176. if (likely(ret)) {
  151177. Py_INCREF(*value);
  151178. return 1;
  151179. }
  151180. }
  151181. #endif
  151182. return 0;
  151183. }
  151184. /* DictGetItem */
  151185. #if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
  151186. static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) {
  151187. PyObject *value;
  151188. value = PyDict_GetItemWithError(d, key);
  151189. if (unlikely(!value)) {
  151190. if (!PyErr_Occurred()) {
  151191. if (unlikely(PyTuple_Check(key))) {
  151192. PyObject* args = PyTuple_Pack(1, key);
  151193. if (likely(args)) {
  151194. PyErr_SetObject(PyExc_KeyError, args);
  151195. Py_DECREF(args);
  151196. }
  151197. } else {
  151198. PyErr_SetObject(PyExc_KeyError, key);
  151199. }
  151200. }
  151201. return NULL;
  151202. }
  151203. Py_INCREF(value);
  151204. return value;
  151205. }
  151206. #endif
  151207. /* PyObjectGetMethod */
  151208. static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) {
  151209. PyObject *attr;
  151210. #if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP
  151211. PyTypeObject *tp = Py_TYPE(obj);
  151212. PyObject *descr;
  151213. descrgetfunc f = NULL;
  151214. PyObject **dictptr, *dict;
  151215. int meth_found = 0;
  151216. assert (*method == NULL);
  151217. if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) {
  151218. attr = __Pyx_PyObject_GetAttrStr(obj, name);
  151219. goto try_unpack;
  151220. }
  151221. if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) {
  151222. return 0;
  151223. }
  151224. descr = _PyType_Lookup(tp, name);
  151225. if (likely(descr != NULL)) {
  151226. Py_INCREF(descr);
  151227. #if PY_MAJOR_VERSION >= 3
  151228. #ifdef __Pyx_CyFunction_USED
  151229. if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr)))
  151230. #else
  151231. if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type)))
  151232. #endif
  151233. #else
  151234. #ifdef __Pyx_CyFunction_USED
  151235. if (likely(PyFunction_Check(descr) || __Pyx_CyFunction_Check(descr)))
  151236. #else
  151237. if (likely(PyFunction_Check(descr)))
  151238. #endif
  151239. #endif
  151240. {
  151241. meth_found = 1;
  151242. } else {
  151243. f = Py_TYPE(descr)->tp_descr_get;
  151244. if (f != NULL && PyDescr_IsData(descr)) {
  151245. attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
  151246. Py_DECREF(descr);
  151247. goto try_unpack;
  151248. }
  151249. }
  151250. }
  151251. dictptr = _PyObject_GetDictPtr(obj);
  151252. if (dictptr != NULL && (dict = *dictptr) != NULL) {
  151253. Py_INCREF(dict);
  151254. attr = __Pyx_PyDict_GetItemStr(dict, name);
  151255. if (attr != NULL) {
  151256. Py_INCREF(attr);
  151257. Py_DECREF(dict);
  151258. Py_XDECREF(descr);
  151259. goto try_unpack;
  151260. }
  151261. Py_DECREF(dict);
  151262. }
  151263. if (meth_found) {
  151264. *method = descr;
  151265. return 1;
  151266. }
  151267. if (f != NULL) {
  151268. attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
  151269. Py_DECREF(descr);
  151270. goto try_unpack;
  151271. }
  151272. if (descr != NULL) {
  151273. *method = descr;
  151274. return 0;
  151275. }
  151276. PyErr_Format(PyExc_AttributeError,
  151277. #if PY_MAJOR_VERSION >= 3
  151278. "'%.50s' object has no attribute '%U'",
  151279. tp->tp_name, name);
  151280. #else
  151281. "'%.50s' object has no attribute '%.400s'",
  151282. tp->tp_name, PyString_AS_STRING(name));
  151283. #endif
  151284. return 0;
  151285. #else
  151286. attr = __Pyx_PyObject_GetAttrStr(obj, name);
  151287. goto try_unpack;
  151288. #endif
  151289. try_unpack:
  151290. #if CYTHON_UNPACK_METHODS
  151291. if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) {
  151292. PyObject *function = PyMethod_GET_FUNCTION(attr);
  151293. Py_INCREF(function);
  151294. Py_DECREF(attr);
  151295. *method = function;
  151296. return 1;
  151297. }
  151298. #endif
  151299. *method = attr;
  151300. return 0;
  151301. }
  151302. /* PyObjectCallMethod0 */
  151303. static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) {
  151304. PyObject *method = NULL, *result = NULL;
  151305. int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
  151306. if (likely(is_method)) {
  151307. result = __Pyx_PyObject_CallOneArg(method, obj);
  151308. Py_DECREF(method);
  151309. return result;
  151310. }
  151311. if (unlikely(!method)) goto bad;
  151312. result = __Pyx_PyObject_CallNoArg(method);
  151313. Py_DECREF(method);
  151314. bad:
  151315. return result;
  151316. }
  151317. /* RaiseNoneIterError */
  151318. static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) {
  151319. PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
  151320. }
  151321. /* UnpackTupleError */
  151322. static void __Pyx_UnpackTupleError(PyObject *t, Py_ssize_t index) {
  151323. if (t == Py_None) {
  151324. __Pyx_RaiseNoneNotIterableError();
  151325. } else if (PyTuple_GET_SIZE(t) < index) {
  151326. __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(t));
  151327. } else {
  151328. __Pyx_RaiseTooManyValuesError(index);
  151329. }
  151330. }
  151331. /* UnpackTuple2 */
  151332. static CYTHON_INLINE int __Pyx_unpack_tuple2_exact(
  151333. PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2, int decref_tuple) {
  151334. PyObject *value1 = NULL, *value2 = NULL;
  151335. #if CYTHON_COMPILING_IN_PYPY
  151336. value1 = PySequence_ITEM(tuple, 0); if (unlikely(!value1)) goto bad;
  151337. value2 = PySequence_ITEM(tuple, 1); if (unlikely(!value2)) goto bad;
  151338. #else
  151339. value1 = PyTuple_GET_ITEM(tuple, 0); Py_INCREF(value1);
  151340. value2 = PyTuple_GET_ITEM(tuple, 1); Py_INCREF(value2);
  151341. #endif
  151342. if (decref_tuple) {
  151343. Py_DECREF(tuple);
  151344. }
  151345. *pvalue1 = value1;
  151346. *pvalue2 = value2;
  151347. return 0;
  151348. #if CYTHON_COMPILING_IN_PYPY
  151349. bad:
  151350. Py_XDECREF(value1);
  151351. Py_XDECREF(value2);
  151352. if (decref_tuple) { Py_XDECREF(tuple); }
  151353. return -1;
  151354. #endif
  151355. }
  151356. static int __Pyx_unpack_tuple2_generic(PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2,
  151357. int has_known_size, int decref_tuple) {
  151358. Py_ssize_t index;
  151359. PyObject *value1 = NULL, *value2 = NULL, *iter = NULL;
  151360. iternextfunc iternext;
  151361. iter = PyObject_GetIter(tuple);
  151362. if (unlikely(!iter)) goto bad;
  151363. if (decref_tuple) { Py_DECREF(tuple); tuple = NULL; }
  151364. iternext = Py_TYPE(iter)->tp_iternext;
  151365. value1 = iternext(iter); if (unlikely(!value1)) { index = 0; goto unpacking_failed; }
  151366. value2 = iternext(iter); if (unlikely(!value2)) { index = 1; goto unpacking_failed; }
  151367. if (!has_known_size && unlikely(__Pyx_IternextUnpackEndCheck(iternext(iter), 2))) goto bad;
  151368. Py_DECREF(iter);
  151369. *pvalue1 = value1;
  151370. *pvalue2 = value2;
  151371. return 0;
  151372. unpacking_failed:
  151373. if (!has_known_size && __Pyx_IterFinish() == 0)
  151374. __Pyx_RaiseNeedMoreValuesError(index);
  151375. bad:
  151376. Py_XDECREF(iter);
  151377. Py_XDECREF(value1);
  151378. Py_XDECREF(value2);
  151379. if (decref_tuple) { Py_XDECREF(tuple); }
  151380. return -1;
  151381. }
  151382. /* dict_iter */
  151383. static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* iterable, int is_dict, PyObject* method_name,
  151384. Py_ssize_t* p_orig_length, int* p_source_is_dict) {
  151385. is_dict = is_dict || likely(PyDict_CheckExact(iterable));
  151386. *p_source_is_dict = is_dict;
  151387. if (is_dict) {
  151388. #if !CYTHON_COMPILING_IN_PYPY
  151389. *p_orig_length = PyDict_Size(iterable);
  151390. Py_INCREF(iterable);
  151391. return iterable;
  151392. #elif PY_MAJOR_VERSION >= 3
  151393. static PyObject *py_items = NULL, *py_keys = NULL, *py_values = NULL;
  151394. PyObject **pp = NULL;
  151395. if (method_name) {
  151396. const char *name = PyUnicode_AsUTF8(method_name);
  151397. if (strcmp(name, "iteritems") == 0) pp = &py_items;
  151398. else if (strcmp(name, "iterkeys") == 0) pp = &py_keys;
  151399. else if (strcmp(name, "itervalues") == 0) pp = &py_values;
  151400. if (pp) {
  151401. if (!*pp) {
  151402. *pp = PyUnicode_FromString(name + 4);
  151403. if (!*pp)
  151404. return NULL;
  151405. }
  151406. method_name = *pp;
  151407. }
  151408. }
  151409. #endif
  151410. }
  151411. *p_orig_length = 0;
  151412. if (method_name) {
  151413. PyObject* iter;
  151414. iterable = __Pyx_PyObject_CallMethod0(iterable, method_name);
  151415. if (!iterable)
  151416. return NULL;
  151417. #if !CYTHON_COMPILING_IN_PYPY
  151418. if (PyTuple_CheckExact(iterable) || PyList_CheckExact(iterable))
  151419. return iterable;
  151420. #endif
  151421. iter = PyObject_GetIter(iterable);
  151422. Py_DECREF(iterable);
  151423. return iter;
  151424. }
  151425. return PyObject_GetIter(iterable);
  151426. }
  151427. static CYTHON_INLINE int __Pyx_dict_iter_next(
  151428. PyObject* iter_obj, CYTHON_NCP_UNUSED Py_ssize_t orig_length, CYTHON_NCP_UNUSED Py_ssize_t* ppos,
  151429. PyObject** pkey, PyObject** pvalue, PyObject** pitem, int source_is_dict) {
  151430. PyObject* next_item;
  151431. #if !CYTHON_COMPILING_IN_PYPY
  151432. if (source_is_dict) {
  151433. PyObject *key, *value;
  151434. if (unlikely(orig_length != PyDict_Size(iter_obj))) {
  151435. PyErr_SetString(PyExc_RuntimeError, "dictionary changed size during iteration");
  151436. return -1;
  151437. }
  151438. if (unlikely(!PyDict_Next(iter_obj, ppos, &key, &value))) {
  151439. return 0;
  151440. }
  151441. if (pitem) {
  151442. PyObject* tuple = PyTuple_New(2);
  151443. if (unlikely(!tuple)) {
  151444. return -1;
  151445. }
  151446. Py_INCREF(key);
  151447. Py_INCREF(value);
  151448. PyTuple_SET_ITEM(tuple, 0, key);
  151449. PyTuple_SET_ITEM(tuple, 1, value);
  151450. *pitem = tuple;
  151451. } else {
  151452. if (pkey) {
  151453. Py_INCREF(key);
  151454. *pkey = key;
  151455. }
  151456. if (pvalue) {
  151457. Py_INCREF(value);
  151458. *pvalue = value;
  151459. }
  151460. }
  151461. return 1;
  151462. } else if (PyTuple_CheckExact(iter_obj)) {
  151463. Py_ssize_t pos = *ppos;
  151464. if (unlikely(pos >= PyTuple_GET_SIZE(iter_obj))) return 0;
  151465. *ppos = pos + 1;
  151466. next_item = PyTuple_GET_ITEM(iter_obj, pos);
  151467. Py_INCREF(next_item);
  151468. } else if (PyList_CheckExact(iter_obj)) {
  151469. Py_ssize_t pos = *ppos;
  151470. if (unlikely(pos >= PyList_GET_SIZE(iter_obj))) return 0;
  151471. *ppos = pos + 1;
  151472. next_item = PyList_GET_ITEM(iter_obj, pos);
  151473. Py_INCREF(next_item);
  151474. } else
  151475. #endif
  151476. {
  151477. next_item = PyIter_Next(iter_obj);
  151478. if (unlikely(!next_item)) {
  151479. return __Pyx_IterFinish();
  151480. }
  151481. }
  151482. if (pitem) {
  151483. *pitem = next_item;
  151484. } else if (pkey && pvalue) {
  151485. if (__Pyx_unpack_tuple2(next_item, pkey, pvalue, source_is_dict, source_is_dict, 1))
  151486. return -1;
  151487. } else if (pkey) {
  151488. *pkey = next_item;
  151489. } else {
  151490. *pvalue = next_item;
  151491. }
  151492. return 1;
  151493. }
  151494. /* PyObjectCallMethod1 */
  151495. static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) {
  151496. PyObject *result = __Pyx_PyObject_CallOneArg(method, arg);
  151497. Py_DECREF(method);
  151498. return result;
  151499. }
  151500. static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) {
  151501. PyObject *method = NULL, *result;
  151502. int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
  151503. if (likely(is_method)) {
  151504. result = __Pyx_PyObject_Call2Args(method, obj, arg);
  151505. Py_DECREF(method);
  151506. return result;
  151507. }
  151508. if (unlikely(!method)) return NULL;
  151509. return __Pyx__PyObject_CallMethod1(method, arg);
  151510. }
  151511. /* append */
  151512. static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x) {
  151513. if (likely(PyList_CheckExact(L))) {
  151514. if (unlikely(__Pyx_PyList_Append(L, x) < 0)) return -1;
  151515. } else {
  151516. PyObject* retval = __Pyx_PyObject_CallMethod1(L, __pyx_n_s_append, x);
  151517. if (unlikely(!retval))
  151518. return -1;
  151519. Py_DECREF(retval);
  151520. }
  151521. return 0;
  151522. }
  151523. /* GetItemInt */
  151524. static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
  151525. PyObject *r;
  151526. if (!j) return NULL;
  151527. r = PyObject_GetItem(o, j);
  151528. Py_DECREF(j);
  151529. return r;
  151530. }
  151531. static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
  151532. CYTHON_NCP_UNUSED int wraparound,
  151533. CYTHON_NCP_UNUSED int boundscheck) {
  151534. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  151535. Py_ssize_t wrapped_i = i;
  151536. if (wraparound & unlikely(i < 0)) {
  151537. wrapped_i += PyList_GET_SIZE(o);
  151538. }
  151539. if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) {
  151540. PyObject *r = PyList_GET_ITEM(o, wrapped_i);
  151541. Py_INCREF(r);
  151542. return r;
  151543. }
  151544. return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
  151545. #else
  151546. return PySequence_GetItem(o, i);
  151547. #endif
  151548. }
  151549. static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
  151550. CYTHON_NCP_UNUSED int wraparound,
  151551. CYTHON_NCP_UNUSED int boundscheck) {
  151552. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  151553. Py_ssize_t wrapped_i = i;
  151554. if (wraparound & unlikely(i < 0)) {
  151555. wrapped_i += PyTuple_GET_SIZE(o);
  151556. }
  151557. if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) {
  151558. PyObject *r = PyTuple_GET_ITEM(o, wrapped_i);
  151559. Py_INCREF(r);
  151560. return r;
  151561. }
  151562. return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
  151563. #else
  151564. return PySequence_GetItem(o, i);
  151565. #endif
  151566. }
  151567. static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
  151568. CYTHON_NCP_UNUSED int wraparound,
  151569. CYTHON_NCP_UNUSED int boundscheck) {
  151570. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
  151571. if (is_list || PyList_CheckExact(o)) {
  151572. Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
  151573. if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) {
  151574. PyObject *r = PyList_GET_ITEM(o, n);
  151575. Py_INCREF(r);
  151576. return r;
  151577. }
  151578. }
  151579. else if (PyTuple_CheckExact(o)) {
  151580. Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
  151581. if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) {
  151582. PyObject *r = PyTuple_GET_ITEM(o, n);
  151583. Py_INCREF(r);
  151584. return r;
  151585. }
  151586. } else {
  151587. PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
  151588. if (likely(m && m->sq_item)) {
  151589. if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
  151590. Py_ssize_t l = m->sq_length(o);
  151591. if (likely(l >= 0)) {
  151592. i += l;
  151593. } else {
  151594. if (!PyErr_ExceptionMatches(PyExc_OverflowError))
  151595. return NULL;
  151596. PyErr_Clear();
  151597. }
  151598. }
  151599. return m->sq_item(o, i);
  151600. }
  151601. }
  151602. #else
  151603. if (is_list || PySequence_Check(o)) {
  151604. return PySequence_GetItem(o, i);
  151605. }
  151606. #endif
  151607. return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
  151608. }
  151609. /* ObjectGetItem */
  151610. #if CYTHON_USE_TYPE_SLOTS
  151611. static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject* index) {
  151612. PyObject *runerr;
  151613. Py_ssize_t key_value;
  151614. PySequenceMethods *m = Py_TYPE(obj)->tp_as_sequence;
  151615. if (unlikely(!(m && m->sq_item))) {
  151616. PyErr_Format(PyExc_TypeError, "'%.200s' object is not subscriptable", Py_TYPE(obj)->tp_name);
  151617. return NULL;
  151618. }
  151619. key_value = __Pyx_PyIndex_AsSsize_t(index);
  151620. if (likely(key_value != -1 || !(runerr = PyErr_Occurred()))) {
  151621. return __Pyx_GetItemInt_Fast(obj, key_value, 0, 1, 1);
  151622. }
  151623. if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) {
  151624. PyErr_Clear();
  151625. PyErr_Format(PyExc_IndexError, "cannot fit '%.200s' into an index-sized integer", Py_TYPE(index)->tp_name);
  151626. }
  151627. return NULL;
  151628. }
  151629. static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key) {
  151630. PyMappingMethods *m = Py_TYPE(obj)->tp_as_mapping;
  151631. if (likely(m && m->mp_subscript)) {
  151632. return m->mp_subscript(obj, key);
  151633. }
  151634. return __Pyx_PyObject_GetIndex(obj, key);
  151635. }
  151636. #endif
  151637. /* UnpackUnboundCMethod */
  151638. static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) {
  151639. PyObject *method;
  151640. method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name);
  151641. if (unlikely(!method))
  151642. return -1;
  151643. target->method = method;
  151644. #if CYTHON_COMPILING_IN_CPYTHON
  151645. #if PY_MAJOR_VERSION >= 3
  151646. if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type)))
  151647. #endif
  151648. {
  151649. PyMethodDescrObject *descr = (PyMethodDescrObject*) method;
  151650. target->func = descr->d_method->ml_meth;
  151651. target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_STACKLESS);
  151652. }
  151653. #endif
  151654. return 0;
  151655. }
  151656. /* CallUnboundCMethod2 */
  151657. #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030600B1
  151658. static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2) {
  151659. if (likely(cfunc->func)) {
  151660. PyObject *args[2] = {arg1, arg2};
  151661. if (cfunc->flag == METH_FASTCALL) {
  151662. #if PY_VERSION_HEX >= 0x030700A0
  151663. return (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)cfunc->func)(self, args, 2);
  151664. #else
  151665. return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, 2, NULL);
  151666. #endif
  151667. }
  151668. #if PY_VERSION_HEX >= 0x030700A0
  151669. if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS))
  151670. return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, 2, NULL);
  151671. #endif
  151672. }
  151673. return __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2);
  151674. }
  151675. #endif
  151676. static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2){
  151677. PyObject *args, *result = NULL;
  151678. if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
  151679. #if CYTHON_COMPILING_IN_CPYTHON
  151680. if (cfunc->func && (cfunc->flag & METH_VARARGS)) {
  151681. args = PyTuple_New(2);
  151682. if (unlikely(!args)) goto bad;
  151683. Py_INCREF(arg1);
  151684. PyTuple_SET_ITEM(args, 0, arg1);
  151685. Py_INCREF(arg2);
  151686. PyTuple_SET_ITEM(args, 1, arg2);
  151687. if (cfunc->flag & METH_KEYWORDS)
  151688. result = (*(PyCFunctionWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, NULL);
  151689. else
  151690. result = (*cfunc->func)(self, args);
  151691. } else {
  151692. args = PyTuple_New(3);
  151693. if (unlikely(!args)) goto bad;
  151694. Py_INCREF(self);
  151695. PyTuple_SET_ITEM(args, 0, self);
  151696. Py_INCREF(arg1);
  151697. PyTuple_SET_ITEM(args, 1, arg1);
  151698. Py_INCREF(arg2);
  151699. PyTuple_SET_ITEM(args, 2, arg2);
  151700. result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
  151701. }
  151702. #else
  151703. args = PyTuple_Pack(3, self, arg1, arg2);
  151704. if (unlikely(!args)) goto bad;
  151705. result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
  151706. #endif
  151707. bad:
  151708. Py_XDECREF(args);
  151709. return result;
  151710. }
  151711. /* CallUnboundCMethod1 */
  151712. #if CYTHON_COMPILING_IN_CPYTHON
  151713. static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg) {
  151714. if (likely(cfunc->func)) {
  151715. int flag = cfunc->flag;
  151716. if (flag == METH_O) {
  151717. return (*(cfunc->func))(self, arg);
  151718. } else if (PY_VERSION_HEX >= 0x030600B1 && flag == METH_FASTCALL) {
  151719. if (PY_VERSION_HEX >= 0x030700A0) {
  151720. return (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)cfunc->func)(self, &arg, 1);
  151721. } else {
  151722. return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, &arg, 1, NULL);
  151723. }
  151724. } else if (PY_VERSION_HEX >= 0x030700A0 && flag == (METH_FASTCALL | METH_KEYWORDS)) {
  151725. return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, &arg, 1, NULL);
  151726. }
  151727. }
  151728. return __Pyx__CallUnboundCMethod1(cfunc, self, arg);
  151729. }
  151730. #endif
  151731. static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg){
  151732. PyObject *args, *result = NULL;
  151733. if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
  151734. #if CYTHON_COMPILING_IN_CPYTHON
  151735. if (cfunc->func && (cfunc->flag & METH_VARARGS)) {
  151736. args = PyTuple_New(1);
  151737. if (unlikely(!args)) goto bad;
  151738. Py_INCREF(arg);
  151739. PyTuple_SET_ITEM(args, 0, arg);
  151740. if (cfunc->flag & METH_KEYWORDS)
  151741. result = (*(PyCFunctionWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, NULL);
  151742. else
  151743. result = (*cfunc->func)(self, args);
  151744. } else {
  151745. args = PyTuple_New(2);
  151746. if (unlikely(!args)) goto bad;
  151747. Py_INCREF(self);
  151748. PyTuple_SET_ITEM(args, 0, self);
  151749. Py_INCREF(arg);
  151750. PyTuple_SET_ITEM(args, 1, arg);
  151751. result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
  151752. }
  151753. #else
  151754. args = PyTuple_Pack(2, self, arg);
  151755. if (unlikely(!args)) goto bad;
  151756. result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
  151757. #endif
  151758. bad:
  151759. Py_XDECREF(args);
  151760. return result;
  151761. }
  151762. /* py_dict_pop */
  151763. static CYTHON_INLINE PyObject *__Pyx_PyDict_Pop(PyObject *d, PyObject *key, PyObject *default_value) {
  151764. #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX > 0x030600B3
  151765. if ((1)) {
  151766. return _PyDict_Pop(d, key, default_value);
  151767. } else
  151768. #endif
  151769. if (default_value) {
  151770. return __Pyx_CallUnboundCMethod2(&__pyx_umethod_PyDict_Type_pop, d, key, default_value);
  151771. } else {
  151772. return __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyDict_Type_pop, d, key);
  151773. }
  151774. }
  151775. /* None */
  151776. static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname) {
  151777. PyErr_Format(PyExc_NameError, "free variable '%s' referenced before assignment in enclosing scope", varname);
  151778. }
  151779. /* FetchCommonType */
  151780. static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
  151781. PyObject* fake_module;
  151782. PyTypeObject* cached_type = NULL;
  151783. fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI);
  151784. if (!fake_module) return NULL;
  151785. Py_INCREF(fake_module);
  151786. cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name);
  151787. if (cached_type) {
  151788. if (!PyType_Check((PyObject*)cached_type)) {
  151789. PyErr_Format(PyExc_TypeError,
  151790. "Shared Cython type %.200s is not a type object",
  151791. type->tp_name);
  151792. goto bad;
  151793. }
  151794. if (cached_type->tp_basicsize != type->tp_basicsize) {
  151795. PyErr_Format(PyExc_TypeError,
  151796. "Shared Cython type %.200s has the wrong size, try recompiling",
  151797. type->tp_name);
  151798. goto bad;
  151799. }
  151800. } else {
  151801. if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
  151802. PyErr_Clear();
  151803. if (PyType_Ready(type) < 0) goto bad;
  151804. if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0)
  151805. goto bad;
  151806. Py_INCREF(type);
  151807. cached_type = type;
  151808. }
  151809. done:
  151810. Py_DECREF(fake_module);
  151811. return cached_type;
  151812. bad:
  151813. Py_XDECREF(cached_type);
  151814. cached_type = NULL;
  151815. goto done;
  151816. }
  151817. /* CythonFunction */
  151818. #include <structmember.h>
  151819. static PyObject *
  151820. __Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure)
  151821. {
  151822. if (unlikely(op->func_doc == NULL)) {
  151823. if (op->func.m_ml->ml_doc) {
  151824. #if PY_MAJOR_VERSION >= 3
  151825. op->func_doc = PyUnicode_FromString(op->func.m_ml->ml_doc);
  151826. #else
  151827. op->func_doc = PyString_FromString(op->func.m_ml->ml_doc);
  151828. #endif
  151829. if (unlikely(op->func_doc == NULL))
  151830. return NULL;
  151831. } else {
  151832. Py_INCREF(Py_None);
  151833. return Py_None;
  151834. }
  151835. }
  151836. Py_INCREF(op->func_doc);
  151837. return op->func_doc;
  151838. }
  151839. static int
  151840. __Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
  151841. {
  151842. PyObject *tmp = op->func_doc;
  151843. if (value == NULL) {
  151844. value = Py_None;
  151845. }
  151846. Py_INCREF(value);
  151847. op->func_doc = value;
  151848. Py_XDECREF(tmp);
  151849. return 0;
  151850. }
  151851. static PyObject *
  151852. __Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
  151853. {
  151854. if (unlikely(op->func_name == NULL)) {
  151855. #if PY_MAJOR_VERSION >= 3
  151856. op->func_name = PyUnicode_InternFromString(op->func.m_ml->ml_name);
  151857. #else
  151858. op->func_name = PyString_InternFromString(op->func.m_ml->ml_name);
  151859. #endif
  151860. if (unlikely(op->func_name == NULL))
  151861. return NULL;
  151862. }
  151863. Py_INCREF(op->func_name);
  151864. return op->func_name;
  151865. }
  151866. static int
  151867. __Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
  151868. {
  151869. PyObject *tmp;
  151870. #if PY_MAJOR_VERSION >= 3
  151871. if (unlikely(value == NULL || !PyUnicode_Check(value)))
  151872. #else
  151873. if (unlikely(value == NULL || !PyString_Check(value)))
  151874. #endif
  151875. {
  151876. PyErr_SetString(PyExc_TypeError,
  151877. "__name__ must be set to a string object");
  151878. return -1;
  151879. }
  151880. tmp = op->func_name;
  151881. Py_INCREF(value);
  151882. op->func_name = value;
  151883. Py_XDECREF(tmp);
  151884. return 0;
  151885. }
  151886. static PyObject *
  151887. __Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
  151888. {
  151889. Py_INCREF(op->func_qualname);
  151890. return op->func_qualname;
  151891. }
  151892. static int
  151893. __Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
  151894. {
  151895. PyObject *tmp;
  151896. #if PY_MAJOR_VERSION >= 3
  151897. if (unlikely(value == NULL || !PyUnicode_Check(value)))
  151898. #else
  151899. if (unlikely(value == NULL || !PyString_Check(value)))
  151900. #endif
  151901. {
  151902. PyErr_SetString(PyExc_TypeError,
  151903. "__qualname__ must be set to a string object");
  151904. return -1;
  151905. }
  151906. tmp = op->func_qualname;
  151907. Py_INCREF(value);
  151908. op->func_qualname = value;
  151909. Py_XDECREF(tmp);
  151910. return 0;
  151911. }
  151912. static PyObject *
  151913. __Pyx_CyFunction_get_self(__pyx_CyFunctionObject *m, CYTHON_UNUSED void *closure)
  151914. {
  151915. PyObject *self;
  151916. self = m->func_closure;
  151917. if (self == NULL)
  151918. self = Py_None;
  151919. Py_INCREF(self);
  151920. return self;
  151921. }
  151922. static PyObject *
  151923. __Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
  151924. {
  151925. if (unlikely(op->func_dict == NULL)) {
  151926. op->func_dict = PyDict_New();
  151927. if (unlikely(op->func_dict == NULL))
  151928. return NULL;
  151929. }
  151930. Py_INCREF(op->func_dict);
  151931. return op->func_dict;
  151932. }
  151933. static int
  151934. __Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
  151935. {
  151936. PyObject *tmp;
  151937. if (unlikely(value == NULL)) {
  151938. PyErr_SetString(PyExc_TypeError,
  151939. "function's dictionary may not be deleted");
  151940. return -1;
  151941. }
  151942. if (unlikely(!PyDict_Check(value))) {
  151943. PyErr_SetString(PyExc_TypeError,
  151944. "setting function's dictionary to a non-dict");
  151945. return -1;
  151946. }
  151947. tmp = op->func_dict;
  151948. Py_INCREF(value);
  151949. op->func_dict = value;
  151950. Py_XDECREF(tmp);
  151951. return 0;
  151952. }
  151953. static PyObject *
  151954. __Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
  151955. {
  151956. Py_INCREF(op->func_globals);
  151957. return op->func_globals;
  151958. }
  151959. static PyObject *
  151960. __Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
  151961. {
  151962. Py_INCREF(Py_None);
  151963. return Py_None;
  151964. }
  151965. static PyObject *
  151966. __Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
  151967. {
  151968. PyObject* result = (op->func_code) ? op->func_code : Py_None;
  151969. Py_INCREF(result);
  151970. return result;
  151971. }
  151972. static int
  151973. __Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) {
  151974. int result = 0;
  151975. PyObject *res = op->defaults_getter((PyObject *) op);
  151976. if (unlikely(!res))
  151977. return -1;
  151978. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  151979. op->defaults_tuple = PyTuple_GET_ITEM(res, 0);
  151980. Py_INCREF(op->defaults_tuple);
  151981. op->defaults_kwdict = PyTuple_GET_ITEM(res, 1);
  151982. Py_INCREF(op->defaults_kwdict);
  151983. #else
  151984. op->defaults_tuple = PySequence_ITEM(res, 0);
  151985. if (unlikely(!op->defaults_tuple)) result = -1;
  151986. else {
  151987. op->defaults_kwdict = PySequence_ITEM(res, 1);
  151988. if (unlikely(!op->defaults_kwdict)) result = -1;
  151989. }
  151990. #endif
  151991. Py_DECREF(res);
  151992. return result;
  151993. }
  151994. static int
  151995. __Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
  151996. PyObject* tmp;
  151997. if (!value) {
  151998. value = Py_None;
  151999. } else if (value != Py_None && !PyTuple_Check(value)) {
  152000. PyErr_SetString(PyExc_TypeError,
  152001. "__defaults__ must be set to a tuple object");
  152002. return -1;
  152003. }
  152004. Py_INCREF(value);
  152005. tmp = op->defaults_tuple;
  152006. op->defaults_tuple = value;
  152007. Py_XDECREF(tmp);
  152008. return 0;
  152009. }
  152010. static PyObject *
  152011. __Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
  152012. PyObject* result = op->defaults_tuple;
  152013. if (unlikely(!result)) {
  152014. if (op->defaults_getter) {
  152015. if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
  152016. result = op->defaults_tuple;
  152017. } else {
  152018. result = Py_None;
  152019. }
  152020. }
  152021. Py_INCREF(result);
  152022. return result;
  152023. }
  152024. static int
  152025. __Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
  152026. PyObject* tmp;
  152027. if (!value) {
  152028. value = Py_None;
  152029. } else if (value != Py_None && !PyDict_Check(value)) {
  152030. PyErr_SetString(PyExc_TypeError,
  152031. "__kwdefaults__ must be set to a dict object");
  152032. return -1;
  152033. }
  152034. Py_INCREF(value);
  152035. tmp = op->defaults_kwdict;
  152036. op->defaults_kwdict = value;
  152037. Py_XDECREF(tmp);
  152038. return 0;
  152039. }
  152040. static PyObject *
  152041. __Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
  152042. PyObject* result = op->defaults_kwdict;
  152043. if (unlikely(!result)) {
  152044. if (op->defaults_getter) {
  152045. if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
  152046. result = op->defaults_kwdict;
  152047. } else {
  152048. result = Py_None;
  152049. }
  152050. }
  152051. Py_INCREF(result);
  152052. return result;
  152053. }
  152054. static int
  152055. __Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
  152056. PyObject* tmp;
  152057. if (!value || value == Py_None) {
  152058. value = NULL;
  152059. } else if (!PyDict_Check(value)) {
  152060. PyErr_SetString(PyExc_TypeError,
  152061. "__annotations__ must be set to a dict object");
  152062. return -1;
  152063. }
  152064. Py_XINCREF(value);
  152065. tmp = op->func_annotations;
  152066. op->func_annotations = value;
  152067. Py_XDECREF(tmp);
  152068. return 0;
  152069. }
  152070. static PyObject *
  152071. __Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
  152072. PyObject* result = op->func_annotations;
  152073. if (unlikely(!result)) {
  152074. result = PyDict_New();
  152075. if (unlikely(!result)) return NULL;
  152076. op->func_annotations = result;
  152077. }
  152078. Py_INCREF(result);
  152079. return result;
  152080. }
  152081. static PyGetSetDef __pyx_CyFunction_getsets[] = {
  152082. {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
  152083. {(char *) "__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
  152084. {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
  152085. {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
  152086. {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0},
  152087. {(char *) "__self__", (getter)__Pyx_CyFunction_get_self, 0, 0, 0},
  152088. {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
  152089. {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
  152090. {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
  152091. {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
  152092. {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
  152093. {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
  152094. {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
  152095. {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
  152096. {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
  152097. {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
  152098. {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
  152099. {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
  152100. {0, 0, 0, 0, 0}
  152101. };
  152102. static PyMemberDef __pyx_CyFunction_members[] = {
  152103. {(char *) "__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), PY_WRITE_RESTRICTED, 0},
  152104. {0, 0, 0, 0, 0}
  152105. };
  152106. static PyObject *
  152107. __Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, CYTHON_UNUSED PyObject *args)
  152108. {
  152109. #if PY_MAJOR_VERSION >= 3
  152110. return PyUnicode_FromString(m->func.m_ml->ml_name);
  152111. #else
  152112. return PyString_FromString(m->func.m_ml->ml_name);
  152113. #endif
  152114. }
  152115. static PyMethodDef __pyx_CyFunction_methods[] = {
  152116. {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0},
  152117. {0, 0, 0, 0}
  152118. };
  152119. #if PY_VERSION_HEX < 0x030500A0
  152120. #define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist)
  152121. #else
  152122. #define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func.m_weakreflist)
  152123. #endif
  152124. static PyObject *__Pyx_CyFunction_New(PyTypeObject *type, PyMethodDef *ml, int flags, PyObject* qualname,
  152125. PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
  152126. __pyx_CyFunctionObject *op = PyObject_GC_New(__pyx_CyFunctionObject, type);
  152127. if (op == NULL)
  152128. return NULL;
  152129. op->flags = flags;
  152130. __Pyx_CyFunction_weakreflist(op) = NULL;
  152131. op->func.m_ml = ml;
  152132. op->func.m_self = (PyObject *) op;
  152133. Py_XINCREF(closure);
  152134. op->func_closure = closure;
  152135. Py_XINCREF(module);
  152136. op->func.m_module = module;
  152137. op->func_dict = NULL;
  152138. op->func_name = NULL;
  152139. Py_INCREF(qualname);
  152140. op->func_qualname = qualname;
  152141. op->func_doc = NULL;
  152142. op->func_classobj = NULL;
  152143. op->func_globals = globals;
  152144. Py_INCREF(op->func_globals);
  152145. Py_XINCREF(code);
  152146. op->func_code = code;
  152147. op->defaults_pyobjects = 0;
  152148. op->defaults = NULL;
  152149. op->defaults_tuple = NULL;
  152150. op->defaults_kwdict = NULL;
  152151. op->defaults_getter = NULL;
  152152. op->func_annotations = NULL;
  152153. PyObject_GC_Track(op);
  152154. return (PyObject *) op;
  152155. }
  152156. static int
  152157. __Pyx_CyFunction_clear(__pyx_CyFunctionObject *m)
  152158. {
  152159. Py_CLEAR(m->func_closure);
  152160. Py_CLEAR(m->func.m_module);
  152161. Py_CLEAR(m->func_dict);
  152162. Py_CLEAR(m->func_name);
  152163. Py_CLEAR(m->func_qualname);
  152164. Py_CLEAR(m->func_doc);
  152165. Py_CLEAR(m->func_globals);
  152166. Py_CLEAR(m->func_code);
  152167. Py_CLEAR(m->func_classobj);
  152168. Py_CLEAR(m->defaults_tuple);
  152169. Py_CLEAR(m->defaults_kwdict);
  152170. Py_CLEAR(m->func_annotations);
  152171. if (m->defaults) {
  152172. PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
  152173. int i;
  152174. for (i = 0; i < m->defaults_pyobjects; i++)
  152175. Py_XDECREF(pydefaults[i]);
  152176. PyObject_Free(m->defaults);
  152177. m->defaults = NULL;
  152178. }
  152179. return 0;
  152180. }
  152181. static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m)
  152182. {
  152183. if (__Pyx_CyFunction_weakreflist(m) != NULL)
  152184. PyObject_ClearWeakRefs((PyObject *) m);
  152185. __Pyx_CyFunction_clear(m);
  152186. PyObject_GC_Del(m);
  152187. }
  152188. static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m)
  152189. {
  152190. PyObject_GC_UnTrack(m);
  152191. __Pyx__CyFunction_dealloc(m);
  152192. }
  152193. static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg)
  152194. {
  152195. Py_VISIT(m->func_closure);
  152196. Py_VISIT(m->func.m_module);
  152197. Py_VISIT(m->func_dict);
  152198. Py_VISIT(m->func_name);
  152199. Py_VISIT(m->func_qualname);
  152200. Py_VISIT(m->func_doc);
  152201. Py_VISIT(m->func_globals);
  152202. Py_VISIT(m->func_code);
  152203. Py_VISIT(m->func_classobj);
  152204. Py_VISIT(m->defaults_tuple);
  152205. Py_VISIT(m->defaults_kwdict);
  152206. if (m->defaults) {
  152207. PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
  152208. int i;
  152209. for (i = 0; i < m->defaults_pyobjects; i++)
  152210. Py_VISIT(pydefaults[i]);
  152211. }
  152212. return 0;
  152213. }
  152214. static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObject *type)
  152215. {
  152216. __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
  152217. if (m->flags & __Pyx_CYFUNCTION_STATICMETHOD) {
  152218. Py_INCREF(func);
  152219. return func;
  152220. }
  152221. if (m->flags & __Pyx_CYFUNCTION_CLASSMETHOD) {
  152222. if (type == NULL)
  152223. type = (PyObject *)(Py_TYPE(obj));
  152224. return __Pyx_PyMethod_New(func, type, (PyObject *)(Py_TYPE(type)));
  152225. }
  152226. if (obj == Py_None)
  152227. obj = NULL;
  152228. return __Pyx_PyMethod_New(func, obj, type);
  152229. }
  152230. static PyObject*
  152231. __Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
  152232. {
  152233. #if PY_MAJOR_VERSION >= 3
  152234. return PyUnicode_FromFormat("<cyfunction %U at %p>",
  152235. op->func_qualname, (void *)op);
  152236. #else
  152237. return PyString_FromFormat("<cyfunction %s at %p>",
  152238. PyString_AsString(op->func_qualname), (void *)op);
  152239. #endif
  152240. }
  152241. static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) {
  152242. PyCFunctionObject* f = (PyCFunctionObject*)func;
  152243. PyCFunction meth = f->m_ml->ml_meth;
  152244. Py_ssize_t size;
  152245. switch (f->m_ml->ml_flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) {
  152246. case METH_VARARGS:
  152247. if (likely(kw == NULL || PyDict_Size(kw) == 0))
  152248. return (*meth)(self, arg);
  152249. break;
  152250. case METH_VARARGS | METH_KEYWORDS:
  152251. return (*(PyCFunctionWithKeywords)(void*)meth)(self, arg, kw);
  152252. case METH_NOARGS:
  152253. if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
  152254. size = PyTuple_GET_SIZE(arg);
  152255. if (likely(size == 0))
  152256. return (*meth)(self, NULL);
  152257. PyErr_Format(PyExc_TypeError,
  152258. "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
  152259. f->m_ml->ml_name, size);
  152260. return NULL;
  152261. }
  152262. break;
  152263. case METH_O:
  152264. if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
  152265. size = PyTuple_GET_SIZE(arg);
  152266. if (likely(size == 1)) {
  152267. PyObject *result, *arg0;
  152268. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  152269. arg0 = PyTuple_GET_ITEM(arg, 0);
  152270. #else
  152271. arg0 = PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL;
  152272. #endif
  152273. result = (*meth)(self, arg0);
  152274. #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
  152275. Py_DECREF(arg0);
  152276. #endif
  152277. return result;
  152278. }
  152279. PyErr_Format(PyExc_TypeError,
  152280. "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
  152281. f->m_ml->ml_name, size);
  152282. return NULL;
  152283. }
  152284. break;
  152285. default:
  152286. PyErr_SetString(PyExc_SystemError, "Bad call flags in "
  152287. "__Pyx_CyFunction_Call. METH_OLDARGS is no "
  152288. "longer supported!");
  152289. return NULL;
  152290. }
  152291. PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments",
  152292. f->m_ml->ml_name);
  152293. return NULL;
  152294. }
  152295. static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
  152296. return __Pyx_CyFunction_CallMethod(func, ((PyCFunctionObject*)func)->m_self, arg, kw);
  152297. }
  152298. static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) {
  152299. PyObject *result;
  152300. __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func;
  152301. if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
  152302. Py_ssize_t argc;
  152303. PyObject *new_args;
  152304. PyObject *self;
  152305. argc = PyTuple_GET_SIZE(args);
  152306. new_args = PyTuple_GetSlice(args, 1, argc);
  152307. if (unlikely(!new_args))
  152308. return NULL;
  152309. self = PyTuple_GetItem(args, 0);
  152310. if (unlikely(!self)) {
  152311. Py_DECREF(new_args);
  152312. return NULL;
  152313. }
  152314. result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw);
  152315. Py_DECREF(new_args);
  152316. } else {
  152317. result = __Pyx_CyFunction_Call(func, args, kw);
  152318. }
  152319. return result;
  152320. }
  152321. static PyTypeObject __pyx_CyFunctionType_type = {
  152322. PyVarObject_HEAD_INIT(0, 0)
  152323. "cython_function_or_method",
  152324. sizeof(__pyx_CyFunctionObject),
  152325. 0,
  152326. (destructor) __Pyx_CyFunction_dealloc,
  152327. 0,
  152328. 0,
  152329. 0,
  152330. #if PY_MAJOR_VERSION < 3
  152331. 0,
  152332. #else
  152333. 0,
  152334. #endif
  152335. (reprfunc) __Pyx_CyFunction_repr,
  152336. 0,
  152337. 0,
  152338. 0,
  152339. 0,
  152340. __Pyx_CyFunction_CallAsMethod,
  152341. 0,
  152342. 0,
  152343. 0,
  152344. 0,
  152345. Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,
  152346. 0,
  152347. (traverseproc) __Pyx_CyFunction_traverse,
  152348. (inquiry) __Pyx_CyFunction_clear,
  152349. 0,
  152350. #if PY_VERSION_HEX < 0x030500A0
  152351. offsetof(__pyx_CyFunctionObject, func_weakreflist),
  152352. #else
  152353. offsetof(PyCFunctionObject, m_weakreflist),
  152354. #endif
  152355. 0,
  152356. 0,
  152357. __pyx_CyFunction_methods,
  152358. __pyx_CyFunction_members,
  152359. __pyx_CyFunction_getsets,
  152360. 0,
  152361. 0,
  152362. __Pyx_CyFunction_descr_get,
  152363. 0,
  152364. offsetof(__pyx_CyFunctionObject, func_dict),
  152365. 0,
  152366. 0,
  152367. 0,
  152368. 0,
  152369. 0,
  152370. 0,
  152371. 0,
  152372. 0,
  152373. 0,
  152374. 0,
  152375. 0,
  152376. 0,
  152377. #if PY_VERSION_HEX >= 0x030400a1
  152378. 0,
  152379. #endif
  152380. #if PY_VERSION_HEX >= 0x030800b1
  152381. 0,
  152382. #endif
  152383. };
  152384. static int __pyx_CyFunction_init(void) {
  152385. __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type);
  152386. if (unlikely(__pyx_CyFunctionType == NULL)) {
  152387. return -1;
  152388. }
  152389. return 0;
  152390. }
  152391. static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) {
  152392. __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
  152393. m->defaults = PyObject_Malloc(size);
  152394. if (unlikely(!m->defaults))
  152395. return PyErr_NoMemory();
  152396. memset(m->defaults, 0, size);
  152397. m->defaults_pyobjects = pyobjects;
  152398. return m->defaults;
  152399. }
  152400. static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) {
  152401. __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
  152402. m->defaults_tuple = tuple;
  152403. Py_INCREF(tuple);
  152404. }
  152405. static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) {
  152406. __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
  152407. m->defaults_kwdict = dict;
  152408. Py_INCREF(dict);
  152409. }
  152410. static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) {
  152411. __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
  152412. m->func_annotations = dict;
  152413. Py_INCREF(dict);
  152414. }
  152415. /* PyObjectFormatAndDecref */
  152416. static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatSimpleAndDecref(PyObject* s, PyObject* f) {
  152417. if (unlikely(!s)) return NULL;
  152418. if (likely(PyUnicode_CheckExact(s))) return s;
  152419. #if PY_MAJOR_VERSION < 3
  152420. if (likely(PyString_CheckExact(s))) {
  152421. PyObject *result = PyUnicode_FromEncodedObject(s, NULL, "strict");
  152422. Py_DECREF(s);
  152423. return result;
  152424. }
  152425. #endif
  152426. return __Pyx_PyObject_FormatAndDecref(s, f);
  152427. }
  152428. static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatAndDecref(PyObject* s, PyObject* f) {
  152429. PyObject *result = PyObject_Format(s, f);
  152430. Py_DECREF(s);
  152431. return result;
  152432. }
  152433. /* JoinPyUnicode */
  152434. static PyObject* __Pyx_PyUnicode_Join(PyObject* value_tuple, Py_ssize_t value_count, Py_ssize_t result_ulength,
  152435. CYTHON_UNUSED Py_UCS4 max_char) {
  152436. #if CYTHON_USE_UNICODE_INTERNALS && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  152437. PyObject *result_uval;
  152438. int result_ukind;
  152439. Py_ssize_t i, char_pos;
  152440. void *result_udata;
  152441. #if CYTHON_PEP393_ENABLED
  152442. result_uval = PyUnicode_New(result_ulength, max_char);
  152443. if (unlikely(!result_uval)) return NULL;
  152444. result_ukind = (max_char <= 255) ? PyUnicode_1BYTE_KIND : (max_char <= 65535) ? PyUnicode_2BYTE_KIND : PyUnicode_4BYTE_KIND;
  152445. result_udata = PyUnicode_DATA(result_uval);
  152446. #else
  152447. result_uval = PyUnicode_FromUnicode(NULL, result_ulength);
  152448. if (unlikely(!result_uval)) return NULL;
  152449. result_ukind = sizeof(Py_UNICODE);
  152450. result_udata = PyUnicode_AS_UNICODE(result_uval);
  152451. #endif
  152452. char_pos = 0;
  152453. for (i=0; i < value_count; i++) {
  152454. int ukind;
  152455. Py_ssize_t ulength;
  152456. void *udata;
  152457. PyObject *uval = PyTuple_GET_ITEM(value_tuple, i);
  152458. if (unlikely(__Pyx_PyUnicode_READY(uval)))
  152459. goto bad;
  152460. ulength = __Pyx_PyUnicode_GET_LENGTH(uval);
  152461. if (unlikely(!ulength))
  152462. continue;
  152463. if (unlikely(char_pos + ulength < 0))
  152464. goto overflow;
  152465. ukind = __Pyx_PyUnicode_KIND(uval);
  152466. udata = __Pyx_PyUnicode_DATA(uval);
  152467. if (!CYTHON_PEP393_ENABLED || ukind == result_ukind) {
  152468. memcpy((char *)result_udata + char_pos * result_ukind, udata, (size_t) (ulength * result_ukind));
  152469. } else {
  152470. #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030300F0 || defined(_PyUnicode_FastCopyCharacters)
  152471. _PyUnicode_FastCopyCharacters(result_uval, char_pos, uval, 0, ulength);
  152472. #else
  152473. Py_ssize_t j;
  152474. for (j=0; j < ulength; j++) {
  152475. Py_UCS4 uchar = __Pyx_PyUnicode_READ(ukind, udata, j);
  152476. __Pyx_PyUnicode_WRITE(result_ukind, result_udata, char_pos+j, uchar);
  152477. }
  152478. #endif
  152479. }
  152480. char_pos += ulength;
  152481. }
  152482. return result_uval;
  152483. overflow:
  152484. PyErr_SetString(PyExc_OverflowError, "join() result is too long for a Python string");
  152485. bad:
  152486. Py_DECREF(result_uval);
  152487. return NULL;
  152488. #else
  152489. result_ulength++;
  152490. value_count++;
  152491. return PyUnicode_Join(__pyx_empty_unicode, value_tuple);
  152492. #endif
  152493. }
  152494. /* SliceObject */
  152495. static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(PyObject* obj,
  152496. Py_ssize_t cstart, Py_ssize_t cstop,
  152497. PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice,
  152498. int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) {
  152499. #if CYTHON_USE_TYPE_SLOTS
  152500. PyMappingMethods* mp;
  152501. #if PY_MAJOR_VERSION < 3
  152502. PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence;
  152503. if (likely(ms && ms->sq_slice)) {
  152504. if (!has_cstart) {
  152505. if (_py_start && (*_py_start != Py_None)) {
  152506. cstart = __Pyx_PyIndex_AsSsize_t(*_py_start);
  152507. if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
  152508. } else
  152509. cstart = 0;
  152510. }
  152511. if (!has_cstop) {
  152512. if (_py_stop && (*_py_stop != Py_None)) {
  152513. cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop);
  152514. if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
  152515. } else
  152516. cstop = PY_SSIZE_T_MAX;
  152517. }
  152518. if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) {
  152519. Py_ssize_t l = ms->sq_length(obj);
  152520. if (likely(l >= 0)) {
  152521. if (cstop < 0) {
  152522. cstop += l;
  152523. if (cstop < 0) cstop = 0;
  152524. }
  152525. if (cstart < 0) {
  152526. cstart += l;
  152527. if (cstart < 0) cstart = 0;
  152528. }
  152529. } else {
  152530. if (!PyErr_ExceptionMatches(PyExc_OverflowError))
  152531. goto bad;
  152532. PyErr_Clear();
  152533. }
  152534. }
  152535. return ms->sq_slice(obj, cstart, cstop);
  152536. }
  152537. #endif
  152538. mp = Py_TYPE(obj)->tp_as_mapping;
  152539. if (likely(mp && mp->mp_subscript))
  152540. #endif
  152541. {
  152542. PyObject* result;
  152543. PyObject *py_slice, *py_start, *py_stop;
  152544. if (_py_slice) {
  152545. py_slice = *_py_slice;
  152546. } else {
  152547. PyObject* owned_start = NULL;
  152548. PyObject* owned_stop = NULL;
  152549. if (_py_start) {
  152550. py_start = *_py_start;
  152551. } else {
  152552. if (has_cstart) {
  152553. owned_start = py_start = PyInt_FromSsize_t(cstart);
  152554. if (unlikely(!py_start)) goto bad;
  152555. } else
  152556. py_start = Py_None;
  152557. }
  152558. if (_py_stop) {
  152559. py_stop = *_py_stop;
  152560. } else {
  152561. if (has_cstop) {
  152562. owned_stop = py_stop = PyInt_FromSsize_t(cstop);
  152563. if (unlikely(!py_stop)) {
  152564. Py_XDECREF(owned_start);
  152565. goto bad;
  152566. }
  152567. } else
  152568. py_stop = Py_None;
  152569. }
  152570. py_slice = PySlice_New(py_start, py_stop, Py_None);
  152571. Py_XDECREF(owned_start);
  152572. Py_XDECREF(owned_stop);
  152573. if (unlikely(!py_slice)) goto bad;
  152574. }
  152575. #if CYTHON_USE_TYPE_SLOTS
  152576. result = mp->mp_subscript(obj, py_slice);
  152577. #else
  152578. result = PyObject_GetItem(obj, py_slice);
  152579. #endif
  152580. if (!_py_slice) {
  152581. Py_DECREF(py_slice);
  152582. }
  152583. return result;
  152584. }
  152585. PyErr_Format(PyExc_TypeError,
  152586. "'%.200s' object is unsliceable", Py_TYPE(obj)->tp_name);
  152587. bad:
  152588. return NULL;
  152589. }
  152590. /* PyIntCompare */
  152591. static CYTHON_INLINE PyObject* __Pyx_PyInt_NeObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED long inplace) {
  152592. if (op1 == op2) {
  152593. Py_RETURN_FALSE;
  152594. }
  152595. #if PY_MAJOR_VERSION < 3
  152596. if (likely(PyInt_CheckExact(op1))) {
  152597. const long b = intval;
  152598. long a = PyInt_AS_LONG(op1);
  152599. if (a != b) Py_RETURN_TRUE; else Py_RETURN_FALSE;
  152600. }
  152601. #endif
  152602. #if CYTHON_USE_PYLONG_INTERNALS
  152603. if (likely(PyLong_CheckExact(op1))) {
  152604. int unequal;
  152605. unsigned long uintval;
  152606. Py_ssize_t size = Py_SIZE(op1);
  152607. const digit* digits = ((PyLongObject*)op1)->ob_digit;
  152608. if (intval == 0) {
  152609. if (size != 0) Py_RETURN_TRUE; else Py_RETURN_FALSE;
  152610. } else if (intval < 0) {
  152611. if (size >= 0)
  152612. Py_RETURN_TRUE;
  152613. intval = -intval;
  152614. size = -size;
  152615. } else {
  152616. if (size <= 0)
  152617. Py_RETURN_TRUE;
  152618. }
  152619. uintval = (unsigned long) intval;
  152620. #if PyLong_SHIFT * 4 < SIZEOF_LONG*8
  152621. if (uintval >> (PyLong_SHIFT * 4)) {
  152622. unequal = (size != 5) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
  152623. | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[4] != ((uintval >> (4 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
  152624. } else
  152625. #endif
  152626. #if PyLong_SHIFT * 3 < SIZEOF_LONG*8
  152627. if (uintval >> (PyLong_SHIFT * 3)) {
  152628. unequal = (size != 4) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
  152629. | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
  152630. } else
  152631. #endif
  152632. #if PyLong_SHIFT * 2 < SIZEOF_LONG*8
  152633. if (uintval >> (PyLong_SHIFT * 2)) {
  152634. unequal = (size != 3) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
  152635. | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
  152636. } else
  152637. #endif
  152638. #if PyLong_SHIFT * 1 < SIZEOF_LONG*8
  152639. if (uintval >> (PyLong_SHIFT * 1)) {
  152640. unequal = (size != 2) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
  152641. | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
  152642. } else
  152643. #endif
  152644. unequal = (size != 1) || (((unsigned long) digits[0]) != (uintval & (unsigned long) PyLong_MASK));
  152645. if (unequal != 0) Py_RETURN_TRUE; else Py_RETURN_FALSE;
  152646. }
  152647. #endif
  152648. if (PyFloat_CheckExact(op1)) {
  152649. const long b = intval;
  152650. double a = PyFloat_AS_DOUBLE(op1);
  152651. if ((double)a != (double)b) Py_RETURN_TRUE; else Py_RETURN_FALSE;
  152652. }
  152653. return (
  152654. PyObject_RichCompare(op1, op2, Py_NE));
  152655. }
  152656. /* None */
  152657. static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) {
  152658. PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname);
  152659. }
  152660. /* CoroutineBase */
  152661. #include <structmember.h>
  152662. #include <frameobject.h>
  152663. #define __Pyx_Coroutine_Undelegate(gen) Py_CLEAR((gen)->yieldfrom)
  152664. static int __Pyx_PyGen__FetchStopIterationValue(CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject **pvalue) {
  152665. PyObject *et, *ev, *tb;
  152666. PyObject *value = NULL;
  152667. __Pyx_ErrFetch(&et, &ev, &tb);
  152668. if (!et) {
  152669. Py_XDECREF(tb);
  152670. Py_XDECREF(ev);
  152671. Py_INCREF(Py_None);
  152672. *pvalue = Py_None;
  152673. return 0;
  152674. }
  152675. if (likely(et == PyExc_StopIteration)) {
  152676. if (!ev) {
  152677. Py_INCREF(Py_None);
  152678. value = Py_None;
  152679. }
  152680. #if PY_VERSION_HEX >= 0x030300A0
  152681. else if (Py_TYPE(ev) == (PyTypeObject*)PyExc_StopIteration) {
  152682. value = ((PyStopIterationObject *)ev)->value;
  152683. Py_INCREF(value);
  152684. Py_DECREF(ev);
  152685. }
  152686. #endif
  152687. else if (unlikely(PyTuple_Check(ev))) {
  152688. if (PyTuple_GET_SIZE(ev) >= 1) {
  152689. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  152690. value = PyTuple_GET_ITEM(ev, 0);
  152691. Py_INCREF(value);
  152692. #else
  152693. value = PySequence_ITEM(ev, 0);
  152694. #endif
  152695. } else {
  152696. Py_INCREF(Py_None);
  152697. value = Py_None;
  152698. }
  152699. Py_DECREF(ev);
  152700. }
  152701. else if (!__Pyx_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration)) {
  152702. value = ev;
  152703. }
  152704. if (likely(value)) {
  152705. Py_XDECREF(tb);
  152706. Py_DECREF(et);
  152707. *pvalue = value;
  152708. return 0;
  152709. }
  152710. } else if (!__Pyx_PyErr_GivenExceptionMatches(et, PyExc_StopIteration)) {
  152711. __Pyx_ErrRestore(et, ev, tb);
  152712. return -1;
  152713. }
  152714. PyErr_NormalizeException(&et, &ev, &tb);
  152715. if (unlikely(!PyObject_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration))) {
  152716. __Pyx_ErrRestore(et, ev, tb);
  152717. return -1;
  152718. }
  152719. Py_XDECREF(tb);
  152720. Py_DECREF(et);
  152721. #if PY_VERSION_HEX >= 0x030300A0
  152722. value = ((PyStopIterationObject *)ev)->value;
  152723. Py_INCREF(value);
  152724. Py_DECREF(ev);
  152725. #else
  152726. {
  152727. PyObject* args = __Pyx_PyObject_GetAttrStr(ev, __pyx_n_s_args);
  152728. Py_DECREF(ev);
  152729. if (likely(args)) {
  152730. value = PySequence_GetItem(args, 0);
  152731. Py_DECREF(args);
  152732. }
  152733. if (unlikely(!value)) {
  152734. __Pyx_ErrRestore(NULL, NULL, NULL);
  152735. Py_INCREF(Py_None);
  152736. value = Py_None;
  152737. }
  152738. }
  152739. #endif
  152740. *pvalue = value;
  152741. return 0;
  152742. }
  152743. static CYTHON_INLINE
  152744. void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *exc_state) {
  152745. PyObject *t, *v, *tb;
  152746. t = exc_state->exc_type;
  152747. v = exc_state->exc_value;
  152748. tb = exc_state->exc_traceback;
  152749. exc_state->exc_type = NULL;
  152750. exc_state->exc_value = NULL;
  152751. exc_state->exc_traceback = NULL;
  152752. Py_XDECREF(t);
  152753. Py_XDECREF(v);
  152754. Py_XDECREF(tb);
  152755. }
  152756. #define __Pyx_Coroutine_AlreadyRunningError(gen) (__Pyx__Coroutine_AlreadyRunningError(gen), (PyObject*)NULL)
  152757. static void __Pyx__Coroutine_AlreadyRunningError(CYTHON_UNUSED __pyx_CoroutineObject *gen) {
  152758. const char *msg;
  152759. if ((0)) {
  152760. #ifdef __Pyx_Coroutine_USED
  152761. } else if (__Pyx_Coroutine_Check((PyObject*)gen)) {
  152762. msg = "coroutine already executing";
  152763. #endif
  152764. #ifdef __Pyx_AsyncGen_USED
  152765. } else if (__Pyx_AsyncGen_CheckExact((PyObject*)gen)) {
  152766. msg = "async generator already executing";
  152767. #endif
  152768. } else {
  152769. msg = "generator already executing";
  152770. }
  152771. PyErr_SetString(PyExc_ValueError, msg);
  152772. }
  152773. #define __Pyx_Coroutine_NotStartedError(gen) (__Pyx__Coroutine_NotStartedError(gen), (PyObject*)NULL)
  152774. static void __Pyx__Coroutine_NotStartedError(CYTHON_UNUSED PyObject *gen) {
  152775. const char *msg;
  152776. if ((0)) {
  152777. #ifdef __Pyx_Coroutine_USED
  152778. } else if (__Pyx_Coroutine_Check(gen)) {
  152779. msg = "can't send non-None value to a just-started coroutine";
  152780. #endif
  152781. #ifdef __Pyx_AsyncGen_USED
  152782. } else if (__Pyx_AsyncGen_CheckExact(gen)) {
  152783. msg = "can't send non-None value to a just-started async generator";
  152784. #endif
  152785. } else {
  152786. msg = "can't send non-None value to a just-started generator";
  152787. }
  152788. PyErr_SetString(PyExc_TypeError, msg);
  152789. }
  152790. #define __Pyx_Coroutine_AlreadyTerminatedError(gen, value, closing) (__Pyx__Coroutine_AlreadyTerminatedError(gen, value, closing), (PyObject*)NULL)
  152791. static void __Pyx__Coroutine_AlreadyTerminatedError(CYTHON_UNUSED PyObject *gen, PyObject *value, CYTHON_UNUSED int closing) {
  152792. #ifdef __Pyx_Coroutine_USED
  152793. if (!closing && __Pyx_Coroutine_Check(gen)) {
  152794. PyErr_SetString(PyExc_RuntimeError, "cannot reuse already awaited coroutine");
  152795. } else
  152796. #endif
  152797. if (value) {
  152798. #ifdef __Pyx_AsyncGen_USED
  152799. if (__Pyx_AsyncGen_CheckExact(gen))
  152800. PyErr_SetNone(__Pyx_PyExc_StopAsyncIteration);
  152801. else
  152802. #endif
  152803. PyErr_SetNone(PyExc_StopIteration);
  152804. }
  152805. }
  152806. static
  152807. PyObject *__Pyx_Coroutine_SendEx(__pyx_CoroutineObject *self, PyObject *value, int closing) {
  152808. __Pyx_PyThreadState_declare
  152809. PyThreadState *tstate;
  152810. __Pyx_ExcInfoStruct *exc_state;
  152811. PyObject *retval;
  152812. assert(!self->is_running);
  152813. if (unlikely(self->resume_label == 0)) {
  152814. if (unlikely(value && value != Py_None)) {
  152815. return __Pyx_Coroutine_NotStartedError((PyObject*)self);
  152816. }
  152817. }
  152818. if (unlikely(self->resume_label == -1)) {
  152819. return __Pyx_Coroutine_AlreadyTerminatedError((PyObject*)self, value, closing);
  152820. }
  152821. #if CYTHON_FAST_THREAD_STATE
  152822. __Pyx_PyThreadState_assign
  152823. tstate = __pyx_tstate;
  152824. #else
  152825. tstate = __Pyx_PyThreadState_Current;
  152826. #endif
  152827. exc_state = &self->gi_exc_state;
  152828. if (exc_state->exc_type) {
  152829. #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON
  152830. #else
  152831. if (exc_state->exc_traceback) {
  152832. PyTracebackObject *tb = (PyTracebackObject *) exc_state->exc_traceback;
  152833. PyFrameObject *f = tb->tb_frame;
  152834. Py_XINCREF(tstate->frame);
  152835. assert(f->f_back == NULL);
  152836. f->f_back = tstate->frame;
  152837. }
  152838. #endif
  152839. }
  152840. #if CYTHON_USE_EXC_INFO_STACK
  152841. exc_state->previous_item = tstate->exc_info;
  152842. tstate->exc_info = exc_state;
  152843. #else
  152844. if (exc_state->exc_type) {
  152845. __Pyx_ExceptionSwap(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback);
  152846. } else {
  152847. __Pyx_Coroutine_ExceptionClear(exc_state);
  152848. __Pyx_ExceptionSave(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback);
  152849. }
  152850. #endif
  152851. self->is_running = 1;
  152852. retval = self->body((PyObject *) self, tstate, value);
  152853. self->is_running = 0;
  152854. #if CYTHON_USE_EXC_INFO_STACK
  152855. exc_state = &self->gi_exc_state;
  152856. tstate->exc_info = exc_state->previous_item;
  152857. exc_state->previous_item = NULL;
  152858. __Pyx_Coroutine_ResetFrameBackpointer(exc_state);
  152859. #endif
  152860. return retval;
  152861. }
  152862. static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state) {
  152863. PyObject *exc_tb = exc_state->exc_traceback;
  152864. if (likely(exc_tb)) {
  152865. #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON
  152866. #else
  152867. PyTracebackObject *tb = (PyTracebackObject *) exc_tb;
  152868. PyFrameObject *f = tb->tb_frame;
  152869. Py_CLEAR(f->f_back);
  152870. #endif
  152871. }
  152872. }
  152873. static CYTHON_INLINE
  152874. PyObject *__Pyx_Coroutine_MethodReturn(CYTHON_UNUSED PyObject* gen, PyObject *retval) {
  152875. if (unlikely(!retval)) {
  152876. __Pyx_PyThreadState_declare
  152877. __Pyx_PyThreadState_assign
  152878. if (!__Pyx_PyErr_Occurred()) {
  152879. PyObject *exc = PyExc_StopIteration;
  152880. #ifdef __Pyx_AsyncGen_USED
  152881. if (__Pyx_AsyncGen_CheckExact(gen))
  152882. exc = __Pyx_PyExc_StopAsyncIteration;
  152883. #endif
  152884. __Pyx_PyErr_SetNone(exc);
  152885. }
  152886. }
  152887. return retval;
  152888. }
  152889. static CYTHON_INLINE
  152890. PyObject *__Pyx_Coroutine_FinishDelegation(__pyx_CoroutineObject *gen) {
  152891. PyObject *ret;
  152892. PyObject *val = NULL;
  152893. __Pyx_Coroutine_Undelegate(gen);
  152894. __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, &val);
  152895. ret = __Pyx_Coroutine_SendEx(gen, val, 0);
  152896. Py_XDECREF(val);
  152897. return ret;
  152898. }
  152899. static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value) {
  152900. PyObject *retval;
  152901. __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
  152902. PyObject *yf = gen->yieldfrom;
  152903. if (unlikely(gen->is_running))
  152904. return __Pyx_Coroutine_AlreadyRunningError(gen);
  152905. if (yf) {
  152906. PyObject *ret;
  152907. gen->is_running = 1;
  152908. #ifdef __Pyx_Generator_USED
  152909. if (__Pyx_Generator_CheckExact(yf)) {
  152910. ret = __Pyx_Coroutine_Send(yf, value);
  152911. } else
  152912. #endif
  152913. #ifdef __Pyx_Coroutine_USED
  152914. if (__Pyx_Coroutine_Check(yf)) {
  152915. ret = __Pyx_Coroutine_Send(yf, value);
  152916. } else
  152917. #endif
  152918. #ifdef __Pyx_AsyncGen_USED
  152919. if (__pyx_PyAsyncGenASend_CheckExact(yf)) {
  152920. ret = __Pyx_async_gen_asend_send(yf, value);
  152921. } else
  152922. #endif
  152923. #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
  152924. if (PyGen_CheckExact(yf)) {
  152925. ret = _PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
  152926. } else
  152927. #endif
  152928. #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03050000 && defined(PyCoro_CheckExact) && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
  152929. if (PyCoro_CheckExact(yf)) {
  152930. ret = _PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
  152931. } else
  152932. #endif
  152933. {
  152934. if (value == Py_None)
  152935. ret = Py_TYPE(yf)->tp_iternext(yf);
  152936. else
  152937. ret = __Pyx_PyObject_CallMethod1(yf, __pyx_n_s_send, value);
  152938. }
  152939. gen->is_running = 0;
  152940. if (likely(ret)) {
  152941. return ret;
  152942. }
  152943. retval = __Pyx_Coroutine_FinishDelegation(gen);
  152944. } else {
  152945. retval = __Pyx_Coroutine_SendEx(gen, value, 0);
  152946. }
  152947. return __Pyx_Coroutine_MethodReturn(self, retval);
  152948. }
  152949. static int __Pyx_Coroutine_CloseIter(__pyx_CoroutineObject *gen, PyObject *yf) {
  152950. PyObject *retval = NULL;
  152951. int err = 0;
  152952. #ifdef __Pyx_Generator_USED
  152953. if (__Pyx_Generator_CheckExact(yf)) {
  152954. retval = __Pyx_Coroutine_Close(yf);
  152955. if (!retval)
  152956. return -1;
  152957. } else
  152958. #endif
  152959. #ifdef __Pyx_Coroutine_USED
  152960. if (__Pyx_Coroutine_Check(yf)) {
  152961. retval = __Pyx_Coroutine_Close(yf);
  152962. if (!retval)
  152963. return -1;
  152964. } else
  152965. if (__Pyx_CoroutineAwait_CheckExact(yf)) {
  152966. retval = __Pyx_CoroutineAwait_Close((__pyx_CoroutineAwaitObject*)yf, NULL);
  152967. if (!retval)
  152968. return -1;
  152969. } else
  152970. #endif
  152971. #ifdef __Pyx_AsyncGen_USED
  152972. if (__pyx_PyAsyncGenASend_CheckExact(yf)) {
  152973. retval = __Pyx_async_gen_asend_close(yf, NULL);
  152974. } else
  152975. if (__pyx_PyAsyncGenAThrow_CheckExact(yf)) {
  152976. retval = __Pyx_async_gen_athrow_close(yf, NULL);
  152977. } else
  152978. #endif
  152979. {
  152980. PyObject *meth;
  152981. gen->is_running = 1;
  152982. meth = __Pyx_PyObject_GetAttrStr(yf, __pyx_n_s_close);
  152983. if (unlikely(!meth)) {
  152984. if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
  152985. PyErr_WriteUnraisable(yf);
  152986. }
  152987. PyErr_Clear();
  152988. } else {
  152989. retval = PyObject_CallFunction(meth, NULL);
  152990. Py_DECREF(meth);
  152991. if (!retval)
  152992. err = -1;
  152993. }
  152994. gen->is_running = 0;
  152995. }
  152996. Py_XDECREF(retval);
  152997. return err;
  152998. }
  152999. static PyObject *__Pyx_Generator_Next(PyObject *self) {
  153000. __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
  153001. PyObject *yf = gen->yieldfrom;
  153002. if (unlikely(gen->is_running))
  153003. return __Pyx_Coroutine_AlreadyRunningError(gen);
  153004. if (yf) {
  153005. PyObject *ret;
  153006. gen->is_running = 1;
  153007. #ifdef __Pyx_Generator_USED
  153008. if (__Pyx_Generator_CheckExact(yf)) {
  153009. ret = __Pyx_Generator_Next(yf);
  153010. } else
  153011. #endif
  153012. #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
  153013. if (PyGen_CheckExact(yf)) {
  153014. ret = _PyGen_Send((PyGenObject*)yf, NULL);
  153015. } else
  153016. #endif
  153017. #ifdef __Pyx_Coroutine_USED
  153018. if (__Pyx_Coroutine_Check(yf)) {
  153019. ret = __Pyx_Coroutine_Send(yf, Py_None);
  153020. } else
  153021. #endif
  153022. ret = Py_TYPE(yf)->tp_iternext(yf);
  153023. gen->is_running = 0;
  153024. if (likely(ret)) {
  153025. return ret;
  153026. }
  153027. return __Pyx_Coroutine_FinishDelegation(gen);
  153028. }
  153029. return __Pyx_Coroutine_SendEx(gen, Py_None, 0);
  153030. }
  153031. static PyObject *__Pyx_Coroutine_Close_Method(PyObject *self, CYTHON_UNUSED PyObject *arg) {
  153032. return __Pyx_Coroutine_Close(self);
  153033. }
  153034. static PyObject *__Pyx_Coroutine_Close(PyObject *self) {
  153035. __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
  153036. PyObject *retval, *raised_exception;
  153037. PyObject *yf = gen->yieldfrom;
  153038. int err = 0;
  153039. if (unlikely(gen->is_running))
  153040. return __Pyx_Coroutine_AlreadyRunningError(gen);
  153041. if (yf) {
  153042. Py_INCREF(yf);
  153043. err = __Pyx_Coroutine_CloseIter(gen, yf);
  153044. __Pyx_Coroutine_Undelegate(gen);
  153045. Py_DECREF(yf);
  153046. }
  153047. if (err == 0)
  153048. PyErr_SetNone(PyExc_GeneratorExit);
  153049. retval = __Pyx_Coroutine_SendEx(gen, NULL, 1);
  153050. if (unlikely(retval)) {
  153051. const char *msg;
  153052. Py_DECREF(retval);
  153053. if ((0)) {
  153054. #ifdef __Pyx_Coroutine_USED
  153055. } else if (__Pyx_Coroutine_Check(self)) {
  153056. msg = "coroutine ignored GeneratorExit";
  153057. #endif
  153058. #ifdef __Pyx_AsyncGen_USED
  153059. } else if (__Pyx_AsyncGen_CheckExact(self)) {
  153060. #if PY_VERSION_HEX < 0x03060000
  153061. msg = "async generator ignored GeneratorExit - might require Python 3.6+ finalisation (PEP 525)";
  153062. #else
  153063. msg = "async generator ignored GeneratorExit";
  153064. #endif
  153065. #endif
  153066. } else {
  153067. msg = "generator ignored GeneratorExit";
  153068. }
  153069. PyErr_SetString(PyExc_RuntimeError, msg);
  153070. return NULL;
  153071. }
  153072. raised_exception = PyErr_Occurred();
  153073. if (likely(!raised_exception || __Pyx_PyErr_GivenExceptionMatches2(raised_exception, PyExc_GeneratorExit, PyExc_StopIteration))) {
  153074. if (raised_exception) PyErr_Clear();
  153075. Py_INCREF(Py_None);
  153076. return Py_None;
  153077. }
  153078. return NULL;
  153079. }
  153080. static PyObject *__Pyx__Coroutine_Throw(PyObject *self, PyObject *typ, PyObject *val, PyObject *tb,
  153081. PyObject *args, int close_on_genexit) {
  153082. __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
  153083. PyObject *yf = gen->yieldfrom;
  153084. if (unlikely(gen->is_running))
  153085. return __Pyx_Coroutine_AlreadyRunningError(gen);
  153086. if (yf) {
  153087. PyObject *ret;
  153088. Py_INCREF(yf);
  153089. if (__Pyx_PyErr_GivenExceptionMatches(typ, PyExc_GeneratorExit) && close_on_genexit) {
  153090. int err = __Pyx_Coroutine_CloseIter(gen, yf);
  153091. Py_DECREF(yf);
  153092. __Pyx_Coroutine_Undelegate(gen);
  153093. if (err < 0)
  153094. return __Pyx_Coroutine_MethodReturn(self, __Pyx_Coroutine_SendEx(gen, NULL, 0));
  153095. goto throw_here;
  153096. }
  153097. gen->is_running = 1;
  153098. if (0
  153099. #ifdef __Pyx_Generator_USED
  153100. || __Pyx_Generator_CheckExact(yf)
  153101. #endif
  153102. #ifdef __Pyx_Coroutine_USED
  153103. || __Pyx_Coroutine_Check(yf)
  153104. #endif
  153105. ) {
  153106. ret = __Pyx__Coroutine_Throw(yf, typ, val, tb, args, close_on_genexit);
  153107. #ifdef __Pyx_Coroutine_USED
  153108. } else if (__Pyx_CoroutineAwait_CheckExact(yf)) {
  153109. ret = __Pyx__Coroutine_Throw(((__pyx_CoroutineAwaitObject*)yf)->coroutine, typ, val, tb, args, close_on_genexit);
  153110. #endif
  153111. } else {
  153112. PyObject *meth = __Pyx_PyObject_GetAttrStr(yf, __pyx_n_s_throw);
  153113. if (unlikely(!meth)) {
  153114. Py_DECREF(yf);
  153115. if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
  153116. gen->is_running = 0;
  153117. return NULL;
  153118. }
  153119. PyErr_Clear();
  153120. __Pyx_Coroutine_Undelegate(gen);
  153121. gen->is_running = 0;
  153122. goto throw_here;
  153123. }
  153124. if (likely(args)) {
  153125. ret = PyObject_CallObject(meth, args);
  153126. } else {
  153127. ret = PyObject_CallFunctionObjArgs(meth, typ, val, tb, NULL);
  153128. }
  153129. Py_DECREF(meth);
  153130. }
  153131. gen->is_running = 0;
  153132. Py_DECREF(yf);
  153133. if (!ret) {
  153134. ret = __Pyx_Coroutine_FinishDelegation(gen);
  153135. }
  153136. return __Pyx_Coroutine_MethodReturn(self, ret);
  153137. }
  153138. throw_here:
  153139. __Pyx_Raise(typ, val, tb, NULL);
  153140. return __Pyx_Coroutine_MethodReturn(self, __Pyx_Coroutine_SendEx(gen, NULL, 0));
  153141. }
  153142. static PyObject *__Pyx_Coroutine_Throw(PyObject *self, PyObject *args) {
  153143. PyObject *typ;
  153144. PyObject *val = NULL;
  153145. PyObject *tb = NULL;
  153146. if (!PyArg_UnpackTuple(args, (char *)"throw", 1, 3, &typ, &val, &tb))
  153147. return NULL;
  153148. return __Pyx__Coroutine_Throw(self, typ, val, tb, args, 1);
  153149. }
  153150. static CYTHON_INLINE int __Pyx_Coroutine_traverse_excstate(__Pyx_ExcInfoStruct *exc_state, visitproc visit, void *arg) {
  153151. Py_VISIT(exc_state->exc_type);
  153152. Py_VISIT(exc_state->exc_value);
  153153. Py_VISIT(exc_state->exc_traceback);
  153154. return 0;
  153155. }
  153156. static int __Pyx_Coroutine_traverse(__pyx_CoroutineObject *gen, visitproc visit, void *arg) {
  153157. Py_VISIT(gen->closure);
  153158. Py_VISIT(gen->classobj);
  153159. Py_VISIT(gen->yieldfrom);
  153160. return __Pyx_Coroutine_traverse_excstate(&gen->gi_exc_state, visit, arg);
  153161. }
  153162. static int __Pyx_Coroutine_clear(PyObject *self) {
  153163. __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
  153164. Py_CLEAR(gen->closure);
  153165. Py_CLEAR(gen->classobj);
  153166. Py_CLEAR(gen->yieldfrom);
  153167. __Pyx_Coroutine_ExceptionClear(&gen->gi_exc_state);
  153168. #ifdef __Pyx_AsyncGen_USED
  153169. if (__Pyx_AsyncGen_CheckExact(self)) {
  153170. Py_CLEAR(((__pyx_PyAsyncGenObject*)gen)->ag_finalizer);
  153171. }
  153172. #endif
  153173. Py_CLEAR(gen->gi_code);
  153174. Py_CLEAR(gen->gi_name);
  153175. Py_CLEAR(gen->gi_qualname);
  153176. Py_CLEAR(gen->gi_modulename);
  153177. return 0;
  153178. }
  153179. static void __Pyx_Coroutine_dealloc(PyObject *self) {
  153180. __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
  153181. PyObject_GC_UnTrack(gen);
  153182. if (gen->gi_weakreflist != NULL)
  153183. PyObject_ClearWeakRefs(self);
  153184. if (gen->resume_label >= 0) {
  153185. PyObject_GC_Track(self);
  153186. #if PY_VERSION_HEX >= 0x030400a1 && CYTHON_USE_TP_FINALIZE
  153187. if (PyObject_CallFinalizerFromDealloc(self))
  153188. #else
  153189. Py_TYPE(gen)->tp_del(self);
  153190. if (self->ob_refcnt > 0)
  153191. #endif
  153192. {
  153193. return;
  153194. }
  153195. PyObject_GC_UnTrack(self);
  153196. }
  153197. #ifdef __Pyx_AsyncGen_USED
  153198. if (__Pyx_AsyncGen_CheckExact(self)) {
  153199. /* We have to handle this case for asynchronous generators
  153200. right here, because this code has to be between UNTRACK
  153201. and GC_Del. */
  153202. Py_CLEAR(((__pyx_PyAsyncGenObject*)self)->ag_finalizer);
  153203. }
  153204. #endif
  153205. __Pyx_Coroutine_clear(self);
  153206. PyObject_GC_Del(gen);
  153207. }
  153208. static void __Pyx_Coroutine_del(PyObject *self) {
  153209. PyObject *error_type, *error_value, *error_traceback;
  153210. __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
  153211. __Pyx_PyThreadState_declare
  153212. if (gen->resume_label < 0) {
  153213. return;
  153214. }
  153215. #if !CYTHON_USE_TP_FINALIZE
  153216. assert(self->ob_refcnt == 0);
  153217. self->ob_refcnt = 1;
  153218. #endif
  153219. __Pyx_PyThreadState_assign
  153220. __Pyx_ErrFetch(&error_type, &error_value, &error_traceback);
  153221. #ifdef __Pyx_AsyncGen_USED
  153222. if (__Pyx_AsyncGen_CheckExact(self)) {
  153223. __pyx_PyAsyncGenObject *agen = (__pyx_PyAsyncGenObject*)self;
  153224. PyObject *finalizer = agen->ag_finalizer;
  153225. if (finalizer && !agen->ag_closed) {
  153226. PyObject *res = __Pyx_PyObject_CallOneArg(finalizer, self);
  153227. if (unlikely(!res)) {
  153228. PyErr_WriteUnraisable(self);
  153229. } else {
  153230. Py_DECREF(res);
  153231. }
  153232. __Pyx_ErrRestore(error_type, error_value, error_traceback);
  153233. return;
  153234. }
  153235. }
  153236. #endif
  153237. if (unlikely(gen->resume_label == 0 && !error_value)) {
  153238. #ifdef __Pyx_Coroutine_USED
  153239. #ifdef __Pyx_Generator_USED
  153240. if (!__Pyx_Generator_CheckExact(self))
  153241. #endif
  153242. {
  153243. PyObject_GC_UnTrack(self);
  153244. #if PY_MAJOR_VERSION >= 3 || defined(PyErr_WarnFormat)
  153245. if (unlikely(PyErr_WarnFormat(PyExc_RuntimeWarning, 1, "coroutine '%.50S' was never awaited", gen->gi_qualname) < 0))
  153246. PyErr_WriteUnraisable(self);
  153247. #else
  153248. {PyObject *msg;
  153249. char *cmsg;
  153250. #if CYTHON_COMPILING_IN_PYPY
  153251. msg = NULL;
  153252. cmsg = (char*) "coroutine was never awaited";
  153253. #else
  153254. char *cname;
  153255. PyObject *qualname;
  153256. qualname = gen->gi_qualname;
  153257. cname = PyString_AS_STRING(qualname);
  153258. msg = PyString_FromFormat("coroutine '%.50s' was never awaited", cname);
  153259. if (unlikely(!msg)) {
  153260. PyErr_Clear();
  153261. cmsg = (char*) "coroutine was never awaited";
  153262. } else {
  153263. cmsg = PyString_AS_STRING(msg);
  153264. }
  153265. #endif
  153266. if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, cmsg, 1) < 0))
  153267. PyErr_WriteUnraisable(self);
  153268. Py_XDECREF(msg);}
  153269. #endif
  153270. PyObject_GC_Track(self);
  153271. }
  153272. #endif
  153273. } else {
  153274. PyObject *res = __Pyx_Coroutine_Close(self);
  153275. if (unlikely(!res)) {
  153276. if (PyErr_Occurred())
  153277. PyErr_WriteUnraisable(self);
  153278. } else {
  153279. Py_DECREF(res);
  153280. }
  153281. }
  153282. __Pyx_ErrRestore(error_type, error_value, error_traceback);
  153283. #if !CYTHON_USE_TP_FINALIZE
  153284. assert(self->ob_refcnt > 0);
  153285. if (--self->ob_refcnt == 0) {
  153286. return;
  153287. }
  153288. {
  153289. Py_ssize_t refcnt = self->ob_refcnt;
  153290. _Py_NewReference(self);
  153291. self->ob_refcnt = refcnt;
  153292. }
  153293. #if CYTHON_COMPILING_IN_CPYTHON
  153294. assert(PyType_IS_GC(self->ob_type) &&
  153295. _Py_AS_GC(self)->gc.gc_refs != _PyGC_REFS_UNTRACKED);
  153296. _Py_DEC_REFTOTAL;
  153297. #endif
  153298. #ifdef COUNT_ALLOCS
  153299. --Py_TYPE(self)->tp_frees;
  153300. --Py_TYPE(self)->tp_allocs;
  153301. #endif
  153302. #endif
  153303. }
  153304. static PyObject *
  153305. __Pyx_Coroutine_get_name(__pyx_CoroutineObject *self, CYTHON_UNUSED void *context)
  153306. {
  153307. PyObject *name = self->gi_name;
  153308. if (unlikely(!name)) name = Py_None;
  153309. Py_INCREF(name);
  153310. return name;
  153311. }
  153312. static int
  153313. __Pyx_Coroutine_set_name(__pyx_CoroutineObject *self, PyObject *value, CYTHON_UNUSED void *context)
  153314. {
  153315. PyObject *tmp;
  153316. #if PY_MAJOR_VERSION >= 3
  153317. if (unlikely(value == NULL || !PyUnicode_Check(value)))
  153318. #else
  153319. if (unlikely(value == NULL || !PyString_Check(value)))
  153320. #endif
  153321. {
  153322. PyErr_SetString(PyExc_TypeError,
  153323. "__name__ must be set to a string object");
  153324. return -1;
  153325. }
  153326. tmp = self->gi_name;
  153327. Py_INCREF(value);
  153328. self->gi_name = value;
  153329. Py_XDECREF(tmp);
  153330. return 0;
  153331. }
  153332. static PyObject *
  153333. __Pyx_Coroutine_get_qualname(__pyx_CoroutineObject *self, CYTHON_UNUSED void *context)
  153334. {
  153335. PyObject *name = self->gi_qualname;
  153336. if (unlikely(!name)) name = Py_None;
  153337. Py_INCREF(name);
  153338. return name;
  153339. }
  153340. static int
  153341. __Pyx_Coroutine_set_qualname(__pyx_CoroutineObject *self, PyObject *value, CYTHON_UNUSED void *context)
  153342. {
  153343. PyObject *tmp;
  153344. #if PY_MAJOR_VERSION >= 3
  153345. if (unlikely(value == NULL || !PyUnicode_Check(value)))
  153346. #else
  153347. if (unlikely(value == NULL || !PyString_Check(value)))
  153348. #endif
  153349. {
  153350. PyErr_SetString(PyExc_TypeError,
  153351. "__qualname__ must be set to a string object");
  153352. return -1;
  153353. }
  153354. tmp = self->gi_qualname;
  153355. Py_INCREF(value);
  153356. self->gi_qualname = value;
  153357. Py_XDECREF(tmp);
  153358. return 0;
  153359. }
  153360. static __pyx_CoroutineObject *__Pyx__Coroutine_New(
  153361. PyTypeObject* type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
  153362. PyObject *name, PyObject *qualname, PyObject *module_name) {
  153363. __pyx_CoroutineObject *gen = PyObject_GC_New(__pyx_CoroutineObject, type);
  153364. if (unlikely(!gen))
  153365. return NULL;
  153366. return __Pyx__Coroutine_NewInit(gen, body, code, closure, name, qualname, module_name);
  153367. }
  153368. static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit(
  153369. __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
  153370. PyObject *name, PyObject *qualname, PyObject *module_name) {
  153371. gen->body = body;
  153372. gen->closure = closure;
  153373. Py_XINCREF(closure);
  153374. gen->is_running = 0;
  153375. gen->resume_label = 0;
  153376. gen->classobj = NULL;
  153377. gen->yieldfrom = NULL;
  153378. gen->gi_exc_state.exc_type = NULL;
  153379. gen->gi_exc_state.exc_value = NULL;
  153380. gen->gi_exc_state.exc_traceback = NULL;
  153381. #if CYTHON_USE_EXC_INFO_STACK
  153382. gen->gi_exc_state.previous_item = NULL;
  153383. #endif
  153384. gen->gi_weakreflist = NULL;
  153385. Py_XINCREF(qualname);
  153386. gen->gi_qualname = qualname;
  153387. Py_XINCREF(name);
  153388. gen->gi_name = name;
  153389. Py_XINCREF(module_name);
  153390. gen->gi_modulename = module_name;
  153391. Py_XINCREF(code);
  153392. gen->gi_code = code;
  153393. PyObject_GC_Track(gen);
  153394. return gen;
  153395. }
  153396. /* PyObject_GenericGetAttrNoDict */
  153397. #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
  153398. static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) {
  153399. PyErr_Format(PyExc_AttributeError,
  153400. #if PY_MAJOR_VERSION >= 3
  153401. "'%.50s' object has no attribute '%U'",
  153402. tp->tp_name, attr_name);
  153403. #else
  153404. "'%.50s' object has no attribute '%.400s'",
  153405. tp->tp_name, PyString_AS_STRING(attr_name));
  153406. #endif
  153407. return NULL;
  153408. }
  153409. static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) {
  153410. PyObject *descr;
  153411. PyTypeObject *tp = Py_TYPE(obj);
  153412. if (unlikely(!PyString_Check(attr_name))) {
  153413. return PyObject_GenericGetAttr(obj, attr_name);
  153414. }
  153415. assert(!tp->tp_dictoffset);
  153416. descr = _PyType_Lookup(tp, attr_name);
  153417. if (unlikely(!descr)) {
  153418. return __Pyx_RaiseGenericGetAttributeError(tp, attr_name);
  153419. }
  153420. Py_INCREF(descr);
  153421. #if PY_MAJOR_VERSION < 3
  153422. if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS)))
  153423. #endif
  153424. {
  153425. descrgetfunc f = Py_TYPE(descr)->tp_descr_get;
  153426. if (unlikely(f)) {
  153427. PyObject *res = f(descr, obj, (PyObject *)tp);
  153428. Py_DECREF(descr);
  153429. return res;
  153430. }
  153431. }
  153432. return descr;
  153433. }
  153434. #endif
  153435. /* PatchModuleWithCoroutine */
  153436. static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code) {
  153437. #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
  153438. int result;
  153439. PyObject *globals, *result_obj;
  153440. globals = PyDict_New(); if (unlikely(!globals)) goto ignore;
  153441. result = PyDict_SetItemString(globals, "_cython_coroutine_type",
  153442. #ifdef __Pyx_Coroutine_USED
  153443. (PyObject*)__pyx_CoroutineType);
  153444. #else
  153445. Py_None);
  153446. #endif
  153447. if (unlikely(result < 0)) goto ignore;
  153448. result = PyDict_SetItemString(globals, "_cython_generator_type",
  153449. #ifdef __Pyx_Generator_USED
  153450. (PyObject*)__pyx_GeneratorType);
  153451. #else
  153452. Py_None);
  153453. #endif
  153454. if (unlikely(result < 0)) goto ignore;
  153455. if (unlikely(PyDict_SetItemString(globals, "_module", module) < 0)) goto ignore;
  153456. if (unlikely(PyDict_SetItemString(globals, "__builtins__", __pyx_b) < 0)) goto ignore;
  153457. result_obj = PyRun_String(py_code, Py_file_input, globals, globals);
  153458. if (unlikely(!result_obj)) goto ignore;
  153459. Py_DECREF(result_obj);
  153460. Py_DECREF(globals);
  153461. return module;
  153462. ignore:
  153463. Py_XDECREF(globals);
  153464. PyErr_WriteUnraisable(module);
  153465. if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, "Cython module failed to patch module with custom type", 1) < 0)) {
  153466. Py_DECREF(module);
  153467. module = NULL;
  153468. }
  153469. #else
  153470. py_code++;
  153471. #endif
  153472. return module;
  153473. }
  153474. /* PatchGeneratorABC */
  153475. #ifndef CYTHON_REGISTER_ABCS
  153476. #define CYTHON_REGISTER_ABCS 1
  153477. #endif
  153478. #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
  153479. static PyObject* __Pyx_patch_abc_module(PyObject *module);
  153480. static PyObject* __Pyx_patch_abc_module(PyObject *module) {
  153481. module = __Pyx_Coroutine_patch_module(
  153482. module, ""
  153483. "if _cython_generator_type is not None:\n"
  153484. " try: Generator = _module.Generator\n"
  153485. " except AttributeError: pass\n"
  153486. " else: Generator.register(_cython_generator_type)\n"
  153487. "if _cython_coroutine_type is not None:\n"
  153488. " try: Coroutine = _module.Coroutine\n"
  153489. " except AttributeError: pass\n"
  153490. " else: Coroutine.register(_cython_coroutine_type)\n"
  153491. );
  153492. return module;
  153493. }
  153494. #endif
  153495. static int __Pyx_patch_abc(void) {
  153496. #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
  153497. static int abc_patched = 0;
  153498. if (CYTHON_REGISTER_ABCS && !abc_patched) {
  153499. PyObject *module;
  153500. module = PyImport_ImportModule((PY_MAJOR_VERSION >= 3) ? "collections.abc" : "collections");
  153501. if (!module) {
  153502. PyErr_WriteUnraisable(NULL);
  153503. if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning,
  153504. ((PY_MAJOR_VERSION >= 3) ?
  153505. "Cython module failed to register with collections.abc module" :
  153506. "Cython module failed to register with collections module"), 1) < 0)) {
  153507. return -1;
  153508. }
  153509. } else {
  153510. module = __Pyx_patch_abc_module(module);
  153511. abc_patched = 1;
  153512. if (unlikely(!module))
  153513. return -1;
  153514. Py_DECREF(module);
  153515. }
  153516. module = PyImport_ImportModule("backports_abc");
  153517. if (module) {
  153518. module = __Pyx_patch_abc_module(module);
  153519. Py_XDECREF(module);
  153520. }
  153521. if (!module) {
  153522. PyErr_Clear();
  153523. }
  153524. }
  153525. #else
  153526. if ((0)) __Pyx_Coroutine_patch_module(NULL, NULL);
  153527. #endif
  153528. return 0;
  153529. }
  153530. /* Coroutine */
  153531. static void __Pyx_CoroutineAwait_dealloc(PyObject *self) {
  153532. PyObject_GC_UnTrack(self);
  153533. Py_CLEAR(((__pyx_CoroutineAwaitObject*)self)->coroutine);
  153534. PyObject_GC_Del(self);
  153535. }
  153536. static int __Pyx_CoroutineAwait_traverse(__pyx_CoroutineAwaitObject *self, visitproc visit, void *arg) {
  153537. Py_VISIT(self->coroutine);
  153538. return 0;
  153539. }
  153540. static int __Pyx_CoroutineAwait_clear(__pyx_CoroutineAwaitObject *self) {
  153541. Py_CLEAR(self->coroutine);
  153542. return 0;
  153543. }
  153544. static PyObject *__Pyx_CoroutineAwait_Next(__pyx_CoroutineAwaitObject *self) {
  153545. return __Pyx_Generator_Next(self->coroutine);
  153546. }
  153547. static PyObject *__Pyx_CoroutineAwait_Send(__pyx_CoroutineAwaitObject *self, PyObject *value) {
  153548. return __Pyx_Coroutine_Send(self->coroutine, value);
  153549. }
  153550. static PyObject *__Pyx_CoroutineAwait_Throw(__pyx_CoroutineAwaitObject *self, PyObject *args) {
  153551. return __Pyx_Coroutine_Throw(self->coroutine, args);
  153552. }
  153553. static PyObject *__Pyx_CoroutineAwait_Close(__pyx_CoroutineAwaitObject *self, CYTHON_UNUSED PyObject *arg) {
  153554. return __Pyx_Coroutine_Close(self->coroutine);
  153555. }
  153556. static PyObject *__Pyx_CoroutineAwait_self(PyObject *self) {
  153557. Py_INCREF(self);
  153558. return self;
  153559. }
  153560. #if !CYTHON_COMPILING_IN_PYPY
  153561. static PyObject *__Pyx_CoroutineAwait_no_new(CYTHON_UNUSED PyTypeObject *type, CYTHON_UNUSED PyObject *args, CYTHON_UNUSED PyObject *kwargs) {
  153562. PyErr_SetString(PyExc_TypeError, "cannot instantiate type, use 'await coroutine' instead");
  153563. return NULL;
  153564. }
  153565. #endif
  153566. static PyMethodDef __pyx_CoroutineAwait_methods[] = {
  153567. {"send", (PyCFunction) __Pyx_CoroutineAwait_Send, METH_O,
  153568. (char*) PyDoc_STR("send(arg) -> send 'arg' into coroutine,\nreturn next yielded value or raise StopIteration.")},
  153569. {"throw", (PyCFunction) __Pyx_CoroutineAwait_Throw, METH_VARARGS,
  153570. (char*) PyDoc_STR("throw(typ[,val[,tb]]) -> raise exception in coroutine,\nreturn next yielded value or raise StopIteration.")},
  153571. {"close", (PyCFunction) __Pyx_CoroutineAwait_Close, METH_NOARGS,
  153572. (char*) PyDoc_STR("close() -> raise GeneratorExit inside coroutine.")},
  153573. {0, 0, 0, 0}
  153574. };
  153575. static PyTypeObject __pyx_CoroutineAwaitType_type = {
  153576. PyVarObject_HEAD_INIT(0, 0)
  153577. "coroutine_wrapper",
  153578. sizeof(__pyx_CoroutineAwaitObject),
  153579. 0,
  153580. (destructor) __Pyx_CoroutineAwait_dealloc,
  153581. 0,
  153582. 0,
  153583. 0,
  153584. 0,
  153585. 0,
  153586. 0,
  153587. 0,
  153588. 0,
  153589. 0,
  153590. 0,
  153591. 0,
  153592. 0,
  153593. 0,
  153594. 0,
  153595. Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,
  153596. PyDoc_STR("A wrapper object implementing __await__ for coroutines."),
  153597. (traverseproc) __Pyx_CoroutineAwait_traverse,
  153598. (inquiry) __Pyx_CoroutineAwait_clear,
  153599. 0,
  153600. 0,
  153601. __Pyx_CoroutineAwait_self,
  153602. (iternextfunc) __Pyx_CoroutineAwait_Next,
  153603. __pyx_CoroutineAwait_methods,
  153604. 0 ,
  153605. 0 ,
  153606. 0,
  153607. 0,
  153608. 0,
  153609. 0,
  153610. 0,
  153611. 0,
  153612. 0,
  153613. #if !CYTHON_COMPILING_IN_PYPY
  153614. __Pyx_CoroutineAwait_no_new,
  153615. #else
  153616. 0,
  153617. #endif
  153618. 0,
  153619. 0,
  153620. 0,
  153621. 0,
  153622. 0,
  153623. 0,
  153624. 0,
  153625. 0,
  153626. 0,
  153627. #if PY_VERSION_HEX >= 0x030400a1
  153628. 0,
  153629. #endif
  153630. #if PY_VERSION_HEX >= 0x030800b1
  153631. 0,
  153632. #endif
  153633. };
  153634. #if PY_VERSION_HEX < 0x030500B1 || defined(__Pyx_IterableCoroutine_USED) || CYTHON_USE_ASYNC_SLOTS
  153635. static CYTHON_INLINE PyObject *__Pyx__Coroutine_await(PyObject *coroutine) {
  153636. __pyx_CoroutineAwaitObject *await = PyObject_GC_New(__pyx_CoroutineAwaitObject, __pyx_CoroutineAwaitType);
  153637. if (unlikely(!await)) return NULL;
  153638. Py_INCREF(coroutine);
  153639. await->coroutine = coroutine;
  153640. PyObject_GC_Track(await);
  153641. return (PyObject*)await;
  153642. }
  153643. #endif
  153644. #if PY_VERSION_HEX < 0x030500B1
  153645. static PyObject *__Pyx_Coroutine_await_method(PyObject *coroutine, CYTHON_UNUSED PyObject *arg) {
  153646. return __Pyx__Coroutine_await(coroutine);
  153647. }
  153648. #endif
  153649. #if defined(__Pyx_IterableCoroutine_USED) || CYTHON_USE_ASYNC_SLOTS
  153650. static PyObject *__Pyx_Coroutine_await(PyObject *coroutine) {
  153651. if (unlikely(!coroutine || !__Pyx_Coroutine_Check(coroutine))) {
  153652. PyErr_SetString(PyExc_TypeError, "invalid input, expected coroutine");
  153653. return NULL;
  153654. }
  153655. return __Pyx__Coroutine_await(coroutine);
  153656. }
  153657. #endif
  153658. static PyObject *
  153659. __Pyx_Coroutine_get_frame(CYTHON_UNUSED __pyx_CoroutineObject *self, CYTHON_UNUSED void *context)
  153660. {
  153661. Py_RETURN_NONE;
  153662. }
  153663. #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 && PY_VERSION_HEX < 0x030500B1
  153664. static PyObject *__Pyx_Coroutine_compare(PyObject *obj, PyObject *other, int op) {
  153665. PyObject* result;
  153666. switch (op) {
  153667. case Py_EQ: result = (other == obj) ? Py_True : Py_False; break;
  153668. case Py_NE: result = (other != obj) ? Py_True : Py_False; break;
  153669. default:
  153670. result = Py_NotImplemented;
  153671. }
  153672. Py_INCREF(result);
  153673. return result;
  153674. }
  153675. #endif
  153676. static PyMethodDef __pyx_Coroutine_methods[] = {
  153677. {"send", (PyCFunction) __Pyx_Coroutine_Send, METH_O,
  153678. (char*) PyDoc_STR("send(arg) -> send 'arg' into coroutine,\nreturn next iterated value or raise StopIteration.")},
  153679. {"throw", (PyCFunction) __Pyx_Coroutine_Throw, METH_VARARGS,
  153680. (char*) PyDoc_STR("throw(typ[,val[,tb]]) -> raise exception in coroutine,\nreturn next iterated value or raise StopIteration.")},
  153681. {"close", (PyCFunction) __Pyx_Coroutine_Close_Method, METH_NOARGS,
  153682. (char*) PyDoc_STR("close() -> raise GeneratorExit inside coroutine.")},
  153683. #if PY_VERSION_HEX < 0x030500B1
  153684. {"__await__", (PyCFunction) __Pyx_Coroutine_await_method, METH_NOARGS,
  153685. (char*) PyDoc_STR("__await__() -> return an iterator to be used in await expression.")},
  153686. #endif
  153687. {0, 0, 0, 0}
  153688. };
  153689. static PyMemberDef __pyx_Coroutine_memberlist[] = {
  153690. {(char *) "cr_running", T_BOOL, offsetof(__pyx_CoroutineObject, is_running), READONLY, NULL},
  153691. {(char*) "cr_await", T_OBJECT, offsetof(__pyx_CoroutineObject, yieldfrom), READONLY,
  153692. (char*) PyDoc_STR("object being awaited, or None")},
  153693. {(char*) "cr_code", T_OBJECT, offsetof(__pyx_CoroutineObject, gi_code), READONLY, NULL},
  153694. {(char *) "__module__", T_OBJECT, offsetof(__pyx_CoroutineObject, gi_modulename), PY_WRITE_RESTRICTED, 0},
  153695. {0, 0, 0, 0, 0}
  153696. };
  153697. static PyGetSetDef __pyx_Coroutine_getsets[] = {
  153698. {(char *) "__name__", (getter)__Pyx_Coroutine_get_name, (setter)__Pyx_Coroutine_set_name,
  153699. (char*) PyDoc_STR("name of the coroutine"), 0},
  153700. {(char *) "__qualname__", (getter)__Pyx_Coroutine_get_qualname, (setter)__Pyx_Coroutine_set_qualname,
  153701. (char*) PyDoc_STR("qualified name of the coroutine"), 0},
  153702. {(char *) "cr_frame", (getter)__Pyx_Coroutine_get_frame, NULL,
  153703. (char*) PyDoc_STR("Frame of the coroutine"), 0},
  153704. {0, 0, 0, 0, 0}
  153705. };
  153706. #if CYTHON_USE_ASYNC_SLOTS
  153707. static __Pyx_PyAsyncMethodsStruct __pyx_Coroutine_as_async = {
  153708. __Pyx_Coroutine_await,
  153709. 0,
  153710. 0,
  153711. };
  153712. #endif
  153713. static PyTypeObject __pyx_CoroutineType_type = {
  153714. PyVarObject_HEAD_INIT(0, 0)
  153715. "coroutine",
  153716. sizeof(__pyx_CoroutineObject),
  153717. 0,
  153718. (destructor) __Pyx_Coroutine_dealloc,
  153719. 0,
  153720. 0,
  153721. 0,
  153722. #if CYTHON_USE_ASYNC_SLOTS
  153723. &__pyx_Coroutine_as_async,
  153724. #else
  153725. 0,
  153726. #endif
  153727. 0,
  153728. 0,
  153729. 0,
  153730. 0,
  153731. 0,
  153732. 0,
  153733. 0,
  153734. 0,
  153735. 0,
  153736. 0,
  153737. Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE,
  153738. 0,
  153739. (traverseproc) __Pyx_Coroutine_traverse,
  153740. 0,
  153741. #if CYTHON_USE_ASYNC_SLOTS && CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 && PY_VERSION_HEX < 0x030500B1
  153742. __Pyx_Coroutine_compare,
  153743. #else
  153744. 0,
  153745. #endif
  153746. offsetof(__pyx_CoroutineObject, gi_weakreflist),
  153747. 0,
  153748. 0,
  153749. __pyx_Coroutine_methods,
  153750. __pyx_Coroutine_memberlist,
  153751. __pyx_Coroutine_getsets,
  153752. 0,
  153753. 0,
  153754. 0,
  153755. 0,
  153756. 0,
  153757. 0,
  153758. 0,
  153759. 0,
  153760. 0,
  153761. 0,
  153762. 0,
  153763. 0,
  153764. 0,
  153765. 0,
  153766. 0,
  153767. #if CYTHON_USE_TP_FINALIZE
  153768. 0,
  153769. #else
  153770. __Pyx_Coroutine_del,
  153771. #endif
  153772. 0,
  153773. #if CYTHON_USE_TP_FINALIZE
  153774. __Pyx_Coroutine_del,
  153775. #elif PY_VERSION_HEX >= 0x030400a1
  153776. 0,
  153777. #endif
  153778. #if PY_VERSION_HEX >= 0x030800b1
  153779. 0,
  153780. #endif
  153781. };
  153782. static int __pyx_Coroutine_init(void) {
  153783. __pyx_CoroutineType_type.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  153784. __pyx_CoroutineType = __Pyx_FetchCommonType(&__pyx_CoroutineType_type);
  153785. if (unlikely(!__pyx_CoroutineType))
  153786. return -1;
  153787. #ifdef __Pyx_IterableCoroutine_USED
  153788. if (unlikely(__pyx_IterableCoroutine_init() == -1))
  153789. return -1;
  153790. #endif
  153791. __pyx_CoroutineAwaitType = __Pyx_FetchCommonType(&__pyx_CoroutineAwaitType_type);
  153792. if (unlikely(!__pyx_CoroutineAwaitType))
  153793. return -1;
  153794. return 0;
  153795. }
  153796. /* GetAwaitIter */
  153797. static CYTHON_INLINE PyObject *__Pyx_Coroutine_GetAwaitableIter(PyObject *o) {
  153798. #ifdef __Pyx_Coroutine_USED
  153799. if (__Pyx_Coroutine_Check(o)) {
  153800. return __Pyx_NewRef(o);
  153801. }
  153802. #endif
  153803. return __Pyx__Coroutine_GetAwaitableIter(o);
  153804. }
  153805. static void __Pyx_Coroutine_AwaitableIterError(PyObject *source) {
  153806. #if PY_VERSION_HEX >= 0x030600B3 || defined(_PyErr_FormatFromCause)
  153807. _PyErr_FormatFromCause(
  153808. PyExc_TypeError,
  153809. "'async for' received an invalid object "
  153810. "from __anext__: %.100s",
  153811. Py_TYPE(source)->tp_name);
  153812. #elif PY_MAJOR_VERSION >= 3
  153813. PyObject *exc, *val, *val2, *tb;
  153814. assert(PyErr_Occurred());
  153815. PyErr_Fetch(&exc, &val, &tb);
  153816. PyErr_NormalizeException(&exc, &val, &tb);
  153817. if (tb != NULL) {
  153818. PyException_SetTraceback(val, tb);
  153819. Py_DECREF(tb);
  153820. }
  153821. Py_DECREF(exc);
  153822. assert(!PyErr_Occurred());
  153823. PyErr_Format(
  153824. PyExc_TypeError,
  153825. "'async for' received an invalid object "
  153826. "from __anext__: %.100s",
  153827. Py_TYPE(source)->tp_name);
  153828. PyErr_Fetch(&exc, &val2, &tb);
  153829. PyErr_NormalizeException(&exc, &val2, &tb);
  153830. Py_INCREF(val);
  153831. PyException_SetCause(val2, val);
  153832. PyException_SetContext(val2, val);
  153833. PyErr_Restore(exc, val2, tb);
  153834. #else
  153835. source++;
  153836. #endif
  153837. }
  153838. static PyObject *__Pyx__Coroutine_GetAwaitableIter(PyObject *obj) {
  153839. PyObject *res;
  153840. #if CYTHON_USE_ASYNC_SLOTS
  153841. __Pyx_PyAsyncMethodsStruct* am = __Pyx_PyType_AsAsync(obj);
  153842. if (likely(am && am->am_await)) {
  153843. res = (*am->am_await)(obj);
  153844. } else
  153845. #endif
  153846. #if PY_VERSION_HEX >= 0x030500B2 || defined(PyCoro_CheckExact)
  153847. if (PyCoro_CheckExact(obj)) {
  153848. return __Pyx_NewRef(obj);
  153849. } else
  153850. #endif
  153851. #if CYTHON_COMPILING_IN_CPYTHON && defined(CO_ITERABLE_COROUTINE)
  153852. if (PyGen_CheckExact(obj) && ((PyGenObject*)obj)->gi_code && ((PyCodeObject *)((PyGenObject*)obj)->gi_code)->co_flags & CO_ITERABLE_COROUTINE) {
  153853. return __Pyx_NewRef(obj);
  153854. } else
  153855. #endif
  153856. {
  153857. PyObject *method = NULL;
  153858. int is_method = __Pyx_PyObject_GetMethod(obj, __pyx_n_s_await, &method);
  153859. if (likely(is_method)) {
  153860. res = __Pyx_PyObject_CallOneArg(method, obj);
  153861. } else if (likely(method)) {
  153862. res = __Pyx_PyObject_CallNoArg(method);
  153863. } else
  153864. goto slot_error;
  153865. Py_DECREF(method);
  153866. }
  153867. if (unlikely(!res)) {
  153868. __Pyx_Coroutine_AwaitableIterError(obj);
  153869. goto bad;
  153870. }
  153871. if (unlikely(!PyIter_Check(res))) {
  153872. PyErr_Format(PyExc_TypeError,
  153873. "__await__() returned non-iterator of type '%.100s'",
  153874. Py_TYPE(res)->tp_name);
  153875. Py_CLEAR(res);
  153876. } else {
  153877. int is_coroutine = 0;
  153878. #ifdef __Pyx_Coroutine_USED
  153879. is_coroutine |= __Pyx_Coroutine_Check(res);
  153880. #endif
  153881. #if PY_VERSION_HEX >= 0x030500B2 || defined(PyCoro_CheckExact)
  153882. is_coroutine |= PyCoro_CheckExact(res);
  153883. #endif
  153884. if (unlikely(is_coroutine)) {
  153885. /* __await__ must return an *iterator*, not
  153886. a coroutine or another awaitable (see PEP 492) */
  153887. PyErr_SetString(PyExc_TypeError,
  153888. "__await__() returned a coroutine");
  153889. Py_CLEAR(res);
  153890. }
  153891. }
  153892. return res;
  153893. slot_error:
  153894. PyErr_Format(PyExc_TypeError,
  153895. "object %.100s can't be used in 'await' expression",
  153896. Py_TYPE(obj)->tp_name);
  153897. bad:
  153898. return NULL;
  153899. }
  153900. /* CoroutineYieldFrom */
  153901. static PyObject* __Pyx__Coroutine_Yield_From_Generic(__pyx_CoroutineObject *gen, PyObject *source) {
  153902. PyObject *retval;
  153903. PyObject *source_gen = __Pyx__Coroutine_GetAwaitableIter(source);
  153904. if (unlikely(!source_gen)) {
  153905. return NULL;
  153906. }
  153907. if (__Pyx_Coroutine_Check(source_gen)) {
  153908. retval = __Pyx_Generator_Next(source_gen);
  153909. } else {
  153910. #if CYTHON_USE_TYPE_SLOTS
  153911. retval = Py_TYPE(source_gen)->tp_iternext(source_gen);
  153912. #else
  153913. retval = PyIter_Next(source_gen);
  153914. #endif
  153915. }
  153916. if (retval) {
  153917. gen->yieldfrom = source_gen;
  153918. return retval;
  153919. }
  153920. Py_DECREF(source_gen);
  153921. return NULL;
  153922. }
  153923. static CYTHON_INLINE PyObject* __Pyx_Coroutine_Yield_From(__pyx_CoroutineObject *gen, PyObject *source) {
  153924. PyObject *retval;
  153925. if (__Pyx_Coroutine_Check(source)) {
  153926. if (unlikely(((__pyx_CoroutineObject*)source)->yieldfrom)) {
  153927. PyErr_SetString(
  153928. PyExc_RuntimeError,
  153929. "coroutine is being awaited already");
  153930. return NULL;
  153931. }
  153932. retval = __Pyx_Generator_Next(source);
  153933. #ifdef __Pyx_AsyncGen_USED
  153934. } else if (__pyx_PyAsyncGenASend_CheckExact(source)) {
  153935. retval = __Pyx_async_gen_asend_iternext(source);
  153936. #endif
  153937. } else {
  153938. return __Pyx__Coroutine_Yield_From_Generic(gen, source);
  153939. }
  153940. if (retval) {
  153941. Py_INCREF(source);
  153942. gen->yieldfrom = source;
  153943. }
  153944. return retval;
  153945. }
  153946. /* ReturnWithStopIteration */
  153947. static void __Pyx__ReturnWithStopIteration(PyObject* value) {
  153948. PyObject *exc, *args;
  153949. #if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_PYSTON
  153950. __Pyx_PyThreadState_declare
  153951. if ((PY_VERSION_HEX >= 0x03030000 && PY_VERSION_HEX < 0x030500B1)
  153952. || unlikely(PyTuple_Check(value) || PyExceptionInstance_Check(value))) {
  153953. args = PyTuple_New(1);
  153954. if (unlikely(!args)) return;
  153955. Py_INCREF(value);
  153956. PyTuple_SET_ITEM(args, 0, value);
  153957. exc = PyType_Type.tp_call(PyExc_StopIteration, args, NULL);
  153958. Py_DECREF(args);
  153959. if (!exc) return;
  153960. } else {
  153961. Py_INCREF(value);
  153962. exc = value;
  153963. }
  153964. #if CYTHON_FAST_THREAD_STATE
  153965. __Pyx_PyThreadState_assign
  153966. #if CYTHON_USE_EXC_INFO_STACK
  153967. if (!__pyx_tstate->exc_info->exc_type)
  153968. #else
  153969. if (!__pyx_tstate->exc_type)
  153970. #endif
  153971. {
  153972. Py_INCREF(PyExc_StopIteration);
  153973. __Pyx_ErrRestore(PyExc_StopIteration, exc, NULL);
  153974. return;
  153975. }
  153976. #endif
  153977. #else
  153978. args = PyTuple_Pack(1, value);
  153979. if (unlikely(!args)) return;
  153980. exc = PyObject_Call(PyExc_StopIteration, args, NULL);
  153981. Py_DECREF(args);
  153982. if (unlikely(!exc)) return;
  153983. #endif
  153984. PyErr_SetObject(PyExc_StopIteration, exc);
  153985. Py_DECREF(exc);
  153986. }
  153987. /* BytesEquals */
  153988. static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
  153989. #if CYTHON_COMPILING_IN_PYPY
  153990. return PyObject_RichCompareBool(s1, s2, equals);
  153991. #else
  153992. if (s1 == s2) {
  153993. return (equals == Py_EQ);
  153994. } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
  153995. const char *ps1, *ps2;
  153996. Py_ssize_t length = PyBytes_GET_SIZE(s1);
  153997. if (length != PyBytes_GET_SIZE(s2))
  153998. return (equals == Py_NE);
  153999. ps1 = PyBytes_AS_STRING(s1);
  154000. ps2 = PyBytes_AS_STRING(s2);
  154001. if (ps1[0] != ps2[0]) {
  154002. return (equals == Py_NE);
  154003. } else if (length == 1) {
  154004. return (equals == Py_EQ);
  154005. } else {
  154006. int result;
  154007. #if CYTHON_USE_UNICODE_INTERNALS
  154008. Py_hash_t hash1, hash2;
  154009. hash1 = ((PyBytesObject*)s1)->ob_shash;
  154010. hash2 = ((PyBytesObject*)s2)->ob_shash;
  154011. if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
  154012. return (equals == Py_NE);
  154013. }
  154014. #endif
  154015. result = memcmp(ps1, ps2, (size_t)length);
  154016. return (equals == Py_EQ) ? (result == 0) : (result != 0);
  154017. }
  154018. } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
  154019. return (equals == Py_NE);
  154020. } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
  154021. return (equals == Py_NE);
  154022. } else {
  154023. int result;
  154024. PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
  154025. if (!py_result)
  154026. return -1;
  154027. result = __Pyx_PyObject_IsTrue(py_result);
  154028. Py_DECREF(py_result);
  154029. return result;
  154030. }
  154031. #endif
  154032. }
  154033. /* UnicodeEquals */
  154034. static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
  154035. #if CYTHON_COMPILING_IN_PYPY
  154036. return PyObject_RichCompareBool(s1, s2, equals);
  154037. #else
  154038. #if PY_MAJOR_VERSION < 3
  154039. PyObject* owned_ref = NULL;
  154040. #endif
  154041. int s1_is_unicode, s2_is_unicode;
  154042. if (s1 == s2) {
  154043. goto return_eq;
  154044. }
  154045. s1_is_unicode = PyUnicode_CheckExact(s1);
  154046. s2_is_unicode = PyUnicode_CheckExact(s2);
  154047. #if PY_MAJOR_VERSION < 3
  154048. if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {
  154049. owned_ref = PyUnicode_FromObject(s2);
  154050. if (unlikely(!owned_ref))
  154051. return -1;
  154052. s2 = owned_ref;
  154053. s2_is_unicode = 1;
  154054. } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {
  154055. owned_ref = PyUnicode_FromObject(s1);
  154056. if (unlikely(!owned_ref))
  154057. return -1;
  154058. s1 = owned_ref;
  154059. s1_is_unicode = 1;
  154060. } else if (((!s2_is_unicode) & (!s1_is_unicode))) {
  154061. return __Pyx_PyBytes_Equals(s1, s2, equals);
  154062. }
  154063. #endif
  154064. if (s1_is_unicode & s2_is_unicode) {
  154065. Py_ssize_t length;
  154066. int kind;
  154067. void *data1, *data2;
  154068. if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
  154069. return -1;
  154070. length = __Pyx_PyUnicode_GET_LENGTH(s1);
  154071. if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {
  154072. goto return_ne;
  154073. }
  154074. #if CYTHON_USE_UNICODE_INTERNALS
  154075. {
  154076. Py_hash_t hash1, hash2;
  154077. #if CYTHON_PEP393_ENABLED
  154078. hash1 = ((PyASCIIObject*)s1)->hash;
  154079. hash2 = ((PyASCIIObject*)s2)->hash;
  154080. #else
  154081. hash1 = ((PyUnicodeObject*)s1)->hash;
  154082. hash2 = ((PyUnicodeObject*)s2)->hash;
  154083. #endif
  154084. if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
  154085. goto return_ne;
  154086. }
  154087. }
  154088. #endif
  154089. kind = __Pyx_PyUnicode_KIND(s1);
  154090. if (kind != __Pyx_PyUnicode_KIND(s2)) {
  154091. goto return_ne;
  154092. }
  154093. data1 = __Pyx_PyUnicode_DATA(s1);
  154094. data2 = __Pyx_PyUnicode_DATA(s2);
  154095. if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
  154096. goto return_ne;
  154097. } else if (length == 1) {
  154098. goto return_eq;
  154099. } else {
  154100. int result = memcmp(data1, data2, (size_t)(length * kind));
  154101. #if PY_MAJOR_VERSION < 3
  154102. Py_XDECREF(owned_ref);
  154103. #endif
  154104. return (equals == Py_EQ) ? (result == 0) : (result != 0);
  154105. }
  154106. } else if ((s1 == Py_None) & s2_is_unicode) {
  154107. goto return_ne;
  154108. } else if ((s2 == Py_None) & s1_is_unicode) {
  154109. goto return_ne;
  154110. } else {
  154111. int result;
  154112. PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
  154113. #if PY_MAJOR_VERSION < 3
  154114. Py_XDECREF(owned_ref);
  154115. #endif
  154116. if (!py_result)
  154117. return -1;
  154118. result = __Pyx_PyObject_IsTrue(py_result);
  154119. Py_DECREF(py_result);
  154120. return result;
  154121. }
  154122. return_eq:
  154123. #if PY_MAJOR_VERSION < 3
  154124. Py_XDECREF(owned_ref);
  154125. #endif
  154126. return (equals == Py_EQ);
  154127. return_ne:
  154128. #if PY_MAJOR_VERSION < 3
  154129. Py_XDECREF(owned_ref);
  154130. #endif
  154131. return (equals == Py_NE);
  154132. #endif
  154133. }
  154134. /* CallUnboundCMethod0 */
  154135. static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) {
  154136. PyObject *args, *result = NULL;
  154137. if (unlikely(!cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
  154138. #if CYTHON_ASSUME_SAFE_MACROS
  154139. args = PyTuple_New(1);
  154140. if (unlikely(!args)) goto bad;
  154141. Py_INCREF(self);
  154142. PyTuple_SET_ITEM(args, 0, self);
  154143. #else
  154144. args = PyTuple_Pack(1, self);
  154145. if (unlikely(!args)) goto bad;
  154146. #endif
  154147. result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
  154148. Py_DECREF(args);
  154149. bad:
  154150. return result;
  154151. }
  154152. /* SetItemInt */
  154153. static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) {
  154154. int r;
  154155. if (!j) return -1;
  154156. r = PyObject_SetItem(o, j, v);
  154157. Py_DECREF(j);
  154158. return r;
  154159. }
  154160. static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int is_list,
  154161. CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) {
  154162. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
  154163. if (is_list || PyList_CheckExact(o)) {
  154164. Py_ssize_t n = (!wraparound) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o));
  154165. if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o)))) {
  154166. PyObject* old = PyList_GET_ITEM(o, n);
  154167. Py_INCREF(v);
  154168. PyList_SET_ITEM(o, n, v);
  154169. Py_DECREF(old);
  154170. return 1;
  154171. }
  154172. } else {
  154173. PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
  154174. if (likely(m && m->sq_ass_item)) {
  154175. if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
  154176. Py_ssize_t l = m->sq_length(o);
  154177. if (likely(l >= 0)) {
  154178. i += l;
  154179. } else {
  154180. if (!PyErr_ExceptionMatches(PyExc_OverflowError))
  154181. return -1;
  154182. PyErr_Clear();
  154183. }
  154184. }
  154185. return m->sq_ass_item(o, i, v);
  154186. }
  154187. }
  154188. #else
  154189. #if CYTHON_COMPILING_IN_PYPY
  154190. if (is_list || (PySequence_Check(o) && !PyDict_Check(o)))
  154191. #else
  154192. if (is_list || PySequence_Check(o))
  154193. #endif
  154194. {
  154195. return PySequence_SetItem(o, i, v);
  154196. }
  154197. #endif
  154198. return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v);
  154199. }
  154200. /* MergeKeywords */
  154201. static int __Pyx_MergeKeywords(PyObject *kwdict, PyObject *source_mapping) {
  154202. PyObject *iter, *key = NULL, *value = NULL;
  154203. int source_is_dict, result;
  154204. Py_ssize_t orig_length, ppos = 0;
  154205. iter = __Pyx_dict_iterator(source_mapping, 0, __pyx_n_s_items, &orig_length, &source_is_dict);
  154206. if (unlikely(!iter)) {
  154207. PyObject *args;
  154208. if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
  154209. PyErr_Clear();
  154210. args = PyTuple_Pack(1, source_mapping);
  154211. if (likely(args)) {
  154212. PyObject *fallback = PyObject_Call((PyObject*)&PyDict_Type, args, NULL);
  154213. Py_DECREF(args);
  154214. if (likely(fallback)) {
  154215. iter = __Pyx_dict_iterator(fallback, 1, __pyx_n_s_items, &orig_length, &source_is_dict);
  154216. Py_DECREF(fallback);
  154217. }
  154218. }
  154219. if (unlikely(!iter)) goto bad;
  154220. }
  154221. while (1) {
  154222. result = __Pyx_dict_iter_next(iter, orig_length, &ppos, &key, &value, NULL, source_is_dict);
  154223. if (unlikely(result < 0)) goto bad;
  154224. if (!result) break;
  154225. if (unlikely(PyDict_Contains(kwdict, key))) {
  154226. __Pyx_RaiseDoubleKeywordsError("function", key);
  154227. result = -1;
  154228. } else {
  154229. result = PyDict_SetItem(kwdict, key, value);
  154230. }
  154231. Py_DECREF(key);
  154232. Py_DECREF(value);
  154233. if (unlikely(result < 0)) goto bad;
  154234. }
  154235. Py_XDECREF(iter);
  154236. return 0;
  154237. bad:
  154238. Py_XDECREF(iter);
  154239. return -1;
  154240. }
  154241. /* GetAttr3 */
  154242. static PyObject *__Pyx_GetAttr3Default(PyObject *d) {
  154243. __Pyx_PyThreadState_declare
  154244. __Pyx_PyThreadState_assign
  154245. if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
  154246. return NULL;
  154247. __Pyx_PyErr_Clear();
  154248. Py_INCREF(d);
  154249. return d;
  154250. }
  154251. static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) {
  154252. PyObject *r = __Pyx_GetAttr(o, n);
  154253. return (likely(r)) ? r : __Pyx_GetAttr3Default(d);
  154254. }
  154255. /* ArgTypeTest */
  154256. static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact)
  154257. {
  154258. if (unlikely(!type)) {
  154259. PyErr_SetString(PyExc_SystemError, "Missing type object");
  154260. return 0;
  154261. }
  154262. else if (exact) {
  154263. #if PY_MAJOR_VERSION == 2
  154264. if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;
  154265. #endif
  154266. }
  154267. else {
  154268. if (likely(__Pyx_TypeCheck(obj, type))) return 1;
  154269. }
  154270. PyErr_Format(PyExc_TypeError,
  154271. "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)",
  154272. name, type->tp_name, Py_TYPE(obj)->tp_name);
  154273. return 0;
  154274. }
  154275. /* py_set_remove */
  154276. static int __Pyx_PySet_RemoveNotFound(PyObject *set, PyObject *key, int found) {
  154277. if (unlikely(found < 0)) {
  154278. found = __Pyx_PySet_DiscardUnhashable(set, key);
  154279. }
  154280. if (likely(found == 0)) {
  154281. PyObject *tup;
  154282. tup = PyTuple_Pack(1, key);
  154283. if (!tup)
  154284. return -1;
  154285. PyErr_SetObject(PyExc_KeyError, tup);
  154286. Py_DECREF(tup);
  154287. return -1;
  154288. }
  154289. return found;
  154290. }
  154291. static CYTHON_INLINE int __Pyx_PySet_Remove(PyObject *set, PyObject *key) {
  154292. int found = PySet_Discard(set, key);
  154293. if (unlikely(found != 1)) {
  154294. return __Pyx_PySet_RemoveNotFound(set, key, found);
  154295. }
  154296. return 0;
  154297. }
  154298. /* PyIntCompare */
  154299. static CYTHON_INLINE PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED long inplace) {
  154300. if (op1 == op2) {
  154301. Py_RETURN_TRUE;
  154302. }
  154303. #if PY_MAJOR_VERSION < 3
  154304. if (likely(PyInt_CheckExact(op1))) {
  154305. const long b = intval;
  154306. long a = PyInt_AS_LONG(op1);
  154307. if (a == b) Py_RETURN_TRUE; else Py_RETURN_FALSE;
  154308. }
  154309. #endif
  154310. #if CYTHON_USE_PYLONG_INTERNALS
  154311. if (likely(PyLong_CheckExact(op1))) {
  154312. int unequal;
  154313. unsigned long uintval;
  154314. Py_ssize_t size = Py_SIZE(op1);
  154315. const digit* digits = ((PyLongObject*)op1)->ob_digit;
  154316. if (intval == 0) {
  154317. if (size == 0) Py_RETURN_TRUE; else Py_RETURN_FALSE;
  154318. } else if (intval < 0) {
  154319. if (size >= 0)
  154320. Py_RETURN_FALSE;
  154321. intval = -intval;
  154322. size = -size;
  154323. } else {
  154324. if (size <= 0)
  154325. Py_RETURN_FALSE;
  154326. }
  154327. uintval = (unsigned long) intval;
  154328. #if PyLong_SHIFT * 4 < SIZEOF_LONG*8
  154329. if (uintval >> (PyLong_SHIFT * 4)) {
  154330. unequal = (size != 5) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
  154331. | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[4] != ((uintval >> (4 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
  154332. } else
  154333. #endif
  154334. #if PyLong_SHIFT * 3 < SIZEOF_LONG*8
  154335. if (uintval >> (PyLong_SHIFT * 3)) {
  154336. unequal = (size != 4) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
  154337. | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
  154338. } else
  154339. #endif
  154340. #if PyLong_SHIFT * 2 < SIZEOF_LONG*8
  154341. if (uintval >> (PyLong_SHIFT * 2)) {
  154342. unequal = (size != 3) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
  154343. | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
  154344. } else
  154345. #endif
  154346. #if PyLong_SHIFT * 1 < SIZEOF_LONG*8
  154347. if (uintval >> (PyLong_SHIFT * 1)) {
  154348. unequal = (size != 2) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
  154349. | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
  154350. } else
  154351. #endif
  154352. unequal = (size != 1) || (((unsigned long) digits[0]) != (uintval & (unsigned long) PyLong_MASK));
  154353. if (unequal == 0) Py_RETURN_TRUE; else Py_RETURN_FALSE;
  154354. }
  154355. #endif
  154356. if (PyFloat_CheckExact(op1)) {
  154357. const long b = intval;
  154358. double a = PyFloat_AS_DOUBLE(op1);
  154359. if ((double)a == (double)b) Py_RETURN_TRUE; else Py_RETURN_FALSE;
  154360. }
  154361. return (
  154362. PyObject_RichCompare(op1, op2, Py_EQ));
  154363. }
  154364. /* RaiseKeywordRequired */
  154365. static void __Pyx_RaiseKeywordRequired(const char* func_name, PyObject* kw_name) {
  154366. PyErr_Format(PyExc_TypeError,
  154367. #if PY_MAJOR_VERSION >= 3
  154368. "%s() needs keyword-only argument %U", func_name, kw_name);
  154369. #else
  154370. "%s() needs keyword-only argument %s", func_name,
  154371. PyString_AS_STRING(kw_name));
  154372. #endif
  154373. }
  154374. /* CIntToDigits */
  154375. static const char DIGIT_PAIRS_10[2*10*10+1] = {
  154376. "00010203040506070809"
  154377. "10111213141516171819"
  154378. "20212223242526272829"
  154379. "30313233343536373839"
  154380. "40414243444546474849"
  154381. "50515253545556575859"
  154382. "60616263646566676869"
  154383. "70717273747576777879"
  154384. "80818283848586878889"
  154385. "90919293949596979899"
  154386. };
  154387. static const char DIGIT_PAIRS_8[2*8*8+1] = {
  154388. "0001020304050607"
  154389. "1011121314151617"
  154390. "2021222324252627"
  154391. "3031323334353637"
  154392. "4041424344454647"
  154393. "5051525354555657"
  154394. "6061626364656667"
  154395. "7071727374757677"
  154396. };
  154397. static const char DIGITS_HEX[2*16+1] = {
  154398. "0123456789abcdef"
  154399. "0123456789ABCDEF"
  154400. };
  154401. /* BuildPyUnicode */
  154402. static PyObject* __Pyx_PyUnicode_BuildFromAscii(Py_ssize_t ulength, char* chars, int clength,
  154403. int prepend_sign, char padding_char) {
  154404. PyObject *uval;
  154405. Py_ssize_t uoffset = ulength - clength;
  154406. #if CYTHON_USE_UNICODE_INTERNALS
  154407. Py_ssize_t i;
  154408. #if CYTHON_PEP393_ENABLED
  154409. void *udata;
  154410. uval = PyUnicode_New(ulength, 127);
  154411. if (unlikely(!uval)) return NULL;
  154412. udata = PyUnicode_DATA(uval);
  154413. #else
  154414. Py_UNICODE *udata;
  154415. uval = PyUnicode_FromUnicode(NULL, ulength);
  154416. if (unlikely(!uval)) return NULL;
  154417. udata = PyUnicode_AS_UNICODE(uval);
  154418. #endif
  154419. if (uoffset > 0) {
  154420. i = 0;
  154421. if (prepend_sign) {
  154422. __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, 0, '-');
  154423. i++;
  154424. }
  154425. for (; i < uoffset; i++) {
  154426. __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, i, padding_char);
  154427. }
  154428. }
  154429. for (i=0; i < clength; i++) {
  154430. __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, uoffset+i, chars[i]);
  154431. }
  154432. #else
  154433. {
  154434. PyObject *sign = NULL, *padding = NULL;
  154435. uval = NULL;
  154436. if (uoffset > 0) {
  154437. prepend_sign = !!prepend_sign;
  154438. if (uoffset > prepend_sign) {
  154439. padding = PyUnicode_FromOrdinal(padding_char);
  154440. if (likely(padding) && uoffset > prepend_sign + 1) {
  154441. PyObject *tmp;
  154442. PyObject *repeat = PyInt_FromSize_t(uoffset - prepend_sign);
  154443. if (unlikely(!repeat)) goto done_or_error;
  154444. tmp = PyNumber_Multiply(padding, repeat);
  154445. Py_DECREF(repeat);
  154446. Py_DECREF(padding);
  154447. padding = tmp;
  154448. }
  154449. if (unlikely(!padding)) goto done_or_error;
  154450. }
  154451. if (prepend_sign) {
  154452. sign = PyUnicode_FromOrdinal('-');
  154453. if (unlikely(!sign)) goto done_or_error;
  154454. }
  154455. }
  154456. uval = PyUnicode_DecodeASCII(chars, clength, NULL);
  154457. if (likely(uval) && padding) {
  154458. PyObject *tmp = PyNumber_Add(padding, uval);
  154459. Py_DECREF(uval);
  154460. uval = tmp;
  154461. }
  154462. if (likely(uval) && sign) {
  154463. PyObject *tmp = PyNumber_Add(sign, uval);
  154464. Py_DECREF(uval);
  154465. uval = tmp;
  154466. }
  154467. done_or_error:
  154468. Py_XDECREF(padding);
  154469. Py_XDECREF(sign);
  154470. }
  154471. #endif
  154472. return uval;
  154473. }
  154474. /* CIntToPyUnicode */
  154475. #ifdef _MSC_VER
  154476. #ifndef _MSC_STDINT_H_
  154477. #if _MSC_VER < 1300
  154478. typedef unsigned short uint16_t;
  154479. #else
  154480. typedef unsigned __int16 uint16_t;
  154481. #endif
  154482. #endif
  154483. #else
  154484. #include <stdint.h>
  154485. #endif
  154486. #if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
  154487. #define GCC_DIAGNOSTIC
  154488. #endif
  154489. static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_Py_ssize_t(Py_ssize_t value, Py_ssize_t width, char padding_char, char format_char) {
  154490. char digits[sizeof(Py_ssize_t)*3+2];
  154491. char *dpos, *end = digits + sizeof(Py_ssize_t)*3+2;
  154492. const char *hex_digits = DIGITS_HEX;
  154493. Py_ssize_t length, ulength;
  154494. int prepend_sign, last_one_off;
  154495. Py_ssize_t remaining;
  154496. #ifdef GCC_DIAGNOSTIC
  154497. #pragma GCC diagnostic push
  154498. #pragma GCC diagnostic ignored "-Wconversion"
  154499. #endif
  154500. const Py_ssize_t neg_one = (Py_ssize_t) -1, const_zero = (Py_ssize_t) 0;
  154501. #ifdef GCC_DIAGNOSTIC
  154502. #pragma GCC diagnostic pop
  154503. #endif
  154504. const int is_unsigned = neg_one > const_zero;
  154505. if (format_char == 'X') {
  154506. hex_digits += 16;
  154507. format_char = 'x';
  154508. }
  154509. remaining = value;
  154510. last_one_off = 0;
  154511. dpos = end;
  154512. do {
  154513. int digit_pos;
  154514. switch (format_char) {
  154515. case 'o':
  154516. digit_pos = abs((int)(remaining % (8*8)));
  154517. remaining = (Py_ssize_t) (remaining / (8*8));
  154518. dpos -= 2;
  154519. *(uint16_t*)dpos = ((const uint16_t*)DIGIT_PAIRS_8)[digit_pos];
  154520. last_one_off = (digit_pos < 8);
  154521. break;
  154522. case 'd':
  154523. digit_pos = abs((int)(remaining % (10*10)));
  154524. remaining = (Py_ssize_t) (remaining / (10*10));
  154525. dpos -= 2;
  154526. *(uint16_t*)dpos = ((const uint16_t*)DIGIT_PAIRS_10)[digit_pos];
  154527. last_one_off = (digit_pos < 10);
  154528. break;
  154529. case 'x':
  154530. *(--dpos) = hex_digits[abs((int)(remaining % 16))];
  154531. remaining = (Py_ssize_t) (remaining / 16);
  154532. break;
  154533. default:
  154534. assert(0);
  154535. break;
  154536. }
  154537. } while (unlikely(remaining != 0));
  154538. if (last_one_off) {
  154539. assert(*dpos == '0');
  154540. dpos++;
  154541. }
  154542. length = end - dpos;
  154543. ulength = length;
  154544. prepend_sign = 0;
  154545. if (!is_unsigned && value <= neg_one) {
  154546. if (padding_char == ' ' || width <= length + 1) {
  154547. *(--dpos) = '-';
  154548. ++length;
  154549. } else {
  154550. prepend_sign = 1;
  154551. }
  154552. ++ulength;
  154553. }
  154554. if (width > ulength) {
  154555. ulength = width;
  154556. }
  154557. if (ulength == 1) {
  154558. return PyUnicode_FromOrdinal(*dpos);
  154559. }
  154560. return __Pyx_PyUnicode_BuildFromAscii(ulength, dpos, (int) length, prepend_sign, padding_char);
  154561. }
  154562. /* CIntToPyUnicode */
  154563. #ifdef _MSC_VER
  154564. #ifndef _MSC_STDINT_H_
  154565. #if _MSC_VER < 1300
  154566. typedef unsigned short uint16_t;
  154567. #else
  154568. typedef unsigned __int16 uint16_t;
  154569. #endif
  154570. #endif
  154571. #else
  154572. #include <stdint.h>
  154573. #endif
  154574. #if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
  154575. #define GCC_DIAGNOSTIC
  154576. #endif
  154577. static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_int(int value, Py_ssize_t width, char padding_char, char format_char) {
  154578. char digits[sizeof(int)*3+2];
  154579. char *dpos, *end = digits + sizeof(int)*3+2;
  154580. const char *hex_digits = DIGITS_HEX;
  154581. Py_ssize_t length, ulength;
  154582. int prepend_sign, last_one_off;
  154583. int remaining;
  154584. #ifdef GCC_DIAGNOSTIC
  154585. #pragma GCC diagnostic push
  154586. #pragma GCC diagnostic ignored "-Wconversion"
  154587. #endif
  154588. const int neg_one = (int) -1, const_zero = (int) 0;
  154589. #ifdef GCC_DIAGNOSTIC
  154590. #pragma GCC diagnostic pop
  154591. #endif
  154592. const int is_unsigned = neg_one > const_zero;
  154593. if (format_char == 'X') {
  154594. hex_digits += 16;
  154595. format_char = 'x';
  154596. }
  154597. remaining = value;
  154598. last_one_off = 0;
  154599. dpos = end;
  154600. do {
  154601. int digit_pos;
  154602. switch (format_char) {
  154603. case 'o':
  154604. digit_pos = abs((int)(remaining % (8*8)));
  154605. remaining = (int) (remaining / (8*8));
  154606. dpos -= 2;
  154607. *(uint16_t*)dpos = ((const uint16_t*)DIGIT_PAIRS_8)[digit_pos];
  154608. last_one_off = (digit_pos < 8);
  154609. break;
  154610. case 'd':
  154611. digit_pos = abs((int)(remaining % (10*10)));
  154612. remaining = (int) (remaining / (10*10));
  154613. dpos -= 2;
  154614. *(uint16_t*)dpos = ((const uint16_t*)DIGIT_PAIRS_10)[digit_pos];
  154615. last_one_off = (digit_pos < 10);
  154616. break;
  154617. case 'x':
  154618. *(--dpos) = hex_digits[abs((int)(remaining % 16))];
  154619. remaining = (int) (remaining / 16);
  154620. break;
  154621. default:
  154622. assert(0);
  154623. break;
  154624. }
  154625. } while (unlikely(remaining != 0));
  154626. if (last_one_off) {
  154627. assert(*dpos == '0');
  154628. dpos++;
  154629. }
  154630. length = end - dpos;
  154631. ulength = length;
  154632. prepend_sign = 0;
  154633. if (!is_unsigned && value <= neg_one) {
  154634. if (padding_char == ' ' || width <= length + 1) {
  154635. *(--dpos) = '-';
  154636. ++length;
  154637. } else {
  154638. prepend_sign = 1;
  154639. }
  154640. ++ulength;
  154641. }
  154642. if (width > ulength) {
  154643. ulength = width;
  154644. }
  154645. if (ulength == 1) {
  154646. return PyUnicode_FromOrdinal(*dpos);
  154647. }
  154648. return __Pyx_PyUnicode_BuildFromAscii(ulength, dpos, (int) length, prepend_sign, padding_char);
  154649. }
  154650. /* decode_c_bytes */
  154651. static CYTHON_INLINE PyObject* __Pyx_decode_c_bytes(
  154652. const char* cstring, Py_ssize_t length, Py_ssize_t start, Py_ssize_t stop,
  154653. const char* encoding, const char* errors,
  154654. PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) {
  154655. if (unlikely((start < 0) | (stop < 0))) {
  154656. if (start < 0) {
  154657. start += length;
  154658. if (start < 0)
  154659. start = 0;
  154660. }
  154661. if (stop < 0)
  154662. stop += length;
  154663. }
  154664. if (stop > length)
  154665. stop = length;
  154666. length = stop - start;
  154667. if (unlikely(length <= 0))
  154668. return PyUnicode_FromUnicode(NULL, 0);
  154669. cstring += start;
  154670. if (decode_func) {
  154671. return decode_func(cstring, length, errors);
  154672. } else {
  154673. return PyUnicode_Decode(cstring, length, encoding, errors);
  154674. }
  154675. }
  154676. /* DelItemInt */
  154677. static int __Pyx_DelItem_Generic(PyObject *o, PyObject *j) {
  154678. int r;
  154679. if (!j) return -1;
  154680. r = PyObject_DelItem(o, j);
  154681. Py_DECREF(j);
  154682. return r;
  154683. }
  154684. static CYTHON_INLINE int __Pyx_DelItemInt_Fast(PyObject *o, Py_ssize_t i,
  154685. CYTHON_UNUSED int is_list, CYTHON_NCP_UNUSED int wraparound) {
  154686. #if !CYTHON_USE_TYPE_SLOTS
  154687. if (is_list || PySequence_Check(o)) {
  154688. return PySequence_DelItem(o, i);
  154689. }
  154690. #else
  154691. PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
  154692. if (likely(m && m->sq_ass_item)) {
  154693. if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
  154694. Py_ssize_t l = m->sq_length(o);
  154695. if (likely(l >= 0)) {
  154696. i += l;
  154697. } else {
  154698. if (!PyErr_ExceptionMatches(PyExc_OverflowError))
  154699. return -1;
  154700. PyErr_Clear();
  154701. }
  154702. }
  154703. return m->sq_ass_item(o, i, (PyObject *)NULL);
  154704. }
  154705. #endif
  154706. return __Pyx_DelItem_Generic(o, PyInt_FromSsize_t(i));
  154707. }
  154708. /* StringJoin */
  154709. #if !CYTHON_COMPILING_IN_CPYTHON
  154710. static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values) {
  154711. return PyObject_CallMethodObjArgs(sep, __pyx_n_s_join, values, NULL);
  154712. }
  154713. #endif
  154714. /* Import */
  154715. static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
  154716. PyObject *empty_list = 0;
  154717. PyObject *module = 0;
  154718. PyObject *global_dict = 0;
  154719. PyObject *empty_dict = 0;
  154720. PyObject *list;
  154721. #if PY_MAJOR_VERSION < 3
  154722. PyObject *py_import;
  154723. py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
  154724. if (!py_import)
  154725. goto bad;
  154726. #endif
  154727. if (from_list)
  154728. list = from_list;
  154729. else {
  154730. empty_list = PyList_New(0);
  154731. if (!empty_list)
  154732. goto bad;
  154733. list = empty_list;
  154734. }
  154735. global_dict = PyModule_GetDict(__pyx_m);
  154736. if (!global_dict)
  154737. goto bad;
  154738. empty_dict = PyDict_New();
  154739. if (!empty_dict)
  154740. goto bad;
  154741. {
  154742. #if PY_MAJOR_VERSION >= 3
  154743. if (level == -1) {
  154744. if (strchr(__Pyx_MODULE_NAME, '.')) {
  154745. module = PyImport_ImportModuleLevelObject(
  154746. name, global_dict, empty_dict, list, 1);
  154747. if (!module) {
  154748. if (!PyErr_ExceptionMatches(PyExc_ImportError))
  154749. goto bad;
  154750. PyErr_Clear();
  154751. }
  154752. }
  154753. level = 0;
  154754. }
  154755. #endif
  154756. if (!module) {
  154757. #if PY_MAJOR_VERSION < 3
  154758. PyObject *py_level = PyInt_FromLong(level);
  154759. if (!py_level)
  154760. goto bad;
  154761. module = PyObject_CallFunctionObjArgs(py_import,
  154762. name, global_dict, empty_dict, list, py_level, (PyObject *)NULL);
  154763. Py_DECREF(py_level);
  154764. #else
  154765. module = PyImport_ImportModuleLevelObject(
  154766. name, global_dict, empty_dict, list, level);
  154767. #endif
  154768. }
  154769. }
  154770. bad:
  154771. #if PY_MAJOR_VERSION < 3
  154772. Py_XDECREF(py_import);
  154773. #endif
  154774. Py_XDECREF(empty_list);
  154775. Py_XDECREF(empty_dict);
  154776. return module;
  154777. }
  154778. /* ImportFrom */
  154779. static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
  154780. PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
  154781. if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
  154782. PyErr_Format(PyExc_ImportError,
  154783. #if PY_MAJOR_VERSION < 3
  154784. "cannot import name %.230s", PyString_AS_STRING(name));
  154785. #else
  154786. "cannot import name %S", name);
  154787. #endif
  154788. }
  154789. return value;
  154790. }
  154791. /* None */
  154792. static CYTHON_INLINE long __Pyx_div_long(long a, long b) {
  154793. long q = a / b;
  154794. long r = a - q*b;
  154795. q -= ((r != 0) & ((r ^ b) < 0));
  154796. return q;
  154797. }
  154798. /* PyObject_GenericGetAttr */
  154799. #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
  154800. static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) {
  154801. if (unlikely(Py_TYPE(obj)->tp_dictoffset)) {
  154802. return PyObject_GenericGetAttr(obj, attr_name);
  154803. }
  154804. return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name);
  154805. }
  154806. #endif
  154807. /* SetVTable */
  154808. static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
  154809. #if PY_VERSION_HEX >= 0x02070000
  154810. PyObject *ob = PyCapsule_New(vtable, 0, 0);
  154811. #else
  154812. PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
  154813. #endif
  154814. if (!ob)
  154815. goto bad;
  154816. if (PyDict_SetItem(dict, __pyx_n_s_pyx_vtable, ob) < 0)
  154817. goto bad;
  154818. Py_DECREF(ob);
  154819. return 0;
  154820. bad:
  154821. Py_XDECREF(ob);
  154822. return -1;
  154823. }
  154824. /* SetupReduce */
  154825. static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) {
  154826. int ret;
  154827. PyObject *name_attr;
  154828. name_attr = __Pyx_PyObject_GetAttrStr(meth, __pyx_n_s_name);
  154829. if (likely(name_attr)) {
  154830. ret = PyObject_RichCompareBool(name_attr, name, Py_EQ);
  154831. } else {
  154832. ret = -1;
  154833. }
  154834. if (unlikely(ret < 0)) {
  154835. PyErr_Clear();
  154836. ret = 0;
  154837. }
  154838. Py_XDECREF(name_attr);
  154839. return ret;
  154840. }
  154841. static int __Pyx_setup_reduce(PyObject* type_obj) {
  154842. int ret = 0;
  154843. PyObject *object_reduce = NULL;
  154844. PyObject *object_reduce_ex = NULL;
  154845. PyObject *reduce = NULL;
  154846. PyObject *reduce_ex = NULL;
  154847. PyObject *reduce_cython = NULL;
  154848. PyObject *setstate = NULL;
  154849. PyObject *setstate_cython = NULL;
  154850. #if CYTHON_USE_PYTYPE_LOOKUP
  154851. if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto GOOD;
  154852. #else
  154853. if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto GOOD;
  154854. #endif
  154855. #if CYTHON_USE_PYTYPE_LOOKUP
  154856. object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD;
  154857. #else
  154858. object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD;
  154859. #endif
  154860. reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto BAD;
  154861. if (reduce_ex == object_reduce_ex) {
  154862. #if CYTHON_USE_PYTYPE_LOOKUP
  154863. object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD;
  154864. #else
  154865. object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD;
  154866. #endif
  154867. reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto BAD;
  154868. if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) {
  154869. reduce_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_cython); if (unlikely(!reduce_cython)) goto BAD;
  154870. ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto BAD;
  154871. ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto BAD;
  154872. setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate);
  154873. if (!setstate) PyErr_Clear();
  154874. if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) {
  154875. setstate_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate_cython); if (unlikely(!setstate_cython)) goto BAD;
  154876. ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto BAD;
  154877. ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto BAD;
  154878. }
  154879. PyType_Modified((PyTypeObject*)type_obj);
  154880. }
  154881. }
  154882. goto GOOD;
  154883. BAD:
  154884. if (!PyErr_Occurred())
  154885. PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name);
  154886. ret = -1;
  154887. GOOD:
  154888. #if !CYTHON_USE_PYTYPE_LOOKUP
  154889. Py_XDECREF(object_reduce);
  154890. Py_XDECREF(object_reduce_ex);
  154891. #endif
  154892. Py_XDECREF(reduce);
  154893. Py_XDECREF(reduce_ex);
  154894. Py_XDECREF(reduce_cython);
  154895. Py_XDECREF(setstate);
  154896. Py_XDECREF(setstate_cython);
  154897. return ret;
  154898. }
  154899. /* TypeImport */
  154900. #ifndef __PYX_HAVE_RT_ImportType
  154901. #define __PYX_HAVE_RT_ImportType
  154902. static PyTypeObject *__Pyx_ImportType(PyObject *module, const char *module_name, const char *class_name,
  154903. size_t size, enum __Pyx_ImportType_CheckSize check_size)
  154904. {
  154905. PyObject *result = 0;
  154906. char warning[200];
  154907. Py_ssize_t basicsize;
  154908. #ifdef Py_LIMITED_API
  154909. PyObject *py_basicsize;
  154910. #endif
  154911. result = PyObject_GetAttrString(module, class_name);
  154912. if (!result)
  154913. goto bad;
  154914. if (!PyType_Check(result)) {
  154915. PyErr_Format(PyExc_TypeError,
  154916. "%.200s.%.200s is not a type object",
  154917. module_name, class_name);
  154918. goto bad;
  154919. }
  154920. #ifndef Py_LIMITED_API
  154921. basicsize = ((PyTypeObject *)result)->tp_basicsize;
  154922. #else
  154923. py_basicsize = PyObject_GetAttrString(result, "__basicsize__");
  154924. if (!py_basicsize)
  154925. goto bad;
  154926. basicsize = PyLong_AsSsize_t(py_basicsize);
  154927. Py_DECREF(py_basicsize);
  154928. py_basicsize = 0;
  154929. if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred())
  154930. goto bad;
  154931. #endif
  154932. if ((size_t)basicsize < size) {
  154933. PyErr_Format(PyExc_ValueError,
  154934. "%.200s.%.200s size changed, may indicate binary incompatibility. "
  154935. "Expected %zd from C header, got %zd from PyObject",
  154936. module_name, class_name, size, basicsize);
  154937. goto bad;
  154938. }
  154939. if (check_size == __Pyx_ImportType_CheckSize_Error && (size_t)basicsize != size) {
  154940. PyErr_Format(PyExc_ValueError,
  154941. "%.200s.%.200s size changed, may indicate binary incompatibility. "
  154942. "Expected %zd from C header, got %zd from PyObject",
  154943. module_name, class_name, size, basicsize);
  154944. goto bad;
  154945. }
  154946. else if (check_size == __Pyx_ImportType_CheckSize_Warn && (size_t)basicsize > size) {
  154947. PyOS_snprintf(warning, sizeof(warning),
  154948. "%s.%s size changed, may indicate binary incompatibility. "
  154949. "Expected %zd from C header, got %zd from PyObject",
  154950. module_name, class_name, size, basicsize);
  154951. if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad;
  154952. }
  154953. return (PyTypeObject *)result;
  154954. bad:
  154955. Py_XDECREF(result);
  154956. return NULL;
  154957. }
  154958. #endif
  154959. /* PatchInspect */
  154960. static PyObject* __Pyx_patch_inspect(PyObject* module) {
  154961. #if defined(__Pyx_Generator_USED) && (!defined(CYTHON_PATCH_INSPECT) || CYTHON_PATCH_INSPECT)
  154962. static int inspect_patched = 0;
  154963. if (unlikely((!inspect_patched) && module)) {
  154964. module = __Pyx_Coroutine_patch_module(
  154965. module, ""
  154966. "old_types = getattr(_module.isgenerator, '_cython_generator_types', None)\n"
  154967. "if old_types is None or not isinstance(old_types, set):\n"
  154968. " old_types = set()\n"
  154969. " def cy_wrap(orig_func, type=type, cython_generator_types=old_types):\n"
  154970. " def cy_isgenerator(obj): return type(obj) in cython_generator_types or orig_func(obj)\n"
  154971. " cy_isgenerator._cython_generator_types = cython_generator_types\n"
  154972. " return cy_isgenerator\n"
  154973. " _module.isgenerator = cy_wrap(_module.isgenerator)\n"
  154974. "old_types.add(_cython_generator_type)\n"
  154975. );
  154976. inspect_patched = 1;
  154977. }
  154978. #else
  154979. if ((0)) return __Pyx_Coroutine_patch_module(module, NULL);
  154980. #endif
  154981. return module;
  154982. }
  154983. /* PatchAsyncIO */
  154984. static PyObject* __Pyx_patch_asyncio(PyObject* module) {
  154985. #if PY_VERSION_HEX < 0x030500B2 &&\
  154986. (defined(__Pyx_Coroutine_USED) || defined(__Pyx_Generator_USED)) &&\
  154987. (!defined(CYTHON_PATCH_ASYNCIO) || CYTHON_PATCH_ASYNCIO)
  154988. PyObject *patch_module = NULL;
  154989. static int asyncio_patched = 0;
  154990. if (unlikely((!asyncio_patched) && module)) {
  154991. PyObject *package;
  154992. package = __Pyx_Import(__pyx_n_s_asyncio_coroutines, NULL, 0);
  154993. if (package) {
  154994. patch_module = __Pyx_Coroutine_patch_module(
  154995. PyObject_GetAttrString(package, "coroutines"), ""
  154996. "try:\n"
  154997. " coro_types = _module._COROUTINE_TYPES\n"
  154998. "except AttributeError: pass\n"
  154999. "else:\n"
  155000. " if _cython_coroutine_type is not None and _cython_coroutine_type not in coro_types:\n"
  155001. " coro_types = tuple(coro_types) + (_cython_coroutine_type,)\n"
  155002. " if _cython_generator_type is not None and _cython_generator_type not in coro_types:\n"
  155003. " coro_types = tuple(coro_types) + (_cython_generator_type,)\n"
  155004. "_module._COROUTINE_TYPES = coro_types\n"
  155005. );
  155006. } else {
  155007. PyErr_Clear();
  155008. package = __Pyx_Import(__pyx_n_s_asyncio_tasks, NULL, 0);
  155009. if (unlikely(!package)) goto asyncio_done;
  155010. patch_module = __Pyx_Coroutine_patch_module(
  155011. PyObject_GetAttrString(package, "tasks"), ""
  155012. "if hasattr(_module, 'iscoroutine'):\n"
  155013. " old_types = getattr(_module.iscoroutine, '_cython_coroutine_types', None)\n"
  155014. " if old_types is None or not isinstance(old_types, set):\n"
  155015. " old_types = set()\n"
  155016. " def cy_wrap(orig_func, type=type, cython_coroutine_types=old_types):\n"
  155017. " def cy_iscoroutine(obj): return type(obj) in cython_coroutine_types or orig_func(obj)\n"
  155018. " cy_iscoroutine._cython_coroutine_types = cython_coroutine_types\n"
  155019. " return cy_iscoroutine\n"
  155020. " _module.iscoroutine = cy_wrap(_module.iscoroutine)\n"
  155021. " if _cython_coroutine_type is not None:\n"
  155022. " old_types.add(_cython_coroutine_type)\n"
  155023. " if _cython_generator_type is not None:\n"
  155024. " old_types.add(_cython_generator_type)\n"
  155025. );
  155026. }
  155027. Py_DECREF(package);
  155028. if (unlikely(!patch_module)) goto ignore;
  155029. asyncio_done:
  155030. PyErr_Clear();
  155031. asyncio_patched = 1;
  155032. #ifdef __Pyx_Generator_USED
  155033. {
  155034. PyObject *inspect_module;
  155035. if (patch_module) {
  155036. inspect_module = PyObject_GetAttr(patch_module, __pyx_n_s_inspect);
  155037. Py_DECREF(patch_module);
  155038. } else {
  155039. inspect_module = __Pyx_Import(__pyx_n_s_inspect, NULL, 0);
  155040. }
  155041. if (unlikely(!inspect_module)) goto ignore;
  155042. inspect_module = __Pyx_patch_inspect(inspect_module);
  155043. if (unlikely(!inspect_module)) {
  155044. Py_DECREF(module);
  155045. module = NULL;
  155046. }
  155047. Py_XDECREF(inspect_module);
  155048. }
  155049. #else
  155050. if ((0)) return __Pyx_patch_inspect(module);
  155051. #endif
  155052. }
  155053. return module;
  155054. ignore:
  155055. PyErr_WriteUnraisable(module);
  155056. if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, "Cython module failed to patch asyncio package with custom generator type", 1) < 0)) {
  155057. Py_DECREF(module);
  155058. module = NULL;
  155059. }
  155060. #else
  155061. if ((0)) return __Pyx_patch_inspect(__Pyx_Coroutine_patch_module(module, NULL));
  155062. #endif
  155063. return module;
  155064. }
  155065. /* CalculateMetaclass */
  155066. static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) {
  155067. Py_ssize_t i, nbases = PyTuple_GET_SIZE(bases);
  155068. for (i=0; i < nbases; i++) {
  155069. PyTypeObject *tmptype;
  155070. PyObject *tmp = PyTuple_GET_ITEM(bases, i);
  155071. tmptype = Py_TYPE(tmp);
  155072. #if PY_MAJOR_VERSION < 3
  155073. if (tmptype == &PyClass_Type)
  155074. continue;
  155075. #endif
  155076. if (!metaclass) {
  155077. metaclass = tmptype;
  155078. continue;
  155079. }
  155080. if (PyType_IsSubtype(metaclass, tmptype))
  155081. continue;
  155082. if (PyType_IsSubtype(tmptype, metaclass)) {
  155083. metaclass = tmptype;
  155084. continue;
  155085. }
  155086. PyErr_SetString(PyExc_TypeError,
  155087. "metaclass conflict: "
  155088. "the metaclass of a derived class "
  155089. "must be a (non-strict) subclass "
  155090. "of the metaclasses of all its bases");
  155091. return NULL;
  155092. }
  155093. if (!metaclass) {
  155094. #if PY_MAJOR_VERSION < 3
  155095. metaclass = &PyClass_Type;
  155096. #else
  155097. metaclass = &PyType_Type;
  155098. #endif
  155099. }
  155100. Py_INCREF((PyObject*) metaclass);
  155101. return (PyObject*) metaclass;
  155102. }
  155103. /* Py3ClassCreate */
  155104. static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name,
  155105. PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) {
  155106. PyObject *ns;
  155107. if (metaclass) {
  155108. PyObject *prep = __Pyx_PyObject_GetAttrStr(metaclass, __pyx_n_s_prepare);
  155109. if (prep) {
  155110. PyObject *pargs = PyTuple_Pack(2, name, bases);
  155111. if (unlikely(!pargs)) {
  155112. Py_DECREF(prep);
  155113. return NULL;
  155114. }
  155115. ns = PyObject_Call(prep, pargs, mkw);
  155116. Py_DECREF(prep);
  155117. Py_DECREF(pargs);
  155118. } else {
  155119. if (unlikely(!PyErr_ExceptionMatches(PyExc_AttributeError)))
  155120. return NULL;
  155121. PyErr_Clear();
  155122. ns = PyDict_New();
  155123. }
  155124. } else {
  155125. ns = PyDict_New();
  155126. }
  155127. if (unlikely(!ns))
  155128. return NULL;
  155129. if (unlikely(PyObject_SetItem(ns, __pyx_n_s_module, modname) < 0)) goto bad;
  155130. if (unlikely(PyObject_SetItem(ns, __pyx_n_s_qualname, qualname) < 0)) goto bad;
  155131. if (unlikely(doc && PyObject_SetItem(ns, __pyx_n_s_doc, doc) < 0)) goto bad;
  155132. return ns;
  155133. bad:
  155134. Py_DECREF(ns);
  155135. return NULL;
  155136. }
  155137. static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases,
  155138. PyObject *dict, PyObject *mkw,
  155139. int calculate_metaclass, int allow_py2_metaclass) {
  155140. PyObject *result, *margs;
  155141. PyObject *owned_metaclass = NULL;
  155142. if (allow_py2_metaclass) {
  155143. owned_metaclass = PyObject_GetItem(dict, __pyx_n_s_metaclass);
  155144. if (owned_metaclass) {
  155145. metaclass = owned_metaclass;
  155146. } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) {
  155147. PyErr_Clear();
  155148. } else {
  155149. return NULL;
  155150. }
  155151. }
  155152. if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) {
  155153. metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases);
  155154. Py_XDECREF(owned_metaclass);
  155155. if (unlikely(!metaclass))
  155156. return NULL;
  155157. owned_metaclass = metaclass;
  155158. }
  155159. margs = PyTuple_Pack(3, name, bases, dict);
  155160. if (unlikely(!margs)) {
  155161. result = NULL;
  155162. } else {
  155163. result = PyObject_Call(metaclass, margs, mkw);
  155164. Py_DECREF(margs);
  155165. }
  155166. Py_XDECREF(owned_metaclass);
  155167. return result;
  155168. }
  155169. /* CLineInTraceback */
  155170. #ifndef CYTHON_CLINE_IN_TRACEBACK
  155171. static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) {
  155172. PyObject *use_cline;
  155173. PyObject *ptype, *pvalue, *ptraceback;
  155174. #if CYTHON_COMPILING_IN_CPYTHON
  155175. PyObject **cython_runtime_dict;
  155176. #endif
  155177. if (unlikely(!__pyx_cython_runtime)) {
  155178. return c_line;
  155179. }
  155180. __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
  155181. #if CYTHON_COMPILING_IN_CPYTHON
  155182. cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
  155183. if (likely(cython_runtime_dict)) {
  155184. __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
  155185. use_cline, *cython_runtime_dict,
  155186. __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback))
  155187. } else
  155188. #endif
  155189. {
  155190. PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
  155191. if (use_cline_obj) {
  155192. use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
  155193. Py_DECREF(use_cline_obj);
  155194. } else {
  155195. PyErr_Clear();
  155196. use_cline = NULL;
  155197. }
  155198. }
  155199. if (!use_cline) {
  155200. c_line = 0;
  155201. PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
  155202. }
  155203. else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
  155204. c_line = 0;
  155205. }
  155206. __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
  155207. return c_line;
  155208. }
  155209. #endif
  155210. /* CodeObjectCache */
  155211. static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
  155212. int start = 0, mid = 0, end = count - 1;
  155213. if (end >= 0 && code_line > entries[end].code_line) {
  155214. return count;
  155215. }
  155216. while (start < end) {
  155217. mid = start + (end - start) / 2;
  155218. if (code_line < entries[mid].code_line) {
  155219. end = mid;
  155220. } else if (code_line > entries[mid].code_line) {
  155221. start = mid + 1;
  155222. } else {
  155223. return mid;
  155224. }
  155225. }
  155226. if (code_line <= entries[mid].code_line) {
  155227. return mid;
  155228. } else {
  155229. return mid + 1;
  155230. }
  155231. }
  155232. static PyCodeObject *__pyx_find_code_object(int code_line) {
  155233. PyCodeObject* code_object;
  155234. int pos;
  155235. if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
  155236. return NULL;
  155237. }
  155238. pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
  155239. if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
  155240. return NULL;
  155241. }
  155242. code_object = __pyx_code_cache.entries[pos].code_object;
  155243. Py_INCREF(code_object);
  155244. return code_object;
  155245. }
  155246. static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
  155247. int pos, i;
  155248. __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
  155249. if (unlikely(!code_line)) {
  155250. return;
  155251. }
  155252. if (unlikely(!entries)) {
  155253. entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
  155254. if (likely(entries)) {
  155255. __pyx_code_cache.entries = entries;
  155256. __pyx_code_cache.max_count = 64;
  155257. __pyx_code_cache.count = 1;
  155258. entries[0].code_line = code_line;
  155259. entries[0].code_object = code_object;
  155260. Py_INCREF(code_object);
  155261. }
  155262. return;
  155263. }
  155264. pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
  155265. if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
  155266. PyCodeObject* tmp = entries[pos].code_object;
  155267. entries[pos].code_object = code_object;
  155268. Py_DECREF(tmp);
  155269. return;
  155270. }
  155271. if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
  155272. int new_max = __pyx_code_cache.max_count + 64;
  155273. entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
  155274. __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry));
  155275. if (unlikely(!entries)) {
  155276. return;
  155277. }
  155278. __pyx_code_cache.entries = entries;
  155279. __pyx_code_cache.max_count = new_max;
  155280. }
  155281. for (i=__pyx_code_cache.count; i>pos; i--) {
  155282. entries[i] = entries[i-1];
  155283. }
  155284. entries[pos].code_line = code_line;
  155285. entries[pos].code_object = code_object;
  155286. __pyx_code_cache.count++;
  155287. Py_INCREF(code_object);
  155288. }
  155289. /* AddTraceback */
  155290. #include "compile.h"
  155291. #include "frameobject.h"
  155292. #include "traceback.h"
  155293. static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
  155294. const char *funcname, int c_line,
  155295. int py_line, const char *filename) {
  155296. PyCodeObject *py_code = 0;
  155297. PyObject *py_srcfile = 0;
  155298. PyObject *py_funcname = 0;
  155299. #if PY_MAJOR_VERSION < 3
  155300. py_srcfile = PyString_FromString(filename);
  155301. #else
  155302. py_srcfile = PyUnicode_FromString(filename);
  155303. #endif
  155304. if (!py_srcfile) goto bad;
  155305. if (c_line) {
  155306. #if PY_MAJOR_VERSION < 3
  155307. py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
  155308. #else
  155309. py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
  155310. #endif
  155311. }
  155312. else {
  155313. #if PY_MAJOR_VERSION < 3
  155314. py_funcname = PyString_FromString(funcname);
  155315. #else
  155316. py_funcname = PyUnicode_FromString(funcname);
  155317. #endif
  155318. }
  155319. if (!py_funcname) goto bad;
  155320. py_code = __Pyx_PyCode_New(
  155321. 0,
  155322. 0,
  155323. 0,
  155324. 0,
  155325. 0,
  155326. __pyx_empty_bytes, /*PyObject *code,*/
  155327. __pyx_empty_tuple, /*PyObject *consts,*/
  155328. __pyx_empty_tuple, /*PyObject *names,*/
  155329. __pyx_empty_tuple, /*PyObject *varnames,*/
  155330. __pyx_empty_tuple, /*PyObject *freevars,*/
  155331. __pyx_empty_tuple, /*PyObject *cellvars,*/
  155332. py_srcfile, /*PyObject *filename,*/
  155333. py_funcname, /*PyObject *name,*/
  155334. py_line,
  155335. __pyx_empty_bytes /*PyObject *lnotab*/
  155336. );
  155337. Py_DECREF(py_srcfile);
  155338. Py_DECREF(py_funcname);
  155339. return py_code;
  155340. bad:
  155341. Py_XDECREF(py_srcfile);
  155342. Py_XDECREF(py_funcname);
  155343. return NULL;
  155344. }
  155345. static void __Pyx_AddTraceback(const char *funcname, int c_line,
  155346. int py_line, const char *filename) {
  155347. PyCodeObject *py_code = 0;
  155348. PyFrameObject *py_frame = 0;
  155349. PyThreadState *tstate = __Pyx_PyThreadState_Current;
  155350. if (c_line) {
  155351. c_line = __Pyx_CLineForTraceback(tstate, c_line);
  155352. }
  155353. py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
  155354. if (!py_code) {
  155355. py_code = __Pyx_CreateCodeObjectForTraceback(
  155356. funcname, c_line, py_line, filename);
  155357. if (!py_code) goto bad;
  155358. __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
  155359. }
  155360. py_frame = PyFrame_New(
  155361. tstate, /*PyThreadState *tstate,*/
  155362. py_code, /*PyCodeObject *code,*/
  155363. __pyx_d, /*PyObject *globals,*/
  155364. 0 /*PyObject *locals*/
  155365. );
  155366. if (!py_frame) goto bad;
  155367. __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
  155368. PyTraceBack_Here(py_frame);
  155369. bad:
  155370. Py_XDECREF(py_code);
  155371. Py_XDECREF(py_frame);
  155372. }
  155373. /* CIntToPy */
  155374. static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
  155375. const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0;
  155376. const int is_unsigned = neg_one > const_zero;
  155377. if (is_unsigned) {
  155378. if (sizeof(int) < sizeof(long)) {
  155379. return PyInt_FromLong((long) value);
  155380. } else if (sizeof(int) <= sizeof(unsigned long)) {
  155381. return PyLong_FromUnsignedLong((unsigned long) value);
  155382. #ifdef HAVE_LONG_LONG
  155383. } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
  155384. return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
  155385. #endif
  155386. }
  155387. } else {
  155388. if (sizeof(int) <= sizeof(long)) {
  155389. return PyInt_FromLong((long) value);
  155390. #ifdef HAVE_LONG_LONG
  155391. } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
  155392. return PyLong_FromLongLong((PY_LONG_LONG) value);
  155393. #endif
  155394. }
  155395. }
  155396. {
  155397. int one = 1; int little = (int)*(unsigned char *)&one;
  155398. unsigned char *bytes = (unsigned char *)&value;
  155399. return _PyLong_FromByteArray(bytes, sizeof(int),
  155400. little, !is_unsigned);
  155401. }
  155402. }
  155403. /* CIntFromPyVerify */
  155404. #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
  155405. __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
  155406. #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
  155407. __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
  155408. #define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
  155409. {\
  155410. func_type value = func_value;\
  155411. if (sizeof(target_type) < sizeof(func_type)) {\
  155412. if (unlikely(value != (func_type) (target_type) value)) {\
  155413. func_type zero = 0;\
  155414. if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
  155415. return (target_type) -1;\
  155416. if (is_unsigned && unlikely(value < zero))\
  155417. goto raise_neg_overflow;\
  155418. else\
  155419. goto raise_overflow;\
  155420. }\
  155421. }\
  155422. return (target_type) value;\
  155423. }
  155424. /* CIntToPy */
  155425. static CYTHON_INLINE PyObject* __Pyx_PyInt_From_uint64_t(uint64_t value) {
  155426. const uint64_t neg_one = (uint64_t) ((uint64_t) 0 - (uint64_t) 1), const_zero = (uint64_t) 0;
  155427. const int is_unsigned = neg_one > const_zero;
  155428. if (is_unsigned) {
  155429. if (sizeof(uint64_t) < sizeof(long)) {
  155430. return PyInt_FromLong((long) value);
  155431. } else if (sizeof(uint64_t) <= sizeof(unsigned long)) {
  155432. return PyLong_FromUnsignedLong((unsigned long) value);
  155433. #ifdef HAVE_LONG_LONG
  155434. } else if (sizeof(uint64_t) <= sizeof(unsigned PY_LONG_LONG)) {
  155435. return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
  155436. #endif
  155437. }
  155438. } else {
  155439. if (sizeof(uint64_t) <= sizeof(long)) {
  155440. return PyInt_FromLong((long) value);
  155441. #ifdef HAVE_LONG_LONG
  155442. } else if (sizeof(uint64_t) <= sizeof(PY_LONG_LONG)) {
  155443. return PyLong_FromLongLong((PY_LONG_LONG) value);
  155444. #endif
  155445. }
  155446. }
  155447. {
  155448. int one = 1; int little = (int)*(unsigned char *)&one;
  155449. unsigned char *bytes = (unsigned char *)&value;
  155450. return _PyLong_FromByteArray(bytes, sizeof(uint64_t),
  155451. little, !is_unsigned);
  155452. }
  155453. }
  155454. /* CIntToPy */
  155455. static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
  155456. const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0;
  155457. const int is_unsigned = neg_one > const_zero;
  155458. if (is_unsigned) {
  155459. if (sizeof(long) < sizeof(long)) {
  155460. return PyInt_FromLong((long) value);
  155461. } else if (sizeof(long) <= sizeof(unsigned long)) {
  155462. return PyLong_FromUnsignedLong((unsigned long) value);
  155463. #ifdef HAVE_LONG_LONG
  155464. } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
  155465. return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
  155466. #endif
  155467. }
  155468. } else {
  155469. if (sizeof(long) <= sizeof(long)) {
  155470. return PyInt_FromLong((long) value);
  155471. #ifdef HAVE_LONG_LONG
  155472. } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
  155473. return PyLong_FromLongLong((PY_LONG_LONG) value);
  155474. #endif
  155475. }
  155476. }
  155477. {
  155478. int one = 1; int little = (int)*(unsigned char *)&one;
  155479. unsigned char *bytes = (unsigned char *)&value;
  155480. return _PyLong_FromByteArray(bytes, sizeof(long),
  155481. little, !is_unsigned);
  155482. }
  155483. }
  155484. /* CIntToPy */
  155485. static CYTHON_INLINE PyObject* __Pyx_PyInt_From_uint32_t(uint32_t value) {
  155486. const uint32_t neg_one = (uint32_t) ((uint32_t) 0 - (uint32_t) 1), const_zero = (uint32_t) 0;
  155487. const int is_unsigned = neg_one > const_zero;
  155488. if (is_unsigned) {
  155489. if (sizeof(uint32_t) < sizeof(long)) {
  155490. return PyInt_FromLong((long) value);
  155491. } else if (sizeof(uint32_t) <= sizeof(unsigned long)) {
  155492. return PyLong_FromUnsignedLong((unsigned long) value);
  155493. #ifdef HAVE_LONG_LONG
  155494. } else if (sizeof(uint32_t) <= sizeof(unsigned PY_LONG_LONG)) {
  155495. return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
  155496. #endif
  155497. }
  155498. } else {
  155499. if (sizeof(uint32_t) <= sizeof(long)) {
  155500. return PyInt_FromLong((long) value);
  155501. #ifdef HAVE_LONG_LONG
  155502. } else if (sizeof(uint32_t) <= sizeof(PY_LONG_LONG)) {
  155503. return PyLong_FromLongLong((PY_LONG_LONG) value);
  155504. #endif
  155505. }
  155506. }
  155507. {
  155508. int one = 1; int little = (int)*(unsigned char *)&one;
  155509. unsigned char *bytes = (unsigned char *)&value;
  155510. return _PyLong_FromByteArray(bytes, sizeof(uint32_t),
  155511. little, !is_unsigned);
  155512. }
  155513. }
  155514. /* CIntToPy */
  155515. static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_short(unsigned short value) {
  155516. const unsigned short neg_one = (unsigned short) ((unsigned short) 0 - (unsigned short) 1), const_zero = (unsigned short) 0;
  155517. const int is_unsigned = neg_one > const_zero;
  155518. if (is_unsigned) {
  155519. if (sizeof(unsigned short) < sizeof(long)) {
  155520. return PyInt_FromLong((long) value);
  155521. } else if (sizeof(unsigned short) <= sizeof(unsigned long)) {
  155522. return PyLong_FromUnsignedLong((unsigned long) value);
  155523. #ifdef HAVE_LONG_LONG
  155524. } else if (sizeof(unsigned short) <= sizeof(unsigned PY_LONG_LONG)) {
  155525. return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
  155526. #endif
  155527. }
  155528. } else {
  155529. if (sizeof(unsigned short) <= sizeof(long)) {
  155530. return PyInt_FromLong((long) value);
  155531. #ifdef HAVE_LONG_LONG
  155532. } else if (sizeof(unsigned short) <= sizeof(PY_LONG_LONG)) {
  155533. return PyLong_FromLongLong((PY_LONG_LONG) value);
  155534. #endif
  155535. }
  155536. }
  155537. {
  155538. int one = 1; int little = (int)*(unsigned char *)&one;
  155539. unsigned char *bytes = (unsigned char *)&value;
  155540. return _PyLong_FromByteArray(bytes, sizeof(unsigned short),
  155541. little, !is_unsigned);
  155542. }
  155543. }
  155544. /* CIntToPy */
  155545. static CYTHON_INLINE PyObject* __Pyx_PyInt_From_volatile__int(volatile int value) {
  155546. const volatile int neg_one = (volatile int) ((volatile int) 0 - (volatile int) 1), const_zero = (volatile int) 0;
  155547. const int is_unsigned = neg_one > const_zero;
  155548. if (is_unsigned) {
  155549. if (sizeof(volatile int) < sizeof(long)) {
  155550. return PyInt_FromLong((long) value);
  155551. } else if (sizeof(volatile int) <= sizeof(unsigned long)) {
  155552. return PyLong_FromUnsignedLong((unsigned long) value);
  155553. #ifdef HAVE_LONG_LONG
  155554. } else if (sizeof(volatile int) <= sizeof(unsigned PY_LONG_LONG)) {
  155555. return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
  155556. #endif
  155557. }
  155558. } else {
  155559. if (sizeof(volatile int) <= sizeof(long)) {
  155560. return PyInt_FromLong((long) value);
  155561. #ifdef HAVE_LONG_LONG
  155562. } else if (sizeof(volatile int) <= sizeof(PY_LONG_LONG)) {
  155563. return PyLong_FromLongLong((PY_LONG_LONG) value);
  155564. #endif
  155565. }
  155566. }
  155567. {
  155568. int one = 1; int little = (int)*(unsigned char *)&one;
  155569. unsigned char *bytes = (unsigned char *)&value;
  155570. return _PyLong_FromByteArray(bytes, sizeof(volatile int),
  155571. little, !is_unsigned);
  155572. }
  155573. }
  155574. /* CIntToPy */
  155575. static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int64_t(int64_t value) {
  155576. const int64_t neg_one = (int64_t) ((int64_t) 0 - (int64_t) 1), const_zero = (int64_t) 0;
  155577. const int is_unsigned = neg_one > const_zero;
  155578. if (is_unsigned) {
  155579. if (sizeof(int64_t) < sizeof(long)) {
  155580. return PyInt_FromLong((long) value);
  155581. } else if (sizeof(int64_t) <= sizeof(unsigned long)) {
  155582. return PyLong_FromUnsignedLong((unsigned long) value);
  155583. #ifdef HAVE_LONG_LONG
  155584. } else if (sizeof(int64_t) <= sizeof(unsigned PY_LONG_LONG)) {
  155585. return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
  155586. #endif
  155587. }
  155588. } else {
  155589. if (sizeof(int64_t) <= sizeof(long)) {
  155590. return PyInt_FromLong((long) value);
  155591. #ifdef HAVE_LONG_LONG
  155592. } else if (sizeof(int64_t) <= sizeof(PY_LONG_LONG)) {
  155593. return PyLong_FromLongLong((PY_LONG_LONG) value);
  155594. #endif
  155595. }
  155596. }
  155597. {
  155598. int one = 1; int little = (int)*(unsigned char *)&one;
  155599. unsigned char *bytes = (unsigned char *)&value;
  155600. return _PyLong_FromByteArray(bytes, sizeof(int64_t),
  155601. little, !is_unsigned);
  155602. }
  155603. }
  155604. /* CIntToPy */
  155605. static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_long(unsigned long value) {
  155606. const unsigned long neg_one = (unsigned long) ((unsigned long) 0 - (unsigned long) 1), const_zero = (unsigned long) 0;
  155607. const int is_unsigned = neg_one > const_zero;
  155608. if (is_unsigned) {
  155609. if (sizeof(unsigned long) < sizeof(long)) {
  155610. return PyInt_FromLong((long) value);
  155611. } else if (sizeof(unsigned long) <= sizeof(unsigned long)) {
  155612. return PyLong_FromUnsignedLong((unsigned long) value);
  155613. #ifdef HAVE_LONG_LONG
  155614. } else if (sizeof(unsigned long) <= sizeof(unsigned PY_LONG_LONG)) {
  155615. return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
  155616. #endif
  155617. }
  155618. } else {
  155619. if (sizeof(unsigned long) <= sizeof(long)) {
  155620. return PyInt_FromLong((long) value);
  155621. #ifdef HAVE_LONG_LONG
  155622. } else if (sizeof(unsigned long) <= sizeof(PY_LONG_LONG)) {
  155623. return PyLong_FromLongLong((PY_LONG_LONG) value);
  155624. #endif
  155625. }
  155626. }
  155627. {
  155628. int one = 1; int little = (int)*(unsigned char *)&one;
  155629. unsigned char *bytes = (unsigned char *)&value;
  155630. return _PyLong_FromByteArray(bytes, sizeof(unsigned long),
  155631. little, !is_unsigned);
  155632. }
  155633. }
  155634. /* CIntToPy */
  155635. static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum____pyx_t_6uvloop_4loop_SSLProtocolState(enum __pyx_t_6uvloop_4loop_SSLProtocolState value) {
  155636. const enum __pyx_t_6uvloop_4loop_SSLProtocolState neg_one = (enum __pyx_t_6uvloop_4loop_SSLProtocolState) ((enum __pyx_t_6uvloop_4loop_SSLProtocolState) 0 - (enum __pyx_t_6uvloop_4loop_SSLProtocolState) 1), const_zero = (enum __pyx_t_6uvloop_4loop_SSLProtocolState) 0;
  155637. const int is_unsigned = neg_one > const_zero;
  155638. if (is_unsigned) {
  155639. if (sizeof(enum __pyx_t_6uvloop_4loop_SSLProtocolState) < sizeof(long)) {
  155640. return PyInt_FromLong((long) value);
  155641. } else if (sizeof(enum __pyx_t_6uvloop_4loop_SSLProtocolState) <= sizeof(unsigned long)) {
  155642. return PyLong_FromUnsignedLong((unsigned long) value);
  155643. #ifdef HAVE_LONG_LONG
  155644. } else if (sizeof(enum __pyx_t_6uvloop_4loop_SSLProtocolState) <= sizeof(unsigned PY_LONG_LONG)) {
  155645. return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
  155646. #endif
  155647. }
  155648. } else {
  155649. if (sizeof(enum __pyx_t_6uvloop_4loop_SSLProtocolState) <= sizeof(long)) {
  155650. return PyInt_FromLong((long) value);
  155651. #ifdef HAVE_LONG_LONG
  155652. } else if (sizeof(enum __pyx_t_6uvloop_4loop_SSLProtocolState) <= sizeof(PY_LONG_LONG)) {
  155653. return PyLong_FromLongLong((PY_LONG_LONG) value);
  155654. #endif
  155655. }
  155656. }
  155657. {
  155658. int one = 1; int little = (int)*(unsigned char *)&one;
  155659. unsigned char *bytes = (unsigned char *)&value;
  155660. return _PyLong_FromByteArray(bytes, sizeof(enum __pyx_t_6uvloop_4loop_SSLProtocolState),
  155661. little, !is_unsigned);
  155662. }
  155663. }
  155664. /* CIntFromPy */
  155665. static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
  155666. const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0;
  155667. const int is_unsigned = neg_one > const_zero;
  155668. #if PY_MAJOR_VERSION < 3
  155669. if (likely(PyInt_Check(x))) {
  155670. if (sizeof(int) < sizeof(long)) {
  155671. __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
  155672. } else {
  155673. long val = PyInt_AS_LONG(x);
  155674. if (is_unsigned && unlikely(val < 0)) {
  155675. goto raise_neg_overflow;
  155676. }
  155677. return (int) val;
  155678. }
  155679. } else
  155680. #endif
  155681. if (likely(PyLong_Check(x))) {
  155682. if (is_unsigned) {
  155683. #if CYTHON_USE_PYLONG_INTERNALS
  155684. const digit* digits = ((PyLongObject*)x)->ob_digit;
  155685. switch (Py_SIZE(x)) {
  155686. case 0: return (int) 0;
  155687. case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0])
  155688. case 2:
  155689. if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
  155690. if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
  155691. __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  155692. } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) {
  155693. return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
  155694. }
  155695. }
  155696. break;
  155697. case 3:
  155698. if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
  155699. if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
  155700. __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  155701. } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) {
  155702. return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
  155703. }
  155704. }
  155705. break;
  155706. case 4:
  155707. if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
  155708. if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
  155709. __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  155710. } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) {
  155711. return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
  155712. }
  155713. }
  155714. break;
  155715. }
  155716. #endif
  155717. #if CYTHON_COMPILING_IN_CPYTHON
  155718. if (unlikely(Py_SIZE(x) < 0)) {
  155719. goto raise_neg_overflow;
  155720. }
  155721. #else
  155722. {
  155723. int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
  155724. if (unlikely(result < 0))
  155725. return (int) -1;
  155726. if (unlikely(result == 1))
  155727. goto raise_neg_overflow;
  155728. }
  155729. #endif
  155730. if (sizeof(int) <= sizeof(unsigned long)) {
  155731. __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
  155732. #ifdef HAVE_LONG_LONG
  155733. } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
  155734. __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
  155735. #endif
  155736. }
  155737. } else {
  155738. #if CYTHON_USE_PYLONG_INTERNALS
  155739. const digit* digits = ((PyLongObject*)x)->ob_digit;
  155740. switch (Py_SIZE(x)) {
  155741. case 0: return (int) 0;
  155742. case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0]))
  155743. case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0])
  155744. case -2:
  155745. if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) {
  155746. if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
  155747. __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  155748. } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
  155749. return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
  155750. }
  155751. }
  155752. break;
  155753. case 2:
  155754. if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
  155755. if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
  155756. __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  155757. } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
  155758. return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
  155759. }
  155760. }
  155761. break;
  155762. case -3:
  155763. if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
  155764. if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
  155765. __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  155766. } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
  155767. return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
  155768. }
  155769. }
  155770. break;
  155771. case 3:
  155772. if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
  155773. if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
  155774. __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  155775. } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
  155776. return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
  155777. }
  155778. }
  155779. break;
  155780. case -4:
  155781. if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
  155782. if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
  155783. __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  155784. } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
  155785. return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
  155786. }
  155787. }
  155788. break;
  155789. case 4:
  155790. if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
  155791. if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
  155792. __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  155793. } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
  155794. return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
  155795. }
  155796. }
  155797. break;
  155798. }
  155799. #endif
  155800. if (sizeof(int) <= sizeof(long)) {
  155801. __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
  155802. #ifdef HAVE_LONG_LONG
  155803. } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
  155804. __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
  155805. #endif
  155806. }
  155807. }
  155808. {
  155809. #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
  155810. PyErr_SetString(PyExc_RuntimeError,
  155811. "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
  155812. #else
  155813. int val;
  155814. PyObject *v = __Pyx_PyNumber_IntOrLong(x);
  155815. #if PY_MAJOR_VERSION < 3
  155816. if (likely(v) && !PyLong_Check(v)) {
  155817. PyObject *tmp = v;
  155818. v = PyNumber_Long(tmp);
  155819. Py_DECREF(tmp);
  155820. }
  155821. #endif
  155822. if (likely(v)) {
  155823. int one = 1; int is_little = (int)*(unsigned char *)&one;
  155824. unsigned char *bytes = (unsigned char *)&val;
  155825. int ret = _PyLong_AsByteArray((PyLongObject *)v,
  155826. bytes, sizeof(val),
  155827. is_little, !is_unsigned);
  155828. Py_DECREF(v);
  155829. if (likely(!ret))
  155830. return val;
  155831. }
  155832. #endif
  155833. return (int) -1;
  155834. }
  155835. } else {
  155836. int val;
  155837. PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
  155838. if (!tmp) return (int) -1;
  155839. val = __Pyx_PyInt_As_int(tmp);
  155840. Py_DECREF(tmp);
  155841. return val;
  155842. }
  155843. raise_overflow:
  155844. PyErr_SetString(PyExc_OverflowError,
  155845. "value too large to convert to int");
  155846. return (int) -1;
  155847. raise_neg_overflow:
  155848. PyErr_SetString(PyExc_OverflowError,
  155849. "can't convert negative value to int");
  155850. return (int) -1;
  155851. }
  155852. /* CIntFromPy */
  155853. static CYTHON_INLINE int64_t __Pyx_PyInt_As_int64_t(PyObject *x) {
  155854. const int64_t neg_one = (int64_t) ((int64_t) 0 - (int64_t) 1), const_zero = (int64_t) 0;
  155855. const int is_unsigned = neg_one > const_zero;
  155856. #if PY_MAJOR_VERSION < 3
  155857. if (likely(PyInt_Check(x))) {
  155858. if (sizeof(int64_t) < sizeof(long)) {
  155859. __PYX_VERIFY_RETURN_INT(int64_t, long, PyInt_AS_LONG(x))
  155860. } else {
  155861. long val = PyInt_AS_LONG(x);
  155862. if (is_unsigned && unlikely(val < 0)) {
  155863. goto raise_neg_overflow;
  155864. }
  155865. return (int64_t) val;
  155866. }
  155867. } else
  155868. #endif
  155869. if (likely(PyLong_Check(x))) {
  155870. if (is_unsigned) {
  155871. #if CYTHON_USE_PYLONG_INTERNALS
  155872. const digit* digits = ((PyLongObject*)x)->ob_digit;
  155873. switch (Py_SIZE(x)) {
  155874. case 0: return (int64_t) 0;
  155875. case 1: __PYX_VERIFY_RETURN_INT(int64_t, digit, digits[0])
  155876. case 2:
  155877. if (8 * sizeof(int64_t) > 1 * PyLong_SHIFT) {
  155878. if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
  155879. __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  155880. } else if (8 * sizeof(int64_t) >= 2 * PyLong_SHIFT) {
  155881. return (int64_t) (((((int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]));
  155882. }
  155883. }
  155884. break;
  155885. case 3:
  155886. if (8 * sizeof(int64_t) > 2 * PyLong_SHIFT) {
  155887. if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
  155888. __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  155889. } else if (8 * sizeof(int64_t) >= 3 * PyLong_SHIFT) {
  155890. return (int64_t) (((((((int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]));
  155891. }
  155892. }
  155893. break;
  155894. case 4:
  155895. if (8 * sizeof(int64_t) > 3 * PyLong_SHIFT) {
  155896. if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
  155897. __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  155898. } else if (8 * sizeof(int64_t) >= 4 * PyLong_SHIFT) {
  155899. return (int64_t) (((((((((int64_t)digits[3]) << PyLong_SHIFT) | (int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]));
  155900. }
  155901. }
  155902. break;
  155903. }
  155904. #endif
  155905. #if CYTHON_COMPILING_IN_CPYTHON
  155906. if (unlikely(Py_SIZE(x) < 0)) {
  155907. goto raise_neg_overflow;
  155908. }
  155909. #else
  155910. {
  155911. int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
  155912. if (unlikely(result < 0))
  155913. return (int64_t) -1;
  155914. if (unlikely(result == 1))
  155915. goto raise_neg_overflow;
  155916. }
  155917. #endif
  155918. if (sizeof(int64_t) <= sizeof(unsigned long)) {
  155919. __PYX_VERIFY_RETURN_INT_EXC(int64_t, unsigned long, PyLong_AsUnsignedLong(x))
  155920. #ifdef HAVE_LONG_LONG
  155921. } else if (sizeof(int64_t) <= sizeof(unsigned PY_LONG_LONG)) {
  155922. __PYX_VERIFY_RETURN_INT_EXC(int64_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
  155923. #endif
  155924. }
  155925. } else {
  155926. #if CYTHON_USE_PYLONG_INTERNALS
  155927. const digit* digits = ((PyLongObject*)x)->ob_digit;
  155928. switch (Py_SIZE(x)) {
  155929. case 0: return (int64_t) 0;
  155930. case -1: __PYX_VERIFY_RETURN_INT(int64_t, sdigit, (sdigit) (-(sdigit)digits[0]))
  155931. case 1: __PYX_VERIFY_RETURN_INT(int64_t, digit, +digits[0])
  155932. case -2:
  155933. if (8 * sizeof(int64_t) - 1 > 1 * PyLong_SHIFT) {
  155934. if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
  155935. __PYX_VERIFY_RETURN_INT(int64_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  155936. } else if (8 * sizeof(int64_t) - 1 > 2 * PyLong_SHIFT) {
  155937. return (int64_t) (((int64_t)-1)*(((((int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])));
  155938. }
  155939. }
  155940. break;
  155941. case 2:
  155942. if (8 * sizeof(int64_t) > 1 * PyLong_SHIFT) {
  155943. if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
  155944. __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  155945. } else if (8 * sizeof(int64_t) - 1 > 2 * PyLong_SHIFT) {
  155946. return (int64_t) ((((((int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])));
  155947. }
  155948. }
  155949. break;
  155950. case -3:
  155951. if (8 * sizeof(int64_t) - 1 > 2 * PyLong_SHIFT) {
  155952. if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
  155953. __PYX_VERIFY_RETURN_INT(int64_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  155954. } else if (8 * sizeof(int64_t) - 1 > 3 * PyLong_SHIFT) {
  155955. return (int64_t) (((int64_t)-1)*(((((((int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])));
  155956. }
  155957. }
  155958. break;
  155959. case 3:
  155960. if (8 * sizeof(int64_t) > 2 * PyLong_SHIFT) {
  155961. if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
  155962. __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  155963. } else if (8 * sizeof(int64_t) - 1 > 3 * PyLong_SHIFT) {
  155964. return (int64_t) ((((((((int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])));
  155965. }
  155966. }
  155967. break;
  155968. case -4:
  155969. if (8 * sizeof(int64_t) - 1 > 3 * PyLong_SHIFT) {
  155970. if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
  155971. __PYX_VERIFY_RETURN_INT(int64_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  155972. } else if (8 * sizeof(int64_t) - 1 > 4 * PyLong_SHIFT) {
  155973. return (int64_t) (((int64_t)-1)*(((((((((int64_t)digits[3]) << PyLong_SHIFT) | (int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])));
  155974. }
  155975. }
  155976. break;
  155977. case 4:
  155978. if (8 * sizeof(int64_t) > 3 * PyLong_SHIFT) {
  155979. if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
  155980. __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  155981. } else if (8 * sizeof(int64_t) - 1 > 4 * PyLong_SHIFT) {
  155982. return (int64_t) ((((((((((int64_t)digits[3]) << PyLong_SHIFT) | (int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])));
  155983. }
  155984. }
  155985. break;
  155986. }
  155987. #endif
  155988. if (sizeof(int64_t) <= sizeof(long)) {
  155989. __PYX_VERIFY_RETURN_INT_EXC(int64_t, long, PyLong_AsLong(x))
  155990. #ifdef HAVE_LONG_LONG
  155991. } else if (sizeof(int64_t) <= sizeof(PY_LONG_LONG)) {
  155992. __PYX_VERIFY_RETURN_INT_EXC(int64_t, PY_LONG_LONG, PyLong_AsLongLong(x))
  155993. #endif
  155994. }
  155995. }
  155996. {
  155997. #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
  155998. PyErr_SetString(PyExc_RuntimeError,
  155999. "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
  156000. #else
  156001. int64_t val;
  156002. PyObject *v = __Pyx_PyNumber_IntOrLong(x);
  156003. #if PY_MAJOR_VERSION < 3
  156004. if (likely(v) && !PyLong_Check(v)) {
  156005. PyObject *tmp = v;
  156006. v = PyNumber_Long(tmp);
  156007. Py_DECREF(tmp);
  156008. }
  156009. #endif
  156010. if (likely(v)) {
  156011. int one = 1; int is_little = (int)*(unsigned char *)&one;
  156012. unsigned char *bytes = (unsigned char *)&val;
  156013. int ret = _PyLong_AsByteArray((PyLongObject *)v,
  156014. bytes, sizeof(val),
  156015. is_little, !is_unsigned);
  156016. Py_DECREF(v);
  156017. if (likely(!ret))
  156018. return val;
  156019. }
  156020. #endif
  156021. return (int64_t) -1;
  156022. }
  156023. } else {
  156024. int64_t val;
  156025. PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
  156026. if (!tmp) return (int64_t) -1;
  156027. val = __Pyx_PyInt_As_int64_t(tmp);
  156028. Py_DECREF(tmp);
  156029. return val;
  156030. }
  156031. raise_overflow:
  156032. PyErr_SetString(PyExc_OverflowError,
  156033. "value too large to convert to int64_t");
  156034. return (int64_t) -1;
  156035. raise_neg_overflow:
  156036. PyErr_SetString(PyExc_OverflowError,
  156037. "can't convert negative value to int64_t");
  156038. return (int64_t) -1;
  156039. }
  156040. /* CIntFromPy */
  156041. static CYTHON_INLINE uint64_t __Pyx_PyInt_As_uint64_t(PyObject *x) {
  156042. const uint64_t neg_one = (uint64_t) ((uint64_t) 0 - (uint64_t) 1), const_zero = (uint64_t) 0;
  156043. const int is_unsigned = neg_one > const_zero;
  156044. #if PY_MAJOR_VERSION < 3
  156045. if (likely(PyInt_Check(x))) {
  156046. if (sizeof(uint64_t) < sizeof(long)) {
  156047. __PYX_VERIFY_RETURN_INT(uint64_t, long, PyInt_AS_LONG(x))
  156048. } else {
  156049. long val = PyInt_AS_LONG(x);
  156050. if (is_unsigned && unlikely(val < 0)) {
  156051. goto raise_neg_overflow;
  156052. }
  156053. return (uint64_t) val;
  156054. }
  156055. } else
  156056. #endif
  156057. if (likely(PyLong_Check(x))) {
  156058. if (is_unsigned) {
  156059. #if CYTHON_USE_PYLONG_INTERNALS
  156060. const digit* digits = ((PyLongObject*)x)->ob_digit;
  156061. switch (Py_SIZE(x)) {
  156062. case 0: return (uint64_t) 0;
  156063. case 1: __PYX_VERIFY_RETURN_INT(uint64_t, digit, digits[0])
  156064. case 2:
  156065. if (8 * sizeof(uint64_t) > 1 * PyLong_SHIFT) {
  156066. if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
  156067. __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  156068. } else if (8 * sizeof(uint64_t) >= 2 * PyLong_SHIFT) {
  156069. return (uint64_t) (((((uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0]));
  156070. }
  156071. }
  156072. break;
  156073. case 3:
  156074. if (8 * sizeof(uint64_t) > 2 * PyLong_SHIFT) {
  156075. if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
  156076. __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  156077. } else if (8 * sizeof(uint64_t) >= 3 * PyLong_SHIFT) {
  156078. return (uint64_t) (((((((uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0]));
  156079. }
  156080. }
  156081. break;
  156082. case 4:
  156083. if (8 * sizeof(uint64_t) > 3 * PyLong_SHIFT) {
  156084. if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
  156085. __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  156086. } else if (8 * sizeof(uint64_t) >= 4 * PyLong_SHIFT) {
  156087. return (uint64_t) (((((((((uint64_t)digits[3]) << PyLong_SHIFT) | (uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0]));
  156088. }
  156089. }
  156090. break;
  156091. }
  156092. #endif
  156093. #if CYTHON_COMPILING_IN_CPYTHON
  156094. if (unlikely(Py_SIZE(x) < 0)) {
  156095. goto raise_neg_overflow;
  156096. }
  156097. #else
  156098. {
  156099. int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
  156100. if (unlikely(result < 0))
  156101. return (uint64_t) -1;
  156102. if (unlikely(result == 1))
  156103. goto raise_neg_overflow;
  156104. }
  156105. #endif
  156106. if (sizeof(uint64_t) <= sizeof(unsigned long)) {
  156107. __PYX_VERIFY_RETURN_INT_EXC(uint64_t, unsigned long, PyLong_AsUnsignedLong(x))
  156108. #ifdef HAVE_LONG_LONG
  156109. } else if (sizeof(uint64_t) <= sizeof(unsigned PY_LONG_LONG)) {
  156110. __PYX_VERIFY_RETURN_INT_EXC(uint64_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
  156111. #endif
  156112. }
  156113. } else {
  156114. #if CYTHON_USE_PYLONG_INTERNALS
  156115. const digit* digits = ((PyLongObject*)x)->ob_digit;
  156116. switch (Py_SIZE(x)) {
  156117. case 0: return (uint64_t) 0;
  156118. case -1: __PYX_VERIFY_RETURN_INT(uint64_t, sdigit, (sdigit) (-(sdigit)digits[0]))
  156119. case 1: __PYX_VERIFY_RETURN_INT(uint64_t, digit, +digits[0])
  156120. case -2:
  156121. if (8 * sizeof(uint64_t) - 1 > 1 * PyLong_SHIFT) {
  156122. if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
  156123. __PYX_VERIFY_RETURN_INT(uint64_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  156124. } else if (8 * sizeof(uint64_t) - 1 > 2 * PyLong_SHIFT) {
  156125. return (uint64_t) (((uint64_t)-1)*(((((uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0])));
  156126. }
  156127. }
  156128. break;
  156129. case 2:
  156130. if (8 * sizeof(uint64_t) > 1 * PyLong_SHIFT) {
  156131. if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
  156132. __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  156133. } else if (8 * sizeof(uint64_t) - 1 > 2 * PyLong_SHIFT) {
  156134. return (uint64_t) ((((((uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0])));
  156135. }
  156136. }
  156137. break;
  156138. case -3:
  156139. if (8 * sizeof(uint64_t) - 1 > 2 * PyLong_SHIFT) {
  156140. if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
  156141. __PYX_VERIFY_RETURN_INT(uint64_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  156142. } else if (8 * sizeof(uint64_t) - 1 > 3 * PyLong_SHIFT) {
  156143. return (uint64_t) (((uint64_t)-1)*(((((((uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0])));
  156144. }
  156145. }
  156146. break;
  156147. case 3:
  156148. if (8 * sizeof(uint64_t) > 2 * PyLong_SHIFT) {
  156149. if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
  156150. __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  156151. } else if (8 * sizeof(uint64_t) - 1 > 3 * PyLong_SHIFT) {
  156152. return (uint64_t) ((((((((uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0])));
  156153. }
  156154. }
  156155. break;
  156156. case -4:
  156157. if (8 * sizeof(uint64_t) - 1 > 3 * PyLong_SHIFT) {
  156158. if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
  156159. __PYX_VERIFY_RETURN_INT(uint64_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  156160. } else if (8 * sizeof(uint64_t) - 1 > 4 * PyLong_SHIFT) {
  156161. return (uint64_t) (((uint64_t)-1)*(((((((((uint64_t)digits[3]) << PyLong_SHIFT) | (uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0])));
  156162. }
  156163. }
  156164. break;
  156165. case 4:
  156166. if (8 * sizeof(uint64_t) > 3 * PyLong_SHIFT) {
  156167. if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
  156168. __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  156169. } else if (8 * sizeof(uint64_t) - 1 > 4 * PyLong_SHIFT) {
  156170. return (uint64_t) ((((((((((uint64_t)digits[3]) << PyLong_SHIFT) | (uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0])));
  156171. }
  156172. }
  156173. break;
  156174. }
  156175. #endif
  156176. if (sizeof(uint64_t) <= sizeof(long)) {
  156177. __PYX_VERIFY_RETURN_INT_EXC(uint64_t, long, PyLong_AsLong(x))
  156178. #ifdef HAVE_LONG_LONG
  156179. } else if (sizeof(uint64_t) <= sizeof(PY_LONG_LONG)) {
  156180. __PYX_VERIFY_RETURN_INT_EXC(uint64_t, PY_LONG_LONG, PyLong_AsLongLong(x))
  156181. #endif
  156182. }
  156183. }
  156184. {
  156185. #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
  156186. PyErr_SetString(PyExc_RuntimeError,
  156187. "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
  156188. #else
  156189. uint64_t val;
  156190. PyObject *v = __Pyx_PyNumber_IntOrLong(x);
  156191. #if PY_MAJOR_VERSION < 3
  156192. if (likely(v) && !PyLong_Check(v)) {
  156193. PyObject *tmp = v;
  156194. v = PyNumber_Long(tmp);
  156195. Py_DECREF(tmp);
  156196. }
  156197. #endif
  156198. if (likely(v)) {
  156199. int one = 1; int is_little = (int)*(unsigned char *)&one;
  156200. unsigned char *bytes = (unsigned char *)&val;
  156201. int ret = _PyLong_AsByteArray((PyLongObject *)v,
  156202. bytes, sizeof(val),
  156203. is_little, !is_unsigned);
  156204. Py_DECREF(v);
  156205. if (likely(!ret))
  156206. return val;
  156207. }
  156208. #endif
  156209. return (uint64_t) -1;
  156210. }
  156211. } else {
  156212. uint64_t val;
  156213. PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
  156214. if (!tmp) return (uint64_t) -1;
  156215. val = __Pyx_PyInt_As_uint64_t(tmp);
  156216. Py_DECREF(tmp);
  156217. return val;
  156218. }
  156219. raise_overflow:
  156220. PyErr_SetString(PyExc_OverflowError,
  156221. "value too large to convert to uint64_t");
  156222. return (uint64_t) -1;
  156223. raise_neg_overflow:
  156224. PyErr_SetString(PyExc_OverflowError,
  156225. "can't convert negative value to uint64_t");
  156226. return (uint64_t) -1;
  156227. }
  156228. /* CIntFromPy */
  156229. static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
  156230. const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0;
  156231. const int is_unsigned = neg_one > const_zero;
  156232. #if PY_MAJOR_VERSION < 3
  156233. if (likely(PyInt_Check(x))) {
  156234. if (sizeof(long) < sizeof(long)) {
  156235. __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
  156236. } else {
  156237. long val = PyInt_AS_LONG(x);
  156238. if (is_unsigned && unlikely(val < 0)) {
  156239. goto raise_neg_overflow;
  156240. }
  156241. return (long) val;
  156242. }
  156243. } else
  156244. #endif
  156245. if (likely(PyLong_Check(x))) {
  156246. if (is_unsigned) {
  156247. #if CYTHON_USE_PYLONG_INTERNALS
  156248. const digit* digits = ((PyLongObject*)x)->ob_digit;
  156249. switch (Py_SIZE(x)) {
  156250. case 0: return (long) 0;
  156251. case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0])
  156252. case 2:
  156253. if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
  156254. if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
  156255. __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  156256. } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) {
  156257. return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
  156258. }
  156259. }
  156260. break;
  156261. case 3:
  156262. if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
  156263. if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
  156264. __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  156265. } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) {
  156266. return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
  156267. }
  156268. }
  156269. break;
  156270. case 4:
  156271. if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
  156272. if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
  156273. __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  156274. } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) {
  156275. return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
  156276. }
  156277. }
  156278. break;
  156279. }
  156280. #endif
  156281. #if CYTHON_COMPILING_IN_CPYTHON
  156282. if (unlikely(Py_SIZE(x) < 0)) {
  156283. goto raise_neg_overflow;
  156284. }
  156285. #else
  156286. {
  156287. int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
  156288. if (unlikely(result < 0))
  156289. return (long) -1;
  156290. if (unlikely(result == 1))
  156291. goto raise_neg_overflow;
  156292. }
  156293. #endif
  156294. if (sizeof(long) <= sizeof(unsigned long)) {
  156295. __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
  156296. #ifdef HAVE_LONG_LONG
  156297. } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
  156298. __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
  156299. #endif
  156300. }
  156301. } else {
  156302. #if CYTHON_USE_PYLONG_INTERNALS
  156303. const digit* digits = ((PyLongObject*)x)->ob_digit;
  156304. switch (Py_SIZE(x)) {
  156305. case 0: return (long) 0;
  156306. case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0]))
  156307. case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0])
  156308. case -2:
  156309. if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) {
  156310. if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
  156311. __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  156312. } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
  156313. return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
  156314. }
  156315. }
  156316. break;
  156317. case 2:
  156318. if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
  156319. if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
  156320. __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  156321. } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
  156322. return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
  156323. }
  156324. }
  156325. break;
  156326. case -3:
  156327. if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
  156328. if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
  156329. __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  156330. } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
  156331. return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
  156332. }
  156333. }
  156334. break;
  156335. case 3:
  156336. if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
  156337. if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
  156338. __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  156339. } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
  156340. return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
  156341. }
  156342. }
  156343. break;
  156344. case -4:
  156345. if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
  156346. if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
  156347. __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  156348. } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
  156349. return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
  156350. }
  156351. }
  156352. break;
  156353. case 4:
  156354. if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
  156355. if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
  156356. __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  156357. } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
  156358. return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
  156359. }
  156360. }
  156361. break;
  156362. }
  156363. #endif
  156364. if (sizeof(long) <= sizeof(long)) {
  156365. __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
  156366. #ifdef HAVE_LONG_LONG
  156367. } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
  156368. __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
  156369. #endif
  156370. }
  156371. }
  156372. {
  156373. #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
  156374. PyErr_SetString(PyExc_RuntimeError,
  156375. "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
  156376. #else
  156377. long val;
  156378. PyObject *v = __Pyx_PyNumber_IntOrLong(x);
  156379. #if PY_MAJOR_VERSION < 3
  156380. if (likely(v) && !PyLong_Check(v)) {
  156381. PyObject *tmp = v;
  156382. v = PyNumber_Long(tmp);
  156383. Py_DECREF(tmp);
  156384. }
  156385. #endif
  156386. if (likely(v)) {
  156387. int one = 1; int is_little = (int)*(unsigned char *)&one;
  156388. unsigned char *bytes = (unsigned char *)&val;
  156389. int ret = _PyLong_AsByteArray((PyLongObject *)v,
  156390. bytes, sizeof(val),
  156391. is_little, !is_unsigned);
  156392. Py_DECREF(v);
  156393. if (likely(!ret))
  156394. return val;
  156395. }
  156396. #endif
  156397. return (long) -1;
  156398. }
  156399. } else {
  156400. long val;
  156401. PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
  156402. if (!tmp) return (long) -1;
  156403. val = __Pyx_PyInt_As_long(tmp);
  156404. Py_DECREF(tmp);
  156405. return val;
  156406. }
  156407. raise_overflow:
  156408. PyErr_SetString(PyExc_OverflowError,
  156409. "value too large to convert to long");
  156410. return (long) -1;
  156411. raise_neg_overflow:
  156412. PyErr_SetString(PyExc_OverflowError,
  156413. "can't convert negative value to long");
  156414. return (long) -1;
  156415. }
  156416. /* CIntFromPy */
  156417. static CYTHON_INLINE unsigned long __Pyx_PyInt_As_unsigned_long(PyObject *x) {
  156418. const unsigned long neg_one = (unsigned long) ((unsigned long) 0 - (unsigned long) 1), const_zero = (unsigned long) 0;
  156419. const int is_unsigned = neg_one > const_zero;
  156420. #if PY_MAJOR_VERSION < 3
  156421. if (likely(PyInt_Check(x))) {
  156422. if (sizeof(unsigned long) < sizeof(long)) {
  156423. __PYX_VERIFY_RETURN_INT(unsigned long, long, PyInt_AS_LONG(x))
  156424. } else {
  156425. long val = PyInt_AS_LONG(x);
  156426. if (is_unsigned && unlikely(val < 0)) {
  156427. goto raise_neg_overflow;
  156428. }
  156429. return (unsigned long) val;
  156430. }
  156431. } else
  156432. #endif
  156433. if (likely(PyLong_Check(x))) {
  156434. if (is_unsigned) {
  156435. #if CYTHON_USE_PYLONG_INTERNALS
  156436. const digit* digits = ((PyLongObject*)x)->ob_digit;
  156437. switch (Py_SIZE(x)) {
  156438. case 0: return (unsigned long) 0;
  156439. case 1: __PYX_VERIFY_RETURN_INT(unsigned long, digit, digits[0])
  156440. case 2:
  156441. if (8 * sizeof(unsigned long) > 1 * PyLong_SHIFT) {
  156442. if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
  156443. __PYX_VERIFY_RETURN_INT(unsigned long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  156444. } else if (8 * sizeof(unsigned long) >= 2 * PyLong_SHIFT) {
  156445. return (unsigned long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
  156446. }
  156447. }
  156448. break;
  156449. case 3:
  156450. if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
  156451. if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
  156452. __PYX_VERIFY_RETURN_INT(unsigned long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  156453. } else if (8 * sizeof(unsigned long) >= 3 * PyLong_SHIFT) {
  156454. return (unsigned long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
  156455. }
  156456. }
  156457. break;
  156458. case 4:
  156459. if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
  156460. if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
  156461. __PYX_VERIFY_RETURN_INT(unsigned long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  156462. } else if (8 * sizeof(unsigned long) >= 4 * PyLong_SHIFT) {
  156463. return (unsigned long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
  156464. }
  156465. }
  156466. break;
  156467. }
  156468. #endif
  156469. #if CYTHON_COMPILING_IN_CPYTHON
  156470. if (unlikely(Py_SIZE(x) < 0)) {
  156471. goto raise_neg_overflow;
  156472. }
  156473. #else
  156474. {
  156475. int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
  156476. if (unlikely(result < 0))
  156477. return (unsigned long) -1;
  156478. if (unlikely(result == 1))
  156479. goto raise_neg_overflow;
  156480. }
  156481. #endif
  156482. if (sizeof(unsigned long) <= sizeof(unsigned long)) {
  156483. __PYX_VERIFY_RETURN_INT_EXC(unsigned long, unsigned long, PyLong_AsUnsignedLong(x))
  156484. #ifdef HAVE_LONG_LONG
  156485. } else if (sizeof(unsigned long) <= sizeof(unsigned PY_LONG_LONG)) {
  156486. __PYX_VERIFY_RETURN_INT_EXC(unsigned long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
  156487. #endif
  156488. }
  156489. } else {
  156490. #if CYTHON_USE_PYLONG_INTERNALS
  156491. const digit* digits = ((PyLongObject*)x)->ob_digit;
  156492. switch (Py_SIZE(x)) {
  156493. case 0: return (unsigned long) 0;
  156494. case -1: __PYX_VERIFY_RETURN_INT(unsigned long, sdigit, (sdigit) (-(sdigit)digits[0]))
  156495. case 1: __PYX_VERIFY_RETURN_INT(unsigned long, digit, +digits[0])
  156496. case -2:
  156497. if (8 * sizeof(unsigned long) - 1 > 1 * PyLong_SHIFT) {
  156498. if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
  156499. __PYX_VERIFY_RETURN_INT(unsigned long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  156500. } else if (8 * sizeof(unsigned long) - 1 > 2 * PyLong_SHIFT) {
  156501. return (unsigned long) (((unsigned long)-1)*(((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])));
  156502. }
  156503. }
  156504. break;
  156505. case 2:
  156506. if (8 * sizeof(unsigned long) > 1 * PyLong_SHIFT) {
  156507. if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
  156508. __PYX_VERIFY_RETURN_INT(unsigned long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  156509. } else if (8 * sizeof(unsigned long) - 1 > 2 * PyLong_SHIFT) {
  156510. return (unsigned long) ((((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])));
  156511. }
  156512. }
  156513. break;
  156514. case -3:
  156515. if (8 * sizeof(unsigned long) - 1 > 2 * PyLong_SHIFT) {
  156516. if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
  156517. __PYX_VERIFY_RETURN_INT(unsigned long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  156518. } else if (8 * sizeof(unsigned long) - 1 > 3 * PyLong_SHIFT) {
  156519. return (unsigned long) (((unsigned long)-1)*(((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])));
  156520. }
  156521. }
  156522. break;
  156523. case 3:
  156524. if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
  156525. if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
  156526. __PYX_VERIFY_RETURN_INT(unsigned long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  156527. } else if (8 * sizeof(unsigned long) - 1 > 3 * PyLong_SHIFT) {
  156528. return (unsigned long) ((((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])));
  156529. }
  156530. }
  156531. break;
  156532. case -4:
  156533. if (8 * sizeof(unsigned long) - 1 > 3 * PyLong_SHIFT) {
  156534. if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
  156535. __PYX_VERIFY_RETURN_INT(unsigned long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  156536. } else if (8 * sizeof(unsigned long) - 1 > 4 * PyLong_SHIFT) {
  156537. return (unsigned long) (((unsigned long)-1)*(((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])));
  156538. }
  156539. }
  156540. break;
  156541. case 4:
  156542. if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
  156543. if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
  156544. __PYX_VERIFY_RETURN_INT(unsigned long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  156545. } else if (8 * sizeof(unsigned long) - 1 > 4 * PyLong_SHIFT) {
  156546. return (unsigned long) ((((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])));
  156547. }
  156548. }
  156549. break;
  156550. }
  156551. #endif
  156552. if (sizeof(unsigned long) <= sizeof(long)) {
  156553. __PYX_VERIFY_RETURN_INT_EXC(unsigned long, long, PyLong_AsLong(x))
  156554. #ifdef HAVE_LONG_LONG
  156555. } else if (sizeof(unsigned long) <= sizeof(PY_LONG_LONG)) {
  156556. __PYX_VERIFY_RETURN_INT_EXC(unsigned long, PY_LONG_LONG, PyLong_AsLongLong(x))
  156557. #endif
  156558. }
  156559. }
  156560. {
  156561. #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
  156562. PyErr_SetString(PyExc_RuntimeError,
  156563. "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
  156564. #else
  156565. unsigned long val;
  156566. PyObject *v = __Pyx_PyNumber_IntOrLong(x);
  156567. #if PY_MAJOR_VERSION < 3
  156568. if (likely(v) && !PyLong_Check(v)) {
  156569. PyObject *tmp = v;
  156570. v = PyNumber_Long(tmp);
  156571. Py_DECREF(tmp);
  156572. }
  156573. #endif
  156574. if (likely(v)) {
  156575. int one = 1; int is_little = (int)*(unsigned char *)&one;
  156576. unsigned char *bytes = (unsigned char *)&val;
  156577. int ret = _PyLong_AsByteArray((PyLongObject *)v,
  156578. bytes, sizeof(val),
  156579. is_little, !is_unsigned);
  156580. Py_DECREF(v);
  156581. if (likely(!ret))
  156582. return val;
  156583. }
  156584. #endif
  156585. return (unsigned long) -1;
  156586. }
  156587. } else {
  156588. unsigned long val;
  156589. PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
  156590. if (!tmp) return (unsigned long) -1;
  156591. val = __Pyx_PyInt_As_unsigned_long(tmp);
  156592. Py_DECREF(tmp);
  156593. return val;
  156594. }
  156595. raise_overflow:
  156596. PyErr_SetString(PyExc_OverflowError,
  156597. "value too large to convert to unsigned long");
  156598. return (unsigned long) -1;
  156599. raise_neg_overflow:
  156600. PyErr_SetString(PyExc_OverflowError,
  156601. "can't convert negative value to unsigned long");
  156602. return (unsigned long) -1;
  156603. }
  156604. /* CIntFromPy */
  156605. static CYTHON_INLINE unsigned int __Pyx_PyInt_As_unsigned_int(PyObject *x) {
  156606. const unsigned int neg_one = (unsigned int) ((unsigned int) 0 - (unsigned int) 1), const_zero = (unsigned int) 0;
  156607. const int is_unsigned = neg_one > const_zero;
  156608. #if PY_MAJOR_VERSION < 3
  156609. if (likely(PyInt_Check(x))) {
  156610. if (sizeof(unsigned int) < sizeof(long)) {
  156611. __PYX_VERIFY_RETURN_INT(unsigned int, long, PyInt_AS_LONG(x))
  156612. } else {
  156613. long val = PyInt_AS_LONG(x);
  156614. if (is_unsigned && unlikely(val < 0)) {
  156615. goto raise_neg_overflow;
  156616. }
  156617. return (unsigned int) val;
  156618. }
  156619. } else
  156620. #endif
  156621. if (likely(PyLong_Check(x))) {
  156622. if (is_unsigned) {
  156623. #if CYTHON_USE_PYLONG_INTERNALS
  156624. const digit* digits = ((PyLongObject*)x)->ob_digit;
  156625. switch (Py_SIZE(x)) {
  156626. case 0: return (unsigned int) 0;
  156627. case 1: __PYX_VERIFY_RETURN_INT(unsigned int, digit, digits[0])
  156628. case 2:
  156629. if (8 * sizeof(unsigned int) > 1 * PyLong_SHIFT) {
  156630. if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
  156631. __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  156632. } else if (8 * sizeof(unsigned int) >= 2 * PyLong_SHIFT) {
  156633. return (unsigned int) (((((unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0]));
  156634. }
  156635. }
  156636. break;
  156637. case 3:
  156638. if (8 * sizeof(unsigned int) > 2 * PyLong_SHIFT) {
  156639. if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
  156640. __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  156641. } else if (8 * sizeof(unsigned int) >= 3 * PyLong_SHIFT) {
  156642. return (unsigned int) (((((((unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0]));
  156643. }
  156644. }
  156645. break;
  156646. case 4:
  156647. if (8 * sizeof(unsigned int) > 3 * PyLong_SHIFT) {
  156648. if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
  156649. __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  156650. } else if (8 * sizeof(unsigned int) >= 4 * PyLong_SHIFT) {
  156651. return (unsigned int) (((((((((unsigned int)digits[3]) << PyLong_SHIFT) | (unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0]));
  156652. }
  156653. }
  156654. break;
  156655. }
  156656. #endif
  156657. #if CYTHON_COMPILING_IN_CPYTHON
  156658. if (unlikely(Py_SIZE(x) < 0)) {
  156659. goto raise_neg_overflow;
  156660. }
  156661. #else
  156662. {
  156663. int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
  156664. if (unlikely(result < 0))
  156665. return (unsigned int) -1;
  156666. if (unlikely(result == 1))
  156667. goto raise_neg_overflow;
  156668. }
  156669. #endif
  156670. if (sizeof(unsigned int) <= sizeof(unsigned long)) {
  156671. __PYX_VERIFY_RETURN_INT_EXC(unsigned int, unsigned long, PyLong_AsUnsignedLong(x))
  156672. #ifdef HAVE_LONG_LONG
  156673. } else if (sizeof(unsigned int) <= sizeof(unsigned PY_LONG_LONG)) {
  156674. __PYX_VERIFY_RETURN_INT_EXC(unsigned int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
  156675. #endif
  156676. }
  156677. } else {
  156678. #if CYTHON_USE_PYLONG_INTERNALS
  156679. const digit* digits = ((PyLongObject*)x)->ob_digit;
  156680. switch (Py_SIZE(x)) {
  156681. case 0: return (unsigned int) 0;
  156682. case -1: __PYX_VERIFY_RETURN_INT(unsigned int, sdigit, (sdigit) (-(sdigit)digits[0]))
  156683. case 1: __PYX_VERIFY_RETURN_INT(unsigned int, digit, +digits[0])
  156684. case -2:
  156685. if (8 * sizeof(unsigned int) - 1 > 1 * PyLong_SHIFT) {
  156686. if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
  156687. __PYX_VERIFY_RETURN_INT(unsigned int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  156688. } else if (8 * sizeof(unsigned int) - 1 > 2 * PyLong_SHIFT) {
  156689. return (unsigned int) (((unsigned int)-1)*(((((unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])));
  156690. }
  156691. }
  156692. break;
  156693. case 2:
  156694. if (8 * sizeof(unsigned int) > 1 * PyLong_SHIFT) {
  156695. if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
  156696. __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  156697. } else if (8 * sizeof(unsigned int) - 1 > 2 * PyLong_SHIFT) {
  156698. return (unsigned int) ((((((unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])));
  156699. }
  156700. }
  156701. break;
  156702. case -3:
  156703. if (8 * sizeof(unsigned int) - 1 > 2 * PyLong_SHIFT) {
  156704. if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
  156705. __PYX_VERIFY_RETURN_INT(unsigned int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  156706. } else if (8 * sizeof(unsigned int) - 1 > 3 * PyLong_SHIFT) {
  156707. return (unsigned int) (((unsigned int)-1)*(((((((unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])));
  156708. }
  156709. }
  156710. break;
  156711. case 3:
  156712. if (8 * sizeof(unsigned int) > 2 * PyLong_SHIFT) {
  156713. if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
  156714. __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  156715. } else if (8 * sizeof(unsigned int) - 1 > 3 * PyLong_SHIFT) {
  156716. return (unsigned int) ((((((((unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])));
  156717. }
  156718. }
  156719. break;
  156720. case -4:
  156721. if (8 * sizeof(unsigned int) - 1 > 3 * PyLong_SHIFT) {
  156722. if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
  156723. __PYX_VERIFY_RETURN_INT(unsigned int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  156724. } else if (8 * sizeof(unsigned int) - 1 > 4 * PyLong_SHIFT) {
  156725. return (unsigned int) (((unsigned int)-1)*(((((((((unsigned int)digits[3]) << PyLong_SHIFT) | (unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])));
  156726. }
  156727. }
  156728. break;
  156729. case 4:
  156730. if (8 * sizeof(unsigned int) > 3 * PyLong_SHIFT) {
  156731. if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
  156732. __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  156733. } else if (8 * sizeof(unsigned int) - 1 > 4 * PyLong_SHIFT) {
  156734. return (unsigned int) ((((((((((unsigned int)digits[3]) << PyLong_SHIFT) | (unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])));
  156735. }
  156736. }
  156737. break;
  156738. }
  156739. #endif
  156740. if (sizeof(unsigned int) <= sizeof(long)) {
  156741. __PYX_VERIFY_RETURN_INT_EXC(unsigned int, long, PyLong_AsLong(x))
  156742. #ifdef HAVE_LONG_LONG
  156743. } else if (sizeof(unsigned int) <= sizeof(PY_LONG_LONG)) {
  156744. __PYX_VERIFY_RETURN_INT_EXC(unsigned int, PY_LONG_LONG, PyLong_AsLongLong(x))
  156745. #endif
  156746. }
  156747. }
  156748. {
  156749. #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
  156750. PyErr_SetString(PyExc_RuntimeError,
  156751. "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
  156752. #else
  156753. unsigned int val;
  156754. PyObject *v = __Pyx_PyNumber_IntOrLong(x);
  156755. #if PY_MAJOR_VERSION < 3
  156756. if (likely(v) && !PyLong_Check(v)) {
  156757. PyObject *tmp = v;
  156758. v = PyNumber_Long(tmp);
  156759. Py_DECREF(tmp);
  156760. }
  156761. #endif
  156762. if (likely(v)) {
  156763. int one = 1; int is_little = (int)*(unsigned char *)&one;
  156764. unsigned char *bytes = (unsigned char *)&val;
  156765. int ret = _PyLong_AsByteArray((PyLongObject *)v,
  156766. bytes, sizeof(val),
  156767. is_little, !is_unsigned);
  156768. Py_DECREF(v);
  156769. if (likely(!ret))
  156770. return val;
  156771. }
  156772. #endif
  156773. return (unsigned int) -1;
  156774. }
  156775. } else {
  156776. unsigned int val;
  156777. PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
  156778. if (!tmp) return (unsigned int) -1;
  156779. val = __Pyx_PyInt_As_unsigned_int(tmp);
  156780. Py_DECREF(tmp);
  156781. return val;
  156782. }
  156783. raise_overflow:
  156784. PyErr_SetString(PyExc_OverflowError,
  156785. "value too large to convert to unsigned int");
  156786. return (unsigned int) -1;
  156787. raise_neg_overflow:
  156788. PyErr_SetString(PyExc_OverflowError,
  156789. "can't convert negative value to unsigned int");
  156790. return (unsigned int) -1;
  156791. }
  156792. /* CIntFromPy */
  156793. static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *x) {
  156794. const size_t neg_one = (size_t) ((size_t) 0 - (size_t) 1), const_zero = (size_t) 0;
  156795. const int is_unsigned = neg_one > const_zero;
  156796. #if PY_MAJOR_VERSION < 3
  156797. if (likely(PyInt_Check(x))) {
  156798. if (sizeof(size_t) < sizeof(long)) {
  156799. __PYX_VERIFY_RETURN_INT(size_t, long, PyInt_AS_LONG(x))
  156800. } else {
  156801. long val = PyInt_AS_LONG(x);
  156802. if (is_unsigned && unlikely(val < 0)) {
  156803. goto raise_neg_overflow;
  156804. }
  156805. return (size_t) val;
  156806. }
  156807. } else
  156808. #endif
  156809. if (likely(PyLong_Check(x))) {
  156810. if (is_unsigned) {
  156811. #if CYTHON_USE_PYLONG_INTERNALS
  156812. const digit* digits = ((PyLongObject*)x)->ob_digit;
  156813. switch (Py_SIZE(x)) {
  156814. case 0: return (size_t) 0;
  156815. case 1: __PYX_VERIFY_RETURN_INT(size_t, digit, digits[0])
  156816. case 2:
  156817. if (8 * sizeof(size_t) > 1 * PyLong_SHIFT) {
  156818. if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
  156819. __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  156820. } else if (8 * sizeof(size_t) >= 2 * PyLong_SHIFT) {
  156821. return (size_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
  156822. }
  156823. }
  156824. break;
  156825. case 3:
  156826. if (8 * sizeof(size_t) > 2 * PyLong_SHIFT) {
  156827. if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
  156828. __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  156829. } else if (8 * sizeof(size_t) >= 3 * PyLong_SHIFT) {
  156830. return (size_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
  156831. }
  156832. }
  156833. break;
  156834. case 4:
  156835. if (8 * sizeof(size_t) > 3 * PyLong_SHIFT) {
  156836. if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
  156837. __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  156838. } else if (8 * sizeof(size_t) >= 4 * PyLong_SHIFT) {
  156839. return (size_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
  156840. }
  156841. }
  156842. break;
  156843. }
  156844. #endif
  156845. #if CYTHON_COMPILING_IN_CPYTHON
  156846. if (unlikely(Py_SIZE(x) < 0)) {
  156847. goto raise_neg_overflow;
  156848. }
  156849. #else
  156850. {
  156851. int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
  156852. if (unlikely(result < 0))
  156853. return (size_t) -1;
  156854. if (unlikely(result == 1))
  156855. goto raise_neg_overflow;
  156856. }
  156857. #endif
  156858. if (sizeof(size_t) <= sizeof(unsigned long)) {
  156859. __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned long, PyLong_AsUnsignedLong(x))
  156860. #ifdef HAVE_LONG_LONG
  156861. } else if (sizeof(size_t) <= sizeof(unsigned PY_LONG_LONG)) {
  156862. __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
  156863. #endif
  156864. }
  156865. } else {
  156866. #if CYTHON_USE_PYLONG_INTERNALS
  156867. const digit* digits = ((PyLongObject*)x)->ob_digit;
  156868. switch (Py_SIZE(x)) {
  156869. case 0: return (size_t) 0;
  156870. case -1: __PYX_VERIFY_RETURN_INT(size_t, sdigit, (sdigit) (-(sdigit)digits[0]))
  156871. case 1: __PYX_VERIFY_RETURN_INT(size_t, digit, +digits[0])
  156872. case -2:
  156873. if (8 * sizeof(size_t) - 1 > 1 * PyLong_SHIFT) {
  156874. if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
  156875. __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  156876. } else if (8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT) {
  156877. return (size_t) (((size_t)-1)*(((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
  156878. }
  156879. }
  156880. break;
  156881. case 2:
  156882. if (8 * sizeof(size_t) > 1 * PyLong_SHIFT) {
  156883. if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
  156884. __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  156885. } else if (8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT) {
  156886. return (size_t) ((((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
  156887. }
  156888. }
  156889. break;
  156890. case -3:
  156891. if (8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT) {
  156892. if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
  156893. __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  156894. } else if (8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT) {
  156895. return (size_t) (((size_t)-1)*(((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
  156896. }
  156897. }
  156898. break;
  156899. case 3:
  156900. if (8 * sizeof(size_t) > 2 * PyLong_SHIFT) {
  156901. if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
  156902. __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  156903. } else if (8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT) {
  156904. return (size_t) ((((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
  156905. }
  156906. }
  156907. break;
  156908. case -4:
  156909. if (8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT) {
  156910. if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
  156911. __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  156912. } else if (8 * sizeof(size_t) - 1 > 4 * PyLong_SHIFT) {
  156913. return (size_t) (((size_t)-1)*(((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
  156914. }
  156915. }
  156916. break;
  156917. case 4:
  156918. if (8 * sizeof(size_t) > 3 * PyLong_SHIFT) {
  156919. if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
  156920. __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  156921. } else if (8 * sizeof(size_t) - 1 > 4 * PyLong_SHIFT) {
  156922. return (size_t) ((((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
  156923. }
  156924. }
  156925. break;
  156926. }
  156927. #endif
  156928. if (sizeof(size_t) <= sizeof(long)) {
  156929. __PYX_VERIFY_RETURN_INT_EXC(size_t, long, PyLong_AsLong(x))
  156930. #ifdef HAVE_LONG_LONG
  156931. } else if (sizeof(size_t) <= sizeof(PY_LONG_LONG)) {
  156932. __PYX_VERIFY_RETURN_INT_EXC(size_t, PY_LONG_LONG, PyLong_AsLongLong(x))
  156933. #endif
  156934. }
  156935. }
  156936. {
  156937. #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
  156938. PyErr_SetString(PyExc_RuntimeError,
  156939. "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
  156940. #else
  156941. size_t val;
  156942. PyObject *v = __Pyx_PyNumber_IntOrLong(x);
  156943. #if PY_MAJOR_VERSION < 3
  156944. if (likely(v) && !PyLong_Check(v)) {
  156945. PyObject *tmp = v;
  156946. v = PyNumber_Long(tmp);
  156947. Py_DECREF(tmp);
  156948. }
  156949. #endif
  156950. if (likely(v)) {
  156951. int one = 1; int is_little = (int)*(unsigned char *)&one;
  156952. unsigned char *bytes = (unsigned char *)&val;
  156953. int ret = _PyLong_AsByteArray((PyLongObject *)v,
  156954. bytes, sizeof(val),
  156955. is_little, !is_unsigned);
  156956. Py_DECREF(v);
  156957. if (likely(!ret))
  156958. return val;
  156959. }
  156960. #endif
  156961. return (size_t) -1;
  156962. }
  156963. } else {
  156964. size_t val;
  156965. PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
  156966. if (!tmp) return (size_t) -1;
  156967. val = __Pyx_PyInt_As_size_t(tmp);
  156968. Py_DECREF(tmp);
  156969. return val;
  156970. }
  156971. raise_overflow:
  156972. PyErr_SetString(PyExc_OverflowError,
  156973. "value too large to convert to size_t");
  156974. return (size_t) -1;
  156975. raise_neg_overflow:
  156976. PyErr_SetString(PyExc_OverflowError,
  156977. "can't convert negative value to size_t");
  156978. return (size_t) -1;
  156979. }
  156980. /* IterableCoroutine */
  156981. static PyTypeObject __pyx_IterableCoroutineType_type = {
  156982. PyVarObject_HEAD_INIT(0, 0)
  156983. "iterable_coroutine",
  156984. sizeof(__pyx_CoroutineObject),
  156985. 0,
  156986. (destructor) __Pyx_Coroutine_dealloc,
  156987. 0,
  156988. 0,
  156989. 0,
  156990. #if CYTHON_USE_ASYNC_SLOTS
  156991. &__pyx_Coroutine_as_async,
  156992. #else
  156993. 0,
  156994. #endif
  156995. 0,
  156996. 0,
  156997. 0,
  156998. 0,
  156999. 0,
  157000. 0,
  157001. 0,
  157002. 0,
  157003. 0,
  157004. 0,
  157005. Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE,
  157006. 0,
  157007. (traverseproc) __Pyx_Coroutine_traverse,
  157008. 0,
  157009. #if CYTHON_USE_ASYNC_SLOTS && CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 && PY_VERSION_HEX < 0x030500B1
  157010. __Pyx_Coroutine_compare,
  157011. #else
  157012. 0,
  157013. #endif
  157014. offsetof(__pyx_CoroutineObject, gi_weakreflist),
  157015. __Pyx_Coroutine_await,
  157016. (iternextfunc) __Pyx_Generator_Next,
  157017. __pyx_Coroutine_methods,
  157018. __pyx_Coroutine_memberlist,
  157019. __pyx_Coroutine_getsets,
  157020. 0,
  157021. 0,
  157022. 0,
  157023. 0,
  157024. 0,
  157025. 0,
  157026. 0,
  157027. 0,
  157028. 0,
  157029. 0,
  157030. 0,
  157031. 0,
  157032. 0,
  157033. 0,
  157034. 0,
  157035. #if PY_VERSION_HEX >= 0x030400a1
  157036. 0,
  157037. #else
  157038. __Pyx_Coroutine_del,
  157039. #endif
  157040. 0,
  157041. #if PY_VERSION_HEX >= 0x030400a1
  157042. __Pyx_Coroutine_del,
  157043. #endif
  157044. #if PY_VERSION_HEX >= 0x030800b1
  157045. 0,
  157046. #endif
  157047. };
  157048. static int __pyx_IterableCoroutine_init(void) {
  157049. __pyx_IterableCoroutineType_type.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  157050. __pyx_IterableCoroutineType = __Pyx_FetchCommonType(&__pyx_IterableCoroutineType_type);
  157051. if (unlikely(!__pyx_IterableCoroutineType))
  157052. return -1;
  157053. return 0;
  157054. }
  157055. /* Generator */
  157056. static PyMethodDef __pyx_Generator_methods[] = {
  157057. {"send", (PyCFunction) __Pyx_Coroutine_Send, METH_O,
  157058. (char*) PyDoc_STR("send(arg) -> send 'arg' into generator,\nreturn next yielded value or raise StopIteration.")},
  157059. {"throw", (PyCFunction) __Pyx_Coroutine_Throw, METH_VARARGS,
  157060. (char*) PyDoc_STR("throw(typ[,val[,tb]]) -> raise exception in generator,\nreturn next yielded value or raise StopIteration.")},
  157061. {"close", (PyCFunction) __Pyx_Coroutine_Close_Method, METH_NOARGS,
  157062. (char*) PyDoc_STR("close() -> raise GeneratorExit inside generator.")},
  157063. {0, 0, 0, 0}
  157064. };
  157065. static PyMemberDef __pyx_Generator_memberlist[] = {
  157066. {(char *) "gi_running", T_BOOL, offsetof(__pyx_CoroutineObject, is_running), READONLY, NULL},
  157067. {(char*) "gi_yieldfrom", T_OBJECT, offsetof(__pyx_CoroutineObject, yieldfrom), READONLY,
  157068. (char*) PyDoc_STR("object being iterated by 'yield from', or None")},
  157069. {(char*) "gi_code", T_OBJECT, offsetof(__pyx_CoroutineObject, gi_code), READONLY, NULL},
  157070. {0, 0, 0, 0, 0}
  157071. };
  157072. static PyGetSetDef __pyx_Generator_getsets[] = {
  157073. {(char *) "__name__", (getter)__Pyx_Coroutine_get_name, (setter)__Pyx_Coroutine_set_name,
  157074. (char*) PyDoc_STR("name of the generator"), 0},
  157075. {(char *) "__qualname__", (getter)__Pyx_Coroutine_get_qualname, (setter)__Pyx_Coroutine_set_qualname,
  157076. (char*) PyDoc_STR("qualified name of the generator"), 0},
  157077. {0, 0, 0, 0, 0}
  157078. };
  157079. static PyTypeObject __pyx_GeneratorType_type = {
  157080. PyVarObject_HEAD_INIT(0, 0)
  157081. "generator",
  157082. sizeof(__pyx_CoroutineObject),
  157083. 0,
  157084. (destructor) __Pyx_Coroutine_dealloc,
  157085. 0,
  157086. 0,
  157087. 0,
  157088. 0,
  157089. 0,
  157090. 0,
  157091. 0,
  157092. 0,
  157093. 0,
  157094. 0,
  157095. 0,
  157096. 0,
  157097. 0,
  157098. 0,
  157099. Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE,
  157100. 0,
  157101. (traverseproc) __Pyx_Coroutine_traverse,
  157102. 0,
  157103. 0,
  157104. offsetof(__pyx_CoroutineObject, gi_weakreflist),
  157105. 0,
  157106. (iternextfunc) __Pyx_Generator_Next,
  157107. __pyx_Generator_methods,
  157108. __pyx_Generator_memberlist,
  157109. __pyx_Generator_getsets,
  157110. 0,
  157111. 0,
  157112. 0,
  157113. 0,
  157114. 0,
  157115. 0,
  157116. 0,
  157117. 0,
  157118. 0,
  157119. 0,
  157120. 0,
  157121. 0,
  157122. 0,
  157123. 0,
  157124. 0,
  157125. #if CYTHON_USE_TP_FINALIZE
  157126. 0,
  157127. #else
  157128. __Pyx_Coroutine_del,
  157129. #endif
  157130. 0,
  157131. #if CYTHON_USE_TP_FINALIZE
  157132. __Pyx_Coroutine_del,
  157133. #elif PY_VERSION_HEX >= 0x030400a1
  157134. 0,
  157135. #endif
  157136. #if PY_VERSION_HEX >= 0x030800b1
  157137. 0,
  157138. #endif
  157139. };
  157140. static int __pyx_Generator_init(void) {
  157141. __pyx_GeneratorType_type.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  157142. __pyx_GeneratorType_type.tp_iter = PyObject_SelfIter;
  157143. __pyx_GeneratorType = __Pyx_FetchCommonType(&__pyx_GeneratorType_type);
  157144. if (unlikely(!__pyx_GeneratorType)) {
  157145. return -1;
  157146. }
  157147. return 0;
  157148. }
  157149. /* CheckBinaryVersion */
  157150. static int __Pyx_check_binary_version(void) {
  157151. char ctversion[4], rtversion[4];
  157152. PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
  157153. PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
  157154. if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
  157155. char message[200];
  157156. PyOS_snprintf(message, sizeof(message),
  157157. "compiletime version %s of module '%.100s' "
  157158. "does not match runtime version %s",
  157159. ctversion, __Pyx_MODULE_NAME, rtversion);
  157160. return PyErr_WarnEx(NULL, message, 1);
  157161. }
  157162. return 0;
  157163. }
  157164. /* InitStrings */
  157165. static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
  157166. while (t->p) {
  157167. #if PY_MAJOR_VERSION < 3
  157168. if (t->is_unicode) {
  157169. *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
  157170. } else if (t->intern) {
  157171. *t->p = PyString_InternFromString(t->s);
  157172. } else {
  157173. *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
  157174. }
  157175. #else
  157176. if (t->is_unicode | t->is_str) {
  157177. if (t->intern) {
  157178. *t->p = PyUnicode_InternFromString(t->s);
  157179. } else if (t->encoding) {
  157180. *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
  157181. } else {
  157182. *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
  157183. }
  157184. } else {
  157185. *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
  157186. }
  157187. #endif
  157188. if (!*t->p)
  157189. return -1;
  157190. if (PyObject_Hash(*t->p) == -1)
  157191. return -1;
  157192. ++t;
  157193. }
  157194. return 0;
  157195. }
  157196. static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
  157197. return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
  157198. }
  157199. static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
  157200. Py_ssize_t ignore;
  157201. return __Pyx_PyObject_AsStringAndSize(o, &ignore);
  157202. }
  157203. #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
  157204. #if !CYTHON_PEP393_ENABLED
  157205. static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
  157206. char* defenc_c;
  157207. PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
  157208. if (!defenc) return NULL;
  157209. defenc_c = PyBytes_AS_STRING(defenc);
  157210. #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
  157211. {
  157212. char* end = defenc_c + PyBytes_GET_SIZE(defenc);
  157213. char* c;
  157214. for (c = defenc_c; c < end; c++) {
  157215. if ((unsigned char) (*c) >= 128) {
  157216. PyUnicode_AsASCIIString(o);
  157217. return NULL;
  157218. }
  157219. }
  157220. }
  157221. #endif
  157222. *length = PyBytes_GET_SIZE(defenc);
  157223. return defenc_c;
  157224. }
  157225. #else
  157226. static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
  157227. if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
  157228. #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
  157229. if (likely(PyUnicode_IS_ASCII(o))) {
  157230. *length = PyUnicode_GET_LENGTH(o);
  157231. return PyUnicode_AsUTF8(o);
  157232. } else {
  157233. PyUnicode_AsASCIIString(o);
  157234. return NULL;
  157235. }
  157236. #else
  157237. return PyUnicode_AsUTF8AndSize(o, length);
  157238. #endif
  157239. }
  157240. #endif
  157241. #endif
  157242. static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
  157243. #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
  157244. if (
  157245. #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
  157246. __Pyx_sys_getdefaultencoding_not_ascii &&
  157247. #endif
  157248. PyUnicode_Check(o)) {
  157249. return __Pyx_PyUnicode_AsStringAndSize(o, length);
  157250. } else
  157251. #endif
  157252. #if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
  157253. if (PyByteArray_Check(o)) {
  157254. *length = PyByteArray_GET_SIZE(o);
  157255. return PyByteArray_AS_STRING(o);
  157256. } else
  157257. #endif
  157258. {
  157259. char* result;
  157260. int r = PyBytes_AsStringAndSize(o, &result, length);
  157261. if (unlikely(r < 0)) {
  157262. return NULL;
  157263. } else {
  157264. return result;
  157265. }
  157266. }
  157267. }
  157268. static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
  157269. int is_true = x == Py_True;
  157270. if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
  157271. else return PyObject_IsTrue(x);
  157272. }
  157273. static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
  157274. int retval;
  157275. if (unlikely(!x)) return -1;
  157276. retval = __Pyx_PyObject_IsTrue(x);
  157277. Py_DECREF(x);
  157278. return retval;
  157279. }
  157280. static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) {
  157281. #if PY_MAJOR_VERSION >= 3
  157282. if (PyLong_Check(result)) {
  157283. if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
  157284. "__int__ returned non-int (type %.200s). "
  157285. "The ability to return an instance of a strict subclass of int "
  157286. "is deprecated, and may be removed in a future version of Python.",
  157287. Py_TYPE(result)->tp_name)) {
  157288. Py_DECREF(result);
  157289. return NULL;
  157290. }
  157291. return result;
  157292. }
  157293. #endif
  157294. PyErr_Format(PyExc_TypeError,
  157295. "__%.4s__ returned non-%.4s (type %.200s)",
  157296. type_name, type_name, Py_TYPE(result)->tp_name);
  157297. Py_DECREF(result);
  157298. return NULL;
  157299. }
  157300. static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
  157301. #if CYTHON_USE_TYPE_SLOTS
  157302. PyNumberMethods *m;
  157303. #endif
  157304. const char *name = NULL;
  157305. PyObject *res = NULL;
  157306. #if PY_MAJOR_VERSION < 3
  157307. if (likely(PyInt_Check(x) || PyLong_Check(x)))
  157308. #else
  157309. if (likely(PyLong_Check(x)))
  157310. #endif
  157311. return __Pyx_NewRef(x);
  157312. #if CYTHON_USE_TYPE_SLOTS
  157313. m = Py_TYPE(x)->tp_as_number;
  157314. #if PY_MAJOR_VERSION < 3
  157315. if (m && m->nb_int) {
  157316. name = "int";
  157317. res = m->nb_int(x);
  157318. }
  157319. else if (m && m->nb_long) {
  157320. name = "long";
  157321. res = m->nb_long(x);
  157322. }
  157323. #else
  157324. if (likely(m && m->nb_int)) {
  157325. name = "int";
  157326. res = m->nb_int(x);
  157327. }
  157328. #endif
  157329. #else
  157330. if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
  157331. res = PyNumber_Int(x);
  157332. }
  157333. #endif
  157334. if (likely(res)) {
  157335. #if PY_MAJOR_VERSION < 3
  157336. if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
  157337. #else
  157338. if (unlikely(!PyLong_CheckExact(res))) {
  157339. #endif
  157340. return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
  157341. }
  157342. }
  157343. else if (!PyErr_Occurred()) {
  157344. PyErr_SetString(PyExc_TypeError,
  157345. "an integer is required");
  157346. }
  157347. return res;
  157348. }
  157349. static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
  157350. Py_ssize_t ival;
  157351. PyObject *x;
  157352. #if PY_MAJOR_VERSION < 3
  157353. if (likely(PyInt_CheckExact(b))) {
  157354. if (sizeof(Py_ssize_t) >= sizeof(long))
  157355. return PyInt_AS_LONG(b);
  157356. else
  157357. return PyInt_AsSsize_t(b);
  157358. }
  157359. #endif
  157360. if (likely(PyLong_CheckExact(b))) {
  157361. #if CYTHON_USE_PYLONG_INTERNALS
  157362. const digit* digits = ((PyLongObject*)b)->ob_digit;
  157363. const Py_ssize_t size = Py_SIZE(b);
  157364. if (likely(__Pyx_sst_abs(size) <= 1)) {
  157365. ival = likely(size) ? digits[0] : 0;
  157366. if (size == -1) ival = -ival;
  157367. return ival;
  157368. } else {
  157369. switch (size) {
  157370. case 2:
  157371. if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
  157372. return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
  157373. }
  157374. break;
  157375. case -2:
  157376. if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
  157377. return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
  157378. }
  157379. break;
  157380. case 3:
  157381. if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
  157382. return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
  157383. }
  157384. break;
  157385. case -3:
  157386. if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
  157387. return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
  157388. }
  157389. break;
  157390. case 4:
  157391. if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
  157392. return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
  157393. }
  157394. break;
  157395. case -4:
  157396. if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
  157397. return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
  157398. }
  157399. break;
  157400. }
  157401. }
  157402. #endif
  157403. return PyLong_AsSsize_t(b);
  157404. }
  157405. x = PyNumber_Index(b);
  157406. if (!x) return -1;
  157407. ival = PyInt_AsSsize_t(x);
  157408. Py_DECREF(x);
  157409. return ival;
  157410. }
  157411. static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
  157412. return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False);
  157413. }
  157414. static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
  157415. return PyInt_FromSize_t(ival);
  157416. }
  157417. #endif /* Py_PYTHON_H */